@dynamic-labs/sdk-api-core 0.32.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.
Files changed (150) hide show
  1. package/package.json +1 -1
  2. package/src/apis/SDKApi.cjs +739 -4
  3. package/src/apis/SDKApi.cjs.map +1 -1
  4. package/src/apis/SDKApi.d.ts +298 -5
  5. package/src/apis/SDKApi.js +739 -4
  6. package/src/apis/SDKApi.js.map +1 -1
  7. package/src/apis/WaasApi.cjs +6 -0
  8. package/src/apis/WaasApi.cjs.map +1 -1
  9. package/src/apis/WaasApi.js +6 -0
  10. package/src/apis/WaasApi.js.map +1 -1
  11. package/src/index.cjs +116 -0
  12. package/src/index.cjs.map +1 -1
  13. package/src/index.js +23 -0
  14. package/src/index.js.map +1 -1
  15. package/src/models/AddBusinessAccountMemberSdkRequest.cjs +6 -0
  16. package/src/models/AddBusinessAccountMemberSdkRequest.cjs.map +1 -1
  17. package/src/models/AddBusinessAccountMemberSdkRequest.d.ts +21 -0
  18. package/src/models/AddBusinessAccountMemberSdkRequest.js +6 -0
  19. package/src/models/AddBusinessAccountMemberSdkRequest.js.map +1 -1
  20. package/src/models/ApproveBusinessAccountProposalSdkRequest.cjs +45 -0
  21. package/src/models/ApproveBusinessAccountProposalSdkRequest.cjs.map +1 -0
  22. package/src/models/ApproveBusinessAccountProposalSdkRequest.d.ts +33 -0
  23. package/src/models/ApproveBusinessAccountProposalSdkRequest.js +39 -0
  24. package/src/models/ApproveBusinessAccountProposalSdkRequest.js.map +1 -0
  25. package/src/models/BusinessAccountApprovalRequirement.cjs +60 -0
  26. package/src/models/BusinessAccountApprovalRequirement.cjs.map +1 -0
  27. package/src/models/BusinessAccountApprovalRequirement.d.ts +89 -0
  28. package/src/models/BusinessAccountApprovalRequirement.js +54 -0
  29. package/src/models/BusinessAccountApprovalRequirement.js.map +1 -0
  30. package/src/models/BusinessAccountApprovalRequirementStatus.cjs +43 -0
  31. package/src/models/BusinessAccountApprovalRequirementStatus.cjs.map +1 -0
  32. package/src/models/BusinessAccountApprovalRequirementStatus.d.ts +58 -0
  33. package/src/models/BusinessAccountApprovalRequirementStatus.js +37 -0
  34. package/src/models/BusinessAccountApprovalRequirementStatus.js.map +1 -0
  35. package/src/models/BusinessAccountApprovalsPending.cjs +51 -0
  36. package/src/models/BusinessAccountApprovalsPending.cjs.map +1 -0
  37. package/src/models/BusinessAccountApprovalsPending.d.ts +64 -0
  38. package/src/models/BusinessAccountApprovalsPending.js +45 -0
  39. package/src/models/BusinessAccountApprovalsPending.js.map +1 -0
  40. package/src/models/BusinessAccountForbidden.cjs +36 -0
  41. package/src/models/BusinessAccountForbidden.cjs.map +1 -0
  42. package/src/models/BusinessAccountForbidden.d.ts +34 -0
  43. package/src/models/BusinessAccountForbidden.js +30 -0
  44. package/src/models/BusinessAccountForbidden.js.map +1 -0
  45. package/src/models/BusinessAccountForbiddenAllOf.cjs +34 -0
  46. package/src/models/BusinessAccountForbiddenAllOf.cjs.map +1 -0
  47. package/src/models/BusinessAccountForbiddenAllOf.d.ts +28 -0
  48. package/src/models/BusinessAccountForbiddenAllOf.js +28 -0
  49. package/src/models/BusinessAccountForbiddenAllOf.js.map +1 -0
  50. package/src/models/BusinessAccountGovernanceResponse.cjs +43 -0
  51. package/src/models/BusinessAccountGovernanceResponse.cjs.map +1 -0
  52. package/src/models/BusinessAccountGovernanceResponse.d.ts +30 -0
  53. package/src/models/BusinessAccountGovernanceResponse.js +37 -0
  54. package/src/models/BusinessAccountGovernanceResponse.js.map +1 -0
  55. package/src/models/BusinessAccountGovernedAction.cjs +50 -0
  56. package/src/models/BusinessAccountGovernedAction.cjs.map +1 -0
  57. package/src/models/BusinessAccountGovernedAction.d.ts +33 -0
  58. package/src/models/BusinessAccountGovernedAction.js +44 -0
  59. package/src/models/BusinessAccountGovernedAction.js.map +1 -0
  60. package/src/models/BusinessAccountMutationVersion.cjs +43 -0
  61. package/src/models/BusinessAccountMutationVersion.cjs.map +1 -0
  62. package/src/models/BusinessAccountMutationVersion.d.ts +27 -0
  63. package/src/models/BusinessAccountMutationVersion.js +37 -0
  64. package/src/models/BusinessAccountMutationVersion.js.map +1 -0
  65. package/src/models/BusinessAccountProposal.cjs +62 -0
  66. package/src/models/BusinessAccountProposal.cjs.map +1 -0
  67. package/src/models/BusinessAccountProposal.d.ts +108 -0
  68. package/src/models/BusinessAccountProposal.js +56 -0
  69. package/src/models/BusinessAccountProposal.js.map +1 -0
  70. package/src/models/BusinessAccountProposalApprovalRecord.cjs +37 -0
  71. package/src/models/BusinessAccountProposalApprovalRecord.cjs.map +1 -0
  72. package/src/models/BusinessAccountProposalApprovalRecord.d.ts +39 -0
  73. package/src/models/BusinessAccountProposalApprovalRecord.js +31 -0
  74. package/src/models/BusinessAccountProposalApprovalRecord.js.map +1 -0
  75. package/src/models/BusinessAccountProposalStatus.cjs +42 -0
  76. package/src/models/BusinessAccountProposalStatus.cjs.map +1 -0
  77. package/src/models/BusinessAccountProposalStatus.d.ts +25 -0
  78. package/src/models/BusinessAccountProposalStatus.js +36 -0
  79. package/src/models/BusinessAccountProposalStatus.js.map +1 -0
  80. package/src/models/BusinessAccountProposalSubject.cjs +35 -0
  81. package/src/models/BusinessAccountProposalSubject.cjs.map +1 -0
  82. package/src/models/BusinessAccountProposalSubject.d.ts +33 -0
  83. package/src/models/BusinessAccountProposalSubject.js +29 -0
  84. package/src/models/BusinessAccountProposalSubject.js.map +1 -0
  85. package/src/models/BusinessAccountRequirementCondition.cjs +43 -0
  86. package/src/models/BusinessAccountRequirementCondition.cjs.map +1 -0
  87. package/src/models/BusinessAccountRequirementCondition.d.ts +57 -0
  88. package/src/models/BusinessAccountRequirementCondition.js +37 -0
  89. package/src/models/BusinessAccountRequirementCondition.js.map +1 -0
  90. package/src/models/BusinessAccountRoleDefinition.cjs +52 -0
  91. package/src/models/BusinessAccountRoleDefinition.cjs.map +1 -0
  92. package/src/models/BusinessAccountRoleDefinition.d.ts +35 -0
  93. package/src/models/BusinessAccountRoleDefinition.js +46 -0
  94. package/src/models/BusinessAccountRoleDefinition.js.map +1 -0
  95. package/src/models/BusinessAccountRolesResponse.cjs +34 -0
  96. package/src/models/BusinessAccountRolesResponse.cjs.map +1 -0
  97. package/src/models/BusinessAccountRolesResponse.d.ts +30 -0
  98. package/src/models/BusinessAccountRolesResponse.js +28 -0
  99. package/src/models/BusinessAccountRolesResponse.js.map +1 -0
  100. package/src/models/BusinessAccountSigningRefused.cjs +37 -0
  101. package/src/models/BusinessAccountSigningRefused.cjs.map +1 -0
  102. package/src/models/BusinessAccountSigningRefused.d.ts +39 -0
  103. package/src/models/BusinessAccountSigningRefused.js +31 -0
  104. package/src/models/BusinessAccountSigningRefused.js.map +1 -0
  105. package/src/models/DefineBusinessAccountRoleSdkRequest.cjs +50 -0
  106. package/src/models/DefineBusinessAccountRoleSdkRequest.cjs.map +1 -0
  107. package/src/models/DefineBusinessAccountRoleSdkRequest.d.ts +62 -0
  108. package/src/models/DefineBusinessAccountRoleSdkRequest.js +44 -0
  109. package/src/models/DefineBusinessAccountRoleSdkRequest.js.map +1 -0
  110. package/src/models/DeleteBusinessAccountRoleSdkRequest.cjs +37 -0
  111. package/src/models/DeleteBusinessAccountRoleSdkRequest.cjs.map +1 -0
  112. package/src/models/DeleteBusinessAccountRoleSdkRequest.d.ts +42 -0
  113. package/src/models/DeleteBusinessAccountRoleSdkRequest.js +31 -0
  114. package/src/models/DeleteBusinessAccountRoleSdkRequest.js.map +1 -0
  115. package/src/models/RemoveBusinessAccountMemberSdkRequest.cjs +37 -0
  116. package/src/models/RemoveBusinessAccountMemberSdkRequest.cjs.map +1 -0
  117. package/src/models/RemoveBusinessAccountMemberSdkRequest.d.ts +42 -0
  118. package/src/models/RemoveBusinessAccountMemberSdkRequest.js +31 -0
  119. package/src/models/RemoveBusinessAccountMemberSdkRequest.js.map +1 -0
  120. package/src/models/RemoveBusinessAccountSignerSdkRequest.cjs +37 -0
  121. package/src/models/RemoveBusinessAccountSignerSdkRequest.cjs.map +1 -0
  122. package/src/models/RemoveBusinessAccountSignerSdkRequest.d.ts +42 -0
  123. package/src/models/RemoveBusinessAccountSignerSdkRequest.js +31 -0
  124. package/src/models/RemoveBusinessAccountSignerSdkRequest.js.map +1 -0
  125. package/src/models/RemoveBusinessAccountWalletSdkRequest.cjs +37 -0
  126. package/src/models/RemoveBusinessAccountWalletSdkRequest.cjs.map +1 -0
  127. package/src/models/RemoveBusinessAccountWalletSdkRequest.d.ts +42 -0
  128. package/src/models/RemoveBusinessAccountWalletSdkRequest.js +31 -0
  129. package/src/models/RemoveBusinessAccountWalletSdkRequest.js.map +1 -0
  130. package/src/models/SetBusinessAccountGovernanceSdkRequest.cjs +39 -0
  131. package/src/models/SetBusinessAccountGovernanceSdkRequest.cjs.map +1 -0
  132. package/src/models/SetBusinessAccountGovernanceSdkRequest.d.ts +51 -0
  133. package/src/models/SetBusinessAccountGovernanceSdkRequest.js +33 -0
  134. package/src/models/SetBusinessAccountGovernanceSdkRequest.js.map +1 -0
  135. package/src/models/TokenScope.cjs +8 -0
  136. package/src/models/TokenScope.cjs.map +1 -1
  137. package/src/models/TokenScope.d.ts +8 -0
  138. package/src/models/TokenScope.js +8 -0
  139. package/src/models/TokenScope.js.map +1 -1
  140. package/src/models/TransferBusinessAccountOwnershipSdkRequest.cjs +8 -12
  141. package/src/models/TransferBusinessAccountOwnershipSdkRequest.cjs.map +1 -1
  142. package/src/models/TransferBusinessAccountOwnershipSdkRequest.d.ts +21 -0
  143. package/src/models/TransferBusinessAccountOwnershipSdkRequest.js +8 -12
  144. package/src/models/TransferBusinessAccountOwnershipSdkRequest.js.map +1 -1
  145. package/src/models/UpdateBusinessAccountMemberRoleSdkRequest.cjs +7 -0
  146. package/src/models/UpdateBusinessAccountMemberRoleSdkRequest.cjs.map +1 -1
  147. package/src/models/UpdateBusinessAccountMemberRoleSdkRequest.d.ts +21 -0
  148. package/src/models/UpdateBusinessAccountMemberRoleSdkRequest.js +7 -0
  149. package/src/models/UpdateBusinessAccountMemberRoleSdkRequest.js.map +1 -1
  150. package/src/models/index.d.ts +23 -0
