@spacefast/common 0.0.23 → 0.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/brand-assets/LICENSE-Haskoy.txt +93 -0
  2. package/brand-assets/haskoy-latin-variable.woff2 +0 -0
  3. package/brand-assets/spacefast-favicon.svg +4 -4
  4. package/brand-assets/spacefast-sf-full-bleed.svg +3 -3
  5. package/brand-assets/spacefast-wordmark.svg +2 -4
  6. package/dist/agents/connect-targets.js +1 -1
  7. package/dist/agents/private-key-oauth.d.ts +0 -1
  8. package/dist/agents/private-key-oauth.js +46 -63
  9. package/dist/brand-assets-build.js +4 -6
  10. package/dist/brand-assets.d.ts +5 -15
  11. package/dist/brand-assets.js +15 -14
  12. package/dist/config/domains.d.ts +47 -7
  13. package/dist/config/domains.js +66 -10
  14. package/dist/config/index.d.ts +0 -1
  15. package/dist/config/index.js +0 -1
  16. package/dist/contracts/abuse.d.ts +2 -0
  17. package/dist/contracts/abuse.js +12 -0
  18. package/dist/contracts/access.d.ts +124 -12
  19. package/dist/contracts/access.js +73 -9
  20. package/dist/contracts/activity.d.ts +1 -1
  21. package/dist/contracts/activity.js +5 -12
  22. package/dist/contracts/api-keys.d.ts +21 -21
  23. package/dist/contracts/api-keys.js +2 -2
  24. package/dist/contracts/beta.js +1 -1
  25. package/dist/contracts/billing.d.ts +3 -35
  26. package/dist/contracts/billing.js +33 -52
  27. package/dist/contracts/builds.d.ts +30 -18
  28. package/dist/contracts/builds.js +28 -9
  29. package/dist/contracts/channels.js +1 -1
  30. package/dist/contracts/cli.d.ts +10 -0
  31. package/dist/contracts/cli.js +10 -0
  32. package/dist/contracts/collab-public.d.ts +63 -0
  33. package/dist/contracts/collab-public.js +46 -0
  34. package/dist/contracts/comments.d.ts +282 -53
  35. package/dist/contracts/comments.js +173 -52
  36. package/dist/contracts/common.d.ts +3 -3
  37. package/dist/contracts/common.js +5 -5
  38. package/dist/contracts/crons.d.ts +35 -0
  39. package/dist/contracts/crons.js +42 -0
  40. package/dist/contracts/device-auth.d.ts +6 -6
  41. package/dist/contracts/device-auth.js +2 -2
  42. package/dist/contracts/docs.js +2 -2
  43. package/dist/contracts/domains.d.ts +38 -27
  44. package/dist/contracts/domains.js +29 -2
  45. package/dist/contracts/enums.d.ts +34 -30
  46. package/dist/contracts/enums.js +62 -48
  47. package/dist/contracts/error-code-meta.d.ts +50 -125
  48. package/dist/contracts/error-code-meta.js +29 -41
  49. package/dist/contracts/error-codes.d.ts +1 -1
  50. package/dist/contracts/error-codes.js +14 -33
  51. package/dist/contracts/execution.d.ts +47 -66
  52. package/dist/contracts/execution.js +53 -49
  53. package/dist/contracts/feature-lifecycle-core.d.ts +0 -6
  54. package/dist/contracts/feature-lifecycle-core.js +2 -31
  55. package/dist/contracts/feature-lifecycle.d.ts +12 -52
  56. package/dist/contracts/feature-lifecycle.js +16 -59
  57. package/dist/contracts/features.d.ts +48 -60
  58. package/dist/contracts/features.js +59 -51
  59. package/dist/contracts/functions.d.ts +266 -72
  60. package/dist/contracts/functions.js +260 -37
  61. package/dist/contracts/git.d.ts +28 -34
  62. package/dist/contracts/git.js +10 -11
  63. package/dist/contracts/grants.d.ts +9 -5
  64. package/dist/contracts/grants.js +18 -9
  65. package/dist/contracts/ids.js +2 -2
  66. package/dist/contracts/internal.d.ts +8 -6
  67. package/dist/contracts/internal.js +12 -12
  68. package/dist/contracts/mcp.d.ts +11 -0
  69. package/dist/contracts/mcp.js +5 -0
  70. package/dist/contracts/me.js +1 -1
  71. package/dist/contracts/oauth-resources.d.ts +4 -3
  72. package/dist/contracts/oauth-resources.js +12 -3
  73. package/dist/contracts/operations.d.ts +90 -5
  74. package/dist/contracts/operations.js +77 -3
  75. package/dist/contracts/pages.d.ts +12 -7
  76. package/dist/contracts/pages.js +24 -1
  77. package/dist/contracts/plan-policy.d.ts +0 -2
  78. package/dist/contracts/plan-policy.js +2 -3
  79. package/dist/contracts/platform.d.ts +61 -148
  80. package/dist/contracts/platform.js +70 -126
  81. package/dist/contracts/publish-archive.d.ts +508 -0
  82. package/dist/contracts/publish-archive.js +32 -0
  83. package/dist/contracts/push-new.d.ts +4 -4
  84. package/dist/contracts/quotas.js +2 -2
  85. package/dist/contracts/repository-connections.d.ts +43 -30
  86. package/dist/contracts/repository-connections.js +11 -3
  87. package/dist/contracts/resources.d.ts +12 -24
  88. package/dist/contracts/resources.js +36 -16
  89. package/dist/contracts/runtime-api.d.ts +433 -192
  90. package/dist/contracts/runtime-api.js +421 -356
  91. package/dist/contracts/runtime-app.d.ts +127 -120
  92. package/dist/contracts/runtime-app.js +19 -10
  93. package/dist/contracts/runtime-db.d.ts +5 -5
  94. package/dist/contracts/runtime-db.js +2 -2
  95. package/dist/contracts/runtime-purge.d.ts +8 -0
  96. package/dist/contracts/runtime-purge.js +7 -0
  97. package/dist/contracts/runtime-services.d.ts +219 -0
  98. package/dist/contracts/runtime-services.js +437 -0
  99. package/dist/contracts/runtime-storage.d.ts +46 -32
  100. package/dist/contracts/runtime-storage.js +31 -8
  101. package/dist/contracts/sf-config-v1.d.ts +48 -10
  102. package/dist/contracts/space-config.d.ts +69 -18
  103. package/dist/contracts/space-config.js +226 -27
  104. package/dist/contracts/spaces.d.ts +236 -450
  105. package/dist/contracts/spaces.js +131 -151
  106. package/dist/contracts/superadmin-activity.d.ts +57 -4
  107. package/dist/contracts/superadmin-activity.js +48 -2
  108. package/dist/contracts/superadmin-search.d.ts +126 -0
  109. package/dist/contracts/superadmin-search.js +61 -0
  110. package/dist/contracts/superadmin-spaces.d.ts +361 -92
  111. package/dist/contracts/superadmin-spaces.js +97 -24
  112. package/dist/contracts/superadmin-teams.d.ts +28 -10
  113. package/dist/contracts/superadmin-teams.js +5 -8
  114. package/dist/contracts/superadmin-tenants.d.ts +0 -6
  115. package/dist/contracts/superadmin-tenants.js +1 -7
  116. package/dist/contracts/superadmin.d.ts +135 -54
  117. package/dist/contracts/superadmin.js +46 -23
  118. package/dist/contracts/tags.d.ts +12 -12
  119. package/dist/contracts/tags.js +3 -3
  120. package/dist/contracts/teams.d.ts +49 -14
  121. package/dist/contracts/teams.js +40 -22
  122. package/dist/contracts/transfers.d.ts +0 -49
  123. package/dist/contracts/transfers.js +4 -8
  124. package/dist/contracts/usage.d.ts +61 -0
  125. package/dist/contracts/usage.js +64 -0
  126. package/dist/contracts/variables.d.ts +2 -7
  127. package/dist/contracts/variables.js +9 -8
  128. package/dist/contracts/webhooks.d.ts +2 -2
  129. package/dist/contracts/zero.d.ts +102 -73
  130. package/dist/contracts/zero.js +94 -32
  131. package/dist/dashboard-paths/index.d.ts +1 -1
  132. package/dist/dashboard-paths/index.js +1 -0
  133. package/dist/docs/agent-prose.d.ts +2 -2
  134. package/dist/docs/agent-prose.js +63 -70
  135. package/dist/docs/agent-setup.js +45 -15
  136. package/dist/docs/catalog.d.ts +24 -24
  137. package/dist/docs/catalog.js +35 -24
  138. package/dist/docs/error-docs.js +194 -270
  139. package/dist/docs/skills.d.ts +12 -12
  140. package/dist/docs/skills.js +4 -4
  141. package/dist/test-helpers/fetch-stub.d.ts +16 -0
  142. package/dist/test-helpers/fetch-stub.js +25 -0
  143. package/dist/utils/build-settings.d.ts +5 -1
  144. package/dist/utils/build-settings.js +91 -13
  145. package/dist/utils/canonical-json.d.ts +10 -0
  146. package/dist/utils/canonical-json.js +22 -0
  147. package/dist/utils/cast-transport.d.ts +28 -0
  148. package/dist/utils/cast-transport.js +52 -0
  149. package/dist/utils/claim-token.d.ts +0 -8
  150. package/dist/utils/claim-token.js +3 -15
  151. package/dist/utils/concurrency.js +1 -0
  152. package/dist/utils/credential-policy.d.ts +1 -1
  153. package/dist/utils/credential-policy.js +4 -3
  154. package/dist/utils/dns-instructions.js +9 -9
  155. package/dist/utils/env-file.d.ts +17 -0
  156. package/dist/utils/env-file.js +96 -0
  157. package/dist/utils/error-code.d.ts +2 -0
  158. package/dist/utils/error-code.js +8 -0
  159. package/dist/utils/generate-space-name.d.ts +8 -10
  160. package/dist/utils/generate-space-name.js +206 -21
  161. package/dist/utils/grant-decision.fixtures.json +2938 -0
  162. package/dist/utils/grants.d.ts +2 -0
  163. package/dist/utils/grants.js +26 -1
  164. package/dist/utils/gravatar.d.ts +9 -0
  165. package/dist/utils/gravatar.js +31 -0
  166. package/dist/utils/idempotency.d.ts +6 -0
  167. package/dist/utils/idempotency.js +28 -0
  168. package/dist/utils/local-space-state.d.ts +9 -16
  169. package/dist/utils/local-space-state.js +20 -50
  170. package/dist/utils/one-shot-replay.d.ts +4 -1
  171. package/dist/utils/page-colors.d.ts +14 -12
  172. package/dist/utils/page-colors.js +15 -13
  173. package/dist/utils/page-fonts.d.ts +2 -2
  174. package/dist/utils/page-fonts.js +15 -4
  175. package/dist/utils/pages.d.ts +21 -3
  176. package/dist/utils/pages.js +42 -13
  177. package/dist/utils/publish-form-data.d.ts +12 -0
  178. package/dist/utils/publish-form-data.js +10 -0
  179. package/dist/utils/publish-policy.d.ts +27 -0
  180. package/dist/utils/publish-policy.fixtures.json +403 -0
  181. package/dist/utils/publish-policy.js +45 -20
  182. package/dist/utils/push-new.d.ts +7 -0
  183. package/dist/utils/push-new.js +7 -0
  184. package/dist/utils/query-keys.d.ts +4 -5
  185. package/dist/utils/query-keys.js +2 -3
  186. package/dist/utils/runtime-paths.d.ts +5 -0
  187. package/dist/utils/runtime-paths.js +5 -0
  188. package/dist/utils/runtime-upload-batch.d.ts +0 -5
  189. package/dist/utils/runtime-upload-batch.js +1 -27
  190. package/dist/utils/runtime-upload.d.ts +6 -11
  191. package/dist/utils/runtime-upload.js +10 -13
  192. package/dist/utils/secure-local-file.js +5 -16
  193. package/dist/utils/space-config.d.ts +1 -34
  194. package/dist/utils/space-config.js +8 -326
  195. package/dist/utils/static-runtime-policy.d.ts +9 -3
  196. package/dist/utils/static-runtime-policy.fixtures.json +38 -41
  197. package/dist/utils/static-runtime-policy.js +22 -56
  198. package/dist/utils/storage-policy.d.ts +1 -1
  199. package/dist/utils/storage-policy.js +3 -1
  200. package/dist/utils/structured-error.d.ts +14 -0
  201. package/dist/utils/structured-error.js +22 -0
  202. package/dist/utils/upload-session.d.ts +4 -1
  203. package/dist/utils/upload-session.js +33 -5
  204. package/dist/utils/version-path.js +13 -4
  205. package/dist/vocabulary.d.ts +13 -11
  206. package/dist/vocabulary.js +42 -28
  207. package/package.json +7 -17
  208. package/dist/config/postgres-budget.d.ts +0 -129
  209. package/dist/config/postgres-budget.js +0 -140
  210. package/dist/config/postgres-budget.json +0 -51
  211. package/dist/contracts/archives.d.ts +0 -331
  212. package/dist/contracts/archives.js +0 -120
  213. package/dist/contracts/deployments.d.ts +0 -574
  214. package/dist/contracts/deployments.js +0 -97
  215. package/dist/contracts/sites.d.ts +0 -416
  216. package/dist/contracts/sites.js +0 -168
  217. package/dist/contracts/superadmin-queues.d.ts +0 -414
  218. package/dist/contracts/superadmin-queues.js +0 -202
  219. package/dist/contracts/superadmin-runtime.d.ts +0 -27
  220. package/dist/contracts/superadmin-runtime.js +0 -38
  221. package/dist/index.d.ts +0 -1
  222. package/dist/index.js +0 -1
  223. package/dist/utils/api.d.ts +0 -4
  224. package/dist/utils/api.js +0 -13
