@spacefast/common 0.0.24 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (320) 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.d.ts +6 -146
  7. package/dist/agents/connect-targets.js +63 -295
  8. package/dist/agents/private-key-oauth.d.ts +31 -2
  9. package/dist/agents/private-key-oauth.js +166 -92
  10. package/dist/agents/registry/core.d.ts +292 -0
  11. package/dist/agents/registry/core.js +1388 -0
  12. package/dist/agents/registry/deeplink-probes.d.ts +23 -0
  13. package/dist/agents/registry/deeplink-probes.js +18 -0
  14. package/dist/agents/registry/node.d.ts +56 -0
  15. package/dist/agents/registry/node.js +339 -0
  16. package/dist/brand-assets-build.js +3 -6
  17. package/dist/brand-assets.d.ts +5 -15
  18. package/dist/brand-assets.js +12 -14
  19. package/dist/brand.d.ts +17 -0
  20. package/dist/brand.js +24 -4
  21. package/dist/config/domains.d.ts +79 -12
  22. package/dist/config/domains.js +128 -29
  23. package/dist/config/index.js +1 -2
  24. package/dist/contracts/abuse.js +9 -24
  25. package/dist/contracts/access-profiles.d.ts +86 -0
  26. package/dist/contracts/access-profiles.js +89 -0
  27. package/dist/contracts/access.d.ts +24 -30
  28. package/dist/contracts/access.js +33 -64
  29. package/dist/contracts/activity.d.ts +18 -1
  30. package/dist/contracts/activity.js +72 -26
  31. package/dist/contracts/analytics.js +8 -10
  32. package/dist/contracts/api-keys.d.ts +77 -52
  33. package/dist/contracts/api-keys.js +44 -24
  34. package/dist/contracts/application-journal.d.ts +216 -0
  35. package/dist/contracts/application-journal.js +167 -0
  36. package/dist/contracts/auth.d.ts +90 -17
  37. package/dist/contracts/auth.js +86 -17
  38. package/dist/contracts/beta.d.ts +9 -4
  39. package/dist/contracts/beta.js +20 -16
  40. package/dist/contracts/billing.d.ts +2 -1
  41. package/dist/contracts/billing.js +37 -11
  42. package/dist/contracts/bootstrap.d.ts +791 -0
  43. package/dist/contracts/bootstrap.js +51 -0
  44. package/dist/contracts/builds.d.ts +209 -18
  45. package/dist/contracts/builds.js +93 -27
  46. package/dist/contracts/channels.d.ts +43 -0
  47. package/dist/contracts/channels.js +25 -9
  48. package/dist/contracts/cli.d.ts +7 -0
  49. package/dist/contracts/cli.js +6 -0
  50. package/dist/contracts/collab-public.d.ts +1 -1
  51. package/dist/contracts/collab-public.js +5 -8
  52. package/dist/contracts/comments.d.ts +44 -34
  53. package/dist/contracts/comments.js +107 -77
  54. package/dist/contracts/commerce.d.ts +165 -0
  55. package/dist/contracts/commerce.js +146 -0
  56. package/dist/contracts/common.d.ts +3 -3
  57. package/dist/contracts/common.js +20 -31
  58. package/dist/contracts/content-contract-verification.d.ts +521 -0
  59. package/dist/contracts/content-contract-verification.js +320 -0
  60. package/dist/contracts/content-platform-fixture.d.ts +1278 -0
  61. package/dist/contracts/content-platform-fixture.js +44 -0
  62. package/dist/contracts/content-program.d.ts +994 -0
  63. package/dist/contracts/content-program.js +658 -0
  64. package/dist/contracts/content-sync.d.ts +290 -0
  65. package/dist/contracts/content-sync.js +167 -0
  66. package/dist/contracts/content.d.ts +432 -0
  67. package/dist/contracts/content.js +303 -0
  68. package/dist/contracts/continuation.d.ts +17 -1
  69. package/dist/contracts/continuation.js +23 -23
  70. package/dist/contracts/countries.js +3 -4
  71. package/dist/contracts/crons.d.ts +52 -0
  72. package/dist/contracts/crons.js +60 -0
  73. package/dist/contracts/dashboard-prefs.d.ts +56 -0
  74. package/dist/contracts/dashboard-prefs.js +51 -0
  75. package/dist/contracts/device-auth.d.ts +234 -37
  76. package/dist/contracts/device-auth.js +267 -53
  77. package/dist/contracts/docs.d.ts +1 -5
  78. package/dist/contracts/docs.js +7 -15
  79. package/dist/contracts/domains.d.ts +501 -93
  80. package/dist/contracts/domains.js +193 -55
  81. package/dist/contracts/email-preferences.d.ts +3 -3
  82. package/dist/contracts/email-preferences.js +6 -7
  83. package/dist/contracts/enums.d.ts +27 -26
  84. package/dist/contracts/enums.js +68 -61
  85. package/dist/contracts/error-code-meta.d.ts +283 -7
  86. package/dist/contracts/error-code-meta.js +97 -5
  87. package/dist/contracts/error-codes.d.ts +5 -5
  88. package/dist/contracts/error-codes.js +82 -17
  89. package/dist/contracts/events.d.ts +100 -20
  90. package/dist/contracts/events.js +107 -20
  91. package/dist/contracts/execution.d.ts +48 -64
  92. package/dist/contracts/execution.js +52 -62
  93. package/dist/contracts/feature-lifecycle.d.ts +73 -27
  94. package/dist/contracts/feature-lifecycle.js +86 -26
  95. package/dist/contracts/features.d.ts +68 -19
  96. package/dist/contracts/features.js +42 -41
  97. package/dist/contracts/fixtures/content-platform-v1.json +1108 -0
  98. package/dist/contracts/frame-session.d.ts +192 -0
  99. package/dist/contracts/frame-session.js +164 -0
  100. package/dist/contracts/functions.d.ts +338 -164
  101. package/dist/contracts/functions.js +367 -198
  102. package/dist/contracts/git.d.ts +27 -33
  103. package/dist/contracts/git.js +10 -11
  104. package/dist/contracts/grant-copy.d.ts +43 -0
  105. package/dist/contracts/grant-copy.js +44 -0
  106. package/dist/contracts/grants.d.ts +62 -54
  107. package/dist/contracts/grants.js +124 -23
  108. package/dist/contracts/ids.d.ts +4 -1
  109. package/dist/contracts/ids.js +6 -3
  110. package/dist/contracts/internal.d.ts +8 -18
  111. package/dist/contracts/internal.js +13 -14
  112. package/dist/contracts/mcp.d.ts +28 -0
  113. package/dist/contracts/mcp.js +28 -0
  114. package/dist/contracts/me.d.ts +6 -1
  115. package/dist/contracts/me.js +12 -6
  116. package/dist/contracts/notifications.d.ts +27 -29
  117. package/dist/contracts/notifications.js +9 -4
  118. package/dist/contracts/oauth-resources.d.ts +112 -10
  119. package/dist/contracts/oauth-resources.js +116 -11
  120. package/dist/contracts/oauth-scope-actions.d.ts +90 -0
  121. package/dist/contracts/oauth-scope-actions.js +126 -0
  122. package/dist/contracts/operations.d.ts +27 -4
  123. package/dist/contracts/operations.js +12 -6
  124. package/dist/contracts/pages.d.ts +31 -7
  125. package/dist/contracts/pages.js +22 -5
  126. package/dist/contracts/partner-notifications.d.ts +3 -0
  127. package/dist/contracts/partner-notifications.js +65 -0
  128. package/dist/contracts/{platform.d.ts → partner.d.ts} +29 -42
  129. package/dist/contracts/{platform.js → partner.js} +27 -40
  130. package/dist/contracts/plan-policy.js +1 -1
  131. package/dist/contracts/principal-assertion.d.ts +43 -0
  132. package/dist/contracts/principal-assertion.js +67 -0
  133. package/dist/contracts/principals.d.ts +73 -0
  134. package/dist/contracts/principals.js +59 -0
  135. package/dist/contracts/privacy.d.ts +11 -0
  136. package/dist/contracts/privacy.js +17 -0
  137. package/dist/contracts/problem-document.js +3 -4
  138. package/dist/contracts/publish-archive.d.ts +269 -161
  139. package/dist/contracts/publish-archive.js +11 -1
  140. package/dist/contracts/push-new.d.ts +8 -8
  141. package/dist/contracts/quotas.js +5 -5
  142. package/dist/contracts/realtime.d.ts +52 -0
  143. package/dist/contracts/realtime.js +54 -0
  144. package/dist/contracts/repository-connections.d.ts +44 -31
  145. package/dist/contracts/repository-connections.js +17 -5
  146. package/dist/contracts/resources.d.ts +105 -14
  147. package/dist/contracts/resources.js +150 -26
  148. package/dist/contracts/route-inventory.d.ts +358 -0
  149. package/dist/contracts/route-inventory.js +141 -0
  150. package/dist/contracts/runtime-api.d.ts +206 -82
  151. package/dist/contracts/runtime-api.js +131 -70
  152. package/dist/contracts/runtime-app.d.ts +13 -23
  153. package/dist/contracts/runtime-app.js +39 -24
  154. package/dist/contracts/runtime-components.d.ts +143 -0
  155. package/dist/contracts/runtime-components.js +199 -0
  156. package/dist/contracts/runtime-db.d.ts +49 -23
  157. package/dist/contracts/runtime-db.js +87 -22
  158. package/dist/contracts/runtime-purge.d.ts +8 -0
  159. package/dist/contracts/runtime-purge.js +5 -0
  160. package/dist/contracts/runtime-services.d.ts +43 -75
  161. package/dist/contracts/runtime-services.js +29 -49
  162. package/dist/contracts/runtime-storage.d.ts +15 -14
  163. package/dist/contracts/runtime-storage.js +30 -14
  164. package/dist/contracts/sf-config-v1.d.ts +48 -14
  165. package/dist/contracts/slugs.js +13 -4
  166. package/dist/contracts/space-config.d.ts +283 -19
  167. package/dist/contracts/space-config.js +430 -80
  168. package/dist/contracts/spaces.d.ts +376 -290
  169. package/dist/contracts/spaces.js +200 -135
  170. package/dist/contracts/superadmin-activity.d.ts +3 -43
  171. package/dist/contracts/superadmin-activity.js +6 -30
  172. package/dist/contracts/superadmin-emails.d.ts +1 -0
  173. package/dist/contracts/superadmin-emails.js +17 -1
  174. package/dist/contracts/superadmin-runtime.d.ts +199 -0
  175. package/dist/contracts/superadmin-runtime.js +141 -0
  176. package/dist/contracts/superadmin-search.d.ts +22 -2
  177. package/dist/contracts/superadmin-search.js +14 -6
  178. package/dist/contracts/superadmin-spaces.d.ts +438 -189
  179. package/dist/contracts/superadmin-spaces.js +131 -25
  180. package/dist/contracts/superadmin-teams.d.ts +5 -2
  181. package/dist/contracts/superadmin-teams.js +1 -2
  182. package/dist/contracts/superadmin-tenants.d.ts +627 -12
  183. package/dist/contracts/superadmin-tenants.js +32 -13
  184. package/dist/contracts/superadmin.d.ts +232 -37
  185. package/dist/contracts/superadmin.js +106 -22
  186. package/dist/contracts/tags.d.ts +85 -58
  187. package/dist/contracts/tags.js +47 -37
  188. package/dist/contracts/teams.d.ts +86 -26
  189. package/dist/contracts/teams.js +90 -31
  190. package/dist/contracts/tenants.d.ts +135 -0
  191. package/dist/contracts/tenants.js +120 -0
  192. package/dist/contracts/test-triggers.d.ts +70 -0
  193. package/dist/contracts/test-triggers.js +116 -0
  194. package/dist/contracts/theme-json.js +3 -8
  195. package/dist/contracts/transfers.d.ts +1 -0
  196. package/dist/contracts/transfers.js +3 -2
  197. package/dist/contracts/usage.d.ts +209 -0
  198. package/dist/contracts/usage.js +124 -12
  199. package/dist/contracts/variables.d.ts +2 -2
  200. package/dist/contracts/variables.js +9 -13
  201. package/dist/contracts/webhooks.d.ts +13 -5
  202. package/dist/contracts/webhooks.js +3 -1
  203. package/dist/contracts/zero.d.ts +72 -81
  204. package/dist/contracts/zero.js +80 -78
  205. package/dist/dashboard-paths/index.d.ts +24 -21
  206. package/dist/dashboard-paths/index.js +35 -47
  207. package/dist/dashboard-paths/route-reservations.generated.d.ts +2 -0
  208. package/dist/dashboard-paths/route-reservations.generated.js +36 -0
  209. package/dist/docs/agent-arrival.d.ts +92 -0
  210. package/dist/docs/agent-arrival.js +227 -0
  211. package/dist/docs/agent-output-policy.d.ts +6 -0
  212. package/dist/docs/agent-output-policy.js +22 -0
  213. package/dist/docs/agent-prose.d.ts +12 -18
  214. package/dist/docs/agent-prose.js +73 -51
  215. package/dist/docs/agent-setup.d.ts +72 -41
  216. package/dist/docs/agent-setup.js +339 -436
  217. package/dist/docs/catalog.d.ts +153 -95
  218. package/dist/docs/catalog.js +163 -48
  219. package/dist/docs/error-docs.d.ts +2098 -1
  220. package/dist/docs/error-docs.js +421 -144
  221. package/dist/docs/index-build.d.ts +0 -1
  222. package/dist/docs/index-build.js +2 -3
  223. package/dist/docs/page-context-prompt.d.ts +77 -0
  224. package/dist/docs/page-context-prompt.js +131 -0
  225. package/dist/docs/reference-urls.d.ts +46 -0
  226. package/dist/docs/reference-urls.js +79 -0
  227. package/dist/docs/search.d.ts +6 -8
  228. package/dist/docs/search.js +10 -13
  229. package/dist/docs/skill-distribution.d.ts +4 -1
  230. package/dist/docs/skill-distribution.js +10 -5
  231. package/dist/docs/skills.d.ts +120 -120
  232. package/dist/docs/skills.js +121 -73
  233. package/dist/docs/start-prompts.d.ts +45 -0
  234. package/dist/docs/start-prompts.js +62 -0
  235. package/dist/domain-exploration.js +9 -13
  236. package/dist/og-template.d.ts +56 -0
  237. package/dist/og-template.js +56 -0
  238. package/dist/slug-policy/index.js +5 -11
  239. package/dist/test-helpers/fetch-stub.js +1 -0
  240. package/dist/utils/browser-credential.d.ts +13 -6
  241. package/dist/utils/browser-credential.js +14 -7
  242. package/dist/utils/build-settings.d.ts +21 -1
  243. package/dist/utils/build-settings.js +133 -15
  244. package/dist/utils/canonical-json.d.ts +3 -5
  245. package/dist/utils/canonical-json.js +4 -5
  246. package/dist/utils/cast-transport.d.ts +5 -17
  247. package/dist/utils/cast-transport.js +6 -19
  248. package/dist/utils/claim-token.js +1 -2
  249. package/dist/utils/comment-avatars.js +4 -6
  250. package/dist/utils/concurrency.js +3 -3
  251. package/dist/utils/content-type.d.ts +7 -6
  252. package/dist/utils/content-type.js +73 -51
  253. package/dist/utils/credential-policy.d.ts +50 -6
  254. package/dist/utils/credential-policy.js +126 -59
  255. package/dist/utils/dns-instructions.js +9 -9
  256. package/dist/utils/egress-policy.fixtures.json +1 -1
  257. package/dist/utils/error-code.js +1 -0
  258. package/dist/utils/generate-space-name.d.ts +3 -8
  259. package/dist/utils/generate-space-name.js +3 -8
  260. package/dist/utils/grant-decision.fixtures.json +2 -2
  261. package/dist/utils/grants.d.ts +0 -1
  262. package/dist/utils/grants.js +7 -8
  263. package/dist/utils/gravatar.d.ts +2 -4
  264. package/dist/utils/gravatar.js +6 -12
  265. package/dist/utils/id-hints.js +14 -23
  266. package/dist/utils/idempotency.d.ts +3 -3
  267. package/dist/utils/idempotency.js +6 -7
  268. package/dist/utils/local-space-state.d.ts +23 -26
  269. package/dist/utils/local-space-state.js +46 -46
  270. package/dist/utils/oauth-signed-query.d.ts +3 -5
  271. package/dist/utils/oauth-signed-query.js +6 -9
  272. package/dist/utils/one-shot-replay.d.ts +7 -6
  273. package/dist/utils/one-shot-replay.js +3 -5
  274. package/dist/utils/page-colors.d.ts +15 -19
  275. package/dist/utils/page-colors.js +23 -45
  276. package/dist/utils/page-fonts.d.ts +1 -1
  277. package/dist/utils/page-fonts.js +8 -20
  278. package/dist/utils/page-preview.d.ts +0 -1
  279. package/dist/utils/page-preview.js +0 -1
  280. package/dist/utils/pages.d.ts +33 -3
  281. package/dist/utils/pages.js +83 -30
  282. package/dist/utils/privacy-regions.d.ts +19 -0
  283. package/dist/utils/privacy-regions.js +91 -0
  284. package/dist/utils/publish-form-data.d.ts +4 -5
  285. package/dist/utils/publish-form-data.js +2 -3
  286. package/dist/utils/publish-policy.d.ts +11 -17
  287. package/dist/utils/publish-policy.fixtures.json +11 -5
  288. package/dist/utils/publish-policy.js +65 -110
  289. package/dist/utils/query-client.d.ts +2 -0
  290. package/dist/utils/query-client.js +10 -1
  291. package/dist/utils/runtime-paths.d.ts +4 -4
  292. package/dist/utils/runtime-paths.js +6 -8
  293. package/dist/utils/runtime-upload.d.ts +9 -0
  294. package/dist/utils/runtime-upload.js +12 -0
  295. package/dist/utils/secure-local-file.d.ts +3 -3
  296. package/dist/utils/secure-local-file.js +23 -40
  297. package/dist/utils/space-config.d.ts +12 -15
  298. package/dist/utils/space-config.js +13 -16
  299. package/dist/utils/static-runtime-policy.d.ts +10 -7
  300. package/dist/utils/static-runtime-policy.fixtures.json +38 -41
  301. package/dist/utils/static-runtime-policy.generated.d.ts +16 -0
  302. package/dist/utils/static-runtime-policy.generated.js +70 -0
  303. package/dist/utils/static-runtime-policy.js +31 -132
  304. package/dist/utils/storage-policy.js +1 -2
  305. package/dist/utils/upload-session.d.ts +4 -1
  306. package/dist/utils/upload-session.js +41 -19
  307. package/dist/utils/version-path.js +11 -19
  308. package/dist/utils/wpcom-auth-redirects.d.ts +5 -14
  309. package/dist/utils/wpcom-auth-redirects.js +1 -4
  310. package/dist/vocabulary.d.ts +13 -13
  311. package/dist/vocabulary.js +52 -27
  312. package/package.json +15 -18
  313. package/dist/agents/client-registry.d.ts +0 -22
  314. package/dist/agents/client-registry.js +0 -41
  315. package/dist/docs/agent-handoff-document.d.ts +0 -15
  316. package/dist/docs/agent-handoff-document.js +0 -180
  317. package/dist/docs/agent-solutions.d.ts +0 -110
  318. package/dist/docs/agent-solutions.js +0 -183
  319. package/dist/utils/query-keys.d.ts +0 -84
  320. package/dist/utils/query-keys.js +0 -108
