"""
alloggiati/urls.py
==================
URL patterns for the Alloggiati Web integration.

Mounted at /api/alloggiati/ in core/urls.py.
"""

from django.urls import path

from alloggiati.views import (
    AlloggiatiCredentialAPIView,
    AlloggiatiSyncAPIView,
    AlloggiatiSyncLogListAPIView,
)

urlpatterns = [
    # Sync trigger
    path("sync/", AlloggiatiSyncAPIView.as_view(), name="alloggiati-sync"),

    # Sync log history per structure
    path(
        "sync/logs/<int:structure_id>/",
        AlloggiatiSyncLogListAPIView.as_view(),
        name="alloggiati-sync-logs",
    ),

    # Credential management per structure
    path(
        "credentials/<int:structure_id>/",
        AlloggiatiCredentialAPIView.as_view(),
        name="alloggiati-credentials",
    ),
]