@@ -98,7 +98,7 @@ export declare const domainVerificationSchema: z.ZodObject<{
98
98
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
99
99
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
100
100
  registrar: "registrar";
101
- wpcloud: "wpcloud";
101
+ infra: "infra";
102
102
  dns: "dns";
103
103
  runtime: "runtime";
104
104
  }>>>;
@@ -225,6 +225,7 @@ export declare const domainRedirectTargetSchema: z.ZodUnion<readonly [z.ZodObjec
225
225
  path: z.ZodOptional<z.ZodString>;
226
226
  }, z.core.$strip>]>;
227
227
  export declare const domainRedirectStatusSchema: z.ZodUnion<readonly [z.ZodLiteral<301>, z.ZodLiteral<302>, z.ZodLiteral<307>, z.ZodLiteral<308>]>;
228
+ export type DomainRedirectStatus = z.infer<typeof domainRedirectStatusSchema>;
228
229
  export declare const domainRedirectSchema: z.ZodObject<{
229
230
  to: z.ZodUnion<readonly [z.ZodObject<{
230
231
  url: z.ZodString;
@@ -363,7 +364,7 @@ export declare const DomainSchema: z.ZodObject<{
363
364
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
364
365
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
365
366
  registrar: "registrar";
366
- wpcloud: "wpcloud";
367
+ infra: "infra";
367
368
  dns: "dns";
368
369
  runtime: "runtime";
369
370
  }>>>;
@@ -621,7 +622,7 @@ export declare const domainListResponseSchema: z.ZodObject<{
621
622
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
622
623
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
623
624
  registrar: "registrar";
624
- wpcloud: "wpcloud";
625
+ infra: "infra";
625
626
  dns: "dns";
626
627
  runtime: "runtime";
627
628
  }>>>;
@@ -876,7 +877,7 @@ export declare const spaceCustomDomainSchema: z.ZodObject<{
876
877
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
877
878
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
878
879
  registrar: "registrar";
879
- wpcloud: "wpcloud";
880
+ infra: "infra";
880
881
  dns: "dns";
881
882
  runtime: "runtime";
882
883
  }>>>;
@@ -1045,7 +1046,7 @@ export declare const spaceManagedDomainSchema: z.ZodObject<{
1045
1046
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1046
1047
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1047
1048
  registrar: "registrar";
1048
- wpcloud: "wpcloud";
1049
+ infra: "infra";
1049
1050
  dns: "dns";
1050
1051
  runtime: "runtime";
1051
1052
  }>>>;
@@ -1100,7 +1101,7 @@ export declare const spaceDomainSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1100
1101
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1101
1102
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1102
1103
  registrar: "registrar";
1103
- wpcloud: "wpcloud";
1104
+ infra: "infra";
1104
1105
  dns: "dns";
1105
1106
  runtime: "runtime";
1106
1107
  }>>>;
@@ -1240,7 +1241,7 @@ export declare const spaceDomainSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1240
1241
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1241
1242
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1242
1243
  registrar: "registrar";
1243
- wpcloud: "wpcloud";
1244
+ infra: "infra";
1244
1245
  dns: "dns";
1245
1246
  runtime: "runtime";
1246
1247
  }>>>;
@@ -1411,7 +1412,7 @@ export declare const spaceDomainListResponseSchema: z.ZodObject<{
1411
1412
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1412
1413
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1413
1414
  registrar: "registrar";
1414
- wpcloud: "wpcloud";
1415
+ infra: "infra";
1415
1416
  dns: "dns";
1416
1417
  runtime: "runtime";
1417
1418
  }>>>;
@@ -1551,7 +1552,7 @@ export declare const spaceDomainListResponseSchema: z.ZodObject<{
1551
1552
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1552
1553
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1553
1554
  registrar: "registrar";
1554
- wpcloud: "wpcloud";
1555
+ infra: "infra";
1555
1556
  dns: "dns";
1556
1557
  runtime: "runtime";
1557
1558
  }>>>;
@@ -1725,7 +1726,7 @@ export declare const teamManagedDomainSchema: z.ZodObject<{
1725
1726
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1726
1727
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1727
1728
  registrar: "registrar";
1728
- wpcloud: "wpcloud";
1729
+ infra: "infra";
1729
1730
  dns: "dns";
1730
1731
  runtime: "runtime";
1731
1732
  }>>>;
@@ -1785,7 +1786,7 @@ export declare const teamManagedDomainListResponseSchema: z.ZodObject<{
1785
1786
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1786
1787
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1787
1788
  registrar: "registrar";
1788
- wpcloud: "wpcloud";
1789
+ infra: "infra";
1789
1790
  dns: "dns";
1790
1791
  runtime: "runtime";
1791
1792
  }>>>;
@@ -1806,6 +1807,16 @@ export declare const teamManagedDomainListResponseSchema: z.ZodObject<{
1806
1807
  hasMore: z.ZodBoolean;
1807
1808
  }, z.core.$strip>;
1808
1809
  }, z.core.$strip>;
