mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
105 lines
2.8 KiB
Python
105 lines
2.8 KiB
Python
from django.urls import path
|
|
|
|
from plane.api.views import (
|
|
## User
|
|
UserEndpoint,
|
|
UpdateUserOnBoardedEndpoint,
|
|
UpdateUserTourCompletedEndpoint,
|
|
UserActivityEndpoint,
|
|
ChangePasswordEndpoint,
|
|
## End User
|
|
## Workspaces
|
|
UserWorkspaceInvitationsEndpoint,
|
|
UserWorkSpacesEndpoint,
|
|
JoinWorkspaceEndpoint,
|
|
UserWorkspaceInvitationsEndpoint,
|
|
UserWorkspaceInvitationEndpoint,
|
|
UserActivityGraphEndpoint,
|
|
UserIssueCompletedGraphEndpoint,
|
|
UserWorkspaceDashboardEndpoint,
|
|
UserProjectInvitationsViewset,
|
|
## End Workspaces
|
|
)
|
|
|
|
urlpatterns = [
|
|
# User Profile
|
|
path(
|
|
"users/me/",
|
|
UserEndpoint.as_view(
|
|
{"get": "retrieve", "patch": "partial_update", "delete": "destroy"}
|
|
),
|
|
name="users",
|
|
),
|
|
path(
|
|
"users/me/change-password/",
|
|
ChangePasswordEndpoint.as_view(),
|
|
name="change-password",
|
|
),
|
|
path(
|
|
"users/me/onboard/",
|
|
UpdateUserOnBoardedEndpoint.as_view(),
|
|
name="user-onboard",
|
|
),
|
|
path(
|
|
"users/me/tour-completed/",
|
|
UpdateUserTourCompletedEndpoint.as_view(),
|
|
name="user-tour",
|
|
),
|
|
path(
|
|
"users/workspaces/<str:slug>/activities/",
|
|
UserActivityEndpoint.as_view(),
|
|
name="user-activities",
|
|
),
|
|
# user workspaces
|
|
path(
|
|
"users/me/workspaces/",
|
|
UserWorkSpacesEndpoint.as_view(),
|
|
name="user-workspace",
|
|
),
|
|
# user workspace invitations
|
|
path(
|
|
"users/me/invitations/workspaces/",
|
|
UserWorkspaceInvitationsEndpoint.as_view({"get": "list", "post": "create"}),
|
|
name="user-workspace-invitations",
|
|
),
|
|
# user workspace invitation
|
|
path(
|
|
"users/me/invitations/<uuid:pk>/",
|
|
UserWorkspaceInvitationEndpoint.as_view(
|
|
{
|
|
"get": "retrieve",
|
|
}
|
|
),
|
|
name="user-workspace-invitation",
|
|
),
|
|
# user join workspace
|
|
# User Graphs
|
|
path(
|
|
"users/me/workspaces/<str:slug>/activity-graph/",
|
|
UserActivityGraphEndpoint.as_view(),
|
|
name="user-activity-graph",
|
|
),
|
|
path(
|
|
"users/me/workspaces/<str:slug>/issues-completed-graph/",
|
|
UserIssueCompletedGraphEndpoint.as_view(),
|
|
name="completed-graph",
|
|
),
|
|
path(
|
|
"users/me/workspaces/<str:slug>/dashboard/",
|
|
UserWorkspaceDashboardEndpoint.as_view(),
|
|
name="user-workspace-dashboard",
|
|
),
|
|
## End User Graph
|
|
path(
|
|
"users/me/invitations/workspaces/<str:slug>/<uuid:pk>/join/",
|
|
JoinWorkspaceEndpoint.as_view(),
|
|
name="user-join-workspace",
|
|
),
|
|
# user project invitations
|
|
path(
|
|
"users/me/invitations/projects/",
|
|
UserProjectInvitationsViewset.as_view({"get": "list", "post": "create"}),
|
|
name="user-project-invitations",
|
|
),
|
|
]
|