@@ -9,6 +9,7 @@ var AddBusinessAccountSignerSdkRequest = require('../models/AddBusinessAccountSi
9
9
  var AleoCuratedPricesResponse = require('../models/AleoCuratedPricesResponse.cjs');
10
10
  var AleoProverEncryptedRequest = require('../models/AleoProverEncryptedRequest.cjs');
11
11
  var AleoProverPubkeyResponse = require('../models/AleoProverPubkeyResponse.cjs');
12
+ var ApproveBusinessAccountProposalSdkRequest = require('../models/ApproveBusinessAccountProposalSdkRequest.cjs');
12
13
  require('../models/AssignableBusinessAccountMemberRole.cjs');
13
14
  var AttachSourceRequest = require('../models/AttachSourceRequest.cjs');
14
15
  require('../models/AttestationConveyancePreference.cjs');
@@ -42,10 +43,19 @@ require('../models/MfaBackupCodeAcknowledgement.cjs');
42
43
  require('../models/CustomFieldType.cjs');
43
44
  require('../models/KycFieldType.cjs');
44
45
  var BusinessAccount = require('../models/BusinessAccount.cjs');
46
+ require('../models/BusinessAccountApprovalRequirement.cjs');
47
+ require('../models/BusinessAccountApprovalsPending.cjs');
45
48
  var BusinessAccountDetail = require('../models/BusinessAccountDetail.cjs');
46
49
  var BusinessAccountMember = require('../models/BusinessAccountMember.cjs');
47
50
  require('../models/ChainEnum.cjs');
51
+ var BusinessAccountGovernanceResponse = require('../models/BusinessAccountGovernanceResponse.cjs');
52
+ require('../models/BusinessAccountGovernedAction.cjs');
48
53
  var BusinessAccountList = require('../models/BusinessAccountList.cjs');
54
+ var BusinessAccountMutationVersion = require('../models/BusinessAccountMutationVersion.cjs');
55
+ var BusinessAccountProposal = require('../models/BusinessAccountProposal.cjs');
56
+ require('../models/BusinessAccountProposalStatus.cjs');
57
+ require('../models/BusinessAccountRoleDefinition.cjs');
58
+ var BusinessAccountRolesResponse = require('../models/BusinessAccountRolesResponse.cjs');
49
59
  require('../models/CaptchaProviderEnum.cjs');
50
60
  require('../models/DestinationTypeEnum.cjs');
51
61
  require('../models/CheckoutModeEnum.cjs');
@@ -81,9 +91,11 @@ var CryptoDotComPaymentCreateRequest = require('../models/CryptoDotComPaymentCre
81
91
  var CryptoDotComPaymentResponse = require('../models/CryptoDotComPaymentResponse.cjs');
82
92
  var Currency = require('../models/Currency.cjs');
83
93
  require('../models/CurrencyType.cjs');
94
+ var DefineBusinessAccountRoleSdkRequest = require('../models/DefineBusinessAccountRoleSdkRequest.cjs');
84
95
  require('../models/DelegatedAccessEncryptionPublicKey.cjs');
85
96
  var DelegatedShareDeliveryRequest = require('../models/DelegatedShareDeliveryRequest.cjs');
86
97
  var DelegatedShareDeliveryResponse = require('../models/DelegatedShareDeliveryResponse.cjs');
98
+ var DeleteBusinessAccountRoleSdkRequest = require('../models/DeleteBusinessAccountRoleSdkRequest.cjs');
87
99
  var DeleteDeviceRegistrationResponse = require('../models/DeleteDeviceRegistrationResponse.cjs');
88
100
  var DeleteEmbeddedWalletsRequest = require('../models/DeleteEmbeddedWalletsRequest.cjs');
89
101
  var DeleteUserPasskeyRequest = require('../models/DeleteUserPasskeyRequest.cjs');
@@ -222,6 +234,9 @@ var RefreshKeySharesRequest = require('../models/RefreshKeySharesRequest.cjs');
222
234
  var RefreshKeySharesResponse = require('../models/RefreshKeySharesResponse.cjs');
223
235
  var RegisterEmbeddedWalletSessionKeyResponse = require('../models/RegisterEmbeddedWalletSessionKeyResponse.cjs');
224
236
  var RegisterSessionKeyRequest = require('../models/RegisterSessionKeyRequest.cjs');
237
+ var RemoveBusinessAccountMemberSdkRequest = require('../models/RemoveBusinessAccountMemberSdkRequest.cjs');
238
+ var RemoveBusinessAccountSignerSdkRequest = require('../models/RemoveBusinessAccountSignerSdkRequest.cjs');
239
+ var RemoveBusinessAccountWalletSdkRequest = require('../models/RemoveBusinessAccountWalletSdkRequest.cjs');
225
240
  require('../models/ReshareKind.cjs');
226
241
  var ReshareRequest = require('../models/ReshareRequest.cjs');
227
242
  require('../models/RoomTypeEnum.cjs');
@@ -233,6 +248,7 @@ require('../models/ScreeningActionEnum.cjs');
233
248
  require('../models/ScreeningPolicyScopeEnum.cjs');
234
249
  require('../models/SdkEnvironmentIdWaasWalletIdAdditionalAddressesAdditionalAddresses.cjs');
235
250
  var SdkSettingsRequest = require('../models/SdkSettingsRequest.cjs');
251
+ var SetBusinessAccountGovernanceSdkRequest = require('../models/SetBusinessAccountGovernanceSdkRequest.cjs');
236
252
  var SignAleoRequestWithWaasRequest = require('../models/SignAleoRequestWithWaasRequest.cjs');
237
253
  require('../models/SignMessageRawSign.cjs');
238
254
  var SignMessageWithWaasRequest = require('../models/SignMessageWithWaasRequest.cjs');
@@ -8753,7 +8769,7 @@ class SDKApi extends runtime.BaseAPI {
8753
8769
  await this.screenTransactionOptionsRaw(requestParameters, initOverrides);
8754
8770
  }
8755
8771
  /**
8756
- * Caller must be an owner or admin of the business account. Target user is resolved by `userId` OR `identifier + type` (email/externalUserId create-or-resolve; id direct lookup). Idempotent: if the target is already an active member the existing row is returned with 200.
8772
+ * 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.
8757
8773
  * SDK — add a member to a business account
8758
8774
  */
8759
8775
  async sdkAddBusinessAccountMemberRaw(requestParameters, initOverrides) {
@@ -8786,7 +8802,7 @@ class SDKApi extends runtime.BaseAPI {
8786
8802
  return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountMember.BusinessAccountMemberFromJSON(jsonValue));
8787
8803
  }
8788
8804
  /**
8789
- * Caller must be an owner or admin of the business account. Target user is resolved by `userId` OR `identifier + type` (email/externalUserId create-or-resolve; id direct lookup). Idempotent: if the target is already an active member the existing row is returned with 200.
8805
+ * 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.
8790
8806
  * SDK — add a member to a business account
8791
8807
  */
8792
8808
  async sdkAddBusinessAccountMember(requestParameters, initOverrides) {
@@ -8837,6 +8853,50 @@ class SDKApi extends runtime.BaseAPI {
8837
8853
  const response = await this.sdkAddBusinessAccountSignerRaw(requestParameters, initOverrides);
8838
8854
  return await response.value();
8839
8855
  }
8856
+ /**
8857
+ * 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.
8858
+ * SDK — approve a proposal
8859
+ */
8860
+ async sdkApproveBusinessAccountProposalRaw(requestParameters, initOverrides) {
8861
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
8862
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkApproveBusinessAccountProposal.');
8863
+ }
8864
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
8865
+ throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkApproveBusinessAccountProposal.');
8866
+ }
8867
+ if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
8868
+ throw new runtime.RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkApproveBusinessAccountProposal.');
8869
+ }
8870
+ if (requestParameters.approveBusinessAccountProposalSdkRequest === null || requestParameters.approveBusinessAccountProposalSdkRequest === undefined) {
8871
+ throw new runtime.RequiredError('approveBusinessAccountProposalSdkRequest', 'Required parameter requestParameters.approveBusinessAccountProposalSdkRequest was null or undefined when calling sdkApproveBusinessAccountProposal.');
8872
+ }
8873
+ const queryParameters = {};
8874
+ const headerParameters = {};
8875
+ headerParameters['Content-Type'] = 'application/json';
8876
+ if (this.configuration && this.configuration.accessToken) {
8877
+ const token = this.configuration.accessToken;
8878
+ const tokenString = await token("bearerAuth", []);
8879
+ if (tokenString) {
8880
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
8881
+ }
8882
+ }
8883
+ const response = await this.request({
8884
+ 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))),
8885
+ method: 'POST',
8886
+ headers: headerParameters,
8887
+ query: queryParameters,
8888
+ body: ApproveBusinessAccountProposalSdkRequest.ApproveBusinessAccountProposalSdkRequestToJSON(requestParameters.approveBusinessAccountProposalSdkRequest),
8889
+ }, initOverrides);
8890
+ return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountProposal.BusinessAccountProposalFromJSON(jsonValue));
8891
+ }
8892
+ /**
8893
+ * 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.
8894
+ * SDK — approve a proposal
8895
+ */
8896
+ async sdkApproveBusinessAccountProposal(requestParameters, initOverrides) {
8897
+ const response = await this.sdkApproveBusinessAccountProposalRaw(requestParameters, initOverrides);
8898
+ return await response.value();
8899
+ }
8840
8900
  /**
8841
8901
  * Options call for this endpoint
8842
8902
  */
