feat(notifications): add redis-backed sse notification streaming

This commit is contained in:
2026-04-25 11:27:46 +03:30
parent e7de587f59
commit 0ca3255270
14 changed files with 1146 additions and 1 deletions

View File

@@ -0,0 +1,35 @@
from django.urls import include, path
from rest_framework.routers import DefaultRouter
from apps.notifications import views
router = DefaultRouter()
router.register("box", views.NotificationListViewSet, basename="box")
app_name = "notification"
urlpatterns = [
path("", include(router.urls)),
path("list/", views.NotificationListView.as_view(), name="notifications"),
path("seen/", views.NotificationSeenView.as_view(), name="notifications-seen"),
path(
"stream-token/",
views.NotificationStreamTokenView.as_view(),
name="notifications-stream-token",
),
path(
"stream/",
views.NotificationStreamView.as_view(),
name="notifications-stream",
),
path(
"seen/all/",
views.NotificationMarkAllReadView.as_view(),
name="notifications-mark-read",
),
path(
"<str:notif_id>/",
views.NotificationDeleteView.as_view(),
name="notifications-delete",
),
]