@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
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* The head a container mutation cites for a policy it was planned against.
|
|
3
|
+
* The API authorizes from its own verified copy of that head, so the policy
|
|
4
|
+
* itself never travels.
|
|
5
|
+
*/
|
|
6
|
+
export function principalPolicyRef(policy) {
|
|
7
|
+
return {
|
|
4
8
|
principalType: policy.principalType,
|
|
5
9
|
principalId: policy.principalId,
|
|
6
10
|
version: policy.version,
|
|
7
|
-
keyEpoch: policy.keyEpoch,
|
|
8
11
|
stateHash: policy.stateHash,
|
|
9
|
-
|
|
10
|
-
...policy.state,
|
|
11
|
-
stateHash: policy.stateHash,
|
|
12
|
-
},
|
|
13
|
-
projection: policy.projection,
|
|
14
|
-
grants: policy.grants,
|
|
15
|
-
checkpoint: policy.checkpoint,
|
|
16
|
-
}, label);
|
|
12
|
+
};
|
|
17
13
|
}
|
|
18
14
|
function principalPolicyKey(policy) {
|
|
19
15
|
return [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"principalPolicies.js","sourceRoot":"","sources":["principalPolicies.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"principalPolicies.js","sourceRoot":"","sources":["principalPolicies.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAChC,MAGC;IAED,OAAO;QACL,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,SAAS,EAAE,MAAM,CAAC,SAAS;KAC5B,CAAC;AACJ,CAAC;AAED,SAAS,kBAAkB,CACzB,MAGC;IAED,OAAO;QACL,MAAM,CAAC,aAAa;QACpB,MAAM,CAAC,WAAW;QAClB,MAAM,CAAC,OAAO;QACd,MAAM,CAAC,QAAQ;QACf,MAAM,CAAC,SAAS;KACjB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACd,CAAC;AAED,MAAM,UAAU,uBAAuB,CAErC,QAAsB;IACtB,MAAM,aAAa,GAAG,IAAI,GAAG,EAAa,CAAC;IAE3C,KAAK,MAAM,MAAM,IAAI,QAAQ,EAAE,CAAC;QAC9B,aAAa,CAAC,GAAG,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;IACxD,CAAC;IAED,OAAO,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC;AACrC,CAAC","sourcesContent":["import type { VerifiedPrincipalPolicy } from \"@tearleads/crypto\";\nimport type { PrincipalPolicyRef } from \"@tearleads/validators/request\";\nimport type { PrincipalPolicyCurrentEvidence } from \"../../principals/principalPolicyEvidence\";\n\n/**\n * The head a container mutation cites for a policy it was planned against.\n * The API authorizes from its own verified copy of that head, so the policy\n * itself never travels.\n */\nexport function principalPolicyRef(\n policy: Pick<\n VerifiedPrincipalPolicy,\n \"principalId\" | \"principalType\" | \"stateHash\" | \"version\"\n >,\n): PrincipalPolicyRef {\n return {\n principalType: policy.principalType,\n principalId: policy.principalId,\n version: policy.version,\n stateHash: policy.stateHash,\n };\n}\n\nfunction principalPolicyKey(\n policy: Pick<\n VerifiedPrincipalPolicy,\n \"keyEpoch\" | \"principalId\" | \"principalType\" | \"stateHash\" | \"version\"\n >,\n): string {\n return [\n policy.principalType,\n policy.principalId,\n policy.version,\n policy.keyEpoch,\n policy.stateHash,\n ].join(\":\");\n}\n\nexport function uniquePrincipalPolicies<\n T extends PrincipalPolicyCurrentEvidence,\n>(policies: readonly T[]): T[] {\n const policiesByKey = new Map<string, T>();\n\n for (const policy of policies) {\n policiesByKey.set(principalPolicyKey(policy), policy);\n }\n\n return [...policiesByKey.values()];\n}\n"]}
|
|
@@ -45,7 +45,12 @@ export declare const bindBlobAttachmentOperation: Omit<{
|
|
|
45
45
|
keyring: Record<string, unknown> | null;
|
|
46
46
|
manifest: Record<string, unknown>;
|
|
47
47
|
predecessorBridge: Record<string, unknown> | null;
|
|
48
|
-
|
|
48
|
+
principalPolicyRefs: {
|
|
49
|
+
principalType: "group" | "organization";
|
|
50
|
+
principalId: string;
|
|
51
|
+
version: number;
|
|
52
|
+
stateHash: string;
|
|
53
|
+
}[];
|
|
49
54
|
wraps: Record<string, unknown>[];
|
|
50
55
|
containerManifestHistoryRefs?: {
|
|
51
56
|
containerId: string;
|
|
@@ -103,7 +108,12 @@ export declare const bindBlobAttachmentOperation: Omit<{
|
|
|
103
108
|
keyring: Record<string, unknown> | null;
|
|
104
109
|
manifest: Record<string, unknown>;
|
|
105
110
|
predecessorBridge: Record<string, unknown> | null;
|
|
106
|
-
|
|
111
|
+
principalPolicyRefs: {
|
|
112
|
+
principalType: "group" | "organization";
|
|
113
|
+
principalId: string;
|
|
114
|
+
version: number;
|
|
115
|
+
stateHash: string;
|
|
116
|
+
}[];
|
|
107
117
|
wraps: Record<string, unknown>[];
|
|
108
118
|
containerManifestHistoryRefs?: {
|
|
109
119
|
containerId: string;
|
|
@@ -161,7 +171,12 @@ export declare const bindBlobAttachmentOperation: Omit<{
|
|
|
161
171
|
keyring: Record<string, unknown> | null;
|
|
162
172
|
manifest: Record<string, unknown>;
|
|
163
173
|
predecessorBridge: Record<string, unknown> | null;
|
|
164
|
-
|
|
174
|
+
principalPolicyRefs: {
|
|
175
|
+
principalType: "group" | "organization";
|
|
176
|
+
principalId: string;
|
|
177
|
+
version: number;
|
|
178
|
+
stateHash: string;
|
|
179
|
+
}[];
|
|
165
180
|
wraps: Record<string, unknown>[];
|
|
166
181
|
containerManifestHistoryRefs?: {
|
|
167
182
|
containerId: string;
|
|
@@ -219,7 +234,12 @@ export declare const bindBlobAttachmentOperation: Omit<{
|
|
|
219
234
|
keyring: Record<string, unknown> | null;
|
|
220
235
|
manifest: Record<string, unknown>;
|
|
221
236
|
predecessorBridge: Record<string, unknown> | null;
|
|
222
|
-
|
|
237
|
+
principalPolicyRefs: {
|
|
238
|
+
principalType: "group" | "organization";
|
|
239
|
+
principalId: string;
|
|
240
|
+
version: number;
|
|
241
|
+
stateHash: string;
|
|
242
|
+
}[];
|
|
223
243
|
wraps: Record<string, unknown>[];
|
|
224
244
|
containerManifestHistoryRefs?: {
|
|
225
245
|
containerId: string;
|
|
@@ -647,7 +667,12 @@ export declare const detachBlobAttachmentOperation: Omit<{
|
|
|
647
667
|
keyring: Record<string, unknown> | null;
|
|
648
668
|
manifest: Record<string, unknown>;
|
|
649
669
|
predecessorBridge: Record<string, unknown> | null;
|
|
650
|
-
|
|
670
|
+
principalPolicyRefs: {
|
|
671
|
+
principalType: "group" | "organization";
|
|
672
|
+
principalId: string;
|
|
673
|
+
version: number;
|
|
674
|
+
stateHash: string;
|
|
675
|
+
}[];
|
|
651
676
|
wraps: Record<string, unknown>[];
|
|
652
677
|
containerManifestHistoryRefs?: {
|
|
653
678
|
containerId: string;
|
|
@@ -687,7 +712,12 @@ export declare const detachBlobAttachmentOperation: Omit<{
|
|
|
687
712
|
keyring: Record<string, unknown> | null;
|
|
688
713
|
manifest: Record<string, unknown>;
|
|
689
714
|
predecessorBridge: Record<string, unknown> | null;
|
|
690
|
-
|
|
715
|
+
principalPolicyRefs: {
|
|
716
|
+
principalType: "group" | "organization";
|
|
717
|
+
principalId: string;
|
|
718
|
+
version: number;
|
|
719
|
+
stateHash: string;
|
|
720
|
+
}[];
|
|
691
721
|
wraps: Record<string, unknown>[];
|
|
692
722
|
containerManifestHistoryRefs?: {
|
|
693
723
|
containerId: string;
|
|
@@ -727,7 +757,12 @@ export declare const detachBlobAttachmentOperation: Omit<{
|
|
|
727
757
|
keyring: Record<string, unknown> | null;
|
|
728
758
|
manifest: Record<string, unknown>;
|
|
729
759
|
predecessorBridge: Record<string, unknown> | null;
|
|
730
|
-
|
|
760
|
+
principalPolicyRefs: {
|
|
761
|
+
principalType: "group" | "organization";
|
|
762
|
+
principalId: string;
|
|
763
|
+
version: number;
|
|
764
|
+
stateHash: string;
|
|
765
|
+
}[];
|
|
731
766
|
wraps: Record<string, unknown>[];
|
|
732
767
|
containerManifestHistoryRefs?: {
|
|
733
768
|
containerId: string;
|
|
@@ -767,7 +802,12 @@ export declare const detachBlobAttachmentOperation: Omit<{
|
|
|
767
802
|
keyring: Record<string, unknown> | null;
|
|
768
803
|
manifest: Record<string, unknown>;
|
|
769
804
|
predecessorBridge: Record<string, unknown> | null;
|
|
770
|
-
|
|
805
|
+
principalPolicyRefs: {
|
|
806
|
+
principalType: "group" | "organization";
|
|
807
|
+
principalId: string;
|
|
808
|
+
version: number;
|
|
809
|
+
stateHash: string;
|
|
810
|
+
}[];
|
|
771
811
|
wraps: Record<string, unknown>[];
|
|
772
812
|
containerManifestHistoryRefs?: {
|
|
773
813
|
containerId: string;
|