@@ -96,16 +96,16 @@ export declare const gitConnectionCreateSchema: z.ZodPipe<z.ZodObject<{
96
96
  autoDeployProduction: z.ZodDefault<z.ZodBoolean>;
97
97
  autoDeployPreviews: z.ZodDefault<z.ZodBoolean>;
98
98
  buildSettings: z.ZodOptional<z.ZodObject<{
99
- rootDirectory: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
100
- installDirectory: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
101
- installCommand: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
102
- buildCommand: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
103
- outputDirectory: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
104
- ignoredBuildCommand: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
105
- frameworkPreset: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
106
- platformPreset: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
107
- allowUnsupportedPlatformFeatures: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
108
- timeoutSeconds: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
99
+ rootDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
100
+ installDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
101
+ installCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
102
+ buildCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
103
+ outputDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
104
+ ignoredBuildCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
105
+ frameworkPreset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
106
+ platformPreset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
107
+ allowUnsupportedPlatformFeatures: z.ZodOptional<z.ZodBoolean>;
108
+ timeoutSeconds: z.ZodOptional<z.ZodNumber>;
109
109
  }, z.core.$strip>>;
110
110
  }, z.core.$strip>, z.ZodTransform<{
111
111
  productionBranch: string;
@@ -163,16 +163,16 @@ export declare const gitConnectionPatchSchema: z.ZodObject<{
163
163
  autoDeployProduction: z.ZodOptional<z.ZodBoolean>;
164
164
  autoDeployPreviews: z.ZodOptional<z.ZodBoolean>;
165
165
  buildSettings: z.ZodOptional<z.ZodObject<{
166
- rootDirectory: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
167
- installDirectory: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
168
- installCommand: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
169
- buildCommand: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
170
- outputDirectory: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
171
- ignoredBuildCommand: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
172
- frameworkPreset: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
173
- platformPreset: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
174
- allowUnsupportedPlatformFeatures: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
175
- timeoutSeconds: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
166
+ rootDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
167
+ installDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
168
+ installCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
169
+ buildCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
170
+ outputDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
171
+ ignoredBuildCommand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
172
+ frameworkPreset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
173
+ platformPreset: z.ZodOptional<z.ZodNullable<z.ZodString>>;
174
+ allowUnsupportedPlatformFeatures: z.ZodOptional<z.ZodBoolean>;
175
+ timeoutSeconds: z.ZodOptional<z.ZodNumber>;
176
176
  }, z.core.$strip>>;
177
177
  }, z.core.$strip>;
178
178
  export declare const gitConnectionAnalyzeSchema: z.ZodObject<{
@@ -249,7 +249,13 @@ export declare const githubInstallationSchema: z.ZodObject<{
249
249
  htmlUrl: z.ZodNullable<z.ZodString>;
250
250
  }, z.core.$strip>;
251
251
  export declare const githubInstallationsResponseSchema: z.ZodObject<{
252
- appConfigured: z.ZodBoolean;
252
+ readiness: z.ZodObject<{
253
+ canAuthorize: z.ZodBoolean;
254
+ canInstall: z.ZodBoolean;
255
+ webhookReady: z.ZodBoolean;
256
+ codeStorageReady: z.ZodBoolean;
257
+ ready: z.ZodBoolean;
258
+ }, z.core.$strip>;
253
259
  installUrl: z.ZodNullable<z.ZodString>;
254
260
  installations: z.ZodArray<z.ZodObject<{
255
261
  id: z.ZodString;
@@ -258,18 +264,6 @@ export declare const githubInstallationsResponseSchema: z.ZodObject<{
258
264
  htmlUrl: z.ZodNullable<z.ZodString>;
259
265
  }, z.core.$strip>>;
260
266
  }, z.core.$strip>;
261
- export declare const githubInstallationClaimSchema: z.ZodObject<{
262
- installationId: z.ZodString;
263
- state: z.ZodString;
264
- }, z.core.$strip>;
265
- export declare const githubInstallationClaimResponseSchema: z.ZodObject<{
266
- installation: z.ZodObject<{
267
- id: z.ZodString;
268
- accountLogin: z.ZodString;
269
- accountType: z.ZodNullable<z.ZodString>;
270
- htmlUrl: z.ZodNullable<z.ZodString>;
271
- }, z.core.$strip>;
272
- }, z.core.$strip>;
273
267
  export declare const githubRepositorySchema: z.ZodObject<{
274
268
  id: z.ZodString;
275
269
  name: z.ZodString;
@@ -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 { gitProvider } from "./enums.js";
4
4
  const nullableString = z.string().trim().min(1).nullable();
5
5
  export const buildTargetValues = ["production", "preview"];
@@ -55,7 +55,7 @@ export const gitConnectionCreateSchema = z
55
55
  credential: z.string().trim().min(1).nullable().optional(),
56
56
  autoDeployProduction: z.boolean().default(true),
57
57
  autoDeployPreviews: z.boolean().default(true),
58
- buildSettings: gitBuildSettingsSchema.partial().optional(),
58
+ buildSettings: BuildSettingsOverrideSchema.optional(),
59
59
  })
60
60
  .transform((value) => ({
61
61
  ...value,
@@ -67,7 +67,7 @@ export const gitConnectionPatchSchema = z.object({
67
67
  credential: z.string().trim().min(1).nullable().optional(),
68
68
  autoDeployProduction: z.boolean().optional(),
69
69
  autoDeployPreviews: z.boolean().optional(),
70
- buildSettings: gitBuildSettingsSchema.partial().optional(),
70
+ buildSettings: BuildSettingsOverrideSchema.optional(),
71
71
  });
72
72
  export const gitConnectionAnalyzeSchema = z.object({
73
73
  ref: z.string().trim().min(1).optional(),
@@ -95,17 +95,16 @@ export const githubInstallationSchema = z.object({
95
95
  htmlUrl: z.string().url().nullable(),
96
96
  });
97
97
  export const githubInstallationsResponseSchema = z.object({
98
- appConfigured: z.boolean(),
98
+ readiness: z.object({
99
+ canAuthorize: z.boolean(),
100
+ canInstall: z.boolean(),
101
+ webhookReady: z.boolean(),
102
+ codeStorageReady: z.boolean(),
103
+ ready: z.boolean(),
104
+ }),
99
105
  installUrl: z.string().url().nullable(),
100
106
  installations: z.array(githubInstallationSchema),
101
107
  });
102
- export const githubInstallationClaimSchema = z.object({
103
- installationId: z.string().trim().min(1),
104
- state: z.string().trim().min(1),
105
- });
106
- export const githubInstallationClaimResponseSchema = z.object({
107
- installation: githubInstallationSchema,
108
- });
109
108
  export const githubRepositorySchema = z.object({
110
109
  id: z.string(),
111
110
  name: z.string(),
@@ -0,0 +1,43 @@
1
+ import { OAUTH_SCOPE_COPY, oauthScopeCopy, type OAuthScopeCopy, type OAuthScopeId, type OAuthScopeRiskTint } from "./oauth-resources.js";
2
+ /**
3
+ * The one vocabulary every authorization surface renders.
4
+ *
5
+ * Consent, the elevation diff, device approve, ledger chips, approval and grant
6
+ * emails, and the CLI's approval prose all read from here, so a permission
7
+ * never has one name in the browser and another in the inbox. Raw scope ids and
8
+ * purpose codes belong in developer views only.
9
+ *
10
+ * Scope copy is re-exported from `oauth-resources` rather than duplicated: the
11
+ * scope list and its descriptions are the OAuth wire contract, and a second
12
+ * copy of it is a second thing to drift.
13
+ */
14
+ export { OAUTH_SCOPE_COPY as GRANT_SCOPE_COPY, oauthScopeCopy as grantScopeCopy, type OAuthScopeCopy as GrantScopeCopy, type OAuthScopeId as GrantScopeId, type OAuthScopeRiskTint as GrantRiskTint, };
15
+ export type GrantScopeCopyEntry = OAuthScopeCopy & {
16
+ id: string;
17
+ };
18
+ /** Scope copy for a whole set, in the order given, ready to render as a list. */
19
+ export declare function grantScopeCopyList(scopes: readonly string[]): GrantScopeCopyEntry[];
20
+ /**
21
+ * Why a grant or decision is being asked for, in the user's language.
22
+ *
23
+ * Purpose strings are SERVER-OWNED. Only these codes and templates render as
24
+ * the reason a grant is requested; client identity is displayed separately and
25
+ * escaped. Client-authored purpose text is a consent-spoofing surface and is
26
+ * never accepted (§4.5).
27
+ *
28
+ * Each entry reads as the completion of "… is asking to <copy>".
29
+ */
30
+ export declare const GRANT_PURPOSE_COPY: {
31
+ readonly "publish.confirm": "publish a new version";
32
+ readonly "deploy.confirm": "deploy a site";
33
+ readonly "version.rollback.confirm": "roll a site back to an earlier version";
34
+ readonly "domain.purchase.confirm": "purchase a domain";
35
+ readonly "domain.dns.confirm": "change domain DNS";
36
+ readonly "device.authorize": "connect the Spacefast CLI";
37
+ readonly "agent_handoff.redeem": "continue a Spacefast handoff";
38
+ readonly "claim.continue": "continue a claimed site";
39
+ readonly "oauth.connect": "connect to Spacefast";
40
+ };
41
+ export type GrantPurposeCode = keyof typeof GRANT_PURPOSE_COPY;
42
+ /** Never throws: an unknown code renders the neutral fallback, never the code. */
43
+ export declare function grantPurposeCopy(purposeCode: string): string;
@@ -0,0 +1,44 @@
1
+ import { OAUTH_SCOPE_COPY, oauthScopeCopy, } from "./oauth-resources.js";
2
+ /**
3
+ * The one vocabulary every authorization surface renders.
4
+ *
5
+ * Consent, the elevation diff, device approve, ledger chips, approval and grant
6
+ * emails, and the CLI's approval prose all read from here, so a permission
7
+ * never has one name in the browser and another in the inbox. Raw scope ids and
8
+ * purpose codes belong in developer views only.
9
+ *
10
+ * Scope copy is re-exported from `oauth-resources` rather than duplicated: the
11
+ * scope list and its descriptions are the OAuth wire contract, and a second
12
+ * copy of it is a second thing to drift.
13
+ */
14
+ export { OAUTH_SCOPE_COPY as GRANT_SCOPE_COPY, oauthScopeCopy as grantScopeCopy, };
15
+ /** Scope copy for a whole set, in the order given, ready to render as a list. */
16
+ export function grantScopeCopyList(scopes) {
17
+ return [...new Set(scopes)].map((id) => ({ id, ...oauthScopeCopy(id) }));
18
+ }
19
+ /**
20
+ * Why a grant or decision is being asked for, in the user's language.
21
+ *
22
+ * Purpose strings are SERVER-OWNED. Only these codes and templates render as
23
+ * the reason a grant is requested; client identity is displayed separately and
24
+ * escaped. Client-authored purpose text is a consent-spoofing surface and is
25
+ * never accepted (§4.5).
26
+ *
27
+ * Each entry reads as the completion of "… is asking to <copy>".
28
+ */
29
+ export const GRANT_PURPOSE_COPY = {
30
+ "publish.confirm": "publish a new version",
31
+ "deploy.confirm": "deploy a site",
32
+ "version.rollback.confirm": "roll a site back to an earlier version",
33
+ "domain.purchase.confirm": "purchase a domain",
34
+ "domain.dns.confirm": "change domain DNS",
35
+ "device.authorize": "connect the Spacefast CLI",
36
+ "agent_handoff.redeem": "continue a Spacefast handoff",
37
+ "claim.continue": "continue a claimed site",
38
+ "oauth.connect": "connect to Spacefast",
39
+ };
40
+ /** Never throws: an unknown code renders the neutral fallback, never the code. */
41
+ export function grantPurposeCopy(purposeCode) {
42
+ const match = Object.entries(GRANT_PURPOSE_COPY).find(([code]) => code === purposeCode);
43
+ return match?.[1] ?? "act in Spacefast";
44
+ }
@@ -263,8 +263,47 @@ export declare const managedGrantWriteSchema: z.ZodObject<{
263
263
  }, z.core.$strict>], "kind">;
264
264
  }, z.core.$strict>;
265
265
  export type ManagedGrantWrite = z.infer<typeof managedGrantWriteSchema>;
266
+ declare const externalGrantWriteAudienceSchema: z.ZodObject<{
267
+ kind: z.ZodLiteral<"external">;
268
+ connectionId: z.ZodTemplateLiteral<`acn_${string}`>;
269
+ subject: z.ZodString;
270
+ }, z.core.$strict>;
266
271
  export declare const directManagedGrantWriteSchema: z.ZodObject<{
267
272
  name: z.ZodOptional<z.ZodString>;
273
+ resources: z.ZodObject<{
274
+ include: z.ZodArray<z.ZodString>;
275
+ exclude: z.ZodDefault<z.ZodArray<z.ZodString>>;
276
+ }, z.core.$strict>;
277
+ capabilities: z.ZodArray<z.ZodEnum<{
278
+ "page.view": "page.view";
279
+ "comments.read": "comments.read";
280
+ "comments.write": "comments.write";
281
+ "content.publish": "content.publish";
282
+ "access.manage": "access.manage";
283
+ }>>;
284
+ constraints: z.ZodDefault<z.ZodObject<{
285
+ notBefore: z.ZodOptional<z.ZodString>;
286
+ expiresAt: z.ZodOptional<z.ZodString>;
287
+ maxUses: z.ZodOptional<z.ZodNumber>;
288
+ requireVerifiedEmail: z.ZodOptional<z.ZodBoolean>;
289
+ network: z.ZodOptional<z.ZodObject<{
290
+ ipCidrs: z.ZodOptional<z.ZodArray<z.ZodString>>;
291
+ countries: z.ZodOptional<z.ZodArray<z.ZodString>>;
292
+ excludedCountries: z.ZodOptional<z.ZodArray<z.ZodString>>;
293
+ excludedUserAgentSubstrings: z.ZodOptional<z.ZodArray<z.ZodString>>;
294
+ }, z.core.$strict>>;
295
+ }, z.core.$strict>>;
296
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
297
+ kind: z.ZodLiteral<"live">;
298
+ }, z.core.$strict>, z.ZodObject<{
299
+ kind: z.ZodLiteral<"version">;
300
+ versionId: z.ZodString;
301
+ }, z.core.$strict>, z.ZodObject<{
302
+ kind: z.ZodLiteral<"branch">;
303
+ branch: z.ZodString;
304
+ }, z.core.$strict>, z.ZodObject<{
305
+ kind: z.ZodLiteral<"all_versions">;
306
+ }, z.core.$strict>], "kind">;
268
307
  audience: z.ZodDiscriminatedUnion<[z.ZodObject<{
269
308
  kind: z.ZodLiteral<"public">;
270
309
  }, z.core.$strict>, z.ZodObject<{
@@ -273,20 +312,11 @@ export declare const directManagedGrantWriteSchema: z.ZodObject<{
273
312
  }, z.core.$strict>, z.ZodObject<{
274
313
  kind: z.ZodLiteral<"person">;
275
314
  personId: z.ZodString;
276
- }, z.core.$strict>, z.ZodObject<{
277
- kind: z.ZodLiteral<"link">;
278
- linkId: z.ZodString;
279
- }, z.core.$strict>, z.ZodObject<{
280
- kind: z.ZodLiteral<"password">;
281
- credentialId: z.ZodString;
282
- }, z.core.$strict>, z.ZodObject<{
283
- kind: z.ZodLiteral<"machine">;
284
- machineId: z.ZodString;
285
- }, z.core.$strict>, z.ZodObject<{
286
- kind: z.ZodLiteral<"external">;
287
- issuer: z.ZodString;
288
- subject: z.ZodString;
289
315
  }, z.core.$strict>], "kind">;
316
+ }, z.core.$strict>;
317
+ export type DirectManagedGrantWrite = z.infer<typeof directManagedGrantWriteSchema>;
318
+ export declare const spaceGrantCreateSchema: z.ZodObject<{
319
+ name: z.ZodOptional<z.ZodString>;
290
320
  resources: z.ZodObject<{
291
321
  include: z.ZodArray<z.ZodString>;
292
322
  exclude: z.ZodDefault<z.ZodArray<z.ZodString>>;
@@ -321,8 +351,25 @@ export declare const directManagedGrantWriteSchema: z.ZodObject<{
321
351
  }, z.core.$strict>, z.ZodObject<{
322
352
  kind: z.ZodLiteral<"all_versions">;
323
353
  }, z.core.$strict>], "kind">;
354
+ audience: z.ZodDiscriminatedUnion<[z.ZodObject<{
355
+ kind: z.ZodLiteral<"public">;
356
+ }, z.core.$strict>, z.ZodObject<{
357
+ kind: z.ZodLiteral<"team">;
358
+ teamId: z.ZodString;
359
+ }, z.core.$strict>, z.ZodObject<{
360
+ kind: z.ZodLiteral<"person">;
361
+ personId: z.ZodString;
362
+ }, z.core.$strict>, z.ZodObject<{
363
+ kind: z.ZodLiteral<"external">;
364
+ connectionId: z.ZodTemplateLiteral<`acn_${string}`>;
365
+ subject: z.ZodString;
366
+ }, z.core.$strict>], "kind">;
324
367
  }, z.core.$strict>;
325
- export type DirectManagedGrantWrite = z.infer<typeof directManagedGrantWriteSchema>;
368
+ export type SpaceGrantCreate = z.infer<typeof spaceGrantCreateSchema>;
369
+ /** The external branch of the create body, once its subject has been read. */
370
+ export type ExternalManagedGrantWrite = Omit<SpaceGrantCreate, "audience"> & {
371
+ audience: z.infer<typeof externalGrantWriteAudienceSchema>;
372
+ };
326
373
  export declare const grantSourceExplanationSchema: z.ZodObject<{
327
374
  editable: z.ZodBoolean;
328
375
  label: z.ZodString;
@@ -1137,43 +1184,4 @@ export declare const identityConnectionSchema: z.ZodObject<{
1137
1184
  revokedAt: z.ZodNullable<z.ZodString>;
1138
1185
  }, z.core.$strict>;
1139
1186
  export type IdentityConnection = z.infer<typeof identityConnectionSchema>;
1140
- export declare const externalGrantCreateSchema: z.ZodObject<{
1141
- name: z.ZodString;
1142
- resources: z.ZodObject<{
1143
- include: z.ZodArray<z.ZodString>;
1144
- exclude: z.ZodDefault<z.ZodArray<z.ZodString>>;
1145
- }, z.core.$strict>;
1146
- capabilities: z.ZodArray<z.ZodEnum<{
1147
- "page.view": "page.view";
1148
- "comments.read": "comments.read";
1149
- "comments.write": "comments.write";
1150
- "content.publish": "content.publish";
1151
- "access.manage": "access.manage";
1152
- }>>;
1153
- constraints: z.ZodDefault<z.ZodObject<{
1154
- notBefore: z.ZodOptional<z.ZodString>;
1155
- expiresAt: z.ZodOptional<z.ZodString>;
1156
- maxUses: z.ZodOptional<z.ZodNumber>;
1157
- requireVerifiedEmail: z.ZodOptional<z.ZodBoolean>;
1158
- network: z.ZodOptional<z.ZodObject<{
1159
- ipCidrs: z.ZodOptional<z.ZodArray<z.ZodString>>;
1160
- countries: z.ZodOptional<z.ZodArray<z.ZodString>>;
1161
- excludedCountries: z.ZodOptional<z.ZodArray<z.ZodString>>;
1162
- excludedUserAgentSubstrings: z.ZodOptional<z.ZodArray<z.ZodString>>;
1163
- }, z.core.$strict>>;
1164
- }, z.core.$strict>>;
1165
- target: z.ZodDiscriminatedUnion<[z.ZodObject<{
1166
- kind: z.ZodLiteral<"live">;
1167
- }, z.core.$strict>, z.ZodObject<{
1168
- kind: z.ZodLiteral<"version">;
1169
- versionId: z.ZodString;
1170
- }, z.core.$strict>, z.ZodObject<{
1171
- kind: z.ZodLiteral<"branch">;
1172
- branch: z.ZodString;
1173
- }, z.core.$strict>, z.ZodObject<{
1174
- kind: z.ZodLiteral<"all_versions">;
1175
- }, z.core.$strict>], "kind">;
1176
- connectionId: z.ZodTemplateLiteral<`acn_${string}`>;
1177
- subject: z.ZodString;
1178
- }, z.core.$strict>;
1179
- export type ExternalGrantCreate = z.infer<typeof externalGrantCreateSchema>;
1187
+ export {};
@@ -482,12 +482,55 @@ export const managedGrantWriteSchema = grantDimensionsSchema.superRefine((value,
482
482
  });
483
483
  }
484
484
  });
485
- export const directManagedGrantWriteSchema = managedGrantWriteSchema.superRefine((value, context) => {
486
- if (!["public", "team", "person"].includes(value.audience.kind)) {
485
+ // The subjects a manager can name directly. Link, password, and machine
486
+ // subjects are minted by their credential workflow, so they are absent from the
487
+ // write audiences rather than refused by a refinement after the fact.
488
+ const publicGrantAudienceSchema = z.object({ kind: z.literal("public") }).strict();
489
+ const teamGrantAudienceSchema = z
490
+ .object({ kind: z.literal("team"), teamId: grantReferenceSchema })
491
+ .strict();
492
+ const personGrantAudienceSchema = z
493
+ .object({ kind: z.literal("person"), personId: grantReferenceSchema })
494
+ .strict();
495
+ // The external-identity subject names the Team connection that authenticates
496
+ // it; the issuer is resolved from that connection server-side, so a caller
497
+ // never asserts one.
498
+ const externalGrantWriteAudienceSchema = z
499
+ .object({
500
+ kind: z.literal("external"),
501
+ connectionId: registeredIdSchema("acn"),
502
+ subject: z.string().trim().min(1).max(255),
503
+ })
504
+ .strict();
505
+ const directManagedGrantAudienceSchema = z.discriminatedUnion("kind", [
506
+ publicGrantAudienceSchema,
507
+ teamGrantAudienceSchema,
508
+ personGrantAudienceSchema,
509
+ ]);
510
+ export const directManagedGrantWriteSchema = grantDimensionsSchema
511
+ .extend({ audience: directManagedGrantAudienceSchema })
512
+ .superRefine(validateGrantAudienceCapabilityBoundary);
513
+ // One create body for `POST /v1/spaces/{spaceId}/grants`: one object whose
514
+ // `audience` is the discriminated union of every subject a manager can name.
515
+ // Deliberately NOT a union of two whole bodies — a top-level union collapses
516
+ // every structural failure into one issue with an empty path, and the problem
517
+ // document loses its RFC 6901 `pointer`.
518
+ const managedGrantWriteAudienceSchema = z.discriminatedUnion("kind", [
519
+ publicGrantAudienceSchema,
520
+ teamGrantAudienceSchema,
521
+ personGrantAudienceSchema,
522
+ externalGrantWriteAudienceSchema,
523
+ ]);
524
+ export const spaceGrantCreateSchema = grantDimensionsSchema
525
+ .extend({ audience: managedGrantWriteAudienceSchema })
526
+ .superRefine((value, context) => {
527
+ validateGrantAudienceCapabilityBoundary(value, context);
528
+ // An opaque external subject is unreadable in the Grant list without one.
529
+ if (value.audience.kind === "external" && value.name === undefined) {
487
530
  context.addIssue({
488
531
  code: "custom",
489
- path: ["audience", "kind"],
490
- message: "direct managed Grants support only public, team, and person audiences; credential-backed audiences use their dedicated workflow",
532
+ path: ["name"],
533
+ message: "an external identity Grant needs a name; its subject is opaque",
491
534
  });
492
535
  }
493
536
  });
@@ -510,20 +553,85 @@ export const spaceGrantSchema = z
510
553
  updatedAt: z.string().datetime(),
511
554
  })
512
555
  .strict();
556
+ // The whole query describes one hypothetical visit: who is knocking, at which
557
+ // URL, on which deployment. Each field is documented because this operation is
558
+ // the explainer an agent reaches for when access is refused and it needs to
559
+ // know why.
513
560
  export const grantCheckQuerySchema = z
514
561
  .object({
515
- path: z.string().min(1).max(2048).default("/"),
516
- target: z.enum(["live", "version", "branch"]).default("live"),
517
- targetId: z.string().trim().min(1).max(255).optional(),
518
- audience: grantAudienceKindSchema.default("public"),
519
- personId: z.string().trim().min(1).max(255).optional(),
520
- linkId: z.string().trim().min(1).max(255).optional(),
521
- passwordCredentialId: z.string().trim().min(1).max(255).optional(),
522
- machineId: z.string().trim().min(1).max(255).optional(),
523
- issuer: z.string().trim().min(1).max(255).optional(),
524
- subject: z.string().trim().min(1).max(255).optional(),
525
- verifiedEmail: z.enum(["true", "false"]).optional(),
526
- ipAddress: z.string().trim().min(1).max(64).optional(),
562
+ path: z
563
+ .string()
564
+ .min(1)
565
+ .max(2048)
566
+ .default("/")
567
+ .describe("Request path to simulate, for example `/admin`."),
568
+ target: z
569
+ .enum(["live", "version", "branch"])
570
+ .default("live")
571
+ .describe("Which deployment the visit lands on: the live channel, one version, or a branch."),
572
+ targetId: z
573
+ .string()
574
+ .trim()
575
+ .min(1)
576
+ .max(255)
577
+ .optional()
578
+ .describe("The version id or branch name named by `target`. Required for `version` and `branch`, and rejected for `live`."),
579
+ audience: grantAudienceKindSchema
580
+ .default("public")
581
+ .describe("Who is knocking. Each audience needs its own identifying parameter below, and rejects the others."),
582
+ personId: z
583
+ .string()
584
+ .trim()
585
+ .min(1)
586
+ .max(255)
587
+ .optional()
588
+ .describe("The person to simulate. Required with `audience=person`."),
589
+ linkId: z
590
+ .string()
591
+ .trim()
592
+ .min(1)
593
+ .max(255)
594
+ .optional()
595
+ .describe("The share link to simulate. Required with `audience=link`."),
596
+ passwordCredentialId: z
597
+ .string()
598
+ .trim()
599
+ .min(1)
600
+ .max(255)
601
+ .optional()
602
+ .describe("The password credential to simulate. Required with `audience=password`."),
603
+ machineId: z
604
+ .string()
605
+ .trim()
606
+ .min(1)
607
+ .max(255)
608
+ .optional()
609
+ .describe("The machine credential to simulate. Required with `audience=machine`."),
610
+ issuer: z
611
+ .string()
612
+ .trim()
613
+ .min(1)
614
+ .max(255)
615
+ .optional()
616
+ .describe("Identity connection issuer for the external identity to simulate. Required with `audience=external`."),
617
+ subject: z
618
+ .string()
619
+ .trim()
620
+ .min(1)
621
+ .max(255)
622
+ .optional()
623
+ .describe("Subject claim of the external identity to simulate. Required with `audience=external`."),
624
+ verifiedEmail: z
625
+ .enum(["true", "false"])
626
+ .optional()
627
+ .describe("Whether the simulated visitor's email counts as verified."),
628
+ ipAddress: z
629
+ .string()
630
+ .trim()
631
+ .min(1)
632
+ .max(64)
633
+ .optional()
634
+ .describe("Client IP to evaluate network constraints against."),
527
635
  })
528
636
  .strict()
529
637
  .superRefine((value, context) => {
@@ -783,10 +891,3 @@ export const identityConnectionSchema = z
783
891
  revokedAt: z.string().datetime().nullable(),
784
892
  })
785
893
  .strict();
786
- export const externalGrantCreateSchema = z
787
- .object({
788
- connectionId: registeredIdSchema("acn"),
789
- subject: z.string().min(1).max(255),
790
- ...credentialGrantFields,
791
- })
792
- .strict();
@@ -22,7 +22,7 @@ export declare const ID_PREFIXES: {
22
22
  readonly ntf: "Notification";
23
23
  readonly pvc: "ProviderClient";
24
24
  readonly tgs: "TagSet";
25
- readonly tgv: "TagVersion";
25
+ readonly tgv: "TagRevision";
26
26
  readonly tgr: "TagRelease";
27
27
  readonly tga: "TagRuntimeArtifact";
28
28
  readonly tgp: "TagPreviewSession";
@@ -34,6 +34,9 @@ export declare const ID_PREFIXES: {
34
34
  readonly acn: "IdentityConnection";
35
35
  readonly pwd: "SpacePasswordCredential";
36
36
  readonly mch: "SpaceMachineCredential";
37
+ readonly pti: "PartnerTokenIssuer";
38
+ readonly usg: "UsageRecord";
39
+ readonly upr: "UsagePeriod";
37
40
  };
38
41
  export type IdPrefix = keyof typeof ID_PREFIXES;
39
42
  /** Any registered public resource id, e.g. `spc_…` or `ver_…`. */
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- // Id prefix registry (internal-docs/platform.md "Id prefix registry", L1106-1127).
2
+ // Id prefix registry (the platform spec "Id prefix registry").
3
3
  // Every PUBLIC resource registers a prefix here before it ships; ids are globally
4
4
  // unique and handle ids (operations, exports, imports, transfers, builds) are
5
5
  // fetchable at a top-level collection with no extra context. Control-plane-internal
@@ -29,7 +29,7 @@ export const ID_PREFIXES = {
29
29
  ntf: "Notification",
30
30
  pvc: "ProviderClient",
31
31
  tgs: "TagSet",
32
- tgv: "TagVersion",
32
+ tgv: "TagRevision",
33
33
  tgr: "TagRelease",
34
34
  tga: "TagRuntimeArtifact",
35
35
  tgp: "TagPreviewSession",
@@ -42,6 +42,9 @@ export const ID_PREFIXES = {
42
42
  acn: "IdentityConnection",
43
43
  pwd: "SpacePasswordCredential",
44
44
  mch: "SpaceMachineCredential",
45
+ pti: "PartnerTokenIssuer",
46
+ usg: "UsageRecord",
47
+ upr: "UsagePeriod",
45
48
  };
46
49
  /** Validate an id belonging to one registered public resource family. */
47
50
  export function registeredIdSchema(prefix) {
@@ -49,7 +52,7 @@ export function registeredIdSchema(prefix) {
49
52
  }
50
53
  // The main Stattic tenant every self-serve team/user/resource lives under. A
51
54
  // well-known CONSTANT, never configuration: grammatically a normal tenant id with
52
- // zero special cases in contracts, policy URIs, or parsers (spec L1100-1105).
55
+ // zero special cases in contracts, policy URIs, or parsers (per the platform spec).
53
56
  export const MAIN_TENANT_ID = "ten_main";
54
57
  /** Mint a globally unique id for a registered public resource prefix. */
55
58
  export function createId(prefix) {
@@ -1,9 +1,4 @@
1
1
  import { z } from "zod";
2
- export declare const conventionFilesSchema: z.ZodObject<{
3
- redirects: z.ZodOptional<z.ZodString>;
4
- headers: z.ZodOptional<z.ZodString>;
5
- routes: z.ZodOptional<z.ZodString>;
6
- }, z.core.$strip>;
7
2
  export declare const manifestFileSchema: z.ZodObject<{
8
3
  path: z.ZodString;
9
4
  size: z.ZodNumber;
@@ -11,24 +6,18 @@ export declare const manifestFileSchema: z.ZodObject<{
11
6
  contentType: z.ZodOptional<z.ZodString>;
12
7
  sourceUrl: z.ZodOptional<z.ZodString>;
13
8
  }, z.core.$strip>;
14
- export declare const uploadManifestFileSchema: z.ZodUnion<readonly [z.ZodObject<{
15
- path: z.ZodString;
16
- size: z.ZodNumber;
17
- contentType: z.ZodOptional<z.ZodString>;
18
- sourceUrl: z.ZodOptional<z.ZodString>;
19
- sha256: z.ZodString;
20
- }, z.core.$strip>, z.ZodObject<{
9
+ export declare const uploadManifestFileSchema: z.ZodObject<{
21
10
  path: z.ZodString;
22
11
  size: z.ZodNumber;
23
12
  sha256: z.ZodOptional<z.ZodString>;
24
13
  contentType: z.ZodOptional<z.ZodString>;
25
- sourceUrl: z.ZodString;
26
- }, z.core.$strip>]>;
14
+ sourceUrl: z.ZodOptional<z.ZodString>;
15
+ }, z.core.$strip>;
27
16
  export declare const pendingUploadSchema: z.ZodObject<{
28
17
  path: z.ZodString;
29
- size: z.ZodNumber;
30
- sha256: z.ZodOptional<z.ZodString>;
31
18
  sourceUrl: z.ZodOptional<z.ZodString>;
19
+ sha256: z.ZodOptional<z.ZodString>;
20
+ size: z.ZodNumber;
32
21
  }, z.core.$strip>;
33
22
  export declare const uploadSessionModeSchema: z.ZodEnum<{
34
23
  source: "source";
@@ -81,7 +70,8 @@ export declare const uploadInstructionsSchema: z.ZodObject<{
81
70
  contentType: z.ZodOptional<z.ZodString>;
82
71
  }, z.core.$strip>>>;
83
72
  links: z.ZodObject<{
84
- resume: z.ZodString;
73
+ refresh: z.ZodString;
74
+ resume: z.ZodOptional<z.ZodString>;
85
75
  finalize: z.ZodString;
86
76
  }, z.core.$strip>;
87
77
  details: z.ZodOptional<z.ZodObject<{
@@ -104,7 +94,7 @@ export declare const uploadInstructionsSchema: z.ZodObject<{
104
94
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
105
95
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
106
96
  registrar: "registrar";
107
- wpcloud: "wpcloud";
97
+ infra: "infra";
108
98
  dns: "dns";
109
99
  runtime: "runtime";
110
100
  }>>>;