@spacefast/common 0.2.1 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/marketplace-prompts.d.ts +1 -0
- package/dist/agents/marketplace-prompts.js +6 -0
- package/dist/agents/registry/core.d.ts +4 -12
- package/dist/agents/registry/core.js +7 -28
- package/dist/config/domains.d.ts +10 -8
- package/dist/config/domains.js +4 -7
- package/dist/contracts/access-core.d.ts +135 -0
- package/dist/contracts/access-core.js +242 -0
- package/dist/contracts/access-profiles.d.ts +8 -8
- package/dist/contracts/access-profiles.js +8 -8
- package/dist/contracts/access.d.ts +14 -103
- package/dist/contracts/access.js +10 -210
- package/dist/contracts/activity.d.ts +54 -55
- package/dist/contracts/activity.js +38 -9
- package/dist/contracts/api-keys.d.ts +69 -26
- package/dist/contracts/api-keys.js +29 -2
- package/dist/contracts/application-journal.d.ts +197 -4
- package/dist/contracts/application-journal.js +97 -16
- package/dist/contracts/auth.d.ts +20 -0
- package/dist/contracts/auth.js +18 -0
- package/dist/contracts/beta.d.ts +13 -0
- package/dist/contracts/beta.js +28 -0
- package/dist/contracts/billing.d.ts +2 -2
- package/dist/contracts/bootstrap.d.ts +23 -6
- package/dist/contracts/builds.d.ts +24 -4
- package/dist/contracts/builds.js +16 -4
- package/dist/contracts/channels.d.ts +43 -0
- package/dist/contracts/channels.js +22 -6
- package/dist/contracts/comments.d.ts +49 -0
- package/dist/contracts/comments.js +61 -2
- package/dist/contracts/commerce.d.ts +19 -13
- package/dist/contracts/connector-access.d.ts +28 -0
- package/dist/contracts/connector-access.js +31 -0
- package/dist/contracts/connectors.d.ts +2382 -0
- package/dist/contracts/connectors.js +941 -0
- package/dist/contracts/content-contract-verification.d.ts +112 -58
- package/dist/contracts/content-contract-verification.js +42 -54
- package/dist/contracts/content-model-emit.d.ts +97 -0
- package/dist/contracts/content-model-emit.js +306 -0
- package/dist/contracts/content-model-sdk.d.ts +101 -0
- package/dist/contracts/content-model-sdk.js +232 -0
- package/dist/contracts/{content-program.d.ts → content-model.d.ts} +338 -82
- package/dist/contracts/{content-program.js → content-model.js} +291 -63
- package/dist/contracts/content-platform-fixture.d.ts +380 -110
- package/dist/contracts/content-platform-fixture.js +8 -8
- package/dist/contracts/content-sync.d.ts +197 -74
- package/dist/contracts/content-sync.js +98 -37
- package/dist/contracts/content.d.ts +30 -422
- package/dist/contracts/content.js +34 -294
- package/dist/contracts/dashboard-prefs.d.ts +10 -3
- package/dist/contracts/dashboard-prefs.js +6 -3
- package/dist/contracts/data-location.d.ts +9 -0
- package/dist/contracts/data-location.js +7 -0
- package/dist/contracts/deployment-comparison.d.ts +67 -0
- package/dist/contracts/deployment-comparison.js +68 -0
- package/dist/contracts/device-auth.d.ts +55 -11
- package/dist/contracts/domains.d.ts +40 -16
- package/dist/contracts/domains.js +23 -0
- package/dist/contracts/enums.d.ts +1 -10
- package/dist/contracts/enums.js +0 -15
- package/dist/contracts/error-code-meta.d.ts +388 -20
- package/dist/contracts/error-code-meta.js +201 -5
- package/dist/contracts/error-codes.d.ts +17 -4
- package/dist/contracts/error-codes.js +109 -10
- package/dist/contracts/events.d.ts +5 -0
- package/dist/contracts/events.js +12 -3
- package/dist/contracts/execution.d.ts +5 -1
- package/dist/contracts/execution.js +4 -0
- package/dist/contracts/feature-lifecycle.d.ts +53 -20
- package/dist/contracts/feature-lifecycle.js +65 -23
- package/dist/contracts/features.d.ts +57 -31
- package/dist/contracts/features.js +0 -1
- package/dist/contracts/feedback.d.ts +124 -0
- package/dist/contracts/feedback.js +64 -0
- package/dist/contracts/fixtures/content-model-sdk-v1.generated.d.ts +129 -0
- package/dist/contracts/fixtures/content-model-sdk-v1.generated.js +48 -0
- package/dist/contracts/fixtures/content-platform-v1.json +101 -49
- package/dist/contracts/frame-session.d.ts +60 -10
- package/dist/contracts/frame-session.js +52 -12
- package/dist/contracts/functions.d.ts +28 -2
- package/dist/contracts/functions.js +25 -2
- package/dist/contracts/grant-copy.d.ts +2 -0
- package/dist/contracts/grant-copy.js +2 -0
- package/dist/contracts/grants-core.d.ts +95 -0
- package/dist/contracts/grants-core.js +435 -0
- package/dist/contracts/grants.d.ts +13 -84
- package/dist/contracts/grants.js +21 -369
- package/dist/contracts/ids-core.d.ts +11 -0
- package/dist/contracts/ids-core.js +14 -0
- package/dist/contracts/ids.d.ts +7 -4
- package/dist/contracts/ids.js +12 -4
- package/dist/contracts/internal.d.ts +18 -0
- package/dist/contracts/internal.js +19 -0
- package/dist/contracts/mcp.d.ts +8 -18
- package/dist/contracts/mcp.js +2 -23
- package/dist/contracts/notifications.d.ts +4 -1
- package/dist/contracts/notifications.js +1 -0
- package/dist/contracts/oauth-resources.d.ts +55 -9
- package/dist/contracts/oauth-resources.js +64 -1
- package/dist/contracts/oauth-scope-actions.d.ts +27 -3
- package/dist/contracts/oauth-scope-actions.js +18 -8
- package/dist/contracts/operations.d.ts +1 -1
- package/dist/contracts/partner-account.d.ts +629 -0
- package/dist/contracts/partner-account.js +18 -0
- package/dist/contracts/principal-assertion.d.ts +74 -1
- package/dist/contracts/principal-assertion.js +67 -3
- package/dist/contracts/publish-archive.d.ts +22 -1
- package/dist/contracts/push-new.d.ts +3 -3
- package/dist/contracts/push-new.js +1 -1
- package/dist/contracts/quotas.js +2 -1
- package/dist/contracts/repository-connections.d.ts +10 -6
- package/dist/contracts/repository-connections.js +15 -0
- package/dist/contracts/resources.d.ts +6 -5
- package/dist/contracts/resources.js +7 -0
- package/dist/contracts/route-inventory.d.ts +74 -19
- package/dist/contracts/route-inventory.js +20 -6
- package/dist/contracts/runtime-api.d.ts +415 -4
- package/dist/contracts/runtime-api.js +60 -15
- package/dist/contracts/runtime-app.d.ts +6 -1
- package/dist/contracts/runtime-components.d.ts +646 -18
- package/dist/contracts/runtime-components.js +304 -188
- package/dist/contracts/runtime-services.d.ts +15 -0
- package/dist/contracts/runtime-services.js +25 -0
- package/dist/contracts/runtime-storage.d.ts +32 -0
- package/dist/contracts/runtime-storage.js +37 -0
- package/dist/contracts/source-workspaces.d.ts +511 -0
- package/dist/contracts/source-workspaces.js +276 -0
- package/dist/contracts/space-config-spacefast.d.ts +394 -0
- package/dist/contracts/space-config-spacefast.js +70 -0
- package/dist/contracts/space-config.d.ts +177 -90
- package/dist/contracts/space-config.js +77 -92
- package/dist/contracts/spaces.d.ts +132 -24
- package/dist/contracts/spaces.js +77 -13
- package/dist/contracts/superadmin-connectors.d.ts +371 -0
- package/dist/contracts/superadmin-connectors.js +61 -0
- package/dist/contracts/superadmin-emails.d.ts +1 -1
- package/dist/contracts/superadmin-emails.js +1 -1
- package/dist/contracts/superadmin-entities.d.ts +105 -0
- package/dist/contracts/superadmin-entities.js +64 -0
- package/dist/contracts/superadmin-runtime.d.ts +35 -116
- package/dist/contracts/superadmin-runtime.js +13 -69
- package/dist/contracts/superadmin-search.d.ts +12 -14
- package/dist/contracts/superadmin-search.js +2 -2
- package/dist/contracts/superadmin-spaces.d.ts +15 -72
- package/dist/contracts/superadmin-spaces.js +2 -7
- package/dist/contracts/superadmin-teams.d.ts +12 -0
- package/dist/contracts/superadmin-teams.js +7 -1
- package/dist/contracts/superadmin-tenants.d.ts +44 -16
- package/dist/contracts/superadmin.d.ts +2 -2
- package/dist/contracts/tags.d.ts +12 -12
- package/dist/contracts/teams.d.ts +29 -1
- package/dist/contracts/teams.js +24 -2
- package/dist/contracts/tenants.d.ts +98 -0
- package/dist/contracts/tenants.js +20 -0
- package/dist/contracts/transfers.d.ts +92 -0
- package/dist/contracts/transfers.js +37 -0
- package/dist/contracts/usage.d.ts +9 -1
- package/dist/contracts/usage.js +2 -0
- package/dist/contracts/visual-review.d.ts +448 -0
- package/dist/contracts/visual-review.js +156 -0
- package/dist/contracts/wordpress-php-toolkit.json +9 -0
- package/dist/contracts/work-mode.d.ts +24 -0
- package/dist/contracts/work-mode.js +17 -0
- package/dist/contracts/wp-cli.d.ts +66 -0
- package/dist/contracts/wp-cli.js +68 -0
- package/dist/contracts/zero-catalog.d.ts +29 -0
- package/dist/contracts/zero-catalog.js +55 -0
- package/dist/contracts/zero-platform-abilities.generated.d.ts +31 -0
- package/dist/contracts/zero-platform-abilities.generated.js +373 -0
- package/dist/contracts/zero-spacefast.d.ts +444 -0
- package/dist/contracts/zero-spacefast.js +149 -0
- package/dist/contracts/zero-types.d.ts +47 -0
- package/dist/contracts/zero-types.js +263 -0
- package/dist/contracts/zero.d.ts +781 -14
- package/dist/contracts/zero.js +204 -10
- package/dist/dashboard-paths/index.d.ts +2 -2
- package/dist/dashboard-paths/route-reservations.generated.d.ts +2 -2
- package/dist/dashboard-paths/route-reservations.generated.js +5 -0
- package/dist/docs/agent-prose.d.ts +1 -1
- package/dist/docs/agent-prose.js +15 -18
- package/dist/docs/agent-setup.d.ts +1 -1
- package/dist/docs/agent-setup.js +5 -13
- package/dist/docs/catalog.d.ts +64 -28
- package/dist/docs/catalog.js +155 -28
- package/dist/docs/error-docs.d.ts +365 -17
- package/dist/docs/error-docs.js +369 -21
- package/dist/docs/reference-urls.js +1 -1
- package/dist/docs/skills.d.ts +84 -84
- package/dist/docs/skills.js +66 -47
- package/dist/docs/start-prompts.d.ts +14 -0
- package/dist/docs/start-prompts.js +20 -0
- package/dist/utils/account-labels.d.ts +7 -0
- package/dist/utils/account-labels.js +15 -0
- package/dist/utils/auth.d.ts +1 -0
- package/dist/utils/auth.js +1 -0
- package/dist/utils/credential-policy.d.ts +22 -1
- package/dist/utils/credential-policy.js +55 -6
- package/dist/utils/local-space-state.d.ts +7 -0
- package/dist/utils/local-space-state.js +7 -0
- package/dist/utils/logger.d.ts +34 -0
- package/dist/utils/logger.js +144 -0
- package/dist/utils/page-routes.d.ts +9 -0
- package/dist/utils/page-routes.js +82 -0
- package/dist/utils/pages.d.ts +2 -0
- package/dist/utils/pages.js +7 -0
- package/dist/utils/publish-form-data.d.ts +2 -0
- package/dist/utils/publish-form-data.js +2 -0
- package/dist/utils/publish-policy-spacefast.d.ts +13 -0
- package/dist/utils/publish-policy-spacefast.js +117 -0
- package/dist/utils/publish-policy.d.ts +22 -16
- package/dist/utils/publish-policy.fixtures.json +15 -0
- package/dist/utils/publish-policy.js +62 -139
- package/dist/utils/query-client.js +9 -1
- package/dist/utils/runtime-upload.d.ts +4 -0
- package/dist/utils/runtime-upload.js +5 -0
- package/dist/utils/space-config.d.ts +2 -3
- package/dist/utils/space-config.js +1 -1
- package/dist/utils/uploaded-source.d.ts +4 -0
- package/dist/utils/uploaded-source.js +12 -0
- package/dist/visual-review.d.ts +4 -0
- package/dist/visual-review.js +208 -0
- package/dist/vocabulary.d.ts +38 -0
- package/dist/vocabulary.js +55 -0
- package/package.json +7 -2
- package/dist/agents/registry/deeplink-probes.d.ts +0 -23
- package/dist/agents/registry/deeplink-probes.js +0 -18
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* The superadmin read of connector runs across every team: the inbox support
|
|
4
|
+
* opens when a customer reports a stuck or refused call. Reads only; a run is
|
|
5
|
+
* decided by the person policy named, never from here.
|
|
6
|
+
*/
|
|
7
|
+
export declare const superadminConnectorRunListQuerySchema: z.ZodObject<{
|
|
8
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
9
|
+
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
10
|
+
search: z.ZodOptional<z.ZodString>;
|
|
11
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
12
|
+
failed: "failed";
|
|
13
|
+
expired: "expired";
|
|
14
|
+
running: "running";
|
|
15
|
+
succeeded: "succeeded";
|
|
16
|
+
awaiting_approval: "awaiting_approval";
|
|
17
|
+
}>>;
|
|
18
|
+
teamId: z.ZodOptional<z.ZodString>;
|
|
19
|
+
origin: z.ZodOptional<z.ZodEnum<{
|
|
20
|
+
function: "function";
|
|
21
|
+
zero: "zero";
|
|
22
|
+
api: "api";
|
|
23
|
+
dashboard: "dashboard";
|
|
24
|
+
mcp: "mcp";
|
|
25
|
+
cli: "cli";
|
|
26
|
+
system: "system";
|
|
27
|
+
}>>;
|
|
28
|
+
space: z.ZodOptional<z.ZodString>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
export declare const SuperadminConnectorRunSchema: z.ZodObject<{
|
|
31
|
+
origin: z.ZodEnum<{
|
|
32
|
+
function: "function";
|
|
33
|
+
zero: "zero";
|
|
34
|
+
api: "api";
|
|
35
|
+
dashboard: "dashboard";
|
|
36
|
+
mcp: "mcp";
|
|
37
|
+
cli: "cli";
|
|
38
|
+
system: "system";
|
|
39
|
+
}>;
|
|
40
|
+
space: z.ZodNullable<z.ZodString>;
|
|
41
|
+
handler: z.ZodNullable<z.ZodString>;
|
|
42
|
+
visitor: z.ZodBoolean;
|
|
43
|
+
id: z.ZodString;
|
|
44
|
+
team: z.ZodObject<{
|
|
45
|
+
id: z.ZodString;
|
|
46
|
+
name: z.ZodNullable<z.ZodString>;
|
|
47
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
kind: z.ZodEnum<{
|
|
50
|
+
tool: "tool";
|
|
51
|
+
code: "code";
|
|
52
|
+
}>;
|
|
53
|
+
address: z.ZodNullable<z.ZodString>;
|
|
54
|
+
status: z.ZodEnum<{
|
|
55
|
+
failed: "failed";
|
|
56
|
+
expired: "expired";
|
|
57
|
+
running: "running";
|
|
58
|
+
succeeded: "succeeded";
|
|
59
|
+
awaiting_approval: "awaiting_approval";
|
|
60
|
+
}>;
|
|
61
|
+
errorCode: z.ZodNullable<z.ZodString>;
|
|
62
|
+
actorUserId: z.ZodNullable<z.ZodString>;
|
|
63
|
+
credentialId: z.ZodNullable<z.ZodString>;
|
|
64
|
+
decisionId: z.ZodNullable<z.ZodString>;
|
|
65
|
+
approval: z.ZodNullable<z.ZodObject<{
|
|
66
|
+
mode: z.ZodEnum<{
|
|
67
|
+
model: "model";
|
|
68
|
+
human: "human";
|
|
69
|
+
}>;
|
|
70
|
+
address: z.ZodString;
|
|
71
|
+
reason: z.ZodString;
|
|
72
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
73
|
+
}, z.core.$strip>>;
|
|
74
|
+
toolCalls: z.ZodNumber;
|
|
75
|
+
egressBytes: z.ZodNumber;
|
|
76
|
+
durationMs: z.ZodNullable<z.ZodNumber>;
|
|
77
|
+
createdAt: z.ZodString;
|
|
78
|
+
completedAt: z.ZodNullable<z.ZodString>;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
export type SuperadminConnectorRun = z.infer<typeof SuperadminConnectorRunSchema>;
|
|
81
|
+
export declare const SuperadminTeamConnectorsSchema: z.ZodObject<{
|
|
82
|
+
connectorsServing: z.ZodDefault<z.ZodObject<{
|
|
83
|
+
adminOnly: z.ZodBoolean;
|
|
84
|
+
allowlist: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
85
|
+
}, z.core.$strip>>;
|
|
86
|
+
team: z.ZodObject<{
|
|
87
|
+
id: z.ZodString;
|
|
88
|
+
name: z.ZodString;
|
|
89
|
+
slug: z.ZodString;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
spaces: z.ZodArray<z.ZodObject<{
|
|
92
|
+
id: z.ZodString;
|
|
93
|
+
title: z.ZodString;
|
|
94
|
+
}, z.core.$strip>>;
|
|
95
|
+
visitorConnections: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
96
|
+
spaceId: z.ZodString;
|
|
97
|
+
count: z.ZodNumber;
|
|
98
|
+
}, z.core.$strip>>>;
|
|
99
|
+
connectors: z.ZodArray<z.ZodObject<{
|
|
100
|
+
slug: z.ZodString;
|
|
101
|
+
title: z.ZodString;
|
|
102
|
+
description: z.ZodNullable<z.ZodString>;
|
|
103
|
+
source: z.ZodEnum<{
|
|
104
|
+
mcp: "mcp";
|
|
105
|
+
openapi: "openapi";
|
|
106
|
+
graphql: "graphql";
|
|
107
|
+
}>;
|
|
108
|
+
catalogSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
109
|
+
kind: z.ZodLiteral<"openapi">;
|
|
110
|
+
spec: z.ZodString;
|
|
111
|
+
baseUrl: z.ZodOptional<z.ZodString>;
|
|
112
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
113
|
+
kind: z.ZodLiteral<"graphql">;
|
|
114
|
+
endpoint: z.ZodString;
|
|
115
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
116
|
+
kind: z.ZodLiteral<"mcp">;
|
|
117
|
+
endpoint: z.ZodString;
|
|
118
|
+
}, z.core.$strip>], "kind">>;
|
|
119
|
+
sourceUrl: z.ZodNullable<z.ZodString>;
|
|
120
|
+
firstParty: z.ZodBoolean;
|
|
121
|
+
presetId: z.ZodNullable<z.ZodString>;
|
|
122
|
+
authMethods: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
123
|
+
kind: z.ZodLiteral<"api_key">;
|
|
124
|
+
slug: z.ZodString;
|
|
125
|
+
label: z.ZodString;
|
|
126
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
127
|
+
kind: z.ZodLiteral<"oauth2">;
|
|
128
|
+
slug: z.ZodString;
|
|
129
|
+
label: z.ZodString;
|
|
130
|
+
scopes: z.ZodArray<z.ZodString>;
|
|
131
|
+
clientIdMetadataDocument: z.ZodOptional<z.ZodBoolean>;
|
|
132
|
+
dynamicRegistration: z.ZodBoolean;
|
|
133
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
134
|
+
kind: z.ZodLiteral<"none">;
|
|
135
|
+
slug: z.ZodString;
|
|
136
|
+
label: z.ZodString;
|
|
137
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
138
|
+
kind: z.ZodLiteral<"first_party">;
|
|
139
|
+
slug: z.ZodString;
|
|
140
|
+
label: z.ZodString;
|
|
141
|
+
provider: z.ZodString;
|
|
142
|
+
}, z.core.$strip>], "kind">>;
|
|
143
|
+
toolCount: z.ZodNumber;
|
|
144
|
+
connections: z.ZodArray<z.ZodObject<{
|
|
145
|
+
id: z.ZodString;
|
|
146
|
+
connector: z.ZodString;
|
|
147
|
+
owner: z.ZodEnum<{
|
|
148
|
+
team: "team";
|
|
149
|
+
personal: "personal";
|
|
150
|
+
}>;
|
|
151
|
+
serving: z.ZodDefault<z.ZodBoolean>;
|
|
152
|
+
displayName: z.ZodString;
|
|
153
|
+
description: z.ZodNullable<z.ZodString>;
|
|
154
|
+
status: z.ZodEnum<{
|
|
155
|
+
active: "active";
|
|
156
|
+
revoked: "revoked";
|
|
157
|
+
degraded: "degraded";
|
|
158
|
+
pending_authorization: "pending_authorization";
|
|
159
|
+
needs_reauth: "needs_reauth";
|
|
160
|
+
}>;
|
|
161
|
+
identityLabel: z.ZodNullable<z.ZodString>;
|
|
162
|
+
credentialConfigured: z.ZodBoolean;
|
|
163
|
+
authMethod: z.ZodNullable<z.ZodString>;
|
|
164
|
+
scopes: z.ZodArray<z.ZodString>;
|
|
165
|
+
isDefault: z.ZodBoolean;
|
|
166
|
+
toolCount: z.ZodNumber;
|
|
167
|
+
createdBy: z.ZodNullable<z.ZodString>;
|
|
168
|
+
lastCheckedAt: z.ZodNullable<z.ZodString>;
|
|
169
|
+
revokedAt: z.ZodNullable<z.ZodString>;
|
|
170
|
+
createdAt: z.ZodString;
|
|
171
|
+
updatedAt: z.ZodString;
|
|
172
|
+
}, z.core.$strip>>;
|
|
173
|
+
specSyncedAt: z.ZodNullable<z.ZodString>;
|
|
174
|
+
createdAt: z.ZodString;
|
|
175
|
+
updatedAt: z.ZodString;
|
|
176
|
+
}, z.core.$strip>>;
|
|
177
|
+
policies: z.ZodArray<z.ZodObject<{
|
|
178
|
+
id: z.ZodString;
|
|
179
|
+
pattern: z.ZodString;
|
|
180
|
+
action: z.ZodEnum<{
|
|
181
|
+
approve: "approve";
|
|
182
|
+
require_approval: "require_approval";
|
|
183
|
+
block: "block";
|
|
184
|
+
}>;
|
|
185
|
+
owner: z.ZodEnum<{
|
|
186
|
+
team: "team";
|
|
187
|
+
personal: "personal";
|
|
188
|
+
}>;
|
|
189
|
+
position: z.ZodString;
|
|
190
|
+
createdAt: z.ZodString;
|
|
191
|
+
}, z.core.$strip>>;
|
|
192
|
+
runs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
193
|
+
origin: z.ZodEnum<{
|
|
194
|
+
function: "function";
|
|
195
|
+
zero: "zero";
|
|
196
|
+
api: "api";
|
|
197
|
+
dashboard: "dashboard";
|
|
198
|
+
mcp: "mcp";
|
|
199
|
+
cli: "cli";
|
|
200
|
+
system: "system";
|
|
201
|
+
}>;
|
|
202
|
+
space: z.ZodNullable<z.ZodString>;
|
|
203
|
+
handler: z.ZodNullable<z.ZodString>;
|
|
204
|
+
visitor: z.ZodBoolean;
|
|
205
|
+
id: z.ZodString;
|
|
206
|
+
input: z.ZodObject<{
|
|
207
|
+
kind: z.ZodEnum<{
|
|
208
|
+
tool: "tool";
|
|
209
|
+
code: "code";
|
|
210
|
+
}>;
|
|
211
|
+
address: z.ZodNullable<z.ZodString>;
|
|
212
|
+
digest: z.ZodString;
|
|
213
|
+
}, z.core.$strip>;
|
|
214
|
+
usage: z.ZodObject<{
|
|
215
|
+
toolCalls: z.ZodNumber;
|
|
216
|
+
egressBytes: z.ZodNumber;
|
|
217
|
+
durationMs: z.ZodNumber;
|
|
218
|
+
}, z.core.$strip>;
|
|
219
|
+
createdAt: z.ZodString;
|
|
220
|
+
status: z.ZodLiteral<"running">;
|
|
221
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
222
|
+
origin: z.ZodEnum<{
|
|
223
|
+
function: "function";
|
|
224
|
+
zero: "zero";
|
|
225
|
+
api: "api";
|
|
226
|
+
dashboard: "dashboard";
|
|
227
|
+
mcp: "mcp";
|
|
228
|
+
cli: "cli";
|
|
229
|
+
system: "system";
|
|
230
|
+
}>;
|
|
231
|
+
space: z.ZodNullable<z.ZodString>;
|
|
232
|
+
handler: z.ZodNullable<z.ZodString>;
|
|
233
|
+
visitor: z.ZodBoolean;
|
|
234
|
+
id: z.ZodString;
|
|
235
|
+
input: z.ZodObject<{
|
|
236
|
+
kind: z.ZodEnum<{
|
|
237
|
+
tool: "tool";
|
|
238
|
+
code: "code";
|
|
239
|
+
}>;
|
|
240
|
+
address: z.ZodNullable<z.ZodString>;
|
|
241
|
+
digest: z.ZodString;
|
|
242
|
+
}, z.core.$strip>;
|
|
243
|
+
usage: z.ZodObject<{
|
|
244
|
+
toolCalls: z.ZodNumber;
|
|
245
|
+
egressBytes: z.ZodNumber;
|
|
246
|
+
durationMs: z.ZodNumber;
|
|
247
|
+
}, z.core.$strip>;
|
|
248
|
+
createdAt: z.ZodString;
|
|
249
|
+
status: z.ZodLiteral<"awaiting_approval">;
|
|
250
|
+
approval: z.ZodObject<{
|
|
251
|
+
decisionId: z.ZodNullable<z.ZodString>;
|
|
252
|
+
mode: z.ZodEnum<{
|
|
253
|
+
model: "model";
|
|
254
|
+
human: "human";
|
|
255
|
+
}>;
|
|
256
|
+
address: z.ZodString;
|
|
257
|
+
preview: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
258
|
+
reason: z.ZodEnum<{
|
|
259
|
+
policy_require_approval: "policy_require_approval";
|
|
260
|
+
annotation_requires_approval: "annotation_requires_approval";
|
|
261
|
+
}>;
|
|
262
|
+
matchedPattern: z.ZodNullable<z.ZodString>;
|
|
263
|
+
approvalUrl: z.ZodString;
|
|
264
|
+
expiresAt: z.ZodString;
|
|
265
|
+
}, z.core.$strip>;
|
|
266
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
267
|
+
origin: z.ZodEnum<{
|
|
268
|
+
function: "function";
|
|
269
|
+
zero: "zero";
|
|
270
|
+
api: "api";
|
|
271
|
+
dashboard: "dashboard";
|
|
272
|
+
mcp: "mcp";
|
|
273
|
+
cli: "cli";
|
|
274
|
+
system: "system";
|
|
275
|
+
}>;
|
|
276
|
+
space: z.ZodNullable<z.ZodString>;
|
|
277
|
+
handler: z.ZodNullable<z.ZodString>;
|
|
278
|
+
visitor: z.ZodBoolean;
|
|
279
|
+
id: z.ZodString;
|
|
280
|
+
input: z.ZodObject<{
|
|
281
|
+
kind: z.ZodEnum<{
|
|
282
|
+
tool: "tool";
|
|
283
|
+
code: "code";
|
|
284
|
+
}>;
|
|
285
|
+
address: z.ZodNullable<z.ZodString>;
|
|
286
|
+
digest: z.ZodString;
|
|
287
|
+
}, z.core.$strip>;
|
|
288
|
+
usage: z.ZodObject<{
|
|
289
|
+
toolCalls: z.ZodNumber;
|
|
290
|
+
egressBytes: z.ZodNumber;
|
|
291
|
+
durationMs: z.ZodNumber;
|
|
292
|
+
}, z.core.$strip>;
|
|
293
|
+
createdAt: z.ZodString;
|
|
294
|
+
status: z.ZodLiteral<"succeeded">;
|
|
295
|
+
completedAt: z.ZodString;
|
|
296
|
+
result: z.ZodUnknown;
|
|
297
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
298
|
+
origin: z.ZodEnum<{
|
|
299
|
+
function: "function";
|
|
300
|
+
zero: "zero";
|
|
301
|
+
api: "api";
|
|
302
|
+
dashboard: "dashboard";
|
|
303
|
+
mcp: "mcp";
|
|
304
|
+
cli: "cli";
|
|
305
|
+
system: "system";
|
|
306
|
+
}>;
|
|
307
|
+
space: z.ZodNullable<z.ZodString>;
|
|
308
|
+
handler: z.ZodNullable<z.ZodString>;
|
|
309
|
+
visitor: z.ZodBoolean;
|
|
310
|
+
id: z.ZodString;
|
|
311
|
+
input: z.ZodObject<{
|
|
312
|
+
kind: z.ZodEnum<{
|
|
313
|
+
tool: "tool";
|
|
314
|
+
code: "code";
|
|
315
|
+
}>;
|
|
316
|
+
address: z.ZodNullable<z.ZodString>;
|
|
317
|
+
digest: z.ZodString;
|
|
318
|
+
}, z.core.$strip>;
|
|
319
|
+
usage: z.ZodObject<{
|
|
320
|
+
toolCalls: z.ZodNumber;
|
|
321
|
+
egressBytes: z.ZodNumber;
|
|
322
|
+
durationMs: z.ZodNumber;
|
|
323
|
+
}, z.core.$strip>;
|
|
324
|
+
createdAt: z.ZodString;
|
|
325
|
+
status: z.ZodLiteral<"failed">;
|
|
326
|
+
completedAt: z.ZodString;
|
|
327
|
+
error: z.ZodObject<{
|
|
328
|
+
type: z.ZodString;
|
|
329
|
+
title: z.ZodString;
|
|
330
|
+
status: z.ZodNumber;
|
|
331
|
+
detail: z.ZodString;
|
|
332
|
+
code: z.ZodString;
|
|
333
|
+
pointer: z.ZodOptional<z.ZodString>;
|
|
334
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
335
|
+
suggestions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
336
|
+
next: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
337
|
+
requestId: z.ZodString;
|
|
338
|
+
}, z.core.$strip>;
|
|
339
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
340
|
+
origin: z.ZodEnum<{
|
|
341
|
+
function: "function";
|
|
342
|
+
zero: "zero";
|
|
343
|
+
api: "api";
|
|
344
|
+
dashboard: "dashboard";
|
|
345
|
+
mcp: "mcp";
|
|
346
|
+
cli: "cli";
|
|
347
|
+
system: "system";
|
|
348
|
+
}>;
|
|
349
|
+
space: z.ZodNullable<z.ZodString>;
|
|
350
|
+
handler: z.ZodNullable<z.ZodString>;
|
|
351
|
+
visitor: z.ZodBoolean;
|
|
352
|
+
id: z.ZodString;
|
|
353
|
+
input: z.ZodObject<{
|
|
354
|
+
kind: z.ZodEnum<{
|
|
355
|
+
tool: "tool";
|
|
356
|
+
code: "code";
|
|
357
|
+
}>;
|
|
358
|
+
address: z.ZodNullable<z.ZodString>;
|
|
359
|
+
digest: z.ZodString;
|
|
360
|
+
}, z.core.$strip>;
|
|
361
|
+
usage: z.ZodObject<{
|
|
362
|
+
toolCalls: z.ZodNumber;
|
|
363
|
+
egressBytes: z.ZodNumber;
|
|
364
|
+
durationMs: z.ZodNumber;
|
|
365
|
+
}, z.core.$strip>;
|
|
366
|
+
createdAt: z.ZodString;
|
|
367
|
+
status: z.ZodLiteral<"expired">;
|
|
368
|
+
completedAt: z.ZodString;
|
|
369
|
+
}, z.core.$strip>], "status">>;
|
|
370
|
+
}, z.core.$strip>;
|
|
371
|
+
export type SuperadminTeamConnectors = z.infer<typeof SuperadminTeamConnectorsSchema>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { ConnectorRunSchema, ConnectorSchema, PolicyRuleSchema, runStatusSchema, connectorRunOriginSchema, } from "./connectors.js";
|
|
3
|
+
import { connectorsServingSchema } from "./teams.js";
|
|
4
|
+
/**
|
|
5
|
+
* The superadmin read of connector runs across every team: the inbox support
|
|
6
|
+
* opens when a customer reports a stuck or refused call. Reads only; a run is
|
|
7
|
+
* decided by the person policy named, never from here.
|
|
8
|
+
*/
|
|
9
|
+
export const superadminConnectorRunListQuerySchema = z.object({
|
|
10
|
+
limit: z.coerce.number().int().min(1).max(100).default(50),
|
|
11
|
+
offset: z.coerce.number().int().min(0).default(0),
|
|
12
|
+
/** Matches a run id, a team id or slug, or part of an address. */
|
|
13
|
+
search: z.string().trim().optional(),
|
|
14
|
+
status: runStatusSchema.optional(),
|
|
15
|
+
teamId: z.string().trim().optional(),
|
|
16
|
+
origin: connectorRunOriginSchema.optional(),
|
|
17
|
+
space: z.string().trim().min(1).optional(),
|
|
18
|
+
});
|
|
19
|
+
export const SuperadminConnectorRunSchema = z.object({
|
|
20
|
+
origin: connectorRunOriginSchema,
|
|
21
|
+
space: z.string().nullable(),
|
|
22
|
+
handler: z.string().nullable(),
|
|
23
|
+
visitor: z.boolean(),
|
|
24
|
+
id: z.string(),
|
|
25
|
+
team: z.object({
|
|
26
|
+
id: z.string(),
|
|
27
|
+
name: z.string().nullable(),
|
|
28
|
+
slug: z.string().nullable(),
|
|
29
|
+
}),
|
|
30
|
+
kind: z.enum(["tool", "code"]),
|
|
31
|
+
address: z.string().nullable(),
|
|
32
|
+
status: runStatusSchema,
|
|
33
|
+
errorCode: z.string().nullable(),
|
|
34
|
+
actorUserId: z.string().nullable(),
|
|
35
|
+
credentialId: z.string().nullable(),
|
|
36
|
+
decisionId: z.string().nullable(),
|
|
37
|
+
approval: z
|
|
38
|
+
.object({
|
|
39
|
+
mode: z.enum(["model", "human"]),
|
|
40
|
+
address: z.string(),
|
|
41
|
+
reason: z.string(),
|
|
42
|
+
expiresAt: z.string().nullable(),
|
|
43
|
+
})
|
|
44
|
+
.nullable(),
|
|
45
|
+
toolCalls: z.number().int().nonnegative(),
|
|
46
|
+
egressBytes: z.number().int().nonnegative(),
|
|
47
|
+
durationMs: z.number().int().nonnegative().nullable(),
|
|
48
|
+
createdAt: z.string(),
|
|
49
|
+
completedAt: z.string().nullable(),
|
|
50
|
+
});
|
|
51
|
+
export const SuperadminTeamConnectorsSchema = z.object({
|
|
52
|
+
connectorsServing: connectorsServingSchema.default({ adminOnly: false, allowlist: null }),
|
|
53
|
+
team: z.object({ id: z.string(), name: z.string(), slug: z.string() }),
|
|
54
|
+
spaces: z.array(z.object({ id: z.string(), title: z.string() })),
|
|
55
|
+
visitorConnections: z
|
|
56
|
+
.array(z.object({ spaceId: z.string(), count: z.number().int().nonnegative() }))
|
|
57
|
+
.default([]),
|
|
58
|
+
connectors: z.array(ConnectorSchema),
|
|
59
|
+
policies: z.array(PolicyRuleSchema),
|
|
60
|
+
runs: z.array(ConnectorRunSchema),
|
|
61
|
+
});
|
|
@@ -8,8 +8,8 @@ export declare const superadminEmailListQuerySchema: z.ZodObject<{
|
|
|
8
8
|
status: z.ZodDefault<z.ZodEnum<{
|
|
9
9
|
all: "all";
|
|
10
10
|
failed: "failed";
|
|
11
|
-
scheduled: "scheduled";
|
|
12
11
|
delivered: "delivered";
|
|
12
|
+
scheduled: "scheduled";
|
|
13
13
|
sent: "sent";
|
|
14
14
|
suppressed: "suppressed";
|
|
15
15
|
bounced: "bounced";
|
|
@@ -21,7 +21,7 @@ export const superadminEmailCategoryValues = emailCategoryValues;
|
|
|
21
21
|
const bareEmailAddressSchema = z.string().email();
|
|
22
22
|
const namedMailboxPattern = /^(?:"(?:[^"\\\r\n]|\\.)*"|[^<>\r\n]+)\s*<([^<>\r\n]+)>$/;
|
|
23
23
|
// The stored sender is the provider-facing RFC mailbox header, not necessarily
|
|
24
|
-
// a bare addr-spec. Resend
|
|
24
|
+
// a bare addr-spec. SES and Resend accept both `hello@example.com` and
|
|
25
25
|
// `Spacefast <hello@example.com>`; the operator API must preserve that value.
|
|
26
26
|
export const emailMailboxSchema = z
|
|
27
27
|
.string()
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const superadminEntityKindSchema: z.ZodEnum<{
|
|
3
|
+
build: "build";
|
|
4
|
+
email: "email";
|
|
5
|
+
space: "space";
|
|
6
|
+
team: "team";
|
|
7
|
+
version: "version";
|
|
8
|
+
tenant: "tenant";
|
|
9
|
+
operation: "operation";
|
|
10
|
+
user: "user";
|
|
11
|
+
externalPrincipal: "externalPrincipal";
|
|
12
|
+
providerSite: "providerSite";
|
|
13
|
+
providerClient: "providerClient";
|
|
14
|
+
betaInvite: "betaInvite";
|
|
15
|
+
}>;
|
|
16
|
+
export declare const SuperadminEntityIdentitySchema: z.ZodObject<{
|
|
17
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
18
|
+
kind: z.ZodEnum<{
|
|
19
|
+
build: "build";
|
|
20
|
+
email: "email";
|
|
21
|
+
space: "space";
|
|
22
|
+
team: "team";
|
|
23
|
+
version: "version";
|
|
24
|
+
tenant: "tenant";
|
|
25
|
+
operation: "operation";
|
|
26
|
+
user: "user";
|
|
27
|
+
externalPrincipal: "externalPrincipal";
|
|
28
|
+
providerSite: "providerSite";
|
|
29
|
+
providerClient: "providerClient";
|
|
30
|
+
betaInvite: "betaInvite";
|
|
31
|
+
}>;
|
|
32
|
+
id: z.ZodString;
|
|
33
|
+
label: z.ZodString;
|
|
34
|
+
secondary: z.ZodNullable<z.ZodString>;
|
|
35
|
+
status: z.ZodNullable<z.ZodString>;
|
|
36
|
+
}, z.core.$strict>;
|
|
37
|
+
export type SuperadminEntityKind = z.infer<typeof superadminEntityKindSchema>;
|
|
38
|
+
export type SuperadminEntityIdentity = z.infer<typeof SuperadminEntityIdentitySchema>;
|
|
39
|
+
export declare const SuperadminEntityIdentityRefSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
40
|
+
kind: z.ZodLiteral<"externalPrincipal">;
|
|
41
|
+
id: z.ZodString;
|
|
42
|
+
tenantId: z.ZodString;
|
|
43
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
44
|
+
kind: z.ZodEnum<{
|
|
45
|
+
build: "build";
|
|
46
|
+
email: "email";
|
|
47
|
+
space: "space";
|
|
48
|
+
team: "team";
|
|
49
|
+
version: "version";
|
|
50
|
+
tenant: "tenant";
|
|
51
|
+
operation: "operation";
|
|
52
|
+
user: "user";
|
|
53
|
+
providerSite: "providerSite";
|
|
54
|
+
providerClient: "providerClient";
|
|
55
|
+
betaInvite: "betaInvite";
|
|
56
|
+
}>;
|
|
57
|
+
id: z.ZodString;
|
|
58
|
+
}, z.core.$strict>], "kind">;
|
|
59
|
+
export type SuperadminEntityIdentityRef = z.infer<typeof SuperadminEntityIdentityRefSchema>;
|
|
60
|
+
export declare const SuperadminEntityIdentityBatchRequestSchema: z.ZodObject<{
|
|
61
|
+
refs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
62
|
+
kind: z.ZodLiteral<"externalPrincipal">;
|
|
63
|
+
id: z.ZodString;
|
|
64
|
+
tenantId: z.ZodString;
|
|
65
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
66
|
+
kind: z.ZodEnum<{
|
|
67
|
+
build: "build";
|
|
68
|
+
email: "email";
|
|
69
|
+
space: "space";
|
|
70
|
+
team: "team";
|
|
71
|
+
version: "version";
|
|
72
|
+
tenant: "tenant";
|
|
73
|
+
operation: "operation";
|
|
74
|
+
user: "user";
|
|
75
|
+
providerSite: "providerSite";
|
|
76
|
+
providerClient: "providerClient";
|
|
77
|
+
betaInvite: "betaInvite";
|
|
78
|
+
}>;
|
|
79
|
+
id: z.ZodString;
|
|
80
|
+
}, z.core.$strict>], "kind">>;
|
|
81
|
+
}, z.core.$strict>;
|
|
82
|
+
export declare const SuperadminEntityIdentityBatchResponseSchema: z.ZodObject<{
|
|
83
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
84
|
+
identities: z.ZodArray<z.ZodNullable<z.ZodObject<{
|
|
85
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
86
|
+
kind: z.ZodEnum<{
|
|
87
|
+
build: "build";
|
|
88
|
+
email: "email";
|
|
89
|
+
space: "space";
|
|
90
|
+
team: "team";
|
|
91
|
+
version: "version";
|
|
92
|
+
tenant: "tenant";
|
|
93
|
+
operation: "operation";
|
|
94
|
+
user: "user";
|
|
95
|
+
externalPrincipal: "externalPrincipal";
|
|
96
|
+
providerSite: "providerSite";
|
|
97
|
+
providerClient: "providerClient";
|
|
98
|
+
betaInvite: "betaInvite";
|
|
99
|
+
}>;
|
|
100
|
+
id: z.ZodString;
|
|
101
|
+
label: z.ZodString;
|
|
102
|
+
secondary: z.ZodNullable<z.ZodString>;
|
|
103
|
+
status: z.ZodNullable<z.ZodString>;
|
|
104
|
+
}, z.core.$strict>>>;
|
|
105
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const superadminEntityKindSchema = z.enum([
|
|
3
|
+
"user",
|
|
4
|
+
"team",
|
|
5
|
+
"externalPrincipal",
|
|
6
|
+
"tenant",
|
|
7
|
+
"space",
|
|
8
|
+
"providerSite",
|
|
9
|
+
"providerClient",
|
|
10
|
+
"operation",
|
|
11
|
+
"build",
|
|
12
|
+
"version",
|
|
13
|
+
"betaInvite",
|
|
14
|
+
"email",
|
|
15
|
+
]);
|
|
16
|
+
export const SuperadminEntityIdentitySchema = z
|
|
17
|
+
.object({
|
|
18
|
+
$schema: z.string().url().optional(),
|
|
19
|
+
kind: superadminEntityKindSchema,
|
|
20
|
+
id: z.string(),
|
|
21
|
+
label: z.string().min(1),
|
|
22
|
+
secondary: z.string().min(1).nullable(),
|
|
23
|
+
status: z.string().min(1).nullable(),
|
|
24
|
+
})
|
|
25
|
+
.strict();
|
|
26
|
+
export const SuperadminEntityIdentityRefSchema = z.discriminatedUnion("kind", [
|
|
27
|
+
z
|
|
28
|
+
.object({
|
|
29
|
+
kind: z.literal("externalPrincipal"),
|
|
30
|
+
id: z.string().trim().min(1),
|
|
31
|
+
tenantId: z.string().trim().min(1),
|
|
32
|
+
})
|
|
33
|
+
.strict(),
|
|
34
|
+
z
|
|
35
|
+
.object({
|
|
36
|
+
kind: z.enum([
|
|
37
|
+
"user",
|
|
38
|
+
"team",
|
|
39
|
+
"tenant",
|
|
40
|
+
"space",
|
|
41
|
+
"providerSite",
|
|
42
|
+
"providerClient",
|
|
43
|
+
"operation",
|
|
44
|
+
"build",
|
|
45
|
+
"version",
|
|
46
|
+
"betaInvite",
|
|
47
|
+
"email",
|
|
48
|
+
]),
|
|
49
|
+
id: z.string().trim().min(1),
|
|
50
|
+
})
|
|
51
|
+
.strict(),
|
|
52
|
+
]);
|
|
53
|
+
export const SuperadminEntityIdentityBatchRequestSchema = z
|
|
54
|
+
.object({
|
|
55
|
+
refs: z.array(SuperadminEntityIdentityRefSchema).min(1).max(100),
|
|
56
|
+
})
|
|
57
|
+
.strict();
|
|
58
|
+
export const SuperadminEntityIdentityBatchResponseSchema = z
|
|
59
|
+
.object({
|
|
60
|
+
$schema: z.string().url().optional(),
|
|
61
|
+
// Positional response: each item matches the request ref at the same index.
|
|
62
|
+
identities: z.array(SuperadminEntityIdentitySchema.nullable()),
|
|
63
|
+
})
|
|
64
|
+
.strict();
|