@tai42/api-client 19.3.0 → 21.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/README.md +29 -0
- package/dist/agents.d.ts.map +1 -1
- package/dist/agents.js +6 -4
- package/dist/agents.js.map +1 -1
- package/dist/client/agents-client.d.ts.map +1 -1
- package/dist/client/agents-client.js +3 -2
- package/dist/client/agents-client.js.map +1 -1
- package/dist/client/auth-client.d.ts +143 -90
- package/dist/client/auth-client.d.ts.map +1 -1
- package/dist/client/auth-client.js +81 -25
- package/dist/client/auth-client.js.map +1 -1
- package/dist/client/backend-client.d.ts +14 -13
- package/dist/client/backend-client.d.ts.map +1 -1
- package/dist/client/backend-client.js +7 -3
- package/dist/client/backend-client.js.map +1 -1
- package/dist/client/backup-client.d.ts +45 -19
- package/dist/client/backup-client.d.ts.map +1 -1
- package/dist/client/backup-client.js +8 -3
- package/dist/client/backup-client.js.map +1 -1
- package/dist/client/capabilities-client.d.ts +20 -16
- package/dist/client/capabilities-client.d.ts.map +1 -1
- package/dist/client/capabilities-client.js +3 -2
- package/dist/client/capabilities-client.js.map +1 -1
- package/dist/client/channels-client.d.ts.map +1 -1
- package/dist/client/channels-client.js +2 -1
- package/dist/client/channels-client.js.map +1 -1
- package/dist/client/config-client.d.ts +44 -17
- package/dist/client/config-client.d.ts.map +1 -1
- package/dist/client/config-client.js +10 -4
- package/dist/client/config-client.js.map +1 -1
- package/dist/client/connectors-client.d.ts +270 -81
- package/dist/client/connectors-client.d.ts.map +1 -1
- package/dist/client/connectors-client.js +38 -10
- package/dist/client/connectors-client.js.map +1 -1
- package/dist/client/conversations-client.d.ts +440 -86
- package/dist/client/conversations-client.d.ts.map +1 -1
- package/dist/client/conversations-client.js +46 -17
- package/dist/client/conversations-client.js.map +1 -1
- package/dist/client/hooks-client.d.ts +3 -3
- package/dist/client/hooks-client.d.ts.map +1 -1
- package/dist/client/hooks-client.js +12 -7
- package/dist/client/hooks-client.js.map +1 -1
- package/dist/client/index.d.ts +2252 -864
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +10 -2
- package/dist/client/index.js.map +1 -1
- package/dist/client/interactions-client.d.ts +19 -14
- package/dist/client/interactions-client.d.ts.map +1 -1
- package/dist/client/interactions-client.js +21 -9
- package/dist/client/interactions-client.js.map +1 -1
- package/dist/client/login-client.d.ts +18 -17
- package/dist/client/login-client.d.ts.map +1 -1
- package/dist/client/login-client.js +8 -4
- package/dist/client/login-client.js.map +1 -1
- package/dist/client/manifest-client.d.ts +276 -105
- package/dist/client/manifest-client.d.ts.map +1 -1
- package/dist/client/manifest-client.js +22 -16
- package/dist/client/manifest-client.js.map +1 -1
- package/dist/client/marketplace-client.d.ts +181 -51
- package/dist/client/marketplace-client.d.ts.map +1 -1
- package/dist/client/marketplace-client.js +23 -12
- package/dist/client/marketplace-client.js.map +1 -1
- package/dist/client/mcp-config-schema-client.d.ts.map +1 -1
- package/dist/client/mcp-config-schema-client.js +2 -1
- package/dist/client/mcp-config-schema-client.js.map +1 -1
- package/dist/client/notifications-client.d.ts +44 -14
- package/dist/client/notifications-client.d.ts.map +1 -1
- package/dist/client/notifications-client.js +2 -1
- package/dist/client/notifications-client.js.map +1 -1
- package/dist/client/observability-client.d.ts +78 -38
- package/dist/client/observability-client.d.ts.map +1 -1
- package/dist/client/observability-client.js +29 -6
- package/dist/client/observability-client.js.map +1 -1
- package/dist/client/plugins-client.d.ts +8 -6
- package/dist/client/plugins-client.d.ts.map +1 -1
- package/dist/client/plugins-client.js +2 -1
- package/dist/client/plugins-client.js.map +1 -1
- package/dist/client/policy-client.d.ts +4 -4
- package/dist/client/policy-client.d.ts.map +1 -1
- package/dist/client/policy-client.js +11 -4
- package/dist/client/policy-client.js.map +1 -1
- package/dist/client/presets-client.d.ts +84 -39
- package/dist/client/presets-client.d.ts.map +1 -1
- package/dist/client/presets-client.js +25 -13
- package/dist/client/presets-client.js.map +1 -1
- package/dist/client/profiles-client.d.ts +40 -33
- package/dist/client/profiles-client.d.ts.map +1 -1
- package/dist/client/profiles-client.js +15 -10
- package/dist/client/profiles-client.js.map +1 -1
- package/dist/client/schedules-client.d.ts +21 -17
- package/dist/client/schedules-client.d.ts.map +1 -1
- package/dist/client/schedules-client.js +8 -5
- package/dist/client/schedules-client.js.map +1 -1
- package/dist/client/settings-schema-client.d.ts +1 -1
- package/dist/client/settings-schema-client.d.ts.map +1 -1
- package/dist/client/settings-schema-client.js +2 -1
- package/dist/client/settings-schema-client.js.map +1 -1
- package/dist/client/states-client.d.ts +215 -87
- package/dist/client/states-client.d.ts.map +1 -1
- package/dist/client/states-client.js +98 -37
- package/dist/client/states-client.js.map +1 -1
- package/dist/client/storage-client.d.ts +5 -5
- package/dist/client/storage-client.d.ts.map +1 -1
- package/dist/client/storage-client.js +24 -12
- package/dist/client/storage-client.js.map +1 -1
- package/dist/client/sub-mcp-client.d.ts +3 -1
- package/dist/client/sub-mcp-client.d.ts.map +1 -1
- package/dist/client/sub-mcp-client.js +9 -4
- package/dist/client/sub-mcp-client.js.map +1 -1
- package/dist/client/system-client.d.ts +2 -2
- package/dist/client/system-client.d.ts.map +1 -1
- package/dist/client/system-client.js +2 -1
- package/dist/client/system-client.js.map +1 -1
- package/dist/client/templates-client.d.ts +65 -6
- package/dist/client/templates-client.d.ts.map +1 -1
- package/dist/client/templates-client.js +25 -7
- package/dist/client/templates-client.js.map +1 -1
- package/dist/client/tool-extensions-client.d.ts +41 -16
- package/dist/client/tool-extensions-client.d.ts.map +1 -1
- package/dist/client/tool-extensions-client.js +6 -4
- package/dist/client/tool-extensions-client.js.map +1 -1
- package/dist/client/tool-meta-client.d.ts +8 -8
- package/dist/client/tool-meta-client.d.ts.map +1 -1
- package/dist/client/tool-meta-client.js +12 -8
- package/dist/client/tool-meta-client.js.map +1 -1
- package/dist/client/tools-client.d.ts +150 -23
- package/dist/client/tools-client.d.ts.map +1 -1
- package/dist/client/tools-client.js +8 -8
- package/dist/client/tools-client.js.map +1 -1
- package/dist/client/trigger-links-client.d.ts +11 -9
- package/dist/client/trigger-links-client.d.ts.map +1 -1
- package/dist/client/trigger-links-client.js +4 -4
- package/dist/client/trigger-links-client.js.map +1 -1
- package/dist/fleet-report.d.ts +21 -5
- package/dist/fleet-report.d.ts.map +1 -1
- package/dist/fleet-report.js +31 -6
- package/dist/fleet-report.js.map +1 -1
- package/dist/generated/api-routes.d.ts +1014 -0
- package/dist/generated/api-routes.d.ts.map +1 -0
- package/dist/generated/api-routes.js +322 -0
- package/dist/generated/api-routes.js.map +1 -0
- package/dist/generated/openapi-schemas.d.ts +12425 -0
- package/dist/generated/openapi-schemas.d.ts.map +1 -0
- package/dist/generated/openapi-schemas.js +671 -0
- package/dist/generated/openapi-schemas.js.map +1 -0
- package/dist/generated/served-schemas.d.ts +6697 -392
- package/dist/generated/served-schemas.d.ts.map +1 -1
- package/dist/generated/served-schemas.js +7061 -46
- package/dist/generated/served-schemas.js.map +1 -1
- package/dist/headers.d.ts +4 -0
- package/dist/headers.d.ts.map +1 -0
- package/dist/headers.js +4 -0
- package/dist/headers.js.map +1 -0
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +4 -3
- package/dist/http.js.map +1 -1
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/schemas/api-keys.d.ts +14 -12
- package/dist/schemas/api-keys.d.ts.map +1 -1
- package/dist/schemas/api-keys.js +9 -23
- package/dist/schemas/api-keys.js.map +1 -1
- package/dist/schemas/auth-routes.d.ts +34 -29
- package/dist/schemas/auth-routes.d.ts.map +1 -1
- package/dist/schemas/auth-routes.js +22 -27
- package/dist/schemas/auth-routes.js.map +1 -1
- package/dist/schemas/backup.d.ts +157 -36
- package/dist/schemas/backup.d.ts.map +1 -1
- package/dist/schemas/backup.js +27 -26
- package/dist/schemas/backup.js.map +1 -1
- package/dist/schemas/capabilities.d.ts +32 -22
- package/dist/schemas/capabilities.d.ts.map +1 -1
- package/dist/schemas/capabilities.js +15 -40
- package/dist/schemas/capabilities.js.map +1 -1
- package/dist/schemas/channels.d.ts +1 -1
- package/dist/schemas/channels.d.ts.map +1 -1
- package/dist/schemas/channels.js +2 -5
- package/dist/schemas/channels.js.map +1 -1
- package/dist/schemas/config.d.ts.map +1 -1
- package/dist/schemas/config.js +4 -6
- package/dist/schemas/config.js.map +1 -1
- package/dist/schemas/connectors.d.ts +381 -185
- package/dist/schemas/connectors.d.ts.map +1 -1
- package/dist/schemas/connectors.js +54 -101
- package/dist/schemas/connectors.js.map +1 -1
- package/dist/schemas/conversations.d.ts +970 -241
- package/dist/schemas/conversations.d.ts.map +1 -1
- package/dist/schemas/conversations.js +40 -134
- package/dist/schemas/conversations.js.map +1 -1
- package/dist/schemas/extensions.d.ts +9 -6
- package/dist/schemas/extensions.d.ts.map +1 -1
- package/dist/schemas/extensions.js +6 -4
- package/dist/schemas/extensions.js.map +1 -1
- package/dist/schemas/fleet.d.ts +153 -99
- package/dist/schemas/fleet.d.ts.map +1 -1
- package/dist/schemas/fleet.js +41 -51
- package/dist/schemas/fleet.js.map +1 -1
- package/dist/schemas/hooks.d.ts +34 -34
- package/dist/schemas/hooks.d.ts.map +1 -1
- package/dist/schemas/hooks.js +15 -34
- package/dist/schemas/hooks.js.map +1 -1
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +1 -1
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/interactions.d.ts +146 -123
- package/dist/schemas/interactions.d.ts.map +1 -1
- package/dist/schemas/interactions.js +44 -129
- package/dist/schemas/interactions.js.map +1 -1
- package/dist/schemas/login.d.ts +36 -37
- package/dist/schemas/login.d.ts.map +1 -1
- package/dist/schemas/login.js +8 -42
- package/dist/schemas/login.js.map +1 -1
- package/dist/schemas/manifest-mcp.d.ts +61 -35
- package/dist/schemas/manifest-mcp.d.ts.map +1 -1
- package/dist/schemas/manifest-mcp.js +13 -19
- package/dist/schemas/manifest-mcp.js.map +1 -1
- package/dist/schemas/marketplace.d.ts +219 -133
- package/dist/schemas/marketplace.d.ts.map +1 -1
- package/dist/schemas/marketplace.js +35 -120
- package/dist/schemas/marketplace.js.map +1 -1
- package/dist/schemas/members.d.ts +161 -0
- package/dist/schemas/members.d.ts.map +1 -0
- package/dist/schemas/members.js +73 -0
- package/dist/schemas/members.js.map +1 -0
- package/dist/schemas/notifications.d.ts +113 -41
- package/dist/schemas/notifications.d.ts.map +1 -1
- package/dist/schemas/notifications.js +9 -35
- package/dist/schemas/notifications.js.map +1 -1
- package/dist/schemas/observability.d.ts +174 -72
- package/dist/schemas/observability.d.ts.map +1 -1
- package/dist/schemas/observability.js +23 -76
- package/dist/schemas/observability.js.map +1 -1
- package/dist/schemas/policy.d.ts +11 -11
- package/dist/schemas/policy.d.ts.map +1 -1
- package/dist/schemas/policy.js +5 -12
- package/dist/schemas/policy.js.map +1 -1
- package/dist/schemas/presets.d.ts +109 -64
- package/dist/schemas/presets.d.ts.map +1 -1
- package/dist/schemas/presets.js +12 -48
- package/dist/schemas/presets.js.map +1 -1
- package/dist/schemas/principals.d.ts +28 -21
- package/dist/schemas/principals.d.ts.map +1 -1
- package/dist/schemas/principals.js +13 -25
- package/dist/schemas/principals.js.map +1 -1
- package/dist/schemas/profiles.d.ts +75 -63
- package/dist/schemas/profiles.d.ts.map +1 -1
- package/dist/schemas/profiles.js +24 -54
- package/dist/schemas/profiles.js.map +1 -1
- package/dist/schemas/roles.d.ts +22 -22
- package/dist/schemas/roles.d.ts.map +1 -1
- package/dist/schemas/roles.js +10 -17
- package/dist/schemas/roles.js.map +1 -1
- package/dist/schemas/schedules.d.ts +21 -15
- package/dist/schemas/schedules.d.ts.map +1 -1
- package/dist/schemas/schedules.js +4 -13
- package/dist/schemas/schedules.js.map +1 -1
- package/dist/schemas/served.d.ts +6373 -194
- package/dist/schemas/served.d.ts.map +1 -1
- package/dist/schemas/served.js +21 -0
- package/dist/schemas/served.js.map +1 -1
- package/dist/schemas/settings-schema.d.ts +1 -1
- package/dist/schemas/settings-schema.d.ts.map +1 -1
- package/dist/schemas/settings-schema.js +17 -19
- package/dist/schemas/settings-schema.js.map +1 -1
- package/dist/schemas/setup.d.ts +6 -6
- package/dist/schemas/setup.d.ts.map +1 -1
- package/dist/schemas/setup.js +2 -11
- package/dist/schemas/setup.js.map +1 -1
- package/dist/schemas/states.d.ts +450 -135
- package/dist/schemas/states.d.ts.map +1 -1
- package/dist/schemas/states.js +76 -140
- package/dist/schemas/states.js.map +1 -1
- package/dist/schemas/storage.d.ts +7 -8
- package/dist/schemas/storage.d.ts.map +1 -1
- package/dist/schemas/storage.js +8 -17
- package/dist/schemas/storage.js.map +1 -1
- package/dist/schemas/studio-plugins.d.ts +24 -18
- package/dist/schemas/studio-plugins.d.ts.map +1 -1
- package/dist/schemas/studio-plugins.js +5 -19
- package/dist/schemas/studio-plugins.js.map +1 -1
- package/dist/schemas/sub-mcp.d.ts +11 -8
- package/dist/schemas/sub-mcp.d.ts.map +1 -1
- package/dist/schemas/sub-mcp.js +10 -19
- package/dist/schemas/sub-mcp.js.map +1 -1
- package/dist/schemas/system-kinds.d.ts +76 -46
- package/dist/schemas/system-kinds.d.ts.map +1 -1
- package/dist/schemas/system-kinds.js +11 -28
- package/dist/schemas/system-kinds.js.map +1 -1
- package/dist/schemas/templates.d.ts +83 -25
- package/dist/schemas/templates.d.ts.map +1 -1
- package/dist/schemas/templates.js +8 -9
- package/dist/schemas/templates.js.map +1 -1
- package/dist/schemas/tool-meta.d.ts +15 -15
- package/dist/schemas/tool-meta.d.ts.map +1 -1
- package/dist/schemas/tool-meta.js +6 -21
- package/dist/schemas/tool-meta.js.map +1 -1
- package/dist/schemas/tools.d.ts +177 -56
- package/dist/schemas/tools.d.ts.map +1 -1
- package/dist/schemas/tools.js +20 -41
- package/dist/schemas/tools.js.map +1 -1
- package/dist/schemas/trigger-links.d.ts +22 -17
- package/dist/schemas/trigger-links.d.ts.map +1 -1
- package/dist/schemas/trigger-links.js +7 -27
- package/dist/schemas/trigger-links.js.map +1 -1
- package/dist/tool-runs.d.ts +175 -54
- package/dist/tool-runs.d.ts.map +1 -1
- package/dist/tool-runs.js +33 -34
- package/dist/tool-runs.js.map +1 -1
- package/package.json +4 -3
- package/src/agents.ts +16 -4
- package/src/client/agents-client.ts +3 -2
- package/src/client/auth-client.ts +134 -34
- package/src/client/backend-client.ts +8 -3
- package/src/client/backup-client.ts +8 -3
- package/src/client/capabilities-client.ts +4 -2
- package/src/client/channels-client.ts +3 -1
- package/src/client/config-client.ts +13 -5
- package/src/client/connectors-client.ts +91 -16
- package/src/client/conversations-client.ts +79 -30
- package/src/client/hooks-client.ts +25 -12
- package/src/client/index.ts +16 -4
- package/src/client/interactions-client.ts +40 -16
- package/src/client/login-client.ts +8 -4
- package/src/client/manifest-client.ts +48 -24
- package/src/client/marketplace-client.ts +23 -12
- package/src/client/mcp-config-schema-client.ts +2 -1
- package/src/client/notifications-client.ts +2 -1
- package/src/client/observability-client.ts +60 -8
- package/src/client/plugins-client.ts +2 -1
- package/src/client/policy-client.ts +24 -9
- package/src/client/presets-client.ts +26 -13
- package/src/client/profiles-client.ts +53 -24
- package/src/client/schedules-client.ts +14 -20
- package/src/client/settings-schema-client.ts +2 -1
- package/src/client/states-client.ts +151 -49
- package/src/client/storage-client.ts +43 -14
- package/src/client/sub-mcp-client.ts +10 -4
- package/src/client/system-client.ts +2 -1
- package/src/client/templates-client.ts +26 -7
- package/src/client/tool-extensions-client.ts +14 -7
- package/src/client/tool-meta-client.ts +46 -21
- package/src/client/tools-client.ts +13 -8
- package/src/client/trigger-links-client.ts +10 -6
- package/src/fleet-report.ts +48 -7
- package/src/generated/api-routes.ts +327 -0
- package/src/generated/openapi-schemas.ts +1508 -0
- package/src/generated/served-schemas.ts +7118 -82
- package/src/headers.ts +4 -0
- package/src/http.ts +4 -3
- package/src/index.ts +52 -10
- package/src/schemas/api-keys.ts +9 -25
- package/src/schemas/auth-routes.ts +27 -28
- package/src/schemas/backup.ts +33 -31
- package/src/schemas/capabilities.ts +16 -39
- package/src/schemas/channels.ts +4 -4
- package/src/schemas/config.ts +6 -6
- package/src/schemas/connectors.ts +61 -102
- package/src/schemas/conversations.ts +43 -133
- package/src/schemas/extensions.ts +7 -4
- package/src/schemas/fleet.ts +51 -51
- package/src/schemas/hooks.ts +18 -37
- package/src/schemas/index.ts +1 -1
- package/src/schemas/interactions.ts +48 -131
- package/src/schemas/login.ts +10 -41
- package/src/schemas/manifest-mcp.ts +13 -19
- package/src/schemas/marketplace.ts +37 -120
- package/src/schemas/members.ts +91 -0
- package/src/schemas/notifications.ts +10 -34
- package/src/schemas/observability.ts +34 -79
- package/src/schemas/policy.ts +5 -12
- package/src/schemas/presets.ts +13 -48
- package/src/schemas/principals.ts +17 -24
- package/src/schemas/profiles.ts +25 -55
- package/src/schemas/roles.ts +11 -17
- package/src/schemas/schedules.ts +4 -15
- package/src/schemas/served.ts +33 -0
- package/src/schemas/settings-schema.ts +18 -23
- package/src/schemas/setup.ts +4 -10
- package/src/schemas/states.ts +88 -139
- package/src/schemas/storage.ts +10 -16
- package/src/schemas/studio-plugins.ts +8 -19
- package/src/schemas/sub-mcp.ts +12 -18
- package/src/schemas/system-kinds.ts +12 -29
- package/src/schemas/templates.ts +8 -10
- package/src/schemas/tool-meta.ts +8 -20
- package/src/schemas/tools.ts +22 -45
- package/src/schemas/trigger-links.ts +8 -26
- package/src/tool-runs.ts +47 -38
- package/dist/client/web-entry-gate-client.d.ts +0 -34
- package/dist/client/web-entry-gate-client.d.ts.map +0 -1
- package/dist/client/web-entry-gate-client.js +0 -25
- package/dist/client/web-entry-gate-client.js.map +0 -1
- package/dist/schemas/web-entry.d.ts +0 -45
- package/dist/schemas/web-entry.d.ts.map +0 -1
- package/dist/schemas/web-entry.js +0 -36
- package/dist/schemas/web-entry.js.map +0 -1
- package/src/client/web-entry-gate-client.ts +0 -45
- package/src/schemas/web-entry.ts +0 -46
|
@@ -1,37 +1,14 @@
|
|
|
1
1
|
/** Connector provider catalog and connection lifecycle schemas. */
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
|
+
import * as openapi from '../generated/openapi-schemas';
|
|
4
5
|
import { fleetReportFanout } from './fleet';
|
|
5
6
|
|
|
6
|
-
export const subServiceView =
|
|
7
|
-
id: z.string(),
|
|
8
|
-
display_name: z.string(),
|
|
9
|
-
description: z.string(),
|
|
10
|
-
scopes: z.array(z.string()),
|
|
11
|
-
});
|
|
7
|
+
export const subServiceView = openapi.subServiceView;
|
|
12
8
|
|
|
13
|
-
export const configFieldView =
|
|
14
|
-
key: z.string(),
|
|
15
|
-
label: z.string(),
|
|
16
|
-
target: z.enum(['env', 'header']),
|
|
17
|
-
required: z.boolean(),
|
|
18
|
-
secret: z.boolean(),
|
|
19
|
-
});
|
|
9
|
+
export const configFieldView = openapi.configFieldSpec;
|
|
20
10
|
|
|
21
|
-
export const providerView =
|
|
22
|
-
id: z.string(),
|
|
23
|
-
display_name: z.string(),
|
|
24
|
-
description: z.string(),
|
|
25
|
-
// Required and a real URL: the contract's `ProviderDescriptor.icon_url` runs
|
|
26
|
-
// `check_web_url(schemes=("https",))`, which rejects an empty/relative value, so
|
|
27
|
-
// an empty or malformed one here is drift and fails the parse loudly.
|
|
28
|
-
icon_url: z.url(),
|
|
29
|
-
kind: z.enum(['oauth', 'none']),
|
|
30
|
-
origin: z.enum(['system', 'community']),
|
|
31
|
-
category: z.string(),
|
|
32
|
-
sub_services: z.array(subServiceView),
|
|
33
|
-
config_fields: z.array(configFieldView),
|
|
34
|
-
});
|
|
11
|
+
export const providerView = openapi.providerCatalogEntry;
|
|
35
12
|
export type ProviderView = z.infer<typeof providerView>;
|
|
36
13
|
|
|
37
14
|
/**
|
|
@@ -39,101 +16,83 @@ export type ProviderView = z.infer<typeof providerView>;
|
|
|
39
16
|
* label and sort key for the providers it groups, so the list can group, order,
|
|
40
17
|
* and label providers by category without a second read.
|
|
41
18
|
*/
|
|
42
|
-
export const connectorCategoryView =
|
|
43
|
-
id: z.string(),
|
|
44
|
-
display_name: z.string(),
|
|
45
|
-
sort_order: z.number(),
|
|
46
|
-
});
|
|
19
|
+
export const connectorCategoryView = openapi.connectorCategoryView;
|
|
47
20
|
export type ConnectorCategoryView = z.infer<typeof connectorCategoryView>;
|
|
48
21
|
|
|
49
22
|
/**
|
|
50
23
|
* `GET /api/connectors/providers` — the provider catalog: the providers plus the
|
|
51
|
-
* category groupings the UI arranges them under.
|
|
52
|
-
* array so the category label/order surface rides the same read.
|
|
24
|
+
* category groupings the UI arranges them under.
|
|
53
25
|
*/
|
|
54
|
-
export const providers =
|
|
55
|
-
providers: z.array(providerView),
|
|
56
|
-
categories: z.array(connectorCategoryView),
|
|
57
|
-
});
|
|
26
|
+
export const providers = openapi.providerCatalogResponse;
|
|
58
27
|
export type ProviderCatalogResponse = z.infer<typeof providers>;
|
|
59
28
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
granted_scopes: z.array(z.string()),
|
|
68
|
-
// Sub-services whose MCP server did not answer a live reachability probe.
|
|
69
|
-
// Populated only on the single-connection GET (the list projection is
|
|
70
|
-
// probe-free and always sends `[]`). Reachability is distinct from
|
|
71
|
-
// `auth_health_state`: a healthy connection can still have a down sub-service.
|
|
72
|
-
// Defaulted so a projection that omits it (an older worker mid-rollout) still
|
|
73
|
-
// parses rather than false-failing the whole view.
|
|
74
|
-
unreachable_sub_services: z.array(z.string()).default([]),
|
|
75
|
-
auth_health_state: z.enum(['healthy', 'reconnect_required', 'refresh_failing']),
|
|
76
|
-
created_at: z.string(),
|
|
77
|
-
});
|
|
29
|
+
/**
|
|
30
|
+
* One connection. `unreachable_sub_services` names the sub-services whose MCP server did
|
|
31
|
+
* not answer a live reachability probe: populated only on the single-connection GET (the
|
|
32
|
+
* list projection is probe-free and always sends `[]`). Reachability is distinct from
|
|
33
|
+
* `auth_health_state`: a healthy connection can still have a down sub-service.
|
|
34
|
+
*/
|
|
35
|
+
export const connectionView = openapi.connectedAccountView;
|
|
78
36
|
export type ConnectionView = z.infer<typeof connectionView>;
|
|
79
37
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
// no UI consumes it, and an older worker mid-rollout omits it.
|
|
86
|
-
unhealthy: z.number().optional(),
|
|
87
|
-
});
|
|
38
|
+
/**
|
|
39
|
+
* The connections listing. `unhealthy` counts the connections whose `auth_health_state`
|
|
40
|
+
* is not healthy across the whole set (independent of any filter/limit).
|
|
41
|
+
*/
|
|
42
|
+
export const connectionsList = openapi.connectionsListResponse;
|
|
88
43
|
|
|
89
|
-
// A connector mutation that writes the manifest embeds the mode-wrapped fleet
|
|
90
|
-
//
|
|
91
|
-
//
|
|
92
|
-
//
|
|
93
|
-
//
|
|
44
|
+
// A connector mutation that writes the manifest embeds the mode-wrapped fleet `fanout` of
|
|
45
|
+
// the reload it broadcast; it is `null` when the response path mutated no manifest (an
|
|
46
|
+
// OAuth START opens a flow before any write). Hand-typed: the spec publishes the fan-out as
|
|
47
|
+
// an open object; the client discriminates its modes so the shared fleet-report handler
|
|
48
|
+
// surfaces a failed propagation on every connector flow.
|
|
94
49
|
export const startConnectResult = z.union([
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
connection_id: z.string(),
|
|
98
|
-
added_manifest_entries: z.array(z.string()),
|
|
99
|
-
fanout: fleetReportFanout.nullable(),
|
|
100
|
-
}),
|
|
50
|
+
openapi.startConnectResponse,
|
|
51
|
+
openapi.startConnectNoAuthResponse.extend({ fanout: fleetReportFanout.nullable().default(null) }),
|
|
101
52
|
]);
|
|
102
53
|
|
|
103
54
|
// A reconnect START opens an OAuth flow and writes no manifest, so it carries no
|
|
104
55
|
// fan-out (the manifest write lands when the flow completes).
|
|
105
|
-
export const reconnectResult =
|
|
106
|
-
|
|
107
|
-
export const disconnectResult =
|
|
108
|
-
|
|
109
|
-
upstream_revoke_outcome: z.enum(['success', 'failed', 'skipped']),
|
|
110
|
-
upstream_revoke_status: z.number().nullable(),
|
|
111
|
-
removed_manifest_entries: z.array(z.string()),
|
|
112
|
-
fanout: fleetReportFanout.nullable(),
|
|
56
|
+
export const reconnectResult = openapi.startConnectResponse;
|
|
57
|
+
|
|
58
|
+
export const disconnectResult = openapi.disconnectResponse.extend({
|
|
59
|
+
fanout: fleetReportFanout.nullable().default(null),
|
|
113
60
|
});
|
|
114
61
|
|
|
115
|
-
export const patchSubServicesResult =
|
|
116
|
-
connection_id: z.string(),
|
|
117
|
-
enabled_sub_services: z.array(z.string()),
|
|
118
|
-
consent_required: z.boolean(),
|
|
119
|
-
flow_id: z.string().nullable(),
|
|
120
|
-
authorize_url: z.string().nullable(),
|
|
121
|
-
added_manifest_entries: z.array(z.string()),
|
|
122
|
-
removed_manifest_entries: z.array(z.string()),
|
|
62
|
+
export const patchSubServicesResult = openapi.patchSubServicesResponse.extend({
|
|
123
63
|
// `null` on a consent-only toggle that forks an OAuth flow without a manifest write.
|
|
124
|
-
fanout: fleetReportFanout.nullable(),
|
|
64
|
+
fanout: fleetReportFanout.nullable().default(null),
|
|
125
65
|
});
|
|
126
66
|
|
|
127
67
|
export const oauthCompleteResult = z.discriminatedUnion('kind', [
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
// `null` when completing the flow mutated no manifest (a reconcile that changed
|
|
133
|
-
// nothing).
|
|
134
|
-
fanout: fleetReportFanout.nullable(),
|
|
135
|
-
}),
|
|
136
|
-
z.object({ kind: z.literal('failed'), reason: z.string() }),
|
|
137
|
-
z.object({ kind: z.literal('cancelled'), message: z.string() }),
|
|
68
|
+
openapi.oAuthNotConfigured,
|
|
69
|
+
openapi.oAuthCancelled,
|
|
70
|
+
openapi.oAuthFailed,
|
|
71
|
+
openapi.oAuthSuccess.extend({ fanout: fleetReportFanout }),
|
|
138
72
|
]);
|
|
139
73
|
export type OAuthCompleteResult = z.infer<typeof oauthCompleteResult>;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* `POST /api/connectors/providers/discover` — what a look-up found: the server's
|
|
77
|
+
* protected resource, the sign-in services it lists, and whether a login started from
|
|
78
|
+
* this deployment needs client credentials from anyone.
|
|
79
|
+
*/
|
|
80
|
+
export const discoveredServer = openapi.discoveredServerView;
|
|
81
|
+
export type DiscoveredServer = z.infer<typeof discoveredServer>;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* `POST /api/connectors/providers` and `PUT /api/connectors/providers/{id}/client` —
|
|
85
|
+
* the provider's catalog entry after the change, and the fleet report of the manifest
|
|
86
|
+
* write it made (`null` when none was made). The fan-out is hand-typed (the spec publishes it
|
|
87
|
+
* as an open object) so the shared fleet-report handler can surface a failed propagation.
|
|
88
|
+
*/
|
|
89
|
+
export const providerMutationResult = openapi.providerMutationResponse.extend({
|
|
90
|
+
fanout: fleetReportFanout.nullable().default(null),
|
|
91
|
+
});
|
|
92
|
+
export type ProviderMutationResult = z.infer<typeof providerMutationResult>;
|
|
93
|
+
|
|
94
|
+
/** `DELETE /api/connectors/providers/{id}` — the removed provider and its manifest write. */
|
|
95
|
+
export const removeProviderResult = openapi.removeProviderResponse.extend({
|
|
96
|
+
fanout: fleetReportFanout.nullable().default(null),
|
|
97
|
+
});
|
|
98
|
+
export type RemoveProviderResult = z.infer<typeof removeProviderResult>;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/** Conversation route, thread, transcript and config schemas. */
|
|
2
|
-
import { z } from 'zod';
|
|
2
|
+
import type { z } from 'zod';
|
|
3
3
|
|
|
4
|
-
import
|
|
5
|
-
import { pageWindow } from './shared';
|
|
4
|
+
import * as openapi from '../generated/openapi-schemas';
|
|
6
5
|
|
|
7
6
|
// The cross-channel conversation monitor's READ side: the stored routing rows
|
|
8
7
|
// (the route picker) from `GET /api/conversations`, a route's threads from
|
|
9
8
|
// `GET /api/conversations/{route}/threads`, and one thread's transcript from
|
|
10
9
|
// `GET /api/conversations/{route}/transcript?thread_id=`. Timestamps are float
|
|
11
10
|
// epoch seconds, not ISO strings, and both paged doors carry the same window
|
|
12
|
-
// fields; the transcript adds the direction it was read in.
|
|
11
|
+
// fields; the transcript adds the direction it was read in. Each listing reports
|
|
12
|
+
// `unreadable`, the stored rows it could not read.
|
|
13
13
|
|
|
14
14
|
/** The inbound door a route is bound to: the authed API, or a channel medium. */
|
|
15
|
-
export const conversationDoor =
|
|
15
|
+
export const conversationDoor = openapi.conversationRecordView.shape.door;
|
|
16
16
|
export type ConversationDoor = z.infer<typeof conversationDoor>;
|
|
17
17
|
|
|
18
18
|
/** What a route's turn runs: a registered agent, or a tool dispatch. */
|
|
19
|
-
export const conversationTargetKind =
|
|
19
|
+
export const conversationTargetKind = openapi.conversationConfigSetResult.shape.target_kind;
|
|
20
20
|
export type ConversationTargetKind = z.infer<typeof conversationTargetKind>;
|
|
21
21
|
|
|
22
22
|
/**
|
|
@@ -25,7 +25,7 @@ export type ConversationTargetKind = z.infer<typeof conversationTargetKind>;
|
|
|
25
25
|
* operator to answer. The same value vocabulary as a per-thread mode override, but
|
|
26
26
|
* a distinct concept (the route default vs. one thread's override).
|
|
27
27
|
*/
|
|
28
|
-
export const conversationMode =
|
|
28
|
+
export const conversationMode = openapi.threadModeView.shape.mode;
|
|
29
29
|
export type ConversationMode = z.infer<typeof conversationMode>;
|
|
30
30
|
|
|
31
31
|
/**
|
|
@@ -35,27 +35,13 @@ export type ConversationMode = z.infer<typeof conversationMode>;
|
|
|
35
35
|
* record's text was carried into (`merged`) or dropped in favour of (`superseded`)
|
|
36
36
|
* a later turn, named by `successor_id`; both are terminal and never send.
|
|
37
37
|
*/
|
|
38
|
-
export const conversationDeliveryStatus =
|
|
39
|
-
'accepted',
|
|
40
|
-
'pending_delivery',
|
|
41
|
-
'provisional',
|
|
42
|
-
'delivered',
|
|
43
|
-
'failed',
|
|
44
|
-
'shed',
|
|
45
|
-
'silent',
|
|
46
|
-
'merged',
|
|
47
|
-
'superseded',
|
|
48
|
-
]);
|
|
38
|
+
export const conversationDeliveryStatus = openapi.deliveryStatus;
|
|
49
39
|
export type ConversationDeliveryStatus = z.infer<typeof conversationDeliveryStatus>;
|
|
50
40
|
|
|
51
41
|
/** The nature of a turn's outcome, orthogonal to where its delivery stands. */
|
|
52
|
-
export const conversationAnswerStatus =
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
'silent',
|
|
56
|
-
'merged',
|
|
57
|
-
'superseded',
|
|
58
|
-
]);
|
|
42
|
+
export const conversationAnswerStatus = openapi.conversationRecordView.shape.answer_status
|
|
43
|
+
.unwrap()
|
|
44
|
+
.unwrap();
|
|
59
45
|
export type ConversationAnswerStatus = z.infer<typeof conversationAnswerStatus>;
|
|
60
46
|
|
|
61
47
|
/**
|
|
@@ -63,13 +49,14 @@ export type ConversationAnswerStatus = z.infer<typeof conversationAnswerStatus>;
|
|
|
63
49
|
* answered; `operator` is a message a human sent into the thread, whose text
|
|
64
50
|
* rides `answer` (its `inbound_text` is empty).
|
|
65
51
|
*/
|
|
66
|
-
export const conversationRecordOrigin =
|
|
52
|
+
export const conversationRecordOrigin = openapi.conversationRecordView.shape.origin;
|
|
67
53
|
export type ConversationRecordOrigin = z.infer<typeof conversationRecordOrigin>;
|
|
68
54
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
55
|
+
/** One stored routing row as a read door serves it, its `callback_secret` withheld. */
|
|
56
|
+
export const conversationRouteView = openapi.conversationRouteViewBody;
|
|
57
|
+
export type ConversationRouteView = z.infer<typeof conversationRouteView>;
|
|
58
|
+
|
|
59
|
+
export const conversationRoutes = openapi.conversationRouteListEnvelope;
|
|
73
60
|
export type ConversationRoutes = z.infer<typeof conversationRoutes>;
|
|
74
61
|
|
|
75
62
|
/**
|
|
@@ -79,12 +66,7 @@ export type ConversationRoutes = z.infer<typeof conversationRoutes>;
|
|
|
79
66
|
* row). The secret signs delivery callbacks and is never re-read from any door, so
|
|
80
67
|
* a caller that needs it must capture it from this reply.
|
|
81
68
|
*/
|
|
82
|
-
export const conversationRouteWritten =
|
|
83
|
-
created: z.boolean(),
|
|
84
|
-
route_name: z.string(),
|
|
85
|
-
route: conversationRoute,
|
|
86
|
-
callback_secret: z.string().nullable(),
|
|
87
|
-
});
|
|
69
|
+
export const conversationRouteWritten = openapi.conversationRouteCreateResult;
|
|
88
70
|
export type ConversationRouteWritten = z.infer<typeof conversationRouteWritten>;
|
|
89
71
|
|
|
90
72
|
/**
|
|
@@ -92,10 +74,7 @@ export type ConversationRouteWritten = z.infer<typeof conversationRouteWritten>;
|
|
|
92
74
|
* retryable reclamation of orphaned thread indexes answers `false` rather than a
|
|
93
75
|
* 404).
|
|
94
76
|
*/
|
|
95
|
-
export const conversationRouteDeleted =
|
|
96
|
-
removed: z.boolean(),
|
|
97
|
-
route_name: z.string(),
|
|
98
|
-
});
|
|
77
|
+
export const conversationRouteDeleted = openapi.routeRemoveResult;
|
|
99
78
|
export type ConversationRouteDeleted = z.infer<typeof conversationRouteDeleted>;
|
|
100
79
|
|
|
101
80
|
/**
|
|
@@ -104,58 +83,22 @@ export type ConversationRouteDeleted = z.infer<typeof conversationRouteDeleted>;
|
|
|
104
83
|
* goes back into a URL as a path segment — the transcript door takes it as a
|
|
105
84
|
* query value.
|
|
106
85
|
*/
|
|
107
|
-
export const conversationThread =
|
|
108
|
-
thread_id: z.string(),
|
|
109
|
-
client_address: z.string(),
|
|
110
|
-
last_activity_at: z.number(),
|
|
111
|
-
message_count: z.number(),
|
|
112
|
-
last_delivery_status: conversationDeliveryStatus,
|
|
113
|
-
});
|
|
86
|
+
export const conversationThread = openapi.threadSummaryRow;
|
|
114
87
|
export type ConversationThread = z.infer<typeof conversationThread>;
|
|
115
88
|
|
|
116
|
-
export const conversationThreadsPage =
|
|
117
|
-
items: z.array(conversationThread),
|
|
118
|
-
...pageWindow,
|
|
119
|
-
});
|
|
89
|
+
export const conversationThreadsPage = openapi.threadSummaryEnvelope;
|
|
120
90
|
export type ConversationThreadsPage = z.infer<typeof conversationThreadsPage>;
|
|
121
91
|
|
|
122
92
|
/**
|
|
123
93
|
* One exchange: the visitor's `inbound_text` — every record answers a message, so
|
|
124
94
|
* both projections always carry it — and the agent's `answer`, plus where that
|
|
125
95
|
* answer's delivery stands. `successor_id` names the later turn a `merged` or
|
|
126
|
-
* `superseded` record was folded into, `null` on every other outcome. The
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
96
|
+
* `superseded` record was folded into, `null` on every other outcome. The delivery
|
|
97
|
+
* bookkeeping fields (`channel`, `our_identity`, `provider_message_id`, `callback_url`,
|
|
98
|
+
* `error`, `outbound_message_ids`, `attempts`) are ADMIN ONLY — the same door serves a
|
|
99
|
+
* caller-scoped projection that withholds them, read here as `null`.
|
|
130
100
|
*/
|
|
131
|
-
export const conversationMessage =
|
|
132
|
-
message_id: z.string(),
|
|
133
|
-
route_name: z.string(),
|
|
134
|
-
door: conversationDoor,
|
|
135
|
-
thread_id: z.string(),
|
|
136
|
-
client_address: z.string(),
|
|
137
|
-
caller_principal: z.string().nullable(),
|
|
138
|
-
inbound_text: z.string(),
|
|
139
|
-
// A LOOSE array (`null` = no attachments): the key is always present on the wire,
|
|
140
|
-
// carrying the array or `null`. The renderer `safeParse`s each item against
|
|
141
|
-
// `attachmentMediaItem`, so one malformed/hostile attachment is a loud per-item
|
|
142
|
-
// notice, never a whole-record parse failure that vanishes the transcript.
|
|
143
|
-
inbound_attachments: z.array(z.unknown()).nullable(),
|
|
144
|
-
answer_status: conversationAnswerStatus.nullable(),
|
|
145
|
-
answer: z.string().nullable(),
|
|
146
|
-
successor_id: z.string().nullable(),
|
|
147
|
-
origin: conversationRecordOrigin,
|
|
148
|
-
delivery_status: conversationDeliveryStatus,
|
|
149
|
-
created_at: z.number(),
|
|
150
|
-
updated_at: z.number(),
|
|
151
|
-
channel: z.string().nullable().optional(),
|
|
152
|
-
our_identity: z.string().nullable().optional(),
|
|
153
|
-
provider_message_id: z.string().nullable().optional(),
|
|
154
|
-
callback_url: z.string().nullable().optional(),
|
|
155
|
-
error: z.string().nullable().optional(),
|
|
156
|
-
outbound_message_ids: z.array(z.string()).optional(),
|
|
157
|
-
attempts: z.number().optional(),
|
|
158
|
-
});
|
|
101
|
+
export const conversationMessage = openapi.conversationRecordView;
|
|
159
102
|
export type ConversationMessage = z.infer<typeof conversationMessage>;
|
|
160
103
|
|
|
161
104
|
/**
|
|
@@ -163,15 +106,14 @@ export type ConversationMessage = z.infer<typeof conversationMessage>;
|
|
|
163
106
|
* first); `desc` is the live-tail order, where page 1 is always the newest page
|
|
164
107
|
* and paging forward walks BACKWARDS through the thread's history.
|
|
165
108
|
*/
|
|
166
|
-
export const transcriptOrder =
|
|
109
|
+
export const transcriptOrder = openapi.transcriptEnvelope.shape.order;
|
|
167
110
|
export type TranscriptOrder = z.infer<typeof transcriptOrder>;
|
|
168
111
|
|
|
169
|
-
/**
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
});
|
|
112
|
+
/**
|
|
113
|
+
* A transcript page, echoing the order it was read in; `person_id` names the person a
|
|
114
|
+
* person thread aggregates (`null` for a route-keyed thread).
|
|
115
|
+
*/
|
|
116
|
+
export const conversationTranscriptPage = openapi.transcriptEnvelope;
|
|
175
117
|
export type ConversationTranscriptPage = z.infer<typeof conversationTranscriptPage>;
|
|
176
118
|
|
|
177
119
|
/**
|
|
@@ -181,10 +123,7 @@ export type ConversationTranscriptPage = z.infer<typeof conversationTranscriptPa
|
|
|
181
123
|
* projection. `truncated` says the match set outran the door's scan cap — surfaced
|
|
182
124
|
* loudly, never a silent cut.
|
|
183
125
|
*/
|
|
184
|
-
export const conversationMessageSearchPage =
|
|
185
|
-
items: z.array(conversationMessage),
|
|
186
|
-
...pageWindow,
|
|
187
|
-
});
|
|
126
|
+
export const conversationMessageSearchPage = openapi.messageSearchEnvelope;
|
|
188
127
|
export type ConversationMessageSearchPage = z.infer<typeof conversationMessageSearchPage>;
|
|
189
128
|
|
|
190
129
|
/**
|
|
@@ -192,47 +131,29 @@ export type ConversationMessageSearchPage = z.infer<typeof conversationMessageSe
|
|
|
192
131
|
* own; `manual` holds the flow back so a human answers. `source` says whether the
|
|
193
132
|
* setting is the thread's own (`thread`) or inherited from its route (`route`).
|
|
194
133
|
*/
|
|
195
|
-
export const conversationThreadMode =
|
|
134
|
+
export const conversationThreadMode = openapi.threadModeView.shape.mode;
|
|
196
135
|
export type ConversationThreadMode = z.infer<typeof conversationThreadMode>;
|
|
197
136
|
|
|
198
|
-
export const conversationThreadModeState =
|
|
199
|
-
mode: conversationThreadMode,
|
|
200
|
-
source: z.enum(['thread', 'route']),
|
|
201
|
-
});
|
|
137
|
+
export const conversationThreadModeState = openapi.threadModeView;
|
|
202
138
|
export type ConversationThreadModeState = z.infer<typeof conversationThreadModeState>;
|
|
203
139
|
|
|
204
140
|
/** The receipt a thread-message write returns: the stored id and its thread. */
|
|
205
|
-
export const conversationThreadMessageSent =
|
|
206
|
-
message_id: z.string(),
|
|
207
|
-
thread_id: z.string(),
|
|
208
|
-
});
|
|
141
|
+
export const conversationThreadMessageSent = openapi.threadMessageAck;
|
|
209
142
|
export type ConversationThreadMessageSent = z.infer<typeof conversationThreadMessageSent>;
|
|
210
143
|
|
|
211
144
|
/** Every stored per-target config (`GET /api/conversation-configs`). */
|
|
212
|
-
export const conversationConfigs =
|
|
213
|
-
items: z.array(targetConversationConfig),
|
|
214
|
-
total: z.number(),
|
|
215
|
-
});
|
|
145
|
+
export const conversationConfigs = openapi.conversationConfigListEnvelope;
|
|
216
146
|
export type ConversationConfigs = z.infer<typeof conversationConfigs>;
|
|
217
147
|
|
|
218
148
|
/**
|
|
219
149
|
* The upsert reply: whether THIS call created the config (vs. replaced an existing
|
|
220
150
|
* one), its key, and the stored row.
|
|
221
151
|
*/
|
|
222
|
-
export const conversationConfigWritten =
|
|
223
|
-
created: z.boolean(),
|
|
224
|
-
target_kind: conversationTargetKind,
|
|
225
|
-
target_name: z.string(),
|
|
226
|
-
config: targetConversationConfig,
|
|
227
|
-
});
|
|
152
|
+
export const conversationConfigWritten = openapi.conversationConfigSetResult;
|
|
228
153
|
export type ConversationConfigWritten = z.infer<typeof conversationConfigWritten>;
|
|
229
154
|
|
|
230
155
|
/** The config-delete reply: `removed` is always `true` on success (an unknown key is a 404). */
|
|
231
|
-
export const conversationConfigDeleted =
|
|
232
|
-
removed: z.boolean(),
|
|
233
|
-
target_kind: conversationTargetKind,
|
|
234
|
-
target_name: z.string(),
|
|
235
|
-
});
|
|
156
|
+
export const conversationConfigDeleted = openapi.conversationConfigDeleteResult;
|
|
236
157
|
export type ConversationConfigDeleted = z.infer<typeof conversationConfigDeleted>;
|
|
237
158
|
|
|
238
159
|
/**
|
|
@@ -240,12 +161,9 @@ export type ConversationConfigDeleted = z.infer<typeof conversationConfigDeleted
|
|
|
240
161
|
* every answer record whose delivery ended `failed`, across every route and caller.
|
|
241
162
|
* The records are the ADMIN projection (delivery bookkeeping and `error` included),
|
|
242
163
|
* so the row shape is {@link conversationMessage} exactly. It is NOT a paged window —
|
|
243
|
-
* the door returns `{items, total}` and nothing more.
|
|
164
|
+
* the door returns `{items, total, unreadable}` and nothing more.
|
|
244
165
|
*/
|
|
245
|
-
export const conversationFailedMessages =
|
|
246
|
-
items: z.array(conversationMessage),
|
|
247
|
-
total: z.number(),
|
|
248
|
-
});
|
|
166
|
+
export const conversationFailedMessages = openapi.failedConversationsEnvelope;
|
|
249
167
|
export type ConversationFailedMessages = z.infer<typeof conversationFailedMessages>;
|
|
250
168
|
|
|
251
169
|
/**
|
|
@@ -254,11 +172,7 @@ export type ConversationFailedMessages = z.infer<typeof conversationFailedMessag
|
|
|
254
172
|
* run already cleared them, when they had aged out under retention, or when the id
|
|
255
173
|
* was never stored (forgetting is absolute, never a 404 on a valid id).
|
|
256
174
|
*/
|
|
257
|
-
export const conversationThreadDeleted =
|
|
258
|
-
removed: z.number(),
|
|
259
|
-
route_name: z.string(),
|
|
260
|
-
thread_id: z.string(),
|
|
261
|
-
});
|
|
175
|
+
export const conversationThreadDeleted = openapi.threadDeleteResult;
|
|
262
176
|
export type ConversationThreadDeleted = z.infer<typeof conversationThreadDeleted>;
|
|
263
177
|
|
|
264
178
|
/**
|
|
@@ -267,9 +181,5 @@ export type ConversationThreadDeleted = z.infer<typeof conversationThreadDeleted
|
|
|
267
181
|
* says whether THIS call removed the person row (`false` on a retry or an
|
|
268
182
|
* already-gone person — never a 404).
|
|
269
183
|
*/
|
|
270
|
-
export const conversationPersonDeleted =
|
|
271
|
-
person_id: z.string(),
|
|
272
|
-
removed: z.number(),
|
|
273
|
-
erased: z.boolean(),
|
|
274
|
-
});
|
|
184
|
+
export const conversationPersonDeleted = openapi.personDeleteResult;
|
|
275
185
|
export type ConversationPersonDeleted = z.infer<typeof conversationPersonDeleted>;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
/** Extension element/combo and per-tool extension response schemas. */
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import * as openapi from '../generated/openapi-schemas';
|
|
5
|
+
|
|
6
|
+
export const extension = openapi.extensionView;
|
|
7
|
+
export const extensions = openapi.extensionListing;
|
|
6
8
|
export type Extension = z.infer<typeof extension>;
|
|
7
9
|
|
|
10
|
+
// Hand-written: the spec publishes a config-bearing element as an open object; the client
|
|
11
|
+
// reads its `{ name, config }` form.
|
|
8
12
|
/**
|
|
9
13
|
* One element of an extension combo: a bare extension NAME, or a
|
|
10
14
|
* `{ name, config }` mapping binding author config (e.g. an `output_schema` JSON
|
|
@@ -27,8 +31,7 @@ export type PresetExtensionElement = z.infer<typeof presetExtensionElement>;
|
|
|
27
31
|
* config), never a single flattened one. `available` is the same flat catalog
|
|
28
32
|
* `GET /api/extensions` returns. A drift throws `ApiSchemaError`.
|
|
29
33
|
*/
|
|
30
|
-
export const toolExtensions =
|
|
34
|
+
export const toolExtensions = openapi.toolExtensionsView.extend({
|
|
31
35
|
combos: z.array(z.array(presetExtensionElement)),
|
|
32
|
-
available: extensions,
|
|
33
36
|
});
|
|
34
37
|
export type ToolExtensions = z.infer<typeof toolExtensions>;
|