@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
|
@@ -238,7 +238,12 @@ export declare const PutPrincipalPolicyRequestSchema: z.ZodType<{
|
|
|
238
238
|
keyring: Record<string, unknown> | null;
|
|
239
239
|
manifest: Record<string, unknown>;
|
|
240
240
|
predecessorBridge: Record<string, unknown> | null;
|
|
241
|
-
|
|
241
|
+
principalPolicyRefs: {
|
|
242
|
+
principalType: "group" | "organization";
|
|
243
|
+
principalId: string;
|
|
244
|
+
version: number;
|
|
245
|
+
stateHash: string;
|
|
246
|
+
}[];
|
|
242
247
|
wraps: Record<string, unknown>[];
|
|
243
248
|
containerManifestHistoryRefs?: {
|
|
244
249
|
containerId: string;
|
|
@@ -320,7 +325,12 @@ export declare const PutPrincipalPolicyRequestSchema: z.ZodType<{
|
|
|
320
325
|
keyring: Record<string, unknown> | null;
|
|
321
326
|
manifest: Record<string, unknown>;
|
|
322
327
|
predecessorBridge: Record<string, unknown> | null;
|
|
323
|
-
|
|
328
|
+
principalPolicyRefs: {
|
|
329
|
+
principalType: "group" | "organization";
|
|
330
|
+
principalId: string;
|
|
331
|
+
version: number;
|
|
332
|
+
stateHash: string;
|
|
333
|
+
}[];
|
|
324
334
|
wraps: Record<string, unknown>[];
|
|
325
335
|
containerManifestHistoryRefs?: {
|
|
326
336
|
containerId: string;
|
|
@@ -402,7 +412,12 @@ export declare const PutPrincipalPolicyRequestSchema: z.ZodType<{
|
|
|
402
412
|
keyring: Record<string, unknown> | null;
|
|
403
413
|
manifest: Record<string, unknown>;
|
|
404
414
|
predecessorBridge: Record<string, unknown> | null;
|
|
405
|
-
|
|
415
|
+
principalPolicyRefs: {
|
|
416
|
+
principalType: "group" | "organization";
|
|
417
|
+
principalId: string;
|
|
418
|
+
version: number;
|
|
419
|
+
stateHash: string;
|
|
420
|
+
}[];
|
|
406
421
|
wraps: Record<string, unknown>[];
|
|
407
422
|
containerManifestHistoryRefs?: {
|
|
408
423
|
containerId: string;
|
|
@@ -484,7 +499,12 @@ export declare const PutPrincipalPolicyRequestSchema: z.ZodType<{
|
|
|
484
499
|
keyring: Record<string, unknown> | null;
|
|
485
500
|
manifest: Record<string, unknown>;
|
|
486
501
|
predecessorBridge: Record<string, unknown> | null;
|
|
487
|
-
|
|
502
|
+
principalPolicyRefs: {
|
|
503
|
+
principalType: "group" | "organization";
|
|
504
|
+
principalId: string;
|
|
505
|
+
version: number;
|
|
506
|
+
stateHash: string;
|
|
507
|
+
}[];
|
|
488
508
|
wraps: Record<string, unknown>[];
|
|
489
509
|
containerManifestHistoryRefs?: {
|
|
490
510
|
containerId: string;
|
|
@@ -568,7 +588,12 @@ export declare const OrganizationPrincipalPolicyRequestSchema: z.ZodType<{
|
|
|
568
588
|
keyring: Record<string, unknown> | null;
|
|
569
589
|
manifest: Record<string, unknown>;
|
|
570
590
|
predecessorBridge: Record<string, unknown> | null;
|
|
571
|
-
|
|
591
|
+
principalPolicyRefs: {
|
|
592
|
+
principalType: "group" | "organization";
|
|
593
|
+
principalId: string;
|
|
594
|
+
version: number;
|
|
595
|
+
stateHash: string;
|
|
596
|
+
}[];
|
|
572
597
|
wraps: Record<string, unknown>[];
|
|
573
598
|
containerManifestHistoryRefs?: {
|
|
574
599
|
containerId: string;
|
|
@@ -650,7 +675,12 @@ export declare const OrganizationPrincipalPolicyRequestSchema: z.ZodType<{
|
|
|
650
675
|
keyring: Record<string, unknown> | null;
|
|
651
676
|
manifest: Record<string, unknown>;
|
|
652
677
|
predecessorBridge: Record<string, unknown> | null;
|
|
653
|
-
|
|
678
|
+
principalPolicyRefs: {
|
|
679
|
+
principalType: "group" | "organization";
|
|
680
|
+
principalId: string;
|
|
681
|
+
version: number;
|
|
682
|
+
stateHash: string;
|
|
683
|
+
}[];
|
|
654
684
|
wraps: Record<string, unknown>[];
|
|
655
685
|
containerManifestHistoryRefs?: {
|
|
656
686
|
containerId: string;
|
|
@@ -732,7 +762,12 @@ export declare const OrganizationPrincipalPolicyRequestSchema: z.ZodType<{
|
|
|
732
762
|
keyring: Record<string, unknown> | null;
|
|
733
763
|
manifest: Record<string, unknown>;
|
|
734
764
|
predecessorBridge: Record<string, unknown> | null;
|
|
735
|
-
|
|
765
|
+
principalPolicyRefs: {
|
|
766
|
+
principalType: "group" | "organization";
|
|
767
|
+
principalId: string;
|
|
768
|
+
version: number;
|
|
769
|
+
stateHash: string;
|
|
770
|
+
}[];
|
|
736
771
|
wraps: Record<string, unknown>[];
|
|
737
772
|
containerManifestHistoryRefs?: {
|
|
738
773
|
containerId: string;
|
|
@@ -814,7 +849,12 @@ export declare const OrganizationPrincipalPolicyRequestSchema: z.ZodType<{
|
|
|
814
849
|
keyring: Record<string, unknown> | null;
|
|
815
850
|
manifest: Record<string, unknown>;
|
|
816
851
|
predecessorBridge: Record<string, unknown> | null;
|
|
817
|
-
|
|
852
|
+
principalPolicyRefs: {
|
|
853
|
+
principalType: "group" | "organization";
|
|
854
|
+
principalId: string;
|
|
855
|
+
version: number;
|
|
856
|
+
stateHash: string;
|
|
857
|
+
}[];
|
|
818
858
|
wraps: Record<string, unknown>[];
|
|
819
859
|
containerManifestHistoryRefs?: {
|
|
820
860
|
containerId: string;
|
|
@@ -899,7 +939,12 @@ export declare const CommitOrganizationGroupPolicyRequestSchema: z.ZodType<{
|
|
|
899
939
|
keyring: Record<string, unknown> | null;
|
|
900
940
|
manifest: Record<string, unknown>;
|
|
901
941
|
predecessorBridge: Record<string, unknown> | null;
|
|
902
|
-
|
|
942
|
+
principalPolicyRefs: {
|
|
943
|
+
principalType: "group" | "organization";
|
|
944
|
+
principalId: string;
|
|
945
|
+
version: number;
|
|
946
|
+
stateHash: string;
|
|
947
|
+
}[];
|
|
903
948
|
wraps: Record<string, unknown>[];
|
|
904
949
|
containerManifestHistoryRefs?: {
|
|
905
950
|
containerId: string;
|
|
@@ -982,7 +1027,12 @@ export declare const CommitOrganizationGroupPolicyRequestSchema: z.ZodType<{
|
|
|
982
1027
|
keyring: Record<string, unknown> | null;
|
|
983
1028
|
manifest: Record<string, unknown>;
|
|
984
1029
|
predecessorBridge: Record<string, unknown> | null;
|
|
985
|
-
|
|
1030
|
+
principalPolicyRefs: {
|
|
1031
|
+
principalType: "group" | "organization";
|
|
1032
|
+
principalId: string;
|
|
1033
|
+
version: number;
|
|
1034
|
+
stateHash: string;
|
|
1035
|
+
}[];
|
|
986
1036
|
wraps: Record<string, unknown>[];
|
|
987
1037
|
containerManifestHistoryRefs?: {
|
|
988
1038
|
containerId: string;
|
|
@@ -1065,7 +1115,12 @@ export declare const CommitOrganizationGroupPolicyRequestSchema: z.ZodType<{
|
|
|
1065
1115
|
keyring: Record<string, unknown> | null;
|
|
1066
1116
|
manifest: Record<string, unknown>;
|
|
1067
1117
|
predecessorBridge: Record<string, unknown> | null;
|
|
1068
|
-
|
|
1118
|
+
principalPolicyRefs: {
|
|
1119
|
+
principalType: "group" | "organization";
|
|
1120
|
+
principalId: string;
|
|
1121
|
+
version: number;
|
|
1122
|
+
stateHash: string;
|
|
1123
|
+
}[];
|
|
1069
1124
|
wraps: Record<string, unknown>[];
|
|
1070
1125
|
containerManifestHistoryRefs?: {
|
|
1071
1126
|
containerId: string;
|
|
@@ -1149,7 +1204,12 @@ export declare const CommitOrganizationGroupPolicyRequestSchema: z.ZodType<{
|
|
|
1149
1204
|
keyring: Record<string, unknown> | null;
|
|
1150
1205
|
manifest: Record<string, unknown>;
|
|
1151
1206
|
predecessorBridge: Record<string, unknown> | null;
|
|
1152
|
-
|
|
1207
|
+
principalPolicyRefs: {
|
|
1208
|
+
principalType: "group" | "organization";
|
|
1209
|
+
principalId: string;
|
|
1210
|
+
version: number;
|
|
1211
|
+
stateHash: string;
|
|
1212
|
+
}[];
|
|
1153
1213
|
wraps: Record<string, unknown>[];
|
|
1154
1214
|
containerManifestHistoryRefs?: {
|
|
1155
1215
|
containerId: string;
|
|
@@ -1232,7 +1292,12 @@ export declare const CommitOrganizationGroupPolicyRequestSchema: z.ZodType<{
|
|
|
1232
1292
|
keyring: Record<string, unknown> | null;
|
|
1233
1293
|
manifest: Record<string, unknown>;
|
|
1234
1294
|
predecessorBridge: Record<string, unknown> | null;
|
|
1235
|
-
|
|
1295
|
+
principalPolicyRefs: {
|
|
1296
|
+
principalType: "group" | "organization";
|
|
1297
|
+
principalId: string;
|
|
1298
|
+
version: number;
|
|
1299
|
+
stateHash: string;
|
|
1300
|
+
}[];
|
|
1236
1301
|
wraps: Record<string, unknown>[];
|
|
1237
1302
|
containerManifestHistoryRefs?: {
|
|
1238
1303
|
containerId: string;
|
|
@@ -1315,7 +1380,12 @@ export declare const CommitOrganizationGroupPolicyRequestSchema: z.ZodType<{
|
|
|
1315
1380
|
keyring: Record<string, unknown> | null;
|
|
1316
1381
|
manifest: Record<string, unknown>;
|
|
1317
1382
|
predecessorBridge: Record<string, unknown> | null;
|
|
1318
|
-
|
|
1383
|
+
principalPolicyRefs: {
|
|
1384
|
+
principalType: "group" | "organization";
|
|
1385
|
+
principalId: string;
|
|
1386
|
+
version: number;
|
|
1387
|
+
stateHash: string;
|
|
1388
|
+
}[];
|
|
1319
1389
|
wraps: Record<string, unknown>[];
|
|
1320
1390
|
containerManifestHistoryRefs?: {
|
|
1321
1391
|
containerId: string;
|
|
@@ -1399,7 +1469,12 @@ export declare const CommitOrganizationGroupPolicyRequestSchema: z.ZodType<{
|
|
|
1399
1469
|
keyring: Record<string, unknown> | null;
|
|
1400
1470
|
manifest: Record<string, unknown>;
|
|
1401
1471
|
predecessorBridge: Record<string, unknown> | null;
|
|
1402
|
-
|
|
1472
|
+
principalPolicyRefs: {
|
|
1473
|
+
principalType: "group" | "organization";
|
|
1474
|
+
principalId: string;
|
|
1475
|
+
version: number;
|
|
1476
|
+
stateHash: string;
|
|
1477
|
+
}[];
|
|
1403
1478
|
wraps: Record<string, unknown>[];
|
|
1404
1479
|
containerManifestHistoryRefs?: {
|
|
1405
1480
|
containerId: string;
|
|
@@ -1482,7 +1557,12 @@ export declare const CommitOrganizationGroupPolicyRequestSchema: z.ZodType<{
|
|
|
1482
1557
|
keyring: Record<string, unknown> | null;
|
|
1483
1558
|
manifest: Record<string, unknown>;
|
|
1484
1559
|
predecessorBridge: Record<string, unknown> | null;
|
|
1485
|
-
|
|
1560
|
+
principalPolicyRefs: {
|
|
1561
|
+
principalType: "group" | "organization";
|
|
1562
|
+
principalId: string;
|
|
1563
|
+
version: number;
|
|
1564
|
+
stateHash: string;
|
|
1565
|
+
}[];
|
|
1486
1566
|
wraps: Record<string, unknown>[];
|
|
1487
1567
|
containerManifestHistoryRefs?: {
|
|
1488
1568
|
containerId: string;
|
|
@@ -1565,7 +1645,12 @@ export declare const CommitOrganizationGroupPolicyRequestSchema: z.ZodType<{
|
|
|
1565
1645
|
keyring: Record<string, unknown> | null;
|
|
1566
1646
|
manifest: Record<string, unknown>;
|
|
1567
1647
|
predecessorBridge: Record<string, unknown> | null;
|
|
1568
|
-
|
|
1648
|
+
principalPolicyRefs: {
|
|
1649
|
+
principalType: "group" | "organization";
|
|
1650
|
+
principalId: string;
|
|
1651
|
+
version: number;
|
|
1652
|
+
stateHash: string;
|
|
1653
|
+
}[];
|
|
1569
1654
|
wraps: Record<string, unknown>[];
|
|
1570
1655
|
containerManifestHistoryRefs?: {
|
|
1571
1656
|
containerId: string;
|
|
@@ -1649,7 +1734,12 @@ export declare const CommitOrganizationGroupPolicyRequestSchema: z.ZodType<{
|
|
|
1649
1734
|
keyring: Record<string, unknown> | null;
|
|
1650
1735
|
manifest: Record<string, unknown>;
|
|
1651
1736
|
predecessorBridge: Record<string, unknown> | null;
|
|
1652
|
-
|
|
1737
|
+
principalPolicyRefs: {
|
|
1738
|
+
principalType: "group" | "organization";
|
|
1739
|
+
principalId: string;
|
|
1740
|
+
version: number;
|
|
1741
|
+
stateHash: string;
|
|
1742
|
+
}[];
|
|
1653
1743
|
wraps: Record<string, unknown>[];
|
|
1654
1744
|
containerManifestHistoryRefs?: {
|
|
1655
1745
|
containerId: string;
|
|
@@ -1732,7 +1822,12 @@ export declare const CommitOrganizationGroupPolicyRequestSchema: z.ZodType<{
|
|
|
1732
1822
|
keyring: Record<string, unknown> | null;
|
|
1733
1823
|
manifest: Record<string, unknown>;
|
|
1734
1824
|
predecessorBridge: Record<string, unknown> | null;
|
|
1735
|
-
|
|
1825
|
+
principalPolicyRefs: {
|
|
1826
|
+
principalType: "group" | "organization";
|
|
1827
|
+
principalId: string;
|
|
1828
|
+
version: number;
|
|
1829
|
+
stateHash: string;
|
|
1830
|
+
}[];
|
|
1736
1831
|
wraps: Record<string, unknown>[];
|
|
1737
1832
|
containerManifestHistoryRefs?: {
|
|
1738
1833
|
containerId: string;
|
|
@@ -1815,7 +1910,12 @@ export declare const CommitOrganizationGroupPolicyRequestSchema: z.ZodType<{
|
|
|
1815
1910
|
keyring: Record<string, unknown> | null;
|
|
1816
1911
|
manifest: Record<string, unknown>;
|
|
1817
1912
|
predecessorBridge: Record<string, unknown> | null;
|
|
1818
|
-
|
|
1913
|
+
principalPolicyRefs: {
|
|
1914
|
+
principalType: "group" | "organization";
|
|
1915
|
+
principalId: string;
|
|
1916
|
+
version: number;
|
|
1917
|
+
stateHash: string;
|
|
1918
|
+
}[];
|
|
1819
1919
|
wraps: Record<string, unknown>[];
|
|
1820
1920
|
containerManifestHistoryRefs?: {
|
|
1821
1921
|
containerId: string;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* A principal policy head a container mutation was planned against, in lieu
|
|
4
|
+
* of the signed policy itself. The server refuses the mutation as stale unless
|
|
5
|
+
* the head is the principal's current one, then authorizes from its own
|
|
6
|
+
* verified copy of that policy. `stateHash` commits the signed state, which
|
|
7
|
+
* commits the projection and grant roots, so the head pins everything the
|
|
8
|
+
* inline policy carried.
|
|
9
|
+
*/
|
|
10
|
+
export declare const PrincipalPolicyRefSchema: z.ZodType<{
|
|
11
|
+
principalType: "group" | "organization";
|
|
12
|
+
principalId: string;
|
|
13
|
+
version: number;
|
|
14
|
+
stateHash: string;
|
|
15
|
+
}, {
|
|
16
|
+
principalType: "group" | "organization";
|
|
17
|
+
principalId: string;
|
|
18
|
+
version: number;
|
|
19
|
+
stateHash: string;
|
|
20
|
+
}, z.core.$ZodTypeInternals<{
|
|
21
|
+
principalType: "group" | "organization";
|
|
22
|
+
principalId: string;
|
|
23
|
+
version: number;
|
|
24
|
+
stateHash: string;
|
|
25
|
+
}, {
|
|
26
|
+
principalType: "group" | "organization";
|
|
27
|
+
principalId: string;
|
|
28
|
+
version: number;
|
|
29
|
+
stateHash: string;
|
|
30
|
+
}>>;
|
|
31
|
+
export type PrincipalPolicyRef = z.infer<typeof PrincipalPolicyRefSchema>;
|
|
32
|
+
export declare const PrincipalPolicyRefListSchema: z.ZodCustom<{
|
|
33
|
+
principalType: "group" | "organization";
|
|
34
|
+
principalId: string;
|
|
35
|
+
version: number;
|
|
36
|
+
stateHash: string;
|
|
37
|
+
}[], {
|
|
38
|
+
principalType: "group" | "organization";
|
|
39
|
+
principalId: string;
|
|
40
|
+
version: number;
|
|
41
|
+
stateHash: string;
|
|
42
|
+
}[]>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { arraySchema, boundedPositiveIntegerSchema, loosePlainObject, nonEmptyStringSchema, uuidV4StringSchema, } from "../schema.js";
|
|
3
|
+
import { MAX_CONTAINER_PRINCIPAL_POLICY_REFS } from "../util/containerLimits.js";
|
|
4
|
+
/**
|
|
5
|
+
* A principal policy head a container mutation was planned against, in lieu
|
|
6
|
+
* of the signed policy itself. The server refuses the mutation as stale unless
|
|
7
|
+
* the head is the principal's current one, then authorizes from its own
|
|
8
|
+
* verified copy of that policy. `stateHash` commits the signed state, which
|
|
9
|
+
* commits the projection and grant roots, so the head pins everything the
|
|
10
|
+
* inline policy carried.
|
|
11
|
+
*/
|
|
12
|
+
export const PrincipalPolicyRefSchema = loosePlainObject({
|
|
13
|
+
principalType: z.literal(["group", "organization"]),
|
|
14
|
+
principalId: uuidV4StringSchema,
|
|
15
|
+
version: boundedPositiveIntegerSchema(Number.MAX_SAFE_INTEGER),
|
|
16
|
+
stateHash: nonEmptyStringSchema,
|
|
17
|
+
});
|
|
18
|
+
export const PrincipalPolicyRefListSchema = arraySchema(PrincipalPolicyRefSchema, MAX_CONTAINER_PRINCIPAL_POLICY_REFS);
|
|
19
|
+
//# sourceMappingURL=principalPolicyRef.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"principalPolicyRef.js","sourceRoot":"","sources":["principalPolicyRef.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,WAAW,EACX,4BAA4B,EAC5B,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,mCAAmC,EAAE,MAAM,yBAAyB,CAAC;AAE9E;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,gBAAgB,CAAC;IACvD,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IACnD,WAAW,EAAE,kBAAkB;IAC/B,OAAO,EAAE,4BAA4B,CAAC,MAAM,CAAC,gBAAgB,CAAC;IAC9D,SAAS,EAAE,oBAAoB;CAChC,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,4BAA4B,GAAG,WAAW,CACrD,wBAAwB,EACxB,mCAAmC,CACpC,CAAC","sourcesContent":["import { z } from \"zod\";\nimport {\n arraySchema,\n boundedPositiveIntegerSchema,\n loosePlainObject,\n nonEmptyStringSchema,\n uuidV4StringSchema,\n} from \"../schema\";\nimport { MAX_CONTAINER_PRINCIPAL_POLICY_REFS } from \"../util/containerLimits\";\n\n/**\n * A principal policy head a container mutation was planned against, in lieu\n * of the signed policy itself. The server refuses the mutation as stale unless\n * the head is the principal's current one, then authorizes from its own\n * verified copy of that policy. `stateHash` commits the signed state, which\n * commits the projection and grant roots, so the head pins everything the\n * inline policy carried.\n */\nexport const PrincipalPolicyRefSchema = loosePlainObject({\n principalType: z.literal([\"group\", \"organization\"]),\n principalId: uuidV4StringSchema,\n version: boundedPositiveIntegerSchema(Number.MAX_SAFE_INTEGER),\n stateHash: nonEmptyStringSchema,\n});\n\nexport type PrincipalPolicyRef = z.infer<typeof PrincipalPolicyRefSchema>;\n\nexport const PrincipalPolicyRefListSchema = arraySchema(\n PrincipalPolicyRefSchema,\n MAX_CONTAINER_PRINCIPAL_POLICY_REFS,\n);\n"]}
|