@spacefast/common 0.0.21 → 0.0.24
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.
- package/dist/agents/connect-targets.d.ts +9 -6
- package/dist/agents/connect-targets.js +9 -6
- package/dist/config/domains.d.ts +1 -1
- package/dist/config/domains.js +1 -0
- package/dist/config/index.d.ts +0 -1
- package/dist/config/index.js +0 -1
- package/dist/contracts/abuse.d.ts +2 -0
- package/dist/contracts/abuse.js +12 -0
- package/dist/contracts/access.d.ts +121 -9
- package/dist/contracts/access.js +73 -9
- package/dist/contracts/activity.d.ts +1 -1
- package/dist/contracts/activity.js +0 -9
- package/dist/contracts/api-keys.d.ts +21 -21
- package/dist/contracts/beta.js +1 -1
- package/dist/contracts/billing.d.ts +1 -34
- package/dist/contracts/billing.js +4 -53
- package/dist/contracts/builds.d.ts +8 -8
- package/dist/contracts/builds.js +10 -3
- package/dist/contracts/cli.d.ts +10 -0
- package/dist/contracts/cli.js +10 -0
- package/dist/contracts/collab-public.d.ts +63 -0
- package/dist/contracts/collab-public.js +46 -0
- package/dist/contracts/comments.d.ts +283 -54
- package/dist/contracts/comments.js +173 -52
- package/dist/contracts/common.d.ts +3 -3
- package/dist/contracts/device-auth.d.ts +6 -6
- package/dist/contracts/device-auth.js +1 -1
- package/dist/contracts/docs.d.ts +5 -5
- package/dist/contracts/domains.d.ts +36 -36
- package/dist/contracts/enums.d.ts +33 -30
- package/dist/contracts/enums.js +52 -38
- package/dist/contracts/error-code-meta.d.ts +37 -126
- package/dist/contracts/error-code-meta.js +12 -41
- package/dist/contracts/error-codes.d.ts +1 -1
- package/dist/contracts/error-codes.js +10 -32
- package/dist/contracts/execution.d.ts +35 -57
- package/dist/contracts/execution.js +41 -40
- package/dist/contracts/feature-lifecycle-core.d.ts +0 -6
- package/dist/contracts/feature-lifecycle-core.js +2 -31
- package/dist/contracts/feature-lifecycle.d.ts +8 -38
- package/dist/contracts/feature-lifecycle.js +16 -48
- package/dist/contracts/features.d.ts +15 -13
- package/dist/contracts/features.js +39 -38
- package/dist/contracts/functions.d.ts +97 -70
- package/dist/contracts/functions.js +101 -34
- package/dist/contracts/git.d.ts +1 -1
- package/dist/contracts/grants.d.ts +7 -3
- package/dist/contracts/grants.js +18 -9
- package/dist/contracts/internal.d.ts +14 -1
- package/dist/contracts/internal.js +17 -7
- package/dist/contracts/oauth-resources.d.ts +4 -3
- package/dist/contracts/oauth-resources.js +12 -3
- package/dist/contracts/operations.d.ts +90 -5
- package/dist/contracts/operations.js +75 -1
- package/dist/contracts/pages.d.ts +6 -1
- package/dist/contracts/pages.js +24 -1
- package/dist/contracts/plan-policy.d.ts +1 -3
- package/dist/contracts/plan-policy.js +1 -2
- package/dist/contracts/platform.d.ts +61 -148
- package/dist/contracts/platform.js +70 -126
- package/dist/contracts/publish-archive.d.ts +498 -0
- package/dist/contracts/publish-archive.js +25 -0
- package/dist/contracts/resources.d.ts +12 -24
- package/dist/contracts/resources.js +32 -12
- package/dist/contracts/runtime-api.d.ts +369 -175
- package/dist/contracts/runtime-api.js +372 -348
- package/dist/contracts/runtime-app.d.ts +127 -120
- package/dist/contracts/runtime-app.js +19 -10
- package/dist/contracts/runtime-db.d.ts +1 -1
- package/dist/contracts/runtime-services.d.ts +219 -0
- package/dist/contracts/runtime-services.js +437 -0
- package/dist/contracts/runtime-storage.d.ts +45 -32
- package/dist/contracts/runtime-storage.js +30 -8
- package/dist/contracts/space-config.d.ts +10 -16
- package/dist/contracts/space-config.js +14 -10
- package/dist/contracts/spaces.d.ts +241 -436
- package/dist/contracts/spaces.js +128 -145
- package/dist/contracts/superadmin-activity.d.ts +57 -4
- package/dist/contracts/superadmin-activity.js +48 -2
- package/dist/contracts/superadmin-search.d.ts +126 -0
- package/dist/contracts/superadmin-search.js +61 -0
- package/dist/contracts/superadmin-spaces.d.ts +358 -89
- package/dist/contracts/superadmin-spaces.js +97 -24
- package/dist/contracts/superadmin-teams.d.ts +28 -10
- package/dist/contracts/superadmin-teams.js +5 -8
- package/dist/contracts/superadmin.d.ts +0 -32
- package/dist/contracts/superadmin.js +3 -11
- package/dist/contracts/tags.d.ts +9 -9
- package/dist/contracts/teams.d.ts +44 -2
- package/dist/contracts/teams.js +43 -23
- package/dist/contracts/transfers.d.ts +0 -49
- package/dist/contracts/transfers.js +2 -6
- package/dist/contracts/usage.d.ts +61 -0
- package/dist/contracts/usage.js +64 -0
- package/dist/contracts/variables.d.ts +2 -7
- package/dist/contracts/variables.js +6 -5
- package/dist/contracts/webhooks.d.ts +2 -2
- package/dist/contracts/zero.d.ts +87 -56
- package/dist/contracts/zero.js +82 -20
- package/dist/dashboard-paths/index.d.ts +1 -1
- package/dist/dashboard-paths/index.js +1 -0
- package/dist/docs/agent-prose.d.ts +1 -1
- package/dist/docs/agent-prose.js +62 -66
- package/dist/docs/agent-setup.js +49 -23
- package/dist/docs/agent-solutions.d.ts +4 -4
- package/dist/docs/agent-solutions.js +8 -8
- package/dist/docs/catalog.d.ts +19 -19
- package/dist/docs/catalog.js +30 -19
- package/dist/docs/error-docs.js +63 -151
- package/dist/docs/skills.d.ts +3 -3
- package/dist/docs/skills.js +1 -1
- package/dist/test-helpers/fetch-stub.d.ts +16 -0
- package/dist/test-helpers/fetch-stub.js +24 -0
- package/dist/utils/build-settings.js +9 -3
- package/dist/utils/canonical-json.d.ts +10 -0
- package/dist/utils/canonical-json.js +21 -0
- package/dist/utils/cast-transport.d.ts +28 -0
- package/dist/utils/cast-transport.js +52 -0
- package/dist/utils/claim-token.d.ts +0 -8
- package/dist/utils/claim-token.js +3 -15
- package/dist/utils/credential-policy.d.ts +1 -1
- package/dist/utils/env-file.d.ts +17 -0
- package/dist/utils/env-file.js +96 -0
- package/dist/utils/error-code.d.ts +2 -0
- package/dist/utils/error-code.js +7 -0
- package/dist/utils/generate-space-name.d.ts +8 -10
- package/dist/utils/generate-space-name.js +206 -21
- package/dist/utils/grant-decision.fixtures.json +2938 -0
- package/dist/utils/grants.d.ts +2 -0
- package/dist/utils/grants.js +25 -2
- package/dist/utils/gravatar.d.ts +9 -0
- package/dist/utils/gravatar.js +31 -0
- package/dist/utils/idempotency.d.ts +6 -0
- package/dist/utils/idempotency.js +28 -0
- package/dist/utils/local-space-state.d.ts +1 -5
- package/dist/utils/local-space-state.js +7 -26
- package/dist/utils/page-fonts.d.ts +2 -2
- package/dist/utils/page-fonts.js +22 -4
- package/dist/utils/pages.d.ts +1 -2
- package/dist/utils/pages.js +21 -5
- package/dist/utils/publish-form-data.d.ts +12 -0
- package/dist/utils/publish-form-data.js +10 -0
- package/dist/utils/publish-policy.d.ts +20 -0
- package/dist/utils/publish-policy.fixtures.json +397 -0
- package/dist/utils/publish-policy.js +36 -19
- package/dist/utils/push-new.d.ts +7 -0
- package/dist/utils/push-new.js +7 -0
- package/dist/utils/query-keys.d.ts +0 -1
- package/dist/utils/query-keys.js +0 -1
- package/dist/utils/runtime-paths.d.ts +5 -0
- package/dist/utils/runtime-paths.js +5 -0
- package/dist/utils/runtime-upload-batch.d.ts +0 -5
- package/dist/utils/runtime-upload-batch.js +1 -27
- package/dist/utils/runtime-upload.d.ts +3 -13
- package/dist/utils/runtime-upload.js +4 -14
- package/dist/utils/space-config.d.ts +0 -33
- package/dist/utils/space-config.js +5 -326
- package/dist/utils/storage-policy.d.ts +1 -1
- package/dist/utils/storage-policy.js +3 -1
- package/dist/utils/structured-error.d.ts +14 -0
- package/dist/utils/structured-error.js +22 -0
- package/dist/utils/version-path.js +12 -3
- package/dist/vocabulary.d.ts +5 -3
- package/dist/vocabulary.js +13 -10
- package/package.json +10 -5
- package/dist/config/postgres-budget.d.ts +0 -129
- package/dist/config/postgres-budget.js +0 -140
- package/dist/config/postgres-budget.json +0 -51
- package/dist/contracts/archives.d.ts +0 -331
- package/dist/contracts/archives.js +0 -120
- package/dist/contracts/deployments.d.ts +0 -574
- package/dist/contracts/deployments.js +0 -97
- package/dist/contracts/sites.d.ts +0 -416
- package/dist/contracts/sites.js +0 -168
- package/dist/contracts/superadmin-queues.d.ts +0 -414
- package/dist/contracts/superadmin-queues.js +0 -202
- package/dist/contracts/superadmin-runtime.d.ts +0 -27
- package/dist/contracts/superadmin-runtime.js +0 -38
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/utils/api.d.ts +0 -4
- package/dist/utils/api.js +0 -13
|
@@ -40,6 +40,20 @@ export declare const collaborationPublicProfileSchema: z.ZodObject<{
|
|
|
40
40
|
avatar_url: z.ZodNullable<z.ZodURL>;
|
|
41
41
|
}, z.core.$strict>;
|
|
42
42
|
export type CollaborationPublicProfile = z.infer<typeof collaborationPublicProfileSchema>;
|
|
43
|
+
/**
|
|
44
|
+
* Where the browser holding this ticket is.
|
|
45
|
+
*
|
|
46
|
+
* "embed" is a third-party site the owner allowlisted, and it is its own state
|
|
47
|
+
* precisely so nothing pretends a foreign origin is a published Spacefast host:
|
|
48
|
+
* the room an embed ticket names is origin-scoped, and both the mint and Cast
|
|
49
|
+
* refuse the pairing in either direction.
|
|
50
|
+
*/
|
|
51
|
+
export declare const collaborationSurfaceSchema: z.ZodEnum<{
|
|
52
|
+
preview: "preview";
|
|
53
|
+
published: "published";
|
|
54
|
+
embed: "embed";
|
|
55
|
+
}>;
|
|
56
|
+
export type CollaborationSurface = z.infer<typeof collaborationSurfaceSchema>;
|
|
43
57
|
export declare const collaborationTicketClaimsSchema: z.ZodObject<{
|
|
44
58
|
sub: z.ZodString;
|
|
45
59
|
email: z.ZodOptional<z.ZodString>;
|
|
@@ -74,6 +88,7 @@ export declare const collaborationTicketClaimsSchema: z.ZodObject<{
|
|
|
74
88
|
surface: z.ZodEnum<{
|
|
75
89
|
preview: "preview";
|
|
76
90
|
published: "published";
|
|
91
|
+
embed: "embed";
|
|
77
92
|
}>;
|
|
78
93
|
nonce: z.ZodString;
|
|
79
94
|
iat: z.ZodNumber;
|
|
@@ -82,9 +97,30 @@ export declare const collaborationTicketClaimsSchema: z.ZodObject<{
|
|
|
82
97
|
iss: z.ZodLiteral<"spacefast-api">;
|
|
83
98
|
aud: z.ZodString;
|
|
84
99
|
}, z.core.$strip>;
|
|
100
|
+
export declare const commentsSurfaceSchema: z.ZodEnum<{
|
|
101
|
+
off: "off";
|
|
102
|
+
previews: "previews";
|
|
103
|
+
everywhere: "everywhere";
|
|
104
|
+
}>;
|
|
105
|
+
export declare const COMMENTS_EMBED_ORIGINS_MAX = 20;
|
|
106
|
+
/**
|
|
107
|
+
* A site the Space owner allows the one-line Collab insert to run on.
|
|
108
|
+
*
|
|
109
|
+
* Exactly one https origin — scheme, host, and port, nothing else. No
|
|
110
|
+
* wildcards: on a foreign site this list IS the entitlement, and `*.example.com`
|
|
111
|
+
* hands it to every subdomain the site ever loses control of. An off-shape
|
|
112
|
+
* value is refused rather than normalized, so what the owner typed and what the
|
|
113
|
+
* server matches are the same string.
|
|
114
|
+
*/
|
|
115
|
+
export declare const commentsEmbedOriginSchema: z.ZodString;
|
|
85
116
|
export declare const collaborationSettingsSchema: z.ZodObject<{
|
|
86
117
|
spamFilterEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
87
|
-
|
|
118
|
+
surface: z.ZodDefault<z.ZodEnum<{
|
|
119
|
+
off: "off";
|
|
120
|
+
previews: "previews";
|
|
121
|
+
everywhere: "everywhere";
|
|
122
|
+
}>>;
|
|
123
|
+
embedOrigins: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
88
124
|
notificationPreferences: z.ZodOptional<z.ZodObject<{
|
|
89
125
|
newThreads: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
90
126
|
newReplies: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
@@ -94,12 +130,16 @@ export declare const collaborationSettingsSchema: z.ZodObject<{
|
|
|
94
130
|
export declare const collaborationSchema: z.ZodObject<{
|
|
95
131
|
spaceId: z.ZodString;
|
|
96
132
|
revision: z.ZodNumber;
|
|
97
|
-
enabled: z.ZodBoolean;
|
|
98
133
|
castResourceId: z.ZodNullable<z.ZodString>;
|
|
99
134
|
castResourceKey: z.ZodNullable<z.ZodString>;
|
|
100
135
|
settings: z.ZodObject<{
|
|
101
136
|
spamFilterEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
102
|
-
|
|
137
|
+
surface: z.ZodDefault<z.ZodEnum<{
|
|
138
|
+
off: "off";
|
|
139
|
+
previews: "previews";
|
|
140
|
+
everywhere: "everywhere";
|
|
141
|
+
}>>;
|
|
142
|
+
embedOrigins: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
103
143
|
notificationPreferences: z.ZodOptional<z.ZodObject<{
|
|
104
144
|
newThreads: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
105
145
|
newReplies: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
@@ -111,42 +151,91 @@ export declare const collaborationSchema: z.ZodObject<{
|
|
|
111
151
|
}, z.core.$strip>;
|
|
112
152
|
export declare const collaborationUpdateSchema: z.ZodObject<{
|
|
113
153
|
expectedRevision: z.ZodNumber;
|
|
114
|
-
|
|
115
|
-
settings: z.ZodOptional<z.ZodObject<{
|
|
154
|
+
settings: z.ZodObject<{
|
|
116
155
|
spamFilterEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
117
|
-
|
|
156
|
+
surface: z.ZodOptional<z.ZodEnum<{
|
|
157
|
+
off: "off";
|
|
158
|
+
previews: "previews";
|
|
159
|
+
everywhere: "everywhere";
|
|
160
|
+
}>>;
|
|
161
|
+
embedOrigins: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
118
162
|
notificationPreferences: z.ZodOptional<z.ZodObject<{
|
|
119
163
|
newThreads: z.ZodOptional<z.ZodBoolean>;
|
|
120
164
|
newReplies: z.ZodOptional<z.ZodBoolean>;
|
|
121
165
|
statusChanges: z.ZodOptional<z.ZodBoolean>;
|
|
122
166
|
}, z.core.$strict>>;
|
|
123
|
-
}, z.core.$strict
|
|
167
|
+
}, z.core.$strict>;
|
|
124
168
|
}, z.core.$strip>;
|
|
125
|
-
|
|
126
|
-
|
|
169
|
+
/**
|
|
170
|
+
* The overlay's whole configuration, in one shape.
|
|
171
|
+
*
|
|
172
|
+
* Both lanes carry this: the Space's own origins get it from the runtime's
|
|
173
|
+
* same-origin exchange, a third-party site fetches it over CORS keyed by
|
|
174
|
+
* `data-space`. Only the transport differs — the SDK parses one shape.
|
|
175
|
+
*/
|
|
176
|
+
export declare const collabOverlayConfigSchema: z.ZodObject<{
|
|
177
|
+
enabled: z.ZodBoolean;
|
|
178
|
+
resource_key: z.ZodNullable<z.ZodString>;
|
|
179
|
+
room_key: z.ZodNullable<z.ZodString>;
|
|
180
|
+
version: z.ZodObject<{
|
|
181
|
+
id: z.ZodNullable<z.ZodString>;
|
|
182
|
+
current: z.ZodNullable<z.ZodString>;
|
|
183
|
+
url: z.ZodNullable<z.ZodString>;
|
|
184
|
+
}, z.core.$strip>;
|
|
185
|
+
space: z.ZodObject<{
|
|
186
|
+
live_url: z.ZodNullable<z.ZodString>;
|
|
187
|
+
}, z.core.$strip>;
|
|
188
|
+
theme: z.ZodObject<{
|
|
189
|
+
accent: z.ZodNullable<z.ZodString>;
|
|
190
|
+
hide_branding: z.ZodBoolean;
|
|
191
|
+
}, z.core.$strip>;
|
|
192
|
+
ws_url: z.ZodNullable<z.ZodString>;
|
|
193
|
+
endpoints: z.ZodObject<{
|
|
194
|
+
ticket: z.ZodString;
|
|
195
|
+
}, z.core.$strip>;
|
|
196
|
+
features: z.ZodObject<{
|
|
197
|
+
picker: z.ZodOptional<z.ZodBoolean>;
|
|
198
|
+
drawing: z.ZodBoolean;
|
|
199
|
+
capture: z.ZodBoolean;
|
|
200
|
+
attachments: z.ZodBoolean;
|
|
201
|
+
notices: z.ZodBoolean;
|
|
202
|
+
}, z.core.$strip>;
|
|
203
|
+
}, z.core.$strip>;
|
|
204
|
+
export type CollabOverlayConfig = z.infer<typeof collabOverlayConfigSchema>;
|
|
205
|
+
export declare const commentsEmbedIdentitySchema: z.ZodObject<{
|
|
206
|
+
name: z.ZodString;
|
|
207
|
+
namedByUser: z.ZodBoolean;
|
|
208
|
+
}, z.core.$strip>;
|
|
209
|
+
export declare const commentsEmbedTicketRequestSchema: z.ZodObject<{
|
|
127
210
|
pagePath: z.ZodDefault<z.ZodString>;
|
|
128
|
-
|
|
129
|
-
versionId: z.ZodOptional<z.ZodString>;
|
|
130
|
-
identity: z.ZodOptional<z.ZodObject<{
|
|
211
|
+
identity: z.ZodObject<{
|
|
131
212
|
name: z.ZodString;
|
|
132
|
-
anonymousId: z.ZodString;
|
|
133
213
|
namedByUser: z.ZodBoolean;
|
|
134
|
-
}, z.core.$strip
|
|
214
|
+
}, z.core.$strip>;
|
|
215
|
+
visitorToken: z.ZodOptional<z.ZodString>;
|
|
135
216
|
}, z.core.$strip>;
|
|
136
|
-
export declare const
|
|
217
|
+
export declare const commentsEmbedTicketResponseSchema: z.ZodObject<{
|
|
137
218
|
token: z.ZodString;
|
|
138
219
|
expiresAt: z.ZodString;
|
|
139
220
|
cast: z.ZodObject<{
|
|
140
221
|
resource: z.ZodString;
|
|
141
222
|
room: z.ZodString;
|
|
142
223
|
}, z.core.$strip>;
|
|
224
|
+
visitorToken: z.ZodString;
|
|
225
|
+
visitorExpiresAt: z.ZodString;
|
|
143
226
|
}, z.core.$strip>;
|
|
144
|
-
export declare const
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
227
|
+
export declare const commentsTicketResponseSchema: z.ZodObject<{
|
|
228
|
+
token: z.ZodString;
|
|
229
|
+
expiresAt: z.ZodString;
|
|
230
|
+
cast: z.ZodObject<{
|
|
231
|
+
resource: z.ZodString;
|
|
232
|
+
room: z.ZodString;
|
|
233
|
+
wsUrl: z.ZodNullable<z.ZodString>;
|
|
234
|
+
}, z.core.$strip>;
|
|
235
|
+
notice: z.ZodNullable<z.ZodObject<{
|
|
236
|
+
token: z.ZodString;
|
|
237
|
+
room: z.ZodString;
|
|
238
|
+
}, z.core.$strip>>;
|
|
150
239
|
}, z.core.$strip>;
|
|
151
240
|
export declare const realtimeTokenResponseSchema: z.ZodObject<{
|
|
152
241
|
token: z.ZodString;
|
|
@@ -154,8 +243,16 @@ export declare const realtimeTokenResponseSchema: z.ZodObject<{
|
|
|
154
243
|
cast: z.ZodObject<{
|
|
155
244
|
resource: z.ZodString;
|
|
156
245
|
room: z.ZodString;
|
|
246
|
+
wsUrl: z.ZodNullable<z.ZodString>;
|
|
157
247
|
}, z.core.$strip>;
|
|
158
248
|
}, z.core.$strip>;
|
|
249
|
+
/**
|
|
250
|
+
* A Space-level fact worth interrupting someone for. It travels as a `notice`
|
|
251
|
+
* on the Space's notice room — never as an event in a page room — because it
|
|
252
|
+
* is not conversation content: every open surface needs it regardless of which
|
|
253
|
+
* page it happens to be sitting on, including surfaces (the dashboard) that
|
|
254
|
+
* are in no page room at all.
|
|
255
|
+
*/
|
|
159
256
|
export declare const noticePublishSchema: z.ZodObject<{
|
|
160
257
|
versionId: z.ZodOptional<z.ZodString>;
|
|
161
258
|
kind: z.ZodDefault<z.ZodString>;
|
|
@@ -164,17 +261,22 @@ export declare const noticePublishSchema: z.ZodObject<{
|
|
|
164
261
|
level: z.ZodDefault<z.ZodEnum<{
|
|
165
262
|
info: "info";
|
|
166
263
|
success: "success";
|
|
167
|
-
error: "error";
|
|
168
264
|
warning: "warning";
|
|
265
|
+
error: "error";
|
|
169
266
|
}>>;
|
|
170
267
|
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
171
|
-
durable: z.ZodDefault<z.ZodBoolean>;
|
|
172
|
-
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
173
268
|
}, z.core.$strip>;
|
|
269
|
+
/** The wire shape of one notice, shared by the platform and comment lanes. */
|
|
270
|
+
export declare const spaceNoticeSchema: z.ZodObject<{
|
|
271
|
+
kind: z.ZodString;
|
|
272
|
+
version_id: z.ZodNullable<z.ZodString>;
|
|
273
|
+
}, z.core.$loose>;
|
|
174
274
|
export declare const noticePublishResponseSchema: z.ZodObject<{
|
|
175
275
|
status: z.ZodString;
|
|
176
|
-
|
|
177
|
-
|
|
276
|
+
notice: z.ZodObject<{
|
|
277
|
+
kind: z.ZodString;
|
|
278
|
+
version_id: z.ZodNullable<z.ZodString>;
|
|
279
|
+
}, z.core.$loose>;
|
|
178
280
|
}, z.core.$strip>;
|
|
179
281
|
export declare const COLLAB_VERSION_URLS_MAX_IDS = 50;
|
|
180
282
|
export declare const collabVersionUrlSchema: z.ZodObject<{
|
|
@@ -193,6 +295,57 @@ export declare const commentAuthorSchema: z.ZodObject<{
|
|
|
193
295
|
color: z.ZodNullable<z.ZodString>;
|
|
194
296
|
}, z.core.$strip>;
|
|
195
297
|
export declare const commentTargetSchema: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
298
|
+
/**
|
|
299
|
+
* How many attachments one thread or reply may carry. Mirrors Cast's own
|
|
300
|
+
* `@attachment_limit`: Cast is the authority that enforces it on write, this
|
|
301
|
+
* bound is what REST readers can rely on.
|
|
302
|
+
*/
|
|
303
|
+
export declare const COMMENT_ATTACHMENT_MAX_COUNT = 10;
|
|
304
|
+
/**
|
|
305
|
+
* A pointer to a storage object on the Space's own runtime plus the descriptor
|
|
306
|
+
* needed to render it — never a URL. Cast stores exactly this (snake_case) under
|
|
307
|
+
* `metadata.attachments`; the id is a bare 32-hex object id.
|
|
308
|
+
*/
|
|
309
|
+
export declare const commentAttachmentSchema: z.ZodObject<{
|
|
310
|
+
id: z.ZodString;
|
|
311
|
+
name: z.ZodString;
|
|
312
|
+
contentType: z.ZodString;
|
|
313
|
+
size: z.ZodNumber;
|
|
314
|
+
kind: z.ZodEnum<{
|
|
315
|
+
file: "file";
|
|
316
|
+
image: "image";
|
|
317
|
+
screenshot: "screenshot";
|
|
318
|
+
}>;
|
|
319
|
+
crop: z.ZodOptional<z.ZodObject<{
|
|
320
|
+
x: z.ZodNumber;
|
|
321
|
+
y: z.ZodNumber;
|
|
322
|
+
width: z.ZodNumber;
|
|
323
|
+
height: z.ZodNumber;
|
|
324
|
+
}, z.core.$strip>>;
|
|
325
|
+
}, z.core.$strip>;
|
|
326
|
+
/**
|
|
327
|
+
* What a REST reader gets: the stored attachment plus a freshly composed read
|
|
328
|
+
* URL. `url` is null when the runtime's revocable read key cannot be resolved —
|
|
329
|
+
* an honest degraded read rather than a dead link or a dropped attachment.
|
|
330
|
+
*/
|
|
331
|
+
export declare const commentAttachmentViewSchema: z.ZodObject<{
|
|
332
|
+
id: z.ZodString;
|
|
333
|
+
name: z.ZodString;
|
|
334
|
+
contentType: z.ZodString;
|
|
335
|
+
size: z.ZodNumber;
|
|
336
|
+
kind: z.ZodEnum<{
|
|
337
|
+
file: "file";
|
|
338
|
+
image: "image";
|
|
339
|
+
screenshot: "screenshot";
|
|
340
|
+
}>;
|
|
341
|
+
crop: z.ZodOptional<z.ZodObject<{
|
|
342
|
+
x: z.ZodNumber;
|
|
343
|
+
y: z.ZodNumber;
|
|
344
|
+
width: z.ZodNumber;
|
|
345
|
+
height: z.ZodNumber;
|
|
346
|
+
}, z.core.$strip>>;
|
|
347
|
+
url: z.ZodNullable<z.ZodString>;
|
|
348
|
+
}, z.core.$strip>;
|
|
196
349
|
export declare const commentReactionActorSchema: z.ZodObject<{
|
|
197
350
|
name: z.ZodNullable<z.ZodString>;
|
|
198
351
|
}, z.core.$strip>;
|
|
@@ -217,6 +370,31 @@ export declare const commentReactionUpdateSchema: z.ZodObject<{
|
|
|
217
370
|
add: "add";
|
|
218
371
|
}>;
|
|
219
372
|
}, z.core.$strip>;
|
|
373
|
+
/**
|
|
374
|
+
* A reply keeps Cast's own free-form shape; `attachments` is the one field the
|
|
375
|
+
* API composes rather than passes through (Cast carries it in the reply's
|
|
376
|
+
* `metadata`, without URLs).
|
|
377
|
+
*/
|
|
378
|
+
export declare const commentReplyViewSchema: z.ZodObject<{
|
|
379
|
+
attachments: z.ZodArray<z.ZodObject<{
|
|
380
|
+
id: z.ZodString;
|
|
381
|
+
name: z.ZodString;
|
|
382
|
+
contentType: z.ZodString;
|
|
383
|
+
size: z.ZodNumber;
|
|
384
|
+
kind: z.ZodEnum<{
|
|
385
|
+
file: "file";
|
|
386
|
+
image: "image";
|
|
387
|
+
screenshot: "screenshot";
|
|
388
|
+
}>;
|
|
389
|
+
crop: z.ZodOptional<z.ZodObject<{
|
|
390
|
+
x: z.ZodNumber;
|
|
391
|
+
y: z.ZodNumber;
|
|
392
|
+
width: z.ZodNumber;
|
|
393
|
+
height: z.ZodNumber;
|
|
394
|
+
}, z.core.$strip>>;
|
|
395
|
+
url: z.ZodNullable<z.ZodString>;
|
|
396
|
+
}, z.core.$strip>>;
|
|
397
|
+
}, z.core.$loose>;
|
|
220
398
|
export declare const commentThreadSchema: z.ZodObject<{
|
|
221
399
|
id: z.ZodString;
|
|
222
400
|
castThreadId: z.ZodString;
|
|
@@ -253,7 +431,44 @@ export declare const commentThreadSchema: z.ZodObject<{
|
|
|
253
431
|
name: z.ZodNullable<z.ZodString>;
|
|
254
432
|
}, z.core.$strip>>;
|
|
255
433
|
}, z.core.$strip>>;
|
|
256
|
-
|
|
434
|
+
attachments: z.ZodArray<z.ZodObject<{
|
|
435
|
+
id: z.ZodString;
|
|
436
|
+
name: z.ZodString;
|
|
437
|
+
contentType: z.ZodString;
|
|
438
|
+
size: z.ZodNumber;
|
|
439
|
+
kind: z.ZodEnum<{
|
|
440
|
+
file: "file";
|
|
441
|
+
image: "image";
|
|
442
|
+
screenshot: "screenshot";
|
|
443
|
+
}>;
|
|
444
|
+
crop: z.ZodOptional<z.ZodObject<{
|
|
445
|
+
x: z.ZodNumber;
|
|
446
|
+
y: z.ZodNumber;
|
|
447
|
+
width: z.ZodNumber;
|
|
448
|
+
height: z.ZodNumber;
|
|
449
|
+
}, z.core.$strip>>;
|
|
450
|
+
url: z.ZodNullable<z.ZodString>;
|
|
451
|
+
}, z.core.$strip>>;
|
|
452
|
+
comments: z.ZodArray<z.ZodObject<{
|
|
453
|
+
attachments: z.ZodArray<z.ZodObject<{
|
|
454
|
+
id: z.ZodString;
|
|
455
|
+
name: z.ZodString;
|
|
456
|
+
contentType: z.ZodString;
|
|
457
|
+
size: z.ZodNumber;
|
|
458
|
+
kind: z.ZodEnum<{
|
|
459
|
+
file: "file";
|
|
460
|
+
image: "image";
|
|
461
|
+
screenshot: "screenshot";
|
|
462
|
+
}>;
|
|
463
|
+
crop: z.ZodOptional<z.ZodObject<{
|
|
464
|
+
x: z.ZodNumber;
|
|
465
|
+
y: z.ZodNumber;
|
|
466
|
+
width: z.ZodNumber;
|
|
467
|
+
height: z.ZodNumber;
|
|
468
|
+
}, z.core.$strip>>;
|
|
469
|
+
url: z.ZodNullable<z.ZodString>;
|
|
470
|
+
}, z.core.$strip>>;
|
|
471
|
+
}, z.core.$loose>>;
|
|
257
472
|
permalink: z.ZodNullable<z.ZodString>;
|
|
258
473
|
updatedAt: z.ZodNullable<z.ZodString>;
|
|
259
474
|
}, z.core.$strip>;
|
|
@@ -284,32 +499,6 @@ export declare const commentCreateSchema: z.ZodObject<{
|
|
|
284
499
|
target: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
285
500
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
286
501
|
}, z.core.$strip>;
|
|
287
|
-
export declare const commentScreenshotCreateSchema: z.ZodObject<{
|
|
288
|
-
versionId: z.ZodString;
|
|
289
|
-
pagePath: z.ZodDefault<z.ZodString>;
|
|
290
|
-
contentType: z.ZodEnum<{
|
|
291
|
-
"image/jpeg": "image/jpeg";
|
|
292
|
-
"image/png": "image/png";
|
|
293
|
-
"image/webp": "image/webp";
|
|
294
|
-
}>;
|
|
295
|
-
contentBase64: z.ZodString;
|
|
296
|
-
}, z.core.$strip>;
|
|
297
|
-
export declare const commentScreenshotSchema: z.ZodObject<{
|
|
298
|
-
id: z.ZodString;
|
|
299
|
-
key: z.ZodString;
|
|
300
|
-
url: z.ZodString;
|
|
301
|
-
expiresAt: z.ZodString;
|
|
302
|
-
}, z.core.$strip>;
|
|
303
|
-
export declare const commentScreenshotRefreshSchema: z.ZodObject<{
|
|
304
|
-
versionId: z.ZodString;
|
|
305
|
-
pagePath: z.ZodDefault<z.ZodString>;
|
|
306
|
-
key: z.ZodString;
|
|
307
|
-
}, z.core.$strip>;
|
|
308
|
-
export declare const commentScreenshotRefreshResponseSchema: z.ZodObject<{
|
|
309
|
-
key: z.ZodString;
|
|
310
|
-
url: z.ZodString;
|
|
311
|
-
expiresAt: z.ZodString;
|
|
312
|
-
}, z.core.$strip>;
|
|
313
502
|
export declare const commentReplySchema: z.ZodObject<{
|
|
314
503
|
body: z.ZodString;
|
|
315
504
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
@@ -367,7 +556,44 @@ export declare const commentListResponseSchema: z.ZodObject<{
|
|
|
367
556
|
name: z.ZodNullable<z.ZodString>;
|
|
368
557
|
}, z.core.$strip>>;
|
|
369
558
|
}, z.core.$strip>>;
|
|
370
|
-
|
|
559
|
+
attachments: z.ZodArray<z.ZodObject<{
|
|
560
|
+
id: z.ZodString;
|
|
561
|
+
name: z.ZodString;
|
|
562
|
+
contentType: z.ZodString;
|
|
563
|
+
size: z.ZodNumber;
|
|
564
|
+
kind: z.ZodEnum<{
|
|
565
|
+
file: "file";
|
|
566
|
+
image: "image";
|
|
567
|
+
screenshot: "screenshot";
|
|
568
|
+
}>;
|
|
569
|
+
crop: z.ZodOptional<z.ZodObject<{
|
|
570
|
+
x: z.ZodNumber;
|
|
571
|
+
y: z.ZodNumber;
|
|
572
|
+
width: z.ZodNumber;
|
|
573
|
+
height: z.ZodNumber;
|
|
574
|
+
}, z.core.$strip>>;
|
|
575
|
+
url: z.ZodNullable<z.ZodString>;
|
|
576
|
+
}, z.core.$strip>>;
|
|
577
|
+
comments: z.ZodArray<z.ZodObject<{
|
|
578
|
+
attachments: z.ZodArray<z.ZodObject<{
|
|
579
|
+
id: z.ZodString;
|
|
580
|
+
name: z.ZodString;
|
|
581
|
+
contentType: z.ZodString;
|
|
582
|
+
size: z.ZodNumber;
|
|
583
|
+
kind: z.ZodEnum<{
|
|
584
|
+
file: "file";
|
|
585
|
+
image: "image";
|
|
586
|
+
screenshot: "screenshot";
|
|
587
|
+
}>;
|
|
588
|
+
crop: z.ZodOptional<z.ZodObject<{
|
|
589
|
+
x: z.ZodNumber;
|
|
590
|
+
y: z.ZodNumber;
|
|
591
|
+
width: z.ZodNumber;
|
|
592
|
+
height: z.ZodNumber;
|
|
593
|
+
}, z.core.$strip>>;
|
|
594
|
+
url: z.ZodNullable<z.ZodString>;
|
|
595
|
+
}, z.core.$strip>>;
|
|
596
|
+
}, z.core.$loose>>;
|
|
371
597
|
permalink: z.ZodNullable<z.ZodString>;
|
|
372
598
|
updatedAt: z.ZodNullable<z.ZodString>;
|
|
373
599
|
}, z.core.$strip>>;
|
|
@@ -385,5 +611,8 @@ export declare const commentExportResponseSchema: z.ZodObject<{
|
|
|
385
611
|
}, z.core.$strip>;
|
|
386
612
|
export type Collaboration = z.infer<typeof collaborationSchema>;
|
|
387
613
|
export type CollaborationUpdate = z.infer<typeof collaborationUpdateSchema>;
|
|
614
|
+
export type CommentsSurface = z.infer<typeof commentsSurfaceSchema>;
|
|
388
615
|
export type CollabVersionUrl = z.infer<typeof collabVersionUrlSchema>;
|
|
389
616
|
export type CommentThread = z.infer<typeof commentThreadSchema>;
|
|
617
|
+
export type CommentAttachment = z.infer<typeof commentAttachmentSchema>;
|
|
618
|
+
export type CommentAttachmentView = z.infer<typeof commentAttachmentViewSchema>;
|