@spacefast/common 0.0.5 → 0.0.6

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.
Files changed (150) hide show
  1. package/dist/agents/connect-targets.d.ts +133 -0
  2. package/dist/agents/connect-targets.js +224 -0
  3. package/dist/brand.d.ts +1 -0
  4. package/dist/brand.js +5 -0
  5. package/dist/config/domains.d.ts +12 -6
  6. package/dist/config/domains.js +30 -38
  7. package/dist/contracts/access.d.ts +825 -125
  8. package/dist/contracts/access.js +771 -148
  9. package/dist/contracts/activity.d.ts +1 -1
  10. package/dist/contracts/activity.js +28 -2
  11. package/dist/contracts/annotations.d.ts +2 -4
  12. package/dist/contracts/api-keys.d.ts +3 -4
  13. package/dist/contracts/api-keys.js +9 -6
  14. package/dist/contracts/archives.d.ts +8 -2
  15. package/dist/contracts/archives.js +11 -4
  16. package/dist/contracts/billing.d.ts +0 -9
  17. package/dist/contracts/builds.d.ts +25 -21
  18. package/dist/contracts/builds.js +12 -0
  19. package/dist/contracts/common.d.ts +2 -0
  20. package/dist/contracts/common.js +4 -0
  21. package/dist/contracts/continuation.d.ts +0 -3
  22. package/dist/contracts/countries.d.ts +2 -0
  23. package/dist/contracts/countries.js +261 -0
  24. package/dist/contracts/deployments.d.ts +34 -34
  25. package/dist/contracts/device-auth.d.ts +4 -11
  26. package/dist/contracts/device-auth.js +4 -0
  27. package/dist/contracts/docs.d.ts +119 -0
  28. package/dist/contracts/docs.js +51 -0
  29. package/dist/contracts/domains.d.ts +96 -54
  30. package/dist/contracts/domains.js +26 -4
  31. package/dist/contracts/enums.d.ts +15 -16
  32. package/dist/contracts/enums.js +25 -14
  33. package/dist/contracts/error-code-meta.d.ts +72 -0
  34. package/dist/contracts/error-code-meta.js +96 -10
  35. package/dist/contracts/error-codes.d.ts +1 -1
  36. package/dist/contracts/error-codes.js +14 -0
  37. package/dist/contracts/events.d.ts +1 -1
  38. package/dist/contracts/features.d.ts +76 -6
  39. package/dist/contracts/features.js +178 -13
  40. package/dist/contracts/git.d.ts +2 -8
  41. package/dist/contracts/ids.d.ts +5 -0
  42. package/dist/contracts/ids.js +5 -0
  43. package/dist/contracts/mcp.d.ts +8 -10
  44. package/dist/contracts/me.js +1 -1
  45. package/dist/contracts/oauth-resources.d.ts +19 -8
  46. package/dist/contracts/oauth-resources.js +44 -13
  47. package/dist/contracts/platform.d.ts +0 -102
  48. package/dist/contracts/platform.js +0 -50
  49. package/dist/contracts/push-new.d.ts +4 -4
  50. package/dist/contracts/quotas.d.ts +2 -0
  51. package/dist/contracts/quotas.js +8 -0
  52. package/dist/contracts/repository-connections.d.ts +6 -8
  53. package/dist/contracts/resources.d.ts +97 -13
  54. package/dist/contracts/resources.js +26 -2
  55. package/dist/contracts/routes.d.ts +0 -2
  56. package/dist/contracts/runtime-api.d.ts +361 -39
  57. package/dist/contracts/runtime-api.js +275 -6
  58. package/dist/contracts/sites.d.ts +19 -2
  59. package/dist/contracts/sites.js +21 -0
  60. package/dist/contracts/space-config.d.ts +201 -2
  61. package/dist/contracts/space-config.js +135 -5
  62. package/dist/contracts/spaces.d.ts +364 -193
  63. package/dist/contracts/spaces.js +40 -8
  64. package/dist/contracts/superadmin-emails.d.ts +4 -2
  65. package/dist/contracts/superadmin-emails.js +8 -0
  66. package/dist/contracts/superadmin-queues.d.ts +26 -26
  67. package/dist/contracts/superadmin-spaces.d.ts +170 -42
  68. package/dist/contracts/superadmin.d.ts +6 -93
  69. package/dist/contracts/superadmin.js +6 -14
  70. package/dist/contracts/tags.d.ts +10 -9
  71. package/dist/contracts/tags.js +2 -1
  72. package/dist/contracts/teams.d.ts +21 -22
  73. package/dist/contracts/teams.js +0 -1
  74. package/dist/contracts/theme-json.d.ts +30 -0
  75. package/dist/contracts/theme-json.js +48 -0
  76. package/dist/contracts/variables.d.ts +0 -2
  77. package/dist/contracts/variables.js +0 -5
  78. package/dist/contracts/webhooks.d.ts +2 -0
  79. package/dist/contracts/webhooks.js +1 -1
  80. package/dist/contracts/zero.d.ts +5 -10
  81. package/dist/docs/agent-prose.d.ts +43 -3
  82. package/dist/docs/agent-prose.js +146 -7
  83. package/dist/docs/agent-setup.js +45 -13
  84. package/dist/docs/agent-solutions.d.ts +5 -5
  85. package/dist/docs/agent-solutions.js +2 -2
  86. package/dist/docs/catalog.d.ts +650 -0
  87. package/dist/docs/catalog.js +758 -0
  88. package/dist/docs/error-docs.d.ts +0 -2
  89. package/dist/docs/error-docs.js +77 -35
  90. package/dist/docs/index-build.d.ts +17 -0
  91. package/dist/docs/index-build.js +24 -0
  92. package/dist/docs/search.d.ts +54 -0
  93. package/dist/docs/search.js +96 -0
  94. package/dist/docs/skill-distribution.d.ts +5 -3
  95. package/dist/docs/skill-distribution.js +8 -8
  96. package/dist/utils/access-match.d.ts +39 -0
  97. package/dist/utils/access-match.js +296 -0
  98. package/dist/utils/auth-redirect.d.ts +3 -1
  99. package/dist/utils/auth-redirect.js +21 -1
  100. package/dist/utils/build-settings.d.ts +6 -0
  101. package/dist/utils/build-settings.js +429 -46
  102. package/dist/utils/claim-token.d.ts +8 -0
  103. package/dist/utils/claim-token.js +23 -2
  104. package/dist/utils/content-type.d.ts +1 -0
  105. package/dist/utils/content-type.js +1 -1
  106. package/dist/utils/credential-policy.d.ts +54 -0
  107. package/dist/utils/{access-policy.js → credential-policy.js} +28 -2
  108. package/dist/utils/gate-theme.d.ts +61 -0
  109. package/dist/utils/gate-theme.js +217 -0
  110. package/dist/utils/git-repository.d.ts +0 -1
  111. package/dist/utils/git-repository.js +0 -3
  112. package/dist/utils/id-hints.d.ts +8 -0
  113. package/dist/utils/id-hints.js +61 -0
  114. package/dist/utils/local-space-state.d.ts +91 -0
  115. package/dist/utils/local-space-state.js +251 -0
  116. package/dist/utils/oauth-signed-query.d.ts +8 -0
  117. package/dist/utils/oauth-signed-query.js +26 -0
  118. package/dist/utils/publish-detection.d.ts +0 -8
  119. package/dist/utils/publish-detection.js +0 -93
  120. package/dist/utils/publish-policy.d.ts +6 -5
  121. package/dist/utils/publish-policy.js +71 -7
  122. package/dist/utils/query-keys.d.ts +15 -4
  123. package/dist/utils/query-keys.js +27 -4
  124. package/dist/utils/runtime-paths.d.ts +0 -1
  125. package/dist/utils/runtime-paths.js +0 -1
  126. package/dist/utils/runtime-upload-batch.d.ts +18 -0
  127. package/dist/utils/runtime-upload-batch.js +90 -0
  128. package/dist/utils/runtime-upload.d.ts +2 -0
  129. package/dist/utils/runtime-upload.js +5 -0
  130. package/dist/utils/space-config.d.ts +4 -0
  131. package/dist/utils/space-config.js +10 -1
  132. package/dist/utils/space-theme.d.ts +2 -0
  133. package/dist/utils/space-theme.js +9 -0
  134. package/dist/utils/static-runtime-policy.d.ts +0 -21
  135. package/dist/utils/static-runtime-policy.js +19 -103
  136. package/dist/utils/upload-session.d.ts +1 -1
  137. package/dist/utils/wpcom-auth-redirects.d.ts +32 -2
  138. package/dist/utils/wpcom-auth-redirects.js +26 -10
  139. package/dist/vocabulary.d.ts +130 -30
  140. package/dist/vocabulary.js +77 -36
  141. package/package.json +16 -1
  142. package/dist/contracts/account.d.ts +0 -28
  143. package/dist/contracts/account.js +0 -54
  144. package/dist/contracts/intercom.d.ts +0 -6
  145. package/dist/contracts/intercom.js +0 -5
  146. package/dist/contracts/telemetry.d.ts +0 -2
  147. package/dist/contracts/telemetry.js +0 -1
  148. package/dist/utils/access-policy.d.ts +0 -39
  149. package/dist/utils/error-display.d.ts +0 -7
  150. 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 (DELETE is a soft-disable that emits webhook.disabled; there is no
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 StatticAccessPolicySchema: z.ZodObject<{
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 StatticAccessPolicy = z.infer<typeof StatticAccessPolicySchema>;
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,6 @@ export declare const ApiKeyPatchRequestSchema: z.ZodObject<{
511
511
  }, z.core.$strict>>;
512
512
  }, z.core.$strict>>;
513
513
  }, z.core.$strip>;
