@vercel/board 0.33.0 → 0.34.0

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 (59) hide show
  1. package/dist/{access-N3XmkKXg.mjs → access-CdBcYPQH.mjs} +169 -12
  2. package/dist/access.d.mts +3 -3
  3. package/dist/access.mjs +5 -5
  4. package/dist/{actors-ihyN47OV.mjs → actors-MrIEr9LI.mjs} +2 -2
  5. package/dist/auth-DjoJygbG.mjs +599 -0
  6. package/dist/{auth-D6z3rMNj.d.mts → auth-aaoKt5DK.d.mts} +128 -9
  7. package/dist/backend-local.d.mts +1 -1
  8. package/dist/backend-local.mjs +1 -1
  9. package/dist/{backend-CWpyR1A7.d.mts → backend-u1sVvybh.d.mts} +30 -7
  10. package/dist/{chat-provider-DJpFUaFv.d.mts → chat-provider-De0iDnUB.d.mts} +2 -2
  11. package/dist/cli-commands.d.mts +1 -1
  12. package/dist/cli-commands.mjs +1 -1
  13. package/dist/cli-embedded.d.mts +2 -2
  14. package/dist/cli-embedded.mjs +1 -1
  15. package/dist/cli.mjs +5 -5
  16. package/dist/{commands-CHoMl06v.mjs → commands-B8oZEByR.mjs} +25 -51
  17. package/dist/{commands-BOBQHVqM.d.mts → commands-BkVMdXP1.d.mts} +0 -6
  18. package/dist/{conformance-qKmGLTAT.mjs → conformance-gqYBkXFS.mjs} +76 -83
  19. package/dist/conformance.d.mts +1 -1
  20. package/dist/conformance.mjs +1 -1
  21. package/dist/{engine-JxgZiikU.mjs → engine-rtOVWsiF.mjs} +2 -2
  22. package/dist/{errors-Pk0XV1hK.mjs → errors-D8ifv16L.mjs} +19 -4
  23. package/dist/{exports-gHDHlg0i.mjs → exports-Bx2dGpzr.mjs} +55 -10
  24. package/dist/exports-uwRl5qIj.d.mts +4 -0
  25. package/dist/{index-CXvvYNYj.d.mts → index-D6mK0Ial.d.mts} +2 -2
  26. package/dist/index.d.mts +6 -6
  27. package/dist/index.mjs +4 -4
  28. package/dist/index.node.d.mts +6 -6
  29. package/dist/index.node.mjs +3 -3
  30. package/dist/inspect/app.js +31 -31
  31. package/dist/{local-BbLjA5vI.mjs → local-CPz22MQ8.mjs} +1981 -1574
  32. package/dist/{main-CQpCZJFw.mjs → main-DScDKwQN.mjs} +45 -38
  33. package/dist/{middleware-BU7rVi9F.mjs → middleware-BjYpk4yq.mjs} +1 -1
  34. package/dist/provider-hB8QNrwm.d.mts +1031 -0
  35. package/dist/{provider-BlzUvcM9.d.mts → routes-De4W6lEs.d.mts} +2439 -2469
  36. package/dist/{serve-D8_W4UN6.mjs → serve-B1noQRkn.mjs} +4 -4
  37. package/dist/{server-BiIUXWbU.mjs → server-Ov6GBJ8j.mjs} +7 -7
  38. package/dist/{serving-D7rcUtSC.mjs → serving-2s7lqSBS.mjs} +1 -1
  39. package/dist/sync-chat-sdk.d.mts +2 -2
  40. package/dist/sync-github.d.mts +2 -2
  41. package/dist/sync-linear.d.mts +3 -2
  42. package/dist/sync-slack.d.mts +3 -3
  43. package/dist/sync.d.mts +2 -2
  44. package/dist/{targets-CknPGGVi.mjs → targets-aMdbp84G.mjs} +98 -10
  45. package/dist/{tokens-DPKjl3jf.mjs → tokens-LHLrnV_P.mjs} +2 -2
  46. package/docs/01-board/01-mounting.md +5 -3
  47. package/docs/01-board/03-identity.md +14 -13
  48. package/docs/01-board/07-schedules.md +1 -1
  49. package/docs/01-board/09-access.md +140 -59
  50. package/docs/03-guides/03-ci.md +15 -15
  51. package/docs/03-guides/05-agent-factory.md +5 -6
  52. package/docs/04-reference/01-cli.md +9 -16
  53. package/docs/04-reference/02-board.md +19 -8
  54. package/docs/04-reference/03-http.md +20 -13
  55. package/docs/04-reference/05-conformance.md +1 -1
  56. package/package.json +1 -1
  57. package/dist/auth-r-_PeZyw.mjs +0 -277
  58. package/dist/exports-BuKjVq2t.d.mts +0 -4
  59. package/dist/folds-DjFTiqIM.d.mts +0 -552
