from django.urls import path from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView from apps.users.api import views app_name = "users" urlpatterns = [ path("register/", views.RegisterWithOTPView.as_view(), name="register_verify"), path("register/password/", views.RegisterWithPasswordView.as_view(), name="register_password"), path("otp/send/", views.SendOTPView.as_view(), name="send_otp"), path("otp/login/", views.LoginOTPView.as_view(), name="login_otp"), path("login/", views.LoginView.as_view(), name="login"), path("oauth/google/start/", views.GoogleOAuthStartView.as_view(), name="google_oauth_start"), path("oauth/google/callback/", views.GoogleOAuthCallbackView.as_view(), name="google_oauth_callback"), path("oauth/google/flow/", views.GoogleOAuthFlowView.as_view(), name="google_oauth_flow"), path("oauth/google/complete/", views.GoogleOAuthCompleteView.as_view(), name="google_oauth_complete"), path("oauth/google/claim/send-otp/", views.GoogleOAuthClaimSendOtpView.as_view(), name="google_oauth_claim_send_otp"), path("oauth/google/claim/verify/", views.GoogleOAuthClaimVerifyView.as_view(), name="google_oauth_claim_verify"), path("logout/", views.LogoutView.as_view(), name="logout"), path("password/set/", views.SetPasswordView.as_view(), name="set_password"), path("password/reset/", views.ResetPasswordView.as_view(), name="reset_password"), path("password/change/", views.ChangePasswordView.as_view(), name="change_password"), path("profile/picture/", views.ProfilePictureView.as_view(), name="profile_picture"), path("list/", views.UserListView.as_view(), name="user_list"), path('me/', views.UserProfileViewSet.as_view({ 'get': 'retrieve', 'put': 'update', 'patch': 'partial_update', 'delete': 'destroy' }), name='user-me'), path('search/', views.UserSearchAPIView.as_view(), name='user-search'), path("token/obtain/", TokenObtainPairView.as_view(), name="token_obtain_pair"), path("token/refresh/", TokenRefreshView.as_view(), name="token_refresh"), ]