@tearleads/client-sdk 0.1.201 → 0.1.202
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/client/organizations/principalMutations.js +8 -4
- package/client/organizations/principalMutations.js.map +1 -1
- package/index.d.ts +2 -2
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/workflows/container-contents/container-state/remote.js +23 -28
- package/workflows/container-contents/container-state/remote.js.map +1 -1
- package/workflows/container-contents/container-state/types.js.map +1 -1
- package/workflows/containers/child/create/createSubmission.d.ts +6 -8
- package/workflows/containers/child/create/createSubmission.js.map +1 -1
- package/workflows/containers/child/create/index.d.ts +4 -3
- package/workflows/containers/child/create/index.js +7 -1
- package/workflows/containers/child/create/index.js.map +1 -1
- package/workflows/containers/child/move/index.d.ts +6 -10
- package/workflows/containers/child/move/index.js +5 -4
- package/workflows/containers/child/move/index.js.map +1 -1
- package/workflows/containers/child/rekey/rekeyRemote.d.ts +6 -9
- package/workflows/containers/child/rekey/rekeyRemote.js +3 -1
- package/workflows/containers/child/rekey/rekeyRemote.js.map +1 -1
- package/workflows/containers/child/revoke.d.ts +4 -9
- package/workflows/containers/child/revoke.js +3 -1
- package/workflows/containers/child/revoke.js.map +1 -1
- package/workflows/containers/child/share/index.d.ts +5 -13
- package/workflows/containers/child/share/index.js +7 -1
- package/workflows/containers/child/share/index.js.map +1 -1
- package/workflows/containers/child/share/shareAncestorRepair.js +5 -4
- package/workflows/containers/child/share/shareAncestorRepair.js.map +1 -1
- package/workflows/containers/containerMutationCollaborators.d.ts +30 -0
- package/workflows/containers/containerMutationCollaborators.js +9 -0
- package/workflows/containers/containerMutationCollaborators.js.map +1 -0
- package/workflows/containers/containerMutationService.d.ts +32 -0
- package/workflows/containers/containerMutationService.js +43 -0
- package/workflows/containers/containerMutationService.js.map +1 -0
- package/workflows/containers/index.d.ts +9 -6
- package/workflows/containers/index.js +3 -5
- package/workflows/containers/index.js.map +1 -1
- package/workflows/organizations/containerGrantRevocation.d.ts +3 -11
- package/workflows/organizations/containerGrantRevocation.js +1 -6
- package/workflows/organizations/containerGrantRevocation.js.map +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createProjectionUserKeyResolver } from "../../data/keyingProjectionVerification/userKeyResolver.js";
|
|
2
|
-
import { revokeRemoteContainer } from "../containers/index.js";
|
|
3
2
|
import { resolveDocumentCreateAuthor } from "../documents/index.js";
|
|
4
3
|
export async function revokeOrganizationContainerGrant(input) {
|
|
5
4
|
const author = resolveDocumentCreateAuthor({
|
|
@@ -15,18 +14,14 @@ export async function revokeOrganizationContainerGrant(input) {
|
|
|
15
14
|
if (!author) {
|
|
16
15
|
throw new Error("Org Manager signing context is unavailable");
|
|
17
16
|
}
|
|
18
|
-
const revoked = await revokeRemoteContainer({
|
|
17
|
+
const revoked = await input.containers.revokeRemoteContainer({
|
|
19
18
|
stillCurrent: input.stillCurrent,
|
|
20
|
-
reportSecurityIncident: input.reportSecurityIncident,
|
|
21
|
-
apiClient: input.apiClient,
|
|
22
19
|
author,
|
|
23
20
|
containerId: input.containerId,
|
|
24
|
-
execSql: input.execSql,
|
|
25
21
|
revokedSubject: input.revokedSubject,
|
|
26
22
|
resolveProjectionUserKey: createProjectionUserKeyResolver({
|
|
27
23
|
resolveTrustedUserIdentity: input.resolveTrustedUserIdentity,
|
|
28
24
|
}),
|
|
29
|
-
targetSecretKey: input.encapsulationKeyPair.secretKey,
|
|
30
25
|
warmReferencedPrincipalPolicies: input.warmReferencedPrincipalPolicies,
|
|
31
26
|
});
|
|
32
27
|
if (!revoked) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"containerGrantRevocation.js","sourceRoot":"","sources":["containerGrantRevocation.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yDAAyD,CAAC;
|
|
1
|
+
{"version":3,"file":"containerGrantRevocation.js","sourceRoot":"","sources":["containerGrantRevocation.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yDAAyD,CAAC;AAG1G,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAO3D,MAAM,CAAC,KAAK,UAAU,gCAAgC,CAAC,KAiBtD;IACC,MAAM,MAAM,GAAG,2BAA2B,CAAC;QACzC,IAAI,EAAE;YACJ,cAAc,EAAE,KAAK,CAAC,cAAc;YACpC,MAAM,EAAE,KAAK,CAAC,YAAY;SAC3B;QACD,MAAM,EAAE;YACN,kBAAkB,EAAE,KAAK,CAAC,kBAAkB;YAC5C,cAAc,EAAE,KAAK,CAAC,cAAc;SACrC;KACF,CAAC,CAAC;IACH,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;IAChE,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,UAAU,CAAC,qBAAqB,CAAC;QAC3D,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,MAAM;QACN,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,cAAc,EAAE,KAAK,CAAC,cAAc;QACpC,wBAAwB,EAAE,+BAA+B,CAAC;YACxD,0BAA0B,EAAE,KAAK,CAAC,0BAA0B;SAC7D,CAAC;QACF,+BAA+B,EAAE,KAAK,CAAC,+BAA+B;KACvE,CAAC,CAAC;IACH,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IAC1D,CAAC;IAED,OAAO,OAAO,CAAC,QAAQ,CAAC;AAC1B,CAAC","sourcesContent":["import type { ContainerDirectGrant } from \"@tearleads/crypto\";\nimport type { ContainerMutationResponse } from \"@tearleads/validators/response\";\nimport type { ReferencedPrincipalPolicyWarmer } from \"../../data/keyingProjectionVerification\";\nimport { createProjectionUserKeyResolver } from \"../../data/keyingProjectionVerification/userKeyResolver\";\nimport type { TrustedUserIdentityResolver } from \"../../data/trustedUserIdentity\";\nimport type { ContainerMutationService } from \"../containers\";\nimport { resolveDocumentCreateAuthor } from \"../documents\";\n\ntype OrganizationContainerGrantSubject = Pick<\n ContainerDirectGrant,\n \"subjectId\" | \"subjectType\"\n>;\n\nexport async function revokeOrganizationContainerGrant(input: {\n readonly stillCurrent: () => boolean;\n readonly containerId: string;\n /** Bound to the runtime snapshot whose encapsulation key reaches the container. */\n readonly containers: ContainerMutationService;\n readonly organizationId: string;\n readonly resolveTrustedUserIdentity: TrustedUserIdentityResolver;\n readonly revokedSubject: OrganizationContainerGrantSubject;\n readonly signerUserId: string;\n readonly signingFingerprint: string;\n readonly signingKeyPair: {\n readonly signingPrivateKey: Uint8Array;\n readonly signingPublicKey: Uint8Array;\n };\n readonly warmReferencedPrincipalPolicies?:\n | ReferencedPrincipalPolicyWarmer\n | undefined;\n}): Promise<ContainerMutationResponse> {\n const author = resolveDocumentCreateAuthor({\n auth: {\n organizationId: input.organizationId,\n userId: input.signerUserId,\n },\n crypto: {\n signingFingerprint: input.signingFingerprint,\n signingKeyPair: input.signingKeyPair,\n },\n });\n if (!author) {\n throw new Error(\"Org Manager signing context is unavailable\");\n }\n\n const revoked = await input.containers.revokeRemoteContainer({\n stillCurrent: input.stillCurrent,\n author,\n containerId: input.containerId,\n revokedSubject: input.revokedSubject,\n resolveProjectionUserKey: createProjectionUserKeyResolver({\n resolveTrustedUserIdentity: input.resolveTrustedUserIdentity,\n }),\n warmReferencedPrincipalPolicies: input.warmReferencedPrincipalPolicies,\n });\n if (!revoked) {\n throw new Error(\"Container grant could not be revoked\");\n }\n\n return revoked.response;\n}\n"]}
|