@@ -8863,6 +8923,32 @@ class SDKApi extends runtime.BaseAPI {
8863
8923
  async sdkBusinessAccountByIdOptions(requestParameters, initOverrides) {
8864
8924
  await this.sdkBusinessAccountByIdOptionsRaw(requestParameters, initOverrides);
8865
8925
  }
8926
+ /**
8927
+ * Options call for this endpoint
8928
+ */
8929
+ async sdkBusinessAccountGovernanceOptionsRaw(requestParameters, initOverrides) {
8930
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
8931
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountGovernanceOptions.');
8932
+ }
8933
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
8934
+ throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountGovernanceOptions.');
8935
+ }
8936
+ const queryParameters = {};
8937
+ const headerParameters = {};
8938
+ const response = await this.request({
8939
+ path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/governance`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
8940
+ method: 'OPTIONS',
8941
+ headers: headerParameters,
8942
+ query: queryParameters,
8943
+ }, initOverrides);
8944
+ return new runtime.VoidApiResponse(response);
8945
+ }
8946
+ /**
8947
+ * Options call for this endpoint
8948
+ */
8949
+ async sdkBusinessAccountGovernanceOptions(requestParameters, initOverrides) {
8950
+ await this.sdkBusinessAccountGovernanceOptionsRaw(requestParameters, initOverrides);
8951
+ }
8866
8952
  /**
8867
8953
  * Options call for this endpoint
8868
8954
  */
@@ -8967,6 +9053,226 @@ class SDKApi extends runtime.BaseAPI {
8967
9053
  async sdkBusinessAccountPolicyLayerOptions(requestParameters, initOverrides) {
8968
9054
  await this.sdkBusinessAccountPolicyLayerOptionsRaw(requestParameters, initOverrides);
8969
9055
  }
9056
+ /**
9057
+ * Options call for this endpoint
9058
+ */
9059
+ async sdkBusinessAccountProposalApprovalsOptionsRaw(requestParameters, initOverrides) {
9060
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
9061
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountProposalApprovalsOptions.');
9062
+ }
9063
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
9064
+ throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountProposalApprovalsOptions.');
9065
+ }
9066
+ if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
9067
+ throw new runtime.RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkBusinessAccountProposalApprovalsOptions.');
9068
+ }
9069
+ const queryParameters = {};
9070
+ const headerParameters = {};
9071
+ const response = await this.request({
9072
+ 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))),
9073
+ method: 'OPTIONS',
9074
+ headers: headerParameters,
9075
+ query: queryParameters,
9076
+ }, initOverrides);
9077
+ return new runtime.VoidApiResponse(response);
9078
+ }
9079
+ /**
9080
+ * Options call for this endpoint
9081
+ */
9082
+ async sdkBusinessAccountProposalApprovalsOptions(requestParameters, initOverrides) {
9083
+ await this.sdkBusinessAccountProposalApprovalsOptionsRaw(requestParameters, initOverrides);
9084
+ }
9085
+ /**
9086
+ * Options call for this endpoint
9087
+ */
9088
+ async sdkBusinessAccountProposalExecuteOptionsRaw(requestParameters, initOverrides) {
9089
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
9090
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountProposalExecuteOptions.');
9091
+ }
9092
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
9093
+ throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountProposalExecuteOptions.');
9094
+ }
9095
+ if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
9096
+ throw new runtime.RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkBusinessAccountProposalExecuteOptions.');
9097
+ }
9098
+ const queryParameters = {};
9099
+ const headerParameters = {};
9100
+ const response = await this.request({
9101
+ 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))),
9102
+ method: 'OPTIONS',
9103
+ headers: headerParameters,
9104
+ query: queryParameters,
9105
+ }, initOverrides);
9106
+ return new runtime.VoidApiResponse(response);
9107
+ }
9108
+ /**
9109
+ * Options call for this endpoint
9110
+ */
9111
+ async sdkBusinessAccountProposalExecuteOptions(requestParameters, initOverrides) {
9112
+ await this.sdkBusinessAccountProposalExecuteOptionsRaw(requestParameters, initOverrides);
9113
+ }
9114
+ /**
9115
+ * Options call for this endpoint
9116
+ */
9117
+ async sdkBusinessAccountProposalOptionsRaw(requestParameters, initOverrides) {
9118
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
9119
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountProposalOptions.');
9120
+ }
9121
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
9122
+ throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountProposalOptions.');
9123
+ }
9124
+ if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
9125
+ throw new runtime.RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkBusinessAccountProposalOptions.');
9126
+ }
9127
+ const queryParameters = {};
9128
+ const headerParameters = {};
9129
+ const response = await this.request({
9130
+ 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))),
9131
+ method: 'OPTIONS',
9132
+ headers: headerParameters,
9133
+ query: queryParameters,
9134
+ }, initOverrides);
9135
+ return new runtime.VoidApiResponse(response);
9136
+ }
9137
+ /**
9138
+ * Options call for this endpoint
9139
+ */
9140
+ async sdkBusinessAccountProposalOptions(requestParameters, initOverrides) {
9141
+ await this.sdkBusinessAccountProposalOptionsRaw(requestParameters, initOverrides);
9142
+ }
9143
+ /**
9144
+ * Options call for this endpoint
9145
+ */
9146
+ async sdkBusinessAccountProposalVetoOptionsRaw(requestParameters, initOverrides) {
9147
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
9148
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountProposalVetoOptions.');
9149
+ }
9150
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
9151
+ throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountProposalVetoOptions.');
9152
+ }
9153
+ if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
9154
+ throw new runtime.RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkBusinessAccountProposalVetoOptions.');
9155
+ }
9156
+ const queryParameters = {};
9157
+ const headerParameters = {};
9158
+ const response = await this.request({
9159
+ 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))),
9160
+ method: 'OPTIONS',
9161
+ headers: headerParameters,
9162
+ query: queryParameters,
9163
+ }, initOverrides);
9164
+ return new runtime.VoidApiResponse(response);
9165
+ }
9166
+ /**
9167
+ * Options call for this endpoint
9168
+ */
9169
+ async sdkBusinessAccountProposalVetoOptions(requestParameters, initOverrides) {
9170
+ await this.sdkBusinessAccountProposalVetoOptionsRaw(requestParameters, initOverrides);
9171
+ }
9172
+ /**
9173
+ * Options call for this endpoint
9174
+ */
9175
+ async sdkBusinessAccountProposalsAwaitingApprovalOptionsRaw(requestParameters, initOverrides) {
9176
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
9177
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountProposalsAwaitingApprovalOptions.');
9178
+ }
9179
+ const queryParameters = {};
9180
+ const headerParameters = {};
9181
+ const response = await this.request({
9182
+ path: `/sdk/{environmentId}/businessAccounts/proposals`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
9183
+ method: 'OPTIONS',
9184
+ headers: headerParameters,
9185
+ query: queryParameters,
9186
+ }, initOverrides);
9187
+ return new runtime.VoidApiResponse(response);
9188
+ }
9189
+ /**
9190
+ * Options call for this endpoint
9191
+ */
9192
+ async sdkBusinessAccountProposalsAwaitingApprovalOptions(requestParameters, initOverrides) {
9193
+ await this.sdkBusinessAccountProposalsAwaitingApprovalOptionsRaw(requestParameters, initOverrides);
9194
+ }
9195
+ /**
9196
+ * Options call for this endpoint
9197
+ */
9198
+ async sdkBusinessAccountProposalsOptionsRaw(requestParameters, initOverrides) {
9199
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
9200
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountProposalsOptions.');
9201
+ }
9202
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
9203
+ throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountProposalsOptions.');
9204
+ }
9205
+ const queryParameters = {};
9206
+ const headerParameters = {};
9207
+ const response = await this.request({
9208
+ path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/proposals`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
9209
+ method: 'OPTIONS',
9210
+ headers: headerParameters,
9211
+ query: queryParameters,
9212
+ }, initOverrides);
9213
+ return new runtime.VoidApiResponse(response);
9214
+ }
9215
+ /**
9216
+ * Options call for this endpoint
9217
+ */
9218
+ async sdkBusinessAccountProposalsOptions(requestParameters, initOverrides) {
9219
+ await this.sdkBusinessAccountProposalsOptionsRaw(requestParameters, initOverrides);
9220
+ }
9221
+ /**
9222
+ * Options call for this endpoint
9223
+ */
9224
+ async sdkBusinessAccountRoleOptionsRaw(requestParameters, initOverrides) {
9225
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
9226
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountRoleOptions.');
9227
+ }
9228
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
9229
+ throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountRoleOptions.');
9230
+ }
9231
+ if (requestParameters.role === null || requestParameters.role === undefined) {
9232
+ throw new runtime.RequiredError('role', 'Required parameter requestParameters.role was null or undefined when calling sdkBusinessAccountRoleOptions.');
9233
+ }
9234
+ const queryParameters = {};
9235
+ const headerParameters = {};
9236
+ const response = await this.request({
9237
+ 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))),
9238
+ method: 'OPTIONS',
9239
+ headers: headerParameters,
9240
+ query: queryParameters,
9241
+ }, initOverrides);
9242
+ return new runtime.VoidApiResponse(response);
9243
+ }
9244
+ /**
9245
+ * Options call for this endpoint
9246
+ */
9247
+ async sdkBusinessAccountRoleOptions(requestParameters, initOverrides) {
9248
+ await this.sdkBusinessAccountRoleOptionsRaw(requestParameters, initOverrides);
9249
+ }
9250
+ /**
9251
+ * Options call for this endpoint
9252
+ */
9253
+ async sdkBusinessAccountRolesOptionsRaw(requestParameters, initOverrides) {
9254
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
9255
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountRolesOptions.');
9256
+ }
9257
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
9258
+ throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountRolesOptions.');
9259
+ }
9260
+ const queryParameters = {};
9261
+ const headerParameters = {};
9262
+ const response = await this.request({
9263
+ path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/roles`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
9264
+ method: 'OPTIONS',
9265
+ headers: headerParameters,
9266
+ query: queryParameters,
9267
+ }, initOverrides);
9268
+ return new runtime.VoidApiResponse(response);
9269
+ }
9270
+ /**
9271
+ * Options call for this endpoint
9272
+ */
9273
+ async sdkBusinessAccountRolesOptions(requestParameters, initOverrides) {
9274
+ await this.sdkBusinessAccountRolesOptionsRaw(requestParameters, initOverrides);
9275
+ }
8970
9276
  /**
8971
9277
  * Options call for this endpoint
8972
9278
  */
@@ -9141,6 +9447,127 @@ class SDKApi extends runtime.BaseAPI {
9141
9447
  const response = await this.sdkCreateBusinessAccountRaw(requestParameters, initOverrides);
9142
9448
  return await response.value();
9143
9449
  }
9450
+ /**
9451
+ * 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.
9452
+ * SDK — define a customer role for a business account
9453
+ */
9454
+ async sdkDefineBusinessAccountRoleRaw(requestParameters, initOverrides) {
9455
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
9456
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkDefineBusinessAccountRole.');
9457
+ }
9458
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
9459
+ throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkDefineBusinessAccountRole.');
9460
+ }
9461
+ if (requestParameters.defineBusinessAccountRoleSdkRequest === null || requestParameters.defineBusinessAccountRoleSdkRequest === undefined) {
9462
+ throw new runtime.RequiredError('defineBusinessAccountRoleSdkRequest', 'Required parameter requestParameters.defineBusinessAccountRoleSdkRequest was null or undefined when calling sdkDefineBusinessAccountRole.');
9463
+ }
9464
+ const queryParameters = {};
9465
+ const headerParameters = {};
9466
+ headerParameters['Content-Type'] = 'application/json';
9467
+ if (this.configuration && this.configuration.accessToken) {
9468
+ const token = this.configuration.accessToken;
9469
+ const tokenString = await token("bearerAuth", []);
9470
+ if (tokenString) {
9471
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
9472
+ }
9473
+ }
9474
+ const response = await this.request({
9475
+ path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/roles`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
9476
+ method: 'POST',
9477
+ headers: headerParameters,
9478
+ query: queryParameters,
9479
+ body: DefineBusinessAccountRoleSdkRequest.DefineBusinessAccountRoleSdkRequestToJSON(requestParameters.defineBusinessAccountRoleSdkRequest),
9480
+ }, initOverrides);
9481
+ return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountMutationVersion.BusinessAccountMutationVersionFromJSON(jsonValue));
9482
+ }
9483
+ /**
9484
+ * 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.
9485
+ * SDK — define a customer role for a business account
9486
+ */
9487
+ async sdkDefineBusinessAccountRole(requestParameters, initOverrides) {
9488
+ const response = await this.sdkDefineBusinessAccountRoleRaw(requestParameters, initOverrides);
9489
+ return await response.value();
9490
+ }
9491
+ /**
9492
+ * 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.
9493
+ * SDK — delete a customer role from a business account
9494
+ */
9495
+ async sdkDeleteBusinessAccountRoleRaw(requestParameters, initOverrides) {
9496
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
9497
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkDeleteBusinessAccountRole.');
9498
+ }
9499
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
9500
+ throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkDeleteBusinessAccountRole.');
9501
+ }
9502
+ if (requestParameters.role === null || requestParameters.role === undefined) {
9503
+ throw new runtime.RequiredError('role', 'Required parameter requestParameters.role was null or undefined when calling sdkDeleteBusinessAccountRole.');
9504
+ }
9505
+ const queryParameters = {};
9506
+ const headerParameters = {};
9507
+ headerParameters['Content-Type'] = 'application/json';
9508
+ if (this.configuration && this.configuration.accessToken) {
9509
+ const token = this.configuration.accessToken;
9510
+ const tokenString = await token("bearerAuth", []);
9511
+ if (tokenString) {
9512
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
9513
+ }
9514
+ }
9515
+ const response = await this.request({
9516
+ 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))),
9517
+ method: 'DELETE',
9518
+ headers: headerParameters,
9519
+ query: queryParameters,
9520
+ body: DeleteBusinessAccountRoleSdkRequest.DeleteBusinessAccountRoleSdkRequestToJSON(requestParameters.deleteBusinessAccountRoleSdkRequest),
9521
+ }, initOverrides);
9522
+ return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountMutationVersion.BusinessAccountMutationVersionFromJSON(jsonValue));
9523
+ }
9524
+ /**
9525
+ * 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.
9526
+ * SDK — delete a customer role from a business account
9527
+ */
9528
+ async sdkDeleteBusinessAccountRole(requestParameters, initOverrides) {
9529
+ const response = await this.sdkDeleteBusinessAccountRoleRaw(requestParameters, initOverrides);
9530
+ return await response.value();
9531
+ }
9532
+ /**
9533
+ * 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.
9534
+ * SDK — apply a proposal whose approvals now satisfy it
9535
+ */
9536
+ async sdkExecuteBusinessAccountProposalRaw(requestParameters, initOverrides) {
9537
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
9538
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkExecuteBusinessAccountProposal.');
9539
+ }
9540
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
9541
+ throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkExecuteBusinessAccountProposal.');
9542
+ }
9543
+ if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
9544
+ throw new runtime.RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkExecuteBusinessAccountProposal.');
9545
+ }
9546
+ const queryParameters = {};
9547
+ const headerParameters = {};
9548
+ if (this.configuration && this.configuration.accessToken) {
9549
+ const token = this.configuration.accessToken;
9550
+ const tokenString = await token("bearerAuth", []);
9551
+ if (tokenString) {
9552
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
9553
+ }
9554
+ }
9555
+ const response = await this.request({
9556
+ 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))),
9557
+ method: 'POST',
9558
+ headers: headerParameters,
9559
+ query: queryParameters,
9560
+ }, initOverrides);
9561
+ return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountMutationVersion.BusinessAccountMutationVersionFromJSON(jsonValue));
9562
+ }
9563
+ /**
9564
+ * 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.
9565
+ * SDK — apply a proposal whose approvals now satisfy it
9566
+ */
9567
+ async sdkExecuteBusinessAccountProposal(requestParameters, initOverrides) {
9568
+ const response = await this.sdkExecuteBusinessAccountProposalRaw(requestParameters, initOverrides);
9569
+ return await response.value();
9570
+ }
9144
9571
  /**
9145
9572
  * Returns 404 if the caller is not a member of the business account (404 not 403 so we don\'t leak business-account existence).
9146
9573
  * SDK — get a business account with embedded members and signers
@@ -9177,6 +9604,81 @@ class SDKApi extends runtime.BaseAPI {
9177
9604
  const response = await this.sdkGetBusinessAccountByIdRaw(requestParameters, initOverrides);
9178
9605
  return await response.value();
9179
9606
  }
9607
+ /**
9608
+ * 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.
9609
+ * SDK — read the approval requirements in force
9610
+ */
9611
+ async sdkGetBusinessAccountGovernanceRaw(requestParameters, initOverrides) {
9612
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
9613
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkGetBusinessAccountGovernance.');
9614
+ }
9615
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
9616
+ throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkGetBusinessAccountGovernance.');
9617
+ }
9618
+ const queryParameters = {};
9619
+ const headerParameters = {};
9620
+ if (this.configuration && this.configuration.accessToken) {
9621
+ const token = this.configuration.accessToken;
9622
+ const tokenString = await token("bearerAuth", []);
9623
+ if (tokenString) {
9624
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
9625
+ }
9626
+ }
9627
+ const response = await this.request({
9628
+ path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/governance`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
9629
+ method: 'GET',
9630
+ headers: headerParameters,
9631
+ query: queryParameters,
9632
+ }, initOverrides);
9633
+ return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountGovernanceResponse.BusinessAccountGovernanceResponseFromJSON(jsonValue));
9634
+ }
9635
+ /**
9636
+ * 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.
9637
+ * SDK — read the approval requirements in force
9638
+ */
9639
+ async sdkGetBusinessAccountGovernance(requestParameters, initOverrides) {
9640
+ const response = await this.sdkGetBusinessAccountGovernanceRaw(requestParameters, initOverrides);
9641
+ return await response.value();
9642
+ }
9643
+ /**
9644
+ * 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.
9645
+ * SDK — read one proposal, including the intent to sign
9646
+ */
9647
+ async sdkGetBusinessAccountProposalRaw(requestParameters, initOverrides) {
9648
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
9649
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkGetBusinessAccountProposal.');
9650
+ }
9651
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
9652
+ throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkGetBusinessAccountProposal.');
9653
+ }
9654
+ if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
9655
+ throw new runtime.RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkGetBusinessAccountProposal.');
9656
+ }
9657
+ const queryParameters = {};
9658
+ const headerParameters = {};
9659
+ if (this.configuration && this.configuration.accessToken) {
9660
+ const token = this.configuration.accessToken;
9661
+ const tokenString = await token("bearerAuth", []);
9662
+ if (tokenString) {
9663
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
9664
+ }
9665
+ }
9666
+ const response = await this.request({
9667
+ 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))),
9668
+ method: 'GET',
9669
+ headers: headerParameters,
9670
+ query: queryParameters,
9671
+ }, initOverrides);
9672
+ return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountProposal.BusinessAccountProposalFromJSON(jsonValue));
9673
+ }
9674
+ /**
9675
+ * 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.
9676
+ * SDK — read one proposal, including the intent to sign
9677
+ */
9678
+ async sdkGetBusinessAccountProposal(requestParameters, initOverrides) {
9679
+ const response = await this.sdkGetBusinessAccountProposalRaw(requestParameters, initOverrides);
9680
+ return await response.value();
9681
+ }
9180
9682
  /**
9181
9683
  * 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.
9182
9684
  * SDK — add an existing wallet to a business account
@@ -9215,6 +9717,114 @@ class SDKApi extends runtime.BaseAPI {
9215
9717
  const response = await this.sdkLinkBusinessAccountWalletRaw(requestParameters, initOverrides);
9216
9718
  return await response.value();
9217
9719
  }
9720
+ /**
9721
+ * 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.
9722
+ * SDK — list the governed mutations awaiting approval
9723
+ */
9724
+ async sdkListBusinessAccountProposalsRaw(requestParameters, initOverrides) {
9725
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
9726
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkListBusinessAccountProposals.');
9727
+ }
9728
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
9729
+ throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkListBusinessAccountProposals.');
9730
+ }
9731
+ const queryParameters = {};
9732
+ if (requestParameters.status !== undefined) {
9733
+ queryParameters['status'] = requestParameters.status;
9734
+ }
9735
+ const headerParameters = {};
9736
+ if (this.configuration && this.configuration.accessToken) {
9737
+ const token = this.configuration.accessToken;
9738
+ const tokenString = await token("bearerAuth", []);
9739
+ if (tokenString) {
9740
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
9741
+ }
9742
+ }
9743
+ const response = await this.request({
9744
+ path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/proposals`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
9745
+ method: 'GET',
9746
+ headers: headerParameters,
9747
+ query: queryParameters,
9748
+ }, initOverrides);
9749
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(BusinessAccountProposal.BusinessAccountProposalFromJSON));
9750
+ }
9751
+ /**
9752
+ * 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.
9753
+ * SDK — list the governed mutations awaiting approval
9754
+ */
9755
+ async sdkListBusinessAccountProposals(requestParameters, initOverrides) {
9756
+ const response = await this.sdkListBusinessAccountProposalsRaw(requestParameters, initOverrides);
9757
+ return await response.value();
9758
+ }
9759
+ /**
9760
+ * 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.
9761
+ * SDK — list proposals awaiting the caller\'s approval, across accounts
9762
+ */
9763
+ async sdkListBusinessAccountProposalsAwaitingApprovalRaw(requestParameters, initOverrides) {
9764
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
9765
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkListBusinessAccountProposalsAwaitingApproval.');
9766
+ }
9767
+ const queryParameters = {};
9768
+ const headerParameters = {};
9769
+ if (this.configuration && this.configuration.accessToken) {
9770
+ const token = this.configuration.accessToken;
9771
+ const tokenString = await token("bearerAuth", []);
9772
+ if (tokenString) {
9773
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
9774
+ }
9775
+ }
9776
+ const response = await this.request({
9777
+ path: `/sdk/{environmentId}/businessAccounts/proposals`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
9778
+ method: 'GET',
9779
+ headers: headerParameters,
9780
+ query: queryParameters,
9781
+ }, initOverrides);
9782
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(BusinessAccountProposal.BusinessAccountProposalFromJSON));
9783
+ }
9784
+ /**
9785
+ * 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.
9786
+ * SDK — list proposals awaiting the caller\'s approval, across accounts
9787
+ */
9788
+ async sdkListBusinessAccountProposalsAwaitingApproval(requestParameters, initOverrides) {
9789
+ const response = await this.sdkListBusinessAccountProposalsAwaitingApprovalRaw(requestParameters, initOverrides);
9790
+ return await response.value();
9791
+ }
9792
+ /**
9793
+ * 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.
9794
+ * SDK — list the customer-defined roles for a business account
9795
+ */
9796
+ async sdkListBusinessAccountRolesRaw(requestParameters, initOverrides) {
9797
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
9798
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkListBusinessAccountRoles.');
9799
+ }
9800
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
9801
+ throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkListBusinessAccountRoles.');
9802
+ }
9803
+ const queryParameters = {};
9804
+ const headerParameters = {};
9805
+ if (this.configuration && this.configuration.accessToken) {
9806
+ const token = this.configuration.accessToken;
9807
+ const tokenString = await token("bearerAuth", []);
9808
+ if (tokenString) {
9809
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
9810
+ }
9811
+ }
9812
+ const response = await this.request({
9813
+ path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/roles`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
9814
+ method: 'GET',
9815
+ headers: headerParameters,
9816
+ query: queryParameters,
9817
+ }, initOverrides);
9818
+ return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountRolesResponse.BusinessAccountRolesResponseFromJSON(jsonValue));
9819
+ }
9820
+ /**
9821
+ * 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.
9822
+ * SDK — list the customer-defined roles for a business account
9823
+ */
9824
+ async sdkListBusinessAccountRoles(requestParameters, initOverrides) {
9825
+ const response = await this.sdkListBusinessAccountRolesRaw(requestParameters, initOverrides);
9826
+ return await response.value();
9827
+ }
9218
9828
  /**
9219
9829
  * SDK — list business accounts the caller is a member of
9220
9830
  */
@@ -9265,6 +9875,7 @@ class SDKApi extends runtime.BaseAPI {
9265
9875
  }
9266
9876
  const queryParameters = {};
9267
9877
  const headerParameters = {};
9878
+ headerParameters['Content-Type'] = 'application/json';
9268
9879
  if (this.configuration && this.configuration.accessToken) {
9269
9880
  const token = this.configuration.accessToken;
9270
9881
  const tokenString = await token("bearerAuth", []);
@@ -9277,6 +9888,7 @@ class SDKApi extends runtime.BaseAPI {
9277
9888
  method: 'DELETE',
9278
9889
  headers: headerParameters,
9279
9890
  query: queryParameters,
9891
+ body: RemoveBusinessAccountMemberSdkRequest.RemoveBusinessAccountMemberSdkRequestToJSON(requestParameters.removeBusinessAccountMemberSdkRequest),
9280
9892
  }, initOverrides);
9281
9893
  return new runtime.JSONApiResponse(response, (jsonValue) => InlineResponse2007.InlineResponse2007FromJSON(jsonValue));
9282
9894
  }
@@ -9289,7 +9901,7 @@ class SDKApi extends runtime.BaseAPI {
9289
9901
  return await response.value();
9290
9902
  }
9291
9903
  /**
9292
- * 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). Returns 409 if removing the signer would leave the wallet with zero active signers.
9904
+ * 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.
9293
9905
  * SDK — remove a signer from a wallet in a business account
9294
9906
  */
9295
9907
  async sdkRemoveBusinessAccountSignerRaw(requestParameters, initOverrides) {
@@ -9307,6 +9919,7 @@ class SDKApi extends runtime.BaseAPI {
9307
9919
  }
9308
9920
  const queryParameters = {};
9309
9921
  const headerParameters = {};
9922
+ headerParameters['Content-Type'] = 'application/json';
9310
9923
  if (this.configuration && this.configuration.accessToken) {
9311
9924
  const token = this.configuration.accessToken;
9312
9925
  const tokenString = await token("bearerAuth", []);
@@ -9319,11 +9932,12 @@ class SDKApi extends runtime.BaseAPI {
9319
9932
  method: 'DELETE',
9320
9933
  headers: headerParameters,
9321
9934
  query: queryParameters,
9935
+ body: RemoveBusinessAccountSignerSdkRequest.RemoveBusinessAccountSignerSdkRequestToJSON(requestParameters.removeBusinessAccountSignerSdkRequest),
9322
9936
  }, initOverrides);
9323
9937
  return new runtime.JSONApiResponse(response, (jsonValue) => InlineResponse2008.InlineResponse2008FromJSON(jsonValue));
9324
9938
  }
9325
9939
  /**
9326
- * 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). Returns 409 if removing the signer would leave the wallet with zero active signers.
9940
+ * 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.
9327
9941
  * SDK — remove a signer from a wallet in a business account
9328
9942
  */
9329
9943
  async sdkRemoveBusinessAccountSigner(requestParameters, initOverrides) {
@@ -9346,6 +9960,7 @@ class SDKApi extends runtime.BaseAPI {
9346
9960
  }
9347
9961
  const queryParameters = {};
9348
9962
  const headerParameters = {};
9963
+ headerParameters['Content-Type'] = 'application/json';
9349
9964
  if (this.configuration && this.configuration.accessToken) {
9350
9965
  const token = this.configuration.accessToken;
9351
9966
  const tokenString = await token("bearerAuth", []);
@@ -9358,6 +9973,7 @@ class SDKApi extends runtime.BaseAPI {
9358
9973
  method: 'DELETE',
9359
9974
  headers: headerParameters,
9360
9975
  query: queryParameters,
9976
+ body: RemoveBusinessAccountWalletSdkRequest.RemoveBusinessAccountWalletSdkRequestToJSON(requestParameters.removeBusinessAccountWalletSdkRequest),
9361
9977
  }, initOverrides);
9362
9978
  return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountDetail.BusinessAccountDetailFromJSON(jsonValue));
9363
9979
  }
@@ -9369,6 +9985,47 @@ class SDKApi extends runtime.BaseAPI {
9369
9985
  const response = await this.sdkRemoveBusinessAccountWalletRaw(requestParameters, initOverrides);
9370
9986
  return await response.value();
9371
9987
  }
9988
+ /**
9989
+ * 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.
9990
+ * SDK — replace the approval requirements for a business account
9991
+ */
9992
+ async sdkSetBusinessAccountGovernanceRaw(requestParameters, initOverrides) {
9993
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
9994
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkSetBusinessAccountGovernance.');
9995
+ }
9996
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
9997
+ throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkSetBusinessAccountGovernance.');
9998
+ }
9999
+ if (requestParameters.setBusinessAccountGovernanceSdkRequest === null || requestParameters.setBusinessAccountGovernanceSdkRequest === undefined) {
10000
+ throw new runtime.RequiredError('setBusinessAccountGovernanceSdkRequest', 'Required parameter requestParameters.setBusinessAccountGovernanceSdkRequest was null or undefined when calling sdkSetBusinessAccountGovernance.');
10001
+ }
10002
+ const queryParameters = {};
10003
+ const headerParameters = {};
10004
+ headerParameters['Content-Type'] = 'application/json';
10005
+ if (this.configuration && this.configuration.accessToken) {
10006
+ const token = this.configuration.accessToken;
10007
+ const tokenString = await token("bearerAuth", []);
10008
+ if (tokenString) {
10009
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
10010
+ }
10011
+ }
10012
+ const response = await this.request({
10013
+ path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/governance`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
10014
+ method: 'PUT',
10015
+ headers: headerParameters,
10016
+ query: queryParameters,
10017
+ body: SetBusinessAccountGovernanceSdkRequest.SetBusinessAccountGovernanceSdkRequestToJSON(requestParameters.setBusinessAccountGovernanceSdkRequest),
10018
+ }, initOverrides);
10019
+ return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountMutationVersion.BusinessAccountMutationVersionFromJSON(jsonValue));
10020
+ }
10021
+ /**
10022
+ * 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.
10023
+ * SDK — replace the approval requirements for a business account
10024
+ */
10025
+ async sdkSetBusinessAccountGovernance(requestParameters, initOverrides) {
10026
+ const response = await this.sdkSetBusinessAccountGovernanceRaw(requestParameters, initOverrides);
10027
+ return await response.value();
10028
+ }
9372
10029
  /**
9373
10030
  */
