@spacefast/common 0.0.11 → 0.0.12

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 (122) hide show
  1. package/dist/agents/connect-targets.d.ts +4 -4
  2. package/dist/agents/connect-targets.js +3 -3
  3. package/dist/agents/private-key-oauth.d.ts +37 -0
  4. package/dist/agents/private-key-oauth.js +158 -0
  5. package/dist/config/domains.js +1 -1
  6. package/dist/config/index.d.ts +1 -0
  7. package/dist/config/index.js +1 -0
  8. package/dist/config/postgres-budget.d.ts +126 -0
  9. package/dist/config/postgres-budget.js +135 -0
  10. package/dist/config/postgres-budget.json +50 -0
  11. package/dist/contracts/access.d.ts +42 -24
  12. package/dist/contracts/access.js +73 -34
  13. package/dist/contracts/activity.d.ts +1 -1
  14. package/dist/contracts/activity.js +5 -5
  15. package/dist/contracts/api-keys.d.ts +53 -45
  16. package/dist/contracts/api-keys.js +1 -0
  17. package/dist/contracts/archives.d.ts +8 -8
  18. package/dist/contracts/builds.d.ts +8 -8
  19. package/dist/contracts/builds.js +28 -48
  20. package/dist/contracts/channels.js +1 -2
  21. package/dist/contracts/comments.d.ts +55 -19
  22. package/dist/contracts/comments.js +56 -17
  23. package/dist/contracts/common.d.ts +4 -3
  24. package/dist/contracts/common.js +2 -0
  25. package/dist/contracts/deployments.d.ts +3 -3
  26. package/dist/contracts/device-auth.d.ts +14 -12
  27. package/dist/contracts/docs.d.ts +5 -5
  28. package/dist/contracts/domains.d.ts +261 -1330
  29. package/dist/contracts/domains.js +39 -301
  30. package/dist/contracts/email-preferences.d.ts +50 -0
  31. package/dist/contracts/email-preferences.js +44 -0
  32. package/dist/contracts/enums.d.ts +1 -1
  33. package/dist/contracts/error-code-meta.d.ts +84 -15
  34. package/dist/contracts/error-code-meta.js +28 -4
  35. package/dist/contracts/error-codes.d.ts +1 -1
  36. package/dist/contracts/error-codes.js +24 -6
  37. package/dist/contracts/events.d.ts +13 -13
  38. package/dist/contracts/feature-lifecycle.d.ts +644 -2
  39. package/dist/contracts/feature-lifecycle.js +685 -2
  40. package/dist/contracts/features.d.ts +236 -24
  41. package/dist/contracts/features.js +3 -272
  42. package/dist/contracts/ids.d.ts +1 -2
  43. package/dist/contracts/ids.js +1 -2
  44. package/dist/contracts/internal.d.ts +3 -3
  45. package/dist/contracts/mcp.d.ts +6 -6
  46. package/dist/contracts/me.js +1 -1
  47. package/dist/contracts/mounts.d.ts +142 -0
  48. package/dist/contracts/mounts.js +56 -0
  49. package/dist/contracts/oauth-resources.d.ts +5 -5
  50. package/dist/contracts/oauth-resources.js +1 -0
  51. package/dist/contracts/operations.d.ts +2 -2
  52. package/dist/contracts/pages.d.ts +2 -2
  53. package/dist/contracts/pages.js +8 -3
  54. package/dist/contracts/plan-policy.d.ts +1 -1
  55. package/dist/contracts/platform.d.ts +3 -3
  56. package/dist/contracts/resources.d.ts +12 -20
  57. package/dist/contracts/resources.js +13 -37
  58. package/dist/contracts/runtime-api.d.ts +330 -16
  59. package/dist/contracts/runtime-api.js +58 -14
  60. package/dist/contracts/sf-config-v1.js +1 -1
  61. package/dist/contracts/sites.d.ts +12 -12
  62. package/dist/contracts/sites.js +18 -11
  63. package/dist/contracts/space-config.d.ts +2 -3
  64. package/dist/contracts/space-config.js +3 -1
  65. package/dist/contracts/spaces.d.ts +143 -102
  66. package/dist/contracts/spaces.js +109 -43
  67. package/dist/contracts/superadmin-emails.d.ts +25 -1
  68. package/dist/contracts/superadmin-emails.js +10 -15
  69. package/dist/contracts/superadmin-runtime.d.ts +2 -2
  70. package/dist/contracts/superadmin-spaces.d.ts +6 -14
  71. package/dist/contracts/tags.d.ts +43 -13
  72. package/dist/contracts/tags.js +195 -11
  73. package/dist/contracts/transfers.d.ts +1 -1
  74. package/dist/contracts/variables.d.ts +4 -4
  75. package/dist/contracts/variables.js +4 -3
  76. package/dist/contracts/webhooks.d.ts +2 -2
  77. package/dist/contracts/zero.d.ts +329 -7
  78. package/dist/contracts/zero.js +121 -2
  79. package/dist/dashboard-paths/index.d.ts +1 -1
  80. package/dist/docs/agent-setup.d.ts +4 -2
  81. package/dist/docs/agent-setup.js +15 -7
  82. package/dist/docs/agent-solutions.js +1 -1
  83. package/dist/docs/catalog.d.ts +8 -10
  84. package/dist/docs/catalog.js +8 -10
  85. package/dist/docs/error-docs.js +86 -18
  86. package/dist/utils/access-grant.d.ts +14 -0
  87. package/dist/utils/access-grant.js +88 -0
  88. package/dist/utils/access-match.d.ts +7 -0
  89. package/dist/utils/access-match.fixtures.json +513 -0
  90. package/dist/utils/access-match.js +32 -16
  91. package/dist/utils/access-verdict.fixtures.json +421 -0
  92. package/dist/utils/credential-policy.d.ts +1 -1
  93. package/dist/utils/dns-instructions.d.ts +29 -0
  94. package/dist/utils/dns-instructions.js +78 -0
  95. package/dist/utils/domain-diagnostics.d.ts +29 -0
  96. package/dist/utils/domain-diagnostics.js +63 -0
  97. package/dist/utils/egress-policy.fixtures.json +51 -0
  98. package/dist/utils/id-hints.d.ts +1 -0
  99. package/dist/utils/id-hints.js +55 -13
  100. package/dist/utils/page-colors.d.ts +50 -0
  101. package/dist/utils/page-colors.js +167 -0
  102. package/dist/utils/page-fonts.d.ts +2 -0
  103. package/dist/utils/page-fonts.js +4 -0
  104. package/dist/utils/pages.d.ts +8 -1
  105. package/dist/utils/pages.js +123 -37
  106. package/dist/utils/production-runtime.d.ts +18 -0
  107. package/dist/utils/production-runtime.js +28 -0
  108. package/dist/utils/query-keys.d.ts +6 -7
  109. package/dist/utils/query-keys.js +11 -12
  110. package/dist/utils/sf-config-v1.fixtures.json +9 -0
  111. package/dist/utils/sf-config-v1.js +28 -19
  112. package/dist/utils/source-archive-policy.d.ts +2 -0
  113. package/dist/utils/source-archive-policy.js +2 -0
  114. package/dist/utils/static-runtime-policy.fixtures.json +57 -0
  115. package/dist/utils/static-runtime-policy.js +1 -1
  116. package/package.json +5 -4
  117. package/dist/contracts/annotations.d.ts +0 -327
  118. package/dist/contracts/annotations.js +0 -235
  119. package/dist/contracts/generated-feature-launch-entries.d.ts +0 -2
  120. package/dist/contracts/generated-feature-launch-entries.js +0 -518
  121. package/dist/contracts/publishes.d.ts +0 -135
  122. package/dist/contracts/publishes.js +0 -162
