@spacefast/common 0.0.24 → 0.2.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/brand-assets/LICENSE-Haskoy.txt +93 -0
- package/brand-assets/haskoy-latin-variable.woff2 +0 -0
- package/brand-assets/spacefast-favicon.svg +4 -4
- package/brand-assets/spacefast-sf-full-bleed.svg +3 -3
- package/brand-assets/spacefast-wordmark.svg +2 -4
- package/dist/agents/connect-targets.d.ts +6 -146
- package/dist/agents/connect-targets.js +63 -295
- package/dist/agents/private-key-oauth.d.ts +31 -2
- package/dist/agents/private-key-oauth.js +166 -92
- package/dist/agents/registry/core.d.ts +292 -0
- package/dist/agents/registry/core.js +1388 -0
- package/dist/agents/registry/deeplink-probes.d.ts +23 -0
- package/dist/agents/registry/deeplink-probes.js +18 -0
- package/dist/agents/registry/node.d.ts +56 -0
- package/dist/agents/registry/node.js +339 -0
- package/dist/brand-assets-build.js +3 -6
- package/dist/brand-assets.d.ts +5 -15
- package/dist/brand-assets.js +12 -14
- package/dist/brand.d.ts +17 -0
- package/dist/brand.js +24 -4
- package/dist/config/domains.d.ts +79 -12
- package/dist/config/domains.js +128 -29
- package/dist/config/index.js +1 -2
- package/dist/contracts/abuse.js +9 -24
- package/dist/contracts/access-profiles.d.ts +86 -0
- package/dist/contracts/access-profiles.js +89 -0
- package/dist/contracts/access.d.ts +24 -30
- package/dist/contracts/access.js +33 -64
- package/dist/contracts/activity.d.ts +18 -1
- package/dist/contracts/activity.js +72 -26
- package/dist/contracts/analytics.js +8 -10
- package/dist/contracts/api-keys.d.ts +77 -52
- package/dist/contracts/api-keys.js +44 -24
- package/dist/contracts/application-journal.d.ts +216 -0
- package/dist/contracts/application-journal.js +167 -0
- package/dist/contracts/auth.d.ts +90 -17
- package/dist/contracts/auth.js +86 -17
- package/dist/contracts/beta.d.ts +9 -4
- package/dist/contracts/beta.js +20 -16
- package/dist/contracts/billing.d.ts +2 -1
- package/dist/contracts/billing.js +37 -11
- package/dist/contracts/bootstrap.d.ts +791 -0
- package/dist/contracts/bootstrap.js +51 -0
- package/dist/contracts/builds.d.ts +209 -18
- package/dist/contracts/builds.js +93 -27
- package/dist/contracts/channels.d.ts +43 -0
- package/dist/contracts/channels.js +25 -9
- package/dist/contracts/cli.d.ts +7 -0
- package/dist/contracts/cli.js +6 -0
- package/dist/contracts/collab-public.d.ts +1 -1
- package/dist/contracts/collab-public.js +5 -8
- package/dist/contracts/comments.d.ts +44 -34
- package/dist/contracts/comments.js +107 -77
- package/dist/contracts/commerce.d.ts +165 -0
- package/dist/contracts/commerce.js +146 -0
- package/dist/contracts/common.d.ts +3 -3
- package/dist/contracts/common.js +20 -31
- package/dist/contracts/content-contract-verification.d.ts +521 -0
- package/dist/contracts/content-contract-verification.js +320 -0
- package/dist/contracts/content-platform-fixture.d.ts +1278 -0
- package/dist/contracts/content-platform-fixture.js +44 -0
- package/dist/contracts/content-program.d.ts +994 -0
- package/dist/contracts/content-program.js +658 -0
- package/dist/contracts/content-sync.d.ts +290 -0
- package/dist/contracts/content-sync.js +167 -0
- package/dist/contracts/content.d.ts +432 -0
- package/dist/contracts/content.js +303 -0
- package/dist/contracts/continuation.d.ts +17 -1
- package/dist/contracts/continuation.js +23 -23
- package/dist/contracts/countries.js +3 -4
- package/dist/contracts/crons.d.ts +52 -0
- package/dist/contracts/crons.js +60 -0
- package/dist/contracts/dashboard-prefs.d.ts +56 -0
- package/dist/contracts/dashboard-prefs.js +51 -0
- package/dist/contracts/device-auth.d.ts +234 -37
- package/dist/contracts/device-auth.js +267 -53
- package/dist/contracts/docs.d.ts +1 -5
- package/dist/contracts/docs.js +7 -15
- package/dist/contracts/domains.d.ts +501 -93
- package/dist/contracts/domains.js +193 -55
- package/dist/contracts/email-preferences.d.ts +3 -3
- package/dist/contracts/email-preferences.js +6 -7
- package/dist/contracts/enums.d.ts +27 -26
- package/dist/contracts/enums.js +68 -61
- package/dist/contracts/error-code-meta.d.ts +283 -7
- package/dist/contracts/error-code-meta.js +97 -5
- package/dist/contracts/error-codes.d.ts +5 -5
- package/dist/contracts/error-codes.js +82 -17
- package/dist/contracts/events.d.ts +100 -20
- package/dist/contracts/events.js +107 -20
- package/dist/contracts/execution.d.ts +48 -64
- package/dist/contracts/execution.js +52 -62
- package/dist/contracts/feature-lifecycle.d.ts +73 -27
- package/dist/contracts/feature-lifecycle.js +86 -26
- package/dist/contracts/features.d.ts +68 -19
- package/dist/contracts/features.js +42 -41
- package/dist/contracts/fixtures/content-platform-v1.json +1108 -0
- package/dist/contracts/frame-session.d.ts +192 -0
- package/dist/contracts/frame-session.js +164 -0
- package/dist/contracts/functions.d.ts +338 -164
- package/dist/contracts/functions.js +367 -198
- package/dist/contracts/git.d.ts +27 -33
- package/dist/contracts/git.js +10 -11
- package/dist/contracts/grant-copy.d.ts +43 -0
- package/dist/contracts/grant-copy.js +44 -0
- package/dist/contracts/grants.d.ts +62 -54
- package/dist/contracts/grants.js +124 -23
- package/dist/contracts/ids.d.ts +4 -1
- package/dist/contracts/ids.js +6 -3
- package/dist/contracts/internal.d.ts +8 -18
- package/dist/contracts/internal.js +13 -14
- package/dist/contracts/mcp.d.ts +28 -0
- package/dist/contracts/mcp.js +28 -0
- package/dist/contracts/me.d.ts +6 -1
- package/dist/contracts/me.js +12 -6
- package/dist/contracts/notifications.d.ts +27 -29
- package/dist/contracts/notifications.js +9 -4
- package/dist/contracts/oauth-resources.d.ts +112 -10
- package/dist/contracts/oauth-resources.js +116 -11
- package/dist/contracts/oauth-scope-actions.d.ts +90 -0
- package/dist/contracts/oauth-scope-actions.js +126 -0
- package/dist/contracts/operations.d.ts +27 -4
- package/dist/contracts/operations.js +12 -6
- package/dist/contracts/pages.d.ts +31 -7
- package/dist/contracts/pages.js +22 -5
- package/dist/contracts/partner-notifications.d.ts +3 -0
- package/dist/contracts/partner-notifications.js +65 -0
- package/dist/contracts/{platform.d.ts → partner.d.ts} +29 -42
- package/dist/contracts/{platform.js → partner.js} +27 -40
- package/dist/contracts/plan-policy.js +1 -1
- package/dist/contracts/principal-assertion.d.ts +43 -0
- package/dist/contracts/principal-assertion.js +67 -0
- package/dist/contracts/principals.d.ts +73 -0
- package/dist/contracts/principals.js +59 -0
- package/dist/contracts/privacy.d.ts +11 -0
- package/dist/contracts/privacy.js +17 -0
- package/dist/contracts/problem-document.js +3 -4
- package/dist/contracts/publish-archive.d.ts +269 -161
- package/dist/contracts/publish-archive.js +11 -1
- package/dist/contracts/push-new.d.ts +8 -8
- package/dist/contracts/quotas.js +5 -5
- package/dist/contracts/realtime.d.ts +52 -0
- package/dist/contracts/realtime.js +54 -0
- package/dist/contracts/repository-connections.d.ts +44 -31
- package/dist/contracts/repository-connections.js +17 -5
- package/dist/contracts/resources.d.ts +105 -14
- package/dist/contracts/resources.js +150 -26
- package/dist/contracts/route-inventory.d.ts +358 -0
- package/dist/contracts/route-inventory.js +141 -0
- package/dist/contracts/runtime-api.d.ts +206 -82
- package/dist/contracts/runtime-api.js +131 -70
- package/dist/contracts/runtime-app.d.ts +13 -23
- package/dist/contracts/runtime-app.js +39 -24
- package/dist/contracts/runtime-components.d.ts +143 -0
- package/dist/contracts/runtime-components.js +199 -0
- package/dist/contracts/runtime-db.d.ts +49 -23
- package/dist/contracts/runtime-db.js +87 -22
- package/dist/contracts/runtime-purge.d.ts +8 -0
- package/dist/contracts/runtime-purge.js +5 -0
- package/dist/contracts/runtime-services.d.ts +43 -75
- package/dist/contracts/runtime-services.js +29 -49
- package/dist/contracts/runtime-storage.d.ts +15 -14
- package/dist/contracts/runtime-storage.js +30 -14
- package/dist/contracts/sf-config-v1.d.ts +48 -14
- package/dist/contracts/slugs.js +13 -4
- package/dist/contracts/space-config.d.ts +283 -19
- package/dist/contracts/space-config.js +430 -80
- package/dist/contracts/spaces.d.ts +376 -290
- package/dist/contracts/spaces.js +200 -135
- package/dist/contracts/superadmin-activity.d.ts +3 -43
- package/dist/contracts/superadmin-activity.js +6 -30
- package/dist/contracts/superadmin-emails.d.ts +1 -0
- package/dist/contracts/superadmin-emails.js +17 -1
- package/dist/contracts/superadmin-runtime.d.ts +199 -0
- package/dist/contracts/superadmin-runtime.js +141 -0
- package/dist/contracts/superadmin-search.d.ts +22 -2
- package/dist/contracts/superadmin-search.js +14 -6
- package/dist/contracts/superadmin-spaces.d.ts +438 -189
- package/dist/contracts/superadmin-spaces.js +131 -25
- package/dist/contracts/superadmin-teams.d.ts +5 -2
- package/dist/contracts/superadmin-teams.js +1 -2
- package/dist/contracts/superadmin-tenants.d.ts +627 -12
- package/dist/contracts/superadmin-tenants.js +32 -13
- package/dist/contracts/superadmin.d.ts +232 -37
- package/dist/contracts/superadmin.js +106 -22
- package/dist/contracts/tags.d.ts +85 -58
- package/dist/contracts/tags.js +47 -37
- package/dist/contracts/teams.d.ts +86 -26
- package/dist/contracts/teams.js +90 -31
- package/dist/contracts/tenants.d.ts +135 -0
- package/dist/contracts/tenants.js +120 -0
- package/dist/contracts/test-triggers.d.ts +70 -0
- package/dist/contracts/test-triggers.js +116 -0
- package/dist/contracts/theme-json.js +3 -8
- package/dist/contracts/transfers.d.ts +1 -0
- package/dist/contracts/transfers.js +3 -2
- package/dist/contracts/usage.d.ts +209 -0
- package/dist/contracts/usage.js +124 -12
- package/dist/contracts/variables.d.ts +2 -2
- package/dist/contracts/variables.js +9 -13
- package/dist/contracts/webhooks.d.ts +13 -5
- package/dist/contracts/webhooks.js +3 -1
- package/dist/contracts/zero.d.ts +72 -81
- package/dist/contracts/zero.js +80 -78
- package/dist/dashboard-paths/index.d.ts +24 -21
- package/dist/dashboard-paths/index.js +35 -47
- package/dist/dashboard-paths/route-reservations.generated.d.ts +2 -0
- package/dist/dashboard-paths/route-reservations.generated.js +36 -0
- package/dist/docs/agent-arrival.d.ts +92 -0
- package/dist/docs/agent-arrival.js +227 -0
- package/dist/docs/agent-output-policy.d.ts +6 -0
- package/dist/docs/agent-output-policy.js +22 -0
- package/dist/docs/agent-prose.d.ts +12 -18
- package/dist/docs/agent-prose.js +73 -51
- package/dist/docs/agent-setup.d.ts +72 -41
- package/dist/docs/agent-setup.js +339 -436
- package/dist/docs/catalog.d.ts +153 -95
- package/dist/docs/catalog.js +163 -48
- package/dist/docs/error-docs.d.ts +2098 -1
- package/dist/docs/error-docs.js +421 -144
- package/dist/docs/index-build.d.ts +0 -1
- package/dist/docs/index-build.js +2 -3
- package/dist/docs/page-context-prompt.d.ts +77 -0
- package/dist/docs/page-context-prompt.js +131 -0
- package/dist/docs/reference-urls.d.ts +46 -0
- package/dist/docs/reference-urls.js +79 -0
- package/dist/docs/search.d.ts +6 -8
- package/dist/docs/search.js +10 -13
- package/dist/docs/skill-distribution.d.ts +4 -1
- package/dist/docs/skill-distribution.js +10 -5
- package/dist/docs/skills.d.ts +120 -120
- package/dist/docs/skills.js +121 -73
- package/dist/docs/start-prompts.d.ts +45 -0
- package/dist/docs/start-prompts.js +62 -0
- package/dist/domain-exploration.js +9 -13
- package/dist/og-template.d.ts +56 -0
- package/dist/og-template.js +56 -0
- package/dist/slug-policy/index.js +5 -11
- package/dist/test-helpers/fetch-stub.js +1 -0
- package/dist/utils/browser-credential.d.ts +13 -6
- package/dist/utils/browser-credential.js +14 -7
- package/dist/utils/build-settings.d.ts +21 -1
- package/dist/utils/build-settings.js +133 -15
- package/dist/utils/canonical-json.d.ts +3 -5
- package/dist/utils/canonical-json.js +4 -5
- package/dist/utils/cast-transport.d.ts +5 -17
- package/dist/utils/cast-transport.js +6 -19
- package/dist/utils/claim-token.js +1 -2
- package/dist/utils/comment-avatars.js +4 -6
- package/dist/utils/concurrency.js +3 -3
- package/dist/utils/content-type.d.ts +7 -6
- package/dist/utils/content-type.js +73 -51
- package/dist/utils/credential-policy.d.ts +50 -6
- package/dist/utils/credential-policy.js +126 -59
- package/dist/utils/dns-instructions.js +9 -9
- package/dist/utils/egress-policy.fixtures.json +1 -1
- package/dist/utils/error-code.js +1 -0
- package/dist/utils/generate-space-name.d.ts +3 -8
- package/dist/utils/generate-space-name.js +3 -8
- package/dist/utils/grant-decision.fixtures.json +2 -2
- package/dist/utils/grants.d.ts +0 -1
- package/dist/utils/grants.js +7 -8
- package/dist/utils/gravatar.d.ts +2 -4
- package/dist/utils/gravatar.js +6 -12
- package/dist/utils/id-hints.js +14 -23
- package/dist/utils/idempotency.d.ts +3 -3
- package/dist/utils/idempotency.js +6 -7
- package/dist/utils/local-space-state.d.ts +23 -26
- package/dist/utils/local-space-state.js +46 -46
- package/dist/utils/oauth-signed-query.d.ts +3 -5
- package/dist/utils/oauth-signed-query.js +6 -9
- package/dist/utils/one-shot-replay.d.ts +7 -6
- package/dist/utils/one-shot-replay.js +3 -5
- package/dist/utils/page-colors.d.ts +15 -19
- package/dist/utils/page-colors.js +23 -45
- package/dist/utils/page-fonts.d.ts +1 -1
- package/dist/utils/page-fonts.js +8 -20
- package/dist/utils/page-preview.d.ts +0 -1
- package/dist/utils/page-preview.js +0 -1
- package/dist/utils/pages.d.ts +33 -3
- package/dist/utils/pages.js +83 -30
- package/dist/utils/privacy-regions.d.ts +19 -0
- package/dist/utils/privacy-regions.js +91 -0
- package/dist/utils/publish-form-data.d.ts +4 -5
- package/dist/utils/publish-form-data.js +2 -3
- package/dist/utils/publish-policy.d.ts +11 -17
- package/dist/utils/publish-policy.fixtures.json +11 -5
- package/dist/utils/publish-policy.js +65 -110
- package/dist/utils/query-client.d.ts +2 -0
- package/dist/utils/query-client.js +10 -1
- package/dist/utils/runtime-paths.d.ts +4 -4
- package/dist/utils/runtime-paths.js +6 -8
- package/dist/utils/runtime-upload.d.ts +9 -0
- package/dist/utils/runtime-upload.js +12 -0
- package/dist/utils/secure-local-file.d.ts +3 -3
- package/dist/utils/secure-local-file.js +23 -40
- package/dist/utils/space-config.d.ts +12 -15
- package/dist/utils/space-config.js +13 -16
- package/dist/utils/static-runtime-policy.d.ts +10 -7
- package/dist/utils/static-runtime-policy.fixtures.json +38 -41
- package/dist/utils/static-runtime-policy.generated.d.ts +16 -0
- package/dist/utils/static-runtime-policy.generated.js +70 -0
- package/dist/utils/static-runtime-policy.js +31 -132
- package/dist/utils/storage-policy.js +1 -2
- package/dist/utils/upload-session.d.ts +4 -1
- package/dist/utils/upload-session.js +41 -19
- package/dist/utils/version-path.js +11 -19
- package/dist/utils/wpcom-auth-redirects.d.ts +5 -14
- package/dist/utils/wpcom-auth-redirects.js +1 -4
- package/dist/vocabulary.d.ts +13 -13
- package/dist/vocabulary.js +52 -27
- package/package.json +15 -18
- package/dist/agents/client-registry.d.ts +0 -22
- package/dist/agents/client-registry.js +0 -41
- package/dist/docs/agent-handoff-document.d.ts +0 -15
- package/dist/docs/agent-handoff-document.js +0 -180
- package/dist/docs/agent-solutions.d.ts +0 -110
- package/dist/docs/agent-solutions.js +0 -183
- package/dist/utils/query-keys.d.ts +0 -84
- package/dist/utils/query-keys.js +0 -108
|
@@ -3,10 +3,8 @@ import { AnyObjectSchema, CursorPaginationSchema } from "./common.js";
|
|
|
3
3
|
export const superadminActivityListQuerySchema = z.object({
|
|
4
4
|
limit: z.coerce.number().int().min(1).max(100).default(50),
|
|
5
5
|
});
|
|
6
|
-
// Cross-tenant reader over the `activity_events` audit log.
|
|
7
|
-
//
|
|
8
|
-
// the operator's view of the same rows. At least one selective filter is
|
|
9
|
-
// required (see the route) so a query lands on one of the table's indexes
|
|
6
|
+
// Cross-tenant reader over the `activity_events` audit log. At least one
|
|
7
|
+
// selective filter is required (see the route) so a query lands on an index
|
|
10
8
|
// instead of scanning the whole log.
|
|
11
9
|
export const superadminActivityEventQuerySchema = z.object({
|
|
12
10
|
spaceId: z.string().min(1).optional().describe("Filter to events for one Space, cross-tenant."),
|
|
@@ -21,7 +19,7 @@ export const superadminActivityEventQuerySchema = z.object({
|
|
|
21
19
|
.optional()
|
|
22
20
|
.describe("Owning principal id; must be paired with principalType."),
|
|
23
21
|
actorType: z
|
|
24
|
-
.enum(["user", "api_key", "oauth_client", "anonymous_claim", "system"])
|
|
22
|
+
.enum(["user", "api_key", "partner_token", "oauth_client", "anonymous_claim", "system"])
|
|
25
23
|
.optional()
|
|
26
24
|
.describe("Actor kind; must be paired with actorId."),
|
|
27
25
|
actorId: z.string().min(1).optional().describe("Actor id; must be paired with actorType."),
|
|
@@ -30,8 +28,8 @@ export const superadminActivityEventQuerySchema = z.object({
|
|
|
30
28
|
limit: z.coerce.number().int().min(1).max(200).default(50),
|
|
31
29
|
cursor: z.string().min(1).optional(),
|
|
32
30
|
});
|
|
33
|
-
//
|
|
34
|
-
//
|
|
31
|
+
// `message` and `details` are the raw audit payloads, not the tenant-facing
|
|
32
|
+
// projection.
|
|
35
33
|
export const SuperadminActivityEventSchema = z.object({
|
|
36
34
|
id: z.string(),
|
|
37
35
|
sequence: z.number().int().nonnegative(),
|
|
@@ -57,7 +55,7 @@ export const SuperadminLatestUserSchema = z.object({
|
|
|
57
55
|
role: z.string().nullable(),
|
|
58
56
|
banned: z.boolean(),
|
|
59
57
|
isAutomattician: z.boolean(),
|
|
60
|
-
|
|
58
|
+
automatticBetaGrant: z.boolean(),
|
|
61
59
|
betaEnrolledAt: z.string().datetime().nullable(),
|
|
62
60
|
createdAt: z.string().datetime(),
|
|
63
61
|
updatedAt: z.string().datetime(),
|
|
@@ -67,28 +65,6 @@ export const SuperadminLatestUserSchema = z.object({
|
|
|
67
65
|
export const SuperadminLatestUserListSchema = z.object({
|
|
68
66
|
users: z.array(SuperadminLatestUserSchema),
|
|
69
67
|
});
|
|
70
|
-
export const SuperadminLatestSpaceSchema = z.object({
|
|
71
|
-
id: z.string(),
|
|
72
|
-
title: z.string(),
|
|
73
|
-
slug: z.string(),
|
|
74
|
-
status: z.string(),
|
|
75
|
-
tenantId: z.string(),
|
|
76
|
-
tenantName: z.string().nullable(),
|
|
77
|
-
teamId: z.string().nullable(),
|
|
78
|
-
teamSlug: z.string().nullable(),
|
|
79
|
-
teamName: z.string().nullable(),
|
|
80
|
-
externalCustomerId: z.string().nullable(),
|
|
81
|
-
siteId: z.string().nullable(),
|
|
82
|
-
siteStatus: z.string().nullable(),
|
|
83
|
-
liveHostname: z.string().nullable(),
|
|
84
|
-
disabledAt: z.string().datetime().nullable(),
|
|
85
|
-
deletedAt: z.string().datetime().nullable(),
|
|
86
|
-
createdAt: z.string().datetime(),
|
|
87
|
-
updatedAt: z.string().datetime(),
|
|
88
|
-
});
|
|
89
|
-
export const SuperadminLatestSpaceListSchema = z.object({
|
|
90
|
-
spaces: z.array(SuperadminLatestSpaceSchema),
|
|
91
|
-
});
|
|
92
68
|
export const SuperadminLatestVersionSchema = z.object({
|
|
93
69
|
id: z.string(),
|
|
94
70
|
number: z.number().int().nullable(),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const superadminEmailStatusValues: readonly ["all", "scheduled", "sent", "suppressed", "delivered", "bounced", "dropped", "complained", "opened", "clicked", "failed"];
|
|
3
3
|
export declare const superadminEmailCategoryValues: readonly ["transactional", "announcements", "offers", "system", "invites"];
|
|
4
|
+
export declare const emailMailboxSchema: z.ZodString;
|
|
4
5
|
export declare const superadminEmailListQuerySchema: z.ZodObject<{
|
|
5
6
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
6
7
|
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
@@ -18,6 +18,22 @@ export const superadminEmailStatusValues = [
|
|
|
18
18
|
// Delivery category is provider-facing telemetry/routing. Recipient control is
|
|
19
19
|
// modeled independently by preferenceTopic; essential auth has no topic.
|
|
20
20
|
export const superadminEmailCategoryValues = emailCategoryValues;
|
|
21
|
+
const bareEmailAddressSchema = z.string().email();
|
|
22
|
+
const namedMailboxPattern = /^(?:"(?:[^"\\\r\n]|\\.)*"|[^<>\r\n]+)\s*<([^<>\r\n]+)>$/;
|
|
23
|
+
// The stored sender is the provider-facing RFC mailbox header, not necessarily
|
|
24
|
+
// a bare addr-spec. Resend accepts both `hello@example.com` and
|
|
25
|
+
// `Spacefast <hello@example.com>`; the operator API must preserve that value.
|
|
26
|
+
export const emailMailboxSchema = z
|
|
27
|
+
.string()
|
|
28
|
+
.trim()
|
|
29
|
+
.min(1)
|
|
30
|
+
.max(320)
|
|
31
|
+
.refine((value) => {
|
|
32
|
+
if (bareEmailAddressSchema.safeParse(value).success)
|
|
33
|
+
return true;
|
|
34
|
+
const address = namedMailboxPattern.exec(value)?.[1]?.trim();
|
|
35
|
+
return address !== undefined && bareEmailAddressSchema.safeParse(address).success;
|
|
36
|
+
}, "Invalid email mailbox.");
|
|
21
37
|
export const superadminEmailListQuerySchema = z.object({
|
|
22
38
|
limit: z.coerce.number().int().min(1).max(100).default(25),
|
|
23
39
|
offset: z.coerce.number().int().min(0).default(0),
|
|
@@ -75,7 +91,7 @@ export const SuperadminEmailSchema = z.object({
|
|
|
75
91
|
})
|
|
76
92
|
.nullable(),
|
|
77
93
|
to: z.string().email(),
|
|
78
|
-
from:
|
|
94
|
+
from: emailMailboxSchema,
|
|
79
95
|
subject: z.string(),
|
|
80
96
|
text: z.string(),
|
|
81
97
|
html: z.string().nullable(),
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const superadminRuntimeRevisionSchema: z.ZodString;
|
|
3
|
+
export declare const SuperadminRuntimeReleaseSchema: z.ZodObject<{
|
|
4
|
+
revision: z.ZodString;
|
|
5
|
+
tag: z.ZodString;
|
|
6
|
+
zipUrl: z.ZodString;
|
|
7
|
+
md5: z.ZodString;
|
|
8
|
+
nativeSha256: z.ZodString;
|
|
9
|
+
admissionPercent: z.ZodNumber;
|
|
10
|
+
promotedAt: z.ZodString;
|
|
11
|
+
current: z.ZodBoolean;
|
|
12
|
+
}, z.core.$strict>;
|
|
13
|
+
export declare const SuperadminRuntimeFleetBoxSchema: z.ZodObject<{
|
|
14
|
+
kind: z.ZodEnum<{
|
|
15
|
+
space: "space";
|
|
16
|
+
pool: "pool";
|
|
17
|
+
}>;
|
|
18
|
+
id: z.ZodString;
|
|
19
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
20
|
+
title: z.ZodNullable<z.ZodString>;
|
|
21
|
+
reportedRevision: z.ZodNullable<z.ZodString>;
|
|
22
|
+
pinnedRevision: z.ZodNullable<z.ZodString>;
|
|
23
|
+
desiredRevision: z.ZodNullable<z.ZodString>;
|
|
24
|
+
reportedAt: z.ZodNullable<z.ZodString>;
|
|
25
|
+
syncState: z.ZodEnum<{
|
|
26
|
+
failed: "failed";
|
|
27
|
+
running: "running";
|
|
28
|
+
pending: "pending";
|
|
29
|
+
idle: "idle";
|
|
30
|
+
}>;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
export declare const SuperadminRuntimeStatusSchema: z.ZodObject<{
|
|
33
|
+
checkedAt: z.ZodString;
|
|
34
|
+
releaseRepo: z.ZodString;
|
|
35
|
+
latest: z.ZodNullable<z.ZodObject<{
|
|
36
|
+
revision: z.ZodString;
|
|
37
|
+
tag: z.ZodString;
|
|
38
|
+
zipUrl: z.ZodString;
|
|
39
|
+
md5: z.ZodString;
|
|
40
|
+
nativeSha256: z.ZodString;
|
|
41
|
+
admissionPercent: z.ZodNumber;
|
|
42
|
+
promotedAt: z.ZodString;
|
|
43
|
+
current: z.ZodBoolean;
|
|
44
|
+
}, z.core.$strict>>;
|
|
45
|
+
releases: z.ZodArray<z.ZodObject<{
|
|
46
|
+
revision: z.ZodString;
|
|
47
|
+
tag: z.ZodString;
|
|
48
|
+
zipUrl: z.ZodString;
|
|
49
|
+
md5: z.ZodString;
|
|
50
|
+
nativeSha256: z.ZodString;
|
|
51
|
+
admissionPercent: z.ZodNumber;
|
|
52
|
+
promotedAt: z.ZodString;
|
|
53
|
+
current: z.ZodBoolean;
|
|
54
|
+
}, z.core.$strict>>;
|
|
55
|
+
available: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
56
|
+
revision: z.ZodString;
|
|
57
|
+
tag: z.ZodString;
|
|
58
|
+
publishedAt: z.ZodNullable<z.ZodString>;
|
|
59
|
+
promoted: z.ZodBoolean;
|
|
60
|
+
current: z.ZodBoolean;
|
|
61
|
+
}, z.core.$strict>>>;
|
|
62
|
+
fleet: z.ZodNullable<z.ZodObject<{
|
|
63
|
+
spaces: z.ZodObject<{
|
|
64
|
+
total: z.ZodNumber;
|
|
65
|
+
current: z.ZodNumber;
|
|
66
|
+
diverged: z.ZodNumber;
|
|
67
|
+
pinned: z.ZodNumber;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
pool: z.ZodObject<{
|
|
70
|
+
total: z.ZodNumber;
|
|
71
|
+
current: z.ZodNumber;
|
|
72
|
+
diverged: z.ZodNumber;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
divergedBoxes: z.ZodArray<z.ZodObject<{
|
|
75
|
+
kind: z.ZodEnum<{
|
|
76
|
+
space: "space";
|
|
77
|
+
pool: "pool";
|
|
78
|
+
}>;
|
|
79
|
+
id: z.ZodString;
|
|
80
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
81
|
+
title: z.ZodNullable<z.ZodString>;
|
|
82
|
+
reportedRevision: z.ZodNullable<z.ZodString>;
|
|
83
|
+
pinnedRevision: z.ZodNullable<z.ZodString>;
|
|
84
|
+
desiredRevision: z.ZodNullable<z.ZodString>;
|
|
85
|
+
reportedAt: z.ZodNullable<z.ZodString>;
|
|
86
|
+
syncState: z.ZodEnum<{
|
|
87
|
+
failed: "failed";
|
|
88
|
+
running: "running";
|
|
89
|
+
pending: "pending";
|
|
90
|
+
idle: "idle";
|
|
91
|
+
}>;
|
|
92
|
+
}, z.core.$strict>>;
|
|
93
|
+
pinnedSpaces: z.ZodArray<z.ZodObject<{
|
|
94
|
+
kind: z.ZodEnum<{
|
|
95
|
+
space: "space";
|
|
96
|
+
pool: "pool";
|
|
97
|
+
}>;
|
|
98
|
+
id: z.ZodString;
|
|
99
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
100
|
+
title: z.ZodNullable<z.ZodString>;
|
|
101
|
+
reportedRevision: z.ZodNullable<z.ZodString>;
|
|
102
|
+
pinnedRevision: z.ZodNullable<z.ZodString>;
|
|
103
|
+
desiredRevision: z.ZodNullable<z.ZodString>;
|
|
104
|
+
reportedAt: z.ZodNullable<z.ZodString>;
|
|
105
|
+
syncState: z.ZodEnum<{
|
|
106
|
+
failed: "failed";
|
|
107
|
+
running: "running";
|
|
108
|
+
pending: "pending";
|
|
109
|
+
idle: "idle";
|
|
110
|
+
}>;
|
|
111
|
+
}, z.core.$strict>>;
|
|
112
|
+
}, z.core.$strip>>;
|
|
113
|
+
}, z.core.$strict>;
|
|
114
|
+
export declare const superadminRuntimePreviewBodySchema: z.ZodObject<{
|
|
115
|
+
revision: z.ZodString;
|
|
116
|
+
}, z.core.$strict>;
|
|
117
|
+
export declare const SuperadminRuntimePreviewActionSchema: z.ZodObject<{
|
|
118
|
+
action: z.ZodEnum<{
|
|
119
|
+
rollback: "rollback";
|
|
120
|
+
retry: "retry";
|
|
121
|
+
promote: "promote";
|
|
122
|
+
}>;
|
|
123
|
+
admissionPercent: z.ZodUnion<readonly [z.ZodLiteral<10>, z.ZodLiteral<50>, z.ZodLiteral<100>]>;
|
|
124
|
+
affected: z.ZodObject<{
|
|
125
|
+
spaces: z.ZodNumber;
|
|
126
|
+
pool: z.ZodNumber;
|
|
127
|
+
}, z.core.$strict>;
|
|
128
|
+
}, z.core.$strict>;
|
|
129
|
+
export declare const SuperadminRuntimePreviewSchema: z.ZodObject<{
|
|
130
|
+
revision: z.ZodString;
|
|
131
|
+
tag: z.ZodString;
|
|
132
|
+
zipUrl: z.ZodString;
|
|
133
|
+
md5: z.ZodString;
|
|
134
|
+
nativeSha256: z.ZodString;
|
|
135
|
+
previouslyPromotedAt: z.ZodNullable<z.ZodString>;
|
|
136
|
+
currentRevision: z.ZodNullable<z.ZodString>;
|
|
137
|
+
actions: z.ZodArray<z.ZodObject<{
|
|
138
|
+
action: z.ZodEnum<{
|
|
139
|
+
rollback: "rollback";
|
|
140
|
+
retry: "retry";
|
|
141
|
+
promote: "promote";
|
|
142
|
+
}>;
|
|
143
|
+
admissionPercent: z.ZodUnion<readonly [z.ZodLiteral<10>, z.ZodLiteral<50>, z.ZodLiteral<100>]>;
|
|
144
|
+
affected: z.ZodObject<{
|
|
145
|
+
spaces: z.ZodNumber;
|
|
146
|
+
pool: z.ZodNumber;
|
|
147
|
+
}, z.core.$strict>;
|
|
148
|
+
}, z.core.$strict>>;
|
|
149
|
+
}, z.core.$strict>;
|
|
150
|
+
export declare const superadminRuntimePromoteBodySchema: z.ZodObject<{
|
|
151
|
+
revision: z.ZodString;
|
|
152
|
+
confirmRevision: z.ZodString;
|
|
153
|
+
action: z.ZodEnum<{
|
|
154
|
+
rollback: "rollback";
|
|
155
|
+
retry: "retry";
|
|
156
|
+
promote: "promote";
|
|
157
|
+
}>;
|
|
158
|
+
admissionPercent: z.ZodUnion<readonly [z.ZodLiteral<10>, z.ZodLiteral<50>, z.ZodLiteral<100>]>;
|
|
159
|
+
}, z.core.$strict>;
|
|
160
|
+
export declare const SuperadminRuntimeMutationSchema: z.ZodObject<{
|
|
161
|
+
revision: z.ZodString;
|
|
162
|
+
admissionPercent: z.ZodNumber;
|
|
163
|
+
accepted: z.ZodNumber;
|
|
164
|
+
queued: z.ZodNumber;
|
|
165
|
+
}, z.core.$strict>;
|
|
166
|
+
export declare const superadminRuntimeAdmissionBodySchema: z.ZodObject<{
|
|
167
|
+
admissionPercent: z.ZodUnion<readonly [z.ZodLiteral<10>, z.ZodLiteral<50>, z.ZodLiteral<100>]>;
|
|
168
|
+
confirm: z.ZodLiteral<true>;
|
|
169
|
+
}, z.core.$strict>;
|
|
170
|
+
export declare const superadminRuntimeSyncBodySchema: z.ZodObject<{
|
|
171
|
+
spaceIds: z.ZodArray<z.ZodString>;
|
|
172
|
+
action: z.ZodEnum<{
|
|
173
|
+
pin: "pin";
|
|
174
|
+
sync: "sync";
|
|
175
|
+
unpin: "unpin";
|
|
176
|
+
}>;
|
|
177
|
+
revision: z.ZodOptional<z.ZodString>;
|
|
178
|
+
force: z.ZodOptional<z.ZodBoolean>;
|
|
179
|
+
}, z.core.$strict>;
|
|
180
|
+
export declare const SuperadminRuntimeSyncResponseSchema: z.ZodObject<{
|
|
181
|
+
accepted: z.ZodNumber;
|
|
182
|
+
queued: z.ZodNumber;
|
|
183
|
+
spaces: z.ZodArray<z.ZodObject<{
|
|
184
|
+
spaceId: z.ZodString;
|
|
185
|
+
targetRevision: z.ZodNullable<z.ZodString>;
|
|
186
|
+
desiredRevision: z.ZodNullable<z.ZodString>;
|
|
187
|
+
state: z.ZodEnum<{
|
|
188
|
+
failed: "failed";
|
|
189
|
+
running: "running";
|
|
190
|
+
pending: "pending";
|
|
191
|
+
idle: "idle";
|
|
192
|
+
}>;
|
|
193
|
+
}, z.core.$strict>>;
|
|
194
|
+
}, z.core.$strict>;
|
|
195
|
+
export type SuperadminRuntimeStatus = z.infer<typeof SuperadminRuntimeStatusSchema>;
|
|
196
|
+
export type SuperadminRuntimePreview = z.infer<typeof SuperadminRuntimePreviewSchema>;
|
|
197
|
+
export type SuperadminRuntimePreviewAction = z.infer<typeof SuperadminRuntimePreviewActionSchema>;
|
|
198
|
+
export type SuperadminRuntimeMutation = z.infer<typeof SuperadminRuntimeMutationSchema>;
|
|
199
|
+
export type SuperadminRuntimeSyncResponse = z.infer<typeof SuperadminRuntimeSyncResponseSchema>;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const superadminRuntimeRevisionSchema = z.string().trim().min(1).max(191);
|
|
3
|
+
export const SuperadminRuntimeReleaseSchema = z
|
|
4
|
+
.object({
|
|
5
|
+
revision: z.string(),
|
|
6
|
+
tag: z.string(),
|
|
7
|
+
zipUrl: z.string(),
|
|
8
|
+
md5: z.string(),
|
|
9
|
+
nativeSha256: z.string(),
|
|
10
|
+
admissionPercent: z.number().int().min(0).max(100),
|
|
11
|
+
promotedAt: z.string(),
|
|
12
|
+
current: z.boolean(),
|
|
13
|
+
})
|
|
14
|
+
.strict();
|
|
15
|
+
export const SuperadminRuntimeFleetBoxSchema = z
|
|
16
|
+
.object({
|
|
17
|
+
kind: z.enum(["space", "pool"]),
|
|
18
|
+
id: z.string(),
|
|
19
|
+
slug: z.string().nullable(),
|
|
20
|
+
title: z.string().nullable(),
|
|
21
|
+
reportedRevision: z.string().nullable(),
|
|
22
|
+
pinnedRevision: z.string().nullable(),
|
|
23
|
+
desiredRevision: z.string().nullable(),
|
|
24
|
+
reportedAt: z.string().datetime().nullable(),
|
|
25
|
+
syncState: z.enum(["idle", "pending", "running", "failed"]),
|
|
26
|
+
})
|
|
27
|
+
.strict();
|
|
28
|
+
export const SuperadminRuntimeStatusSchema = z
|
|
29
|
+
.object({
|
|
30
|
+
checkedAt: z.string().datetime(),
|
|
31
|
+
releaseRepo: z.string(),
|
|
32
|
+
latest: SuperadminRuntimeReleaseSchema.nullable(),
|
|
33
|
+
releases: z.array(SuperadminRuntimeReleaseSchema),
|
|
34
|
+
available: z
|
|
35
|
+
.array(z
|
|
36
|
+
.object({
|
|
37
|
+
revision: z.string(),
|
|
38
|
+
tag: z.string(),
|
|
39
|
+
publishedAt: z.string().datetime().nullable(),
|
|
40
|
+
promoted: z.boolean(),
|
|
41
|
+
current: z.boolean(),
|
|
42
|
+
})
|
|
43
|
+
.strict())
|
|
44
|
+
.nullable(),
|
|
45
|
+
fleet: z
|
|
46
|
+
.object({
|
|
47
|
+
spaces: z.object({
|
|
48
|
+
total: z.number().int().nonnegative(),
|
|
49
|
+
current: z.number().int().nonnegative(),
|
|
50
|
+
diverged: z.number().int().nonnegative(),
|
|
51
|
+
pinned: z.number().int().nonnegative(),
|
|
52
|
+
}),
|
|
53
|
+
pool: z.object({
|
|
54
|
+
total: z.number().int().nonnegative(),
|
|
55
|
+
current: z.number().int().nonnegative(),
|
|
56
|
+
diverged: z.number().int().nonnegative(),
|
|
57
|
+
}),
|
|
58
|
+
divergedBoxes: z.array(SuperadminRuntimeFleetBoxSchema),
|
|
59
|
+
pinnedSpaces: z.array(SuperadminRuntimeFleetBoxSchema),
|
|
60
|
+
})
|
|
61
|
+
.nullable(),
|
|
62
|
+
})
|
|
63
|
+
.strict();
|
|
64
|
+
export const superadminRuntimePreviewBodySchema = z
|
|
65
|
+
.object({ revision: superadminRuntimeRevisionSchema })
|
|
66
|
+
.strict();
|
|
67
|
+
export const SuperadminRuntimePreviewActionSchema = z
|
|
68
|
+
.object({
|
|
69
|
+
action: z.enum(["promote", "rollback", "retry"]),
|
|
70
|
+
admissionPercent: z.union([z.literal(10), z.literal(50), z.literal(100)]),
|
|
71
|
+
affected: z.object({ spaces: z.number().int(), pool: z.number().int() }).strict(),
|
|
72
|
+
})
|
|
73
|
+
.strict();
|
|
74
|
+
export const SuperadminRuntimePreviewSchema = z
|
|
75
|
+
.object({
|
|
76
|
+
revision: z.string(),
|
|
77
|
+
tag: z.string(),
|
|
78
|
+
zipUrl: z.string(),
|
|
79
|
+
md5: z.string(),
|
|
80
|
+
nativeSha256: z.string(),
|
|
81
|
+
previouslyPromotedAt: z.string().nullable(),
|
|
82
|
+
currentRevision: z.string().nullable(),
|
|
83
|
+
actions: z.array(SuperadminRuntimePreviewActionSchema).min(1),
|
|
84
|
+
})
|
|
85
|
+
.strict();
|
|
86
|
+
export const superadminRuntimePromoteBodySchema = z
|
|
87
|
+
.object({
|
|
88
|
+
revision: superadminRuntimeRevisionSchema,
|
|
89
|
+
confirmRevision: superadminRuntimeRevisionSchema,
|
|
90
|
+
action: z.enum(["promote", "rollback", "retry"]),
|
|
91
|
+
admissionPercent: z.union([z.literal(10), z.literal(50), z.literal(100)]),
|
|
92
|
+
})
|
|
93
|
+
.strict();
|
|
94
|
+
export const SuperadminRuntimeMutationSchema = z
|
|
95
|
+
.object({
|
|
96
|
+
revision: z.string(),
|
|
97
|
+
admissionPercent: z.number().int().min(0).max(100),
|
|
98
|
+
accepted: z.number().int().nonnegative(),
|
|
99
|
+
queued: z.number().int().nonnegative(),
|
|
100
|
+
})
|
|
101
|
+
.strict();
|
|
102
|
+
export const superadminRuntimeAdmissionBodySchema = z
|
|
103
|
+
.object({
|
|
104
|
+
admissionPercent: z.union([z.literal(10), z.literal(50), z.literal(100)]),
|
|
105
|
+
confirm: z.literal(true),
|
|
106
|
+
})
|
|
107
|
+
.strict();
|
|
108
|
+
export const superadminRuntimeSyncBodySchema = z
|
|
109
|
+
.object({
|
|
110
|
+
spaceIds: z.array(z.string().min(1)).min(1).max(100),
|
|
111
|
+
action: z.enum(["sync", "pin", "unpin"]),
|
|
112
|
+
revision: superadminRuntimeRevisionSchema.optional(),
|
|
113
|
+
force: z.boolean().optional(),
|
|
114
|
+
})
|
|
115
|
+
.strict()
|
|
116
|
+
.superRefine((value, context) => {
|
|
117
|
+
if (value.action === "pin" && !value.revision) {
|
|
118
|
+
context.addIssue({ code: "custom", path: ["revision"], message: "Pin requires a revision." });
|
|
119
|
+
}
|
|
120
|
+
if (value.action !== "pin" && value.revision !== undefined) {
|
|
121
|
+
context.addIssue({
|
|
122
|
+
code: "custom",
|
|
123
|
+
path: ["revision"],
|
|
124
|
+
message: "Only pin accepts a revision.",
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
export const SuperadminRuntimeSyncResponseSchema = z
|
|
129
|
+
.object({
|
|
130
|
+
accepted: z.number().int().nonnegative(),
|
|
131
|
+
queued: z.number().int().nonnegative(),
|
|
132
|
+
spaces: z.array(z
|
|
133
|
+
.object({
|
|
134
|
+
spaceId: z.string(),
|
|
135
|
+
targetRevision: z.string().nullable(),
|
|
136
|
+
desiredRevision: z.string().nullable(),
|
|
137
|
+
state: z.enum(["idle", "pending", "running", "failed"]),
|
|
138
|
+
})
|
|
139
|
+
.strict()),
|
|
140
|
+
})
|
|
141
|
+
.strict();
|
|
@@ -9,10 +9,10 @@ export declare const SuperadminSearchHitSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
9
9
|
teamSlug: z.ZodNullable<z.ZodString>;
|
|
10
10
|
status: z.ZodEnum<{
|
|
11
11
|
active: "active";
|
|
12
|
+
failed: "failed";
|
|
12
13
|
provisioning: "provisioning";
|
|
13
14
|
updating: "updating";
|
|
14
15
|
deleting: "deleting";
|
|
15
|
-
failed: "failed";
|
|
16
16
|
}>;
|
|
17
17
|
anonymous: z.ZodBoolean;
|
|
18
18
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -46,15 +46,25 @@ export declare const SuperadminSearchHitSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
46
46
|
ready_pool: "ready_pool";
|
|
47
47
|
degraded: "degraded";
|
|
48
48
|
retired: "retired";
|
|
49
|
+
cleanup_pending: "cleanup_pending";
|
|
49
50
|
}>;
|
|
51
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
52
|
+
kind: z.ZodLiteral<"operation">;
|
|
53
|
+
id: z.ZodString;
|
|
54
|
+
eventType: z.ZodString;
|
|
55
|
+
status: z.ZodString;
|
|
56
|
+
resourceType: z.ZodString;
|
|
57
|
+
resourceId: z.ZodString;
|
|
50
58
|
}, z.core.$strip>, z.ZodObject<{
|
|
51
59
|
kind: z.ZodLiteral<"hostname">;
|
|
52
60
|
hostname: z.ZodString;
|
|
53
61
|
spaceId: z.ZodString;
|
|
54
62
|
matchedBy: z.ZodEnum<{
|
|
55
63
|
domain: "domain";
|
|
64
|
+
retired: "retired";
|
|
56
65
|
hostname: "hostname";
|
|
57
66
|
derived: "derived";
|
|
67
|
+
retained: "retained";
|
|
58
68
|
}>;
|
|
59
69
|
}, z.core.$strip>], "kind">;
|
|
60
70
|
export declare const SuperadminSearchResultSchema: z.ZodObject<{
|
|
@@ -69,10 +79,10 @@ export declare const SuperadminSearchResultSchema: z.ZodObject<{
|
|
|
69
79
|
teamSlug: z.ZodNullable<z.ZodString>;
|
|
70
80
|
status: z.ZodEnum<{
|
|
71
81
|
active: "active";
|
|
82
|
+
failed: "failed";
|
|
72
83
|
provisioning: "provisioning";
|
|
73
84
|
updating: "updating";
|
|
74
85
|
deleting: "deleting";
|
|
75
|
-
failed: "failed";
|
|
76
86
|
}>;
|
|
77
87
|
anonymous: z.ZodBoolean;
|
|
78
88
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -106,15 +116,25 @@ export declare const SuperadminSearchResultSchema: z.ZodObject<{
|
|
|
106
116
|
ready_pool: "ready_pool";
|
|
107
117
|
degraded: "degraded";
|
|
108
118
|
retired: "retired";
|
|
119
|
+
cleanup_pending: "cleanup_pending";
|
|
109
120
|
}>;
|
|
121
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
122
|
+
kind: z.ZodLiteral<"operation">;
|
|
123
|
+
id: z.ZodString;
|
|
124
|
+
eventType: z.ZodString;
|
|
125
|
+
status: z.ZodString;
|
|
126
|
+
resourceType: z.ZodString;
|
|
127
|
+
resourceId: z.ZodString;
|
|
110
128
|
}, z.core.$strip>, z.ZodObject<{
|
|
111
129
|
kind: z.ZodLiteral<"hostname">;
|
|
112
130
|
hostname: z.ZodString;
|
|
113
131
|
spaceId: z.ZodString;
|
|
114
132
|
matchedBy: z.ZodEnum<{
|
|
115
133
|
domain: "domain";
|
|
134
|
+
retired: "retired";
|
|
116
135
|
hostname: "hostname";
|
|
117
136
|
derived: "derived";
|
|
137
|
+
retained: "retained";
|
|
118
138
|
}>;
|
|
119
139
|
}, z.core.$strip>], "kind">>;
|
|
120
140
|
}, z.core.$strip>;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { poolSiteStatus, spaceStatus, tenantStatus } from "./enums.js";
|
|
3
|
-
// The operator omnibox
|
|
4
|
-
//
|
|
5
|
-
// serves. Each hit carries just enough to render a row and route to the
|
|
6
|
-
// resource — the detail routes own the rest.
|
|
3
|
+
// The operator omnibox: one query string over every operator-visible identity.
|
|
4
|
+
// Each hit carries just enough to render a row and route to the resource.
|
|
7
5
|
export const SuperadminSearchHitSchema = z.discriminatedUnion("kind", [
|
|
8
6
|
z.object({
|
|
9
7
|
kind: z.literal("space"),
|
|
@@ -42,13 +40,23 @@ export const SuperadminSearchHitSchema = z.discriminatedUnion("kind", [
|
|
|
42
40
|
primaryHostname: z.string(),
|
|
43
41
|
status: poolSiteStatus,
|
|
44
42
|
}),
|
|
43
|
+
z.object({
|
|
44
|
+
kind: z.literal("operation"),
|
|
45
|
+
id: z.string(),
|
|
46
|
+
eventType: z.string(),
|
|
47
|
+
status: z.string(),
|
|
48
|
+
resourceType: z.string(),
|
|
49
|
+
resourceId: z.string(),
|
|
50
|
+
}),
|
|
45
51
|
// A served hostname resolved to its space: default hostname, custom domain,
|
|
46
|
-
// version host, or branch alias.
|
|
52
|
+
// version host, or branch alias.
|
|
47
53
|
z.object({
|
|
48
54
|
kind: z.literal("hostname"),
|
|
49
55
|
hostname: z.string(),
|
|
50
56
|
spaceId: z.string(),
|
|
51
|
-
|
|
57
|
+
// Mirrors the resolver's full match set (superadmin/investigate.ts):
|
|
58
|
+
// retained/retired hostnames are real lookup outcomes, not errors.
|
|
59
|
+
matchedBy: z.enum(["domain", "hostname", "derived", "retained", "retired"]),
|
|
52
60
|
}),
|
|
53
61
|
]);
|
|
54
62
|
export const SuperadminSearchResultSchema = z.object({
|