73 lines
2.4 KiB
Python
73 lines
2.4 KiB
Python
# Copyright (c) 2023-present Plane Software, Inc. and contributors
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
# See the LICENSE file for details.
|
|
|
|
from django.urls import path
|
|
|
|
from plane.app.views import (
|
|
CodexAgentDetailEndpoint,
|
|
CodexAgentGrantListEndpoint,
|
|
CodexAgentGrantReplaceEndpoint,
|
|
CodexAgentGrantReplaceProjectsEndpoint,
|
|
CodexAgentListEndpoint,
|
|
CodexAgentProjectAccessEndpoint,
|
|
CodexAgentRevokeEndpoint,
|
|
CodexAgentSetupEndpoint,
|
|
CodexAgentTokenListEndpoint,
|
|
CodexAgentTokenRevokeEndpoint,
|
|
)
|
|
|
|
|
|
urlpatterns = [
|
|
path(
|
|
"workspaces/<str:slug>/codex-agent-api/project-access/",
|
|
CodexAgentProjectAccessEndpoint.as_view(),
|
|
name="codex-agent-api-project-access",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/codex-agent-api/agents/",
|
|
CodexAgentListEndpoint.as_view(),
|
|
name="codex-agent-api-agents",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/codex-agent-api/agents/<uuid:agent_id>/",
|
|
CodexAgentDetailEndpoint.as_view(),
|
|
name="codex-agent-api-agent-detail",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/codex-agent-api/agents/<uuid:agent_id>/revoke/",
|
|
CodexAgentRevokeEndpoint.as_view(),
|
|
name="codex-agent-api-agent-revoke",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/codex-agent-api/agents/<uuid:agent_id>/grants/",
|
|
CodexAgentGrantListEndpoint.as_view(),
|
|
name="codex-agent-api-agent-grants",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/codex-agent-api/agents/<uuid:agent_id>/grants/replace/",
|
|
CodexAgentGrantReplaceEndpoint.as_view(),
|
|
name="codex-agent-api-agent-grants-replace",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/codex-agent-api/agents/<uuid:agent_id>/grants/replace-projects/",
|
|
CodexAgentGrantReplaceProjectsEndpoint.as_view(),
|
|
name="codex-agent-api-agent-grants-replace-projects",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/codex-agent-api/agents/<uuid:agent_id>/tokens/",
|
|
CodexAgentTokenListEndpoint.as_view(),
|
|
name="codex-agent-api-agent-tokens",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/codex-agent-api/agents/<uuid:agent_id>/tokens/<uuid:token_id>/revoke/",
|
|
CodexAgentTokenRevokeEndpoint.as_view(),
|
|
name="codex-agent-api-agent-token-revoke",
|
|
),
|
|
path(
|
|
"workspaces/<str:slug>/codex-agent-api/agents/<uuid:agent_id>/setup/",
|
|
CodexAgentSetupEndpoint.as_view(),
|
|
name="codex-agent-api-agent-setup",
|
|
),
|
|
]
|