2025-05-13 11:58:17 +08:00
|
|
|
from django.urls import path
|
|
|
|
from .views import (
|
|
|
|
GmailAuthInitiateView,
|
|
|
|
GmailAuthCompleteView,
|
|
|
|
GmailCredentialListView,
|
|
|
|
GmailCredentialDetailView,
|
|
|
|
GmailConversationView,
|
|
|
|
GmailAttachmentListView,
|
|
|
|
GmailPubSubView,
|
2025-05-13 18:36:06 +08:00
|
|
|
GmailSendEmailView,
|
|
|
|
GmailWebhookView,
|
|
|
|
GmailConversationSummaryView
|
2025-05-13 11:58:17 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
app_name = 'gmail'
|
|
|
|
|
|
|
|
urlpatterns = [
|
|
|
|
path('auth/initiate/', GmailAuthInitiateView.as_view(), name='auth_initiate'),
|
|
|
|
path('auth/complete/', GmailAuthCompleteView.as_view(), name='auth_complete'),
|
|
|
|
path('credentials/', GmailCredentialListView.as_view(), name='credential_list'),
|
|
|
|
path('credentials/<int:pk>/', GmailCredentialDetailView.as_view(), name='credential_detail'),
|
|
|
|
path('conversations/', GmailConversationView.as_view(), name='conversation_list'),
|
|
|
|
path('attachments/', GmailAttachmentListView.as_view(), name='attachment_list'),
|
|
|
|
path('attachments/<str:conversation_id>/', GmailAttachmentListView.as_view(), name='attachment_list_by_conversation'),
|
|
|
|
path('notifications/setup/', GmailPubSubView.as_view(), name='pubsub_setup'),
|
|
|
|
path('send/', GmailSendEmailView.as_view(), name='send_email'),
|
2025-05-13 18:36:06 +08:00
|
|
|
path('webhook/', GmailWebhookView.as_view(), name='webhook'),
|
|
|
|
path('conversations/summary/', GmailConversationSummaryView.as_view(), name='conversation_summary_list'),
|
|
|
|
path('conversations/summary/<str:conversation_id>/', GmailConversationSummaryView.as_view(), name='conversation_summary_detail'),
|
2025-05-13 11:58:17 +08:00
|
|
|
]
|