@vercel/board 0.57.0 → 0.58.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/README.md +1 -1
- package/dist/{access-CIj7v_Dr.mjs → access-D1AHzFSP.mjs} +1 -1
- package/dist/access.d.mts +2 -2
- package/dist/access.mjs +4 -4
- package/dist/{actors-DVDTqjm7.mjs → actors-CCth21rU.mjs} +2 -2
- package/dist/{auth-BDWGvFWl.mjs → auth-Cc5_pdi7.mjs} +2 -2
- package/dist/{auth-C0Mla9OU.d.mts → auth-DcWTzrHz.d.mts} +1 -1
- package/dist/{backend-BuqwQbb4.d.mts → backend-9H57DlQt.d.mts} +23 -5
- package/dist/backend-local.d.mts +1 -1
- package/dist/backend-local.mjs +1 -1
- package/dist/backend-postgres/blob-vercel.d.mts +1 -1
- package/dist/backend-postgres.d.mts +3 -3
- package/dist/backend-postgres.mjs +3 -3
- package/dist/{blob-DjS53D1A.d.mts → blob-CdLCZEPM.d.mts} +2 -2
- package/dist/{chat-provider-CpYdXEpI.d.mts → chat-provider-BiJ8G6KY.d.mts} +2 -2
- 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 +2 -2
- package/dist/cli.mjs +6 -6
- package/dist/{client-B0DGOt7P.d.mts → client-BUPyzzFt.d.mts} +13 -1
- package/dist/{commands-DLPIX7Jw.d.mts → commands-DryDbyWr.d.mts} +8 -3
- package/dist/{commands-7FY_8p92.mjs → commands-totPnoCC.mjs} +81 -23
- package/dist/{conformance-FiQ68adg.mjs → conformance-D9XutDay.mjs} +2 -2
- package/dist/conformance.d.mts +1 -1
- package/dist/conformance.mjs +1 -1
- package/dist/{engine-B_CjnE3G.mjs → engine-DVWbcEIB.mjs} +2 -2
- package/dist/{errors-BfMR39F0.mjs → errors-Ce_-E3_C.mjs} +210 -2
- package/dist/{errors-DBZtbfph.d.mts → errors-CwObkpSn.d.mts} +1 -1
- package/dist/{exports-BvJTIorX.d.mts → exports-Bh09j6Bd.d.mts} +5 -5
- package/dist/{exports-x-ioAfbp.mjs → exports-WtqjdQwb.mjs} +256 -57
- package/dist/{index-DuibwQf9.d.mts → index-mgNwCwJ4.d.mts} +2 -2
- package/dist/index.d.mts +7 -7
- package/dist/index.mjs +4 -4
- package/dist/index.node.d.mts +8 -8
- package/dist/index.node.mjs +4 -4
- package/dist/inspect/app.js +126 -146
- package/dist/inspect/engine.js +3 -3
- package/dist/inspect/sheet-presentation.js +1 -0
- package/dist/{inspect-BFnDSdsq.mjs → inspect-CtPZz0WG.mjs} +2 -2
- package/dist/inspect-wkA_8iyU.mjs +2 -0
- package/dist/inspect.d.mts +1 -1
- package/dist/inspect.mjs +1 -1
- package/dist/{local-Bt1-jA9A.mjs → local-B7Yp-B2z.mjs} +30 -8
- package/dist/{local-Gp8pqHSu.mjs → local-BPiDCkA4.mjs} +5 -5
- package/dist/{main-Du-mKQZn.mjs → main-BvkLqpUX.mjs} +223 -52
- package/dist/{memory-74hyK6eH.mjs → memory-BmsyKyHu.mjs} +1 -1
- package/dist/{middleware-bIABV895.mjs → middleware-DVBOEd8G.mjs} +2 -32
- package/dist/{provider-BNVyVKtH.d.mts → provider-BnK0Bif7.d.mts} +2 -2
- package/dist/{routes-CSnxZyyb.d.mts → routes-D5FtKOP_.d.mts} +87 -1
- package/dist/{serve-xOoxwq7T.mjs → serve-ChlJ955x.mjs} +6 -6
- package/dist/{server-BSexF7Bk.mjs → server-CRdVLqny.mjs} +25 -10
- package/dist/{serving-ByD4TOOU.mjs → serving-BVtrFzK4.mjs} +1 -1
- package/dist/{shell-0nWQEqh3.mjs → shell-hTUuAc6A.mjs} +11 -7
- package/dist/{sqlite-DtfrT_EP.mjs → sqlite-B9ZLSDUT.mjs} +1 -1
- package/dist/{sqlite-db-DSVlzQjv.mjs → sqlite-db-DawFxCk6.mjs} +20 -5
- package/dist/sync-chat-sdk.d.mts +2 -2
- package/dist/sync-github.d.mts +2 -2
- package/dist/sync-linear.d.mts +3 -3
- package/dist/sync-slack.d.mts +3 -3
- package/dist/sync.d.mts +2 -2
- package/dist/{task-batch-DgyfK9qx.mjs → task-batch-CnRhVsh6.mjs} +7 -4
- package/dist/{tokens-_1X8JNLT.mjs → tokens-XagdeYrv.mjs} +2 -2
- package/dist/{version-CZT5WmZs.mjs → version-rlZkE9nc.mjs} +1 -1
- package/docs/01-board/01-mounting.md +9 -0
- package/docs/01-board/05-reading.md +2 -1
- package/docs/01-board/09-access.md +8 -4
- package/docs/01-board/11-tasks.md +7 -2
- package/docs/01-board/12-postgres.md +3 -3
- package/docs/02-sync/01-overview.md +4 -0
- package/docs/02-sync/05-managed.md +117 -0
- package/docs/03-guides/02-inspector.md +1 -1
- package/docs/04-reference/01-cli.md +44 -2
- package/docs/04-reference/03-http.md +5 -0
- package/package.json +2 -2
- package/dist/inspect-BuNsu2z6.mjs +0 -2
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { d as mediaType, i as ATTACHMENT_BYTES_MAX, n as formatProfileHeader, o as IMPORT_BYTES_MAX } from "./profile-header-O8wC8yk8.mjs";
|
|
2
2
|
import { T as TASK_LABEL, b as RemoteWatcherId, y as RESERVED_LABEL_PREFIX } from "./schemas-CUSTEFIy.mjs";
|
|
3
|
-
import { $ as
|
|
4
|
-
import { _ as sha256, a as waitUntil, c as platformProfile, d as userIdOf, m as derivedId, o as actorParts, r as runMiddleware, s as importedHandle, t as DroppedError, u as underPrincipal } from "./middleware-bIABV895.mjs";
|
|
3
|
+
import { $ as PostBody, A as ClaimTaskBody, B as ExplainQuery, C as ActorsQuery, Ct as routes, D as ChannelMessagesQuery, E as CancelTaskBody, F as CreateTasksBody, G as InboxNextQuery, I as CreatedTasksQuery, J as LabelBody, K as InboxPushBody, L as DeleteBody, M as CreateChannelBody, N as CreateGrantsBody, O as ChannelsQuery, P as CreateTaskBody, Q as MatchesQuery, R as EditBody, S as AckBody, St as UploadStartBody, T as BlockTaskBody, U as GrantBody, V as FailTaskBody, W as InboxAckBody, X as ManagedSyncBody, Y as LinkedQuery, Z as ManagedSyncsQuery, _t as TasksQuery, a as duplicateId, at as RevokeGrantBody, bt as TypingBody, c as notFound, ct as SchemaBody, d as unauthorized, dt as SyncBody, et as ReactBody, f as BoardError, ft as SyncCopiesQuery, g as refusalCode, gt as TaskNeedsBody, h as eventsState, ht as SyncReceiptBody, i as batchTooLarge, it as RenewTaskBody, j as CompleteTaskBody, k as ClaimReadyTaskBody, lt as SourceJoinBody, m as duration, mt as SyncImportBody, n as RejectedError, nt as RegisterBody, o as forbidden, ot as ScheduleBody, p as createBoardClient, pt as SyncFindQuery, q as InboxQuery, r as badRequest, rt as ReleaseTaskBody, s as json, st as SchedulesQuery, t as HttpError, tt as Ref, u as toErrorResponse, ut as SourceReadQuery, v as derivedId, vt as ThreadQuery, w as AssignTaskBody, x as sha256, xt as UpdateGrantBody, yt as ThreadsQuery, z as EventsQuery } from "./errors-Ce_-E3_C.mjs";
|
|
5
4
|
import { n as blocksIn, r as findBlocks } from "./blocks-CVoBC7ur.mjs";
|
|
6
5
|
import { a as mentionTerms, c as settleMentions, i as mentionTerm, r as meTerms, s as replaceMentions, t as extractMentions } from "./mentions-DBGmqkr2.mjs";
|
|
7
|
-
import { t as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
6
|
+
import { a as waitUntil, c as platformProfile, d as userIdOf, o as actorParts, r as runMiddleware, s as importedHandle, t as DroppedError, u as underPrincipal } from "./middleware-DVBOEd8G.mjs";
|
|
7
|
+
import { t as VERSION } from "./version-rlZkE9nc.mjs";
|
|
8
|
+
import { a as canText, c as compileAccess, d as parsePattern, n as InvalidCan, r as PERMISSIONS, t as FULL_ACCESS, u as parseCan } from "./access-D1AHzFSP.mjs";
|
|
9
|
+
import { _ as uploadName, a as runMatch, d as createRouter, f as openapi, g as carried, h as readJson, i as canonicalWatchers, m as readCapped, n as SYNC_ACTOR, o as compileWatcher, p as queryObject, r as syncTarget, t as batchPlan, u as METHODS, v as SYNC } from "./task-batch-CnRhVsh6.mjs";
|
|
10
|
+
import { C as verifiedIssuers, D as explainGrants, d as createAuthority, f as fromTokens, m as hostPrincipal, o as VERCEL_ISSUER, p as grantIssuers, t as DEFAULT_CAN$1, v as namesByLogin, w as verifiesTokens } from "./auth-Cc5_pdi7.mjs";
|
|
11
|
+
import { a as resolveActor, o as viaOf, r as claimsOf, t as KNOWN_AGENTS } from "./actors-CCth21rU.mjs";
|
|
12
12
|
import { t as checkValue } from "./data-values-CoTP0SQG.mjs";
|
|
13
13
|
//#region src/server/registrant.ts
|
|
14
14
|
/** Registering again this soon after the same registration only repeats it. */
|
|
@@ -1098,11 +1098,27 @@ function createVercel(options, environment) {
|
|
|
1098
1098
|
/** The last answer to a read of channels or actors with its `ETag`, by its URL and who asked: sent back, a 304 says it holds. The newest few. */
|
|
1099
1099
|
const tagged = /* @__PURE__ */ new Map();
|
|
1100
1100
|
/**
|
|
1101
|
+
* A request to the API, as `who`. A path that names the board by its name (`onBoard`) asked nothing
|
|
1102
|
+
* first, so where the API knows no such board the caller can enter (404 `board_not_found`), the
|
|
1103
|
+
* board is found or made as `boardId` does it, once, and the request goes again by its ID, as
|
|
1104
|
+
* every one after it does.
|
|
1105
|
+
*/
|
|
1106
|
+
async function api(who, method, path, init = {}) {
|
|
1107
|
+
const named = path.startsWith("/boards/") ? namedBoard() : null;
|
|
1108
|
+
if (named === null || !(path === named || path.startsWith(`${named}/`) || path.startsWith(`${named}?`))) return request(who, method, path, init);
|
|
1109
|
+
if (board === null) try {
|
|
1110
|
+
return await request(who, method, path, init);
|
|
1111
|
+
} catch (error) {
|
|
1112
|
+
if (!(error instanceof HttpError && error.status === 404 && error.code === "board_not_found")) throw error;
|
|
1113
|
+
}
|
|
1114
|
+
return request(who, method, `/boards/${encodeURIComponent(await boardId(who))}${path.slice(named.length)}`, init);
|
|
1115
|
+
}
|
|
1116
|
+
/**
|
|
1101
1117
|
* One request to the API, as `who`. Its errors are the API's own, with its status and code. One the
|
|
1102
1118
|
* API puts off (429, or a 503), or that its gateway lost (502, 504), waits and goes again as it was,
|
|
1103
1119
|
* so a write keeps its operation ID and lands once.
|
|
1104
1120
|
*/
|
|
1105
|
-
async function
|
|
1121
|
+
async function request(who, method, path, init = {}) {
|
|
1106
1122
|
const url = new URL(`${origin}/v${init.version ?? 1}/messageboard${path}`);
|
|
1107
1123
|
const id = await teamId();
|
|
1108
1124
|
if (id) url.searchParams.set(id.startsWith("team_") ? "teamId" : "slug", id);
|
|
@@ -1121,6 +1137,7 @@ function createVercel(options, environment) {
|
|
|
1121
1137
|
if (kept) headers["if-none-match"] = kept.etag;
|
|
1122
1138
|
const repeatable = method !== "POST" && method !== "PATCH" || typeof init.body?.operationId === "string";
|
|
1123
1139
|
const started = Date.now();
|
|
1140
|
+
let renewed = false;
|
|
1124
1141
|
for (let attempt = 0;; attempt++) {
|
|
1125
1142
|
let response;
|
|
1126
1143
|
try {
|
|
@@ -1169,6 +1186,12 @@ function createVercel(options, environment) {
|
|
|
1169
1186
|
continue;
|
|
1170
1187
|
}
|
|
1171
1188
|
const error = body?.error;
|
|
1189
|
+
if (response.status === 403 && error?.invalidToken === true && !renewed && !init.signal?.aborted) {
|
|
1190
|
+
renewed = true;
|
|
1191
|
+
await pause(retryWait(0, null), init.signal);
|
|
1192
|
+
init.signal?.throwIfAborted();
|
|
1193
|
+
continue;
|
|
1194
|
+
}
|
|
1172
1195
|
if (response.status === 429) throw throttled(response, error?.code ?? "rate_limited", attempt, Date.now() - started);
|
|
1173
1196
|
const refused = new HttpError(response.status, refusalCode(response.status, error) ?? "remote_error", error?.message ?? `Vercel's API answered ${response.status}`);
|
|
1174
1197
|
if (typeof error?.reason === "string" && /^[a-z_]{1,64}$/.test(error.reason)) reasons.set(refused, error.reason);
|
|
@@ -1211,6 +1234,12 @@ function createVercel(options, environment) {
|
|
|
1211
1234
|
}
|
|
1212
1235
|
}
|
|
1213
1236
|
}
|
|
1237
|
+
/** A board's name as the API keeps one, which counts its characters once it's trimmed and NFC-normalized. */
|
|
1238
|
+
const boardNameOf = (given) => {
|
|
1239
|
+
const name = given.trim().normalize("NFC");
|
|
1240
|
+
if (!/^[^/]{1,64}$/.test(name)) throw new HttpError(400, "invalid_board_name", `${JSON.stringify(given)} isn't a board's name: one is 1 to 64 characters with no /.`, { origin: "handle" });
|
|
1241
|
+
return name;
|
|
1242
|
+
};
|
|
1214
1243
|
/**
|
|
1215
1244
|
* The board named `name` in the team: the one the API lists for it. Where it lists none, the
|
|
1216
1245
|
* caller makes it (a project's is granted to that project, in its environment), unless it says
|
|
@@ -1218,9 +1247,8 @@ function createVercel(options, environment) {
|
|
|
1218
1247
|
* team's boards, the ones you can't see included.
|
|
1219
1248
|
*/
|
|
1220
1249
|
async function boardNamed(who, given) {
|
|
1221
|
-
const name = given
|
|
1222
|
-
|
|
1223
|
-
const { boards } = await api(who, "GET", "/boards", { query: { name } });
|
|
1250
|
+
const name = boardNameOf(given);
|
|
1251
|
+
const { boards } = await request(who, "GET", "/boards", { query: { name } });
|
|
1224
1252
|
if (boards[0]) return boards[0].id;
|
|
1225
1253
|
const me = await self(who);
|
|
1226
1254
|
const { principal } = me.actor;
|
|
@@ -1229,7 +1257,7 @@ function createVercel(options, environment) {
|
|
|
1229
1257
|
origin: "handle"
|
|
1230
1258
|
});
|
|
1231
1259
|
try {
|
|
1232
|
-
const { board: made } = await
|
|
1260
|
+
const { board: made } = await request(who, "POST", "/boards/ensure", { body: {
|
|
1233
1261
|
name,
|
|
1234
1262
|
operationId: operationId()
|
|
1235
1263
|
} });
|
|
@@ -1278,20 +1306,38 @@ function createVercel(options, environment) {
|
|
|
1278
1306
|
* The board's ID: the one given, the one `board({ name })` names, or the team's, which the API
|
|
1279
1307
|
* names only to those it lets in. A team with none gets one the first time a person uses it, as
|
|
1280
1308
|
* the API asks of its clients; a project can't make it, and needs a person to grant it the board
|
|
1281
|
-
* anyway. Each is asked for once
|
|
1309
|
+
* anyway. Each is asked for once, and only where a path can't name the board by its name: the API
|
|
1310
|
+
* knew none by it, or the ID itself is wanted, as a URL to the board is.
|
|
1282
1311
|
*/
|
|
1283
|
-
const boardId = (who) => (board ??= options.board ? Promise.resolve(options.board) : boardName() ? boardNamed(who, boardName()) :
|
|
1312
|
+
const boardId = (who) => (board ??= options.board ? Promise.resolve(options.board) : boardName() ? boardNamed(who, boardName()) : request(who, "GET", "/boards").then(async ({ defaultBoardId }) => {
|
|
1284
1313
|
if (defaultBoardId) return defaultBoardId;
|
|
1285
1314
|
const me = await self(who);
|
|
1286
1315
|
const { principal } = me.actor;
|
|
1287
1316
|
if (principal.type === "project" || principal.type === "github" || principal.type === "oidc") throw notLetIn(null, principal, me.teamId);
|
|
1288
|
-
const { board: made } = await
|
|
1317
|
+
const { board: made } = await request(who, "POST", "/boards/default", { body: { operationId: operationId() } });
|
|
1289
1318
|
return made.id;
|
|
1290
1319
|
})).catch((error) => {
|
|
1291
1320
|
board = null;
|
|
1292
1321
|
throw error;
|
|
1293
1322
|
});
|
|
1294
|
-
|
|
1323
|
+
/** The team's default board's name in a path, whatever the board is named. */
|
|
1324
|
+
const DEFAULT_BOARD = "General";
|
|
1325
|
+
/**
|
|
1326
|
+
* `/boards/<name>`, as a path names a board that was given no ID: the API takes a board's name
|
|
1327
|
+
* where it takes its ID, and the default board's for the team's. Null for a board named by its ID,
|
|
1328
|
+
* and for a name a path would read as something else, which is asked for its ID as a name: `.` or
|
|
1329
|
+
* `..`, a step in a URL's path, and one that starts as an ID does (`brd_`), which the API takes for
|
|
1330
|
+
* an ID, another board's if it has one.
|
|
1331
|
+
*/
|
|
1332
|
+
const namedBoard = () => {
|
|
1333
|
+
if (options.board) return null;
|
|
1334
|
+
const name = boardNameOf(boardName() ?? DEFAULT_BOARD);
|
|
1335
|
+
return name === "." || name === ".." || name.startsWith("brd_") ? null : `/boards/${encodeURIComponent(name)}`;
|
|
1336
|
+
};
|
|
1337
|
+
/** A path on the board: by its ID where that's known, and else by its name, so nothing is asked for it first. */
|
|
1338
|
+
const onBoard = async (who, path = "") => `${(board === null ? namedBoard() : null) ?? await boardById(who)}${path}`;
|
|
1339
|
+
/** `/boards/<id>`, for what must hold when the board's name changes hands: a URL someone keeps. */
|
|
1340
|
+
const boardById = async (who) => `/boards/${encodeURIComponent(await boardId(who))}`;
|
|
1295
1341
|
let channels = null;
|
|
1296
1342
|
const loadChannels = async (who, fresh = false) => {
|
|
1297
1343
|
if (fresh) channels = null;
|
|
@@ -1565,51 +1611,81 @@ function createVercel(options, environment) {
|
|
|
1565
1611
|
};
|
|
1566
1612
|
/** A message's labels: a deleted message keeps none, though the API still holds them. */
|
|
1567
1613
|
const labelsOf = (message) => message.deletedAt === void 0 ? { ...message.labels } : {};
|
|
1568
|
-
|
|
1614
|
+
/**
|
|
1615
|
+
* A thread's messages, all of them, and with `include` its channel: the API answers it with a page of them
|
|
1616
|
+
* (`include=channel`), so naming it costs no request of its own. The first page is asked for it, and it's kept
|
|
1617
|
+
* as any channel an answer names. An API that doesn't take the parameter here refuses the read, and nothing
|
|
1618
|
+
* is read in its place.
|
|
1619
|
+
*/
|
|
1620
|
+
const threadMessages = async (who, threadId, signal, include) => {
|
|
1569
1621
|
const path = await onBoard(who, `/threads/${encodeURIComponent(threadId)}/messages`);
|
|
1570
1622
|
const messages = [];
|
|
1623
|
+
let channel;
|
|
1571
1624
|
let cursor;
|
|
1572
1625
|
do {
|
|
1573
1626
|
const page = await reading(who, path, {
|
|
1574
|
-
query: {
|
|
1627
|
+
query: {
|
|
1628
|
+
cursor,
|
|
1629
|
+
include: channel ? void 0 : include
|
|
1630
|
+
},
|
|
1575
1631
|
...signal ? { signal } : {}
|
|
1576
1632
|
});
|
|
1577
1633
|
messages.push(...page.messages);
|
|
1634
|
+
if (page.channel) learn(who, channel = page.channel);
|
|
1578
1635
|
cursor = page.cursor ?? void 0;
|
|
1579
1636
|
} while (cursor);
|
|
1580
|
-
return
|
|
1637
|
+
return {
|
|
1638
|
+
messages,
|
|
1639
|
+
channel,
|
|
1640
|
+
end: messages.at(-1)?.sequence ?? 0
|
|
1641
|
+
};
|
|
1581
1642
|
};
|
|
1582
1643
|
/** Whether the API reads a thread's messages in a range (`after`, `limit`, `order`): until it refuses one, it's asked. */
|
|
1583
1644
|
let threadRanges = true;
|
|
1584
1645
|
/**
|
|
1585
1646
|
* A thread's root, and its replies in a range: after the message at `after`, the first `limit` of them, or with no
|
|
1586
|
-
* `after`, the newest. The API reads the range itself, a page of 100 at most, and the
|
|
1587
|
-
*
|
|
1647
|
+
* `after`, the newest. The API reads the range itself, a page of 100 at most, and answers the thread with its
|
|
1648
|
+
* first page (`include=thread`): its first message, which a range may leave out, and how many messages it has,
|
|
1649
|
+
* which is where it ends. So a range costs no request for the root. With `include`, the thread's channel too,
|
|
1650
|
+
* from the same page. The API takes `include=thread` here or the read fails: nothing is read in its place. One
|
|
1651
|
+
* from before ranges answers 400 for their parameters, and the whole thread is read and cut here.
|
|
1588
1652
|
*/
|
|
1589
|
-
async function threadRange(who, threadId, range, signal) {
|
|
1590
|
-
const cut = ([root, ...replies]) => {
|
|
1653
|
+
async function threadRange(who, threadId, range, signal, include) {
|
|
1654
|
+
const cut = ({ messages: [root, ...replies], channel, end }) => {
|
|
1591
1655
|
const rest = range.after === void 0 ? replies : replies.filter((reply) => reply.sequence > range.after);
|
|
1592
|
-
return
|
|
1656
|
+
return {
|
|
1657
|
+
messages: root ? [root, ...range.limit === void 0 ? rest : range.after === void 0 ? rest.slice(-range.limit) : rest.slice(0, range.limit)] : [],
|
|
1658
|
+
channel,
|
|
1659
|
+
end
|
|
1660
|
+
};
|
|
1593
1661
|
};
|
|
1594
|
-
if (!threadRanges) return cut(await threadMessages(who, threadId, signal));
|
|
1662
|
+
if (!threadRanges) return cut(await threadMessages(who, threadId, signal, include));
|
|
1595
1663
|
const path = await onBoard(who, `/threads/${encodeURIComponent(threadId)}/messages`);
|
|
1596
|
-
const wanted = range.limit
|
|
1664
|
+
const wanted = range.limit ?? Infinity;
|
|
1597
1665
|
const order = range.after === void 0 ? { order: "desc" } : { after: String(range.after) };
|
|
1598
|
-
const
|
|
1666
|
+
const replies = [];
|
|
1667
|
+
let answered = 0;
|
|
1668
|
+
let channel;
|
|
1669
|
+
let thread;
|
|
1599
1670
|
try {
|
|
1600
1671
|
let cursor;
|
|
1601
1672
|
do {
|
|
1673
|
+
const first = cursor === void 0;
|
|
1602
1674
|
const page = await reading(who, path, {
|
|
1603
1675
|
query: {
|
|
1604
1676
|
...order,
|
|
1605
|
-
limit: String(Math.min(PAGE_MAX, wanted -
|
|
1606
|
-
cursor
|
|
1677
|
+
limit: String(Math.min(PAGE_MAX, wanted - replies.length)),
|
|
1678
|
+
cursor,
|
|
1679
|
+
include: first ? ["thread", ...include ? [include] : []] : void 0
|
|
1607
1680
|
},
|
|
1608
1681
|
...signal ? { signal } : {}
|
|
1609
1682
|
});
|
|
1610
|
-
|
|
1683
|
+
answered += page.messages.length;
|
|
1684
|
+
replies.push(...page.messages.filter((message) => message.sequence > 1));
|
|
1685
|
+
if (page.channel) learn(who, channel = page.channel);
|
|
1686
|
+
if (first) thread = page.thread;
|
|
1611
1687
|
cursor = page.cursor ?? void 0;
|
|
1612
|
-
} while (cursor &&
|
|
1688
|
+
} while (cursor && replies.length < wanted);
|
|
1613
1689
|
} catch (error) {
|
|
1614
1690
|
if (![
|
|
1615
1691
|
"after",
|
|
@@ -1617,10 +1693,22 @@ function createVercel(options, environment) {
|
|
|
1617
1693
|
"order"
|
|
1618
1694
|
].some((name) => unknownParameter(error, name))) throw error;
|
|
1619
1695
|
threadRanges = false;
|
|
1620
|
-
return cut(await threadMessages(who, threadId, signal));
|
|
1696
|
+
return cut(await threadMessages(who, threadId, signal, include));
|
|
1621
1697
|
}
|
|
1622
|
-
|
|
1623
|
-
|
|
1698
|
+
if (!thread?.rootMessage) {
|
|
1699
|
+
if (answered > 0) throw new HttpError(502, "remote_error", "Vercel's API answered a range of a thread's messages without the thread and its first message");
|
|
1700
|
+
return {
|
|
1701
|
+
messages: [],
|
|
1702
|
+
channel,
|
|
1703
|
+
end: 0
|
|
1704
|
+
};
|
|
1705
|
+
}
|
|
1706
|
+
replies.sort((a, b) => a.sequence - b.sequence);
|
|
1707
|
+
return {
|
|
1708
|
+
messages: [thread.rootMessage, ...range.limit === void 0 ? replies : range.after === void 0 ? replies.slice(-range.limit) : replies.slice(0, range.limit)],
|
|
1709
|
+
channel,
|
|
1710
|
+
end: thread.messageCount
|
|
1711
|
+
};
|
|
1624
1712
|
}
|
|
1625
1713
|
/** Who reacted with each emoji. The API counts them on the message and lists them apart. */
|
|
1626
1714
|
async function reactors(who, message) {
|
|
@@ -1765,19 +1853,23 @@ function createVercel(options, environment) {
|
|
|
1765
1853
|
} finally {
|
|
1766
1854
|
answered();
|
|
1767
1855
|
}
|
|
1768
|
-
|
|
1769
|
-
|
|
1856
|
+
return keepActors(who, read);
|
|
1857
|
+
}
|
|
1858
|
+
/** Keeps the actors an answer came with (`with=actors`), as if each one it names had been asked for by ID, one the API left out as one it doesn't have. */
|
|
1859
|
+
function keepActors(who, answer) {
|
|
1860
|
+
if (!answer.actors) return answer;
|
|
1861
|
+
const views = new Map(answer.actors.map((view) => [view.id, view]));
|
|
1770
1862
|
const { asked } = namesOf(who);
|
|
1771
1863
|
const at = Date.now();
|
|
1772
1864
|
if (asked.size >= 1e4) asked.clear();
|
|
1773
|
-
for (const { id } of namedIn(
|
|
1865
|
+
for (const { id } of namedIn(answer)) {
|
|
1774
1866
|
const view = views.get(id);
|
|
1775
1867
|
if (view || !asked.has(id) || at - asked.get(id).at > NAMES_FRESH_MS) asked.set(id, {
|
|
1776
1868
|
at,
|
|
1777
1869
|
view: Promise.resolve(view)
|
|
1778
1870
|
});
|
|
1779
1871
|
}
|
|
1780
|
-
return
|
|
1872
|
+
return answer;
|
|
1781
1873
|
}
|
|
1782
1874
|
/**
|
|
1783
1875
|
* An actor as the API names them, asked for by ID with everyone else named in the same turn: the
|
|
@@ -2455,7 +2547,7 @@ function createVercel(options, environment) {
|
|
|
2455
2547
|
const { thread, channel } = found;
|
|
2456
2548
|
if (filters.channel !== void 0 && !inPattern(channel.name, filters.channel)) return none;
|
|
2457
2549
|
const feeds = await heads(who, [channel]);
|
|
2458
|
-
const all = await threadMessages(who, thread.id, signal);
|
|
2550
|
+
const { messages: all } = await threadMessages(who, thread.id, signal);
|
|
2459
2551
|
const labeled = labeledBy(thread, all.find((message) => message.sequence === 1));
|
|
2460
2552
|
let newest = 0;
|
|
2461
2553
|
const messages = [];
|
|
@@ -2573,7 +2665,7 @@ function createVercel(options, environment) {
|
|
|
2573
2665
|
async function read(who, listed, position, filters, signal) {
|
|
2574
2666
|
const path = await onBoard(who, "/changes");
|
|
2575
2667
|
const pages = await Promise.all(listed.map(async (channel) => {
|
|
2576
|
-
const from = position.feeds[channel.id];
|
|
2668
|
+
const from = position.feeds[channel.id] ?? (position.floor !== void 0 ? await feedNear(who, channel, position.floor, signal) : void 0);
|
|
2577
2669
|
const page = await reading(who, path, {
|
|
2578
2670
|
query: {
|
|
2579
2671
|
...feedOf(channel),
|
|
@@ -2592,7 +2684,7 @@ function createVercel(options, environment) {
|
|
|
2592
2684
|
at: from?.at ?? null,
|
|
2593
2685
|
next: page.cursor,
|
|
2594
2686
|
events,
|
|
2595
|
-
behind:
|
|
2687
|
+
behind: page.caughtUp === false && page.cursor !== from?.at
|
|
2596
2688
|
};
|
|
2597
2689
|
}));
|
|
2598
2690
|
const narrow = await narrowOf(who, filters);
|
|
@@ -2642,6 +2734,31 @@ function createVercel(options, environment) {
|
|
|
2642
2734
|
};
|
|
2643
2735
|
}
|
|
2644
2736
|
/**
|
|
2737
|
+
* Where a feed goes on from just after `floor`, out of its newest changes, so a read after a message or a
|
|
2738
|
+
* cursor's time doesn't page through the feed's whole history to get there. Undefined when they're all after
|
|
2739
|
+
* it, or the API reads no newest changes: the feed is read from its oldest change, as before.
|
|
2740
|
+
*/
|
|
2741
|
+
async function feedNear(who, channel, floor, signal) {
|
|
2742
|
+
if (!readsLast) return void 0;
|
|
2743
|
+
try {
|
|
2744
|
+
const at = (await reading(who, await onBoard(who, "/changes"), {
|
|
2745
|
+
query: {
|
|
2746
|
+
...feedOf(channel),
|
|
2747
|
+
last: String(100)
|
|
2748
|
+
},
|
|
2749
|
+
signal
|
|
2750
|
+
})).events.findLast((change) => change.createdAt <= floor)?.cursor;
|
|
2751
|
+
return at === void 0 ? void 0 : {
|
|
2752
|
+
at,
|
|
2753
|
+
skip: 0
|
|
2754
|
+
};
|
|
2755
|
+
} catch (error) {
|
|
2756
|
+
if (!unknownParameter(error, "last")) throw error;
|
|
2757
|
+
readsLast = false;
|
|
2758
|
+
return;
|
|
2759
|
+
}
|
|
2760
|
+
}
|
|
2761
|
+
/**
|
|
2645
2762
|
* Until one of `listed`'s feeds has something after `position` (true), or it's `until` (false). The API's feed is
|
|
2646
2763
|
* one channel's, and only it can wait for what comes next, so this waits on each at once and lets
|
|
2647
2764
|
* the rest go when the first answers with something: a read across channels costs a request a
|
|
@@ -3181,6 +3298,28 @@ function createVercel(options, environment) {
|
|
|
3181
3298
|
...body.skip ? { skip: true } : {}
|
|
3182
3299
|
} });
|
|
3183
3300
|
}
|
|
3301
|
+
/**
|
|
3302
|
+
* A sync the API runs, as board shows it: its channel by name. One whose channel the API no longer
|
|
3303
|
+
* lists is shown with the channel's ID, so it hides no other sync of the list.
|
|
3304
|
+
*/
|
|
3305
|
+
const managedSyncView = async (who, sync) => ({
|
|
3306
|
+
id: sync.id,
|
|
3307
|
+
channel: await channelById(who, sync.channelId).then((channel) => channel.name, (error) => {
|
|
3308
|
+
if (error instanceof HttpError && error.code === "remote_error") return sync.channelId;
|
|
3309
|
+
throw error;
|
|
3310
|
+
}),
|
|
3311
|
+
source: sync.source,
|
|
3312
|
+
...sync.slack ? { slack: {
|
|
3313
|
+
app: sync.slack.app,
|
|
3314
|
+
workspace: sync.slack.workspaceId,
|
|
3315
|
+
channel: sync.slack.channelId,
|
|
3316
|
+
...sync.slack.name ? { name: sync.slack.name } : {}
|
|
3317
|
+
} } : {},
|
|
3318
|
+
state: sync.state,
|
|
3319
|
+
...sync.reason ? { reason: sync.reason } : {},
|
|
3320
|
+
by: sync.createdBy,
|
|
3321
|
+
createdAt: iso(sync.createdAt)
|
|
3322
|
+
});
|
|
3184
3323
|
/** This deployment's own: what its config's watchers run as. */
|
|
3185
3324
|
const deployment = { profile: null };
|
|
3186
3325
|
/** This board's config's watchers, which run here when the API wakes it. */
|
|
@@ -3371,6 +3510,15 @@ function createVercel(options, environment) {
|
|
|
3371
3510
|
if (TASK_CONFLICTS.has(code)) return new HttpError(409, code, message);
|
|
3372
3511
|
return error;
|
|
3373
3512
|
}
|
|
3513
|
+
/** Finishes an upload. The API says which check refused it, and bytes that aren't the type their name says are the uploader's to fix. */
|
|
3514
|
+
async function completeUpload(who, id) {
|
|
3515
|
+
try {
|
|
3516
|
+
return (await api(who, "POST", await onBoard(who, `/attachments/${encodeURIComponent(id)}/complete`))).attachment;
|
|
3517
|
+
} catch (error) {
|
|
3518
|
+
if (error instanceof HttpError && error.code === "attachment_mismatch" && reasons.get(error) === "media_type") throw new HttpError(422, "attachment_type_mismatch", "the file's bytes aren't the image or video type its name says");
|
|
3519
|
+
throw error;
|
|
3520
|
+
}
|
|
3521
|
+
}
|
|
3374
3522
|
/** One write to a task route, `/tasks` and `path` after it, with an operation ID of its own. */
|
|
3375
3523
|
async function taskWrite(who, path, body, about = {}) {
|
|
3376
3524
|
try {
|
|
@@ -3644,7 +3792,7 @@ function createVercel(options, environment) {
|
|
|
3644
3792
|
const id = team?.startsWith("team_") ? team : (await self(who)).teamId;
|
|
3645
3793
|
return {
|
|
3646
3794
|
version: VERSION,
|
|
3647
|
-
url: `${origin}/v1/messageboard${await
|
|
3795
|
+
url: `${origin}/v1/messageboard${typeof found?.board.id === "string" ? `/boards/${encodeURIComponent(found.board.id)}` : await boardById(who)}?teamId=${encodeURIComponent(id)}`,
|
|
3648
3796
|
audience: origin,
|
|
3649
3797
|
team_id: id,
|
|
3650
3798
|
project_id: null,
|
|
@@ -3882,14 +4030,22 @@ function createVercel(options, environment) {
|
|
|
3882
4030
|
},
|
|
3883
4031
|
async message(caller, { id, after, limit }, signal) {
|
|
3884
4032
|
const who = whoOf(caller);
|
|
3885
|
-
const
|
|
4033
|
+
const missing = () => notFound(`message not found: ${id}`, "message_not_found");
|
|
4034
|
+
const at = locate(id);
|
|
4035
|
+
if (!at) throw missing();
|
|
3886
4036
|
const from = after === void 0 ? void 0 : locate(after);
|
|
3887
|
-
if (after !== void 0 && from?.threadId !==
|
|
3888
|
-
const
|
|
4037
|
+
if (after !== void 0 && from?.threadId !== at.threadId) throw new HttpError(400, "invalid_request", `after: ${after} isn't a message of this thread`);
|
|
4038
|
+
const read = await (from !== void 0 || limit !== void 0 ? threadRange(who, at.threadId, {
|
|
3889
4039
|
...from ? { after: from.sequence } : {},
|
|
3890
4040
|
...limit !== void 0 ? { limit } : {}
|
|
3891
|
-
}, signal) :
|
|
3892
|
-
|
|
4041
|
+
}, signal, "channel") : threadMessages(who, at.threadId, signal, "channel")).catch((error) => {
|
|
4042
|
+
if (error instanceof HttpError && (error.code === "thread_not_found" || error.code === "message_not_found")) throw missing();
|
|
4043
|
+
throw error;
|
|
4044
|
+
});
|
|
4045
|
+
const [root, ...replies] = read.messages;
|
|
4046
|
+
if (!root || at.sequence > read.end) throw missing();
|
|
4047
|
+
const { channel } = read;
|
|
4048
|
+
if (!channel) throw new HttpError(502, "remote_error", "Vercel's API answered a thread's messages without their channel");
|
|
3893
4049
|
const [message, ...shown] = await Promise.all([root, ...replies].map((each) => view(who, each, channel.name)));
|
|
3894
4050
|
return {
|
|
3895
4051
|
message,
|
|
@@ -3920,8 +4076,7 @@ function createVercel(options, environment) {
|
|
|
3920
4076
|
redirect: "error"
|
|
3921
4077
|
});
|
|
3922
4078
|
if (!put.ok) throw new HttpError(502, "upload_failed", `the upload to Vercel's storage answered ${put.status}`);
|
|
3923
|
-
|
|
3924
|
-
return { attachment: fileOf(attachment) };
|
|
4079
|
+
return { attachment: fileOf(await completeUpload(who, started.attachment.id)) };
|
|
3925
4080
|
},
|
|
3926
4081
|
async uploadStart(caller, { name, type, size, sha256 }) {
|
|
3927
4082
|
const who = whoOf(caller);
|
|
@@ -3942,8 +4097,7 @@ function createVercel(options, environment) {
|
|
|
3942
4097
|
},
|
|
3943
4098
|
async uploadFinish(caller, { id }) {
|
|
3944
4099
|
const who = whoOf(caller);
|
|
3945
|
-
|
|
3946
|
-
return { attachment: fileOf(attachment) };
|
|
4100
|
+
return { attachment: fileOf(await completeUpload(who, id)) };
|
|
3947
4101
|
},
|
|
3948
4102
|
async attachment(caller, { id }, signal) {
|
|
3949
4103
|
const who = whoOf(caller);
|
|
@@ -3979,15 +4133,19 @@ function createVercel(options, environment) {
|
|
|
3979
4133
|
signal
|
|
3980
4134
|
});
|
|
3981
4135
|
} else {
|
|
3982
|
-
const
|
|
3983
|
-
|
|
4136
|
+
const to = locate(input.re);
|
|
4137
|
+
if (!to) throw notFound(`message not found: ${input.re}`, "message_not_found");
|
|
3984
4138
|
const after = input.after === void 0 ? void 0 : locate(input.after);
|
|
3985
|
-
if (after !== void 0 && after?.threadId !==
|
|
4139
|
+
if (after !== void 0 && after?.threadId !== to.threadId) {
|
|
3986
4140
|
const landed = clientId ? await api(who, "GET", await onBoard(who, `/posts/${encodeURIComponent(clientId)}`), { signal }).catch(() => null) : null;
|
|
3987
|
-
if (landed?.thread.id ===
|
|
4141
|
+
if (landed?.thread.id === to.threadId) return { message: await view(who, landed.message, (await channelById(who, landed.thread.channelId)).name) };
|
|
3988
4142
|
throw badRequest(`after: ${input.after} isn't in ${input.re}'s thread`, "invalid_after");
|
|
3989
4143
|
}
|
|
3990
|
-
|
|
4144
|
+
const reply = await api(who, "POST", await onBoard(who, `/threads/${encodeURIComponent(to.threadId)}/messages`), {
|
|
4145
|
+
query: {
|
|
4146
|
+
include: "channel",
|
|
4147
|
+
...namesById ? { with: "actors" } : {}
|
|
4148
|
+
},
|
|
3991
4149
|
body: {
|
|
3992
4150
|
operationId: operationId(),
|
|
3993
4151
|
text: input.text,
|
|
@@ -4001,8 +4159,13 @@ function createVercel(options, environment) {
|
|
|
4001
4159
|
signal
|
|
4002
4160
|
}).catch((error) => {
|
|
4003
4161
|
if (error instanceof HttpError && error.code === "newer_message") throw new HttpError(409, "newer_message", `a message came after ${input.after}`);
|
|
4162
|
+
if (error instanceof HttpError && (error.code === "thread_not_found" || error.code === "invalid_reply")) throw notFound(`message not found: ${input.re}`, "message_not_found");
|
|
4004
4163
|
throw error;
|
|
4005
4164
|
});
|
|
4165
|
+
if ("text" in reply.message) keepActors(who, reply);
|
|
4166
|
+
if (reply.channel) learn(who, reply.channel);
|
|
4167
|
+
channelName = (reply.channel ?? (reply.thread.channelId !== void 0 ? await channelById(who, reply.thread.channelId) : (await messageIn(who, input.re, signal)).channel)).name;
|
|
4168
|
+
made = reply;
|
|
4006
4169
|
}
|
|
4007
4170
|
channelName = await landedIn(who, made.thread.channelId, channelName, clientId);
|
|
4008
4171
|
return { message: await view(who, "text" in made.message ? made.message : await sent(who, made.message, input), channelName) };
|
|
@@ -4223,6 +4386,39 @@ function createVercel(options, environment) {
|
|
|
4223
4386
|
canceled
|
|
4224
4387
|
};
|
|
4225
4388
|
},
|
|
4389
|
+
async createSync(caller, input, signal) {
|
|
4390
|
+
const who = whoOf(caller);
|
|
4391
|
+
const channel = await channelNamed(who, input.channel);
|
|
4392
|
+
if (!channel) throw notFound(`channel not found: ${input.channel}`, "channel_not_found");
|
|
4393
|
+
const { sync } = await api(who, "POST", await onBoard(who, "/syncs"), {
|
|
4394
|
+
body: {
|
|
4395
|
+
operationId: operationId(),
|
|
4396
|
+
channelId: channel.id,
|
|
4397
|
+
source: input.source,
|
|
4398
|
+
...input.slack ? { slack: input.slack } : {}
|
|
4399
|
+
},
|
|
4400
|
+
signal
|
|
4401
|
+
});
|
|
4402
|
+
return { sync: await managedSyncView(who, sync) };
|
|
4403
|
+
},
|
|
4404
|
+
async syncs(caller, { channel }, signal) {
|
|
4405
|
+
const who = whoOf(caller);
|
|
4406
|
+
const found = channel === void 0 ? void 0 : await channelNamed(who, channel);
|
|
4407
|
+
if (found === null) return { syncs: [] };
|
|
4408
|
+
const { syncs } = await api(who, "GET", await onBoard(who, "/syncs"), {
|
|
4409
|
+
query: found ? { channelId: found.id } : {},
|
|
4410
|
+
signal
|
|
4411
|
+
});
|
|
4412
|
+
return { syncs: await Promise.all(syncs.map((sync) => managedSyncView(who, sync))) };
|
|
4413
|
+
},
|
|
4414
|
+
async removeSync(caller, { id }, signal) {
|
|
4415
|
+
const who = whoOf(caller);
|
|
4416
|
+
const { sync } = await api(who, "POST", await onBoard(who, `/syncs/${encodeURIComponent(id)}/remove`), {
|
|
4417
|
+
body: { operationId: operationId() },
|
|
4418
|
+
signal
|
|
4419
|
+
});
|
|
4420
|
+
return { sync: await managedSyncView(who, sync) };
|
|
4421
|
+
},
|
|
4226
4422
|
async tasks(caller, query, signal) {
|
|
4227
4423
|
const who = whoOf(caller);
|
|
4228
4424
|
const limit = query.limit ?? 50;
|
|
@@ -4829,7 +5025,7 @@ function createVercel(options, environment) {
|
|
|
4829
5025
|
const who = { profile: null };
|
|
4830
5026
|
const team = await teamId();
|
|
4831
5027
|
const id = team?.startsWith("team_") ? team : (await self(who)).teamId;
|
|
4832
|
-
const board = await
|
|
5028
|
+
const board = await boardById(who);
|
|
4833
5029
|
const url = `${origin}/v1/messageboard${board}?teamId=${encodeURIComponent(id)}`;
|
|
4834
5030
|
return {
|
|
4835
5031
|
url,
|
|
@@ -5185,6 +5381,7 @@ async function inputOf(name, request, url, params) {
|
|
|
5185
5381
|
case "posted":
|
|
5186
5382
|
case "synced":
|
|
5187
5383
|
case "cancelSchedule":
|
|
5384
|
+
case "removeSync":
|
|
5188
5385
|
case "unblockTask":
|
|
5189
5386
|
case "reopenTask":
|
|
5190
5387
|
case "schema":
|
|
@@ -5193,6 +5390,7 @@ async function inputOf(name, request, url, params) {
|
|
|
5193
5390
|
case "channelMessages": return ChannelMessagesQuery.parse(queryObject(url));
|
|
5194
5391
|
case "threads": return ThreadsQuery.parse(queryObject(url));
|
|
5195
5392
|
case "schedules": return SchedulesQuery.parse(queryObject(url));
|
|
5393
|
+
case "syncs": return ManagedSyncsQuery.parse(queryObject(url));
|
|
5196
5394
|
case "matches": return MatchesQuery.parse(queryObject(url));
|
|
5197
5395
|
case "events": {
|
|
5198
5396
|
const query = EventsQuery.parse(queryObject(url));
|
|
@@ -5206,6 +5404,7 @@ async function inputOf(name, request, url, params) {
|
|
|
5206
5404
|
case "post": return PostBody.parse(await body());
|
|
5207
5405
|
case "createChannel": return CreateChannelBody.parse(await body());
|
|
5208
5406
|
case "schedule": return ScheduleBody.parse(await body());
|
|
5407
|
+
case "createSync": return ManagedSyncBody.parse(await body());
|
|
5209
5408
|
case "tasks": return TasksQuery.parse(queryObject(url));
|
|
5210
5409
|
case "createTask": return CreateTaskBody.parse(await body());
|
|
5211
5410
|
case "createdTasks": return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as Board, p as BoardOptions } from "./backend-
|
|
2
|
-
import "./exports-
|
|
1
|
+
import { f as Board, p as BoardOptions } from "./backend-9H57DlQt.mjs";
|
|
2
|
+
import "./exports-Bh09j6Bd.mjs";
|
|
3
3
|
//#region src/server/index.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* The handle on a board. Without a `backend`, it's Vercel's board for your team, the one `name`
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $ as InboxNextQuery, $t as
|
|
2
|
-
import { i as Claims, r as CallerRequest } from "./auth-
|
|
3
|
-
import { C as Protocol, D as SandboxPolicyOptions, E as SandboxPolicy, O as SandboxRule, S as Method, T as SandboxMatcher, _ as Middleware, a as Identity, b as WritePatch, c as SelfCaller, d as AsOptions, f as Board, g as DroppedError, h as WatcherContext, i as Caller, l as Subscription, m as Watcher, n as BackendRoute, o as InboxDelivery, p as BoardOptions, r as BoardBinding, s as ProtocolMethods, t as Backend, u as VerifiedCaller, v as MiddlewareContext, w as SandboxMatch, x as WriteSource, y as Write } from "./backend-
|
|
4
|
-
import { C as MentionedActor, S as Mentioned, _ as TaskOptions, a as EventsOptions, b as Written, c as Filters, d as PostOptions, f as ProfileOption, g as TaskInBatch, h as ScheduleTiming, l as HeldTask, m as ScheduleOptions, n as BoardError, o as EventsState, p as ReplyOptions, r as ClaimedTask, s as ExplainPrincipal, u as NewTaskOptions, v as UploadInput, x as duration, y as WaitOptions } from "./client-
|
|
5
|
-
import { t as HttpError } from "./errors-
|
|
6
|
-
import { n as TasksInChunksError, r as createTasksInChunks, t as TaskBatches } from "./exports-
|
|
1
|
+
import { $ as InboxNextQuery, $t as SyncFindQuery, A as CreateTasksInput, At as RenewTaskBody, B as Explanation, Bt as SchedulesQueryOutput, C as ClaimTaskBody, Cn as TypingResult, Ct as REGISTERED_WATCHERS_MAX, D as CreateTaskBody, Dn as UploadTicket, Dt as RegisterInput, E as CreateGrantsBody, En as UploadStartBody, Et as RegisterBody, F as EditBody, Ft as ScheduleBodyOutput, G as GrantCan, Gt as SourceJoinBody, H as FiltersInput, Ht as SchemaInput, I as EventsPage, It as ScheduleInput, J as GrantWriteOptions, Jt as SourceReadQuery, K as GrantInput, Kt as SourceMessage, L as EventsQuery, Lt as ScheduleView, M as DeleteBody, Mt as RevokeGrantBody, N as Discovery, Nt as RouteName, O as CreateTaskInput, On as routes, Ot as RegistrationView, P as EVENTS_LAST_MAX, Pt as ScheduleBody, Q as InboxItem, Qt as SyncFindInput, R as EventsQueryInput, Rt as SchedulesQuery, S as ClaimReadyTaskInput, Sn as TypingBody, St as PrincipalView, T as CreateChannelBody, Tn as UpdateGrantInput, Tt as Ref, U as GRANT_BATCH_MAX, Ut as SchemaView, V as FailTaskBody, Vt as SchemaBody, W as GrantBody, Wt as SourceJoin, X as InboxAckBody, Xt as SyncCopiesQuery, Y as INBOX_EVENT_ID_MAX, Yn as Attachment, Yt as SyncBody, Z as InboxEntry, Zt as SyncCopiesView, _ as ChannelView, _n as ThreadSummaryView, _t as MessagesPage, a as ActorsQueryInput, an as SyncThreadView, at as LinkView, b as ChannelsQueryInput, bn as ThreadsQuery, bt as PostInput, c as BlockTaskBody, cn as THREADS_LIMIT_MAX, ct as ManagedSyncBody, d as CHANNELS_LIMIT_DEFAULT, dn as TaskView, dt as ManagedSyncsQuery, en as SyncFindView, et as InboxPushBody, f as CHANNELS_LIMIT_MAX, fn as TasksPage, ft as ManagedSyncsQueryInput, g as ChannelMessagesQueryInput, gn as ThreadQueryInput, gt as MessageView, h as ChannelMessagesQuery, hn as ThreadQuery, ht as Me, i as ActorsQuery, in as SyncReceiptInput, it as LabelBody, j as CreatedTasksQuery, jt as ResolvedSyncTarget, k as CreateTasksBody, kt as ReleaseTaskBody, l as BlockView, ln as TaskClaim, lt as ManagedSyncInput, m as CancelTaskBody, mn as TasksQueryInput, mt as MatchesQuery, n as AckBody, nn as SyncImportInput, nt as LABEL_CONDITIONS_MAX, o as ApiError, on as SyncedView, ot as LinkedQuery, p as CanAt, pn as TasksQuery, pt as MatchView, q as GrantView, qt as SourceRead, r as ActorView, rn as SyncReceiptBody, rt as LEASE_DEFAULT_S, s as AssignTaskBody, sn as THREADS_LIMIT_DEFAULT, st as MANAGED_SYNC_SOURCES, t as ACTORS_BY_ID_MAX, tn as SyncImportBody, tt as InboxQuery, u as BoardEventView, un as TaskNeedsBody, ut as ManagedSyncView, v as ChannelsPage, vn as ThreadView, vt as ParsedFilters, w as CompleteTaskBody, wn as UpdateGrantBody, wt as ReactBody, x as ClaimReadyTaskBody, xn as ThreadsQueryInput, xt as PrincipalInput, y as ChannelsQuery, yn as ThreadsPage, yt as PostBody, z as ExplainQuery, zt as SchedulesQueryInput } from "./routes-D5FtKOP_.mjs";
|
|
2
|
+
import { i as Claims, r as CallerRequest } from "./auth-DcWTzrHz.mjs";
|
|
3
|
+
import { C as Protocol, D as SandboxPolicyOptions, E as SandboxPolicy, O as SandboxRule, S as Method, T as SandboxMatcher, _ as Middleware, a as Identity, b as WritePatch, c as SelfCaller, d as AsOptions, f as Board, g as DroppedError, h as WatcherContext, i as Caller, l as Subscription, m as Watcher, n as BackendRoute, o as InboxDelivery, p as BoardOptions, r as BoardBinding, s as ProtocolMethods, t as Backend, u as VerifiedCaller, v as MiddlewareContext, w as SandboxMatch, x as WriteSource, y as Write } from "./backend-9H57DlQt.mjs";
|
|
4
|
+
import { C as MentionedActor, S as Mentioned, _ as TaskOptions, a as EventsOptions, b as Written, c as Filters, d as PostOptions, f as ProfileOption, g as TaskInBatch, h as ScheduleTiming, l as HeldTask, m as ScheduleOptions, n as BoardError, o as EventsState, p as ReplyOptions, r as ClaimedTask, s as ExplainPrincipal, u as NewTaskOptions, v as UploadInput, x as duration, y as WaitOptions } from "./client-BUPyzzFt.mjs";
|
|
5
|
+
import { t as HttpError } from "./errors-CwObkpSn.mjs";
|
|
6
|
+
import { n as TasksInChunksError, r as createTasksInChunks, t as TaskBatches } from "./exports-Bh09j6Bd.mjs";
|
|
7
7
|
import { n as block } from "./blocks-DGvh2alZ.mjs";
|
|
8
8
|
//#region src/server/index.default.d.ts
|
|
9
9
|
/**
|
|
@@ -14,4 +14,4 @@ import { n as block } from "./blocks-DGvh2alZ.mjs";
|
|
|
14
14
|
*/
|
|
15
15
|
export declare function board(options?: BoardOptions): Board;
|
|
16
16
|
//#endregion
|
|
17
|
-
export { type ACTORS_BY_ID_MAX, type AckBody, type ActorView, type ActorsQuery, type ActorsQueryInput, type ApiError, type AsOptions, type AssignTaskBody, type Attachment, type Backend, type BackendRoute, type BlockTaskBody, type BlockView, type Board, type BoardBinding, BoardError, type BoardEventView, type BoardOptions, type CHANNELS_LIMIT_DEFAULT, type CHANNELS_LIMIT_MAX, type Caller, type CallerRequest, type CanAt, type CancelTaskBody, type ChannelMessagesQuery, type ChannelMessagesQueryInput, type ChannelView, type ChannelsPage, type ChannelsQuery, type ChannelsQueryInput, type ClaimReadyTaskBody, type ClaimReadyTaskInput, type ClaimTaskBody, type ClaimedTask, type Claims, type CompleteTaskBody, type CreateChannelBody, type CreateGrantsBody, type CreateTaskBody, type CreateTaskInput, type CreateTasksBody, type CreateTasksInput, type CreatedTasksQuery, type DeleteBody, type Discovery, DroppedError, type EVENTS_LAST_MAX, type EditBody, type EventsOptions, type EventsPage, type EventsQuery, type EventsQueryInput, type EventsState, type ExplainPrincipal, type ExplainQuery, type Explanation, type FailTaskBody, type Filters, type FiltersInput, type GRANT_BATCH_MAX, type GrantBody, type GrantCan, type GrantInput, type GrantView, type GrantWriteOptions, type HeldTask, HttpError, type INBOX_EVENT_ID_MAX, type Identity, type InboxAckBody, type InboxDelivery, type InboxEntry, type InboxItem, type InboxNextQuery, type InboxPushBody, type InboxQuery, type LABEL_CONDITIONS_MAX, type LEASE_DEFAULT_S, type LabelBody, type LinkView, type LinkedQuery, type MatchView, type MatchesQuery, type Me, type Mentioned, type MentionedActor, type MessageView, type MessagesPage, type Method, type Middleware, type MiddlewareContext, type NewTaskOptions, type ParsedFilters, type PostBody, type PostInput, type PostOptions, type PrincipalInput, type PrincipalView, type ProfileOption, type Protocol, type ProtocolMethods, type REGISTERED_WATCHERS_MAX, type ReactBody, type Ref, type RegisterBody, type RegisterInput, type RegistrationView, type ReleaseTaskBody, type RenewTaskBody, type ReplyOptions, type ResolvedSyncTarget, type RevokeGrantBody, type RouteName, type SandboxMatch, type SandboxMatcher, type SandboxPolicy, type SandboxPolicyOptions, type SandboxRule, type ScheduleBody, type ScheduleBodyOutput, type ScheduleInput, type ScheduleOptions, type ScheduleTiming, type ScheduleView, type SchedulesQuery, type SchedulesQueryInput, type SchedulesQueryOutput, type SchemaBody, type SchemaInput, type SchemaView, type SelfCaller, type SourceJoin, type SourceJoinBody, type SourceMessage, type SourceRead, type SourceReadQuery, type Subscription, type SyncBody, type SyncCopiesQuery, type SyncCopiesView, type SyncFindInput, type SyncFindQuery, type SyncFindView, type SyncImportBody, type SyncImportInput, type SyncReceiptBody, type SyncReceiptInput, type SyncThreadView, type SyncedView, type THREADS_LIMIT_DEFAULT, type THREADS_LIMIT_MAX, type TaskBatches, type TaskClaim, type TaskInBatch, type TaskNeedsBody, type TaskOptions, type TaskView, TasksInChunksError, type TasksPage, type TasksQuery, type TasksQueryInput, type ThreadQuery, type ThreadQueryInput, type ThreadSummaryView, type ThreadView, type ThreadsPage, type ThreadsQuery, type ThreadsQueryInput, type TypingBody, type TypingResult, type UpdateGrantBody, type UpdateGrantInput, type UploadInput, type UploadStartBody, type UploadTicket, type VerifiedCaller, type WaitOptions, type Watcher, type WatcherContext, type Write, type WritePatch, type WriteSource, type Written, block, createTasksInChunks, duration, type routes };
|
|
17
|
+
export { type ACTORS_BY_ID_MAX, type AckBody, type ActorView, type ActorsQuery, type ActorsQueryInput, type ApiError, type AsOptions, type AssignTaskBody, type Attachment, type Backend, type BackendRoute, type BlockTaskBody, type BlockView, type Board, type BoardBinding, BoardError, type BoardEventView, type BoardOptions, type CHANNELS_LIMIT_DEFAULT, type CHANNELS_LIMIT_MAX, type Caller, type CallerRequest, type CanAt, type CancelTaskBody, type ChannelMessagesQuery, type ChannelMessagesQueryInput, type ChannelView, type ChannelsPage, type ChannelsQuery, type ChannelsQueryInput, type ClaimReadyTaskBody, type ClaimReadyTaskInput, type ClaimTaskBody, type ClaimedTask, type Claims, type CompleteTaskBody, type CreateChannelBody, type CreateGrantsBody, type CreateTaskBody, type CreateTaskInput, type CreateTasksBody, type CreateTasksInput, type CreatedTasksQuery, type DeleteBody, type Discovery, DroppedError, type EVENTS_LAST_MAX, type EditBody, type EventsOptions, type EventsPage, type EventsQuery, type EventsQueryInput, type EventsState, type ExplainPrincipal, type ExplainQuery, type Explanation, type FailTaskBody, type Filters, type FiltersInput, type GRANT_BATCH_MAX, type GrantBody, type GrantCan, type GrantInput, type GrantView, type GrantWriteOptions, type HeldTask, HttpError, type INBOX_EVENT_ID_MAX, type Identity, type InboxAckBody, type InboxDelivery, type InboxEntry, type InboxItem, type InboxNextQuery, type InboxPushBody, type InboxQuery, type LABEL_CONDITIONS_MAX, type LEASE_DEFAULT_S, type LabelBody, type LinkView, type LinkedQuery, type MANAGED_SYNC_SOURCES, type ManagedSyncBody, type ManagedSyncInput, type ManagedSyncView, type ManagedSyncsQuery, type ManagedSyncsQueryInput, type MatchView, type MatchesQuery, type Me, type Mentioned, type MentionedActor, type MessageView, type MessagesPage, type Method, type Middleware, type MiddlewareContext, type NewTaskOptions, type ParsedFilters, type PostBody, type PostInput, type PostOptions, type PrincipalInput, type PrincipalView, type ProfileOption, type Protocol, type ProtocolMethods, type REGISTERED_WATCHERS_MAX, type ReactBody, type Ref, type RegisterBody, type RegisterInput, type RegistrationView, type ReleaseTaskBody, type RenewTaskBody, type ReplyOptions, type ResolvedSyncTarget, type RevokeGrantBody, type RouteName, type SandboxMatch, type SandboxMatcher, type SandboxPolicy, type SandboxPolicyOptions, type SandboxRule, type ScheduleBody, type ScheduleBodyOutput, type ScheduleInput, type ScheduleOptions, type ScheduleTiming, type ScheduleView, type SchedulesQuery, type SchedulesQueryInput, type SchedulesQueryOutput, type SchemaBody, type SchemaInput, type SchemaView, type SelfCaller, type SourceJoin, type SourceJoinBody, type SourceMessage, type SourceRead, type SourceReadQuery, type Subscription, type SyncBody, type SyncCopiesQuery, type SyncCopiesView, type SyncFindInput, type SyncFindQuery, type SyncFindView, type SyncImportBody, type SyncImportInput, type SyncReceiptBody, type SyncReceiptInput, type SyncThreadView, type SyncedView, type THREADS_LIMIT_DEFAULT, type THREADS_LIMIT_MAX, type TaskBatches, type TaskClaim, type TaskInBatch, type TaskNeedsBody, type TaskOptions, type TaskView, TasksInChunksError, type TasksPage, type TasksQuery, type TasksQueryInput, type ThreadQuery, type ThreadQueryInput, type ThreadSummaryView, type ThreadView, type ThreadsPage, type ThreadsQuery, type ThreadsQueryInput, type TypingBody, type TypingResult, type UpdateGrantBody, type UpdateGrantInput, type UploadInput, type UploadStartBody, type UploadTicket, type VerifiedCaller, type WaitOptions, type Watcher, type WatcherContext, type Write, type WritePatch, type WriteSource, type Written, block, createTasksInChunks, duration, type routes };
|