""" apps/chat/urls.py — Chat domain URL routing. """ from django.urls import path from apps.chat.apis.sync.chat_views import ( ConversationListView, StartConversationView, ConversationDetailView, SendMessageView, MarkConversationReadView, CreateOfferView, RespondOfferView, FlagConversationView, ) app_name = "chat" urlpatterns = [ # ── Conversations ────────────────────────────────────────────────────── # GET /api/v1/chat/conversations/ list user's conversations # POST /api/v1/chat/conversations/ start or retrieve a conversation path("conversations/", ConversationListView.as_view(), name="conversation-list"), path("conversations/start/", StartConversationView.as_view(), name="conversation-start"), # ── Conversation Detail + Messages ───────────────────────────────────── # GET /api/v1/chat/conversations// get messages (paginated) path( "conversations//", ConversationDetailView.as_view(), name="conversation-detail", ), # POST /api/v1/chat/conversations//messages/ send a message path( "conversations//messages/", SendMessageView.as_view(), name="send-message", ), path( "conversations//read/", MarkConversationReadView.as_view(), name="mark-conversation-read", ), # ── Offers ──────────────────────────────────────────────────────────── # POST /api/v1/chat/conversations//offers/ vendor creates offer path( "conversations//offers/", CreateOfferView.as_view(), name="create-offer", ), # POST /api/v1/chat/offers//accept/ buyer accepts # POST /api/v1/chat/offers//decline/ buyer declines path( "offers///", RespondOfferView.as_view(), name="respond-offer", ), # ── Moderation ──────────────────────────────────────────────────────── # POST /api/v1/chat/conversations//flag/ path( "conversations//flag/", FlagConversationView.as_view(), name="flag-conversation", ), ]