@@ -1,552 +0,0 @@
1
- import { z } from "zod";
2
- //#region src/server/access.d.ts
3
- /**
4
- * What a principal may do in a channel. `read` covers messages, threads,
5
- * `/events`, and schedules; `post` starts threads and edits your own messages;
6
- * `manage` is the board's own bookkeeping (inbox, sources).
7
- */
8
- declare const PERMISSIONS: readonly ['read', 'post', 'react', 'label', 'sync', 'manage'];
9
- type Permission = (typeof PERMISSIONS)[number];
10
- /** `*`, a channel (`feedback`), or a channel and its subtree (`feedback/`). */
11
- type ChannelPattern = string;
12
- type Grant = 'all' | readonly Permission[];
13
- /** `'all'`, a list for every channel (`['post']` is `{ '*': ['post'] }`), or a map from pattern to grant. */
14
- type Can = Grant | Readonly<Record<ChannelPattern, Grant>>;
15
- /** Each pattern's whole answer, implications included. */
16
- type AccessSummary = Readonly<Record<ChannelPattern, readonly Permission[]>>;
17
- type Access = {
18
- can(permission: Permission, channel: string): boolean;
19
- /** The hot path for feeds: memoized per channel. */
20
- readable(channel: string): boolean;
21
- /** `read` in every channel, including ones that don't exist yet. */
22
- readsAll: boolean;
23
- /** `permission` in every channel, including ones that don't exist yet: `everywhere('manage')` is full access. */
24
- everywhere(permission: Permission): boolean;
25
- /** `permission` in some channel. */
26
- anywhere(permission: Permission): boolean;
27
- /** Only what both this and `scope` allow, channel by channel. It never widens. */
28
- narrow(scope: Can | Access): Access;
29
- /** Each pattern and its permissions, `*` first and the rest sorted; an empty `*` is left out. */
30
- summary(): AccessSummary;
31
- };
32
- /** Access from config: `'all'`, a list for every channel, or a map from pattern to grant. Throws on a bad pattern or permission. */
33
- declare function compileAccess(can: Can): Access;
34
- declare const FULL_ACCESS: Access;
35
- /** What any of `accesses` allows, channel by channel: grants that match one principal add up. */
36
- declare function union(accesses: readonly Access[]): Access;
37
- //#endregion
38
- //#region src/contract/schemas.d.ts
39
- declare const Labels: z.ZodRecord<z.ZodString, z.ZodString>;
40
- /** What an actor is: a `person`, an `agent` acting for a principal (`--as claude`), a deployment, a workflow, or a platform user (`external`). */
41
- declare const ActorKind: z.ZodEnum<{
42
- agent: "agent";
43
- deployment: "deployment";
44
- external: "external";
45
- person: "person";
46
- workflow: "workflow";
47
- }>;
48
- declare const Author: z.ZodObject<{
49
- actor: z.ZodString;
50
- principal: z.ZodString;
51
- profile: z.ZodNullable<z.ZodString>;
52
- session: z.ZodNullable<z.ZodString>;
53
- }, z.core.$strip>;
54
- /** A file on a message. The board records `type` and `size` from what it stored, never from the request. */
55
- declare const Attachment: z.ZodObject<{
56
- id: z.ZodString;
57
- name: z.ZodString;
58
- type: z.ZodString;
59
- size: z.ZodNumber;
60
- }, z.core.$strip>;
61
- type Labels = z.infer<typeof Labels>;
62
- type ActorKind = z.infer<typeof ActorKind>;
63
- type Author = z.infer<typeof Author>;
64
- type Attachment = z.infer<typeof Attachment>;
65
- //#endregion
66
- //#region src/contract/events.d.ts
67
- /** The board's one log. Every board fact is an event in session `board`. */
68
- declare const boardEvents: {
69
- 'message.posted': z.ZodObject<{
70
- channel: z.ZodString;
71
- text: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>;
72
- re: z.ZodNullable<z.ZodNumber>;
73
- replyTo: z.ZodNullable<z.ZodNumber>;
74
- thread: z.ZodString;
75
- labels: z.ZodRecord<z.ZodString, z.ZodString>;
76
- noSync: z.ZodBoolean;
77
- mentions: z.ZodArray<z.ZodString>;
78
- by: z.ZodObject<{
79
- actor: z.ZodString;
80
- principal: z.ZodString;
81
- profile: z.ZodNullable<z.ZodString>;
82
- session: z.ZodNullable<z.ZodString>;
83
- }, z.core.$strip>;
84
- origin: z.ZodNullable<z.ZodObject<{
85
- channel: z.ZodOptional<z.ZodString>;
86
- thread: z.ZodString;
87
- subthread: z.ZodNullable<z.ZodString>;
88
- message: z.ZodString;
89
- context: z.ZodNullable<z.ZodString>;
90
- }, z.core.$strip>>;
91
- from: z.ZodNullable<z.ZodString>;
92
- attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
93
- id: z.ZodString;
94
- name: z.ZodString;
95
- type: z.ZodString;
96
- size: z.ZodNumber;
97
- }, z.core.$strip>>>;
98
- links: z.ZodOptional<z.ZodArray<z.ZodObject<{
99
- url: z.ZodString;
100
- message: z.ZodNullable<z.ZodNumber>;
101
- snapshot: z.ZodNullable<z.ZodObject<{
102
- author: z.ZodString;
103
- text: z.ZodString;
104
- createdAt: z.ZodNullable<z.ZodString>;
105
- files: z.ZodArray<z.ZodObject<{
106
- name: z.ZodString;
107
- url: z.ZodNullable<z.ZodString>;
108
- }, z.core.$strip>>;
109
- }, z.core.$strip>>;
110
- unavailable: z.ZodNullable<z.ZodString>;
111
- }, z.core.$strip>>>;
112
- schedule: z.ZodOptional<z.ZodObject<{
113
- id: z.ZodNumber;
114
- n: z.ZodNumber;
115
- }, z.core.$strip>>;
116
- blind: z.ZodOptional<z.ZodLiteral<true>>;
117
- importedBy: z.ZodOptional<z.ZodString>;
118
- }, z.core.$strip>;
119
- /**
120
- * A channel made before anything posted to it. A post makes one too, with no event of its own:
121
- * this is only for one that's empty. It names no message, so it carries no `id`.
122
- */
123
- 'channel.created': z.ZodObject<{
124
- channel: z.ZodString;
125
- by: z.ZodObject<{
126
- actor: z.ZodString;
127
- principal: z.ZodString;
128
- profile: z.ZodNullable<z.ZodString>;
129
- session: z.ZodNullable<z.ZodString>;
130
- }, z.core.$strip>;
131
- }, z.core.$strip>;
132
- /** A message's links changed: an edit linked something new, or the platform sent what a link says. */
133
- 'message.linked': z.ZodObject<{
134
- id: z.ZodNumber;
135
- thread: z.ZodString;
136
- links: z.ZodArray<z.ZodObject<{
137
- url: z.ZodString;
138
- message: z.ZodNullable<z.ZodNumber>;
139
- snapshot: z.ZodNullable<z.ZodObject<{
140
- author: z.ZodString;
141
- text: z.ZodString;
142
- createdAt: z.ZodNullable<z.ZodString>;
143
- files: z.ZodArray<z.ZodObject<{
144
- name: z.ZodString;
145
- url: z.ZodNullable<z.ZodString>;
146
- }, z.core.$strip>>;
147
- }, z.core.$strip>>;
148
- unavailable: z.ZodNullable<z.ZodString>;
149
- }, z.core.$strip>>;
150
- by: z.ZodObject<{
151
- actor: z.ZodString;
152
- principal: z.ZodString;
153
- profile: z.ZodNullable<z.ZodString>;
154
- session: z.ZodNullable<z.ZodString>;
155
- }, z.core.$strip>;
156
- from: z.ZodNullable<z.ZodString>;
157
- }, z.core.$strip>;
158
- 'message.edited': z.ZodObject<{
159
- id: z.ZodNumber;
160
- thread: z.ZodString;
161
- text: z.ZodString;
162
- mentions: z.ZodArray<z.ZodString>;
163
- by: z.ZodObject<{
164
- actor: z.ZodString;
165
- principal: z.ZodString;
166
- profile: z.ZodNullable<z.ZodString>;
167
- session: z.ZodNullable<z.ZodString>;
168
- }, z.core.$strip>;
169
- from: z.ZodNullable<z.ZodString>;
170
- }, z.core.$strip>;
171
- 'message.deleted': z.ZodObject<{
172
- id: z.ZodNumber;
173
- thread: z.ZodString;
174
- by: z.ZodObject<{
175
- actor: z.ZodString;
176
- principal: z.ZodString;
177
- profile: z.ZodNullable<z.ZodString>;
178
- session: z.ZodNullable<z.ZodString>;
179
- }, z.core.$strip>;
180
- from: z.ZodNullable<z.ZodString>;
181
- }, z.core.$strip>;
182
- 'reaction.added': z.ZodObject<{
183
- id: z.ZodNumber;
184
- thread: z.ZodString;
185
- emoji: z.ZodString;
186
- by: z.ZodObject<{
187
- actor: z.ZodString;
188
- principal: z.ZodString;
189
- profile: z.ZodNullable<z.ZodString>;
190
- session: z.ZodNullable<z.ZodString>;
191
- }, z.core.$strip>;
192
- from: z.ZodNullable<z.ZodString>;
193
- }, z.core.$strip>;
194
- 'reaction.removed': z.ZodObject<{
195
- id: z.ZodNumber;
196
- thread: z.ZodString;
197
- emoji: z.ZodString;
198
- by: z.ZodObject<{
199
- actor: z.ZodString;
200
- principal: z.ZodString;
201
- profile: z.ZodNullable<z.ZodString>;
202
- session: z.ZodNullable<z.ZodString>;
203
- }, z.core.$strip>;
204
- from: z.ZodNullable<z.ZodString>;
205
- }, z.core.$strip>;
206
- 'labels.changed': z.ZodObject<{
207
- id: z.ZodNumber;
208
- thread: z.ZodString;
209
- set: z.ZodRecord<z.ZodString, z.ZodString>;
210
- unset: z.ZodArray<z.ZodString>;
211
- by: z.ZodObject<{
212
- actor: z.ZodString;
213
- principal: z.ZodString;
214
- profile: z.ZodNullable<z.ZodString>;
215
- session: z.ZodNullable<z.ZodString>;
216
- }, z.core.$strip>;
217
- }, z.core.$strip>;
218
- /** A thread is synced with an external channel (start a thread there) or thread (join it). */
219
- 'thread.synced': z.ZodObject<{
220
- thread: z.ZodString;
221
- target: z.ZodString;
222
- cause: z.ZodEnum<{
223
- config: "config";
224
- request: "request";
225
- }>;
226
- kind: z.ZodOptional<z.ZodEnum<{
227
- channel: "channel";
228
- thread: "thread";
229
- }>>;
230
- by: z.ZodObject<{
231
- actor: z.ZodString;
232
- principal: z.ZodString;
233
- profile: z.ZodNullable<z.ZodString>;
234
- session: z.ZodNullable<z.ZodString>;
235
- }, z.core.$strip>;
236
- }, z.core.$strip>;
237
- /** An outbound delivery receipt: board message `id` exists on the platform as `external`. */
238
- 'message.synced': z.ZodObject<{
239
- id: z.ZodNumber;
240
- thread: z.ZodString;
241
- target: z.ZodString;
242
- external: z.ZodObject<{
243
- thread: z.ZodString;
244
- message: z.ZodString;
245
- }, z.core.$strip>;
246
- syncedBy: z.ZodOptional<z.ZodString>;
247
- }, z.core.$strip>;
248
- /**
249
- * Board message `id`'s files reached `target` after its text: `files` are the
250
- * platform's IDs for them, or null when the platform refused files and the
251
- * text got a line for each instead.
252
- */
253
- 'message.files_synced': z.ZodObject<{
254
- id: z.ZodNumber;
255
- thread: z.ZodString;
256
- target: z.ZodString;
257
- files: z.ZodNullable<z.ZodArray<z.ZodString>>;
258
- syncedBy: z.ZodOptional<z.ZodString>;
259
- }, z.core.$strip>;
260
- /** A delivery that gave up: board message `id` didn't reach `target`, and `error` says why. */
261
- 'message.sync_failed': z.ZodObject<{
262
- id: z.ZodNumber;
263
- thread: z.ZodString;
264
- target: z.ZodString;
265
- error: z.ZodString;
266
- }, z.core.$strip>;
267
- 'actor.seen': z.ZodObject<{
268
- actor: z.ZodString;
269
- kind: z.ZodUnion<readonly [z.ZodEnum<{
270
- agent: "agent";
271
- deployment: "deployment";
272
- external: "external";
273
- person: "person";
274
- workflow: "workflow";
275
- }>, z.ZodLiteral<"profile">]>;
276
- handle: z.ZodString;
277
- name: z.ZodString;
278
- avatar: z.ZodNullable<z.ZodString>;
279
- host: z.ZodOptional<z.ZodLiteral<true>>;
280
- }, z.core.$strip>;
281
- };
282
- type BoardEvents = typeof boardEvents;
283
- /** One event of the board log, of type `K`, in the shape its log stores it. */
284
- type BoardEvent<K extends keyof BoardEvents & string = keyof BoardEvents & string> = { [T in keyof BoardEvents & string]: {
285
- id: string;
286
- type: T;
287
- payload: z.output<BoardEvents[T]>;
288
- index: number;
289
- sessionId: string;
290
- createdAt: Date;
291
- }; }[K];
292
- //#endregion
293
- //#region src/contract/external.d.ts
294
- /** Where a message came from on a platform. `thread` is grouped (GitHub review threads fold into their PR). */
295
- declare const Origin: z.ZodObject<{
296
- channel: z.ZodOptional<z.ZodString>;
297
- thread: z.ZodString;
298
- subthread: z.ZodNullable<z.ZodString>;
299
- message: z.ZodString;
300
- context: z.ZodNullable<z.ZodString>;
301
- }, z.core.$strip>;
302
- /**
303
- * A platform message linked from a message (a Slack permalink): the board message
304
- * it was synced to, if any, and a snapshot of it, or why the board couldn't read it.
305
- */
306
- declare const Link: z.ZodObject<{
307
- url: z.ZodString;
308
- message: z.ZodNullable<z.ZodNumber>;
309
- snapshot: z.ZodNullable<z.ZodObject<{
310
- author: z.ZodString;
311
- text: z.ZodString;
312
- createdAt: z.ZodNullable<z.ZodString>;
313
- files: z.ZodArray<z.ZodObject<{
314
- name: z.ZodString;
315
- url: z.ZodNullable<z.ZodString>;
316
- }, z.core.$strip>>;
317
- }, z.core.$strip>>;
318
- unavailable: z.ZodNullable<z.ZodString>;
319
- }, z.core.$strip>;
320
- type Link = z.infer<typeof Link>;
321
- type Origin = z.infer<typeof Origin>;
322
- declare const ExternalAuthor: z.ZodObject<{
323
- id: z.ZodString;
324
- handle: z.ZodString;
325
- name: z.ZodString;
326
- avatar: z.ZodNullable<z.ZodString>;
327
- isBot: z.ZodBoolean;
328
- }, z.core.$strip>;
329
- /**
330
- * A file on a platform message, as Chat SDK describes it: enough for the
331
- * platform's adapter to fetch it later (`rehydrateAttachment`), never the bytes.
332
- */
333
- declare const ExternalFile: z.ZodObject<{
334
- type: z.ZodEnum<{
335
- audio: "audio";
336
- file: "file";
337
- image: "image";
338
- video: "video";
339
- }>;
340
- name: z.ZodOptional<z.ZodString>;
341
- mimeType: z.ZodOptional<z.ZodString>;
342
- size: z.ZodOptional<z.ZodNumber>;
343
- url: z.ZodOptional<z.ZodString>;
344
- fetchMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
345
- }, z.core.$strip>;
346
- type ExternalFile = z.infer<typeof ExternalFile>;
347
- /**
348
- * A platform message a platform message links to, at intake: where it lives
349
- * (`thread`, with the sync key prefix, and `message`), and what it said when the
350
- * platform sent that along (Slack's unfurl).
351
- */
352
- declare const ExternalLink: z.ZodObject<{
353
- url: z.ZodString;
354
- thread: z.ZodString;
355
- message: z.ZodString;
356
- snapshot: z.ZodNullable<z.ZodObject<{
357
- author: z.ZodString;
358
- text: z.ZodString;
359
- createdAt: z.ZodNullable<z.ZodString>;
360
- files: z.ZodArray<z.ZodObject<{
361
- name: z.ZodString;
362
- url: z.ZodNullable<z.ZodString>;
363
- }, z.core.$strip>>;
364
- }, z.core.$strip>>;
365
- }, z.core.$strip>;
366
- type ExternalLink = z.infer<typeof ExternalLink>;
367
- /** A platform event, normalized at intake. Thread IDs are external IDs with the sync key prefix. */
368
- declare const ExternalEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
369
- channel: z.ZodString;
370
- thread: z.ZodString;
371
- subthread: z.ZodNullable<z.ZodString>;
372
- kind: z.ZodLiteral<"message">;
373
- message: z.ZodString;
374
- isRoot: z.ZodBoolean;
375
- text: z.ZodString;
376
- context: z.ZodNullable<z.ZodString>;
377
- author: z.ZodObject<{
378
- id: z.ZodString;
379
- handle: z.ZodString;
380
- name: z.ZodString;
381
- avatar: z.ZodNullable<z.ZodString>;
382
- isBot: z.ZodBoolean;
383
- }, z.core.$strip>;
384
- files: z.ZodOptional<z.ZodArray<z.ZodObject<{
385
- type: z.ZodEnum<{
386
- audio: "audio";
387
- file: "file";
388
- image: "image";
389
- video: "video";
390
- }>;
391
- name: z.ZodOptional<z.ZodString>;
392
- mimeType: z.ZodOptional<z.ZodString>;
393
- size: z.ZodOptional<z.ZodNumber>;
394
- url: z.ZodOptional<z.ZodString>;
395
- fetchMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
396
- }, z.core.$strip>>>;
397
- links: z.ZodOptional<z.ZodArray<z.ZodObject<{
398
- url: z.ZodString;
399
- thread: z.ZodString;
400
- message: z.ZodString;
401
- snapshot: z.ZodNullable<z.ZodObject<{
402
- author: z.ZodString;
403
- text: z.ZodString;
404
- createdAt: z.ZodNullable<z.ZodString>;
405
- files: z.ZodArray<z.ZodObject<{
406
- name: z.ZodString;
407
- url: z.ZodNullable<z.ZodString>;
408
- }, z.core.$strip>>;
409
- }, z.core.$strip>>;
410
- }, z.core.$strip>>>;
411
- }, z.core.$strip>, z.ZodObject<{
412
- channel: z.ZodString;
413
- thread: z.ZodString;
414
- subthread: z.ZodNullable<z.ZodString>;
415
- kind: z.ZodLiteral<"edited">;
416
- message: z.ZodString;
417
- text: z.ZodString;
418
- author: z.ZodObject<{
419
- id: z.ZodString;
420
- handle: z.ZodString;
421
- name: z.ZodString;
422
- avatar: z.ZodNullable<z.ZodString>;
423
- isBot: z.ZodBoolean;
424
- }, z.core.$strip>;
425
- links: z.ZodOptional<z.ZodArray<z.ZodObject<{
426
- url: z.ZodString;
427
- thread: z.ZodString;
428
- message: z.ZodString;
429
- snapshot: z.ZodNullable<z.ZodObject<{
430
- author: z.ZodString;
431
- text: z.ZodString;
432
- createdAt: z.ZodNullable<z.ZodString>;
433
- files: z.ZodArray<z.ZodObject<{
434
- name: z.ZodString;
435
- url: z.ZodNullable<z.ZodString>;
436
- }, z.core.$strip>>;
437
- }, z.core.$strip>>;
438
- }, z.core.$strip>>>;
439
- linksOnly: z.ZodOptional<z.ZodBoolean>;
440
- }, z.core.$strip>, z.ZodObject<{
441
- channel: z.ZodString;
442
- thread: z.ZodString;
443
- subthread: z.ZodNullable<z.ZodString>;
444
- kind: z.ZodLiteral<"deleted">;
445
- message: z.ZodString;
446
- }, z.core.$strip>, z.ZodObject<{
447
- channel: z.ZodString;
448
- thread: z.ZodString;
449
- subthread: z.ZodNullable<z.ZodString>;
450
- kind: z.ZodLiteral<"reaction">;
451
- message: z.ZodString;
452
- emoji: z.ZodString;
453
- added: z.ZodBoolean;
454
- author: z.ZodObject<{
455
- id: z.ZodString;
456
- handle: z.ZodString;
457
- name: z.ZodString;
458
- avatar: z.ZodNullable<z.ZodString>;
459
- isBot: z.ZodBoolean;
460
- }, z.core.$strip>;
461
- }, z.core.$strip>, z.ZodObject<{
462
- channel: z.ZodString;
463
- thread: z.ZodString;
464
- kind: z.ZodLiteral<"lifecycle">;
465
- type: z.ZodString;
466
- title: z.ZodString;
467
- url: z.ZodNullable<z.ZodString>;
468
- body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
469
- labels: z.ZodRecord<z.ZodString, z.ZodString>;
470
- unset: z.ZodArray<z.ZodString>;
471
- owns: z.ZodOptional<z.ZodArray<z.ZodString>>;
472
- reply: z.ZodNullable<z.ZodString>;
473
- createRoot: z.ZodBoolean;
474
- retitled: z.ZodOptional<z.ZodBoolean>;
475
- author: z.ZodObject<{
476
- id: z.ZodString;
477
- handle: z.ZodString;
478
- name: z.ZodString;
479
- avatar: z.ZodNullable<z.ZodString>;
480
- isBot: z.ZodBoolean;
481
- }, z.core.$strip>;
482
- }, z.core.$strip>], "kind">;
483
- type ExternalEvent = z.infer<typeof ExternalEvent>;
484
- type ExternalAuthor = z.infer<typeof ExternalAuthor>;
485
- //#endregion
486
- //#region src/contract/folds.d.ts
487
- type Message = {
488
- id: number;
489
- channel: string;
490
- text: string;
491
- re: number | null;
492
- replyTo: number | null;
493
- /** The thread key: the root's event ID. */
494
- thread: string;
495
- labels: Labels;
496
- reactions: Record<string, string[]>;
497
- mentions: string[];
498
- by: Author;
499
- noSync: boolean;
500
- /** Where it came from on a platform, if it did. */
501
- origin: Origin | null;
502
- /** The sync key it came from, or null when written on the board. */
503
- from: string | null;
504
- createdAt: string;
505
- editedAt: string | null;
506
- deleted: boolean;
507
- /** Sync targets this message didn't reach, with why. A later delivery clears its entry. */
508
- undelivered: Record<string, string>;
509
- attachments: Attachment[];
510
- /** Platform messages it links to (Slack permalinks), each with what it said. */
511
- links: Link[];
512
- /** Set when a schedule posted it: the schedule's ID and which send this was, from 0. */
513
- schedule?: {
514
- id: number;
515
- n: number;
516
- };
517
- /**
518
- * Set when its author couldn't read its channel, as `authorizeOwn` checks: where they can't read,
519
- * it's theirs to edit and delete only then. Its event's payload says so too.
520
- */
521
- blind?: true;
522
- /** The index of the last event that changed it. Folds from before it existed leave it out. */
523
- version?: number;
524
- /** The index of its post, or of its last edit or delete. Folds from before it existed leave it out. */
525
- revision?: number;
526
- };
527
- type Channel = {
528
- path: string;
529
- lastIndex: number;
530
- messages: number;
531
- threads: number;
532
- };
533
- type Actor = {
534
- id: string;
535
- kind: ActorKind;
536
- handle: string;
537
- name: string;
538
- avatar: string | null;
539
- /** A host's principal, or one of its profiles: once it's seen as one, it stays one. Views leave it out. */
540
- host?: true;
541
- };
542
- /** A copy of a board message on a platform. */
543
- /** `files`: the platform's IDs for the message's files, or null when it refused them; unset until they're sent. */
544
- /** `by`: the principal of the sync elsewhere that recorded it, whose copy it is to change; none for the board's own sync's. */
545
- type ExternalCopy = {
546
- thread: string;
547
- message: string;
548
- files?: string[] | null;
549
- by?: string;
550
- };
551
- //#endregion
552
- export { union as S, ChannelPattern as _, ExternalAuthor as a, Permission as b, ExternalLink as c, Attachment as d, Author as f, Can as g, AccessSummary as h, Message as i, Link as l, Access as m, Channel as n, ExternalEvent as o, Labels as p, ExternalCopy as r, ExternalFile as s, Actor as t, BoardEvent as u, FULL_ACCESS as v, compileAccess as x, Grant as y };