@dynamic-labs/sdk-api 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/AdminActionsApi.cjs +6 -0
- package/src/apis/AdminActionsApi.js +6 -0
- package/src/apis/AllowlistsApi.cjs +6 -0
- package/src/apis/AllowlistsApi.js +6 -0
- package/src/apis/AnalyticsApi.cjs +6 -0
- package/src/apis/AnalyticsApi.js +6 -0
- package/src/apis/AuthorizedClientsApi.cjs +6 -0
- package/src/apis/AuthorizedClientsApi.js +6 -0
- package/src/apis/BusinessAccountsApi.cjs +6 -0
- package/src/apis/BusinessAccountsApi.js +6 -0
- package/src/apis/CaptchaApi.cjs +6 -0
- package/src/apis/CaptchaApi.js +6 -0
- package/src/apis/ChainalysisApi.cjs +6 -0
- package/src/apis/ChainalysisApi.js +6 -0
- package/src/apis/ChainsApi.cjs +6 -0
- package/src/apis/ChainsApi.js +6 -0
- package/src/apis/CheckoutApi.cjs +6 -0
- package/src/apis/CheckoutApi.js +6 -0
- package/src/apis/ClientGrantApi.cjs +6 -0
- package/src/apis/ClientGrantApi.js +6 -0
- package/src/apis/CustomFieldsApi.cjs +6 -0
- package/src/apis/CustomFieldsApi.js +6 -0
- package/src/apis/CustomHostnamesApi.cjs +6 -0
- package/src/apis/CustomHostnamesApi.js +6 -0
- package/src/apis/CustomNetworksApi.cjs +6 -0
- package/src/apis/CustomNetworksApi.js +6 -0
- package/src/apis/DeeplinkUrlsApi.cjs +6 -0
- package/src/apis/DeeplinkUrlsApi.js +6 -0
- package/src/apis/EnvironmentsApi.cjs +6 -0
- package/src/apis/EnvironmentsApi.js +6 -0
- package/src/apis/EventsApi.cjs +6 -0
- package/src/apis/EventsApi.js +6 -0
- package/src/apis/ExchangesApi.cjs +6 -0
- package/src/apis/ExchangesApi.js +6 -0
- package/src/apis/ExportsApi.cjs +6 -0
- package/src/apis/ExportsApi.js +6 -0
- package/src/apis/ExternalJwtApi.cjs +6 -0
- package/src/apis/ExternalJwtApi.js +6 -0
- package/src/apis/FlowAnalyticsApi.cjs +6 -0
- package/src/apis/FlowAnalyticsApi.js +6 -0
- package/src/apis/GaslessApi.cjs +6 -0
- package/src/apis/GaslessApi.js +6 -0
- package/src/apis/GatesApi.cjs +6 -0
- package/src/apis/GatesApi.js +6 -0
- package/src/apis/GlobalWalletAccessControlApi.cjs +6 -0
- package/src/apis/GlobalWalletAccessControlApi.js +6 -0
- package/src/apis/GlobalWalletConnectionsApi.cjs +6 -0
- package/src/apis/GlobalWalletConnectionsApi.js +6 -0
- package/src/apis/GlobalWalletsApi.cjs +6 -0
- package/src/apis/GlobalWalletsApi.js +6 -0
- package/src/apis/InvitesApi.cjs +6 -0
- package/src/apis/InvitesApi.js +6 -0
- package/src/apis/KybApi.cjs +6 -0
- package/src/apis/KybApi.js +6 -0
- package/src/apis/MembersApi.cjs +6 -0
- package/src/apis/MembersApi.js +6 -0
- package/src/apis/MfaSettingsApi.cjs +6 -0
- package/src/apis/MfaSettingsApi.js +6 -0
- package/src/apis/NameServicesApi.cjs +6 -0
- package/src/apis/NameServicesApi.js +6 -0
- package/src/apis/OrganizationSettingsApi.cjs +6 -0
- package/src/apis/OrganizationSettingsApi.js +6 -0
- package/src/apis/OrganizationsApi.cjs +6 -0
- package/src/apis/OrganizationsApi.js +6 -0
- package/src/apis/OriginsApi.cjs +6 -0
- package/src/apis/OriginsApi.js +6 -0
- package/src/apis/ProjectsApi.cjs +6 -0
- package/src/apis/ProjectsApi.js +6 -0
- package/src/apis/ProvidersApi.cjs +6 -0
- package/src/apis/ProvidersApi.js +6 -0
- package/src/apis/SDKApi.cjs +739 -4
- package/src/apis/SDKApi.d.ts +298 -5
- package/src/apis/SDKApi.js +739 -4
- package/src/apis/SDKViewsApi.cjs +6 -0
- package/src/apis/SDKViewsApi.js +6 -0
- package/src/apis/ScreeningPoliciesApi.cjs +6 -0
- package/src/apis/ScreeningPoliciesApi.js +6 -0
- package/src/apis/ServerApi.cjs +6 -0
- package/src/apis/ServerApi.js +6 -0
- package/src/apis/SessionsApi.cjs +6 -0
- package/src/apis/SessionsApi.js +6 -0
- package/src/apis/TestAccountApi.cjs +6 -0
- package/src/apis/TestAccountApi.js +6 -0
- package/src/apis/TokensApi.cjs +6 -0
- package/src/apis/TokensApi.js +6 -0
- package/src/apis/UserApiTokensApi.cjs +6 -0
- package/src/apis/UserApiTokensApi.js +6 -0
- package/src/apis/UsersApi.cjs +6 -0
- package/src/apis/UsersApi.js +6 -0
- package/src/apis/VisitsApi.cjs +6 -0
- package/src/apis/VisitsApi.js +6 -0
- package/src/apis/WaasApi.cjs +6 -0
- package/src/apis/WaasApi.js +6 -0
- package/src/apis/WalletConnectApi.cjs +6 -0
- package/src/apis/WalletConnectApi.js +6 -0
- package/src/apis/WalletsApi.cjs +6 -0
- package/src/apis/WalletsApi.js +6 -0
- package/src/apis/WebhooksApi.cjs +6 -0
- package/src/apis/WebhooksApi.js +6 -0
- package/src/apis/YieldApi.cjs +6 -0
- package/src/apis/YieldApi.js +6 -0
- package/src/apis/ZendeskApi.cjs +6 -0
- package/src/apis/ZendeskApi.js +6 -0
- package/src/index.cjs +116 -0
- package/src/index.js +23 -0
- package/src/models/AddBusinessAccountMemberSdkRequest.cjs +6 -0
- package/src/models/AddBusinessAccountMemberSdkRequest.d.ts +21 -0
- package/src/models/AddBusinessAccountMemberSdkRequest.js +6 -0
- package/src/models/ApproveBusinessAccountProposalSdkRequest.cjs +45 -0
- package/src/models/ApproveBusinessAccountProposalSdkRequest.d.ts +33 -0
- package/src/models/ApproveBusinessAccountProposalSdkRequest.js +39 -0
- package/src/models/BusinessAccountApprovalRequirement.cjs +60 -0
- package/src/models/BusinessAccountApprovalRequirement.d.ts +89 -0
- package/src/models/BusinessAccountApprovalRequirement.js +54 -0
- package/src/models/BusinessAccountApprovalRequirementStatus.cjs +43 -0
- package/src/models/BusinessAccountApprovalRequirementStatus.d.ts +58 -0
- package/src/models/BusinessAccountApprovalRequirementStatus.js +37 -0
- package/src/models/BusinessAccountApprovalsPending.cjs +51 -0
- package/src/models/BusinessAccountApprovalsPending.d.ts +64 -0
- package/src/models/BusinessAccountApprovalsPending.js +45 -0
- package/src/models/BusinessAccountForbidden.cjs +36 -0
- package/src/models/BusinessAccountForbidden.d.ts +34 -0
- package/src/models/BusinessAccountForbidden.js +30 -0
- package/src/models/BusinessAccountForbiddenAllOf.cjs +34 -0
- package/src/models/BusinessAccountForbiddenAllOf.d.ts +28 -0
- package/src/models/BusinessAccountForbiddenAllOf.js +28 -0
- package/src/models/BusinessAccountGovernanceResponse.cjs +43 -0
- package/src/models/BusinessAccountGovernanceResponse.d.ts +30 -0
- package/src/models/BusinessAccountGovernanceResponse.js +37 -0
- package/src/models/BusinessAccountGovernedAction.cjs +50 -0
- package/src/models/BusinessAccountGovernedAction.d.ts +33 -0
- package/src/models/BusinessAccountGovernedAction.js +44 -0
- package/src/models/BusinessAccountMutationVersion.cjs +43 -0
- package/src/models/BusinessAccountMutationVersion.d.ts +27 -0
- package/src/models/BusinessAccountMutationVersion.js +37 -0
- package/src/models/BusinessAccountProposal.cjs +62 -0
- package/src/models/BusinessAccountProposal.d.ts +108 -0
- package/src/models/BusinessAccountProposal.js +56 -0
- package/src/models/BusinessAccountProposalApprovalRecord.cjs +37 -0
- package/src/models/BusinessAccountProposalApprovalRecord.d.ts +39 -0
- package/src/models/BusinessAccountProposalApprovalRecord.js +31 -0
- package/src/models/BusinessAccountProposalStatus.cjs +42 -0
- package/src/models/BusinessAccountProposalStatus.d.ts +25 -0
- package/src/models/BusinessAccountProposalStatus.js +36 -0
- package/src/models/BusinessAccountProposalSubject.cjs +35 -0
- package/src/models/BusinessAccountProposalSubject.d.ts +33 -0
- package/src/models/BusinessAccountProposalSubject.js +29 -0
- package/src/models/BusinessAccountRequirementCondition.cjs +43 -0
- package/src/models/BusinessAccountRequirementCondition.d.ts +57 -0
- package/src/models/BusinessAccountRequirementCondition.js +37 -0
- package/src/models/BusinessAccountRoleDefinition.cjs +52 -0
- package/src/models/BusinessAccountRoleDefinition.d.ts +35 -0
- package/src/models/BusinessAccountRoleDefinition.js +46 -0
- package/src/models/BusinessAccountRolesResponse.cjs +34 -0
- package/src/models/BusinessAccountRolesResponse.d.ts +30 -0
- package/src/models/BusinessAccountRolesResponse.js +28 -0
- package/src/models/BusinessAccountSigningRefused.cjs +37 -0
- package/src/models/BusinessAccountSigningRefused.d.ts +39 -0
- package/src/models/BusinessAccountSigningRefused.js +31 -0
- package/src/models/DefineBusinessAccountRoleSdkRequest.cjs +50 -0
- package/src/models/DefineBusinessAccountRoleSdkRequest.d.ts +62 -0
- package/src/models/DefineBusinessAccountRoleSdkRequest.js +44 -0
- package/src/models/DeleteBusinessAccountRoleSdkRequest.cjs +37 -0
- package/src/models/DeleteBusinessAccountRoleSdkRequest.d.ts +42 -0
- package/src/models/DeleteBusinessAccountRoleSdkRequest.js +31 -0
- package/src/models/RemoveBusinessAccountMemberSdkRequest.cjs +37 -0
- package/src/models/RemoveBusinessAccountMemberSdkRequest.d.ts +42 -0
- package/src/models/RemoveBusinessAccountMemberSdkRequest.js +31 -0
- package/src/models/RemoveBusinessAccountSignerSdkRequest.cjs +37 -0
- package/src/models/RemoveBusinessAccountSignerSdkRequest.d.ts +42 -0
- package/src/models/RemoveBusinessAccountSignerSdkRequest.js +31 -0
- package/src/models/RemoveBusinessAccountWalletSdkRequest.cjs +37 -0
- package/src/models/RemoveBusinessAccountWalletSdkRequest.d.ts +42 -0
- package/src/models/RemoveBusinessAccountWalletSdkRequest.js +31 -0
- package/src/models/SetBusinessAccountGovernanceSdkRequest.cjs +39 -0
- package/src/models/SetBusinessAccountGovernanceSdkRequest.d.ts +51 -0
- package/src/models/SetBusinessAccountGovernanceSdkRequest.js +33 -0
- package/src/models/TokenScope.cjs +8 -0
- package/src/models/TokenScope.d.ts +8 -0
- package/src/models/TokenScope.js +8 -0
- package/src/models/TransferBusinessAccountOwnershipSdkRequest.cjs +8 -12
- package/src/models/TransferBusinessAccountOwnershipSdkRequest.d.ts +21 -0
- package/src/models/TransferBusinessAccountOwnershipSdkRequest.js +8 -12
- package/src/models/UpdateBusinessAccountMemberRoleSdkRequest.cjs +7 -0
- package/src/models/UpdateBusinessAccountMemberRoleSdkRequest.d.ts +21 -0
- package/src/models/UpdateBusinessAccountMemberRoleSdkRequest.js +7 -0
- package/src/models/index.d.ts +23 -0
package/src/apis/SDKApi.cjs
CHANGED
|
@@ -18,6 +18,7 @@ require('../models/TimeUnitEnum.cjs');
|
|
|
18
18
|
var AleoCuratedPricesResponse = require('../models/AleoCuratedPricesResponse.cjs');
|
|
19
19
|
var AleoProverEncryptedRequest = require('../models/AleoProverEncryptedRequest.cjs');
|
|
20
20
|
var AleoProverPubkeyResponse = require('../models/AleoProverPubkeyResponse.cjs');
|
|
21
|
+
var ApproveBusinessAccountProposalSdkRequest = require('../models/ApproveBusinessAccountProposalSdkRequest.cjs');
|
|
21
22
|
require('../models/AssignableBusinessAccountMemberRole.cjs');
|
|
22
23
|
var AttachSourceRequest = require('../models/AttachSourceRequest.cjs');
|
|
23
24
|
require('../models/AttestationConveyancePreference.cjs');
|
|
@@ -58,8 +59,17 @@ var MFADevice = require('../models/MFADevice.cjs');
|
|
|
58
59
|
var BusinessAccount = require('../models/BusinessAccount.cjs');
|
|
59
60
|
require('../models/BusinessAccountActionEnum.cjs');
|
|
60
61
|
var BusinessAccountMember = require('../models/BusinessAccountMember.cjs');
|
|
62
|
+
require('../models/BusinessAccountApprovalRequirement.cjs');
|
|
63
|
+
require('../models/BusinessAccountApprovalsPending.cjs');
|
|
61
64
|
var BusinessAccountDetail = require('../models/BusinessAccountDetail.cjs');
|
|
65
|
+
var BusinessAccountGovernanceResponse = require('../models/BusinessAccountGovernanceResponse.cjs');
|
|
66
|
+
require('../models/BusinessAccountGovernedAction.cjs');
|
|
62
67
|
var BusinessAccountList = require('../models/BusinessAccountList.cjs');
|
|
68
|
+
var BusinessAccountMutationVersion = require('../models/BusinessAccountMutationVersion.cjs');
|
|
69
|
+
var BusinessAccountProposal = require('../models/BusinessAccountProposal.cjs');
|
|
70
|
+
require('../models/BusinessAccountProposalStatus.cjs');
|
|
71
|
+
require('../models/BusinessAccountRoleDefinition.cjs');
|
|
72
|
+
var BusinessAccountRolesResponse = require('../models/BusinessAccountRolesResponse.cjs');
|
|
63
73
|
require('../models/CaptchaProviderEnum.cjs');
|
|
64
74
|
require('../models/DestinationTypeEnum.cjs');
|
|
65
75
|
require('../models/ChainalysisExists.cjs');
|
|
@@ -108,9 +118,11 @@ require('../models/CustomHostnameStatusEnum.cjs');
|
|
|
108
118
|
require('../models/CustomHostnameUsageEnum.cjs');
|
|
109
119
|
require('../models/CustomHostnameVerificationType.cjs');
|
|
110
120
|
require('../models/DnsRecordType.cjs');
|
|
121
|
+
var DefineBusinessAccountRoleSdkRequest = require('../models/DefineBusinessAccountRoleSdkRequest.cjs');
|
|
111
122
|
require('../models/DelegatedAccessEncryptionPublicKey.cjs');
|
|
112
123
|
var DelegatedShareDeliveryRequest = require('../models/DelegatedShareDeliveryRequest.cjs');
|
|
113
124
|
var DelegatedShareDeliveryResponse = require('../models/DelegatedShareDeliveryResponse.cjs');
|
|
125
|
+
var DeleteBusinessAccountRoleSdkRequest = require('../models/DeleteBusinessAccountRoleSdkRequest.cjs');
|
|
114
126
|
var DeleteDeviceRegistrationResponse = require('../models/DeleteDeviceRegistrationResponse.cjs');
|
|
115
127
|
var DeleteEmbeddedWalletsRequest = require('../models/DeleteEmbeddedWalletsRequest.cjs');
|
|
116
128
|
var DeleteUserPasskeyRequest = require('../models/DeleteUserPasskeyRequest.cjs');
|
|
@@ -260,6 +272,9 @@ var RefreshKeySharesRequest = require('../models/RefreshKeySharesRequest.cjs');
|
|
|
260
272
|
var RefreshKeySharesResponse = require('../models/RefreshKeySharesResponse.cjs');
|
|
261
273
|
var RegisterEmbeddedWalletSessionKeyResponse = require('../models/RegisterEmbeddedWalletSessionKeyResponse.cjs');
|
|
262
274
|
var RegisterSessionKeyRequest = require('../models/RegisterSessionKeyRequest.cjs');
|
|
275
|
+
var RemoveBusinessAccountMemberSdkRequest = require('../models/RemoveBusinessAccountMemberSdkRequest.cjs');
|
|
276
|
+
var RemoveBusinessAccountSignerSdkRequest = require('../models/RemoveBusinessAccountSignerSdkRequest.cjs');
|
|
277
|
+
var RemoveBusinessAccountWalletSdkRequest = require('../models/RemoveBusinessAccountWalletSdkRequest.cjs');
|
|
263
278
|
require('../models/ReshareKind.cjs');
|
|
264
279
|
var ReshareRequest = require('../models/ReshareRequest.cjs');
|
|
265
280
|
require('../models/RoomTypeEnum.cjs');
|
|
@@ -276,6 +291,7 @@ require('../models/ScreeningPolicyScopeEnum.cjs');
|
|
|
276
291
|
require('../models/ScreeningReason.cjs');
|
|
277
292
|
require('../models/SdkEnvironmentIdWaasWalletIdAdditionalAddressesAdditionalAddresses.cjs');
|
|
278
293
|
var SdkSettingsRequest = require('../models/SdkSettingsRequest.cjs');
|
|
294
|
+
var SetBusinessAccountGovernanceSdkRequest = require('../models/SetBusinessAccountGovernanceSdkRequest.cjs');
|
|
279
295
|
var SignAleoRequestWithWaasRequest = require('../models/SignAleoRequestWithWaasRequest.cjs');
|
|
280
296
|
require('../models/SignMessageRawSign.cjs');
|
|
281
297
|
var SignMessageWithWaasRequest = require('../models/SignMessageWithWaasRequest.cjs');
|
|
@@ -8885,7 +8901,7 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
8885
8901
|
await this.screenTransactionOptionsRaw(requestParameters, initOverrides);
|
|
8886
8902
|
}
|
|
8887
8903
|
/**
|
|
8888
|
-
*
|
|
8904
|
+
* 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.
|
|
8889
8905
|
* SDK — add a member to a business account
|
|
8890
8906
|
*/
|
|
8891
8907
|
async sdkAddBusinessAccountMemberRaw(requestParameters, initOverrides) {
|
|
@@ -8918,7 +8934,7 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
8918
8934
|
return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountMember.BusinessAccountMemberFromJSON(jsonValue));
|
|
8919
8935
|
}
|
|
8920
8936
|
/**
|
|
8921
|
-
*
|
|
8937
|
+
* 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.
|
|
8922
8938
|
* SDK — add a member to a business account
|
|
8923
8939
|
*/
|
|
8924
8940
|
async sdkAddBusinessAccountMember(requestParameters, initOverrides) {
|
|
@@ -8969,6 +8985,50 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
8969
8985
|
const response = await this.sdkAddBusinessAccountSignerRaw(requestParameters, initOverrides);
|
|
8970
8986
|
return await response.value();
|
|
8971
8987
|
}
|
|
8988
|
+
/**
|
|
8989
|
+
* 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.
|
|
8990
|
+
* SDK — approve a proposal
|
|
8991
|
+
*/
|
|
8992
|
+
async sdkApproveBusinessAccountProposalRaw(requestParameters, initOverrides) {
|
|
8993
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
8994
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkApproveBusinessAccountProposal.');
|
|
8995
|
+
}
|
|
8996
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
8997
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkApproveBusinessAccountProposal.');
|
|
8998
|
+
}
|
|
8999
|
+
if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
|
|
9000
|
+
throw new runtime.RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkApproveBusinessAccountProposal.');
|
|
9001
|
+
}
|
|
9002
|
+
if (requestParameters.approveBusinessAccountProposalSdkRequest === null || requestParameters.approveBusinessAccountProposalSdkRequest === undefined) {
|
|
9003
|
+
throw new runtime.RequiredError('approveBusinessAccountProposalSdkRequest', 'Required parameter requestParameters.approveBusinessAccountProposalSdkRequest was null or undefined when calling sdkApproveBusinessAccountProposal.');
|
|
9004
|
+
}
|
|
9005
|
+
const queryParameters = {};
|
|
9006
|
+
const headerParameters = {};
|
|
9007
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
9008
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
9009
|
+
const token = this.configuration.accessToken;
|
|
9010
|
+
const tokenString = await token("bearerAuth", []);
|
|
9011
|
+
if (tokenString) {
|
|
9012
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
9013
|
+
}
|
|
9014
|
+
}
|
|
9015
|
+
const response = await this.request({
|
|
9016
|
+
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))),
|
|
9017
|
+
method: 'POST',
|
|
9018
|
+
headers: headerParameters,
|
|
9019
|
+
query: queryParameters,
|
|
9020
|
+
body: ApproveBusinessAccountProposalSdkRequest.ApproveBusinessAccountProposalSdkRequestToJSON(requestParameters.approveBusinessAccountProposalSdkRequest),
|
|
9021
|
+
}, initOverrides);
|
|
9022
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountProposal.BusinessAccountProposalFromJSON(jsonValue));
|
|
9023
|
+
}
|
|
9024
|
+
/**
|
|
9025
|
+
* 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.
|
|
9026
|
+
* SDK — approve a proposal
|
|
9027
|
+
*/
|
|
9028
|
+
async sdkApproveBusinessAccountProposal(requestParameters, initOverrides) {
|
|
9029
|
+
const response = await this.sdkApproveBusinessAccountProposalRaw(requestParameters, initOverrides);
|
|
9030
|
+
return await response.value();
|
|
9031
|
+
}
|
|
8972
9032
|
/**
|
|
8973
9033
|
* Options call for this endpoint
|
|
8974
9034
|
*/
|
|
@@ -8995,6 +9055,32 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
8995
9055
|
async sdkBusinessAccountByIdOptions(requestParameters, initOverrides) {
|
|
8996
9056
|
await this.sdkBusinessAccountByIdOptionsRaw(requestParameters, initOverrides);
|
|
8997
9057
|
}
|
|
9058
|
+
/**
|
|
9059
|
+
* Options call for this endpoint
|
|
9060
|
+
*/
|
|
9061
|
+
async sdkBusinessAccountGovernanceOptionsRaw(requestParameters, initOverrides) {
|
|
9062
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9063
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountGovernanceOptions.');
|
|
9064
|
+
}
|
|
9065
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9066
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountGovernanceOptions.');
|
|
9067
|
+
}
|
|
9068
|
+
const queryParameters = {};
|
|
9069
|
+
const headerParameters = {};
|
|
9070
|
+
const response = await this.request({
|
|
9071
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/governance`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
9072
|
+
method: 'OPTIONS',
|
|
9073
|
+
headers: headerParameters,
|
|
9074
|
+
query: queryParameters,
|
|
9075
|
+
}, initOverrides);
|
|
9076
|
+
return new runtime.VoidApiResponse(response);
|
|
9077
|
+
}
|
|
9078
|
+
/**
|
|
9079
|
+
* Options call for this endpoint
|
|
9080
|
+
*/
|
|
9081
|
+
async sdkBusinessAccountGovernanceOptions(requestParameters, initOverrides) {
|
|
9082
|
+
await this.sdkBusinessAccountGovernanceOptionsRaw(requestParameters, initOverrides);
|
|
9083
|
+
}
|
|
8998
9084
|
/**
|
|
8999
9085
|
* Options call for this endpoint
|
|
9000
9086
|
*/
|
|
@@ -9099,6 +9185,226 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
9099
9185
|
async sdkBusinessAccountPolicyLayerOptions(requestParameters, initOverrides) {
|
|
9100
9186
|
await this.sdkBusinessAccountPolicyLayerOptionsRaw(requestParameters, initOverrides);
|
|
9101
9187
|
}
|
|
9188
|
+
/**
|
|
9189
|
+
* Options call for this endpoint
|
|
9190
|
+
*/
|
|
9191
|
+
async sdkBusinessAccountProposalApprovalsOptionsRaw(requestParameters, initOverrides) {
|
|
9192
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9193
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountProposalApprovalsOptions.');
|
|
9194
|
+
}
|
|
9195
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9196
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountProposalApprovalsOptions.');
|
|
9197
|
+
}
|
|
9198
|
+
if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
|
|
9199
|
+
throw new runtime.RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkBusinessAccountProposalApprovalsOptions.');
|
|
9200
|
+
}
|
|
9201
|
+
const queryParameters = {};
|
|
9202
|
+
const headerParameters = {};
|
|
9203
|
+
const response = await this.request({
|
|
9204
|
+
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))),
|
|
9205
|
+
method: 'OPTIONS',
|
|
9206
|
+
headers: headerParameters,
|
|
9207
|
+
query: queryParameters,
|
|
9208
|
+
}, initOverrides);
|
|
9209
|
+
return new runtime.VoidApiResponse(response);
|
|
9210
|
+
}
|
|
9211
|
+
/**
|
|
9212
|
+
* Options call for this endpoint
|
|
9213
|
+
*/
|
|
9214
|
+
async sdkBusinessAccountProposalApprovalsOptions(requestParameters, initOverrides) {
|
|
9215
|
+
await this.sdkBusinessAccountProposalApprovalsOptionsRaw(requestParameters, initOverrides);
|
|
9216
|
+
}
|
|
9217
|
+
/**
|
|
9218
|
+
* Options call for this endpoint
|
|
9219
|
+
*/
|
|
9220
|
+
async sdkBusinessAccountProposalExecuteOptionsRaw(requestParameters, initOverrides) {
|
|
9221
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9222
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountProposalExecuteOptions.');
|
|
9223
|
+
}
|
|
9224
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9225
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountProposalExecuteOptions.');
|
|
9226
|
+
}
|
|
9227
|
+
if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
|
|
9228
|
+
throw new runtime.RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkBusinessAccountProposalExecuteOptions.');
|
|
9229
|
+
}
|
|
9230
|
+
const queryParameters = {};
|
|
9231
|
+
const headerParameters = {};
|
|
9232
|
+
const response = await this.request({
|
|
9233
|
+
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))),
|
|
9234
|
+
method: 'OPTIONS',
|
|
9235
|
+
headers: headerParameters,
|
|
9236
|
+
query: queryParameters,
|
|
9237
|
+
}, initOverrides);
|
|
9238
|
+
return new runtime.VoidApiResponse(response);
|
|
9239
|
+
}
|
|
9240
|
+
/**
|
|
9241
|
+
* Options call for this endpoint
|
|
9242
|
+
*/
|
|
9243
|
+
async sdkBusinessAccountProposalExecuteOptions(requestParameters, initOverrides) {
|
|
9244
|
+
await this.sdkBusinessAccountProposalExecuteOptionsRaw(requestParameters, initOverrides);
|
|
9245
|
+
}
|
|
9246
|
+
/**
|
|
9247
|
+
* Options call for this endpoint
|
|
9248
|
+
*/
|
|
9249
|
+
async sdkBusinessAccountProposalOptionsRaw(requestParameters, initOverrides) {
|
|
9250
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9251
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountProposalOptions.');
|
|
9252
|
+
}
|
|
9253
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9254
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountProposalOptions.');
|
|
9255
|
+
}
|
|
9256
|
+
if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
|
|
9257
|
+
throw new runtime.RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkBusinessAccountProposalOptions.');
|
|
9258
|
+
}
|
|
9259
|
+
const queryParameters = {};
|
|
9260
|
+
const headerParameters = {};
|
|
9261
|
+
const response = await this.request({
|
|
9262
|
+
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))),
|
|
9263
|
+
method: 'OPTIONS',
|
|
9264
|
+
headers: headerParameters,
|
|
9265
|
+
query: queryParameters,
|
|
9266
|
+
}, initOverrides);
|
|
9267
|
+
return new runtime.VoidApiResponse(response);
|
|
9268
|
+
}
|
|
9269
|
+
/**
|
|
9270
|
+
* Options call for this endpoint
|
|
9271
|
+
*/
|
|
9272
|
+
async sdkBusinessAccountProposalOptions(requestParameters, initOverrides) {
|
|
9273
|
+
await this.sdkBusinessAccountProposalOptionsRaw(requestParameters, initOverrides);
|
|
9274
|
+
}
|
|
9275
|
+
/**
|
|
9276
|
+
* Options call for this endpoint
|
|
9277
|
+
*/
|
|
9278
|
+
async sdkBusinessAccountProposalVetoOptionsRaw(requestParameters, initOverrides) {
|
|
9279
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9280
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountProposalVetoOptions.');
|
|
9281
|
+
}
|
|
9282
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9283
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountProposalVetoOptions.');
|
|
9284
|
+
}
|
|
9285
|
+
if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
|
|
9286
|
+
throw new runtime.RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkBusinessAccountProposalVetoOptions.');
|
|
9287
|
+
}
|
|
9288
|
+
const queryParameters = {};
|
|
9289
|
+
const headerParameters = {};
|
|
9290
|
+
const response = await this.request({
|
|
9291
|
+
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))),
|
|
9292
|
+
method: 'OPTIONS',
|
|
9293
|
+
headers: headerParameters,
|
|
9294
|
+
query: queryParameters,
|
|
9295
|
+
}, initOverrides);
|
|
9296
|
+
return new runtime.VoidApiResponse(response);
|
|
9297
|
+
}
|
|
9298
|
+
/**
|
|
9299
|
+
* Options call for this endpoint
|
|
9300
|
+
*/
|
|
9301
|
+
async sdkBusinessAccountProposalVetoOptions(requestParameters, initOverrides) {
|
|
9302
|
+
await this.sdkBusinessAccountProposalVetoOptionsRaw(requestParameters, initOverrides);
|
|
9303
|
+
}
|
|
9304
|
+
/**
|
|
9305
|
+
* Options call for this endpoint
|
|
9306
|
+
*/
|
|
9307
|
+
async sdkBusinessAccountProposalsAwaitingApprovalOptionsRaw(requestParameters, initOverrides) {
|
|
9308
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9309
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountProposalsAwaitingApprovalOptions.');
|
|
9310
|
+
}
|
|
9311
|
+
const queryParameters = {};
|
|
9312
|
+
const headerParameters = {};
|
|
9313
|
+
const response = await this.request({
|
|
9314
|
+
path: `/sdk/{environmentId}/businessAccounts/proposals`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
|
|
9315
|
+
method: 'OPTIONS',
|
|
9316
|
+
headers: headerParameters,
|
|
9317
|
+
query: queryParameters,
|
|
9318
|
+
}, initOverrides);
|
|
9319
|
+
return new runtime.VoidApiResponse(response);
|
|
9320
|
+
}
|
|
9321
|
+
/**
|
|
9322
|
+
* Options call for this endpoint
|
|
9323
|
+
*/
|
|
9324
|
+
async sdkBusinessAccountProposalsAwaitingApprovalOptions(requestParameters, initOverrides) {
|
|
9325
|
+
await this.sdkBusinessAccountProposalsAwaitingApprovalOptionsRaw(requestParameters, initOverrides);
|
|
9326
|
+
}
|
|
9327
|
+
/**
|
|
9328
|
+
* Options call for this endpoint
|
|
9329
|
+
*/
|
|
9330
|
+
async sdkBusinessAccountProposalsOptionsRaw(requestParameters, initOverrides) {
|
|
9331
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9332
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountProposalsOptions.');
|
|
9333
|
+
}
|
|
9334
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9335
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountProposalsOptions.');
|
|
9336
|
+
}
|
|
9337
|
+
const queryParameters = {};
|
|
9338
|
+
const headerParameters = {};
|
|
9339
|
+
const response = await this.request({
|
|
9340
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/proposals`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
9341
|
+
method: 'OPTIONS',
|
|
9342
|
+
headers: headerParameters,
|
|
9343
|
+
query: queryParameters,
|
|
9344
|
+
}, initOverrides);
|
|
9345
|
+
return new runtime.VoidApiResponse(response);
|
|
9346
|
+
}
|
|
9347
|
+
/**
|
|
9348
|
+
* Options call for this endpoint
|
|
9349
|
+
*/
|
|
9350
|
+
async sdkBusinessAccountProposalsOptions(requestParameters, initOverrides) {
|
|
9351
|
+
await this.sdkBusinessAccountProposalsOptionsRaw(requestParameters, initOverrides);
|
|
9352
|
+
}
|
|
9353
|
+
/**
|
|
9354
|
+
* Options call for this endpoint
|
|
9355
|
+
*/
|
|
9356
|
+
async sdkBusinessAccountRoleOptionsRaw(requestParameters, initOverrides) {
|
|
9357
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9358
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountRoleOptions.');
|
|
9359
|
+
}
|
|
9360
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9361
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountRoleOptions.');
|
|
9362
|
+
}
|
|
9363
|
+
if (requestParameters.role === null || requestParameters.role === undefined) {
|
|
9364
|
+
throw new runtime.RequiredError('role', 'Required parameter requestParameters.role was null or undefined when calling sdkBusinessAccountRoleOptions.');
|
|
9365
|
+
}
|
|
9366
|
+
const queryParameters = {};
|
|
9367
|
+
const headerParameters = {};
|
|
9368
|
+
const response = await this.request({
|
|
9369
|
+
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))),
|
|
9370
|
+
method: 'OPTIONS',
|
|
9371
|
+
headers: headerParameters,
|
|
9372
|
+
query: queryParameters,
|
|
9373
|
+
}, initOverrides);
|
|
9374
|
+
return new runtime.VoidApiResponse(response);
|
|
9375
|
+
}
|
|
9376
|
+
/**
|
|
9377
|
+
* Options call for this endpoint
|
|
9378
|
+
*/
|
|
9379
|
+
async sdkBusinessAccountRoleOptions(requestParameters, initOverrides) {
|
|
9380
|
+
await this.sdkBusinessAccountRoleOptionsRaw(requestParameters, initOverrides);
|
|
9381
|
+
}
|
|
9382
|
+
/**
|
|
9383
|
+
* Options call for this endpoint
|
|
9384
|
+
*/
|
|
9385
|
+
async sdkBusinessAccountRolesOptionsRaw(requestParameters, initOverrides) {
|
|
9386
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9387
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountRolesOptions.');
|
|
9388
|
+
}
|
|
9389
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9390
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountRolesOptions.');
|
|
9391
|
+
}
|
|
9392
|
+
const queryParameters = {};
|
|
9393
|
+
const headerParameters = {};
|
|
9394
|
+
const response = await this.request({
|
|
9395
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/roles`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
9396
|
+
method: 'OPTIONS',
|
|
9397
|
+
headers: headerParameters,
|
|
9398
|
+
query: queryParameters,
|
|
9399
|
+
}, initOverrides);
|
|
9400
|
+
return new runtime.VoidApiResponse(response);
|
|
9401
|
+
}
|
|
9402
|
+
/**
|
|
9403
|
+
* Options call for this endpoint
|
|
9404
|
+
*/
|
|
9405
|
+
async sdkBusinessAccountRolesOptions(requestParameters, initOverrides) {
|
|
9406
|
+
await this.sdkBusinessAccountRolesOptionsRaw(requestParameters, initOverrides);
|
|
9407
|
+
}
|
|
9102
9408
|
/**
|
|
9103
9409
|
* Options call for this endpoint
|
|
9104
9410
|
*/
|
|
@@ -9273,6 +9579,127 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
9273
9579
|
const response = await this.sdkCreateBusinessAccountRaw(requestParameters, initOverrides);
|
|
9274
9580
|
return await response.value();
|
|
9275
9581
|
}
|
|
9582
|
+
/**
|
|
9583
|
+
* 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.
|
|
9584
|
+
* SDK — define a customer role for a business account
|
|
9585
|
+
*/
|
|
9586
|
+
async sdkDefineBusinessAccountRoleRaw(requestParameters, initOverrides) {
|
|
9587
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9588
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkDefineBusinessAccountRole.');
|
|
9589
|
+
}
|
|
9590
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9591
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkDefineBusinessAccountRole.');
|
|
9592
|
+
}
|
|
9593
|
+
if (requestParameters.defineBusinessAccountRoleSdkRequest === null || requestParameters.defineBusinessAccountRoleSdkRequest === undefined) {
|
|
9594
|
+
throw new runtime.RequiredError('defineBusinessAccountRoleSdkRequest', 'Required parameter requestParameters.defineBusinessAccountRoleSdkRequest was null or undefined when calling sdkDefineBusinessAccountRole.');
|
|
9595
|
+
}
|
|
9596
|
+
const queryParameters = {};
|
|
9597
|
+
const headerParameters = {};
|
|
9598
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
9599
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
9600
|
+
const token = this.configuration.accessToken;
|
|
9601
|
+
const tokenString = await token("bearerAuth", []);
|
|
9602
|
+
if (tokenString) {
|
|
9603
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
9604
|
+
}
|
|
9605
|
+
}
|
|
9606
|
+
const response = await this.request({
|
|
9607
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/roles`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
9608
|
+
method: 'POST',
|
|
9609
|
+
headers: headerParameters,
|
|
9610
|
+
query: queryParameters,
|
|
9611
|
+
body: DefineBusinessAccountRoleSdkRequest.DefineBusinessAccountRoleSdkRequestToJSON(requestParameters.defineBusinessAccountRoleSdkRequest),
|
|
9612
|
+
}, initOverrides);
|
|
9613
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountMutationVersion.BusinessAccountMutationVersionFromJSON(jsonValue));
|
|
9614
|
+
}
|
|
9615
|
+
/**
|
|
9616
|
+
* 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.
|
|
9617
|
+
* SDK — define a customer role for a business account
|
|
9618
|
+
*/
|
|
9619
|
+
async sdkDefineBusinessAccountRole(requestParameters, initOverrides) {
|
|
9620
|
+
const response = await this.sdkDefineBusinessAccountRoleRaw(requestParameters, initOverrides);
|
|
9621
|
+
return await response.value();
|
|
9622
|
+
}
|
|
9623
|
+
/**
|
|
9624
|
+
* 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.
|
|
9625
|
+
* SDK — delete a customer role from a business account
|
|
9626
|
+
*/
|
|
9627
|
+
async sdkDeleteBusinessAccountRoleRaw(requestParameters, initOverrides) {
|
|
9628
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9629
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkDeleteBusinessAccountRole.');
|
|
9630
|
+
}
|
|
9631
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9632
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkDeleteBusinessAccountRole.');
|
|
9633
|
+
}
|
|
9634
|
+
if (requestParameters.role === null || requestParameters.role === undefined) {
|
|
9635
|
+
throw new runtime.RequiredError('role', 'Required parameter requestParameters.role was null or undefined when calling sdkDeleteBusinessAccountRole.');
|
|
9636
|
+
}
|
|
9637
|
+
const queryParameters = {};
|
|
9638
|
+
const headerParameters = {};
|
|
9639
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
9640
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
9641
|
+
const token = this.configuration.accessToken;
|
|
9642
|
+
const tokenString = await token("bearerAuth", []);
|
|
9643
|
+
if (tokenString) {
|
|
9644
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
9645
|
+
}
|
|
9646
|
+
}
|
|
9647
|
+
const response = await this.request({
|
|
9648
|
+
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))),
|
|
9649
|
+
method: 'DELETE',
|
|
9650
|
+
headers: headerParameters,
|
|
9651
|
+
query: queryParameters,
|
|
9652
|
+
body: DeleteBusinessAccountRoleSdkRequest.DeleteBusinessAccountRoleSdkRequestToJSON(requestParameters.deleteBusinessAccountRoleSdkRequest),
|
|
9653
|
+
}, initOverrides);
|
|
9654
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountMutationVersion.BusinessAccountMutationVersionFromJSON(jsonValue));
|
|
9655
|
+
}
|
|
9656
|
+
/**
|
|
9657
|
+
* 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.
|
|
9658
|
+
* SDK — delete a customer role from a business account
|
|
9659
|
+
*/
|
|
9660
|
+
async sdkDeleteBusinessAccountRole(requestParameters, initOverrides) {
|
|
9661
|
+
const response = await this.sdkDeleteBusinessAccountRoleRaw(requestParameters, initOverrides);
|
|
9662
|
+
return await response.value();
|
|
9663
|
+
}
|
|
9664
|
+
/**
|
|
9665
|
+
* 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.
|
|
9666
|
+
* SDK — apply a proposal whose approvals now satisfy it
|
|
9667
|
+
*/
|
|
9668
|
+
async sdkExecuteBusinessAccountProposalRaw(requestParameters, initOverrides) {
|
|
9669
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9670
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkExecuteBusinessAccountProposal.');
|
|
9671
|
+
}
|
|
9672
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9673
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkExecuteBusinessAccountProposal.');
|
|
9674
|
+
}
|
|
9675
|
+
if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
|
|
9676
|
+
throw new runtime.RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkExecuteBusinessAccountProposal.');
|
|
9677
|
+
}
|
|
9678
|
+
const queryParameters = {};
|
|
9679
|
+
const headerParameters = {};
|
|
9680
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
9681
|
+
const token = this.configuration.accessToken;
|
|
9682
|
+
const tokenString = await token("bearerAuth", []);
|
|
9683
|
+
if (tokenString) {
|
|
9684
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
9685
|
+
}
|
|
9686
|
+
}
|
|
9687
|
+
const response = await this.request({
|
|
9688
|
+
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))),
|
|
9689
|
+
method: 'POST',
|
|
9690
|
+
headers: headerParameters,
|
|
9691
|
+
query: queryParameters,
|
|
9692
|
+
}, initOverrides);
|
|
9693
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountMutationVersion.BusinessAccountMutationVersionFromJSON(jsonValue));
|
|
9694
|
+
}
|
|
9695
|
+
/**
|
|
9696
|
+
* 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.
|
|
9697
|
+
* SDK — apply a proposal whose approvals now satisfy it
|
|
9698
|
+
*/
|
|
9699
|
+
async sdkExecuteBusinessAccountProposal(requestParameters, initOverrides) {
|
|
9700
|
+
const response = await this.sdkExecuteBusinessAccountProposalRaw(requestParameters, initOverrides);
|
|
9701
|
+
return await response.value();
|
|
9702
|
+
}
|
|
9276
9703
|
/**
|
|
9277
9704
|
* Returns 404 if the caller is not a member of the business account (404 not 403 so we don\'t leak business-account existence).
|
|
9278
9705
|
* SDK — get a business account with embedded members and signers
|
|
@@ -9309,6 +9736,81 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
9309
9736
|
const response = await this.sdkGetBusinessAccountByIdRaw(requestParameters, initOverrides);
|
|
9310
9737
|
return await response.value();
|
|
9311
9738
|
}
|
|
9739
|
+
/**
|
|
9740
|
+
* 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.
|
|
9741
|
+
* SDK — read the approval requirements in force
|
|
9742
|
+
*/
|
|
9743
|
+
async sdkGetBusinessAccountGovernanceRaw(requestParameters, initOverrides) {
|
|
9744
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9745
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkGetBusinessAccountGovernance.');
|
|
9746
|
+
}
|
|
9747
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9748
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkGetBusinessAccountGovernance.');
|
|
9749
|
+
}
|
|
9750
|
+
const queryParameters = {};
|
|
9751
|
+
const headerParameters = {};
|
|
9752
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
9753
|
+
const token = this.configuration.accessToken;
|
|
9754
|
+
const tokenString = await token("bearerAuth", []);
|
|
9755
|
+
if (tokenString) {
|
|
9756
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
9757
|
+
}
|
|
9758
|
+
}
|
|
9759
|
+
const response = await this.request({
|
|
9760
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/governance`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
9761
|
+
method: 'GET',
|
|
9762
|
+
headers: headerParameters,
|
|
9763
|
+
query: queryParameters,
|
|
9764
|
+
}, initOverrides);
|
|
9765
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountGovernanceResponse.BusinessAccountGovernanceResponseFromJSON(jsonValue));
|
|
9766
|
+
}
|
|
9767
|
+
/**
|
|
9768
|
+
* 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.
|
|
9769
|
+
* SDK — read the approval requirements in force
|
|
9770
|
+
*/
|
|
9771
|
+
async sdkGetBusinessAccountGovernance(requestParameters, initOverrides) {
|
|
9772
|
+
const response = await this.sdkGetBusinessAccountGovernanceRaw(requestParameters, initOverrides);
|
|
9773
|
+
return await response.value();
|
|
9774
|
+
}
|
|
9775
|
+
/**
|
|
9776
|
+
* 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.
|
|
9777
|
+
* SDK — read one proposal, including the intent to sign
|
|
9778
|
+
*/
|
|
9779
|
+
async sdkGetBusinessAccountProposalRaw(requestParameters, initOverrides) {
|
|
9780
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9781
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkGetBusinessAccountProposal.');
|
|
9782
|
+
}
|
|
9783
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9784
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkGetBusinessAccountProposal.');
|
|
9785
|
+
}
|
|
9786
|
+
if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
|
|
9787
|
+
throw new runtime.RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkGetBusinessAccountProposal.');
|
|
9788
|
+
}
|
|
9789
|
+
const queryParameters = {};
|
|
9790
|
+
const headerParameters = {};
|
|
9791
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
9792
|
+
const token = this.configuration.accessToken;
|
|
9793
|
+
const tokenString = await token("bearerAuth", []);
|
|
9794
|
+
if (tokenString) {
|
|
9795
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
9796
|
+
}
|
|
9797
|
+
}
|
|
9798
|
+
const response = await this.request({
|
|
9799
|
+
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))),
|
|
9800
|
+
method: 'GET',
|
|
9801
|
+
headers: headerParameters,
|
|
9802
|
+
query: queryParameters,
|
|
9803
|
+
}, initOverrides);
|
|
9804
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountProposal.BusinessAccountProposalFromJSON(jsonValue));
|
|
9805
|
+
}
|
|
9806
|
+
/**
|
|
9807
|
+
* 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.
|
|
9808
|
+
* SDK — read one proposal, including the intent to sign
|
|
9809
|
+
*/
|
|
9810
|
+
async sdkGetBusinessAccountProposal(requestParameters, initOverrides) {
|
|
9811
|
+
const response = await this.sdkGetBusinessAccountProposalRaw(requestParameters, initOverrides);
|
|
9812
|
+
return await response.value();
|
|
9813
|
+
}
|
|
9312
9814
|
/**
|
|
9313
9815
|
* 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.
|
|
9314
9816
|
* SDK — add an existing wallet to a business account
|
|
@@ -9347,6 +9849,114 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
9347
9849
|
const response = await this.sdkLinkBusinessAccountWalletRaw(requestParameters, initOverrides);
|
|
9348
9850
|
return await response.value();
|
|
9349
9851
|
}
|
|
9852
|
+
/**
|
|
9853
|
+
* 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.
|
|
9854
|
+
* SDK — list the governed mutations awaiting approval
|
|
9855
|
+
*/
|
|
9856
|
+
async sdkListBusinessAccountProposalsRaw(requestParameters, initOverrides) {
|
|
9857
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9858
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkListBusinessAccountProposals.');
|
|
9859
|
+
}
|
|
9860
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9861
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkListBusinessAccountProposals.');
|
|
9862
|
+
}
|
|
9863
|
+
const queryParameters = {};
|
|
9864
|
+
if (requestParameters.status !== undefined) {
|
|
9865
|
+
queryParameters['status'] = requestParameters.status;
|
|
9866
|
+
}
|
|
9867
|
+
const headerParameters = {};
|
|
9868
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
9869
|
+
const token = this.configuration.accessToken;
|
|
9870
|
+
const tokenString = await token("bearerAuth", []);
|
|
9871
|
+
if (tokenString) {
|
|
9872
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
9873
|
+
}
|
|
9874
|
+
}
|
|
9875
|
+
const response = await this.request({
|
|
9876
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/proposals`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
9877
|
+
method: 'GET',
|
|
9878
|
+
headers: headerParameters,
|
|
9879
|
+
query: queryParameters,
|
|
9880
|
+
}, initOverrides);
|
|
9881
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(BusinessAccountProposal.BusinessAccountProposalFromJSON));
|
|
9882
|
+
}
|
|
9883
|
+
/**
|
|
9884
|
+
* 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.
|
|
9885
|
+
* SDK — list the governed mutations awaiting approval
|
|
9886
|
+
*/
|
|
9887
|
+
async sdkListBusinessAccountProposals(requestParameters, initOverrides) {
|
|
9888
|
+
const response = await this.sdkListBusinessAccountProposalsRaw(requestParameters, initOverrides);
|
|
9889
|
+
return await response.value();
|
|
9890
|
+
}
|
|
9891
|
+
/**
|
|
9892
|
+
* 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.
|
|
9893
|
+
* SDK — list proposals awaiting the caller\'s approval, across accounts
|
|
9894
|
+
*/
|
|
9895
|
+
async sdkListBusinessAccountProposalsAwaitingApprovalRaw(requestParameters, initOverrides) {
|
|
9896
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9897
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkListBusinessAccountProposalsAwaitingApproval.');
|
|
9898
|
+
}
|
|
9899
|
+
const queryParameters = {};
|
|
9900
|
+
const headerParameters = {};
|
|
9901
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
9902
|
+
const token = this.configuration.accessToken;
|
|
9903
|
+
const tokenString = await token("bearerAuth", []);
|
|
9904
|
+
if (tokenString) {
|
|
9905
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
9906
|
+
}
|
|
9907
|
+
}
|
|
9908
|
+
const response = await this.request({
|
|
9909
|
+
path: `/sdk/{environmentId}/businessAccounts/proposals`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
|
|
9910
|
+
method: 'GET',
|
|
9911
|
+
headers: headerParameters,
|
|
9912
|
+
query: queryParameters,
|
|
9913
|
+
}, initOverrides);
|
|
9914
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(BusinessAccountProposal.BusinessAccountProposalFromJSON));
|
|
9915
|
+
}
|
|
9916
|
+
/**
|
|
9917
|
+
* 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.
|
|
9918
|
+
* SDK — list proposals awaiting the caller\'s approval, across accounts
|
|
9919
|
+
*/
|
|
9920
|
+
async sdkListBusinessAccountProposalsAwaitingApproval(requestParameters, initOverrides) {
|
|
9921
|
+
const response = await this.sdkListBusinessAccountProposalsAwaitingApprovalRaw(requestParameters, initOverrides);
|
|
9922
|
+
return await response.value();
|
|
9923
|
+
}
|
|
9924
|
+
/**
|
|
9925
|
+
* 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.
|
|
9926
|
+
* SDK — list the customer-defined roles for a business account
|
|
9927
|
+
*/
|
|
9928
|
+
async sdkListBusinessAccountRolesRaw(requestParameters, initOverrides) {
|
|
9929
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9930
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkListBusinessAccountRoles.');
|
|
9931
|
+
}
|
|
9932
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9933
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkListBusinessAccountRoles.');
|
|
9934
|
+
}
|
|
9935
|
+
const queryParameters = {};
|
|
9936
|
+
const headerParameters = {};
|
|
9937
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
9938
|
+
const token = this.configuration.accessToken;
|
|
9939
|
+
const tokenString = await token("bearerAuth", []);
|
|
9940
|
+
if (tokenString) {
|
|
9941
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
9942
|
+
}
|
|
9943
|
+
}
|
|
9944
|
+
const response = await this.request({
|
|
9945
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/roles`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
9946
|
+
method: 'GET',
|
|
9947
|
+
headers: headerParameters,
|
|
9948
|
+
query: queryParameters,
|
|
9949
|
+
}, initOverrides);
|
|
9950
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountRolesResponse.BusinessAccountRolesResponseFromJSON(jsonValue));
|
|
9951
|
+
}
|
|
9952
|
+
/**
|
|
9953
|
+
* 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.
|
|
9954
|
+
* SDK — list the customer-defined roles for a business account
|
|
9955
|
+
*/
|
|
9956
|
+
async sdkListBusinessAccountRoles(requestParameters, initOverrides) {
|
|
9957
|
+
const response = await this.sdkListBusinessAccountRolesRaw(requestParameters, initOverrides);
|
|
9958
|
+
return await response.value();
|
|
9959
|
+
}
|
|
9350
9960
|
/**
|
|
9351
9961
|
* SDK — list business accounts the caller is a member of
|
|
9352
9962
|
*/
|
|
@@ -9397,6 +10007,7 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
9397
10007
|
}
|
|
9398
10008
|
const queryParameters = {};
|
|
9399
10009
|
const headerParameters = {};
|
|
10010
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
9400
10011
|
if (this.configuration && this.configuration.accessToken) {
|
|
9401
10012
|
const token = this.configuration.accessToken;
|
|
9402
10013
|
const tokenString = await token("bearerAuth", []);
|
|
@@ -9409,6 +10020,7 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
9409
10020
|
method: 'DELETE',
|
|
9410
10021
|
headers: headerParameters,
|
|
9411
10022
|
query: queryParameters,
|
|
10023
|
+
body: RemoveBusinessAccountMemberSdkRequest.RemoveBusinessAccountMemberSdkRequestToJSON(requestParameters.removeBusinessAccountMemberSdkRequest),
|
|
9412
10024
|
}, initOverrides);
|
|
9413
10025
|
return new runtime.JSONApiResponse(response, (jsonValue) => InlineResponse2008.InlineResponse2008FromJSON(jsonValue));
|
|
9414
10026
|
}
|
|
@@ -9421,7 +10033,7 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
9421
10033
|
return await response.value();
|
|
9422
10034
|
}
|
|
9423
10035
|
/**
|
|
9424
|
-
* 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
|
|
10036
|
+
* 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.
|
|
9425
10037
|
* SDK — remove a signer from a wallet in a business account
|
|
9426
10038
|
*/
|
|
9427
10039
|
async sdkRemoveBusinessAccountSignerRaw(requestParameters, initOverrides) {
|
|
@@ -9439,6 +10051,7 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
9439
10051
|
}
|
|
9440
10052
|
const queryParameters = {};
|
|
9441
10053
|
const headerParameters = {};
|
|
10054
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
9442
10055
|
if (this.configuration && this.configuration.accessToken) {
|
|
9443
10056
|
const token = this.configuration.accessToken;
|
|
9444
10057
|
const tokenString = await token("bearerAuth", []);
|
|
@@ -9451,11 +10064,12 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
9451
10064
|
method: 'DELETE',
|
|
9452
10065
|
headers: headerParameters,
|
|
9453
10066
|
query: queryParameters,
|
|
10067
|
+
body: RemoveBusinessAccountSignerSdkRequest.RemoveBusinessAccountSignerSdkRequestToJSON(requestParameters.removeBusinessAccountSignerSdkRequest),
|
|
9454
10068
|
}, initOverrides);
|
|
9455
10069
|
return new runtime.JSONApiResponse(response, (jsonValue) => InlineResponse2009.InlineResponse2009FromJSON(jsonValue));
|
|
9456
10070
|
}
|
|
9457
10071
|
/**
|
|
9458
|
-
* 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
|
|
10072
|
+
* 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.
|
|
9459
10073
|
* SDK — remove a signer from a wallet in a business account
|
|
9460
10074
|
*/
|
|
9461
10075
|
async sdkRemoveBusinessAccountSigner(requestParameters, initOverrides) {
|
|
@@ -9478,6 +10092,7 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
9478
10092
|
}
|
|
9479
10093
|
const queryParameters = {};
|
|
9480
10094
|
const headerParameters = {};
|
|
10095
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
9481
10096
|
if (this.configuration && this.configuration.accessToken) {
|
|
9482
10097
|
const token = this.configuration.accessToken;
|
|
9483
10098
|
const tokenString = await token("bearerAuth", []);
|
|
@@ -9490,6 +10105,7 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
9490
10105
|
method: 'DELETE',
|
|
9491
10106
|
headers: headerParameters,
|
|
9492
10107
|
query: queryParameters,
|
|
10108
|
+
body: RemoveBusinessAccountWalletSdkRequest.RemoveBusinessAccountWalletSdkRequestToJSON(requestParameters.removeBusinessAccountWalletSdkRequest),
|
|
9493
10109
|
}, initOverrides);
|
|
9494
10110
|
return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountDetail.BusinessAccountDetailFromJSON(jsonValue));
|
|
9495
10111
|
}
|
|
@@ -9501,6 +10117,47 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
9501
10117
|
const response = await this.sdkRemoveBusinessAccountWalletRaw(requestParameters, initOverrides);
|
|
9502
10118
|
return await response.value();
|
|
9503
10119
|
}
|
|
10120
|
+
/**
|
|
10121
|
+
* 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.
|
|
10122
|
+
* SDK — replace the approval requirements for a business account
|
|
10123
|
+
*/
|
|
10124
|
+
async sdkSetBusinessAccountGovernanceRaw(requestParameters, initOverrides) {
|
|
10125
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
10126
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkSetBusinessAccountGovernance.');
|
|
10127
|
+
}
|
|
10128
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
10129
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkSetBusinessAccountGovernance.');
|
|
10130
|
+
}
|
|
10131
|
+
if (requestParameters.setBusinessAccountGovernanceSdkRequest === null || requestParameters.setBusinessAccountGovernanceSdkRequest === undefined) {
|
|
10132
|
+
throw new runtime.RequiredError('setBusinessAccountGovernanceSdkRequest', 'Required parameter requestParameters.setBusinessAccountGovernanceSdkRequest was null or undefined when calling sdkSetBusinessAccountGovernance.');
|
|
10133
|
+
}
|
|
10134
|
+
const queryParameters = {};
|
|
10135
|
+
const headerParameters = {};
|
|
10136
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
10137
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
10138
|
+
const token = this.configuration.accessToken;
|
|
10139
|
+
const tokenString = await token("bearerAuth", []);
|
|
10140
|
+
if (tokenString) {
|
|
10141
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
10142
|
+
}
|
|
10143
|
+
}
|
|
10144
|
+
const response = await this.request({
|
|
10145
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/governance`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
10146
|
+
method: 'PUT',
|
|
10147
|
+
headers: headerParameters,
|
|
10148
|
+
query: queryParameters,
|
|
10149
|
+
body: SetBusinessAccountGovernanceSdkRequest.SetBusinessAccountGovernanceSdkRequestToJSON(requestParameters.setBusinessAccountGovernanceSdkRequest),
|
|
10150
|
+
}, initOverrides);
|
|
10151
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountMutationVersion.BusinessAccountMutationVersionFromJSON(jsonValue));
|
|
10152
|
+
}
|
|
10153
|
+
/**
|
|
10154
|
+
* 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.
|
|
10155
|
+
* SDK — replace the approval requirements for a business account
|
|
10156
|
+
*/
|
|
10157
|
+
async sdkSetBusinessAccountGovernance(requestParameters, initOverrides) {
|
|
10158
|
+
const response = await this.sdkSetBusinessAccountGovernanceRaw(requestParameters, initOverrides);
|
|
10159
|
+
return await response.value();
|
|
10160
|
+
}
|
|
9504
10161
|
/**
|
|
9505
10162
|
*/
|
|
9506
10163
|
async sdkSettingsOptionsRaw(requestParameters, initOverrides) {
|
|
@@ -9646,6 +10303,84 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
9646
10303
|
const response = await this.sdkUpdateBusinessAccountMemberRoleRaw(requestParameters, initOverrides);
|
|
9647
10304
|
return await response.value();
|
|
9648
10305
|
}
|
|
10306
|
+
/**
|
|
10307
|
+
* 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.
|
|
10308
|
+
* SDK — kill a proposal
|
|
10309
|
+
*/
|
|
10310
|
+
async sdkVetoBusinessAccountProposalRaw(requestParameters, initOverrides) {
|
|
10311
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
10312
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkVetoBusinessAccountProposal.');
|
|
10313
|
+
}
|
|
10314
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
10315
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkVetoBusinessAccountProposal.');
|
|
10316
|
+
}
|
|
10317
|
+
if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
|
|
10318
|
+
throw new runtime.RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkVetoBusinessAccountProposal.');
|
|
10319
|
+
}
|
|
10320
|
+
const queryParameters = {};
|
|
10321
|
+
const headerParameters = {};
|
|
10322
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
10323
|
+
const token = this.configuration.accessToken;
|
|
10324
|
+
const tokenString = await token("bearerAuth", []);
|
|
10325
|
+
if (tokenString) {
|
|
10326
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
10327
|
+
}
|
|
10328
|
+
}
|
|
10329
|
+
const response = await this.request({
|
|
10330
|
+
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))),
|
|
10331
|
+
method: 'POST',
|
|
10332
|
+
headers: headerParameters,
|
|
10333
|
+
query: queryParameters,
|
|
10334
|
+
}, initOverrides);
|
|
10335
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountProposal.BusinessAccountProposalFromJSON(jsonValue));
|
|
10336
|
+
}
|
|
10337
|
+
/**
|
|
10338
|
+
* 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.
|
|
10339
|
+
* SDK — kill a proposal
|
|
10340
|
+
*/
|
|
10341
|
+
async sdkVetoBusinessAccountProposal(requestParameters, initOverrides) {
|
|
10342
|
+
const response = await this.sdkVetoBusinessAccountProposalRaw(requestParameters, initOverrides);
|
|
10343
|
+
return await response.value();
|
|
10344
|
+
}
|
|
10345
|
+
/**
|
|
10346
|
+
* 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.
|
|
10347
|
+
* SDK — withdraw the caller\'s approval
|
|
10348
|
+
*/
|
|
10349
|
+
async sdkWithdrawBusinessAccountProposalApprovalRaw(requestParameters, initOverrides) {
|
|
10350
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
10351
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkWithdrawBusinessAccountProposalApproval.');
|
|
10352
|
+
}
|
|
10353
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
10354
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkWithdrawBusinessAccountProposalApproval.');
|
|
10355
|
+
}
|
|
10356
|
+
if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
|
|
10357
|
+
throw new runtime.RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkWithdrawBusinessAccountProposalApproval.');
|
|
10358
|
+
}
|
|
10359
|
+
const queryParameters = {};
|
|
10360
|
+
const headerParameters = {};
|
|
10361
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
10362
|
+
const token = this.configuration.accessToken;
|
|
10363
|
+
const tokenString = await token("bearerAuth", []);
|
|
10364
|
+
if (tokenString) {
|
|
10365
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
10366
|
+
}
|
|
10367
|
+
}
|
|
10368
|
+
const response = await this.request({
|
|
10369
|
+
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))),
|
|
10370
|
+
method: 'DELETE',
|
|
10371
|
+
headers: headerParameters,
|
|
10372
|
+
query: queryParameters,
|
|
10373
|
+
}, initOverrides);
|
|
10374
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountProposal.BusinessAccountProposalFromJSON(jsonValue));
|
|
10375
|
+
}
|
|
10376
|
+
/**
|
|
10377
|
+
* 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.
|
|
10378
|
+
* SDK — withdraw the caller\'s approval
|
|
10379
|
+
*/
|
|
10380
|
+
async sdkWithdrawBusinessAccountProposalApproval(requestParameters, initOverrides) {
|
|
10381
|
+
const response = await this.sdkWithdrawBusinessAccountProposalApprovalRaw(requestParameters, initOverrides);
|
|
10382
|
+
return await response.value();
|
|
10383
|
+
}
|
|
9649
10384
|
/**
|
|
9650
10385
|
* 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.
|
|
9651
10386
|
* Update primary wallet selection
|