@tai42/api-client 16.0.0 → 17.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents.d.ts.map +1 -1
- package/dist/agents.js +1 -1
- package/dist/agents.js.map +1 -1
- package/dist/client/agents-client.d.ts +26 -0
- package/dist/client/agents-client.d.ts.map +1 -0
- package/dist/client/agents-client.js +19 -0
- package/dist/client/agents-client.js.map +1 -0
- package/dist/client/auth-client.d.ts +247 -0
- package/dist/client/auth-client.d.ts.map +1 -0
- package/dist/client/auth-client.js +73 -0
- package/dist/client/auth-client.js.map +1 -0
- package/dist/client/backend-client.d.ts +39 -0
- package/dist/client/backend-client.d.ts.map +1 -0
- package/dist/client/backend-client.js +22 -0
- package/dist/client/backend-client.js.map +1 -0
- package/dist/client/backup-client.d.ts +56 -0
- package/dist/client/backup-client.d.ts.map +1 -0
- package/dist/client/backup-client.js +12 -0
- package/dist/client/backup-client.js.map +1 -0
- package/dist/client/capabilities-client.d.ts +40 -0
- package/dist/client/capabilities-client.d.ts.map +1 -0
- package/dist/client/capabilities-client.js +19 -0
- package/dist/client/capabilities-client.js.map +1 -0
- package/dist/client/channels-client.d.ts +7 -0
- package/dist/client/channels-client.d.ts.map +1 -0
- package/dist/client/channels-client.js +10 -0
- package/dist/client/channels-client.js.map +1 -0
- package/dist/client/config-client.d.ts +59 -0
- package/dist/client/config-client.d.ts.map +1 -0
- package/dist/client/config-client.js +18 -0
- package/dist/client/config-client.js.map +1 -0
- package/dist/client/connectors-client.d.ts +225 -0
- package/dist/client/connectors-client.d.ts.map +1 -0
- package/dist/client/connectors-client.js +31 -0
- package/dist/client/connectors-client.js.map +1 -0
- package/dist/client/conversations-client.d.ts +398 -0
- package/dist/client/conversations-client.d.ts.map +1 -0
- package/dist/client/conversations-client.js +120 -0
- package/dist/client/conversations-client.js.map +1 -0
- package/dist/client/hooks-client.d.ts +112 -0
- package/dist/client/hooks-client.d.ts.map +1 -0
- package/dist/client/hooks-client.js +25 -0
- package/dist/client/hooks-client.js.map +1 -0
- package/dist/{client.d.ts → client/index.d.ts} +2336 -2708
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +79 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/interactions-client.d.ts +52 -0
- package/dist/client/interactions-client.d.ts.map +1 -0
- package/dist/client/interactions-client.js +84 -0
- package/dist/client/interactions-client.js.map +1 -0
- package/dist/client/login-client.d.ts +69 -0
- package/dist/client/login-client.d.ts.map +1 -0
- package/dist/client/login-client.js +137 -0
- package/dist/client/login-client.js.map +1 -0
- package/dist/client/manifest-client.d.ts +354 -0
- package/dist/client/manifest-client.d.ts.map +1 -0
- package/dist/client/manifest-client.js +76 -0
- package/dist/client/manifest-client.js.map +1 -0
- package/dist/client/marketplace-client.d.ts +274 -0
- package/dist/client/marketplace-client.d.ts.map +1 -0
- package/dist/client/marketplace-client.js +46 -0
- package/dist/client/marketplace-client.js.map +1 -0
- package/dist/client/mcp-config-schema-client.d.ts +5 -0
- package/dist/client/mcp-config-schema-client.d.ts.map +1 -0
- package/dist/client/mcp-config-schema-client.js +9 -0
- package/dist/client/mcp-config-schema-client.js.map +1 -0
- package/dist/client/notifications-client.d.ts +27 -0
- package/dist/client/notifications-client.d.ts.map +1 -0
- package/dist/client/notifications-client.js +11 -0
- package/dist/client/notifications-client.js.map +1 -0
- package/dist/client/observability-client.d.ts +103 -0
- package/dist/client/observability-client.d.ts.map +1 -0
- package/dist/client/observability-client.js +43 -0
- package/dist/client/observability-client.js.map +1 -0
- package/dist/client/plugins-client.d.ts +17 -0
- package/dist/client/plugins-client.d.ts.map +1 -0
- package/dist/client/plugins-client.js +9 -0
- package/dist/client/plugins-client.js.map +1 -0
- package/dist/client/policy-client.d.ts +37 -0
- package/dist/client/policy-client.d.ts.map +1 -0
- package/dist/client/policy-client.js +26 -0
- package/dist/client/policy-client.js.map +1 -0
- package/dist/client/presets-client.d.ts +334 -0
- package/dist/client/presets-client.d.ts.map +1 -0
- package/dist/client/presets-client.js +38 -0
- package/dist/client/presets-client.js.map +1 -0
- package/dist/client/profiles-client.d.ts +101 -0
- package/dist/client/profiles-client.d.ts.map +1 -0
- package/dist/client/profiles-client.js +37 -0
- package/dist/client/profiles-client.js.map +1 -0
- package/dist/client/schedules-client.d.ts +27 -0
- package/dist/client/schedules-client.d.ts.map +1 -0
- package/dist/client/schedules-client.js +13 -0
- package/dist/client/schedules-client.js.map +1 -0
- package/dist/client/settings-schema-client.d.ts +23 -0
- package/dist/client/settings-schema-client.d.ts.map +1 -0
- package/dist/client/settings-schema-client.js +9 -0
- package/dist/client/settings-schema-client.js.map +1 -0
- package/dist/client/states-client.d.ts +470 -0
- package/dist/client/states-client.d.ts.map +1 -0
- package/dist/client/states-client.js +144 -0
- package/dist/client/states-client.js.map +1 -0
- package/dist/client/storage-client.d.ts +40 -0
- package/dist/client/storage-client.d.ts.map +1 -0
- package/dist/client/storage-client.js +43 -0
- package/dist/client/storage-client.js.map +1 -0
- package/dist/client/sub-mcp-client.d.ts +17 -0
- package/dist/client/sub-mcp-client.d.ts.map +1 -0
- package/dist/client/sub-mcp-client.js +14 -0
- package/dist/client/sub-mcp-client.js.map +1 -0
- package/dist/client/system-client.d.ts +11 -0
- package/dist/client/system-client.d.ts.map +1 -0
- package/dist/client/system-client.js +13 -0
- package/dist/client/system-client.js.map +1 -0
- package/dist/client/templates-client.d.ts +29 -0
- package/dist/client/templates-client.d.ts.map +1 -0
- package/dist/client/templates-client.js +21 -0
- package/dist/client/templates-client.js.map +1 -0
- package/dist/client/tool-extensions-client.d.ts +53 -0
- package/dist/client/tool-extensions-client.d.ts.map +1 -0
- package/dist/client/tool-extensions-client.js +21 -0
- package/dist/client/tool-extensions-client.js.map +1 -0
- package/dist/client/tool-meta-client.d.ts +69 -0
- package/dist/client/tool-meta-client.d.ts.map +1 -0
- package/dist/client/tool-meta-client.js +38 -0
- package/dist/client/tool-meta-client.js.map +1 -0
- package/dist/client/tools-client.d.ts +83 -0
- package/dist/client/tools-client.d.ts.map +1 -0
- package/dist/client/tools-client.js +38 -0
- package/dist/client/tools-client.js.map +1 -0
- package/dist/client/transport.d.ts +13 -0
- package/dist/client/transport.d.ts.map +1 -0
- package/dist/client/transport.js +10 -0
- package/dist/client/transport.js.map +1 -0
- package/dist/client/trigger-links-client.d.ts +44 -0
- package/dist/client/trigger-links-client.d.ts.map +1 -0
- package/dist/client/trigger-links-client.js +30 -0
- package/dist/client/trigger-links-client.js.map +1 -0
- package/dist/client/web-entry-gate-client.d.ts +34 -0
- package/dist/client/web-entry-gate-client.d.ts.map +1 -0
- package/dist/client/web-entry-gate-client.js +25 -0
- package/dist/client/web-entry-gate-client.js.map +1 -0
- package/dist/errors.d.ts +11 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +15 -0
- package/dist/errors.js.map +1 -1
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +33 -17
- package/dist/http.js.map +1 -1
- package/dist/index.d.ts +12 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -13
- package/dist/index.js.map +1 -1
- package/dist/schemas/api-keys.d.ts +43 -0
- package/dist/schemas/api-keys.d.ts.map +1 -0
- package/dist/schemas/api-keys.js +29 -0
- package/dist/schemas/api-keys.js.map +1 -0
- package/dist/schemas/auth-routes.d.ts +78 -0
- package/dist/schemas/auth-routes.d.ts.map +1 -0
- package/dist/schemas/auth-routes.js +42 -0
- package/dist/schemas/auth-routes.js.map +1 -0
- package/dist/schemas/backup.d.ts +78 -0
- package/dist/schemas/backup.d.ts.map +1 -0
- package/dist/schemas/backup.js +33 -0
- package/dist/schemas/backup.js.map +1 -0
- package/dist/schemas/capabilities.d.ts +109 -0
- package/dist/schemas/capabilities.d.ts.map +1 -0
- package/dist/schemas/capabilities.js +78 -0
- package/dist/schemas/capabilities.js.map +1 -0
- package/dist/schemas/channels.d.ts +7 -0
- package/dist/schemas/channels.d.ts.map +1 -0
- package/dist/schemas/channels.js +9 -0
- package/dist/schemas/channels.js.map +1 -0
- package/dist/schemas/config.d.ts +17 -0
- package/dist/schemas/config.d.ts.map +1 -0
- package/dist/schemas/config.js +17 -0
- package/dist/schemas/config.js.map +1 -0
- package/dist/schemas/connectors.d.ts +383 -0
- package/dist/schemas/connectors.d.ts.map +1 -0
- package/dist/schemas/connectors.js +122 -0
- package/dist/schemas/connectors.js.map +1 -0
- package/dist/schemas/conversations.d.ts +600 -0
- package/dist/schemas/conversations.d.ts.map +1 -0
- package/dist/schemas/conversations.js +208 -0
- package/dist/schemas/conversations.js.map +1 -0
- package/dist/schemas/extensions.d.ts +44 -0
- package/dist/schemas/extensions.d.ts.map +1 -0
- package/dist/schemas/extensions.js +29 -0
- package/dist/schemas/extensions.js.map +1 -0
- package/dist/schemas/fleet.d.ts +271 -0
- package/dist/schemas/fleet.d.ts.map +1 -0
- package/dist/schemas/fleet.js +132 -0
- package/dist/schemas/fleet.js.map +1 -0
- package/dist/schemas/hooks.d.ts +120 -0
- package/dist/schemas/hooks.d.ts.map +1 -0
- package/dist/schemas/hooks.js +44 -0
- package/dist/schemas/hooks.js.map +1 -0
- package/dist/schemas/index.d.ts +40 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +40 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/interactions.d.ts +156 -0
- package/dist/schemas/interactions.d.ts.map +1 -0
- package/dist/schemas/interactions.js +124 -0
- package/dist/schemas/interactions.js.map +1 -0
- package/dist/schemas/login.d.ts +93 -0
- package/dist/schemas/login.d.ts.map +1 -0
- package/dist/schemas/login.js +61 -0
- package/dist/schemas/login.js.map +1 -0
- package/dist/schemas/manifest-mcp.d.ts +125 -0
- package/dist/schemas/manifest-mcp.d.ts.map +1 -0
- package/dist/schemas/manifest-mcp.js +61 -0
- package/dist/schemas/manifest-mcp.js.map +1 -0
- package/dist/schemas/marketplace.d.ts +708 -0
- package/dist/schemas/marketplace.d.ts.map +1 -0
- package/dist/schemas/marketplace.js +387 -0
- package/dist/schemas/marketplace.js.map +1 -0
- package/dist/schemas/notifications.d.ts +61 -0
- package/dist/schemas/notifications.d.ts.map +1 -0
- package/dist/schemas/notifications.js +38 -0
- package/dist/schemas/notifications.js.map +1 -0
- package/dist/schemas/observability.d.ts +114 -0
- package/dist/schemas/observability.d.ts.map +1 -0
- package/dist/schemas/observability.js +74 -0
- package/dist/schemas/observability.js.map +1 -0
- package/dist/schemas/policy.d.ts +58 -0
- package/dist/schemas/policy.d.ts.map +1 -0
- package/dist/schemas/policy.js +32 -0
- package/dist/schemas/policy.js.map +1 -0
- package/dist/schemas/presets.d.ts +258 -0
- package/dist/schemas/presets.d.ts.map +1 -0
- package/dist/schemas/presets.js +95 -0
- package/dist/schemas/presets.js.map +1 -0
- package/dist/schemas/principals.d.ts +54 -0
- package/dist/schemas/principals.d.ts.map +1 -0
- package/dist/schemas/principals.js +34 -0
- package/dist/schemas/principals.js.map +1 -0
- package/dist/schemas/profiles.d.ts +180 -0
- package/dist/schemas/profiles.d.ts.map +1 -0
- package/dist/schemas/profiles.js +100 -0
- package/dist/schemas/profiles.js.map +1 -0
- package/dist/schemas/roles.d.ts +125 -0
- package/dist/schemas/roles.d.ts.map +1 -0
- package/dist/schemas/roles.js +46 -0
- package/dist/schemas/roles.js.map +1 -0
- package/dist/schemas/schedules.d.ts +25 -0
- package/dist/schemas/schedules.d.ts.map +1 -0
- package/dist/schemas/schedules.js +24 -0
- package/dist/schemas/schedules.js.map +1 -0
- package/dist/schemas/served.d.ts +626 -0
- package/dist/schemas/served.d.ts.map +1 -0
- package/dist/schemas/served.js +28 -0
- package/dist/schemas/served.js.map +1 -0
- package/dist/schemas/settings-schema.d.ts +23 -0
- package/dist/schemas/settings-schema.d.ts.map +1 -0
- package/dist/schemas/settings-schema.js +25 -0
- package/dist/schemas/settings-schema.js.map +1 -0
- package/dist/schemas/setup.d.ts +43 -0
- package/dist/schemas/setup.d.ts.map +1 -0
- package/dist/schemas/setup.js +19 -0
- package/dist/schemas/setup.js.map +1 -0
- package/dist/schemas/shared.d.ts +20 -0
- package/dist/schemas/shared.d.ts.map +1 -0
- package/dist/schemas/shared.js +20 -0
- package/dist/schemas/shared.js.map +1 -0
- package/dist/schemas/states.d.ts +499 -0
- package/dist/schemas/states.d.ts.map +1 -0
- package/dist/schemas/states.js +220 -0
- package/dist/schemas/states.js.map +1 -0
- package/dist/schemas/storage.d.ts +37 -0
- package/dist/schemas/storage.d.ts.map +1 -0
- package/dist/schemas/storage.js +24 -0
- package/dist/schemas/storage.js.map +1 -0
- package/dist/schemas/studio-plugins.d.ts +30 -0
- package/dist/schemas/studio-plugins.d.ts.map +1 -0
- package/dist/schemas/studio-plugins.js +20 -0
- package/dist/schemas/studio-plugins.js.map +1 -0
- package/dist/schemas/sub-mcp.d.ts +29 -0
- package/dist/schemas/sub-mcp.d.ts.map +1 -0
- package/dist/schemas/sub-mcp.js +22 -0
- package/dist/schemas/sub-mcp.js.map +1 -0
- package/dist/schemas/system-kinds.d.ts +122 -0
- package/dist/schemas/system-kinds.d.ts.map +1 -0
- package/dist/schemas/system-kinds.js +40 -0
- package/dist/schemas/system-kinds.js.map +1 -0
- package/dist/schemas/templates.d.ts +26 -0
- package/dist/schemas/templates.d.ts.map +1 -0
- package/dist/schemas/templates.js +11 -0
- package/dist/schemas/templates.js.map +1 -0
- package/dist/schemas/tool-meta.d.ts +64 -0
- package/dist/schemas/tool-meta.d.ts.map +1 -0
- package/dist/schemas/tool-meta.js +44 -0
- package/dist/schemas/tool-meta.js.map +1 -0
- package/dist/schemas/tools.d.ts +62 -0
- package/dist/schemas/tools.d.ts.map +1 -0
- package/dist/schemas/tools.js +53 -0
- package/dist/schemas/tools.js.map +1 -0
- package/dist/schemas/trigger-links.d.ts +71 -0
- package/dist/schemas/trigger-links.d.ts.map +1 -0
- package/dist/schemas/trigger-links.js +46 -0
- package/dist/schemas/trigger-links.js.map +1 -0
- package/dist/schemas/web-entry.d.ts +45 -0
- package/dist/schemas/web-entry.d.ts.map +1 -0
- package/dist/schemas/web-entry.js +36 -0
- package/dist/schemas/web-entry.js.map +1 -0
- package/dist/tool-runs.d.ts.map +1 -1
- package/dist/tool-runs.js.map +1 -1
- package/package.json +1 -1
- package/src/agents.ts +2 -2
- package/src/client/agents-client.ts +23 -0
- package/src/client/auth-client.ts +170 -0
- package/src/client/backend-client.ts +25 -0
- package/src/client/backup-client.ts +16 -0
- package/src/client/capabilities-client.ts +22 -0
- package/src/client/channels-client.ts +11 -0
- package/src/client/config-client.ts +21 -0
- package/src/client/connectors-client.ts +52 -0
- package/src/client/conversations-client.ts +240 -0
- package/src/client/hooks-client.ts +44 -0
- package/src/client/index.ts +122 -0
- package/src/client/interactions-client.ts +89 -0
- package/src/client/login-client.ts +150 -0
- package/src/client/manifest-client.ts +118 -0
- package/src/client/marketplace-client.ts +122 -0
- package/src/client/mcp-config-schema-client.ts +11 -0
- package/src/client/notifications-client.ts +13 -0
- package/src/client/observability-client.ts +82 -0
- package/src/client/plugins-client.ts +11 -0
- package/src/client/policy-client.ts +41 -0
- package/src/client/presets-client.ts +124 -0
- package/src/client/profiles-client.ts +51 -0
- package/src/client/schedules-client.ts +22 -0
- package/src/client/settings-schema-client.ts +11 -0
- package/src/client/states-client.ts +292 -0
- package/src/client/storage-client.ts +63 -0
- package/src/client/sub-mcp-client.ts +17 -0
- package/src/client/system-client.ts +16 -0
- package/src/client/templates-client.ts +28 -0
- package/src/client/tool-extensions-client.ts +24 -0
- package/src/client/tool-meta-client.ts +65 -0
- package/src/client/tools-client.ts +66 -0
- package/src/client/transport.ts +18 -0
- package/src/client/trigger-links-client.ts +51 -0
- package/src/client/web-entry-gate-client.ts +45 -0
- package/src/errors.ts +16 -0
- package/src/http.ts +48 -24
- package/src/index.ts +231 -226
- package/src/schemas/api-keys.ts +34 -0
- package/src/schemas/auth-routes.ts +48 -0
- package/src/schemas/backup.ts +43 -0
- package/src/schemas/capabilities.ts +92 -0
- package/src/schemas/channels.ts +11 -0
- package/src/schemas/config.ts +17 -0
- package/src/schemas/connectors.ts +139 -0
- package/src/schemas/conversations.ts +257 -0
- package/src/schemas/extensions.ts +34 -0
- package/src/schemas/fleet.ts +154 -0
- package/src/schemas/hooks.ts +57 -0
- package/src/schemas/index.ts +39 -0
- package/src/schemas/interactions.ts +147 -0
- package/src/schemas/login.ts +69 -0
- package/src/schemas/manifest-mcp.ts +70 -0
- package/src/schemas/marketplace.ts +447 -0
- package/src/schemas/notifications.ts +43 -0
- package/src/schemas/observability.ts +87 -0
- package/src/schemas/policy.ts +38 -0
- package/src/schemas/presets.ts +114 -0
- package/src/schemas/principals.ts +41 -0
- package/src/schemas/profiles.ts +120 -0
- package/src/schemas/roles.ts +58 -0
- package/src/schemas/schedules.ts +28 -0
- package/src/schemas/served.ts +50 -0
- package/src/schemas/settings-schema.ts +32 -0
- package/src/schemas/setup.ts +39 -0
- package/src/schemas/shared.ts +21 -0
- package/src/schemas/states.ts +273 -0
- package/src/schemas/storage.ts +31 -0
- package/src/schemas/studio-plugins.ts +21 -0
- package/src/schemas/sub-mcp.ts +24 -0
- package/src/schemas/system-kinds.ts +47 -0
- package/src/schemas/templates.ts +12 -0
- package/src/schemas/tool-meta.ts +51 -0
- package/src/schemas/tools.ts +62 -0
- package/src/schemas/trigger-links.ts +55 -0
- package/src/schemas/web-entry.ts +46 -0
- package/src/tool-runs.ts +1 -1
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js +0 -920
- package/dist/client.js.map +0 -1
- package/dist/schemas.d.ts +0 -5172
- package/dist/schemas.d.ts.map +0 -1
- package/dist/schemas.js +0 -2268
- package/dist/schemas.js.map +0 -1
- package/src/client.ts +0 -1771
- package/src/schemas.ts +0 -2760
package/src/index.ts
CHANGED
|
@@ -5,279 +5,284 @@
|
|
|
5
5
|
* validated and every failure throws. No caching of its own — server state
|
|
6
6
|
* lives in TanStack Query in the feature packages.
|
|
7
7
|
*/
|
|
8
|
-
export {
|
|
8
|
+
export type { AgentEvent, AgentSummary, ParsedAgentEvent, UnknownAgentEvent } from './agents';
|
|
9
|
+
export { agentEventSchema, parseAgentFrame, parseAgentTranscript } from './agents';
|
|
9
10
|
export type {
|
|
11
|
+
AddUrlToScopeBody,
|
|
10
12
|
ApiClient,
|
|
11
|
-
RunToolArgs,
|
|
12
|
-
ToolAdminArgs,
|
|
13
|
-
ApiToolsListsBody,
|
|
14
|
-
StartConnectArgs,
|
|
15
13
|
ApiKeyBody,
|
|
14
|
+
ApiToolsListsBody,
|
|
16
15
|
ClaimLinkBody,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
ConversationMessageSearchQuery,
|
|
17
|
+
ConversationThreadFilters,
|
|
18
|
+
ConversationThreadMessageBody,
|
|
19
|
+
ConversationTranscriptQuery,
|
|
20
|
+
CreatePresetBody,
|
|
21
|
+
MarketplaceInstallBody,
|
|
22
|
+
MarketplaceInstallPreviewBody,
|
|
23
|
+
MarketplaceSearchQuery,
|
|
24
|
+
MarketplaceUninstallBody,
|
|
25
|
+
MetricsQuery,
|
|
26
|
+
PinRoutePublicBody,
|
|
22
27
|
RoleCreateBody,
|
|
23
28
|
RoleUpdateBody,
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
RunsQuery,
|
|
30
|
+
RunToolArgs,
|
|
26
31
|
SavePresetVersionBody,
|
|
27
|
-
|
|
28
|
-
StateDeclarationBody,
|
|
29
|
-
StateTemplateBody,
|
|
32
|
+
StartConnectArgs,
|
|
30
33
|
StateAttachmentBody,
|
|
31
|
-
|
|
34
|
+
StateDeclarationBody,
|
|
32
35
|
StatePageQuery,
|
|
33
|
-
|
|
36
|
+
StateSubjectRef,
|
|
37
|
+
StateTemplateBody,
|
|
34
38
|
StorageUploadBody,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
MarketplaceInstallBody,
|
|
43
|
-
MarketplaceInstallPreviewBody,
|
|
44
|
-
MarketplaceUninstallBody,
|
|
39
|
+
ToolAdminArgs,
|
|
40
|
+
ToolMetaPatch,
|
|
41
|
+
TopicVerifierBody,
|
|
42
|
+
TriggerLinkCreateBody,
|
|
43
|
+
ValidateConditionBody,
|
|
44
|
+
ValidatePresetBody,
|
|
45
|
+
WebEntryCodeMintBody,
|
|
45
46
|
} from './client';
|
|
46
|
-
export
|
|
47
|
-
export { apiRequest, apiText, apiDownload } from './http';
|
|
47
|
+
export { createApiClient, isSafeApiPath } from './client';
|
|
48
48
|
export {
|
|
49
|
-
ApiError,
|
|
50
|
-
ApiUnauthorizedError,
|
|
51
49
|
ApiConflictError,
|
|
50
|
+
ApiError,
|
|
52
51
|
ApiLoginFailedError,
|
|
53
52
|
ApiSchemaError,
|
|
53
|
+
ApiSetupFailedError,
|
|
54
|
+
ApiUnauthorizedError,
|
|
54
55
|
} from './errors';
|
|
55
|
-
export { SseFrameParser, readSseFrames } from './sse';
|
|
56
|
-
export type { SseFrame } from './sse';
|
|
57
|
-
export { parseAgentFrame, parseAgentTranscript, agentEventSchema } from './agents';
|
|
58
|
-
export type { AgentSummary, AgentEvent, UnknownAgentEvent, ParsedAgentEvent } from './agents';
|
|
59
|
-
export {
|
|
60
|
-
toolRunStatus,
|
|
61
|
-
toolRunSubmitResult,
|
|
62
|
-
toolRunRecord,
|
|
63
|
-
toolRunListItem,
|
|
64
|
-
toolRunList,
|
|
65
|
-
isTerminalRunStatus,
|
|
66
|
-
} from './tool-runs';
|
|
67
|
-
export type {
|
|
68
|
-
ToolRunStatus,
|
|
69
|
-
ToolRunSubmitResult,
|
|
70
|
-
ToolRunRecord,
|
|
71
|
-
ToolRunListItem,
|
|
72
|
-
SubmitToolRunArgs,
|
|
73
|
-
} from './tool-runs';
|
|
74
|
-
export {
|
|
75
|
-
summarizeFleetResult,
|
|
76
|
-
summarizeFleetFanout,
|
|
77
|
-
isFleetReportFailure,
|
|
78
|
-
failedMcpsFromReport,
|
|
79
|
-
} from './fleet-report';
|
|
80
56
|
export type {
|
|
81
|
-
|
|
57
|
+
FailedMcpEntry,
|
|
58
|
+
FleetFailureOutcome,
|
|
82
59
|
FleetReportStatus,
|
|
60
|
+
FleetReportSummary,
|
|
83
61
|
FleetWorkerFailure,
|
|
84
|
-
FleetFailureOutcome,
|
|
85
|
-
FailedMcpEntry,
|
|
86
62
|
} from './fleet-report';
|
|
87
|
-
export
|
|
63
|
+
export {
|
|
64
|
+
failedMcpsFromReport,
|
|
65
|
+
isFleetReportFailure,
|
|
66
|
+
summarizeFleetFanout,
|
|
67
|
+
summarizeFleetResult,
|
|
68
|
+
} from './fleet-report';
|
|
69
|
+
export type { ApiConfig, RequestOptions } from './http';
|
|
70
|
+
export { apiDownload, apiRequest, apiText } from './http';
|
|
88
71
|
export type {
|
|
89
|
-
|
|
90
|
-
ToolSchema,
|
|
91
|
-
ToolMediaResult,
|
|
92
|
-
ToolTagEntry,
|
|
93
|
-
AuthRoute,
|
|
94
|
-
RouteAction,
|
|
95
|
-
GrantLevel,
|
|
96
|
-
RoleGrants,
|
|
97
|
-
RoleBody,
|
|
98
|
-
RoleVersion,
|
|
99
|
-
RoleAuditEvent,
|
|
100
|
-
RoleVersions,
|
|
101
|
-
PresetRecord,
|
|
102
|
-
PresetDetail,
|
|
103
|
-
PresetBody,
|
|
104
|
-
PresetVersion,
|
|
105
|
-
PresetRenamed,
|
|
106
|
-
PresetReferees,
|
|
107
|
-
PresetValidation,
|
|
108
|
-
PresetVersionTags,
|
|
109
|
-
PresetExtensionElement,
|
|
110
|
-
StateSubject,
|
|
111
|
-
StateDeclaration,
|
|
112
|
-
StateListItem,
|
|
113
|
-
StateAttachment,
|
|
114
|
-
StateDetail,
|
|
115
|
-
StateStats,
|
|
116
|
-
TemplateJq,
|
|
117
|
-
TemplateReconcile,
|
|
118
|
-
TemplateDeclarations,
|
|
119
|
-
StateTemplateDocument,
|
|
120
|
-
StateTemplateListItem,
|
|
121
|
-
StateInjection,
|
|
122
|
-
StateUpdate,
|
|
123
|
-
StateAttach,
|
|
124
|
-
StateBinding,
|
|
125
|
-
StateRecord,
|
|
72
|
+
AnswerFormat,
|
|
126
73
|
ApplyResult,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
74
|
+
AuthCapabilities,
|
|
75
|
+
AuthRoute,
|
|
76
|
+
BackendInfo,
|
|
77
|
+
BackupDocument,
|
|
78
|
+
BackupImportReport,
|
|
79
|
+
Channels,
|
|
80
|
+
ChannelTemplate,
|
|
81
|
+
ClaimLinkCreated,
|
|
132
82
|
CompletedOrigin,
|
|
133
|
-
|
|
134
|
-
WritesPage,
|
|
135
|
-
ConsumerLink,
|
|
136
|
-
ConsumerRow,
|
|
137
|
-
StateConsumers,
|
|
138
|
-
StateAttached,
|
|
139
|
-
StateAttachmentUpdated,
|
|
140
|
-
StateDetached,
|
|
141
|
-
StateFoldReport,
|
|
142
|
-
StateRetentionPruned,
|
|
143
|
-
FolderRecord,
|
|
144
|
-
ToolMetaRecord,
|
|
145
|
-
ToolMetaOverlay,
|
|
146
|
-
PolicyBody,
|
|
147
|
-
PolicyVersion,
|
|
148
|
-
ValidateConditionResult,
|
|
149
|
-
Extension,
|
|
150
|
-
ToolExtensions,
|
|
151
|
-
ToolExtensionsApplyResult,
|
|
152
|
-
ProviderView,
|
|
83
|
+
ConnectionView,
|
|
153
84
|
ConnectorCategoryView,
|
|
154
|
-
ProviderCatalogResponse,
|
|
155
85
|
ConnectorRef,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
InteractionAnswered,
|
|
164
|
-
InteractionCancelled,
|
|
165
|
-
InteractionsPage,
|
|
166
|
-
InteractionMediaItem,
|
|
167
|
-
FormOption,
|
|
168
|
-
FormData,
|
|
169
|
-
FormPage,
|
|
170
|
-
FormPages,
|
|
171
|
-
MediaKind,
|
|
172
|
-
AnswerFormat,
|
|
173
|
-
Channels,
|
|
86
|
+
ConsumerLink,
|
|
87
|
+
ConsumerRow,
|
|
88
|
+
ConversationAnswerStatus,
|
|
89
|
+
ConversationConfigDeleted,
|
|
90
|
+
ConversationConfigs,
|
|
91
|
+
ConversationConfigWritten,
|
|
92
|
+
ConversationDeliveryStatus,
|
|
174
93
|
ConversationDoor,
|
|
175
|
-
|
|
94
|
+
ConversationFailedMessages,
|
|
95
|
+
ConversationMessage,
|
|
96
|
+
ConversationMessageSearchPage,
|
|
176
97
|
ConversationMode,
|
|
177
|
-
|
|
178
|
-
|
|
98
|
+
ConversationPersonDeleted,
|
|
99
|
+
ConversationRecordOrigin,
|
|
179
100
|
ConversationRoute,
|
|
180
|
-
ConversationRoutes,
|
|
181
101
|
ConversationRouteCreate,
|
|
182
|
-
ConversationRouteWritten,
|
|
183
102
|
ConversationRouteDeleted,
|
|
103
|
+
ConversationRoutes,
|
|
104
|
+
ConversationRouteWritten,
|
|
105
|
+
ConversationTargetKind,
|
|
184
106
|
ConversationThread,
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
ConversationRecordOrigin,
|
|
188
|
-
TranscriptOrder,
|
|
189
|
-
ConversationTranscriptPage,
|
|
190
|
-
ConversationMessageSearchPage,
|
|
107
|
+
ConversationThreadDeleted,
|
|
108
|
+
ConversationThreadMessageSent,
|
|
191
109
|
ConversationThreadMode,
|
|
192
110
|
ConversationThreadModeState,
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
111
|
+
ConversationThreadsPage,
|
|
112
|
+
ConversationTranscriptPage,
|
|
113
|
+
DashboardMetrics,
|
|
114
|
+
Extension,
|
|
115
|
+
FleetOutcome,
|
|
116
|
+
FleetReloadResult,
|
|
117
|
+
FleetReportFanout,
|
|
118
|
+
FleetResult,
|
|
119
|
+
FleetWorker,
|
|
120
|
+
FleetWorkerResult,
|
|
121
|
+
FleetWorkers,
|
|
122
|
+
FolderRecord,
|
|
123
|
+
FormData,
|
|
124
|
+
FormOption,
|
|
125
|
+
FormPage,
|
|
126
|
+
FormPages,
|
|
127
|
+
GrantLevel,
|
|
128
|
+
HookList,
|
|
209
129
|
HookParams,
|
|
210
130
|
HookRegister,
|
|
211
131
|
HookSubject,
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
132
|
+
Interaction,
|
|
133
|
+
InteractionAnswered,
|
|
134
|
+
InteractionCancelled,
|
|
135
|
+
InteractionMediaItem,
|
|
136
|
+
InteractionsPage,
|
|
137
|
+
KindStatus,
|
|
216
138
|
LoginFormField,
|
|
217
139
|
LoginMethod,
|
|
218
140
|
LoginMethods,
|
|
219
141
|
LoginResult,
|
|
220
|
-
MeProjection,
|
|
221
|
-
RouteEntry,
|
|
222
|
-
PatternEntry,
|
|
223
|
-
SubMcpEntry,
|
|
224
|
-
SubMcpMount,
|
|
225
|
-
ClaimLinkCreated,
|
|
226
|
-
TriggerLinkCreated,
|
|
227
|
-
TriggerLinkRecord,
|
|
228
|
-
TriggerLinkList,
|
|
229
|
-
TriggerLinkDeleted,
|
|
230
142
|
LogoutResult,
|
|
231
|
-
|
|
232
|
-
BackupDocument,
|
|
233
|
-
BackupImportReport,
|
|
234
|
-
ScheduleItem,
|
|
235
|
-
StorageInfo,
|
|
236
|
-
StorageResourceStat,
|
|
237
|
-
BackendInfo,
|
|
238
|
-
WorkerKind,
|
|
239
|
-
WorkerState,
|
|
240
|
-
WorkerLastOp,
|
|
241
|
-
FleetWorker,
|
|
242
|
-
FleetWorkers,
|
|
243
|
-
FleetOutcome,
|
|
244
|
-
FleetWorkerResult,
|
|
245
|
-
FleetResult,
|
|
246
|
-
FleetReloadResult,
|
|
247
|
-
FleetReportFanout,
|
|
248
|
-
ReloadConfigResult,
|
|
249
|
-
McpReloadResult,
|
|
250
|
-
KindStatus,
|
|
251
|
-
DashboardMetrics,
|
|
252
|
-
Run,
|
|
253
|
-
RunSpan,
|
|
254
|
-
RunTrace,
|
|
255
|
-
MarketplaceItem,
|
|
256
|
-
MarketplaceDelivery,
|
|
257
|
-
MarketplaceSource,
|
|
258
|
-
MarketplaceRequiredEnvVar,
|
|
259
|
-
MarketplaceRouteDecl,
|
|
260
|
-
MarketplaceRoutesDecl,
|
|
261
|
-
MarketplaceSearchKind,
|
|
262
|
-
MarketplaceSearchGroup,
|
|
263
|
-
MarketplaceSearchRow,
|
|
264
|
-
MarketplaceSearchPage,
|
|
265
|
-
MarketplaceVersion,
|
|
266
|
-
MarketplaceLatestVersion,
|
|
143
|
+
ManifestMcpEntry,
|
|
267
144
|
MarketplaceAdvisory,
|
|
268
|
-
|
|
145
|
+
MarketplaceDelivery,
|
|
146
|
+
MarketplaceInstalled,
|
|
269
147
|
MarketplaceInstalledCompat,
|
|
270
148
|
MarketplaceInstalledPlugin,
|
|
271
|
-
|
|
272
|
-
MarketplaceInstalled,
|
|
273
|
-
MarketplaceUpgradeAllRow,
|
|
274
|
-
MarketplaceUpgradeAllResult,
|
|
149
|
+
MarketplaceInstallPreview,
|
|
275
150
|
MarketplaceInstallResult,
|
|
151
|
+
MarketplaceItem,
|
|
152
|
+
MarketplaceLatestVersion,
|
|
276
153
|
MarketplaceMountedRoute,
|
|
277
|
-
|
|
278
|
-
MarketplacePreviewItem,
|
|
154
|
+
MarketplacePluginDetail,
|
|
279
155
|
MarketplacePreviewCollision,
|
|
156
|
+
MarketplacePreviewItem,
|
|
280
157
|
MarketplacePreviewPublicRoute,
|
|
281
|
-
|
|
158
|
+
MarketplacePreviewRoute,
|
|
159
|
+
MarketplaceQuarantinedPlugin,
|
|
160
|
+
MarketplaceRequiredEnvVar,
|
|
161
|
+
MarketplaceRouteDecl,
|
|
162
|
+
MarketplaceRoutesDecl,
|
|
163
|
+
MarketplaceSearchGroup,
|
|
164
|
+
MarketplaceSearchKind,
|
|
165
|
+
MarketplaceSearchPage,
|
|
166
|
+
MarketplaceSearchRow,
|
|
167
|
+
MarketplaceSource,
|
|
282
168
|
MarketplaceUninstallResult,
|
|
169
|
+
MarketplaceUpgradeAllResult,
|
|
170
|
+
MarketplaceUpgradeAllRow,
|
|
171
|
+
MarketplaceVersion,
|
|
172
|
+
McpEnvRef,
|
|
173
|
+
McpEnvRefs,
|
|
174
|
+
McpReloadResult,
|
|
175
|
+
MediaKind,
|
|
176
|
+
MeProjection,
|
|
177
|
+
Notification,
|
|
178
|
+
Notifications,
|
|
179
|
+
OAuthCompleteResult,
|
|
180
|
+
PatternEntry,
|
|
181
|
+
PolicyBody,
|
|
182
|
+
PolicyVersion,
|
|
183
|
+
PresetBody,
|
|
184
|
+
PresetDetail,
|
|
185
|
+
PresetExtensionElement,
|
|
186
|
+
PresetRecord,
|
|
187
|
+
PresetReferees,
|
|
188
|
+
PresetRenamed,
|
|
189
|
+
PresetValidation,
|
|
190
|
+
PresetVersion,
|
|
191
|
+
PresetVersionTags,
|
|
192
|
+
Principal,
|
|
193
|
+
PrincipalRef,
|
|
194
|
+
ProviderCatalogResponse,
|
|
195
|
+
ProviderView,
|
|
196
|
+
RecordSearchPage,
|
|
197
|
+
ReloadConfigResult,
|
|
198
|
+
RoleAuditEvent,
|
|
199
|
+
RoleBody,
|
|
200
|
+
RoleGrants,
|
|
201
|
+
RoleVersion,
|
|
202
|
+
RoleVersions,
|
|
203
|
+
RouteAction,
|
|
204
|
+
RouteEntry,
|
|
205
|
+
Run,
|
|
206
|
+
RunSpan,
|
|
207
|
+
RunTrace,
|
|
208
|
+
ScheduleItem,
|
|
209
|
+
SettingsSchema,
|
|
210
|
+
SetupBody,
|
|
211
|
+
SetupResult,
|
|
212
|
+
StateAttach,
|
|
213
|
+
StateAttached,
|
|
214
|
+
StateAttachment,
|
|
215
|
+
StateAttachmentUpdated,
|
|
216
|
+
StateBinding,
|
|
217
|
+
StateConsumers,
|
|
218
|
+
StateDeclaration,
|
|
219
|
+
StateDetached,
|
|
220
|
+
StateDetail,
|
|
221
|
+
StateFoldReport,
|
|
222
|
+
StateInjection,
|
|
223
|
+
StateListItem,
|
|
224
|
+
StateRecord,
|
|
225
|
+
StateRetentionPruned,
|
|
226
|
+
StateStats,
|
|
227
|
+
StateSubject,
|
|
228
|
+
StateTemplateDocument,
|
|
229
|
+
StateTemplateListItem,
|
|
230
|
+
StateUpdate,
|
|
231
|
+
StorageInfo,
|
|
232
|
+
StorageResourceStat,
|
|
233
|
+
StudioPluginManifest,
|
|
234
|
+
SubjectPage,
|
|
235
|
+
SubjectRow,
|
|
236
|
+
SubMcpEntry,
|
|
237
|
+
SubMcpMount,
|
|
238
|
+
TargetConversationConfig,
|
|
239
|
+
TemplateDeclarations,
|
|
240
|
+
TemplatedText,
|
|
241
|
+
TemplateJq,
|
|
242
|
+
TemplateJqApplyResult,
|
|
243
|
+
TemplateJqResult,
|
|
244
|
+
TemplateReconcile,
|
|
245
|
+
TokensPayload,
|
|
246
|
+
ToolExtensions,
|
|
247
|
+
ToolExtensionsApplyResult,
|
|
248
|
+
ToolMediaResult,
|
|
249
|
+
ToolMetaOverlay,
|
|
250
|
+
ToolMetaRecord,
|
|
251
|
+
ToolSchema,
|
|
252
|
+
ToolTagEntry,
|
|
253
|
+
TranscriptOrder,
|
|
254
|
+
TriggerAuth,
|
|
255
|
+
TriggerLinkCreated,
|
|
256
|
+
TriggerLinkDeleted,
|
|
257
|
+
TriggerLinkList,
|
|
258
|
+
TriggerLinkRecord,
|
|
259
|
+
ValidateConditionResult,
|
|
260
|
+
WebEntryCode,
|
|
261
|
+
WebEntryCodeMinted,
|
|
262
|
+
WebEntryCodeRevoked,
|
|
263
|
+
WebEntryGate,
|
|
264
|
+
WebEntryGateState,
|
|
265
|
+
WorkerKind,
|
|
266
|
+
WorkerLastOp,
|
|
267
|
+
WorkerState,
|
|
268
|
+
WriteEntry,
|
|
269
|
+
WritesPage,
|
|
283
270
|
} from './schemas';
|
|
271
|
+
export * as schemas from './schemas';
|
|
272
|
+
export type { SseFrame } from './sse';
|
|
273
|
+
export { readSseFrames, SseFrameParser } from './sse';
|
|
274
|
+
export type {
|
|
275
|
+
SubmitToolRunArgs,
|
|
276
|
+
ToolRunListItem,
|
|
277
|
+
ToolRunRecord,
|
|
278
|
+
ToolRunStatus,
|
|
279
|
+
ToolRunSubmitResult,
|
|
280
|
+
} from './tool-runs';
|
|
281
|
+
export {
|
|
282
|
+
isTerminalRunStatus,
|
|
283
|
+
toolRunList,
|
|
284
|
+
toolRunListItem,
|
|
285
|
+
toolRunRecord,
|
|
286
|
+
toolRunStatus,
|
|
287
|
+
toolRunSubmitResult,
|
|
288
|
+
} from './tool-runs';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** API-key payload and mint/edit/revoke response schemas. */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
import { principalRef } from './principals';
|
|
5
|
+
import { templatedText } from './served';
|
|
6
|
+
import { jsonValue } from './shared';
|
|
7
|
+
|
|
8
|
+
/** The per-key payloads (`GET /api/auth/tokens-payload`). The stable per-mint
|
|
9
|
+
* `key_fingerprint` is nested under `policy_data`; the picker reads it there. */
|
|
10
|
+
export const tokensPayload = z.array(
|
|
11
|
+
z.object({
|
|
12
|
+
// The value an `execution_key` binding names.
|
|
13
|
+
user_id: z.string().min(1),
|
|
14
|
+
description: z.string(),
|
|
15
|
+
scopes: z.array(z.string()),
|
|
16
|
+
policy_data: jsonValue,
|
|
17
|
+
condition: templatedText.nullable().optional(),
|
|
18
|
+
// The key's OWNER principal (kind + display name); `null` for a key whose
|
|
19
|
+
// principal row is absent (an orphaned restore state).
|
|
20
|
+
principal: principalRef.nullable().optional(),
|
|
21
|
+
// `true` for a key whose owning principal row is gone (an orphaned key that a
|
|
22
|
+
// backup restore left without its principal).
|
|
23
|
+
orphaned: z.boolean().optional(),
|
|
24
|
+
}),
|
|
25
|
+
);
|
|
26
|
+
export type TokensPayload = z.infer<typeof tokensPayload>;
|
|
27
|
+
|
|
28
|
+
/** Mint reply `{ api_key, key_fingerprint }` narrowed to the raw `sk-…` key,
|
|
29
|
+
* returned once at creation and never again. */
|
|
30
|
+
export const createdApiKey = z
|
|
31
|
+
.object({ api_key: z.string(), key_fingerprint: z.string() })
|
|
32
|
+
.transform((minted) => minted.api_key);
|
|
33
|
+
export const editApiKeyResult = z.object({ user_id: z.string(), updated: z.boolean() });
|
|
34
|
+
export const revokeApiKeyResult = z.object({ user_id: z.string(), revoked: z.boolean() });
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/** Route catalog, scope mapping and public-route response schemas. */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
/** `{ url: scope_id }` — every URL currently mapped to a scope. */
|
|
5
|
+
export const authScopes = z.record(z.string(), z.string());
|
|
6
|
+
|
|
7
|
+
export const addUrlToScopeResult = z.object({ scope_id: z.string(), url: z.string() });
|
|
8
|
+
export const removeUrlFromScopeResult = z.object({ url: z.string() });
|
|
9
|
+
export const removeScopeResult = z.object({ scope_id: z.string(), deleted_keys: z.number() });
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A route's authorization ACTION class, joined onto the catalog from the route
|
|
13
|
+
* registry. `read`/`write` routes are GRANTABLE — a role's per-tag level opens
|
|
14
|
+
* them; `fenced`/`secret` routes are ADMIN-ONLY and never grantable (no per-tag
|
|
15
|
+
* level reaches them). `null` marks a path the registry carries no metadata for
|
|
16
|
+
* (an unregistered/ungated path — no feature tags, no action).
|
|
17
|
+
*/
|
|
18
|
+
export const routeAction = z.enum(['read', 'write', 'fenced', 'secret']);
|
|
19
|
+
export type RouteAction = z.infer<typeof routeAction>;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* One row of the route catalog (`GET /api/auth/routes`) — a plain HTTP route with
|
|
23
|
+
* its current mapping, JOINED with its route-registry metadata. `mapped` is the
|
|
24
|
+
* scope id, the public marker, or `null` when the path is unmapped (the mapper's
|
|
25
|
+
* "unassigned" bucket source). `methods` is the route's method set with `HEAD`
|
|
26
|
+
* removed. `tags` are the route's feature-group labels, `summary` its one-line
|
|
27
|
+
* description, and `action` its authorization class — the join fields the Roles
|
|
28
|
+
* grant editor reads to derive grantable feature groups and mark the admin-only
|
|
29
|
+
* (fenced/secret) routes it must never offer a grant for. An unregistered path
|
|
30
|
+
* carries `tags: []`, `summary: ''`, `action: null`.
|
|
31
|
+
*/
|
|
32
|
+
export const authRoute = z.object({
|
|
33
|
+
path: z.string(),
|
|
34
|
+
methods: z.array(z.string()),
|
|
35
|
+
mapped: z.string().nullable(),
|
|
36
|
+
tags: z.array(z.string()),
|
|
37
|
+
summary: z.string(),
|
|
38
|
+
action: routeAction.nullable(),
|
|
39
|
+
});
|
|
40
|
+
export type AuthRoute = z.infer<typeof authRoute>;
|
|
41
|
+
export const authRoutes = z.array(authRoute);
|
|
42
|
+
/** `GET /api/auth/public-routes` — the sorted urls pinned to the public marker. */
|
|
43
|
+
export const publicRoutes = z.array(z.string());
|
|
44
|
+
|
|
45
|
+
/** `POST /api/auth/public-routes` — the pinned url. */
|
|
46
|
+
export const pinPublicResult = z.object({ url: z.string() });
|
|
47
|
+
/** `DELETE /api/auth/public-routes` — the unpinned url (404 when not pinned). */
|
|
48
|
+
export const unpinPublicResult = z.object({ url: z.string() });
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** Backup section, document and import-report response schemas. */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
import { fleetReportFanout } from './fleet';
|
|
5
|
+
|
|
6
|
+
export const backupSections = z.array(z.object({ name: z.string(), secret: z.boolean() }));
|
|
7
|
+
|
|
8
|
+
/** The exported backup document — validated when the UI reads a picked file. */
|
|
9
|
+
export const backupDocument = z.object({
|
|
10
|
+
version: z.literal(1),
|
|
11
|
+
created_at: z.string(),
|
|
12
|
+
sections: z.record(z.string(), z.unknown()),
|
|
13
|
+
errors: z.record(z.string(), z.string()).optional(),
|
|
14
|
+
});
|
|
15
|
+
export type BackupDocument = z.infer<typeof backupDocument>;
|
|
16
|
+
|
|
17
|
+
export const backupImportReport = z.object({
|
|
18
|
+
ok: z.boolean(),
|
|
19
|
+
sections: z.record(
|
|
20
|
+
z.string(),
|
|
21
|
+
z.object({
|
|
22
|
+
created: z.number(),
|
|
23
|
+
updated: z.number(),
|
|
24
|
+
skipped: z.number(),
|
|
25
|
+
errors: z.array(z.string()),
|
|
26
|
+
new_api_keys: z
|
|
27
|
+
.array(
|
|
28
|
+
z.object({
|
|
29
|
+
user_id: z.string(),
|
|
30
|
+
description: z.string(),
|
|
31
|
+
api_key: z.string(),
|
|
32
|
+
}),
|
|
33
|
+
)
|
|
34
|
+
.optional(),
|
|
35
|
+
// The `manifest` and `env` sections apply through the config pipeline, so their
|
|
36
|
+
// report carries the mode-wrapped fleet `fanout` of the restore's reload; other
|
|
37
|
+
// sections omit it. Parsed EXPLICITLY so the shared fleet-report handler can
|
|
38
|
+
// surface a failed restore propagation — otherwise zod would strip it silently.
|
|
39
|
+
fanout: fleetReportFanout.optional(),
|
|
40
|
+
}),
|
|
41
|
+
),
|
|
42
|
+
});
|
|
43
|
+
export type BackupImportReport = z.infer<typeof backupImportReport>;
|