@vercel/board 0.29.0 → 0.31.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 (156) hide show
  1. package/README.md +8 -17
  2. package/dist/{a2-HUbQJ0RD.mjs → a2-DngWY2Eb.mjs} +741 -415
  3. package/dist/access-CY5xVMIK.mjs +242 -0
  4. package/dist/{access-CV96SYgr.d.mts → access-DPcrKIH_.d.mts} +6 -1
  5. package/dist/access.d.mts +4 -4
  6. package/dist/access.mjs +5 -4
  7. package/dist/{actors-DcJhFbwJ.mjs → actors-Bm-ojWWT.mjs} +2 -2
  8. package/dist/{auth-JO22iIwr.mjs → auth-CyO2aw5n.mjs} +126 -236
  9. package/dist/{auth-CU56Q2Xh.d.mts → auth-DLYSt_-A.d.mts} +32 -4
  10. package/dist/{backend-CPC_vyOo.d.mts → backend-Bob-5CM7.d.mts} +93 -42
  11. package/dist/backend-a2/blob-vercel.d.mts +1 -1
  12. package/dist/backend-a2/contract.d.mts +38 -98
  13. package/dist/backend-a2/contract.mjs +1 -1
  14. package/dist/backend-a2/scheduler-local.d.mts +1 -1
  15. package/dist/backend-a2/scheduler-local.mjs +1 -1
  16. package/dist/backend-a2/scheduler-qstash.d.mts +3 -3
  17. package/dist/backend-a2/scheduler-qstash.mjs +8 -8
  18. package/dist/backend-a2/scheduler-vercel.d.mts +3 -3
  19. package/dist/backend-a2/scheduler-vercel.mjs +6 -6
  20. package/dist/backend-a2/store-memory.d.mts +2 -2
  21. package/dist/backend-a2/store-memory.mjs +3 -3
  22. package/dist/backend-a2/store-postgres.d.mts +1 -1
  23. package/dist/backend-a2/store-postgres.mjs +34 -15
  24. package/dist/backend-a2/store-redis-http.d.mts +1 -1
  25. package/dist/backend-a2/store-redis-http.mjs +6 -6
  26. package/dist/backend-a2/store-redis.d.mts +2 -2
  27. package/dist/backend-a2/store-redis.mjs +5 -5
  28. package/dist/backend-a2/store-sqlite.d.mts +1 -1
  29. package/dist/backend-a2/store-sqlite.mjs +3 -3
  30. package/dist/backend-a2.d.mts +143 -242
  31. package/dist/backend-a2.mjs +2 -2
  32. package/dist/{backend-http-CqfKhrnn.d.mts → backend-http-BRrRbjRx.d.mts} +59 -45
  33. package/dist/{backend-http-CzIJMm58.mjs → backend-http-CvUKOn-m.mjs} +11 -10
  34. package/dist/{backend-http-Bmp0IgD3.mjs → backend-http-D8mUzuKQ.mjs} +2 -2
  35. package/dist/backend-http.d.mts +1 -1
  36. package/dist/backend-http.mjs +1 -1
  37. package/dist/backend-http.node.d.mts +1 -1
  38. package/dist/backend-http.node.mjs +1 -1
  39. package/dist/{backend-vercel-DQc_TaHp.mjs → backend-vercel-Ba8JDtqW.mjs} +3 -3
  40. package/dist/{backend-vercel-4tvcPKqX.d.mts → backend-vercel-BaSEUdwg.d.mts} +62 -47
  41. package/dist/{backend-vercel-BNauAs7w.mjs → backend-vercel-CmY9yZ9m.mjs} +279 -42
  42. package/dist/backend-vercel.d.mts +1 -1
  43. package/dist/backend-vercel.mjs +1 -1
  44. package/dist/backend-vercel.node.d.mts +1 -1
  45. package/dist/backend-vercel.node.mjs +1 -1
  46. package/dist/{blob-DmiQjrYy.d.mts → blob-Bx8QPWEd.d.mts} +2 -2
  47. package/dist/{blob-DdbpJqN1.mjs → blob-WbB2DJKn.mjs} +30 -11
  48. package/dist/{chat-provider-BWHbChcQ.d.mts → chat-provider-BChYrrA7.d.mts} +32 -28
  49. package/dist/{chat-provider-COtsU5jB.mjs → chat-provider-DkFp2hrh.mjs} +105 -60
  50. package/dist/cli-commands.d.mts +1 -1
  51. package/dist/cli-commands.mjs +1 -1
  52. package/dist/cli-embedded.d.mts +2 -2
  53. package/dist/cli-embedded.mjs +1 -1
  54. package/dist/cli.mjs +4 -4
  55. package/dist/{client-BqAjk0Q4.d.mts → client-COfYrgfV.d.mts} +240 -227
  56. package/dist/{commands-D6gvrOh3.d.mts → commands-DK4W3HCJ.d.mts} +47 -10
  57. package/dist/{commands-C3R1AWgm.mjs → commands-L1JSGz2Z.mjs} +212 -54
  58. package/dist/conformance-DK43HiHf.mjs +1000 -0
  59. package/dist/conformance.d.mts +8 -2
  60. package/dist/conformance.mjs +1 -1
  61. package/dist/{engine-DQxXk7dX.mjs → engine-DurYIRt8.mjs} +29 -210
  62. package/dist/{errors-DDktVeUa.d.mts → errors-2vGs49Db.d.mts} +1 -1
  63. package/dist/{client-D0Px7KzF.mjs → errors-CJXhhzvT.mjs} +132 -27
  64. package/dist/{provider-BaVmi4Hi.mjs → events-lujPA3gQ.mjs} +80 -17
  65. package/dist/{exports-BG-0Wyn-.mjs → exports-CWIdN0Ub.mjs} +195 -103
  66. package/dist/exports-FBOQWT7O.d.mts +5 -0
  67. package/dist/{folds-BDMSxBUf.mjs → folds-Cu9Q9zyQ.mjs} +3 -22
  68. package/dist/{folds-ZkHM4M-v.d.mts → folds-DLUzfibJ.d.mts} +15 -40
  69. package/dist/{index-D3VvNfh_.d.mts → index-Ho-ayyQL.d.mts} +2 -2
  70. package/dist/index.d.mts +7 -7
  71. package/dist/{index.default-rB8sJ9RX.mjs → index.default-BUcwDaAe.mjs} +1 -1
  72. package/dist/index.mjs +5 -6
  73. package/dist/index.node.d.mts +7 -7
  74. package/dist/index.node.mjs +3 -4
  75. package/dist/inspect/app.js +62 -61
  76. package/dist/inspect/engine.js +3 -3
  77. package/dist/{internal-CvsrprnU-CRY89I-b.mjs → internal-CvsrprnU-zZMpDiRY.mjs} +1 -1
  78. package/dist/{local-DhkrAqPP.mjs → local-C76Fy5ad.mjs} +1 -1
  79. package/dist/{main-CVBqe3VO.mjs → main-Dz-8komG.mjs} +251 -127
  80. package/dist/{middleware-CXjEeef4.mjs → middleware-BavYSDUa.mjs} +1 -1
  81. package/dist/{node-Zd_C-gxP.mjs → node-BgeGcwX0.mjs} +7 -3
  82. package/dist/{platform-B4TnJtWu-CwcTyKg2.mjs → platform-B4TnJtWu-Do3agKr5.mjs} +1 -1
  83. package/dist/{project-CBXlLftU.mjs → project-CQ4VUibA.mjs} +1 -1
  84. package/dist/{provider-DmSTp9lI.d.mts → provider-gynDUoyW.d.mts} +13 -43
  85. package/dist/{redis-tables-BJQVUspu.mjs → redis-tables-DHf85ixI.mjs} +40 -42
  86. package/dist/{reducer-CjmvZSAb-D_OSISmj.mjs → reducer-Bswr11ar-P324o9vn.mjs} +2 -2
  87. package/dist/{reducer-CYPHsSmd-BQIfozGi.d.mts → reducer-CYPHsSmd-BXjGiptm.d.mts} +1 -1
  88. package/dist/{reducers-DJzVpXwM.mjs → reducers-DcENwtwZ.mjs} +74 -77
  89. package/dist/{retryable-lazy-DZWmHpii-Bye-W8q7.mjs → retryable-lazy-DZWmHpii-DpTc5PIP.mjs} +1 -1
  90. package/dist/{scheduler-task-X1SToDjP-BVoWuInI.mjs → scheduler-task-X1SToDjP-D2Il2rln.mjs} +1 -1
  91. package/dist/{serve-G9RuaDSr.mjs → serve-CTmow-YH.mjs} +7 -7
  92. package/dist/{server-qgez0Xny-D5mLfqFQ.d.mts → server-B9gu0qi1-DI1WvcVK.d.mts} +10 -4
  93. package/dist/{server-BixV_byP.mjs → server-DG8D6VV0.mjs} +4 -4
  94. package/dist/{server-DtFrWxi3-Boa6gdWO.mjs → server-DX7mM6nm-D7N_7bug.mjs} +32 -23
  95. package/dist/{serving-B75Y4BF-.mjs → serving-DBFRo6U_.mjs} +1 -1
  96. package/dist/{session-clear-wHd5GCpZ-BnKSxReK.mjs → session-clear-XJYpmUpg-2q8l_FJR.mjs} +14 -2
  97. package/dist/{sql-D4Z_efJX.mjs → sql-CT5xVuGr.mjs} +2 -8
  98. package/dist/{sqlite-db-Bz2JkfCU.mjs → sqlite-db-0WeSOEZN.mjs} +1 -1
  99. package/dist/{store-D0MhBvg6-4Z2L0Kqd.d.mts → store-DEzcHZOA-B-5vhxef.d.mts} +12 -2
  100. package/dist/store-N8PXxDAS-DWWgv-Vz.mjs +5 -0
  101. package/dist/{store-codec-DwrWlgQx-CYxGW0aD.mjs → store-codec-pAG2oPgQ-SqDXlPBR.mjs} +4 -4
  102. package/dist/store-memory-4IBl0Ztu.mjs +2 -0
  103. package/dist/{store-memory-Bas9Uq5C.mjs → store-memory-B0PkVSuQ.mjs} +14 -7
  104. package/dist/{store-polling-BZt2Rf3D-BiEM6_HB.mjs → store-polling-BZt2Rf3D-Div-bJ_D.mjs} +2 -2
  105. package/dist/{store-presence-polling-JuAy2Ck2-CYpuK75X.mjs → store-presence-polling-JuAy2Ck2-Dh-g_KYM.mjs} +3 -3
  106. package/dist/{store-sqlite-CxxPCcCT.mjs → store-sqlite-D85t3tE7.mjs} +14 -7
  107. package/dist/store-sqlite-iBTYYKBj.mjs +2 -0
  108. package/dist/{stream-buffer-DrTyiIuo-BKy-vI14.mjs → stream-buffer-DrTyiIuo-Be10yOBR.mjs} +2 -2
  109. package/dist/{sync-kapso.d.mts → sync-chat-sdk.d.mts} +33 -37
  110. package/dist/sync-chat-sdk.mjs +44 -0
  111. package/dist/sync-github.d.mts +5 -18
  112. package/dist/sync-github.mjs +4 -70
  113. package/dist/sync-linear.d.mts +3 -3
  114. package/dist/sync-linear.mjs +6 -5
  115. package/dist/sync-slack.d.mts +7 -7
  116. package/dist/sync-slack.mjs +33 -54
  117. package/dist/sync.d.mts +3 -3
  118. package/dist/sync.mjs +2 -4
  119. package/dist/{tokens-CC3izSNr.mjs → tokens-Dnyd_y1n.mjs} +15 -6
  120. package/dist/{types-No0WdhE5.d.mts → types-CmrFjpml.d.mts} +2 -4
  121. package/dist/{watchers-hash-BDhLVkV5.mjs → watchers-hash-BjwlnGD9.mjs} +124 -115
  122. package/docs/01-board/01-mounting.md +2 -2
  123. package/docs/01-board/03-identity.md +5 -6
  124. package/docs/01-board/04-messages.md +96 -2
  125. package/docs/01-board/05-reading.md +2 -1
  126. package/docs/01-board/06-watchers.md +8 -6
  127. package/docs/01-board/08-middleware.md +6 -3
  128. package/docs/01-board/09-access.md +145 -14
  129. package/docs/02-sync/01-overview.md +19 -26
  130. package/docs/02-sync/02-functions.md +8 -9
  131. package/docs/02-sync/03-slack.md +5 -5
  132. package/docs/02-sync/04-github.md +2 -2
  133. package/docs/02-sync/06-providers.md +91 -62
  134. package/docs/03-guides/01-coding-agents.md +1 -1
  135. package/docs/03-guides/03-ci.md +7 -4
  136. package/docs/04-reference/01-cli.md +109 -51
  137. package/docs/04-reference/02-board.md +76 -28
  138. package/docs/04-reference/03-http.md +76 -38
  139. package/docs/04-reference/04-log.md +8 -11
  140. package/docs/04-reference/05-conformance.md +47 -7
  141. package/docs/index.md +2 -2
  142. package/package.json +7 -10
  143. package/sql/postgres/board.sql +1 -1
  144. package/sql/postgres/schema.sql +1 -1
  145. package/dist/conformance-DlnfuzEB.mjs +0 -556
  146. package/dist/errors-CusN4x2l.mjs +0 -88
  147. package/dist/events-qf5XG5VQ.mjs +0 -75
  148. package/dist/exports-mhAYiU4i.d.mts +0 -5
  149. package/dist/store-N8PXxDAS-BWBgzBHp.mjs +0 -5
  150. package/dist/store-memory-ZLiZbH3R.mjs +0 -2
  151. package/dist/store-sqlite-BmwL3pUR.mjs +0 -2
  152. package/dist/sync-kapso.mjs +0 -89
  153. package/dist/sync.chat.d.mts +0 -2
  154. package/dist/sync.chat.mjs +0 -2
  155. package/dist/users-yryHKFMo.mjs +0 -42
  156. package/docs/02-sync/05-whatsapp.md +0 -152
