@spacefast/common 0.0.23 → 0.0.26

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 (224) hide show
  1. package/brand-assets/LICENSE-Haskoy.txt +93 -0
  2. package/brand-assets/haskoy-latin-variable.woff2 +0 -0
  3. package/brand-assets/spacefast-favicon.svg +4 -4
  4. package/brand-assets/spacefast-sf-full-bleed.svg +3 -3
  5. package/brand-assets/spacefast-wordmark.svg +2 -4
  6. package/dist/agents/connect-targets.js +1 -1
  7. package/dist/agents/private-key-oauth.d.ts +0 -1
  8. package/dist/agents/private-key-oauth.js +46 -63
  9. package/dist/brand-assets-build.js +4 -6
  10. package/dist/brand-assets.d.ts +5 -15
  11. package/dist/brand-assets.js +15 -14
  12. package/dist/config/domains.d.ts +47 -7
  13. package/dist/config/domains.js +66 -10
  14. package/dist/config/index.d.ts +0 -1
  15. package/dist/config/index.js +0 -1
  16. package/dist/contracts/abuse.d.ts +2 -0
  17. package/dist/contracts/abuse.js +12 -0
  18. package/dist/contracts/access.d.ts +124 -12
  19. package/dist/contracts/access.js +73 -9
  20. package/dist/contracts/activity.d.ts +1 -1
  21. package/dist/contracts/activity.js +5 -12
  22. package/dist/contracts/api-keys.d.ts +21 -21
  23. package/dist/contracts/api-keys.js +2 -2
  24. package/dist/contracts/beta.js +1 -1
  25. package/dist/contracts/billing.d.ts +3 -35
  26. package/dist/contracts/billing.js +33 -52
  27. package/dist/contracts/builds.d.ts +30 -18
  28. package/dist/contracts/builds.js +28 -9
  29. package/dist/contracts/channels.js +1 -1
  30. package/dist/contracts/cli.d.ts +10 -0
  31. package/dist/contracts/cli.js +10 -0
  32. package/dist/contracts/collab-public.d.ts +63 -0
  33. package/dist/contracts/collab-public.js +46 -0
  34. package/dist/contracts/comments.d.ts +282 -53
  35. package/dist/contracts/comments.js +173 -52
  36. package/dist/contracts/common.d.ts +3 -3
  37. package/dist/contracts/common.js +5 -5
  38. package/dist/contracts/crons.d.ts +35 -0
  39. package/dist/contracts/crons.js +42 -0
  40. package/dist/contracts/device-auth.d.ts +6 -6
  41. package/dist/contracts/device-auth.js +2 -2
  42. package/dist/contracts/docs.js +2 -2
  43. package/dist/contracts/domains.d.ts +38 -27
  44. package/dist/contracts/domains.js +29 -2
  45. package/dist/contracts/enums.d.ts +34 -30
  46. package/dist/contracts/enums.js +62 -48
  47. package/dist/contracts/error-code-meta.d.ts +50 -125
  48. package/dist/contracts/error-code-meta.js +29 -41
  49. package/dist/contracts/error-codes.d.ts +1 -1
  50. package/dist/contracts/error-codes.js +14 -33
  51. package/dist/contracts/execution.d.ts +47 -66
  52. package/dist/contracts/execution.js +53 -49
  53. package/dist/contracts/feature-lifecycle-core.d.ts +0 -6
  54. package/dist/contracts/feature-lifecycle-core.js +2 -31
  55. package/dist/contracts/feature-lifecycle.d.ts +12 -52
  56. package/dist/contracts/feature-lifecycle.js +16 -59
  57. package/dist/contracts/features.d.ts +48 -60
  58. package/dist/contracts/features.js +59 -51
  59. package/dist/contracts/functions.d.ts +266 -72
  60. package/dist/contracts/functions.js +260 -37
  61. package/dist/contracts/git.d.ts +28 -34
  62. package/dist/contracts/git.js +10 -11
  63. package/dist/contracts/grants.d.ts +9 -5
  64. package/dist/contracts/grants.js +18 -9
  65. package/dist/contracts/ids.js +2 -2
  66. package/dist/contracts/internal.d.ts +8 -6
  67. package/dist/contracts/internal.js +12 -12
  68. package/dist/contracts/mcp.d.ts +11 -0
  69. package/dist/contracts/mcp.js +5 -0
  70. package/dist/contracts/me.js +1 -1
  71. package/dist/contracts/oauth-resources.d.ts +4 -3
  72. package/dist/contracts/oauth-resources.js +12 -3
  73. package/dist/contracts/operations.d.ts +90 -5
  74. package/dist/contracts/operations.js +77 -3
  75. package/dist/contracts/pages.d.ts +12 -7
  76. package/dist/contracts/pages.js +24 -1
  77. package/dist/contracts/plan-policy.d.ts +0 -2
  78. package/dist/contracts/plan-policy.js +2 -3
  79. package/dist/contracts/platform.d.ts +61 -148
  80. package/dist/contracts/platform.js +70 -126
  81. package/dist/contracts/publish-archive.d.ts +508 -0
  82. package/dist/contracts/publish-archive.js +32 -0
  83. package/dist/contracts/push-new.d.ts +4 -4
  84. package/dist/contracts/quotas.js +2 -2
  85. package/dist/contracts/repository-connections.d.ts +43 -30
  86. package/dist/contracts/repository-connections.js +11 -3
  87. package/dist/contracts/resources.d.ts +12 -24
  88. package/dist/contracts/resources.js +36 -16
  89. package/dist/contracts/runtime-api.d.ts +433 -192
  90. package/dist/contracts/runtime-api.js +421 -356
  91. package/dist/contracts/runtime-app.d.ts +127 -120
  92. package/dist/contracts/runtime-app.js +19 -10
  93. package/dist/contracts/runtime-db.d.ts +5 -5
  94. package/dist/contracts/runtime-db.js +2 -2
  95. package/dist/contracts/runtime-purge.d.ts +8 -0
  96. package/dist/contracts/runtime-purge.js +7 -0
  97. package/dist/contracts/runtime-services.d.ts +219 -0
  98. package/dist/contracts/runtime-services.js +437 -0
  99. package/dist/contracts/runtime-storage.d.ts +46 -32
  100. package/dist/contracts/runtime-storage.js +31 -8
  101. package/dist/contracts/sf-config-v1.d.ts +48 -10
  102. package/dist/contracts/space-config.d.ts +69 -18
  103. package/dist/contracts/space-config.js +226 -27
  104. package/dist/contracts/spaces.d.ts +236 -450
  105. package/dist/contracts/spaces.js +131 -151
  106. package/dist/contracts/superadmin-activity.d.ts +57 -4
  107. package/dist/contracts/superadmin-activity.js +48 -2
  108. package/dist/contracts/superadmin-search.d.ts +126 -0
  109. package/dist/contracts/superadmin-search.js +61 -0
  110. package/dist/contracts/superadmin-spaces.d.ts +361 -92
  111. package/dist/contracts/superadmin-spaces.js +97 -24
  112. package/dist/contracts/superadmin-teams.d.ts +28 -10
  113. package/dist/contracts/superadmin-teams.js +5 -8
  114. package/dist/contracts/superadmin-tenants.d.ts +0 -6
  115. package/dist/contracts/superadmin-tenants.js +1 -7
  116. package/dist/contracts/superadmin.d.ts +135 -54
  117. package/dist/contracts/superadmin.js +46 -23
  118. package/dist/contracts/tags.d.ts +12 -12
  119. package/dist/contracts/tags.js +3 -3
  120. package/dist/contracts/teams.d.ts +49 -14
  121. package/dist/contracts/teams.js +40 -22
  122. package/dist/contracts/transfers.d.ts +0 -49
  123. package/dist/contracts/transfers.js +4 -8
  124. package/dist/contracts/usage.d.ts +61 -0
  125. package/dist/contracts/usage.js +64 -0
  126. package/dist/contracts/variables.d.ts +2 -7
  127. package/dist/contracts/variables.js +9 -8
  128. package/dist/contracts/webhooks.d.ts +2 -2
  129. package/dist/contracts/zero.d.ts +102 -73
  130. package/dist/contracts/zero.js +94 -32
  131. package/dist/dashboard-paths/index.d.ts +1 -1
  132. package/dist/dashboard-paths/index.js +1 -0
  133. package/dist/docs/agent-prose.d.ts +2 -2
  134. package/dist/docs/agent-prose.js +63 -70
  135. package/dist/docs/agent-setup.js +45 -15
  136. package/dist/docs/catalog.d.ts +24 -24
  137. package/dist/docs/catalog.js +35 -24
  138. package/dist/docs/error-docs.js +194 -270
  139. package/dist/docs/skills.d.ts +12 -12
  140. package/dist/docs/skills.js +4 -4
  141. package/dist/test-helpers/fetch-stub.d.ts +16 -0
  142. package/dist/test-helpers/fetch-stub.js +25 -0
  143. package/dist/utils/build-settings.d.ts +5 -1
  144. package/dist/utils/build-settings.js +91 -13
  145. package/dist/utils/canonical-json.d.ts +10 -0
  146. package/dist/utils/canonical-json.js +22 -0
  147. package/dist/utils/cast-transport.d.ts +28 -0
  148. package/dist/utils/cast-transport.js +52 -0
  149. package/dist/utils/claim-token.d.ts +0 -8
  150. package/dist/utils/claim-token.js +3 -15
  151. package/dist/utils/concurrency.js +1 -0
  152. package/dist/utils/credential-policy.d.ts +1 -1
  153. package/dist/utils/credential-policy.js +4 -3
  154. package/dist/utils/dns-instructions.js +9 -9
  155. package/dist/utils/env-file.d.ts +17 -0
  156. package/dist/utils/env-file.js +96 -0
  157. package/dist/utils/error-code.d.ts +2 -0
  158. package/dist/utils/error-code.js +8 -0
  159. package/dist/utils/generate-space-name.d.ts +8 -10
  160. package/dist/utils/generate-space-name.js +206 -21
  161. package/dist/utils/grant-decision.fixtures.json +2938 -0
  162. package/dist/utils/grants.d.ts +2 -0
  163. package/dist/utils/grants.js +26 -1
  164. package/dist/utils/gravatar.d.ts +9 -0
  165. package/dist/utils/gravatar.js +31 -0
  166. package/dist/utils/idempotency.d.ts +6 -0
  167. package/dist/utils/idempotency.js +28 -0
  168. package/dist/utils/local-space-state.d.ts +9 -16
  169. package/dist/utils/local-space-state.js +20 -50
  170. package/dist/utils/one-shot-replay.d.ts +4 -1
  171. package/dist/utils/page-colors.d.ts +14 -12
  172. package/dist/utils/page-colors.js +15 -13
  173. package/dist/utils/page-fonts.d.ts +2 -2
  174. package/dist/utils/page-fonts.js +15 -4
  175. package/dist/utils/pages.d.ts +21 -3
  176. package/dist/utils/pages.js +42 -13
  177. package/dist/utils/publish-form-data.d.ts +12 -0
  178. package/dist/utils/publish-form-data.js +10 -0
  179. package/dist/utils/publish-policy.d.ts +27 -0
  180. package/dist/utils/publish-policy.fixtures.json +403 -0
  181. package/dist/utils/publish-policy.js +45 -20
  182. package/dist/utils/push-new.d.ts +7 -0
  183. package/dist/utils/push-new.js +7 -0
  184. package/dist/utils/query-keys.d.ts +4 -5
  185. package/dist/utils/query-keys.js +2 -3
  186. package/dist/utils/runtime-paths.d.ts +5 -0
  187. package/dist/utils/runtime-paths.js +5 -0
  188. package/dist/utils/runtime-upload-batch.d.ts +0 -5
  189. package/dist/utils/runtime-upload-batch.js +1 -27
  190. package/dist/utils/runtime-upload.d.ts +6 -11
  191. package/dist/utils/runtime-upload.js +10 -13
  192. package/dist/utils/secure-local-file.js +5 -16
  193. package/dist/utils/space-config.d.ts +1 -34
  194. package/dist/utils/space-config.js +8 -326
  195. package/dist/utils/static-runtime-policy.d.ts +9 -3
  196. package/dist/utils/static-runtime-policy.fixtures.json +38 -41
  197. package/dist/utils/static-runtime-policy.js +22 -56
  198. package/dist/utils/storage-policy.d.ts +1 -1
  199. package/dist/utils/storage-policy.js +3 -1
  200. package/dist/utils/structured-error.d.ts +14 -0
  201. package/dist/utils/structured-error.js +22 -0
  202. package/dist/utils/upload-session.d.ts +4 -1
  203. package/dist/utils/upload-session.js +33 -5
  204. package/dist/utils/version-path.js +13 -4
  205. package/dist/vocabulary.d.ts +13 -11
  206. package/dist/vocabulary.js +42 -28
  207. package/package.json +7 -17
  208. package/dist/config/postgres-budget.d.ts +0 -129
  209. package/dist/config/postgres-budget.js +0 -140
  210. package/dist/config/postgres-budget.json +0 -51
  211. package/dist/contracts/archives.d.ts +0 -331
  212. package/dist/contracts/archives.js +0 -120
  213. package/dist/contracts/deployments.d.ts +0 -574
  214. package/dist/contracts/deployments.js +0 -97
  215. package/dist/contracts/sites.d.ts +0 -416
  216. package/dist/contracts/sites.js +0 -168
  217. package/dist/contracts/superadmin-queues.d.ts +0 -414
  218. package/dist/contracts/superadmin-queues.js +0 -202
  219. package/dist/contracts/superadmin-runtime.d.ts +0 -27
  220. package/dist/contracts/superadmin-runtime.js +0 -38
  221. package/dist/index.d.ts +0 -1
  222. package/dist/index.js +0 -1
  223. package/dist/utils/api.d.ts +0 -4
  224. package/dist/utils/api.js +0 -13
