@vercel/board 0.33.0 → 0.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/{access-N3XmkKXg.mjs → access-CdBcYPQH.mjs} +169 -12
  2. package/dist/access.d.mts +3 -3
  3. package/dist/access.mjs +5 -5
  4. package/dist/{actors-ihyN47OV.mjs → actors-MrIEr9LI.mjs} +2 -2
  5. package/dist/auth-DjoJygbG.mjs +599 -0
  6. package/dist/{auth-D6z3rMNj.d.mts → auth-aaoKt5DK.d.mts} +128 -9
  7. package/dist/backend-local.d.mts +1 -1
  8. package/dist/backend-local.mjs +1 -1
  9. package/dist/{backend-CWpyR1A7.d.mts → backend-u1sVvybh.d.mts} +30 -7
  10. package/dist/{chat-provider-DJpFUaFv.d.mts → chat-provider-De0iDnUB.d.mts} +2 -2
  11. package/dist/cli-commands.d.mts +1 -1
  12. package/dist/cli-commands.mjs +1 -1
  13. package/dist/cli-embedded.d.mts +2 -2
  14. package/dist/cli-embedded.mjs +1 -1
  15. package/dist/cli.mjs +5 -5
  16. package/dist/{commands-CHoMl06v.mjs → commands-B8oZEByR.mjs} +25 -51
  17. package/dist/{commands-BOBQHVqM.d.mts → commands-BkVMdXP1.d.mts} +0 -6
  18. package/dist/{conformance-qKmGLTAT.mjs → conformance-gqYBkXFS.mjs} +76 -83
  19. package/dist/conformance.d.mts +1 -1
  20. package/dist/conformance.mjs +1 -1
  21. package/dist/{engine-JxgZiikU.mjs → engine-rtOVWsiF.mjs} +2 -2
  22. package/dist/{errors-Pk0XV1hK.mjs → errors-D8ifv16L.mjs} +19 -4
  23. package/dist/{exports-gHDHlg0i.mjs → exports-Bx2dGpzr.mjs} +55 -10
  24. package/dist/exports-uwRl5qIj.d.mts +4 -0
  25. package/dist/{index-CXvvYNYj.d.mts → index-D6mK0Ial.d.mts} +2 -2
  26. package/dist/index.d.mts +6 -6
  27. package/dist/index.mjs +4 -4
  28. package/dist/index.node.d.mts +6 -6
  29. package/dist/index.node.mjs +3 -3
  30. package/dist/inspect/app.js +31 -31
  31. package/dist/{local-BbLjA5vI.mjs → local-CPz22MQ8.mjs} +1981 -1574
  32. package/dist/{main-CQpCZJFw.mjs → main-DScDKwQN.mjs} +45 -38
  33. package/dist/{middleware-BU7rVi9F.mjs → middleware-BjYpk4yq.mjs} +1 -1
  34. package/dist/provider-hB8QNrwm.d.mts +1031 -0
  35. package/dist/{provider-BlzUvcM9.d.mts → routes-De4W6lEs.d.mts} +2439 -2469
  36. package/dist/{serve-D8_W4UN6.mjs → serve-B1noQRkn.mjs} +4 -4
  37. package/dist/{server-BiIUXWbU.mjs → server-Ov6GBJ8j.mjs} +7 -7
  38. package/dist/{serving-D7rcUtSC.mjs → serving-2s7lqSBS.mjs} +1 -1
  39. package/dist/sync-chat-sdk.d.mts +2 -2
  40. package/dist/sync-github.d.mts +2 -2
  41. package/dist/sync-linear.d.mts +3 -2
  42. package/dist/sync-slack.d.mts +3 -3
  43. package/dist/sync.d.mts +2 -2
  44. package/dist/{targets-CknPGGVi.mjs → targets-aMdbp84G.mjs} +98 -10
  45. package/dist/{tokens-DPKjl3jf.mjs → tokens-LHLrnV_P.mjs} +2 -2
  46. package/docs/01-board/01-mounting.md +5 -3
  47. package/docs/01-board/03-identity.md +14 -13
  48. package/docs/01-board/07-schedules.md +1 -1
  49. package/docs/01-board/09-access.md +140 -59
  50. package/docs/03-guides/03-ci.md +15 -15
  51. package/docs/03-guides/05-agent-factory.md +5 -6
  52. package/docs/04-reference/01-cli.md +9 -16
  53. package/docs/04-reference/02-board.md +19 -8
  54. package/docs/04-reference/03-http.md +20 -13
  55. package/docs/04-reference/05-conformance.md +1 -1
  56. package/package.json +1 -1
  57. package/dist/auth-r-_PeZyw.mjs +0 -277
  58. package/dist/exports-BuKjVq2t.d.mts +0 -4
  59. package/dist/folds-DjFTiqIM.d.mts +0 -552