9374
10031
  async sdkSettingsOptionsRaw(requestParameters, initOverrides) {
@@ -9514,6 +10171,84 @@ class SDKApi extends runtime.BaseAPI {
9514
10171
  const response = await this.sdkUpdateBusinessAccountMemberRoleRaw(requestParameters, initOverrides);
9515
10172
  return await response.value();
9516
10173
  }
10174
+ /**
10175
+ * 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.
10176
+ * SDK — kill a proposal
10177
+ */
10178
+ async sdkVetoBusinessAccountProposalRaw(requestParameters, initOverrides) {
10179
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
10180
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkVetoBusinessAccountProposal.');
10181
+ }
10182
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
10183
+ throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkVetoBusinessAccountProposal.');
10184
+ }
10185
+ if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
10186
+ throw new runtime.RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkVetoBusinessAccountProposal.');
10187
+ }
10188
+ const queryParameters = {};
10189
+ const headerParameters = {};
10190
+ if (this.configuration && this.configuration.accessToken) {
10191
+ const token = this.configuration.accessToken;
10192
+ const tokenString = await token("bearerAuth", []);
10193
+ if (tokenString) {
10194
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
10195
+ }
10196
+ }
10197
+ const response = await this.request({
10198
+ 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))),
10199
+ method: 'POST',
10200
+ headers: headerParameters,
10201
+ query: queryParameters,
10202
+ }, initOverrides);
10203
+ return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountProposal.BusinessAccountProposalFromJSON(jsonValue));
10204
+ }
10205
+ /**
10206
+ * 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.
10207
+ * SDK — kill a proposal
10208
+ */
10209
+ async sdkVetoBusinessAccountProposal(requestParameters, initOverrides) {
10210
+ const response = await this.sdkVetoBusinessAccountProposalRaw(requestParameters, initOverrides);
10211
+ return await response.value();
10212
+ }
10213
+ /**
10214
+ * 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.
10215
+ * SDK — withdraw the caller\'s approval
10216
+ */
10217
+ async sdkWithdrawBusinessAccountProposalApprovalRaw(requestParameters, initOverrides) {
10218
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
10219
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkWithdrawBusinessAccountProposalApproval.');
10220
+ }
10221
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
10222
+ throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkWithdrawBusinessAccountProposalApproval.');
10223
+ }
10224
+ if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
10225
+ throw new runtime.RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling sdkWithdrawBusinessAccountProposalApproval.');
10226
+ }
10227
+ const queryParameters = {};
10228
+ const headerParameters = {};
10229
+ if (this.configuration && this.configuration.accessToken) {
10230
+ const token = this.configuration.accessToken;
10231
+ const tokenString = await token("bearerAuth", []);
10232
+ if (tokenString) {
10233
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
10234
+ }
10235
+ }
10236
+ const response = await this.request({
10237
+ 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))),
10238
+ method: 'DELETE',
10239
+ headers: headerParameters,
10240
+ query: queryParameters,
10241
+ }, initOverrides);
10242
+ return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountProposal.BusinessAccountProposalFromJSON(jsonValue));
10243
+ }
10244
+ /**
10245
+ * 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.
10246
+ * SDK — withdraw the caller\'s approval
10247
+ */
10248
+ async sdkWithdrawBusinessAccountProposalApproval(requestParameters, initOverrides) {
10249
+ const response = await this.sdkWithdrawBusinessAccountProposalApprovalRaw(requestParameters, initOverrides);
10250
+ return await response.value();
10251
+ }
9517
10252
  /**
9518
10253
  * 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.
9519
10254
  * Update primary wallet selection