@@ -9,6 +9,12 @@ export declare const repositoryConnectionSyncStatusSchema: z.ZodEnum<{
9
9
  idle: "idle";
10
10
  syncing: "syncing";
11
11
  }>;
12
+ export declare const repositoryProviderAccessStatusSchema: z.ZodEnum<{
13
+ active: "active";
14
+ suspended: "suspended";
15
+ revoked: "revoked";
16
+ reauthorization_required: "reauthorization_required";
17
+ }>;
12
18
  export declare const RepositoryConnectionSchema: z.ZodObject<{
13
19
  id: z.ZodString;
14
20
  spaceId: z.ZodString;
@@ -51,6 +57,13 @@ export declare const RepositoryConnectionSchema: z.ZodObject<{
51
57
  idle: "idle";
52
58
  syncing: "syncing";
53
59
  }>;
60
+ providerAccessStatus: z.ZodDefault<z.ZodEnum<{
61
+ active: "active";
62
+ suspended: "suspended";
63
+ revoked: "revoked";
64
+ reauthorization_required: "reauthorization_required";
65
+ }>>;
66
+ providerAccessError: z.ZodDefault<z.ZodNullable<z.ZodString>>;
54
67
  lastSyncedAt: z.ZodNullable<z.ZodString>;
55
68
  lastSyncError: z.ZodNullable<z.ZodString>;
56
69
  syncRunId: z.ZodNullable<z.ZodString>;
@@ -81,16 +94,16 @@ export declare const repositoryConnectionCreateSchema: z.ZodObject<{
81
94
  autoDeployProduction: z.ZodDefault<z.ZodBoolean>;
82
95
  autoDeployPreviews: z.ZodDefault<z.ZodBoolean>;
83
96
  buildSettings: z.ZodOptional<z.ZodObject<{
84
- rootDirectory: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
85
- installDirectory: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
86
- installCommand: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
87
- buildCommand: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
88
- outputDirectory: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
89
- ignoredBuildCommand: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
90
- frameworkPreset: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
91
- platformPreset: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
92
- allowUnsupportedPlatformFeatures: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
93
- timeoutSeconds: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
97
+ rootDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
98
+ installDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
99
+ installCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
100
+ buildCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
101
+ outputDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
102
+ ignoredBuildCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
103
+ frameworkPreset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
104
+ platformPreset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
105
+ allowUnsupportedPlatformFeatures: z.ZodOptional<z.ZodBoolean>;
106
+ timeoutSeconds: z.ZodOptional<z.ZodNumber>;
94
107
  }, z.core.$strip>>;
95
108
  }, z.core.$strip>;
96
109
  export declare const repositoryConnectionPatchSchema: z.ZodObject<{
@@ -105,16 +118,16 @@ export declare const repositoryConnectionPatchSchema: z.ZodObject<{
105
118
  autoDeployProduction: z.ZodOptional<z.ZodBoolean>;
106
119
  autoDeployPreviews: z.ZodOptional<z.ZodBoolean>;
107
120
  buildSettings: z.ZodOptional<z.ZodObject<{
108
- rootDirectory: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
109
- installDirectory: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
110
- installCommand: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
111
- buildCommand: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
112
- outputDirectory: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
113
- ignoredBuildCommand: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
114
- frameworkPreset: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
115
- platformPreset: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
116
- allowUnsupportedPlatformFeatures: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
117
- timeoutSeconds: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
121
+ rootDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
122
+ installDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
123
+ installCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
124
+ buildCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
125
+ outputDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
126
+ ignoredBuildCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
127
+ frameworkPreset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
128
+ platformPreset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
129
+ allowUnsupportedPlatformFeatures: z.ZodOptional<z.ZodBoolean>;
130
+ timeoutSeconds: z.ZodOptional<z.ZodNumber>;
118
131
  }, z.core.$strip>>;
119
132
  }, z.core.$strip>;
120
133
  export declare const repositoryImportRemoteSchema: z.ZodObject<{
@@ -132,16 +145,16 @@ export declare const repositoryImportRemoteSchema: z.ZodObject<{
132
145
  productionBranch: z.ZodOptional<z.ZodString>;
133
146
  cloneUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
134
147
  buildSettings: z.ZodOptional<z.ZodObject<{
135
- rootDirectory: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
136
- installDirectory: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
137
- installCommand: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
138
- buildCommand: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
139
- outputDirectory: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
140
- ignoredBuildCommand: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
141
- frameworkPreset: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
142
- platformPreset: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
143
- allowUnsupportedPlatformFeatures: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
144
- timeoutSeconds: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
148
+ rootDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
149
+ installDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
150
+ installCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
151
+ buildCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
152
+ outputDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
153
+ ignoredBuildCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
154
+ frameworkPreset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
155
+ platformPreset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
156
+ allowUnsupportedPlatformFeatures: z.ZodOptional<z.ZodBoolean>;
157
+ timeoutSeconds: z.ZodOptional<z.ZodNumber>;
145
158
  }, z.core.$strip>>;
146
159
  autoDeployProduction: z.ZodDefault<z.ZodBoolean>;
147
160
  autoDeployPreviews: z.ZodDefault<z.ZodBoolean>;
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { BuildSettingsSchema } from "./builds.js";
2
+ import { BuildSettingsOverrideSchema, BuildSettingsSchema } from "./builds.js";
3
3
  import { CursorPaginationSchema, cursorListQuerySchema } from "./common.js";
4
4
  import { gitProvider } from "./enums.js";
5
5
  // Two connection types only:
@@ -9,6 +9,12 @@ import { gitProvider } from "./enums.js";
9
9
  // not a connection type, so `import` is intentionally absent from this union.
10
10
  export const repositoryConnectionTypeSchema = z.enum(["connected", "hosted"]);
11
11
  export const repositoryConnectionSyncStatusSchema = z.enum(["idle", "syncing", "ready", "failed"]);
12
+ export const repositoryProviderAccessStatusSchema = z.enum([
13
+ "active",
14
+ "suspended",
15
+ "revoked",
16
+ "reauthorization_required",
17
+ ]);
12
18
  export const RepositoryConnectionSchema = z.object({
13
19
  id: z.string().describe("Repository connection id (`rpc_`)."),
14
20
  spaceId: z.string(),
@@ -37,6 +43,8 @@ export const RepositoryConnectionSchema = z.object({
37
43
  autoDeployPreviews: z.boolean(),
38
44
  buildSettings: BuildSettingsSchema,
39
45
  syncStatus: repositoryConnectionSyncStatusSchema,
46
+ providerAccessStatus: repositoryProviderAccessStatusSchema.default("active"),
47
+ providerAccessError: z.string().nullable().default(null),
40
48
  lastSyncedAt: z.string().datetime().nullable(),
41
49
  lastSyncError: z.string().nullable(),
42
50
  syncRunId: z.string().nullable(),
@@ -64,7 +72,7 @@ export const repositoryConnectionCreateSchema = z.object({
64
72
  credential: z.string().trim().min(1).nullable().optional(),
65
73
  autoDeployProduction: z.boolean().default(true),
66
74
  autoDeployPreviews: z.boolean().default(true),
67
- buildSettings: BuildSettingsSchema.partial().optional(),
75
+ buildSettings: BuildSettingsOverrideSchema.optional(),
68
76
  });
69
77
  export const repositoryConnectionPatchSchema = z.object({
70
78
  connectionType: repositoryConnectionTypeSchema.optional(),
@@ -74,7 +82,7 @@ export const repositoryConnectionPatchSchema = z.object({
74
82
  credential: z.string().trim().min(1).nullable().optional(),
75
83
  autoDeployProduction: z.boolean().optional(),
76
84
  autoDeployPreviews: z.boolean().optional(),
77
- buildSettings: BuildSettingsSchema.partial().optional(),
85
+ buildSettings: BuildSettingsOverrideSchema.optional(),
78
86
  });
79
87
  // Importing an existing external remote is an action/flag, not a connection
80
88
  // type. It produces a `connected` connection seeded from an upstream remote.
@@ -10,7 +10,7 @@ export declare const DiagnosticSchema: z.ZodObject<{
10
10
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
11
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
12
12
  registrar: "registrar";
13
- wpcloud: "wpcloud";
13
+ infra: "infra";
14
14
  dns: "dns";
15
15
  runtime: "runtime";
16
16
  }>>>;
@@ -38,7 +38,8 @@ export declare const spaceSettingsDigestSchema: z.ZodString;
38
38
  export declare const SpaceSchema: z.ZodObject<{
39
39
  id: z.ZodString;
40
40
  tenantId: z.ZodString;
41
- siteId: z.ZodNullable<z.ZodString>;
41
+ providerRef: z.ZodNullable<z.ZodString>;
42
+ providerClientId: z.ZodNullable<z.ZodString>;
42
43
  teamId: z.ZodNullable<z.ZodString>;
43
44
  teamSlug: z.ZodNullable<z.ZodString>;
44
45
  principal: z.ZodNullable<z.ZodObject<{
@@ -56,7 +57,6 @@ export declare const SpaceSchema: z.ZodObject<{
56
57
  active: "active";
57
58
  provisioning: "provisioning";
58
59
  updating: "updating";
59
- moving: "moving";
60
60
  deleting: "deleting";
61
61
  failed: "failed";
62
62
  }>;
@@ -67,6 +67,7 @@ export declare const SpaceSchema: z.ZodObject<{
67
67
  abuse_takedown: "abuse_takedown";
68
68
  tenant_suspended: "tenant_suspended";
69
69
  site_suspended: "site_suspended";
70
+ author_removed: "author_removed";
70
71
  }>;
71
72
  }, z.core.$strip>>;
72
73
  claimState: z.ZodNullable<z.ZodObject<{
@@ -94,17 +95,8 @@ export declare const SpaceSchema: z.ZodObject<{
94
95
  }, z.core.$strip>>;
95
96
  dataLocation: z.ZodString;
96
97
  region: z.ZodString;
97
- placementMode: z.ZodEnum<{
98
- shared: "shared";
99
- dedicated: "dedicated";
100
- }>;
101
98
  burstable: z.ZodNullable<z.ZodBoolean>;
102
99
  archivedBytes: z.ZodNumber;
103
- tierPolicy: z.ZodEnum<{
104
- auto: "auto";
105
- always_hot: "always_hot";
106
- }>;
107
- moving: z.ZodBoolean;
108
100
  hasRuntime: z.ZodBoolean;
109
101
  channels: z.ZodRecord<z.ZodString, z.ZodObject<{
110
102
  versionId: z.ZodString;
@@ -122,6 +114,7 @@ export declare const SpaceSchema: z.ZodObject<{
122
114
  title: z.ZodOptional<z.ZodString>;
123
115
  description: z.ZodOptional<z.ZodString>;
124
116
  image: z.ZodOptional<z.ZodString>;
117
+ favicon: z.ZodOptional<z.ZodString>;
125
118
  }, z.core.$strip>>;
126
119
  superpowers: z.ZodOptional<z.ZodObject<{
127
120
  enabled: z.ZodOptional<z.ZodBoolean>;
@@ -174,10 +167,6 @@ export declare const SpaceSchema: z.ZodObject<{
174
167
  timeoutSeconds: z.ZodOptional<z.ZodNumber>;
175
168
  }, z.core.$strict>>;
176
169
  placement: z.ZodOptional<z.ZodObject<{
177
- mode: z.ZodOptional<z.ZodEnum<{
178
- shared: "shared";
179
- dedicated: "dedicated";
180
- }>>;
181
170
  burstable: z.ZodOptional<z.ZodBoolean>;
182
171
  }, z.core.$strict>>;
183
172
  markdownNegotiation: z.ZodOptional<z.ZodBoolean>;
@@ -226,7 +215,7 @@ export declare const SpaceSchema: z.ZodObject<{
226
215
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
227
216
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
228
217
  registrar: "registrar";
229
- wpcloud: "wpcloud";
218
+ infra: "infra";
230
219
  dns: "dns";
231
220
  runtime: "runtime";
232
221
  }>>>;
@@ -329,6 +318,9 @@ export declare const VersionSchema: z.ZodObject<{
329
318
  variables: z.ZodNull;
330
319
  fileCount: z.ZodNullable<z.ZodNumber>;
331
320
  totalBytes: z.ZodNullable<z.ZodNumber>;
321
+ filesAddedCount: z.ZodNumber;
322
+ filesChangedCount: z.ZodNumber;
323
+ filesRemovedCount: z.ZodNumber;
332
324
  pendingUploads: z.ZodArray<z.ZodObject<{
333
325
  path: z.ZodString;
334
326
  size: z.ZodNumber;
@@ -355,6 +347,7 @@ export declare const VersionSchema: z.ZodObject<{
355
347
  title: z.ZodOptional<z.ZodString>;
356
348
  description: z.ZodOptional<z.ZodString>;
357
349
  image: z.ZodOptional<z.ZodString>;
350
+ favicon: z.ZodOptional<z.ZodString>;
358
351
  }, z.core.$strip>>;
359
352
  superpowers: z.ZodOptional<z.ZodObject<{
360
353
  enabled: z.ZodOptional<z.ZodBoolean>;
@@ -407,10 +400,6 @@ export declare const VersionSchema: z.ZodObject<{
407
400
  timeoutSeconds: z.ZodOptional<z.ZodNumber>;
408
401
  }, z.core.$strict>>;
409
402
  placement: z.ZodOptional<z.ZodObject<{
410
- mode: z.ZodOptional<z.ZodEnum<{
411
- shared: "shared";
412
- dedicated: "dedicated";
413
- }>>;
414
403
  burstable: z.ZodOptional<z.ZodBoolean>;
415
404
  }, z.core.$strict>>;
416
405
  markdownNegotiation: z.ZodOptional<z.ZodBoolean>;
@@ -457,7 +446,7 @@ export declare const VersionSchema: z.ZodObject<{
457
446
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
458
447
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
459
448
  registrar: "registrar";
460
- wpcloud: "wpcloud";
449
+ infra: "infra";
461
450
  dns: "dns";
462
451
  runtime: "runtime";
463
452
  }>>>;
@@ -484,7 +473,7 @@ export declare const VersionSchema: z.ZodObject<{
484
473
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
485
474
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
486
475
  registrar: "registrar";
487
- wpcloud: "wpcloud";
476
+ infra: "infra";
488
477
  dns: "dns";
489
478
  runtime: "runtime";
490
479
  }>>>;
@@ -497,7 +486,6 @@ export declare const VersionSchema: z.ZodObject<{
497
486
  }, z.core.$strip>>>;
498
487
  createdAt: z.ZodString;
499
488
  readyAt: z.ZodNullable<z.ZodString>;
500
- retainedUntil: z.ZodNullable<z.ZodString>;
501
489
  updatedAt: z.ZodString;
502
490
  }, z.core.$strip>;
503
491
  export declare function hasActiveVersionStatus(status: string | null | undefined): boolean;
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { AsyncOperationSchema, baseDiagnosticSchema } from "./common.js";
3
- import { normalizedSiteClass, publishSourceKind, versionStatus, spaceDisabledReasonCode, spaceStatus, } from "./enums.js";
3
+ import { publishSourceKind, versionStatus, spaceDisabledReasonCode, spaceStatus } from "./enums.js";
4
4
  import { pendingUploadSchema } from "./internal.js";
5
5
  import { spaceConfigSchema } from "./space-config.js";
6
6
  export const DiagnosticSchema = baseDiagnosticSchema.extend({
@@ -13,7 +13,7 @@ export const PrincipalRefSchema = z.object({
13
13
  principalType: z.enum(["team", "external"]),
14
14
  principalId: z.string(),
15
15
  });
16
- // ChannelPointer (internal-docs/platform.md "ChannelPointer"): a channel names
16
+ // ChannelPointer (the platform spec "ChannelPointer"): a channel names
17
17
  // exactly one version. A channel with no version yet is absent from the map
18
18
  // rather than present with an empty pointer.
19
19
  export const ChannelPointerSchema = z.object({
@@ -30,7 +30,17 @@ export const spaceSettingsDigestSchema = z
30
30
  export const SpaceSchema = z.object({
31
31
  id: z.string(),
32
32
  tenantId: z.string(),
33
- siteId: z.string().nullable(),
33
+ // Raw provider identity of the site this space IS — deliberately not hidden
34
+ // behind an abstraction, because a platform tenant provisioning under its own
35
+ // WP.Cloud client needs the real handle to reconcile against. Both are
36
+ // platform-surface fields (like `tenantId` and `principal`): the public API
37
+ // reference strips them, the platform document keeps them. Null until the
38
+ // space is placed.
39
+ providerRef: z.string().nullable().describe("WP Cloud `atomic_site_id` serving this space."),
40
+ providerClientId: z
41
+ .string()
42
+ .nullable()
43
+ .describe("WP Cloud client identity (`pvc_...`) the space's site is provisioned under."),
34
44
  teamId: z.string().nullable(),
35
45
  teamSlug: z.string().nullable(),
36
46
  principal: PrincipalRefSchema.nullable(),
@@ -39,7 +49,7 @@ export const SpaceSchema = z.object({
39
49
  title: z.string(),
40
50
  status: spaceStatus.describe("Operation-lifecycle status. Serving state is the separate `disabled` axis."),
41
51
  // Serving axis, distinct from the operation-lifecycle state: set whenever
42
- // the space is dark. A disabled space can still be moving. Confirmed scan
52
+ // the space is dark. A disabled space can still be updating. Confirmed scan
43
53
  // takedowns use `abuse_takedown`; verdict and claim state are separate axes.
44
54
  disabled: z
45
55
  .object({
@@ -47,7 +57,7 @@ export const SpaceSchema = z.object({
47
57
  reasonCode: spaceDisabledReasonCode.describe("Why serving is disabled."),
48
58
  })
49
59
  .nullable(),
50
- // Anonymous-claim lifecycle (internal-docs/platform.md Space.claimState): null
60
+ // Anonymous-claim lifecycle (the platform spec Space.claimState): null
51
61
  // for spaces that never went through the anonymous lifecycle. `purgeAfter` is
52
62
  // the end of the one-day post-expiry recovery window before content deletion.
53
63
  claimState: z
@@ -82,18 +92,15 @@ export const SpaceSchema = z.object({
82
92
  region: z
83
93
  .string()
84
94
  .describe('Alias of dataLocation for placement dashboards; "auto" only while no concrete region is known yet.'),
85
- placementMode: normalizedSiteClass.describe("Requested placement mode for this space."),
86
95
  burstable: z
87
96
  .boolean()
88
97
  .nullable()
89
- .describe("Whether a dedicated placement can burst provider PHP workers."),
98
+ .describe("Whether this space's site can burst provider PHP workers."),
90
99
  archivedBytes: z
91
100
  .number()
92
101
  .int()
93
102
  .nonnegative()
94
103
  .describe("Bytes currently archived out of the hot runtime store."),
95
- tierPolicy: z.enum(["auto", "always_hot"]).describe("Storage tiering policy for this space."),
96
- moving: z.boolean().describe("Whether a placement or transfer move is queued or running."),
97
104
  hasRuntime: z
98
105
  .boolean()
99
106
  .describe("Whether this space's live version runs code and therefore has a Runtime surface. Feature eligibility alone does not make the surface visible."),
@@ -111,7 +118,7 @@ export const SpaceSchema = z.object({
111
118
  createdAt: z.string().datetime(),
112
119
  updatedAt: z.string().datetime(),
113
120
  });
114
- // PublishSource (internal-docs/platform.md "PublishSource"): the single
121
+ // PublishSource (the platform spec "PublishSource"): the single
115
122
  // provenance shape for how a version came to exist. Sent on publish/version
116
123
  // create and echoed on the Version resource. Structured CI/git detail beyond
117
124
  // the named fields rides in `metadata` (string values only).
@@ -121,7 +128,7 @@ export const PublishSourceSchema = z.object({
121
128
  .string()
122
129
  .max(255)
123
130
  .optional()
124
- .describe("Publishing client attribution, e.g. spacefast-cli/1.2.3."),
131
+ .describe("Publishing client attribution, for example `spacefast-cli/1.2.3`."),
125
132
  branch: z.string().max(255).optional().describe("Git branch the publish came from."),
126
133
  commit: z.string().max(64).optional().describe("Git commit SHA the publish came from."),
127
134
  message: z
@@ -177,6 +184,23 @@ export const VersionSchema = z.object({
177
184
  variables: z.null().describe("Variable dependency provenance is not publicly exposed."),
178
185
  fileCount: z.number().int().nullable(),
179
186
  totalBytes: z.number().int().nullable(),
187
+ // The runtime's catalog diff against the version this one replaced, written
188
+ // once at finalize. Zero on versions that never finalized.
189
+ filesAddedCount: z
190
+ .number()
191
+ .int()
192
+ .nonnegative()
193
+ .describe("Paths this version added against the version it replaced."),
194
+ filesChangedCount: z
195
+ .number()
196
+ .int()
197
+ .nonnegative()
198
+ .describe("Paths whose bytes changed against the version this one replaced."),
199
+ filesRemovedCount: z
200
+ .number()
201
+ .int()
202
+ .nonnegative()
203
+ .describe("Paths this version removed against the version it replaced."),
180
204
  pendingUploads: z.array(pendingUploadSchema),
181
205
  skippedPaths: z.array(z.string()),
182
206
  immutableUrl: z
@@ -200,12 +224,8 @@ export const VersionSchema = z.object({
200
224
  buildLog: z.string().nullable(),
201
225
  diagnostics: z.array(DiagnosticSchema).default([]),
202
226
  createdAt: z.string().datetime(),
203
- // Retention anchor: stamped when the version first reaches "ready".
227
+ // Stamped when the version first reaches "ready".
204
228
  readyAt: z.string().datetime().nullable(),
205
- // Storage retention deadline computed from plan policy at read time, never
206
- // stored per row. Null = not subject to retention deletion
207
- // (live/channel-referenced, anonymous claim lifecycle, or an unlimited plan).
208
- retainedUntil: z.string().datetime().nullable(),
209
229
  updatedAt: z.string().datetime(),
210
230
  });
211
231
  const activeVersionStatuses = new Set(["created", "uploading", "uploaded", "finalizing"]);