@@ -1,8 +1,8 @@
1
- import { _ as fileSize, h as IMPORT_BYTES_MAX, p as ATTACHMENT_BYTES_MAX, r as badRequest, s as notFound, t as HttpError, y as typeOf } from "./errors-Pk0XV1hK.mjs";
1
+ import { _ as fileSize, h as IMPORT_BYTES_MAX, p as ATTACHMENT_BYTES_MAX, r as badRequest, s as notFound, t as HttpError, y as typeOf } from "./errors-D8ifv16L.mjs";
2
2
  import { a as ChannelPath, b as toStorable, d as MESSAGE_TEXT_MAX } from "./schemas-BG205xds.mjs";
3
3
  import { l as isThreadTarget, s as channelOf } from "./external-CYe424fO.mjs";
4
4
  import { t as canonicalEmoji } from "./emoji-CTLpvH-A.mjs";
5
- import { i as waitUntil, o as derivedId, t as DroppedError } from "./middleware-BU7rVi9F.mjs";
5
+ import { i as waitUntil, o as derivedId, t as DroppedError } from "./middleware-BjYpk4yq.mjs";
6
6
  import { n as replaceMentions } from "./mentions-CB6ShY4R.mjs";
7
7
  import { t as afterRetry } from "./attempts-HXcskN1w.mjs";
8
8
  import { a as immutable, d as routesFor, l as UnreadableError, n as SyncOverrides, o as ReceivedEvent, s as ResolvedTarget, u as channelMissing } from "./events-IQg0k281.mjs";
