@spacefast/common 0.0.2

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 (202) hide show
  1. package/README.md +42 -0
  2. package/dist/brand.d.ts +15 -0
  3. package/dist/brand.js +24 -0
  4. package/dist/config/domains.d.ts +30 -0
  5. package/dist/config/domains.js +75 -0
  6. package/dist/config/index.d.ts +1 -0
  7. package/dist/config/index.js +3 -0
  8. package/dist/contracts/abuse.d.ts +93 -0
  9. package/dist/contracts/abuse.js +50 -0
  10. package/dist/contracts/access.d.ts +409 -0
  11. package/dist/contracts/access.js +396 -0
  12. package/dist/contracts/account.d.ts +28 -0
  13. package/dist/contracts/account.js +54 -0
  14. package/dist/contracts/activity.d.ts +118 -0
  15. package/dist/contracts/activity.js +180 -0
  16. package/dist/contracts/analytics.d.ts +56 -0
  17. package/dist/contracts/analytics.js +91 -0
  18. package/dist/contracts/annotations.d.ts +327 -0
  19. package/dist/contracts/annotations.js +234 -0
  20. package/dist/contracts/api-keys.d.ts +517 -0
  21. package/dist/contracts/api-keys.js +235 -0
  22. package/dist/contracts/archives.d.ts +332 -0
  23. package/dist/contracts/archives.js +120 -0
  24. package/dist/contracts/auth.d.ts +86 -0
  25. package/dist/contracts/auth.js +82 -0
  26. package/dist/contracts/beta.d.ts +106 -0
  27. package/dist/contracts/beta.js +104 -0
  28. package/dist/contracts/billing.d.ts +328 -0
  29. package/dist/contracts/billing.js +203 -0
  30. package/dist/contracts/builds.d.ts +504 -0
  31. package/dist/contracts/builds.js +248 -0
  32. package/dist/contracts/channels.d.ts +49 -0
  33. package/dist/contracts/channels.js +51 -0
  34. package/dist/contracts/common.d.ts +238 -0
  35. package/dist/contracts/common.js +175 -0
  36. package/dist/contracts/deployments.d.ts +574 -0
  37. package/dist/contracts/deployments.js +97 -0
  38. package/dist/contracts/device-auth.d.ts +194 -0
  39. package/dist/contracts/device-auth.js +162 -0
  40. package/dist/contracts/domains.d.ts +6115 -0
  41. package/dist/contracts/domains.js +1435 -0
  42. package/dist/contracts/enums.d.ts +196 -0
  43. package/dist/contracts/enums.js +211 -0
  44. package/dist/contracts/error-code-meta.d.ts +1560 -0
  45. package/dist/contracts/error-code-meta.js +400 -0
  46. package/dist/contracts/error-codes.d.ts +13 -0
  47. package/dist/contracts/error-codes.js +416 -0
  48. package/dist/contracts/events.d.ts +398 -0
  49. package/dist/contracts/events.js +320 -0
  50. package/dist/contracts/fast-domain-search.d.ts +19 -0
  51. package/dist/contracts/fast-domain-search.js +22 -0
  52. package/dist/contracts/features.d.ts +240 -0
  53. package/dist/contracts/features.js +406 -0
  54. package/dist/contracts/git.d.ts +288 -0
  55. package/dist/contracts/git.js +116 -0
  56. package/dist/contracts/ids.d.ts +35 -0
  57. package/dist/contracts/ids.js +45 -0
  58. package/dist/contracts/intercom.d.ts +6 -0
  59. package/dist/contracts/intercom.js +5 -0
  60. package/dist/contracts/internal.d.ts +103 -0
  61. package/dist/contracts/internal.js +92 -0
  62. package/dist/contracts/mcp.d.ts +788 -0
  63. package/dist/contracts/mcp.js +161 -0
  64. package/dist/contracts/me.d.ts +81 -0
  65. package/dist/contracts/me.js +104 -0
  66. package/dist/contracts/oauth-resources.d.ts +30 -0
  67. package/dist/contracts/oauth-resources.js +61 -0
  68. package/dist/contracts/operations.d.ts +54 -0
  69. package/dist/contracts/operations.js +14 -0
  70. package/dist/contracts/plan-policy.d.ts +85 -0
  71. package/dist/contracts/plan-policy.js +75 -0
  72. package/dist/contracts/platform.d.ts +359 -0
  73. package/dist/contracts/platform.js +216 -0
  74. package/dist/contracts/push-new.d.ts +156 -0
  75. package/dist/contracts/push-new.js +52 -0
  76. package/dist/contracts/quotas.d.ts +16 -0
  77. package/dist/contracts/quotas.js +36 -0
  78. package/dist/contracts/repository-connections.d.ts +231 -0
  79. package/dist/contracts/repository-connections.js +106 -0
  80. package/dist/contracts/resources.d.ts +529 -0
  81. package/dist/contracts/resources.js +209 -0
  82. package/dist/contracts/routes.d.ts +45 -0
  83. package/dist/contracts/routes.js +31 -0
  84. package/dist/contracts/runtime-api.d.ts +449 -0
  85. package/dist/contracts/runtime-api.js +513 -0
  86. package/dist/contracts/sites.d.ts +393 -0
  87. package/dist/contracts/sites.js +121 -0
  88. package/dist/contracts/slugs.d.ts +31 -0
  89. package/dist/contracts/slugs.js +47 -0
  90. package/dist/contracts/space-config.d.ts +216 -0
  91. package/dist/contracts/space-config.js +237 -0
  92. package/dist/contracts/space-theme.d.ts +25 -0
  93. package/dist/contracts/space-theme.js +49 -0
  94. package/dist/contracts/spaces.d.ts +2760 -0
  95. package/dist/contracts/spaces.js +589 -0
  96. package/dist/contracts/superadmin-activity.d.ts +205 -0
  97. package/dist/contracts/superadmin-activity.js +107 -0
  98. package/dist/contracts/superadmin-emails.d.ts +212 -0
  99. package/dist/contracts/superadmin-emails.js +112 -0
  100. package/dist/contracts/superadmin-queues.d.ts +414 -0
  101. package/dist/contracts/superadmin-queues.js +202 -0
  102. package/dist/contracts/superadmin-runtime.d.ts +27 -0
  103. package/dist/contracts/superadmin-runtime.js +38 -0
  104. package/dist/contracts/superadmin-spaces.d.ts +429 -0
  105. package/dist/contracts/superadmin-spaces.js +82 -0
  106. package/dist/contracts/superadmin-tenants.d.ts +180 -0
  107. package/dist/contracts/superadmin-tenants.js +117 -0
  108. package/dist/contracts/superadmin.d.ts +654 -0
  109. package/dist/contracts/superadmin.js +309 -0
  110. package/dist/contracts/tags.d.ts +1140 -0
  111. package/dist/contracts/tags.js +1050 -0
  112. package/dist/contracts/teams.d.ts +233 -0
  113. package/dist/contracts/teams.js +174 -0
  114. package/dist/contracts/telemetry.d.ts +2 -0
  115. package/dist/contracts/telemetry.js +1 -0
  116. package/dist/contracts/transfers.d.ts +105 -0
  117. package/dist/contracts/transfers.js +48 -0
  118. package/dist/contracts/variables.d.ts +189 -0
  119. package/dist/contracts/variables.js +82 -0
  120. package/dist/contracts/webhooks.d.ts +159 -0
  121. package/dist/contracts/webhooks.js +59 -0
  122. package/dist/contracts/zero.d.ts +1538 -0
  123. package/dist/contracts/zero.js +755 -0
  124. package/dist/docs/agent-prose.d.ts +35 -0
  125. package/dist/docs/agent-prose.js +153 -0
  126. package/dist/docs/agent-setup.d.ts +6 -0
  127. package/dist/docs/agent-setup.js +164 -0
  128. package/dist/docs/agent-solutions.d.ts +110 -0
  129. package/dist/docs/agent-solutions.js +181 -0
  130. package/dist/docs/error-docs.d.ts +12 -0
  131. package/dist/docs/error-docs.js +1601 -0
  132. package/dist/docs/skill-distribution.d.ts +12 -0
  133. package/dist/docs/skill-distribution.js +18 -0
  134. package/dist/domain-exploration.d.ts +108 -0
  135. package/dist/domain-exploration.js +488 -0
  136. package/dist/domain-normalize.d.ts +1 -0
  137. package/dist/domain-normalize.js +14 -0
  138. package/dist/domain-zones.d.ts +1 -0
  139. package/dist/domain-zones.js +5272 -0
  140. package/dist/index.d.ts +1 -0
  141. package/dist/index.js +1 -0
  142. package/dist/utils/access-policy.d.ts +39 -0
  143. package/dist/utils/access-policy.js +232 -0
  144. package/dist/utils/api.d.ts +4 -0
  145. package/dist/utils/api.js +13 -0
  146. package/dist/utils/auth-redirect.d.ts +1 -0
  147. package/dist/utils/auth-redirect.js +48 -0
  148. package/dist/utils/auth.d.ts +5 -0
  149. package/dist/utils/auth.js +13 -0
  150. package/dist/utils/build-settings.d.ts +49 -0
  151. package/dist/utils/build-settings.js +366 -0
  152. package/dist/utils/claim-token.d.ts +1 -0
  153. package/dist/utils/claim-token.js +9 -0
  154. package/dist/utils/collections.d.ts +1 -0
  155. package/dist/utils/collections.js +5 -0
  156. package/dist/utils/concurrency.d.ts +1 -0
  157. package/dist/utils/concurrency.js +18 -0
  158. package/dist/utils/content-type.d.ts +10 -0
  159. package/dist/utils/content-type.js +145 -0
  160. package/dist/utils/error-display.d.ts +7 -0
  161. package/dist/utils/error-display.js +42 -0
  162. package/dist/utils/error.d.ts +1 -0
  163. package/dist/utils/error.js +3 -0
  164. package/dist/utils/generate-space-name.d.ts +14 -0
  165. package/dist/utils/generate-space-name.js +95 -0
  166. package/dist/utils/git-repository.d.ts +5 -0
  167. package/dist/utils/git-repository.js +99 -0
  168. package/dist/utils/guards.d.ts +1 -0
  169. package/dist/utils/guards.js +3 -0
  170. package/dist/utils/publish-detection.d.ts +10 -0
  171. package/dist/utils/publish-detection.js +118 -0
  172. package/dist/utils/publish-policy.d.ts +69 -0
  173. package/dist/utils/publish-policy.js +429 -0
  174. package/dist/utils/query-client.d.ts +7 -0
  175. package/dist/utils/query-client.js +21 -0
  176. package/dist/utils/query-keys.d.ts +75 -0
  177. package/dist/utils/query-keys.js +78 -0
  178. package/dist/utils/runtime-paths.d.ts +7 -0
  179. package/dist/utils/runtime-paths.js +28 -0
  180. package/dist/utils/runtime-upload.d.ts +19 -0
  181. package/dist/utils/runtime-upload.js +27 -0
  182. package/dist/utils/slug.d.ts +5 -0
  183. package/dist/utils/slug.js +13 -0
  184. package/dist/utils/space-config.d.ts +75 -0
  185. package/dist/utils/space-config.js +415 -0
  186. package/dist/utils/space-theme.d.ts +16 -0
  187. package/dist/utils/space-theme.js +89 -0
  188. package/dist/utils/static-runtime-policy.d.ts +17 -0
  189. package/dist/utils/static-runtime-policy.js +103 -0
  190. package/dist/utils/upload-session.d.ts +34 -0
  191. package/dist/utils/upload-session.js +69 -0
  192. package/dist/utils/urls.d.ts +2 -0
  193. package/dist/utils/urls.js +7 -0
  194. package/dist/utils/version-path.d.ts +6 -0
  195. package/dist/utils/version-path.js +51 -0
  196. package/dist/utils/wpcom-auth-redirects.d.ts +14 -0
  197. package/dist/utils/wpcom-auth-redirects.js +49 -0
  198. package/dist/utils/zero-realtime-signature.d.ts +12 -0
  199. package/dist/utils/zero-realtime-signature.js +45 -0
  200. package/dist/vocabulary.d.ts +230 -0
  201. package/dist/vocabulary.js +218 -0
  202. package/package.json +58 -0
