@spacefast/common 0.0.11 → 0.0.13

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 (160) hide show
  1. package/dist/agents/connect-targets.d.ts +4 -4
  2. package/dist/agents/connect-targets.js +3 -3
  3. package/dist/agents/private-key-oauth.d.ts +37 -0
  4. package/dist/agents/private-key-oauth.js +158 -0
  5. package/dist/config/domains.js +1 -1
  6. package/dist/config/index.d.ts +1 -0
  7. package/dist/config/index.js +1 -0
  8. package/dist/config/postgres-budget.d.ts +126 -0
  9. package/dist/config/postgres-budget.js +135 -0
  10. package/dist/config/postgres-budget.json +50 -0
  11. package/dist/contracts/access.d.ts +386 -1183
  12. package/dist/contracts/access.js +240 -1018
  13. package/dist/contracts/activity.d.ts +1 -1
  14. package/dist/contracts/activity.js +11 -19
  15. package/dist/contracts/api-keys.d.ts +69 -45
  16. package/dist/contracts/api-keys.js +3 -0
  17. package/dist/contracts/archives.d.ts +9 -10
  18. package/dist/contracts/archives.js +4 -6
  19. package/dist/contracts/builds.d.ts +8 -8
  20. package/dist/contracts/builds.js +28 -48
  21. package/dist/contracts/channels.js +1 -2
  22. package/dist/contracts/comments.d.ts +102 -93
  23. package/dist/contracts/comments.js +121 -63
  24. package/dist/contracts/common.d.ts +4 -3
  25. package/dist/contracts/common.js +2 -0
  26. package/dist/contracts/countries.js +2 -7
  27. package/dist/contracts/data-source-routes.d.ts +20 -0
  28. package/dist/contracts/data-source-routes.js +15 -0
  29. package/dist/contracts/deployments.d.ts +3 -3
  30. package/dist/contracts/device-auth.d.ts +21 -15
  31. package/dist/contracts/docs.d.ts +5 -5
  32. package/dist/contracts/domains.d.ts +261 -1330
  33. package/dist/contracts/domains.js +39 -301
  34. package/dist/contracts/email-preferences.d.ts +50 -0
  35. package/dist/contracts/email-preferences.js +44 -0
  36. package/dist/contracts/enums.d.ts +3 -5
  37. package/dist/contracts/enums.js +3 -8
  38. package/dist/contracts/error-code-meta.d.ts +99 -33
  39. package/dist/contracts/error-code-meta.js +36 -9
  40. package/dist/contracts/error-codes.d.ts +1 -1
  41. package/dist/contracts/error-codes.js +28 -11
  42. package/dist/contracts/execution.d.ts +212 -0
  43. package/dist/contracts/execution.js +288 -0
  44. package/dist/contracts/feature-lifecycle.d.ts +498 -2
  45. package/dist/contracts/feature-lifecycle.js +539 -2
  46. package/dist/contracts/features.d.ts +184 -74
  47. package/dist/contracts/features.js +4 -303
  48. package/dist/contracts/functions.d.ts +729 -0
  49. package/dist/contracts/functions.js +485 -0
  50. package/dist/contracts/git.d.ts +1 -1
  51. package/dist/contracts/grants.d.ts +1158 -0
  52. package/dist/contracts/grants.js +696 -0
  53. package/dist/contracts/ids.d.ts +6 -5
  54. package/dist/contracts/ids.js +6 -5
  55. package/dist/contracts/internal.d.ts +3 -3
  56. package/dist/contracts/mcp.d.ts +12 -12
  57. package/dist/contracts/me.js +1 -1
  58. package/dist/contracts/mounts.d.ts +142 -0
  59. package/dist/contracts/mounts.js +56 -0
  60. package/dist/contracts/oauth-resources.d.ts +5 -5
  61. package/dist/contracts/oauth-resources.js +2 -0
  62. package/dist/contracts/operations.d.ts +4 -4
  63. package/dist/contracts/pages.d.ts +6 -14
  64. package/dist/contracts/pages.js +11 -23
  65. package/dist/contracts/plan-policy.d.ts +2 -9
  66. package/dist/contracts/plan-policy.js +1 -4
  67. package/dist/contracts/platform.d.ts +80 -32
  68. package/dist/contracts/platform.js +59 -12
  69. package/dist/contracts/push-new.d.ts +26 -2
  70. package/dist/contracts/push-new.js +8 -0
  71. package/dist/contracts/quotas.d.ts +0 -1
  72. package/dist/contracts/quotas.js +0 -5
  73. package/dist/contracts/repository-connections.d.ts +1 -1
  74. package/dist/contracts/resources.d.ts +21 -85
  75. package/dist/contracts/resources.js +17 -47
  76. package/dist/contracts/runtime-api.d.ts +799 -192
  77. package/dist/contracts/runtime-api.js +231 -100
  78. package/dist/contracts/runtime-app.d.ts +138 -0
  79. package/dist/contracts/runtime-app.js +21 -0
  80. package/dist/contracts/sf-config-v1.d.ts +5 -0
  81. package/dist/contracts/sf-config-v1.js +1 -1
  82. package/dist/contracts/sites.d.ts +17 -12
  83. package/dist/contracts/sites.js +30 -12
  84. package/dist/contracts/space-config.d.ts +46 -117
  85. package/dist/contracts/space-config.js +323 -25
  86. package/dist/contracts/spaces.d.ts +392 -256
  87. package/dist/contracts/spaces.js +163 -83
  88. package/dist/contracts/superadmin-emails.d.ts +27 -3
  89. package/dist/contracts/superadmin-emails.js +10 -15
  90. package/dist/contracts/superadmin-runtime.d.ts +2 -2
  91. package/dist/contracts/superadmin-spaces.d.ts +19 -142
  92. package/dist/contracts/superadmin-spaces.js +7 -0
  93. package/dist/contracts/tags.d.ts +66 -36
  94. package/dist/contracts/tags.js +195 -11
  95. package/dist/contracts/teams.d.ts +9 -9
  96. package/dist/contracts/transfers.d.ts +1 -2
  97. package/dist/contracts/variables.d.ts +4 -4
  98. package/dist/contracts/variables.js +4 -3
  99. package/dist/contracts/webhooks.d.ts +2 -2
  100. package/dist/contracts/zero.d.ts +437 -193
  101. package/dist/contracts/zero.js +149 -158
  102. package/dist/dashboard-paths/index.d.ts +3 -3
  103. package/dist/dashboard-paths/index.js +1 -0
  104. package/dist/docs/agent-prose.js +10 -8
  105. package/dist/docs/agent-setup.d.ts +6 -4
  106. package/dist/docs/agent-setup.js +26 -16
  107. package/dist/docs/agent-solutions.js +1 -1
  108. package/dist/docs/catalog.d.ts +35 -37
  109. package/dist/docs/catalog.js +36 -38
  110. package/dist/docs/error-docs.js +108 -44
  111. package/dist/utils/asset-fingerprint.d.ts +11 -0
  112. package/dist/utils/asset-fingerprint.js +46 -0
  113. package/dist/utils/auth-redirect.d.ts +1 -3
  114. package/dist/utils/auth-redirect.js +1 -21
  115. package/dist/utils/build-settings.d.ts +2 -0
  116. package/dist/utils/build-settings.js +61 -9
  117. package/dist/utils/credential-policy.d.ts +1 -1
  118. package/dist/utils/credential-policy.js +4 -0
  119. package/dist/utils/dns-instructions.d.ts +29 -0
  120. package/dist/utils/dns-instructions.js +78 -0
  121. package/dist/utils/domain-diagnostics.d.ts +29 -0
  122. package/dist/utils/domain-diagnostics.js +63 -0
  123. package/dist/utils/egress-policy.fixtures.json +51 -0
  124. package/dist/utils/grants.d.ts +53 -0
  125. package/dist/utils/grants.js +160 -0
  126. package/dist/utils/id-hints.d.ts +1 -0
  127. package/dist/utils/id-hints.js +55 -13
  128. package/dist/utils/local-space-state.js +1 -0
  129. package/dist/utils/page-colors.d.ts +50 -0
  130. package/dist/utils/page-colors.js +167 -0
  131. package/dist/utils/page-fonts.d.ts +2 -0
  132. package/dist/utils/page-fonts.js +4 -0
  133. package/dist/utils/pages.d.ts +19 -6
  134. package/dist/utils/pages.js +122 -49
  135. package/dist/utils/production-runtime.d.ts +18 -0
  136. package/dist/utils/production-runtime.js +28 -0
  137. package/dist/utils/publish-policy.d.ts +34 -4
  138. package/dist/utils/publish-policy.js +132 -61
  139. package/dist/utils/query-keys.d.ts +7 -13
  140. package/dist/utils/query-keys.js +12 -18
  141. package/dist/utils/source-archive-policy.d.ts +2 -0
  142. package/dist/utils/source-archive-policy.js +2 -0
  143. package/dist/utils/space-config.d.ts +5 -1
  144. package/dist/utils/space-config.js +35 -0
  145. package/dist/utils/static-runtime-policy.d.ts +5 -0
  146. package/dist/utils/static-runtime-policy.fixtures.json +57 -0
  147. package/dist/utils/static-runtime-policy.js +54 -10
  148. package/dist/utils/upload-session.d.ts +3 -0
  149. package/dist/utils/upload-session.js +31 -0
  150. package/package.json +6 -4
  151. package/dist/contracts/annotations.d.ts +0 -327
  152. package/dist/contracts/annotations.js +0 -235
  153. package/dist/contracts/generated-feature-launch-entries.d.ts +0 -2
  154. package/dist/contracts/generated-feature-launch-entries.js +0 -518
  155. package/dist/contracts/publishes.d.ts +0 -135
  156. package/dist/contracts/publishes.js +0 -162
  157. package/dist/utils/access-match.d.ts +0 -39
  158. package/dist/utils/access-match.js +0 -296
  159. package/dist/utils/sf-config-v1.d.ts +0 -2
  160. package/dist/utils/sf-config-v1.js +0 -542
