@tai42/api-client 20.0.0 → 22.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 +129 -127
- package/dist/client/auth-client.d.ts.map +1 -1
- package/dist/client/auth-client.js +68 -28
- 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 +2272 -914
- 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 +43 -6
- 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 +6698 -349
- package/dist/generated/served-schemas.d.ts.map +1 -1
- package/dist/generated/served-schemas.js +7062 -21
- 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 +977 -248
- 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 +0 -1
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +0 -1
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/interactions.d.ts +400 -128
- package/dist/schemas/interactions.d.ts.map +1 -1
- package/dist/schemas/interactions.js +202 -131
- 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 +59 -52
- package/dist/schemas/members.d.ts.map +1 -1
- package/dist/schemas/members.js +20 -52
- package/dist/schemas/members.js.map +1 -1
- package/dist/schemas/notifications.d.ts +115 -17
- 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 -181
- 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 +102 -37
- 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 +7120 -40
- package/src/headers.ts +4 -0
- package/src/http.ts +4 -3
- package/src/index.ts +54 -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 +0 -1
- package/src/schemas/interactions.ts +227 -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 +21 -51
- 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,34 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
import { z } from 'zod';
|
|
1
|
+
import * as openapi from '../generated/openapi-schemas';
|
|
3
2
|
/**
|
|
4
3
|
* A compact reference to a principal — the owner of a key, or the human behind a
|
|
5
4
|
* session — carried inline on payloads that name one.
|
|
6
5
|
*/
|
|
7
|
-
export const principalRef =
|
|
8
|
-
user_id: z.string(),
|
|
9
|
-
kind: z.enum(['human', 'service']),
|
|
10
|
-
display_name: z.string(),
|
|
11
|
-
});
|
|
6
|
+
export const principalRef = openapi.principalRef;
|
|
12
7
|
/**
|
|
13
|
-
* A principal
|
|
14
|
-
*
|
|
15
|
-
* the principal that created this one, or `null` for the owner the setup door
|
|
16
|
-
* mints. `disabled` turns off every credential the principal owns. `created_at`
|
|
17
|
-
* is an ISO-8601 instant.
|
|
8
|
+
* A principal's kind: `human` (logs in interactively) or `service` (holds keys only,
|
|
9
|
+
* never logs in).
|
|
18
10
|
*/
|
|
19
|
-
export const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
});
|
|
11
|
+
export const principalKind = openapi.principal.shape.kind;
|
|
12
|
+
/**
|
|
13
|
+
* A principal row (`/api/auth/principals`). `created_by` is the principal that created
|
|
14
|
+
* this one, or `null` for the owner the setup door mints. `disabled` turns off every
|
|
15
|
+
* credential the principal owns. `created_at` is an ISO-8601 instant.
|
|
16
|
+
*/
|
|
17
|
+
export const principal = openapi.principal;
|
|
27
18
|
/** The principals listing (`GET /api/auth/principals`). */
|
|
28
|
-
export const principalList =
|
|
19
|
+
export const principalList = openapi.principalListing;
|
|
29
20
|
/** The delete result (`DELETE /api/auth/principals/{user_id}`). */
|
|
30
|
-
export const principalDeleted =
|
|
31
|
-
user_id: z.string(),
|
|
32
|
-
deleted: z.boolean(),
|
|
33
|
-
});
|
|
21
|
+
export const principalDeleted = openapi.principalDeleted;
|
|
34
22
|
//# sourceMappingURL=principals.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"principals.js","sourceRoot":"","sources":["../../src/schemas/principals.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"principals.js","sourceRoot":"","sources":["../../src/schemas/principals.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,OAAO,MAAM,8BAA8B,CAAC;AAExD;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;AAGjD;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC;AAG1D;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;AAG3C,2DAA2D;AAC3D,MAAM,CAAC,MAAM,aAAa,GAAG,OAAO,CAAC,gBAAgB,CAAC;AAGtD,mEAAmE;AACnE,MAAM,CAAC,MAAM,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Settings-profile record, version, diff and apply response schemas. */
|
|
2
|
-
import { z } from 'zod';
|
|
2
|
+
import type { z } from 'zod';
|
|
3
3
|
/**
|
|
4
4
|
* `GET /api/config/profiles` — one row per stored profile. The list is
|
|
5
5
|
* names+descriptions ONLY (action=read); no `env`, no `secret_keys`, no bodies.
|
|
@@ -7,13 +7,13 @@ import { z } from 'zod';
|
|
|
7
7
|
* is the `/versions` surface — so the list renders no last-modified column.)
|
|
8
8
|
*/
|
|
9
9
|
export declare const settingsProfileSummary: z.ZodObject<{
|
|
10
|
-
name: z.ZodString;
|
|
11
10
|
description: z.ZodString;
|
|
11
|
+
name: z.ZodString;
|
|
12
12
|
}, z.core.$strip>;
|
|
13
13
|
export type SettingsProfileSummary = z.infer<typeof settingsProfileSummary>;
|
|
14
14
|
export declare const settingsProfileList: z.ZodArray<z.ZodObject<{
|
|
15
|
-
name: z.ZodString;
|
|
16
15
|
description: z.ZodString;
|
|
16
|
+
name: z.ZodString;
|
|
17
17
|
}, z.core.$strip>>;
|
|
18
18
|
/**
|
|
19
19
|
* `GET /api/config/profiles/{name}` and each version body — the stored profile
|
|
@@ -21,24 +21,27 @@ export declare const settingsProfileList: z.ZodArray<z.ZodObject<{
|
|
|
21
21
|
* per-profile secret-marks band folded into the secret-mask union for masking.
|
|
22
22
|
*/
|
|
23
23
|
export declare const settingsProfileBody: z.ZodObject<{
|
|
24
|
-
description: z.ZodString
|
|
25
|
-
env: z.ZodRecord<z.ZodString, z.ZodString
|
|
26
|
-
secret_keys: z.ZodArray<z.ZodString
|
|
24
|
+
description: z.ZodDefault<z.ZodString>;
|
|
25
|
+
env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
26
|
+
secret_keys: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
27
27
|
}, z.core.$strip>;
|
|
28
28
|
export type SettingsProfileBody = z.infer<typeof settingsProfileBody>;
|
|
29
29
|
/** `PUT /api/config/profiles/{name}` — a minimal save ack; `version` is the new store version. */
|
|
30
30
|
export declare const settingsProfileSaved: z.ZodObject<{
|
|
31
|
-
ok: z.
|
|
32
|
-
version: z.
|
|
31
|
+
ok: z.ZodBoolean;
|
|
32
|
+
version: z.ZodNumber;
|
|
33
33
|
}, z.core.$strip>;
|
|
34
34
|
export type SettingsProfileSaved = z.infer<typeof settingsProfileSaved>;
|
|
35
35
|
/** `DELETE /api/config/profiles/{name}` — a minimal removal ack. */
|
|
36
36
|
export declare const settingsProfileDeleted: z.ZodObject<{
|
|
37
|
-
ok: z.
|
|
37
|
+
ok: z.ZodBoolean;
|
|
38
38
|
}, z.core.$strip>;
|
|
39
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* `POST /api/config/profiles/{name}/rollback` — the restore ack; `version` is the resulting
|
|
41
|
+
* active version.
|
|
42
|
+
*/
|
|
40
43
|
export declare const settingsProfileRollback: z.ZodObject<{
|
|
41
|
-
ok: z.
|
|
44
|
+
ok: z.ZodBoolean;
|
|
42
45
|
version: z.ZodNumber;
|
|
43
46
|
}, z.core.$strip>;
|
|
44
47
|
export type SettingsProfileRollback = z.infer<typeof settingsProfileRollback>;
|
|
@@ -50,14 +53,14 @@ export type SettingsProfileRollback = z.infer<typeof settingsProfileRollback>;
|
|
|
50
53
|
*/
|
|
51
54
|
export declare const settingsProfileDiff: z.ZodObject<{
|
|
52
55
|
added: z.ZodArray<z.ZodString>;
|
|
53
|
-
removed: z.ZodArray<z.ZodString>;
|
|
54
56
|
changed: z.ZodArray<z.ZodObject<{
|
|
55
57
|
key: z.ZodString;
|
|
56
|
-
old: z.ZodString;
|
|
57
58
|
new: z.ZodString;
|
|
59
|
+
old: z.ZodString;
|
|
58
60
|
}, z.core.$strip>>;
|
|
59
61
|
recycle_keys: z.ZodArray<z.ZodString>;
|
|
60
62
|
refused_keys: z.ZodArray<z.ZodString>;
|
|
63
|
+
removed: z.ZodArray<z.ZodString>;
|
|
61
64
|
}, z.core.$strip>;
|
|
62
65
|
export type SettingsProfileDiff = z.infer<typeof settingsProfileDiff>;
|
|
63
66
|
/**
|
|
@@ -69,75 +72,84 @@ export type SettingsProfileDiff = z.infer<typeof settingsProfileDiff>;
|
|
|
69
72
|
* the `self-deferred` status literal when the diff has serve-affecting recycle keys;
|
|
70
73
|
* `fresh` is the per-kind list of NEW ready lives observed since the pre-apply snapshot
|
|
71
74
|
* (each `{name, kind, generation}`), evidence of fresh capacity and never claimed as any
|
|
72
|
-
* target's successor; `refused` is `[]` on success by construction (
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
75
|
+
* target's successor; `refused` is `[]` on success by construction (the refused key
|
|
76
|
+
* names only on a refusal), the populated refusal surfaces being the diff preview and
|
|
77
|
+
* the refusal error report; `recycle_stopped` names the target a stopped recycle roll
|
|
78
|
+
* halted at, or is `null` when the roll ran to its end; `awaiting_respawn` names the
|
|
79
|
+
* workers (name + keys) still awaiting a respawn after the apply (empty when the roll
|
|
80
|
+
* converged). `fanout` is the mode-wrapped fleet broadcast, parsed EXPLICITLY so a failed
|
|
81
|
+
* propagation reaches the shared fleet-report handler. A drift throws `ApiSchemaError`.
|
|
77
82
|
*/
|
|
78
83
|
export declare const profileApplyResponse: z.ZodObject<{
|
|
84
|
+
awaiting_respawn: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
85
|
+
keys: z.ZodArray<z.ZodString>;
|
|
86
|
+
name: z.ZodString;
|
|
87
|
+
}, z.core.$strip>>>;
|
|
88
|
+
fresh: z.ZodArray<z.ZodObject<{
|
|
89
|
+
generation: z.ZodNumber;
|
|
90
|
+
kind: z.ZodString;
|
|
91
|
+
name: z.ZodString;
|
|
92
|
+
}, z.core.$strip>>;
|
|
79
93
|
hot: z.ZodArray<z.ZodString>;
|
|
80
94
|
recycle: z.ZodArray<z.ZodObject<{
|
|
81
|
-
|
|
95
|
+
detail: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
96
|
+
generation_before: z.ZodNumber;
|
|
82
97
|
kind: z.ZodString;
|
|
98
|
+
name: z.ZodString;
|
|
83
99
|
status: z.ZodString;
|
|
84
|
-
generation_before: z.ZodNumber;
|
|
85
100
|
}, z.core.$strip>>;
|
|
86
|
-
|
|
87
|
-
|
|
101
|
+
recycle_stopped: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
102
|
+
detail: z.ZodString;
|
|
88
103
|
kind: z.ZodString;
|
|
89
|
-
|
|
90
|
-
}, z.core.$strip
|
|
91
|
-
refused: z.ZodArray<z.
|
|
92
|
-
key: z.ZodString;
|
|
93
|
-
reason: z.ZodString;
|
|
94
|
-
}, z.core.$strip>>;
|
|
104
|
+
name: z.ZodNullable<z.ZodString>;
|
|
105
|
+
}, z.core.$strip>>>;
|
|
106
|
+
refused: z.ZodArray<z.ZodString>;
|
|
95
107
|
fanout: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
96
108
|
mode: z.ZodLiteral<"local-only">;
|
|
97
109
|
note: z.ZodString;
|
|
98
110
|
}, z.core.$strip>, z.ZodObject<{
|
|
111
|
+
error: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
112
|
+
local_only: z.ZodDefault<z.ZodBoolean>;
|
|
99
113
|
op: z.ZodString;
|
|
100
|
-
reachable: z.ZodBoolean
|
|
101
|
-
|
|
102
|
-
|
|
114
|
+
reachable: z.ZodDefault<z.ZodBoolean>;
|
|
115
|
+
results: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
116
|
+
detail: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
117
|
+
error: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
103
118
|
name: z.ZodString;
|
|
104
119
|
outcome: z.ZodEnum<{
|
|
105
|
-
failed: "failed";
|
|
106
120
|
applied: "applied";
|
|
107
|
-
|
|
108
|
-
recycling: "recycling";
|
|
109
|
-
stale: "stale";
|
|
121
|
+
failed: "failed";
|
|
110
122
|
missing: "missing";
|
|
111
123
|
departed: "departed";
|
|
112
124
|
timed_out: "timed_out";
|
|
125
|
+
resyncing: "resyncing";
|
|
126
|
+
recycling: "recycling";
|
|
127
|
+
stale: "stale";
|
|
113
128
|
}>;
|
|
114
|
-
payload: z.
|
|
115
|
-
|
|
116
|
-
detail: z.ZodNullable<z.ZodString>;
|
|
117
|
-
}, z.core.$strip>>;
|
|
118
|
-
error: z.ZodNullable<z.ZodString>;
|
|
129
|
+
payload: z.ZodDefault<z.ZodNullable<z.ZodUnknown>>;
|
|
130
|
+
}, z.core.$strip>>>;
|
|
119
131
|
mode: z.ZodLiteral<"fleet">;
|
|
120
132
|
}, z.core.$strip>, z.ZodObject<{
|
|
133
|
+
error: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
134
|
+
local_only: z.ZodDefault<z.ZodBoolean>;
|
|
121
135
|
op: z.ZodString;
|
|
122
|
-
reachable: z.ZodBoolean
|
|
123
|
-
|
|
124
|
-
|
|
136
|
+
reachable: z.ZodDefault<z.ZodBoolean>;
|
|
137
|
+
results: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
138
|
+
detail: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
139
|
+
error: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
125
140
|
name: z.ZodString;
|
|
126
141
|
outcome: z.ZodEnum<{
|
|
127
|
-
failed: "failed";
|
|
128
142
|
applied: "applied";
|
|
129
|
-
|
|
130
|
-
recycling: "recycling";
|
|
131
|
-
stale: "stale";
|
|
143
|
+
failed: "failed";
|
|
132
144
|
missing: "missing";
|
|
133
145
|
departed: "departed";
|
|
134
146
|
timed_out: "timed_out";
|
|
147
|
+
resyncing: "resyncing";
|
|
148
|
+
recycling: "recycling";
|
|
149
|
+
stale: "stale";
|
|
135
150
|
}>;
|
|
136
|
-
payload: z.
|
|
137
|
-
|
|
138
|
-
detail: z.ZodNullable<z.ZodString>;
|
|
139
|
-
}, z.core.$strip>>;
|
|
140
|
-
error: z.ZodNullable<z.ZodString>;
|
|
151
|
+
payload: z.ZodDefault<z.ZodNullable<z.ZodUnknown>>;
|
|
152
|
+
}, z.core.$strip>>>;
|
|
141
153
|
mode: z.ZodLiteral<"unreachable">;
|
|
142
154
|
}, z.core.$strip>], "mode">;
|
|
143
155
|
}, z.core.$strip>;
|
|
@@ -148,17 +160,17 @@ export type ProfileApplyResponse = z.infer<typeof profileApplyResponse>;
|
|
|
148
160
|
* active pointer.
|
|
149
161
|
*/
|
|
150
162
|
export declare const settingsProfileVersionMeta: z.ZodObject<{
|
|
151
|
-
version: z.ZodNumber;
|
|
152
|
-
tags: z.ZodArray<z.ZodString>;
|
|
153
163
|
created_at: z.ZodString;
|
|
154
164
|
is_current: z.ZodBoolean;
|
|
165
|
+
tags: z.ZodArray<z.ZodString>;
|
|
166
|
+
version: z.ZodNumber;
|
|
155
167
|
}, z.core.$strip>;
|
|
156
168
|
export type SettingsProfileVersionMeta = z.infer<typeof settingsProfileVersionMeta>;
|
|
157
169
|
export declare const settingsProfileVersionList: z.ZodArray<z.ZodObject<{
|
|
158
|
-
version: z.ZodNumber;
|
|
159
|
-
tags: z.ZodArray<z.ZodString>;
|
|
160
170
|
created_at: z.ZodString;
|
|
161
171
|
is_current: z.ZodBoolean;
|
|
172
|
+
tags: z.ZodArray<z.ZodString>;
|
|
173
|
+
version: z.ZodNumber;
|
|
162
174
|
}, z.core.$strip>>;
|
|
163
175
|
/**
|
|
164
176
|
* `GET /api/config/profiles/{name}/versions/{version}` — one immutable version WITH
|
|
@@ -166,15 +178,15 @@ export declare const settingsProfileVersionList: z.ZodArray<z.ZodObject<{
|
|
|
166
178
|
* versioned-store row shape.
|
|
167
179
|
*/
|
|
168
180
|
export declare const settingsProfileVersion: z.ZodObject<{
|
|
169
|
-
version: z.ZodNumber;
|
|
170
|
-
tags: z.ZodArray<z.ZodString>;
|
|
171
|
-
created_at: z.ZodString;
|
|
172
|
-
is_current: z.ZodBoolean;
|
|
173
181
|
body: z.ZodObject<{
|
|
174
|
-
description: z.ZodString
|
|
175
|
-
env: z.ZodRecord<z.ZodString, z.ZodString
|
|
176
|
-
secret_keys: z.ZodArray<z.ZodString
|
|
182
|
+
description: z.ZodDefault<z.ZodString>;
|
|
183
|
+
env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
184
|
+
secret_keys: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
177
185
|
}, z.core.$strip>;
|
|
186
|
+
created_at: z.ZodString;
|
|
187
|
+
is_current: z.ZodBoolean;
|
|
188
|
+
tags: z.ZodArray<z.ZodString>;
|
|
189
|
+
version: z.ZodNumber;
|
|
178
190
|
}, z.core.$strip>;
|
|
179
191
|
export type SettingsProfileVersion = z.infer<typeof settingsProfileVersion>;
|
|
180
192
|
//# sourceMappingURL=profiles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../../src/schemas/profiles.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../../src/schemas/profiles.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAS7B;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;;;iBAAyB,CAAC;AAC7D,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAC5E,eAAO,MAAM,mBAAmB;;;kBAA8B,CAAC;AAE/D;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;;;;iBAA8B,CAAC;AAC/D,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE,kGAAkG;AAClG,eAAO,MAAM,oBAAoB;;;iBAA6B,CAAC;AAC/D,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE,oEAAoE;AACpE,eAAO,MAAM,sBAAsB;;iBAAmB,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;;iBAA6B,CAAC;AAClE,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE9E;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;iBAAsB,CAAC;AACvD,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE;;;;;;;;;;;;;;;;GAgBG;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE/B,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE;;;;GAIG;AACH,eAAO,MAAM,0BAA0B;;;;;iBAAgC,CAAC;AACxE,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AACpF,eAAO,MAAM,0BAA0B;;;;;kBAAqC,CAAC;AAE7E;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;iBAA6B,CAAC;AACjE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
package/dist/schemas/profiles.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { z } from 'zod';
|
|
1
|
+
import * as openapi from '../generated/openapi-schemas';
|
|
3
2
|
import { fleetReportFanout } from './fleet';
|
|
4
3
|
// The admin-only `/api/config/profiles/*` surface. Secrets ride the wire in the
|
|
5
4
|
// clear (secret/fenced routes); masking is CLIENT-SIDE per the secret-mask union. A drift
|
|
@@ -10,46 +9,30 @@ import { fleetReportFanout } from './fleet';
|
|
|
10
9
|
* (No `last_modified`: the list carries identity, not history — version metadata
|
|
11
10
|
* is the `/versions` surface — so the list renders no last-modified column.)
|
|
12
11
|
*/
|
|
13
|
-
export const settingsProfileSummary =
|
|
14
|
-
|
|
15
|
-
description: z.string(),
|
|
16
|
-
});
|
|
17
|
-
export const settingsProfileList = z.array(settingsProfileSummary);
|
|
12
|
+
export const settingsProfileSummary = openapi.profileSummary;
|
|
13
|
+
export const settingsProfileList = openapi.profileListResponse;
|
|
18
14
|
/**
|
|
19
15
|
* `GET /api/config/profiles/{name}` and each version body — the stored profile
|
|
20
16
|
* document (action=secret). `env` carries REAL values; `secret_keys` is the
|
|
21
17
|
* per-profile secret-marks band folded into the secret-mask union for masking.
|
|
22
18
|
*/
|
|
23
|
-
export const settingsProfileBody =
|
|
24
|
-
description: z.string(),
|
|
25
|
-
env: z.record(z.string(), z.string()),
|
|
26
|
-
secret_keys: z.array(z.string()),
|
|
27
|
-
});
|
|
19
|
+
export const settingsProfileBody = openapi.settingsProfileBody;
|
|
28
20
|
/** `PUT /api/config/profiles/{name}` — a minimal save ack; `version` is the new store version. */
|
|
29
|
-
export const settingsProfileSaved =
|
|
30
|
-
ok: z.literal(true),
|
|
31
|
-
version: z.number().optional(),
|
|
32
|
-
});
|
|
21
|
+
export const settingsProfileSaved = openapi.profileWriteResult;
|
|
33
22
|
/** `DELETE /api/config/profiles/{name}` — a minimal removal ack. */
|
|
34
|
-
export const settingsProfileDeleted =
|
|
35
|
-
/**
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
23
|
+
export const settingsProfileDeleted = openapi.okResult;
|
|
24
|
+
/**
|
|
25
|
+
* `POST /api/config/profiles/{name}/rollback` — the restore ack; `version` is the resulting
|
|
26
|
+
* active version.
|
|
27
|
+
*/
|
|
28
|
+
export const settingsProfileRollback = openapi.profileWriteResult;
|
|
40
29
|
/**
|
|
41
30
|
* `POST /api/config/profiles/{name}/diff` — the SAVED profile vs the stored env
|
|
42
31
|
* (action=secret). `changed` carries real `old`/`new` values (UI masks via
|
|
43
32
|
* JsonDiff); `recycle_keys`/`refused_keys` are the diff's recycle-class and
|
|
44
33
|
* boundary-refused key names, called out in the UI before apply.
|
|
45
34
|
*/
|
|
46
|
-
export const settingsProfileDiff =
|
|
47
|
-
added: z.array(z.string()),
|
|
48
|
-
removed: z.array(z.string()),
|
|
49
|
-
changed: z.array(z.object({ key: z.string(), old: z.string(), new: z.string() })),
|
|
50
|
-
recycle_keys: z.array(z.string()),
|
|
51
|
-
refused_keys: z.array(z.string()),
|
|
52
|
-
});
|
|
35
|
+
export const settingsProfileDiff = openapi.profileDiff;
|
|
53
36
|
/**
|
|
54
37
|
* `POST /api/config/profiles/{name}/apply` — the dedicated `profile_apply_response`
|
|
55
38
|
* (action=fenced, destructive). NAMES-ONLY (no env value in any
|
|
@@ -59,22 +42,16 @@ export const settingsProfileDiff = z.object({
|
|
|
59
42
|
* the `self-deferred` status literal when the diff has serve-affecting recycle keys;
|
|
60
43
|
* `fresh` is the per-kind list of NEW ready lives observed since the pre-apply snapshot
|
|
61
44
|
* (each `{name, kind, generation}`), evidence of fresh capacity and never claimed as any
|
|
62
|
-
* target's successor; `refused` is `[]` on success by construction (
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
45
|
+
* target's successor; `refused` is `[]` on success by construction (the refused key
|
|
46
|
+
* names only on a refusal), the populated refusal surfaces being the diff preview and
|
|
47
|
+
* the refusal error report; `recycle_stopped` names the target a stopped recycle roll
|
|
48
|
+
* halted at, or is `null` when the roll ran to its end; `awaiting_respawn` names the
|
|
49
|
+
* workers (name + keys) still awaiting a respawn after the apply (empty when the roll
|
|
50
|
+
* converged). `fanout` is the mode-wrapped fleet broadcast, parsed EXPLICITLY so a failed
|
|
51
|
+
* propagation reaches the shared fleet-report handler. A drift throws `ApiSchemaError`.
|
|
67
52
|
*/
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
recycle: z.array(z.object({
|
|
71
|
-
name: z.string(),
|
|
72
|
-
kind: z.string(),
|
|
73
|
-
status: z.string(),
|
|
74
|
-
generation_before: z.number(),
|
|
75
|
-
})),
|
|
76
|
-
fresh: z.array(z.object({ name: z.string(), kind: z.string(), generation: z.number() })),
|
|
77
|
-
refused: z.array(z.object({ key: z.string(), reason: z.string() })),
|
|
53
|
+
// The fan-out is hand-typed: the spec publishes it as one object with optional fields.
|
|
54
|
+
export const profileApplyResponse = openapi.profileApplyResponse.extend({
|
|
78
55
|
fanout: fleetReportFanout,
|
|
79
56
|
});
|
|
80
57
|
/**
|
|
@@ -82,19 +59,12 @@ export const profileApplyResponse = z.object({
|
|
|
82
59
|
* no bodies), the generic versioned-store row minus `body`. `is_current` flags the
|
|
83
60
|
* active pointer.
|
|
84
61
|
*/
|
|
85
|
-
export const settingsProfileVersionMeta =
|
|
86
|
-
|
|
87
|
-
tags: z.array(z.string()),
|
|
88
|
-
created_at: z.string(),
|
|
89
|
-
is_current: z.boolean(),
|
|
90
|
-
});
|
|
91
|
-
export const settingsProfileVersionList = z.array(settingsProfileVersionMeta);
|
|
62
|
+
export const settingsProfileVersionMeta = openapi.profileVersionSummary;
|
|
63
|
+
export const settingsProfileVersionList = openapi.profileVersionListResponse;
|
|
92
64
|
/**
|
|
93
65
|
* `GET /api/config/profiles/{name}/versions/{version}` — one immutable version WITH
|
|
94
66
|
* its `body` (action=secret; body rendered masked per the secret-mask union). The generic
|
|
95
67
|
* versioned-store row shape.
|
|
96
68
|
*/
|
|
97
|
-
export const settingsProfileVersion =
|
|
98
|
-
body: settingsProfileBody,
|
|
99
|
-
});
|
|
69
|
+
export const settingsProfileVersion = openapi.profileVersionView;
|
|
100
70
|
//# sourceMappingURL=profiles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../src/schemas/profiles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../src/schemas/profiles.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,OAAO,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,gFAAgF;AAChF,0FAA0F;AAC1F,2CAA2C;AAE3C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,OAAO,CAAC,cAAc,CAAC;AAE7D,MAAM,CAAC,MAAM,mBAAmB,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAE/D;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,OAAO,CAAC,mBAAmB,CAAC;AAG/D,kGAAkG;AAClG,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CAAC,kBAAkB,CAAC;AAG/D,oEAAoE;AACpE,MAAM,CAAC,MAAM,sBAAsB,GAAG,OAAO,CAAC,QAAQ,CAAC;AAEvD;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,OAAO,CAAC,kBAAkB,CAAC;AAGlE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,OAAO,CAAC,WAAW,CAAC;AAGvD;;;;;;;;;;;;;;;;GAgBG;AACH,uFAAuF;AACvF,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC,MAAM,CAAC;IACtE,MAAM,EAAE,iBAAiB;CAC1B,CAAC,CAAC;AAGH;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,OAAO,CAAC,qBAAqB,CAAC;AAExE,MAAM,CAAC,MAAM,0BAA0B,GAAG,OAAO,CAAC,0BAA0B,CAAC;AAE7E;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,OAAO,CAAC,kBAAkB,CAAC"}
|
package/dist/schemas/roles.d.ts
CHANGED
|
@@ -16,12 +16,12 @@ export declare const roleGrants: z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
|
16
16
|
export type RoleGrants = z.infer<typeof roleGrants>;
|
|
17
17
|
export declare const roleList: z.ZodArray<z.ZodObject<{
|
|
18
18
|
allow_all: z.ZodDefault<z.ZodBoolean>;
|
|
19
|
-
base_tier: z.ZodDefault<z.
|
|
20
|
-
condition: z.ZodDefault<z.
|
|
19
|
+
base_tier: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
20
|
+
condition: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
21
21
|
content: z.ZodOptional<z.ZodString>;
|
|
22
22
|
id: z.ZodOptional<z.ZodString>;
|
|
23
23
|
kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
24
|
-
}, z.core.$strict
|
|
24
|
+
}, z.core.$strict>>>;
|
|
25
25
|
description: z.ZodString;
|
|
26
26
|
grants: z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
27
27
|
none: "none";
|
|
@@ -33,8 +33,8 @@ export declare const roleList: z.ZodArray<z.ZodObject<{
|
|
|
33
33
|
}, z.core.$strip>>;
|
|
34
34
|
/** `DELETE /api/auth/roles/{name}` — the deleted role's name. */
|
|
35
35
|
export declare const roleDeleted: z.ZodObject<{
|
|
36
|
-
name: z.ZodString;
|
|
37
36
|
deleted: z.ZodBoolean;
|
|
37
|
+
name: z.ZodString;
|
|
38
38
|
}, z.core.$strip>;
|
|
39
39
|
/**
|
|
40
40
|
* One immutable role-version row (`GET /api/auth/roles/{name}/versions` →
|
|
@@ -42,15 +42,18 @@ export declare const roleDeleted: z.ZodObject<{
|
|
|
42
42
|
* active pointer. Mirrors the generic versioned-store row shape.
|
|
43
43
|
*/
|
|
44
44
|
export declare const roleVersion: z.ZodObject<{
|
|
45
|
+
created_at: z.ZodString;
|
|
46
|
+
is_current: z.ZodDefault<z.ZodBoolean>;
|
|
47
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
45
48
|
version: z.ZodNumber;
|
|
46
49
|
body: z.ZodObject<{
|
|
47
50
|
allow_all: z.ZodDefault<z.ZodBoolean>;
|
|
48
|
-
base_tier: z.ZodDefault<z.
|
|
49
|
-
condition: z.ZodDefault<z.
|
|
51
|
+
base_tier: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
52
|
+
condition: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
50
53
|
content: z.ZodOptional<z.ZodString>;
|
|
51
54
|
id: z.ZodOptional<z.ZodString>;
|
|
52
55
|
kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
53
|
-
}, z.core.$strict
|
|
56
|
+
}, z.core.$strict>>>;
|
|
54
57
|
description: z.ZodString;
|
|
55
58
|
grants: z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
56
59
|
none: "none";
|
|
@@ -60,9 +63,6 @@ export declare const roleVersion: z.ZodObject<{
|
|
|
60
63
|
name: z.ZodString;
|
|
61
64
|
scopes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
62
65
|
}, z.core.$strip>;
|
|
63
|
-
tags: z.ZodArray<z.ZodString>;
|
|
64
|
-
created_at: z.ZodString;
|
|
65
|
-
is_current: z.ZodBoolean;
|
|
66
66
|
}, z.core.$strip>;
|
|
67
67
|
export type RoleVersion = z.infer<typeof roleVersion>;
|
|
68
68
|
/**
|
|
@@ -71,6 +71,9 @@ export type RoleVersion = z.infer<typeof roleVersion>;
|
|
|
71
71
|
* role bodies (both `null` for a create's `before` / a delete's `after`).
|
|
72
72
|
*/
|
|
73
73
|
export declare const roleAuditEvent: z.ZodObject<{
|
|
74
|
+
created_at: z.ZodString;
|
|
75
|
+
is_current: z.ZodDefault<z.ZodBoolean>;
|
|
76
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
74
77
|
version: z.ZodNumber;
|
|
75
78
|
body: z.ZodObject<{
|
|
76
79
|
action: z.ZodString;
|
|
@@ -78,23 +81,23 @@ export declare const roleAuditEvent: z.ZodObject<{
|
|
|
78
81
|
before: z.ZodNullable<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
79
82
|
after: z.ZodNullable<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
80
83
|
}, z.core.$strip>;
|
|
81
|
-
tags: z.ZodArray<z.ZodString>;
|
|
82
|
-
created_at: z.ZodString;
|
|
83
|
-
is_current: z.ZodBoolean;
|
|
84
84
|
}, z.core.$strip>;
|
|
85
85
|
export type RoleAuditEvent = z.infer<typeof roleAuditEvent>;
|
|
86
86
|
/** `GET /api/auth/roles/{name}/versions` — the append-only history + audit trail. */
|
|
87
87
|
export declare const roleVersions: z.ZodObject<{
|
|
88
88
|
versions: z.ZodArray<z.ZodObject<{
|
|
89
|
+
created_at: z.ZodString;
|
|
90
|
+
is_current: z.ZodDefault<z.ZodBoolean>;
|
|
91
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
89
92
|
version: z.ZodNumber;
|
|
90
93
|
body: z.ZodObject<{
|
|
91
94
|
allow_all: z.ZodDefault<z.ZodBoolean>;
|
|
92
|
-
base_tier: z.ZodDefault<z.
|
|
93
|
-
condition: z.ZodDefault<z.
|
|
95
|
+
base_tier: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
96
|
+
condition: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
94
97
|
content: z.ZodOptional<z.ZodString>;
|
|
95
98
|
id: z.ZodOptional<z.ZodString>;
|
|
96
99
|
kwargs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
97
|
-
}, z.core.$strict
|
|
100
|
+
}, z.core.$strict>>>;
|
|
98
101
|
description: z.ZodString;
|
|
99
102
|
grants: z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
100
103
|
none: "none";
|
|
@@ -104,11 +107,11 @@ export declare const roleVersions: z.ZodObject<{
|
|
|
104
107
|
name: z.ZodString;
|
|
105
108
|
scopes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
106
109
|
}, z.core.$strip>;
|
|
107
|
-
tags: z.ZodArray<z.ZodString>;
|
|
108
|
-
created_at: z.ZodString;
|
|
109
|
-
is_current: z.ZodBoolean;
|
|
110
110
|
}, z.core.$strip>>;
|
|
111
111
|
audit: z.ZodArray<z.ZodObject<{
|
|
112
|
+
created_at: z.ZodString;
|
|
113
|
+
is_current: z.ZodDefault<z.ZodBoolean>;
|
|
114
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
112
115
|
version: z.ZodNumber;
|
|
113
116
|
body: z.ZodObject<{
|
|
114
117
|
action: z.ZodString;
|
|
@@ -116,9 +119,6 @@ export declare const roleVersions: z.ZodObject<{
|
|
|
116
119
|
before: z.ZodNullable<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
117
120
|
after: z.ZodNullable<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
118
121
|
}, z.core.$strip>;
|
|
119
|
-
tags: z.ZodArray<z.ZodString>;
|
|
120
|
-
created_at: z.ZodString;
|
|
121
|
-
is_current: z.ZodBoolean;
|
|
122
122
|
}, z.core.$strip>>;
|
|
123
123
|
}, z.core.$strip>;
|
|
124
124
|
export type RoleVersions = z.infer<typeof roleVersions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roles.d.ts","sourceRoot":"","sources":["../../src/schemas/roles.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"roles.d.ts","sourceRoot":"","sources":["../../src/schemas/roles.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,6EAA6E;AAC7E,eAAO,MAAM,UAAU;;;;EAAkC,CAAC;AAC1D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,qFAAqF;AACrF,eAAO,MAAM,UAAU;;;;GAAwB,CAAC;AAChD,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;kBAA6B,CAAC;AAEnD,iEAAiE;AACjE,eAAO,MAAM,WAAW;;;iBAAsB,CAAC;AAK/C;;;;GAIG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;iBAAqD,CAAC;AAC9E,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtD;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;iBAOzB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,qFAAqF;AACrF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGvB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
package/dist/schemas/roles.js
CHANGED
|
@@ -1,45 +1,38 @@
|
|
|
1
1
|
/** Role grant, version and audit response schemas. */
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
+
import * as openapi from '../generated/openapi-schemas';
|
|
3
4
|
import { roleBody } from './served';
|
|
4
5
|
import { jsonValue } from './shared';
|
|
5
6
|
/** A role's per-tag ACCESS LEVEL: `none` (no access), `read`, or `write`. */
|
|
6
|
-
export const grantLevel =
|
|
7
|
+
export const grantLevel = roleBody.shape.grants.valueType;
|
|
7
8
|
/** A role's editable grant map: feature-group TAG name → the role's access level. */
|
|
8
|
-
export const roleGrants =
|
|
9
|
-
export const roleList =
|
|
9
|
+
export const roleGrants = roleBody.shape.grants;
|
|
10
|
+
export const roleList = openapi.roleDefinitionList;
|
|
10
11
|
/** `DELETE /api/auth/roles/{name}` — the deleted role's name. */
|
|
11
|
-
export const roleDeleted =
|
|
12
|
+
export const roleDeleted = openapi.roleDeleted;
|
|
13
|
+
// The version and audit bodies are hand-typed: the spec publishes a version body as an open
|
|
14
|
+
// object.
|
|
12
15
|
/**
|
|
13
16
|
* One immutable role-version row (`GET /api/auth/roles/{name}/versions` →
|
|
14
17
|
* `versions`). `body` is the role body at that version; `is_current` flags the
|
|
15
18
|
* active pointer. Mirrors the generic versioned-store row shape.
|
|
16
19
|
*/
|
|
17
|
-
export const roleVersion =
|
|
18
|
-
version: z.number(),
|
|
19
|
-
body: roleBody,
|
|
20
|
-
tags: z.array(z.string()),
|
|
21
|
-
created_at: z.string(),
|
|
22
|
-
is_current: z.boolean(),
|
|
23
|
-
});
|
|
20
|
+
export const roleVersion = openapi.documentVersion.extend({ body: roleBody });
|
|
24
21
|
/**
|
|
25
22
|
* One who/action/before→after audit row (`GET /api/auth/roles/{name}/versions` →
|
|
26
23
|
* `audit`). Its `body` carries the mutation kind, the actor, and the before/after
|
|
27
24
|
* role bodies (both `null` for a create's `before` / a delete's `after`).
|
|
28
25
|
*/
|
|
29
|
-
export const roleAuditEvent =
|
|
30
|
-
version: z.number(),
|
|
26
|
+
export const roleAuditEvent = openapi.documentVersion.extend({
|
|
31
27
|
body: z.object({
|
|
32
28
|
action: z.string(),
|
|
33
29
|
actor: z.string().nullable(),
|
|
34
30
|
before: jsonValue.nullable(),
|
|
35
31
|
after: jsonValue.nullable(),
|
|
36
32
|
}),
|
|
37
|
-
tags: z.array(z.string()),
|
|
38
|
-
created_at: z.string(),
|
|
39
|
-
is_current: z.boolean(),
|
|
40
33
|
});
|
|
41
34
|
/** `GET /api/auth/roles/{name}/versions` — the append-only history + audit trail. */
|
|
42
|
-
export const roleVersions =
|
|
35
|
+
export const roleVersions = openapi.roleVersionsView.extend({
|
|
43
36
|
versions: z.array(roleVersion),
|
|
44
37
|
audit: z.array(roleAuditEvent),
|
|
45
38
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roles.js","sourceRoot":"","sources":["../../src/schemas/roles.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,6EAA6E;AAC7E,MAAM,CAAC,MAAM,UAAU,GAAG,
|
|
1
|
+
{"version":3,"file":"roles.js","sourceRoot":"","sources":["../../src/schemas/roles.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,OAAO,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,6EAA6E;AAC7E,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC;AAG1D,qFAAqF;AACrF,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC;AAGhD,MAAM,CAAC,MAAM,QAAQ,GAAG,OAAO,CAAC,kBAAkB,CAAC;AAEnD,iEAAiE;AACjE,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;AAE/C,4FAA4F;AAC5F,UAAU;AAEV;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;AAG9E;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC;IAC3D,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QACb,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;QAClB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC5B,MAAM,EAAE,SAAS,CAAC,QAAQ,EAAE;QAC5B,KAAK,EAAE,SAAS,CAAC,QAAQ,EAAE;KAC5B,CAAC;CACH,CAAC,CAAC;AAGH,qFAAqF;AACrF,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC;IAC1D,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC;IAC9B,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC;CAC/B,CAAC,CAAC"}
|