systemprompt_models/modules/
api_paths.rs1#[derive(Debug, Clone, Copy)]
4pub struct ApiPaths;
5
6impl ApiPaths {
7 pub const API_BASE: &'static str = "/api";
8 pub const API_V1: &'static str = "/api/v1";
9 pub const CORE_BASE: &'static str = "/api/v1/core";
10 pub const AGENTS_BASE: &'static str = "/api/v1/agents";
11 pub const MCP_BASE: &'static str = "/api/v1/mcp";
12 pub const STREAM_BASE: &'static str = "/api/v1/stream";
13 pub const CONTENT_BASE: &'static str = "/api/v1/content";
14 pub const META_BASE: &'static str = "/api/v1/meta";
15
16 pub const CORE_CONTEXTS: &'static str = "/api/v1/core/contexts";
17 pub const CORE_TASKS: &'static str = "/api/v1/core/tasks";
18 pub const CORE_ARTIFACTS: &'static str = "/api/v1/core/artifacts";
19 pub const CONTEXTS_WEBHOOK: &'static str = "/api/v1/core/contexts/webhook";
20
21 pub const AGENTS_REGISTRY: &'static str = "/api/v1/agents/registry";
22
23 pub const MCP_REGISTRY: &'static str = "/api/v1/mcp/registry";
24
25 pub const STREAM_CONTEXTS: &'static str = "/api/v1/stream/contexts";
26 pub const STREAM_AGUI: &'static str = "/api/v1/stream/agui";
27 pub const STREAM_A2A: &'static str = "/api/v1/stream/a2a";
28
29 pub const AUTH_ME: &'static str = "/api/v1/auth/me";
30
31 pub const OAUTH_BASE: &'static str = "/api/v1/core/oauth";
32 pub const OAUTH_SESSION: &'static str = "/api/v1/core/oauth/session";
33 pub const OAUTH_REGISTER: &'static str = "/api/v1/core/oauth/register";
34 pub const OAUTH_AUTHORIZE: &'static str = "/api/v1/core/oauth/authorize";
35 pub const OAUTH_TOKEN: &'static str = "/api/v1/core/oauth/token";
36 pub const OAUTH_CALLBACK: &'static str = "/api/v1/core/oauth/callback";
37 pub const OAUTH_CONSENT: &'static str = "/api/v1/core/oauth/consent";
38 pub const OAUTH_WEBAUTHN_COMPLETE: &'static str = "/api/v1/core/oauth/webauthn/complete";
39 pub const OAUTH_CLIENTS: &'static str = "/api/v1/core/oauth/clients";
40
41 pub const WEBHOOK: &'static str = "/api/v1/webhook";
42 pub const WEBHOOK_AGUI: &'static str = "/api/v1/webhook/agui";
43 pub const WEBHOOK_A2A: &'static str = "/api/v1/webhook/a2a";
44
45 pub const HEALTH: &'static str = "/api/v1/health";
46 pub const DISCOVERY: &'static str = "/api/v1";
47
48 pub const WELLKNOWN_BASE: &'static str = "/.well-known";
49 pub const WELLKNOWN_AGENT_CARD: &'static str = "/.well-known/agent-card.json";
50 pub const WELLKNOWN_AGENT_CARDS: &'static str = "/.well-known/agent-cards";
51 pub const WELLKNOWN_OAUTH_SERVER: &'static str = "/.well-known/oauth-authorization-server";
52 pub const WELLKNOWN_OPENID_CONFIG: &'static str = "/.well-known/openid-configuration";
53 pub const WELLKNOWN_OAUTH_PROTECTED: &'static str = "/.well-known/oauth-protected-resource";
54
55 pub const A2A_CARD: &'static str = "/api/a2a/card";
56
57 pub const ASSETS_BASE: &'static str = "/assets";
58 pub const FILES_BASE: &'static str = "/files";
59 pub const GENERATED_BASE: &'static str = "/generated";
60 pub const IMAGES_BASE: &'static str = "/images";
61 pub const STATIC_BASE: &'static str = "/static";
62 pub const NEXT_BASE: &'static str = "/_next";
63 pub const DOCS_BASE: &'static str = "/docs";
64 pub const SWAGGER_BASE: &'static str = "/swagger";
65 pub const OPENAPI_BASE: &'static str = "/openapi";
66
67 pub const ADMIN_BASE: &'static str = "/api/v1/admin";
68 pub const ADMIN_LOGS: &'static str = "/api/v1/admin/logs";
69 pub const ADMIN_USERS: &'static str = "/api/v1/admin/users";
70 pub const ADMIN_ANALYTICS: &'static str = "/api/v1/admin/analytics";
71 pub const ADMIN_SESSIONS: &'static str = "/api/v1/admin/sessions";
72
73 pub const CLOUD_TENANTS: &'static str = "/api/v1/tenants";
74 pub const CLOUD_CHECKOUT: &'static str = "/api/v1/checkout";
75 pub const CLOUD_CHECKOUT_PLANS: &'static str = "/api/v1/checkout/plans";
76
77 pub fn tenant(tenant_id: &str) -> String {
78 format!("{}/{}", Self::CLOUD_TENANTS, tenant_id)
79 }
80
81 pub fn tenant_status(tenant_id: &str) -> String {
82 format!("{}/{}/status", Self::CLOUD_TENANTS, tenant_id)
83 }
84
85 pub fn tenant_registry_token(tenant_id: &str) -> String {
86 format!("{}/{}/registry-token", Self::CLOUD_TENANTS, tenant_id)
87 }
88
89 pub fn tenant_deploy(tenant_id: &str) -> String {
90 format!("{}/{}/deploy", Self::CLOUD_TENANTS, tenant_id)
91 }
92
93 pub fn tenant_events(tenant_id: &str) -> String {
94 format!("{}/{}/events", Self::CLOUD_TENANTS, tenant_id)
95 }
96
97 pub fn tenant_restart(tenant_id: &str) -> String {
98 format!("{}/{}/restart", Self::CLOUD_TENANTS, tenant_id)
99 }
100
101 pub fn tenant_retry_provision(tenant_id: &str) -> String {
102 format!("{}/{}/retry-provision", Self::CLOUD_TENANTS, tenant_id)
103 }
104
105 pub fn tenant_secrets(tenant_id: &str) -> String {
106 format!("{}/{}/secrets", Self::CLOUD_TENANTS, tenant_id)
107 }
108
109 pub fn tenant_external_db_access(tenant_id: &str) -> String {
110 format!("{}/{}/external-db-access", Self::CLOUD_TENANTS, tenant_id)
111 }
112
113 pub fn tenant_rotate_credentials(tenant_id: &str) -> String {
114 format!("{}/{}/rotate-credentials", Self::CLOUD_TENANTS, tenant_id)
115 }
116
117 pub fn tenant_rotate_sync_token(tenant_id: &str) -> String {
118 format!("{}/{}/rotate-sync-token", Self::CLOUD_TENANTS, tenant_id)
119 }
120
121 pub fn tenant_subscription_cancel(tenant_id: &str) -> String {
122 format!("{}/{}/subscription/cancel", Self::CLOUD_TENANTS, tenant_id)
123 }
124
125 pub fn mcp_server_endpoint(server_name: &str) -> String {
126 format!("{}/{}/mcp", Self::MCP_BASE, server_name)
127 }
128
129 pub fn oauth_client_location(client_id: &str) -> String {
130 format!("{}/{}", Self::OAUTH_CLIENTS, client_id)
131 }
132
133 pub fn wellknown_agent_card_named(agent_name: &str) -> String {
134 format!("{}/{}", Self::WELLKNOWN_AGENT_CARDS, agent_name)
135 }
136
137 pub fn agent_endpoint(agent_id: &str) -> String {
138 format!("{}/{}/", Self::AGENTS_BASE, agent_id)
139 }
140
141 pub fn tenant_custom_domain(tenant_id: &str) -> String {
142 format!("{}/{}/custom-domain", Self::CLOUD_TENANTS, tenant_id)
143 }
144}