@dynamic-labs/sdk-api 0.177.0 → 0.179.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/ServerApi.cjs +531 -3
- package/src/apis/ServerApi.d.ts +237 -1
- package/src/apis/ServerApi.js +531 -3
- package/src/index.cjs +4 -0
- package/src/index.js +1 -0
- package/src/models/FlowSettlementData.cjs +5 -0
- package/src/models/FlowSettlementData.d.ts +13 -0
- package/src/models/FlowSettlementData.js +5 -0
- package/src/models/FlowSettlementDataInput.cjs +38 -0
- package/src/models/FlowSettlementDataInput.d.ts +40 -0
- package/src/models/FlowSettlementDataInput.js +32 -0
- package/src/models/index.d.ts +1 -0
package/src/apis/ServerApi.cjs
CHANGED
|
@@ -58,23 +58,31 @@ require('../models/UnprocessableEntityErrorCode.cjs');
|
|
|
58
58
|
require('../models/ChainalysisCheckResultEnum.cjs');
|
|
59
59
|
var BusinessAccount = require('../models/BusinessAccount.cjs');
|
|
60
60
|
require('../models/BusinessAccountActionEnum.cjs');
|
|
61
|
-
require('../models/BusinessAccountActivityExport.cjs');
|
|
61
|
+
var BusinessAccountActivityExport = require('../models/BusinessAccountActivityExport.cjs');
|
|
62
|
+
var BusinessAccountActivityExportRequest = require('../models/BusinessAccountActivityExportRequest.cjs');
|
|
63
|
+
var BusinessAccountActivityResponse = require('../models/BusinessAccountActivityResponse.cjs');
|
|
62
64
|
require('../models/BusinessAccountApprovalRequirement.cjs');
|
|
63
65
|
require('../models/BusinessAccountApprovalsPending.cjs');
|
|
64
66
|
var BusinessAccountDetail = require('../models/BusinessAccountDetail.cjs');
|
|
67
|
+
var BusinessAccountGovernanceResponse = require('../models/BusinessAccountGovernanceResponse.cjs');
|
|
65
68
|
require('../models/BusinessAccountGovernedAction.cjs');
|
|
66
69
|
var BusinessAccountList = require('../models/BusinessAccountList.cjs');
|
|
67
70
|
var BusinessAccountMemberCreationResult = require('../models/BusinessAccountMemberCreationResult.cjs');
|
|
68
|
-
require('../models/
|
|
71
|
+
var BusinessAccountMemberInviteListResponse = require('../models/BusinessAccountMemberInviteListResponse.cjs');
|
|
72
|
+
var BusinessAccountMemberInviteReceipt = require('../models/BusinessAccountMemberInviteReceipt.cjs');
|
|
69
73
|
require('../models/BusinessAccountMemberRole.cjs');
|
|
74
|
+
var BusinessAccountMutationVersion = require('../models/BusinessAccountMutationVersion.cjs');
|
|
70
75
|
var BusinessAccountPolicyLayerResponse = require('../models/BusinessAccountPolicyLayerResponse.cjs');
|
|
71
76
|
var BusinessAccountPolicyLayerUpdateRequest = require('../models/BusinessAccountPolicyLayerUpdateRequest.cjs');
|
|
77
|
+
var BusinessAccountProposal = require('../models/BusinessAccountProposal.cjs');
|
|
72
78
|
require('../models/BusinessAccountProposalStatus.cjs');
|
|
73
79
|
require('../models/BusinessAccountRequirementCondition.cjs');
|
|
74
80
|
require('../models/BusinessAccountRoleDefinition.cjs');
|
|
75
81
|
require('../models/BusinessAccountRolesAdminResponse.cjs');
|
|
76
82
|
require('../models/BusinessAccountRolesAdminResponseAllOf.cjs');
|
|
83
|
+
var BusinessAccountRolesResponse = require('../models/BusinessAccountRolesResponse.cjs');
|
|
77
84
|
require('../models/SignMessageApprovalQuorumIntent.cjs');
|
|
85
|
+
var CancelBusinessAccountMemberInviteSdkRequest = require('../models/CancelBusinessAccountMemberInviteSdkRequest.cjs');
|
|
78
86
|
require('../models/CaptchaProviderEnum.cjs');
|
|
79
87
|
require('../models/DestinationTypeEnum.cjs');
|
|
80
88
|
require('../models/ChainalysisExists.cjs');
|
|
@@ -111,11 +119,12 @@ require('../models/CustomHostnameStatusEnum.cjs');
|
|
|
111
119
|
require('../models/CustomHostnameUsageEnum.cjs');
|
|
112
120
|
require('../models/CustomHostnameVerificationType.cjs');
|
|
113
121
|
require('../models/DnsRecordType.cjs');
|
|
114
|
-
require('../models/DefineBusinessAccountRoleSdkRequest.cjs');
|
|
122
|
+
var DefineBusinessAccountRoleSdkRequest = require('../models/DefineBusinessAccountRoleSdkRequest.cjs');
|
|
115
123
|
require('../models/DelegatedAccessEncryptionPublicKey.cjs');
|
|
116
124
|
var DelegatedAccessEncryptionPublicKeyResponse = require('../models/DelegatedAccessEncryptionPublicKeyResponse.cjs');
|
|
117
125
|
var DelegatedShareDeliveryRequest = require('../models/DelegatedShareDeliveryRequest.cjs');
|
|
118
126
|
var DelegatedShareDeliveryResponse = require('../models/DelegatedShareDeliveryResponse.cjs');
|
|
127
|
+
var DeleteBusinessAccountRoleSdkRequest = require('../models/DeleteBusinessAccountRoleSdkRequest.cjs');
|
|
119
128
|
require('../models/DeveloperEncryptionKey.cjs');
|
|
120
129
|
require('../models/TokenScope.cjs');
|
|
121
130
|
require('../models/EmbeddedWalletAuthType.cjs');
|
|
@@ -217,6 +226,7 @@ require('../models/ScreeningPolicyProviderEnum.cjs');
|
|
|
217
226
|
require('../models/ScreeningPolicyScopeEnum.cjs');
|
|
218
227
|
require('../models/ScreeningReason.cjs');
|
|
219
228
|
var ServerIdentityResponse = require('../models/ServerIdentityResponse.cjs');
|
|
229
|
+
var SetBusinessAccountGovernanceSdkRequest = require('../models/SetBusinessAccountGovernanceSdkRequest.cjs');
|
|
220
230
|
require('../models/SignMessageApprovalQuorumIntentLifetime.cjs');
|
|
221
231
|
require('../models/SignMessageApprovalQuorumRawSign.cjs');
|
|
222
232
|
require('../models/SignMessageApprovalQuorumSvmTransactionOperation.cjs');
|
|
@@ -397,6 +407,43 @@ class ServerApi extends runtime.BaseAPI {
|
|
|
397
407
|
const response = await this.buildWaasConfidentialTransactionServerRaw(requestParameters, initOverrides);
|
|
398
408
|
return await response.value();
|
|
399
409
|
}
|
|
410
|
+
/**
|
|
411
|
+
* Cancels an unaccepted member invitation. The caller must be authorized to remove members. When member removal requires approvals, this endpoint returns the same intent and proposal workflow used by other governed business account mutations. Repeating a completed cancellation is safe.
|
|
412
|
+
* Server — cancel a pending business account member invite
|
|
413
|
+
*/
|
|
414
|
+
async cancelBusinessAccountMemberInviteServerRaw(requestParameters, initOverrides) {
|
|
415
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
416
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling cancelBusinessAccountMemberInviteServer.');
|
|
417
|
+
}
|
|
418
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
419
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling cancelBusinessAccountMemberInviteServer.');
|
|
420
|
+
}
|
|
421
|
+
if (requestParameters.inviteId === null || requestParameters.inviteId === undefined) {
|
|
422
|
+
throw new runtime.RequiredError('inviteId', 'Required parameter requestParameters.inviteId was null or undefined when calling cancelBusinessAccountMemberInviteServer.');
|
|
423
|
+
}
|
|
424
|
+
const queryParameters = {};
|
|
425
|
+
const headerParameters = {};
|
|
426
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
427
|
+
if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
|
|
428
|
+
headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
|
|
429
|
+
}
|
|
430
|
+
const response = await this.request({
|
|
431
|
+
path: `/server/{environmentId}/businessAccounts/{businessAccountId}/invites/{inviteId}`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))).replace(`{${"inviteId"}}`, encodeURIComponent(String(requestParameters.inviteId))),
|
|
432
|
+
method: 'DELETE',
|
|
433
|
+
headers: headerParameters,
|
|
434
|
+
query: queryParameters,
|
|
435
|
+
body: CancelBusinessAccountMemberInviteSdkRequest.CancelBusinessAccountMemberInviteSdkRequestToJSON(requestParameters.cancelBusinessAccountMemberInviteSdkRequest),
|
|
436
|
+
}, initOverrides);
|
|
437
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountMemberInviteReceipt.BusinessAccountMemberInviteReceiptFromJSON(jsonValue));
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Cancels an unaccepted member invitation. The caller must be authorized to remove members. When member removal requires approvals, this endpoint returns the same intent and proposal workflow used by other governed business account mutations. Repeating a completed cancellation is safe.
|
|
441
|
+
* Server — cancel a pending business account member invite
|
|
442
|
+
*/
|
|
443
|
+
async cancelBusinessAccountMemberInviteServer(requestParameters, initOverrides) {
|
|
444
|
+
const response = await this.cancelBusinessAccountMemberInviteServerRaw(requestParameters, initOverrides);
|
|
445
|
+
return await response.value();
|
|
446
|
+
}
|
|
400
447
|
/**
|
|
401
448
|
* Cancels a flow that is still initiated, meaning no source has been attached yet. Returns 400 if flowId is not a valid UUID and 409 flow_invalid_transition if the flow is in any other state. Requires an environment API token with the flow.write scope.
|
|
402
449
|
* Cancel a flow
|
|
@@ -426,6 +473,40 @@ class ServerApi extends runtime.BaseAPI {
|
|
|
426
473
|
const response = await this.cancelFlowServerRaw(requestParameters, initOverrides);
|
|
427
474
|
return await response.value();
|
|
428
475
|
}
|
|
476
|
+
/**
|
|
477
|
+
* Queues a CSV export of the account\'s activity, optionally filtered by date range and action type. Poll the returned export\'s status, then download it via the download endpoint or its `downloadUrl`. Caller must be an owner or admin member.
|
|
478
|
+
* Server — create a CSV export of the business account\'s audit trail
|
|
479
|
+
*/
|
|
480
|
+
async createBusinessAccountActivityExportServerRaw(requestParameters, initOverrides) {
|
|
481
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
482
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling createBusinessAccountActivityExportServer.');
|
|
483
|
+
}
|
|
484
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
485
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling createBusinessAccountActivityExportServer.');
|
|
486
|
+
}
|
|
487
|
+
const queryParameters = {};
|
|
488
|
+
const headerParameters = {};
|
|
489
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
490
|
+
if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
|
|
491
|
+
headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
|
|
492
|
+
}
|
|
493
|
+
const response = await this.request({
|
|
494
|
+
path: `/server/{environmentId}/businessAccounts/{businessAccountId}/activity/exports`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
495
|
+
method: 'POST',
|
|
496
|
+
headers: headerParameters,
|
|
497
|
+
query: queryParameters,
|
|
498
|
+
body: BusinessAccountActivityExportRequest.BusinessAccountActivityExportRequestToJSON(requestParameters.businessAccountActivityExportRequest),
|
|
499
|
+
}, initOverrides);
|
|
500
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountActivityExport.BusinessAccountActivityExportFromJSON(jsonValue));
|
|
501
|
+
}
|
|
502
|
+
/**
|
|
503
|
+
* Queues a CSV export of the account\'s activity, optionally filtered by date range and action type. Poll the returned export\'s status, then download it via the download endpoint or its `downloadUrl`. Caller must be an owner or admin member.
|
|
504
|
+
* Server — create a CSV export of the business account\'s audit trail
|
|
505
|
+
*/
|
|
506
|
+
async createBusinessAccountActivityExportServer(requestParameters, initOverrides) {
|
|
507
|
+
const response = await this.createBusinessAccountActivityExportServerRaw(requestParameters, initOverrides);
|
|
508
|
+
return await response.value();
|
|
509
|
+
}
|
|
429
510
|
/**
|
|
430
511
|
* Create a business account from the server SDK. The authenticated service user becomes the first `owner` member. Gated by the `enable-business-accounts` feature flag.
|
|
431
512
|
* Server — create a business account
|
|
@@ -667,6 +748,80 @@ class ServerApi extends runtime.BaseAPI {
|
|
|
667
748
|
const response = await this.createWaasConfidentialSeedServerRaw(requestParameters, initOverrides);
|
|
668
749
|
return await response.value();
|
|
669
750
|
}
|
|
751
|
+
/**
|
|
752
|
+
* 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.
|
|
753
|
+
* Server — define a customer role for a business account
|
|
754
|
+
*/
|
|
755
|
+
async defineBusinessAccountRoleServerRaw(requestParameters, initOverrides) {
|
|
756
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
757
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling defineBusinessAccountRoleServer.');
|
|
758
|
+
}
|
|
759
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
760
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling defineBusinessAccountRoleServer.');
|
|
761
|
+
}
|
|
762
|
+
if (requestParameters.defineBusinessAccountRoleSdkRequest === null || requestParameters.defineBusinessAccountRoleSdkRequest === undefined) {
|
|
763
|
+
throw new runtime.RequiredError('defineBusinessAccountRoleSdkRequest', 'Required parameter requestParameters.defineBusinessAccountRoleSdkRequest was null or undefined when calling defineBusinessAccountRoleServer.');
|
|
764
|
+
}
|
|
765
|
+
const queryParameters = {};
|
|
766
|
+
const headerParameters = {};
|
|
767
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
768
|
+
if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
|
|
769
|
+
headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
|
|
770
|
+
}
|
|
771
|
+
const response = await this.request({
|
|
772
|
+
path: `/server/{environmentId}/businessAccounts/{businessAccountId}/roles`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
773
|
+
method: 'POST',
|
|
774
|
+
headers: headerParameters,
|
|
775
|
+
query: queryParameters,
|
|
776
|
+
body: DefineBusinessAccountRoleSdkRequest.DefineBusinessAccountRoleSdkRequestToJSON(requestParameters.defineBusinessAccountRoleSdkRequest),
|
|
777
|
+
}, initOverrides);
|
|
778
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountMutationVersion.BusinessAccountMutationVersionFromJSON(jsonValue));
|
|
779
|
+
}
|
|
780
|
+
/**
|
|
781
|
+
* 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.
|
|
782
|
+
* Server — define a customer role for a business account
|
|
783
|
+
*/
|
|
784
|
+
async defineBusinessAccountRoleServer(requestParameters, initOverrides) {
|
|
785
|
+
const response = await this.defineBusinessAccountRoleServerRaw(requestParameters, initOverrides);
|
|
786
|
+
return await response.value();
|
|
787
|
+
}
|
|
788
|
+
/**
|
|
789
|
+
* 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.
|
|
790
|
+
* Server — delete a customer role from a business account
|
|
791
|
+
*/
|
|
792
|
+
async deleteBusinessAccountRoleServerRaw(requestParameters, initOverrides) {
|
|
793
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
794
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling deleteBusinessAccountRoleServer.');
|
|
795
|
+
}
|
|
796
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
797
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling deleteBusinessAccountRoleServer.');
|
|
798
|
+
}
|
|
799
|
+
if (requestParameters.role === null || requestParameters.role === undefined) {
|
|
800
|
+
throw new runtime.RequiredError('role', 'Required parameter requestParameters.role was null or undefined when calling deleteBusinessAccountRoleServer.');
|
|
801
|
+
}
|
|
802
|
+
const queryParameters = {};
|
|
803
|
+
const headerParameters = {};
|
|
804
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
805
|
+
if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
|
|
806
|
+
headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
|
|
807
|
+
}
|
|
808
|
+
const response = await this.request({
|
|
809
|
+
path: `/server/{environmentId}/businessAccounts/{businessAccountId}/roles/{role}`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))).replace(`{${"role"}}`, encodeURIComponent(String(requestParameters.role))),
|
|
810
|
+
method: 'DELETE',
|
|
811
|
+
headers: headerParameters,
|
|
812
|
+
query: queryParameters,
|
|
813
|
+
body: DeleteBusinessAccountRoleSdkRequest.DeleteBusinessAccountRoleSdkRequestToJSON(requestParameters.deleteBusinessAccountRoleSdkRequest),
|
|
814
|
+
}, initOverrides);
|
|
815
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountMutationVersion.BusinessAccountMutationVersionFromJSON(jsonValue));
|
|
816
|
+
}
|
|
817
|
+
/**
|
|
818
|
+
* 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.
|
|
819
|
+
* Server — delete a customer role from a business account
|
|
820
|
+
*/
|
|
821
|
+
async deleteBusinessAccountRoleServer(requestParameters, initOverrides) {
|
|
822
|
+
const response = await this.deleteBusinessAccountRoleServerRaw(requestParameters, initOverrides);
|
|
823
|
+
return await response.value();
|
|
824
|
+
}
|
|
670
825
|
/**
|
|
671
826
|
* Accepts delivery of the encrypted delegated share.
|
|
672
827
|
* Server — deliver encrypted delegated share
|
|
@@ -707,6 +862,76 @@ class ServerApi extends runtime.BaseAPI {
|
|
|
707
862
|
const response = await this.deliverDelegatedShareServerRaw(requestParameters, initOverrides);
|
|
708
863
|
return await response.value();
|
|
709
864
|
}
|
|
865
|
+
/**
|
|
866
|
+
* Redirects to a pre-signed S3 URL for the exported CSV.
|
|
867
|
+
* Server — download a completed business account activity export
|
|
868
|
+
*/
|
|
869
|
+
async downloadBusinessAccountActivityExportServerRaw(requestParameters, initOverrides) {
|
|
870
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
871
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling downloadBusinessAccountActivityExportServer.');
|
|
872
|
+
}
|
|
873
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
874
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling downloadBusinessAccountActivityExportServer.');
|
|
875
|
+
}
|
|
876
|
+
if (requestParameters.exportId === null || requestParameters.exportId === undefined) {
|
|
877
|
+
throw new runtime.RequiredError('exportId', 'Required parameter requestParameters.exportId was null or undefined when calling downloadBusinessAccountActivityExportServer.');
|
|
878
|
+
}
|
|
879
|
+
const queryParameters = {};
|
|
880
|
+
const headerParameters = {};
|
|
881
|
+
if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
|
|
882
|
+
headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
|
|
883
|
+
}
|
|
884
|
+
const response = await this.request({
|
|
885
|
+
path: `/server/{environmentId}/businessAccounts/{businessAccountId}/activity/exports/{exportId}/download`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))).replace(`{${"exportId"}}`, encodeURIComponent(String(requestParameters.exportId))),
|
|
886
|
+
method: 'GET',
|
|
887
|
+
headers: headerParameters,
|
|
888
|
+
query: queryParameters,
|
|
889
|
+
}, initOverrides);
|
|
890
|
+
return new runtime.TextApiResponse(response);
|
|
891
|
+
}
|
|
892
|
+
/**
|
|
893
|
+
* Redirects to a pre-signed S3 URL for the exported CSV.
|
|
894
|
+
* Server — download a completed business account activity export
|
|
895
|
+
*/
|
|
896
|
+
async downloadBusinessAccountActivityExportServer(requestParameters, initOverrides) {
|
|
897
|
+
const response = await this.downloadBusinessAccountActivityExportServerRaw(requestParameters, initOverrides);
|
|
898
|
+
return await response.value();
|
|
899
|
+
}
|
|
900
|
+
/**
|
|
901
|
+
* 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.
|
|
902
|
+
* Server — apply a proposal whose approvals now satisfy it
|
|
903
|
+
*/
|
|
904
|
+
async executeBusinessAccountProposalServerRaw(requestParameters, initOverrides) {
|
|
905
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
906
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling executeBusinessAccountProposalServer.');
|
|
907
|
+
}
|
|
908
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
909
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling executeBusinessAccountProposalServer.');
|
|
910
|
+
}
|
|
911
|
+
if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
|
|
912
|
+
throw new runtime.RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling executeBusinessAccountProposalServer.');
|
|
913
|
+
}
|
|
914
|
+
const queryParameters = {};
|
|
915
|
+
const headerParameters = {};
|
|
916
|
+
if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
|
|
917
|
+
headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
|
|
918
|
+
}
|
|
919
|
+
const response = await this.request({
|
|
920
|
+
path: `/server/{environmentId}/businessAccounts/{businessAccountId}/proposals/{proposalId}/execute`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))).replace(`{${"proposalId"}}`, encodeURIComponent(String(requestParameters.proposalId))),
|
|
921
|
+
method: 'POST',
|
|
922
|
+
headers: headerParameters,
|
|
923
|
+
query: queryParameters,
|
|
924
|
+
}, initOverrides);
|
|
925
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountMutationVersion.BusinessAccountMutationVersionFromJSON(jsonValue));
|
|
926
|
+
}
|
|
927
|
+
/**
|
|
928
|
+
* 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.
|
|
929
|
+
* Server — apply a proposal whose approvals now satisfy it
|
|
930
|
+
*/
|
|
931
|
+
async executeBusinessAccountProposalServer(requestParameters, initOverrides) {
|
|
932
|
+
const response = await this.executeBusinessAccountProposalServerRaw(requestParameters, initOverrides);
|
|
933
|
+
return await response.value();
|
|
934
|
+
}
|
|
710
935
|
/**
|
|
711
936
|
* Exports the private key of a WAAS wallet through an MPC ceremony.
|
|
712
937
|
* Server — export a WAAS wallet private key
|
|
@@ -776,6 +1001,77 @@ class ServerApi extends runtime.BaseAPI {
|
|
|
776
1001
|
const response = await this.getBackupTokenServerRaw(requestParameters, initOverrides);
|
|
777
1002
|
return await response.value();
|
|
778
1003
|
}
|
|
1004
|
+
/**
|
|
1005
|
+
* Server — get a business account activity export\'s status
|
|
1006
|
+
*/
|
|
1007
|
+
async getBusinessAccountActivityExportServerRaw(requestParameters, initOverrides) {
|
|
1008
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
1009
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getBusinessAccountActivityExportServer.');
|
|
1010
|
+
}
|
|
1011
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
1012
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling getBusinessAccountActivityExportServer.');
|
|
1013
|
+
}
|
|
1014
|
+
if (requestParameters.exportId === null || requestParameters.exportId === undefined) {
|
|
1015
|
+
throw new runtime.RequiredError('exportId', 'Required parameter requestParameters.exportId was null or undefined when calling getBusinessAccountActivityExportServer.');
|
|
1016
|
+
}
|
|
1017
|
+
const queryParameters = {};
|
|
1018
|
+
const headerParameters = {};
|
|
1019
|
+
if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
|
|
1020
|
+
headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
|
|
1021
|
+
}
|
|
1022
|
+
const response = await this.request({
|
|
1023
|
+
path: `/server/{environmentId}/businessAccounts/{businessAccountId}/activity/exports/{exportId}`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))).replace(`{${"exportId"}}`, encodeURIComponent(String(requestParameters.exportId))),
|
|
1024
|
+
method: 'GET',
|
|
1025
|
+
headers: headerParameters,
|
|
1026
|
+
query: queryParameters,
|
|
1027
|
+
}, initOverrides);
|
|
1028
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountActivityExport.BusinessAccountActivityExportFromJSON(jsonValue));
|
|
1029
|
+
}
|
|
1030
|
+
/**
|
|
1031
|
+
* Server — get a business account activity export\'s status
|
|
1032
|
+
*/
|
|
1033
|
+
async getBusinessAccountActivityExportServer(requestParameters, initOverrides) {
|
|
1034
|
+
const response = await this.getBusinessAccountActivityExportServerRaw(requestParameters, initOverrides);
|
|
1035
|
+
return await response.value();
|
|
1036
|
+
}
|
|
1037
|
+
/**
|
|
1038
|
+
* Retrieve the audit trail of a business account, newest first. Caller must be an owner or admin member. Returns 404 when the caller is not a member (404 not 403 so we don\'t leak business-account existence).
|
|
1039
|
+
* Server — list business account activity
|
|
1040
|
+
*/
|
|
1041
|
+
async getBusinessAccountActivityServerRaw(requestParameters, initOverrides) {
|
|
1042
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
1043
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getBusinessAccountActivityServer.');
|
|
1044
|
+
}
|
|
1045
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
1046
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling getBusinessAccountActivityServer.');
|
|
1047
|
+
}
|
|
1048
|
+
const queryParameters = {};
|
|
1049
|
+
if (requestParameters.limit !== undefined) {
|
|
1050
|
+
queryParameters['limit'] = requestParameters.limit;
|
|
1051
|
+
}
|
|
1052
|
+
if (requestParameters.cursor !== undefined) {
|
|
1053
|
+
queryParameters['cursor'] = requestParameters.cursor;
|
|
1054
|
+
}
|
|
1055
|
+
const headerParameters = {};
|
|
1056
|
+
if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
|
|
1057
|
+
headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
|
|
1058
|
+
}
|
|
1059
|
+
const response = await this.request({
|
|
1060
|
+
path: `/server/{environmentId}/businessAccounts/{businessAccountId}/activity`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
1061
|
+
method: 'GET',
|
|
1062
|
+
headers: headerParameters,
|
|
1063
|
+
query: queryParameters,
|
|
1064
|
+
}, initOverrides);
|
|
1065
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountActivityResponse.BusinessAccountActivityResponseFromJSON(jsonValue));
|
|
1066
|
+
}
|
|
1067
|
+
/**
|
|
1068
|
+
* Retrieve the audit trail of a business account, newest first. Caller must be an owner or admin member. Returns 404 when the caller is not a member (404 not 403 so we don\'t leak business-account existence).
|
|
1069
|
+
* Server — list business account activity
|
|
1070
|
+
*/
|
|
1071
|
+
async getBusinessAccountActivityServer(requestParameters, initOverrides) {
|
|
1072
|
+
const response = await this.getBusinessAccountActivityServerRaw(requestParameters, initOverrides);
|
|
1073
|
+
return await response.value();
|
|
1074
|
+
}
|
|
779
1075
|
/**
|
|
780
1076
|
* Returns 404 if the caller is not a member of the business account (404 not 403 so we don\'t leak business-account existence).
|
|
781
1077
|
* Server — get a business account with embedded members and signers
|
|
@@ -808,6 +1104,38 @@ class ServerApi extends runtime.BaseAPI {
|
|
|
808
1104
|
const response = await this.getBusinessAccountByIdServerRaw(requestParameters, initOverrides);
|
|
809
1105
|
return await response.value();
|
|
810
1106
|
}
|
|
1107
|
+
/**
|
|
1108
|
+
* 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.
|
|
1109
|
+
* Server — read the approval requirements in force
|
|
1110
|
+
*/
|
|
1111
|
+
async getBusinessAccountGovernanceServerRaw(requestParameters, initOverrides) {
|
|
1112
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
1113
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getBusinessAccountGovernanceServer.');
|
|
1114
|
+
}
|
|
1115
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
1116
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling getBusinessAccountGovernanceServer.');
|
|
1117
|
+
}
|
|
1118
|
+
const queryParameters = {};
|
|
1119
|
+
const headerParameters = {};
|
|
1120
|
+
if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
|
|
1121
|
+
headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
|
|
1122
|
+
}
|
|
1123
|
+
const response = await this.request({
|
|
1124
|
+
path: `/server/{environmentId}/businessAccounts/{businessAccountId}/governance`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
1125
|
+
method: 'GET',
|
|
1126
|
+
headers: headerParameters,
|
|
1127
|
+
query: queryParameters,
|
|
1128
|
+
}, initOverrides);
|
|
1129
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountGovernanceResponse.BusinessAccountGovernanceResponseFromJSON(jsonValue));
|
|
1130
|
+
}
|
|
1131
|
+
/**
|
|
1132
|
+
* 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.
|
|
1133
|
+
* Server — read the approval requirements in force
|
|
1134
|
+
*/
|
|
1135
|
+
async getBusinessAccountGovernanceServer(requestParameters, initOverrides) {
|
|
1136
|
+
const response = await this.getBusinessAccountGovernanceServerRaw(requestParameters, initOverrides);
|
|
1137
|
+
return await response.value();
|
|
1138
|
+
}
|
|
811
1139
|
/**
|
|
812
1140
|
* Returns the Composition account-Layer content for the business account, the Rules that apply to every wallet in it. Business-account owner or admin only.
|
|
813
1141
|
* Server — get the business account\'s account-Layer Rules
|
|
@@ -840,6 +1168,41 @@ class ServerApi extends runtime.BaseAPI {
|
|
|
840
1168
|
const response = await this.getBusinessAccountPolicyLayerServerRaw(requestParameters, initOverrides);
|
|
841
1169
|
return await response.value();
|
|
842
1170
|
}
|
|
1171
|
+
/**
|
|
1172
|
+
* 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.
|
|
1173
|
+
* Server — read one proposal, including the intent to sign
|
|
1174
|
+
*/
|
|
1175
|
+
async getBusinessAccountProposalServerRaw(requestParameters, initOverrides) {
|
|
1176
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
1177
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getBusinessAccountProposalServer.');
|
|
1178
|
+
}
|
|
1179
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
1180
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling getBusinessAccountProposalServer.');
|
|
1181
|
+
}
|
|
1182
|
+
if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
|
|
1183
|
+
throw new runtime.RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling getBusinessAccountProposalServer.');
|
|
1184
|
+
}
|
|
1185
|
+
const queryParameters = {};
|
|
1186
|
+
const headerParameters = {};
|
|
1187
|
+
if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
|
|
1188
|
+
headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
|
|
1189
|
+
}
|
|
1190
|
+
const response = await this.request({
|
|
1191
|
+
path: `/server/{environmentId}/businessAccounts/{businessAccountId}/proposals/{proposalId}`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))).replace(`{${"proposalId"}}`, encodeURIComponent(String(requestParameters.proposalId))),
|
|
1192
|
+
method: 'GET',
|
|
1193
|
+
headers: headerParameters,
|
|
1194
|
+
query: queryParameters,
|
|
1195
|
+
}, initOverrides);
|
|
1196
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountProposal.BusinessAccountProposalFromJSON(jsonValue));
|
|
1197
|
+
}
|
|
1198
|
+
/**
|
|
1199
|
+
* 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.
|
|
1200
|
+
* Server — read one proposal, including the intent to sign
|
|
1201
|
+
*/
|
|
1202
|
+
async getBusinessAccountProposalServer(requestParameters, initOverrides) {
|
|
1203
|
+
const response = await this.getBusinessAccountProposalServerRaw(requestParameters, initOverrides);
|
|
1204
|
+
return await response.value();
|
|
1205
|
+
}
|
|
843
1206
|
/**
|
|
844
1207
|
* Fetches the encryption public key used for delegated access in a WAAS environment. By default, returns only the latest active key.
|
|
845
1208
|
* Server — get delegated access encryption public key for an environment
|
|
@@ -1136,6 +1499,134 @@ class ServerApi extends runtime.BaseAPI {
|
|
|
1136
1499
|
const response = await this.linkBusinessAccountWalletServerRaw(requestParameters, initOverrides);
|
|
1137
1500
|
return await response.value();
|
|
1138
1501
|
}
|
|
1502
|
+
/**
|
|
1503
|
+
* Lists outstanding invitations for a business account. The caller must be authorized to remove members. Internal invitee user IDs are omitted.
|
|
1504
|
+
* Server — list pending business account member invites
|
|
1505
|
+
*/
|
|
1506
|
+
async listBusinessAccountMemberInvitesServerRaw(requestParameters, initOverrides) {
|
|
1507
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
1508
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling listBusinessAccountMemberInvitesServer.');
|
|
1509
|
+
}
|
|
1510
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
1511
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling listBusinessAccountMemberInvitesServer.');
|
|
1512
|
+
}
|
|
1513
|
+
const queryParameters = {};
|
|
1514
|
+
const headerParameters = {};
|
|
1515
|
+
if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
|
|
1516
|
+
headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
|
|
1517
|
+
}
|
|
1518
|
+
const response = await this.request({
|
|
1519
|
+
path: `/server/{environmentId}/businessAccounts/{businessAccountId}/invites`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
1520
|
+
method: 'GET',
|
|
1521
|
+
headers: headerParameters,
|
|
1522
|
+
query: queryParameters,
|
|
1523
|
+
}, initOverrides);
|
|
1524
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountMemberInviteListResponse.BusinessAccountMemberInviteListResponseFromJSON(jsonValue));
|
|
1525
|
+
}
|
|
1526
|
+
/**
|
|
1527
|
+
* Lists outstanding invitations for a business account. The caller must be authorized to remove members. Internal invitee user IDs are omitted.
|
|
1528
|
+
* Server — list pending business account member invites
|
|
1529
|
+
*/
|
|
1530
|
+
async listBusinessAccountMemberInvitesServer(requestParameters, initOverrides) {
|
|
1531
|
+
const response = await this.listBusinessAccountMemberInvitesServerRaw(requestParameters, initOverrides);
|
|
1532
|
+
return await response.value();
|
|
1533
|
+
}
|
|
1534
|
+
/**
|
|
1535
|
+
* 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.
|
|
1536
|
+
* Server — list proposals awaiting the caller\'s approval, across accounts
|
|
1537
|
+
*/
|
|
1538
|
+
async listBusinessAccountProposalsAwaitingApprovalServerRaw(requestParameters, initOverrides) {
|
|
1539
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
1540
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling listBusinessAccountProposalsAwaitingApprovalServer.');
|
|
1541
|
+
}
|
|
1542
|
+
const queryParameters = {};
|
|
1543
|
+
const headerParameters = {};
|
|
1544
|
+
if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
|
|
1545
|
+
headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
|
|
1546
|
+
}
|
|
1547
|
+
const response = await this.request({
|
|
1548
|
+
path: `/server/{environmentId}/businessAccounts/proposals`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
|
|
1549
|
+
method: 'GET',
|
|
1550
|
+
headers: headerParameters,
|
|
1551
|
+
query: queryParameters,
|
|
1552
|
+
}, initOverrides);
|
|
1553
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(BusinessAccountProposal.BusinessAccountProposalFromJSON));
|
|
1554
|
+
}
|
|
1555
|
+
/**
|
|
1556
|
+
* 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.
|
|
1557
|
+
* Server — list proposals awaiting the caller\'s approval, across accounts
|
|
1558
|
+
*/
|
|
1559
|
+
async listBusinessAccountProposalsAwaitingApprovalServer(requestParameters, initOverrides) {
|
|
1560
|
+
const response = await this.listBusinessAccountProposalsAwaitingApprovalServerRaw(requestParameters, initOverrides);
|
|
1561
|
+
return await response.value();
|
|
1562
|
+
}
|
|
1563
|
+
/**
|
|
1564
|
+
* 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.
|
|
1565
|
+
* Server — list the governed mutations awaiting approval
|
|
1566
|
+
*/
|
|
1567
|
+
async listBusinessAccountProposalsServerRaw(requestParameters, initOverrides) {
|
|
1568
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
1569
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling listBusinessAccountProposalsServer.');
|
|
1570
|
+
}
|
|
1571
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
1572
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling listBusinessAccountProposalsServer.');
|
|
1573
|
+
}
|
|
1574
|
+
const queryParameters = {};
|
|
1575
|
+
if (requestParameters.status !== undefined) {
|
|
1576
|
+
queryParameters['status'] = requestParameters.status;
|
|
1577
|
+
}
|
|
1578
|
+
const headerParameters = {};
|
|
1579
|
+
if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
|
|
1580
|
+
headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
|
|
1581
|
+
}
|
|
1582
|
+
const response = await this.request({
|
|
1583
|
+
path: `/server/{environmentId}/businessAccounts/{businessAccountId}/proposals`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
1584
|
+
method: 'GET',
|
|
1585
|
+
headers: headerParameters,
|
|
1586
|
+
query: queryParameters,
|
|
1587
|
+
}, initOverrides);
|
|
1588
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(BusinessAccountProposal.BusinessAccountProposalFromJSON));
|
|
1589
|
+
}
|
|
1590
|
+
/**
|
|
1591
|
+
* 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.
|
|
1592
|
+
* Server — list the governed mutations awaiting approval
|
|
1593
|
+
*/
|
|
1594
|
+
async listBusinessAccountProposalsServer(requestParameters, initOverrides) {
|
|
1595
|
+
const response = await this.listBusinessAccountProposalsServerRaw(requestParameters, initOverrides);
|
|
1596
|
+
return await response.value();
|
|
1597
|
+
}
|
|
1598
|
+
/**
|
|
1599
|
+
* 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.
|
|
1600
|
+
* Server — list the customer-defined roles for a business account
|
|
1601
|
+
*/
|
|
1602
|
+
async listBusinessAccountRolesServerRaw(requestParameters, initOverrides) {
|
|
1603
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
1604
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling listBusinessAccountRolesServer.');
|
|
1605
|
+
}
|
|
1606
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
1607
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling listBusinessAccountRolesServer.');
|
|
1608
|
+
}
|
|
1609
|
+
const queryParameters = {};
|
|
1610
|
+
const headerParameters = {};
|
|
1611
|
+
if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
|
|
1612
|
+
headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
|
|
1613
|
+
}
|
|
1614
|
+
const response = await this.request({
|
|
1615
|
+
path: `/server/{environmentId}/businessAccounts/{businessAccountId}/roles`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
1616
|
+
method: 'GET',
|
|
1617
|
+
headers: headerParameters,
|
|
1618
|
+
query: queryParameters,
|
|
1619
|
+
}, initOverrides);
|
|
1620
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountRolesResponse.BusinessAccountRolesResponseFromJSON(jsonValue));
|
|
1621
|
+
}
|
|
1622
|
+
/**
|
|
1623
|
+
* 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.
|
|
1624
|
+
* Server — list the customer-defined roles for a business account
|
|
1625
|
+
*/
|
|
1626
|
+
async listBusinessAccountRolesServer(requestParameters, initOverrides) {
|
|
1627
|
+
const response = await this.listBusinessAccountRolesServerRaw(requestParameters, initOverrides);
|
|
1628
|
+
return await response.value();
|
|
1629
|
+
}
|
|
1139
1630
|
/**
|
|
1140
1631
|
* Server — list business accounts the caller is a member of
|
|
1141
1632
|
*/
|
|
@@ -1400,6 +1891,43 @@ class ServerApi extends runtime.BaseAPI {
|
|
|
1400
1891
|
async revokeDelegatedShareSetServer(requestParameters, initOverrides) {
|
|
1401
1892
|
await this.revokeDelegatedShareSetServerRaw(requestParameters, initOverrides);
|
|
1402
1893
|
}
|
|
1894
|
+
/**
|
|
1895
|
+
* 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.
|
|
1896
|
+
* Server — replace the approval requirements for a business account
|
|
1897
|
+
*/
|
|
1898
|
+
async setBusinessAccountGovernanceServerRaw(requestParameters, initOverrides) {
|
|
1899
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
1900
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling setBusinessAccountGovernanceServer.');
|
|
1901
|
+
}
|
|
1902
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
1903
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling setBusinessAccountGovernanceServer.');
|
|
1904
|
+
}
|
|
1905
|
+
if (requestParameters.setBusinessAccountGovernanceSdkRequest === null || requestParameters.setBusinessAccountGovernanceSdkRequest === undefined) {
|
|
1906
|
+
throw new runtime.RequiredError('setBusinessAccountGovernanceSdkRequest', 'Required parameter requestParameters.setBusinessAccountGovernanceSdkRequest was null or undefined when calling setBusinessAccountGovernanceServer.');
|
|
1907
|
+
}
|
|
1908
|
+
const queryParameters = {};
|
|
1909
|
+
const headerParameters = {};
|
|
1910
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1911
|
+
if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
|
|
1912
|
+
headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
|
|
1913
|
+
}
|
|
1914
|
+
const response = await this.request({
|
|
1915
|
+
path: `/server/{environmentId}/businessAccounts/{businessAccountId}/governance`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
1916
|
+
method: 'PUT',
|
|
1917
|
+
headers: headerParameters,
|
|
1918
|
+
query: queryParameters,
|
|
1919
|
+
body: SetBusinessAccountGovernanceSdkRequest.SetBusinessAccountGovernanceSdkRequestToJSON(requestParameters.setBusinessAccountGovernanceSdkRequest),
|
|
1920
|
+
}, initOverrides);
|
|
1921
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountMutationVersion.BusinessAccountMutationVersionFromJSON(jsonValue));
|
|
1922
|
+
}
|
|
1923
|
+
/**
|
|
1924
|
+
* 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.
|
|
1925
|
+
* Server — replace the approval requirements for a business account
|
|
1926
|
+
*/
|
|
1927
|
+
async setBusinessAccountGovernanceServer(requestParameters, initOverrides) {
|
|
1928
|
+
const response = await this.setBusinessAccountGovernanceServerRaw(requestParameters, initOverrides);
|
|
1929
|
+
return await response.value();
|
|
1930
|
+
}
|
|
1403
1931
|
/**
|
|
1404
1932
|
* Signs a message using the specified WAAS wallet through an MPC ceremony.
|
|
1405
1933
|
* Server — sign a message with a WAAS wallet
|