2026-03-28 14:03:56 +03:00

38 lines
2.1 KiB
Python

from django.urls import path
from . import views
app_name = "notifications"
urlpatterns = [
# Notification Settings
path("settings/", views.notification_settings_view, name="settings"),
path("settings/<uuid:hospital_id>/", views.notification_settings_view, name="settings_with_hospital"),
# Settings Update
path("settings/update/", views.notification_settings_update, name="settings_update"),
path(
"settings/<uuid:hospital_id>/update/", views.notification_settings_update, name="settings_update_with_hospital"
),
# Quiet Hours
path("settings/quiet-hours/", views.update_quiet_hours, name="update_quiet_hours"),
path("settings/<uuid:hospital_id>/quiet-hours/", views.update_quiet_hours, name="update_quiet_hours_with_hospital"),
# Test Notification
path("settings/test/", views.test_notification, name="test_notification"),
path("settings/<uuid:hospital_id>/test/", views.test_notification, name="test_notification_with_hospital"),
# API
path("api/settings/", views.notification_settings_api, name="settings_api"),
path("api/settings/<uuid:hospital_id>/", views.notification_settings_api, name="settings_api_with_hospital"),
# Direct SMS Send (Admin only)
path("send-sms/", views.send_sms_direct, name="send_sms_direct"),
# Notification Inbox
path("inbox/", views.notification_inbox, name="inbox"),
# Notification API Endpoints
path("api/list/", views.notification_list_api, name="notification_list_api"),
path("api/mark-read/<uuid:notification_id>/", views.mark_notification_read, name="mark_notification_read"),
path("api/mark-all-read/", views.mark_all_notifications_read, name="mark_all_notifications_read"),
path("api/dismiss/<uuid:notification_id>/", views.dismiss_notification, name="dismiss_notification"),
path("api/dismiss-all/", views.dismiss_all_notifications, name="dismiss_all_notifications"),
path("api/unread-count/", views.unread_notification_count, name="unread_notification_count"),
path("api/latest/", views.latest_notifications, name="latest_notifications"),
]