@spacefast/common 0.0.3 → 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 (159) 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 +829 -129
  8. package/dist/contracts/access.js +771 -148
  9. package/dist/contracts/activity.d.ts +5 -5
  10. package/dist/contracts/activity.js +28 -2
  11. package/dist/contracts/annotations.d.ts +3 -5
  12. package/dist/contracts/api-keys.d.ts +9 -10
  13. package/dist/contracts/api-keys.js +9 -6
  14. package/dist/contracts/archives.d.ts +22 -16
  15. package/dist/contracts/archives.js +11 -4
  16. package/dist/contracts/billing.d.ts +21 -30
  17. package/dist/contracts/builds.d.ts +21 -17
  18. package/dist/contracts/builds.js +12 -0
  19. package/dist/contracts/channels.d.ts +2 -2
  20. package/dist/contracts/common.d.ts +7 -5
  21. package/dist/contracts/common.js +4 -0
  22. package/dist/contracts/continuation.d.ts +63 -0
  23. package/dist/contracts/continuation.js +91 -0
  24. package/dist/contracts/countries.d.ts +2 -0
  25. package/dist/contracts/countries.js +261 -0
  26. package/dist/contracts/deployments.d.ts +34 -34
  27. package/dist/contracts/device-auth.d.ts +4 -11
  28. package/dist/contracts/device-auth.js +4 -0
  29. package/dist/contracts/docs.d.ts +119 -0
  30. package/dist/contracts/docs.js +51 -0
  31. package/dist/contracts/domains.d.ts +295 -253
  32. package/dist/contracts/domains.js +26 -4
  33. package/dist/contracts/enums.d.ts +17 -18
  34. package/dist/contracts/enums.js +25 -14
  35. package/dist/contracts/error-code-meta.d.ts +84 -0
  36. package/dist/contracts/error-code-meta.js +99 -10
  37. package/dist/contracts/error-codes.d.ts +1 -1
  38. package/dist/contracts/error-codes.js +17 -0
  39. package/dist/contracts/events.d.ts +13 -13
  40. package/dist/contracts/features.d.ts +93 -23
  41. package/dist/contracts/features.js +178 -13
  42. package/dist/contracts/git.d.ts +3 -9
  43. package/dist/contracts/ids.d.ts +5 -0
  44. package/dist/contracts/ids.js +5 -0
  45. package/dist/contracts/internal.d.ts +3 -3
  46. package/dist/contracts/mcp.d.ts +34 -36
  47. package/dist/contracts/me.d.ts +8 -8
  48. package/dist/contracts/me.js +1 -1
  49. package/dist/contracts/oauth-resources.d.ts +19 -8
  50. package/dist/contracts/oauth-resources.js +44 -13
  51. package/dist/contracts/operations.d.ts +2 -2
  52. package/dist/contracts/plan-policy.d.ts +4 -4
  53. package/dist/contracts/platform.d.ts +3 -105
  54. package/dist/contracts/platform.js +0 -50
  55. package/dist/contracts/push-new.d.ts +4 -4
  56. package/dist/contracts/quotas.d.ts +2 -0
  57. package/dist/contracts/quotas.js +8 -0
  58. package/dist/contracts/repository-connections.d.ts +1 -3
  59. package/dist/contracts/resources.d.ts +112 -28
  60. package/dist/contracts/resources.js +26 -2
  61. package/dist/contracts/routes.d.ts +0 -2
  62. package/dist/contracts/runtime-api.d.ts +365 -43
  63. package/dist/contracts/runtime-api.js +275 -6
  64. package/dist/contracts/sites.d.ts +45 -28
  65. package/dist/contracts/sites.js +21 -0
  66. package/dist/contracts/space-config.d.ts +201 -2
  67. package/dist/contracts/space-config.js +135 -5
  68. package/dist/contracts/spaces.d.ts +423 -162
  69. package/dist/contracts/spaces.js +94 -8
  70. package/dist/contracts/superadmin-emails.d.ts +7 -5
  71. package/dist/contracts/superadmin-emails.js +8 -0
  72. package/dist/contracts/superadmin-queues.d.ts +32 -32
  73. package/dist/contracts/superadmin-spaces.d.ts +418 -24
  74. package/dist/contracts/superadmin-spaces.js +24 -0
  75. package/dist/contracts/superadmin-tenants.d.ts +8 -8
  76. package/dist/contracts/superadmin.d.ts +17 -104
  77. package/dist/contracts/superadmin.js +6 -14
  78. package/dist/contracts/tags.d.ts +42 -41
  79. package/dist/contracts/tags.js +2 -1
  80. package/dist/contracts/teams.d.ts +40 -23
  81. package/dist/contracts/teams.js +20 -1
  82. package/dist/contracts/theme-json.d.ts +30 -0
  83. package/dist/contracts/theme-json.js +48 -0
  84. package/dist/contracts/transfers.d.ts +9 -9
  85. package/dist/contracts/variables.d.ts +14 -16
  86. package/dist/contracts/variables.js +0 -5
  87. package/dist/contracts/webhooks.d.ts +6 -4
  88. package/dist/contracts/webhooks.js +1 -1
  89. package/dist/contracts/zero.d.ts +13 -18
  90. package/dist/docs/agent-prose.d.ts +43 -3
  91. package/dist/docs/agent-prose.js +153 -10
  92. package/dist/docs/agent-setup.js +48 -15
  93. package/dist/docs/agent-solutions.d.ts +5 -5
  94. package/dist/docs/agent-solutions.js +2 -2
  95. package/dist/docs/catalog.d.ts +650 -0
  96. package/dist/docs/catalog.js +758 -0
  97. package/dist/docs/error-docs.d.ts +0 -2
  98. package/dist/docs/error-docs.js +89 -35
  99. package/dist/docs/index-build.d.ts +17 -0
  100. package/dist/docs/index-build.js +24 -0
  101. package/dist/docs/search.d.ts +54 -0
  102. package/dist/docs/search.js +96 -0
  103. package/dist/docs/skill-distribution.d.ts +5 -3
  104. package/dist/docs/skill-distribution.js +8 -8
  105. package/dist/utils/access-match.d.ts +39 -0
  106. package/dist/utils/access-match.js +296 -0
  107. package/dist/utils/auth-redirect.d.ts +3 -1
  108. package/dist/utils/auth-redirect.js +21 -1
  109. package/dist/utils/build-settings.d.ts +6 -0
  110. package/dist/utils/build-settings.js +429 -46
  111. package/dist/utils/claim-token.d.ts +8 -0
  112. package/dist/utils/claim-token.js +23 -2
  113. package/dist/utils/content-type.d.ts +1 -0
  114. package/dist/utils/content-type.js +1 -1
  115. package/dist/utils/credential-policy.d.ts +54 -0
  116. package/dist/utils/{access-policy.js → credential-policy.js} +28 -2
  117. package/dist/utils/gate-theme.d.ts +61 -0
  118. package/dist/utils/gate-theme.js +217 -0
  119. package/dist/utils/git-repository.d.ts +0 -1
  120. package/dist/utils/git-repository.js +0 -3
  121. package/dist/utils/id-hints.d.ts +8 -0
  122. package/dist/utils/id-hints.js +61 -0
  123. package/dist/utils/local-space-state.d.ts +91 -0
  124. package/dist/utils/local-space-state.js +251 -0
  125. package/dist/utils/oauth-signed-query.d.ts +8 -0
  126. package/dist/utils/oauth-signed-query.js +26 -0
  127. package/dist/utils/publish-detection.d.ts +0 -8
  128. package/dist/utils/publish-detection.js +0 -93
  129. package/dist/utils/publish-policy.d.ts +6 -5
  130. package/dist/utils/publish-policy.js +71 -7
  131. package/dist/utils/query-keys.d.ts +17 -6
  132. package/dist/utils/query-keys.js +27 -4
  133. package/dist/utils/runtime-paths.d.ts +0 -1
  134. package/dist/utils/runtime-paths.js +0 -1
  135. package/dist/utils/runtime-upload-batch.d.ts +18 -0
  136. package/dist/utils/runtime-upload-batch.js +90 -0
  137. package/dist/utils/runtime-upload.d.ts +2 -0
  138. package/dist/utils/runtime-upload.js +5 -0
  139. package/dist/utils/space-config.d.ts +4 -0
  140. package/dist/utils/space-config.js +10 -1
  141. package/dist/utils/space-theme.d.ts +2 -0
  142. package/dist/utils/space-theme.js +9 -0
  143. package/dist/utils/static-runtime-policy.d.ts +1 -1
  144. package/dist/utils/static-runtime-policy.js +47 -15
  145. package/dist/utils/upload-session.d.ts +1 -1
  146. package/dist/utils/wpcom-auth-redirects.d.ts +32 -2
  147. package/dist/utils/wpcom-auth-redirects.js +26 -10
  148. package/dist/vocabulary.d.ts +130 -30
  149. package/dist/vocabulary.js +77 -36
  150. package/package.json +16 -1
  151. package/dist/contracts/account.d.ts +0 -28
  152. package/dist/contracts/account.js +0 -54
  153. package/dist/contracts/intercom.d.ts +0 -6
  154. package/dist/contracts/intercom.js +0 -5
  155. package/dist/contracts/telemetry.d.ts +0 -2
  156. package/dist/contracts/telemetry.js +0 -1
  157. package/dist/utils/access-policy.d.ts +0 -39
  158. package/dist/utils/error-display.d.ts +0 -7
  159. package/dist/utils/error-display.js +0 -42
