@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,196 @@
1
+ import { z } from "zod";
2
+ export declare const spaceStatusValues: readonly ["provisioning", "active", "updating", "moving", "deleting", "failed"];
3
+ export declare const spaceStatus: z.ZodEnum<{
4
+ active: "active";
5
+ provisioning: "provisioning";
6
+ updating: "updating";
7
+ moving: "moving";
8
+ deleting: "deleting";
9
+ failed: "failed";
10
+ }>;
11
+ export declare const spaceDisabledReasonCodeValues: readonly ["anonymous_expired", "abuse_takedown", "tenant_suspended", "site_suspended"];
12
+ export declare const spaceDisabledReasonCode: z.ZodEnum<{
13
+ anonymous_expired: "anonymous_expired";
14
+ abuse_takedown: "abuse_takedown";
15
+ tenant_suspended: "tenant_suspended";
16
+ site_suspended: "site_suspended";
17
+ }>;
18
+ export declare const spaceTransferStatusValues: readonly ["pending_confirmation", "confirming_domains", "moving", "completed", "canceled", "expired"];
19
+ export declare const spaceTransferStatus: z.ZodEnum<{
20
+ moving: "moving";
21
+ pending_confirmation: "pending_confirmation";
22
+ confirming_domains: "confirming_domains";
23
+ completed: "completed";
24
+ canceled: "canceled";
25
+ expired: "expired";
26
+ }>;
27
+ export declare const siteIsolationValues: readonly ["site", "space"];
28
+ export declare const siteIsolation: z.ZodEnum<{
29
+ site: "site";
30
+ space: "space";
31
+ }>;
32
+ export declare const tenantKindValues: readonly ["main", "platform", "partner", "internal"];
33
+ export declare const tenantKind: z.ZodEnum<{
34
+ internal: "internal";
35
+ main: "main";
36
+ platform: "platform";
37
+ partner: "partner";
38
+ }>;
39
+ export declare const tenantStatusValues: readonly ["active", "past_due", "suspended", "deleted"];
40
+ export declare const tenantStatus: z.ZodEnum<{
41
+ active: "active";
42
+ past_due: "past_due";
43
+ suspended: "suspended";
44
+ deleted: "deleted";
45
+ }>;
46
+ export declare const providerClientStatusValues: readonly ["active", "disabled"];
47
+ export declare const providerClientStatus: z.ZodEnum<{
48
+ active: "active";
49
+ disabled: "disabled";
50
+ }>;
51
+ export declare const siteKindValues: readonly ["static_runtime"];
52
+ export declare const siteKind: z.ZodEnum<{
53
+ static_runtime: "static_runtime";
54
+ }>;
55
+ export declare const siteStatusValues: readonly ["ready_pool", "active", "provisioning", "degraded", "suspended", "deleted"];
56
+ export declare const siteStatus: z.ZodEnum<{
57
+ active: "active";
58
+ provisioning: "provisioning";
59
+ suspended: "suspended";
60
+ deleted: "deleted";
61
+ ready_pool: "ready_pool";
62
+ degraded: "degraded";
63
+ }>;
64
+ export declare const siteClassValues: readonly ["anonymous_pool", "shared_org", "dedicated_space"];
65
+ export declare const siteClass: z.ZodEnum<{
66
+ anonymous_pool: "anonymous_pool";
67
+ shared_org: "shared_org";
68
+ dedicated_space: "dedicated_space";
69
+ }>;
70
+ export declare const publishSourceKindValues: readonly ["direct_upload", "cli", "dashboard", "api", "git", "import", "agent", "build", "variable_update", "config_update"];
71
+ export declare const publishSourceKind: z.ZodEnum<{
72
+ build: "build";
73
+ agent: "agent";
74
+ api: "api";
75
+ direct_upload: "direct_upload";
76
+ cli: "cli";
77
+ dashboard: "dashboard";
78
+ git: "git";
79
+ import: "import";
80
+ variable_update: "variable_update";
81
+ config_update: "config_update";
82
+ }>;
83
+ export declare const versionStatusValues: readonly ["building", "prepared", "created", "uploading", "uploaded", "finalizing", "ready", "failed", "expired", "canceled"];
84
+ export declare const versionStatus: z.ZodEnum<{
85
+ failed: "failed";
86
+ canceled: "canceled";
87
+ expired: "expired";
88
+ building: "building";
89
+ prepared: "prepared";
90
+ created: "created";
91
+ uploading: "uploading";
92
+ uploaded: "uploaded";
93
+ finalizing: "finalizing";
94
+ ready: "ready";
95
+ }>;
96
+ export declare const gitProviderValues: readonly ["github", "gitlab", "bitbucket", "generic"];
97
+ export declare const gitProvider: z.ZodEnum<{
98
+ github: "github";
99
+ gitlab: "gitlab";
100
+ bitbucket: "bitbucket";
101
+ generic: "generic";
102
+ }>;
103
+ export declare const VERSION_IN_FLIGHT_STATUSES: readonly ["created", "uploading", "uploaded", "finalizing"];
104
+ export declare const buildStatusValues: readonly ["waiting_for_source", "uploading_source", "queued", "running", "succeeded", "failed", "canceled", "skipped"];
105
+ export declare const buildStatus: z.ZodEnum<{
106
+ failed: "failed";
107
+ canceled: "canceled";
108
+ waiting_for_source: "waiting_for_source";
109
+ uploading_source: "uploading_source";
110
+ queued: "queued";
111
+ running: "running";
112
+ succeeded: "succeeded";
113
+ skipped: "skipped";
114
+ }>;
115
+ export declare const diagnosticSeverity: z.ZodEnum<{
116
+ info: "info";
117
+ warning: "warning";
118
+ error: "error";
119
+ }>;
120
+ export declare const diagnosticProvider: z.ZodEnum<{
121
+ registrar: "registrar";
122
+ wpcloud: "wpcloud";
123
+ dns: "dns";
124
+ runtime: "runtime";
125
+ }>;
126
+ export declare const domainOwnershipTypeValues: readonly ["external", "registered", "transferred", "system"];
127
+ export declare const domainDnsModeValues: readonly ["external", "stattic_nameservers", "registrar_dns"];
128
+ export declare const domainRegistrarProviderValues: readonly ["none", "dsapi", "manual"];
129
+ export declare const domainDnsProviderValues: readonly ["none", "stattic", "route53", "cloudflare", "vercel", "wpcom", "pressable", "dsapi", "manual"];
130
+ export declare const domainLifecycleStatusValues: readonly ["active", "pending_registration", "pending_transfer", "expired", "suspended", "redemption", "failed"];
131
+ export declare const safetyCategoryValues: readonly ["csam", "malware", "phishing", "spam", "copyright", "fraud", "hateful_content", "extremism", "illegal_content", "privacy_violation", "compromised_account", "other_violation"];
132
+ export declare const safetyCategory: z.ZodEnum<{
133
+ csam: "csam";
134
+ malware: "malware";
135
+ phishing: "phishing";
136
+ spam: "spam";
137
+ copyright: "copyright";
138
+ fraud: "fraud";
139
+ hateful_content: "hateful_content";
140
+ extremism: "extremism";
141
+ illegal_content: "illegal_content";
142
+ privacy_violation: "privacy_violation";
143
+ compromised_account: "compromised_account";
144
+ other_violation: "other_violation";
145
+ }>;
146
+ export declare const SAFETY_SEVERITY: {
147
+ readonly suspicious: 1;
148
+ readonly low: 2;
149
+ readonly medium: 3;
150
+ readonly high: 4;
151
+ readonly critical: 5;
152
+ };
153
+ export declare const safetySeverity: z.ZodNumber;
154
+ export declare const enforcementTierValues: readonly ["record", "space_takedown", "account_suspend"];
155
+ export declare const enforcementTier: z.ZodEnum<{
156
+ record: "record";
157
+ space_takedown: "space_takedown";
158
+ account_suspend: "account_suspend";
159
+ }>;
160
+ export declare const cachePurgeAction: z.ZodEnum<{
161
+ invalidate: "invalidate";
162
+ }>;
163
+ export declare const cachePurgeTarget: z.ZodEnum<{
164
+ space: "space";
165
+ domain: "domain";
166
+ path: "path";
167
+ }>;
168
+ export declare const bullJobStatus: z.ZodEnum<{
169
+ active: "active";
170
+ failed: "failed";
171
+ completed: "completed";
172
+ delayed: "delayed";
173
+ prioritized: "prioritized";
174
+ waiting: "waiting";
175
+ "waiting-children": "waiting-children";
176
+ }>;
177
+ export declare const operationStatus: z.ZodEnum<{
178
+ failed: "failed";
179
+ canceled: "canceled";
180
+ queued: "queued";
181
+ running: "running";
182
+ succeeded: "succeeded";
183
+ }>;
184
+ export type VersionStatus = z.infer<typeof versionStatus>;
185
+ export type GitProvider = z.infer<typeof gitProvider>;
186
+ export type PublishSourceKind = z.infer<typeof publishSourceKind>;
187
+ export type SiteIsolation = z.infer<typeof siteIsolation>;
188
+ export type TenantKind = z.infer<typeof tenantKind>;
189
+ export type TenantStatus = z.infer<typeof tenantStatus>;
190
+ export type ProviderClientStatus = z.infer<typeof providerClientStatus>;
191
+ export type SiteKind = z.infer<typeof siteKind>;
192
+ export type SiteStatus = z.infer<typeof siteStatus>;
193
+ export type SiteClass = z.infer<typeof siteClass>;
194
+ export type OperationStatus = z.infer<typeof operationStatus>;
195
+ export type SafetyCategory = z.infer<typeof safetyCategory>;
196
+ export type EnforcementTier = z.infer<typeof enforcementTier>;
@@ -0,0 +1,211 @@
1
+ import { z } from "zod";
2
+ // Space operation-lifecycle axis (internal-docs/platform.md "Space"): exactly
3
+ // these six. Serving (disabled) and deletion (deletedAt) are separate axes —
4
+ // a disabled space can still be updating or moving.
5
+ export const spaceStatusValues = [
6
+ "provisioning",
7
+ "active",
8
+ "updating",
9
+ "moving",
10
+ "deleting",
11
+ "failed",
12
+ ];
13
+ export const spaceStatus = z.enum(spaceStatusValues);
14
+ // Serving-axis disable reasons (internal-docs/platform.md "Space"): exactly
15
+ // these four. Malware takedowns are `abuse_takedown` with
16
+ // `details.source = "malware_scan"`.
17
+ export const spaceDisabledReasonCodeValues = [
18
+ "anonymous_expired",
19
+ "abuse_takedown",
20
+ "tenant_suspended",
21
+ "site_suspended",
22
+ ];
23
+ export const spaceDisabledReasonCode = z.enum(spaceDisabledReasonCodeValues);
24
+ // SpaceTransfer status machine (internal-docs/platform.md "Transfer
25
+ // semantics"), stored directly — there is no separate DB vocabulary. No
26
+ // `failed` state: a failed move reverts to `pending_confirmation` with a
27
+ // diagnostic. `confirming_domains` gates the move on re-confirmation of the
28
+ // space's bound domains; withdraw (from-side) and decline (to-side) both land
29
+ // on `canceled`.
30
+ export const spaceTransferStatusValues = [
31
+ "pending_confirmation",
32
+ "confirming_domains",
33
+ "moving",
34
+ "completed",
35
+ "canceled",
36
+ "expired",
37
+ ];
38
+ export const spaceTransferStatus = z.enum(spaceTransferStatusValues);
39
+ // Site axes per internal-docs/platform.md. `isolation` controls
40
+ // whether settings/access default to the site or to each space.
41
+ export const siteIsolationValues = ["site", "space"];
42
+ export const siteIsolation = z.enum(siteIsolationValues);
43
+ // A tenant is the platform-account boundary that owns every resource (internal-docs/platform.md
44
+ // "Tenant -> Site -> Space"), Stripe-style. `main` is the single well-known
45
+ // Stattic account (`ten_main`) all self-serve teams/users live under;
46
+ // `platform` and `partner` are host integrations with their own user
47
+ // directories and/or external customers; `internal` is for Stattic-operated
48
+ // infrastructure tenants.
49
+ export const tenantKindValues = ["main", "platform", "partner", "internal"];
50
+ export const tenantKind = z.enum(tenantKindValues);
51
+ // `past_due` is the billing-grace state: mutations are rejected immediately
52
+ // (`tenant_past_due`) but serving continues until `servingGraceUntil`, after
53
+ // which the tenant transitions to `suspended` and goes dark.
54
+ export const tenantStatusValues = ["active", "past_due", "suspended", "deleted"];
55
+ export const tenantStatus = z.enum(tenantStatusValues);
56
+ // ProviderClient is the WP.Cloud account identity sites are provisioned under
57
+ // (operator-only resource, `pvc_` prefix).
58
+ export const providerClientStatusValues = ["active", "disabled"];
59
+ export const providerClientStatus = z.enum(providerClientStatusValues);
60
+ // Site (internal-docs/platform.md "Site", `site_`): THE placement unit. One
61
+ // row per WP.Cloud site; spaces point at it via `space.siteId`.
62
+ export const siteKindValues = ["static_runtime"];
63
+ export const siteKind = z.enum(siteKindValues);
64
+ // `ready_pool` is a pre-provisioned warm site waiting to be claimed for an
65
+ // anonymous space (claim = CAS on status, wave A1).
66
+ export const siteStatusValues = [
67
+ "ready_pool",
68
+ "active",
69
+ "provisioning",
70
+ "degraded",
71
+ "suspended",
72
+ "deleted",
73
+ ];
74
+ export const siteStatus = z.enum(siteStatusValues);
75
+ // Placement class for shared-pool sites: anonymous pool partition, one shared
76
+ // site per team, or a site dedicated to a single space / tenant-created site.
77
+ export const siteClassValues = ["anonymous_pool", "shared_org", "dedicated_space"];
78
+ export const siteClass = z.enum(siteClassValues);
79
+ // PublishSource.kind (internal-docs/platform.md "PublishSource"): the single
80
+ // provenance axis for how a version came to exist. `variable_update` and
81
+ // `config_update` versions are minted by cascades/config regeneration.
82
+ export const publishSourceKindValues = [
83
+ "direct_upload",
84
+ "cli",
85
+ "dashboard",
86
+ "api",
87
+ "git",
88
+ "import",
89
+ "agent",
90
+ "build",
91
+ "variable_update",
92
+ "config_update",
93
+ ];
94
+ export const publishSourceKind = z.enum(publishSourceKindValues);
95
+ export const versionStatusValues = [
96
+ // Spec state machine (internal-docs/platform.md "Upload Contract"):
97
+ // created -> uploading -> uploaded -> finalizing -> ready, with terminal
98
+ // failed/canceled/expired. Build runs are tracked on the Build resource;
99
+ // a building version stays `created` until upload starts.
100
+ "building",
101
+ "prepared",
102
+ "created",
103
+ "uploading",
104
+ "uploaded",
105
+ "finalizing",
106
+ "ready",
107
+ "failed",
108
+ // Terminal: draft TTL elapsed before finalize, or retention window ended.
109
+ // Bytes purge through the runtime version-delete path; metadata and
110
+ // provenance stay for audit.
111
+ "expired",
112
+ "canceled",
113
+ ];
114
+ export const versionStatus = z.enum(versionStatusValues);
115
+ export const gitProviderValues = ["github", "gitlab", "bitbucket", "generic"];
116
+ export const gitProvider = z.enum(gitProviderValues);
117
+ // Pre-ready, non-terminal statuses: a version in one of these is in flight.
118
+ export const VERSION_IN_FLIGHT_STATUSES = [
119
+ "created",
120
+ "uploading",
121
+ "uploaded",
122
+ "finalizing",
123
+ ];
124
+ // Build resource statuses (internal-docs/platform.md "Build", `bld_`).
125
+ export const buildStatusValues = [
126
+ "waiting_for_source",
127
+ "uploading_source",
128
+ "queued",
129
+ "running",
130
+ "succeeded",
131
+ "failed",
132
+ "canceled",
133
+ "skipped",
134
+ ];
135
+ export const buildStatus = z.enum(buildStatusValues);
136
+ export const diagnosticSeverity = z.enum(["info", "warning", "error"]);
137
+ // Upstream system a Diagnostic originated from (internal-docs/platform.md L1621). Absent when
138
+ // the diagnostic is Stattic's own (validation, routing compile, upload policy, ...).
139
+ export const diagnosticProvider = z.enum(["wpcloud", "dns", "registrar", "runtime"]);
140
+ // Internal domain DB-column vocabularies (consumed by the control-plane schema;
141
+ // never part of the public Domain contract, which lives in contracts/domains.ts).
142
+ export const domainOwnershipTypeValues = [
143
+ "external",
144
+ "registered",
145
+ "transferred",
146
+ "system",
147
+ ];
148
+ export const domainDnsModeValues = ["external", "stattic_nameservers", "registrar_dns"];
149
+ export const domainRegistrarProviderValues = ["none", "dsapi", "manual"];
150
+ export const domainDnsProviderValues = [
151
+ "none",
152
+ "stattic",
153
+ "route53",
154
+ "cloudflare",
155
+ "vercel",
156
+ "wpcom",
157
+ "pressable",
158
+ "dsapi",
159
+ "manual",
160
+ ];
161
+ export const domainLifecycleStatusValues = [
162
+ "active",
163
+ "pending_registration",
164
+ "pending_transfer",
165
+ "expired",
166
+ "suspended",
167
+ "redemption",
168
+ "failed",
169
+ ];
170
+ // Abuse & safety taxonomy (WP.Cloud subset). The single category axis shared by
171
+ // scan results, IP blocks, enforcement policies, and review items. Severity is
172
+ // an ordinal 1-5 (suspicious..critical); enforcement tier is the action class a
173
+ // (category, severity) pair maps to.
174
+ export const safetyCategoryValues = [
175
+ "csam",
176
+ "malware",
177
+ "phishing",
178
+ "spam",
179
+ "copyright",
180
+ "fraud",
181
+ "hateful_content",
182
+ "extremism",
183
+ "illegal_content",
184
+ "privacy_violation",
185
+ "compromised_account",
186
+ "other_violation",
187
+ ];
188
+ export const safetyCategory = z.enum(safetyCategoryValues);
189
+ // 1 = suspicious, 2 = low, 3 = medium, 4 = high, 5 = critical.
190
+ export const SAFETY_SEVERITY = {
191
+ suspicious: 1,
192
+ low: 2,
193
+ medium: 3,
194
+ high: 4,
195
+ critical: 5,
196
+ };
197
+ export const safetySeverity = z.number().int().min(1).max(5);
198
+ export const enforcementTierValues = ["record", "space_takedown", "account_suspend"];
199
+ export const enforcementTier = z.enum(enforcementTierValues);
200
+ export const cachePurgeAction = z.enum(["invalidate"]);
201
+ export const cachePurgeTarget = z.enum(["space", "domain", "path"]);
202
+ export const bullJobStatus = z.enum([
203
+ "active",
204
+ "completed",
205
+ "delayed",
206
+ "failed",
207
+ "prioritized",
208
+ "waiting",
209
+ "waiting-children",
210
+ ]);
211
+ export const operationStatus = z.enum(["queued", "running", "succeeded", "failed", "canceled"]);