1810
+ export declare const domainPreflightQuerySchema: z.ZodObject<{
1811
+ name: z.ZodString;
1812
+ }, z.core.$strip>;
1813
+ export declare const domainPreflightSchema: z.ZodObject<{
1814
+ name: z.ZodString;
1815
+ unicodeName: z.ZodOptional<z.ZodString>;
1816
+ canHost: z.ZodNullable<z.ZodBoolean>;
1817
+ providerMessage: z.ZodNullable<z.ZodString>;
1818
+ }, z.core.$strip>;
1819
+ export type DomainPreflight = z.infer<typeof domainPreflightSchema>;
1809
1820
  export declare const domainCreateRequestSchema: z.ZodObject<{
1810
1821
  name: z.ZodString;
1811
1822
  teamId: z.ZodOptional<z.ZodString>;
@@ -1906,7 +1917,7 @@ export declare const domainRegistrationActionResponseSchema: z.ZodObject<{
1906
1917
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1907
1918
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1908
1919
  registrar: "registrar";
1909
- wpcloud: "wpcloud";
1920
+ infra: "infra";
1910
1921
  dns: "dns";
1911
1922
  runtime: "runtime";
1912
1923
  }>>>;
@@ -1949,7 +1960,7 @@ export declare const domainNameserverResponseSchema: z.ZodObject<{
1949
1960
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1950
1961
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1951
1962
  registrar: "registrar";
1952
- wpcloud: "wpcloud";
1963
+ infra: "infra";
1953
1964
  dns: "dns";
1954
1965
  runtime: "runtime";
1955
1966
  }>>>;
@@ -2098,7 +2109,7 @@ export declare const domainDnsModeResponseSchema: z.ZodObject<{
2098
2109
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2099
2110
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2100
2111
  registrar: "registrar";
2101
- wpcloud: "wpcloud";
2112
+ infra: "infra";
2102
2113
  dns: "dns";
2103
2114
  runtime: "runtime";
2104
2115
  }>>>;
@@ -2231,7 +2242,7 @@ export declare const domainDnsModeResponseSchema: z.ZodObject<{
2231
2242
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2232
2243
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2233
2244
  registrar: "registrar";
2234
- wpcloud: "wpcloud";
2245
+ infra: "infra";
2235
2246
  dns: "dns";
2236
2247
  runtime: "runtime";
2237
2248
  }>>>;
@@ -2299,7 +2310,7 @@ export declare const domainDnsModeResponseSchema: z.ZodObject<{
2299
2310
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2300
2311
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2301
2312
  registrar: "registrar";
2302
- wpcloud: "wpcloud";
2313
+ infra: "infra";
2303
2314
  dns: "dns";
2304
2315
  runtime: "runtime";
2305
2316
  }>>>;
@@ -2798,7 +2809,7 @@ export declare const domainDnsCapabilitiesSchema: z.ZodPipe<z.ZodObject<{
2798
2809
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2799
2810
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2800
2811
  registrar: "registrar";
2801
- wpcloud: "wpcloud";
2812
+ infra: "infra";
2802
2813
  dns: "dns";
2803
2814
  runtime: "runtime";
2804
2815
  }>>>;
@@ -2943,7 +2954,7 @@ export declare const domainDnsCapabilitiesSchema: z.ZodPipe<z.ZodObject<{
2943
2954
  severity: "info" | "error" | "warning";
2944
2955
  message: string;
2945
2956
  path?: string | null | undefined;
2946
- provider?: "registrar" | "wpcloud" | "dns" | "runtime" | null | undefined;
2957
+ provider?: "registrar" | "infra" | "dns" | "runtime" | null | undefined;
2947
2958
  details?: Record<string, unknown> | null | undefined;
2948
2959
  fix?: string | null | undefined;
2949
2960
  retryable?: boolean | null | undefined;
@@ -3084,7 +3095,7 @@ export declare const domainDnsCapabilitiesSchema: z.ZodPipe<z.ZodObject<{
3084
3095
  severity: "info" | "error" | "warning";
3085
3096
  message: string;
3086
3097
  path?: string | null | undefined;
3087
- provider?: "registrar" | "wpcloud" | "dns" | "runtime" | null | undefined;
3098
+ provider?: "registrar" | "infra" | "dns" | "runtime" | null | undefined;
3088
3099
  details?: Record<string, unknown> | null | undefined;
3089
3100
  fix?: string | null | undefined;
3090
3101
  retryable?: boolean | null | undefined;
@@ -3354,7 +3365,7 @@ export declare const domainProviderSnapshotRefreshResponseSchema: z.ZodObject<{
3354
3365
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3355
3366
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
3356
3367
  registrar: "registrar";
3357
- wpcloud: "wpcloud";
3368
+ infra: "infra";
3358
3369
  dns: "dns";
3359
3370
  runtime: "runtime";
3360
3371
  }>>>;
@@ -3426,7 +3437,7 @@ export declare const domainDnsOperationSchema: z.ZodObject<{
3426
3437
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3427
3438
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
3428
3439
  registrar: "registrar";
3429
- wpcloud: "wpcloud";
3440
+ infra: "infra";
3430
3441
  dns: "dns";
3431
3442
  runtime: "runtime";
3432
3443
  }>>>;
@@ -3627,7 +3638,7 @@ export declare const domainDnsOperationListResponseSchema: z.ZodObject<{
3627
3638
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3628
3639
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
3629
3640
  registrar: "registrar";
3630
- wpcloud: "wpcloud";
3641
+ infra: "infra";
3631
3642
  dns: "dns";
3632
3643
  runtime: "runtime";
3633
3644
  }>>>;
@@ -4160,7 +4171,7 @@ export declare const domainActionMutationResponseSchema: z.ZodObject<{
4160
4171
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4161
4172
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
4162
4173
  registrar: "registrar";
4163
- wpcloud: "wpcloud";
4174
+ infra: "infra";
4164
4175
  dns: "dns";
4165
4176
  runtime: "runtime";
4166
4177
  }>>>;
@@ -4490,7 +4501,7 @@ export declare const domainDnsRecordListResponseSchema: z.ZodObject<{
4490
4501
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4491
4502
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
4492
4503
  registrar: "registrar";
4493
- wpcloud: "wpcloud";
4504
+ infra: "infra";
4494
4505
  dns: "dns";
4495
4506
  runtime: "runtime";
4496
4507
  }>>>;
@@ -4635,7 +4646,7 @@ export declare const domainDnsRecordListResponseSchema: z.ZodObject<{
4635
4646
  severity: "info" | "error" | "warning";
4636
4647
  message: string;
4637
4648
  path?: string | null | undefined;
4638
- provider?: "registrar" | "wpcloud" | "dns" | "runtime" | null | undefined;
4649
+ provider?: "registrar" | "infra" | "dns" | "runtime" | null | undefined;
4639
4650
  details?: Record<string, unknown> | null | undefined;
4640
4651
  fix?: string | null | undefined;
4641
4652
  retryable?: boolean | null | undefined;
@@ -4776,7 +4787,7 @@ export declare const domainDnsRecordListResponseSchema: z.ZodObject<{
4776
4787
  severity: "info" | "error" | "warning";
4777
4788
  message: string;
4778
4789
  path?: string | null | undefined;
4779
- provider?: "registrar" | "wpcloud" | "dns" | "runtime" | null | undefined;
4790
+ provider?: "registrar" | "infra" | "dns" | "runtime" | null | undefined;
4780
4791
  details?: Record<string, unknown> | null | undefined;
4781
4792
  fix?: string | null | undefined;
4782
4793
  retryable?: boolean | null | undefined;
@@ -5004,7 +5015,7 @@ export declare const domainDiagnosticsResponseSchema: z.ZodObject<{
5004
5015
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5005
5016
  provider: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
5006
5017
  registrar: "registrar";
5007
- wpcloud: "wpcloud";
5018
+ infra: "infra";
5008
5019
  dns: "dns";
5009
5020
  runtime: "runtime";
5010
5021
  }>>>;
@@ -2,7 +2,7 @@ import { z } from "zod";
2
2
  import { AnyObjectSchema, baseDiagnosticSchema, CursorPaginationSchema, cursorListQuerySchema, DnsInstructionSchema, mutationEnvelope, requiredActionsSchema, } from "./common.js";
3
3
  import { PrincipalRefSchema } from "./resources.js";
4
4
  // ---------------------------------------------------------------------------
5
- // Domain resource (internal-docs/platform.md L2387-2431). A canonical name
5
+ // Domain resource (the platform spec). A canonical name
6
6
  // owned by a tenant-local principal, plus its registrar/DNS facets and THE
7
7
  // serving pointer/whole-host redirect intent.
8
8
  // ---------------------------------------------------------------------------
@@ -52,7 +52,7 @@ export const domainDnsFacetSchema = z.object({
52
52
  assignedNameservers: z
53
53
  .array(z.string())
54
54
  .optional()
55
- .describe('Managed-zone delegation set the registrar should point at (mode "stattic").'),
55
+ .describe("Managed-zone delegation set the registrar should point at (mode `stattic`)."),
56
56
  observedNameservers: z
57
57
  .array(z.string())
58
58
  .optional()
@@ -270,6 +270,33 @@ export const teamManagedDomainListResponseSchema = z.object({
270
270
  data: z.array(teamManagedDomainSchema),
271
271
  pagination: CursorPaginationSchema,
272
272
  });
273
+ // Pre-add advisory check. `canHost` mirrors the hosting provider's
274
+ // hostability verdict: `false` often means the domain is blocklisted or
275
+ // already attached to other provider infrastructure (which a later TXT
276
+ // ownership proof can still claim), so clients warn — they never hard-block.
277
+ export const domainPreflightQuerySchema = z.object({
278
+ name: z
279
+ .string()
280
+ .trim()
281
+ .min(1)
282
+ .max(253)
283
+ .describe("Apex or concrete hostname to preflight; canonicalized server-side."),
284
+ });
285
+ export const domainPreflightSchema = z.object({
286
+ name: z.string().describe("Canonical lowercase ASCII form of the requested hostname."),
287
+ unicodeName: z
288
+ .string()
289
+ .optional()
290
+ .describe("Read-only U-label form, present only when it differs from `name`."),
291
+ canHost: z
292
+ .boolean()
293
+ .nullable()
294
+ .describe("Provider hostability verdict. `null` when the provider check was unavailable; treat as unknown, not as failure."),
295
+ providerMessage: z
296
+ .string()
297
+ .nullable()
298
+ .describe("Provider-reported reason when the verdict is negative."),
299
+ });
273
300
  export const domainCreateRequestSchema = z.object({
274
301
  name: z
275
302
  .string()
@@ -1,33 +1,27 @@
1
1
  import { z } from "zod";
2
- export declare const spaceStatusValues: readonly ["provisioning", "active", "updating", "moving", "deleting", "failed"];
2
+ export declare const spaceStatusValues: readonly ["provisioning", "active", "updating", "deleting", "failed"];
3
3
  export declare const spaceStatus: z.ZodEnum<{
4
4
  active: "active";
5
5
  provisioning: "provisioning";
6
6
  updating: "updating";
7
- moving: "moving";
8
7
  deleting: "deleting";
9
8
  failed: "failed";
10
9
  }>;
11
- export declare const spaceDisabledReasonCodeValues: readonly ["anonymous_expired", "abuse_takedown", "tenant_suspended", "site_suspended"];
10
+ export declare const spaceDisabledReasonCodeValues: readonly ["anonymous_expired", "abuse_takedown", "tenant_suspended", "site_suspended", "author_removed"];
12
11
  export declare const spaceDisabledReasonCode: z.ZodEnum<{
13
12
  anonymous_expired: "anonymous_expired";
14
13
  abuse_takedown: "abuse_takedown";
15
14
  tenant_suspended: "tenant_suspended";
16
15
  site_suspended: "site_suspended";
16
+ author_removed: "author_removed";
17
17
  }>;
18
- export declare const spaceTransferStatusValues: readonly ["pending_confirmation", "confirming_domains", "completed", "canceled", "expired"];
18
+ export declare const spaceTransferStatusValues: readonly ["pending_confirmation", "completed", "canceled", "expired"];
19
19
  export declare const spaceTransferStatus: z.ZodEnum<{
20
20
  pending_confirmation: "pending_confirmation";
21
- confirming_domains: "confirming_domains";
22
21
  completed: "completed";
23
22
  canceled: "canceled";
24
23
  expired: "expired";
25
24
  }>;
26
- export declare const siteIsolationValues: readonly ["site", "space"];
27
- export declare const siteIsolation: z.ZodEnum<{
28
- site: "site";
29
- space: "space";
30
- }>;
31
25
  export declare const tenantKindValues: readonly ["main", "platform", "partner", "internal"];
32
26
  export declare const tenantKind: z.ZodEnum<{
33
27
  internal: "internal";
@@ -51,6 +45,11 @@ export declare const siteKindValues: readonly ["static_runtime"];
51
45
  export declare const siteKind: z.ZodEnum<{
52
46
  static_runtime: "static_runtime";
53
47
  }>;
48
+ export declare const siteIsolationValues: readonly ["site", "space"];
49
+ export declare const siteIsolation: z.ZodEnum<{
50
+ site: "site";
51
+ space: "space";
52
+ }>;
54
53
  export declare const siteStatusValues: readonly ["ready_pool", "active", "provisioning", "degraded", "suspended", "deleted"];
55
54
  export declare const siteStatus: z.ZodEnum<{
56
55
  active: "active";
@@ -60,22 +59,13 @@ export declare const siteStatus: z.ZodEnum<{
60
59
  ready_pool: "ready_pool";
61
60
  degraded: "degraded";
62
61
  }>;
63
- export declare const siteClassValues: readonly ["shared", "dedicated", "shared_org", "anonymous_pool", "dedicated_space"];
64
- export declare const siteClass: z.ZodEnum<{
65
- shared: "shared";
66
- dedicated: "dedicated";
67
- shared_org: "shared_org";
68
- anonymous_pool: "anonymous_pool";
69
- dedicated_space: "dedicated_space";
70
- }>;
71
- export declare const normalizedSiteClassValues: readonly ["shared", "dedicated"];
72
- export declare const normalizedSiteClass: z.ZodEnum<{
73
- shared: "shared";
74
- dedicated: "dedicated";
75
- }>;
76
- export declare function normalizeSiteClass(value: SiteClass): NormalizedSiteClass;
77
- export declare function siteClassIsShared(value: SiteClass): boolean;
78
- export declare function siteClassIsDedicated(value: SiteClass): boolean;
62
+ export declare const poolSiteStatusValues: readonly ["provisioning", "ready_pool", "degraded", "retired"];
63
+ export declare const poolSiteStatus: z.ZodEnum<{
64
+ provisioning: "provisioning";
65
+ ready_pool: "ready_pool";
66
+ degraded: "degraded";
67
+ retired: "retired";
68
+ }>;
79
69
  export declare const publishSourceKindValues: readonly ["direct_upload", "cli", "dashboard", "api", "git", "import", "agent", "build", "variable_update", "config_update"];
80
70
  export declare const publishSourceKind: z.ZodEnum<{
81
71
  build: "build";
@@ -121,6 +111,7 @@ export declare const buildStatus: z.ZodEnum<{
121
111
  succeeded: "succeeded";
122
112
  skipped: "skipped";
123
113
  }>;
114
+ export type BuildStatus = z.infer<typeof buildStatus>;
124
115
  export declare const diagnosticSeverity: z.ZodEnum<{
125
116
  info: "info";
126
117
  error: "error";
@@ -128,7 +119,7 @@ export declare const diagnosticSeverity: z.ZodEnum<{
128
119
  }>;
129
120
  export declare const diagnosticProvider: z.ZodEnum<{
130
121
  registrar: "registrar";
131
- wpcloud: "wpcloud";
122
+ infra: "infra";
132
123
  dns: "dns";
133
124
  runtime: "runtime";
134
125
  }>;
@@ -152,6 +143,19 @@ export declare const safetyCategory: z.ZodEnum<{
152
143
  compromised_account: "compromised_account";
153
144
  other_violation: "other_violation";
154
145
  }>;
146
+ export declare const safetyResolutionReasonValues: readonly ["malware_confirmed", "phishing_confirmed", "csam_escalated", "spam_confirmed", "copyright_takedown", "false_positive", "test_detection", "duplicate", "insufficient_evidence", "other"];
147
+ export declare const safetyResolutionReason: z.ZodEnum<{
148
+ malware_confirmed: "malware_confirmed";
149
+ phishing_confirmed: "phishing_confirmed";
150
+ csam_escalated: "csam_escalated";
151
+ spam_confirmed: "spam_confirmed";
152
+ copyright_takedown: "copyright_takedown";
153
+ false_positive: "false_positive";
154
+ test_detection: "test_detection";
155
+ duplicate: "duplicate";
156
+ insufficient_evidence: "insufficient_evidence";
157
+ other: "other";
158
+ }>;
155
159
  export declare const SAFETY_SEVERITY: {
156
160
  readonly suspicious: 1;
157
161
  readonly low: 2;
@@ -175,11 +179,11 @@ export declare const operationStatus: z.ZodEnum<{
175
179
  }>;
176
180
  export type GitProvider = z.infer<typeof gitProvider>;
177
181
  export type PublishSourceKind = z.infer<typeof publishSourceKind>;
182
+ export type PoolSiteStatus = z.infer<typeof poolSiteStatus>;
183
+ export type SiteKind = z.infer<typeof siteKind>;
178
184
  export type SiteIsolation = z.infer<typeof siteIsolation>;
179
185
  export type TenantStatus = z.infer<typeof tenantStatus>;
180
- export type SiteKind = z.infer<typeof siteKind>;
181
- export type SiteClass = z.infer<typeof siteClass>;
182
- export type NormalizedSiteClass = z.infer<typeof normalizedSiteClass>;
183
186
  export type OperationStatus = z.infer<typeof operationStatus>;
184
187
  export type SafetyCategory = z.infer<typeof safetyCategory>;
188
+ export type SafetyResolutionReason = z.infer<typeof safetyResolutionReason>;
185
189
  export type EnforcementTier = z.infer<typeof enforcementTier>;
@@ -1,17 +1,17 @@
1
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.
2
+ // Space operation-lifecycle axis (the platform spec "Space"): exactly
3
+ // these five. Serving (disabled) and deletion (deletedAt) are separate axes —
4
+ // a disabled space can still be updating. There is no `moving`: a space IS a
5
+ // site, so ownership changes commit in place and nothing relocates.
5
6
  export const spaceStatusValues = [
6
7
  "provisioning",
7
8
  "active",
8
9
  "updating",
9
- "moving",
10
10
  "deleting",
11
11
  "failed",
12
12
  ];
13
13
  export const spaceStatus = z.enum(spaceStatusValues);
14
- // Serving-axis disable reasons (internal-docs/platform.md "Space"). Confirmed
14
+ // Serving-axis disable reasons (the platform spec "Space"). Confirmed
15
15
  // scan takedowns use `abuse_takedown`; infected state and claim invalidation
16
16
  // are explicit enforcement effects, not reason metadata.
17
17
  export const spaceDisabledReasonCodeValues = [
@@ -19,27 +19,26 @@ export const spaceDisabledReasonCodeValues = [
19
19
  "abuse_takedown",
20
20
  "tenant_suspended",
21
21
  "site_suspended",
22
+ // Space-key author delete, phase one: the holder of an unclaimed space's key
23
+ // took the site dark. The key survives, so the same key can restore (or
24
+ // claim) until the claim window expires; expiry then hard-deletes as usual.
25
+ "author_removed",
22
26
  ];
23
27
  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`.
28
+ // SpaceTransfer status machine (the platform spec "Transfer
29
+ // semantics"), stored directly — there is no separate DB vocabulary. A
30
+ // transfer is a request that the receiving side accepts; accepting moves
31
+ // ownership in one database transaction, so there is no intermediate moving
32
+ // state and no `failed` state. Withdraw (from-side) and decline (to-side)
33
+ // both land on `canceled`.
30
34
  export const spaceTransferStatusValues = [
31
35
  "pending_confirmation",
32
- "confirming_domains",
33
36
  "completed",
34
37
  "canceled",
35
38
  "expired",
36
39
  ];
37
40
  export const spaceTransferStatus = z.enum(spaceTransferStatusValues);
38
- // Site axes per internal-docs/platform.md. `isolation` controls
39
- // whether settings/access default to the site or to each space.
40
- export const siteIsolationValues = ["site", "space"];
41
- export const siteIsolation = z.enum(siteIsolationValues);
42
- // A tenant is the platform-account boundary that owns every resource (internal-docs/platform.md
41
+ // A tenant is the platform-account boundary that owns every resource (the platform spec
43
42
  // "Tenant -> Site -> Space"), Stripe-style. `main` is the single well-known
44
43
  // Stattic account (`ten_main`) all self-serve teams/users live under;
45
44
  // `platform` and `partner` are host integrations with their own user
@@ -56,12 +55,21 @@ export const tenantStatus = z.enum(tenantStatusValues);
56
55
  // (operator-only resource, `pvc_` prefix).
57
56
  export const providerClientStatusValues = ["active", "disabled"];
58
57
  export const providerClientStatus = z.enum(providerClientStatusValues);
59
- // Site (internal-docs/platform.md "Site", `site_`): THE placement unit. One
60
- // row per WP.Cloud site; spaces point at it via `space.siteId`.
58
+ // The only site shape there is. Kept as a named vocabulary because the sites
59
+ // table spells it as an enum column; a dead-code sweep removed it while that
60
+ // column still referenced it.
61
61
  export const siteKindValues = ["static_runtime"];
62
62
  export const siteKind = z.enum(siteKindValues);
63
- // `ready_pool` is a pre-provisioned warm site waiting to be claimed for an
64
- // anonymous space (claim = CAS on status, wave A1).
63
+ // Whether settings and access default to the site or to each space. Same story
64
+ // as the two vocabularies around it: a dead-code sweep took it while the
65
+ // `sites` table's own column still named it.
66
+ export const siteIsolationValues = ["site", "space"];
67
+ export const siteIsolation = z.enum(siteIsolationValues);
68
+ // Site lifecycle. A dead-code sweep removed this vocabulary while two live
69
+ // consumers still needed it: the `sites` table's own status column and the
70
+ // superadmin provider-site search result. `ready_pool` is a pre-provisioned
71
+ // warm site waiting to be claimed — load-bearing now that every space draws
72
+ // its own site from the pool.
65
73
  export const siteStatusValues = [
66
74
  "ready_pool",
67
75
  "active",
@@ -71,28 +79,16 @@ export const siteStatusValues = [
71
79
  "deleted",
72
80
  ];
73
81
  export const siteStatus = z.enum(siteStatusValues);
74
- // Placement class for a WP.Cloud site. Deploy T accepts the legacy class
75
- // strings while new code writes the normalized shared/dedicated vocabulary.
76
- export const siteClassValues = [
77
- "shared",
78
- "dedicated",
79
- "shared_org",
80
- "anonymous_pool",
81
- "dedicated_space",
82
- ];
83
- export const siteClass = z.enum(siteClassValues);
84
- export const normalizedSiteClassValues = ["shared", "dedicated"];
85
- export const normalizedSiteClass = z.enum(normalizedSiteClassValues);
86
- export function normalizeSiteClass(value) {
87
- return value === "dedicated" || value === "dedicated_space" ? "dedicated" : "shared";
88
- }
89
- export function siteClassIsShared(value) {
90
- return normalizeSiteClass(value) === "shared";
91
- }
92
- export function siteClassIsDedicated(value) {
93
- return normalizeSiteClass(value) === "dedicated";
94
- }
95
- // PublishSource.kind (internal-docs/platform.md "PublishSource"): the single
82
+ // Warm-pool inventory (`site_pool`): provider sites provisioned ahead of
83
+ // demand, with no owner yet. A space IS a site, so these statuses are the
84
+ // whole lifecycle a row can have before a space adopts it and the row is
85
+ // deleted — `active`/`suspended`/`deleted` were live-space states and now live
86
+ // on the space's own axes. `retired` holds a drained space=site migration
87
+ // source box: not adoptable, not reapable, kept permanently — migration
88
+ // tooling never deletes a wp.cloud site (owner ruling 2026-08-11).
89
+ export const poolSiteStatusValues = ["provisioning", "ready_pool", "degraded", "retired"];
90
+ export const poolSiteStatus = z.enum(poolSiteStatusValues);
91
+ // PublishSource.kind (the platform spec "PublishSource"): the single
96
92
  // provenance axis for how a version came to exist. `variable_update` and
97
93
  // `config_update` versions are minted by cascades/config regeneration.
98
94
  export const publishSourceKindValues = [
@@ -109,7 +105,7 @@ export const publishSourceKindValues = [
109
105
  ];
110
106
  export const publishSourceKind = z.enum(publishSourceKindValues);
111
107
  export const versionStatusValues = [
112
- // Spec state machine (internal-docs/platform.md "Upload Contract"):
108
+ // Spec state machine (the platform spec "Upload Contract"):
113
109
  // created -> uploading -> uploaded -> finalizing -> ready, with terminal
114
110
  // failed/canceled/expired. Build runs are tracked on the Build resource;
115
111
  // a building version stays `created` until upload starts.
@@ -137,7 +133,7 @@ export const VERSION_IN_FLIGHT_STATUSES = [
137
133
  "uploaded",
138
134
  "finalizing",
139
135
  ];
140
- // Build resource statuses (internal-docs/platform.md "Build", `bld_`).
136
+ // Build resource statuses (the platform spec "Build", `bld_`).
141
137
  export const buildStatusValues = [
142
138
  "waiting_for_source",
143
139
  "uploading_source",
@@ -150,9 +146,9 @@ export const buildStatusValues = [
150
146
  ];
151
147
  export const buildStatus = z.enum(buildStatusValues);
152
148
  export const diagnosticSeverity = z.enum(["info", "warning", "error"]);
153
- // Upstream system a Diagnostic originated from (internal-docs/platform.md L1621). Absent when
154
- // the diagnostic is Stattic's own (validation, routing compile, upload policy, ...).
155
- export const diagnosticProvider = z.enum(["wpcloud", "dns", "registrar", "runtime"]);
149
+ // Upstream system a Diagnostic originated from. Absent when the diagnostic is
150
+ // Stattic's own (validation, routing compile, upload policy, ...).
151
+ export const diagnosticProvider = z.enum(["infra", "dns", "registrar", "runtime"]);
156
152
  // Internal domain DB-column vocabularies (consumed by the control-plane schema;
157
153
  // never part of the public Domain contract, which lives in contracts/domains.ts).
158
154
  export const domainOwnershipTypeValues = [
@@ -202,6 +198,24 @@ export const safetyCategoryValues = [
202
198
  "other_violation",
203
199
  ];
204
200
  export const safetyCategory = z.enum(safetyCategoryValues);
201
+ // Why a review item was closed (or a space taken down): the operator's verdict
202
+ // in one word, so enforcement quality is measurable without parsing notes.
203
+ // Confirmed-* reasons say the detection was right; the tail says it wasn't
204
+ // (false_positive, test_detection) or the item never needed its own verdict
205
+ // (duplicate, insufficient_evidence, other).
206
+ export const safetyResolutionReasonValues = [
207
+ "malware_confirmed",
208
+ "phishing_confirmed",
209
+ "csam_escalated",
210
+ "spam_confirmed",
211
+ "copyright_takedown",
212
+ "false_positive",
213
+ "test_detection",
214
+ "duplicate",
215
+ "insufficient_evidence",
216
+ "other",
217
+ ];
218
+ export const safetyResolutionReason = z.enum(safetyResolutionReasonValues);
205
219
  // 1 = suspicious, 2 = low, 3 = medium, 4 = high, 5 = critical.
206
220
  export const SAFETY_SEVERITY = {
207
221
  suspicious: 1,