@@ -1,16 +1,15 @@
1
1
  import { z } from "zod";
2
2
  export declare const TEAM_ROLE_VALUES: readonly ["owner", "admin", "member"];
3
- export declare const PLAN_FEATURE_VALUES: readonly ["version-diagnostics"];
4
3
  export declare const teamMemberRole: z.ZodEnum<{
5
- owner: "owner";
6
4
  admin: "admin";
5
+ owner: "owner";
7
6
  member: "member";
8
7
  }>;
9
8
  export declare const teamInvitationCreateSchema: z.ZodObject<{
10
9
  email: z.ZodString;
11
10
  role: z.ZodDefault<z.ZodEnum<{
12
- owner: "owner";
13
11
  admin: "admin";
12
+ owner: "owner";
14
13
  member: "member";
15
14
  }>>;
16
15
  }, z.core.$strip>;
@@ -35,8 +34,8 @@ export declare const TeamInvitationSchema: z.ZodObject<{
35
34
  teamId: z.ZodString;
36
35
  email: z.ZodString;
37
36
  role: z.ZodEnum<{
38
- owner: "owner";
39
37
  admin: "admin";
38
+ owner: "owner";
40
39
  member: "member";
41
40
  }>;
42
41
  status: z.ZodString;
@@ -44,11 +43,11 @@ export declare const TeamInvitationSchema: z.ZodObject<{
44
43
  createdAt: z.ZodString;
45
44
  }, z.core.$strip>;
46
45
  export declare const teamPlanCode: z.ZodEnum<{
47
- personal: "personal";
46
+ free: "free";
47
+ internal: "internal";
48
48
  work: "work";
49
+ personal: "personal";
49
50
  enterprise: "enterprise";
50
- internal: "internal";
51
- free: "free";
52
51
  }>;
53
52
  export declare const TeamSummarySchema: z.ZodObject<{
54
53
  id: z.ZodString;
@@ -56,16 +55,16 @@ export declare const TeamSummarySchema: z.ZodObject<{
56
55
  name: z.ZodString;
57
56
  slug: z.ZodString;
58
57
  role: z.ZodEnum<{
59
- owner: "owner";
60
58
  admin: "admin";
59
+ owner: "owner";
61
60
  member: "member";
62
61
  }>;
63
62
  plan: z.ZodEnum<{
64
- personal: "personal";
63
+ free: "free";
64
+ internal: "internal";
65
65
  work: "work";
66
+ personal: "personal";
66
67
  enterprise: "enterprise";
67
- internal: "internal";
68
- free: "free";
69
68
  }>;
70
69
  defaultDataLocation: z.ZodString;
71
70
  createdAt: z.ZodString;
@@ -77,16 +76,16 @@ export declare const TeamDetailSchema: z.ZodObject<{
77
76
  name: z.ZodString;
78
77
  slug: z.ZodString;
79
78
  role: z.ZodEnum<{
80
- owner: "owner";
81
79
  admin: "admin";
80
+ owner: "owner";
82
81
  member: "member";
83
82
  }>;
84
83
  plan: z.ZodEnum<{
85
- personal: "personal";
84
+ free: "free";
85
+ internal: "internal";
86
86
  work: "work";
87
+ personal: "personal";
87
88
  enterprise: "enterprise";
88
- internal: "internal";
89
- free: "free";
90
89
  }>;
91
90
  defaultDataLocation: z.ZodString;
92
91
  createdAt: z.ZodString;
@@ -102,16 +101,16 @@ export declare const teamListResponseSchema: z.ZodObject<{
102
101
  name: z.ZodString;
103
102
  slug: z.ZodString;
104
103
  role: z.ZodEnum<{
105
- owner: "owner";
106
104
  admin: "admin";
105
+ owner: "owner";
107
106
  member: "member";
108
107
  }>;
109
108
  plan: z.ZodEnum<{
110
- personal: "personal";
109
+ free: "free";
110
+ internal: "internal";
111
111
  work: "work";
112
+ personal: "personal";
112
113
  enterprise: "enterprise";
113
- internal: "internal";
114
- free: "free";
115
114
  }>;
116
115
  defaultDataLocation: z.ZodString;
117
116
  createdAt: z.ZodString;
@@ -128,8 +127,8 @@ export declare const teamMemberListResponseSchema: z.ZodObject<{
128
127
  teamId: z.ZodString;
129
128
  userId: z.ZodString;
130
129
  role: z.ZodEnum<{
131
- owner: "owner";
132
130
  admin: "admin";
131
+ owner: "owner";
133
132
  member: "member";
134
133
  }>;
135
134
  createdAt: z.ZodString;
@@ -152,14 +151,29 @@ export declare const teamJoinResponseSchema: z.ZodObject<{
152
151
  role: z.ZodLiteral<"member">;
153
152
  }, z.core.$strip>;
154
153
  }, z.core.$strip>;
154
+ export declare const teamInvitationAcceptSchema: z.ZodObject<{
155
+ invitationId: z.ZodString;
156
+ }, z.core.$strip>;
157
+ export declare const teamInvitationAcceptResponseSchema: z.ZodObject<{
158
+ data: z.ZodObject<{
159
+ teamId: z.ZodString;
160
+ teamSlug: z.ZodString;
161
+ userId: z.ZodString;
162
+ role: z.ZodEnum<{
163
+ admin: "admin";
164
+ owner: "owner";
165
+ member: "member";
166
+ }>;
167
+ }, z.core.$strip>;
168
+ }, z.core.$strip>;
155
169
  export declare const teamInvitationListResponseSchema: z.ZodObject<{
156
170
  data: z.ZodArray<z.ZodObject<{
157
171
  id: z.ZodString;
158
172
  teamId: z.ZodString;
159
173
  email: z.ZodString;
160
174
  role: z.ZodEnum<{
161
- owner: "owner";
162
175
  admin: "admin";
176
+ owner: "owner";
163
177
  member: "member";
164
178
  }>;
165
179
  status: z.ZodString;
@@ -185,8 +199,8 @@ export declare const teamSettingsResponseSchema: z.ZodObject<{
185
199
  wpCloudCapabilities: z.ZodObject<{
186
200
  status: z.ZodEnum<{
187
201
  failed: "failed";
188
- running: "running";
189
202
  ready: "ready";
203
+ running: "running";
190
204
  idle: "idle";
191
205
  }>;
192
206
  degraded: z.ZodBoolean;
@@ -218,12 +232,15 @@ export declare const teamInvitationPreviewSchema: z.ZodObject<{
218
232
  teamName: z.ZodString;
219
233
  invitedEmail: z.ZodString;
220
234
  status: z.ZodEnum<{
221
- closed: "closed";
222
235
  expired: "expired";
236
+ closed: "closed";
223
237
  pending: "pending";
224
238
  }>;
225
239
  expiresAt: z.ZodString;
226
240
  }, z.core.$strip>;
241
+ export declare const teamCreateSchema: z.ZodObject<{
242
+ name: z.ZodString;
243
+ }, z.core.$strip>;
227
244
  export declare const teamUpdateSchema: z.ZodObject<{
228
245
  name: z.ZodOptional<z.ZodString>;
229
246
  slug: z.ZodOptional<z.ZodString>;
@@ -2,7 +2,6 @@ import { z } from "zod";
2
2
  import { CursorPaginationSchema, cursorListQuerySchema } from "./common.js";
3
3
  import { planCodeSchema, planLimitValueSchema } from "./features.js";
4
4
  export const TEAM_ROLE_VALUES = ["owner", "admin", "member"];
5
- export const PLAN_FEATURE_VALUES = ["version-diagnostics"];
6
5
  export const teamMemberRole = z.enum(TEAM_ROLE_VALUES);
7
6
  export const teamInvitationCreateSchema = z.object({
8
7
  email: z.string().trim().email().toLowerCase(),
@@ -74,6 +73,23 @@ export const teamJoinResponseSchema = z.object({
74
73
  role: z.literal("member"),
75
74
  }),
76
75
  });
76
+ // Accepting an invitation is by its id (the opaque token carried in the accept
77
+ // email link and returned by the invitations list/preview endpoints).
78
+ export const teamInvitationAcceptSchema = z.object({
79
+ invitationId: z
80
+ .string()
81
+ .trim()
82
+ .min(1)
83
+ .describe("Id of the invitation to accept (the token from the invite link)."),
84
+ });
85
+ export const teamInvitationAcceptResponseSchema = z.object({
86
+ data: z.object({
87
+ teamId: z.string().describe("Id of the team the caller joined."),
88
+ teamSlug: z.string().describe("URL-safe slug of the joined team."),
89
+ userId: z.string().describe("Id of the user that accepted the invitation."),
90
+ role: teamMemberRole.describe("Role granted by the invitation."),
91
+ }),
92
+ });
77
93
  export const teamInvitationListResponseSchema = z.object({
78
94
  data: z.array(TeamInvitationSchema),
79
95
  pagination: CursorPaginationSchema,
@@ -153,6 +169,9 @@ export const teamInvitationPreviewSchema = z.object({
153
169
  status: z.enum(["pending", "expired", "closed"]).describe("Whether the invite can be accepted."),
154
170
  expiresAt: z.string().describe("When the invitation expires."),
155
171
  });
172
+ export const teamCreateSchema = z.object({
173
+ name: z.string().trim().min(1).max(255).describe("Display name for the new team."),
174
+ });
156
175
  export const teamUpdateSchema = z
157
176
  .object({
158
177
  name: z.string().trim().min(1).max(255).optional(),
@@ -0,0 +1,30 @@
1
+ import { z } from "zod";
2
+ export declare const themeJsonColorPaletteEntrySchema: z.ZodObject<{
3
+ slug: z.ZodString;
4
+ color: z.ZodString;
5
+ name: z.ZodOptional<z.ZodString>;
6
+ }, z.core.$strip>;
7
+ export declare const themeJsonFontFamilyEntrySchema: z.ZodObject<{
8
+ slug: z.ZodString;
9
+ fontFamily: z.ZodString;
10
+ name: z.ZodOptional<z.ZodString>;
11
+ }, z.core.$strip>;
12
+ export declare const themeJsonSchema: z.ZodObject<{
13
+ settings: z.ZodOptional<z.ZodObject<{
14
+ color: z.ZodOptional<z.ZodObject<{
15
+ palette: z.ZodOptional<z.ZodArray<z.ZodObject<{
16
+ slug: z.ZodString;
17
+ color: z.ZodString;
18
+ name: z.ZodOptional<z.ZodString>;
19
+ }, z.core.$strip>>>;
20
+ }, z.core.$loose>>;
21
+ typography: z.ZodOptional<z.ZodObject<{
22
+ fontFamilies: z.ZodOptional<z.ZodArray<z.ZodObject<{
23
+ slug: z.ZodString;
24
+ fontFamily: z.ZodString;
25
+ name: z.ZodOptional<z.ZodString>;
26
+ }, z.core.$strip>>>;
27
+ }, z.core.$loose>>;
28
+ }, z.core.$loose>>;
29
+ }, z.core.$loose>;
30
+ export type ThemeJson = z.infer<typeof themeJsonSchema>;
@@ -0,0 +1,48 @@
1
+ import { z } from "zod";
2
+ // WordPress `theme.json`-compatible subset (access-plan §8 tier 3, middle
3
+ // precedence: `sf.theme.jsonc` > `theme.json` > `spacefast.jsonc "pages.theme"`).
4
+ // Real WP theme.json carries dozens of unrelated keys (layout, blocks,
5
+ // customTemplates, styles, ...); this schema accepts the file as a loose
6
+ // object (`.passthrough()`) and only VALIDATES the two branches gate pages
7
+ // actually consume: `settings.color.palette` and
8
+ // `settings.typography.fontFamilies`. Everything else rides through
9
+ // unvalidated and is simply never read — this is not a reimplementation of
10
+ // WP_Theme_JSON, just the safe slice that reaches presentation-only gate
11
+ // pages (access-plan §8).
12
+ const presetSlug = z
13
+ .string()
14
+ .min(1)
15
+ .max(64)
16
+ .regex(/^[a-z0-9-]+$/, { message: "Preset slugs are lowercase alphanumerics and dashes." });
17
+ export const themeJsonColorPaletteEntrySchema = z.object({
18
+ slug: presetSlug,
19
+ color: z.string().min(1).max(128),
20
+ name: z.string().min(1).max(128).optional(),
21
+ });
22
+ export const themeJsonFontFamilyEntrySchema = z.object({
23
+ slug: presetSlug,
24
+ fontFamily: z.string().min(1).max(256),
25
+ name: z.string().min(1).max(128).optional(),
26
+ });
27
+ export const themeJsonSchema = z
28
+ .object({
29
+ settings: z
30
+ .object({
31
+ color: z
32
+ .object({
33
+ palette: z.array(themeJsonColorPaletteEntrySchema).max(64).optional(),
34
+ })
35
+ .passthrough()
36
+ .optional(),
37
+ typography: z
38
+ .object({
39
+ fontFamilies: z.array(themeJsonFontFamilyEntrySchema).max(32).optional(),
40
+ })
41
+ .passthrough()
42
+ .optional(),
43
+ })
44
+ .passthrough()
45
+ .optional(),
46
+ })
47
+ .passthrough()
48
+ .describe("WordPress theme.json-compatible file; only color.palette/typography.fontFamilies feed gate pages.");
@@ -2,15 +2,15 @@ import { z } from "zod";
2
2
  export declare const principalIdSchema: z.ZodString;
3
3
  export declare const transferPrincipalInputSchema: z.ZodObject<{
4
4
  principalType: z.ZodEnum<{
5
- external: "external";
6
5
  team: "team";
6
+ external: "external";
7
7
  }>;
8
8
  principalId: z.ZodString;
9
9
  }, z.core.$strip>;
10
10
  export declare const transferPrincipalSchema: z.ZodObject<{
11
11
  principalType: z.ZodEnum<{
12
- external: "external";
13
12
  team: "team";
13
+ external: "external";
14
14
  }>;
15
15
  principalId: z.ZodString;
16
16
  tenantId: z.ZodString;
@@ -18,8 +18,8 @@ export declare const transferPrincipalSchema: z.ZodObject<{
18
18
  export declare const spaceTransferCreateSchema: z.ZodObject<{
19
19
  to: z.ZodObject<{
20
20
  principalType: z.ZodEnum<{
21
- external: "external";
22
21
  team: "team";
22
+ external: "external";
23
23
  }>;
24
24
  principalId: z.ZodString;
25
25
  }, z.core.$strip>;
@@ -29,27 +29,27 @@ export declare const spaceTransferSchema: z.ZodObject<{
29
29
  spaceId: z.ZodString;
30
30
  from: z.ZodObject<{
31
31
  principalType: z.ZodEnum<{
32
- external: "external";
33
32
  team: "team";
33
+ external: "external";
34
34
  }>;
35
35
  principalId: z.ZodString;
36
36
  tenantId: z.ZodString;
37
37
  }, z.core.$strip>;
38
38
  to: z.ZodObject<{
39
39
  principalType: z.ZodEnum<{
40
- external: "external";
41
40
  team: "team";
41
+ external: "external";
42
42
  }>;
43
43
  principalId: z.ZodString;
44
44
  tenantId: z.ZodString;
45
45
  }, z.core.$strip>;
46
46
  status: z.ZodEnum<{
47
- completed: "completed";
48
- canceled: "canceled";
49
- expired: "expired";
50
47
  moving: "moving";
51
48
  pending_confirmation: "pending_confirmation";
52
49
  confirming_domains: "confirming_domains";
50
+ completed: "completed";
51
+ canceled: "canceled";
52
+ expired: "expired";
53
53
  }>;
54
54
  requiredActions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
55
55
  type: z.ZodLiteral<"dns">;
@@ -90,9 +90,9 @@ export declare const spaceTransferSchema: z.ZodObject<{
90
90
  message: z.ZodString;
91
91
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
92
92
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
93
+ registrar: "registrar";
93
94
  wpcloud: "wpcloud";
94
95
  dns: "dns";
95
- registrar: "registrar";
96
96
  runtime: "runtime";
97
97
  }>>>;
98
98
  details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
@@ -1,16 +1,16 @@
1
1
  import { z } from "zod";
2
2
  export declare const variableScope: z.ZodEnum<{
3
- principal: "principal";
4
- space: "space";
5
3
  site: "site";
4
+ space: "space";
5
+ principal: "principal";
6
6
  }>;
7
7
  export declare const variableNameSchema: z.ZodString;
8
8
  export declare const VariableSchema: z.ZodObject<{
9
9
  name: z.ZodString;
10
10
  scope: z.ZodEnum<{
11
- principal: "principal";
12
- space: "space";
13
11
  site: "site";
12
+ space: "space";
13
+ principal: "principal";
14
14
  }>;
15
15
  secret: z.ZodBoolean;
16
16
  value: z.ZodOptional<z.ZodString>;
@@ -23,8 +23,6 @@ export declare const variableProvenanceSchema: z.ZodArray<z.ZodObject<{
23
23
  name: z.ZodString;
24
24
  valueHash: z.ZodString;
25
25
  }, z.core.$strip>>;
26
- export type VariableProvenance = z.infer<typeof variableProvenanceSchema>;
27
- export declare function variableResourceId(scope: z.infer<typeof variableScope>, name: string): string;
28
26
  export declare const SystemVariableSchema: z.ZodObject<{
29
27
  name: z.ZodString;
30
28
  value: z.ZodString;
@@ -49,9 +47,9 @@ export declare const variableListResponseSchema: z.ZodObject<{
49
47
  data: z.ZodArray<z.ZodObject<{
50
48
  name: z.ZodString;
51
49
  scope: z.ZodEnum<{
52
- principal: "principal";
53
- space: "space";
54
50
  site: "site";
51
+ space: "space";
52
+ principal: "principal";
55
53
  }>;
56
54
  secret: z.ZodBoolean;
57
55
  value: z.ZodOptional<z.ZodString>;
@@ -68,9 +66,9 @@ export declare const spaceVariableListResponseSchema: z.ZodObject<{
68
66
  data: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
69
67
  name: z.ZodString;
70
68
  scope: z.ZodEnum<{
71
- principal: "principal";
72
- space: "space";
73
69
  site: "site";
70
+ space: "space";
71
+ principal: "principal";
74
72
  }>;
75
73
  secret: z.ZodBoolean;
76
74
  value: z.ZodOptional<z.ZodString>;
@@ -91,9 +89,9 @@ export declare const variableMutationResponseSchema: z.ZodObject<{
91
89
  data: z.ZodObject<{
92
90
  name: z.ZodString;
93
91
  scope: z.ZodEnum<{
94
- principal: "principal";
95
- space: "space";
96
92
  site: "site";
93
+ space: "space";
94
+ principal: "principal";
97
95
  }>;
98
96
  secret: z.ZodBoolean;
99
97
  value: z.ZodOptional<z.ZodString>;
@@ -106,10 +104,10 @@ export declare const variableMutationResponseSchema: z.ZodObject<{
106
104
  kind: z.ZodString;
107
105
  status: z.ZodEnum<{
108
106
  failed: "failed";
107
+ canceled: "canceled";
109
108
  queued: "queued";
110
109
  running: "running";
111
110
  succeeded: "succeeded";
112
- canceled: "canceled";
113
111
  }>;
114
112
  resources: z.ZodArray<z.ZodObject<{
115
113
  type: z.ZodString;
@@ -130,9 +128,9 @@ export declare const variableMutationResponseSchema: z.ZodObject<{
130
128
  message: z.ZodString;
131
129
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
132
130
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
131
+ registrar: "registrar";
133
132
  wpcloud: "wpcloud";
134
133
  dns: "dns";
135
- registrar: "registrar";
136
134
  runtime: "runtime";
137
135
  }>>>;
138
136
  details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
@@ -150,10 +148,10 @@ export declare const variableDeleteResponseSchema: z.ZodObject<{
150
148
  kind: z.ZodString;
151
149
  status: z.ZodEnum<{
152
150
  failed: "failed";
151
+ canceled: "canceled";
153
152
  queued: "queued";
154
153
  running: "running";
155
154
  succeeded: "succeeded";
156
- canceled: "canceled";
157
155
  }>;
158
156
  resources: z.ZodArray<z.ZodObject<{
159
157
  type: z.ZodString;
@@ -174,9 +172,9 @@ export declare const variableDeleteResponseSchema: z.ZodObject<{
174
172
  message: z.ZodString;
175
173
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
176
174
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
175
+ registrar: "registrar";
177
176
  wpcloud: "wpcloud";
178
177
  dns: "dns";
179
- registrar: "registrar";
180
178
  runtime: "runtime";
181
179
  }>>>;
182
180
  details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
@@ -39,11 +39,6 @@ export const variableProvenanceSchema = z
39
39
  .describe("sha256 of the resolved value at finalize time. Never the value itself."),
40
40
  }))
41
41
  .describe("Variable names + value hashes baked into this version at finalize. Never values.");
42
- // Operation `resources` entry id for a coalesced variable write
43
- // (internal-docs/platform.md "Debounce contract"): `{scope}/{name}`.
44
- export function variableResourceId(scope, name) {
45
- return `${scope}/${name}`;
46
- }
47
42
  // Platform-provided, read-only values (SPACEFAST_*) surfaced alongside stored
48
43
  // variables on list reads. Not persistable and not a Variable scope.
49
44
  export const SystemVariableSchema = z.object({
@@ -18,8 +18,8 @@ export declare const webhookSchema: z.ZodObject<{
18
18
  principal: z.ZodNullable<z.ZodObject<{
19
19
  tenantId: z.ZodString;
20
20
  principalType: z.ZodEnum<{
21
- external: "external";
22
21
  team: "team";
22
+ external: "external";
23
23
  }>;
24
24
  principalId: z.ZodString;
25
25
  }, z.core.$strip>>;
@@ -27,6 +27,7 @@ export declare const webhookSchema: z.ZodObject<{
27
27
  events: z.ZodArray<z.ZodString>;
28
28
  status: z.ZodEnum<{
29
29
  active: "active";
30
+ deleted: "deleted";
30
31
  disabled: "disabled";
31
32
  failing: "failing";
32
33
  }>;
@@ -47,8 +48,8 @@ export declare const webhookListResponseSchema: z.ZodObject<{
47
48
  principal: z.ZodNullable<z.ZodObject<{
48
49
  tenantId: z.ZodString;
49
50
  principalType: z.ZodEnum<{
50
- external: "external";
51
51
  team: "team";
52
+ external: "external";
52
53
  }>;
53
54
  principalId: z.ZodString;
54
55
  }, z.core.$strip>>;
@@ -56,6 +57,7 @@ export declare const webhookListResponseSchema: z.ZodObject<{
56
57
  events: z.ZodArray<z.ZodString>;
57
58
  status: z.ZodEnum<{
58
59
  active: "active";
60
+ deleted: "deleted";
59
61
  disabled: "disabled";
60
62
  failing: "failing";
61
63
  }>;
@@ -98,9 +100,9 @@ export declare const webhookDeliverySchema: z.ZodObject<{
98
100
  message: z.ZodString;
99
101
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
100
102
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
103
+ registrar: "registrar";
101
104
  wpcloud: "wpcloud";
102
105
  dns: "dns";
103
- registrar: "registrar";
104
106
  runtime: "runtime";
105
107
  }>>>;
106
108
  details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
@@ -139,9 +141,9 @@ export declare const webhookDeliveryListResponseSchema: z.ZodObject<{
139
141
  message: z.ZodString;
140
142
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
141
143
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
144
+ registrar: "registrar";
142
145
  wpcloud: "wpcloud";
143
146
  dns: "dns";
144
- registrar: "registrar";
145
147
  runtime: "runtime";
146
148
  }>>>;
147
149
  details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
@@ -24,7 +24,7 @@ export const webhookSchema = z.object({
24
24
  .nullable(),
25
25
  url: z.string().url(),
26
26
  events: z.array(z.string()),
27
- status: z.enum(["active", "disabled", "failing"]),
27
+ status: z.enum(["active", "disabled", "failing", "deleted"]),
28
28
  secret: z.string().optional(),
29
29
  secretPreview: z.string(),
30
30
  previousSecretExpiresAt: z.string().datetime().nullable(),