@spacefast/common 0.0.26 → 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/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 -1
- package/dist/agents/private-key-oauth.js +124 -33
- 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 +1 -2
- package/dist/brand-assets.js +4 -7
- package/dist/brand.d.ts +17 -0
- package/dist/brand.js +24 -4
- package/dist/config/domains.d.ts +55 -28
- package/dist/config/domains.js +85 -41
- 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 +21 -27
- package/dist/contracts/access.js +33 -64
- package/dist/contracts/activity.d.ts +18 -1
- package/dist/contracts/activity.js +70 -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.js +7 -11
- package/dist/contracts/bootstrap.d.ts +791 -0
- package/dist/contracts/bootstrap.js +51 -0
- package/dist/contracts/builds.d.ts +186 -7
- package/dist/contracts/builds.js +75 -21
- 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 +45 -35
- 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 +18 -29
- 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 +17 -0
- package/dist/contracts/crons.js +33 -15
- 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 +6 -10
- package/dist/contracts/docs.js +5 -13
- package/dist/contracts/domains.d.ts +499 -102
- package/dist/contracts/domains.js +169 -58
- package/dist/contracts/email-preferences.d.ts +3 -3
- package/dist/contracts/email-preferences.js +6 -7
- package/dist/contracts/enums.d.ts +26 -26
- package/dist/contracts/enums.js +61 -54
- package/dist/contracts/error-code-meta.d.ts +269 -7
- package/dist/contracts/error-code-meta.js +80 -5
- package/dist/contracts/error-codes.d.ts +5 -5
- package/dist/contracts/error-codes.js +78 -16
- package/dist/contracts/events.d.ts +100 -20
- package/dist/contracts/events.js +107 -20
- package/dist/contracts/execution.d.ts +47 -66
- package/dist/contracts/execution.js +51 -64
- package/dist/contracts/feature-lifecycle.d.ts +70 -14
- package/dist/contracts/feature-lifecycle.js +86 -15
- package/dist/contracts/features.d.ts +100 -37
- package/dist/contracts/features.js +21 -27
- 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 +218 -211
- package/dist/contracts/functions.js +273 -260
- package/dist/contracts/grant-copy.d.ts +43 -0
- package/dist/contracts/grant-copy.js +44 -0
- package/dist/contracts/grants.d.ts +64 -56
- package/dist/contracts/grants.js +124 -23
- package/dist/contracts/ids.d.ts +4 -1
- package/dist/contracts/ids.js +4 -1
- package/dist/contracts/internal.d.ts +5 -4
- package/dist/contracts/internal.js +12 -3
- package/dist/contracts/mcp.d.ts +17 -0
- package/dist/contracts/mcp.js +23 -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 +11 -5
- package/dist/contracts/pages.d.ts +29 -5
- 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.d.ts +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 +116 -18
- package/dist/contracts/publish-archive.js +6 -3
- package/dist/contracts/push-new.d.ts +4 -4
- package/dist/contracts/quotas.js +3 -3
- package/dist/contracts/realtime.d.ts +52 -0
- package/dist/contracts/realtime.js +54 -0
- package/dist/contracts/repository-connections.d.ts +1 -1
- package/dist/contracts/repository-connections.js +6 -2
- package/dist/contracts/resources.d.ts +105 -14
- package/dist/contracts/resources.js +145 -21
- package/dist/contracts/route-inventory.d.ts +358 -0
- package/dist/contracts/route-inventory.js +141 -0
- package/dist/contracts/runtime-api.d.ts +112 -35
- package/dist/contracts/runtime-api.js +86 -66
- package/dist/contracts/runtime-app.d.ts +11 -21
- 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 +45 -19
- package/dist/contracts/runtime-db.js +85 -20
- package/dist/contracts/runtime-purge.js +3 -5
- package/dist/contracts/runtime-services.d.ts +43 -75
- package/dist/contracts/runtime-services.js +29 -49
- package/dist/contracts/runtime-storage.d.ts +14 -14
- package/dist/contracts/runtime-storage.js +28 -13
- package/dist/contracts/sf-config-v1.d.ts +14 -18
- package/dist/contracts/slugs.js +13 -4
- package/dist/contracts/space-config.d.ts +235 -28
- package/dist/contracts/space-config.js +246 -91
- package/dist/contracts/spaces.d.ts +360 -255
- package/dist/contracts/spaces.js +190 -122
- 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 +435 -186
- package/dist/contracts/superadmin-spaces.js +131 -25
- package/dist/contracts/superadmin-teams.d.ts +3 -0
- package/dist/contracts/superadmin-teams.js +1 -2
- package/dist/contracts/superadmin-tenants.d.ts +627 -6
- package/dist/contracts/superadmin-tenants.js +32 -7
- package/dist/contracts/superadmin.d.ts +98 -16
- package/dist/contracts/superadmin.js +63 -10
- package/dist/contracts/tags.d.ts +85 -58
- package/dist/contracts/tags.js +44 -34
- package/dist/contracts/teams.d.ts +72 -9
- package/dist/contracts/teams.js +84 -25
- 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 +1 -0
- 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 +57 -64
- package/dist/contracts/zero.js +68 -66
- 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 +11 -17
- package/dist/docs/agent-prose.js +62 -37
- package/dist/docs/agent-setup.d.ts +72 -41
- package/dist/docs/agent-setup.js +336 -436
- package/dist/docs/catalog.d.ts +147 -89
- package/dist/docs/catalog.js +157 -42
- package/dist/docs/error-docs.d.ts +2098 -1
- package/dist/docs/error-docs.js +281 -16
- 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 +117 -117
- package/dist/docs/skills.js +120 -72
- 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/utils/browser-credential.d.ts +13 -6
- package/dist/utils/browser-credential.js +14 -7
- package/dist/utils/build-settings.d.ts +16 -0
- package/dist/utils/build-settings.js +63 -17
- package/dist/utils/canonical-json.d.ts +3 -5
- package/dist/utils/canonical-json.js +3 -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 +2 -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 +123 -57
- package/dist/utils/egress-policy.fixtures.json +1 -1
- package/dist/utils/generate-space-name.d.ts +3 -8
- package/dist/utils/generate-space-name.js +3 -8
- package/dist/utils/grants.d.ts +0 -1
- package/dist/utils/grants.js +4 -7
- 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 +15 -15
- package/dist/utils/local-space-state.js +34 -23
- 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 +3 -5
- package/dist/utils/one-shot-replay.js +3 -5
- package/dist/utils/page-colors.d.ts +4 -10
- package/dist/utils/page-colors.js +11 -35
- package/dist/utils/page-fonts.js +6 -11
- package/dist/utils/page-preview.d.ts +0 -1
- package/dist/utils/page-preview.js +0 -1
- package/dist/utils/pages.d.ts +22 -11
- package/dist/utils/pages.js +70 -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 +10 -23
- package/dist/utils/publish-policy.js +63 -116
- 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 +4 -0
- package/dist/utils/runtime-upload.js +5 -0
- package/dist/utils/secure-local-file.d.ts +3 -3
- package/dist/utils/secure-local-file.js +18 -24
- package/dist/utils/space-config.d.ts +11 -14
- package/dist/utils/space-config.js +10 -16
- package/dist/utils/static-runtime-policy.d.ts +5 -8
- 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 +17 -84
- package/dist/utils/storage-policy.js +1 -2
- package/dist/utils/upload-session.js +8 -14
- 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 +7 -7
- package/dist/vocabulary.js +30 -16
- package/package.json +14 -2
- 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
package/dist/contracts/spaces.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { SPACE_SLUG_MAX_LENGTH } from "../slug-policy/index.js";
|
|
3
3
|
import { normalizeVersionPath } from "../utils/version-path.js";
|
|
4
|
-
import { publishedAccessSchema } from "./access.js";
|
|
4
|
+
import { accessRoleSchema, publishedAccessSchema } from "./access.js";
|
|
5
5
|
import { AsyncOperationSchema, baseDiagnosticSchema, CursorPaginationSchema, cursorListQuerySchema, } from "./common.js";
|
|
6
6
|
import { versionStatus, spaceStatus } from "./enums.js";
|
|
7
|
+
import { runtimeInternalArtifactPath } from "./execution.js";
|
|
7
8
|
import { uploadInstructionsSchema, manifestFileSchema } from "./internal.js";
|
|
8
|
-
import { VersionSchema, PublishSourceSchema, SpaceSchema, spaceSettingsDigestSchema, } from "./resources.js";
|
|
9
|
+
import { VersionSchema, PublishSourceSchema, SpaceSchema, spaceGitSchema, spaceSettingsDigestSchema, } from "./resources.js";
|
|
9
10
|
import { runtimeAppSchema } from "./runtime-app.js";
|
|
10
11
|
import { SPACE_CONFIG_ACCEPTED_FILES, spaceConfigSchema, spacePlacementConfigSchema, } from "./space-config.js";
|
|
11
12
|
import { principalIdSchema } from "./transfers.js";
|
|
12
13
|
export const VERSION_BUILD_LOG_MAX_LENGTH = 512 * 1024;
|
|
13
|
-
// Capacity accounting for the provider site a space runs on. A space IS a
|
|
14
|
-
//
|
|
15
|
-
//
|
|
14
|
+
// Capacity accounting for the provider site a space runs on. A space IS a site,
|
|
15
|
+
// so the only question is storage, not occupancy. Warm-pool inventory rows carry
|
|
16
|
+
// the same shape before a space adopts them.
|
|
16
17
|
export const SpaceCapacitySchema = z
|
|
17
18
|
.object({
|
|
18
19
|
storageBytes: z
|
|
@@ -23,31 +24,6 @@ export const SpaceCapacitySchema = z
|
|
|
23
24
|
.describe("Storage budget for the space in bytes."),
|
|
24
25
|
})
|
|
25
26
|
.describe("Capacity accounting for a space's provider site.");
|
|
26
|
-
export const SpacePressureSchema = z
|
|
27
|
-
.object({
|
|
28
|
-
ewmaLimitedPct: z.number().nonnegative().optional(),
|
|
29
|
-
ewma429: z.number().nonnegative().optional(),
|
|
30
|
-
ewma429PerMin: z.number().nonnegative().optional(),
|
|
31
|
-
ewmaWorkersMax: z.number().nonnegative().optional(),
|
|
32
|
-
ewmaCpuPct: z.number().nonnegative().optional(),
|
|
33
|
-
lastSampleAt: z.string().datetime().optional(),
|
|
34
|
-
consecutivePressured: z.number().int().nonnegative().optional(),
|
|
35
|
-
consecutiveClean: z.number().int().nonnegative().optional(),
|
|
36
|
-
// Monotonic CAS token shared by explicit operator hold actions and the
|
|
37
|
-
// pressure sampler. Every durable hold transition advances it, including
|
|
38
|
-
// transitions that restore a prior timestamp.
|
|
39
|
-
placementHoldRevision: z.number().int().nonnegative().optional(),
|
|
40
|
-
// Provenance stamp for the sampler's automatic hold: set on trip to the
|
|
41
|
-
// exact hold instant it wrote, so release only clears holds the pressure
|
|
42
|
-
// pipeline itself set — never an operator-set placement hold.
|
|
43
|
-
pressureHoldUntil: z.string().datetime().optional(),
|
|
44
|
-
// Last time a bulk-lane engine job on this space reported activity via the
|
|
45
|
-
// job callbacks (runtime/callback-events.ts); the sampler discounts the
|
|
46
|
-
// CPU signal while this is within the sampling window.
|
|
47
|
-
lastBulkLaneActivityAt: z.string().datetime().optional(),
|
|
48
|
-
})
|
|
49
|
-
.passthrough()
|
|
50
|
-
.describe("Placement pressure signals computed outside the request path.");
|
|
51
27
|
export const spaceClaimReceiptSchema = z.object({
|
|
52
28
|
key: z
|
|
53
29
|
.string()
|
|
@@ -56,7 +32,7 @@ export const spaceClaimReceiptSchema = z.object({
|
|
|
56
32
|
url: z
|
|
57
33
|
.string()
|
|
58
34
|
.url()
|
|
59
|
-
.describe("The site door: the live URL with the space key in /__/<key> form. Opening it exchanges the key for a private view session and lands on the site.
|
|
35
|
+
.describe("The site door: the live URL with the space key in /__/<key> form. Opening it exchanges the key for a private view session and lands on the site. It is the same key in URL form, so share it as carefully as the key."),
|
|
60
36
|
claimUrl: z
|
|
61
37
|
.string()
|
|
62
38
|
.url()
|
|
@@ -68,16 +44,16 @@ export const SpaceCreateResponseSchema = z.object({
|
|
|
68
44
|
access: publishedAccessSchema,
|
|
69
45
|
claim: spaceClaimReceiptSchema.optional(),
|
|
70
46
|
});
|
|
71
|
-
//
|
|
72
|
-
// Diagnostic shape (contracts/common.ts) plus persistence identity.
|
|
47
|
+
// The shared Diagnostic shape (contracts/common.ts) plus persistence identity.
|
|
73
48
|
export const spaceDiagnosticSchema = baseDiagnosticSchema.extend({
|
|
74
49
|
id: z.string().describe("Stable diagnostic record id."),
|
|
75
50
|
versionId: z.string().describe("Version the diagnostic was recorded against."),
|
|
76
51
|
createdAt: z.string().datetime(),
|
|
77
52
|
});
|
|
53
|
+
// The current diagnostic set for a space, returned whole: the route takes no
|
|
54
|
+
// query at all, so there is no cursor to advertise.
|
|
78
55
|
export const spaceDiagnosticListResponseSchema = z.object({
|
|
79
56
|
data: z.array(spaceDiagnosticSchema),
|
|
80
|
-
pagination: CursorPaginationSchema,
|
|
81
57
|
});
|
|
82
58
|
export const principalRefInputSchema = z.object({
|
|
83
59
|
type: z.enum(["team", "external"]).describe("Owning principal kind."),
|
|
@@ -129,6 +105,10 @@ export const spacePatchSchema = z
|
|
|
129
105
|
.boolean()
|
|
130
106
|
.optional()
|
|
131
107
|
.describe("Hide the live production site from search engines. This applies only to live hostnames of claimed spaces. Preview and version hostnames are always noindex."),
|
|
108
|
+
pinned: z
|
|
109
|
+
.boolean()
|
|
110
|
+
.optional()
|
|
111
|
+
.describe("Pin the space to the top of its team's space list, for everyone on the team. This is presentation only: it never changes what the space serves."),
|
|
132
112
|
})
|
|
133
113
|
.strict()
|
|
134
114
|
.superRefine((value, ctx) => {
|
|
@@ -147,10 +127,8 @@ export const spacePatchSchema = z
|
|
|
147
127
|
});
|
|
148
128
|
}
|
|
149
129
|
});
|
|
150
|
-
//
|
|
151
|
-
//
|
|
152
|
-
// with the single decision still missing (`login_required`, `team_required`,
|
|
153
|
-
// `consent_required`).
|
|
130
|
+
// POST /v1/claim returns the one missing decision or commits the claim. The
|
|
131
|
+
// caller repeats the request with each completed decision.
|
|
154
132
|
export const anonymousClaimSchema = z.object({
|
|
155
133
|
key: z
|
|
156
134
|
.string()
|
|
@@ -185,7 +163,9 @@ export const anonymousClaimSharingSummarySchema = z.object({
|
|
|
185
163
|
status: z.enum(["pending", "accepted"]),
|
|
186
164
|
grants: z.array(z.object({
|
|
187
165
|
scope: z.string().startsWith("/"),
|
|
188
|
-
role
|
|
166
|
+
// The person's Grant carries a full access role; narrowing it here
|
|
167
|
+
// used to make a `manager` share unrepresentable in a claim preview.
|
|
168
|
+
role: accessRoleSchema,
|
|
189
169
|
})),
|
|
190
170
|
})),
|
|
191
171
|
links: z.array(z.object({
|
|
@@ -283,9 +263,8 @@ export const spaceClaimReminderSchema = z.object({
|
|
|
283
263
|
export const spaceClaimReminderResponseSchema = z.object({
|
|
284
264
|
accepted: z.literal(true),
|
|
285
265
|
});
|
|
286
|
-
// Shared by spaceVersionCreateSchema and publishRequestSchema
|
|
287
|
-
// same
|
|
288
|
-
// files manifest / snapshot mode" rules on them.
|
|
266
|
+
// Shared by spaceVersionCreateSchema and publishRequestSchema, which enforce
|
|
267
|
+
// the same snapshot-mode rules on these fields.
|
|
289
268
|
const manifestMutationFieldsSchema = {
|
|
290
269
|
deletePaths: z
|
|
291
270
|
.array(z.string().min(1))
|
|
@@ -356,9 +335,10 @@ export const versionLogEntrySchema = z.object({
|
|
|
356
335
|
code: z.string().describe("Stable version.{status} code for the line."),
|
|
357
336
|
message: z.string().describe("Human-readable log line."),
|
|
358
337
|
});
|
|
338
|
+
// A version's log is a bounded record `limit` truncates; it never pages, so it
|
|
339
|
+
// declares no cursor.
|
|
359
340
|
export const versionLogListResponseSchema = z.object({
|
|
360
341
|
data: z.array(versionLogEntrySchema),
|
|
361
|
-
pagination: CursorPaginationSchema,
|
|
362
342
|
});
|
|
363
343
|
export const spaceVersionGeneratedPreviewSchema = z.object({
|
|
364
344
|
kind: z.literal("image"),
|
|
@@ -412,8 +392,21 @@ export const spaceFilesResponseSchema = z.object({
|
|
|
412
392
|
index: spaceVersionFileIndexSchema,
|
|
413
393
|
search: spaceVersionFilesSearchSchema,
|
|
414
394
|
});
|
|
395
|
+
const externalVersionFilePathSchema = z
|
|
396
|
+
.string()
|
|
397
|
+
.min(1)
|
|
398
|
+
.refine((value) => {
|
|
399
|
+
try {
|
|
400
|
+
return !runtimeInternalArtifactPath(normalizeVersionPath(value));
|
|
401
|
+
}
|
|
402
|
+
catch {
|
|
403
|
+
return false;
|
|
404
|
+
}
|
|
405
|
+
}, {
|
|
406
|
+
message: "Path must be version-relative and cannot address runtime-internal artifacts.",
|
|
407
|
+
});
|
|
415
408
|
export const spaceVersionFilePathQuerySchema = z.object({
|
|
416
|
-
path:
|
|
409
|
+
path: externalVersionFilePathSchema,
|
|
417
410
|
});
|
|
418
411
|
/**
|
|
419
412
|
* Which representation of a path the runtime should hand back: `source` is the
|
|
@@ -422,28 +415,17 @@ export const spaceVersionFilePathQuerySchema = z.object({
|
|
|
422
415
|
* absent from `served`.
|
|
423
416
|
*/
|
|
424
417
|
export const spaceVersionFileViewSchema = z.enum(["source", "served"]);
|
|
425
|
-
// Minting is a read, so it rides the URL
|
|
426
|
-
//
|
|
418
|
+
// Minting is a read, so it rides the URL, which has a practical ceiling a JSON
|
|
419
|
+
// body does not. Clients chunk; each chunk is one authorization.
|
|
427
420
|
export const VERSION_FILE_LINKS_MAX_PATHS = 200;
|
|
428
421
|
// Structural admission only. Whether the version HOLDS a path is the runtime's
|
|
429
|
-
// answer, given when the link is followed
|
|
430
|
-
// to check against
|
|
431
|
-
const spaceVersionFileLinkPathSchema =
|
|
432
|
-
.string()
|
|
433
|
-
.min(1)
|
|
434
|
-
.refine((value) => {
|
|
435
|
-
try {
|
|
436
|
-
normalizeVersionPath(value);
|
|
437
|
-
return true;
|
|
438
|
-
}
|
|
439
|
-
catch {
|
|
440
|
-
return false;
|
|
441
|
-
}
|
|
442
|
-
}, { message: "Path must be version-relative, without traversal or control characters." });
|
|
422
|
+
// answer, given when the link is followed; the control plane keeps no catalog
|
|
423
|
+
// to check against.
|
|
424
|
+
const spaceVersionFileLinkPathSchema = externalVersionFilePathSchema;
|
|
443
425
|
/**
|
|
444
|
-
* Repeated `path` query parameters
|
|
445
|
-
* path arrives as a bare string, so it
|
|
446
|
-
* the per-path rules run.
|
|
426
|
+
* Repeated `path` query parameters, for example
|
|
427
|
+
* `?path=index.html&path=about.html`. One path arrives as a bare string, so it
|
|
428
|
+
* is lifted into the batch shape before the per-path rules run.
|
|
447
429
|
*/
|
|
448
430
|
export const spaceVersionFileLinksQuerySchema = z.object({
|
|
449
431
|
path: z
|
|
@@ -458,7 +440,7 @@ export const spaceVersionFileLinkSchema = z.object({
|
|
|
458
440
|
expiresAt: z.string().describe("When the link stops working."),
|
|
459
441
|
});
|
|
460
442
|
/**
|
|
461
|
-
* Minting is blind to path validity
|
|
443
|
+
* Minting is blind to path validity. The control plane authorizes the version,
|
|
462
444
|
* not the path. A path that is not in the selected catalog view answers
|
|
463
445
|
* `version_file_not_found` when the link is followed.
|
|
464
446
|
*/
|
|
@@ -493,8 +475,12 @@ export const spaceVersionConventionArtifactsResponseSchema = z.object({
|
|
|
493
475
|
artifacts: z.array(spaceVersionConventionArtifactMetadataSchema),
|
|
494
476
|
});
|
|
495
477
|
export const spaceVersionConventionArtifactQuerySchema = z.object({
|
|
496
|
-
kind: spaceVersionConventionArtifactKindSchema
|
|
497
|
-
|
|
478
|
+
kind: spaceVersionConventionArtifactKindSchema
|
|
479
|
+
.optional()
|
|
480
|
+
.describe("Which artifact to read, named by kind. Pass this or `path`."),
|
|
481
|
+
path: spaceVersionConventionArtifactPathSchema
|
|
482
|
+
.optional()
|
|
483
|
+
.describe("Which artifact to read, named by its source path. Pass this or `kind`."),
|
|
498
484
|
});
|
|
499
485
|
export const spaceVersionConventionArtifactContentResponseSchema = spaceVersionConventionArtifactMetadataSchema.extend({
|
|
500
486
|
encoding: z.enum(["utf8", "base64"]),
|
|
@@ -502,11 +488,10 @@ export const spaceVersionConventionArtifactContentResponseSchema = spaceVersionC
|
|
|
502
488
|
truncated: z.boolean(),
|
|
503
489
|
});
|
|
504
490
|
/**
|
|
505
|
-
* Where a routing diagnostic came from
|
|
506
|
-
* publisher can open. Wider than the convention artifacts
|
|
507
|
-
* file states routing rules too
|
|
508
|
-
*
|
|
509
|
-
* finalize reads whichever one the version ships, and naming the canonical
|
|
491
|
+
* Where a routing diagnostic came from: a committed path in the version the
|
|
492
|
+
* publisher can open. Wider than the convention artifacts, because the config
|
|
493
|
+
* file states routing rules too. Every accepted config filename is listed
|
|
494
|
+
* because finalize reads whichever one the version ships, and naming
|
|
510
495
|
* `sf.jsonc` at a version that committed `spacefast.jsonc` sends the publisher
|
|
511
496
|
* to a file that is not there.
|
|
512
497
|
*/
|
|
@@ -522,14 +507,23 @@ export const spaceVersionRoutingDiagnosticSchema = z.object({
|
|
|
522
507
|
code: z.string(),
|
|
523
508
|
message: z.string(),
|
|
524
509
|
source: z.string(),
|
|
510
|
+
deferredUntilSubstitution: z.literal(true).optional(),
|
|
511
|
+
});
|
|
512
|
+
export const spaceRoutingComputeSchema = z.object({
|
|
513
|
+
latestVersionId: z.string().nullable(),
|
|
514
|
+
redirects: z.string().nullable(),
|
|
515
|
+
headers: z.string().nullable(),
|
|
516
|
+
diagnostics: z.array(spaceVersionRoutingDiagnosticSchema),
|
|
517
|
+
variableDependencies: z.array(z.string()),
|
|
518
|
+
systemVariableDependencies: z.array(z.string()),
|
|
525
519
|
});
|
|
526
520
|
export const spaceVersionComputedRoutingSummarySchema = z.object({
|
|
527
521
|
versionId: z.string(),
|
|
528
522
|
source: z.object({
|
|
529
523
|
artifacts: z.array(spaceVersionConventionArtifactMetadataSchema),
|
|
530
524
|
}),
|
|
531
|
-
// Finalize-written scalars
|
|
532
|
-
//
|
|
525
|
+
// Finalize-written scalars: the runtime owns the compile and reports these
|
|
526
|
+
// counts on its receipt.
|
|
533
527
|
compiled: z.object({
|
|
534
528
|
redirectRuleCount: z.number().int().nonnegative(),
|
|
535
529
|
headerRuleCount: z.number().int().nonnegative(),
|
|
@@ -537,9 +531,8 @@ export const spaceVersionComputedRoutingSummarySchema = z.object({
|
|
|
537
531
|
}),
|
|
538
532
|
diagnostics: z.array(spaceVersionRoutingDiagnosticSchema),
|
|
539
533
|
});
|
|
540
|
-
//
|
|
541
|
-
//
|
|
542
|
-
// No redundant booleans ride along.
|
|
534
|
+
// `upload` present means bytes are still needed, then finalize. `versionId`
|
|
535
|
+
// null means the manifest matched and nothing changed.
|
|
543
536
|
export const spaceVersionIntentResponseSchema = z.object({
|
|
544
537
|
versionId: z
|
|
545
538
|
.string()
|
|
@@ -563,9 +556,8 @@ export const publishRequestSchema = z
|
|
|
563
556
|
.describe("Desired file manifest for a declared publish session. `sha256` is optional: omitted local bytes receive path-addressed upload targets and are hashed by the runtime; declared hashes receive content-addressed targets and can reuse existing bytes. Clients upload returned targets, then finalize."),
|
|
564
557
|
...manifestMutationFieldsSchema,
|
|
565
558
|
source: PublishSourceSchema.optional().describe('Publish provenance recorded on the version; defaults to {kind: "direct_upload"}.'),
|
|
566
|
-
// Same fields
|
|
567
|
-
// a build carries its transcript
|
|
568
|
-
// by, so the first version of a space is not poorer than its second.
|
|
559
|
+
// Same fields and bounds as spaceVersionCreateSchema, so a publish that ran
|
|
560
|
+
// a build carries its transcript whichever door it enters by.
|
|
569
561
|
sourceMetadata: z
|
|
570
562
|
.record(z.string(), z.unknown())
|
|
571
563
|
.optional()
|
|
@@ -617,20 +609,44 @@ export const publishReceiptSpaceSchema = z.object({
|
|
|
617
609
|
slug: z.string(),
|
|
618
610
|
title: z.string(),
|
|
619
611
|
publicName: z.string(),
|
|
620
|
-
|
|
612
|
+
// The server always names the managed hostname it allocated. A receipt
|
|
613
|
+
// rendered by a client (`sf publish --json`) can only report what the API told
|
|
614
|
+
// it, so this is absent rather than guessed: the apex is environment-resolved
|
|
615
|
+
// (see config/domains.ts `resolveViewFastApex`) and a client that invents
|
|
616
|
+
// `<slug>.view.fast` would hand a caller a production address that, off
|
|
617
|
+
// production, belongs to nothing.
|
|
618
|
+
defaultHostname: z.string().optional(),
|
|
621
619
|
liveUrl: z.string().nullable(),
|
|
622
620
|
});
|
|
621
|
+
/**
|
|
622
|
+
* The claim block as it rides on a publish receipt. Same members as the
|
|
623
|
+
* server's {@link spaceClaimReceiptSchema}, with the URL formats relaxed to
|
|
624
|
+
* plain strings so a client-rendered receipt can mask the three key-bearing
|
|
625
|
+
* members (`key`, `url`, `claimUrl`) with {@link REDACTED_RECEIPT_SECRET} while
|
|
626
|
+
* keeping the block's shape stable. `expiresAt` is never masked: it is what
|
|
627
|
+
* tells an agent the space is temporary and by when it has to be claimed.
|
|
628
|
+
*/
|
|
629
|
+
export const publishReceiptClaimSchema = spaceClaimReceiptSchema.extend({
|
|
630
|
+
key: z.string().min(1),
|
|
631
|
+
url: z.string().min(1),
|
|
632
|
+
claimUrl: z.string().min(1),
|
|
633
|
+
});
|
|
634
|
+
/** The stand-in a surface writes where a secret would otherwise be printed. */
|
|
635
|
+
export const REDACTED_RECEIPT_SECRET = "[REDACTED]";
|
|
623
636
|
export const publishReceiptVersionSchema = z.object({
|
|
624
637
|
id: z.string(),
|
|
625
638
|
status: VersionSchema.shape.status,
|
|
626
|
-
immutableUrl: z
|
|
639
|
+
immutableUrl: z
|
|
640
|
+
.string()
|
|
641
|
+
.nullable()
|
|
642
|
+
.describe("Permanent version URL, or null while the version is still being finalized."),
|
|
627
643
|
ref: z.string().nullable().optional(),
|
|
628
644
|
number: z.number().int().positive().nullable().optional(),
|
|
629
645
|
manifestHash: z.string().nullable(),
|
|
630
646
|
});
|
|
631
|
-
// Liveness is never a version status
|
|
632
|
-
//
|
|
633
|
-
//
|
|
647
|
+
// Liveness is the channel pointer, never a version status: "ready and live"
|
|
648
|
+
// (activated), "ready but outraced" (superseded), and "ready by design"
|
|
649
|
+
// (unpromoted) are three different receipts.
|
|
634
650
|
export const publishActivationSchema = z.object({
|
|
635
651
|
channel: z
|
|
636
652
|
.enum(["live"])
|
|
@@ -644,9 +660,9 @@ export const publishActivationSchema = z.object({
|
|
|
644
660
|
.nullable()
|
|
645
661
|
.describe("The version currently serving live traffic, or null when the space has none."),
|
|
646
662
|
});
|
|
647
|
-
//
|
|
648
|
-
//
|
|
649
|
-
//
|
|
663
|
+
// A deterministic projection of (version status, activation outcome, pending
|
|
664
|
+
// bytes, operation state). An agent drives the whole lifecycle by branching on
|
|
665
|
+
// `action` alone.
|
|
650
666
|
export const publishNextSchema = z.object({
|
|
651
667
|
action: z
|
|
652
668
|
.enum(["done", "upload", "finalize", "poll"])
|
|
@@ -668,19 +684,49 @@ export const publishReceiptSchema = z.object({
|
|
|
668
684
|
version: publishReceiptVersionSchema,
|
|
669
685
|
activation: publishActivationSchema,
|
|
670
686
|
next: publishNextSchema,
|
|
687
|
+
// The other way to publish this same space. Present on every receipt that
|
|
688
|
+
// could resolve it, so an agent that just published once already knows how to
|
|
689
|
+
// deploy the next change from a checkout — and so an anonymous publisher
|
|
690
|
+
// learns that the key it is already holding is also its git password. Absent
|
|
691
|
+
// rather than guessed when the space has no repository yet.
|
|
692
|
+
git: spaceGitSchema
|
|
693
|
+
.optional()
|
|
694
|
+
.describe('Git remote for this space. `managedBy: "spacefast"` carries a `remoteUrl` you can push to; `managedBy: "github"` means the space deploys from GitHub and direct pushes are refused.'),
|
|
695
|
+
// How the publish was authorized, and what that means for the space's
|
|
696
|
+
// lifetime. An anonymous space is temporary: it expires at `claim.expiresAt`
|
|
697
|
+
// unless somebody claims it. An agent branches on these two rather than
|
|
698
|
+
// inferring temporariness from the presence of a claim block it may not be
|
|
699
|
+
// allowed to see. Optional because the API derives ownership from the
|
|
700
|
+
// credential and does not restate it; the CLI and MCP always set them.
|
|
701
|
+
authMode: z
|
|
702
|
+
.enum(["anonymous", "authenticated"])
|
|
703
|
+
.optional()
|
|
704
|
+
.describe("anonymous: authorized by a space key. authenticated: authorized by an account."),
|
|
705
|
+
persistence: z
|
|
706
|
+
.enum(["temporary", "managed"])
|
|
707
|
+
.optional()
|
|
708
|
+
.describe("temporary: the space expires unless claimed. managed: the space belongs to a team and persists."),
|
|
671
709
|
operation: AsyncOperationSchema.optional().describe("Background finalize operation when publish work continues asynchronously."),
|
|
672
710
|
upload: publishUploadReceiptSchema.optional(),
|
|
673
|
-
claim:
|
|
711
|
+
claim: publishReceiptClaimSchema.optional(),
|
|
674
712
|
diagnostics: z
|
|
675
713
|
.array(baseDiagnosticSchema)
|
|
676
714
|
.optional()
|
|
677
715
|
.describe("Publish diagnostics. Includes the `noop_publish` info diagnostic when nothing changed (the only noop signal), manifest warnings such as `path_case_collision`, and serving-shape notes such as `single_html_index` or `files_mode_inferred`."),
|
|
678
716
|
links: z
|
|
679
717
|
.object({
|
|
718
|
+
refresh: z
|
|
719
|
+
.string()
|
|
720
|
+
.optional()
|
|
721
|
+
.describe("Upload-instruction refresh endpoint; present while bytes still need uploading."),
|
|
722
|
+
// Transition alias for clients baked before the rename (#2449): same value
|
|
723
|
+
// as `refresh`, emitted so a deployed client that reads `links.resume`
|
|
724
|
+
// still finds a working URL. Remove with the rest of the alias once every
|
|
725
|
+
// baked client is rebuilt.
|
|
680
726
|
resume: z
|
|
681
727
|
.string()
|
|
682
728
|
.optional()
|
|
683
|
-
.describe("
|
|
729
|
+
.describe("Deprecated alias for `refresh`; carries the identical URL."),
|
|
684
730
|
finalize: z
|
|
685
731
|
.string()
|
|
686
732
|
.optional()
|
|
@@ -700,9 +746,9 @@ export const publishReceiptSchema = z.object({
|
|
|
700
746
|
.optional()
|
|
701
747
|
.describe("Follow-up links so agents can act on the receipt without knowing the full API."),
|
|
702
748
|
});
|
|
703
|
-
// Same
|
|
704
|
-
// needed
|
|
705
|
-
export const
|
|
749
|
+
// Same contract as the intent response: `upload` present means bytes are still
|
|
750
|
+
// needed, then finalize; absent means everything declared has landed.
|
|
751
|
+
export const spaceVersionRefreshResponseSchema = z.object({
|
|
706
752
|
versionId: z.string(),
|
|
707
753
|
upload: uploadInstructionsSchema
|
|
708
754
|
.nullable()
|
|
@@ -712,10 +758,9 @@ export const spaceVersionResumeResponseSchema = z.object({
|
|
|
712
758
|
.default([])
|
|
713
759
|
.describe("Manifest paths ignored by the server because the current plan does not allow them."),
|
|
714
760
|
});
|
|
715
|
-
//
|
|
716
|
-
//
|
|
717
|
-
//
|
|
718
|
-
// version to the same channel.
|
|
761
|
+
// `{ channel? }` defaulting to "live"; non-live names reject with
|
|
762
|
+
// `channel_unsupported` until more channels ship. Rollback is promoting an
|
|
763
|
+
// older ready version to the same channel.
|
|
719
764
|
export const versionPromoteSchema = z
|
|
720
765
|
.object({
|
|
721
766
|
channel: z
|
|
@@ -726,6 +771,27 @@ export const versionPromoteSchema = z
|
|
|
726
771
|
})
|
|
727
772
|
.optional()
|
|
728
773
|
.default({});
|
|
774
|
+
/**
|
|
775
|
+
* `?async=1` on a route that otherwise waits for the work to settle: the route
|
|
776
|
+
* answers with the operation handle to poll instead. Every such route builds its
|
|
777
|
+
* query schema here so the accepted spellings stay one definition; the caller
|
|
778
|
+
* passes the description because that is the only per-route part.
|
|
779
|
+
*
|
|
780
|
+
* Plain enum (no zod transform): transforms cannot be represented in the
|
|
781
|
+
* generated OpenAPI spec, and this parameter must reach SDK consumers.
|
|
782
|
+
*/
|
|
783
|
+
export function asyncQuerySchema(description) {
|
|
784
|
+
return z.object({
|
|
785
|
+
async: z.enum(["true", "false", "1", "0"]).optional().describe(description),
|
|
786
|
+
});
|
|
787
|
+
}
|
|
788
|
+
/**
|
|
789
|
+
* Reads an {@link asyncQuerySchema} value. The factory owns which spellings the
|
|
790
|
+
* parameter accepts; this owns what they mean, so neither can drift alone.
|
|
791
|
+
*/
|
|
792
|
+
export function isAsyncRequested(value) {
|
|
793
|
+
return value === "true" || value === "1";
|
|
794
|
+
}
|
|
729
795
|
export const spaceFinalizeSchema = z
|
|
730
796
|
.object({
|
|
731
797
|
channel: z
|
|
@@ -756,32 +822,34 @@ export const spaceRuntimeStatusSchema = z.object({
|
|
|
756
822
|
app: runtimeAppSchema
|
|
757
823
|
.nullable()
|
|
758
824
|
.describe("What the live version runs: its Zero capsule and its Functions worker, each null when the published tree carries none of that product (both null for a space without a runtime). The whole object is null for callers whose credential does not carry `versions:read`, because app details read version contents, not serving state."),
|
|
825
|
+
pendingApp: runtimeAppSchema
|
|
826
|
+
.nullable()
|
|
827
|
+
.describe("What the pending version would run — the same projection as `app`, read from `pendingVersionId`'s version so a dashboard can show what an in-flight publish is about to serve. Null when no publish is in flight, and null for callers without `versions:read`, exactly like `app`."),
|
|
759
828
|
});
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
before: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
771
|
-
after: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
772
|
-
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
773
|
-
});
|
|
829
|
+
/**
|
|
830
|
+
* Where a space's runtime stands against its desired state. `POST
|
|
831
|
+
* /v1/spaces/{spaceId}/apply` returns this in the platform mutation envelope,
|
|
832
|
+
* whose `operation` handle polls at `GET /v1/operations/{operationId}`; `GET
|
|
833
|
+
* /v1/spaces/{spaceId}/apply-state` returns the same shape as a plain read.
|
|
834
|
+
*
|
|
835
|
+
* None of these fields live on an operation record: the operation says whether
|
|
836
|
+
* the last apply ran, this says what the space is serving, what it wants to
|
|
837
|
+
* serve, and whether you may ask for it now.
|
|
838
|
+
*/
|
|
774
839
|
export const spaceApplyStateSchema = z.object({
|
|
775
|
-
status: z
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
840
|
+
status: z
|
|
841
|
+
.enum(["live", "pending", "applying", "failed"])
|
|
842
|
+
.describe("`live` when the runtime matches the desired state, `pending` when a change is waiting to be applied, `applying` while an apply is running, `failed` when the last apply failed."),
|
|
843
|
+
desiredRevision: z
|
|
844
|
+
.string()
|
|
845
|
+
.nullable()
|
|
846
|
+
.describe("Version the space wants to serve; null when nothing is pending."),
|
|
847
|
+
appliedRevision: z.string().nullable().describe("Version the runtime is serving now."),
|
|
848
|
+
lastError: z
|
|
849
|
+
.string()
|
|
850
|
+
.nullable()
|
|
851
|
+
.describe("Why the last apply failed; null unless `status` is `failed`."),
|
|
852
|
+
canApplyNow: z
|
|
853
|
+
.boolean()
|
|
854
|
+
.describe("Whether an apply would do something right now, for gating an Apply control."),
|
|
787
855
|
});
|
|
@@ -14,6 +14,7 @@ export declare const superadminActivityEventQuerySchema: z.ZodObject<{
|
|
|
14
14
|
system: "system";
|
|
15
15
|
user: "user";
|
|
16
16
|
api_key: "api_key";
|
|
17
|
+
partner_token: "partner_token";
|
|
17
18
|
oauth_client: "oauth_client";
|
|
18
19
|
anonymous_claim: "anonymous_claim";
|
|
19
20
|
}>>;
|
|
@@ -64,7 +65,7 @@ export declare const SuperadminLatestUserSchema: z.ZodObject<{
|
|
|
64
65
|
role: z.ZodNullable<z.ZodString>;
|
|
65
66
|
banned: z.ZodBoolean;
|
|
66
67
|
isAutomattician: z.ZodBoolean;
|
|
67
|
-
|
|
68
|
+
automatticBetaGrant: z.ZodBoolean;
|
|
68
69
|
betaEnrolledAt: z.ZodNullable<z.ZodString>;
|
|
69
70
|
createdAt: z.ZodString;
|
|
70
71
|
updatedAt: z.ZodString;
|
|
@@ -79,7 +80,7 @@ export declare const SuperadminLatestUserListSchema: z.ZodObject<{
|
|
|
79
80
|
role: z.ZodNullable<z.ZodString>;
|
|
80
81
|
banned: z.ZodBoolean;
|
|
81
82
|
isAutomattician: z.ZodBoolean;
|
|
82
|
-
|
|
83
|
+
automatticBetaGrant: z.ZodBoolean;
|
|
83
84
|
betaEnrolledAt: z.ZodNullable<z.ZodString>;
|
|
84
85
|
createdAt: z.ZodString;
|
|
85
86
|
updatedAt: z.ZodString;
|
|
@@ -87,46 +88,6 @@ export declare const SuperadminLatestUserListSchema: z.ZodObject<{
|
|
|
87
88
|
latestSessionAt: z.ZodNullable<z.ZodString>;
|
|
88
89
|
}, z.core.$strip>>;
|
|
89
90
|
}, z.core.$strip>;
|
|
90
|
-
export declare const SuperadminLatestSpaceSchema: z.ZodObject<{
|
|
91
|
-
id: z.ZodString;
|
|
92
|
-
title: z.ZodString;
|
|
93
|
-
slug: z.ZodString;
|
|
94
|
-
status: z.ZodString;
|
|
95
|
-
tenantId: z.ZodString;
|
|
96
|
-
tenantName: z.ZodNullable<z.ZodString>;
|
|
97
|
-
teamId: z.ZodNullable<z.ZodString>;
|
|
98
|
-
teamSlug: z.ZodNullable<z.ZodString>;
|
|
99
|
-
teamName: z.ZodNullable<z.ZodString>;
|
|
100
|
-
externalCustomerId: z.ZodNullable<z.ZodString>;
|
|
101
|
-
siteId: z.ZodNullable<z.ZodString>;
|
|
102
|
-
siteStatus: z.ZodNullable<z.ZodString>;
|
|
103
|
-
liveHostname: z.ZodNullable<z.ZodString>;
|
|
104
|
-
disabledAt: z.ZodNullable<z.ZodString>;
|
|
105
|
-
deletedAt: z.ZodNullable<z.ZodString>;
|
|
106
|
-
createdAt: z.ZodString;
|
|
107
|
-
updatedAt: z.ZodString;
|
|
108
|
-
}, z.core.$strip>;
|
|
109
|
-
export declare const SuperadminLatestSpaceListSchema: z.ZodObject<{
|
|
110
|
-
spaces: z.ZodArray<z.ZodObject<{
|
|
111
|
-
id: z.ZodString;
|
|
112
|
-
title: z.ZodString;
|
|
113
|
-
slug: z.ZodString;
|
|
114
|
-
status: z.ZodString;
|
|
115
|
-
tenantId: z.ZodString;
|
|
116
|
-
tenantName: z.ZodNullable<z.ZodString>;
|
|
117
|
-
teamId: z.ZodNullable<z.ZodString>;
|
|
118
|
-
teamSlug: z.ZodNullable<z.ZodString>;
|
|
119
|
-
teamName: z.ZodNullable<z.ZodString>;
|
|
120
|
-
externalCustomerId: z.ZodNullable<z.ZodString>;
|
|
121
|
-
siteId: z.ZodNullable<z.ZodString>;
|
|
122
|
-
siteStatus: z.ZodNullable<z.ZodString>;
|
|
123
|
-
liveHostname: z.ZodNullable<z.ZodString>;
|
|
124
|
-
disabledAt: z.ZodNullable<z.ZodString>;
|
|
125
|
-
deletedAt: z.ZodNullable<z.ZodString>;
|
|
126
|
-
createdAt: z.ZodString;
|
|
127
|
-
updatedAt: z.ZodString;
|
|
128
|
-
}, z.core.$strip>>;
|
|
129
|
-
}, z.core.$strip>;
|
|
130
91
|
export declare const SuperadminLatestVersionSchema: z.ZodObject<{
|
|
131
92
|
id: z.ZodString;
|
|
132
93
|
number: z.ZodNullable<z.ZodNumber>;
|
|
@@ -252,7 +213,6 @@ export declare const SuperadminBadExperienceListSchema: z.ZodObject<{
|
|
|
252
213
|
export type SuperadminActivityEvent = z.infer<typeof SuperadminActivityEventSchema>;
|
|
253
214
|
export type SuperadminActivityEventQuery = z.infer<typeof superadminActivityEventQuerySchema>;
|
|
254
215
|
export type SuperadminLatestUser = z.infer<typeof SuperadminLatestUserSchema>;
|
|
255
|
-
export type SuperadminLatestSpace = z.infer<typeof SuperadminLatestSpaceSchema>;
|
|
256
216
|
export type SuperadminLatestVersion = z.infer<typeof SuperadminLatestVersionSchema>;
|
|
257
217
|
export type SuperadminBadExperienceItem = z.infer<typeof SuperadminBadExperienceItemSchema>;
|
|
258
218
|
export type SuperadminBadExperienceList = z.infer<typeof SuperadminBadExperienceListSchema>;
|