@@ -277,12 +277,27 @@ function createBoardClient(options) {
277
277
  /** Stops a schedule: yours, or any with manage in its channel. `canceled` is false when it was already done or canceled. */
278
278
  cancelSchedule: (id) => call("POST", `/schedules/${path(id)}/cancel`, { body: {} }),
279
279
  /**
280
- * Lets in callers with an OIDC token from `issuer` that carries every one of `claims`, to do
281
- * what `can` says (read, post, react, and label everywhere when left out). Setting the same
282
- * issuer and claims again changes its `can`: `created` says which. Needs manage in every channel.
280
+ * A new grant: `principals` may do what `can` says, a map from channel pattern to permissions
281
+ * (`[]` for none). The same principals again are another grant. At each channel, the most
282
+ * specific pattern among the grants that name a caller decides, then the closest principal,
283
+ * and grants tied there add up. Needs manage at each pattern `can` names.
283
284
  */
284
285
  createGrant: (input) => call("POST", "/grants", { body: input }),
285
- /** The board's grants. Needs manage in every channel. */
286
+ /** Adds and removes principals (by who they are, environments aside), or replaces its `can`. Needs what `checkGrantChange` says, for the grant as it was and as it'd be. */
287
+ updateGrant: (id, input) => call("PATCH", `/grants/${path(id)}`, { body: input }),
288
+ /**
289
+ * Which grants decide `channel`, and what they give: for you, or with manage at `*`, for the
290
+ * principal `principal` names (`{ user }`, `{ project, environment }`, `{ github, workflow,
291
+ * branch, event }`, or `{ oidc, claims }`).
292
+ */
293
+ explain: (channel, principal = {}) => {
294
+ const { claims, ...rest } = principal;
295
+ const params = new URLSearchParams({ channel });
296
+ for (const [name, value] of Object.entries(rest)) if (value !== void 0) params.set(name, value);
297
+ for (const [name, value] of Object.entries(claims ?? {})) params.append("claim", `${name}=${value}`);
298
+ return call("GET", `/grants/explain?${params}`);
299
+ },
300
+ /** The board's grants. Needs manage at `*`, or a team owner. */
286
301
  grants: async () => (await call("GET", "/grants")).grants,
287
302
  /** `revoked` is false when it was already gone. Its principals' next requests are refused. */
288
303
  revokeGrant: (id) => call("POST", `/grants/${path(id)}/revoke`, { body: {} }),
@@ -1,10 +1,10 @@
1
- import { a as forbidden, c as toErrorResponse, d as createBoardClient, f as duration, g as fileName, h as IMPORT_BYTES_MAX, l as unauthorized, n as RejectedError, o as json, p as ATTACHMENT_BYTES_MAX, r as badRequest, s as notFound, t as HttpError, u as BoardError, v as mediaType } from "./errors-Pk0XV1hK.mjs";
1
+ import { a as forbidden, c as toErrorResponse, d as createBoardClient, f as duration, g as fileName, h as IMPORT_BYTES_MAX, l as unauthorized, n as RejectedError, o as json, p as ATTACHMENT_BYTES_MAX, r as badRequest, s as notFound, t as HttpError, u as BoardError, v as mediaType } from "./errors-D8ifv16L.mjs";
2
2
  import { m as RemoteWatcherId } from "./schemas-BG205xds.mjs";
3
- import { A as PostBody, B as SyncFindQuery, C as InboxNextQuery, D as LinkedQuery, E as LabelBody, F as SchedulesQuery, G as TypingBody, H as SyncReceiptBody, I as SourceJoinBody, K as UploadStartBody, L as SourceReadQuery, M as Ref, N as RegisterBody, O as MatchesQuery, P as ScheduleBody, R as SyncBody, S as InboxAckBody, T as InboxQuery, U as ThreadsQuery, V as SyncImportBody, W as TokenBody, _ as CreateChannelBody, a as compileWatcher, b as EventsQuery, c as METHODS, d as queryObject, f as readCapped, g as AckBody, h as VERSION, i as canonicalWatchers, j as ReactBody, k as MessagesQuery, l as createRouter, m as SYNC, n as syncTarget, p as readJson, r as withEmailMentions, t as mentionsEmails, u as openapi, v as DeleteBody, w as InboxPushBody, x as GrantBody, y as EditBody, z as SyncCopiesQuery } from "./targets-CknPGGVi.mjs";
4
- import { i as waitUntil, l as sha256, o as derivedId, r as runMiddleware, t as DroppedError } from "./middleware-BU7rVi9F.mjs";
5
- import { a as parsePattern, i as compileAccess, n as PERMISSIONS, o as parseScope, s as scopeOf } from "./access-N3XmkKXg.mjs";
6
- import { i as resolveActor, r as claimsOf, t as KNOWN_AGENTS } from "./actors-ihyN47OV.mjs";
7
- import { _ as verifiesTokens, a as VERCEL_ISSUER, c as createAuthority, d as hostPrincipal, h as tokenHash, l as fromTokens, u as grantIssuers } from "./auth-r-_PeZyw.mjs";
3
+ import { A as MessagesQuery, B as SyncCopiesQuery, C as InboxAckBody, D as LabelBody, E as InboxQuery, F as ScheduleBody, G as TokenBody, H as SyncImportBody, I as SchedulesQuery, J as UploadStartBody, K as TypingBody, L as SourceJoinBody, M as ReactBody, N as Ref, O as LinkedQuery, P as RegisterBody, R as SourceReadQuery, S as GrantBody, T as InboxPushBody, U as SyncReceiptBody, V as SyncFindQuery, W as ThreadsQuery, _ as CreateChannelBody, a as compileWatcher, b as EventsQuery, c as METHODS, d as queryObject, f as readCapped, g as AckBody, h as VERSION, i as canonicalWatchers, j as PostBody, k as MatchesQuery, l as createRouter, m as SYNC, n as syncTarget, p as readJson, q as UpdateGrantBody, r as withEmailMentions, t as mentionsEmails, u as openapi, v as DeleteBody, w as InboxNextQuery, x as ExplainQuery, y as EditBody, z as SyncBody } from "./targets-aMdbp84G.mjs";
4
+ import { i as waitUntil, l as sha256, o as derivedId, r as runMiddleware, t as DroppedError } from "./middleware-BjYpk4yq.mjs";
5
+ import { d as scopeOf, l as parsePattern, r as PERMISSIONS, s as compileAccess, u as parseScope } from "./access-CdBcYPQH.mjs";
6
+ import { S as verifiesTokens, T as explainGrants, a as VERCEL_ISSUER, d as fromTokens, f as grantIssuers, p as hostPrincipal, u as createAuthority, x as verifiedIssuers, y as tokenHash } from "./auth-DjoJygbG.mjs";
7
+ import { i as resolveActor, r as claimsOf, t as KNOWN_AGENTS } from "./actors-MrIEr9LI.mjs";
8
8
  //#region src/server/registrant.ts
9
9
  /** Registering again this soon after the same registration only repeats it. */
10
10
  const REGISTER_EVERY_MS = 1e4;
@@ -1887,7 +1887,7 @@ function createPolicy(options, keeps, serving, trust = null) {
1887
1887
  if (!grants) return;
1888
1888
  const iss = issuerOf(credential);
1889
1889
  if (iss === null || !iss.startsWith("https://") || iss === "https://token.actions.githubusercontent.com" || VERCEL_ISSUER.test(iss)) return;
1890
- const issuers = grantIssuers(await grants());
1890
+ const issuers = verifiedIssuers([], grantIssuers(await grants()));
1891
1891
  if (issuers.join("\n") !== context.issuers.join("\n")) context.issuers = issuers;
1892
1892
  }
1893
1893
  /** Who a board token is: the principal that minted it, narrowed, until it's revoked or expires. */
@@ -1950,6 +1950,44 @@ function createPolicy(options, keeps, serving, trust = null) {
1950
1950
  if (result === null || result === void 0) throw unauthorized("missing bearer token");
1951
1951
  return fromTokens(result) ? result : hostPrincipal(result);
1952
1952
  }
1953
+ /**
1954
+ * Which pattern, level, and grants decide `channel` for `principal`, and what they give it there,
1955
+ * narrowed by its scope: what explain answers, through `explainGrants`. Nothing for a principal
1956
+ * nothing lets in.
1957
+ */
1958
+ async function explain(principal, channel) {
1959
+ let resolved;
1960
+ try {
1961
+ resolved = await authority.resolve(principal);
1962
+ } catch (error) {
1963
+ const status = error.status;
1964
+ if (status === 401 || status === 403) return {
1965
+ pattern: null,
1966
+ over: [],
1967
+ level: null,
1968
+ grants: [],
1969
+ permissions: []
1970
+ };
1971
+ throw error;
1972
+ }
1973
+ const scope = principal.scope === void 0 ? null : compileAccess(parseScope(principal.scope));
1974
+ const allowed = (permissions) => scope ? permissions.filter((permission) => scope.can(permission, channel)) : [...permissions];
1975
+ if ("fixed" in resolved) return {
1976
+ pattern: null,
1977
+ over: [],
1978
+ level: null,
1979
+ grants: [],
1980
+ permissions: allowed(PERMISSIONS.filter((permission) => resolved.fixed.can(permission, channel)))
1981
+ };
1982
+ const { pattern, over, level, grants, permissions } = explainGrants(resolved.facts, channel);
1983
+ return {
1984
+ pattern,
1985
+ over,
1986
+ level,
1987
+ grants,
1988
+ permissions: allowed(permissions)
1989
+ };
1990
+ }
1953
1991
  return {
1954
1992
  /** Whether requests are served at all: only where the backend keeps the board. */
1955
1993
  open: keeps,
@@ -1978,10 +2016,11 @@ function createPolicy(options, keeps, serving, trust = null) {
1978
2016
  actor
1979
2017
  };
1980
2018
  },
2019
+ explain,
1981
2020
  /** What a stored principal (a schedule's creator, a watcher's registrant) may do now: null once nothing, its board token's revoking included. */
1982
- async accessNow(principal) {
2021
+ async accessNow(principal, grants) {
1983
2022
  if (principal.token !== void 0 && !await trust?.live(principal.token)) return null;
1984
- return authority.accessNow(principal);
2023
+ return authority.accessNow(principal, grants);
1985
2024
  }
1986
2025
  };
1987
2026
  }
