@tearleads/client-sdk 0.1.68 → 0.1.69
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/data/containers/shared/principalPolicies.js +8 -12
- package/data/containers/shared/principalPolicies.js.map +1 -1
- package/internal/validators/operation/attachments.d.ts +48 -8
- package/internal/validators/operation/auth.d.ts +456 -76
- package/internal/validators/operation/containerMutations.d.ts +264 -44
- package/internal/validators/operation/documentMutations.d.ts +72 -12
- package/internal/validators/operation/documentSync.d.ts +24 -4
- package/internal/validators/operation/organizations.d.ts +528 -88
- package/internal/validators/operation/principals.d.ts +96 -16
- package/internal/validators/request/blob.d.ts +48 -8
- package/internal/validators/request/container.d.ts +96 -16
- package/internal/validators/request/container.js +5 -2
- package/internal/validators/request/container.js.map +1 -1
- package/internal/validators/request/containerMetadata.d.ts +96 -16
- package/internal/validators/request/document.d.ts +60 -10
- package/internal/validators/request/documentSyncSchema.d.ts +24 -4
- package/internal/validators/request/documentSyncSchema.js +2 -1
- package/internal/validators/request/documentSyncSchema.js.map +1 -1
- package/internal/validators/request/index.d.ts +1 -0
- package/internal/validators/request/index.js +1 -0
- package/internal/validators/request/index.js.map +1 -1
- package/internal/validators/request/organization.d.ts +96 -16
- package/internal/validators/request/organizationProvisioning.d.ts +1456 -246
- package/internal/validators/request/principal.d.ts +120 -20
- package/internal/validators/request/principalPolicyRef.d.ts +42 -0
- package/internal/validators/request/principalPolicyRef.js +19 -0
- package/internal/validators/request/principalPolicyRef.js.map +1 -0
- package/internal/validators/request/registration.d.ts +456 -76
- package/internal/validators/util/containerLimits.d.ts +8 -0
- package/internal/validators/util/containerLimits.js +8 -0
- package/internal/validators/util/containerLimits.js.map +1 -1
- package/package.json +1 -1
- package/workflows/containers/child/mutationRequestCore.js +2 -2
- package/workflows/containers/child/mutationRequestCore.js.map +1 -1
- package/workflows/containers/child/recitePlan.js +2 -2
- package/workflows/containers/child/recitePlan.js.map +1 -1
- package/workflows/containers/root/create.js +17 -28
- package/workflows/containers/root/create.js.map +1 -1
- package/workflows/containers/root/initialGroupPolicy.js +0 -23
- package/workflows/containers/root/initialGroupPolicy.js.map +1 -1
- package/workflows/documents/syncFailures/syncPolicyRepair.js +2 -8
- package/workflows/documents/syncFailures/syncPolicyRepair.js.map +1 -1
- package/workflows/registration/provisioningBootstrapBuilders.d.ts +12 -2
|
@@ -626,7 +626,12 @@ export declare const putPrincipalPolicyOperation: Omit<{
|
|
|
626
626
|
keyring: Record<string, unknown> | null;
|
|
627
627
|
manifest: Record<string, unknown>;
|
|
628
628
|
predecessorBridge: Record<string, unknown> | null;
|
|
629
|
-
|
|
629
|
+
principalPolicyRefs: {
|
|
630
|
+
principalType: "group" | "organization";
|
|
631
|
+
principalId: string;
|
|
632
|
+
version: number;
|
|
633
|
+
stateHash: string;
|
|
634
|
+
}[];
|
|
630
635
|
wraps: Record<string, unknown>[];
|
|
631
636
|
containerManifestHistoryRefs?: {
|
|
632
637
|
containerId: string;
|
|
@@ -708,7 +713,12 @@ export declare const putPrincipalPolicyOperation: Omit<{
|
|
|
708
713
|
keyring: Record<string, unknown> | null;
|
|
709
714
|
manifest: Record<string, unknown>;
|
|
710
715
|
predecessorBridge: Record<string, unknown> | null;
|
|
711
|
-
|
|
716
|
+
principalPolicyRefs: {
|
|
717
|
+
principalType: "group" | "organization";
|
|
718
|
+
principalId: string;
|
|
719
|
+
version: number;
|
|
720
|
+
stateHash: string;
|
|
721
|
+
}[];
|
|
712
722
|
wraps: Record<string, unknown>[];
|
|
713
723
|
containerManifestHistoryRefs?: {
|
|
714
724
|
containerId: string;
|
|
@@ -790,7 +800,12 @@ export declare const putPrincipalPolicyOperation: Omit<{
|
|
|
790
800
|
keyring: Record<string, unknown> | null;
|
|
791
801
|
manifest: Record<string, unknown>;
|
|
792
802
|
predecessorBridge: Record<string, unknown> | null;
|
|
793
|
-
|
|
803
|
+
principalPolicyRefs: {
|
|
804
|
+
principalType: "group" | "organization";
|
|
805
|
+
principalId: string;
|
|
806
|
+
version: number;
|
|
807
|
+
stateHash: string;
|
|
808
|
+
}[];
|
|
794
809
|
wraps: Record<string, unknown>[];
|
|
795
810
|
containerManifestHistoryRefs?: {
|
|
796
811
|
containerId: string;
|
|
@@ -872,7 +887,12 @@ export declare const putPrincipalPolicyOperation: Omit<{
|
|
|
872
887
|
keyring: Record<string, unknown> | null;
|
|
873
888
|
manifest: Record<string, unknown>;
|
|
874
889
|
predecessorBridge: Record<string, unknown> | null;
|
|
875
|
-
|
|
890
|
+
principalPolicyRefs: {
|
|
891
|
+
principalType: "group" | "organization";
|
|
892
|
+
principalId: string;
|
|
893
|
+
version: number;
|
|
894
|
+
stateHash: string;
|
|
895
|
+
}[];
|
|
876
896
|
wraps: Record<string, unknown>[];
|
|
877
897
|
containerManifestHistoryRefs?: {
|
|
878
898
|
containerId: string;
|
|
@@ -1693,7 +1713,12 @@ export declare const commitOrganizationGroupPolicyOperation: Omit<{
|
|
|
1693
1713
|
keyring: Record<string, unknown> | null;
|
|
1694
1714
|
manifest: Record<string, unknown>;
|
|
1695
1715
|
predecessorBridge: Record<string, unknown> | null;
|
|
1696
|
-
|
|
1716
|
+
principalPolicyRefs: {
|
|
1717
|
+
principalType: "group" | "organization";
|
|
1718
|
+
principalId: string;
|
|
1719
|
+
version: number;
|
|
1720
|
+
stateHash: string;
|
|
1721
|
+
}[];
|
|
1697
1722
|
wraps: Record<string, unknown>[];
|
|
1698
1723
|
containerManifestHistoryRefs?: {
|
|
1699
1724
|
containerId: string;
|
|
@@ -1776,7 +1801,12 @@ export declare const commitOrganizationGroupPolicyOperation: Omit<{
|
|
|
1776
1801
|
keyring: Record<string, unknown> | null;
|
|
1777
1802
|
manifest: Record<string, unknown>;
|
|
1778
1803
|
predecessorBridge: Record<string, unknown> | null;
|
|
1779
|
-
|
|
1804
|
+
principalPolicyRefs: {
|
|
1805
|
+
principalType: "group" | "organization";
|
|
1806
|
+
principalId: string;
|
|
1807
|
+
version: number;
|
|
1808
|
+
stateHash: string;
|
|
1809
|
+
}[];
|
|
1780
1810
|
wraps: Record<string, unknown>[];
|
|
1781
1811
|
containerManifestHistoryRefs?: {
|
|
1782
1812
|
containerId: string;
|
|
@@ -1859,7 +1889,12 @@ export declare const commitOrganizationGroupPolicyOperation: Omit<{
|
|
|
1859
1889
|
keyring: Record<string, unknown> | null;
|
|
1860
1890
|
manifest: Record<string, unknown>;
|
|
1861
1891
|
predecessorBridge: Record<string, unknown> | null;
|
|
1862
|
-
|
|
1892
|
+
principalPolicyRefs: {
|
|
1893
|
+
principalType: "group" | "organization";
|
|
1894
|
+
principalId: string;
|
|
1895
|
+
version: number;
|
|
1896
|
+
stateHash: string;
|
|
1897
|
+
}[];
|
|
1863
1898
|
wraps: Record<string, unknown>[];
|
|
1864
1899
|
containerManifestHistoryRefs?: {
|
|
1865
1900
|
containerId: string;
|
|
@@ -1943,7 +1978,12 @@ export declare const commitOrganizationGroupPolicyOperation: Omit<{
|
|
|
1943
1978
|
keyring: Record<string, unknown> | null;
|
|
1944
1979
|
manifest: Record<string, unknown>;
|
|
1945
1980
|
predecessorBridge: Record<string, unknown> | null;
|
|
1946
|
-
|
|
1981
|
+
principalPolicyRefs: {
|
|
1982
|
+
principalType: "group" | "organization";
|
|
1983
|
+
principalId: string;
|
|
1984
|
+
version: number;
|
|
1985
|
+
stateHash: string;
|
|
1986
|
+
}[];
|
|
1947
1987
|
wraps: Record<string, unknown>[];
|
|
1948
1988
|
containerManifestHistoryRefs?: {
|
|
1949
1989
|
containerId: string;
|
|
@@ -2026,7 +2066,12 @@ export declare const commitOrganizationGroupPolicyOperation: Omit<{
|
|
|
2026
2066
|
keyring: Record<string, unknown> | null;
|
|
2027
2067
|
manifest: Record<string, unknown>;
|
|
2028
2068
|
predecessorBridge: Record<string, unknown> | null;
|
|
2029
|
-
|
|
2069
|
+
principalPolicyRefs: {
|
|
2070
|
+
principalType: "group" | "organization";
|
|
2071
|
+
principalId: string;
|
|
2072
|
+
version: number;
|
|
2073
|
+
stateHash: string;
|
|
2074
|
+
}[];
|
|
2030
2075
|
wraps: Record<string, unknown>[];
|
|
2031
2076
|
containerManifestHistoryRefs?: {
|
|
2032
2077
|
containerId: string;
|
|
@@ -2109,7 +2154,12 @@ export declare const commitOrganizationGroupPolicyOperation: Omit<{
|
|
|
2109
2154
|
keyring: Record<string, unknown> | null;
|
|
2110
2155
|
manifest: Record<string, unknown>;
|
|
2111
2156
|
predecessorBridge: Record<string, unknown> | null;
|
|
2112
|
-
|
|
2157
|
+
principalPolicyRefs: {
|
|
2158
|
+
principalType: "group" | "organization";
|
|
2159
|
+
principalId: string;
|
|
2160
|
+
version: number;
|
|
2161
|
+
stateHash: string;
|
|
2162
|
+
}[];
|
|
2113
2163
|
wraps: Record<string, unknown>[];
|
|
2114
2164
|
containerManifestHistoryRefs?: {
|
|
2115
2165
|
containerId: string;
|
|
@@ -2193,7 +2243,12 @@ export declare const commitOrganizationGroupPolicyOperation: Omit<{
|
|
|
2193
2243
|
keyring: Record<string, unknown> | null;
|
|
2194
2244
|
manifest: Record<string, unknown>;
|
|
2195
2245
|
predecessorBridge: Record<string, unknown> | null;
|
|
2196
|
-
|
|
2246
|
+
principalPolicyRefs: {
|
|
2247
|
+
principalType: "group" | "organization";
|
|
2248
|
+
principalId: string;
|
|
2249
|
+
version: number;
|
|
2250
|
+
stateHash: string;
|
|
2251
|
+
}[];
|
|
2197
2252
|
wraps: Record<string, unknown>[];
|
|
2198
2253
|
containerManifestHistoryRefs?: {
|
|
2199
2254
|
containerId: string;
|
|
@@ -2276,7 +2331,12 @@ export declare const commitOrganizationGroupPolicyOperation: Omit<{
|
|
|
2276
2331
|
keyring: Record<string, unknown> | null;
|
|
2277
2332
|
manifest: Record<string, unknown>;
|
|
2278
2333
|
predecessorBridge: Record<string, unknown> | null;
|
|
2279
|
-
|
|
2334
|
+
principalPolicyRefs: {
|
|
2335
|
+
principalType: "group" | "organization";
|
|
2336
|
+
principalId: string;
|
|
2337
|
+
version: number;
|
|
2338
|
+
stateHash: string;
|
|
2339
|
+
}[];
|
|
2280
2340
|
wraps: Record<string, unknown>[];
|
|
2281
2341
|
containerManifestHistoryRefs?: {
|
|
2282
2342
|
containerId: string;
|
|
@@ -2359,7 +2419,12 @@ export declare const commitOrganizationGroupPolicyOperation: Omit<{
|
|
|
2359
2419
|
keyring: Record<string, unknown> | null;
|
|
2360
2420
|
manifest: Record<string, unknown>;
|
|
2361
2421
|
predecessorBridge: Record<string, unknown> | null;
|
|
2362
|
-
|
|
2422
|
+
principalPolicyRefs: {
|
|
2423
|
+
principalType: "group" | "organization";
|
|
2424
|
+
principalId: string;
|
|
2425
|
+
version: number;
|
|
2426
|
+
stateHash: string;
|
|
2427
|
+
}[];
|
|
2363
2428
|
wraps: Record<string, unknown>[];
|
|
2364
2429
|
containerManifestHistoryRefs?: {
|
|
2365
2430
|
containerId: string;
|
|
@@ -2443,7 +2508,12 @@ export declare const commitOrganizationGroupPolicyOperation: Omit<{
|
|
|
2443
2508
|
keyring: Record<string, unknown> | null;
|
|
2444
2509
|
manifest: Record<string, unknown>;
|
|
2445
2510
|
predecessorBridge: Record<string, unknown> | null;
|
|
2446
|
-
|
|
2511
|
+
principalPolicyRefs: {
|
|
2512
|
+
principalType: "group" | "organization";
|
|
2513
|
+
principalId: string;
|
|
2514
|
+
version: number;
|
|
2515
|
+
stateHash: string;
|
|
2516
|
+
}[];
|
|
2447
2517
|
wraps: Record<string, unknown>[];
|
|
2448
2518
|
containerManifestHistoryRefs?: {
|
|
2449
2519
|
containerId: string;
|
|
@@ -2526,7 +2596,12 @@ export declare const commitOrganizationGroupPolicyOperation: Omit<{
|
|
|
2526
2596
|
keyring: Record<string, unknown> | null;
|
|
2527
2597
|
manifest: Record<string, unknown>;
|
|
2528
2598
|
predecessorBridge: Record<string, unknown> | null;
|
|
2529
|
-
|
|
2599
|
+
principalPolicyRefs: {
|
|
2600
|
+
principalType: "group" | "organization";
|
|
2601
|
+
principalId: string;
|
|
2602
|
+
version: number;
|
|
2603
|
+
stateHash: string;
|
|
2604
|
+
}[];
|
|
2530
2605
|
wraps: Record<string, unknown>[];
|
|
2531
2606
|
containerManifestHistoryRefs?: {
|
|
2532
2607
|
containerId: string;
|
|
@@ -2609,7 +2684,12 @@ export declare const commitOrganizationGroupPolicyOperation: Omit<{
|
|
|
2609
2684
|
keyring: Record<string, unknown> | null;
|
|
2610
2685
|
manifest: Record<string, unknown>;
|
|
2611
2686
|
predecessorBridge: Record<string, unknown> | null;
|
|
2612
|
-
|
|
2687
|
+
principalPolicyRefs: {
|
|
2688
|
+
principalType: "group" | "organization";
|
|
2689
|
+
principalId: string;
|
|
2690
|
+
version: number;
|
|
2691
|
+
stateHash: string;
|
|
2692
|
+
}[];
|
|
2613
2693
|
wraps: Record<string, unknown>[];
|
|
2614
2694
|
containerManifestHistoryRefs?: {
|
|
2615
2695
|
containerId: string;
|
|
@@ -172,7 +172,12 @@ export declare const BlobAttachmentBindRequestSchema: z.ZodType<{
|
|
|
172
172
|
keyring: Record<string, unknown> | null;
|
|
173
173
|
manifest: Record<string, unknown>;
|
|
174
174
|
predecessorBridge: Record<string, unknown> | null;
|
|
175
|
-
|
|
175
|
+
principalPolicyRefs: {
|
|
176
|
+
principalType: "group" | "organization";
|
|
177
|
+
principalId: string;
|
|
178
|
+
version: number;
|
|
179
|
+
stateHash: string;
|
|
180
|
+
}[];
|
|
176
181
|
wraps: Record<string, unknown>[];
|
|
177
182
|
containerManifestHistoryRefs?: {
|
|
178
183
|
containerId: string;
|
|
@@ -230,7 +235,12 @@ export declare const BlobAttachmentBindRequestSchema: z.ZodType<{
|
|
|
230
235
|
keyring: Record<string, unknown> | null;
|
|
231
236
|
manifest: Record<string, unknown>;
|
|
232
237
|
predecessorBridge: Record<string, unknown> | null;
|
|
233
|
-
|
|
238
|
+
principalPolicyRefs: {
|
|
239
|
+
principalType: "group" | "organization";
|
|
240
|
+
principalId: string;
|
|
241
|
+
version: number;
|
|
242
|
+
stateHash: string;
|
|
243
|
+
}[];
|
|
234
244
|
wraps: Record<string, unknown>[];
|
|
235
245
|
containerManifestHistoryRefs?: {
|
|
236
246
|
containerId: string;
|
|
@@ -288,7 +298,12 @@ export declare const BlobAttachmentBindRequestSchema: z.ZodType<{
|
|
|
288
298
|
keyring: Record<string, unknown> | null;
|
|
289
299
|
manifest: Record<string, unknown>;
|
|
290
300
|
predecessorBridge: Record<string, unknown> | null;
|
|
291
|
-
|
|
301
|
+
principalPolicyRefs: {
|
|
302
|
+
principalType: "group" | "organization";
|
|
303
|
+
principalId: string;
|
|
304
|
+
version: number;
|
|
305
|
+
stateHash: string;
|
|
306
|
+
}[];
|
|
292
307
|
wraps: Record<string, unknown>[];
|
|
293
308
|
containerManifestHistoryRefs?: {
|
|
294
309
|
containerId: string;
|
|
@@ -346,7 +361,12 @@ export declare const BlobAttachmentBindRequestSchema: z.ZodType<{
|
|
|
346
361
|
keyring: Record<string, unknown> | null;
|
|
347
362
|
manifest: Record<string, unknown>;
|
|
348
363
|
predecessorBridge: Record<string, unknown> | null;
|
|
349
|
-
|
|
364
|
+
principalPolicyRefs: {
|
|
365
|
+
principalType: "group" | "organization";
|
|
366
|
+
principalId: string;
|
|
367
|
+
version: number;
|
|
368
|
+
stateHash: string;
|
|
369
|
+
}[];
|
|
350
370
|
wraps: Record<string, unknown>[];
|
|
351
371
|
containerManifestHistoryRefs?: {
|
|
352
372
|
containerId: string;
|
|
@@ -392,7 +412,12 @@ export declare const BlobAttachmentDetachRequestSchema: z.ZodType<{
|
|
|
392
412
|
keyring: Record<string, unknown> | null;
|
|
393
413
|
manifest: Record<string, unknown>;
|
|
394
414
|
predecessorBridge: Record<string, unknown> | null;
|
|
395
|
-
|
|
415
|
+
principalPolicyRefs: {
|
|
416
|
+
principalType: "group" | "organization";
|
|
417
|
+
principalId: string;
|
|
418
|
+
version: number;
|
|
419
|
+
stateHash: string;
|
|
420
|
+
}[];
|
|
396
421
|
wraps: Record<string, unknown>[];
|
|
397
422
|
containerManifestHistoryRefs?: {
|
|
398
423
|
containerId: string;
|
|
@@ -432,7 +457,12 @@ export declare const BlobAttachmentDetachRequestSchema: z.ZodType<{
|
|
|
432
457
|
keyring: Record<string, unknown> | null;
|
|
433
458
|
manifest: Record<string, unknown>;
|
|
434
459
|
predecessorBridge: Record<string, unknown> | null;
|
|
435
|
-
|
|
460
|
+
principalPolicyRefs: {
|
|
461
|
+
principalType: "group" | "organization";
|
|
462
|
+
principalId: string;
|
|
463
|
+
version: number;
|
|
464
|
+
stateHash: string;
|
|
465
|
+
}[];
|
|
436
466
|
wraps: Record<string, unknown>[];
|
|
437
467
|
containerManifestHistoryRefs?: {
|
|
438
468
|
containerId: string;
|
|
@@ -472,7 +502,12 @@ export declare const BlobAttachmentDetachRequestSchema: z.ZodType<{
|
|
|
472
502
|
keyring: Record<string, unknown> | null;
|
|
473
503
|
manifest: Record<string, unknown>;
|
|
474
504
|
predecessorBridge: Record<string, unknown> | null;
|
|
475
|
-
|
|
505
|
+
principalPolicyRefs: {
|
|
506
|
+
principalType: "group" | "organization";
|
|
507
|
+
principalId: string;
|
|
508
|
+
version: number;
|
|
509
|
+
stateHash: string;
|
|
510
|
+
}[];
|
|
476
511
|
wraps: Record<string, unknown>[];
|
|
477
512
|
containerManifestHistoryRefs?: {
|
|
478
513
|
containerId: string;
|
|
@@ -512,7 +547,12 @@ export declare const BlobAttachmentDetachRequestSchema: z.ZodType<{
|
|
|
512
547
|
keyring: Record<string, unknown> | null;
|
|
513
548
|
manifest: Record<string, unknown>;
|
|
514
549
|
predecessorBridge: Record<string, unknown> | null;
|
|
515
|
-
|
|
550
|
+
principalPolicyRefs: {
|
|
551
|
+
principalType: "group" | "organization";
|
|
552
|
+
principalId: string;
|
|
553
|
+
version: number;
|
|
554
|
+
stateHash: string;
|
|
555
|
+
}[];
|
|
516
556
|
wraps: Record<string, unknown>[];
|
|
517
557
|
containerManifestHistoryRefs?: {
|
|
518
558
|
containerId: string;
|
|
@@ -7,7 +7,12 @@ export declare const ContainerMutationRequestSchema: z.ZodType<{
|
|
|
7
7
|
keyring: Record<string, unknown> | null;
|
|
8
8
|
manifest: Record<string, unknown>;
|
|
9
9
|
predecessorBridge: Record<string, unknown> | null;
|
|
10
|
-
|
|
10
|
+
principalPolicyRefs: {
|
|
11
|
+
principalType: "group" | "organization";
|
|
12
|
+
principalId: string;
|
|
13
|
+
version: number;
|
|
14
|
+
stateHash: string;
|
|
15
|
+
}[];
|
|
11
16
|
wraps: Record<string, unknown>[];
|
|
12
17
|
containerManifestHistoryRefs?: {
|
|
13
18
|
containerId: string;
|
|
@@ -39,7 +44,12 @@ export declare const ContainerMutationRequestSchema: z.ZodType<{
|
|
|
39
44
|
keyring: Record<string, unknown> | null;
|
|
40
45
|
manifest: Record<string, unknown>;
|
|
41
46
|
predecessorBridge: Record<string, unknown> | null;
|
|
42
|
-
|
|
47
|
+
principalPolicyRefs: {
|
|
48
|
+
principalType: "group" | "organization";
|
|
49
|
+
principalId: string;
|
|
50
|
+
version: number;
|
|
51
|
+
stateHash: string;
|
|
52
|
+
}[];
|
|
43
53
|
wraps: Record<string, unknown>[];
|
|
44
54
|
containerManifestHistoryRefs?: {
|
|
45
55
|
containerId: string;
|
|
@@ -71,7 +81,12 @@ export declare const ContainerMutationRequestSchema: z.ZodType<{
|
|
|
71
81
|
keyring: Record<string, unknown> | null;
|
|
72
82
|
manifest: Record<string, unknown>;
|
|
73
83
|
predecessorBridge: Record<string, unknown> | null;
|
|
74
|
-
|
|
84
|
+
principalPolicyRefs: {
|
|
85
|
+
principalType: "group" | "organization";
|
|
86
|
+
principalId: string;
|
|
87
|
+
version: number;
|
|
88
|
+
stateHash: string;
|
|
89
|
+
}[];
|
|
75
90
|
wraps: Record<string, unknown>[];
|
|
76
91
|
containerManifestHistoryRefs?: {
|
|
77
92
|
containerId: string;
|
|
@@ -103,7 +118,12 @@ export declare const ContainerMutationRequestSchema: z.ZodType<{
|
|
|
103
118
|
keyring: Record<string, unknown> | null;
|
|
104
119
|
manifest: Record<string, unknown>;
|
|
105
120
|
predecessorBridge: Record<string, unknown> | null;
|
|
106
|
-
|
|
121
|
+
principalPolicyRefs: {
|
|
122
|
+
principalType: "group" | "organization";
|
|
123
|
+
principalId: string;
|
|
124
|
+
version: number;
|
|
125
|
+
stateHash: string;
|
|
126
|
+
}[];
|
|
107
127
|
wraps: Record<string, unknown>[];
|
|
108
128
|
containerManifestHistoryRefs?: {
|
|
109
129
|
containerId: string;
|
|
@@ -144,7 +164,12 @@ export declare const ContainerRotationRequestSchema: z.ZodType<{
|
|
|
144
164
|
keyring: Record<string, unknown> | null;
|
|
145
165
|
manifest: Record<string, unknown>;
|
|
146
166
|
predecessorBridge: Record<string, unknown> | null;
|
|
147
|
-
|
|
167
|
+
principalPolicyRefs: {
|
|
168
|
+
principalType: "group" | "organization";
|
|
169
|
+
principalId: string;
|
|
170
|
+
version: number;
|
|
171
|
+
stateHash: string;
|
|
172
|
+
}[];
|
|
148
173
|
wraps: Record<string, unknown>[];
|
|
149
174
|
containerRekeys?: {
|
|
150
175
|
body: unknown;
|
|
@@ -154,7 +179,12 @@ export declare const ContainerRotationRequestSchema: z.ZodType<{
|
|
|
154
179
|
keyring: Record<string, unknown> | null;
|
|
155
180
|
manifest: Record<string, unknown>;
|
|
156
181
|
predecessorBridge: Record<string, unknown> | null;
|
|
157
|
-
|
|
182
|
+
principalPolicyRefs: {
|
|
183
|
+
principalType: "group" | "organization";
|
|
184
|
+
principalId: string;
|
|
185
|
+
version: number;
|
|
186
|
+
stateHash: string;
|
|
187
|
+
}[];
|
|
158
188
|
wraps: Record<string, unknown>[];
|
|
159
189
|
containerManifestHistoryRefs?: {
|
|
160
190
|
containerId: string;
|
|
@@ -209,7 +239,12 @@ export declare const ContainerRotationRequestSchema: z.ZodType<{
|
|
|
209
239
|
keyring: Record<string, unknown> | null;
|
|
210
240
|
manifest: Record<string, unknown>;
|
|
211
241
|
predecessorBridge: Record<string, unknown> | null;
|
|
212
|
-
|
|
242
|
+
principalPolicyRefs: {
|
|
243
|
+
principalType: "group" | "organization";
|
|
244
|
+
principalId: string;
|
|
245
|
+
version: number;
|
|
246
|
+
stateHash: string;
|
|
247
|
+
}[];
|
|
213
248
|
wraps: Record<string, unknown>[];
|
|
214
249
|
containerRekeys?: {
|
|
215
250
|
body: unknown;
|
|
@@ -219,7 +254,12 @@ export declare const ContainerRotationRequestSchema: z.ZodType<{
|
|
|
219
254
|
keyring: Record<string, unknown> | null;
|
|
220
255
|
manifest: Record<string, unknown>;
|
|
221
256
|
predecessorBridge: Record<string, unknown> | null;
|
|
222
|
-
|
|
257
|
+
principalPolicyRefs: {
|
|
258
|
+
principalType: "group" | "organization";
|
|
259
|
+
principalId: string;
|
|
260
|
+
version: number;
|
|
261
|
+
stateHash: string;
|
|
262
|
+
}[];
|
|
223
263
|
wraps: Record<string, unknown>[];
|
|
224
264
|
containerManifestHistoryRefs?: {
|
|
225
265
|
containerId: string;
|
|
@@ -274,7 +314,12 @@ export declare const ContainerRotationRequestSchema: z.ZodType<{
|
|
|
274
314
|
keyring: Record<string, unknown> | null;
|
|
275
315
|
manifest: Record<string, unknown>;
|
|
276
316
|
predecessorBridge: Record<string, unknown> | null;
|
|
277
|
-
|
|
317
|
+
principalPolicyRefs: {
|
|
318
|
+
principalType: "group" | "organization";
|
|
319
|
+
principalId: string;
|
|
320
|
+
version: number;
|
|
321
|
+
stateHash: string;
|
|
322
|
+
}[];
|
|
278
323
|
wraps: Record<string, unknown>[];
|
|
279
324
|
containerRekeys?: {
|
|
280
325
|
body: unknown;
|
|
@@ -284,7 +329,12 @@ export declare const ContainerRotationRequestSchema: z.ZodType<{
|
|
|
284
329
|
keyring: Record<string, unknown> | null;
|
|
285
330
|
manifest: Record<string, unknown>;
|
|
286
331
|
predecessorBridge: Record<string, unknown> | null;
|
|
287
|
-
|
|
332
|
+
principalPolicyRefs: {
|
|
333
|
+
principalType: "group" | "organization";
|
|
334
|
+
principalId: string;
|
|
335
|
+
version: number;
|
|
336
|
+
stateHash: string;
|
|
337
|
+
}[];
|
|
288
338
|
wraps: Record<string, unknown>[];
|
|
289
339
|
containerManifestHistoryRefs?: {
|
|
290
340
|
containerId: string;
|
|
@@ -339,7 +389,12 @@ export declare const ContainerRotationRequestSchema: z.ZodType<{
|
|
|
339
389
|
keyring: Record<string, unknown> | null;
|
|
340
390
|
manifest: Record<string, unknown>;
|
|
341
391
|
predecessorBridge: Record<string, unknown> | null;
|
|
342
|
-
|
|
392
|
+
principalPolicyRefs: {
|
|
393
|
+
principalType: "group" | "organization";
|
|
394
|
+
principalId: string;
|
|
395
|
+
version: number;
|
|
396
|
+
stateHash: string;
|
|
397
|
+
}[];
|
|
343
398
|
wraps: Record<string, unknown>[];
|
|
344
399
|
containerRekeys?: {
|
|
345
400
|
body: unknown;
|
|
@@ -349,7 +404,12 @@ export declare const ContainerRotationRequestSchema: z.ZodType<{
|
|
|
349
404
|
keyring: Record<string, unknown> | null;
|
|
350
405
|
manifest: Record<string, unknown>;
|
|
351
406
|
predecessorBridge: Record<string, unknown> | null;
|
|
352
|
-
|
|
407
|
+
principalPolicyRefs: {
|
|
408
|
+
principalType: "group" | "organization";
|
|
409
|
+
principalId: string;
|
|
410
|
+
version: number;
|
|
411
|
+
stateHash: string;
|
|
412
|
+
}[];
|
|
353
413
|
wraps: Record<string, unknown>[];
|
|
354
414
|
containerManifestHistoryRefs?: {
|
|
355
415
|
containerId: string;
|
|
@@ -411,7 +471,12 @@ export declare const ContainerReciteRequestSchema: z.ZodType<{
|
|
|
411
471
|
containerId: string;
|
|
412
472
|
manifestHash: string;
|
|
413
473
|
};
|
|
414
|
-
|
|
474
|
+
principalPolicyRefs: {
|
|
475
|
+
principalType: "group" | "organization";
|
|
476
|
+
principalId: string;
|
|
477
|
+
version: number;
|
|
478
|
+
stateHash: string;
|
|
479
|
+
}[];
|
|
415
480
|
}, {
|
|
416
481
|
body: unknown;
|
|
417
482
|
event: Record<string, unknown>;
|
|
@@ -425,7 +490,12 @@ export declare const ContainerReciteRequestSchema: z.ZodType<{
|
|
|
425
490
|
containerId: string;
|
|
426
491
|
manifestHash: string;
|
|
427
492
|
};
|
|
428
|
-
|
|
493
|
+
principalPolicyRefs: {
|
|
494
|
+
principalType: "group" | "organization";
|
|
495
|
+
principalId: string;
|
|
496
|
+
version: number;
|
|
497
|
+
stateHash: string;
|
|
498
|
+
}[];
|
|
429
499
|
}, z.core.$ZodTypeInternals<{
|
|
430
500
|
body: unknown;
|
|
431
501
|
event: Record<string, unknown>;
|
|
@@ -439,7 +509,12 @@ export declare const ContainerReciteRequestSchema: z.ZodType<{
|
|
|
439
509
|
containerId: string;
|
|
440
510
|
manifestHash: string;
|
|
441
511
|
};
|
|
442
|
-
|
|
512
|
+
principalPolicyRefs: {
|
|
513
|
+
principalType: "group" | "organization";
|
|
514
|
+
principalId: string;
|
|
515
|
+
version: number;
|
|
516
|
+
stateHash: string;
|
|
517
|
+
}[];
|
|
443
518
|
}, {
|
|
444
519
|
body: unknown;
|
|
445
520
|
event: Record<string, unknown>;
|
|
@@ -453,7 +528,12 @@ export declare const ContainerReciteRequestSchema: z.ZodType<{
|
|
|
453
528
|
containerId: string;
|
|
454
529
|
manifestHash: string;
|
|
455
530
|
};
|
|
456
|
-
|
|
531
|
+
principalPolicyRefs: {
|
|
532
|
+
principalType: "group" | "organization";
|
|
533
|
+
principalId: string;
|
|
534
|
+
version: number;
|
|
535
|
+
stateHash: string;
|
|
536
|
+
}[];
|
|
457
537
|
}>>;
|
|
458
538
|
export type ContainerReciteRequest = z.infer<typeof ContainerReciteRequestSchema>;
|
|
459
539
|
export declare function isContainerReciteRequest(value: unknown): value is ContainerReciteRequest;
|
|
@@ -3,6 +3,7 @@ import { registerJsonSchemaView } from "../jsonSchema.js";
|
|
|
3
3
|
import { arraySchema, loosePlainObject, nonEmptyStringSchema, plainObjectSchema, requiredUnknownSchema, } from "../schema.js";
|
|
4
4
|
import { ContainerKekKeyringWireRecordSchema, MAX_INLINE_CONTAINER_REKEYS, MAX_ROTATION_CONTAINER_REKEYS, } from "../util/index.js";
|
|
5
5
|
import { ContainerManifestPathSchema, ContainerManifestRefListSchema, ContainerManifestRefSchema, OptionalContainerManifestPathSchema, } from "./containerManifestRef.js";
|
|
6
|
+
import { PrincipalPolicyRefListSchema } from "./principalPolicyRef.js";
|
|
6
7
|
const ContainerMutationKeyringSchema = registerJsonSchemaView(z.custom((value) => ContainerKekKeyringWireRecordSchema.safeParse(value).success), ContainerKekKeyringWireRecordSchema);
|
|
7
8
|
// Every manifest a mutation cites that the server already stores travels as a
|
|
8
9
|
// {containerId, manifestHash} reference. The server resolves each one from its
|
|
@@ -10,6 +11,8 @@ const ContainerMutationKeyringSchema = registerJsonSchemaView(z.custom((value) =
|
|
|
10
11
|
// paths and the previous manifest to current heads; the signed event binds the
|
|
11
12
|
// same hashes as its dependencies, so no request copy of a stored bundle is
|
|
12
13
|
// ever needed. Only the new manifest this mutation commits travels in full.
|
|
14
|
+
// Principal policies are cited the same way, by head (see
|
|
15
|
+
// `PrincipalPolicyRefSchema`).
|
|
13
16
|
const containerMutationRequestShape = {
|
|
14
17
|
body: requiredUnknownSchema,
|
|
15
18
|
containerManifestHistoryRefs: ContainerManifestRefListSchema.optional(),
|
|
@@ -24,7 +27,7 @@ const containerMutationRequestShape = {
|
|
|
24
27
|
predecessorBridge: plainObjectSchema.nullable(),
|
|
25
28
|
previousContainerPathRefs: OptionalContainerManifestPathSchema.optional(),
|
|
26
29
|
previousManifestRef: ContainerManifestRefSchema.nullable().optional(),
|
|
27
|
-
|
|
30
|
+
principalPolicyRefs: PrincipalPolicyRefListSchema,
|
|
28
31
|
userRecipientKeys: arraySchema(plainObjectSchema).optional(),
|
|
29
32
|
wraps: arraySchema(plainObjectSchema),
|
|
30
33
|
};
|
|
@@ -47,7 +50,7 @@ export const ContainerReciteRequestSchema = loosePlainObject({
|
|
|
47
50
|
manifest: plainObjectSchema,
|
|
48
51
|
previousContainerPathRefs: ContainerManifestPathSchema,
|
|
49
52
|
previousManifestRef: ContainerManifestRefSchema,
|
|
50
|
-
|
|
53
|
+
principalPolicyRefs: PrincipalPolicyRefListSchema,
|
|
51
54
|
});
|
|
52
55
|
export function isContainerReciteRequest(value) {
|
|
53
56
|
return ContainerReciteRequestSchema.safeParse(value).success;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.js","sourceRoot":"","sources":["container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,mCAAmC,EACnC,2BAA2B,EAC3B,6BAA6B,GAC9B,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,2BAA2B,EAC3B,8BAA8B,EAC9B,0BAA0B,EAC1B,mCAAmC,GACpC,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"container.js","sourceRoot":"","sources":["container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,mCAAmC,EACnC,2BAA2B,EAC3B,6BAA6B,GAC9B,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,2BAA2B,EAC3B,8BAA8B,EAC9B,0BAA0B,EAC1B,mCAAmC,GACpC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAEpE,MAAM,8BAA8B,GAAG,sBAAsB,CAC3D,CAAC,CAAC,MAAM,CACN,CAAC,KAAK,EAAE,EAAE,CAAC,mCAAmC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CACxE,EACD,mCAAmC,CACpC,CAAC;AAEF,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA8E;AAC9E,+EAA+E;AAC/E,4EAA4E;AAC5E,4EAA4E;AAC5E,0DAA0D;AAC1D,+BAA+B;AAC/B,MAAM,6BAA6B,GAAG;IACpC,IAAI,EAAE,qBAAqB;IAC3B,4BAA4B,EAAE,8BAA8B,CAAC,QAAQ,EAAE;IACvE,kCAAkC,EAChC,mCAAmC,CAAC,QAAQ,EAAE;IAChD,KAAK,EAAE,iBAAiB;IACxB,oBAAoB,EAAE,oBAAoB;IAC1C,QAAQ,EAAE,iBAAiB;IAC3B,OAAO,EAAE,8BAA8B,CAAC,QAAQ,EAAE;IAClD,QAAQ,EAAE,iBAAiB;IAC3B,uBAAuB,EAAE,mCAAmC,CAAC,QAAQ,EAAE;IACvE,cAAc,EAAE,iBAAiB,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACvD,iBAAiB,EAAE,iBAAiB,CAAC,QAAQ,EAAE;IAC/C,yBAAyB,EAAE,mCAAmC,CAAC,QAAQ,EAAE;IACzE,mBAAmB,EAAE,0BAA0B,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACrE,mBAAmB,EAAE,4BAA4B;IACjD,iBAAiB,EAAE,WAAW,CAAC,iBAAiB,CAAC,CAAC,QAAQ,EAAE;IAC5D,KAAK,EAAE,WAAW,CAAC,iBAAiB,CAAC;CACtC,CAAC;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAG,gBAAgB,CAC5D,6BAA6B,CAC9B,CAAC;AAMF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,gBAAgB,CAAC;IAC7D,GAAG,6BAA6B;IAChC,eAAe,EAAE,WAAW,CAC1B,8BAA8B,EAC9B,6BAA6B,CAC9B,CAAC,QAAQ,EAAE;CACb,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,4BAA4B,GAAG,gBAAgB,CAAC;IAC3D,IAAI,EAAE,qBAAqB;IAC3B,KAAK,EAAE,iBAAiB;IACxB,oBAAoB,EAAE,oBAAoB;IAC1C,QAAQ,EAAE,iBAAiB;IAC3B,yBAAyB,EAAE,2BAA2B;IACtD,mBAAmB,EAAE,0BAA0B;IAC/C,mBAAmB,EAAE,4BAA4B;CAClD,CAAC,CAAC;AAMH,MAAM,UAAU,wBAAwB,CACtC,KAAc;IAEd,OAAO,4BAA4B,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,0BAA0B,CACxC,KAAc;IAEd,OAAO,8BAA8B,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,0BAA0B,CACxC,KAAc;IAEd,OAAO,8BAA8B,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,uCAAuC,CACrD,KAAc;IAEd,OAAO,WAAW,CAChB,8BAA8B,EAC9B,2BAA2B,CAC5B;SACE,QAAQ,EAAE;SACV,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AAC9B,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { registerJsonSchemaView } from \"../jsonSchema\";\nimport {\n arraySchema,\n loosePlainObject,\n nonEmptyStringSchema,\n plainObjectSchema,\n requiredUnknownSchema,\n} from \"../schema\";\nimport {\n ContainerKekKeyringWireRecordSchema,\n MAX_INLINE_CONTAINER_REKEYS,\n MAX_ROTATION_CONTAINER_REKEYS,\n} from \"../util\";\nimport {\n ContainerManifestPathSchema,\n ContainerManifestRefListSchema,\n ContainerManifestRefSchema,\n OptionalContainerManifestPathSchema,\n} from \"./containerManifestRef\";\nimport { PrincipalPolicyRefListSchema } from \"./principalPolicyRef\";\n\nconst ContainerMutationKeyringSchema = registerJsonSchemaView(\n z.custom<Record<string, unknown>>(\n (value) => ContainerKekKeyringWireRecordSchema.safeParse(value).success,\n ),\n ContainerKekKeyringWireRecordSchema,\n);\n\n// Every manifest a mutation cites that the server already stores travels as a\n// {containerId, manifestHash} reference. The server resolves each one from its\n// own verified store (or from an earlier mutation of the same batch) and pins\n// paths and the previous manifest to current heads; the signed event binds the\n// same hashes as its dependencies, so no request copy of a stored bundle is\n// ever needed. Only the new manifest this mutation commits travels in full.\n// Principal policies are cited the same way, by head (see\n// `PrincipalPolicyRefSchema`).\nconst containerMutationRequestShape = {\n body: requiredUnknownSchema,\n containerManifestHistoryRefs: ContainerManifestRefListSchema.optional(),\n destinationParentContainerPathRefs:\n OptionalContainerManifestPathSchema.optional(),\n event: plainObjectSchema,\n expectedManifestHash: nonEmptyStringSchema,\n keyEpoch: plainObjectSchema,\n keyring: ContainerMutationKeyringSchema.nullable(),\n manifest: plainObjectSchema,\n parentContainerPathRefs: OptionalContainerManifestPathSchema.optional(),\n parentKekState: plainObjectSchema.nullable().optional(),\n predecessorBridge: plainObjectSchema.nullable(),\n previousContainerPathRefs: OptionalContainerManifestPathSchema.optional(),\n previousManifestRef: ContainerManifestRefSchema.nullable().optional(),\n principalPolicyRefs: PrincipalPolicyRefListSchema,\n userRecipientKeys: arraySchema(plainObjectSchema).optional(),\n wraps: arraySchema(plainObjectSchema),\n};\n\nexport const ContainerMutationRequestSchema = loosePlainObject(\n containerMutationRequestShape,\n);\n\nexport type ContainerMutationRequest = z.infer<\n typeof ContainerMutationRequestSchema\n>;\n\n/**\n * A rekey, revoke, or move: the rotation plus the descendant rekeys it must\n * commit with. `containerRekeys` names, parent-first, the descendants above a\n * directly granted container; they commit with the rotation or not at all.\n * Only these three routes take it, so the carriers that already hold a flat\n * rekey list (document and blob writes) stay as they are.\n */\nexport const ContainerRotationRequestSchema = loosePlainObject({\n ...containerMutationRequestShape,\n containerRekeys: arraySchema(\n ContainerMutationRequestSchema,\n MAX_ROTATION_CONTAINER_REKEYS,\n ).optional(),\n});\n\nexport type ContainerRotationRequest = z.infer<\n typeof ContainerRotationRequestSchema\n>;\n\nexport const ContainerReciteRequestSchema = loosePlainObject({\n body: requiredUnknownSchema,\n event: plainObjectSchema,\n expectedManifestHash: nonEmptyStringSchema,\n manifest: plainObjectSchema,\n previousContainerPathRefs: ContainerManifestPathSchema,\n previousManifestRef: ContainerManifestRefSchema,\n principalPolicyRefs: PrincipalPolicyRefListSchema,\n});\n\nexport type ContainerReciteRequest = z.infer<\n typeof ContainerReciteRequestSchema\n>;\n\nexport function isContainerReciteRequest(\n value: unknown,\n): value is ContainerReciteRequest {\n return ContainerReciteRequestSchema.safeParse(value).success;\n}\n\nexport function isContainerRotationRequest(\n value: unknown,\n): value is ContainerRotationRequest {\n return ContainerRotationRequestSchema.safeParse(value).success;\n}\n\nexport function isContainerMutationRequest(\n value: unknown,\n): value is ContainerMutationRequest {\n return ContainerMutationRequestSchema.safeParse(value).success;\n}\n\nexport function isOptionalContainerMutationRequestArray(\n value: unknown,\n): value is ContainerMutationRequest[] | undefined {\n return arraySchema(\n ContainerMutationRequestSchema,\n MAX_INLINE_CONTAINER_REKEYS,\n )\n .optional()\n .safeParse(value).success;\n}\n"]}
|