@@ -1,327 +0,0 @@
1
- import { z } from "zod";
2
- export declare const collaborationModeSchema: z.ZodEnum<{
3
- review: "review";
4
- }>;
5
- export declare const annotationThreadStatusSchema: z.ZodEnum<{
6
- open: "open";
7
- resolved: "resolved";
8
- archived: "archived";
9
- }>;
10
- export declare const collaborationReviewerLevelSchema: z.ZodEnum<{
11
- viewer: "viewer";
12
- commenter: "commenter";
13
- editor: "editor";
14
- }>;
15
- export declare const collaborationInvitedReviewerSchema: z.ZodObject<{
16
- email: z.ZodString;
17
- level: z.ZodEnum<{
18
- viewer: "viewer";
19
- commenter: "commenter";
20
- editor: "editor";
21
- }>;
22
- }, z.core.$strip>;
23
- export declare const collaborationSettingsSchema: z.ZodObject<{
24
- anonymousReviewers: z.ZodOptional<z.ZodBoolean>;
25
- invitedReviewers: z.ZodOptional<z.ZodArray<z.ZodObject<{
26
- email: z.ZodString;
27
- level: z.ZodEnum<{
28
- viewer: "viewer";
29
- commenter: "commenter";
30
- editor: "editor";
31
- }>;
32
- }, z.core.$strip>>>;
33
- publishedComments: z.ZodOptional<z.ZodBoolean>;
34
- allowedOrigins: z.ZodOptional<z.ZodArray<z.ZodString>>;
35
- notificationPreferences: z.ZodOptional<z.ZodObject<{
36
- newThreads: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
37
- newReplies: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
38
- statusChanges: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
39
- }, z.core.$strip>>;
40
- }, z.core.$catchall<z.ZodUnknown>>;
41
- export declare const collaborationSchema: z.ZodObject<{
42
- spaceId: z.ZodString;
43
- enabled: z.ZodBoolean;
44
- mode: z.ZodEnum<{
45
- review: "review";
46
- }>;
47
- castResourceId: z.ZodNullable<z.ZodString>;
48
- castResourceKey: z.ZodNullable<z.ZodString>;
49
- settings: z.ZodObject<{
50
- anonymousReviewers: z.ZodOptional<z.ZodBoolean>;
51
- invitedReviewers: z.ZodOptional<z.ZodArray<z.ZodObject<{
52
- email: z.ZodString;
53
- level: z.ZodEnum<{
54
- viewer: "viewer";
55
- commenter: "commenter";
56
- editor: "editor";
57
- }>;
58
- }, z.core.$strip>>>;
59
- publishedComments: z.ZodOptional<z.ZodBoolean>;
60
- allowedOrigins: z.ZodOptional<z.ZodArray<z.ZodString>>;
61
- notificationPreferences: z.ZodOptional<z.ZodObject<{
62
- newThreads: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
63
- newReplies: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
64
- statusChanges: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
65
- }, z.core.$strip>>;
66
- }, z.core.$catchall<z.ZodUnknown>>;
67
- createdAt: z.ZodNullable<z.ZodString>;
68
- updatedAt: z.ZodNullable<z.ZodString>;
69
- }, z.core.$strip>;
70
- export declare const collaborationUpdateSchema: z.ZodObject<{
71
- enabled: z.ZodBoolean;
72
- mode: z.ZodOptional<z.ZodEnum<{
73
- review: "review";
74
- }>>;
75
- settings: z.ZodOptional<z.ZodObject<{
76
- anonymousReviewers: z.ZodOptional<z.ZodBoolean>;
77
- invitedReviewers: z.ZodOptional<z.ZodArray<z.ZodObject<{
78
- email: z.ZodString;
79
- level: z.ZodEnum<{
80
- viewer: "viewer";
81
- commenter: "commenter";
82
- editor: "editor";
83
- }>;
84
- }, z.core.$strip>>>;
85
- publishedComments: z.ZodOptional<z.ZodBoolean>;
86
- allowedOrigins: z.ZodOptional<z.ZodArray<z.ZodString>>;
87
- notificationPreferences: z.ZodOptional<z.ZodObject<{
88
- newThreads: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
89
- newReplies: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
90
- statusChanges: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
91
- }, z.core.$strip>>;
92
- }, z.core.$catchall<z.ZodUnknown>>>;
93
- }, z.core.$strip>;
94
- export declare const collaborationTokenRequestSchema: z.ZodObject<{
95
- versionId: z.ZodOptional<z.ZodString>;
96
- pagePath: z.ZodDefault<z.ZodString>;
97
- displayName: z.ZodOptional<z.ZodString>;
98
- }, z.core.$strip>;
99
- export declare const collaborationTokenResponseSchema: z.ZodObject<{
100
- token: z.ZodString;
101
- expiresAt: z.ZodString;
102
- cast: z.ZodObject<{
103
- resource: z.ZodString;
104
- room: z.ZodNullable<z.ZodString>;
105
- loaderUrl: z.ZodString;
106
- }, z.core.$strip>;
107
- }, z.core.$strip>;
108
- export declare const collaborationHandoffRequestSchema: z.ZodObject<{
109
- versionId: z.ZodString;
110
- pagePath: z.ZodDefault<z.ZodString>;
111
- }, z.core.$strip>;
112
- export declare const collaborationHandoffResponseSchema: z.ZodObject<{
113
- handoffToken: z.ZodString;
114
- expiresAt: z.ZodString;
115
- url: z.ZodNullable<z.ZodString>;
116
- }, z.core.$strip>;
117
- export declare const collaborationHandoffExchangeSchema: z.ZodObject<{
118
- handoffToken: z.ZodString;
119
- }, z.core.$strip>;
120
- export declare const realtimeTokenRequestSchema: z.ZodObject<{
121
- versionId: z.ZodOptional<z.ZodString>;
122
- scope: z.ZodDefault<z.ZodEnum<{
123
- space: "space";
124
- version: "version";
125
- }>>;
126
- }, z.core.$strip>;
127
- export declare const realtimeTokenResponseSchema: z.ZodObject<{
128
- token: z.ZodString;
129
- expiresAt: z.ZodString;
130
- cast: z.ZodObject<{
131
- resource: z.ZodString;
132
- room: z.ZodString;
133
- loaderUrl: z.ZodString;
134
- }, z.core.$strip>;
135
- }, z.core.$strip>;
136
- export declare const noticePublishSchema: z.ZodObject<{
137
- versionId: z.ZodOptional<z.ZodString>;
138
- kind: z.ZodDefault<z.ZodString>;
139
- title: z.ZodString;
140
- message: z.ZodString;
141
- level: z.ZodDefault<z.ZodEnum<{
142
- info: "info";
143
- success: "success";
144
- warning: "warning";
145
- error: "error";
146
- }>>;
147
- payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
148
- durable: z.ZodDefault<z.ZodBoolean>;
149
- idempotencyKey: z.ZodOptional<z.ZodString>;
150
- }, z.core.$strip>;
151
- export declare const noticePublishResponseSchema: z.ZodObject<{
152
- status: z.ZodString;
153
- event: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
154
- broadcast: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
155
- }, z.core.$strip>;
156
- export declare const overlayConfigQuerySchema: z.ZodObject<{
157
- path: z.ZodOptional<z.ZodString>;
158
- host: z.ZodOptional<z.ZodString>;
159
- }, z.core.$strip>;
160
- export declare const overlayConfigSchema: z.ZodObject<{
161
- enabled: z.ZodBoolean;
162
- features: z.ZodObject<{
163
- annotations: z.ZodBoolean;
164
- anonymousReviewers: z.ZodBoolean;
165
- notices: z.ZodBoolean;
166
- }, z.core.$strip>;
167
- cast: z.ZodNullable<z.ZodObject<{
168
- loaderUrl: z.ZodString;
169
- resource: z.ZodString;
170
- room: z.ZodString;
171
- wsUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
172
- inboxUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
173
- threadUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
174
- tokenEndpoint: z.ZodString;
175
- handoffEndpoint: z.ZodString;
176
- authBridgeUrl: z.ZodString;
177
- }, z.core.$strip>>;
178
- }, z.core.$strip>;
179
- export declare const publicOverlayConfigQuerySchema: z.ZodObject<{
180
- path: z.ZodOptional<z.ZodString>;
181
- }, z.core.$strip>;
182
- export declare const publicOverlayConfigSchema: z.ZodObject<{
183
- enabled: z.ZodBoolean;
184
- publishedComments: z.ZodBoolean;
185
- anonymousReviewers: z.ZodBoolean;
186
- room: z.ZodNullable<z.ZodString>;
187
- resourceKey: z.ZodNullable<z.ZodString>;
188
- version: z.ZodObject<{
189
- id: z.ZodNullable<z.ZodString>;
190
- current: z.ZodNullable<z.ZodString>;
191
- }, z.core.$strip>;
192
- loaderUrl: z.ZodString;
193
- sdkUrl: z.ZodString;
194
- wsUrl: z.ZodNullable<z.ZodString>;
195
- inboxUrl: z.ZodNullable<z.ZodString>;
196
- threadUrl: z.ZodNullable<z.ZodString>;
197
- tokenUrl: z.ZodString;
198
- authBridgeUrl: z.ZodString;
199
- level: z.ZodNullable<z.ZodString>;
200
- }, z.core.$strip>;
201
- export declare const annotationAuthorSchema: z.ZodObject<{
202
- kind: z.ZodNullable<z.ZodString>;
203
- id: z.ZodNullable<z.ZodString>;
204
- name: z.ZodNullable<z.ZodString>;
205
- }, z.core.$strip>;
206
- export declare const annotationTargetSchema: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
207
- export declare const annotationThreadSchema: z.ZodObject<{
208
- id: z.ZodString;
209
- castThreadId: z.ZodString;
210
- spaceId: z.ZodString;
211
- versionId: z.ZodNullable<z.ZodString>;
212
- channel: z.ZodNullable<z.ZodString>;
213
- pagePath: z.ZodString;
214
- url: z.ZodNullable<z.ZodString>;
215
- status: z.ZodEnum<{
216
- open: "open";
217
- resolved: "resolved";
218
- archived: "archived";
219
- }>;
220
- body: z.ZodNullable<z.ZodString>;
221
- author: z.ZodNullable<z.ZodObject<{
222
- kind: z.ZodNullable<z.ZodString>;
223
- id: z.ZodNullable<z.ZodString>;
224
- name: z.ZodNullable<z.ZodString>;
225
- }, z.core.$strip>>;
226
- target: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
227
- comments: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
228
- permalink: z.ZodNullable<z.ZodString>;
229
- updatedAt: z.ZodNullable<z.ZodString>;
230
- }, z.core.$strip>;
231
- export declare const annotationListQuerySchema: z.ZodObject<{
232
- limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
233
- cursor: z.ZodOptional<z.ZodString>;
234
- versionId: z.ZodOptional<z.ZodString>;
235
- status: z.ZodOptional<z.ZodEnum<{
236
- open: "open";
237
- resolved: "resolved";
238
- archived: "archived";
239
- }>>;
240
- pagePath: z.ZodOptional<z.ZodString>;
241
- }, z.core.$strip>;
242
- export declare const annotationCreateSchema: z.ZodObject<{
243
- pagePath: z.ZodDefault<z.ZodString>;
244
- body: z.ZodString;
245
- target: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
246
- idempotencyKey: z.ZodOptional<z.ZodString>;
247
- }, z.core.$strip>;
248
- export declare const annotationScreenshotCreateSchema: z.ZodObject<{
249
- versionId: z.ZodString;
250
- pagePath: z.ZodDefault<z.ZodString>;
251
- contentType: z.ZodEnum<{
252
- "image/png": "image/png";
253
- "image/jpeg": "image/jpeg";
254
- "image/webp": "image/webp";
255
- }>;
256
- contentBase64: z.ZodString;
257
- }, z.core.$strip>;
258
- export declare const annotationScreenshotSchema: z.ZodObject<{
259
- id: z.ZodString;
260
- key: z.ZodString;
261
- url: z.ZodString;
262
- expiresAt: z.ZodString;
263
- }, z.core.$strip>;
264
- export declare const annotationReplySchema: z.ZodObject<{
265
- body: z.ZodString;
266
- idempotencyKey: z.ZodOptional<z.ZodString>;
267
- }, z.core.$strip>;
268
- export declare const annotationPatchSchema: z.ZodObject<{
269
- status: z.ZodOptional<z.ZodEnum<{
270
- open: "open";
271
- resolved: "resolved";
272
- archived: "archived";
273
- }>>;
274
- }, z.core.$strip>;
275
- export declare const annotationExportQuerySchema: z.ZodObject<{
276
- format: z.ZodDefault<z.ZodEnum<{
277
- json: "json";
278
- markdown: "markdown";
279
- }>>;
280
- status: z.ZodOptional<z.ZodEnum<{
281
- open: "open";
282
- resolved: "resolved";
283
- archived: "archived";
284
- }>>;
285
- }, z.core.$strip>;
286
- export declare const annotationListResponseSchema: z.ZodObject<{
287
- data: z.ZodArray<z.ZodObject<{
288
- id: z.ZodString;
289
- castThreadId: z.ZodString;
290
- spaceId: z.ZodString;
291
- versionId: z.ZodNullable<z.ZodString>;
292
- channel: z.ZodNullable<z.ZodString>;
293
- pagePath: z.ZodString;
294
- url: z.ZodNullable<z.ZodString>;
295
- status: z.ZodEnum<{
296
- open: "open";
297
- resolved: "resolved";
298
- archived: "archived";
299
- }>;
300
- body: z.ZodNullable<z.ZodString>;
301
- author: z.ZodNullable<z.ZodObject<{
302
- kind: z.ZodNullable<z.ZodString>;
303
- id: z.ZodNullable<z.ZodString>;
304
- name: z.ZodNullable<z.ZodString>;
305
- }, z.core.$strip>>;
306
- target: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
307
- comments: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
308
- permalink: z.ZodNullable<z.ZodString>;
309
- updatedAt: z.ZodNullable<z.ZodString>;
310
- }, z.core.$strip>>;
311
- pagination: z.ZodObject<{
312
- nextCursor: z.ZodNullable<z.ZodString>;
313
- hasMore: z.ZodBoolean;
314
- }, z.core.$strip>;
315
- }, z.core.$strip>;
316
- export declare const annotationExportResponseSchema: z.ZodObject<{
317
- format: z.ZodEnum<{
318
- json: "json";
319
- markdown: "markdown";
320
- }>;
321
- content: z.ZodString;
322
- }, z.core.$strip>;
323
- export type CollaborationInvitedReviewer = z.infer<typeof collaborationInvitedReviewerSchema>;
324
- export type Collaboration = z.infer<typeof collaborationSchema>;
325
- export type CollaborationUpdate = z.infer<typeof collaborationUpdateSchema>;
326
- export type PublicOverlayConfig = z.infer<typeof publicOverlayConfigSchema>;
327
- export type AnnotationThread = z.infer<typeof annotationThreadSchema>;
@@ -1,235 +0,0 @@
1
- import { z } from "zod";
2
- import { CursorPaginationSchema, cursorListQuerySchema } from "./common.js";
3
- export const collaborationModeSchema = z.enum(["review"]);
4
- export const annotationThreadStatusSchema = z.enum(["open", "resolved", "archived"]);
5
- // The space access levels capability follows (SPACEFAST-CAST-PLAN D-2). Invited
6
- // reviewers are space invitees with one of these levels; the on-page overlay and
7
- // inbox re-evaluate the effective level server-side at join — this is only the
8
- // stored grant the dashboard manages.
9
- export const collaborationReviewerLevelSchema = z.enum(["viewer", "commenter", "editor"]);
10
- // An invited reviewer: a person (by email) granted a level on the space's review
11
- // surface. Kept in settingsJson so adding/removing reviewers never requires a
12
- // republish (read from the ETag'd overlay-config, SPACEFAST-CAST-PLAN §4.2).
13
- export const collaborationInvitedReviewerSchema = z.object({
14
- email: z.string().email(),
15
- level: collaborationReviewerLevelSchema,
16
- });
17
- export const collaborationSettingsSchema = z
18
- .object({
19
- anonymousReviewers: z.boolean().optional(),
20
- invitedReviewers: z.array(collaborationInvitedReviewerSchema).optional(),
21
- // Whether comments are surfaced on the live/published host (vs preview-only).
22
- // The published loader (SPACEFAST-CAST-PLAN §4.2) mounts the orb on a live
23
- // host only when this is true; toggling it never requires a republish — the
24
- // always-injected inert tag reads behavior from the ETag'd overlay-config.
25
- publishedComments: z.boolean().optional(),
26
- allowedOrigins: z.array(z.string().min(1)).optional(),
27
- notificationPreferences: z
28
- .object({
29
- newThreads: z.boolean().default(true),
30
- newReplies: z.boolean().default(true),
31
- statusChanges: z.boolean().default(true),
32
- })
33
- .partial()
34
- .optional(),
35
- })
36
- .catchall(z.unknown());
37
- export const collaborationSchema = z.object({
38
- spaceId: z.string(),
39
- enabled: z.boolean(),
40
- mode: collaborationModeSchema,
41
- castResourceId: z.string().nullable(),
42
- castResourceKey: z.string().nullable(),
43
- settings: collaborationSettingsSchema,
44
- createdAt: z.string().datetime().nullable(),
45
- updatedAt: z.string().datetime().nullable(),
46
- });
47
- export const collaborationUpdateSchema = z.object({
48
- enabled: z.boolean(),
49
- mode: collaborationModeSchema.optional(),
50
- settings: collaborationSettingsSchema.optional(),
51
- });
52
- export const collaborationTokenRequestSchema = z.object({
53
- versionId: z.string().min(1).optional(),
54
- pagePath: z.string().min(1).default("/"),
55
- displayName: z.string().min(1).max(120).optional(),
56
- });
57
- export const collaborationTokenResponseSchema = z.object({
58
- token: z.string(),
59
- expiresAt: z.string().datetime(),
60
- cast: z.object({
61
- resource: z.string(),
62
- room: z.string().nullable(),
63
- loaderUrl: z.string().url(),
64
- }),
65
- });
66
- export const collaborationHandoffRequestSchema = z.object({
67
- versionId: z.string().min(1),
68
- pagePath: z.string().min(1).default("/"),
69
- });
70
- export const collaborationHandoffResponseSchema = z.object({
71
- handoffToken: z.string(),
72
- expiresAt: z.string().datetime(),
73
- url: z.string().url().nullable(),
74
- });
75
- export const collaborationHandoffExchangeSchema = z.object({
76
- handoffToken: z.string().min(16),
77
- });
78
- export const realtimeTokenRequestSchema = z.object({
79
- versionId: z.string().optional(),
80
- scope: z.enum(["space", "version"]).default("space"),
81
- });
82
- export const realtimeTokenResponseSchema = z.object({
83
- token: z.string(),
84
- expiresAt: z.string().datetime(),
85
- cast: z.object({
86
- resource: z.string(),
87
- room: z.string(),
88
- loaderUrl: z.string().url(),
89
- }),
90
- });
91
- export const noticePublishSchema = z.object({
92
- versionId: z.string().optional(),
93
- kind: z.string().min(1).max(80).default("version.ready"),
94
- title: z.string().min(1).max(160),
95
- message: z.string().min(1).max(2_000),
96
- level: z.enum(["info", "success", "warning", "error"]).default("info"),
97
- payload: z.record(z.string(), z.unknown()).optional(),
98
- durable: z.boolean().default(true),
99
- idempotencyKey: z.string().min(1).max(320).optional(),
100
- });
101
- export const noticePublishResponseSchema = z.object({
102
- status: z.string(),
103
- event: z.record(z.string(), z.unknown()).nullable(),
104
- broadcast: z.record(z.string(), z.unknown()).nullable(),
105
- });
106
- export const overlayConfigQuerySchema = z.object({
107
- path: z.string().min(1).optional(),
108
- host: z.string().min(1).optional(),
109
- });
110
- export const overlayConfigSchema = z.object({
111
- enabled: z.boolean(),
112
- features: z.object({
113
- annotations: z.boolean(),
114
- anonymousReviewers: z.boolean(),
115
- notices: z.boolean(),
116
- }),
117
- cast: z
118
- .object({
119
- loaderUrl: z.string().url(),
120
- resource: z.string(),
121
- room: z.string(),
122
- wsUrl: z.string().url().nullable().optional(),
123
- inboxUrl: z.string().url().nullable().optional(),
124
- threadUrl: z.string().url().nullable().optional(),
125
- tokenEndpoint: z.string().url(),
126
- handoffEndpoint: z.string().url(),
127
- authBridgeUrl: z.string().url(),
128
- })
129
- .nullable(),
130
- });
131
- // Public (cookie-optional) space-level overlay config (SPACEFAST-CAST-PLAN §3.2,
132
- // shared interfaces). Unlike the per-version overlay-config above, this is served
133
- // to anonymous public visitors with no version id, cross-origin from an arbitrary
134
- // published host. It returns ONLY the data a tiny loader needs to decide whether
135
- // to mount the orb and which room/embed/token URLs to use — never a token.
136
- export const publicOverlayConfigQuerySchema = z.object({
137
- path: z.string().min(1).optional(),
138
- });
139
- export const publicOverlayConfigSchema = z.object({
140
- // Whether collaboration is enabled for the space at all (the orb may mount).
141
- enabled: z.boolean(),
142
- // Whether comments are enabled on the live/published host (vs preview-only).
143
- publishedComments: z.boolean(),
144
- // Whether anonymous public visitors may join and comment without opening the
145
- // auth bridge. The channel remains the authority for the actual action.
146
- anonymousReviewers: z.boolean(),
147
- // The room key for this page on the current live version (null when there is
148
- // no ready version to anchor a room to).
149
- room: z.string().nullable(),
150
- // Cast resource key the SDK should join under.
151
- resourceKey: z.string().nullable(),
152
- // The current live version this page resolves to (null = no ready version).
153
- version: z.object({
154
- id: z.string().nullable(),
155
- current: z.string().nullable(),
156
- }),
157
- // The tiny Cast loader and the full SDK it loads after reviewer interaction.
158
- loaderUrl: z.string().url(),
159
- sdkUrl: z.string().url(),
160
- wsUrl: z.string().nullable(),
161
- inboxUrl: z.string().nullable(),
162
- threadUrl: z.string().nullable(),
163
- tokenUrl: z.string().url(),
164
- // The cross-origin auth-bridge popup URL the published loader opens to mint a
165
- // token without a third-party cookie (SPACEFAST-CAST-PLAN §4.2). Space-scoped
166
- // so it works on any published host (no immutable version is in play).
167
- authBridgeUrl: z.string().url(),
168
- // The caller's effective space access level when resolvable from a session;
169
- // null for anonymous public callers (no session cookie reaches this origin).
170
- level: z.string().nullable(),
171
- });
172
- export const annotationAuthorSchema = z.object({
173
- kind: z.string().nullable(),
174
- id: z.string().nullable(),
175
- name: z.string().nullable(),
176
- });
177
- export const annotationTargetSchema = z.record(z.string(), z.unknown()).nullable();
178
- export const annotationThreadSchema = z.object({
179
- id: z.string(),
180
- castThreadId: z.string(),
181
- spaceId: z.string(),
182
- versionId: z.string().nullable(),
183
- channel: z.string().nullable(),
184
- pagePath: z.string(),
185
- url: z.string().nullable(),
186
- status: annotationThreadStatusSchema,
187
- body: z.string().nullable(),
188
- author: annotationAuthorSchema.nullable(),
189
- target: annotationTargetSchema,
190
- comments: z.array(z.record(z.string(), z.unknown())),
191
- permalink: z.string().nullable(),
192
- updatedAt: z.string().datetime().nullable(),
193
- });
194
- export const annotationListQuerySchema = cursorListQuerySchema.extend({
195
- versionId: z.string().optional(),
196
- status: annotationThreadStatusSchema.optional(),
197
- pagePath: z.string().optional(),
198
- });
199
- export const annotationCreateSchema = z.object({
200
- pagePath: z.string().min(1).default("/"),
201
- body: z.string().min(1).max(16_000),
202
- target: annotationTargetSchema.optional(),
203
- idempotencyKey: z.string().min(1).max(320).optional(),
204
- });
205
- export const annotationScreenshotCreateSchema = z.object({
206
- versionId: z.string().min(1),
207
- pagePath: z.string().min(1).default("/"),
208
- contentType: z.enum(["image/png", "image/jpeg", "image/webp"]),
209
- contentBase64: z.string().min(1),
210
- });
211
- export const annotationScreenshotSchema = z.object({
212
- id: z.string(),
213
- key: z.string(),
214
- url: z.string().url(),
215
- expiresAt: z.string().datetime(),
216
- });
217
- export const annotationReplySchema = z.object({
218
- body: z.string().min(1).max(16_000),
219
- idempotencyKey: z.string().min(1).max(320).optional(),
220
- });
221
- export const annotationPatchSchema = z.object({
222
- status: annotationThreadStatusSchema.optional(),
223
- });
224
- export const annotationExportQuerySchema = z.object({
225
- format: z.enum(["markdown", "json"]).default("markdown"),
226
- status: annotationThreadStatusSchema.optional(),
227
- });
228
- export const annotationListResponseSchema = z.object({
229
- data: z.array(annotationThreadSchema),
230
- pagination: CursorPaginationSchema,
231
- });
232
- export const annotationExportResponseSchema = z.object({
233
- format: z.enum(["markdown", "json"]),
234
- content: z.string(),
235
- });
@@ -1,2 +0,0 @@
1
- export declare const launchEntries: readonly import("./feature-lifecycle-core.js").FeatureRegistryEntry<"zero" | "plans.paid.available" | "anonymous.publishing" | "domains.registration" | "domains.dns_management" | "domains.wpcom_dns" | "domains.domain_connect" | "domains.proxy_bindings" | "collab.preview_loader" | "collab.comments" | "collab.notices" | "collab.published_comments" | "sites.dedicated_runtime" | "tags" | "access.invites" | "access.sso_connections" | "access.byo_issuers" | "domains.catalog" | "build.content_pipeline" | "spaces.slug_rename", "collab.comments" | "sites.dedicated_runtime">[];
2
- export declare const registryHash = "sha256:a1d9cbc355096bb6a473c87d7cb7624d47bd39ad2dd476d7d8eaa728dd94e93f";