@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { AsyncOperationSchema, baseDiagnosticSchema } from "./common.js";
|
|
3
|
-
import { publishSourceKind, versionStatus, spaceDisabledReasonCode, spaceStatus } from "./enums.js";
|
|
3
|
+
import { publishSourceKind, tenantMode, versionStatus, spaceDisabledReasonCode, spaceStatus, VERSION_IN_FLIGHT_STATUSES, } from "./enums.js";
|
|
4
4
|
import { pendingUploadSchema } from "./internal.js";
|
|
5
5
|
import { spaceConfigSchema } from "./space-config.js";
|
|
6
6
|
export const DiagnosticSchema = baseDiagnosticSchema.extend({
|
|
@@ -13,7 +13,7 @@ export const PrincipalRefSchema = z.object({
|
|
|
13
13
|
principalType: z.enum(["team", "external"]),
|
|
14
14
|
principalId: z.string(),
|
|
15
15
|
});
|
|
16
|
-
// ChannelPointer (
|
|
16
|
+
// ChannelPointer (the platform spec "ChannelPointer"): a channel names
|
|
17
17
|
// exactly one version. A channel with no version yet is absent from the map
|
|
18
18
|
// rather than present with an empty pointer.
|
|
19
19
|
export const ChannelPointerSchema = z.object({
|
|
@@ -27,23 +27,97 @@ export const ChannelPointerSchema = z.object({
|
|
|
27
27
|
export const spaceSettingsDigestSchema = z
|
|
28
28
|
.string()
|
|
29
29
|
.regex(/^[0-9a-f]{64}$/, "must be a 64-character lowercase hex sha256 digest");
|
|
30
|
+
// Where a space actually runs. Partner tenants reconcile placement and health
|
|
31
|
+
// against their own records, so this is the real handle set rather than a
|
|
32
|
+
// status word: the region it was placed in, the runtime instance serving it,
|
|
33
|
+
// the provider hostname that instance answers on, and one derived convergence
|
|
34
|
+
// state. Every handle is null until the space is placed.
|
|
35
|
+
export const spaceInfrastructureSchema = z.object({
|
|
36
|
+
region: z.string().nullable().describe("Concrete region the space's site was placed in."),
|
|
37
|
+
runtimeInstanceId: z.string().nullable().describe("Runtime instance serving this space."),
|
|
38
|
+
providerMainHostname: z
|
|
39
|
+
.string()
|
|
40
|
+
.nullable()
|
|
41
|
+
.describe("Primary hostname the provider answers on for this space's site."),
|
|
42
|
+
provisioningState: z
|
|
43
|
+
.enum(["provisioning", "converged", "degraded"])
|
|
44
|
+
.describe("Convergence of the space against its intended infrastructure: still being placed, matching intent, or failing to converge."),
|
|
45
|
+
});
|
|
46
|
+
/*
|
|
47
|
+
* Where a space's git remote is, and who owns it.
|
|
48
|
+
*
|
|
49
|
+
* The two cases are not the same offer. A Spacefast-hosted space hands out a
|
|
50
|
+
* remote you can push to, and pushing publishes. A space bound to a GitHub
|
|
51
|
+
* repository has GitHub as its source of truth: there is no remote to give out,
|
|
52
|
+
* because a direct push would be overwritten by the next sync. `managedBy` is
|
|
53
|
+
* the field a client branches on, so it never has to infer which world it is in
|
|
54
|
+
* from an absent one — `remoteUrl` is non-null exactly when it is `spacefast`,
|
|
55
|
+
* and `repository` exactly when it is `github`.
|
|
56
|
+
*
|
|
57
|
+
* Deliberately one flat object rather than a discriminated union: this schema
|
|
58
|
+
* is reachable from the Space resource and from every publish receipt, and a
|
|
59
|
+
* union here pushed the router's whole inferred type graph past TypeScript's
|
|
60
|
+
* instantiation-depth limit (api/structural-router.test.ts). The invariant that
|
|
61
|
+
* a union would have carried in the type is stated above and enforced by the
|
|
62
|
+
* one function that builds this block (push-new/space-git.ts).
|
|
63
|
+
*
|
|
64
|
+
* `remoteUrl` never carries a credential. Authentication is HTTP Basic with the
|
|
65
|
+
* username `t` and a space key or API key as the password, so the credential
|
|
66
|
+
* lives wherever that client already keeps it instead of being duplicated into
|
|
67
|
+
* a URL that lands in shell history and `git remote -v`.
|
|
68
|
+
*/
|
|
69
|
+
export const spaceGitSchema = z.object({
|
|
70
|
+
managedBy: z
|
|
71
|
+
.enum(["spacefast", "github"])
|
|
72
|
+
.describe("Who owns this space's git history. `spacefast`: push `remoteUrl` to publish. `github`: the space deploys from `repository` and direct pushes are refused."),
|
|
73
|
+
remoteUrl: z
|
|
74
|
+
.string()
|
|
75
|
+
.nullable()
|
|
76
|
+
.describe("Credential-free git remote to push to, or null when `managedBy` is `github`. Authenticate as HTTP Basic user `t` with a space key or API key as the password."),
|
|
77
|
+
repository: z
|
|
78
|
+
.string()
|
|
79
|
+
.nullable()
|
|
80
|
+
.describe("`owner/name` of the GitHub repository this space deploys from, else null."),
|
|
81
|
+
defaultBranch: z
|
|
82
|
+
.string()
|
|
83
|
+
.nullable()
|
|
84
|
+
.describe("Branch that publishes to the live channel when pushed."),
|
|
85
|
+
});
|
|
86
|
+
// Every `CONSUMER_HIDDEN_SPACE_FIELDS` member below is `.optional()` because
|
|
87
|
+
// the consumer projection OMITS it rather than nulling it — absent means "not
|
|
88
|
+
// your surface", null means "nothing here yet", and the response validator has
|
|
89
|
+
// to accept both bodies from the one shared schema.
|
|
30
90
|
export const SpaceSchema = z.object({
|
|
31
91
|
id: z.string(),
|
|
32
|
-
tenantId: z.string(),
|
|
92
|
+
tenantId: z.string().optional(),
|
|
93
|
+
// Derived from the owning tenant, never stored on the space: `test` for a
|
|
94
|
+
// space under a linked test tenant, `live` otherwise. A platform-surface
|
|
95
|
+
// field like `tenantId` — stripped from the consumer view.
|
|
96
|
+
mode: tenantMode
|
|
97
|
+
.optional()
|
|
98
|
+
.describe("`test` when the owning tenant is a linked test tenant, `live` otherwise."),
|
|
33
99
|
// Raw provider identity of the site this space IS — deliberately not hidden
|
|
34
100
|
// behind an abstraction, because a platform tenant provisioning under its own
|
|
35
101
|
// WP.Cloud client needs the real handle to reconcile against. Both are
|
|
36
102
|
// platform-surface fields (like `tenantId` and `principal`): the public API
|
|
37
103
|
// reference strips them, the platform document keeps them. Null until the
|
|
38
104
|
// space is placed.
|
|
39
|
-
providerRef: z
|
|
105
|
+
providerRef: z
|
|
106
|
+
.string()
|
|
107
|
+
.nullable()
|
|
108
|
+
.optional()
|
|
109
|
+
.describe("WP Cloud `atomic_site_id` serving this space."),
|
|
40
110
|
providerClientId: z
|
|
41
111
|
.string()
|
|
42
112
|
.nullable()
|
|
43
|
-
.
|
|
113
|
+
.optional()
|
|
114
|
+
.describe("WP Cloud client identity (`pvc_...`) the space's site is provisioned under."),
|
|
44
115
|
teamId: z.string().nullable(),
|
|
45
116
|
teamSlug: z.string().nullable(),
|
|
46
|
-
principal: PrincipalRefSchema.nullable(),
|
|
117
|
+
principal: PrincipalRefSchema.nullable().optional(),
|
|
118
|
+
// Present only for callers holding `infrastructure:read` on the space's
|
|
119
|
+
// tenant; absent (not null) for everyone else.
|
|
120
|
+
infrastructure: spaceInfrastructureSchema.optional(),
|
|
47
121
|
anonymous: z.boolean(),
|
|
48
122
|
slug: z.string(),
|
|
49
123
|
title: z.string(),
|
|
@@ -57,7 +131,7 @@ export const SpaceSchema = z.object({
|
|
|
57
131
|
reasonCode: spaceDisabledReasonCode.describe("Why serving is disabled."),
|
|
58
132
|
})
|
|
59
133
|
.nullable(),
|
|
60
|
-
// Anonymous-claim lifecycle (
|
|
134
|
+
// Anonymous-claim lifecycle (the platform spec Space.claimState): null
|
|
61
135
|
// for spaces that never went through the anonymous lifecycle. `purgeAfter` is
|
|
62
136
|
// the end of the one-day post-expiry recovery window before content deletion.
|
|
63
137
|
claimState: z
|
|
@@ -114,21 +188,63 @@ export const SpaceSchema = z.object({
|
|
|
114
188
|
noindex: z
|
|
115
189
|
.boolean()
|
|
116
190
|
.describe("When true, the live production hostnames serve platform noindex directives. Immutable version and preview hostnames are always noindex regardless of this setting."),
|
|
191
|
+
pinnedAt: z
|
|
192
|
+
.string()
|
|
193
|
+
.datetime()
|
|
194
|
+
.nullable()
|
|
195
|
+
.describe("Instant the space was pinned to the top of its team's space list, or null when it is not pinned. The pin is team-wide: everyone who can see the team sees it."),
|
|
196
|
+
git: spaceGitSchema
|
|
197
|
+
.nullable()
|
|
198
|
+
.describe("Git remote for this space, or null when it has no repository yet. Push to `remoteUrl` to publish."),
|
|
117
199
|
operation: AsyncOperationSchema.nullable(),
|
|
118
200
|
createdAt: z.string().datetime(),
|
|
119
201
|
updatedAt: z.string().datetime(),
|
|
120
202
|
});
|
|
121
|
-
//
|
|
203
|
+
// The fields a consumer-class credential never sees on a Space. ONE source of
|
|
204
|
+
// truth: the response serializer omits exactly these for consumer callers, and
|
|
205
|
+
// the public API reference strips exactly these from the shared schemas. They
|
|
206
|
+
// are tenancy, on-behalf-of identity, and raw infrastructure — meaningful to a
|
|
207
|
+
// partner running spaces for its own customers, noise (or a leak) to everyone
|
|
208
|
+
// else.
|
|
209
|
+
//
|
|
210
|
+
// It lives below SpaceSchema so `satisfies` can pin every name to a real field:
|
|
211
|
+
// a typo, or a later rename on the schema, is a compile error here rather than
|
|
212
|
+
// a field that quietly stops being hidden.
|
|
213
|
+
export const CONSUMER_HIDDEN_SPACE_FIELDS = [
|
|
214
|
+
"tenantId",
|
|
215
|
+
"mode",
|
|
216
|
+
"principal",
|
|
217
|
+
"providerRef",
|
|
218
|
+
"providerClientId",
|
|
219
|
+
"infrastructure",
|
|
220
|
+
];
|
|
221
|
+
// PublishSource (the platform spec "PublishSource"): the single
|
|
122
222
|
// provenance shape for how a version came to exist. Sent on publish/version
|
|
123
223
|
// create and echoed on the Version resource. Structured CI/git detail beyond
|
|
124
224
|
// the named fields rides in `metadata` (string values only).
|
|
225
|
+
// The git block of a PublishSource, exported on its own so servers echoing
|
|
226
|
+
// declared provenance can validate just this piece without reaching into the
|
|
227
|
+
// parent schema's internals.
|
|
228
|
+
export const publishSourceGitSchema = z
|
|
229
|
+
.object({
|
|
230
|
+
repository: z.string().nullable().optional(),
|
|
231
|
+
repositoryFullName: z.string().nullable().optional(),
|
|
232
|
+
repositoryUrl: z.string().nullable().optional(),
|
|
233
|
+
ref: z.string().nullable().optional(),
|
|
234
|
+
branch: z.string().nullable().optional(),
|
|
235
|
+
branchAliasUrl: z.string().nullable().optional(),
|
|
236
|
+
commit: z.string().nullable().optional(),
|
|
237
|
+
commitSha: z.string().nullable().optional(),
|
|
238
|
+
pullRequestNumber: z.number().nullable().optional(),
|
|
239
|
+
})
|
|
240
|
+
.catchall(z.unknown());
|
|
125
241
|
export const PublishSourceSchema = z.object({
|
|
126
242
|
kind: publishSourceKind.describe("How this version was produced."),
|
|
127
243
|
client: z
|
|
128
244
|
.string()
|
|
129
245
|
.max(255)
|
|
130
246
|
.optional()
|
|
131
|
-
.describe("Publishing client attribution,
|
|
247
|
+
.describe("Publishing client attribution, for example `spacefast-cli/1.2.3`."),
|
|
132
248
|
branch: z.string().max(255).optional().describe("Git branch the publish came from."),
|
|
133
249
|
commit: z.string().max(64).optional().describe("Git commit SHA the publish came from."),
|
|
134
250
|
message: z
|
|
@@ -144,20 +260,27 @@ export const PublishSourceSchema = z.object({
|
|
|
144
260
|
.record(z.string(), z.string())
|
|
145
261
|
.optional()
|
|
146
262
|
.describe("Additional provenance (repository, CI run URL, workflow, actor, ...)."),
|
|
147
|
-
git:
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
.
|
|
160
|
-
|
|
263
|
+
git: publishSourceGitSchema.optional(),
|
|
264
|
+
});
|
|
265
|
+
const VersionPublisherPersonSchema = z.object({
|
|
266
|
+
displayName: z.string().describe("The person's display name."),
|
|
267
|
+
avatarUrl: z
|
|
268
|
+
.string()
|
|
269
|
+
.nullable()
|
|
270
|
+
.describe("The person's avatar URL. The value is null when no avatar exists."),
|
|
271
|
+
});
|
|
272
|
+
export const VersionPublisherSchema = z.object({
|
|
273
|
+
type: z
|
|
274
|
+
.enum(["user", "api_key", "partner_token", "oauth_client", "anonymous_claim", "system"])
|
|
275
|
+
.describe("The type of actor that published the version."),
|
|
276
|
+
displayName: z
|
|
277
|
+
.string()
|
|
278
|
+
.describe("The display name of the person, agent, or system that published the version."),
|
|
279
|
+
avatarUrl: z
|
|
280
|
+
.string()
|
|
281
|
+
.nullable()
|
|
282
|
+
.describe("The publisher's avatar URL. The value is null when no avatar exists."),
|
|
283
|
+
authorizedBy: VersionPublisherPersonSchema.nullable().describe("The person who authorized the publisher. The value is null when the publisher is a person or has no known authorizer."),
|
|
161
284
|
});
|
|
162
285
|
export const VersionSchema = z.object({
|
|
163
286
|
id: z.string(),
|
|
@@ -169,6 +292,7 @@ export const VersionSchema = z.object({
|
|
|
169
292
|
number: z.number().int().positive().nullable(),
|
|
170
293
|
spaceId: z.string(),
|
|
171
294
|
source: PublishSourceSchema.nullable().describe("Publish provenance: who/what produced this version."),
|
|
295
|
+
publisher: VersionPublisherSchema.nullable().describe("The actor that published the version. The value is null for a legacy version with no attribution."),
|
|
172
296
|
status: versionStatus,
|
|
173
297
|
failureCode: z.string().nullable(),
|
|
174
298
|
failureMessage: z.string().nullable(),
|
|
@@ -208,9 +332,9 @@ export const VersionSchema = z.object({
|
|
|
208
332
|
.nullable()
|
|
209
333
|
.describe("Permanent version URL (v{number}--{label}.view.fast form), computed once and stored at ready; survives slug changes, transfers, and channel repointing. Null before ready."),
|
|
210
334
|
immutableUrlStatus: z
|
|
211
|
-
.enum(["
|
|
335
|
+
.enum(["pending", "ready"])
|
|
212
336
|
.nullable()
|
|
213
|
-
.describe("Whether the immutable version URL
|
|
337
|
+
.describe("Whether the immutable version URL is ready. pending means the URL might not resolve yet."),
|
|
214
338
|
isCurrentProduction: z.boolean(),
|
|
215
339
|
siteTitle: z.string(),
|
|
216
340
|
config: spaceConfigSchema
|
|
@@ -228,7 +352,7 @@ export const VersionSchema = z.object({
|
|
|
228
352
|
readyAt: z.string().datetime().nullable(),
|
|
229
353
|
updatedAt: z.string().datetime(),
|
|
230
354
|
});
|
|
231
|
-
const activeVersionStatuses = new Set(
|
|
355
|
+
const activeVersionStatuses = new Set(VERSION_IN_FLIGHT_STATUSES);
|
|
232
356
|
export function hasActiveVersionStatus(status) {
|
|
233
357
|
return Boolean(status && activeVersionStatuses.has(status));
|
|
234
358
|
}
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const routeInventoryEdgeAuthV1Schema: z.ZodLiteral<"inherit">;
|
|
3
|
+
export type RouteInventoryEdgeAuthV1 = z.infer<typeof routeInventoryEdgeAuthV1Schema>;
|
|
4
|
+
export declare const routeInventoryRecordV1Schema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5
|
+
kind: z.ZodLiteral<"redirect">;
|
|
6
|
+
status: z.ZodUnion<readonly [z.ZodLiteral<301>, z.ZodLiteral<302>, z.ZodLiteral<303>, z.ZodLiteral<307>, z.ZodLiteral<308>]>;
|
|
7
|
+
runtime: z.ZodLiteral<"routing">;
|
|
8
|
+
destination: z.ZodString;
|
|
9
|
+
id: z.core.$ZodBranded<z.ZodString, "ContentProgramSha256", "out">;
|
|
10
|
+
source: z.ZodString;
|
|
11
|
+
host: z.ZodString;
|
|
12
|
+
path: z.ZodString;
|
|
13
|
+
methods: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodEnum<{
|
|
14
|
+
POST: "POST";
|
|
15
|
+
PUT: "PUT";
|
|
16
|
+
GET: "GET";
|
|
17
|
+
HEAD: "HEAD";
|
|
18
|
+
PATCH: "PATCH";
|
|
19
|
+
DELETE: "DELETE";
|
|
20
|
+
OPTIONS: "OPTIONS";
|
|
21
|
+
}>]>>;
|
|
22
|
+
auth: z.ZodLiteral<"inherit">;
|
|
23
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
24
|
+
kind: z.ZodLiteral<"rewrite">;
|
|
25
|
+
status: z.ZodLiteral<200>;
|
|
26
|
+
runtime: z.ZodLiteral<"routing">;
|
|
27
|
+
destination: z.ZodString;
|
|
28
|
+
id: z.core.$ZodBranded<z.ZodString, "ContentProgramSha256", "out">;
|
|
29
|
+
source: z.ZodString;
|
|
30
|
+
host: z.ZodString;
|
|
31
|
+
path: z.ZodString;
|
|
32
|
+
methods: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodEnum<{
|
|
33
|
+
POST: "POST";
|
|
34
|
+
PUT: "PUT";
|
|
35
|
+
GET: "GET";
|
|
36
|
+
HEAD: "HEAD";
|
|
37
|
+
PATCH: "PATCH";
|
|
38
|
+
DELETE: "DELETE";
|
|
39
|
+
OPTIONS: "OPTIONS";
|
|
40
|
+
}>]>>;
|
|
41
|
+
auth: z.ZodLiteral<"inherit">;
|
|
42
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
43
|
+
kind: z.ZodLiteral<"proxy">;
|
|
44
|
+
status: z.ZodLiteral<200>;
|
|
45
|
+
cache: z.ZodOptional<z.ZodLiteral<"shared">>;
|
|
46
|
+
runtime: z.ZodLiteral<"routing">;
|
|
47
|
+
destination: z.ZodString;
|
|
48
|
+
id: z.core.$ZodBranded<z.ZodString, "ContentProgramSha256", "out">;
|
|
49
|
+
source: z.ZodString;
|
|
50
|
+
host: z.ZodString;
|
|
51
|
+
path: z.ZodString;
|
|
52
|
+
methods: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodEnum<{
|
|
53
|
+
POST: "POST";
|
|
54
|
+
PUT: "PUT";
|
|
55
|
+
GET: "GET";
|
|
56
|
+
HEAD: "HEAD";
|
|
57
|
+
PATCH: "PATCH";
|
|
58
|
+
DELETE: "DELETE";
|
|
59
|
+
OPTIONS: "OPTIONS";
|
|
60
|
+
}>]>>;
|
|
61
|
+
auth: z.ZodLiteral<"inherit">;
|
|
62
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
63
|
+
kind: z.ZodLiteral<"not-found">;
|
|
64
|
+
status: z.ZodLiteral<404>;
|
|
65
|
+
runtime: z.ZodLiteral<"routing">;
|
|
66
|
+
destination: z.ZodString;
|
|
67
|
+
id: z.core.$ZodBranded<z.ZodString, "ContentProgramSha256", "out">;
|
|
68
|
+
source: z.ZodString;
|
|
69
|
+
host: z.ZodString;
|
|
70
|
+
path: z.ZodString;
|
|
71
|
+
methods: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodEnum<{
|
|
72
|
+
POST: "POST";
|
|
73
|
+
PUT: "PUT";
|
|
74
|
+
GET: "GET";
|
|
75
|
+
HEAD: "HEAD";
|
|
76
|
+
PATCH: "PATCH";
|
|
77
|
+
DELETE: "DELETE";
|
|
78
|
+
OPTIONS: "OPTIONS";
|
|
79
|
+
}>]>>;
|
|
80
|
+
auth: z.ZodLiteral<"inherit">;
|
|
81
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
82
|
+
kind: z.ZodLiteral<"functions">;
|
|
83
|
+
runtime: z.ZodLiteral<"cloudflare-worker">;
|
|
84
|
+
id: z.core.$ZodBranded<z.ZodString, "ContentProgramSha256", "out">;
|
|
85
|
+
source: z.ZodString;
|
|
86
|
+
host: z.ZodString;
|
|
87
|
+
path: z.ZodString;
|
|
88
|
+
methods: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodEnum<{
|
|
89
|
+
POST: "POST";
|
|
90
|
+
PUT: "PUT";
|
|
91
|
+
GET: "GET";
|
|
92
|
+
HEAD: "HEAD";
|
|
93
|
+
PATCH: "PATCH";
|
|
94
|
+
DELETE: "DELETE";
|
|
95
|
+
OPTIONS: "OPTIONS";
|
|
96
|
+
}>]>>;
|
|
97
|
+
auth: z.ZodLiteral<"inherit">;
|
|
98
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
99
|
+
kind: z.ZodLiteral<"php-function">;
|
|
100
|
+
runtime: z.ZodLiteral<"php">;
|
|
101
|
+
id: z.core.$ZodBranded<z.ZodString, "ContentProgramSha256", "out">;
|
|
102
|
+
source: z.ZodString;
|
|
103
|
+
host: z.ZodString;
|
|
104
|
+
path: z.ZodString;
|
|
105
|
+
methods: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodEnum<{
|
|
106
|
+
POST: "POST";
|
|
107
|
+
PUT: "PUT";
|
|
108
|
+
GET: "GET";
|
|
109
|
+
HEAD: "HEAD";
|
|
110
|
+
PATCH: "PATCH";
|
|
111
|
+
DELETE: "DELETE";
|
|
112
|
+
OPTIONS: "OPTIONS";
|
|
113
|
+
}>]>>;
|
|
114
|
+
auth: z.ZodLiteral<"inherit">;
|
|
115
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
116
|
+
kind: z.ZodLiteral<"zero-control">;
|
|
117
|
+
runtime: z.ZodLiteral<"php">;
|
|
118
|
+
id: z.core.$ZodBranded<z.ZodString, "ContentProgramSha256", "out">;
|
|
119
|
+
source: z.ZodString;
|
|
120
|
+
host: z.ZodString;
|
|
121
|
+
path: z.ZodString;
|
|
122
|
+
methods: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodEnum<{
|
|
123
|
+
POST: "POST";
|
|
124
|
+
PUT: "PUT";
|
|
125
|
+
GET: "GET";
|
|
126
|
+
HEAD: "HEAD";
|
|
127
|
+
PATCH: "PATCH";
|
|
128
|
+
DELETE: "DELETE";
|
|
129
|
+
OPTIONS: "OPTIONS";
|
|
130
|
+
}>]>>;
|
|
131
|
+
auth: z.ZodLiteral<"inherit">;
|
|
132
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
133
|
+
kind: z.ZodLiteral<"zero-endpoint">;
|
|
134
|
+
runtime: z.ZodLiteral<"quick-js">;
|
|
135
|
+
id: z.core.$ZodBranded<z.ZodString, "ContentProgramSha256", "out">;
|
|
136
|
+
source: z.ZodString;
|
|
137
|
+
host: z.ZodString;
|
|
138
|
+
path: z.ZodString;
|
|
139
|
+
methods: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodEnum<{
|
|
140
|
+
POST: "POST";
|
|
141
|
+
PUT: "PUT";
|
|
142
|
+
GET: "GET";
|
|
143
|
+
HEAD: "HEAD";
|
|
144
|
+
PATCH: "PATCH";
|
|
145
|
+
DELETE: "DELETE";
|
|
146
|
+
OPTIONS: "OPTIONS";
|
|
147
|
+
}>]>>;
|
|
148
|
+
auth: z.ZodLiteral<"inherit">;
|
|
149
|
+
}, z.core.$strict>], "kind">;
|
|
150
|
+
export type RouteInventoryRecordV1 = z.infer<typeof routeInventoryRecordV1Schema>;
|
|
151
|
+
export declare const routeInventoryV1Schema: z.ZodObject<{
|
|
152
|
+
format: z.ZodLiteral<"stattic.route-inventory.v1">;
|
|
153
|
+
routes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
154
|
+
kind: z.ZodLiteral<"redirect">;
|
|
155
|
+
status: z.ZodUnion<readonly [z.ZodLiteral<301>, z.ZodLiteral<302>, z.ZodLiteral<303>, z.ZodLiteral<307>, z.ZodLiteral<308>]>;
|
|
156
|
+
runtime: z.ZodLiteral<"routing">;
|
|
157
|
+
destination: z.ZodString;
|
|
158
|
+
id: z.core.$ZodBranded<z.ZodString, "ContentProgramSha256", "out">;
|
|
159
|
+
source: z.ZodString;
|
|
160
|
+
host: z.ZodString;
|
|
161
|
+
path: z.ZodString;
|
|
162
|
+
methods: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodEnum<{
|
|
163
|
+
POST: "POST";
|
|
164
|
+
PUT: "PUT";
|
|
165
|
+
GET: "GET";
|
|
166
|
+
HEAD: "HEAD";
|
|
167
|
+
PATCH: "PATCH";
|
|
168
|
+
DELETE: "DELETE";
|
|
169
|
+
OPTIONS: "OPTIONS";
|
|
170
|
+
}>]>>;
|
|
171
|
+
auth: z.ZodLiteral<"inherit">;
|
|
172
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
173
|
+
kind: z.ZodLiteral<"rewrite">;
|
|
174
|
+
status: z.ZodLiteral<200>;
|
|
175
|
+
runtime: z.ZodLiteral<"routing">;
|
|
176
|
+
destination: z.ZodString;
|
|
177
|
+
id: z.core.$ZodBranded<z.ZodString, "ContentProgramSha256", "out">;
|
|
178
|
+
source: z.ZodString;
|
|
179
|
+
host: z.ZodString;
|
|
180
|
+
path: z.ZodString;
|
|
181
|
+
methods: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodEnum<{
|
|
182
|
+
POST: "POST";
|
|
183
|
+
PUT: "PUT";
|
|
184
|
+
GET: "GET";
|
|
185
|
+
HEAD: "HEAD";
|
|
186
|
+
PATCH: "PATCH";
|
|
187
|
+
DELETE: "DELETE";
|
|
188
|
+
OPTIONS: "OPTIONS";
|
|
189
|
+
}>]>>;
|
|
190
|
+
auth: z.ZodLiteral<"inherit">;
|
|
191
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
192
|
+
kind: z.ZodLiteral<"proxy">;
|
|
193
|
+
status: z.ZodLiteral<200>;
|
|
194
|
+
cache: z.ZodOptional<z.ZodLiteral<"shared">>;
|
|
195
|
+
runtime: z.ZodLiteral<"routing">;
|
|
196
|
+
destination: z.ZodString;
|
|
197
|
+
id: z.core.$ZodBranded<z.ZodString, "ContentProgramSha256", "out">;
|
|
198
|
+
source: z.ZodString;
|
|
199
|
+
host: z.ZodString;
|
|
200
|
+
path: z.ZodString;
|
|
201
|
+
methods: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodEnum<{
|
|
202
|
+
POST: "POST";
|
|
203
|
+
PUT: "PUT";
|
|
204
|
+
GET: "GET";
|
|
205
|
+
HEAD: "HEAD";
|
|
206
|
+
PATCH: "PATCH";
|
|
207
|
+
DELETE: "DELETE";
|
|
208
|
+
OPTIONS: "OPTIONS";
|
|
209
|
+
}>]>>;
|
|
210
|
+
auth: z.ZodLiteral<"inherit">;
|
|
211
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
212
|
+
kind: z.ZodLiteral<"not-found">;
|
|
213
|
+
status: z.ZodLiteral<404>;
|
|
214
|
+
runtime: z.ZodLiteral<"routing">;
|
|
215
|
+
destination: z.ZodString;
|
|
216
|
+
id: z.core.$ZodBranded<z.ZodString, "ContentProgramSha256", "out">;
|
|
217
|
+
source: z.ZodString;
|
|
218
|
+
host: z.ZodString;
|
|
219
|
+
path: z.ZodString;
|
|
220
|
+
methods: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodEnum<{
|
|
221
|
+
POST: "POST";
|
|
222
|
+
PUT: "PUT";
|
|
223
|
+
GET: "GET";
|
|
224
|
+
HEAD: "HEAD";
|
|
225
|
+
PATCH: "PATCH";
|
|
226
|
+
DELETE: "DELETE";
|
|
227
|
+
OPTIONS: "OPTIONS";
|
|
228
|
+
}>]>>;
|
|
229
|
+
auth: z.ZodLiteral<"inherit">;
|
|
230
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
231
|
+
kind: z.ZodLiteral<"functions">;
|
|
232
|
+
runtime: z.ZodLiteral<"cloudflare-worker">;
|
|
233
|
+
id: z.core.$ZodBranded<z.ZodString, "ContentProgramSha256", "out">;
|
|
234
|
+
source: z.ZodString;
|
|
235
|
+
host: z.ZodString;
|
|
236
|
+
path: z.ZodString;
|
|
237
|
+
methods: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodEnum<{
|
|
238
|
+
POST: "POST";
|
|
239
|
+
PUT: "PUT";
|
|
240
|
+
GET: "GET";
|
|
241
|
+
HEAD: "HEAD";
|
|
242
|
+
PATCH: "PATCH";
|
|
243
|
+
DELETE: "DELETE";
|
|
244
|
+
OPTIONS: "OPTIONS";
|
|
245
|
+
}>]>>;
|
|
246
|
+
auth: z.ZodLiteral<"inherit">;
|
|
247
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
248
|
+
kind: z.ZodLiteral<"php-function">;
|
|
249
|
+
runtime: z.ZodLiteral<"php">;
|
|
250
|
+
id: z.core.$ZodBranded<z.ZodString, "ContentProgramSha256", "out">;
|
|
251
|
+
source: z.ZodString;
|
|
252
|
+
host: z.ZodString;
|
|
253
|
+
path: z.ZodString;
|
|
254
|
+
methods: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodEnum<{
|
|
255
|
+
POST: "POST";
|
|
256
|
+
PUT: "PUT";
|
|
257
|
+
GET: "GET";
|
|
258
|
+
HEAD: "HEAD";
|
|
259
|
+
PATCH: "PATCH";
|
|
260
|
+
DELETE: "DELETE";
|
|
261
|
+
OPTIONS: "OPTIONS";
|
|
262
|
+
}>]>>;
|
|
263
|
+
auth: z.ZodLiteral<"inherit">;
|
|
264
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
265
|
+
kind: z.ZodLiteral<"zero-control">;
|
|
266
|
+
runtime: z.ZodLiteral<"php">;
|
|
267
|
+
id: z.core.$ZodBranded<z.ZodString, "ContentProgramSha256", "out">;
|
|
268
|
+
source: z.ZodString;
|
|
269
|
+
host: z.ZodString;
|
|
270
|
+
path: z.ZodString;
|
|
271
|
+
methods: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodEnum<{
|
|
272
|
+
POST: "POST";
|
|
273
|
+
PUT: "PUT";
|
|
274
|
+
GET: "GET";
|
|
275
|
+
HEAD: "HEAD";
|
|
276
|
+
PATCH: "PATCH";
|
|
277
|
+
DELETE: "DELETE";
|
|
278
|
+
OPTIONS: "OPTIONS";
|
|
279
|
+
}>]>>;
|
|
280
|
+
auth: z.ZodLiteral<"inherit">;
|
|
281
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
282
|
+
kind: z.ZodLiteral<"zero-endpoint">;
|
|
283
|
+
runtime: z.ZodLiteral<"quick-js">;
|
|
284
|
+
id: z.core.$ZodBranded<z.ZodString, "ContentProgramSha256", "out">;
|
|
285
|
+
source: z.ZodString;
|
|
286
|
+
host: z.ZodString;
|
|
287
|
+
path: z.ZodString;
|
|
288
|
+
methods: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodEnum<{
|
|
289
|
+
POST: "POST";
|
|
290
|
+
PUT: "PUT";
|
|
291
|
+
GET: "GET";
|
|
292
|
+
HEAD: "HEAD";
|
|
293
|
+
PATCH: "PATCH";
|
|
294
|
+
DELETE: "DELETE";
|
|
295
|
+
OPTIONS: "OPTIONS";
|
|
296
|
+
}>]>>;
|
|
297
|
+
auth: z.ZodLiteral<"inherit">;
|
|
298
|
+
}, z.core.$strict>], "kind">>;
|
|
299
|
+
}, z.core.$strict>;
|
|
300
|
+
export type RouteInventoryV1 = z.infer<typeof routeInventoryV1Schema>;
|
|
301
|
+
export declare const spaceRouteSnapshotRouteV1Schema: z.ZodObject<{
|
|
302
|
+
id: z.core.$ZodBranded<z.ZodString, "ContentProgramSha256", "out">;
|
|
303
|
+
sourceRuleId: z.ZodNumber;
|
|
304
|
+
priority: z.ZodNumber;
|
|
305
|
+
host: z.ZodString;
|
|
306
|
+
methods: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodEnum<{
|
|
307
|
+
POST: "POST";
|
|
308
|
+
PUT: "PUT";
|
|
309
|
+
GET: "GET";
|
|
310
|
+
HEAD: "HEAD";
|
|
311
|
+
PATCH: "PATCH";
|
|
312
|
+
DELETE: "DELETE";
|
|
313
|
+
OPTIONS: "OPTIONS";
|
|
314
|
+
}>]>>;
|
|
315
|
+
match: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
316
|
+
kind: z.ZodLiteral<"exact">;
|
|
317
|
+
path: z.ZodString;
|
|
318
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
319
|
+
kind: z.ZodLiteral<"pattern">;
|
|
320
|
+
pattern: z.ZodString;
|
|
321
|
+
}, z.core.$strict>], "kind">;
|
|
322
|
+
destination: z.ZodString;
|
|
323
|
+
status: z.ZodUnion<readonly [z.ZodLiteral<301>, z.ZodLiteral<302>, z.ZodLiteral<303>, z.ZodLiteral<307>, z.ZodLiteral<308>]>;
|
|
324
|
+
}, z.core.$strict>;
|
|
325
|
+
export type SpaceRouteSnapshotRouteV1 = z.infer<typeof spaceRouteSnapshotRouteV1Schema>;
|
|
326
|
+
export declare const spaceRouteSnapshotV1Schema: z.ZodObject<{
|
|
327
|
+
format: z.ZodLiteral<"spacefast.space-route-snapshot">;
|
|
328
|
+
version: z.ZodLiteral<1>;
|
|
329
|
+
spaceId: z.ZodTemplateLiteral<`spc_${string}`>;
|
|
330
|
+
source: z.ZodLiteral<"wordpress-redirection">;
|
|
331
|
+
capturedAt: z.ZodString;
|
|
332
|
+
revision: z.core.$ZodBranded<z.ZodString, "ContentProgramSha256", "out">;
|
|
333
|
+
routes: z.ZodArray<z.ZodObject<{
|
|
334
|
+
id: z.core.$ZodBranded<z.ZodString, "ContentProgramSha256", "out">;
|
|
335
|
+
sourceRuleId: z.ZodNumber;
|
|
336
|
+
priority: z.ZodNumber;
|
|
337
|
+
host: z.ZodString;
|
|
338
|
+
methods: z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodEnum<{
|
|
339
|
+
POST: "POST";
|
|
340
|
+
PUT: "PUT";
|
|
341
|
+
GET: "GET";
|
|
342
|
+
HEAD: "HEAD";
|
|
343
|
+
PATCH: "PATCH";
|
|
344
|
+
DELETE: "DELETE";
|
|
345
|
+
OPTIONS: "OPTIONS";
|
|
346
|
+
}>]>>;
|
|
347
|
+
match: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
348
|
+
kind: z.ZodLiteral<"exact">;
|
|
349
|
+
path: z.ZodString;
|
|
350
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
351
|
+
kind: z.ZodLiteral<"pattern">;
|
|
352
|
+
pattern: z.ZodString;
|
|
353
|
+
}, z.core.$strict>], "kind">;
|
|
354
|
+
destination: z.ZodString;
|
|
355
|
+
status: z.ZodUnion<readonly [z.ZodLiteral<301>, z.ZodLiteral<302>, z.ZodLiteral<303>, z.ZodLiteral<307>, z.ZodLiteral<308>]>;
|
|
356
|
+
}, z.core.$strict>>;
|
|
357
|
+
}, z.core.$strict>;
|
|
358
|
+
export type SpaceRouteSnapshotV1 = z.infer<typeof spaceRouteSnapshotV1Schema>;
|