from django.urls import path

from config.master_auth_views import (
    master_login,
    master_logout,
    master_me,
    master_refresh,
    master_validate_token,
)
from config.master_did_views import (
    master_did_collection,
    master_did_detail,
    master_did_statistics,
)
from config.master_voice_views import (
    master_voice_by_plan,
    master_voice_plans,
    master_voice_preview_by_id,
    master_voice_preview_proxy,
    master_voice_sync,
)
from config.master_business_views import (
    master_business_check_domain,
    master_business_check_email,
    master_business_check_username,
    master_business_detail,
    master_businesses_collection,
    master_businesses_statistics,
)

urlpatterns = [
    # Auth
    path("master/login/", master_login),
    path("master/login", master_login),
    path("master/validate-token/", master_validate_token),
    path("master/validate-token", master_validate_token),
    path("master/logout/", master_logout),
    path("master/logout", master_logout),
    path("master/refresh/", master_refresh),
    path("master/refresh", master_refresh),
    path("master/me/", master_me),
    path("master/me", master_me),

    # DID Numbers
    path("master/did-numbers/statistics/", master_did_statistics),
    path("master/did-numbers/statistics", master_did_statistics),
    path("master/did-numbers/<int:did_id>/", master_did_detail),
    path("master/did-numbers/<int:did_id>", master_did_detail),
    path("master/did-numbers/", master_did_collection),
    path("master/did-numbers", master_did_collection),

    # Voice Plans
    path("master/voice-plans/preview/", master_voice_preview_proxy),
    path("master/voice-plans/preview", master_voice_preview_proxy),
    path("master/voice-plans/preview-by-id/", master_voice_preview_by_id),
    path("master/voice-plans/preview-by-id", master_voice_preview_by_id),
    path("master/voice-plans/sync/", master_voice_sync),
    path("master/voice-plans/sync", master_voice_sync),
    path("master/voice-plans/by-plan/<str:plan>/", master_voice_by_plan),
    path("master/voice-plans/by-plan/<str:plan>", master_voice_by_plan),
    path("master/voice-plans/", master_voice_plans),
    path("master/voice-plans", master_voice_plans),

    # Businesses
    path("master/businesses/statistics/", master_businesses_statistics),
    path("master/businesses/statistics", master_businesses_statistics),
    path("master/businesses/check-domain/", master_business_check_domain),
    path("master/businesses/check-domain", master_business_check_domain),
    path("master/businesses/check-email/", master_business_check_email),
    path("master/businesses/check-email", master_business_check_email),
    path("master/businesses/check-username/", master_business_check_username),
    path("master/businesses/check-username", master_business_check_username),
    path("master/businesses/<int:business_id>/", master_business_detail),
    path("master/businesses/<int:business_id>", master_business_detail),
    path("master/businesses/", master_businesses_collection),
    path("master/businesses", master_businesses_collection),
]