@@ -7,8 +7,6 @@ export declare const ID_PREFIXES: {
7
7
  readonly cmt: "CommentThread";
8
8
  readonly bld: "Build";
9
9
  readonly dom: "Domain";
10
- readonly dbn: "DomainBinding";
11
- readonly sda: "SiteDomainAssignment";
12
10
  readonly key: "ApiKey";
13
11
  readonly upl: "UploadSession";
14
12
  readonly psh: "PushNewSession";
@@ -29,10 +27,13 @@ export declare const ID_PREFIXES: {
29
27
  readonly tgp: "TagPreviewSession";
30
28
  readonly bhk: "BuildHook";
31
29
  readonly lnk: "ShareLink";
32
- readonly sin: "SpaceInvite";
30
+ readonly per: "SpacePerson";
33
31
  readonly arq: "AccessRequest";
34
- readonly stk: "ServiceToken";
35
- readonly acn: "AccessConnection";
32
+ readonly grt: "SpaceGrant";
33
+ readonly acn: "IdentityConnection";
34
+ readonly pwd: "SpacePasswordCredential";
35
+ readonly mch: "SpaceMachineCredential";
36
+ readonly mnt: "StaticMount";
36
37
  };
37
38
  export type IdPrefix = keyof typeof ID_PREFIXES;
38
39
  /** Any registered public resource id, e.g. `spc_…` or `ver_…`. */
@@ -14,8 +14,6 @@ export const ID_PREFIXES = {
14
14
  cmt: "CommentThread",
15
15
  bld: "Build",
16
16
  dom: "Domain",
17
- dbn: "DomainBinding",
18
- sda: "SiteDomainAssignment",
19
17
  key: "ApiKey",
20
18
  upl: "UploadSession",
21
19
  psh: "PushNewSession",
@@ -37,10 +35,13 @@ export const ID_PREFIXES = {
37
35
  // Reserved for the deferred build-hook surface; never minted yet.
38
36
  bhk: "BuildHook",
39
37
  lnk: "ShareLink",
40
- sin: "SpaceInvite",
38
+ per: "SpacePerson",
41
39
  arq: "AccessRequest",
42
- stk: "ServiceToken",
43
- acn: "AccessConnection",
40
+ grt: "SpaceGrant",
41
+ acn: "IdentityConnection",
42
+ pwd: "SpacePasswordCredential",
43
+ mch: "SpaceMachineCredential",
44
+ mnt: "StaticMount",
44
45
  };
45
46
  /** Validate an id belonging to one registered public resource family. */
46
47
  export function registeredIdSchema(prefix) {
@@ -24,8 +24,8 @@ export declare const uploadSessionModeSchema: z.ZodEnum<{
24
24
  export declare const uploadTargetSchema: z.ZodObject<{
25
25
  path: z.ZodString;
26
26
  method: z.ZodEnum<{
27
- PUT: "PUT";
28
27
  POST: "POST";
28
+ PUT: "PUT";
29
29
  }>;
30
30
  url: z.ZodUnion<[z.ZodString, z.ZodString]>;
31
31
  headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -53,8 +53,8 @@ export declare const uploadInstructionsSchema: z.ZodObject<{
53
53
  targets: z.ZodDefault<z.ZodArray<z.ZodObject<{
54
54
  path: z.ZodString;
55
55
  method: z.ZodEnum<{
56
- PUT: "PUT";
57
56
  POST: "POST";
57
+ PUT: "PUT";
58
58
  }>;
59
59
  url: z.ZodUnion<[z.ZodString, z.ZodString]>;
60
60
  headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -84,8 +84,8 @@ export declare const uploadInstructionsSchema: z.ZodObject<{
84
84
  code: z.ZodString;
85
85
  severity: z.ZodEnum<{
86
86
  info: "info";
87
- warning: "warning";
88
87
  error: "error";
88
+ warning: "warning";
89
89
  }>;
90
90
  message: z.ZodString;
91
91
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -101,11 +101,11 @@ export declare const hostedMcpExecutionArtifactSchema: z.ZodObject<{
101
101
  runId: z.ZodString;
102
102
  kind: z.ZodEnum<{
103
103
  file: "file";
104
- warning: "warning";
105
104
  resource: "resource";
105
+ warning: "warning";
106
106
  summary: "summary";
107
- result: "result";
108
107
  log: "log";
108
+ result: "result";
109
109
  }>;
110
110
  name: z.ZodString;
111
111
  mimeType: z.ZodNullable<z.ZodString>;
@@ -151,11 +151,11 @@ export declare const hostedMcpExecutionRunSchema: z.ZodObject<{
151
151
  runId: z.ZodString;
152
152
  kind: z.ZodEnum<{
153
153
  file: "file";
154
- warning: "warning";
155
154
  resource: "resource";
155
+ warning: "warning";
156
156
  summary: "summary";
157
- result: "result";
158
157
  log: "log";
158
+ result: "result";
159
159
  }>;
160
160
  name: z.ZodString;
161
161
  mimeType: z.ZodNullable<z.ZodString>;
@@ -377,11 +377,11 @@ export declare const hostedMcpDashboardSchema: z.ZodObject<{
377
377
  runId: z.ZodString;
378
378
  kind: z.ZodEnum<{
379
379
  file: "file";
380
- warning: "warning";
381
380
  resource: "resource";
381
+ warning: "warning";
382
382
  summary: "summary";
383
- result: "result";
384
383
  log: "log";
384
+ result: "result";
385
385
  }>;
386
386
  name: z.ZodString;
387
387
  mimeType: z.ZodNullable<z.ZodString>;
@@ -542,11 +542,11 @@ export declare const hostedMcpDashboardResponseSchema: z.ZodObject<{
542
542
  runId: z.ZodString;
543
543
  kind: z.ZodEnum<{
544
544
  file: "file";
545
- warning: "warning";
546
545
  resource: "resource";
546
+ warning: "warning";
547
547
  summary: "summary";
548
- result: "result";
549
548
  log: "log";
549
+ result: "result";
550
550
  }>;
551
551
  name: z.ZodString;
552
552
  mimeType: z.ZodNullable<z.ZodString>;
@@ -707,11 +707,11 @@ export declare const hostedMcpExecutionRunsResponseSchema: z.ZodObject<{
707
707
  runId: z.ZodString;
708
708
  kind: z.ZodEnum<{
709
709
  file: "file";
710
- warning: "warning";
711
710
  resource: "resource";
711
+ warning: "warning";
712
712
  summary: "summary";
713
- result: "result";
714
713
  log: "log";
714
+ result: "result";
715
715
  }>;
716
716
  name: z.ZodString;
717
717
  mimeType: z.ZodNullable<z.ZodString>;
@@ -761,11 +761,11 @@ export declare const hostedMcpExecutionRunResponseSchema: z.ZodObject<{
761
761
  runId: z.ZodString;
762
762
  kind: z.ZodEnum<{
763
763
  file: "file";
764
- warning: "warning";
765
764
  resource: "resource";
765
+ warning: "warning";
766
766
  summary: "summary";
767
- result: "result";
768
767
  log: "log";
768
+ result: "result";
769
769
  }>;
770
770
  name: z.ZodString;
771
771
  mimeType: z.ZodNullable<z.ZodString>;
@@ -30,7 +30,7 @@ export const meResponseSchema = z.object({
30
30
  isSuperadmin: z.boolean().describe("Whether the user is a platform operator."),
31
31
  })
32
32
  .nullable()
33
- .describe("User identity when known: the session user, or the machine credential's creator. Null for automation-created credentials."),
33
+ .describe("Authenticated user identity for user-subject credentials. Null for team- or service-subject machine credentials; creator metadata is retained only for audit attribution, not request identity."),
34
34
  tenants: z
35
35
  .array(z.object({
36
36
  id: z.string().describe("Tenant id."),
@@ -0,0 +1,142 @@
1
+ import { z } from "zod";
2
+ export declare function normalizeMountPathPrefix(value: string): string;
3
+ export declare const mountPathPrefixSchema: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
4
+ export declare const spaceMountCreateSchema: z.ZodObject<{
5
+ sourceVersionId: z.ZodCustom<`ver_${string}`, `ver_${string}`>;
6
+ pathPrefix: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
7
+ targetSpaceId: z.ZodCustom<`spc_${string}`, `spc_${string}`>;
8
+ channel: z.ZodDefault<z.ZodLiteral<"live">>;
9
+ }, z.core.$strip>;
10
+ export declare const spaceMountSchema: z.ZodObject<{
11
+ id: z.ZodCustom<`mnt_${string}`, `mnt_${string}`>;
12
+ spaceId: z.ZodCustom<`spc_${string}`, `spc_${string}`>;
13
+ sourceVersionId: z.ZodCustom<`ver_${string}`, `ver_${string}`>;
14
+ pathPrefix: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
15
+ targetSpaceId: z.ZodCustom<`spc_${string}`, `spc_${string}`>;
16
+ targetSpaceSlug: z.ZodString;
17
+ channel: z.ZodLiteral<"live">;
18
+ versionId: z.ZodNullable<z.ZodCustom<`ver_${string}`, `ver_${string}`>>;
19
+ targetVersionId: z.ZodNullable<z.ZodCustom<`ver_${string}`, `ver_${string}`>>;
20
+ createdAt: z.ZodString;
21
+ updatedAt: z.ZodString;
22
+ }, z.core.$strip>;
23
+ export declare const spaceMountListResponseSchema: z.ZodObject<{
24
+ data: z.ZodArray<z.ZodObject<{
25
+ id: z.ZodCustom<`mnt_${string}`, `mnt_${string}`>;
26
+ spaceId: z.ZodCustom<`spc_${string}`, `spc_${string}`>;
27
+ sourceVersionId: z.ZodCustom<`ver_${string}`, `ver_${string}`>;
28
+ pathPrefix: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
29
+ targetSpaceId: z.ZodCustom<`spc_${string}`, `spc_${string}`>;
30
+ targetSpaceSlug: z.ZodString;
31
+ channel: z.ZodLiteral<"live">;
32
+ versionId: z.ZodNullable<z.ZodCustom<`ver_${string}`, `ver_${string}`>>;
33
+ targetVersionId: z.ZodNullable<z.ZodCustom<`ver_${string}`, `ver_${string}`>>;
34
+ createdAt: z.ZodString;
35
+ updatedAt: z.ZodString;
36
+ }, z.core.$strip>>;
37
+ }, z.core.$strip>;
38
+ export declare const spaceMountResponseSchema: z.ZodObject<{
39
+ data: z.ZodObject<{
40
+ id: z.ZodCustom<`mnt_${string}`, `mnt_${string}`>;
41
+ spaceId: z.ZodCustom<`spc_${string}`, `spc_${string}`>;
42
+ sourceVersionId: z.ZodCustom<`ver_${string}`, `ver_${string}`>;
43
+ pathPrefix: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
44
+ targetSpaceId: z.ZodCustom<`spc_${string}`, `spc_${string}`>;
45
+ targetSpaceSlug: z.ZodString;
46
+ channel: z.ZodLiteral<"live">;
47
+ versionId: z.ZodNullable<z.ZodCustom<`ver_${string}`, `ver_${string}`>>;
48
+ targetVersionId: z.ZodNullable<z.ZodCustom<`ver_${string}`, `ver_${string}`>>;
49
+ createdAt: z.ZodString;
50
+ updatedAt: z.ZodString;
51
+ }, z.core.$strip>;
52
+ operation: z.ZodNullable<z.ZodObject<{
53
+ id: z.ZodString;
54
+ kind: z.ZodString;
55
+ status: z.ZodEnum<{
56
+ failed: "failed";
57
+ canceled: "canceled";
58
+ queued: "queued";
59
+ running: "running";
60
+ succeeded: "succeeded";
61
+ }>;
62
+ resources: z.ZodArray<z.ZodObject<{
63
+ type: z.ZodString;
64
+ id: z.ZodString;
65
+ }, z.core.$strip>>;
66
+ progress: z.ZodOptional<z.ZodObject<{
67
+ total: z.ZodNumber;
68
+ completed: z.ZodNumber;
69
+ failed: z.ZodNumber;
70
+ }, z.core.$strip>>;
71
+ diagnostics: z.ZodOptional<z.ZodArray<z.ZodObject<{
72
+ code: z.ZodString;
73
+ severity: z.ZodEnum<{
74
+ info: "info";
75
+ error: "error";
76
+ warning: "warning";
77
+ }>;
78
+ message: z.ZodString;
79
+ path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
80
+ provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
81
+ registrar: "registrar";
82
+ wpcloud: "wpcloud";
83
+ dns: "dns";
84
+ runtime: "runtime";
85
+ }>>>;
86
+ details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
87
+ fix: z.ZodOptional<z.ZodNullable<z.ZodString>>;
88
+ retryable: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
89
+ }, z.core.$strip>>>;
90
+ createdAt: z.ZodString;
91
+ finishedAt: z.ZodOptional<z.ZodString>;
92
+ }, z.core.$strip>>;
93
+ }, z.core.$strip>;
94
+ export declare const spaceMountDeleteResponseSchema: z.ZodObject<{
95
+ data: z.ZodObject<{
96
+ id: z.ZodCustom<`mnt_${string}`, `mnt_${string}`>;
97
+ deleted: z.ZodLiteral<true>;
98
+ }, z.core.$strip>;
99
+ operation: z.ZodNullable<z.ZodObject<{
100
+ id: z.ZodString;
101
+ kind: z.ZodString;
102
+ status: z.ZodEnum<{
103
+ failed: "failed";
104
+ canceled: "canceled";
105
+ queued: "queued";
106
+ running: "running";
107
+ succeeded: "succeeded";
108
+ }>;
109
+ resources: z.ZodArray<z.ZodObject<{
110
+ type: z.ZodString;
111
+ id: z.ZodString;
112
+ }, z.core.$strip>>;
113
+ progress: z.ZodOptional<z.ZodObject<{
114
+ total: z.ZodNumber;
115
+ completed: z.ZodNumber;
116
+ failed: z.ZodNumber;
117
+ }, z.core.$strip>>;
118
+ diagnostics: z.ZodOptional<z.ZodArray<z.ZodObject<{
119
+ code: z.ZodString;
120
+ severity: z.ZodEnum<{
121
+ info: "info";
122
+ error: "error";
123
+ warning: "warning";
124
+ }>;
125
+ message: z.ZodString;
126
+ path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
127
+ provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
128
+ registrar: "registrar";
129
+ wpcloud: "wpcloud";
130
+ dns: "dns";
131
+ runtime: "runtime";
132
+ }>>>;
133
+ details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
134
+ fix: z.ZodOptional<z.ZodNullable<z.ZodString>>;
135
+ retryable: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
136
+ }, z.core.$strip>>>;
137
+ createdAt: z.ZodString;
138
+ finishedAt: z.ZodOptional<z.ZodString>;
139
+ }, z.core.$strip>>;
140
+ }, z.core.$strip>;
141
+ export type SpaceMountCreate = z.infer<typeof spaceMountCreateSchema>;
142
+ export type SpaceMount = z.infer<typeof spaceMountSchema>;
@@ -0,0 +1,56 @@
1
+ import { z } from "zod";
2
+ import { dataEnvelope, mutationEnvelope } from "./common.js";
3
+ import { registeredIdSchema } from "./ids.js";
4
+ const RESERVED_MOUNT_PREFIXES = ["/__spacefast", "/__stattic", "/.well-known"];
5
+ export function normalizeMountPathPrefix(value) {
6
+ const trimmed = value.trim();
7
+ if (trimmed === "" || trimmed === "/")
8
+ return "/";
9
+ return `/${trimmed.replace(/^\/+|\/+$/g, "")}`;
10
+ }
11
+ export const mountPathPrefixSchema = z
12
+ .string()
13
+ .min(1)
14
+ .max(1024)
15
+ .transform(normalizeMountPathPrefix)
16
+ .refine((value) => value !== "/", "A mount path must be below the site root.")
17
+ .refine((value) => Array.from(value).every((character) => {
18
+ const codePoint = character.codePointAt(0) ?? 0;
19
+ return codePoint > 0x9f || (codePoint > 0x1f && codePoint !== 0x7f);
20
+ }), "Mount path is invalid.")
21
+ .refine((value) => !value.includes("\\") && !value.includes("//"), "Mount path is invalid.")
22
+ .refine((value) => !value
23
+ .split("/")
24
+ .filter(Boolean)
25
+ .some((segment) => segment === "." || segment === ".."), "Mount path is invalid.")
26
+ .refine((value) => !RESERVED_MOUNT_PREFIXES.some((reserved) => value === reserved || value.startsWith(`${reserved}/`)), "Mount path uses a Spacefast-reserved prefix.")
27
+ .describe("Normalized path prefix on the website, for example `/docs`.");
28
+ export const spaceMountCreateSchema = z.object({
29
+ sourceVersionId: registeredIdSchema("ver").describe("Immutable website version whose production activation enables this mount."),
30
+ pathPrefix: mountPathPrefixSchema,
31
+ targetSpaceId: registeredIdSchema("spc").describe("Explicitly authorized same-team space to mount."),
32
+ channel: z
33
+ .literal("live")
34
+ .default("live")
35
+ .describe("Target production channel followed by this mount."),
36
+ });
37
+ export const spaceMountSchema = z.object({
38
+ id: registeredIdSchema("mnt"),
39
+ spaceId: registeredIdSchema("spc"),
40
+ sourceVersionId: registeredIdSchema("ver"),
41
+ pathPrefix: mountPathPrefixSchema,
42
+ targetSpaceId: registeredIdSchema("spc"),
43
+ targetSpaceSlug: z.string(),
44
+ channel: z.literal("live"),
45
+ versionId: registeredIdSchema("ver")
46
+ .nullable()
47
+ .describe("Immutable target version currently serving from the mount."),
48
+ targetVersionId: registeredIdSchema("ver")
49
+ .nullable()
50
+ .describe("Target production-channel version the durable synchronizer is converging toward."),
51
+ createdAt: z.string().datetime(),
52
+ updatedAt: z.string().datetime(),
53
+ });
54
+ export const spaceMountListResponseSchema = dataEnvelope(z.array(spaceMountSchema));
55
+ export const spaceMountResponseSchema = mutationEnvelope(spaceMountSchema);
56
+ export const spaceMountDeleteResponseSchema = mutationEnvelope(z.object({ id: registeredIdSchema("mnt"), deleted: z.literal(true) }));
@@ -3,22 +3,22 @@ export declare const OAUTH_AUTHORIZATION_SERVER_PATH: "/v1/auth";
3
3
  * mcp origin (`https://mcp.<domain>`), so it has no path entry here. */
4
4
  export declare const OAUTH_API_RESOURCE_PATH: "/v1";
5
5
  export type OAuthResourceKey = "api" | "mcp";
6
- export declare const OAUTH_API_RESOURCE_SCOPES: readonly ["teams:read", "spaces:read", "spaces:write", "publish:write", "domains:read", "domains:write"];
6
+ export declare const OAUTH_API_RESOURCE_SCOPES: readonly ["teams:read", "teams:create", "spaces:read", "spaces:write", "spaces:rename", "publish:write", "domains:read", "domains:write"];
7
7
  export declare const OAUTH_MCP_TOOL_SCOPE: "mcp:tools";
8
- export declare const OAUTH_MCP_RESOURCE_SCOPES: readonly ["mcp:tools", "teams:read", "spaces:read", "spaces:write", "publish:write", "domains:read", "domains:write"];
9
- export declare const OAUTH_PROVIDER_SCOPES: readonly ["openid", "profile", "email", "offline_access", "teams:read", "spaces:read", "spaces:write", "publish:write", "domains:read", "domains:write", "mcp:tools"];
8
+ export declare const OAUTH_MCP_RESOURCE_SCOPES: readonly ["mcp:tools", "teams:read", "teams:create", "spaces:read", "spaces:write", "spaces:rename", "publish:write", "domains:read", "domains:write"];
9
+ export declare const OAUTH_PROVIDER_SCOPES: readonly ["openid", "profile", "email", "offline_access", "teams:read", "teams:create", "spaces:read", "spaces:write", "spaces:rename", "publish:write", "domains:read", "domains:write", "mcp:tools"];
10
10
  export declare const OAUTH_RESOURCE_DEFINITIONS: {
11
11
  readonly api: {
12
12
  readonly key: "api";
13
13
  readonly name: "Spacefast API";
14
14
  readonly accessTokenTtlSeconds: number;
15
- readonly allowedScopes: readonly ["teams:read", "spaces:read", "spaces:write", "publish:write", "domains:read", "domains:write"];
15
+ readonly allowedScopes: readonly ["teams:read", "teams:create", "spaces:read", "spaces:write", "spaces:rename", "publish:write", "domains:read", "domains:write"];
16
16
  };
17
17
  readonly mcp: {
18
18
  readonly key: "mcp";
19
19
  readonly name: "Spacefast MCP";
20
20
  readonly accessTokenTtlSeconds: number;
21
- readonly allowedScopes: readonly ["mcp:tools", "teams:read", "spaces:read", "spaces:write", "publish:write", "domains:read", "domains:write"];
21
+ readonly allowedScopes: readonly ["mcp:tools", "teams:read", "teams:create", "spaces:read", "spaces:write", "spaces:rename", "publish:write", "domains:read", "domains:write"];
22
22
  };
23
23
  };
24
24
  /** Resource identifier for the public API: `https://api.<domain>/v1`. */
@@ -4,8 +4,10 @@ export const OAUTH_AUTHORIZATION_SERVER_PATH = "/v1/auth";
4
4
  export const OAUTH_API_RESOURCE_PATH = "/v1";
5
5
  export const OAUTH_API_RESOURCE_SCOPES = [
6
6
  "teams:read",
7
+ "teams:create",
7
8
  "spaces:read",
8
9
  "spaces:write",
10
+ "spaces:rename",
9
11
  "publish:write",
10
12
  "domains:read",
11
13
  "domains:write",
@@ -39,8 +39,8 @@ export declare const UserOperationSchema: z.ZodObject<{
39
39
  code: z.ZodString;
40
40
  severity: z.ZodEnum<{
41
41
  info: "info";
42
- warning: "warning";
43
42
  error: "error";
43
+ warning: "warning";
44
44
  }>;
45
45
  message: z.ZodString;
46
46
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -80,8 +80,8 @@ export declare const UserOperationSchema: z.ZodObject<{
80
80
  }>>;
81
81
  integrationRelease: z.ZodOptional<z.ZodObject<{
82
82
  environment: z.ZodEnum<{
83
- production: "production";
84
83
  preview: "preview";
84
+ production: "production";
85
85
  development: "development";
86
86
  }>;
87
87
  }, z.core.$strip>>;
@@ -137,8 +137,8 @@ export declare const operationListResponseSchema: z.ZodObject<{
137
137
  code: z.ZodString;
138
138
  severity: z.ZodEnum<{
139
139
  info: "info";
140
- warning: "warning";
141
140
  error: "error";
141
+ warning: "warning";
142
142
  }>;
143
143
  message: z.ZodString;
144
144
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -178,8 +178,8 @@ export declare const operationListResponseSchema: z.ZodObject<{
178
178
  }>>;
179
179
  integrationRelease: z.ZodOptional<z.ZodObject<{
180
180
  environment: z.ZodEnum<{
181
- production: "production";
182
181
  preview: "preview";
182
+ production: "production";
183
183
  development: "development";
184
184
  }>;
185
185
  }, z.core.$strip>>;
@@ -1,37 +1,31 @@
1
1
  import { z } from "zod";
2
- export declare const SITE_PAGE_IDS: readonly ["404", "password", "denied", "login", "index", "preview"];
2
+ export declare const SITE_PAGE_IDS: readonly ["404", "denied", "index", "preview"];
3
3
  export declare const sitePageIdSchema: z.ZodEnum<{
4
- login: "login";
5
- password: "password";
6
4
  denied: "denied";
7
5
  index: "index";
8
6
  preview: "preview";
9
7
  404: "404";
10
8
  }>;
11
9
  export type SitePageId = z.infer<typeof sitePageIdSchema>;
12
- export declare const ROUTE_PAGE_IDS: readonly ["404", "password", "denied", "login"];
10
+ export declare const ROUTE_PAGE_IDS: readonly ["404", "denied"];
13
11
  export declare const routePageIdSchema: z.ZodEnum<{
14
- login: "login";
15
- password: "password";
16
12
  denied: "denied";
17
13
  404: "404";
18
14
  }>;
19
15
  export type RoutePageId = z.infer<typeof routePageIdSchema>;
20
- export declare const CUSTOM_PAGE_IDS: readonly ["404", "password", "denied", "index", "preview"];
16
+ export declare const CUSTOM_PAGE_IDS: readonly ["404", "denied", "index", "preview"];
21
17
  export declare const customPageIdSchema: z.ZodEnum<{
22
- password: "password";
23
18
  denied: "denied";
24
19
  index: "index";
25
20
  preview: "preview";
26
21
  404: "404";
27
22
  }>;
28
23
  export type CustomPageId = z.infer<typeof customPageIdSchema>;
29
- export declare const PLATFORM_PAGE_IDS: readonly ["undeployed", "suspended", "legal", "visit-cap", "gone", "runtime-error", "rate-limited", "tier-unavailable", "proxy-error", "method-not-allowed", "content-too-large"];
24
+ export declare const PLATFORM_PAGE_IDS: readonly ["undeployed", "suspended", "legal", "gone", "runtime-error", "rate-limited", "tier-unavailable", "proxy-error", "method-not-allowed", "content-too-large"];
30
25
  export declare const platformPageIdSchema: z.ZodEnum<{
31
26
  legal: "legal";
32
27
  suspended: "suspended";
33
28
  undeployed: "undeployed";
34
- "visit-cap": "visit-cap";
35
29
  gone: "gone";
36
30
  "runtime-error": "runtime-error";
37
31
  "rate-limited": "rate-limited";
@@ -41,12 +35,12 @@ export declare const platformPageIdSchema: z.ZodEnum<{
41
35
  "content-too-large": "content-too-large";
42
36
  }>;
43
37
  export type PlatformPageId = z.infer<typeof platformPageIdSchema>;
44
- export declare const PAGE_ELEMENTS: readonly ["sf-content", "sf-password-form", "sf-login", "sf-files", "sf-file", "sf-logo", "sf-name"];
38
+ export declare const PAGE_ELEMENTS: readonly ["sf-content", "sf-denial-context", "sf-page-path", "sf-page-title", "sf-page-summary", "sf-spacefast-branding", "sf-files", "sf-file", "sf-logo", "sf-name"];
45
39
  export type PageElement = (typeof PAGE_ELEMENTS)[number];
46
40
  export type PageDefinition = {
47
41
  id: SitePageId;
48
42
  status: 200 | 401 | 403 | 404;
49
- cacheControl: "public, max-age=0, must-revalidate" | "private, no-store";
43
+ cacheControl: "public, max-age=0, s-maxage=600, stale-while-revalidate=60" | "private, no-store";
50
44
  noindex: boolean;
51
45
  customTemplate: boolean;
52
46
  };
@@ -58,8 +52,6 @@ export declare const pageArtifactKeySchema: z.ZodString;
58
52
  export declare const runtimePagesSchema: z.ZodObject<{
59
53
  routes: z.ZodRecord<z.ZodString, z.ZodObject<{
60
54
  pages: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
61
- login: "login";
62
- password: "password";
63
55
  denied: "denied";
64
56
  404: "404";
65
57
  }>, z.ZodString>>;
@@ -1,15 +1,14 @@
1
1
  import { z } from "zod";
2
- export const SITE_PAGE_IDS = ["404", "password", "denied", "login", "index", "preview"];
2
+ export const SITE_PAGE_IDS = ["404", "denied", "index", "preview"];
3
3
  export const sitePageIdSchema = z.enum(SITE_PAGE_IDS);
4
- export const ROUTE_PAGE_IDS = ["404", "password", "denied", "login"];
4
+ export const ROUTE_PAGE_IDS = ["404", "denied"];
5
5
  export const routePageIdSchema = z.enum(ROUTE_PAGE_IDS);
6
- export const CUSTOM_PAGE_IDS = ["404", "password", "denied", "index", "preview"];
6
+ export const CUSTOM_PAGE_IDS = ["404", "denied", "index", "preview"];
7
7
  export const customPageIdSchema = z.enum(CUSTOM_PAGE_IDS);
8
8
  export const PLATFORM_PAGE_IDS = [
9
9
  "undeployed",
10
10
  "suspended",
11
11
  "legal",
12
- "visit-cap",
13
12
  "gone",
14
13
  "runtime-error",
15
14
  "rate-limited",
@@ -21,8 +20,11 @@ export const PLATFORM_PAGE_IDS = [
21
20
  export const platformPageIdSchema = z.enum(PLATFORM_PAGE_IDS);
22
21
  export const PAGE_ELEMENTS = [
23
22
  "sf-content",
24
- "sf-password-form",
25
- "sf-login",
23
+ "sf-denial-context",
24
+ "sf-page-path",
25
+ "sf-page-title",
26
+ "sf-page-summary",
27
+ "sf-spacefast-branding",
26
28
  "sf-files",
27
29
  "sf-file",
28
30
  "sf-logo",
@@ -32,42 +34,28 @@ export const PAGE_CATALOG = {
32
34
  "404": {
33
35
  id: "404",
34
36
  status: 404,
35
- cacheControl: "public, max-age=0, must-revalidate",
37
+ cacheControl: "public, max-age=0, s-maxage=600, stale-while-revalidate=60",
36
38
  noindex: false,
37
39
  customTemplate: true,
38
40
  },
39
- password: {
40
- id: "password",
41
- status: 401,
42
- cacheControl: "private, no-store",
43
- noindex: true,
44
- customTemplate: true,
45
- },
46
41
  denied: {
47
42
  id: "denied",
48
43
  status: 403,
49
44
  cacheControl: "private, no-store",
50
45
  noindex: true,
51
- customTemplate: true,
52
- },
53
- login: {
54
- id: "login",
55
- status: 401,
56
- cacheControl: "private, no-store",
57
- noindex: true,
58
46
  customTemplate: false,
59
47
  },
60
48
  index: {
61
49
  id: "index",
62
50
  status: 200,
63
- cacheControl: "public, max-age=0, must-revalidate",
51
+ cacheControl: "public, max-age=0, s-maxage=600, stale-while-revalidate=60",
64
52
  noindex: false,
65
53
  customTemplate: true,
66
54
  },
67
55
  preview: {
68
56
  id: "preview",
69
57
  status: 200,
70
- cacheControl: "public, max-age=0, must-revalidate",
58
+ cacheControl: "public, max-age=0, s-maxage=600, stale-while-revalidate=60",
71
59
  noindex: false,
72
60
  customTemplate: true,
73
61
  },
@@ -1,10 +1,8 @@
1
1
  import { z } from "zod";
2
- export declare const PLAN_DISABLED_BEHAVIOR_CODES: readonly ["free_external_proxy_disabled", "free_headers_basic_auth_disabled", "routing_rules_over_plan", "immutable_version_requires_login"];
2
+ export declare const PLAN_DISABLED_BEHAVIOR_CODES: readonly ["free_external_proxy_disabled", "routing_rules_over_plan"];
3
3
  export declare const planDisabledBehaviorSchema: z.ZodObject<{
4
4
  code: z.ZodEnum<{
5
5
  free_external_proxy_disabled: "free_external_proxy_disabled";
6
- free_headers_basic_auth_disabled: "free_headers_basic_auth_disabled";
7
- immutable_version_requires_login: "immutable_version_requires_login";
8
6
  routing_rules_over_plan: "routing_rules_over_plan";
9
7
  }>;
10
8
  behavior: z.ZodString;
@@ -12,7 +10,6 @@ export declare const planDisabledBehaviorSchema: z.ZodObject<{
12
10
  warning: "warning";
13
11
  ignored: "ignored";
14
12
  platform_page: "platform_page";
15
- login_redirect: "login_redirect";
16
13
  }>;
17
14
  }, z.core.$strip>;
18
15
  export type PlanDisabledBehavior = z.infer<typeof planDisabledBehaviorSchema>;
@@ -41,7 +38,6 @@ export declare const PlanPolicyResponseSchema: z.ZodObject<{
41
38
  subTeams: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
42
39
  externalDomainGroups: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
43
40
  boughtDomains: z.ZodLiteral<"unlimited">;
44
- publicImmutableVersionWindowDays: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
45
41
  maxFileBytes: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
46
42
  maxVersionFiles: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
47
43
  routingRules: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
@@ -60,8 +56,8 @@ export declare const PlanPolicyResponseSchema: z.ZodObject<{
60
56
  warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
61
57
  severity: z.ZodEnum<{
62
58
  info: "info";
63
- warning: "warning";
64
59
  error: "error";
60
+ warning: "warning";
65
61
  }>;
66
62
  code: z.ZodString;
67
63
  message: z.ZodString;
@@ -69,8 +65,6 @@ export declare const PlanPolicyResponseSchema: z.ZodObject<{
69
65
  disabledBehaviors: z.ZodOptional<z.ZodArray<z.ZodObject<{
70
66
  code: z.ZodEnum<{
71
67
  free_external_proxy_disabled: "free_external_proxy_disabled";
72
- free_headers_basic_auth_disabled: "free_headers_basic_auth_disabled";
73
- immutable_version_requires_login: "immutable_version_requires_login";
74
68
  routing_rules_over_plan: "routing_rules_over_plan";
75
69
  }>;
76
70
  behavior: z.ZodString;
@@ -78,7 +72,6 @@ export declare const PlanPolicyResponseSchema: z.ZodObject<{
78
72
  warning: "warning";
79
73
  ignored: "ignored";
80
74
  platform_page: "platform_page";
81
- login_redirect: "login_redirect";
82
75
  }>;
83
76
  }, z.core.$strip>>>;
84
77
  }, z.core.$strip>;