514
- export type ApiKeyPatchRequest = z.infer<typeof ApiKeyPatchRequestSchema>;
515
514
  export declare const ApiKeyParamsSchema: z.ZodObject<{
516
515
  apiKeyId: z.ZodString;
517
516
  }, 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 StatticAccessPolicySchema = z
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: StatticAccessPolicySchema.nullable().describe("Effective access policy. A key authorizes by policy only."),
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: StatticAccessPolicySchema.nullable()
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,7 +228,7 @@ export const ApiKeyPatchRequestSchema = z
225
228
  .nullable()
226
229
  .optional()
227
230
  .describe("Replacement activation instant."),
228
- policy: StatticAccessPolicySchema.optional().describe("Replacement policy. Must be a subset of the calling credential's policy at mutation time."),
231
+ policy: ApiCredentialPolicySchema.optional().describe("Replacement policy. Must be a subset of the calling credential's policy at mutation time."),
229
232
  })
230
233
  .refine((value) => Object.keys(value).length > 0, {
231
234
  message: "At least one mutable API key field is required.",
@@ -25,7 +25,10 @@ export declare const spaceExportSchema: z.ZodObject<{
25
25
  queued: "queued";
26
26
  running: "running";
27
27
  }>;
28
- format: z.ZodLiteral<"stattic_export_v1">;
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.ZodLiteral<"stattic_export_v1">;
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: stattic_export_v1 archives are always zip (the spec
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
- format: z.literal("stattic_export_v1").describe("Archive format identifier."),
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.string().url().describe("Public HTTPS URL of a stattic_export_v1 archive."),
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 stattic_export_v1 archive comes from.");
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;
@@ -92,18 +92,22 @@ declare const InternalBuildExecutionSchema: z.ZodObject<{
92
92
  sandboxId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
93
93
  region: z.ZodDefault<z.ZodNullable<z.ZodString>>;
94
94
  metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
95
+ phases: z.ZodOptional<z.ZodArray<z.ZodObject<{
96
+ phase: z.ZodString;
97
+ at: z.ZodString;
98
+ }, z.core.$strip>>>;
95
99
  }, z.core.$strip>;
96
100
  export declare const BuildSchema: z.ZodObject<{
97
101
  id: z.ZodString;
98
102
  spaceId: z.ZodString;
99
103
  status: z.ZodEnum<{
100
104
  failed: "failed";
101
- queued: "queued";
102
- running: "running";
103
- succeeded: "succeeded";
104
105
  canceled: "canceled";
105
106
  waiting_for_source: "waiting_for_source";
106
107
  uploading_source: "uploading_source";
108
+ queued: "queued";
109
+ running: "running";
110
+ succeeded: "succeeded";
107
111
  skipped: "skipped";
108
112
  }>;
109
113
  input: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -137,16 +141,16 @@ export declare const BuildSchema: z.ZodObject<{
137
141
  diagnostics: z.ZodDefault<z.ZodArray<z.ZodObject<{
138
142
  code: z.ZodString;
139
143
  severity: z.ZodEnum<{
144
+ info: "info";
140
145
  warning: "warning";
141
146
  error: "error";
142
- info: "info";
143
147
  }>;
144
148
  message: z.ZodString;
145
149
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
146
150
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
151
+ registrar: "registrar";
147
152
  wpcloud: "wpcloud";
148
153
  dns: "dns";
149
- registrar: "registrar";
150
154
  runtime: "runtime";
151
155
  }>>>;
152
156
  details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
@@ -188,16 +192,16 @@ export declare const buildCreateRequestSchema: z.ZodObject<{
188
192
  diagnostics: z.ZodOptional<z.ZodArray<z.ZodObject<{
189
193
  code: z.ZodString;
190
194
  severity: z.ZodEnum<{
195
+ info: "info";
191
196
  warning: "warning";
192
197
  error: "error";
193
- info: "info";
194
198
  }>;
195
199
  message: z.ZodString;
196
200
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
197
201
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
202
+ registrar: "registrar";
198
203
  wpcloud: "wpcloud";
199
204
  dns: "dns";
200
- registrar: "registrar";
201
205
  runtime: "runtime";
202
206
  }>>>;
203
207
  details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
@@ -251,16 +255,16 @@ export declare const buildSourceArchiveUploadSchema: z.ZodObject<{
251
255
  diagnostics: z.ZodOptional<z.ZodArray<z.ZodObject<{
252
256
  code: z.ZodString;
253
257
  severity: z.ZodEnum<{
258
+ info: "info";
254
259
  warning: "warning";
255
260
  error: "error";
256
- info: "info";
257
261
  }>;
258
262
  message: z.ZodString;
259
263
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
260
264
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
265
+ registrar: "registrar";
261
266
  wpcloud: "wpcloud";
262
267
  dns: "dns";
263
- registrar: "registrar";
264
268
  runtime: "runtime";
265
269
  }>>>;
266
270
  details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
@@ -276,12 +280,12 @@ export declare const buildCreateResponseSchema: z.ZodObject<{
276
280
  spaceId: z.ZodString;
277
281
  status: z.ZodEnum<{
278
282
  failed: "failed";
279
- queued: "queued";
280
- running: "running";
281
- succeeded: "succeeded";
282
283
  canceled: "canceled";
283
284
  waiting_for_source: "waiting_for_source";
284
285
  uploading_source: "uploading_source";
286
+ queued: "queued";
287
+ running: "running";
288
+ succeeded: "succeeded";
285
289
  skipped: "skipped";
286
290
  }>;
287
291
  input: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -315,16 +319,16 @@ export declare const buildCreateResponseSchema: z.ZodObject<{
315
319
  diagnostics: z.ZodDefault<z.ZodArray<z.ZodObject<{
316
320
  code: z.ZodString;
317
321
  severity: z.ZodEnum<{
322
+ info: "info";
318
323
  warning: "warning";
319
324
  error: "error";
320
- info: "info";
321
325
  }>;
322
326
  message: z.ZodString;
323
327
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
324
328
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
329
+ registrar: "registrar";
325
330
  wpcloud: "wpcloud";
326
331
  dns: "dns";
327
- registrar: "registrar";
328
332
  runtime: "runtime";
329
333
  }>>>;
330
334
  details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
@@ -380,16 +384,16 @@ export declare const buildCreateResponseSchema: z.ZodObject<{
380
384
  diagnostics: z.ZodOptional<z.ZodArray<z.ZodObject<{
381
385
  code: z.ZodString;
382
386
  severity: z.ZodEnum<{
387
+ info: "info";
383
388
  warning: "warning";
384
389
  error: "error";
385
- info: "info";
386
390
  }>;
387
391
  message: z.ZodString;
388
392
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
389
393
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
394
+ registrar: "registrar";
390
395
  wpcloud: "wpcloud";
391
396
  dns: "dns";
392
- registrar: "registrar";
393
397
  runtime: "runtime";
394
398
  }>>>;
395
399
  details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
@@ -410,12 +414,12 @@ export declare const buildListResponseSchema: z.ZodObject<{
410
414
  spaceId: z.ZodString;
411
415
  status: z.ZodEnum<{
412
416
  failed: "failed";
413
- queued: "queued";
414
- running: "running";
415
- succeeded: "succeeded";
416
417
  canceled: "canceled";
417
418
  waiting_for_source: "waiting_for_source";
418
419
  uploading_source: "uploading_source";
420
+ queued: "queued";
421
+ running: "running";
422
+ succeeded: "succeeded";
419
423
  skipped: "skipped";
420
424
  }>;
421
425
  input: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -449,16 +453,16 @@ export declare const buildListResponseSchema: z.ZodObject<{
449
453
  diagnostics: z.ZodDefault<z.ZodArray<z.ZodObject<{
450
454
  code: z.ZodString;
451
455
  severity: z.ZodEnum<{
456
+ info: "info";
452
457
  warning: "warning";
453
458
  error: "error";
454
- info: "info";
455
459
  }>;
456
460
  message: z.ZodString;
457
461
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
458
462
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
463
+ registrar: "registrar";
459
464
  wpcloud: "wpcloud";
460
465
  dns: "dns";
461
- registrar: "registrar";
462
466
  runtime: "runtime";
463
467
  }>>>;
464
468
  details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
@@ -168,6 +168,14 @@ export const BuildCreateInputSchema = z
168
168
  }),
169
169
  ])
170
170
  .describe("What a new build should run against.");
171
+ // One phase-timeline entry the build runner appends via recordBuildPhase
172
+ // (apps/control-plane/src/builds/runner.ts BUILD_PHASES); `phase` stays a
173
+ // plain string here since the runner's specific phase vocabulary is an
174
+ // app-level concern, not a shared contract.
175
+ const buildExecutionPhaseSchema = z.object({
176
+ phase: z.string().min(1).describe("Build phase name; see BUILD_PHASES in builds/runner.ts."),
177
+ at: z.string().datetime(),
178
+ });
171
179
  const InternalBuildExecutionSchema = z
172
180
  .object({
173
181
  runner: z.string().nullable().default(null),
@@ -175,6 +183,10 @@ const InternalBuildExecutionSchema = z
175
183
  sandboxId: z.string().nullable().default(null),
176
184
  region: z.string().nullable().default(null),
177
185
  metadata: z.record(z.string(), z.unknown()).default({}),
186
+ phases: z
187
+ .array(buildExecutionPhaseSchema)
188
+ .optional()
189
+ .describe("Phase timeline the runner appends to via recordBuildPhase."),
178
190
  })
179
191
  .describe("Internal runner execution metadata surfaced only where appropriate.");
180
192
  export const BuildSchema = z.object({
@@ -110,9 +110,11 @@ export declare const ApiErrorResponseSchema: z.ZodObject<{
110
110
  docsUrl: z.ZodString;
111
111
  details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
112
112
  suggestions: z.ZodOptional<z.ZodArray<z.ZodString>>;
113
+ next: z.ZodOptional<z.ZodArray<z.ZodString>>;
113
114
  requestId: z.ZodOptional<z.ZodString>;
114
115
  }, z.core.$strip>;
115
116
  }, z.core.$strip>;
117
+ export type ApiErrorResponse = z.infer<typeof ApiErrorResponseSchema>;
116
118
  export declare function dataEnvelope<T extends z.ZodType>(data: T): z.ZodObject<{
117
119
  data: T;
118
120
  }, z.core.$strip>;
@@ -83,6 +83,10 @@ export const ApiErrorResponseSchema = z.object({
83
83
  .array(z.string())
84
84
  .optional()
85
85
  .describe("Actionable recovery steps safe to show in dashboards, SDKs, and CLI output."),
86
+ next: z
87
+ .array(z.string())
88
+ .optional()
89
+ .describe("Copy-pasteable commands or API requests an agent can run next."),
86
90
  requestId: z.string().optional().describe("Request id to quote when contacting support."),
87
91
  }),
88
92
  });
@@ -2,7 +2,6 @@ import { z } from "zod";
2
2
  export declare const RequiresActionTypeSchema: z.ZodEnum<{
3
3
  device_authorization: "device_authorization";
4
4
  }>;
5
- export type RequiresActionType = z.infer<typeof RequiresActionTypeSchema>;
6
5
  export declare const RequiresActionSchema: z.ZodObject<{
7
6
  actionType: z.ZodEnum<{
8
7
  device_authorization: "device_authorization";
@@ -27,11 +26,9 @@ export declare const RequiresActionEnvelopeSchema: z.ZodObject<{
27
26
  expiresAt: z.ZodString;
28
27
  }, z.core.$strict>;
29
28
  }, z.core.$strict>;
30
- export type RequiresActionEnvelope = z.infer<typeof RequiresActionEnvelopeSchema>;
31
29
  export declare const ActionResumeRequestSchema: z.ZodObject<{
32
30
  continuationToken: z.ZodString;
33
31
  }, z.core.$strict>;
34
- export type ActionResumeRequest = z.infer<typeof ActionResumeRequestSchema>;
35
32
  export declare const ActionResumeResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
36
33
  status: z.ZodLiteral<"pending">;
37
34
  requiresAction: z.ZodObject<{
@@ -0,0 +1,2 @@
1
+ export declare const ISO_COUNTRY_CODES: readonly ["AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW"];
2
+ export type IsoCountryCode = (typeof ISO_COUNTRY_CODES)[number];