@dynamic-labs-sdk/client 1.33.2 → 1.33.3
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/{apiClient-B0eCQXEJ.native.esm.js → apiClient-CpfEx6Uc.native.esm.js} +3 -3
- package/dist/{apiClient-B0eCQXEJ.native.esm.js.map → apiClient-CpfEx6Uc.native.esm.js.map} +1 -1
- package/dist/core.cjs +5 -78
- package/dist/core.cjs.map +1 -1
- package/dist/core.esm.js +6 -77
- package/dist/core.esm.js.map +1 -1
- package/dist/core.native.esm.js +8 -79
- package/dist/core.native.esm.js.map +1 -1
- package/dist/exports/core.d.ts +0 -2
- package/dist/exports/core.d.ts.map +1 -1
- package/dist/exports/waas.d.ts +13 -1
- package/dist/exports/waas.d.ts.map +1 -1
- package/dist/{getNetworkProviderFromNetworkId-DaxDzIv4.cjs → getNetworkProviderFromNetworkId-Cez8TM-n.cjs} +2 -2
- package/dist/{getNetworkProviderFromNetworkId-DaxDzIv4.cjs.map → getNetworkProviderFromNetworkId-Cez8TM-n.cjs.map} +1 -1
- package/dist/{getNetworkProviderFromNetworkId-CgxCy8qP.esm.js → getNetworkProviderFromNetworkId-Cf-CfYM4.esm.js} +2 -2
- package/dist/{getNetworkProviderFromNetworkId-CgxCy8qP.esm.js.map → getNetworkProviderFromNetworkId-Cf-CfYM4.esm.js.map} +1 -1
- package/dist/{getNetworkProviderFromNetworkId-OXG2gPby.native.esm.js → getNetworkProviderFromNetworkId-CuTEQ9dg.native.esm.js} +8 -8
- package/dist/getNetworkProviderFromNetworkId-CuTEQ9dg.native.esm.js.map +1 -0
- package/dist/{getSignedSessionId-B2s2UuwJ.native.esm.js → getSignedSessionId-Bt4obN3w.native.esm.js} +3 -3
- package/dist/{getSignedSessionId-B2s2UuwJ.native.esm.js.map → getSignedSessionId-Bt4obN3w.native.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-DdMeCIV-.esm.js → getSignedSessionId-Cx7WP4ZJ.esm.js} +3 -3
- package/dist/{getSignedSessionId-DdMeCIV-.esm.js.map → getSignedSessionId-Cx7WP4ZJ.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-KiBgLtda.cjs → getSignedSessionId-DiVxv0qz.cjs} +3 -3
- package/dist/{getSignedSessionId-KiBgLtda.cjs.map → getSignedSessionId-DiVxv0qz.cjs.map} +1 -1
- package/dist/{getVerifiedCredentialForWalletAccount-DzZ-0SaQ.esm.js → getVerifiedCredentialForWalletAccount-DfKRbqco.esm.js} +2 -2
- package/dist/{getVerifiedCredentialForWalletAccount-DzZ-0SaQ.esm.js.map → getVerifiedCredentialForWalletAccount-DfKRbqco.esm.js.map} +1 -1
- package/dist/{getVerifiedCredentialForWalletAccount-y2drOcyb.cjs → getVerifiedCredentialForWalletAccount-UIcOv7IN.cjs} +2 -2
- package/dist/{getVerifiedCredentialForWalletAccount-y2drOcyb.cjs.map → getVerifiedCredentialForWalletAccount-UIcOv7IN.cjs.map} +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.esm.js +7 -7
- package/dist/index.native.esm.js +9 -9
- package/dist/index.native.esm.js.map +1 -1
- package/dist/{isMfaRequiredForAction-CXuuO-wy.native.esm.js → isMfaRequiredForAction-CxYft5KR.native.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-CXuuO-wy.native.esm.js.map → isMfaRequiredForAction-CxYft5KR.native.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-By7uHgpn.cjs → isMfaRequiredForAction-Czx-uPFY.cjs} +2 -2
- package/dist/{isMfaRequiredForAction-By7uHgpn.cjs.map → isMfaRequiredForAction-Czx-uPFY.cjs.map} +1 -1
- package/dist/{isMfaRequiredForAction-BLegdReE.esm.js → isMfaRequiredForAction-DS8fcwxO.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-BLegdReE.esm.js.map → isMfaRequiredForAction-DS8fcwxO.esm.js.map} +1 -1
- package/dist/{isUserOnboardingComplete-Bvh4NLBz.esm.js → isUserOnboardingComplete-COmYFW26.esm.js} +3 -3
- package/dist/{isUserOnboardingComplete-Bvh4NLBz.esm.js.map → isUserOnboardingComplete-COmYFW26.esm.js.map} +1 -1
- package/dist/{isUserOnboardingComplete-hn1rWlA-.native.esm.js → isUserOnboardingComplete-DYnRDLep.native.esm.js} +3 -3
- package/dist/{isUserOnboardingComplete-hn1rWlA-.native.esm.js.map → isUserOnboardingComplete-DYnRDLep.native.esm.js.map} +1 -1
- package/dist/{isUserOnboardingComplete-DMefkHRY.cjs → isUserOnboardingComplete-FbjleMQm.cjs} +3 -3
- package/dist/{isUserOnboardingComplete-DMefkHRY.cjs.map → isUserOnboardingComplete-FbjleMQm.cjs.map} +1 -1
- package/dist/{logoutWithReason-c1DmyRBx.cjs → logoutWithReason-BKwWBsCT.cjs} +3 -3
- package/dist/{logoutWithReason-c1DmyRBx.cjs.map → logoutWithReason-BKwWBsCT.cjs.map} +1 -1
- package/dist/{logoutWithReason-B-cf-dUs.esm.js → logoutWithReason-DO0kP7nf.esm.js} +3 -3
- package/dist/{logoutWithReason-B-cf-dUs.esm.js.map → logoutWithReason-DO0kP7nf.esm.js.map} +1 -1
- package/dist/{logoutWithReason-C4AgSbjv.native.esm.js → logoutWithReason-DWkIKoLk.native.esm.js} +2 -2
- package/dist/{logoutWithReason-C4AgSbjv.native.esm.js.map → logoutWithReason-DWkIKoLk.native.esm.js.map} +1 -1
- package/dist/{migrateFromFireblocks-B0pkwAaK.native.esm.js → migrateFromFireblocks-BwYnNAAh.native.esm.js} +2 -2
- package/dist/{migrateFromFireblocks-B0pkwAaK.native.esm.js.map → migrateFromFireblocks-BwYnNAAh.native.esm.js.map} +1 -1
- package/dist/{migrateFromFireblocks-B76sFd7a.esm.js → migrateFromFireblocks-C_cap--b.esm.js} +2 -2
- package/dist/{migrateFromFireblocks-B76sFd7a.esm.js.map → migrateFromFireblocks-C_cap--b.esm.js.map} +1 -1
- package/dist/{migrateFromFireblocks-RCqy2qOG.cjs → migrateFromFireblocks-ycJIYcrm.cjs} +2 -2
- package/dist/{migrateFromFireblocks-RCqy2qOG.cjs.map → migrateFromFireblocks-ycJIYcrm.cjs.map} +1 -1
- package/dist/modules/sessionKeys/canonicalizeJson/canonicalizeJson.d.ts +20 -0
- package/dist/modules/sessionKeys/canonicalizeJson/canonicalizeJson.d.ts.map +1 -0
- package/dist/modules/sessionKeys/canonicalizeJson/index.d.ts +2 -0
- package/dist/modules/sessionKeys/canonicalizeJson/index.d.ts.map +1 -0
- package/dist/modules/sessionKeys/signBusinessAccountIntent/signBusinessAccountIntent.d.ts +39 -6
- package/dist/modules/sessionKeys/signBusinessAccountIntent/signBusinessAccountIntent.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/addBusinessAccountMember/addBusinessAccountMember.d.ts +9 -3
- package/dist/modules/waas/businessAccounts/addBusinessAccountMember/addBusinessAccountMember.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.d.ts +10 -3
- package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/approveBusinessAccountProposal/approveBusinessAccountProposal.d.ts +43 -0
- package/dist/modules/waas/businessAccounts/approveBusinessAccountProposal/approveBusinessAccountProposal.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/approveBusinessAccountProposal/index.d.ts +2 -0
- package/dist/modules/waas/businessAccounts/approveBusinessAccountProposal/index.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/businessAccounts.types.d.ts +249 -0
- package/dist/modules/waas/businessAccounts/businessAccounts.types.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/defineBusinessAccountRole/defineBusinessAccountRole.d.ts +45 -0
- package/dist/modules/waas/businessAccounts/defineBusinessAccountRole/defineBusinessAccountRole.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/defineBusinessAccountRole/index.d.ts +2 -0
- package/dist/modules/waas/businessAccounts/defineBusinessAccountRole/index.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/deleteBusinessAccountRole/deleteBusinessAccountRole.d.ts +41 -0
- package/dist/modules/waas/businessAccounts/deleteBusinessAccountRole/deleteBusinessAccountRole.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/deleteBusinessAccountRole/index.d.ts +2 -0
- package/dist/modules/waas/businessAccounts/deleteBusinessAccountRole/index.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/executeBusinessAccountProposal/executeBusinessAccountProposal.d.ts +39 -0
- package/dist/modules/waas/businessAccounts/executeBusinessAccountProposal/executeBusinessAccountProposal.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/executeBusinessAccountProposal/index.d.ts +2 -0
- package/dist/modules/waas/businessAccounts/executeBusinessAccountProposal/index.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/getBusinessAccountGovernance/getBusinessAccountGovernance.d.ts +30 -0
- package/dist/modules/waas/businessAccounts/getBusinessAccountGovernance/getBusinessAccountGovernance.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/getBusinessAccountGovernance/index.d.ts +2 -0
- package/dist/modules/waas/businessAccounts/getBusinessAccountGovernance/index.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/listBusinessAccountProposals/index.d.ts +2 -0
- package/dist/modules/waas/businessAccounts/listBusinessAccountProposals/index.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/listBusinessAccountProposals/listBusinessAccountProposals.d.ts +26 -0
- package/dist/modules/waas/businessAccounts/listBusinessAccountProposals/listBusinessAccountProposals.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/listBusinessAccountProposalsAwaitingMyApproval/index.d.ts +2 -0
- package/dist/modules/waas/businessAccounts/listBusinessAccountProposalsAwaitingMyApproval/index.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/listBusinessAccountProposalsAwaitingMyApproval/listBusinessAccountProposalsAwaitingMyApproval.d.ts +21 -0
- package/dist/modules/waas/businessAccounts/listBusinessAccountProposalsAwaitingMyApproval/listBusinessAccountProposalsAwaitingMyApproval.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/listBusinessAccountRoles/index.d.ts +2 -0
- package/dist/modules/waas/businessAccounts/listBusinessAccountRoles/index.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/listBusinessAccountRoles/listBusinessAccountRoles.d.ts +26 -0
- package/dist/modules/waas/businessAccounts/listBusinessAccountRoles/listBusinessAccountRoles.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/removeBusinessAccountMember/removeBusinessAccountMember.d.ts +11 -2
- package/dist/modules/waas/businessAccounts/removeBusinessAccountMember/removeBusinessAccountMember.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/removeBusinessAccountSigner/removeBusinessAccountSigner.d.ts +11 -2
- package/dist/modules/waas/businessAccounts/removeBusinessAccountSigner/removeBusinessAccountSigner.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/removeBusinessAccountWallet/removeBusinessAccountWallet.d.ts +12 -4
- package/dist/modules/waas/businessAccounts/removeBusinessAccountWallet/removeBusinessAccountWallet.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/resendFields.d.ts +39 -0
- package/dist/modules/waas/businessAccounts/resendFields.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/setBusinessAccountGovernance/index.d.ts +2 -0
- package/dist/modules/waas/businessAccounts/setBusinessAccountGovernance/index.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/setBusinessAccountGovernance/setBusinessAccountGovernance.d.ts +49 -0
- package/dist/modules/waas/businessAccounts/setBusinessAccountGovernance/setBusinessAccountGovernance.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/transferBusinessAccountOwnership/transferBusinessAccountOwnership.d.ts +11 -2
- package/dist/modules/waas/businessAccounts/transferBusinessAccountOwnership/transferBusinessAccountOwnership.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/updateBusinessAccountMemberRole/updateBusinessAccountMemberRole.d.ts +11 -2
- package/dist/modules/waas/businessAccounts/updateBusinessAccountMemberRole/updateBusinessAccountMemberRole.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/vetoBusinessAccountProposal/index.d.ts +2 -0
- package/dist/modules/waas/businessAccounts/vetoBusinessAccountProposal/index.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/vetoBusinessAccountProposal/vetoBusinessAccountProposal.d.ts +29 -0
- package/dist/modules/waas/businessAccounts/vetoBusinessAccountProposal/vetoBusinessAccountProposal.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/withdrawBusinessAccountProposalApproval/index.d.ts +2 -0
- package/dist/modules/waas/businessAccounts/withdrawBusinessAccountProposalApproval/index.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/withdrawBusinessAccountProposalApproval/withdrawBusinessAccountProposalApproval.d.ts +29 -0
- package/dist/modules/waas/businessAccounts/withdrawBusinessAccountProposalApproval/withdrawBusinessAccountProposalApproval.d.ts.map +1 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/{waas-DIlnOHm6.native.esm.js → waas-C4jtRxx1.native.esm.js} +688 -26
- package/dist/waas-C4jtRxx1.native.esm.js.map +1 -0
- package/dist/{waas-7vSYuH3H.cjs → waas-CioG-_yp.cjs} +764 -24
- package/dist/waas-CioG-_yp.cjs.map +1 -0
- package/dist/{waas-H5xyBfTI.esm.js → waas-DjivkzyT.esm.js} +688 -26
- package/dist/waas-DjivkzyT.esm.js.map +1 -0
- package/dist/waas.cjs +18 -5
- package/dist/waas.esm.js +5 -5
- package/dist/waas.native.esm.js +5 -5
- package/dist/waasCore.cjs +5 -5
- package/dist/waasCore.esm.js +5 -5
- package/dist/waasCore.native.esm.js +5 -5
- package/package.json +3 -4
- package/dist/getNetworkProviderFromNetworkId-OXG2gPby.native.esm.js.map +0 -1
- package/dist/waas-7vSYuH3H.cjs.map +0 -1
- package/dist/waas-DIlnOHm6.native.esm.js.map +0 -1
- package/dist/waas-H5xyBfTI.esm.js.map +0 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { DynamicClient } from '../../../../client/types';
|
|
2
|
+
import type { BusinessAccountProposal } from '../businessAccounts.types';
|
|
3
|
+
type ApproveProposalParams = {
|
|
4
|
+
businessAccountId: string;
|
|
5
|
+
proposal: BusinessAccountProposal;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Signs and records this session's approval of a pending proposal.
|
|
9
|
+
*
|
|
10
|
+
* The signature is over the intent AS STORED on `proposal`, which is why it's
|
|
11
|
+
* read off the proposal rather than rebuilt — a re-derived intent would carry
|
|
12
|
+
* a different `intentId` and fail verification. Run this signed in as the
|
|
13
|
+
* approver: the session key that signs is theirs, and the enclave reads who
|
|
14
|
+
* they are from the bearer token, not from any field here. An initiator can
|
|
15
|
+
* never approve their own proposal.
|
|
16
|
+
*
|
|
17
|
+
* With `autoExecute` on, the approval that completes the quorum also applies
|
|
18
|
+
* the change and the returned proposal reads `status: 'executed'` — the
|
|
19
|
+
* caller's cue to refresh the account rather than inferring readiness from
|
|
20
|
+
* the tally.
|
|
21
|
+
*
|
|
22
|
+
* @param params.businessAccountId - The business account the proposal belongs to.
|
|
23
|
+
* @param params.proposal - The proposal to approve, as returned by
|
|
24
|
+
* `listBusinessAccountProposals` or `getBusinessAccount`.
|
|
25
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
26
|
+
* @returns The proposal after recording this approval.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const pending = await listBusinessAccountProposals({ businessAccountId, status: 'pending' });
|
|
31
|
+
* const updated = await approveBusinessAccountProposal({ businessAccountId, proposal: pending[0] });
|
|
32
|
+
* if (updated.status === 'executed') {
|
|
33
|
+
* // refresh the account — the change is live
|
|
34
|
+
* }
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @see {@link vetoBusinessAccountProposal} for refusing a proposal instead.
|
|
38
|
+
* @see {@link executeBusinessAccountProposal} for applying a satisfied one with `autoExecute` off.
|
|
39
|
+
* @notInstrumented
|
|
40
|
+
*/
|
|
41
|
+
export declare const approveBusinessAccountProposal: ({ businessAccountId, proposal }: ApproveProposalParams, client?: DynamicClient) => Promise<BusinessAccountProposal>;
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=approveBusinessAccountProposal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"approveBusinessAccountProposal.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/approveBusinessAccountProposal/approveBusinessAccountProposal.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAG9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEzE,KAAK,qBAAqB,GAAG;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,uBAAuB,CAAC;CACnC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,8BAA8B,oCACR,qBAAqB,WAC9C,aAAa,KACpB,OAAO,CAAC,uBAAuB,CAwBjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/approveBusinessAccountProposal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC"}
|
|
@@ -280,6 +280,255 @@ export type BusinessAccountActionRequired = {
|
|
|
280
280
|
proposalId?: string;
|
|
281
281
|
reason: 'APPROVALS_REQUIRED' | 'INTENT_REQUIRED';
|
|
282
282
|
};
|
|
283
|
+
/**
|
|
284
|
+
* A previously-signed intent, ready to resend so a governed mutation can move
|
|
285
|
+
* past `INTENT_REQUIRED` to `APPROVALS_REQUIRED`. Build it with
|
|
286
|
+
* `signBusinessAccountIntent({ intent: actionRequired.intent })`, then pass it
|
|
287
|
+
* back into the same mutation call as `signed`.
|
|
288
|
+
*
|
|
289
|
+
* @example
|
|
290
|
+
* ```ts
|
|
291
|
+
* const first = await addBusinessAccountMember({ businessAccountId, targetIdentity, role: 'admin' });
|
|
292
|
+
* if (isBusinessAccountActionRequired(first) && first.reason === 'INTENT_REQUIRED') {
|
|
293
|
+
* const signed = await signBusinessAccountIntent({ intent: first.intent });
|
|
294
|
+
* const second = await addBusinessAccountMember({ businessAccountId, targetIdentity, role: 'admin', signed });
|
|
295
|
+
* }
|
|
296
|
+
* ```
|
|
297
|
+
*
|
|
298
|
+
* @see {@link signBusinessAccountIntent} for producing this shape.
|
|
299
|
+
* @see {@link BusinessAccountActionRequired} for the `intent` a fresh attempt returns.
|
|
300
|
+
*/
|
|
301
|
+
export type SignedBusinessAccountIntent = {
|
|
302
|
+
intent: BusinessAccountMutationIntent;
|
|
303
|
+
intentSignature: string;
|
|
304
|
+
};
|
|
305
|
+
/**
|
|
306
|
+
* The new document version after a governance-configuration change applies
|
|
307
|
+
* immediately (ungoverned, or the completing approval of a governed one).
|
|
308
|
+
* Distinct from the domain objects other mutations return (a member, a
|
|
309
|
+
* detail) because `setGovernance`/`defineRole`/`deleteRole` change the
|
|
310
|
+
* account's authorization document itself, which has no separate summary
|
|
311
|
+
* shape of its own.
|
|
312
|
+
*
|
|
313
|
+
* @example
|
|
314
|
+
* ```ts
|
|
315
|
+
* const result = await setBusinessAccountGovernance({ businessAccountId, governance });
|
|
316
|
+
* if (!isBusinessAccountActionRequired(result)) {
|
|
317
|
+
* console.log(result.version);
|
|
318
|
+
* }
|
|
319
|
+
* ```
|
|
320
|
+
*
|
|
321
|
+
* @see {@link setBusinessAccountGovernance}
|
|
322
|
+
* @see {@link defineBusinessAccountRole}
|
|
323
|
+
* @see {@link deleteBusinessAccountRole}
|
|
324
|
+
*/
|
|
325
|
+
export type BusinessAccountMutationVersion = {
|
|
326
|
+
version: number;
|
|
327
|
+
};
|
|
328
|
+
/**
|
|
329
|
+
* A role this account has defined, and the built-in role it inherits
|
|
330
|
+
* authority from. Inheriting is real: a holder of a role inheriting `admin`
|
|
331
|
+
* passes every admin-gated check, under the role's own name rather than
|
|
332
|
+
* `admin` itself.
|
|
333
|
+
*
|
|
334
|
+
* @example
|
|
335
|
+
* ```ts
|
|
336
|
+
* const roles = await listBusinessAccountRoles({ businessAccountId });
|
|
337
|
+
* console.log(roles.cfo?.inherits); // 'admin'
|
|
338
|
+
* ```
|
|
339
|
+
*
|
|
340
|
+
* @see {@link listBusinessAccountRoles}
|
|
341
|
+
* @see {@link defineBusinessAccountRole}
|
|
342
|
+
*/
|
|
343
|
+
export type BusinessAccountRoleDefinition = {
|
|
344
|
+
inherits: BuiltInBusinessAccountMemberRole;
|
|
345
|
+
};
|
|
346
|
+
/**
|
|
347
|
+
* Roles this account has defined, keyed by role name. Empty when none are —
|
|
348
|
+
* that's an answer, not a missing resource.
|
|
349
|
+
*
|
|
350
|
+
* @example
|
|
351
|
+
* ```ts
|
|
352
|
+
* const roles = await listBusinessAccountRoles({ businessAccountId });
|
|
353
|
+
* const cfoInherits = roles.cfo?.inherits;
|
|
354
|
+
* ```
|
|
355
|
+
*
|
|
356
|
+
* @see {@link listBusinessAccountRoles}
|
|
357
|
+
* @see {@link BusinessAccountRoleDefinition} for one role's shape.
|
|
358
|
+
*/
|
|
359
|
+
export type BusinessAccountRoleDefinitions = Record<string, BusinessAccountRoleDefinition>;
|
|
360
|
+
/**
|
|
361
|
+
* Scopes a governance requirement to a subset of the changes it would
|
|
362
|
+
* otherwise match. A field only takes effect on the action(s) whose change
|
|
363
|
+
* actually carries it — `newRole` never matches `addMember`, for
|
|
364
|
+
* example, since nothing about adding a member names a role being left. Leave
|
|
365
|
+
* a requirement's `when` unset to apply it to every change of that action.
|
|
366
|
+
*
|
|
367
|
+
* `initiatorRoles` and `initiatorUserIds` describe the proposer rather than
|
|
368
|
+
* the change, so they apply everywhere regardless of action.
|
|
369
|
+
*
|
|
370
|
+
* @example
|
|
371
|
+
* ```ts
|
|
372
|
+
* const when: BusinessAccountRequirementCondition = { role: 'admin' };
|
|
373
|
+
* ```
|
|
374
|
+
*
|
|
375
|
+
* @see {@link BusinessAccountGovernanceRequirement} for where this is embedded.
|
|
376
|
+
* @see {@link setBusinessAccountGovernance} for writing a requirement with one.
|
|
377
|
+
*/
|
|
378
|
+
export type BusinessAccountRequirementCondition = {
|
|
379
|
+
initiatorRoles?: string[];
|
|
380
|
+
initiatorUserIds?: string[];
|
|
381
|
+
newRole?: string;
|
|
382
|
+
role?: string;
|
|
383
|
+
targetUserIds?: string[];
|
|
384
|
+
walletIds?: string[];
|
|
385
|
+
};
|
|
386
|
+
/**
|
|
387
|
+
* A governance rule: how many approvals a governed action needs, from whom,
|
|
388
|
+
* and under what condition it applies. This is the definition shape —
|
|
389
|
+
* `getBusinessAccountGovernance` returns it, `setBusinessAccountGovernance`
|
|
390
|
+
* takes it back. Distinct from `BusinessAccountApprovalRequirement`, which is
|
|
391
|
+
* the read-only tally of how close a specific proposal is to meeting one of
|
|
392
|
+
* these.
|
|
393
|
+
*
|
|
394
|
+
* @example
|
|
395
|
+
* ```ts
|
|
396
|
+
* const requirement: BusinessAccountGovernanceRequirement = {
|
|
397
|
+
* id: 'one-admin',
|
|
398
|
+
* schemaVersion: 1,
|
|
399
|
+
* requiredApprovals: 1,
|
|
400
|
+
* eligibleApproverRoles: ['admin'],
|
|
401
|
+
* };
|
|
402
|
+
* ```
|
|
403
|
+
*
|
|
404
|
+
* @see {@link BusinessAccountGovernance} for how these are keyed by action.
|
|
405
|
+
* @see {@link BusinessAccountApprovalRequirement} for the read-only tally shape.
|
|
406
|
+
* @see {@link setBusinessAccountGovernance}
|
|
407
|
+
*/
|
|
408
|
+
export type BusinessAccountGovernanceRequirement = {
|
|
409
|
+
approverCapabilities?: string[];
|
|
410
|
+
/** Seconds from the signed intent in which the change must be BOTH
|
|
411
|
+
* approved and executed — one deadline, not separate approve-by and
|
|
412
|
+
* execute-by clocks. Absent defaults to 24 hours; capped at 30 days. */
|
|
413
|
+
completeWithinSeconds?: number;
|
|
414
|
+
eligibleApproverRoles?: string[];
|
|
415
|
+
eligibleInitiatorRoles?: string[];
|
|
416
|
+
id: string;
|
|
417
|
+
mandatoryApproverRoles?: string[];
|
|
418
|
+
requiredApprovals: number;
|
|
419
|
+
schemaVersion: number;
|
|
420
|
+
when?: BusinessAccountRequirementCondition;
|
|
421
|
+
};
|
|
422
|
+
/**
|
|
423
|
+
* The governance rules in force, keyed by governed action, exactly as
|
|
424
|
+
* `getBusinessAccountGovernance` returns it and `setBusinessAccountGovernance`
|
|
425
|
+
* accepts it back. Empty when the account governs nothing — that is an
|
|
426
|
+
* answer, not a missing resource.
|
|
427
|
+
*
|
|
428
|
+
* @example
|
|
429
|
+
* ```ts
|
|
430
|
+
* const governance = await getBusinessAccountGovernance({ businessAccountId });
|
|
431
|
+
* const addMemberRules = governance.addMember ?? [];
|
|
432
|
+
* ```
|
|
433
|
+
*
|
|
434
|
+
* @see {@link getBusinessAccountGovernance}
|
|
435
|
+
* @see {@link setBusinessAccountGovernance}
|
|
436
|
+
*/
|
|
437
|
+
export type BusinessAccountGovernance = Record<string, BusinessAccountGovernanceRequirement[]>;
|
|
438
|
+
/**
|
|
439
|
+
* One recorded consent on a proposal: who approved, when, and whether they
|
|
440
|
+
* later withdrew it. A withdrawal sets `revokedAt` rather than deleting the
|
|
441
|
+
* row — consent is recorded as given and taken back, not erased.
|
|
442
|
+
*
|
|
443
|
+
* @example
|
|
444
|
+
* ```ts
|
|
445
|
+
* const stillCounts = proposal.approvals.filter((a) => !a.revokedAt);
|
|
446
|
+
* ```
|
|
447
|
+
*
|
|
448
|
+
* @see {@link BusinessAccountProposal} for where this is embedded.
|
|
449
|
+
* @see {@link withdrawBusinessAccountProposalApproval} for what sets `revokedAt`.
|
|
450
|
+
*/
|
|
451
|
+
export type BusinessAccountProposalApprovalRecord = {
|
|
452
|
+
approvedAt: string;
|
|
453
|
+
approverUserId: string;
|
|
454
|
+
revokedAt: string | null;
|
|
455
|
+
};
|
|
456
|
+
/**
|
|
457
|
+
* A user a proposed change is about — the member being added, the signer
|
|
458
|
+
* being removed, the new owner — resolved for display. Empty for a change
|
|
459
|
+
* that names no user, such as `setGovernance`.
|
|
460
|
+
*
|
|
461
|
+
* @example
|
|
462
|
+
* ```ts
|
|
463
|
+
* const names = proposal.subjects?.map((s) => s.email ?? s.userId);
|
|
464
|
+
* ```
|
|
465
|
+
*
|
|
466
|
+
* @see {@link BusinessAccountProposal} for where this is embedded.
|
|
467
|
+
* @see {@link listBusinessAccountProposals} for where proposals are fetched.
|
|
468
|
+
*/
|
|
469
|
+
export type BusinessAccountProposalSubject = {
|
|
470
|
+
email: string | null;
|
|
471
|
+
userId: string;
|
|
472
|
+
};
|
|
473
|
+
/**
|
|
474
|
+
* A governed mutation waiting on consent: what was proposed, who has signed,
|
|
475
|
+
* and how each governance requirement is tracking. Untrusted workflow state —
|
|
476
|
+
* the enclave verifies every signature when the proposal is executed, and the
|
|
477
|
+
* signature on file is over `intent` exactly as stored, so an approver must
|
|
478
|
+
* sign these bytes verbatim rather than re-derive the intent.
|
|
479
|
+
*
|
|
480
|
+
* `approvalRequirements` is authoritative for readiness — do not infer it
|
|
481
|
+
* from counting `approvals`, which includes approvers outside a rule's pool
|
|
482
|
+
* and approvers demoted since they signed.
|
|
483
|
+
*
|
|
484
|
+
* @example
|
|
485
|
+
* ```ts
|
|
486
|
+
* const pending = await listBusinessAccountProposals({ businessAccountId, status: 'pending' });
|
|
487
|
+
* const ready = pending.filter((p) => p.approvalRequirements?.every((r) => r.satisfied));
|
|
488
|
+
* ```
|
|
489
|
+
*
|
|
490
|
+
* @see {@link listBusinessAccountProposals}
|
|
491
|
+
* @see {@link approveBusinessAccountProposal}
|
|
492
|
+
* @see {@link executeBusinessAccountProposal}
|
|
493
|
+
*/
|
|
494
|
+
export type BusinessAccountProposal = {
|
|
495
|
+
actionType: string;
|
|
496
|
+
approvalRequirements?: BusinessAccountApprovalRequirement[];
|
|
497
|
+
approvals: BusinessAccountProposalApprovalRecord[];
|
|
498
|
+
autoExecute?: boolean;
|
|
499
|
+
businessAccountId: string;
|
|
500
|
+
completeBy: string;
|
|
501
|
+
consumedAt: string | null;
|
|
502
|
+
createdAt: string;
|
|
503
|
+
id: string;
|
|
504
|
+
initiatorUserId: string;
|
|
505
|
+
intent: BusinessAccountMutationIntent;
|
|
506
|
+
status: 'executed' | 'expired' | 'pending' | 'vetoed';
|
|
507
|
+
subjects?: BusinessAccountProposalSubject[];
|
|
508
|
+
};
|
|
509
|
+
/**
|
|
510
|
+
* A proposal's tally when execution is attempted before its quorum is met.
|
|
511
|
+
* Not a failure: the caller may try again once more approvals land.
|
|
512
|
+
* `intent` is echoed back so a caller who executed too early can hand
|
|
513
|
+
* remaining approvers the exact bytes to sign, without a separate fetch.
|
|
514
|
+
*
|
|
515
|
+
* @example
|
|
516
|
+
* ```ts
|
|
517
|
+
* const result = await executeBusinessAccountProposal({ businessAccountId, proposalId });
|
|
518
|
+
* if ('reason' in result) {
|
|
519
|
+
* console.log(result.approvalRequirements.map((r) => r.satisfied));
|
|
520
|
+
* }
|
|
521
|
+
* ```
|
|
522
|
+
*
|
|
523
|
+
* @see {@link executeBusinessAccountProposal}
|
|
524
|
+
* @see {@link BusinessAccountApprovalRequirement} for what each entry in `approvalRequirements` means.
|
|
525
|
+
*/
|
|
526
|
+
export type BusinessAccountProposalStillPending = {
|
|
527
|
+
approvalRequirements: BusinessAccountApprovalRequirement[];
|
|
528
|
+
intent: BusinessAccountMutationIntent;
|
|
529
|
+
proposalId: string;
|
|
530
|
+
reason: 'APPROVALS_REQUIRED';
|
|
531
|
+
};
|
|
283
532
|
export type BusinessAccountsApi = {
|
|
284
533
|
addMember: (params: {
|
|
285
534
|
businessAccountId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"businessAccounts.types.d.ts","sourceRoot":"","sources":["../../../../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AE,MAAM,CAAC;KAClB,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACrC,0BAA0B,EAAE,CAAC,MAAM,EAAE;QACnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,QAAQ,EAAE,MAAM,CAAC;KAClB,KAAK,OAAO,CAAC,6BAA6B,GAAG,qBAAqB,CAAC,CAAC;IACrE,qBAAqB,EAAE,CAAC,IAAI,CAAC,EAAE;QAC7B,OAAO,CAAC,EAAE;YAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAC;KACpC,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IAC/B,kBAAkB,EAAE,CAAC,MAAM,EAAE;QAC3B,iBAAiB,EAAE,MAAM,CAAC;KAC3B,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACrC,oBAAoB,EAAE,MAAM,OAAO,CAAC,mBAAmB,CAAC,CAAC;CAC1D,CAAC"}
|
|
1
|
+
{"version":3,"file":"businessAccounts.types.d.ts","sourceRoot":"","sources":["../../../../src/modules/waas/businessAccounts/businessAccounts.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,iBA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waas/businessAccounts/defineBusinessAccountRole/defineBusinessAccountRole.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { DynamicClient } from '../../../../client/types';
|
|
2
|
+
import type { BuiltInBusinessAccountMemberRole, BusinessAccountActionRequired, BusinessAccountMutationVersion, SignedBusinessAccountIntent } from '../businessAccounts.types';
|
|
3
|
+
type DefineRoleParams = {
|
|
4
|
+
autoExecute?: boolean;
|
|
5
|
+
businessAccountId: string;
|
|
6
|
+
inherits: Exclude<BuiltInBusinessAccountMemberRole, 'owner'>;
|
|
7
|
+
role: string;
|
|
8
|
+
signed?: SignedBusinessAccountIntent;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Defines a custom role that inherits the authority of a built-in one.
|
|
12
|
+
* Inheriting is real: a holder passes every check gated on the base role,
|
|
13
|
+
* under the custom name rather than the base name itself. A role cannot
|
|
14
|
+
* inherit `owner` — use `transferBusinessAccountOwnership` to grant ownership.
|
|
15
|
+
*
|
|
16
|
+
* When the account governs `defineRole`, nothing is written and the 202 body
|
|
17
|
+
* is returned instead. Resend with `signed` (from `signBusinessAccountIntent`)
|
|
18
|
+
* to move past `INTENT_REQUIRED`.
|
|
19
|
+
*
|
|
20
|
+
* @param params.businessAccountId - The business account defining the role.
|
|
21
|
+
* @param params.role - The new role's name.
|
|
22
|
+
* @param params.inherits - The built-in role (`admin` or `viewer`) this role inherits.
|
|
23
|
+
* @param [params.autoExecute] - Whether to apply on the completing approval.
|
|
24
|
+
* Only meaningful on the first call.
|
|
25
|
+
* @param [params.signed] - A previously-signed intent, to resend past `INTENT_REQUIRED`.
|
|
26
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
27
|
+
* @returns The new document version, or the outstanding action required.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* await defineBusinessAccountRole({
|
|
32
|
+
* businessAccountId,
|
|
33
|
+
* role: 'cfo',
|
|
34
|
+
* inherits: 'admin',
|
|
35
|
+
* });
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @see {@link deleteBusinessAccountRole}
|
|
39
|
+
* @see {@link listBusinessAccountRoles}
|
|
40
|
+
* @throws {UnexpectedConsentResponseError} When a governed account answers 202 with an unrecognized body.
|
|
41
|
+
* @notInstrumented
|
|
42
|
+
*/
|
|
43
|
+
export declare const defineBusinessAccountRole: ({ businessAccountId, role, inherits, autoExecute, signed }: DefineRoleParams, client?: DynamicClient) => Promise<BusinessAccountActionRequired | BusinessAccountMutationVersion>;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=defineBusinessAccountRole.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defineBusinessAccountRole.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/defineBusinessAccountRole/defineBusinessAccountRole.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EACV,gCAAgC,EAChC,6BAA6B,EAC7B,8BAA8B,EAC9B,2BAA2B,EAC5B,MAAM,2BAA2B,CAAC;AAInC,KAAK,gBAAgB,GAAG;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC,gCAAgC,EAAE,OAAO,CAAC,CAAC;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,2BAA2B,CAAC;CACtC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,yBAAyB,+DACwB,gBAAgB,WACpE,aAAa,KACpB,OAAO,CAAC,6BAA6B,GAAG,8BAA8B,CA4BxE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/defineBusinessAccountRole/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC"}
|
package/dist/modules/waas/businessAccounts/deleteBusinessAccountRole/deleteBusinessAccountRole.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { DynamicClient } from '../../../../client/types';
|
|
2
|
+
import type { BusinessAccountActionRequired, BusinessAccountMutationVersion, SignedBusinessAccountIntent } from '../businessAccounts.types';
|
|
3
|
+
type DeleteRoleParams = {
|
|
4
|
+
autoExecute?: boolean;
|
|
5
|
+
businessAccountId: string;
|
|
6
|
+
role: string;
|
|
7
|
+
signed?: SignedBusinessAccountIntent;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Deletes a custom role definition. Holders are not removed and keep every
|
|
11
|
+
* capability they had — they're demoted to the role's inherited base (e.g. a
|
|
12
|
+
* deleted `cfo` role that inherited `admin` leaves its holders reading
|
|
13
|
+
* `admin`), since only the name goes away, not the authority. Refused with
|
|
14
|
+
* `ROLE_REFERENCED_BY_GOVERNANCE` while a governance requirement still names
|
|
15
|
+
* the role — remove it from governance first.
|
|
16
|
+
*
|
|
17
|
+
* When the account governs `deleteRole`, nothing is written and the 202 body
|
|
18
|
+
* is returned instead. Resend with `signed` (from `signBusinessAccountIntent`)
|
|
19
|
+
* to move past `INTENT_REQUIRED`.
|
|
20
|
+
*
|
|
21
|
+
* @param params.businessAccountId - The business account the role belongs to.
|
|
22
|
+
* @param params.role - The role's name.
|
|
23
|
+
* @param [params.autoExecute] - Whether to apply on the completing approval.
|
|
24
|
+
* Only meaningful on the first call.
|
|
25
|
+
* @param [params.signed] - A previously-signed intent, to resend past `INTENT_REQUIRED`.
|
|
26
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
27
|
+
* @returns The new document version, or the outstanding action required.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* await deleteBusinessAccountRole({ businessAccountId, role: 'cfo' });
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @see {@link defineBusinessAccountRole}
|
|
35
|
+
* @see {@link listBusinessAccountRoles}
|
|
36
|
+
* @throws {UnexpectedConsentResponseError} When a governed account answers 202 with an unrecognized body.
|
|
37
|
+
* @notInstrumented
|
|
38
|
+
*/
|
|
39
|
+
export declare const deleteBusinessAccountRole: ({ businessAccountId, role, autoExecute, signed }: DeleteRoleParams, client?: DynamicClient) => Promise<BusinessAccountActionRequired | BusinessAccountMutationVersion>;
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=deleteBusinessAccountRole.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteBusinessAccountRole.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/deleteBusinessAccountRole/deleteBusinessAccountRole.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EACV,6BAA6B,EAC7B,8BAA8B,EAC9B,2BAA2B,EAC5B,MAAM,2BAA2B,CAAC;AAInC,KAAK,gBAAgB,GAAG;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,2BAA2B,CAAC;CACtC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,yBAAyB,qDACc,gBAAgB,WAC1D,aAAa,KACpB,OAAO,CAAC,6BAA6B,GAAG,8BAA8B,CA4BxE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/deleteBusinessAccountRole/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { DynamicClient } from '../../../../client/types';
|
|
2
|
+
import type { BusinessAccountMutationVersion, BusinessAccountProposalStillPending } from '../businessAccounts.types';
|
|
3
|
+
type ExecuteProposalParams = {
|
|
4
|
+
businessAccountId: string;
|
|
5
|
+
proposalId: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Applies a proposal whose quorum is already met — the counterpart to
|
|
9
|
+
* `autoExecute: false`, where the completing approval records consent but
|
|
10
|
+
* does not itself apply the change. Also the only way to run a ceremony
|
|
11
|
+
* action's change (e.g. `addSignerToWallet`): its reshare needs a live signer
|
|
12
|
+
* to come back and run it, so the server forces `autoExecute` false in the
|
|
13
|
+
* signed bytes regardless of what was requested, and this is what someone
|
|
14
|
+
* holding a share calls afterward.
|
|
15
|
+
*
|
|
16
|
+
* A 202 here is not a failure — it means the collected approvals still don't
|
|
17
|
+
* satisfy the requirement, and the proposal stays `pending`.
|
|
18
|
+
*
|
|
19
|
+
* @param params.businessAccountId - The business account the proposal belongs to.
|
|
20
|
+
* @param params.proposalId - The proposal to execute.
|
|
21
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
22
|
+
* @returns The new document version, or the tally if approvals still fall short.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const result = await executeBusinessAccountProposal({ businessAccountId, proposalId });
|
|
27
|
+
* if ('reason' in result) {
|
|
28
|
+
* console.log(result.approvalRequirements);
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @see {@link approveBusinessAccountProposal} for the completing approval that usually does this instead.
|
|
33
|
+
* @see {@link BusinessAccountProposalStillPending} for the tally shape when it's still short.
|
|
34
|
+
* @throws {UnexpectedConsentResponseError} When a 202 answers with an unrecognized body.
|
|
35
|
+
* @notInstrumented
|
|
36
|
+
*/
|
|
37
|
+
export declare const executeBusinessAccountProposal: ({ businessAccountId, proposalId }: ExecuteProposalParams, client?: DynamicClient) => Promise<BusinessAccountMutationVersion | BusinessAccountProposalStillPending>;
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=executeBusinessAccountProposal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executeBusinessAccountProposal.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/executeBusinessAccountProposal/executeBusinessAccountProposal.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAG9D,OAAO,KAAK,EACV,8BAA8B,EAC9B,mCAAmC,EACpC,MAAM,2BAA2B,CAAC;AAEnC,KAAK,qBAAqB,GAAG;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,8BAA8B,sCACN,qBAAqB,WAChD,aAAa,KACpB,OAAO,CAAC,8BAA8B,GAAG,mCAAmC,CA4B9E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/executeBusinessAccountProposal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { DynamicClient } from '../../../../client/types';
|
|
2
|
+
import type { BusinessAccountGovernance } from '../businessAccounts.types';
|
|
3
|
+
type GetGovernanceParams = {
|
|
4
|
+
businessAccountId: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Reads the approval requirements currently in force for a business account,
|
|
8
|
+
* keyed by governed action. Empty when the account governs nothing — that's
|
|
9
|
+
* an answer, not a missing resource.
|
|
10
|
+
*
|
|
11
|
+
* There's no other way to tell a governed account from an ungoverned one
|
|
12
|
+
* ahead of time: a mutation only reveals it by answering 202.
|
|
13
|
+
*
|
|
14
|
+
* @param params.businessAccountId - The business account whose governance to read.
|
|
15
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
16
|
+
* @returns The governance section, keyed by governed action.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const governance = await getBusinessAccountGovernance({ businessAccountId });
|
|
21
|
+
* const addMemberRules = governance.addMember ?? [];
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @see {@link setBusinessAccountGovernance} for writing it back.
|
|
25
|
+
* @see {@link BusinessAccountGovernance} for the returned shape.
|
|
26
|
+
* @notInstrumented
|
|
27
|
+
*/
|
|
28
|
+
export declare const getBusinessAccountGovernance: ({ businessAccountId }: GetGovernanceParams, client?: DynamicClient) => Promise<BusinessAccountGovernance>;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=getBusinessAccountGovernance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getBusinessAccountGovernance.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/getBusinessAccountGovernance/getBusinessAccountGovernance.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAE3E,KAAK,mBAAmB,GAAG;IACzB,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,4BAA4B,0BAChB,mBAAmB,WAClC,aAAa,KACpB,OAAO,CAAC,yBAAyB,CASnC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/getBusinessAccountGovernance/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/listBusinessAccountProposals/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { DynamicClient } from '../../../../client/types';
|
|
2
|
+
import type { BusinessAccountProposal } from '../businessAccounts.types';
|
|
3
|
+
type ListProposalsParams = {
|
|
4
|
+
businessAccountId: string;
|
|
5
|
+
status?: 'pending';
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Lists a business account's governed-mutation proposals.
|
|
9
|
+
*
|
|
10
|
+
* @param params.businessAccountId - The business account whose proposals to list.
|
|
11
|
+
* @param [params.status] - Filter to `pending` only; omit for every status.
|
|
12
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
13
|
+
* @returns The matching proposals.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const pending = await listBusinessAccountProposals({ businessAccountId, status: 'pending' });
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @see {@link approveBusinessAccountProposal}
|
|
21
|
+
* @see {@link listBusinessAccountProposalsAwaitingMyApproval} for proposals across every account this caller belongs to.
|
|
22
|
+
* @notInstrumented
|
|
23
|
+
*/
|
|
24
|
+
export declare const listBusinessAccountProposals: ({ businessAccountId, status }: ListProposalsParams, client?: DynamicClient) => Promise<BusinessAccountProposal[]>;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=listBusinessAccountProposals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listBusinessAccountProposals.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/listBusinessAccountProposals/listBusinessAccountProposals.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEzE,KAAK,mBAAmB,GAAG;IACzB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,4BAA4B,kCACR,mBAAmB,WAC1C,aAAa,KACpB,OAAO,CAAC,uBAAuB,EAAE,CAYnC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/listBusinessAccountProposalsAwaitingMyApproval/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8CAA8C,EAAE,MAAM,kDAAkD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { DynamicClient } from '../../../../client/types';
|
|
2
|
+
import type { BusinessAccountProposal } from '../businessAccounts.types';
|
|
3
|
+
/**
|
|
4
|
+
* Every pending proposal awaiting this caller's approval, across every
|
|
5
|
+
* business account they belong to. Not scoped to one account — the server
|
|
6
|
+
* derives the scope from the caller's own memberships.
|
|
7
|
+
*
|
|
8
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
9
|
+
* @returns The proposals awaiting this caller's approval.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const awaitingMe = await listBusinessAccountProposalsAwaitingMyApproval();
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @see {@link approveBusinessAccountProposal}
|
|
17
|
+
* @see {@link listBusinessAccountProposals} for one account's proposals instead.
|
|
18
|
+
* @notInstrumented
|
|
19
|
+
*/
|
|
20
|
+
export declare const listBusinessAccountProposalsAwaitingMyApproval: (client?: DynamicClient) => Promise<BusinessAccountProposal[]>;
|
|
21
|
+
//# sourceMappingURL=listBusinessAccountProposalsAwaitingMyApproval.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listBusinessAccountProposalsAwaitingMyApproval.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/listBusinessAccountProposalsAwaitingMyApproval/listBusinessAccountProposalsAwaitingMyApproval.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEzE;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,8CAA8C,YACjD,aAAa,KACpB,OAAO,CAAC,uBAAuB,EAAE,CAWnC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/waas/businessAccounts/listBusinessAccountRoles/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC"}
|