2025-11-23 00:19:26 +00:00
|
|
|
from django.urls import path
|
|
|
|
|
from .views import (
|
|
|
|
|
AdminAvailabilityView,
|
2025-11-26 19:30:26 +00:00
|
|
|
AdminAvailabilityConfigView,
|
2025-11-23 00:19:26 +00:00
|
|
|
AppointmentRequestListView,
|
|
|
|
|
AppointmentRequestCreateView,
|
|
|
|
|
AppointmentRequestDetailView,
|
2025-11-24 13:29:07 +00:00
|
|
|
ScheduleAppointmentView,
|
|
|
|
|
RejectAppointmentView,
|
|
|
|
|
AvailableDatesView,
|
2025-11-26 19:30:26 +00:00
|
|
|
CheckDateAvailabilityView,
|
|
|
|
|
WeeklyAvailabilityView,
|
2025-11-24 13:29:07 +00:00
|
|
|
UserAppointmentsView,
|
|
|
|
|
AppointmentStatsView,
|
2025-11-26 19:30:26 +00:00
|
|
|
UserAppointmentStatsView,
|
|
|
|
|
MatchingAvailabilityView,
|
2025-12-02 19:32:51 +00:00
|
|
|
JoinMeetingView,
|
|
|
|
|
MeetingActionView,
|
|
|
|
|
UpcomingMeetingsView,
|
|
|
|
|
MeetingAnalyticsView,
|
|
|
|
|
BulkMeetingActionsView,
|
2025-12-04 10:57:19 +00:00
|
|
|
availability_overview,
|
|
|
|
|
EndMeetingView,
|
|
|
|
|
StartMeetingView
|
2025-11-23 00:19:26 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
urlpatterns = [
|
2025-12-02 19:32:51 +00:00
|
|
|
# Admin Availability URLs
|
2025-11-23 00:19:26 +00:00
|
|
|
path('admin/availability/', AdminAvailabilityView.as_view(), name='admin-availability'),
|
2025-11-26 19:30:26 +00:00
|
|
|
path('availability/config/', AdminAvailabilityConfigView.as_view(), name='availability-config'),
|
|
|
|
|
path('availability/check/', CheckDateAvailabilityView.as_view(), name='check-availability'),
|
|
|
|
|
path('availability/weekly/', WeeklyAvailabilityView.as_view(), name='weekly-availability'),
|
|
|
|
|
path('availability/overview/', availability_overview, name='availability-overview'),
|
2025-12-02 19:32:51 +00:00
|
|
|
path('appointments/available-dates/', AvailableDatesView.as_view(), name='available-dates'),
|
2025-11-23 00:19:26 +00:00
|
|
|
|
2025-12-02 19:32:51 +00:00
|
|
|
# Appointment Request URLs
|
2025-11-23 00:19:26 +00:00
|
|
|
path('appointments/', AppointmentRequestListView.as_view(), name='appointment-list'),
|
|
|
|
|
path('appointments/create/', AppointmentRequestCreateView.as_view(), name='appointment-create'),
|
|
|
|
|
path('appointments/<uuid:pk>/', AppointmentRequestDetailView.as_view(), name='appointment-detail'),
|
2025-11-26 19:30:26 +00:00
|
|
|
path('appointments/<uuid:pk>/matching-availability/', MatchingAvailabilityView.as_view(), name='matching-availability'),
|
2025-11-23 00:19:26 +00:00
|
|
|
|
2025-12-02 19:32:51 +00:00
|
|
|
# Appointment Management URLs
|
2025-11-24 13:29:07 +00:00
|
|
|
path('appointments/<uuid:pk>/schedule/', ScheduleAppointmentView.as_view(), name='appointment-schedule'),
|
|
|
|
|
path('appointments/<uuid:pk>/reject/', RejectAppointmentView.as_view(), name='appointment-reject'),
|
2025-11-23 00:19:26 +00:00
|
|
|
|
2025-12-02 19:32:51 +00:00
|
|
|
# User-specific URLs
|
2025-11-24 13:29:07 +00:00
|
|
|
path('user/appointments/', UserAppointmentsView.as_view(), name='user-appointments'),
|
2025-12-02 19:32:51 +00:00
|
|
|
path('user/appointments/stats/', UserAppointmentStatsView.as_view(), name='user-appointment-stats'),
|
2025-11-23 00:19:26 +00:00
|
|
|
|
2025-12-02 19:32:51 +00:00
|
|
|
# Stats URLs
|
2025-11-24 13:29:07 +00:00
|
|
|
path('appointments/stats/', AppointmentStatsView.as_view(), name='appointment-stats'),
|
2025-12-02 19:32:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
# Meeting Join URLs
|
|
|
|
|
path('appointments/<uuid:pk>/join-meeting/', JoinMeetingView.as_view(), name='join-meeting'),
|
|
|
|
|
path('appointments/<uuid:pk>/join-meeting/participant/',
|
|
|
|
|
JoinMeetingView.as_view(), {'user_type': 'participant'}, name='join-meeting-participant'),
|
|
|
|
|
path('appointments/<uuid:pk>/join-meeting/moderator/',
|
|
|
|
|
JoinMeetingView.as_view(), {'user_type': 'moderator'}, name='join-meeting-moderator'),
|
|
|
|
|
|
|
|
|
|
# Meeting Actions
|
|
|
|
|
path('appointments/<uuid:pk>/meeting-actions/', MeetingActionView.as_view(), name='meeting-actions'),
|
|
|
|
|
path('appointments/<uuid:pk>/start-meeting/',
|
|
|
|
|
MeetingActionView.as_view(), {'action': 'start'}, name='start-meeting'),
|
|
|
|
|
path('appointments/<uuid:pk>/end-meeting/',
|
|
|
|
|
MeetingActionView.as_view(), {'action': 'end'}, name='end-meeting'),
|
|
|
|
|
path('appointments/<uuid:pk>/update-meeting-metadata/',
|
|
|
|
|
MeetingActionView.as_view(), {'action': 'update_metadata'}, name='update-meeting-metadata'),
|
|
|
|
|
path('appointments/<uuid:pk>/save-recording/',
|
|
|
|
|
MeetingActionView.as_view(), {'action': 'record'}, name='save-recording'),
|
|
|
|
|
|
|
|
|
|
# Meeting Views
|
|
|
|
|
path('meetings/upcoming/', UpcomingMeetingsView.as_view(), name='upcoming-meetings'),
|
|
|
|
|
path('meetings/today/', UpcomingMeetingsView.as_view(), {'today_only': True}, name='today-meetings'),
|
|
|
|
|
path('meetings/past/', UpcomingMeetingsView.as_view(), {'past_only': True}, name='past-meetings'),
|
|
|
|
|
|
|
|
|
|
# Meeting Analytics
|
|
|
|
|
path('appointments/<uuid:pk>/meeting-analytics/', MeetingAnalyticsView.as_view(), name='meeting-analytics'),
|
|
|
|
|
path('meetings/analytics/summary/', MeetingAnalyticsView.as_view(), {'summary': True}, name='meeting-analytics-summary'),
|
|
|
|
|
|
|
|
|
|
# Bulk Meeting Operations
|
|
|
|
|
path('meetings/bulk-actions/', BulkMeetingActionsView.as_view(), name='bulk-meeting-actions'),
|
|
|
|
|
path('meetings/bulk-create/',
|
|
|
|
|
BulkMeetingActionsView.as_view(), {'action': 'create_jitsi_meetings'}, name='bulk-create-meetings'),
|
|
|
|
|
path('meetings/bulk-send-reminders/',
|
|
|
|
|
BulkMeetingActionsView.as_view(), {'action': 'send_reminders'}, name='bulk-send-reminders'),
|
|
|
|
|
path('meetings/bulk-end-old/',
|
|
|
|
|
BulkMeetingActionsView.as_view(), {'action': 'end_old_meetings'}, name='bulk-end-old-meetings'),
|
|
|
|
|
|
|
|
|
|
# Meeting Quick Actions (simplified endpoints)
|
|
|
|
|
path('meetings/<uuid:pk>/quick-join/',
|
|
|
|
|
JoinMeetingView.as_view(), {'quick_join': True}, name='quick-join-meeting'),
|
|
|
|
|
path('meetings/<uuid:pk>/quick-join/patient/',
|
|
|
|
|
JoinMeetingView.as_view(), {'quick_join': True, 'user_type': 'participant'}, name='quick-join-patient'),
|
|
|
|
|
path('meetings/<uuid:pk>/quick-join/therapist/',
|
|
|
|
|
JoinMeetingView.as_view(), {'quick_join': True, 'user_type': 'moderator'}, name='quick-join-therapist'),
|
|
|
|
|
|
|
|
|
|
# Meeting Status & Info
|
|
|
|
|
path('meetings/<uuid:pk>/status/', MeetingActionView.as_view(), {'get_status': True}, name='meeting-status'),
|
|
|
|
|
path('meetings/<uuid:pk>/info/', JoinMeetingView.as_view(), {'info_only': True}, name='meeting-info'),
|
2025-12-04 10:57:19 +00:00
|
|
|
|
|
|
|
|
path('meetings/<uuid:pk>/end/', EndMeetingView.as_view(), name='end-meeting-simple'),
|
|
|
|
|
path('meetings/<uuid:pk>/start/', StartMeetingView.as_view(), name='start-meeting-simple'),
|
2025-12-02 19:32:51 +00:00
|
|
|
|
|
|
|
|
# Meeting Webhook/Notification endpoints (for Jitsi callbacks)
|
|
|
|
|
path('meetings/webhook/jitsi/', MeetingActionView.as_view(), {'webhook': True}, name='jitsi-webhook'),
|
|
|
|
|
path('meetings/recording-callback/', MeetingActionView.as_view(), {'recording_callback': True}, name='recording-callback'),
|
2025-11-23 00:19:26 +00:00
|
|
|
]
|