Files
chat_backend/llm_be/chat_backend/urls.py
T
westfarn be6ff471ad
CI / test (pull_request) Failing after 7s
Unit Tests / test (pull_request) Failing after 6s
Add Google/Microsoft SSO OAuth for register and sign-in (#24)
Introduce OAuthIdentity storage, start/callback endpoints, JWT handoff to
the SPA, and mocked IdP tests so Drive OAuth (#11) can reuse the same model.
2026-07-27 07:09:02 -05:00

108 lines
3.4 KiB
Python

from django.urls import path
from rest_framework_simplejwt import views as jwt_views
from .views import (
AcknowledgeTermsOfService,
CustomObtainTokenView,
CustomUserCreate,
CustomUserInvite,
LogoutAndBlacklistRefreshTokenForUserView,
CustomUserGet,
PublicSettingsView,
is_authenticated,
AnnouncmentView,
FeedbackView,
ConversationsView,
ConversationDetailView,
CompanyUsersView,
SetUserPassword,
ConversationPreferences,
UserPromptAnalytics,
UserConversationAnalytics,
CompanyUsageAnalytics,
AdminAnalytics,
DocumentWorkspaceView,
DocumentUploadView,
DocumentDetailView,
)
from .views_oauth import OAuthCallbackView, OAuthStartView
from rest_framework.routers import DefaultRouter
urlpatterns = [
path("token/obtain/", CustomObtainTokenView.as_view(), name="token_create"),
path("token/refresh/", jwt_views.TokenRefreshView.as_view(), name="token_refresh"),
path("user/create/", CustomUserCreate.as_view(), name="create_user"),
path("public/settings/", PublicSettingsView.as_view(), name="public_settings"),
path(
"auth/oauth/<str:provider>/start/",
OAuthStartView.as_view(),
name="oauth_start",
),
path(
"auth/oauth/<str:provider>/callback/",
OAuthCallbackView.as_view(),
name="oauth_callback",
),
path("user/invite/", CustomUserInvite.as_view(), name="invite_user"),
path(
"user/reset_password/", ResetUserPassword.as_view(), name="reset_password"
),
path(
"user/set_password/<slug:slug>/", SetUserPassword.as_view(), name="set_password"
),
path(
"blacklist/",
LogoutAndBlacklistRefreshTokenForUserView.as_view(),
name="blacklist",
),
path("user/get/", CustomUserGet.as_view(), name="get_user"),
path(
"user/acknowledge_tos/",
AcknowledgeTermsOfService.as_view(),
name="acknowledge_tos",
),
path("company_users", CompanyUsersView.as_view(), name="company_users"),
path("user/is_authenticated/", is_authenticated, name="is_authenticated"),
path("announcment/get/", AnnouncmentView.as_view(), name="get_announcments"),
path("conversations", ConversationsView.as_view(), name="conversations"),
path("feedbacks/", FeedbackView.as_view(), name="feedbacks"),
path(
"conversation_details",
ConversationDetailView.as_view(),
name="conversation_details",
),
path(
"conversation_preferences",
ConversationPreferences.as_view(),
name="conversation_preferences",
),
path(
"analytics/user_prompts/",
UserPromptAnalytics.as_view(),
name="analytics_user_prompts",
),
path(
"analytics/user_conversations/",
UserConversationAnalytics.as_view(),
name="analytics_user_conversations",
),
path(
"analytics/company_usage/",
CompanyUsageAnalytics.as_view(),
name="analytics_company_usage",
),
path("analytics/admin/", AdminAnalytics.as_view(), name="analytics_admin"),
# document urls
path(
"document_workspaces/",
DocumentWorkspaceView.as_view(),
name="document_workspaces",
),
path("documents/", DocumentUploadView.as_view(), name="documents"),
path(
"documents_details/<int:document_id>",
DocumentDetailView.as_view(),
name="documents_details",
),
]