@dynamic-labs/sdk-api-core 0.33.0 → 0.34.0
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/package.json +1 -1
- package/src/apis/SDKApi.cjs +739 -4
- package/src/apis/SDKApi.cjs.map +1 -1
- package/src/apis/SDKApi.d.ts +298 -5
- package/src/apis/SDKApi.js +739 -4
- package/src/apis/SDKApi.js.map +1 -1
- package/src/apis/WaasApi.cjs +6 -0
- package/src/apis/WaasApi.cjs.map +1 -1
- package/src/apis/WaasApi.js +6 -0
- package/src/apis/WaasApi.js.map +1 -1
- package/src/index.cjs +116 -0
- package/src/index.cjs.map +1 -1
- package/src/index.js +23 -0
- package/src/index.js.map +1 -1
- package/src/models/AddBusinessAccountMemberSdkRequest.cjs +6 -0
- package/src/models/AddBusinessAccountMemberSdkRequest.cjs.map +1 -1
- package/src/models/AddBusinessAccountMemberSdkRequest.d.ts +21 -0
- package/src/models/AddBusinessAccountMemberSdkRequest.js +6 -0
- package/src/models/AddBusinessAccountMemberSdkRequest.js.map +1 -1
- package/src/models/ApproveBusinessAccountProposalSdkRequest.cjs +45 -0
- package/src/models/ApproveBusinessAccountProposalSdkRequest.cjs.map +1 -0
- package/src/models/ApproveBusinessAccountProposalSdkRequest.d.ts +33 -0
- package/src/models/ApproveBusinessAccountProposalSdkRequest.js +39 -0
- package/src/models/ApproveBusinessAccountProposalSdkRequest.js.map +1 -0
- package/src/models/BusinessAccountApprovalRequirement.cjs +60 -0
- package/src/models/BusinessAccountApprovalRequirement.cjs.map +1 -0
- package/src/models/BusinessAccountApprovalRequirement.d.ts +89 -0
- package/src/models/BusinessAccountApprovalRequirement.js +54 -0
- package/src/models/BusinessAccountApprovalRequirement.js.map +1 -0
- package/src/models/BusinessAccountApprovalRequirementStatus.cjs +43 -0
- package/src/models/BusinessAccountApprovalRequirementStatus.cjs.map +1 -0
- package/src/models/BusinessAccountApprovalRequirementStatus.d.ts +58 -0
- package/src/models/BusinessAccountApprovalRequirementStatus.js +37 -0
- package/src/models/BusinessAccountApprovalRequirementStatus.js.map +1 -0
- package/src/models/BusinessAccountApprovalsPending.cjs +51 -0
- package/src/models/BusinessAccountApprovalsPending.cjs.map +1 -0
- package/src/models/BusinessAccountApprovalsPending.d.ts +64 -0
- package/src/models/BusinessAccountApprovalsPending.js +45 -0
- package/src/models/BusinessAccountApprovalsPending.js.map +1 -0
- package/src/models/BusinessAccountForbidden.cjs +36 -0
- package/src/models/BusinessAccountForbidden.cjs.map +1 -0
- package/src/models/BusinessAccountForbidden.d.ts +34 -0
- package/src/models/BusinessAccountForbidden.js +30 -0
- package/src/models/BusinessAccountForbidden.js.map +1 -0
- package/src/models/BusinessAccountForbiddenAllOf.cjs +34 -0
- package/src/models/BusinessAccountForbiddenAllOf.cjs.map +1 -0
- package/src/models/BusinessAccountForbiddenAllOf.d.ts +28 -0
- package/src/models/BusinessAccountForbiddenAllOf.js +28 -0
- package/src/models/BusinessAccountForbiddenAllOf.js.map +1 -0
- package/src/models/BusinessAccountGovernanceResponse.cjs +43 -0
- package/src/models/BusinessAccountGovernanceResponse.cjs.map +1 -0
- package/src/models/BusinessAccountGovernanceResponse.d.ts +30 -0
- package/src/models/BusinessAccountGovernanceResponse.js +37 -0
- package/src/models/BusinessAccountGovernanceResponse.js.map +1 -0
- package/src/models/BusinessAccountGovernedAction.cjs +50 -0
- package/src/models/BusinessAccountGovernedAction.cjs.map +1 -0
- package/src/models/BusinessAccountGovernedAction.d.ts +33 -0
- package/src/models/BusinessAccountGovernedAction.js +44 -0
- package/src/models/BusinessAccountGovernedAction.js.map +1 -0
- package/src/models/BusinessAccountMutationVersion.cjs +43 -0
- package/src/models/BusinessAccountMutationVersion.cjs.map +1 -0
- package/src/models/BusinessAccountMutationVersion.d.ts +27 -0
- package/src/models/BusinessAccountMutationVersion.js +37 -0
- package/src/models/BusinessAccountMutationVersion.js.map +1 -0
- package/src/models/BusinessAccountProposal.cjs +62 -0
- package/src/models/BusinessAccountProposal.cjs.map +1 -0
- package/src/models/BusinessAccountProposal.d.ts +108 -0
- package/src/models/BusinessAccountProposal.js +56 -0
- package/src/models/BusinessAccountProposal.js.map +1 -0
- package/src/models/BusinessAccountProposalApprovalRecord.cjs +37 -0
- package/src/models/BusinessAccountProposalApprovalRecord.cjs.map +1 -0
- package/src/models/BusinessAccountProposalApprovalRecord.d.ts +39 -0
- package/src/models/BusinessAccountProposalApprovalRecord.js +31 -0
- package/src/models/BusinessAccountProposalApprovalRecord.js.map +1 -0
- package/src/models/BusinessAccountProposalStatus.cjs +42 -0
- package/src/models/BusinessAccountProposalStatus.cjs.map +1 -0
- package/src/models/BusinessAccountProposalStatus.d.ts +25 -0
- package/src/models/BusinessAccountProposalStatus.js +36 -0
- package/src/models/BusinessAccountProposalStatus.js.map +1 -0
- package/src/models/BusinessAccountProposalSubject.cjs +35 -0
- package/src/models/BusinessAccountProposalSubject.cjs.map +1 -0
- package/src/models/BusinessAccountProposalSubject.d.ts +33 -0
- package/src/models/BusinessAccountProposalSubject.js +29 -0
- package/src/models/BusinessAccountProposalSubject.js.map +1 -0
- package/src/models/BusinessAccountRequirementCondition.cjs +43 -0
- package/src/models/BusinessAccountRequirementCondition.cjs.map +1 -0
- package/src/models/BusinessAccountRequirementCondition.d.ts +57 -0
- package/src/models/BusinessAccountRequirementCondition.js +37 -0
- package/src/models/BusinessAccountRequirementCondition.js.map +1 -0
- package/src/models/BusinessAccountRoleDefinition.cjs +52 -0
- package/src/models/BusinessAccountRoleDefinition.cjs.map +1 -0
- package/src/models/BusinessAccountRoleDefinition.d.ts +35 -0
- package/src/models/BusinessAccountRoleDefinition.js +46 -0
- package/src/models/BusinessAccountRoleDefinition.js.map +1 -0
- package/src/models/BusinessAccountRolesResponse.cjs +34 -0
- package/src/models/BusinessAccountRolesResponse.cjs.map +1 -0
- package/src/models/BusinessAccountRolesResponse.d.ts +30 -0
- package/src/models/BusinessAccountRolesResponse.js +28 -0
- package/src/models/BusinessAccountRolesResponse.js.map +1 -0
- package/src/models/BusinessAccountSigningRefused.cjs +37 -0
- package/src/models/BusinessAccountSigningRefused.cjs.map +1 -0
- package/src/models/BusinessAccountSigningRefused.d.ts +39 -0
- package/src/models/BusinessAccountSigningRefused.js +31 -0
- package/src/models/BusinessAccountSigningRefused.js.map +1 -0
- package/src/models/DefineBusinessAccountRoleSdkRequest.cjs +50 -0
- package/src/models/DefineBusinessAccountRoleSdkRequest.cjs.map +1 -0
- package/src/models/DefineBusinessAccountRoleSdkRequest.d.ts +62 -0
- package/src/models/DefineBusinessAccountRoleSdkRequest.js +44 -0
- package/src/models/DefineBusinessAccountRoleSdkRequest.js.map +1 -0
- package/src/models/DeleteBusinessAccountRoleSdkRequest.cjs +37 -0
- package/src/models/DeleteBusinessAccountRoleSdkRequest.cjs.map +1 -0
- package/src/models/DeleteBusinessAccountRoleSdkRequest.d.ts +42 -0
- package/src/models/DeleteBusinessAccountRoleSdkRequest.js +31 -0
- package/src/models/DeleteBusinessAccountRoleSdkRequest.js.map +1 -0
- package/src/models/RemoveBusinessAccountMemberSdkRequest.cjs +37 -0
- package/src/models/RemoveBusinessAccountMemberSdkRequest.cjs.map +1 -0
- package/src/models/RemoveBusinessAccountMemberSdkRequest.d.ts +42 -0
- package/src/models/RemoveBusinessAccountMemberSdkRequest.js +31 -0
- package/src/models/RemoveBusinessAccountMemberSdkRequest.js.map +1 -0
- package/src/models/RemoveBusinessAccountSignerSdkRequest.cjs +37 -0
- package/src/models/RemoveBusinessAccountSignerSdkRequest.cjs.map +1 -0
- package/src/models/RemoveBusinessAccountSignerSdkRequest.d.ts +42 -0
- package/src/models/RemoveBusinessAccountSignerSdkRequest.js +31 -0
- package/src/models/RemoveBusinessAccountSignerSdkRequest.js.map +1 -0
- package/src/models/RemoveBusinessAccountWalletSdkRequest.cjs +37 -0
- package/src/models/RemoveBusinessAccountWalletSdkRequest.cjs.map +1 -0
- package/src/models/RemoveBusinessAccountWalletSdkRequest.d.ts +42 -0
- package/src/models/RemoveBusinessAccountWalletSdkRequest.js +31 -0
- package/src/models/RemoveBusinessAccountWalletSdkRequest.js.map +1 -0
- package/src/models/SetBusinessAccountGovernanceSdkRequest.cjs +39 -0
- package/src/models/SetBusinessAccountGovernanceSdkRequest.cjs.map +1 -0
- package/src/models/SetBusinessAccountGovernanceSdkRequest.d.ts +51 -0
- package/src/models/SetBusinessAccountGovernanceSdkRequest.js +33 -0
- package/src/models/SetBusinessAccountGovernanceSdkRequest.js.map +1 -0
- package/src/models/TokenScope.cjs +8 -0
- package/src/models/TokenScope.cjs.map +1 -1
- package/src/models/TokenScope.d.ts +8 -0
- package/src/models/TokenScope.js +8 -0
- package/src/models/TokenScope.js.map +1 -1
- package/src/models/TransferBusinessAccountOwnershipSdkRequest.cjs +8 -12
- package/src/models/TransferBusinessAccountOwnershipSdkRequest.cjs.map +1 -1
- package/src/models/TransferBusinessAccountOwnershipSdkRequest.d.ts +21 -0
- package/src/models/TransferBusinessAccountOwnershipSdkRequest.js +8 -12
- package/src/models/TransferBusinessAccountOwnershipSdkRequest.js.map +1 -1
- package/src/models/UpdateBusinessAccountMemberRoleSdkRequest.cjs +7 -0
- package/src/models/UpdateBusinessAccountMemberRoleSdkRequest.cjs.map +1 -1
- package/src/models/UpdateBusinessAccountMemberRoleSdkRequest.d.ts +21 -0
- package/src/models/UpdateBusinessAccountMemberRoleSdkRequest.js +7 -0
- package/src/models/UpdateBusinessAccountMemberRoleSdkRequest.js.map +1 -1
- package/src/models/index.d.ts +23 -0
package/src/apis/SDKApi.js
CHANGED
|
@@ -5,6 +5,7 @@ import { AddBusinessAccountSignerSdkRequestToJSON } from '../models/AddBusinessA
|
|
|
5
5
|
import { AleoCuratedPricesResponseFromJSON } from '../models/AleoCuratedPricesResponse.js';
|
|
6
6
|
import { AleoProverEncryptedRequestToJSON } from '../models/AleoProverEncryptedRequest.js';
|
|
7
7
|
import { AleoProverPubkeyResponseFromJSON } from '../models/AleoProverPubkeyResponse.js';
|
|
8
|
+
import { ApproveBusinessAccountProposalSdkRequestToJSON } from '../models/ApproveBusinessAccountProposalSdkRequest.js';
|
|
8
9
|
import '../models/AssignableBusinessAccountMemberRole.js';
|
|
9
10
|
import { AttachSourceRequestToJSON } from '../models/AttachSourceRequest.js';
|
|
10
11
|
import '../models/AttestationConveyancePreference.js';
|
|
@@ -38,10 +39,19 @@ import '../models/MfaBackupCodeAcknowledgement.js';
|
|
|
38
39
|
import '../models/CustomFieldType.js';
|
|
39
40
|
import '../models/KycFieldType.js';
|
|
40
41
|
import { BusinessAccountFromJSON } from '../models/BusinessAccount.js';
|
|
42
|
+
import '../models/BusinessAccountApprovalRequirement.js';
|
|
43
|
+
import '../models/BusinessAccountApprovalsPending.js';
|
|
41
44
|
import { BusinessAccountDetailFromJSON } from '../models/BusinessAccountDetail.js';
|
|
42
45
|
import { BusinessAccountMemberFromJSON } from '../models/BusinessAccountMember.js';
|
|
43
46
|
import '../models/ChainEnum.js';
|
|
47
|
+
import { BusinessAccountGovernanceResponseFromJSON } from '../models/BusinessAccountGovernanceResponse.js';
|
|
48
|
+
import '../models/BusinessAccountGovernedAction.js';
|
|
44
49
|
import { BusinessAccountListFromJSON } from '../models/BusinessAccountList.js';
|
|
50
|
+
import { BusinessAccountMutationVersionFromJSON } from '../models/BusinessAccountMutationVersion.js';
|
|
51
|
+
import { BusinessAccountProposalFromJSON } from '../models/BusinessAccountProposal.js';
|
|
52
|
+
import '../models/BusinessAccountProposalStatus.js';
|
|
53
|
+
import '../models/BusinessAccountRoleDefinition.js';
|
|
54
|
+
import { BusinessAccountRolesResponseFromJSON } from '../models/BusinessAccountRolesResponse.js';
|
|
45
55
|
import '../models/CaptchaProviderEnum.js';
|
|
46
56
|
import '../models/DestinationTypeEnum.js';
|
|
47
57
|
import '../models/CheckoutModeEnum.js';
|
|
@@ -77,9 +87,11 @@ import { CryptoDotComPaymentCreateRequestToJSON } from '../models/CryptoDotComPa
|
|
|
77
87
|
import { CryptoDotComPaymentResponseFromJSON } from '../models/CryptoDotComPaymentResponse.js';
|
|
78
88
|
import { CurrencyFromJSON } from '../models/Currency.js';
|
|
79
89
|
import '../models/CurrencyType.js';
|
|
90
|
+
import { DefineBusinessAccountRoleSdkRequestToJSON } from '../models/DefineBusinessAccountRoleSdkRequest.js';
|
|
80
91
|
import '../models/DelegatedAccessEncryptionPublicKey.js';
|
|
81
92
|
import { DelegatedShareDeliveryRequestToJSON } from '../models/DelegatedShareDeliveryRequest.js';
|
|
82
93
|
import { DelegatedShareDeliveryResponseFromJSON } from '../models/DelegatedShareDeliveryResponse.js';
|
|
94
|
+
import { DeleteBusinessAccountRoleSdkRequestToJSON } from '../models/DeleteBusinessAccountRoleSdkRequest.js';
|
|
83
95
|
import { DeleteDeviceRegistrationResponseFromJSON } from '../models/DeleteDeviceRegistrationResponse.js';
|
|
84
96
|
import { DeleteEmbeddedWalletsRequestToJSON } from '../models/DeleteEmbeddedWalletsRequest.js';
|
|
85
97
|
import { DeleteUserPasskeyRequestToJSON } from '../models/DeleteUserPasskeyRequest.js';
|
|
@@ -218,6 +230,9 @@ import { RefreshKeySharesRequestToJSON } from '../models/RefreshKeySharesRequest
|
|
|
218
230
|
import { RefreshKeySharesResponseFromJSON } from '../models/RefreshKeySharesResponse.js';
|
|
219
231
|
import { RegisterEmbeddedWalletSessionKeyResponseFromJSON } from '../models/RegisterEmbeddedWalletSessionKeyResponse.js';
|
|
220
232
|
import { RegisterSessionKeyRequestToJSON } from '../models/RegisterSessionKeyRequest.js';
|
|
233
|
+
import { RemoveBusinessAccountMemberSdkRequestToJSON } from '../models/RemoveBusinessAccountMemberSdkRequest.js';
|
|
234
|
+
import { RemoveBusinessAccountSignerSdkRequestToJSON } from '../models/RemoveBusinessAccountSignerSdkRequest.js';
|
|
235
|
+
import { RemoveBusinessAccountWalletSdkRequestToJSON } from '../models/RemoveBusinessAccountWalletSdkRequest.js';
|
|
221
236
|
import '../models/ReshareKind.js';
|
|
222
237
|
import { ReshareRequestToJSON } from '../models/ReshareRequest.js';
|
|
223
238
|
import '../models/RoomTypeEnum.js';
|
|
@@ -229,6 +244,7 @@ import '../models/ScreeningActionEnum.js';
|
|
|
229
244
|
import '../models/ScreeningPolicyScopeEnum.js';
|
|
230
245
|
import '../models/SdkEnvironmentIdWaasWalletIdAdditionalAddressesAdditionalAddresses.js';
|
|
231
246
|
import { SdkSettingsRequestToJSON } from '../models/SdkSettingsRequest.js';
|
|
247
|
+
import { SetBusinessAccountGovernanceSdkRequestToJSON } from '../models/SetBusinessAccountGovernanceSdkRequest.js';
|
|
232
248
|
import { SignAleoRequestWithWaasRequestToJSON } from '../models/SignAleoRequestWithWaasRequest.js';
|
|
233
249
|
import '../models/SignMessageRawSign.js';
|
|
234
250
|
import { SignMessageWithWaasRequestToJSON } from '../models/SignMessageWithWaasRequest.js';
|
|
@@ -8749,7 +8765,7 @@ class SDKApi extends BaseAPI {
|
|
|
8749
8765
|
await this.screenTransactionOptionsRaw(requestParameters, initOverrides);
|
|
8750
8766
|
}
|
|
8751
8767
|
/**
|
|
8752
|
-
*
|
|
8768
|
+
* Owner or admin by default; an account whose governance sets `eligibleInitiatorRoles` for `addMember` can widen that. Target user is resolved by `userId` OR `identifier + type` (email/externalUserId create-or-resolve; id direct lookup). Idempotent: an already-active member returns the existing row with 200. When the account governs `addMember` the response is 202, not 201 — first with the intent to sign, then with the proposal collecting approvals. Neither is a failure.
|
|
8753
8769
|
* SDK — add a member to a business account
|
|
8754
8770
|
*/
|
|
8755
8771
|
async sdkAddBusinessAccountMemberRaw(requestParameters, initOverrides) {
|
|
@@ -8782,7 +8798,7 @@ class SDKApi extends BaseAPI {
|
|
|
8782
8798
|
return new JSONApiResponse(response, (jsonValue) => BusinessAccountMemberFromJSON(jsonValue));
|
|
8783
8799
|
}
|
|
8784
8800
|
/**
|
|
8785
|
-
*
|
|
8801
|
+
* Owner or admin by default; an account whose governance sets `eligibleInitiatorRoles` for `addMember` can widen that. Target user is resolved by `userId` OR `identifier + type` (email/externalUserId create-or-resolve; id direct lookup). Idempotent: an already-active member returns the existing row with 200. When the account governs `addMember` the response is 202, not 201 — first with the intent to sign, then with the proposal collecting approvals. Neither is a failure.
|
|
8786
8802
|
* SDK — add a member to a business account
|
|
8787
8803
|
*/
|
|
8788
8804
|
async sdkAddBusinessAccountMember(requestParameters, initOverrides) {
|
|
@@ -8833,6 +8849,50 @@ class SDKApi extends BaseAPI {
|
|
|
8833
8849
|
const response = await this.sdkAddBusinessAccountSignerRaw(requestParameters, initOverrides);
|
|
8834
8850
|
return await response.value();
|
|
8835
8851
|
}
|
|
8852
|
+
/**
|
|
8853
|
+
* Records the caller\'s consent, signed with their session key. Requires step-up authentication: approving is the act that authorizes the mutation, so it carries the same weight as performing it. Recording an approval does not apply the change — call execute once the requirements are satisfied. An initiator can never approve their own intent; the enclave refuses it and so does this endpoint.
|
|
8854
|
+
* SDK — approve a proposal
|
|
8855
|
+
*/
|
|
8856
|
+
async sdkApproveBusinessAccountProposalRaw(requestParameters, initOverrides) {
|
|
8857
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
8858
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkApproveBusinessAccountProposal.');
|
|
8859
|
+
}
|
|
8860
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
8861
|
+
throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkApproveBusinessAccountProposal.');
|
|
8862
|
+
}
|
|
8863
|
+
if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
|
|
8864
|
+
throw new RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkApproveBusinessAccountProposal.');
|
|
8865
|
+
}
|
|
8866
|
+
if (requestParameters.approveBusinessAccountProposalSdkRequest === null || requestParameters.approveBusinessAccountProposalSdkRequest === undefined) {
|
|
8867
|
+
throw new RequiredError('approveBusinessAccountProposalSdkRequest', 'Required parameter requestParameters.approveBusinessAccountProposalSdkRequest was null or undefined when calling sdkApproveBusinessAccountProposal.');
|
|
8868
|
+
}
|
|
8869
|
+
const queryParameters = {};
|
|
8870
|
+
const headerParameters = {};
|
|
8871
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
8872
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
8873
|
+
const token = this.configuration.accessToken;
|
|
8874
|
+
const tokenString = await token("bearerAuth", []);
|
|
8875
|
+
if (tokenString) {
|
|
8876
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
8877
|
+
}
|
|
8878
|
+
}
|
|
8879
|
+
const response = await this.request({
|
|
8880
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/proposals/{proposalId}/approvals`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))).replace(`{${"proposalId"}}`, encodeURIComponent(String(requestParameters.proposalId))),
|
|
8881
|
+
method: 'POST',
|
|
8882
|
+
headers: headerParameters,
|
|
8883
|
+
query: queryParameters,
|
|
8884
|
+
body: ApproveBusinessAccountProposalSdkRequestToJSON(requestParameters.approveBusinessAccountProposalSdkRequest),
|
|
8885
|
+
}, initOverrides);
|
|
8886
|
+
return new JSONApiResponse(response, (jsonValue) => BusinessAccountProposalFromJSON(jsonValue));
|
|
8887
|
+
}
|
|
8888
|
+
/**
|
|
8889
|
+
* Records the caller\'s consent, signed with their session key. Requires step-up authentication: approving is the act that authorizes the mutation, so it carries the same weight as performing it. Recording an approval does not apply the change — call execute once the requirements are satisfied. An initiator can never approve their own intent; the enclave refuses it and so does this endpoint.
|
|
8890
|
+
* SDK — approve a proposal
|
|
8891
|
+
*/
|
|
8892
|
+
async sdkApproveBusinessAccountProposal(requestParameters, initOverrides) {
|
|
8893
|
+
const response = await this.sdkApproveBusinessAccountProposalRaw(requestParameters, initOverrides);
|
|
8894
|
+
return await response.value();
|
|
8895
|
+
}
|
|
8836
8896
|
/**
|
|
8837
8897
|
* Options call for this endpoint
|
|
8838
8898
|
*/
|
|
@@ -8859,6 +8919,32 @@ class SDKApi extends BaseAPI {
|
|
|
8859
8919
|
async sdkBusinessAccountByIdOptions(requestParameters, initOverrides) {
|
|
8860
8920
|
await this.sdkBusinessAccountByIdOptionsRaw(requestParameters, initOverrides);
|
|
8861
8921
|
}
|
|
8922
|
+
/**
|
|
8923
|
+
* Options call for this endpoint
|
|
8924
|
+
*/
|
|
8925
|
+
async sdkBusinessAccountGovernanceOptionsRaw(requestParameters, initOverrides) {
|
|
8926
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
8927
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountGovernanceOptions.');
|
|
8928
|
+
}
|
|
8929
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
8930
|
+
throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountGovernanceOptions.');
|
|
8931
|
+
}
|
|
8932
|
+
const queryParameters = {};
|
|
8933
|
+
const headerParameters = {};
|
|
8934
|
+
const response = await this.request({
|
|
8935
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/governance`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
8936
|
+
method: 'OPTIONS',
|
|
8937
|
+
headers: headerParameters,
|
|
8938
|
+
query: queryParameters,
|
|
8939
|
+
}, initOverrides);
|
|
8940
|
+
return new VoidApiResponse(response);
|
|
8941
|
+
}
|
|
8942
|
+
/**
|
|
8943
|
+
* Options call for this endpoint
|
|
8944
|
+
*/
|
|
8945
|
+
async sdkBusinessAccountGovernanceOptions(requestParameters, initOverrides) {
|
|
8946
|
+
await this.sdkBusinessAccountGovernanceOptionsRaw(requestParameters, initOverrides);
|
|
8947
|
+
}
|
|
8862
8948
|
/**
|
|
8863
8949
|
* Options call for this endpoint
|
|
8864
8950
|
*/
|
|
@@ -8963,6 +9049,226 @@ class SDKApi extends BaseAPI {
|
|
|
8963
9049
|
async sdkBusinessAccountPolicyLayerOptions(requestParameters, initOverrides) {
|
|
8964
9050
|
await this.sdkBusinessAccountPolicyLayerOptionsRaw(requestParameters, initOverrides);
|
|
8965
9051
|
}
|
|
9052
|
+
/**
|
|
9053
|
+
* Options call for this endpoint
|
|
9054
|
+
*/
|
|
9055
|
+
async sdkBusinessAccountProposalApprovalsOptionsRaw(requestParameters, initOverrides) {
|
|
9056
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9057
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountProposalApprovalsOptions.');
|
|
9058
|
+
}
|
|
9059
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9060
|
+
throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountProposalApprovalsOptions.');
|
|
9061
|
+
}
|
|
9062
|
+
if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
|
|
9063
|
+
throw new RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkBusinessAccountProposalApprovalsOptions.');
|
|
9064
|
+
}
|
|
9065
|
+
const queryParameters = {};
|
|
9066
|
+
const headerParameters = {};
|
|
9067
|
+
const response = await this.request({
|
|
9068
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/proposals/{proposalId}/approvals`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))).replace(`{${"proposalId"}}`, encodeURIComponent(String(requestParameters.proposalId))),
|
|
9069
|
+
method: 'OPTIONS',
|
|
9070
|
+
headers: headerParameters,
|
|
9071
|
+
query: queryParameters,
|
|
9072
|
+
}, initOverrides);
|
|
9073
|
+
return new VoidApiResponse(response);
|
|
9074
|
+
}
|
|
9075
|
+
/**
|
|
9076
|
+
* Options call for this endpoint
|
|
9077
|
+
*/
|
|
9078
|
+
async sdkBusinessAccountProposalApprovalsOptions(requestParameters, initOverrides) {
|
|
9079
|
+
await this.sdkBusinessAccountProposalApprovalsOptionsRaw(requestParameters, initOverrides);
|
|
9080
|
+
}
|
|
9081
|
+
/**
|
|
9082
|
+
* Options call for this endpoint
|
|
9083
|
+
*/
|
|
9084
|
+
async sdkBusinessAccountProposalExecuteOptionsRaw(requestParameters, initOverrides) {
|
|
9085
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9086
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountProposalExecuteOptions.');
|
|
9087
|
+
}
|
|
9088
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9089
|
+
throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountProposalExecuteOptions.');
|
|
9090
|
+
}
|
|
9091
|
+
if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
|
|
9092
|
+
throw new RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkBusinessAccountProposalExecuteOptions.');
|
|
9093
|
+
}
|
|
9094
|
+
const queryParameters = {};
|
|
9095
|
+
const headerParameters = {};
|
|
9096
|
+
const response = await this.request({
|
|
9097
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/proposals/{proposalId}/execute`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))).replace(`{${"proposalId"}}`, encodeURIComponent(String(requestParameters.proposalId))),
|
|
9098
|
+
method: 'OPTIONS',
|
|
9099
|
+
headers: headerParameters,
|
|
9100
|
+
query: queryParameters,
|
|
9101
|
+
}, initOverrides);
|
|
9102
|
+
return new VoidApiResponse(response);
|
|
9103
|
+
}
|
|
9104
|
+
/**
|
|
9105
|
+
* Options call for this endpoint
|
|
9106
|
+
*/
|
|
9107
|
+
async sdkBusinessAccountProposalExecuteOptions(requestParameters, initOverrides) {
|
|
9108
|
+
await this.sdkBusinessAccountProposalExecuteOptionsRaw(requestParameters, initOverrides);
|
|
9109
|
+
}
|
|
9110
|
+
/**
|
|
9111
|
+
* Options call for this endpoint
|
|
9112
|
+
*/
|
|
9113
|
+
async sdkBusinessAccountProposalOptionsRaw(requestParameters, initOverrides) {
|
|
9114
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9115
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountProposalOptions.');
|
|
9116
|
+
}
|
|
9117
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9118
|
+
throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountProposalOptions.');
|
|
9119
|
+
}
|
|
9120
|
+
if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
|
|
9121
|
+
throw new RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkBusinessAccountProposalOptions.');
|
|
9122
|
+
}
|
|
9123
|
+
const queryParameters = {};
|
|
9124
|
+
const headerParameters = {};
|
|
9125
|
+
const response = await this.request({
|
|
9126
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/proposals/{proposalId}`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))).replace(`{${"proposalId"}}`, encodeURIComponent(String(requestParameters.proposalId))),
|
|
9127
|
+
method: 'OPTIONS',
|
|
9128
|
+
headers: headerParameters,
|
|
9129
|
+
query: queryParameters,
|
|
9130
|
+
}, initOverrides);
|
|
9131
|
+
return new VoidApiResponse(response);
|
|
9132
|
+
}
|
|
9133
|
+
/**
|
|
9134
|
+
* Options call for this endpoint
|
|
9135
|
+
*/
|
|
9136
|
+
async sdkBusinessAccountProposalOptions(requestParameters, initOverrides) {
|
|
9137
|
+
await this.sdkBusinessAccountProposalOptionsRaw(requestParameters, initOverrides);
|
|
9138
|
+
}
|
|
9139
|
+
/**
|
|
9140
|
+
* Options call for this endpoint
|
|
9141
|
+
*/
|
|
9142
|
+
async sdkBusinessAccountProposalVetoOptionsRaw(requestParameters, initOverrides) {
|
|
9143
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9144
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountProposalVetoOptions.');
|
|
9145
|
+
}
|
|
9146
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9147
|
+
throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountProposalVetoOptions.');
|
|
9148
|
+
}
|
|
9149
|
+
if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
|
|
9150
|
+
throw new RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkBusinessAccountProposalVetoOptions.');
|
|
9151
|
+
}
|
|
9152
|
+
const queryParameters = {};
|
|
9153
|
+
const headerParameters = {};
|
|
9154
|
+
const response = await this.request({
|
|
9155
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/proposals/{proposalId}/veto`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))).replace(`{${"proposalId"}}`, encodeURIComponent(String(requestParameters.proposalId))),
|
|
9156
|
+
method: 'OPTIONS',
|
|
9157
|
+
headers: headerParameters,
|
|
9158
|
+
query: queryParameters,
|
|
9159
|
+
}, initOverrides);
|
|
9160
|
+
return new VoidApiResponse(response);
|
|
9161
|
+
}
|
|
9162
|
+
/**
|
|
9163
|
+
* Options call for this endpoint
|
|
9164
|
+
*/
|
|
9165
|
+
async sdkBusinessAccountProposalVetoOptions(requestParameters, initOverrides) {
|
|
9166
|
+
await this.sdkBusinessAccountProposalVetoOptionsRaw(requestParameters, initOverrides);
|
|
9167
|
+
}
|
|
9168
|
+
/**
|
|
9169
|
+
* Options call for this endpoint
|
|
9170
|
+
*/
|
|
9171
|
+
async sdkBusinessAccountProposalsAwaitingApprovalOptionsRaw(requestParameters, initOverrides) {
|
|
9172
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9173
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountProposalsAwaitingApprovalOptions.');
|
|
9174
|
+
}
|
|
9175
|
+
const queryParameters = {};
|
|
9176
|
+
const headerParameters = {};
|
|
9177
|
+
const response = await this.request({
|
|
9178
|
+
path: `/sdk/{environmentId}/businessAccounts/proposals`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
|
|
9179
|
+
method: 'OPTIONS',
|
|
9180
|
+
headers: headerParameters,
|
|
9181
|
+
query: queryParameters,
|
|
9182
|
+
}, initOverrides);
|
|
9183
|
+
return new VoidApiResponse(response);
|
|
9184
|
+
}
|
|
9185
|
+
/**
|
|
9186
|
+
* Options call for this endpoint
|
|
9187
|
+
*/
|
|
9188
|
+
async sdkBusinessAccountProposalsAwaitingApprovalOptions(requestParameters, initOverrides) {
|
|
9189
|
+
await this.sdkBusinessAccountProposalsAwaitingApprovalOptionsRaw(requestParameters, initOverrides);
|
|
9190
|
+
}
|
|
9191
|
+
/**
|
|
9192
|
+
* Options call for this endpoint
|
|
9193
|
+
*/
|
|
9194
|
+
async sdkBusinessAccountProposalsOptionsRaw(requestParameters, initOverrides) {
|
|
9195
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9196
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountProposalsOptions.');
|
|
9197
|
+
}
|
|
9198
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9199
|
+
throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountProposalsOptions.');
|
|
9200
|
+
}
|
|
9201
|
+
const queryParameters = {};
|
|
9202
|
+
const headerParameters = {};
|
|
9203
|
+
const response = await this.request({
|
|
9204
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/proposals`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
9205
|
+
method: 'OPTIONS',
|
|
9206
|
+
headers: headerParameters,
|
|
9207
|
+
query: queryParameters,
|
|
9208
|
+
}, initOverrides);
|
|
9209
|
+
return new VoidApiResponse(response);
|
|
9210
|
+
}
|
|
9211
|
+
/**
|
|
9212
|
+
* Options call for this endpoint
|
|
9213
|
+
*/
|
|
9214
|
+
async sdkBusinessAccountProposalsOptions(requestParameters, initOverrides) {
|
|
9215
|
+
await this.sdkBusinessAccountProposalsOptionsRaw(requestParameters, initOverrides);
|
|
9216
|
+
}
|
|
9217
|
+
/**
|
|
9218
|
+
* Options call for this endpoint
|
|
9219
|
+
*/
|
|
9220
|
+
async sdkBusinessAccountRoleOptionsRaw(requestParameters, initOverrides) {
|
|
9221
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9222
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountRoleOptions.');
|
|
9223
|
+
}
|
|
9224
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9225
|
+
throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountRoleOptions.');
|
|
9226
|
+
}
|
|
9227
|
+
if (requestParameters.role === null || requestParameters.role === undefined) {
|
|
9228
|
+
throw new RequiredError('role', 'Required parameter requestParameters.role was null or undefined when calling sdkBusinessAccountRoleOptions.');
|
|
9229
|
+
}
|
|
9230
|
+
const queryParameters = {};
|
|
9231
|
+
const headerParameters = {};
|
|
9232
|
+
const response = await this.request({
|
|
9233
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/roles/{role}`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))).replace(`{${"role"}}`, encodeURIComponent(String(requestParameters.role))),
|
|
9234
|
+
method: 'OPTIONS',
|
|
9235
|
+
headers: headerParameters,
|
|
9236
|
+
query: queryParameters,
|
|
9237
|
+
}, initOverrides);
|
|
9238
|
+
return new VoidApiResponse(response);
|
|
9239
|
+
}
|
|
9240
|
+
/**
|
|
9241
|
+
* Options call for this endpoint
|
|
9242
|
+
*/
|
|
9243
|
+
async sdkBusinessAccountRoleOptions(requestParameters, initOverrides) {
|
|
9244
|
+
await this.sdkBusinessAccountRoleOptionsRaw(requestParameters, initOverrides);
|
|
9245
|
+
}
|
|
9246
|
+
/**
|
|
9247
|
+
* Options call for this endpoint
|
|
9248
|
+
*/
|
|
9249
|
+
async sdkBusinessAccountRolesOptionsRaw(requestParameters, initOverrides) {
|
|
9250
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9251
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountRolesOptions.');
|
|
9252
|
+
}
|
|
9253
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9254
|
+
throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountRolesOptions.');
|
|
9255
|
+
}
|
|
9256
|
+
const queryParameters = {};
|
|
9257
|
+
const headerParameters = {};
|
|
9258
|
+
const response = await this.request({
|
|
9259
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/roles`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
9260
|
+
method: 'OPTIONS',
|
|
9261
|
+
headers: headerParameters,
|
|
9262
|
+
query: queryParameters,
|
|
9263
|
+
}, initOverrides);
|
|
9264
|
+
return new VoidApiResponse(response);
|
|
9265
|
+
}
|
|
9266
|
+
/**
|
|
9267
|
+
* Options call for this endpoint
|
|
9268
|
+
*/
|
|
9269
|
+
async sdkBusinessAccountRolesOptions(requestParameters, initOverrides) {
|
|
9270
|
+
await this.sdkBusinessAccountRolesOptionsRaw(requestParameters, initOverrides);
|
|
9271
|
+
}
|
|
8966
9272
|
/**
|
|
8967
9273
|
* Options call for this endpoint
|
|
8968
9274
|
*/
|
|
@@ -9137,6 +9443,127 @@ class SDKApi extends BaseAPI {
|
|
|
9137
9443
|
const response = await this.sdkCreateBusinessAccountRaw(requestParameters, initOverrides);
|
|
9138
9444
|
return await response.value();
|
|
9139
9445
|
}
|
|
9446
|
+
/**
|
|
9447
|
+
* Defines a role that inherits a built-in one. The role lives only in the signed authorization document, so there is no separate role resource. Requires step-up authentication.
|
|
9448
|
+
* SDK — define a customer role for a business account
|
|
9449
|
+
*/
|
|
9450
|
+
async sdkDefineBusinessAccountRoleRaw(requestParameters, initOverrides) {
|
|
9451
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9452
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkDefineBusinessAccountRole.');
|
|
9453
|
+
}
|
|
9454
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9455
|
+
throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkDefineBusinessAccountRole.');
|
|
9456
|
+
}
|
|
9457
|
+
if (requestParameters.defineBusinessAccountRoleSdkRequest === null || requestParameters.defineBusinessAccountRoleSdkRequest === undefined) {
|
|
9458
|
+
throw new RequiredError('defineBusinessAccountRoleSdkRequest', 'Required parameter requestParameters.defineBusinessAccountRoleSdkRequest was null or undefined when calling sdkDefineBusinessAccountRole.');
|
|
9459
|
+
}
|
|
9460
|
+
const queryParameters = {};
|
|
9461
|
+
const headerParameters = {};
|
|
9462
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
9463
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
9464
|
+
const token = this.configuration.accessToken;
|
|
9465
|
+
const tokenString = await token("bearerAuth", []);
|
|
9466
|
+
if (tokenString) {
|
|
9467
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
9468
|
+
}
|
|
9469
|
+
}
|
|
9470
|
+
const response = await this.request({
|
|
9471
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/roles`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
9472
|
+
method: 'POST',
|
|
9473
|
+
headers: headerParameters,
|
|
9474
|
+
query: queryParameters,
|
|
9475
|
+
body: DefineBusinessAccountRoleSdkRequestToJSON(requestParameters.defineBusinessAccountRoleSdkRequest),
|
|
9476
|
+
}, initOverrides);
|
|
9477
|
+
return new JSONApiResponse(response, (jsonValue) => BusinessAccountMutationVersionFromJSON(jsonValue));
|
|
9478
|
+
}
|
|
9479
|
+
/**
|
|
9480
|
+
* Defines a role that inherits a built-in one. The role lives only in the signed authorization document, so there is no separate role resource. Requires step-up authentication.
|
|
9481
|
+
* SDK — define a customer role for a business account
|
|
9482
|
+
*/
|
|
9483
|
+
async sdkDefineBusinessAccountRole(requestParameters, initOverrides) {
|
|
9484
|
+
const response = await this.sdkDefineBusinessAccountRoleRaw(requestParameters, initOverrides);
|
|
9485
|
+
return await response.value();
|
|
9486
|
+
}
|
|
9487
|
+
/**
|
|
9488
|
+
* Refused while the role still holds members or is named by an approval requirement, so a delete cannot strand people or leave a rule unsatisfiable. Requires step-up authentication.
|
|
9489
|
+
* SDK — delete a customer role from a business account
|
|
9490
|
+
*/
|
|
9491
|
+
async sdkDeleteBusinessAccountRoleRaw(requestParameters, initOverrides) {
|
|
9492
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9493
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkDeleteBusinessAccountRole.');
|
|
9494
|
+
}
|
|
9495
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9496
|
+
throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkDeleteBusinessAccountRole.');
|
|
9497
|
+
}
|
|
9498
|
+
if (requestParameters.role === null || requestParameters.role === undefined) {
|
|
9499
|
+
throw new RequiredError('role', 'Required parameter requestParameters.role was null or undefined when calling sdkDeleteBusinessAccountRole.');
|
|
9500
|
+
}
|
|
9501
|
+
const queryParameters = {};
|
|
9502
|
+
const headerParameters = {};
|
|
9503
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
9504
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
9505
|
+
const token = this.configuration.accessToken;
|
|
9506
|
+
const tokenString = await token("bearerAuth", []);
|
|
9507
|
+
if (tokenString) {
|
|
9508
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
9509
|
+
}
|
|
9510
|
+
}
|
|
9511
|
+
const response = await this.request({
|
|
9512
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/roles/{role}`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))).replace(`{${"role"}}`, encodeURIComponent(String(requestParameters.role))),
|
|
9513
|
+
method: 'DELETE',
|
|
9514
|
+
headers: headerParameters,
|
|
9515
|
+
query: queryParameters,
|
|
9516
|
+
body: DeleteBusinessAccountRoleSdkRequestToJSON(requestParameters.deleteBusinessAccountRoleSdkRequest),
|
|
9517
|
+
}, initOverrides);
|
|
9518
|
+
return new JSONApiResponse(response, (jsonValue) => BusinessAccountMutationVersionFromJSON(jsonValue));
|
|
9519
|
+
}
|
|
9520
|
+
/**
|
|
9521
|
+
* Refused while the role still holds members or is named by an approval requirement, so a delete cannot strand people or leave a rule unsatisfiable. Requires step-up authentication.
|
|
9522
|
+
* SDK — delete a customer role from a business account
|
|
9523
|
+
*/
|
|
9524
|
+
async sdkDeleteBusinessAccountRole(requestParameters, initOverrides) {
|
|
9525
|
+
const response = await this.sdkDeleteBusinessAccountRoleRaw(requestParameters, initOverrides);
|
|
9526
|
+
return await response.value();
|
|
9527
|
+
}
|
|
9528
|
+
/**
|
|
9529
|
+
* Submits the stored intent and its unrevoked approvals to the enclave, which decides whether the requirements are met. On success the original mutation runs — the same code path an ungoverned account takes — and the proposal is consumed. Returns 202 with the requirement tallies when consent is still short, leaving the proposal open so more approvals can arrive. No step-up: the approvals are what authorize the change, and the caller adds no consent of their own.
|
|
9530
|
+
* SDK — apply a proposal whose approvals now satisfy it
|
|
9531
|
+
*/
|
|
9532
|
+
async sdkExecuteBusinessAccountProposalRaw(requestParameters, initOverrides) {
|
|
9533
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9534
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkExecuteBusinessAccountProposal.');
|
|
9535
|
+
}
|
|
9536
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9537
|
+
throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkExecuteBusinessAccountProposal.');
|
|
9538
|
+
}
|
|
9539
|
+
if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
|
|
9540
|
+
throw new RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkExecuteBusinessAccountProposal.');
|
|
9541
|
+
}
|
|
9542
|
+
const queryParameters = {};
|
|
9543
|
+
const headerParameters = {};
|
|
9544
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
9545
|
+
const token = this.configuration.accessToken;
|
|
9546
|
+
const tokenString = await token("bearerAuth", []);
|
|
9547
|
+
if (tokenString) {
|
|
9548
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
9549
|
+
}
|
|
9550
|
+
}
|
|
9551
|
+
const response = await this.request({
|
|
9552
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/proposals/{proposalId}/execute`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))).replace(`{${"proposalId"}}`, encodeURIComponent(String(requestParameters.proposalId))),
|
|
9553
|
+
method: 'POST',
|
|
9554
|
+
headers: headerParameters,
|
|
9555
|
+
query: queryParameters,
|
|
9556
|
+
}, initOverrides);
|
|
9557
|
+
return new JSONApiResponse(response, (jsonValue) => BusinessAccountMutationVersionFromJSON(jsonValue));
|
|
9558
|
+
}
|
|
9559
|
+
/**
|
|
9560
|
+
* Submits the stored intent and its unrevoked approvals to the enclave, which decides whether the requirements are met. On success the original mutation runs — the same code path an ungoverned account takes — and the proposal is consumed. Returns 202 with the requirement tallies when consent is still short, leaving the proposal open so more approvals can arrive. No step-up: the approvals are what authorize the change, and the caller adds no consent of their own.
|
|
9561
|
+
* SDK — apply a proposal whose approvals now satisfy it
|
|
9562
|
+
*/
|
|
9563
|
+
async sdkExecuteBusinessAccountProposal(requestParameters, initOverrides) {
|
|
9564
|
+
const response = await this.sdkExecuteBusinessAccountProposalRaw(requestParameters, initOverrides);
|
|
9565
|
+
return await response.value();
|
|
9566
|
+
}
|
|
9140
9567
|
/**
|
|
9141
9568
|
* Returns 404 if the caller is not a member of the business account (404 not 403 so we don\'t leak business-account existence).
|
|
9142
9569
|
* SDK — get a business account with embedded members and signers
|
|
@@ -9173,6 +9600,81 @@ class SDKApi extends BaseAPI {
|
|
|
9173
9600
|
const response = await this.sdkGetBusinessAccountByIdRaw(requestParameters, initOverrides);
|
|
9174
9601
|
return await response.value();
|
|
9175
9602
|
}
|
|
9603
|
+
/**
|
|
9604
|
+
* Readable by any member: names which of the account\'s actions need consent before attempting one. Also needed to use `PUT`, which replaces the section wholesale — changing one action means merging against this value first. Empty object when nothing is governed; that is an answer, not a 404.
|
|
9605
|
+
* SDK — read the approval requirements in force
|
|
9606
|
+
*/
|
|
9607
|
+
async sdkGetBusinessAccountGovernanceRaw(requestParameters, initOverrides) {
|
|
9608
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9609
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkGetBusinessAccountGovernance.');
|
|
9610
|
+
}
|
|
9611
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9612
|
+
throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkGetBusinessAccountGovernance.');
|
|
9613
|
+
}
|
|
9614
|
+
const queryParameters = {};
|
|
9615
|
+
const headerParameters = {};
|
|
9616
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
9617
|
+
const token = this.configuration.accessToken;
|
|
9618
|
+
const tokenString = await token("bearerAuth", []);
|
|
9619
|
+
if (tokenString) {
|
|
9620
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
9621
|
+
}
|
|
9622
|
+
}
|
|
9623
|
+
const response = await this.request({
|
|
9624
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/governance`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
9625
|
+
method: 'GET',
|
|
9626
|
+
headers: headerParameters,
|
|
9627
|
+
query: queryParameters,
|
|
9628
|
+
}, initOverrides);
|
|
9629
|
+
return new JSONApiResponse(response, (jsonValue) => BusinessAccountGovernanceResponseFromJSON(jsonValue));
|
|
9630
|
+
}
|
|
9631
|
+
/**
|
|
9632
|
+
* Readable by any member: names which of the account\'s actions need consent before attempting one. Also needed to use `PUT`, which replaces the section wholesale — changing one action means merging against this value first. Empty object when nothing is governed; that is an answer, not a 404.
|
|
9633
|
+
* SDK — read the approval requirements in force
|
|
9634
|
+
*/
|
|
9635
|
+
async sdkGetBusinessAccountGovernance(requestParameters, initOverrides) {
|
|
9636
|
+
const response = await this.sdkGetBusinessAccountGovernanceRaw(requestParameters, initOverrides);
|
|
9637
|
+
return await response.value();
|
|
9638
|
+
}
|
|
9639
|
+
/**
|
|
9640
|
+
* Returns the stored intent verbatim. An approver signs THESE bytes: a re-derived intent would carry a different `intentId` and `createdAt`, and every approval already collected would stop verifying.
|
|
9641
|
+
* SDK — read one proposal, including the intent to sign
|
|
9642
|
+
*/
|
|
9643
|
+
async sdkGetBusinessAccountProposalRaw(requestParameters, initOverrides) {
|
|
9644
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9645
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkGetBusinessAccountProposal.');
|
|
9646
|
+
}
|
|
9647
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9648
|
+
throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkGetBusinessAccountProposal.');
|
|
9649
|
+
}
|
|
9650
|
+
if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
|
|
9651
|
+
throw new RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkGetBusinessAccountProposal.');
|
|
9652
|
+
}
|
|
9653
|
+
const queryParameters = {};
|
|
9654
|
+
const headerParameters = {};
|
|
9655
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
9656
|
+
const token = this.configuration.accessToken;
|
|
9657
|
+
const tokenString = await token("bearerAuth", []);
|
|
9658
|
+
if (tokenString) {
|
|
9659
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
9660
|
+
}
|
|
9661
|
+
}
|
|
9662
|
+
const response = await this.request({
|
|
9663
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/proposals/{proposalId}`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))).replace(`{${"proposalId"}}`, encodeURIComponent(String(requestParameters.proposalId))),
|
|
9664
|
+
method: 'GET',
|
|
9665
|
+
headers: headerParameters,
|
|
9666
|
+
query: queryParameters,
|
|
9667
|
+
}, initOverrides);
|
|
9668
|
+
return new JSONApiResponse(response, (jsonValue) => BusinessAccountProposalFromJSON(jsonValue));
|
|
9669
|
+
}
|
|
9670
|
+
/**
|
|
9671
|
+
* Returns the stored intent verbatim. An approver signs THESE bytes: a re-derived intent would carry a different `intentId` and `createdAt`, and every approval already collected would stop verifying.
|
|
9672
|
+
* SDK — read one proposal, including the intent to sign
|
|
9673
|
+
*/
|
|
9674
|
+
async sdkGetBusinessAccountProposal(requestParameters, initOverrides) {
|
|
9675
|
+
const response = await this.sdkGetBusinessAccountProposalRaw(requestParameters, initOverrides);
|
|
9676
|
+
return await response.value();
|
|
9677
|
+
}
|
|
9176
9678
|
/**
|
|
9177
9679
|
* Brings an existing user wallet under a business account so signers can be added to it. No MPC ceremony — the owner already holds a valid share set, so this transfers the wallet\'s ownership to the business account (`businessAccountId` set, `userId` cleared) and registers the caller as an owner member + `endUser` signer bound to their existing share set. When `businessAccountId` is omitted, the per-wallet business account is found-or-created (unnamed). Idempotent.
|
|
9178
9680
|
* SDK — add an existing wallet to a business account
|
|
@@ -9211,6 +9713,114 @@ class SDKApi extends BaseAPI {
|
|
|
9211
9713
|
const response = await this.sdkLinkBusinessAccountWalletRaw(requestParameters, initOverrides);
|
|
9212
9714
|
return await response.value();
|
|
9213
9715
|
}
|
|
9716
|
+
/**
|
|
9717
|
+
* Every proposal for the account, newest first. Any member may read them: knowing what is pending is what lets an approver act, and the list carries no signing material — only who has already consented.
|
|
9718
|
+
* SDK — list the governed mutations awaiting approval
|
|
9719
|
+
*/
|
|
9720
|
+
async sdkListBusinessAccountProposalsRaw(requestParameters, initOverrides) {
|
|
9721
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9722
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkListBusinessAccountProposals.');
|
|
9723
|
+
}
|
|
9724
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9725
|
+
throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkListBusinessAccountProposals.');
|
|
9726
|
+
}
|
|
9727
|
+
const queryParameters = {};
|
|
9728
|
+
if (requestParameters.status !== undefined) {
|
|
9729
|
+
queryParameters['status'] = requestParameters.status;
|
|
9730
|
+
}
|
|
9731
|
+
const headerParameters = {};
|
|
9732
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
9733
|
+
const token = this.configuration.accessToken;
|
|
9734
|
+
const tokenString = await token("bearerAuth", []);
|
|
9735
|
+
if (tokenString) {
|
|
9736
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
9737
|
+
}
|
|
9738
|
+
}
|
|
9739
|
+
const response = await this.request({
|
|
9740
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/proposals`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
9741
|
+
method: 'GET',
|
|
9742
|
+
headers: headerParameters,
|
|
9743
|
+
query: queryParameters,
|
|
9744
|
+
}, initOverrides);
|
|
9745
|
+
return new JSONApiResponse(response, (jsonValue) => jsonValue.map(BusinessAccountProposalFromJSON));
|
|
9746
|
+
}
|
|
9747
|
+
/**
|
|
9748
|
+
* Every proposal for the account, newest first. Any member may read them: knowing what is pending is what lets an approver act, and the list carries no signing material — only who has already consented.
|
|
9749
|
+
* SDK — list the governed mutations awaiting approval
|
|
9750
|
+
*/
|
|
9751
|
+
async sdkListBusinessAccountProposals(requestParameters, initOverrides) {
|
|
9752
|
+
const response = await this.sdkListBusinessAccountProposalsRaw(requestParameters, initOverrides);
|
|
9753
|
+
return await response.value();
|
|
9754
|
+
}
|
|
9755
|
+
/**
|
|
9756
|
+
* Every pending proposal waiting on the caller, across all the business accounts they belong to in this environment — without it an approver can only learn of one out of band. Scoped to the caller\'s own memberships, so it can never include another tenant\'s proposals. Proposals the caller initiated are excluded: proposing is not approving.
|
|
9757
|
+
* SDK — list proposals awaiting the caller\'s approval, across accounts
|
|
9758
|
+
*/
|
|
9759
|
+
async sdkListBusinessAccountProposalsAwaitingApprovalRaw(requestParameters, initOverrides) {
|
|
9760
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9761
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkListBusinessAccountProposalsAwaitingApproval.');
|
|
9762
|
+
}
|
|
9763
|
+
const queryParameters = {};
|
|
9764
|
+
const headerParameters = {};
|
|
9765
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
9766
|
+
const token = this.configuration.accessToken;
|
|
9767
|
+
const tokenString = await token("bearerAuth", []);
|
|
9768
|
+
if (tokenString) {
|
|
9769
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
9770
|
+
}
|
|
9771
|
+
}
|
|
9772
|
+
const response = await this.request({
|
|
9773
|
+
path: `/sdk/{environmentId}/businessAccounts/proposals`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
|
|
9774
|
+
method: 'GET',
|
|
9775
|
+
headers: headerParameters,
|
|
9776
|
+
query: queryParameters,
|
|
9777
|
+
}, initOverrides);
|
|
9778
|
+
return new JSONApiResponse(response, (jsonValue) => jsonValue.map(BusinessAccountProposalFromJSON));
|
|
9779
|
+
}
|
|
9780
|
+
/**
|
|
9781
|
+
* Every pending proposal waiting on the caller, across all the business accounts they belong to in this environment — without it an approver can only learn of one out of band. Scoped to the caller\'s own memberships, so it can never include another tenant\'s proposals. Proposals the caller initiated are excluded: proposing is not approving.
|
|
9782
|
+
* SDK — list proposals awaiting the caller\'s approval, across accounts
|
|
9783
|
+
*/
|
|
9784
|
+
async sdkListBusinessAccountProposalsAwaitingApproval(requestParameters, initOverrides) {
|
|
9785
|
+
const response = await this.sdkListBusinessAccountProposalsAwaitingApprovalRaw(requestParameters, initOverrides);
|
|
9786
|
+
return await response.value();
|
|
9787
|
+
}
|
|
9788
|
+
/**
|
|
9789
|
+
* Readable by any member. Names the roles the account has defined and the built-in each inherits, which is what a caller needs before referring to one in governance or when assigning a member. Returns an empty object when none are defined; that is an answer, not a missing resource.
|
|
9790
|
+
* SDK — list the customer-defined roles for a business account
|
|
9791
|
+
*/
|
|
9792
|
+
async sdkListBusinessAccountRolesRaw(requestParameters, initOverrides) {
|
|
9793
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9794
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkListBusinessAccountRoles.');
|
|
9795
|
+
}
|
|
9796
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9797
|
+
throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkListBusinessAccountRoles.');
|
|
9798
|
+
}
|
|
9799
|
+
const queryParameters = {};
|
|
9800
|
+
const headerParameters = {};
|
|
9801
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
9802
|
+
const token = this.configuration.accessToken;
|
|
9803
|
+
const tokenString = await token("bearerAuth", []);
|
|
9804
|
+
if (tokenString) {
|
|
9805
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
9806
|
+
}
|
|
9807
|
+
}
|
|
9808
|
+
const response = await this.request({
|
|
9809
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/roles`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
9810
|
+
method: 'GET',
|
|
9811
|
+
headers: headerParameters,
|
|
9812
|
+
query: queryParameters,
|
|
9813
|
+
}, initOverrides);
|
|
9814
|
+
return new JSONApiResponse(response, (jsonValue) => BusinessAccountRolesResponseFromJSON(jsonValue));
|
|
9815
|
+
}
|
|
9816
|
+
/**
|
|
9817
|
+
* Readable by any member. Names the roles the account has defined and the built-in each inherits, which is what a caller needs before referring to one in governance or when assigning a member. Returns an empty object when none are defined; that is an answer, not a missing resource.
|
|
9818
|
+
* SDK — list the customer-defined roles for a business account
|
|
9819
|
+
*/
|
|
9820
|
+
async sdkListBusinessAccountRoles(requestParameters, initOverrides) {
|
|
9821
|
+
const response = await this.sdkListBusinessAccountRolesRaw(requestParameters, initOverrides);
|
|
9822
|
+
return await response.value();
|
|
9823
|
+
}
|
|
9214
9824
|
/**
|
|
9215
9825
|
* SDK — list business accounts the caller is a member of
|
|
9216
9826
|
*/
|
|
@@ -9261,6 +9871,7 @@ class SDKApi extends BaseAPI {
|
|
|
9261
9871
|
}
|
|
9262
9872
|
const queryParameters = {};
|
|
9263
9873
|
const headerParameters = {};
|
|
9874
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
9264
9875
|
if (this.configuration && this.configuration.accessToken) {
|
|
9265
9876
|
const token = this.configuration.accessToken;
|
|
9266
9877
|
const tokenString = await token("bearerAuth", []);
|
|
@@ -9273,6 +9884,7 @@ class SDKApi extends BaseAPI {
|
|
|
9273
9884
|
method: 'DELETE',
|
|
9274
9885
|
headers: headerParameters,
|
|
9275
9886
|
query: queryParameters,
|
|
9887
|
+
body: RemoveBusinessAccountMemberSdkRequestToJSON(requestParameters.removeBusinessAccountMemberSdkRequest),
|
|
9276
9888
|
}, initOverrides);
|
|
9277
9889
|
return new JSONApiResponse(response, (jsonValue) => InlineResponse2007FromJSON(jsonValue));
|
|
9278
9890
|
}
|
|
@@ -9285,7 +9897,7 @@ class SDKApi extends BaseAPI {
|
|
|
9285
9897
|
return await response.value();
|
|
9286
9898
|
}
|
|
9287
9899
|
/**
|
|
9288
|
-
* Severs the signer\'s MPC pair on this wallet by soft-deleting the server share + the share set + the signer row in one transaction. No reshare ceremony is run — surviving signers\' share sets are independent MPC pairs and remain intact. Authorization is enforced by auth-service
|
|
9900
|
+
* Severs the signer\'s MPC pair on this wallet by soft-deleting the server share + the share set + the signer row in one transaction. No reshare ceremony is run — surviving signers\' share sets are independent MPC pairs and remain intact. Authorization is enforced by auth-service — owner or admin by default, wider if the account\'s governance sets `eligibleInitiatorRoles` for `removeSignerFromWallet`. Returns 409 if removing the signer would leave the wallet with zero active signers.
|
|
9289
9901
|
* SDK — remove a signer from a wallet in a business account
|
|
9290
9902
|
*/
|
|
9291
9903
|
async sdkRemoveBusinessAccountSignerRaw(requestParameters, initOverrides) {
|
|
@@ -9303,6 +9915,7 @@ class SDKApi extends BaseAPI {
|
|
|
9303
9915
|
}
|
|
9304
9916
|
const queryParameters = {};
|
|
9305
9917
|
const headerParameters = {};
|
|
9918
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
9306
9919
|
if (this.configuration && this.configuration.accessToken) {
|
|
9307
9920
|
const token = this.configuration.accessToken;
|
|
9308
9921
|
const tokenString = await token("bearerAuth", []);
|
|
@@ -9315,11 +9928,12 @@ class SDKApi extends BaseAPI {
|
|
|
9315
9928
|
method: 'DELETE',
|
|
9316
9929
|
headers: headerParameters,
|
|
9317
9930
|
query: queryParameters,
|
|
9931
|
+
body: RemoveBusinessAccountSignerSdkRequestToJSON(requestParameters.removeBusinessAccountSignerSdkRequest),
|
|
9318
9932
|
}, initOverrides);
|
|
9319
9933
|
return new JSONApiResponse(response, (jsonValue) => InlineResponse2008FromJSON(jsonValue));
|
|
9320
9934
|
}
|
|
9321
9935
|
/**
|
|
9322
|
-
* Severs the signer\'s MPC pair on this wallet by soft-deleting the server share + the share set + the signer row in one transaction. No reshare ceremony is run — surviving signers\' share sets are independent MPC pairs and remain intact. Authorization is enforced by auth-service
|
|
9936
|
+
* Severs the signer\'s MPC pair on this wallet by soft-deleting the server share + the share set + the signer row in one transaction. No reshare ceremony is run — surviving signers\' share sets are independent MPC pairs and remain intact. Authorization is enforced by auth-service — owner or admin by default, wider if the account\'s governance sets `eligibleInitiatorRoles` for `removeSignerFromWallet`. Returns 409 if removing the signer would leave the wallet with zero active signers.
|
|
9323
9937
|
* SDK — remove a signer from a wallet in a business account
|
|
9324
9938
|
*/
|
|
9325
9939
|
async sdkRemoveBusinessAccountSigner(requestParameters, initOverrides) {
|
|
@@ -9342,6 +9956,7 @@ class SDKApi extends BaseAPI {
|
|
|
9342
9956
|
}
|
|
9343
9957
|
const queryParameters = {};
|
|
9344
9958
|
const headerParameters = {};
|
|
9959
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
9345
9960
|
if (this.configuration && this.configuration.accessToken) {
|
|
9346
9961
|
const token = this.configuration.accessToken;
|
|
9347
9962
|
const tokenString = await token("bearerAuth", []);
|
|
@@ -9354,6 +9969,7 @@ class SDKApi extends BaseAPI {
|
|
|
9354
9969
|
method: 'DELETE',
|
|
9355
9970
|
headers: headerParameters,
|
|
9356
9971
|
query: queryParameters,
|
|
9972
|
+
body: RemoveBusinessAccountWalletSdkRequestToJSON(requestParameters.removeBusinessAccountWalletSdkRequest),
|
|
9357
9973
|
}, initOverrides);
|
|
9358
9974
|
return new JSONApiResponse(response, (jsonValue) => BusinessAccountDetailFromJSON(jsonValue));
|
|
9359
9975
|
}
|
|
@@ -9365,6 +9981,47 @@ class SDKApi extends BaseAPI {
|
|
|
9365
9981
|
const response = await this.sdkRemoveBusinessAccountWalletRaw(requestParameters, initOverrides);
|
|
9366
9982
|
return await response.value();
|
|
9367
9983
|
}
|
|
9984
|
+
/**
|
|
9985
|
+
* Replaces the governance section wholesale, matching the enclave: a caller sending one action\'s rules drops the others. Requires step-up authentication, because governance decides what every other mutation requires.
|
|
9986
|
+
* SDK — replace the approval requirements for a business account
|
|
9987
|
+
*/
|
|
9988
|
+
async sdkSetBusinessAccountGovernanceRaw(requestParameters, initOverrides) {
|
|
9989
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9990
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkSetBusinessAccountGovernance.');
|
|
9991
|
+
}
|
|
9992
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9993
|
+
throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkSetBusinessAccountGovernance.');
|
|
9994
|
+
}
|
|
9995
|
+
if (requestParameters.setBusinessAccountGovernanceSdkRequest === null || requestParameters.setBusinessAccountGovernanceSdkRequest === undefined) {
|
|
9996
|
+
throw new RequiredError('setBusinessAccountGovernanceSdkRequest', 'Required parameter requestParameters.setBusinessAccountGovernanceSdkRequest was null or undefined when calling sdkSetBusinessAccountGovernance.');
|
|
9997
|
+
}
|
|
9998
|
+
const queryParameters = {};
|
|
9999
|
+
const headerParameters = {};
|
|
10000
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
10001
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
10002
|
+
const token = this.configuration.accessToken;
|
|
10003
|
+
const tokenString = await token("bearerAuth", []);
|
|
10004
|
+
if (tokenString) {
|
|
10005
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
10006
|
+
}
|
|
10007
|
+
}
|
|
10008
|
+
const response = await this.request({
|
|
10009
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/governance`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
10010
|
+
method: 'PUT',
|
|
10011
|
+
headers: headerParameters,
|
|
10012
|
+
query: queryParameters,
|
|
10013
|
+
body: SetBusinessAccountGovernanceSdkRequestToJSON(requestParameters.setBusinessAccountGovernanceSdkRequest),
|
|
10014
|
+
}, initOverrides);
|
|
10015
|
+
return new JSONApiResponse(response, (jsonValue) => BusinessAccountMutationVersionFromJSON(jsonValue));
|
|
10016
|
+
}
|
|
10017
|
+
/**
|
|
10018
|
+
* Replaces the governance section wholesale, matching the enclave: a caller sending one action\'s rules drops the others. Requires step-up authentication, because governance decides what every other mutation requires.
|
|
10019
|
+
* SDK — replace the approval requirements for a business account
|
|
10020
|
+
*/
|
|
10021
|
+
async sdkSetBusinessAccountGovernance(requestParameters, initOverrides) {
|
|
10022
|
+
const response = await this.sdkSetBusinessAccountGovernanceRaw(requestParameters, initOverrides);
|
|
10023
|
+
return await response.value();
|
|
10024
|
+
}
|
|
9368
10025
|
/**
|
|
9369
10026
|
*/
|
|
9370
10027
|
async sdkSettingsOptionsRaw(requestParameters, initOverrides) {
|
|
@@ -9510,6 +10167,84 @@ class SDKApi extends BaseAPI {
|
|
|
9510
10167
|
const response = await this.sdkUpdateBusinessAccountMemberRoleRaw(requestParameters, initOverrides);
|
|
9511
10168
|
return await response.value();
|
|
9512
10169
|
}
|
|
10170
|
+
/**
|
|
10171
|
+
* Terminal, and different from withdrawing an approval: a veto ends the proposal rather than reducing its count. Requires step-up authentication — killing a proposal is destructive and irreversible, so it carries the same weight as approving one. Enforced by the application rather than the signed document, because the absence of a veto is not provable in a stateless request. It works because the application is the only path to the enclave, so declining to forward genuinely stops it.
|
|
10172
|
+
* SDK — kill a proposal
|
|
10173
|
+
*/
|
|
10174
|
+
async sdkVetoBusinessAccountProposalRaw(requestParameters, initOverrides) {
|
|
10175
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
10176
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkVetoBusinessAccountProposal.');
|
|
10177
|
+
}
|
|
10178
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
10179
|
+
throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkVetoBusinessAccountProposal.');
|
|
10180
|
+
}
|
|
10181
|
+
if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
|
|
10182
|
+
throw new RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkVetoBusinessAccountProposal.');
|
|
10183
|
+
}
|
|
10184
|
+
const queryParameters = {};
|
|
10185
|
+
const headerParameters = {};
|
|
10186
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
10187
|
+
const token = this.configuration.accessToken;
|
|
10188
|
+
const tokenString = await token("bearerAuth", []);
|
|
10189
|
+
if (tokenString) {
|
|
10190
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
10191
|
+
}
|
|
10192
|
+
}
|
|
10193
|
+
const response = await this.request({
|
|
10194
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/proposals/{proposalId}/veto`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))).replace(`{${"proposalId"}}`, encodeURIComponent(String(requestParameters.proposalId))),
|
|
10195
|
+
method: 'POST',
|
|
10196
|
+
headers: headerParameters,
|
|
10197
|
+
query: queryParameters,
|
|
10198
|
+
}, initOverrides);
|
|
10199
|
+
return new JSONApiResponse(response, (jsonValue) => BusinessAccountProposalFromJSON(jsonValue));
|
|
10200
|
+
}
|
|
10201
|
+
/**
|
|
10202
|
+
* Terminal, and different from withdrawing an approval: a veto ends the proposal rather than reducing its count. Requires step-up authentication — killing a proposal is destructive and irreversible, so it carries the same weight as approving one. Enforced by the application rather than the signed document, because the absence of a veto is not provable in a stateless request. It works because the application is the only path to the enclave, so declining to forward genuinely stops it.
|
|
10203
|
+
* SDK — kill a proposal
|
|
10204
|
+
*/
|
|
10205
|
+
async sdkVetoBusinessAccountProposal(requestParameters, initOverrides) {
|
|
10206
|
+
const response = await this.sdkVetoBusinessAccountProposalRaw(requestParameters, initOverrides);
|
|
10207
|
+
return await response.value();
|
|
10208
|
+
}
|
|
10209
|
+
/**
|
|
10210
|
+
* Marks the caller\'s approval revoked rather than deleting it, so the record that consent was given and then taken back survives. A revoked approval stops being forwarded to the enclave, which is what makes withdrawal actually reduce the count.
|
|
10211
|
+
* SDK — withdraw the caller\'s approval
|
|
10212
|
+
*/
|
|
10213
|
+
async sdkWithdrawBusinessAccountProposalApprovalRaw(requestParameters, initOverrides) {
|
|
10214
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
10215
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkWithdrawBusinessAccountProposalApproval.');
|
|
10216
|
+
}
|
|
10217
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
10218
|
+
throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkWithdrawBusinessAccountProposalApproval.');
|
|
10219
|
+
}
|
|
10220
|
+
if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
|
|
10221
|
+
throw new RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkWithdrawBusinessAccountProposalApproval.');
|
|
10222
|
+
}
|
|
10223
|
+
const queryParameters = {};
|
|
10224
|
+
const headerParameters = {};
|
|
10225
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
10226
|
+
const token = this.configuration.accessToken;
|
|
10227
|
+
const tokenString = await token("bearerAuth", []);
|
|
10228
|
+
if (tokenString) {
|
|
10229
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
10230
|
+
}
|
|
10231
|
+
}
|
|
10232
|
+
const response = await this.request({
|
|
10233
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/proposals/{proposalId}/approvals`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))).replace(`{${"proposalId"}}`, encodeURIComponent(String(requestParameters.proposalId))),
|
|
10234
|
+
method: 'DELETE',
|
|
10235
|
+
headers: headerParameters,
|
|
10236
|
+
query: queryParameters,
|
|
10237
|
+
}, initOverrides);
|
|
10238
|
+
return new JSONApiResponse(response, (jsonValue) => BusinessAccountProposalFromJSON(jsonValue));
|
|
10239
|
+
}
|
|
10240
|
+
/**
|
|
10241
|
+
* Marks the caller\'s approval revoked rather than deleting it, so the record that consent was given and then taken back survives. A revoked approval stops being forwarded to the enclave, which is what makes withdrawal actually reduce the count.
|
|
10242
|
+
* SDK — withdraw the caller\'s approval
|
|
10243
|
+
*/
|
|
10244
|
+
async sdkWithdrawBusinessAccountProposalApproval(requestParameters, initOverrides) {
|
|
10245
|
+
const response = await this.sdkWithdrawBusinessAccountProposalApprovalRaw(requestParameters, initOverrides);
|
|
10246
|
+
return await response.value();
|
|
10247
|
+
}
|
|
9513
10248
|
/**
|
|
9514
10249
|
* When a user selects a wallet to be the primary wallet in a multi-wallet enabled environment, this endpoint is called to record this on the backend.
|
|
9515
10250
|
* Update primary wallet selection
|