@vercel/board 0.48.1 → 0.49.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-C06pIr0M.mjs → access-B8DnrnHa.mjs} +29 -17
- package/dist/access.d.mts +2 -2
- package/dist/access.mjs +5 -5
- package/dist/{actors-Dkyg-oo0.mjs → actors-DewJKyqy.mjs} +4 -3
- package/dist/{auth-B9-wXQ-x.mjs → auth-CEU06Nyp.mjs} +2 -2
- package/dist/{auth-li3lKwJG.d.mts → auth-Z9-Khvvw.d.mts} +1 -1
- package/dist/{backend-UBP6HimX.d.mts → backend-BzCXxVZ-.d.mts} +19 -5
- package/dist/backend-local.d.mts +1 -1
- package/dist/backend-local.mjs +1 -1
- package/dist/{chat-provider-kNWd6MQC.mjs → chat-provider-BS_fr61g.mjs} +2 -2
- package/dist/{chat-provider-iN0DFsSE.d.mts → chat-provider-DQ1GHm4o.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 +3 -3
- package/dist/cli.mjs +6 -6
- package/dist/client-C2T4eaXd.d.mts +544 -0
- package/dist/{commands-CJsOA-hf.d.mts → commands-Cm4sODIu.d.mts} +12 -8
- package/dist/{commands-Dk6_cHLS.mjs → commands-nN8WpvCe.mjs} +75 -58
- package/dist/{conformance-CDP8y2Zm.mjs → conformance-0xONNKcB.mjs} +102 -20
- package/dist/conformance.d.mts +1 -1
- package/dist/conformance.mjs +1 -1
- package/dist/{engine-BQ0hJw2w.mjs → engine-BH_nfJ3N.mjs} +6 -5
- package/dist/{errors-QhkdzI-o.mjs → errors-DwV7I0g4.mjs} +53 -174
- package/dist/{events-B-qyxNsJ.mjs → events-B76-4bNp.mjs} +2 -2
- package/dist/{exports-inhbjAWi.d.mts → exports-CKEK1fxf.d.mts} +4 -4
- package/dist/{exports-BzSG0_wL.mjs → exports-DLzyKwEp.mjs} +336 -82
- package/dist/{external-BuVTXT1R.mjs → external-BLI4W_-V.mjs} +1 -1
- package/dist/{index-B0Fnhvk7.d.mts → index-DxqSw8yd.d.mts} +2 -2
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +4 -4
- package/dist/index.node.d.mts +7 -7
- package/dist/index.node.mjs +4 -4
- package/dist/inspect/app.js +39 -39
- package/dist/inspect-B2ImmOvw.mjs +272 -0
- package/dist/inspect-DnRQUmP8.mjs +2 -0
- package/dist/inspect.d.mts +17 -0
- package/dist/inspect.mjs +196 -0
- package/dist/{local-BdKxz-Dn.mjs → local-DPpSEq2_.mjs} +132 -50
- package/dist/{main-BgiViRZ8.mjs → main-CqX7JqzE.mjs} +214 -46
- package/dist/{memory-CMm-Fk_A.mjs → memory-DzqkXIB-.mjs} +2 -2
- package/dist/{middleware-CT6vMNUc.mjs → middleware-ysFm2S4v.mjs} +2 -2
- package/dist/{page-D-OzDOAX.mjs → page-7KWSGxyC.mjs} +12 -2
- package/dist/page-CN77B014.mjs +2 -0
- package/dist/profile-header-Cj0Cb1cf.mjs +163 -0
- package/dist/{provider-DC3WHUXo.d.mts → provider-Dwb_9mnu.d.mts} +3 -529
- package/dist/{routes-CjA6Mp4D.d.mts → routes-B6SEA9yw.d.mts} +130 -4
- package/dist/{routes-ABXf3CKq.mjs → routes-qS92xz8U.mjs} +33 -7
- package/dist/{schemas-7VFdomFB.mjs → schemas-TeVe4Udh.mjs} +4 -2
- package/dist/{serve-C2Jbr7pR.mjs → serve-CYr4RwRM.mjs} +5 -5
- package/dist/{server-EOQC5Gtq.mjs → server-V7qyVUiJ.mjs} +11 -9
- package/dist/{serving-BNdiReQT.mjs → serving-BzNxlnDV.mjs} +1 -1
- package/dist/{inspect-n9brh-TT.mjs → shell-BLHZoP-x.mjs} +25 -274
- package/dist/{sql-IEbO5vXs.mjs → sql-DIKQd5Me.mjs} +2 -2
- package/dist/{sqlite-CVG8XKHm.mjs → sqlite-BF9kBDh1.mjs} +2 -2
- package/dist/{sqlite-db-BJjPQYx4.mjs → sqlite-db-CSYwiZ4E.mjs} +1 -1
- package/dist/sync-chat-sdk.d.mts +2 -2
- package/dist/sync-chat-sdk.mjs +2 -2
- package/dist/sync-github.d.mts +2 -2
- package/dist/sync-github.mjs +2 -2
- package/dist/sync-linear.d.mts +3 -3
- package/dist/sync-linear.mjs +2 -2
- package/dist/sync-slack.d.mts +3 -3
- package/dist/sync-slack.mjs +11 -7
- package/dist/sync.d.mts +2 -2
- package/dist/sync.mjs +2 -2
- package/dist/{task-batch-D4p9N8lN.mjs → task-batch-CujTLmTB.mjs} +10 -11
- package/dist/{tokens-BCp4EWTQ.mjs → tokens-BmCDAT4N.mjs} +2 -2
- package/dist/version-BCoWGLEW.mjs +5 -0
- package/docs/01-board/01-mounting.md +8 -0
- package/docs/01-board/04-messages.md +6 -2
- package/docs/01-board/05-reading.md +17 -2
- package/docs/01-board/09-access.md +40 -6
- package/docs/01-board/11-tasks.md +3 -3
- package/docs/03-guides/02-inspector.md +31 -0
- package/docs/04-reference/01-cli.md +81 -32
- package/docs/04-reference/02-board.md +14 -3
- package/docs/04-reference/03-http.md +5 -3
- package/docs/04-reference/05-conformance.md +7 -0
- package/package.json +5 -1
- package/dist/inspect-BB-XUPuz.mjs +0 -2
- package/dist/page-Dr9Aqlej.mjs +0 -2
|
@@ -835,8 +835,19 @@ type GrantChange = {
|
|
|
835
835
|
revoked?: {
|
|
836
836
|
readonly can: WrittenCan;
|
|
837
837
|
};
|
|
838
|
+
/**
|
|
839
|
+
* What the caller may do once the change has landed, as `caller` and `own` are on the grants it
|
|
840
|
+
* applies to: judged for a lockout. Left out, as for a caller that said to go ahead, none is.
|
|
841
|
+
*/
|
|
842
|
+
then?: {
|
|
843
|
+
readonly caller: Access;
|
|
844
|
+
readonly own: Access;
|
|
845
|
+
};
|
|
838
846
|
};
|
|
839
|
-
/**
|
|
847
|
+
/**
|
|
848
|
+
* Why `checkGrantChange` refuses a change, and where: `pattern` is the spot it failed at. A
|
|
849
|
+
* `lockout` is a change the caller may make, and couldn't take back.
|
|
850
|
+
*/
|
|
840
851
|
type GrantChangeRefusal = {
|
|
841
852
|
reason: 'reach';
|
|
842
853
|
pattern: ChannelPattern;
|
|
@@ -845,6 +856,10 @@ type GrantChangeRefusal = {
|
|
|
845
856
|
reason: 'admission';
|
|
846
857
|
pattern: ChannelPattern;
|
|
847
858
|
permission: Permission;
|
|
859
|
+
} | {
|
|
860
|
+
reason: 'lockout';
|
|
861
|
+
pattern: ChannelPattern;
|
|
862
|
+
permission: 'manage';
|
|
848
863
|
};
|
|
849
864
|
/**
|
|
850
865
|
* Whether a caller may change grants so: make or widen one (`changed`), or revoke one or remove
|
|
@@ -860,6 +875,10 @@ type GrantChangeRefusal = {
|
|
|
860
875
|
* - **Admission:** wherever `everyone` gives something, `caller` has it too, since any principal a
|
|
861
876
|
* grant lets in gets what `everyone` gives. A revoke or a removal lets no one in, so it's judged
|
|
862
877
|
* by reach alone, at the patterns of the grant as it was.
|
|
878
|
+
* - **Lockout:** a change that passes both, and takes the caller's own `manage` at a pattern it
|
|
879
|
+
* names, is one the caller couldn't take back: closing `security/` to everyone closes it to
|
|
880
|
+
* whoever closes it, unless a grant keeps them in. Judged only with `then`, what the caller may
|
|
881
|
+
* do once the change has landed, so a caller that says to go ahead is let through.
|
|
863
882
|
*
|
|
864
883
|
* It looks only at the spots where access can change: the grants' patterns, the `everyone`
|
|
865
884
|
* grants', and the caller's own, from `summary()`. It does no I/O, so a board and Vercel's API run
|
|
@@ -906,6 +925,9 @@ declare const MessagesQuery: z.ZodObject<{
|
|
|
906
925
|
before: z.ZodOptional<z.ZodString>;
|
|
907
926
|
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
908
927
|
}, z.core.$strip>;
|
|
928
|
+
/** How many threads a read lists without a `limit`, and with one at most. */
|
|
929
|
+
declare const THREADS_LIMIT_DEFAULT = 50;
|
|
930
|
+
declare const THREADS_LIMIT_MAX = 500;
|
|
909
931
|
/**
|
|
910
932
|
* `limit` counts threads: each thread with a matching message, by its latest reply. `before` is a page's
|
|
911
933
|
* `older`, for the threads last active before it; it pages backward, so it takes no `after`.
|
|
@@ -1153,7 +1175,7 @@ declare const PrincipalInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1153
1175
|
}, z.core.$strict>], "kind">;
|
|
1154
1176
|
/** What a grant lets its principals do: a map from channel pattern to `'all'` or a list, `[]` for none. Kept as written. */
|
|
1155
1177
|
declare const GrantCan: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>>;
|
|
1156
|
-
/**
|
|
1178
|
+
/** What `POST /grants` takes: a grant, and `lockMeOut` to make one its caller couldn't take back. */
|
|
1157
1179
|
declare const GrantBody: z.ZodObject<{
|
|
1158
1180
|
principals: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1159
1181
|
kind: z.ZodLiteral<"user">;
|
|
@@ -1187,7 +1209,56 @@ declare const GrantBody: z.ZodObject<{
|
|
|
1187
1209
|
kind: z.ZodLiteral<"everyone">;
|
|
1188
1210
|
}, z.core.$strict>], "kind">>;
|
|
1189
1211
|
can: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>>;
|
|
1212
|
+
lockMeOut: z.ZodOptional<z.ZodBoolean>;
|
|
1213
|
+
}, z.core.$strict>;
|
|
1214
|
+
/** How many grants one write makes. */
|
|
1215
|
+
declare const GRANT_BATCH_MAX = 16;
|
|
1216
|
+
/**
|
|
1217
|
+
* Several grants made in one write, all of them or none, judged together: each by the grants as
|
|
1218
|
+
* they are, and what it leaves its caller with by the grants as they'd be with all of them. So a
|
|
1219
|
+
* lock and the grant that keeps its maker in go in one request, in any order.
|
|
1220
|
+
*/
|
|
1221
|
+
declare const CreateGrantsBody: z.ZodObject<{
|
|
1222
|
+
grants: z.ZodArray<z.ZodObject<{
|
|
1223
|
+
principals: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1224
|
+
kind: z.ZodLiteral<"user">;
|
|
1225
|
+
email: z.ZodOptional<z.ZodString>;
|
|
1226
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
1227
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1228
|
+
kind: z.ZodLiteral<"project">;
|
|
1229
|
+
project: z.ZodString;
|
|
1230
|
+
environments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1231
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1232
|
+
kind: z.ZodLiteral<"github">;
|
|
1233
|
+
repository: z.ZodString;
|
|
1234
|
+
workflow: z.ZodOptional<z.ZodString>;
|
|
1235
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
1236
|
+
event: z.ZodOptional<z.ZodString>;
|
|
1237
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1238
|
+
kind: z.ZodLiteral<"oidc">;
|
|
1239
|
+
issuer: z.ZodString;
|
|
1240
|
+
claims: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
1241
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1242
|
+
kind: z.ZodLiteral<"all-users">;
|
|
1243
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1244
|
+
kind: z.ZodLiteral<"all-projects">;
|
|
1245
|
+
environments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1246
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1247
|
+
kind: z.ZodLiteral<"app">;
|
|
1248
|
+
app: z.ZodString;
|
|
1249
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1250
|
+
kind: z.ZodLiteral<"all-apps">;
|
|
1251
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1252
|
+
kind: z.ZodLiteral<"everyone">;
|
|
1253
|
+
}, z.core.$strict>], "kind">>;
|
|
1254
|
+
can: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>>;
|
|
1255
|
+
}, z.core.$strict>>;
|
|
1256
|
+
lockMeOut: z.ZodOptional<z.ZodBoolean>;
|
|
1190
1257
|
}, z.core.$strict>;
|
|
1258
|
+
/** What revoking a grant takes: nothing, or `lockMeOut`. */
|
|
1259
|
+
declare const RevokeGrantBody: z.ZodOptional<z.ZodObject<{
|
|
1260
|
+
lockMeOut: z.ZodOptional<z.ZodBoolean>;
|
|
1261
|
+
}, z.core.$strict>>;
|
|
1191
1262
|
/**
|
|
1192
1263
|
* Which grant decides a channel, and what it gives, for the caller or a principal it names: a
|
|
1193
1264
|
* `user` (by email, or by ID where the board can't look one up), a `project` in one `environment`
|
|
@@ -1272,6 +1343,7 @@ declare const UpdateGrantBody: z.ZodObject<{
|
|
|
1272
1343
|
kind: z.ZodLiteral<"everyone">;
|
|
1273
1344
|
}, z.core.$strict>], "kind">>>;
|
|
1274
1345
|
can: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>>>;
|
|
1346
|
+
lockMeOut: z.ZodOptional<z.ZodBoolean>;
|
|
1275
1347
|
}, z.core.$strict>;
|
|
1276
1348
|
/**
|
|
1277
1349
|
* A schema version to register, for good: `name` and `version` are its ID (`sandbox@1`), and
|
|
@@ -1776,11 +1848,18 @@ type PrincipalInput = z.input<typeof PrincipalInput>;
|
|
|
1776
1848
|
type CanAt = 'all' | 'none' | readonly Permission[];
|
|
1777
1849
|
/** A grant's `can`, as a handle takes it: each channel pattern and what it gives. */
|
|
1778
1850
|
type GrantCan = Readonly<Record<string, CanAt>>;
|
|
1779
|
-
/**
|
|
1851
|
+
/** A grant, as a handle takes it: who it names, and what they may do. */
|
|
1780
1852
|
type GrantInput = {
|
|
1781
1853
|
principals: readonly PrincipalInput[];
|
|
1782
1854
|
can: GrantCan;
|
|
1783
1855
|
};
|
|
1856
|
+
/**
|
|
1857
|
+
* What a grant write takes beside its change. `lockMeOut` goes ahead with one you couldn't take
|
|
1858
|
+
* back: it takes your own `manage` at a pattern it names, and is 409 `grant_lockout` without it.
|
|
1859
|
+
*/
|
|
1860
|
+
type GrantWriteOptions = {
|
|
1861
|
+
lockMeOut?: boolean;
|
|
1862
|
+
};
|
|
1784
1863
|
/** What `updateGrant` takes: principals to add, principals to remove (by who they are, environments aside), and a `can` that replaces the grant's. */
|
|
1785
1864
|
type UpdateGrantInput = {
|
|
1786
1865
|
add?: readonly PrincipalInput[];
|
|
@@ -2635,6 +2714,49 @@ declare const routes: {
|
|
|
2635
2714
|
kind: z.ZodLiteral<"everyone">;
|
|
2636
2715
|
}, z.core.$strict>], "kind">>;
|
|
2637
2716
|
can: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>>;
|
|
2717
|
+
lockMeOut: z.ZodOptional<z.ZodBoolean>;
|
|
2718
|
+
}, z.core.$strict>;
|
|
2719
|
+
};
|
|
2720
|
+
/** Several grants in one write, all or none, judged together. */
|
|
2721
|
+
readonly createGrants: {
|
|
2722
|
+
readonly method: 'POST';
|
|
2723
|
+
readonly path: '/grants/batch';
|
|
2724
|
+
readonly body: z.ZodObject<{
|
|
2725
|
+
grants: z.ZodArray<z.ZodObject<{
|
|
2726
|
+
principals: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2727
|
+
kind: z.ZodLiteral<"user">;
|
|
2728
|
+
email: z.ZodOptional<z.ZodString>;
|
|
2729
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
2730
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2731
|
+
kind: z.ZodLiteral<"project">;
|
|
2732
|
+
project: z.ZodString;
|
|
2733
|
+
environments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2734
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2735
|
+
kind: z.ZodLiteral<"github">;
|
|
2736
|
+
repository: z.ZodString;
|
|
2737
|
+
workflow: z.ZodOptional<z.ZodString>;
|
|
2738
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
2739
|
+
event: z.ZodOptional<z.ZodString>;
|
|
2740
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2741
|
+
kind: z.ZodLiteral<"oidc">;
|
|
2742
|
+
issuer: z.ZodString;
|
|
2743
|
+
claims: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
2744
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2745
|
+
kind: z.ZodLiteral<"all-users">;
|
|
2746
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2747
|
+
kind: z.ZodLiteral<"all-projects">;
|
|
2748
|
+
environments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2749
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2750
|
+
kind: z.ZodLiteral<"app">;
|
|
2751
|
+
app: z.ZodString;
|
|
2752
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2753
|
+
kind: z.ZodLiteral<"all-apps">;
|
|
2754
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2755
|
+
kind: z.ZodLiteral<"everyone">;
|
|
2756
|
+
}, z.core.$strict>], "kind">>;
|
|
2757
|
+
can: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>>;
|
|
2758
|
+
}, z.core.$strict>>;
|
|
2759
|
+
lockMeOut: z.ZodOptional<z.ZodBoolean>;
|
|
2638
2760
|
}, z.core.$strict>;
|
|
2639
2761
|
};
|
|
2640
2762
|
readonly updateGrant: {
|
|
@@ -2704,6 +2826,7 @@ declare const routes: {
|
|
|
2704
2826
|
kind: z.ZodLiteral<"everyone">;
|
|
2705
2827
|
}, z.core.$strict>], "kind">>>;
|
|
2706
2828
|
can: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>>>;
|
|
2829
|
+
lockMeOut: z.ZodOptional<z.ZodBoolean>;
|
|
2707
2830
|
}, z.core.$strict>;
|
|
2708
2831
|
};
|
|
2709
2832
|
/** Which grant decides a channel, for the caller or, with `manage` at `*`, a principal it names. */
|
|
@@ -2727,6 +2850,9 @@ declare const routes: {
|
|
|
2727
2850
|
readonly revokeGrant: {
|
|
2728
2851
|
readonly method: 'POST';
|
|
2729
2852
|
readonly path: '/grants/:id/revoke';
|
|
2853
|
+
readonly body: z.ZodOptional<z.ZodObject<{
|
|
2854
|
+
lockMeOut: z.ZodOptional<z.ZodBoolean>;
|
|
2855
|
+
}, z.core.$strict>>;
|
|
2730
2856
|
};
|
|
2731
2857
|
/** Every schema: the built-ins, then the board's own. Anyone the board lets in reads them. */
|
|
2732
2858
|
readonly schemas: {
|
|
@@ -3281,4 +3407,4 @@ declare const routes: {
|
|
|
3281
3407
|
};
|
|
3282
3408
|
type RouteName = keyof typeof routes;
|
|
3283
3409
|
//#endregion
|
|
3284
|
-
export {
|
|
3410
|
+
export { MessageView as $, TasksQueryInput as $t, FailTaskBody as A, Actor as An, SourceJoinBody as At, InboxEntry as B, Link as Bn, SyncImportBody as Bt, Discovery as C, PERMISSIONS as Cn, SchedulesQuery as Ct, EventsQueryInput as D, compileAccess as Dn, SchemaInput as Dt, EventsQuery as E, checkGrantChange as En, SchemaBody as Et, GrantInput as F, Labels as Fn, SyncCopiesQuery as Ft, LABEL_CONDITIONS_MAX as G, SyncedView as Gt, InboxNextQuery as H, SyncReceiptBody as Ht, GrantView as I, ExternalAuthor as In, SyncCopiesView as It, LinkView as J, TaskClaim as Jt, LEASE_DEFAULT_S as K, THREADS_LIMIT_DEFAULT as Kt, GrantWriteOptions as L, ExternalEvent as Ln, SyncFindInput as Lt, GRANT_BATCH_MAX as M, Attachment as Mn, SourceRead as Mt, GrantBody as N, Author as Nn, SourceReadQuery as Nt, ExplainQuery as O, parseCan as On, SchemaView as Ot, GrantCan as P, CAN_MAX as Pn, SyncBody as Pt, Me as Q, TasksQuery as Qt, INBOX_EVENT_ID_MAX as R, ExternalFile as Rn, SyncFindQuery as Rt, DeleteBody as S, Level as Sn, ScheduleView as St, EventsPage as T, WrittenCan as Tn, SchedulesQueryOutput as Tt, InboxPushBody as U, SyncReceiptInput as Ut, InboxItem as V, SyncImportInput as Vt, InboxQuery as W, SyncThreadView as Wt, MatchView as X, TaskView as Xt, LinkedQuery as Y, TaskNeedsBody as Yt, MatchesQuery as Z, TasksPage as Zt, CreateTaskBody as _, Grant as _n, RevokeGrantBody as _t, BlockTaskBody as a, TypingBody as an, PostInput as at, CreateTasksInput as b, GrantShape as bn, ScheduleBodyOutput as bt, CanAt as c, UpdateGrantInput as cn, REGISTERED_WATCHERS_MAX as ct, ClaimReadyTaskBody as d, routes as dn, RegisterBody as dt, ThreadSummaryView as en, MessagesPage as et, ClaimReadyTaskInput as f, Access as fn, RegisterInput as ft, CreateGrantsBody as g, FULL_ACCESS as gn, ResolvedSyncTarget as gt, CreateChannelBody as h, ChannelPattern as hn, RenewTaskBody as ht, AssignTaskBody as i, ThreadsQueryInput as in, PostBody as it, FiltersInput as j, ExternalCopy as jn, SourceMessage as jt, Explanation as k, union as kn, SourceJoin as kt, CancelTaskBody as l, UploadStartBody as ln, ReactBody as lt, CompleteTaskBody as m, Can as mn, ReleaseTaskBody as mt, ActorView as n, ThreadsPage as nn, MessagesQueryInput as nt, BlockView as o, TypingResult as on, PrincipalInput as ot, ClaimTaskBody as p, AccessSummary as pn, RegistrationView as pt, LabelBody as q, THREADS_LIMIT_MAX as qt, ApiError as r, ThreadsQuery as rn, ParsedFilters as rt, BoardEventView as s, UpdateGrantBody as sn, PrincipalView as st, AckBody as t, ThreadView as tn, MessagesQuery as tt, ChannelView as u, UploadTicket as un, Ref as ut, CreateTaskInput as v, GrantChange as vn, RouteName as vt, EditBody as w, Permission as wn, SchedulesQueryInput as wt, CreatedTasksQuery as x, InvalidCan as xn, ScheduleInput as xt, CreateTasksBody as y, GrantChangeRefusal as yn, ScheduleBody as yt, InboxAckBody as z, ExternalLink as zn, SyncFindView as zt };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
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-
|
|
3
|
-
import { a as Link, i as ExternalTarget, n as ExternalEvent, o as Origin, t as ExternalAuthor } from "./external-
|
|
1
|
+
import { a as DIRECT_UPLOAD_BYTES_MAX } from "./profile-header-Cj0Cb1cf.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-TeVe4Udh.mjs";
|
|
3
|
+
import { a as Link, i as ExternalTarget, n as ExternalEvent, o as Origin, t as ExternalAuthor } from "./external-BLI4W_-V.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/api/routes.ts
|
|
6
6
|
/**
|
|
@@ -328,11 +328,29 @@ const PrincipalInput = z.discriminatedUnion("kind", [
|
|
|
328
328
|
]);
|
|
329
329
|
/** What a grant lets its principals do: a map from channel pattern to `'all'` or a list, `[]` for none. Kept as written. */
|
|
330
330
|
const GrantCan = z.record(z.string().min(1).max(CHANNEL_PATTERN_MAX), CanGrant);
|
|
331
|
+
/**
|
|
332
|
+
* Says to go ahead with a grant change its caller couldn't take back: one that takes their own
|
|
333
|
+
* `manage` at a pattern it names, which is 409 `grant_lockout` without it.
|
|
334
|
+
*/
|
|
335
|
+
const LockMeOut = z.boolean().optional();
|
|
331
336
|
/** A grant: who it names, and one `can` for all of them. The same principals again are another grant. */
|
|
332
|
-
const
|
|
337
|
+
const GrantSpec = z.strictObject({
|
|
333
338
|
principals: z.array(PrincipalInput).min(1).max(32),
|
|
334
339
|
can: GrantCan
|
|
335
340
|
});
|
|
341
|
+
/** What `POST /grants` takes: a grant, and `lockMeOut` to make one its caller couldn't take back. */
|
|
342
|
+
const GrantBody = GrantSpec.extend({ lockMeOut: LockMeOut });
|
|
343
|
+
/**
|
|
344
|
+
* Several grants made in one write, all of them or none, judged together: each by the grants as
|
|
345
|
+
* they are, and what it leaves its caller with by the grants as they'd be with all of them. So a
|
|
346
|
+
* lock and the grant that keeps its maker in go in one request, in any order.
|
|
347
|
+
*/
|
|
348
|
+
const CreateGrantsBody = z.strictObject({
|
|
349
|
+
grants: z.array(GrantSpec).min(1).max(16),
|
|
350
|
+
lockMeOut: LockMeOut
|
|
351
|
+
});
|
|
352
|
+
/** What revoking a grant takes: nothing, or `lockMeOut`. */
|
|
353
|
+
const RevokeGrantBody = z.strictObject({ lockMeOut: LockMeOut }).optional();
|
|
336
354
|
/**
|
|
337
355
|
* Which grant decides a channel, and what it gives, for the caller or a principal it names: a
|
|
338
356
|
* `user` (by email, or by ID where the board can't look one up), a `project` in one `environment`
|
|
@@ -362,7 +380,8 @@ const ExplainQuery = z.object({
|
|
|
362
380
|
const UpdateGrantBody = z.strictObject({
|
|
363
381
|
add: z.array(PrincipalInput).min(1).max(32).optional(),
|
|
364
382
|
remove: z.array(PrincipalInput).min(1).max(32).optional(),
|
|
365
|
-
can: GrantCan.optional()
|
|
383
|
+
can: GrantCan.optional(),
|
|
384
|
+
lockMeOut: LockMeOut
|
|
366
385
|
}).refine((body) => body.add !== void 0 || body.remove !== void 0 || body.can !== void 0, "name principals to add or remove, or a can");
|
|
367
386
|
/**
|
|
368
387
|
* A schema version to register, for good: `name` and `version` are its ID (`sandbox@1`), and
|
|
@@ -838,6 +857,12 @@ const routes = {
|
|
|
838
857
|
path: "/grants",
|
|
839
858
|
body: GrantBody
|
|
840
859
|
},
|
|
860
|
+
/** Several grants in one write, all or none, judged together. */
|
|
861
|
+
createGrants: {
|
|
862
|
+
method: "POST",
|
|
863
|
+
path: "/grants/batch",
|
|
864
|
+
body: CreateGrantsBody
|
|
865
|
+
},
|
|
841
866
|
updateGrant: {
|
|
842
867
|
method: "PATCH",
|
|
843
868
|
path: "/grants/:id",
|
|
@@ -851,7 +876,8 @@ const routes = {
|
|
|
851
876
|
},
|
|
852
877
|
revokeGrant: {
|
|
853
878
|
method: "POST",
|
|
854
|
-
path: "/grants/:id/revoke"
|
|
879
|
+
path: "/grants/:id/revoke",
|
|
880
|
+
body: RevokeGrantBody
|
|
855
881
|
},
|
|
856
882
|
/** Every schema: the built-ins, then the board's own. Anyone the board lets in reads them. */
|
|
857
883
|
schemas: {
|
|
@@ -1005,4 +1031,4 @@ const routes = {
|
|
|
1005
1031
|
}
|
|
1006
1032
|
};
|
|
1007
1033
|
//#endregion
|
|
1008
|
-
export {
|
|
1034
|
+
export { Ref as A, SyncBody as B, InboxQuery as C, MessagesQuery as D, MatchesQuery as E, ScheduleBody as F, TaskNeedsBody as G, SyncFindQuery as H, SchedulesQuery as I, TypingBody as J, TasksQuery as K, SchemaBody as L, ReleaseTaskBody as M, RenewTaskBody as N, PostBody as O, RevokeGrantBody as P, SourceJoinBody as R, InboxPushBody as S, LinkedQuery as T, SyncImportBody as U, SyncCopiesQuery as V, SyncReceiptBody as W, UploadStartBody as X, UpdateGrantBody as Y, routes as Z, FailTaskBody as _, ClaimReadyTaskBody as a, InboxAckBody as b, CreateChannelBody as c, CreateTasksBody as d, CreatedTasksQuery as f, ExplainQuery as g, EventsQuery as h, CancelTaskBody as i, RegisterBody as j, ReactBody as k, CreateGrantsBody as l, EditBody as m, AssignTaskBody as n, ClaimTaskBody as o, DeleteBody as p, ThreadsQuery as q, BlockTaskBody as r, CompleteTaskBody as s, AckBody as t, CreateTaskBody as u, Filters as v, LabelBody as w, InboxNextQuery as x, GrantBody as y, SourceReadQuery as z };
|
|
@@ -34,8 +34,10 @@ const MessageId = z.number().int().positive();
|
|
|
34
34
|
*/
|
|
35
35
|
const INHERITED = /* @__PURE__ */ new Set([...Object.getOwnPropertyNames(Object.prototype), "prototype"]);
|
|
36
36
|
const notInherited = (name) => !INHERITED.has(name);
|
|
37
|
-
|
|
38
|
-
const
|
|
37
|
+
/** What a refused key is told: the key itself, and the rule, so the next try needn't guess it. */
|
|
38
|
+
const notALabelKey = (issue) => `${JSON.stringify(String(issue.input))} isn't a label key: one is 1 to 64 lowercase letters, numbers, ., _, and -, starting with a letter or number`;
|
|
39
|
+
const LabelKey = z.string().max(64, { error: notALabelKey }).regex(/^[a-z0-9][a-z0-9_.-]*$/, { error: notALabelKey }).refine(notInherited, "label key is a reserved name");
|
|
40
|
+
const LabelValue = z.string().max(256, { error: (issue) => `a label value is at most 256 characters, and this one has ${String(issue.input).length}` }).refine(storable, "label value has a NUL character or a lone surrogate");
|
|
39
41
|
const Labels = z.record(LabelKey, LabelValue);
|
|
40
42
|
/** Normalized short names, as Chat SDK names them: `eyes`, `check`, `thumbs_up`. */
|
|
41
43
|
const Emoji = z.string().max(64).regex(/^[a-z0-9_+-]+$/, "invalid emoji name").refine(notInherited, "emoji name is a reserved name");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { f as BoardError, p as createBoardClient, t as HttpError } from "./errors-
|
|
2
|
-
import { i as LOGINS, r as LOGIN } from "./auth-
|
|
3
|
-
import { p as localTokenFile, t as board } from "./server-
|
|
4
|
-
import { t as oidcTokens } from "./tokens-
|
|
5
|
-
import { t as local } from "./local-
|
|
1
|
+
import { f as BoardError, p as createBoardClient, t as HttpError } from "./errors-DwV7I0g4.mjs";
|
|
2
|
+
import { i as LOGINS, r as LOGIN } from "./auth-CEU06Nyp.mjs";
|
|
3
|
+
import { p as localTokenFile, t as board } from "./server-V7qyVUiJ.mjs";
|
|
4
|
+
import { t as oidcTokens } from "./tokens-BmCDAT4N.mjs";
|
|
5
|
+
import { t as local } from "./local-DPpSEq2_.mjs";
|
|
6
6
|
import { mkdir, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
7
7
|
import { userInfo } from "node:os";
|
|
8
8
|
import { dirname, join, resolve } from "node:path";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./schemas-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { n as formatProfileHeader } from "./profile-header-Cj0Cb1cf.mjs";
|
|
2
|
+
import "./schemas-TeVe4Udh.mjs";
|
|
3
|
+
import { Z as routes } from "./routes-qS92xz8U.mjs";
|
|
4
|
+
import { f as BoardError, p as createBoardClient, t as HttpError } from "./errors-DwV7I0g4.mjs";
|
|
5
|
+
import { g as keyId, p as DERIVED_ID } from "./middleware-ysFm2S4v.mjs";
|
|
6
|
+
import { l as METHODS, o as compileWatcher } from "./task-batch-CujTLmTB.mjs";
|
|
7
|
+
import { c as PROTOCOL_ROUTES, d as deployedOnVercel, l as withoutToken, o as createVercel, r as createBoard, u as tailWatchers } from "./exports-DLzyKwEp.mjs";
|
|
7
8
|
import { execFile } from "node:child_process";
|
|
8
9
|
import { createHash } from "node:crypto";
|
|
9
10
|
import { mkdir, readFile, readdir, stat, unlink, writeFile } from "node:fs/promises";
|
|
@@ -659,7 +660,8 @@ const describe = (error) => ((error instanceof Error ? error.message : String(er
|
|
|
659
660
|
const rethrow = (error) => {
|
|
660
661
|
if (error instanceof BoardError) throw new HttpError(error.status >= 400 ? error.status : 502, error.code, error.message, {
|
|
661
662
|
...error.hint !== void 0 ? { hint: error.hint } : {},
|
|
662
|
-
origin: error.origin
|
|
663
|
+
origin: error.origin,
|
|
664
|
+
...error.retryAfter !== void 0 ? { retryAfter: error.retryAfter } : {}
|
|
663
665
|
});
|
|
664
666
|
if (error instanceof HttpError || error instanceof Error && error.name === "AbortError") throw error;
|
|
665
667
|
throw new HttpError(502, "unreachable", `the board didn't answer: ${describe(error)}`);
|
|
@@ -1008,8 +1010,8 @@ function vercel(options = {}) {
|
|
|
1008
1010
|
function board(options = {}) {
|
|
1009
1011
|
return createBoard(options, {
|
|
1010
1012
|
backend: (fetch) => process.env.BOARD_URL?.trim() ? http() : vercel(fetch ? { fetch } : {}),
|
|
1011
|
-
sync: () => import("./engine-
|
|
1012
|
-
serving: () => import("./serving-
|
|
1013
|
+
sync: () => import("./engine-BH_nfJ3N.mjs"),
|
|
1014
|
+
serving: () => import("./serving-BzNxlnDV.mjs"),
|
|
1013
1015
|
sandbox: (url, token) => sandboxHeaders(url, url, token)
|
|
1014
1016
|
});
|
|
1015
1017
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as ownTeamId, n as discoveryIdentity, r as ownProjectId, t as oidcTokens } from "./tokens-
|
|
1
|
+
import { i as ownTeamId, n as discoveryIdentity, r as ownProjectId, t as oidcTokens } from "./tokens-BmCDAT4N.mjs";
|
|
2
2
|
export { discoveryIdentity, oidcTokens, ownProjectId, ownTeamId };
|