@@ -1,10 +1,11 @@
1
- import { n as AccessSummary } from "./access-CV96SYgr.mjs";
2
- import { a as ExternalCopy, g as BoardEvent, o as Message, p as Link, r as Channel, t as Actor, u as ExternalEvent, x as Attachment } from "./folds-ZkHM4M-v.mjs";
1
+ import { n as AccessSummary, r as Can } from "./access-DPcrKIH_.mjs";
2
+ import { a as ExternalCopy, g as BoardEvent, o as Message, p as Link, r as Channel, t as Actor, u as ExternalEvent, x as Attachment } from "./folds-DLUzfibJ.mjs";
3
3
  import { z } from "zod";
4
4
  //#region src/api/routes.d.ts
5
5
  /**
6
6
  * A message's, schedule's, or cursor's ID: a string clients pass back as they got it, and never
7
- * parse, compare, or count with. Each backend picks its own; a board on `a2()` writes decimals.
7
+ * parse, compare, or count with. Each backend picks its own; a board on `a2()` writes decimals,
8
+ * and `s12` for a schedule.
8
9
  */
9
10
  declare const Ref: z.ZodString;
10
11
  /** A sync target as the board that syncs it resolved it: a platform channel to start a thread in, or a thread to join. */
@@ -61,7 +62,12 @@ declare const EventsQuery: z.ZodObject<{
61
62
  text: z.ZodOptional<z.ZodString>;
62
63
  after: z.ZodOptional<z.ZodString>;
63
64
  wait: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
64
- all: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
65
+ all: z.ZodOptional<z.ZodPipe<z.ZodEnum<{
66
+ 0: "0";
67
+ 1: "1";
68
+ false: "false";
69
+ true: "true";
70
+ }>, z.ZodTransform<boolean, "0" | "1" | "false" | "true">>>;
65
71
  }, z.core.$strip>;
66
72
  declare const PostBody: z.ZodObject<{
67
73
  channel: z.ZodOptional<z.ZodString>;
@@ -78,6 +84,7 @@ declare const PostBody: z.ZodObject<{
78
84
  }, z.core.$strip>]>>>;
