alternative-backend-service/meetings/urls.py

108 lines
5.8 KiB
Python

from django.urls import path
from .views import (
AdminAvailabilityView,
AdminAvailabilityConfigView,
AppointmentRequestListView,
AppointmentRequestCreateView,
AppointmentRequestDetailView,
ScheduleAppointmentView,
RejectAppointmentView,
AvailableDatesView,
CheckDateAvailabilityView,
WeeklyAvailabilityView,
UserAppointmentsView,
AppointmentStatsView,
UserAppointmentStatsView,
MatchingAvailabilityView,
JoinMeetingView,
MeetingActionView,
UpcomingMeetingsView,
MeetingAnalyticsView,
BulkMeetingActionsView,
availability_overview,
EndMeetingView,
StartMeetingView
)
urlpatterns = [
# Admin Availability URLs
path('admin/availability/', AdminAvailabilityView.as_view(), name='admin-availability'),
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'),
path('appointments/available-dates/', AvailableDatesView.as_view(), name='available-dates'),
# Appointment Request URLs
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'),
path('appointments/<uuid:pk>/matching-availability/', MatchingAvailabilityView.as_view(), name='matching-availability'),
# Appointment Management URLs
path('appointments/<uuid:pk>/schedule/', ScheduleAppointmentView.as_view(), name='appointment-schedule'),
path('appointments/<uuid:pk>/reject/', RejectAppointmentView.as_view(), name='appointment-reject'),
# User-specific URLs
path('user/appointments/', UserAppointmentsView.as_view(), name='user-appointments'),
path('user/appointments/stats/', UserAppointmentStatsView.as_view(), name='user-appointment-stats'),
# Stats URLs
path('appointments/stats/', AppointmentStatsView.as_view(), name='appointment-stats'),
# 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'),
path('meetings/<uuid:pk>/end/', EndMeetingView.as_view(), name='end-meeting-simple'),
path('meetings/<uuid:pk>/start/', StartMeetingView.as_view(), name='start-meeting-simple'),
# 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'),
]