@spacefast/common 0.0.5 → 0.0.7
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/spacefast-favicon.svg +16 -0
- package/brand-assets/spacefast-sf-full-bleed.svg +13 -0
- package/brand-assets/spacefast-wordmark.svg +5 -0
- package/dist/agents/connect-targets.d.ts +138 -0
- package/dist/agents/connect-targets.js +243 -0
- package/dist/brand-assets-build.d.ts +26 -0
- package/dist/brand-assets-build.js +81 -0
- package/dist/brand-assets.d.ts +42 -0
- package/dist/brand-assets.js +30 -0
- package/dist/brand.d.ts +1 -0
- package/dist/brand.js +5 -0
- package/dist/config/domains.d.ts +12 -6
- package/dist/config/domains.js +30 -38
- package/dist/contracts/access.d.ts +967 -124
- package/dist/contracts/access.js +804 -148
- package/dist/contracts/activity.d.ts +1 -1
- package/dist/contracts/activity.js +28 -2
- package/dist/contracts/annotations.d.ts +2 -4
- package/dist/contracts/api-keys.d.ts +126 -4
- package/dist/contracts/api-keys.js +74 -6
- package/dist/contracts/archives.d.ts +8 -2
- package/dist/contracts/archives.js +11 -4
- package/dist/contracts/billing.d.ts +0 -9
- package/dist/contracts/builds.d.ts +65 -21
- package/dist/contracts/builds.js +29 -0
- package/dist/contracts/common.d.ts +2 -0
- package/dist/contracts/common.js +4 -0
- package/dist/contracts/continuation.d.ts +0 -3
- package/dist/contracts/countries.d.ts +2 -0
- package/dist/contracts/countries.js +261 -0
- package/dist/contracts/deployments.d.ts +34 -34
- package/dist/contracts/device-auth.d.ts +4 -11
- package/dist/contracts/device-auth.js +4 -0
- package/dist/contracts/docs.d.ts +119 -0
- package/dist/contracts/docs.js +51 -0
- package/dist/contracts/domains.d.ts +96 -54
- package/dist/contracts/domains.js +26 -4
- package/dist/contracts/enums.d.ts +15 -16
- package/dist/contracts/enums.js +26 -14
- package/dist/contracts/error-code-meta.d.ts +184 -0
- package/dist/contracts/error-code-meta.js +124 -10
- package/dist/contracts/error-codes.d.ts +1 -1
- package/dist/contracts/error-codes.js +42 -0
- package/dist/contracts/events.d.ts +1 -1
- package/dist/contracts/feature-lifecycle-core.d.ts +36 -0
- package/dist/contracts/feature-lifecycle-core.js +220 -0
- package/dist/contracts/feature-lifecycle.d.ts +7 -0
- package/dist/contracts/feature-lifecycle.js +31 -0
- package/dist/contracts/features.d.ts +76 -6
- package/dist/contracts/features.js +178 -13
- package/dist/contracts/generated-feature-launch-entries.d.ts +2 -0
- package/dist/contracts/generated-feature-launch-entries.js +518 -0
- package/dist/contracts/git.d.ts +2 -8
- package/dist/contracts/ids.d.ts +9 -0
- package/dist/contracts/ids.js +13 -0
- package/dist/contracts/mcp.d.ts +8 -10
- package/dist/contracts/me.js +1 -1
- package/dist/contracts/oauth-resources.d.ts +19 -8
- package/dist/contracts/oauth-resources.js +44 -13
- package/dist/contracts/operations.d.ts +161 -1
- package/dist/contracts/operations.js +49 -1
- package/dist/contracts/platform.d.ts +6 -102
- package/dist/contracts/platform.js +6 -50
- package/dist/contracts/publishes.d.ts +130 -0
- package/dist/contracts/publishes.js +145 -0
- package/dist/contracts/push-new.d.ts +4 -4
- package/dist/contracts/quotas.d.ts +2 -0
- package/dist/contracts/quotas.js +8 -0
- package/dist/contracts/repository-connections.d.ts +9 -8
- package/dist/contracts/repository-connections.js +13 -0
- package/dist/contracts/resources.d.ts +99 -13
- package/dist/contracts/resources.js +36 -4
- package/dist/contracts/routes.d.ts +0 -2
- package/dist/contracts/runtime-api.d.ts +363 -39
- package/dist/contracts/runtime-api.js +276 -6
- package/dist/contracts/sf-config-v1.d.ts +75 -0
- package/dist/contracts/sf-config-v1.js +6 -0
- package/dist/contracts/sites.d.ts +19 -2
- package/dist/contracts/sites.js +21 -0
- package/dist/contracts/space-config.d.ts +201 -2
- package/dist/contracts/space-config.js +135 -5
- package/dist/contracts/spaces.d.ts +376 -196
- package/dist/contracts/spaces.js +62 -10
- package/dist/contracts/superadmin-emails.d.ts +4 -2
- package/dist/contracts/superadmin-emails.js +8 -0
- package/dist/contracts/superadmin-queues.d.ts +26 -26
- package/dist/contracts/superadmin-spaces.d.ts +172 -42
- package/dist/contracts/superadmin-tenants.d.ts +6 -6
- package/dist/contracts/superadmin-tenants.js +6 -11
- package/dist/contracts/superadmin.d.ts +6 -93
- package/dist/contracts/superadmin.js +6 -14
- package/dist/contracts/tags.d.ts +10 -9
- package/dist/contracts/tags.js +2 -1
- package/dist/contracts/teams.d.ts +26 -30
- package/dist/contracts/teams.js +11 -17
- package/dist/contracts/theme-json.d.ts +30 -0
- package/dist/contracts/theme-json.js +48 -0
- package/dist/contracts/variables.d.ts +0 -2
- package/dist/contracts/variables.js +0 -5
- package/dist/contracts/webhooks.d.ts +2 -0
- package/dist/contracts/webhooks.js +1 -1
- package/dist/contracts/zero.d.ts +5 -10
- package/dist/docs/agent-prose.d.ts +43 -3
- package/dist/docs/agent-prose.js +146 -7
- package/dist/docs/agent-setup.d.ts +51 -0
- package/dist/docs/agent-setup.js +211 -14
- package/dist/docs/agent-solutions.d.ts +5 -5
- package/dist/docs/agent-solutions.js +2 -2
- package/dist/docs/catalog.d.ts +650 -0
- package/dist/docs/catalog.js +758 -0
- package/dist/docs/error-docs.d.ts +0 -2
- package/dist/docs/error-docs.js +189 -35
- package/dist/docs/index-build.d.ts +17 -0
- package/dist/docs/index-build.js +24 -0
- package/dist/docs/search.d.ts +54 -0
- package/dist/docs/search.js +96 -0
- package/dist/docs/skill-distribution.d.ts +5 -3
- package/dist/docs/skill-distribution.js +8 -8
- package/dist/slug-policy/blocklist.d.ts +4 -0
- package/dist/slug-policy/blocklist.js +122 -0
- package/dist/slug-policy/index.d.ts +17 -0
- package/dist/slug-policy/index.js +86 -0
- package/dist/utils/access-match.d.ts +39 -0
- package/dist/utils/access-match.js +296 -0
- package/dist/utils/auth-redirect.d.ts +3 -1
- package/dist/utils/auth-redirect.js +21 -1
- package/dist/utils/build-settings.d.ts +6 -0
- package/dist/utils/build-settings.js +429 -46
- package/dist/utils/claim-token.d.ts +8 -0
- package/dist/utils/claim-token.js +23 -2
- package/dist/utils/concurrency.d.ts +1 -0
- package/dist/utils/concurrency.js +22 -0
- package/dist/utils/content-type.d.ts +1 -0
- package/dist/utils/content-type.js +1 -1
- package/dist/utils/credential-policy.d.ts +54 -0
- package/dist/utils/{access-policy.js → credential-policy.js} +28 -2
- package/dist/utils/email.d.ts +1 -0
- package/dist/utils/email.js +3 -0
- package/dist/utils/gate-theme.d.ts +61 -0
- package/dist/utils/gate-theme.js +217 -0
- package/dist/utils/git-repository.d.ts +0 -1
- package/dist/utils/git-repository.js +0 -3
- package/dist/utils/id-hints.d.ts +8 -0
- package/dist/utils/id-hints.js +61 -0
- package/dist/utils/local-space-state.d.ts +91 -0
- package/dist/utils/local-space-state.js +251 -0
- package/dist/utils/oauth-signed-query.d.ts +8 -0
- package/dist/utils/oauth-signed-query.js +26 -0
- package/dist/utils/publish-detection.d.ts +0 -8
- package/dist/utils/publish-detection.js +0 -93
- package/dist/utils/publish-policy.d.ts +6 -5
- package/dist/utils/publish-policy.js +71 -7
- package/dist/utils/query-keys.d.ts +16 -4
- package/dist/utils/query-keys.js +31 -4
- package/dist/utils/runtime-paths.d.ts +0 -1
- package/dist/utils/runtime-paths.js +0 -1
- package/dist/utils/runtime-upload-batch.d.ts +18 -0
- package/dist/utils/runtime-upload-batch.js +90 -0
- package/dist/utils/runtime-upload.d.ts +2 -0
- package/dist/utils/runtime-upload.js +5 -0
- package/dist/utils/sf-config-v1.d.ts +2 -0
- package/dist/utils/sf-config-v1.js +542 -0
- package/dist/utils/space-config.d.ts +4 -0
- package/dist/utils/space-config.js +10 -1
- package/dist/utils/space-theme.d.ts +2 -0
- package/dist/utils/space-theme.js +9 -0
- package/dist/utils/static-runtime-policy.d.ts +0 -21
- package/dist/utils/static-runtime-policy.js +19 -103
- package/dist/utils/upload-session.d.ts +1 -1
- package/dist/utils/wpcom-auth-redirects.d.ts +32 -2
- package/dist/utils/wpcom-auth-redirects.js +26 -10
- package/dist/vocabulary.d.ts +130 -30
- package/dist/vocabulary.js +77 -36
- package/package.json +35 -1
- package/dist/contracts/account.d.ts +0 -28
- package/dist/contracts/account.js +0 -54
- package/dist/contracts/intercom.d.ts +0 -6
- package/dist/contracts/intercom.js +0 -5
- package/dist/contracts/telemetry.d.ts +0 -2
- package/dist/contracts/telemetry.js +0 -1
- package/dist/utils/access-policy.d.ts +0 -39
- package/dist/utils/error-display.d.ts +0 -7
- package/dist/utils/error-display.js +0 -42
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const ACTIVITY_EVENT_CODES: readonly ["space.created", "space.claimed", "space.transferred", "space.moved", "space.expired", "space.disabled", "space.enabled", "space.deleted", "space.config_updated", "space.password_updated", "version.created", "version.ready", "version.warning", "version.failed", "version.expired", "version.canceled", "version.deleted", "version.retention_warning", "version.retention_deleted", "channel.promoted", "build.created", "build.succeeded", "build.failed", "build.canceled", "build.skipped", "domain.created", "domain.verified", "domain.verification_failed", "domain.control_lost", "domain.dns_updated", "domain.nameservers_updated", "domain.registration_purchased", "domain.registration_renewed", "domain.registration_expiring", "domain.registration_expired", "domain.transfer_in_started", "domain.transfer_out_started", "domain.deleted", "binding.created", "binding.activated", "binding.blocked", "binding.deleted", "transfer.requested", "transfer.confirmed", "transfer.completed", "transfer.canceled", "transfer.expired", "transfer.failed", "variable.updated", "variable.deleted", "api_key.created", "api_key.updated", "api_key.revoked", "webhook.created", "webhook.updated", "webhook.secret_rotated", "webhook.disabled", "team.updated", "team.member_added", "team.member_removed", "team.member_role_updated", "team.builds_deploys_quota_exceeded", "tenant.past_due", "tenant.suspended", "tenant.reactivated", "tenant.deleted", "export.ready", "export.failed", "import.ready", "import.failed", "annotation.token_minted", "annotation.created", "annotation.comment_created", "annotation.resolved", "annotation.reopened", "annotation.archived", "abuse_report.created", "abuse_report.updated", "claim.blocked_takedown", "user.created", "user.signed_in", "user.deleted", "user.impersonation_started", "user.impersonation_stopped", "user.two_factor_enabled", "user.two_factor_disabled"];
|
|
2
|
+
export declare const ACTIVITY_EVENT_CODES: readonly ["space.created", "space.claimed", "feedback.lead_claim_pending", "space.transferred", "space.move_requested", "space.moved", "space.expired", "space.disabled", "space.enabled", "space.deleted", "space.config_updated", "space.password_updated", "site.provision_requested", "site.placement_hold_set", "site.placement_hold_cleared", "site.burst_toggled", "space.access_logout_all", "space.access_transfer_scrub", "space.access_operator_token", "space.sharing_updated", "space.share_link_created", "space.share_link_revoked", "space.invite_created", "space.invite_revoked", "space.access_request_created", "space.access_request_resolved", "space.firewall_updated", "team.access_defaults_updated", "team.service_token_created", "team.service_token_revoked", "team.access_connection_created", "team.access_connection_updated", "team.access_connection_revoked", "version.created", "version.ready", "version.warning", "version.failed", "version.expired", "version.canceled", "version.deleted", "version.retention_warning", "version.retention_deleted", "channel.promoted", "build.created", "build.succeeded", "build.failed", "build.canceled", "build.skipped", "domain.created", "domain.verified", "domain.verification_failed", "domain.control_lost", "domain.dns_updated", "domain.nameservers_updated", "domain.registration_purchased", "domain.registration_renewed", "domain.registration_expiring", "domain.registration_expired", "domain.transfer_in_started", "domain.transfer_out_started", "domain.deleted", "binding.created", "binding.activated", "binding.blocked", "binding.deleted", "transfer.requested", "transfer.confirmed", "transfer.completed", "transfer.canceled", "transfer.expired", "transfer.failed", "variable.updated", "variable.deleted", "api_key.created", "api_key.updated", "api_key.revoked", "webhook.created", "webhook.updated", "webhook.secret_rotated", "webhook.disabled", "webhook.deleted", "team.updated", "team.member_added", "team.member_removed", "team.member_role_updated", "team.builds_deploys_quota_exceeded", "tenant.past_due", "tenant.suspended", "tenant.reactivated", "tenant.deleted", "export.ready", "export.failed", "import.ready", "import.failed", "annotation.token_minted", "annotation.created", "annotation.comment_created", "annotation.resolved", "annotation.reopened", "annotation.archived", "abuse_report.created", "abuse_report.updated", "claim.blocked_takedown", "user.created", "user.signed_in", "user.deleted", "user.impersonation_started", "user.impersonation_stopped", "user.two_factor_enabled", "user.two_factor_disabled"];
|
|
3
3
|
export type ActivityEventCode = (typeof ACTIVITY_EVENT_CODES)[number];
|
|
4
4
|
export declare function isActivityEventCode(value: string): value is ActivityEventCode;
|
|
5
5
|
export declare function isValidActivityEventFilter(filter: string): boolean;
|
|
@@ -9,7 +9,9 @@ export const ACTIVITY_EVENT_CODES = [
|
|
|
9
9
|
// space
|
|
10
10
|
"space.created",
|
|
11
11
|
"space.claimed",
|
|
12
|
+
"feedback.lead_claim_pending",
|
|
12
13
|
"space.transferred",
|
|
14
|
+
"space.move_requested",
|
|
13
15
|
"space.moved",
|
|
14
16
|
"space.expired",
|
|
15
17
|
"space.disabled",
|
|
@@ -17,6 +19,30 @@ export const ACTIVITY_EVENT_CODES = [
|
|
|
17
19
|
"space.deleted",
|
|
18
20
|
"space.config_updated",
|
|
19
21
|
"space.password_updated",
|
|
22
|
+
// site
|
|
23
|
+
"site.provision_requested",
|
|
24
|
+
"site.placement_hold_set",
|
|
25
|
+
"site.placement_hold_cleared",
|
|
26
|
+
"site.burst_toggled",
|
|
27
|
+
// access (internal-docs/access-plan.html): every access mutation emits an
|
|
28
|
+
// activity event; operator mints are audited and owner-visible (X-27).
|
|
29
|
+
"space.access_logout_all",
|
|
30
|
+
"space.access_transfer_scrub",
|
|
31
|
+
"space.access_operator_token",
|
|
32
|
+
"space.sharing_updated",
|
|
33
|
+
"space.share_link_created",
|
|
34
|
+
"space.share_link_revoked",
|
|
35
|
+
"space.invite_created",
|
|
36
|
+
"space.invite_revoked",
|
|
37
|
+
"space.access_request_created",
|
|
38
|
+
"space.access_request_resolved",
|
|
39
|
+
"space.firewall_updated",
|
|
40
|
+
"team.access_defaults_updated",
|
|
41
|
+
"team.service_token_created",
|
|
42
|
+
"team.service_token_revoked",
|
|
43
|
+
"team.access_connection_created",
|
|
44
|
+
"team.access_connection_updated",
|
|
45
|
+
"team.access_connection_revoked",
|
|
20
46
|
// version
|
|
21
47
|
"version.created",
|
|
22
48
|
"version.ready",
|
|
@@ -68,12 +94,12 @@ export const ACTIVITY_EVENT_CODES = [
|
|
|
68
94
|
"api_key.created",
|
|
69
95
|
"api_key.updated",
|
|
70
96
|
"api_key.revoked",
|
|
71
|
-
// webhook
|
|
72
|
-
// webhook.deleted event — internal-docs/platform.md "Webhook DELETE")
|
|
97
|
+
// webhook
|
|
73
98
|
"webhook.created",
|
|
74
99
|
"webhook.updated",
|
|
75
100
|
"webhook.secret_rotated",
|
|
76
101
|
"webhook.disabled",
|
|
102
|
+
"webhook.deleted",
|
|
77
103
|
// team (builds_deploys_quota_exceeded is a shipped additive extension: the
|
|
78
104
|
// pooled monthly builds+deploys meter is SOFT — it tracks, never blocks)
|
|
79
105
|
"team.updated",
|
|
@@ -273,8 +273,8 @@ export declare const annotationPatchSchema: z.ZodObject<{
|
|
|
273
273
|
}, z.core.$strip>;
|
|
274
274
|
export declare const annotationExportQuerySchema: z.ZodObject<{
|
|
275
275
|
format: z.ZodDefault<z.ZodEnum<{
|
|
276
|
-
markdown: "markdown";
|
|
277
276
|
json: "json";
|
|
277
|
+
markdown: "markdown";
|
|
278
278
|
}>>;
|
|
279
279
|
status: z.ZodOptional<z.ZodEnum<{
|
|
280
280
|
open: "open";
|
|
@@ -314,14 +314,12 @@ export declare const annotationListResponseSchema: z.ZodObject<{
|
|
|
314
314
|
}, z.core.$strip>;
|
|
315
315
|
export declare const annotationExportResponseSchema: z.ZodObject<{
|
|
316
316
|
format: z.ZodEnum<{
|
|
317
|
-
markdown: "markdown";
|
|
318
317
|
json: "json";
|
|
318
|
+
markdown: "markdown";
|
|
319
319
|
}>;
|
|
320
320
|
content: z.ZodString;
|
|
321
321
|
}, z.core.$strip>;
|
|
322
322
|
export type CollaborationInvitedReviewer = z.infer<typeof collaborationInvitedReviewerSchema>;
|
|
323
323
|
export type Collaboration = z.infer<typeof collaborationSchema>;
|
|
324
|
-
export type OverlayConfig = z.infer<typeof overlayConfigSchema>;
|
|
325
324
|
export type PublicOverlayConfig = z.infer<typeof publicOverlayConfigSchema>;
|
|
326
325
|
export type AnnotationThread = z.infer<typeof annotationThreadSchema>;
|
|
327
|
-
export type RealtimeToken = z.infer<typeof realtimeTokenResponseSchema>;
|
|
@@ -61,7 +61,7 @@ export type ParsedStatticResource = {
|
|
|
61
61
|
} | {
|
|
62
62
|
kind: "space";
|
|
63
63
|
tenantId: string;
|
|
64
|
-
siteId: string;
|
|
64
|
+
siteId: string | null;
|
|
65
65
|
spaceId: string;
|
|
66
66
|
wildcard: boolean;
|
|
67
67
|
} | {
|
|
@@ -74,7 +74,7 @@ export type ParsedStatticResource = {
|
|
|
74
74
|
domainGroupId: string;
|
|
75
75
|
};
|
|
76
76
|
export declare function parseStatticResource(value: string): ParsedStatticResource | null;
|
|
77
|
-
export declare const
|
|
77
|
+
export declare const ApiCredentialPolicySchema: z.ZodObject<{
|
|
78
78
|
version: z.ZodLiteral<"2026-06-09">;
|
|
79
79
|
statements: z.ZodArray<z.ZodObject<{
|
|
80
80
|
effect: z.ZodEnum<{
|
|
@@ -135,7 +135,7 @@ export declare const StatticAccessPolicySchema: z.ZodObject<{
|
|
|
135
135
|
}, z.core.$strict>>;
|
|
136
136
|
}, z.core.$strict>>;
|
|
137
137
|
}, z.core.$strict>;
|
|
138
|
-
export type
|
|
138
|
+
export type ApiCredentialPolicy = z.infer<typeof ApiCredentialPolicySchema>;
|
|
139
139
|
export declare const ApiKeyPresetSchema: z.ZodEnum<{
|
|
140
140
|
ci_deploy: "ci_deploy";
|
|
141
141
|
space_publisher: "space_publisher";
|
|
@@ -511,7 +511,129 @@ export declare const ApiKeyPatchRequestSchema: z.ZodObject<{
|
|
|
511
511
|
}, z.core.$strict>>;
|
|
512
512
|
}, z.core.$strict>>;
|
|
513
513
|
}, z.core.$strip>;
|
|
514
|
-
export
|
|
514
|
+
export declare const ApiKeyScopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
515
|
+
kind: z.ZodLiteral<"team">;
|
|
516
|
+
teamId: z.ZodString;
|
|
517
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
518
|
+
kind: z.ZodLiteral<"space">;
|
|
519
|
+
spaceId: z.ZodString;
|
|
520
|
+
}, z.core.$strict>], "kind">;
|
|
521
|
+
export type ApiKeyScope = z.infer<typeof ApiKeyScopeSchema>;
|
|
522
|
+
export declare const ApiKeyScopedCreateRequestSchema: z.ZodObject<{
|
|
523
|
+
name: z.ZodOptional<z.ZodString>;
|
|
524
|
+
scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
525
|
+
kind: z.ZodLiteral<"team">;
|
|
526
|
+
teamId: z.ZodString;
|
|
527
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
528
|
+
kind: z.ZodLiteral<"space">;
|
|
529
|
+
spaceId: z.ZodString;
|
|
530
|
+
}, z.core.$strict>], "kind">;
|
|
531
|
+
permissions: z.ZodArray<z.ZodEnum<{
|
|
532
|
+
"*": "*";
|
|
533
|
+
"sites:read": "sites:read";
|
|
534
|
+
"sites:create": "sites:create";
|
|
535
|
+
"sites:write": "sites:write";
|
|
536
|
+
"sites:delete": "sites:delete";
|
|
537
|
+
"sites:policy.write": "sites:policy.write";
|
|
538
|
+
"spaces:read": "spaces:read";
|
|
539
|
+
"spaces:create": "spaces:create";
|
|
540
|
+
"spaces:write": "spaces:write";
|
|
541
|
+
"spaces:delete": "spaces:delete";
|
|
542
|
+
"spaces:publish": "spaces:publish";
|
|
543
|
+
"spaces:transfer": "spaces:transfer";
|
|
544
|
+
"spaces:export": "spaces:export";
|
|
545
|
+
"spaces:import": "spaces:import";
|
|
546
|
+
"versions:read": "versions:read";
|
|
547
|
+
"versions:promote": "versions:promote";
|
|
548
|
+
"versions:delete": "versions:delete";
|
|
549
|
+
"versions:download": "versions:download";
|
|
550
|
+
"domains:read": "domains:read";
|
|
551
|
+
"domains:create": "domains:create";
|
|
552
|
+
"domains:verify": "domains:verify";
|
|
553
|
+
"domains:assign": "domains:assign";
|
|
554
|
+
"domains:bind": "domains:bind";
|
|
555
|
+
"domains:delete": "domains:delete";
|
|
556
|
+
"domains:dns.write": "domains:dns.write";
|
|
557
|
+
"domains:dns.credentials.write": "domains:dns.credentials.write";
|
|
558
|
+
"domains:purchase": "domains:purchase";
|
|
559
|
+
"webhooks:read": "webhooks:read";
|
|
560
|
+
"webhooks:write": "webhooks:write";
|
|
561
|
+
"builds:read": "builds:read";
|
|
562
|
+
"builds:create": "builds:create";
|
|
563
|
+
"teams:read": "teams:read";
|
|
564
|
+
"teams:write": "teams:write";
|
|
565
|
+
"teams:members.write": "teams:members.write";
|
|
566
|
+
"billing:read": "billing:read";
|
|
567
|
+
"billing:write": "billing:write";
|
|
568
|
+
"tokens:read": "tokens:read";
|
|
569
|
+
"tokens:create": "tokens:create";
|
|
570
|
+
"tokens:revoke": "tokens:revoke";
|
|
571
|
+
"mcp:tools": "mcp:tools";
|
|
572
|
+
"runtime:manage": "runtime:manage";
|
|
573
|
+
}>>;
|
|
574
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
575
|
+
ipAllowlist: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
576
|
+
expiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
577
|
+
notBefore: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
578
|
+
}, z.core.$strict>;
|
|
579
|
+
export type ApiKeyScopedCreateRequest = z.infer<typeof ApiKeyScopedCreateRequestSchema>;
|
|
580
|
+
export declare const ApiKeyScopedPatchRequestSchema: z.ZodObject<{
|
|
581
|
+
scope: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
582
|
+
kind: z.ZodLiteral<"team">;
|
|
583
|
+
teamId: z.ZodString;
|
|
584
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
585
|
+
kind: z.ZodLiteral<"space">;
|
|
586
|
+
spaceId: z.ZodString;
|
|
587
|
+
}, z.core.$strict>], "kind">>;
|
|
588
|
+
permissions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
589
|
+
"*": "*";
|
|
590
|
+
"sites:read": "sites:read";
|
|
591
|
+
"sites:create": "sites:create";
|
|
592
|
+
"sites:write": "sites:write";
|
|
593
|
+
"sites:delete": "sites:delete";
|
|
594
|
+
"sites:policy.write": "sites:policy.write";
|
|
595
|
+
"spaces:read": "spaces:read";
|
|
596
|
+
"spaces:create": "spaces:create";
|
|
597
|
+
"spaces:write": "spaces:write";
|
|
598
|
+
"spaces:delete": "spaces:delete";
|
|
599
|
+
"spaces:publish": "spaces:publish";
|
|
600
|
+
"spaces:transfer": "spaces:transfer";
|
|
601
|
+
"spaces:export": "spaces:export";
|
|
602
|
+
"spaces:import": "spaces:import";
|
|
603
|
+
"versions:read": "versions:read";
|
|
604
|
+
"versions:promote": "versions:promote";
|
|
605
|
+
"versions:delete": "versions:delete";
|
|
606
|
+
"versions:download": "versions:download";
|
|
607
|
+
"domains:read": "domains:read";
|
|
608
|
+
"domains:create": "domains:create";
|
|
609
|
+
"domains:verify": "domains:verify";
|
|
610
|
+
"domains:assign": "domains:assign";
|
|
611
|
+
"domains:bind": "domains:bind";
|
|
612
|
+
"domains:delete": "domains:delete";
|
|
613
|
+
"domains:dns.write": "domains:dns.write";
|
|
614
|
+
"domains:dns.credentials.write": "domains:dns.credentials.write";
|
|
615
|
+
"domains:purchase": "domains:purchase";
|
|
616
|
+
"webhooks:read": "webhooks:read";
|
|
617
|
+
"webhooks:write": "webhooks:write";
|
|
618
|
+
"builds:read": "builds:read";
|
|
619
|
+
"builds:create": "builds:create";
|
|
620
|
+
"teams:read": "teams:read";
|
|
621
|
+
"teams:write": "teams:write";
|
|
622
|
+
"teams:members.write": "teams:members.write";
|
|
623
|
+
"billing:read": "billing:read";
|
|
624
|
+
"billing:write": "billing:write";
|
|
625
|
+
"tokens:read": "tokens:read";
|
|
626
|
+
"tokens:create": "tokens:create";
|
|
627
|
+
"tokens:revoke": "tokens:revoke";
|
|
628
|
+
"mcp:tools": "mcp:tools";
|
|
629
|
+
"runtime:manage": "runtime:manage";
|
|
630
|
+
}>>>;
|
|
631
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
632
|
+
ipAllowlist: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
633
|
+
expiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
634
|
+
notBefore: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
635
|
+
}, z.core.$strict>;
|
|
636
|
+
export type ApiKeyScopedPatchRequest = z.infer<typeof ApiKeyScopedPatchRequestSchema>;
|
|
515
637
|
export declare const ApiKeyParamsSchema: z.ZodObject<{
|
|
516
638
|
apiKeyId: z.ZodString;
|
|
517
639
|
}, z.core.$strip>;
|
|
@@ -79,6 +79,9 @@ export function parseStatticResource(value) {
|
|
|
79
79
|
}
|
|
80
80
|
return null;
|
|
81
81
|
}
|
|
82
|
+
if (head === "space" && isResourceSegment(a) && path.length === 2) {
|
|
83
|
+
return { kind: "space", tenantId, siteId: null, spaceId: a, wildcard };
|
|
84
|
+
}
|
|
82
85
|
if (head === "domain" && isResourceSegment(a) && path.length === 2 && !wildcard) {
|
|
83
86
|
return { kind: "domain", tenantId, domainId: a };
|
|
84
87
|
}
|
|
@@ -91,10 +94,10 @@ const StatticResourceSchema = z
|
|
|
91
94
|
.string()
|
|
92
95
|
.max(512)
|
|
93
96
|
.refine((value) => parseStatticResource(value) !== null, {
|
|
94
|
-
message: "Resource must be a stt:// URI from the StatticResource union (tenant, principal, site, site space, domain, or domain-group).",
|
|
97
|
+
message: "Resource must be a stt:// URI from the StatticResource union (tenant, principal, site, space, site space, domain, or domain-group).",
|
|
95
98
|
})
|
|
96
|
-
.describe("A resource URI from the StatticResource union: stt://tenant/{t}, …/principal/(team|external)/{id}[/*], …/site/{id}[/*], …/site/{id}/space/{id}[/*], …/domain/{id}, or …/domain-group/{id}.");
|
|
97
|
-
export const
|
|
99
|
+
.describe("A resource URI from the StatticResource union: stt://tenant/{t}, …/principal/(team|external)/{id}[/*], …/site/{id}[/*], …/space/{id}[/*], …/site/{id}/space/{id}[/*], …/domain/{id}, or …/domain-group/{id}.");
|
|
100
|
+
export const ApiCredentialPolicySchema = z
|
|
98
101
|
.object({
|
|
99
102
|
version: z
|
|
100
103
|
.literal(SPACEFAST_ACCESS_POLICY_VERSION)
|
|
@@ -161,7 +164,7 @@ export const ApiKeySchema = z.object({
|
|
|
161
164
|
ownerPrincipal: ApiKeyOwnerPrincipalSchema.nullable().describe("Owning principal (ownership metadata, never the authorization gate)."),
|
|
162
165
|
createdByUserId: z.string().describe("User who created the key."),
|
|
163
166
|
preset: ApiKeyPresetSchema.nullable().describe("Preset the policy was compiled from, if any."),
|
|
164
|
-
policy:
|
|
167
|
+
policy: ApiCredentialPolicySchema.nullable().describe("Effective access policy. A key authorizes by policy only."),
|
|
165
168
|
metadata: AnyObjectSchema.describe("Caller-supplied metadata."),
|
|
166
169
|
secretPreview: z.string().describe("Masked secret preview (prefix and last characters)."),
|
|
167
170
|
secret: z.string().optional().describe("Full secret. Returned once, at creation only."),
|
|
@@ -196,7 +199,7 @@ export const ApiKeyCreateRequestSchema = z.object({
|
|
|
196
199
|
.optional()
|
|
197
200
|
.describe("Owning team for the new key. Defaults to the caller's own team; authorization is by the credential's policy, not key ownership."),
|
|
198
201
|
preset: ApiKeyPresetSchema.optional(),
|
|
199
|
-
policy:
|
|
202
|
+
policy: ApiCredentialPolicySchema.nullable()
|
|
200
203
|
.optional()
|
|
201
204
|
.describe("Explicit policy. Must be a subset of the calling credential's policy."),
|
|
202
205
|
metadata: AnyObjectSchema.optional().describe("Caller-supplied metadata."),
|
|
@@ -225,10 +228,75 @@ export const ApiKeyPatchRequestSchema = z
|
|
|
225
228
|
.nullable()
|
|
226
229
|
.optional()
|
|
227
230
|
.describe("Replacement activation instant."),
|
|
228
|
-
policy:
|
|
231
|
+
policy: ApiCredentialPolicySchema.optional().describe("Replacement policy. Must be a subset of the calling credential's policy at mutation time."),
|
|
232
|
+
})
|
|
233
|
+
.refine((value) => Object.keys(value).length > 0, {
|
|
234
|
+
message: "At least one mutable API key field is required.",
|
|
235
|
+
});
|
|
236
|
+
// Target §5C contract (internal-docs/cli-ux-dx-improvement-plan-2026-07-12.html
|
|
237
|
+
// "API key: finite permissions, no broad role"): key creation selects an
|
|
238
|
+
// explicit, finite scope and permission set — never a team-wide role that
|
|
239
|
+
// falls out of an omitted field. This is deliberately a DISJOINT shape from
|
|
240
|
+
// `ApiKeyCreateRequestSchema` (no teamId/preset/policy): the legacy shape
|
|
241
|
+
// stays valid only on the legacy route (api-keys/routes.ts); this is the only
|
|
242
|
+
// request shape the public core contract (api-contracts/core/api-keys.ts)
|
|
243
|
+
// accepts.
|
|
244
|
+
export const ApiKeyScopeSchema = z
|
|
245
|
+
.discriminatedUnion("kind", [
|
|
246
|
+
z.object({ kind: z.literal("team"), teamId: z.string().min(1) }).strict(),
|
|
247
|
+
z.object({ kind: z.literal("space"), spaceId: z.string().min(1) }).strict(),
|
|
248
|
+
])
|
|
249
|
+
.describe("Explicit, finite policy target. A space scope narrows the derived policy to exactly that space — never the owning team's whole tree.");
|
|
250
|
+
export const ApiKeyScopedCreateRequestSchema = z
|
|
251
|
+
.object({
|
|
252
|
+
name: z.string().trim().min(1).max(255).optional().describe("Human-readable key name."),
|
|
253
|
+
scope: ApiKeyScopeSchema,
|
|
254
|
+
permissions: z
|
|
255
|
+
.array(DescribedStatticActionSchema)
|
|
256
|
+
.min(1)
|
|
257
|
+
.max(64)
|
|
258
|
+
.describe("Finite permission set the derived policy grants, and nothing beyond it."),
|
|
259
|
+
metadata: AnyObjectSchema.optional().describe("Caller-supplied metadata."),
|
|
260
|
+
ipAllowlist: z
|
|
261
|
+
.array(z.string().trim().min(1).max(255))
|
|
262
|
+
.max(100)
|
|
263
|
+
.nullable()
|
|
264
|
+
.optional()
|
|
265
|
+
.describe("CIDR/IP allowlist for the new key."),
|
|
266
|
+
expiresAt: z.string().datetime().nullable().optional().describe("Expiry instant."),
|
|
267
|
+
notBefore: z.string().datetime().nullable().optional().describe("Activation instant."),
|
|
268
|
+
})
|
|
269
|
+
.strict();
|
|
270
|
+
export const ApiKeyScopedPatchRequestSchema = z
|
|
271
|
+
.object({
|
|
272
|
+
scope: ApiKeyScopeSchema.optional().describe("Replacement policy target. Must be supplied together with permissions."),
|
|
273
|
+
permissions: z
|
|
274
|
+
.array(DescribedStatticActionSchema)
|
|
275
|
+
.min(1)
|
|
276
|
+
.max(64)
|
|
277
|
+
.optional()
|
|
278
|
+
.describe("Replacement finite permission set. Must be supplied together with scope."),
|
|
279
|
+
metadata: AnyObjectSchema.optional().describe("Replacement caller-supplied metadata."),
|
|
280
|
+
ipAllowlist: z
|
|
281
|
+
.array(z.string().trim().min(1).max(255))
|
|
282
|
+
.max(100)
|
|
283
|
+
.nullable()
|
|
284
|
+
.optional()
|
|
285
|
+
.describe("Replacement CIDR/IP allowlist."),
|
|
286
|
+
expiresAt: z.string().datetime().nullable().optional().describe("Replacement expiry instant."),
|
|
287
|
+
notBefore: z
|
|
288
|
+
.string()
|
|
289
|
+
.datetime()
|
|
290
|
+
.nullable()
|
|
291
|
+
.optional()
|
|
292
|
+
.describe("Replacement activation instant."),
|
|
229
293
|
})
|
|
294
|
+
.strict()
|
|
230
295
|
.refine((value) => Object.keys(value).length > 0, {
|
|
231
296
|
message: "At least one mutable API key field is required.",
|
|
297
|
+
})
|
|
298
|
+
.refine((value) => (value.scope === undefined) === (value.permissions === undefined), {
|
|
299
|
+
message: "scope and permissions must be set together, or both omitted.",
|
|
232
300
|
});
|
|
233
301
|
export const ApiKeyParamsSchema = z.object({
|
|
234
302
|
apiKeyId: z.string().min(1).describe("API key id."),
|
|
@@ -25,7 +25,10 @@ export declare const spaceExportSchema: z.ZodObject<{
|
|
|
25
25
|
queued: "queued";
|
|
26
26
|
running: "running";
|
|
27
27
|
}>;
|
|
28
|
-
format: z.
|
|
28
|
+
format: z.ZodEnum<{
|
|
29
|
+
spacefast_export_v1: "spacefast_export_v1";
|
|
30
|
+
stattic_export_v1: "stattic_export_v1";
|
|
31
|
+
}>;
|
|
29
32
|
diagnostics: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
30
33
|
code: z.ZodString;
|
|
31
34
|
severity: z.ZodEnum<{
|
|
@@ -67,7 +70,10 @@ export declare const spaceExportListResponseSchema: z.ZodObject<{
|
|
|
67
70
|
queued: "queued";
|
|
68
71
|
running: "running";
|
|
69
72
|
}>;
|
|
70
|
-
format: z.
|
|
73
|
+
format: z.ZodEnum<{
|
|
74
|
+
spacefast_export_v1: "spacefast_export_v1";
|
|
75
|
+
stattic_export_v1: "stattic_export_v1";
|
|
76
|
+
}>;
|
|
71
77
|
diagnostics: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
72
78
|
code: z.ZodString;
|
|
73
79
|
severity: z.ZodEnum<{
|
|
@@ -18,7 +18,7 @@ export const spaceExportRequestSchema = z.object({
|
|
|
18
18
|
.describe("Include explicit space config (the space access policy) in the archive. Version manifests are always included."),
|
|
19
19
|
});
|
|
20
20
|
export const spaceExportArchiveSchema = z.object({
|
|
21
|
-
// Zip-only contract:
|
|
21
|
+
// Zip-only contract: spacefast_export_v1 archives are always zip (the spec
|
|
22
22
|
// allows "zip or tar"; one format keeps the enum honest).
|
|
23
23
|
contentType: z.literal("application/zip").describe("Archive media type. Always zip."),
|
|
24
24
|
downloadUrl: z
|
|
@@ -40,7 +40,11 @@ export const spaceExportSchema = z.object({
|
|
|
40
40
|
status: z
|
|
41
41
|
.enum(["queued", "running", "ready", "failed", "expired"])
|
|
42
42
|
.describe("Export lifecycle. `expired` means the archive download window has passed."),
|
|
43
|
-
|
|
43
|
+
// Producers emit `spacefast_export_v1`; `stattic_export_v1` remains accepted
|
|
44
|
+
// for archives/handles minted before the rename (legacy read-compat).
|
|
45
|
+
format: z
|
|
46
|
+
.enum(["spacefast_export_v1", "stattic_export_v1"])
|
|
47
|
+
.describe("Archive format identifier. New exports are `spacefast_export_v1`."),
|
|
44
48
|
diagnostics: z
|
|
45
49
|
.array(baseDiagnosticSchema)
|
|
46
50
|
.default([])
|
|
@@ -68,14 +72,17 @@ export const spaceImportSourceSchema = z
|
|
|
68
72
|
}),
|
|
69
73
|
z.object({
|
|
70
74
|
kind: z.literal("url").describe("Fetch the archive from a public HTTPS URL."),
|
|
71
|
-
url: z
|
|
75
|
+
url: z
|
|
76
|
+
.string()
|
|
77
|
+
.url()
|
|
78
|
+
.describe("Public HTTPS URL of a spacefast_export_v1 (or legacy stattic_export_v1) archive."),
|
|
72
79
|
}),
|
|
73
80
|
z.object({
|
|
74
81
|
kind: z.literal("export").describe("Import directly from an export on this control plane."),
|
|
75
82
|
exportId: z.string().min(1).describe("Source export id (exp_…) accessible to the caller."),
|
|
76
83
|
}),
|
|
77
84
|
])
|
|
78
|
-
.describe("Where the
|
|
85
|
+
.describe("Where the spacefast_export_v1 archive comes from.");
|
|
79
86
|
export const spaceImportRequestSchema = z.object({
|
|
80
87
|
source: spaceImportSourceSchema,
|
|
81
88
|
publish: z
|
|
@@ -6,7 +6,6 @@ export declare const billingProviderSchema: z.ZodEnum<{
|
|
|
6
6
|
app_store: "app_store";
|
|
7
7
|
google_play: "google_play";
|
|
8
8
|
}>;
|
|
9
|
-
export type BillingProvider = z.infer<typeof billingProviderSchema>;
|
|
10
9
|
export declare const billingIntervalValues: readonly ["monthly", "yearly"];
|
|
11
10
|
export declare const billingIntervalSchema: z.ZodEnum<{
|
|
12
11
|
monthly: "monthly";
|
|
@@ -68,7 +67,6 @@ export declare const billingStoreAccountResponseSchema: z.ZodObject<{
|
|
|
68
67
|
appStoreProducts: z.ZodArray<z.ZodString>;
|
|
69
68
|
googlePlayBasePlans: z.ZodArray<z.ZodString>;
|
|
70
69
|
}, z.core.$strip>;
|
|
71
|
-
export type BillingStoreAccountResponse = z.infer<typeof billingStoreAccountResponseSchema>;
|
|
72
70
|
export declare const appStoreVerifyRequestSchema: z.ZodObject<{
|
|
73
71
|
transactionId: z.ZodString;
|
|
74
72
|
}, z.core.$strip>;
|
|
@@ -88,7 +86,6 @@ export declare const storeSubscriptionResultSchema: z.ZodObject<{
|
|
|
88
86
|
isActive: z.ZodBoolean;
|
|
89
87
|
expiresAt: z.ZodNullable<z.ZodString>;
|
|
90
88
|
}, z.core.$strip>;
|
|
91
|
-
export type StoreSubscriptionResult = z.infer<typeof storeSubscriptionResultSchema>;
|
|
92
89
|
export declare const stripeCheckoutRequestSchema: z.ZodObject<{
|
|
93
90
|
planCode: z.ZodDefault<z.ZodEnum<{
|
|
94
91
|
free: "free";
|
|
@@ -104,17 +101,14 @@ export declare const stripeCheckoutRequestSchema: z.ZodObject<{
|
|
|
104
101
|
successUrl: z.ZodString;
|
|
105
102
|
cancelUrl: z.ZodString;
|
|
106
103
|
}, z.core.$strip>;
|
|
107
|
-
export type StripeCheckoutRequest = z.infer<typeof stripeCheckoutRequestSchema>;
|
|
108
104
|
export declare const stripePortalRequestSchema: z.ZodObject<{
|
|
109
105
|
returnUrl: z.ZodString;
|
|
110
106
|
}, z.core.$strip>;
|
|
111
|
-
export type StripePortalRequest = z.infer<typeof stripePortalRequestSchema>;
|
|
112
107
|
export declare const billingLinkResponseSchema: z.ZodObject<{
|
|
113
108
|
url: z.ZodString;
|
|
114
109
|
}, z.core.$strip>;
|
|
115
110
|
export type BillingLinkResponse = z.infer<typeof billingLinkResponseSchema>;
|
|
116
111
|
export declare const stripeCancelSubscriptionRequestSchema: z.ZodDefault<z.ZodObject<{}, z.core.$strip>>;
|
|
117
|
-
export type StripeCancelSubscriptionRequest = z.infer<typeof stripeCancelSubscriptionRequestSchema>;
|
|
118
112
|
export declare const stripeChangePlanRequestSchema: z.ZodObject<{
|
|
119
113
|
planCode: z.ZodEnum<{
|
|
120
114
|
free: "free";
|
|
@@ -128,14 +122,12 @@ export declare const stripeChangePlanRequestSchema: z.ZodObject<{
|
|
|
128
122
|
yearly: "yearly";
|
|
129
123
|
}>>;
|
|
130
124
|
}, z.core.$strip>;
|
|
131
|
-
export type StripeChangePlanRequest = z.infer<typeof stripeChangePlanRequestSchema>;
|
|
132
125
|
export declare const stripeSubscriptionActionResponseSchema: z.ZodObject<{
|
|
133
126
|
provider: z.ZodLiteral<"stripe">;
|
|
134
127
|
stripeSubscriptionId: z.ZodString;
|
|
135
128
|
status: z.ZodString;
|
|
136
129
|
cancelAtPeriodEnd: z.ZodNullable<z.ZodBoolean>;
|
|
137
130
|
}, z.core.$strip>;
|
|
138
|
-
export type StripeSubscriptionActionResponse = z.infer<typeof stripeSubscriptionActionResponseSchema>;
|
|
139
131
|
export declare const billingAddressSchema: z.ZodObject<{
|
|
140
132
|
line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
141
133
|
line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -218,7 +210,6 @@ export declare const teamBillingSettingsUpdateSchema: z.ZodObject<{
|
|
|
218
210
|
invoiceFooter: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
219
211
|
customFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
220
212
|
}, z.core.$strict>;
|
|
221
|
-
export type TeamBillingSettingsResponse = z.infer<typeof teamBillingSettingsResponseSchema>;
|
|
222
213
|
export type TeamBillingSettingsUpdate = z.infer<typeof teamBillingSettingsUpdateSchema>;
|
|
223
214
|
export declare const billingCustomerRefSchema: z.ZodObject<{
|
|
224
215
|
id: z.ZodString;
|