79
85
  id: z.ZodOptional<z.ZodString>;
80
86
  attachments: z.ZodOptional<z.ZodArray<z.ZodString>>;
87
+ after: z.ZodOptional<z.ZodString>;
81
88
  }, z.core.$strip>;
82
89
  /**
83
90
  * A message to post later, as the caller: once (`in` or `at`), or repeating
@@ -103,7 +110,27 @@ declare const SchedulesQuery: z.ZodObject<{
103
110
  re: z.ZodOptional<z.ZodString>;
104
111
  channel: z.ZodOptional<z.ZodString>;
105
112
  by: z.ZodOptional<z.ZodString>;
106
- all: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
113
+ all: z.ZodOptional<z.ZodPipe<z.ZodEnum<{
114
+ 0: "0";
115
+ 1: "1";
116
+ false: "false";
117
+ true: "true";
118
+ }>, z.ZodTransform<boolean, "0" | "1" | "false" | "true">>>;
119
+ }, z.core.$strip>;
120
+ /** Who a grant lets in: an issuer (`vercel`, `github`, or an https URL) and the claims its tokens carry, exactly. */
121
+ declare const GrantBody: z.ZodObject<{
122
+ issuer: z.ZodString;
123
+ claims: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
124
+ can: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>>]>>;
125
+ }, z.core.$strip>;
126
+ /** A token acting as the caller: what it may do, and the profile and session every request with it writes as. */
127
+ declare const TokenBody: z.ZodObject<{
128
+ name: z.ZodString;
129
+ can: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>>]>>;
130
+ profile: z.ZodOptional<z.ZodString>;
131
+ avatar: z.ZodOptional<z.ZodString>;
132
+ session: z.ZodOptional<z.ZodString>;
133
+ expires: z.ZodOptional<z.ZodString>;
107
134
  }, z.core.$strip>;