@@ -2116,6 +2155,11 @@ async function inputOf(name, request, url, params) {
2116
2155
  case "createChannel": return CreateChannelBody.parse(await body());
2117
2156
  case "schedule": return ScheduleBody.parse(await body());
2118
2157
  case "createGrant": return GrantBody.parse(await body());
2158
+ case "updateGrant": return {
2159
+ id,
2160
+ ...UpdateGrantBody.parse(await body())
2161
+ };
2162
+ case "explain": return ExplainQuery.parse(queryObject(url));
2119
2163
  case "createToken": return TokenBody.parse(await body());
2120
2164
  case "register": return RegisterBody.parse(await body());
2121
2165
  case "edit": return {
@@ -3160,7 +3204,8 @@ function createBoard(options, runtime) {
3160
3204
  return entry.url(thread.slice(key.length + 1), message).catch(() => null);
3161
3205
  },
3162
3206
  typing: async (messages, status) => (await server()).typing(messages, status),
3163
- accessNow: (principal) => policy.accessNow(principal),
3207
+ accessNow: (principal, grants) => policy.accessNow(principal, grants),
3208
+ explain: (principal, channel) => policy.explain(principal, channel),
3164
3209
  project: () => policy.project(),
3165
3210
  handle: (caller) => handleOf(caller, null),
3166
3211
  url: ownUrl
@@ -0,0 +1,4 @@
1
+ import "./routes-De4W6lEs.mjs";
2
+ import "./auth-aaoKt5DK.mjs";
3
+ import "./backend-u1sVvybh.mjs";
4
+ import "./provider-hB8QNrwm.mjs";
@@ -1,5 +1,5 @@
1
- import { d as Board, f as BoardOptions } from "./backend-CWpyR1A7.mjs";
2
- import "./exports-BuKjVq2t.mjs";
1
+ import { d as Board, f as BoardOptions } from "./backend-u1sVvybh.mjs";
2
+ import "./exports-uwRl5qIj.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,8 +1,8 @@
1
- import { d as Attachment } from "./folds-DjFTiqIM.mjs";
2
- import { i as Claims, r as CallerRequest } from "./auth-D6z3rMNj.mjs";
3
- import { $ as EditBody, $t as SyncImportBody, At as RegisterBody, B as ScheduleTiming, Bt as SchedulesQueryInput, Ct as MessagesQueryInput, Dt as REGISTERED_WATCHERS_MAX, Et as PostInput, F as Filters, Ft as ScheduleBody, G as AckBody, Gt as SourceRead, H as WaitOptions, Ht as SourceJoin, I as PostOptions, It as ScheduleBodyOutput, J as BoardEventView, Jt as SyncCopiesQuery, K as ActorView, Kt as SourceReadQuery, L as ProfileOption, Lt as ScheduleInput, Mt as RegistrationView, N as BoardError, Nt as ResolvedSyncTarget, Ot as ReactBody, Pt as RouteName, Q as Discovery, Qt as SyncFindView, R as ReplyOptions, Rt as ScheduleView, St as MessagesQuery, Tt as PostBody, U as Written, Ut as SourceJoinBody, V as UploadInput, Vt as SchedulesQueryOutput, W as duration, Wt as SourceMessage, X as CreateChannelBody, Xt as SyncFindInput, Y as ChannelView, Yt as SyncCopiesView, Z as DeleteBody, Zt as SyncFindQuery, _n as routes, _t as MatchView, an as ThreadSummaryView, at as GrantInput, bt as MessageView, cn as ThreadsQuery, ct as InboxEntry, dn as TokenInput, dt as InboxPushBody, en as SyncImportInput, et as EventsPage, fn as TokenView, ft as InboxQuery, gn as UploadTicket, gt as LinkedQuery, hn as UploadStartBody, ht as LinkView, in as SyncedView, it as GrantBody, jt as RegisterInput, kt as Ref, ln as ThreadsQueryInput, lt as InboxItem, mn as TypingResult, mt as LabelBody, nn as SyncReceiptInput, nt as EventsQueryInput, on as ThreadView, ot as GrantView, pn as TypingBody, pt as LABEL_CONDITIONS_MAX, q as ApiError, qt as SyncBody, rn as SyncThreadView, rt as FiltersInput, sn as ThreadsPage, st as InboxAckBody, tn as SyncReceiptBody, tt as EventsQuery, un as TokenBody, ut as InboxNextQuery, vt as MatchesQuery, wt as ParsedFilters, xt as MessagesPage, yt as Me, z as ScheduleOptions, zt as SchedulesQuery } from "./provider-BlzUvcM9.mjs";
4
- import { C as Protocol, S as Method, _ as MiddlewareContext, a as Identity, b as WriteSource, c as SelfCaller, d as Board, f as BoardOptions, g as Middleware, h as DroppedError, i as Caller, l as Subscription, m as WatcherContext, n as BackendRoute, o as InboxDelivery, p as Watcher, r as BoardBinding, s as ProtocolMethods, t as Backend, u as VerifiedCaller, v as Write, x as HttpError, y as WritePatch } from "./backend-CWpyR1A7.mjs";
5
- import "./exports-BuKjVq2t.mjs";
1
+ import { $ as ScheduleView, $t as Attachment, A as MatchView, At as UpdateGrantBody, B as PrincipalInput, C as InboxNextQuery, Ct as ThreadsQuery, D as LabelBody, Dt as TokenView, E as LABEL_CONDITIONS_MAX, Et as TokenInput, F as MessagesQuery, G as RegisterBody, H as REGISTERED_WATCHERS_MAX, I as MessagesQueryInput, J as ResolvedSyncTarget, K as RegisterInput, L as ParsedFilters, M as Me, Mt as UploadStartBody, N as MessageView, Nt as UploadTicket, O as LinkView, Ot as TypingBody, P as MessagesPage, Pt as routes, Q as ScheduleInput, R as PostBody, S as InboxItem, St as ThreadsPage, T as InboxQuery, Tt as TokenBody, U as ReactBody, V as PrincipalView, W as Ref, X as ScheduleBody, Y as RouteName, Z as ScheduleBodyOutput, _ as GrantCan, _t as SyncReceiptInput, a as ChannelView, at as SourceMessage, b as InboxAckBody, bt as ThreadSummaryView, c as Discovery, ct as SyncBody, d as EventsQuery, dt as SyncFindInput, et as SchedulesQuery, f as EventsQueryInput, ft as SyncFindQuery, g as GrantBody, gt as SyncReceiptBody, h as FiltersInput, ht as SyncImportInput, i as BoardEventView, it as SourceJoinBody, j as MatchesQuery, jt as UpdateGrantInput, k as LinkedQuery, kt as TypingResult, l as EditBody, lt as SyncCopiesQuery, m as Explanation, mt as SyncImportBody, n as ActorView, nt as SchedulesQueryOutput, o as CreateChannelBody, ot as SourceRead, p as ExplainQuery, pt as SyncFindView, q as RegistrationView, r as ApiError, rt as SourceJoin, s as DeleteBody, st as SourceReadQuery, t as AckBody, tt as SchedulesQueryInput, u as EventsPage, ut as SyncCopiesView, v as GrantInput, vt as SyncThreadView, w as InboxPushBody, wt as ThreadsQueryInput, x as InboxEntry, xt as ThreadView, y as GrantView, yt as SyncedView, z as PostInput } from "./routes-De4W6lEs.mjs";
2
+ import { i as Claims, r as CallerRequest } from "./auth-aaoKt5DK.mjs";
3
+ import { C as Protocol, S as Method, _ as MiddlewareContext, a as Identity, b as WriteSource, c as SelfCaller, d as Board, f as BoardOptions, g as Middleware, h as DroppedError, i as Caller, l as Subscription, m as WatcherContext, n as BackendRoute, o as InboxDelivery, p as Watcher, r as BoardBinding, s as ProtocolMethods, t as Backend, u as VerifiedCaller, v as Write, x as HttpError, y as WritePatch } from "./backend-u1sVvybh.mjs";
4
+ import { B as ScheduleTiming, F as Filters, H as WaitOptions, I as PostOptions, L as ProfileOption, N as BoardError, R as ReplyOptions, U as Written, V as UploadInput, W as duration, z as ScheduleOptions } from "./provider-hB8QNrwm.mjs";
5
+ import "./exports-uwRl5qIj.mjs";
6
6
  //#region src/server/index.default.d.ts
7
7
  /**
8
8
  * The handle on a board. Without a `backend`, it's Vercel's board for the team, the one `name`
@@ -12,4 +12,4 @@ import "./exports-BuKjVq2t.mjs";
12
12
  */
13
13
  export declare function board(options?: BoardOptions): Board;
14
14
  //#endregion
15
- export { type AckBody, type ActorView, type ApiError, type Attachment, type Backend, type BackendRoute, type Board, type BoardBinding, BoardError, type BoardEventView, type BoardOptions, type Caller, type CallerRequest, type ChannelView, type Claims, type CreateChannelBody, type DeleteBody, type Discovery, DroppedError, type EditBody, type EventsPage, type EventsQuery, type EventsQueryInput, type Filters, type FiltersInput, type GrantBody, type GrantInput, type GrantView, HttpError, type Identity, type InboxAckBody, type InboxDelivery, type InboxEntry, type InboxItem, type InboxNextQuery, type InboxPushBody, type InboxQuery, type LABEL_CONDITIONS_MAX, type LabelBody, type LinkView, type LinkedQuery, type MatchView, type MatchesQuery, type Me, type MessageView, type MessagesPage, type MessagesQuery, type MessagesQueryInput, type Method, type Middleware, type MiddlewareContext, type ParsedFilters, type PostBody, type PostInput, type PostOptions, type ProfileOption, type Protocol, type ProtocolMethods, type REGISTERED_WATCHERS_MAX, type ReactBody, type Ref, type RegisterBody, type RegisterInput, type RegistrationView, type ReplyOptions, type ResolvedSyncTarget, type RouteName, type ScheduleBody, type ScheduleBodyOutput, type ScheduleInput, type ScheduleOptions, type ScheduleTiming, type ScheduleView, type SchedulesQuery, type SchedulesQueryInput, type SchedulesQueryOutput, 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 ThreadSummaryView, type ThreadView, type ThreadsPage, type ThreadsQuery, type ThreadsQueryInput, type TokenBody, type TokenInput, type TokenView, type TypingBody, type TypingResult, type UploadInput, type UploadStartBody, type UploadTicket, type VerifiedCaller, type WaitOptions, type Watcher, type WatcherContext, type Write, type WritePatch, type WriteSource, type Written, duration, type routes };
15
+ export { type AckBody, type ActorView, type ApiError, type Attachment, type Backend, type BackendRoute, type Board, type BoardBinding, BoardError, type BoardEventView, type BoardOptions, type Caller, type CallerRequest, type ChannelView, type Claims, type CreateChannelBody, type DeleteBody, type Discovery, DroppedError, type EditBody, type EventsPage, type EventsQuery, type EventsQueryInput, type ExplainQuery, type Explanation, type Filters, type FiltersInput, type GrantBody, type GrantCan, type GrantInput, type GrantView, HttpError, type Identity, type InboxAckBody, type InboxDelivery, type InboxEntry, type InboxItem, type InboxNextQuery, type InboxPushBody, type InboxQuery, type LABEL_CONDITIONS_MAX, type LabelBody, type LinkView, type LinkedQuery, type MatchView, type MatchesQuery, type Me, type MessageView, type MessagesPage, type MessagesQuery, type MessagesQueryInput, type Method, type Middleware, type MiddlewareContext, 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 ReplyOptions, type ResolvedSyncTarget, type RouteName, type ScheduleBody, type ScheduleBodyOutput, type ScheduleInput, type ScheduleOptions, type ScheduleTiming, type ScheduleView, type SchedulesQuery, type SchedulesQueryInput, type SchedulesQueryOutput, 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 ThreadSummaryView, type ThreadView, type ThreadsPage, type ThreadsQuery, type ThreadsQueryInput, type TokenBody, type TokenInput, type TokenView, 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, duration, type routes };
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { f as duration, t as HttpError, u as BoardError } from "./errors-Pk0XV1hK.mjs";
2
- import { t as DroppedError } from "./middleware-BU7rVi9F.mjs";
3
- import { r as createVercel, t as createBoard } from "./exports-gHDHlg0i.mjs";
1
+ import { f as duration, t as HttpError, u as BoardError } from "./errors-D8ifv16L.mjs";
2
+ import { t as DroppedError } from "./middleware-BjYpk4yq.mjs";
3
+ import { r as createVercel, t as createBoard } from "./exports-Bx2dGpzr.mjs";
4
4
  //#region src/backend-vercel/index.default.ts
5
5
  /**
6
6
  * Your team's board, in Vercel's API. Outside Node there's no environment to find credentials or
@@ -23,7 +23,7 @@ function board(options = {}) {
23
23
  if (!fetch) throw new Error("board: pass a fetch that sends credentials Vercel's API takes, or a backend: outside Node there's no environment to find them in");
24
24
  return vercel({ fetch });
25
25
  },
26
- sync: () => import("./engine-JxgZiikU.mjs"),
26
+ sync: () => import("./engine-rtOVWsiF.mjs"),
27
27
  serving: null
28
28
  });
29
29
  }
@@ -1,6 +1,6 @@
1
- import { d as Attachment } from "./folds-DjFTiqIM.mjs";
2
- import { i as Claims, r as CallerRequest } from "./auth-D6z3rMNj.mjs";
3
- import { $ as EditBody, $t as SyncImportBody, At as RegisterBody, B as ScheduleTiming, Bt as SchedulesQueryInput, Ct as MessagesQueryInput, Dt as REGISTERED_WATCHERS_MAX, Et as PostInput, F as Filters, Ft as ScheduleBody, G as AckBody, Gt as SourceRead, H as WaitOptions, Ht as SourceJoin, I as PostOptions, It as ScheduleBodyOutput, J as BoardEventView, Jt as SyncCopiesQuery, K as ActorView, Kt as SourceReadQuery, L as ProfileOption, Lt as ScheduleInput, Mt as RegistrationView, N as BoardError, Nt as ResolvedSyncTarget, Ot as ReactBody, Pt as RouteName, Q as Discovery, Qt as SyncFindView, R as ReplyOptions, Rt as ScheduleView, St as MessagesQuery, Tt as PostBody, U as Written, Ut as SourceJoinBody, V as UploadInput, Vt as SchedulesQueryOutput, W as duration, Wt as SourceMessage, X as CreateChannelBody, Xt as SyncFindInput, Y as ChannelView, Yt as SyncCopiesView, Z as DeleteBody, Zt as SyncFindQuery, _n as routes, _t as MatchView, an as ThreadSummaryView, at as GrantInput, bt as MessageView, cn as ThreadsQuery, ct as InboxEntry, dn as TokenInput, dt as InboxPushBody, en as SyncImportInput, et as EventsPage, fn as TokenView, ft as InboxQuery, gn as UploadTicket, gt as LinkedQuery, hn as UploadStartBody, ht as LinkView, in as SyncedView, it as GrantBody, jt as RegisterInput, kt as Ref, ln as ThreadsQueryInput, lt as InboxItem, mn as TypingResult, mt as LabelBody, nn as SyncReceiptInput, nt as EventsQueryInput, on as ThreadView, ot as GrantView, pn as TypingBody, pt as LABEL_CONDITIONS_MAX, q as ApiError, qt as SyncBody, rn as SyncThreadView, rt as FiltersInput, sn as ThreadsPage, st as InboxAckBody, tn as SyncReceiptBody, tt as EventsQuery, un as TokenBody, ut as InboxNextQuery, vt as MatchesQuery, wt as ParsedFilters, xt as MessagesPage, yt as Me, z as ScheduleOptions, zt as SchedulesQuery } from "./provider-BlzUvcM9.mjs";
4
- import { C as Protocol, S as Method, _ as MiddlewareContext, a as Identity, b as WriteSource, c as SelfCaller, d as Board, f as BoardOptions, g as Middleware, h as DroppedError, i as Caller, l as Subscription, m as WatcherContext, n as BackendRoute, o as InboxDelivery, p as Watcher, r as BoardBinding, s as ProtocolMethods, t as Backend, u as VerifiedCaller, v as Write, x as HttpError, y as WritePatch } from "./backend-CWpyR1A7.mjs";
5
- import { t as board } from "./index-CXvvYNYj.mjs";
6
- export { type AckBody, type ActorView, type ApiError, type Attachment, type Backend, type BackendRoute, type Board, type BoardBinding, BoardError, type BoardEventView, type BoardOptions, type Caller, type CallerRequest, type ChannelView, type Claims, type CreateChannelBody, type DeleteBody, type Discovery, DroppedError, type EditBody, type EventsPage, type EventsQuery, type EventsQueryInput, type Filters, type FiltersInput, type GrantBody, type GrantInput, type GrantView, HttpError, type Identity, type InboxAckBody, type InboxDelivery, type InboxEntry, type InboxItem, type InboxNextQuery, type InboxPushBody, type InboxQuery, type LABEL_CONDITIONS_MAX, type LabelBody, type LinkView, type LinkedQuery, type MatchView, type MatchesQuery, type Me, type MessageView, type MessagesPage, type MessagesQuery, type MessagesQueryInput, type Method, type Middleware, type MiddlewareContext, type ParsedFilters, type PostBody, type PostInput, type PostOptions, type ProfileOption, type Protocol, type ProtocolMethods, type REGISTERED_WATCHERS_MAX, type ReactBody, type Ref, type RegisterBody, type RegisterInput, type RegistrationView, type ReplyOptions, type ResolvedSyncTarget, type RouteName, type ScheduleBody, type ScheduleBodyOutput, type ScheduleInput, type ScheduleOptions, type ScheduleTiming, type ScheduleView, type SchedulesQuery, type SchedulesQueryInput, type SchedulesQueryOutput, 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 ThreadSummaryView, type ThreadView, type ThreadsPage, type ThreadsQuery, type ThreadsQueryInput, type TokenBody, type TokenInput, type TokenView, type TypingBody, type TypingResult, type UploadInput, type UploadStartBody, type UploadTicket, type VerifiedCaller, type WaitOptions, type Watcher, type WatcherContext, type Write, type WritePatch, type WriteSource, type Written, board, duration, type routes };
1
+ import { $ as ScheduleView, $t as Attachment, A as MatchView, At as UpdateGrantBody, B as PrincipalInput, C as InboxNextQuery, Ct as ThreadsQuery, D as LabelBody, Dt as TokenView, E as LABEL_CONDITIONS_MAX, Et as TokenInput, F as MessagesQuery, G as RegisterBody, H as REGISTERED_WATCHERS_MAX, I as MessagesQueryInput, J as ResolvedSyncTarget, K as RegisterInput, L as ParsedFilters, M as Me, Mt as UploadStartBody, N as MessageView, Nt as UploadTicket, O as LinkView, Ot as TypingBody, P as MessagesPage, Pt as routes, Q as ScheduleInput, R as PostBody, S as InboxItem, St as ThreadsPage, T as InboxQuery, Tt as TokenBody, U as ReactBody, V as PrincipalView, W as Ref, X as ScheduleBody, Y as RouteName, Z as ScheduleBodyOutput, _ as GrantCan, _t as SyncReceiptInput, a as ChannelView, at as SourceMessage, b as InboxAckBody, bt as ThreadSummaryView, c as Discovery, ct as SyncBody, d as EventsQuery, dt as SyncFindInput, et as SchedulesQuery, f as EventsQueryInput, ft as SyncFindQuery, g as GrantBody, gt as SyncReceiptBody, h as FiltersInput, ht as SyncImportInput, i as BoardEventView, it as SourceJoinBody, j as MatchesQuery, jt as UpdateGrantInput, k as LinkedQuery, kt as TypingResult, l as EditBody, lt as SyncCopiesQuery, m as Explanation, mt as SyncImportBody, n as ActorView, nt as SchedulesQueryOutput, o as CreateChannelBody, ot as SourceRead, p as ExplainQuery, pt as SyncFindView, q as RegistrationView, r as ApiError, rt as SourceJoin, s as DeleteBody, st as SourceReadQuery, t as AckBody, tt as SchedulesQueryInput, u as EventsPage, ut as SyncCopiesView, v as GrantInput, vt as SyncThreadView, w as InboxPushBody, wt as ThreadsQueryInput, x as InboxEntry, xt as ThreadView, y as GrantView, yt as SyncedView, z as PostInput } from "./routes-De4W6lEs.mjs";
2
+ import { i as Claims, r as CallerRequest } from "./auth-aaoKt5DK.mjs";
3
+ import { C as Protocol, S as Method, _ as MiddlewareContext, a as Identity, b as WriteSource, c as SelfCaller, d as Board, f as BoardOptions, g as Middleware, h as DroppedError, i as Caller, l as Subscription, m as WatcherContext, n as BackendRoute, o as InboxDelivery, p as Watcher, r as BoardBinding, s as ProtocolMethods, t as Backend, u as VerifiedCaller, v as Write, x as HttpError, y as WritePatch } from "./backend-u1sVvybh.mjs";
4
+ import { B as ScheduleTiming, F as Filters, H as WaitOptions, I as PostOptions, L as ProfileOption, N as BoardError, R as ReplyOptions, U as Written, V as UploadInput, W as duration, z as ScheduleOptions } from "./provider-hB8QNrwm.mjs";
5
+ import { t as board } from "./index-D6mK0Ial.mjs";
6
+ export { type AckBody, type ActorView, type ApiError, type Attachment, type Backend, type BackendRoute, type Board, type BoardBinding, BoardError, type BoardEventView, type BoardOptions, type Caller, type CallerRequest, type ChannelView, type Claims, type CreateChannelBody, type DeleteBody, type Discovery, DroppedError, type EditBody, type EventsPage, type EventsQuery, type EventsQueryInput, type ExplainQuery, type Explanation, type Filters, type FiltersInput, type GrantBody, type GrantCan, type GrantInput, type GrantView, HttpError, type Identity, type InboxAckBody, type InboxDelivery, type InboxEntry, type InboxItem, type InboxNextQuery, type InboxPushBody, type InboxQuery, type LABEL_CONDITIONS_MAX, type LabelBody, type LinkView, type LinkedQuery, type MatchView, type MatchesQuery, type Me, type MessageView, type MessagesPage, type MessagesQuery, type MessagesQueryInput, type Method, type Middleware, type MiddlewareContext, 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 ReplyOptions, type ResolvedSyncTarget, type RouteName, type ScheduleBody, type ScheduleBodyOutput, type ScheduleInput, type ScheduleOptions, type ScheduleTiming, type ScheduleView, type SchedulesQuery, type SchedulesQueryInput, type SchedulesQueryOutput, 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 ThreadSummaryView, type ThreadView, type ThreadsPage, type ThreadsQuery, type ThreadsQueryInput, type TokenBody, type TokenInput, type TokenView, 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, board, duration, type routes };
@@ -1,4 +1,4 @@
1
- import { f as duration, t as HttpError, u as BoardError } from "./errors-Pk0XV1hK.mjs";
2
- import { t as DroppedError } from "./middleware-BU7rVi9F.mjs";
3
- import { t as board } from "./server-BiIUXWbU.mjs";
1
+ import { f as duration, t as HttpError, u as BoardError } from "./errors-D8ifv16L.mjs";
2
+ import { t as DroppedError } from "./middleware-BjYpk4yq.mjs";
3
+ import { t as board } from "./server-Ov6GBJ8j.mjs";
4
4
  export { BoardError, DroppedError, HttpError, board, duration };