@vercel/board 0.45.1 → 0.47.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.
- package/dist/{access-3udXjJAg.mjs → access-C06pIr0M.mjs} +2 -2
- package/dist/access.d.mts +2 -2
- package/dist/access.mjs +5 -5
- package/dist/{actors-DasGZnfb.mjs → actors-Dkyg-oo0.mjs} +3 -3
- package/dist/{auth-aiOVE82-.mjs → auth-B9-wXQ-x.mjs} +29 -9
- package/dist/{auth-BG_whr9_.d.mts → auth-li3lKwJG.d.mts} +1 -1
- package/dist/{backend-D6yTo8Un.d.mts → backend-i_esjwUS.d.mts} +144 -5
- package/dist/backend-local.d.mts +1 -1
- package/dist/backend-local.mjs +1 -1
- package/dist/{chat-provider-V2jnjVLq.d.mts → chat-provider-BWBGZOZY.d.mts} +4 -2
- package/dist/{chat-provider-BvNqOQFL.mjs → chat-provider-CD7jskh7.mjs} +7 -4
- package/dist/cli-commands.d.mts +1 -1
- package/dist/cli-commands.mjs +1 -1
- package/dist/cli-embedded.d.mts +2 -2
- package/dist/cli-embedded.mjs +3 -2
- package/dist/cli.mjs +46 -15
- package/dist/{commands-DewS14_P.d.mts → commands-CJsOA-hf.d.mts} +60 -0
- package/dist/{commands-CqdnjUkm.mjs → commands-Dk6_cHLS.mjs} +325 -0
- package/dist/{conformance-BInS4_6b.mjs → conformance-CDP8y2Zm.mjs} +1063 -6
- package/dist/conformance.d.mts +6 -5
- package/dist/conformance.mjs +1 -1
- package/dist/{engine-XVBt02Bl.mjs → engine-j2VeNuKG.mjs} +51 -50
- package/dist/{errors-ZazTZh-s.mjs → errors-QhkdzI-o.mjs} +176 -9
- package/dist/{events-D17RndlV.mjs → events-MOcxGpOQ.mjs} +2 -2
- package/dist/{exports-DCxecX15.mjs → exports-CEqS-IPP.mjs} +1417 -84
- package/dist/exports-CF9rKCXd.d.mts +44 -0
- package/dist/{external-DfhN7lKK.mjs → external-BuVTXT1R.mjs} +7 -3
- package/dist/{index-Djmr4GzQ.d.mts → index-ttfx1TZ6.d.mts} +2 -2
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +5 -5
- package/dist/index.node.d.mts +7 -6
- package/dist/index.node.mjs +5 -4
- package/dist/inspect/app.js +215 -115
- package/dist/inspect/engine.js +5 -5
- package/dist/inspect-8YAhl_h3.mjs +2 -0
- package/dist/{inspect-CHsgnf_5.mjs → inspect-vOSrW_g6.mjs} +322 -50
- package/dist/{local-DE9vmanM.mjs → local-0ajWOVhN.mjs} +1673 -98
- package/dist/{main-CF1Me3jg.mjs → main-B8Zkd4Pm.mjs} +1282 -58
- package/dist/{memory-DyEL0fvN.mjs → memory-CMm-Fk_A.mjs} +2 -2
- package/dist/{mentions-DfZGp3B-.mjs → mentions-CnWt9Z5b.mjs} +34 -1
- package/dist/{middleware-BHHKHA9q.mjs → middleware-CT6vMNUc.mjs} +2 -2
- package/dist/{provider-BC9mPYVh.d.mts → provider-Bc3xI90K.d.mts} +199 -6
- package/dist/{routes-CkUetTO2.mjs → routes-ABXf3CKq.mjs} +261 -8
- package/dist/{routes-zm4TXKCC.d.mts → routes-CjA6Mp4D.d.mts} +610 -6
- package/dist/{schemas-BhZaystC.mjs → schemas-7VFdomFB.mjs} +34 -1
- package/dist/serve-BepKXDH3.mjs +285 -0
- package/dist/{server-Bmz0zqYM.mjs → server-4rQL3xuH.mjs} +41 -22
- package/dist/{serving-BLVRrJ7P.mjs → serving-BNdiReQT.mjs} +1 -1
- package/dist/{sql-CyVcjw8x.mjs → sql-IEbO5vXs.mjs} +174 -9
- package/dist/{sqlite-Con-8duk.mjs → sqlite-CVG8XKHm.mjs} +2 -2
- package/dist/{sqlite-db-BdzxtUOV.mjs → sqlite-db-BJjPQYx4.mjs} +1 -1
- package/dist/sync-chat-sdk.d.mts +16 -2
- package/dist/sync-chat-sdk.mjs +2 -2
- package/dist/sync-github.d.mts +16 -2
- package/dist/sync-github.mjs +3 -3
- package/dist/sync-linear.d.mts +17 -3
- package/dist/sync-linear.mjs +2 -2
- package/dist/sync-slack.d.mts +17 -3
- package/dist/sync-slack.mjs +107 -15
- package/dist/sync.d.mts +2 -2
- package/dist/sync.mjs +2 -2
- package/dist/{origin-BbwhnKrg.mjs → task-batch-BZXm6kOE.mjs} +83 -8
- package/dist/{tokens-BErYXuHZ.mjs → tokens-BCp4EWTQ.mjs} +2 -2
- package/docs/01-board/01-mounting.md +8 -5
- package/docs/01-board/03-identity.md +43 -23
- package/docs/01-board/04-messages.md +3 -2
- package/docs/01-board/06-watchers.md +3 -3
- package/docs/01-board/07-schedules.md +2 -2
- package/docs/01-board/08-middleware.md +7 -0
- package/docs/01-board/09-access.md +6 -4
- package/docs/01-board/10-local.md +4 -1
- package/docs/01-board/11-tasks.md +348 -0
- package/docs/02-sync/01-overview.md +4 -5
- package/docs/02-sync/02-functions.md +2 -2
- package/docs/02-sync/03-slack.md +8 -5
- package/docs/02-sync/06-providers.md +8 -0
- package/docs/03-guides/02-inspector.md +83 -10
- package/docs/03-guides/06-sandboxed-agents.md +7 -5
- package/docs/03-guides/07-build-a-ui.md +210 -0
- package/docs/03-guides/08-tailnet.md +123 -0
- package/docs/04-reference/01-cli.md +272 -23
- package/docs/04-reference/02-board.md +287 -7
- package/docs/04-reference/03-http.md +208 -13
- package/docs/04-reference/05-conformance.md +10 -7
- package/package.json +1 -1
- package/dist/exports-Gspe1eEq.d.mts +0 -4
- package/dist/inspect-C8U3A4jQ.mjs +0 -2
- package/dist/serve-CEMvl0EH.mjs +0 -181
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { a as Link, i as ExternalTarget, n as ExternalEvent, o as Origin, t as ExternalAuthor } from "./external-
|
|
1
|
+
import { b as DIRECT_UPLOAD_BYTES_MAX } from "./errors-QhkdzI-o.mjs";
|
|
2
|
+
import { C as SentText, M as storable, O as TaskState, S as SentTaskNote, c as EDITED_HOLD, d as LabelKey, f as LabelValue, g as MessageText, j as platformAvatar, l as Emoji, m as MESSAGE_TEXT_MAX, o as CHANNEL_PATTERN_MAX, p as Labels, r as AttachmentId, s as ChannelPath, t as ActorId, x as SentTaskHoldKind } from "./schemas-7VFdomFB.mjs";
|
|
3
|
+
import { a as Link, i as ExternalTarget, n as ExternalEvent, o as Origin, t as ExternalAuthor } from "./external-BuVTXT1R.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/api/routes.ts
|
|
6
6
|
/**
|
|
@@ -53,10 +53,17 @@ const MessagesQuery = Filters.extend({
|
|
|
53
53
|
before: id.optional(),
|
|
54
54
|
limit: z.coerce.number().int().min(1).max(500).optional()
|
|
55
55
|
});
|
|
56
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* `limit` counts threads: each thread with a matching message, by its latest reply. `before` is a page's
|
|
58
|
+
* `older`, for the threads last active before it; it pages backward, so it takes no `after`.
|
|
59
|
+
*/
|
|
57
60
|
const ThreadsQuery = Filters.extend({
|
|
58
61
|
after: Ref.optional(),
|
|
62
|
+
before: z.string().min(1).max(1024).optional(),
|
|
59
63
|
limit: z.coerce.number().int().min(1).max(500).optional()
|
|
64
|
+
}).refine((query) => query.before === void 0 || query.after === void 0, {
|
|
65
|
+
message: "`before` pages back from a page's `older`, and `after` reads forward: pass one",
|
|
66
|
+
path: ["before"]
|
|
60
67
|
});
|
|
61
68
|
const EventsQuery = Filters.extend({
|
|
62
69
|
after: Ref.optional(),
|
|
@@ -129,6 +136,151 @@ const SchedulesQuery = z.object({
|
|
|
129
136
|
/** Include done and canceled schedules. */
|
|
130
137
|
all: flag.optional()
|
|
131
138
|
});
|
|
139
|
+
/** A channel, or with a trailing `/` it and every channel under it: `work`, `work/`. As long as a grant's pattern for either. */
|
|
140
|
+
const ChannelOrSubtree = z.string().max(CHANNEL_PATTERN_MAX).regex(/^[a-z0-9][a-z0-9_-]*(?:\/[a-z0-9][a-z0-9_-]*)*\/?$/, "name a channel, or a channel and its subtree (work/)");
|
|
141
|
+
/**
|
|
142
|
+
* How long a claim holds its task, in seconds, 900 when left out. How short and how long one may
|
|
143
|
+
* be is the backend's to say: the local board takes 30 to 3600, and a board gives what's asked up
|
|
144
|
+
* to its own cap, never under 300.
|
|
145
|
+
*/
|
|
146
|
+
const Lease = z.number();
|
|
147
|
+
/** What a claim's own writes carry: the `epoch` and `token` its claim answered. */
|
|
148
|
+
const Claimed = {
|
|
149
|
+
epoch: z.number().int().positive(),
|
|
150
|
+
token: z.string().min(1).max(128)
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* A new thread that's a task (`channel` and `text`, with `labels`, `noSync`, `attachments`, and an
|
|
154
|
+
* `id` as a post takes them), or the thread `re` roots made one. `needs` are the tasks it waits for,
|
|
155
|
+
* `for` the one actor of its owner's that claims it, and `claim` claims it in the same write, for
|
|
156
|
+
* `lease` seconds.
|
|
157
|
+
*/
|
|
158
|
+
const CreateTaskBody = z.object({
|
|
159
|
+
channel: ChannelPath.optional(),
|
|
160
|
+
re: Ref.optional(),
|
|
161
|
+
/** As long as a post's text may be: the backend says how long that is. */
|
|
162
|
+
text: z.string().optional(),
|
|
163
|
+
labels: Labels.optional(),
|
|
164
|
+
noSync: z.boolean().optional(),
|
|
165
|
+
/** IDs from `POST /attachments`, as a post takes them. */
|
|
166
|
+
attachments: z.array(AttachmentId).optional(),
|
|
167
|
+
/** How many tasks one may wait for is the backend's to say. */
|
|
168
|
+
needs: z.array(Ref).optional(),
|
|
169
|
+
for: ActorId.nullable().optional(),
|
|
170
|
+
claim: z.boolean().optional(),
|
|
171
|
+
lease: Lease.optional(),
|
|
172
|
+
id: z.string().min(1).max(200).refine(storable, "id has a NUL character or a lone surrogate").optional()
|
|
173
|
+
}).refine((body) => body.channel === void 0 !== (body.re === void 0), { message: "a task needs `channel` and `text` for a new thread, or `re` for a thread that's there" }).refine((body) => body.channel === void 0 || (body.text ?? "").trim().length > 0 || (body.attachments?.length ?? 0) > 0, {
|
|
174
|
+
message: "message text is empty",
|
|
175
|
+
path: ["text"]
|
|
176
|
+
}).refine((body) => body.text === void 0 || storable(body.text), {
|
|
177
|
+
message: "message text has a NUL character or a lone surrogate",
|
|
178
|
+
path: ["text"]
|
|
179
|
+
}).refine((body) => body.re === void 0 || body.text === void 0 && body.labels === void 0 && body.noSync === void 0 && body.attachments === void 0 && body.id === void 0, { message: "`text`, `labels`, `noSync`, `attachments`, and `id` are a new thread's: `re` makes a task of a thread as it is" }).refine((body) => body.lease === void 0 || body.claim === true, {
|
|
180
|
+
message: "`lease` goes with `claim`",
|
|
181
|
+
path: ["lease"]
|
|
182
|
+
});
|
|
183
|
+
/** A digest of what a batch asks for: what tells the same request under an `id` from another. */
|
|
184
|
+
const BatchRequest = z.string().min(1).max(64);
|
|
185
|
+
/** A task another task of the same batch waits for, by the `key` it goes by there. */
|
|
186
|
+
const TaskKey = z.string().min(1).refine(storable, "key has a NUL character or a lone surrogate");
|
|
187
|
+
/**
|
|
188
|
+
* Several new threads in one channel, each a task, made in one write: all of them or none. A task is
|
|
189
|
+
* what `POST /tasks` starts a thread with, less `claim`. `key` names it for the batch's others, and
|
|
190
|
+
* `needs` takes a task's ID, or `{ key }` for one of the batch, before or after it. `id` names the
|
|
191
|
+
* batch: a retry with it answers the same tasks. At most `TASK_BATCH_MAX` tasks, 400
|
|
192
|
+
* `batch_too_large` past that, which a board that holds fewer in one write answers too.
|
|
193
|
+
*/
|
|
194
|
+
const CreateTasksBody = z.object({
|
|
195
|
+
channel: ChannelPath,
|
|
196
|
+
tasks: z.array(z.object({
|
|
197
|
+
key: TaskKey.optional(),
|
|
198
|
+
/** May be empty when the task's root has attachments. As long as a post's text may be: the backend says how long that is. */
|
|
199
|
+
text: z.string(),
|
|
200
|
+
labels: Labels.optional(),
|
|
201
|
+
noSync: z.boolean().optional(),
|
|
202
|
+
/** IDs from `POST /attachments`, as a post takes them. */
|
|
203
|
+
attachments: z.array(AttachmentId).optional(),
|
|
204
|
+
/** How many tasks one may wait for is the backend's to say. */
|
|
205
|
+
needs: z.array(z.union([Ref, z.object({ key: TaskKey }).strict()])).optional(),
|
|
206
|
+
for: ActorId.nullable().optional()
|
|
207
|
+
}).refine((task) => task.text.trim().length > 0 || (task.attachments?.length ?? 0) > 0, {
|
|
208
|
+
message: "message text is empty",
|
|
209
|
+
path: ["text"]
|
|
210
|
+
}).refine((task) => storable(task.text), {
|
|
211
|
+
message: "message text has a NUL character or a lone surrogate",
|
|
212
|
+
path: ["text"]
|
|
213
|
+
})).min(1).max(100),
|
|
214
|
+
id: z.string().min(1).max(200).refine(storable, "id has a NUL character or a lone surrogate").optional(),
|
|
215
|
+
/**
|
|
216
|
+
* From a board in front of this one: its digest of what the batch asked for as it was given, before
|
|
217
|
+
* its own middleware changed anything, so both boards tell a repeat by the same request. A board
|
|
218
|
+
* with none in front makes its own. It says nothing of who writes or what: a caller that sends one
|
|
219
|
+
* changes only which of its own requests its own `id` answers.
|
|
220
|
+
*/
|
|
221
|
+
request: BatchRequest.optional()
|
|
222
|
+
});
|
|
223
|
+
/**
|
|
224
|
+
* `request` is a board's digest of what a batch asked for, as it was given: with it, the batch
|
|
225
|
+
* answers only that request, and any other under the `id` is 409 `duplicate_id`.
|
|
226
|
+
*/
|
|
227
|
+
const CreatedTasksQuery = z.object({ request: BatchRequest.optional() });
|
|
228
|
+
/** Which tasks to list: open ones unless `state` says `all` or names one. A claim whose lease has run out counts as `ready`. */
|
|
229
|
+
const TasksQuery = z.object({
|
|
230
|
+
channel: z.string().optional(),
|
|
231
|
+
state: z.union([z.enum(["open", "all"]), TaskState]).optional(),
|
|
232
|
+
label: repeated.pipe(z.array(LabelFilter)).optional(),
|
|
233
|
+
/** Who wrote the root: a handle or an actor ID, as on `/messages`. */
|
|
234
|
+
by: z.string().optional(),
|
|
235
|
+
/** Whose task it is: a handle or a principal ID. */
|
|
236
|
+
owner: z.string().optional(),
|
|
237
|
+
/** The actor it's assigned to: a handle or an actor ID. */
|
|
238
|
+
for: z.string().optional(),
|
|
239
|
+
/** A task's ID: the tasks that wait for it. */
|
|
240
|
+
needs: Ref.optional(),
|
|
241
|
+
/** A `cursor` an earlier page reported. */
|
|
242
|
+
after: Ref.optional(),
|
|
243
|
+
limit: z.coerce.number().int().min(1).max(500).optional()
|
|
244
|
+
});
|
|
245
|
+
const ClaimTaskBody = z.object({ lease: Lease.optional() }).optional();
|
|
246
|
+
/**
|
|
247
|
+
* Claims the oldest ready task in `channel` that has every label in `label`: one assigned to the
|
|
248
|
+
* caller first, then an unassigned one it owns, or whose owner `from` names by ID. `wait`
|
|
249
|
+
* holds the request up to that many seconds for one.
|
|
250
|
+
*/
|
|
251
|
+
const ClaimReadyTaskBody = z.object({
|
|
252
|
+
channel: ChannelOrSubtree,
|
|
253
|
+
label: Labels.optional(),
|
|
254
|
+
/** How many owners one claim takes from is the backend's to say. */
|
|
255
|
+
from: z.array(z.string().min(1).max(256)).optional(),
|
|
256
|
+
lease: Lease.optional(),
|
|
257
|
+
wait: z.number().min(0).max(300).optional()
|
|
258
|
+
});
|
|
259
|
+
const RenewTaskBody = z.object({
|
|
260
|
+
...Claimed,
|
|
261
|
+
lease: Lease.optional()
|
|
262
|
+
});
|
|
263
|
+
const ReleaseTaskBody = z.object(Claimed);
|
|
264
|
+
const CompleteTaskBody = z.object({
|
|
265
|
+
...Claimed,
|
|
266
|
+
result: SentTaskNote.optional()
|
|
267
|
+
});
|
|
268
|
+
const FailTaskBody = z.object({
|
|
269
|
+
...Claimed,
|
|
270
|
+
reason: SentTaskNote
|
|
271
|
+
});
|
|
272
|
+
/** A hold for a person. A claimed task's comes from its claim, with the claim's `epoch` and `token`. Kind `edited` is the board's own, so none asks for it. */
|
|
273
|
+
const BlockTaskBody = z.object({
|
|
274
|
+
reason: SentTaskNote,
|
|
275
|
+
kind: SentTaskHoldKind.refine((kind) => kind !== EDITED_HOLD, "`edited` is the board's own kind, for a task whose root someone else edited: name another").optional(),
|
|
276
|
+
epoch: Claimed.epoch.optional(),
|
|
277
|
+
token: Claimed.token.optional()
|
|
278
|
+
}).refine((body) => body.epoch === void 0 === (body.token === void 0), { message: "a claim is its `epoch` and its `token`: pass both, or neither" });
|
|
279
|
+
/** The one actor of its owner's that claims the task, or null for anyone who may. */
|
|
280
|
+
const AssignTaskBody = z.object({ for: ActorId.nullable() });
|
|
281
|
+
/** The tasks it waits for now, in place of what it waited for: none, for a task that waits for nothing. How many it may wait for is the backend's to say. */
|
|
282
|
+
const TaskNeedsBody = z.object({ needs: z.array(Ref) });
|
|
283
|
+
const CancelTaskBody = z.object({ reason: SentTaskNote });
|
|
132
284
|
const CanGrant = z.union([z.literal("all"), z.array(z.string().min(1).max(16)).max(8)]);
|
|
133
285
|
const ClaimValue = z.string().min(1).max(1e3);
|
|
134
286
|
const Environments = z.array(z.string().min(1).max(100)).min(1).max(16);
|
|
@@ -299,14 +451,25 @@ const ImportOrigin = z.object({
|
|
|
299
451
|
/** A link as an import carries it: a board message it names is a ref. */
|
|
300
452
|
const ImportLink = Link.extend({ message: Ref.nullable() });
|
|
301
453
|
/**
|
|
454
|
+
* A platform user, as sync names them to the board. Their avatar shows wherever they do, so one
|
|
455
|
+
* that isn't an https URL is dropped, never refused: the write lands without it.
|
|
456
|
+
*/
|
|
457
|
+
const PlatformUser = ExternalAuthor.extend({ avatar: z.string().nullable().transform(platformAvatar) });
|
|
458
|
+
/**
|
|
302
459
|
* Who wrote it on the platform, and the sync key it came through: null for a write a sync callback
|
|
303
460
|
* makes as that user, which syncs out to every platform like one written on the board.
|
|
304
461
|
*/
|
|
305
462
|
const Imported = {
|
|
306
|
-
author:
|
|
463
|
+
author: PlatformUser,
|
|
307
464
|
from: SyncKey.nullable()
|
|
308
465
|
};
|
|
309
466
|
/**
|
|
467
|
+
* The platform's users a text mentions as `@[<their id>]`. One the board hasn't met becomes known
|
|
468
|
+
* to it, as one who wrote does: named, and seen where the message is. One the text doesn't mention
|
|
469
|
+
* is left out.
|
|
470
|
+
*/
|
|
471
|
+
const Mentioned = z.array(PlatformUser).max(50).optional();
|
|
472
|
+
/**
|
|
310
473
|
* Where the platform event an import comes from is: its sync entry, platform channel, and thread.
|
|
311
474
|
* The middleware is told, and answers there when it drops the write.
|
|
312
475
|
*/
|
|
@@ -339,6 +502,7 @@ const SyncImportBody = z.discriminatedUnion("op", [
|
|
|
339
502
|
noSync: z.boolean().optional(),
|
|
340
503
|
attachments: z.array(AttachmentId).max(10).optional(),
|
|
341
504
|
links: z.array(ImportLink).max(10).optional(),
|
|
505
|
+
mentioned: Mentioned,
|
|
342
506
|
id: z.string().min(1).max(200).refine(storable, "id has a NUL character or a lone surrogate").optional(),
|
|
343
507
|
/** A reply's precondition, as a post's: a sync callback's reply after the newest message it read. */
|
|
344
508
|
after: Ref.optional()
|
|
@@ -349,7 +513,8 @@ const SyncImportBody = z.discriminatedUnion("op", [
|
|
|
349
513
|
...Changed,
|
|
350
514
|
text: MessageText,
|
|
351
515
|
source: ImportSource.optional(),
|
|
352
|
-
revision: Revision.optional()
|
|
516
|
+
revision: Revision.optional(),
|
|
517
|
+
mentioned: Mentioned
|
|
353
518
|
}),
|
|
354
519
|
z.object({
|
|
355
520
|
op: z.literal("delete"),
|
|
@@ -505,7 +670,7 @@ const routes = {
|
|
|
505
670
|
method: "GET",
|
|
506
671
|
path: "/messages/:id"
|
|
507
672
|
},
|
|
508
|
-
/** Threads with a matching message, one summary each, by latest activity. */
|
|
673
|
+
/** Threads with a matching message, one summary each, by latest activity. `before` takes a page's `older`. */
|
|
509
674
|
threads: {
|
|
510
675
|
method: "GET",
|
|
511
676
|
path: "/threads",
|
|
@@ -575,6 +740,94 @@ const routes = {
|
|
|
575
740
|
method: "POST",
|
|
576
741
|
path: "/schedules/:id/cancel"
|
|
577
742
|
},
|
|
743
|
+
/** Tasks, oldest first: open ones unless `state` says otherwise. */
|
|
744
|
+
tasks: {
|
|
745
|
+
method: "GET",
|
|
746
|
+
path: "/tasks",
|
|
747
|
+
query: TasksQuery
|
|
748
|
+
},
|
|
749
|
+
/** Starts a thread as a task (`post` there, and `label` for its labels), or makes the thread `re` roots one (`label` there). */
|
|
750
|
+
createTask: {
|
|
751
|
+
method: "POST",
|
|
752
|
+
path: "/tasks",
|
|
753
|
+
body: CreateTaskBody
|
|
754
|
+
},
|
|
755
|
+
/** Starts several threads in one channel as tasks, in one write: all of them or none, and nothing shows before all have landed. */
|
|
756
|
+
createTasks: {
|
|
757
|
+
method: "POST",
|
|
758
|
+
path: "/tasks/batch",
|
|
759
|
+
body: CreateTasksBody
|
|
760
|
+
},
|
|
761
|
+
/** The caller's own batch made under the `id` it gave, its tasks as they are now: for telling a retry before making anything. */
|
|
762
|
+
createdTasks: {
|
|
763
|
+
method: "GET",
|
|
764
|
+
path: "/tasks/batch/:id",
|
|
765
|
+
query: CreatedTasksQuery
|
|
766
|
+
},
|
|
767
|
+
/** Claims the oldest ready task in a channel or subtree: `label` where it is. Answers `{ task: null }` when none is. */
|
|
768
|
+
claimReadyTask: {
|
|
769
|
+
method: "POST",
|
|
770
|
+
path: "/tasks/claim",
|
|
771
|
+
body: ClaimReadyTaskBody
|
|
772
|
+
},
|
|
773
|
+
/** Claims a task: `label` in its channel. Its answer's `claim` goes on what the claim does next. */
|
|
774
|
+
claimTask: {
|
|
775
|
+
method: "POST",
|
|
776
|
+
path: "/tasks/:id/claim",
|
|
777
|
+
body: ClaimTaskBody
|
|
778
|
+
},
|
|
779
|
+
/** What a claim does, with its `epoch` and `token`: 409 `claim_lost` once it's over. */
|
|
780
|
+
renewTask: {
|
|
781
|
+
method: "POST",
|
|
782
|
+
path: "/tasks/:id/renew",
|
|
783
|
+
body: RenewTaskBody
|
|
784
|
+
},
|
|
785
|
+
releaseTask: {
|
|
786
|
+
method: "POST",
|
|
787
|
+
path: "/tasks/:id/release",
|
|
788
|
+
body: ReleaseTaskBody
|
|
789
|
+
},
|
|
790
|
+
completeTask: {
|
|
791
|
+
method: "POST",
|
|
792
|
+
path: "/tasks/:id/complete",
|
|
793
|
+
body: CompleteTaskBody
|
|
794
|
+
},
|
|
795
|
+
failTask: {
|
|
796
|
+
method: "POST",
|
|
797
|
+
path: "/tasks/:id/fail",
|
|
798
|
+
body: FailTaskBody
|
|
799
|
+
},
|
|
800
|
+
/** Holds a task for a person: its claim while it's claimed, its owner or `manage` in its channel otherwise. */
|
|
801
|
+
blockTask: {
|
|
802
|
+
method: "POST",
|
|
803
|
+
path: "/tasks/:id/block",
|
|
804
|
+
body: BlockTaskBody
|
|
805
|
+
},
|
|
806
|
+
/** What a task's owner does, or `manage` in its channel. */
|
|
807
|
+
unblockTask: {
|
|
808
|
+
method: "POST",
|
|
809
|
+
path: "/tasks/:id/unblock"
|
|
810
|
+
},
|
|
811
|
+
reopenTask: {
|
|
812
|
+
method: "POST",
|
|
813
|
+
path: "/tasks/:id/reopen"
|
|
814
|
+
},
|
|
815
|
+
assignTask: {
|
|
816
|
+
method: "POST",
|
|
817
|
+
path: "/tasks/:id/assign",
|
|
818
|
+
body: AssignTaskBody
|
|
819
|
+
},
|
|
820
|
+
/** Replaces what a task waits for, while no one holds it and it isn't finished. */
|
|
821
|
+
setTaskNeeds: {
|
|
822
|
+
method: "POST",
|
|
823
|
+
path: "/tasks/:id/needs",
|
|
824
|
+
body: TaskNeedsBody
|
|
825
|
+
},
|
|
826
|
+
cancelTask: {
|
|
827
|
+
method: "POST",
|
|
828
|
+
path: "/tasks/:id/cancel",
|
|
829
|
+
body: CancelTaskBody
|
|
830
|
+
},
|
|
578
831
|
/** Listing grants needs manage at `*`; changing one, manage at each pattern its `can` names. Team owners always may. */
|
|
579
832
|
grants: {
|
|
580
833
|
method: "GET",
|
|
@@ -752,4 +1005,4 @@ const routes = {
|
|
|
752
1005
|
}
|
|
753
1006
|
};
|
|
754
1007
|
//#endregion
|
|
755
|
-
export {
|
|
1008
|
+
export { RegisterBody as A, SyncFindQuery as B, LabelBody as C, PostBody as D, MessagesQuery as E, SchemaBody as F, ThreadsQuery as G, SyncReceiptBody as H, SourceJoinBody as I, UploadStartBody as J, TypingBody as K, SourceReadQuery as L, RenewTaskBody as M, ScheduleBody as N, ReactBody as O, SchedulesQuery as P, SyncBody as R, InboxQuery as S, MatchesQuery as T, TaskNeedsBody as U, SyncImportBody as V, TasksQuery as W, routes as Y, Filters as _, ClaimReadyTaskBody as a, InboxNextQuery as b, CreateChannelBody as c, CreatedTasksQuery as d, DeleteBody as f, FailTaskBody as g, ExplainQuery as h, CancelTaskBody as i, ReleaseTaskBody as j, Ref as k, CreateTaskBody as l, EventsQuery as m, AssignTaskBody as n, ClaimTaskBody as o, EditBody as p, UpdateGrantBody as q, BlockTaskBody as r, CompleteTaskBody as s, AckBody as t, CreateTasksBody as u, GrantBody as v, LinkedQuery as w, InboxPushBody as x, InboxAckBody as y, SyncCopiesQuery as z };
|