@@ -0,0 +1,288 @@
1
+ import { z } from "zod";
2
+ export declare const buildTargetValues: readonly ["production", "preview"];
3
+ export declare const buildTriggerValues: readonly ["manual", "push", "pull_request", "retry"];
4
+ export declare const buildTarget: z.ZodEnum<{
5
+ production: "production";
6
+ preview: "preview";
7
+ }>;
8
+ export declare const buildTrigger: z.ZodEnum<{
9
+ retry: "retry";
10
+ push: "push";
11
+ pull_request: "pull_request";
12
+ manual: "manual";
13
+ }>;
14
+ export declare const buildEnvironmentScopeValues: readonly ["runtime", "build", "build:production", "build:preview"];
15
+ export declare const buildEnvironmentScope: z.ZodEnum<{
16
+ runtime: "runtime";
17
+ build: "build";
18
+ "build:production": "build:production";
19
+ "build:preview": "build:preview";
20
+ }>;
21
+ export declare const gitBuildSettingsSchema: z.ZodObject<{
22
+ rootDirectory: z.ZodDefault<z.ZodNullable<z.ZodString>>;
23
+ installDirectory: z.ZodDefault<z.ZodNullable<z.ZodString>>;
24
+ installCommand: z.ZodDefault<z.ZodNullable<z.ZodString>>;
25
+ buildCommand: z.ZodDefault<z.ZodNullable<z.ZodString>>;
26
+ outputDirectory: z.ZodDefault<z.ZodNullable<z.ZodString>>;
27
+ ignoredBuildCommand: z.ZodDefault<z.ZodNullable<z.ZodString>>;
28
+ frameworkPreset: z.ZodDefault<z.ZodNullable<z.ZodString>>;
29
+ platformPreset: z.ZodDefault<z.ZodNullable<z.ZodString>>;
30
+ allowUnsupportedPlatformFeatures: z.ZodDefault<z.ZodBoolean>;
31
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
32
+ }, z.core.$strip>;
33
+ export declare const gitPlatformDetectionSchema: z.ZodObject<{
34
+ platform: z.ZodEnum<{
35
+ vercel: "vercel";
36
+ netlify: "netlify";
37
+ "cloudflare-pages": "cloudflare-pages";
38
+ }>;
39
+ rootDirectory: z.ZodNullable<z.ZodString>;
40
+ installDirectory: z.ZodNullable<z.ZodString>;
41
+ installCommand: z.ZodNullable<z.ZodString>;
42
+ buildCommand: z.ZodNullable<z.ZodString>;
43
+ outputDirectory: z.ZodNullable<z.ZodString>;
44
+ unsupportedFeatures: z.ZodArray<z.ZodString>;
45
+ }, z.core.$strip>;
46
+ export declare const gitConnectionSchema: z.ZodObject<{
47
+ id: z.ZodString;
48
+ spaceId: z.ZodString;
49
+ provider: z.ZodEnum<{
50
+ github: "github";
51
+ gitlab: "gitlab";
52
+ bitbucket: "bitbucket";
53
+ generic: "generic";
54
+ }>;
55
+ repositoryId: z.ZodNullable<z.ZodString>;
56
+ repositoryName: z.ZodString;
57
+ repositoryFullName: z.ZodString;
58
+ defaultBranch: z.ZodString;
59
+ productionBranch: z.ZodString;
60
+ cloneUrl: z.ZodString;
61
+ githubInstallationId: z.ZodNullable<z.ZodString>;
62
+ credentialConfigured: z.ZodBoolean;
63
+ autoDeployProduction: z.ZodBoolean;
64
+ autoDeployPreviews: z.ZodBoolean;
65
+ buildSettings: z.ZodObject<{
66
+ rootDirectory: z.ZodDefault<z.ZodNullable<z.ZodString>>;
67
+ installDirectory: z.ZodDefault<z.ZodNullable<z.ZodString>>;
68
+ installCommand: z.ZodDefault<z.ZodNullable<z.ZodString>>;
69
+ buildCommand: z.ZodDefault<z.ZodNullable<z.ZodString>>;
70
+ outputDirectory: z.ZodDefault<z.ZodNullable<z.ZodString>>;
71
+ ignoredBuildCommand: z.ZodDefault<z.ZodNullable<z.ZodString>>;
72
+ frameworkPreset: z.ZodDefault<z.ZodNullable<z.ZodString>>;
73
+ platformPreset: z.ZodDefault<z.ZodNullable<z.ZodString>>;
74
+ allowUnsupportedPlatformFeatures: z.ZodDefault<z.ZodBoolean>;
75
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
76
+ }, z.core.$strip>;
77
+ connectedUserId: z.ZodNullable<z.ZodString>;
78
+ createdAt: z.ZodString;
79
+ updatedAt: z.ZodString;
80
+ }, z.core.$strip>;
81
+ export declare const gitConnectionCreateSchema: z.ZodPipe<z.ZodObject<{
82
+ provider: z.ZodDefault<z.ZodEnum<{
83
+ github: "github";
84
+ gitlab: "gitlab";
85
+ bitbucket: "bitbucket";
86
+ generic: "generic";
87
+ }>>;
88
+ repositoryId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
89
+ repositoryName: z.ZodOptional<z.ZodString>;
90
+ repositoryFullName: z.ZodString;
91
+ defaultBranch: z.ZodDefault<z.ZodString>;
92
+ productionBranch: z.ZodOptional<z.ZodString>;
93
+ cloneUrl: z.ZodString;
94
+ githubInstallationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
95
+ credential: z.ZodOptional<z.ZodNullable<z.ZodString>>;
96
+ autoDeployProduction: z.ZodDefault<z.ZodBoolean>;
97
+ autoDeployPreviews: z.ZodDefault<z.ZodBoolean>;
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>>;
109
+ }, z.core.$strip>>;
110
+ }, z.core.$strip>, z.ZodTransform<{
111
+ productionBranch: string;
112
+ provider: "github" | "gitlab" | "bitbucket" | "generic";
113
+ repositoryFullName: string;
114
+ defaultBranch: string;
115
+ cloneUrl: string;
116
+ autoDeployProduction: boolean;
117
+ autoDeployPreviews: boolean;
118
+ repositoryId?: string | null | undefined;
119
+ repositoryName?: string | undefined;
120
+ githubInstallationId?: string | null | undefined;
121
+ credential?: string | null | undefined;
122
+ buildSettings?: {
123
+ rootDirectory?: string | null | undefined;
124
+ installDirectory?: string | null | undefined;
125
+ installCommand?: string | null | undefined;
126
+ buildCommand?: string | null | undefined;
127
+ outputDirectory?: string | null | undefined;
128
+ ignoredBuildCommand?: string | null | undefined;
129
+ frameworkPreset?: string | null | undefined;
130
+ platformPreset?: string | null | undefined;
131
+ allowUnsupportedPlatformFeatures?: boolean | undefined;
132
+ timeoutSeconds?: number | undefined;
133
+ } | undefined;
134
+ }, {
135
+ provider: "github" | "gitlab" | "bitbucket" | "generic";
136
+ repositoryFullName: string;
137
+ defaultBranch: string;
138
+ cloneUrl: string;
139
+ autoDeployProduction: boolean;
140
+ autoDeployPreviews: boolean;
141
+ repositoryId?: string | null | undefined;
142
+ repositoryName?: string | undefined;
143
+ productionBranch?: string | undefined;
144
+ githubInstallationId?: string | null | undefined;
145
+ credential?: string | null | undefined;
146
+ buildSettings?: {
147
+ rootDirectory?: string | null | undefined;
148
+ installDirectory?: string | null | undefined;
149
+ installCommand?: string | null | undefined;
150
+ buildCommand?: string | null | undefined;
151
+ outputDirectory?: string | null | undefined;
152
+ ignoredBuildCommand?: string | null | undefined;
153
+ frameworkPreset?: string | null | undefined;
154
+ platformPreset?: string | null | undefined;
155
+ allowUnsupportedPlatformFeatures?: boolean | undefined;
156
+ timeoutSeconds?: number | undefined;
157
+ } | undefined;
158
+ }>>;
159
+ export declare const gitConnectionPatchSchema: z.ZodObject<{
160
+ productionBranch: z.ZodOptional<z.ZodString>;
161
+ cloneUrl: z.ZodOptional<z.ZodString>;
162
+ credential: z.ZodOptional<z.ZodNullable<z.ZodString>>;
163
+ autoDeployProduction: z.ZodOptional<z.ZodBoolean>;
164
+ autoDeployPreviews: z.ZodOptional<z.ZodBoolean>;
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>>;
176
+ }, z.core.$strip>>;
177
+ }, z.core.$strip>;
178
+ export declare const gitConnectionAnalyzeSchema: z.ZodObject<{
179
+ ref: z.ZodOptional<z.ZodString>;
180
+ rootDirectory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
181
+ }, z.core.$strip>;
182
+ export declare const gitConnectionAnalyzeCandidateSchema: z.ZodObject<{
183
+ rootDirectory: z.ZodDefault<z.ZodNullable<z.ZodString>>;
184
+ installDirectory: z.ZodDefault<z.ZodNullable<z.ZodString>>;
185
+ installCommand: z.ZodDefault<z.ZodNullable<z.ZodString>>;
186
+ buildCommand: z.ZodDefault<z.ZodNullable<z.ZodString>>;
187
+ outputDirectory: z.ZodDefault<z.ZodNullable<z.ZodString>>;
188
+ ignoredBuildCommand: z.ZodDefault<z.ZodNullable<z.ZodString>>;
189
+ frameworkPreset: z.ZodDefault<z.ZodNullable<z.ZodString>>;
190
+ platformPreset: z.ZodDefault<z.ZodNullable<z.ZodString>>;
191
+ allowUnsupportedPlatformFeatures: z.ZodDefault<z.ZodBoolean>;
192
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
193
+ workingDirectory: z.ZodString;
194
+ confidence: z.ZodNumber;
195
+ reasons: z.ZodArray<z.ZodString>;
196
+ detectedFiles: z.ZodArray<z.ZodString>;
197
+ }, z.core.$strip>;
198
+ export declare const gitConnectionAnalyzeResponseSchema: z.ZodObject<{
199
+ detected: z.ZodObject<{
200
+ rootDirectory: z.ZodDefault<z.ZodNullable<z.ZodString>>;
201
+ installDirectory: z.ZodDefault<z.ZodNullable<z.ZodString>>;
202
+ installCommand: z.ZodDefault<z.ZodNullable<z.ZodString>>;
203
+ buildCommand: z.ZodDefault<z.ZodNullable<z.ZodString>>;
204
+ outputDirectory: z.ZodDefault<z.ZodNullable<z.ZodString>>;
205
+ ignoredBuildCommand: z.ZodDefault<z.ZodNullable<z.ZodString>>;
206
+ frameworkPreset: z.ZodDefault<z.ZodNullable<z.ZodString>>;
207
+ platformPreset: z.ZodDefault<z.ZodNullable<z.ZodString>>;
208
+ allowUnsupportedPlatformFeatures: z.ZodDefault<z.ZodBoolean>;
209
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
210
+ }, z.core.$strip>;
211
+ detectedFiles: z.ZodArray<z.ZodString>;
212
+ candidates: z.ZodDefault<z.ZodArray<z.ZodObject<{
213
+ rootDirectory: z.ZodDefault<z.ZodNullable<z.ZodString>>;
214
+ installDirectory: z.ZodDefault<z.ZodNullable<z.ZodString>>;
215
+ installCommand: z.ZodDefault<z.ZodNullable<z.ZodString>>;
216
+ buildCommand: z.ZodDefault<z.ZodNullable<z.ZodString>>;
217
+ outputDirectory: z.ZodDefault<z.ZodNullable<z.ZodString>>;
218
+ ignoredBuildCommand: z.ZodDefault<z.ZodNullable<z.ZodString>>;
219
+ frameworkPreset: z.ZodDefault<z.ZodNullable<z.ZodString>>;
220
+ platformPreset: z.ZodDefault<z.ZodNullable<z.ZodString>>;
221
+ allowUnsupportedPlatformFeatures: z.ZodDefault<z.ZodBoolean>;
222
+ timeoutSeconds: z.ZodDefault<z.ZodNumber>;
223
+ workingDirectory: z.ZodString;
224
+ confidence: z.ZodNumber;
225
+ reasons: z.ZodArray<z.ZodString>;
226
+ detectedFiles: z.ZodArray<z.ZodString>;
227
+ }, z.core.$strip>>>;
228
+ platformConfigs: z.ZodArray<z.ZodObject<{
229
+ platform: z.ZodEnum<{
230
+ vercel: "vercel";
231
+ netlify: "netlify";
232
+ "cloudflare-pages": "cloudflare-pages";
233
+ }>;
234
+ rootDirectory: z.ZodNullable<z.ZodString>;
235
+ installDirectory: z.ZodNullable<z.ZodString>;
236
+ installCommand: z.ZodNullable<z.ZodString>;
237
+ buildCommand: z.ZodNullable<z.ZodString>;
238
+ outputDirectory: z.ZodNullable<z.ZodString>;
239
+ unsupportedFeatures: z.ZodArray<z.ZodString>;
240
+ }, z.core.$strip>>;
241
+ unsupportedFeatures: z.ZodArray<z.ZodString>;
242
+ blocked: z.ZodBoolean;
243
+ message: z.ZodNullable<z.ZodString>;
244
+ }, z.core.$strip>;
245
+ export declare const githubInstallationSchema: z.ZodObject<{
246
+ id: z.ZodString;
247
+ accountLogin: z.ZodString;
248
+ accountType: z.ZodNullable<z.ZodString>;
249
+ htmlUrl: z.ZodNullable<z.ZodString>;
250
+ }, z.core.$strip>;
251
+ export declare const githubInstallationsResponseSchema: z.ZodObject<{
252
+ appConfigured: z.ZodBoolean;
253
+ installUrl: z.ZodNullable<z.ZodString>;
254
+ installations: z.ZodArray<z.ZodObject<{
255
+ id: z.ZodString;
256
+ accountLogin: z.ZodString;
257
+ accountType: z.ZodNullable<z.ZodString>;
258
+ htmlUrl: z.ZodNullable<z.ZodString>;
259
+ }, z.core.$strip>>;
260
+ }, 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
+ export declare const githubRepositorySchema: z.ZodObject<{
274
+ id: z.ZodString;
275
+ name: z.ZodString;
276
+ fullName: z.ZodString;
277
+ defaultBranch: z.ZodString;
278
+ cloneUrl: z.ZodString;
279
+ private: z.ZodBoolean;
280
+ }, z.core.$strip>;
281
+ export type BuildTarget = z.infer<typeof buildTarget>;
282
+ export type BuildTrigger = z.infer<typeof buildTrigger>;
283
+ export type BuildEnvironmentScope = z.infer<typeof buildEnvironmentScope>;
284
+ export type GitBuildSettings = z.infer<typeof gitBuildSettingsSchema>;
285
+ export type GitConnection = z.infer<typeof gitConnectionSchema>;
286
+ export type GitConnectionCreate = z.infer<typeof gitConnectionCreateSchema>;
287
+ export type GitConnectionPatch = z.infer<typeof gitConnectionPatchSchema>;
288
+ export type GitConnectionAnalyzeResponse = z.infer<typeof gitConnectionAnalyzeResponseSchema>;
@@ -0,0 +1,116 @@
1
+ import { z } from "zod";
2
+ import { BuildSettingsSchema } from "./builds.js";
3
+ import { gitProvider } from "./enums.js";
4
+ const nullableString = z.string().trim().min(1).nullable();
5
+ export const buildTargetValues = ["production", "preview"];
6
+ export const buildTriggerValues = ["manual", "push", "pull_request", "retry"];
7
+ export const buildTarget = z.enum(buildTargetValues);
8
+ export const buildTrigger = z.enum(buildTriggerValues);
9
+ export const buildEnvironmentScopeValues = [
10
+ "runtime",
11
+ "build",
12
+ "build:production",
13
+ "build:preview",
14
+ ];
15
+ export const buildEnvironmentScope = z.enum(buildEnvironmentScopeValues);
16
+ export const gitBuildSettingsSchema = BuildSettingsSchema;
17
+ export const gitPlatformDetectionSchema = z.object({
18
+ platform: z.enum(["vercel", "netlify", "cloudflare-pages"]),
19
+ rootDirectory: nullableString,
20
+ installDirectory: nullableString,
21
+ installCommand: nullableString,
22
+ buildCommand: nullableString,
23
+ outputDirectory: nullableString,
24
+ unsupportedFeatures: z.array(z.string()),
25
+ });
26
+ export const gitConnectionSchema = z.object({
27
+ id: z.string(),
28
+ spaceId: z.string(),
29
+ provider: gitProvider,
30
+ repositoryId: z.string().nullable(),
31
+ repositoryName: z.string(),
32
+ repositoryFullName: z.string(),
33
+ defaultBranch: z.string(),
34
+ productionBranch: z.string(),
35
+ cloneUrl: z.string(),
36
+ githubInstallationId: z.string().nullable(),
37
+ credentialConfigured: z.boolean(),
38
+ autoDeployProduction: z.boolean(),
39
+ autoDeployPreviews: z.boolean(),
40
+ buildSettings: gitBuildSettingsSchema,
41
+ connectedUserId: z.string().nullable(),
42
+ createdAt: z.string().datetime(),
43
+ updatedAt: z.string().datetime(),
44
+ });
45
+ export const gitConnectionCreateSchema = z
46
+ .object({
47
+ provider: gitProvider.default("github"),
48
+ repositoryId: z.string().trim().min(1).nullable().optional(),
49
+ repositoryName: z.string().trim().min(1).optional(),
50
+ repositoryFullName: z.string().trim().min(1),
51
+ defaultBranch: z.string().trim().min(1).default("main"),
52
+ productionBranch: z.string().trim().min(1).optional(),
53
+ cloneUrl: z.string().trim().min(1),
54
+ githubInstallationId: z.string().trim().min(1).nullable().optional(),
55
+ credential: z.string().trim().min(1).nullable().optional(),
56
+ autoDeployProduction: z.boolean().default(true),
57
+ autoDeployPreviews: z.boolean().default(true),
58
+ buildSettings: gitBuildSettingsSchema.partial().optional(),
59
+ })
60
+ .transform((value) => ({
61
+ ...value,
62
+ productionBranch: value.productionBranch ?? value.defaultBranch,
63
+ }));
64
+ export const gitConnectionPatchSchema = z.object({
65
+ productionBranch: z.string().trim().min(1).optional(),
66
+ cloneUrl: z.string().trim().min(1).optional(),
67
+ credential: z.string().trim().min(1).nullable().optional(),
68
+ autoDeployProduction: z.boolean().optional(),
69
+ autoDeployPreviews: z.boolean().optional(),
70
+ buildSettings: gitBuildSettingsSchema.partial().optional(),
71
+ });
72
+ export const gitConnectionAnalyzeSchema = z.object({
73
+ ref: z.string().trim().min(1).optional(),
74
+ rootDirectory: z.string().trim().min(1).nullable().optional(),
75
+ });
76
+ export const gitConnectionAnalyzeCandidateSchema = gitBuildSettingsSchema.extend({
77
+ workingDirectory: z.string(),
78
+ confidence: z.number().int().nonnegative(),
79
+ reasons: z.array(z.string()),
80
+ detectedFiles: z.array(z.string()),
81
+ });
82
+ export const gitConnectionAnalyzeResponseSchema = z.object({
83
+ detected: gitBuildSettingsSchema,
84
+ detectedFiles: z.array(z.string()),
85
+ candidates: z.array(gitConnectionAnalyzeCandidateSchema).default([]),
86
+ platformConfigs: z.array(gitPlatformDetectionSchema),
87
+ unsupportedFeatures: z.array(z.string()),
88
+ blocked: z.boolean(),
89
+ message: z.string().nullable(),
90
+ });
91
+ export const githubInstallationSchema = z.object({
92
+ id: z.string(),
93
+ accountLogin: z.string(),
94
+ accountType: z.string().nullable(),
95
+ htmlUrl: z.string().url().nullable(),
96
+ });
97
+ export const githubInstallationsResponseSchema = z.object({
98
+ appConfigured: z.boolean(),
99
+ installUrl: z.string().url().nullable(),
100
+ installations: z.array(githubInstallationSchema),
101
+ });
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
+ export const githubRepositorySchema = z.object({
110
+ id: z.string(),
111
+ name: z.string(),
112
+ fullName: z.string(),
113
+ defaultBranch: z.string(),
114
+ cloneUrl: z.string(),
115
+ private: z.boolean(),
116
+ });
@@ -0,0 +1,35 @@
1
+ export declare const ID_PREFIXES: {
2
+ readonly ten: "Tenant";
3
+ readonly site: "Site";
4
+ readonly spc: "Space";
5
+ readonly ver: "Version";
6
+ readonly ann: "AnnotationThread";
7
+ readonly bld: "Build";
8
+ readonly dom: "Domain";
9
+ readonly dbn: "DomainBinding";
10
+ readonly sda: "SiteDomainAssignment";
11
+ readonly key: "ApiKey";
12
+ readonly upl: "UploadSession";
13
+ readonly psh: "PushNewSession";
14
+ readonly imp: "SpaceImport";
15
+ readonly exp: "SpaceExport";
16
+ readonly trf: "SpaceTransfer";
17
+ readonly op: "Operation";
18
+ readonly whk: "Webhook";
19
+ readonly whd: "WebhookDelivery";
20
+ readonly rec: "DnsRecord";
21
+ readonly evt: "ActivityEvent";
22
+ readonly pvc: "ProviderClient";
23
+ readonly tgs: "TagSet";
24
+ readonly tgv: "TagVersion";
25
+ readonly tgr: "TagRelease";
26
+ readonly tga: "TagRuntimeArtifact";
27
+ readonly tgp: "TagPreviewSession";
28
+ readonly bhk: "BuildHook";
29
+ };
30
+ export type IdPrefix = keyof typeof ID_PREFIXES;
31
+ /** Any registered public resource id, e.g. `spc_…` or `ver_…`. */
32
+ export type Id = `${IdPrefix}_${string}`;
33
+ export declare const MAIN_TENANT_ID = "ten_main";
34
+ /** Mint a globally unique id for a registered public resource prefix. */
35
+ export declare function createId<P extends IdPrefix>(prefix: P): `${P}_${string}`;
@@ -0,0 +1,45 @@
1
+ // Id prefix registry (internal-docs/platform.md "Id prefix registry", L1106-1127).
2
+ // Every PUBLIC resource registers a prefix here before it ships; ids are globally
3
+ // unique and handle ids (operations, exports, imports, transfers, builds) are
4
+ // fetchable at a top-level collection with no extra context. Control-plane-internal
5
+ // rows that never surface as public resource ids mint through the internal prefix
6
+ // list in `apps/control-plane/src/lib/ids.ts`; promote a prefix into this table
7
+ // before exposing the resource.
8
+ export const ID_PREFIXES = {
9
+ ten: "Tenant",
10
+ site: "Site",
11
+ spc: "Space",
12
+ ver: "Version",
13
+ ann: "AnnotationThread",
14
+ bld: "Build",
15
+ dom: "Domain",
16
+ dbn: "DomainBinding",
17
+ sda: "SiteDomainAssignment",
18
+ key: "ApiKey",
19
+ upl: "UploadSession",
20
+ psh: "PushNewSession",
21
+ imp: "SpaceImport",
22
+ exp: "SpaceExport",
23
+ trf: "SpaceTransfer",
24
+ op: "Operation",
25
+ whk: "Webhook",
26
+ whd: "WebhookDelivery",
27
+ rec: "DnsRecord",
28
+ evt: "ActivityEvent",
29
+ pvc: "ProviderClient",
30
+ tgs: "TagSet",
31
+ tgv: "TagVersion",
32
+ tgr: "TagRelease",
33
+ tga: "TagRuntimeArtifact",
34
+ tgp: "TagPreviewSession",
35
+ // Reserved for the deferred build-hook surface; never minted yet.
36
+ bhk: "BuildHook",
37
+ };
38
+ // The main Stattic tenant every self-serve team/user/resource lives under. A
39
+ // well-known CONSTANT, never configuration: grammatically a normal tenant id with
40
+ // zero special cases in contracts, policy URIs, or parsers (spec L1100-1105).
41
+ export const MAIN_TENANT_ID = "ten_main";
42
+ /** Mint a globally unique id for a registered public resource prefix. */
43
+ export function createId(prefix) {
44
+ return `${prefix}_${crypto.randomUUID().replaceAll("-", "")}`;
45
+ }
@@ -0,0 +1,6 @@
1
+ import { z } from "zod";
2
+ export declare const IntercomMessengerJwtSchema: z.ZodObject<{
3
+ token: z.ZodString;
4
+ expiresAt: z.ZodString;
5
+ }, z.core.$strip>;
6
+ export type IntercomMessengerJwt = z.infer<typeof IntercomMessengerJwtSchema>;
@@ -0,0 +1,5 @@
1
+ import { z } from "zod";
2
+ export const IntercomMessengerJwtSchema = z.object({
3
+ token: z.string().min(1).describe("Server-signed Intercom Messenger JWT."),
4
+ expiresAt: z.string().datetime().describe("JWT expiry timestamp."),
5
+ });
@@ -0,0 +1,103 @@
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
+ export declare const manifestFileSchema: z.ZodObject<{
8
+ path: z.ZodString;
9
+ size: z.ZodNumber;
10
+ sha256: z.ZodOptional<z.ZodString>;
11
+ contentType: z.ZodOptional<z.ZodString>;
12
+ sourceUrl: z.ZodOptional<z.ZodString>;
13
+ }, z.core.$strip>;
14
+ export declare const pendingUploadSchema: z.ZodObject<{
15
+ path: z.ZodString;
16
+ size: z.ZodNumber;
17
+ sha256: z.ZodOptional<z.ZodString>;
18
+ sourceUrl: z.ZodOptional<z.ZodString>;
19
+ }, z.core.$strip>;
20
+ export declare const uploadSessionModeSchema: z.ZodEnum<{
21
+ dist: "dist";
22
+ source: "source";
23
+ }>;
24
+ export declare const uploadTargetSchema: z.ZodObject<{
25
+ path: z.ZodString;
26
+ method: z.ZodEnum<{
27
+ PUT: "PUT";
28
+ POST: "POST";
29
+ }>;
30
+ url: z.ZodUnion<[z.ZodString, z.ZodString]>;
31
+ headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
32
+ body: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
33
+ kind: z.ZodLiteral<"url">;
34
+ url: z.ZodString;
35
+ }, z.core.$strip>], "kind">>;
36
+ size: z.ZodOptional<z.ZodNumber>;
37
+ maxBytes: z.ZodOptional<z.ZodNumber>;
38
+ sha256: z.ZodOptional<z.ZodString>;
39
+ contentType: z.ZodOptional<z.ZodString>;
40
+ }, z.core.$strip>;
41
+ export declare const uploadInstructionsSchema: z.ZodObject<{
42
+ id: z.ZodString;
43
+ mode: z.ZodEnum<{
44
+ dist: "dist";
45
+ source: "source";
46
+ }>;
47
+ expiresAt: z.ZodString;
48
+ summary: z.ZodObject<{
49
+ upload: z.ZodNumber;
50
+ reused: z.ZodNumber;
51
+ ignored: z.ZodNumber;
52
+ }, z.core.$strip>;
53
+ targets: z.ZodDefault<z.ZodArray<z.ZodObject<{
54
+ path: z.ZodString;
55
+ method: z.ZodEnum<{
56
+ PUT: "PUT";
57
+ POST: "POST";
58
+ }>;
59
+ url: z.ZodUnion<[z.ZodString, z.ZodString]>;
60
+ headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
61
+ body: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
62
+ kind: z.ZodLiteral<"url">;
63
+ url: z.ZodString;
64
+ }, z.core.$strip>], "kind">>;
65
+ size: z.ZodOptional<z.ZodNumber>;
66
+ maxBytes: z.ZodOptional<z.ZodNumber>;
67
+ sha256: z.ZodOptional<z.ZodString>;
68
+ contentType: z.ZodOptional<z.ZodString>;
69
+ }, z.core.$strip>>>;
70
+ links: z.ZodObject<{
71
+ resume: z.ZodString;
72
+ finalize: z.ZodString;
73
+ }, z.core.$strip>;
74
+ details: z.ZodOptional<z.ZodObject<{
75
+ reused: z.ZodOptional<z.ZodArray<z.ZodObject<{
76
+ path: z.ZodString;
77
+ reason: z.ZodString;
78
+ }, z.core.$strip>>>;
79
+ ignored: z.ZodOptional<z.ZodArray<z.ZodObject<{
80
+ path: z.ZodString;
81
+ reason: z.ZodString;
82
+ }, z.core.$strip>>>;
83
+ diagnostics: z.ZodOptional<z.ZodArray<z.ZodObject<{
84
+ code: z.ZodString;
85
+ severity: z.ZodEnum<{
86
+ info: "info";
87
+ warning: "warning";
88
+ error: "error";
89
+ }>;
90
+ message: z.ZodString;
91
+ path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
92
+ provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
93
+ wpcloud: "wpcloud";
94
+ dns: "dns";
95
+ registrar: "registrar";
96
+ runtime: "runtime";
97
+ }>>>;
98
+ details: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
99
+ fix: z.ZodOptional<z.ZodNullable<z.ZodString>>;
100
+ retryable: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
101
+ }, z.core.$strip>>>;
102
+ }, z.core.$strip>>;
103
+ }, z.core.$strip>;