108
135
  declare const SyncBody: z.ZodObject<{
109
136
  target: z.ZodString;
@@ -129,7 +156,6 @@ declare const RegisterBody: z.ZodUnion<readonly [z.ZodObject<{
129
156
  sync: z.ZodOptional<z.ZodArray<z.ZodObject<{
130
157
  key: z.ZodString;
131
158
  platform: z.ZodString;
132
- signIn: z.ZodDefault<z.ZodBoolean>;
133
159
  }, z.core.$strip>>>;
134
160
  url: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
135
161
  path: z.ZodOptional<z.ZodNull>;
@@ -145,7 +171,6 @@ declare const RegisterBody: z.ZodUnion<readonly [z.ZodObject<{
145
171
  sync: z.ZodOptional<z.ZodArray<z.ZodObject<{
146
172
  key: z.ZodString;
147
173
  platform: z.ZodString;
148
- signIn: z.ZodDefault<z.ZodBoolean>;
149
174
  }, z.core.$strip>>>;
150
175
  url: z.ZodOptional<z.ZodNull>;
151
176
  path: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
@@ -181,9 +206,6 @@ declare const SourceJoinBody: z.ZodObject<{
181
206
  declare const LinkedQuery: z.ZodObject<{
182
207
  url: z.ZodString;
183
208
  }, z.core.$strip>;
184
- declare const IdentityUnlinkBody: z.ZodObject<{
185
- actor: z.ZodString;
186
- }, z.core.$strip>;
187
209
  /**
188
210
  * A platform's write, as its platform author, with where it came from: only a caller with `sync` in
189
211
  * the channel it lands in may make one. Posts are idempotent by `id`, derived from the platform
@@ -232,6 +254,7 @@ declare const SyncImportBody: z.ZodDiscriminatedUnion<[z.ZodObject<{
232
254
  message: z.ZodNullable<z.ZodString>;
233
255
  }, z.core.$strip>>>;
234
256
  id: z.ZodOptional<z.ZodString>;
257
+ after: z.ZodOptional<z.ZodString>;
235
258
  }, z.core.$strip>, z.ZodObject<{
236
259
  author: z.ZodObject<{
237
260
  id: z.ZodString;
@@ -253,6 +276,7 @@ declare const SyncImportBody: z.ZodDiscriminatedUnion<[z.ZodObject<{
253
276
  channel: z.ZodString;
254
277
  thread: z.ZodString;
255
278
  }, z.core.$strip>>;
279
+ revision: z.ZodOptional<z.ZodNumber>;
256
280
  }, z.core.$strip>, z.ZodObject<{
257
281
  author: z.ZodObject<{
258
282
  id: z.ZodString;
@@ -268,6 +292,7 @@ declare const SyncImportBody: z.ZodDiscriminatedUnion<[z.ZodObject<{
268
292
  }, z.core.$strip>>;
269
293
  message: z.ZodOptional<z.ZodString>;
270
294
  op: z.ZodLiteral<"delete">;
295
+ revision: z.ZodOptional<z.ZodNumber>;
271
296
  }, z.core.$strip>, z.ZodObject<{
272
297
  author: z.ZodObject<{
273
298
  id: z.ZodString;
@@ -302,6 +327,7 @@ declare const SyncImportBody: z.ZodDiscriminatedUnion<[z.ZodObject<{
302
327
  op: z.ZodLiteral<"labels">;
303
328
  set: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
304
329
  unset: z.ZodOptional<z.ZodArray<z.ZodString>>;
330
+ if: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
305
331
  }, z.core.$strip>, z.ZodObject<{
306
332
  author: z.ZodObject<{
307
333
  id: z.ZodString;
@@ -349,7 +375,6 @@ declare const SyncReceiptBody: z.ZodDiscriminatedUnion<[z.ZodObject<{
349
375
  external: z.ZodObject<{
350
376
  thread: z.ZodString;
351
377
  message: z.ZodString;
352
- asUser: z.ZodOptional<z.ZodLiteral<true>>;
353
378
  }, z.core.$strip>;
354
379
  files: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
355
380
  }, z.core.$strip>, z.ZodObject<{
@@ -375,23 +400,15 @@ declare const SyncReceiptBody: z.ZodDiscriminatedUnion<[z.ZodObject<{
375
400
  request: "request";
376
401
  }>;
377
402
  }, z.core.$strip>], "kind">;
378
- /** What sync looks up by platform ID: a thread or message, who an account is, and a person's accounts. */
403
+ /** What sync looks up by platform ID: a thread or a message. */
379
404
  declare const SyncFindQuery: z.ZodObject<{
380
- code: z.ZodOptional<z.ZodString>;
381
405
  post: z.ZodOptional<z.ZodString>;
382
406
  thread: z.ZodOptional<z.ZodString>;
383
407
  message: z.ZodOptional<z.ZodString>;
384
- account: z.ZodOptional<z.ZodString>;
385
- person: z.ZodOptional<z.ZodString>;
386
408
  }, z.core.$strip>;
387
409
  declare const SyncCopiesQuery: z.ZodObject<{
388
410
  message: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>;
389
411
  }, z.core.$strip>;
390
- /** A person's own roots since `since`, in epoch milliseconds. */
391
- declare const SyncRootsQuery: z.ZodObject<{
392
- by: z.ZodString;
393
- since: z.ZodCoercedNumber<unknown>;
394
- }, z.core.$strip>;
395
412
  /** Platform events for a sync key's inbox, each with the platform's own ID for it, which dedupes it. */
396
413
  declare const InboxPushBody: z.ZodObject<{
397
414
  events: z.ZodArray<z.ZodObject<{
@@ -521,43 +538,15 @@ declare const InboxAckBody: z.ZodObject<{
521
538
  lease: z.ZodString;
522
539
  error: z.ZodOptional<z.ZodString>;
523
540
  }, z.core.$strip>;
524
- /** A one-time code for linking an account on sync entry `sync`: a person's own, for themselves. */
525
- declare const SyncCodeBody: z.ZodObject<{
526
- sync: z.ZodString;
527
- }, z.core.$strip>;
528
541
  /**
529
- * A platform account, linked to whoever a code was issued to: one posted from the account, or
530
- * carried through its sign-in. `message` is the platform message that posted it.
542
+ * A direct upload, before its bytes: what the file will be called, its type, its exact size, and
543
+ * the SHA-256 of its bytes, in base64, for a store that signs its URL for them (Vercel's).
531
544
  */
532
- declare const SyncAccountBody: z.ZodObject<{
533
- sync: z.ZodString;
534
- account: z.ZodObject<{
535
- id: z.ZodString;
536
- handle: z.ZodString;
537
- name: z.ZodString;
538
- isBot: z.ZodBoolean;
539
- avatar: z.ZodPipe<z.ZodNullable<z.ZodString>, z.ZodTransform<string | null, string | null>>;
540
- }, z.core.$strip>;
541
- code: z.ZodString;
542
- message: z.ZodOptional<z.ZodString>;
543
- method: z.ZodOptional<z.ZodEnum<{
544
- code: "code";
545
- consent: "consent";
546
- }>>;
547
- }, z.core.$strip>;
548
- /** A sign-in that carries a code, on the board whose sync runs the entry. */
549
- declare const SignInQuery: z.ZodObject<{
550
- sync: z.ZodString;
551
- code: z.ZodString;
552
- }, z.core.$strip>;
553
- declare const SyncUnlinkBody: z.ZodObject<{
554
- account: z.ZodString;
555
- }, z.core.$strip>;
556
- /** A direct upload, before its bytes: what the file will be called, its type, and its exact size. */
557
545
  declare const UploadStartBody: z.ZodObject<{
558
546
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
559
547
  type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
560
548
  size: z.ZodNumber;
549
+ sha256: z.ZodOptional<z.ZodString>;
561
550
  }, z.core.$strip>;
562
551
  /** Where to send a direct upload's bytes: `PUT` the file to `url` with `headers` (its `content-type` included), before `expiresAt`, then finish it. */
563
552
  type UploadTicket = {
@@ -568,9 +557,12 @@ type UploadTicket = {
568
557
  };
569
558
  declare const EditBody: z.ZodObject<{
570
559
  text: z.ZodString;
560
+ revision: z.ZodOptional<z.ZodNumber>;
571
561
  }, z.core.$strip>;
572
- declare const DeleteBody: z.ZodOptional<z.ZodObject<{}, z.core.$strip>>;
573
- /** `status`: what Slack shows in place of "Typing…" (WhatsApp and GitHub ignore it). */
562
+ declare const DeleteBody: z.ZodOptional<z.ZodObject<{
563
+ revision: z.ZodOptional<z.ZodNumber>;
564
+ }, z.core.$strip>>;
565
+ /** `status`: what Slack shows in place of "Typing…" (other platforms ignore it). */
574
566
  declare const TypingBody: z.ZodOptional<z.ZodObject<{
575
567
  status: z.ZodOptional<z.ZodString>;
576
568
  }, z.core.$strip>>;
@@ -578,15 +570,21 @@ declare const ReactBody: z.ZodObject<{
578
570
  emoji: z.ZodString;
579
571
  remove: z.ZodOptional<z.ZodBoolean>;
580
572
  }, z.core.$strip>;
573
+ /** A channel to make before anything posts to it. */
574
+ declare const CreateChannelBody: z.ZodObject<{
575
+ path: z.ZodString;
576
+ }, z.core.$strip>;
577
+ /** At most this many labels in a label write's `if`. */
578
+ declare const LABEL_CONDITIONS_MAX = 16;
581
579
  declare const LabelBody: z.ZodObject<{
582
580
  set: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
583
581
  unset: z.ZodOptional<z.ZodArray<z.ZodString>>;
582
+ if: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
584
583
  }, z.core.$strip>;
585
584
  type FiltersInput = z.input<typeof Filters$1>;
586
585
  type SyncImportInput = z.input<typeof SyncImportBody>;
587
586
  type SyncReceiptInput = z.input<typeof SyncReceiptBody>;
588
587
  type SyncFindInput = z.input<typeof SyncFindQuery>;
589
- type SyncAccountInput = z.input<typeof SyncAccountBody>;
590
588
  type MessagesQueryInput = z.input<typeof MessagesQuery>;
591
589
  type ThreadsQueryInput = z.input<typeof ThreadsQuery>;
592
590
  type EventsQueryInput = z.input<typeof EventsQuery>;
@@ -594,6 +592,14 @@ type PostInput = z.input<typeof PostBody>;
594
592
  type ScheduleInput = z.input<typeof ScheduleBody>;
595
593
  type ScheduleBodyOutput = z.output<typeof ScheduleBody>;
596
594
  type SchedulesQueryInput = z.input<typeof SchedulesQuery>;
595
+ /** What `grant` takes: `can` as `access` writes it. */
596
+ type GrantInput = Omit<z.input<typeof GrantBody>, 'can'> & {
597
+ can?: Can;
598
+ };
599
+ /** What `token` takes: `can` as `access` writes it. */
600
+ type TokenInput = Omit<z.input<typeof TokenBody>, 'can'> & {
601
+ can?: Can;
602
+ };
597
603
  type SchedulesQueryOutput = z.output<typeof SchedulesQuery>;
598
604
  /** A scheduled message. It posts as `by`, its creator; each message it posts carries `schedule: { id, n }`. */
599
605
  type ScheduleView = {
@@ -640,22 +646,35 @@ type ScheduleView = {
640
646
  author: ActorView;
641
647
  createdAt: string;
642
648
  };
643
- /** The person a platform account is linked to (`actor.linked`). */
644
- type PersonView = {
649
+ /** A grant: who it lets in, what it lets them do, and who set it when. */
650
+ type GrantView = {
645
651
  id: string;
646
- handle: string;
647
- name: string;
648
- avatar: string | null;
652
+ issuer: string;
653
+ claims: Record<string, string | string[]>;
654
+ can: AccessSummary;
655
+ /** The actor that last set it. */
656
+ by: string;
657
+ at: string;
649
658
  };
650
- /**
651
- * `kind` says who wrote it: a `person` or a platform user (`external`), an agent (`profile`), or a deployment or workflow.
652
- * `person` is who a linked platform account belongs to.
653
- */
654
- type ActorView = Pick<Actor, 'kind' | 'handle' | 'name' | 'avatar'> & {
655
- person?: PersonView;
659
+ /** A token, as its minter and `manage` see it: never its secret. */
660
+ type TokenView = {
661
+ id: string;
662
+ name: string;
663
+ /** What it may do now: its minter's access, as the board's rules and grants give it, narrowed by the token's `can`. `{}` once its minter may do nothing. */
664
+ can: AccessSummary;
665
+ profile: string | null;
666
+ session: string | null;
667
+ /** The actor that minted it, and when. */
668
+ by: string;
669
+ at: string;
670
+ expiresAt: string;
671
+ /** The token it was minted with, which it stops with. */
672
+ parent: string | null;
656
673
  };
674
+ /** `kind` says who wrote it: a `person` or a platform user (`external`), an agent (`profile`), or a deployment or workflow. */
675
+ type ActorView = Pick<Actor, 'kind' | 'handle' | 'name' | 'avatar'>;
657
676
  /** A message as clients see it: its IDs are refs, and `version` says which of two views of it is newer. */
658
- type MessageView = Omit<Message, 'id' | 're' | 'replyTo' | 'links' | 'schedule' | 'version'> & {
677
+ type MessageView = Omit<Message, 'id' | 're' | 'replyTo' | 'links' | 'schedule' | 'version' | 'revision'> & {
659
678
  id: string;
660
679
  /** The thread's root, or null for a root. */
661
680
  re: string | null;
@@ -663,6 +682,11 @@ type MessageView = Omit<Message, 'id' | 're' | 'replyTo' | 'links' | 'schedule'
663
682
  replyTo: string | null;
664
683
  /** Grows with each change to this message: of two views of it, the one with the higher version is newer. */
665
684
  version: number;
685
+ /**
686
+ * Changes with each edit and delete, and only then: what an edit or a delete passes as `revision`
687
+ * to change it only if no one has since.
688
+ */
689
+ revision: number;
666
690
  links: LinkView[];
667
691
  /** Set when a schedule posted it: the schedule's ID and which send this was, from 0. */
668
692
  schedule?: {
@@ -729,7 +753,6 @@ type RegistrationView = {
729
753
  sync: {
730
754
  key: string;
731
755
  platform: string;
732
- signIn: boolean;
733
756
  }[];
734
757
  /** Every wake-up carries it, so the board can tell its registration is stale. */
735
758
  hash: string;
@@ -771,30 +794,6 @@ type Me = {
771
794
  /** What you may do in each channel pattern, implications included: `{ '*': [...every permission] }` is full access. */
772
795
  can: AccessSummary;
773
796
  };
774
- /** A platform account linked to you, as `GET /identity` lists it. */
775
- type LinkedAccount = {
776
- actor: string;
777
- handle: string | null;
778
- name: string | null;
779
- method: 'code' | 'consent';
780
- at: string;
781
- };
782
- type IdentityView = {
783
- principal: string;
784
- links: LinkedAccount[];
785
- /** The sync entries you haven't linked an account on. Boards older than it leave it out. */
786
- unlinked?: string[];
787
- cursor: string;
788
- };
789
- /**
790
- * How to prove an account is yours: post `code` from it anywhere the board syncs before
791
- * `expiresAt`, or, when the entry signs people in, open `signIn` and approve: it carries the code.
792
- */
793
- type SyncCodeView = {
794
- code: string;
795
- expiresAt: string;
796
- signIn?: string;
797
- };
798
797
  /** A thread's sync: its root, where it lives, its targets, and the platform thread it is on each. */
799
798
  type SyncThreadView = {
800
799
  thread: string;
@@ -809,18 +808,6 @@ type SyncFindView = {
809
808
  thread: string | null;
810
809
  /** The board message a platform message is a copy of, or came in as. */
811
810
  message: string | null;
812
- /** Who a platform account is linked to, and how. */
813
- person: {
814
- id: string;
815
- method: 'code' | 'consent';
816
- } | null;
817
- /** The platform accounts linked to a person, and how. */
818
- accounts: {
819
- id: string;
820
- method: 'code' | 'consent';
821
- }[];
822
- /** Who a live code was issued to. */
823
- holder: string | null;
824
811
  };
825
812
  /** A message's copies, by target: where it went, or came from, on each platform. */
826
813
  type SyncCopiesView = {
@@ -838,7 +825,13 @@ type InboxItem = {
838
825
  event: z.infer<typeof ExternalEvent>;
839
826
  raw: unknown;
840
827
  };
841
- type ChannelView = Channel;
828
+ /**
829
+ * A channel, and what its board counts in it: its threads, its messages, and its last message's
830
+ * position. `a2()` keeps all three; Vercel's API keeps none, so a board on it leaves them out.
831
+ */
832
+ type ChannelView = {
833
+ path: string;
834
+ } & Partial<Omit<Channel, 'path'>>;
842
835
  type MessagesPage = {
843
836
  messages: MessageView[];
844
837
  cursor: string;
@@ -945,7 +938,7 @@ type InboxEntry = {
945
938
  };
946
939
  /** The route table: method, path, and the schemas that validate input. */
947
940
  declare const routes: {
948
- /** Where the board is, its project, and the sync entries it links accounts on. No token. */
941
+ /** Where the board is, its project, and its sync entries. No token. */
949
942
  readonly discovery: {
950
943
  readonly method: 'GET';
951
944
  readonly path: '/';
@@ -958,6 +951,14 @@ declare const routes: {
958
951
  readonly method: 'GET';
959
952
  readonly path: '/channels';
960
953
  };
954
+ /** Makes a channel before anything posts to it: needs `read` and `post` there. One that's there already is left as it is. */
955
+ readonly createChannel: {
956
+ readonly method: 'POST';
957
+ readonly path: '/channels';
958
+ readonly body: z.ZodObject<{
959
+ path: z.ZodString;
960
+ }, z.core.$strip>;
961
+ };
961
962
  readonly actors: {
962
963
  readonly method: 'GET';
963
964
  readonly path: '/actors';
@@ -1016,6 +1017,7 @@ declare const routes: {
1016
1017
  }, z.core.$strip>]>>>;
1017
1018
  id: z.ZodOptional<z.ZodString>;
1018
1019
  attachments: z.ZodOptional<z.ZodArray<z.ZodString>>;
1020
+ after: z.ZodOptional<z.ZodString>;
1019
1021
  }, z.core.$strip>;
1020
1022
  };
1021
1023
  readonly edit: {
@@ -1023,12 +1025,15 @@ declare const routes: {
1023
1025
  readonly path: '/messages/:id/edit';
1024
1026
  readonly body: z.ZodObject<{
1025
1027
  text: z.ZodString;
1028
+ revision: z.ZodOptional<z.ZodNumber>;
1026
1029
  }, z.core.$strip>;
1027
1030
  };
1028
1031
  readonly delete: {
1029
1032
  readonly method: 'POST';
1030
1033
  readonly path: '/messages/:id/delete';
1031
- readonly body: z.ZodOptional<z.ZodObject<{}, z.core.$strip>>;
1034
+ readonly body: z.ZodOptional<z.ZodObject<{
1035
+ revision: z.ZodOptional<z.ZodNumber>;
1036
+ }, z.core.$strip>>;
1032
1037
  };
1033
1038
  readonly react: {
1034
1039
  readonly method: 'POST';
@@ -1044,6 +1049,7 @@ declare const routes: {
1044
1049
  readonly body: z.ZodObject<{
1045
1050
  set: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1046
1051
  unset: z.ZodOptional<z.ZodArray<z.ZodString>>;
1052
+ if: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
1047
1053
  }, z.core.$strip>;
1048
1054
  };
1049
1055
  /** Attaches the thread to a sync target, recording a `thread` receipt: needs `sync` where the thread is. */
@@ -1101,7 +1107,12 @@ declare const routes: {
1101
1107
  re: z.ZodOptional<z.ZodString>;
1102
1108
  channel: z.ZodOptional<z.ZodString>;
1103
1109
  by: z.ZodOptional<z.ZodString>;
1104
- all: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
1110
+ all: z.ZodOptional<z.ZodPipe<z.ZodEnum<{
1111
+ 0: "0";
1112
+ 1: "1";
1113
+ false: "false";
1114
+ true: "true";
1115
+ }>, z.ZodTransform<boolean, "0" | "1" | "false" | "true">>>;
1105
1116
  }, z.core.$strip>;
1106
1117
  };
1107
1118
  /** Its creator, or manage in its channel, may cancel a schedule. Canceling one that's done is a no-op. */
@@ -1109,6 +1120,45 @@ declare const routes: {
1109
1120
  readonly method: 'POST';
1110
1121
  readonly path: '/schedules/:id/cancel';
1111
1122
  };
1123
+ /** Grants need manage in every channel. Setting one with the same issuer and claims changes its `can`. */
1124
+ readonly grants: {
1125
+ readonly method: 'GET';
1126
+ readonly path: '/grants';
1127
+ };
1128
+ readonly createGrant: {
1129
+ readonly method: 'POST';
1130
+ readonly path: '/grants';
1131
+ readonly body: z.ZodObject<{
1132
+ issuer: z.ZodString;
1133
+ claims: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
1134
+ can: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>>]>>;
1135
+ }, z.core.$strip>;
1136
+ };
1137
+ readonly revokeGrant: {
1138
+ readonly method: 'POST';
1139
+ readonly path: '/grants/:id/revoke';
1140
+ };
1141
+ /** Your tokens, or every one with manage in every channel. A token acts as whoever minted it. */
1142
+ readonly tokens: {
1143
+ readonly method: 'GET';
1144
+ readonly path: '/tokens';
1145
+ };
1146
+ readonly createToken: {
1147
+ readonly method: 'POST';
1148
+ readonly path: '/tokens';
1149
+ readonly body: z.ZodObject<{
1150
+ name: z.ZodString;
1151
+ can: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>>]>>;
1152
+ profile: z.ZodOptional<z.ZodString>;
1153
+ avatar: z.ZodOptional<z.ZodString>;
1154
+ session: z.ZodOptional<z.ZodString>;
1155
+ expires: z.ZodOptional<z.ZodString>;
1156
+ }, z.core.$strip>;
1157
+ };
1158
+ readonly revokeToken: {
1159
+ readonly method: 'POST';
1160
+ readonly path: '/tokens/:id/revoke';
1161
+ };
1112
1162
  /** The caller's own post with the client ID it gave: what `POST /messages` answered, for telling a retry before posting. */
1113
1163
  readonly posted: {
1114
1164
  readonly method: 'GET';
@@ -1313,6 +1363,7 @@ declare const routes: {
1313
1363
  message: z.ZodNullable<z.ZodString>;
1314
1364
  }, z.core.$strip>>>;
1315
1365
  id: z.ZodOptional<z.ZodString>;
1366
+ after: z.ZodOptional<z.ZodString>;
1316
1367
  }, z.core.$strip>, z.ZodObject<{
1317
1368
  author: z.ZodObject<{
1318
1369
  id: z.ZodString;
@@ -1334,6 +1385,7 @@ declare const routes: {
1334
1385
  channel: z.ZodString;
1335
1386
  thread: z.ZodString;
1336
1387
  }, z.core.$strip>>;
1388
+ revision: z.ZodOptional<z.ZodNumber>;
1337
1389
  }, z.core.$strip>, z.ZodObject<{
1338
1390
  author: z.ZodObject<{
1339
1391
  id: z.ZodString;
@@ -1349,6 +1401,7 @@ declare const routes: {
1349
1401
  }, z.core.$strip>>;
1350
1402
  message: z.ZodOptional<z.ZodString>;
1351
1403
  op: z.ZodLiteral<"delete">;
1404
+ revision: z.ZodOptional<z.ZodNumber>;
1352
1405
  }, z.core.$strip>, z.ZodObject<{
1353
1406
  author: z.ZodObject<{
1354
1407
  id: z.ZodString;
@@ -1383,6 +1436,7 @@ declare const routes: {
1383
1436
  op: z.ZodLiteral<"labels">;
1384
1437
  set: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1385
1438
  unset: z.ZodOptional<z.ZodArray<z.ZodString>>;
1439
+ if: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
1386
1440
  }, z.core.$strip>, z.ZodObject<{
1387
1441
  author: z.ZodObject<{
1388
1442
  id: z.ZodString;
@@ -1434,7 +1488,6 @@ declare const routes: {
1434
1488
  external: z.ZodObject<{
1435
1489
  thread: z.ZodString;
1436
1490
  message: z.ZodString;
1437
- asUser: z.ZodOptional<z.ZodLiteral<true>>;
1438
1491
  }, z.core.$strip>;
1439
1492
  files: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
1440
1493
  }, z.core.$strip>, z.ZodObject<{
@@ -1471,12 +1524,9 @@ declare const routes: {
1471
1524
  readonly method: 'GET';
1472
1525
  readonly path: '/sync/find';
1473
1526
  readonly query: z.ZodObject<{
1474
- code: z.ZodOptional<z.ZodString>;
1475
1527
  post: z.ZodOptional<z.ZodString>;
1476
1528
  thread: z.ZodOptional<z.ZodString>;
1477
1529
  message: z.ZodOptional<z.ZodString>;
1478
- account: z.ZodOptional<z.ZodString>;
1479
- person: z.ZodOptional<z.ZodString>;
1480
1530
  }, z.core.$strip>;
1481
1531
  };
1482
1532
  /** Messages' copies on platforms. */
@@ -1487,52 +1537,6 @@ declare const routes: {
1487
1537
  message: z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>;
1488
1538
  }, z.core.$strip>;
1489
1539
  };
1490
- /** A person's recent roots, for telling their own platform copies from new messages. */
1491
- readonly syncRoots: {
1492
- readonly method: 'GET';
1493
- readonly path: '/sync/roots';
1494
- readonly query: z.ZodObject<{
1495
- by: z.ZodString;
1496
- since: z.ZodCoercedNumber<unknown>;
1497
- }, z.core.$strip>;
1498
- };
1499
- /** A one-time code for linking a platform account. */
1500
- readonly syncCode: {
1501
- readonly method: 'POST';
1502
- readonly path: '/sync/codes';
1503
- readonly body: z.ZodObject<{
1504
- sync: z.ZodString;
1505
- }, z.core.$strip>;
1506
- };
1507
- /** Links a platform account, by a code or for a person. */
1508
- readonly syncAccount: {
1509
- readonly method: 'POST';
1510
- readonly path: '/sync/accounts';
1511
- readonly body: z.ZodObject<{
1512
- sync: z.ZodString;
1513
- account: z.ZodObject<{
1514
- id: z.ZodString;
1515
- handle: z.ZodString;
1516
- name: z.ZodString;
1517
- isBot: z.ZodBoolean;
1518
- avatar: z.ZodPipe<z.ZodNullable<z.ZodString>, z.ZodTransform<string | null, string | null>>;
1519
- }, z.core.$strip>;
1520
- code: z.ZodString;
1521
- message: z.ZodOptional<z.ZodString>;
1522
- method: z.ZodOptional<z.ZodEnum<{
1523
- code: "code";
1524
- consent: "consent";
1525
- }>>;
1526
- }, z.core.$strip>;
1527
- };
1528
- /** Unlinks a platform account. */
1529
- readonly syncUnlink: {
1530
- readonly method: 'POST';
1531
- readonly path: '/sync/accounts/unlink';
1532
- readonly body: z.ZodObject<{
1533
- account: z.ZodString;
1534
- }, z.core.$strip>;
1535
- };
1536
1540
  /** Reads a platform channel or thread on demand, where that sync runs, without syncing or storing it. Full access only. */
1537
1541
  readonly readSource: {
1538
1542
  readonly method: 'GET';
@@ -1568,7 +1572,12 @@ declare const routes: {
1568
1572
  text: z.ZodOptional<z.ZodString>;
1569
1573
  after: z.ZodOptional<z.ZodString>;
1570
1574
  wait: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
1571
- all: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
1575
+ all: z.ZodOptional<z.ZodPipe<z.ZodEnum<{
1576
+ 0: "0";
1577
+ 1: "1";
1578
+ false: "false";
1579
+ true: "true";
1580
+ }>, z.ZodTransform<boolean, "0" | "1" | "false" | "true">>>;
1572
1581
  }, z.core.$strip>;
1573
1582
  };
1574
1583
  readonly avatar: {
@@ -1592,6 +1601,7 @@ declare const routes: {
1592
1601
  name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1593
1602
  type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1594
1603
  size: z.ZodNumber;
1604
+ sha256: z.ZodOptional<z.ZodString>;
1595
1605
  }, z.core.$strip>;
1596
1606
  };
1597
1607
  /** After the `PUT`: the board checks what landed in the store and records the attachment. */
@@ -1603,36 +1613,6 @@ declare const routes: {
1603
1613
  readonly method: 'GET';
1604
1614
  readonly path: '/openapi.json';
1605
1615
  };
1606
- /** Your linked platform accounts. */
1607
- readonly identity: {
1608
- readonly method: 'GET';
1609
- readonly path: '/identity';
1610
- };
1611
- /** Starts a sign-in that carries a code (no token), on the board that runs the entry's sync. */
1612
- readonly signIn: {
1613
- readonly method: 'GET';
1614
- readonly path: '/identity/sign-in';
1615
- readonly query: z.ZodObject<{
1616
- sync: z.ZodString;
1617
- code: z.ZodString;
1618
- }, z.core.$strip>;
1619
- };
1620
- /** Where a sign-in comes back (no token): links the account it authorized to the code's person. */
1621
- readonly signedIn: {
1622
- readonly method: 'GET';
1623
- readonly path: '/identity/signed-in';
1624
- readonly query: z.ZodObject<{
1625
- sync: z.ZodString;
1626
- code: z.ZodString;
1627
- }, z.core.$strip>;
1628
- };
1629
- readonly identityUnlink: {
1630
- readonly method: 'POST';
1631
- readonly path: '/identity/unlink';
1632
- readonly body: z.ZodObject<{
1633
- actor: z.ZodString;
1634
- }, z.core.$strip>;
1635
- };
1636
1616
  /** Watchers registered by boards on `http()`: every one to `manage` everywhere, the caller's own to anyone else. */
1637
1617
  readonly watchers: {
1638
1618
  readonly method: 'GET';
@@ -1653,7 +1633,6 @@ declare const routes: {
1653
1633
  sync: z.ZodOptional<z.ZodArray<z.ZodObject<{
1654
1634
  key: z.ZodString;
1655
1635
  platform: z.ZodString;
1656
- signIn: z.ZodDefault<z.ZodBoolean>;
1657
1636
  }, z.core.$strip>>>;
1658
1637
  url: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
1659
1638
  path: z.ZodOptional<z.ZodNull>;
@@ -1669,7 +1648,6 @@ declare const routes: {
1669
1648
  sync: z.ZodOptional<z.ZodArray<z.ZodObject<{
1670
1649
  key: z.ZodString;
1671
1650
  platform: z.ZodString;
1672
- signIn: z.ZodDefault<z.ZodBoolean>;
1673
1651
  }, z.core.$strip>>>;
1674
1652
  url: z.ZodOptional<z.ZodNull>;
1675
1653
  path: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
@@ -1766,7 +1744,13 @@ type PostOptions = {
1766
1744
  /** Files from `upload`, or their IDs. */
1767
1745
  attachments?: (Attachment | string)[];
1768
1746
  };
1769
- type ReplyOptions = Omit<PostOptions, 'sync'>;
1747
+ type ReplyOptions = Omit<PostOptions, 'sync'> & {
1748
+ /**
1749
+ * Posts only while this is the thread's newest message: the ID of the last one you read. If
1750
+ * another has come after it, nothing is posted, and it throws a 409 `newer_message`.
1751
+ */
1752
+ after?: string;
1753
+ };
1770
1754
  /**
1771
1755
  * When a scheduled message goes out: once `in` a while or `at` a time, or
1772
1756
  * `every` so often (first at `at`, `in`, or one `every` from now), stopping
@@ -1820,17 +1804,16 @@ declare function createBoardClient(options: ClientOptions): {
1820
1804
  }) => Promise<Response>;
1821
1805
  discovery: () => Promise<Discovery>;
1822
1806
  me: () => Promise<Me>;
1823
- channels: () => Promise<Channel[]>;
1824
- actors: () => Promise<(Actor & {
1825
- person?: ActorView['person'];
1826
- })[]>;
1827
- /** Your linked platform accounts, and the sync entries you haven't linked (`unlinked`). */
1828
- identity: () => Promise<IdentityView>;
1829
- /** Unlinks one of your accounts, by actor ID or handle. History keeps its messages as they were. */
1830
- unlinkAccount: (account: string) => Promise<{
1831
- ok: true;
1832
- actor: string;
1807
+ channels: () => Promise<ChannelView[]>;
1808
+ /**
1809
+ * Makes a channel before anything posts to it, as a first post would. Needs `read` and `post`
1810
+ * there. `created` is false when it was there already; it's left as it is.
1811
+ */
1812
+ createChannel: (path: string) => Promise<{
1813
+ channel: ChannelView;
1814
+ created: boolean;
1833
1815
  }>;
1816
+ actors: () => Promise<Actor[]>;
1834
1817
  messages: (query?: Filters & Omit<MessagesQueryInput, keyof FiltersInput>) => Promise<MessagesPage>;
1835
1818
  thread: (id: string) => Promise<ThreadView>;
1836
1819
  /** Your own post with the client ID you gave it, as posting it answered: 404 `post_not_found` when there's none. */
@@ -1849,12 +1832,44 @@ declare function createBoardClient(options: ClientOptions): {
1849
1832
  re: string;
1850
1833
  }, input: ScheduleOptions): Promise<Written<ScheduleView>>;
1851
1834
  /** Pending schedules (`all` for done and canceled too), oldest first. `re` is any message in a thread. */
1852
- schedules: (query?: SchedulesQueryInput) => Promise<ScheduleView[]>;
1835
+ schedules: (query?: Omit<SchedulesQueryInput, 'all'> & {
1836
+ all?: boolean;
1837
+ }) => Promise<ScheduleView[]>;
1853
1838
  /** Stops a schedule: yours, or any with manage in its channel. `canceled` is false when it was already done or canceled. */
1854
1839
  cancelSchedule: (id: string) => Promise<{
1855
1840
  schedule: ScheduleView;
1856
1841
  canceled: boolean;
1857
1842
  }>;
1843
+ /**
1844
+ * Lets in callers with an OIDC token from `issuer` that carries every one of `claims`, to do
1845
+ * what `can` says (read, post, react, and label everywhere when left out). Setting the same
1846
+ * issuer and claims again changes its `can`: `created` says which. Needs manage in every channel.
1847
+ */
1848
+ createGrant: (input: GrantInput) => Promise<{
1849
+ grant: GrantView;
1850
+ created: boolean;
1851
+ }>;
1852
+ /** The board's grants. Needs manage in every channel. */
1853
+ grants: () => Promise<GrantView[]>;
1854
+ /** `revoked` is false when it was already gone. Its principals' next requests are refused. */
1855
+ revokeGrant: (id: string) => Promise<{
1856
+ revoked: boolean;
1857
+ }>;
1858
+ /**
1859
+ * A token that acts as you, narrowed to `can`, writing as `profile` and `session` when they're
1860
+ * given: for a widget, a sandbox, a script. `secret` shows only here. It lives 30 days, or
1861
+ * `expires`, at most 90.
1862
+ */
1863
+ createToken: (input: TokenInput) => Promise<{
1864
+ token: TokenView;
1865
+ secret: string;
1866
+ }>;
1867
+ /** Your live tokens, or everyone's with manage in every channel. Never their secrets. */
1868
+ tokens: () => Promise<TokenView[]>;
1869
+ /** It and every token minted with it stop. `revoked` is false when it was already revoked. */
1870
+ revokeToken: (id: string) => Promise<{
1871
+ revoked: boolean;
1872
+ }>;
1858
1873
  /**
1859
1874
  * Stores a file on the board, for a post or reply's `attachments`. Up to 4 MB goes in one
1860
1875
  * request; bigger, up to 100 MB, goes straight to the board's blob store on a URL the board
@@ -1865,11 +1880,19 @@ declare function createBoardClient(options: ClientOptions): {
1865
1880
  download: (id: string, opts?: {
1866
1881
  signal?: AbortSignal;
1867
1882
  }) => Promise<Response>;
1868
- edit: (id: string, text: string) => Promise<{
1883
+ /**
1884
+ * `revision` is the message's as you read it: if it's been edited or deleted since, nothing
1885
+ * changes, and it throws a 409 `revision_conflict`.
1886
+ */
1887
+ edit: (id: string, text: string, opts?: {
1888
+ revision?: number;
1889
+ }) => Promise<{
1869
1890
  ok: true;
1870
1891
  unknownMentions?: string[];
1871
1892
  }>;
1872
- delete: (id: string) => Promise<{
1893
+ delete: (id: string, opts?: {
1894
+ revision?: number;
1895
+ }) => Promise<{
1873
1896
  ok: true;
1874
1897
  }>;
1875
1898
  /** `emoji` is a short name, `:name:`, or the character itself. */
@@ -1878,16 +1901,20 @@ declare function createBoardClient(options: ClientOptions): {
1878
1901
  }) => Promise<{
1879
1902
  ok: true;
1880
1903
  }>;
1904
+ /**
1905
+ * `if` is what the labels must be now, a value or null for one that mustn't be set: if one
1906
+ * isn't, nothing changes, and it throws a 409 `label_conflict`.
1907
+ */
1881
1908
  label: (id: string, change: {
1882
1909
  set?: Record<string, string>;
1883
1910
  unset?: string[];
1911
+ if?: Record<string, string | null>;
1884
1912
  }) => Promise<{
1885
1913
  ok: true;
1886
1914
  }>;
1887
1915
  /**
1888
- * Shows typing in the platform threads the message's thread is synced to
1889
- * (on WhatsApp, also marking the latest inbound message read). Ephemeral:
1890
- * nothing goes in the log. Answers the external threads that took it.
1916
+ * Shows typing in the platform threads the message's thread is synced to.
1917
+ * Ephemeral: nothing goes in the log. Answers the external threads that took it.
1891
1918
  * `status` replaces "Typing…" on Slack ("running tests…").
1892
1919
  */
1893
1920
  typing: (id: string, status?: string) => Promise<string[]>;
@@ -1957,14 +1984,12 @@ declare function createBoardClient(options: ClientOptions): {
1957
1984
  }>;
1958
1985
  /** A board thread's sync, by its key. */
1959
1986
  syncThread: (thread: string) => Promise<SyncThreadView>;
1960
- /** What platform IDs are on the board: a thread, a message, who an account is, a person's accounts. */
1987
+ /** What platform IDs are on the board: a thread, or a message. */
1961
1988
  syncFind: (query: SyncFindInput, opts?: {
1962
1989
  signal?: AbortSignal;
1963
1990
  }) => Promise<SyncFindView>;
1964
1991
  /** Messages' copies on platforms, by message and target. */
1965
1992
  syncCopies: (messages: string[]) => Promise<Record<string, Record<string, ExternalCopy>>>;
1966
- /** A person's roots since `since`. */
1967
- syncRoots: (by: string, since: Date | number) => Promise<MessageView[]>;
1968
1993
  /** Pushes platform events into your inbox for sync key `key`; each platform ID lands once. */
1969
1994
  inboxPush: (key: string, events: {
1970
1995
  id: string;
@@ -1984,23 +2009,11 @@ declare function createBoardClient(options: ClientOptions): {
1984
2009
  }) => Promise<{
1985
2010
  ok: true;
1986
2011
  }>;
1987
- /**
1988
- * A one-time code for linking your account on sync entry `sync`, to post from that account where
1989
- * the board syncs, and `signIn` when the entry signs people in: open it (only you) and approve.
1990
- * Only people get one, each for themselves. `identity()` shows the link once it's made.
1991
- */
1992
- syncCode: (sync: string) => Promise<SyncCodeView>;
1993
- /** Links a platform account to whoever a code was issued to: one posted from it, or carried through its sign-in. */
1994
- syncAccount: (body: SyncAccountInput) => Promise<{
1995
- person: string;
1996
- link: LinkedAccount;
1997
- }>;
1998
- /** Unlinks a platform account: your own, or anyone's with `sync`. */
1999
- syncUnlink: (account: string) => Promise<{
2000
- ok: true;
2001
- }>;
2002
2012
  /** Live events. Reconnects from the last seen index whenever the stream closes. */
2003
- events(query?: Filters & Pick<EventsQueryInput, 'after' | 'all'>, opts?: {
2013
+ events(query?: Filters & {
2014
+ after?: string;
2015
+ all?: boolean;
2016
+ }, opts?: {
2004
2017
  signal?: AbortSignal;
2005
2018
  }): AsyncGenerator<BoardEventView>;
2006
2019
  /** The next matching event after `after` (default: now), or null on timeout. */
@@ -2009,4 +2022,4 @@ declare function createBoardClient(options: ClientOptions): {
2009
2022
  }, opts?: WaitOptions): Promise<BoardEventView | null>;
2010
2023
  };
2011
2024
  //#endregion
2012
- export { RegisterInput as $, InboxItem as A, SyncRootsQuery as At, Me as B, TypingResult as Bt, EventsQuery as C, SyncFindInput as Ct, IdentityView as D, SyncImportInput as Dt, IdentityUnlinkBody as E, SyncImportBody as Et, LinkView as F, ThreadView as Ft, ParsedFilters as G, MessagesPage as H, UploadTicket as Ht, LinkedAccount as I, ThreadsPage as It, PostInput as J, PersonView as K, LinkedQuery as L, ThreadsQuery as Lt, InboxPushBody as M, SyncUnlinkBody as Mt, InboxQuery as N, SyncedView as Nt, InboxAckBody as O, SyncReceiptBody as Ot, LabelBody as P, ThreadSummaryView as Pt, RegisterBody as Q, MatchView as R, ThreadsQueryInput as Rt, EventsPage as S, SyncCopiesView as St, FiltersInput as T, SyncFindView as Tt, MessagesQuery as U, routes as Ut, MessageView as V, UploadStartBody as Vt, MessagesQueryInput as W, ReactBody as X, REGISTERED_WATCHERS_MAX as Y, Ref as Z, BoardEventView as _, SyncAccountInput as _t, PostOptions as a, ScheduleInput as at, Discovery as b, SyncCodeView as bt, ScheduleOptions as c, SchedulesQueryInput as ct, WaitOptions as d, SourceJoin as dt, RegistrationView as et, Written as f, SourceJoinBody as ft, ApiError as g, SyncAccountBody as gt, ActorView as h, SourceReadQuery as ht, Filters as i, ScheduleBodyOutput as it, InboxNextQuery as j, SyncThreadView as jt, InboxEntry as k, SyncReceiptInput as kt, ScheduleTiming as l, SchedulesQueryOutput as lt, AckBody as m, SourceRead as mt, BoardError as n, RouteName as nt, ProfileOption as o, ScheduleView as ot, duration as p, SourceMessage as pt, PostBody as q, ErrorOrigin as r, ScheduleBody as rt, ReplyOptions as s, SchedulesQuery as st, BoardClient as t, ResolvedSyncTarget as tt, UploadInput as u, SignInQuery as ut, ChannelView as v, SyncBody as vt, EventsQueryInput as w, SyncFindQuery as wt, EditBody as x, SyncCopiesQuery as xt, DeleteBody as y, SyncCodeBody as yt, MatchesQuery as z, TypingBody as zt };
2025
+ export { RegisterBody as $, InboxAckBody as A, ThreadsPage as At, MatchView as B, routes as Bt, EventsPage as C, SyncImportInput as Ct, GrantBody as D, SyncedView as Dt, FiltersInput as E, SyncThreadView as Et, InboxQuery as F, TokenView as Ft, MessagesQuery as G, Me as H, LABEL_CONDITIONS_MAX as I, TypingBody as It, PostBody as J, MessagesQueryInput as K, LabelBody as L, TypingResult as Lt, InboxItem as M, ThreadsQueryInput as Mt, InboxNextQuery as N, TokenBody as Nt, GrantInput as O, ThreadSummaryView as Ot, InboxPushBody as P, TokenInput as Pt, Ref as Q, LinkView as R, UploadStartBody as Rt, EditBody as S, SyncImportBody as St, EventsQueryInput as T, SyncReceiptInput as Tt, MessageView as U, MatchesQuery as V, MessagesPage as W, REGISTERED_WATCHERS_MAX as X, PostInput as Y, ReactBody as Z, BoardEventView as _, SyncCopiesQuery as _t, PostOptions as a, ScheduleBodyOutput as at, DeleteBody as b, SyncFindQuery as bt, ScheduleOptions as c, SchedulesQuery as ct, WaitOptions as d, SourceJoin as dt, RegisterInput as et, Written as f, SourceJoinBody as ft, ApiError as g, SyncBody as gt, ActorView as h, SourceReadQuery as ht, Filters as i, ScheduleBody as it, InboxEntry as j, ThreadsQuery as jt, GrantView as k, ThreadView as kt, ScheduleTiming as l, SchedulesQueryInput as lt, AckBody as m, SourceRead as mt, BoardError as n, ResolvedSyncTarget as nt, ProfileOption as o, ScheduleInput as ot, duration as p, SourceMessage as pt, ParsedFilters as q, ErrorOrigin as r, RouteName as rt, ReplyOptions as s, ScheduleView as st, BoardClient as t, RegistrationView as tt, UploadInput as u, SchedulesQueryOutput as ut, ChannelView as v, SyncCopiesView as vt, EventsQuery as w, SyncReceiptBody as wt, Discovery as x, SyncFindView as xt, CreateChannelBody as y, SyncFindInput as yt, LinkedQuery as z, UploadTicket as zt };