@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.
@@ -54,23 +54,31 @@ import '../models/UnprocessableEntityErrorCode.js';
54
54
  import '../models/ChainalysisCheckResultEnum.js';
55
55
  import { BusinessAccountFromJSON } from '../models/BusinessAccount.js';
56
56
  import '../models/BusinessAccountActionEnum.js';
57
- import '../models/BusinessAccountActivityExport.js';
57
+ import { BusinessAccountActivityExportFromJSON } from '../models/BusinessAccountActivityExport.js';
58
+ import { BusinessAccountActivityExportRequestToJSON } from '../models/BusinessAccountActivityExportRequest.js';
59
+ import { BusinessAccountActivityResponseFromJSON } from '../models/BusinessAccountActivityResponse.js';
58
60
  import '../models/BusinessAccountApprovalRequirement.js';
59
61
  import '../models/BusinessAccountApprovalsPending.js';
60
62
  import { BusinessAccountDetailFromJSON } from '../models/BusinessAccountDetail.js';
63
+ import { BusinessAccountGovernanceResponseFromJSON } from '../models/BusinessAccountGovernanceResponse.js';
61
64
  import '../models/BusinessAccountGovernedAction.js';
62
65
  import { BusinessAccountListFromJSON } from '../models/BusinessAccountList.js';
63
66
  import { BusinessAccountMemberCreationResultFromJSON } from '../models/BusinessAccountMemberCreationResult.js';
64
- import '../models/BusinessAccountMemberInviteReceipt.js';
67
+ import { BusinessAccountMemberInviteListResponseFromJSON } from '../models/BusinessAccountMemberInviteListResponse.js';
68
+ import { BusinessAccountMemberInviteReceiptFromJSON } from '../models/BusinessAccountMemberInviteReceipt.js';
65
69
  import '../models/BusinessAccountMemberRole.js';
70
+ import { BusinessAccountMutationVersionFromJSON } from '../models/BusinessAccountMutationVersion.js';
66
71
  import { BusinessAccountPolicyLayerResponseFromJSON } from '../models/BusinessAccountPolicyLayerResponse.js';
67
72
  import { BusinessAccountPolicyLayerUpdateRequestToJSON } from '../models/BusinessAccountPolicyLayerUpdateRequest.js';
73
+ import { BusinessAccountProposalFromJSON } from '../models/BusinessAccountProposal.js';
68
74
  import '../models/BusinessAccountProposalStatus.js';
69
75
  import '../models/BusinessAccountRequirementCondition.js';
70
76
  import '../models/BusinessAccountRoleDefinition.js';
71
77
  import '../models/BusinessAccountRolesAdminResponse.js';
72
78
  import '../models/BusinessAccountRolesAdminResponseAllOf.js';
79
+ import { BusinessAccountRolesResponseFromJSON } from '../models/BusinessAccountRolesResponse.js';
73
80
  import '../models/SignMessageApprovalQuorumIntent.js';
81
+ import { CancelBusinessAccountMemberInviteSdkRequestToJSON } from '../models/CancelBusinessAccountMemberInviteSdkRequest.js';
74
82
  import '../models/CaptchaProviderEnum.js';
75
83
  import '../models/DestinationTypeEnum.js';
76
84
  import '../models/ChainalysisExists.js';
@@ -107,11 +115,12 @@ import '../models/CustomHostnameStatusEnum.js';
107
115
  import '../models/CustomHostnameUsageEnum.js';
108
116
  import '../models/CustomHostnameVerificationType.js';
109
117
  import '../models/DnsRecordType.js';
110
- import '../models/DefineBusinessAccountRoleSdkRequest.js';
118
+ import { DefineBusinessAccountRoleSdkRequestToJSON } from '../models/DefineBusinessAccountRoleSdkRequest.js';
111
119
  import '../models/DelegatedAccessEncryptionPublicKey.js';
112
120
  import { DelegatedAccessEncryptionPublicKeyResponseFromJSON } from '../models/DelegatedAccessEncryptionPublicKeyResponse.js';
113
121
  import { DelegatedShareDeliveryRequestToJSON } from '../models/DelegatedShareDeliveryRequest.js';
114
122
  import { DelegatedShareDeliveryResponseFromJSON } from '../models/DelegatedShareDeliveryResponse.js';
123
+ import { DeleteBusinessAccountRoleSdkRequestToJSON } from '../models/DeleteBusinessAccountRoleSdkRequest.js';
115
124
  import '../models/DeveloperEncryptionKey.js';
116
125
  import '../models/TokenScope.js';
117
126
  import '../models/EmbeddedWalletAuthType.js';
@@ -213,6 +222,7 @@ import '../models/ScreeningPolicyProviderEnum.js';
213
222
  import '../models/ScreeningPolicyScopeEnum.js';
214
223
  import '../models/ScreeningReason.js';
215
224
  import { ServerIdentityResponseFromJSON } from '../models/ServerIdentityResponse.js';
225
+ import { SetBusinessAccountGovernanceSdkRequestToJSON } from '../models/SetBusinessAccountGovernanceSdkRequest.js';
216
226
  import '../models/SignMessageApprovalQuorumIntentLifetime.js';
217
227
  import '../models/SignMessageApprovalQuorumRawSign.js';
218
228
  import '../models/SignMessageApprovalQuorumSvmTransactionOperation.js';
@@ -393,6 +403,43 @@ class ServerApi extends BaseAPI {
393
403
  const response = await this.buildWaasConfidentialTransactionServerRaw(requestParameters, initOverrides);
394
404
  return await response.value();
395
405
  }
406
+ /**
407
+ * 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.
408
+ * Server — cancel a pending business account member invite
409
+ */
410
+ async cancelBusinessAccountMemberInviteServerRaw(requestParameters, initOverrides) {
411
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
412
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling cancelBusinessAccountMemberInviteServer.');
413
+ }
414
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
415
+ throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling cancelBusinessAccountMemberInviteServer.');
416
+ }
417
+ if (requestParameters.inviteId === null || requestParameters.inviteId === undefined) {
418
+ throw new RequiredError('inviteId', 'Required parameter requestParameters.inviteId was null or undefined when calling cancelBusinessAccountMemberInviteServer.');
419
+ }
420
+ const queryParameters = {};
421
+ const headerParameters = {};
422
+ headerParameters['Content-Type'] = 'application/json';
423
+ if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
424
+ headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
425
+ }
426
+ const response = await this.request({
427
+ 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))),
428
+ method: 'DELETE',
429
+ headers: headerParameters,
430
+ query: queryParameters,
431
+ body: CancelBusinessAccountMemberInviteSdkRequestToJSON(requestParameters.cancelBusinessAccountMemberInviteSdkRequest),
432
+ }, initOverrides);
433
+ return new JSONApiResponse(response, (jsonValue) => BusinessAccountMemberInviteReceiptFromJSON(jsonValue));
434
+ }
435
+ /**
436
+ * 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.
437
+ * Server — cancel a pending business account member invite
438
+ */
439
+ async cancelBusinessAccountMemberInviteServer(requestParameters, initOverrides) {
440
+ const response = await this.cancelBusinessAccountMemberInviteServerRaw(requestParameters, initOverrides);
441
+ return await response.value();
442
+ }
396
443
  /**
397
444
  * 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.
398
445
  * Cancel a flow
@@ -422,6 +469,40 @@ class ServerApi extends BaseAPI {
422
469
  const response = await this.cancelFlowServerRaw(requestParameters, initOverrides);
423
470
  return await response.value();
424
471
  }
472
+ /**
473
+ * 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.
474
+ * Server — create a CSV export of the business account\'s audit trail
475
+ */
476
+ async createBusinessAccountActivityExportServerRaw(requestParameters, initOverrides) {
477
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
478
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling createBusinessAccountActivityExportServer.');
479
+ }
480
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
481
+ throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling createBusinessAccountActivityExportServer.');
482
+ }
483
+ const queryParameters = {};
484
+ const headerParameters = {};
485
+ headerParameters['Content-Type'] = 'application/json';
486
+ if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
487
+ headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
488
+ }
489
+ const response = await this.request({
490
+ path: `/server/{environmentId}/businessAccounts/{businessAccountId}/activity/exports`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
491
+ method: 'POST',
492
+ headers: headerParameters,
493
+ query: queryParameters,
494
+ body: BusinessAccountActivityExportRequestToJSON(requestParameters.businessAccountActivityExportRequest),
495
+ }, initOverrides);
496
+ return new JSONApiResponse(response, (jsonValue) => BusinessAccountActivityExportFromJSON(jsonValue));
497
+ }
498
+ /**
499
+ * 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.
500
+ * Server — create a CSV export of the business account\'s audit trail
501
+ */
502
+ async createBusinessAccountActivityExportServer(requestParameters, initOverrides) {
503
+ const response = await this.createBusinessAccountActivityExportServerRaw(requestParameters, initOverrides);
504
+ return await response.value();
505
+ }
425
506
  /**
426
507
  * 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.
427
508
  * Server — create a business account
@@ -663,6 +744,80 @@ class ServerApi extends BaseAPI {
663
744
  const response = await this.createWaasConfidentialSeedServerRaw(requestParameters, initOverrides);
664
745
  return await response.value();
665
746
  }
747
+ /**
748
+ * 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.
749
+ * Server — define a customer role for a business account
750
+ */
751
+ async defineBusinessAccountRoleServerRaw(requestParameters, initOverrides) {
752
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
753
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling defineBusinessAccountRoleServer.');
754
+ }
755
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
756
+ throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling defineBusinessAccountRoleServer.');
757
+ }
758
+ if (requestParameters.defineBusinessAccountRoleSdkRequest === null || requestParameters.defineBusinessAccountRoleSdkRequest === undefined) {
759
+ throw new RequiredError('defineBusinessAccountRoleSdkRequest', 'Required parameter requestParameters.defineBusinessAccountRoleSdkRequest was null or undefined when calling defineBusinessAccountRoleServer.');
760
+ }
761
+ const queryParameters = {};
762
+ const headerParameters = {};
763
+ headerParameters['Content-Type'] = 'application/json';
764
+ if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
765
+ headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
766
+ }
767
+ const response = await this.request({
768
+ path: `/server/{environmentId}/businessAccounts/{businessAccountId}/roles`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
769
+ method: 'POST',
770
+ headers: headerParameters,
771
+ query: queryParameters,
772
+ body: DefineBusinessAccountRoleSdkRequestToJSON(requestParameters.defineBusinessAccountRoleSdkRequest),
773
+ }, initOverrides);
774
+ return new JSONApiResponse(response, (jsonValue) => BusinessAccountMutationVersionFromJSON(jsonValue));
775
+ }
776
+ /**
777
+ * 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.
778
+ * Server — define a customer role for a business account
779
+ */
780
+ async defineBusinessAccountRoleServer(requestParameters, initOverrides) {
781
+ const response = await this.defineBusinessAccountRoleServerRaw(requestParameters, initOverrides);
782
+ return await response.value();
783
+ }
784
+ /**
785
+ * 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.
786
+ * Server — delete a customer role from a business account
787
+ */
788
+ async deleteBusinessAccountRoleServerRaw(requestParameters, initOverrides) {
789
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
790
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling deleteBusinessAccountRoleServer.');
791
+ }
792
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
793
+ throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling deleteBusinessAccountRoleServer.');
794
+ }
795
+ if (requestParameters.role === null || requestParameters.role === undefined) {
796
+ throw new RequiredError('role', 'Required parameter requestParameters.role was null or undefined when calling deleteBusinessAccountRoleServer.');
797
+ }
798
+ const queryParameters = {};
799
+ const headerParameters = {};
800
+ headerParameters['Content-Type'] = 'application/json';
801
+ if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
802
+ headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
803
+ }
804
+ const response = await this.request({
805
+ 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))),
806
+ method: 'DELETE',
807
+ headers: headerParameters,
808
+ query: queryParameters,
809
+ body: DeleteBusinessAccountRoleSdkRequestToJSON(requestParameters.deleteBusinessAccountRoleSdkRequest),
810
+ }, initOverrides);
811
+ return new JSONApiResponse(response, (jsonValue) => BusinessAccountMutationVersionFromJSON(jsonValue));
812
+ }
813
+ /**
814
+ * 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.
815
+ * Server — delete a customer role from a business account
816
+ */
817
+ async deleteBusinessAccountRoleServer(requestParameters, initOverrides) {
818
+ const response = await this.deleteBusinessAccountRoleServerRaw(requestParameters, initOverrides);
819
+ return await response.value();
820
+ }
666
821
  /**
667
822
  * Accepts delivery of the encrypted delegated share.
668
823
  * Server — deliver encrypted delegated share
@@ -703,6 +858,76 @@ class ServerApi extends BaseAPI {
703
858
  const response = await this.deliverDelegatedShareServerRaw(requestParameters, initOverrides);
704
859
  return await response.value();
705
860
  }
861
+ /**
862
+ * Redirects to a pre-signed S3 URL for the exported CSV.
863
+ * Server — download a completed business account activity export
864
+ */
865
+ async downloadBusinessAccountActivityExportServerRaw(requestParameters, initOverrides) {
866
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
867
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling downloadBusinessAccountActivityExportServer.');
868
+ }
869
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
870
+ throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling downloadBusinessAccountActivityExportServer.');
871
+ }
872
+ if (requestParameters.exportId === null || requestParameters.exportId === undefined) {
873
+ throw new RequiredError('exportId', 'Required parameter requestParameters.exportId was null or undefined when calling downloadBusinessAccountActivityExportServer.');
874
+ }
875
+ const queryParameters = {};
876
+ const headerParameters = {};
877
+ if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
878
+ headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
879
+ }
880
+ const response = await this.request({
881
+ 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))),
882
+ method: 'GET',
883
+ headers: headerParameters,
884
+ query: queryParameters,
885
+ }, initOverrides);
886
+ return new TextApiResponse(response);
887
+ }
888
+ /**
889
+ * Redirects to a pre-signed S3 URL for the exported CSV.
890
+ * Server — download a completed business account activity export
891
+ */
892
+ async downloadBusinessAccountActivityExportServer(requestParameters, initOverrides) {
893
+ const response = await this.downloadBusinessAccountActivityExportServerRaw(requestParameters, initOverrides);
894
+ return await response.value();
895
+ }
896
+ /**
897
+ * 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.
898
+ * Server — apply a proposal whose approvals now satisfy it
899
+ */
900
+ async executeBusinessAccountProposalServerRaw(requestParameters, initOverrides) {
901
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
902
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling executeBusinessAccountProposalServer.');
903
+ }
904
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
905
+ throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling executeBusinessAccountProposalServer.');
906
+ }
907
+ if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
908
+ throw new RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling executeBusinessAccountProposalServer.');
909
+ }
910
+ const queryParameters = {};
911
+ const headerParameters = {};
912
+ if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
913
+ headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
914
+ }
915
+ const response = await this.request({
916
+ 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))),
917
+ method: 'POST',
918
+ headers: headerParameters,
919
+ query: queryParameters,
920
+ }, initOverrides);
921
+ return new JSONApiResponse(response, (jsonValue) => BusinessAccountMutationVersionFromJSON(jsonValue));
922
+ }
923
+ /**
924
+ * 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.
925
+ * Server — apply a proposal whose approvals now satisfy it
926
+ */
927
+ async executeBusinessAccountProposalServer(requestParameters, initOverrides) {
928
+ const response = await this.executeBusinessAccountProposalServerRaw(requestParameters, initOverrides);
929
+ return await response.value();
930
+ }
706
931
  /**
707
932
  * Exports the private key of a WAAS wallet through an MPC ceremony.
708
933
  * Server — export a WAAS wallet private key
@@ -772,6 +997,77 @@ class ServerApi extends BaseAPI {
772
997
  const response = await this.getBackupTokenServerRaw(requestParameters, initOverrides);
773
998
  return await response.value();
774
999
  }
1000
+ /**
1001
+ * Server — get a business account activity export\'s status
1002
+ */
1003
+ async getBusinessAccountActivityExportServerRaw(requestParameters, initOverrides) {
1004
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1005
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getBusinessAccountActivityExportServer.');
1006
+ }
1007
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
1008
+ throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling getBusinessAccountActivityExportServer.');
1009
+ }
1010
+ if (requestParameters.exportId === null || requestParameters.exportId === undefined) {
1011
+ throw new RequiredError('exportId', 'Required parameter requestParameters.exportId was null or undefined when calling getBusinessAccountActivityExportServer.');
1012
+ }
1013
+ const queryParameters = {};
1014
+ const headerParameters = {};
1015
+ if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
1016
+ headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
1017
+ }
1018
+ const response = await this.request({
1019
+ 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))),
1020
+ method: 'GET',
1021
+ headers: headerParameters,
1022
+ query: queryParameters,
1023
+ }, initOverrides);
1024
+ return new JSONApiResponse(response, (jsonValue) => BusinessAccountActivityExportFromJSON(jsonValue));
1025
+ }
1026
+ /**
1027
+ * Server — get a business account activity export\'s status
1028
+ */
1029
+ async getBusinessAccountActivityExportServer(requestParameters, initOverrides) {
1030
+ const response = await this.getBusinessAccountActivityExportServerRaw(requestParameters, initOverrides);
1031
+ return await response.value();
1032
+ }
1033
+ /**
1034
+ * 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).
1035
+ * Server — list business account activity
1036
+ */
1037
+ async getBusinessAccountActivityServerRaw(requestParameters, initOverrides) {
1038
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1039
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getBusinessAccountActivityServer.');
1040
+ }
1041
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
1042
+ throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling getBusinessAccountActivityServer.');
1043
+ }
1044
+ const queryParameters = {};
1045
+ if (requestParameters.limit !== undefined) {
1046
+ queryParameters['limit'] = requestParameters.limit;
1047
+ }
1048
+ if (requestParameters.cursor !== undefined) {
1049
+ queryParameters['cursor'] = requestParameters.cursor;
1050
+ }
1051
+ const headerParameters = {};
1052
+ if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
1053
+ headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
1054
+ }
1055
+ const response = await this.request({
1056
+ path: `/server/{environmentId}/businessAccounts/{businessAccountId}/activity`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
1057
+ method: 'GET',
1058
+ headers: headerParameters,
1059
+ query: queryParameters,
1060
+ }, initOverrides);
1061
+ return new JSONApiResponse(response, (jsonValue) => BusinessAccountActivityResponseFromJSON(jsonValue));
1062
+ }
1063
+ /**
1064
+ * 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).
1065
+ * Server — list business account activity
1066
+ */
1067
+ async getBusinessAccountActivityServer(requestParameters, initOverrides) {
1068
+ const response = await this.getBusinessAccountActivityServerRaw(requestParameters, initOverrides);
1069
+ return await response.value();
1070
+ }
775
1071
  /**
776
1072
  * Returns 404 if the caller is not a member of the business account (404 not 403 so we don\'t leak business-account existence).
777
1073
  * Server — get a business account with embedded members and signers
@@ -804,6 +1100,38 @@ class ServerApi extends BaseAPI {
804
1100
  const response = await this.getBusinessAccountByIdServerRaw(requestParameters, initOverrides);
805
1101
  return await response.value();
806
1102
  }
1103
+ /**
1104
+ * 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.
1105
+ * Server — read the approval requirements in force
1106
+ */
1107
+ async getBusinessAccountGovernanceServerRaw(requestParameters, initOverrides) {
1108
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1109
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getBusinessAccountGovernanceServer.');
1110
+ }
1111
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
1112
+ throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling getBusinessAccountGovernanceServer.');
1113
+ }
1114
+ const queryParameters = {};
1115
+ const headerParameters = {};
1116
+ if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
1117
+ headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
1118
+ }
1119
+ const response = await this.request({
1120
+ path: `/server/{environmentId}/businessAccounts/{businessAccountId}/governance`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
1121
+ method: 'GET',
1122
+ headers: headerParameters,
1123
+ query: queryParameters,
1124
+ }, initOverrides);
1125
+ return new JSONApiResponse(response, (jsonValue) => BusinessAccountGovernanceResponseFromJSON(jsonValue));
1126
+ }
1127
+ /**
1128
+ * 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.
1129
+ * Server — read the approval requirements in force
1130
+ */
1131
+ async getBusinessAccountGovernanceServer(requestParameters, initOverrides) {
1132
+ const response = await this.getBusinessAccountGovernanceServerRaw(requestParameters, initOverrides);
1133
+ return await response.value();
1134
+ }
807
1135
  /**
808
1136
  * 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.
809
1137
  * Server — get the business account\'s account-Layer Rules
@@ -836,6 +1164,41 @@ class ServerApi extends BaseAPI {
836
1164
  const response = await this.getBusinessAccountPolicyLayerServerRaw(requestParameters, initOverrides);
837
1165
  return await response.value();
838
1166
  }
1167
+ /**
1168
+ * 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.
1169
+ * Server — read one proposal, including the intent to sign
1170
+ */
1171
+ async getBusinessAccountProposalServerRaw(requestParameters, initOverrides) {
1172
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1173
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getBusinessAccountProposalServer.');
1174
+ }
1175
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
1176
+ throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling getBusinessAccountProposalServer.');
1177
+ }
1178
+ if (requestParameters.proposalId === null || requestParameters.proposalId === undefined) {
1179
+ throw new RequiredError('proposalId', 'Required parameter requestParameters.proposalId was null or undefined when calling getBusinessAccountProposalServer.');
1180
+ }
1181
+ const queryParameters = {};
1182
+ const headerParameters = {};
1183
+ if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
1184
+ headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
1185
+ }
1186
+ const response = await this.request({
1187
+ 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))),
1188
+ method: 'GET',
1189
+ headers: headerParameters,
1190
+ query: queryParameters,
1191
+ }, initOverrides);
1192
+ return new JSONApiResponse(response, (jsonValue) => BusinessAccountProposalFromJSON(jsonValue));
1193
+ }
1194
+ /**
1195
+ * 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.
1196
+ * Server — read one proposal, including the intent to sign
1197
+ */
1198
+ async getBusinessAccountProposalServer(requestParameters, initOverrides) {
1199
+ const response = await this.getBusinessAccountProposalServerRaw(requestParameters, initOverrides);
1200
+ return await response.value();
1201
+ }
839
1202
  /**
840
1203
  * Fetches the encryption public key used for delegated access in a WAAS environment. By default, returns only the latest active key.
841
1204
  * Server — get delegated access encryption public key for an environment
@@ -1132,6 +1495,134 @@ class ServerApi extends BaseAPI {
1132
1495
  const response = await this.linkBusinessAccountWalletServerRaw(requestParameters, initOverrides);
1133
1496
  return await response.value();
1134
1497
  }
1498
+ /**
1499
+ * Lists outstanding invitations for a business account. The caller must be authorized to remove members. Internal invitee user IDs are omitted.
1500
+ * Server — list pending business account member invites
1501
+ */
1502
+ async listBusinessAccountMemberInvitesServerRaw(requestParameters, initOverrides) {
1503
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1504
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling listBusinessAccountMemberInvitesServer.');
1505
+ }
1506
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
1507
+ throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling listBusinessAccountMemberInvitesServer.');
1508
+ }
1509
+ const queryParameters = {};
1510
+ const headerParameters = {};
1511
+ if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
1512
+ headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
1513
+ }
1514
+ const response = await this.request({
1515
+ path: `/server/{environmentId}/businessAccounts/{businessAccountId}/invites`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
1516
+ method: 'GET',
1517
+ headers: headerParameters,
1518
+ query: queryParameters,
1519
+ }, initOverrides);
1520
+ return new JSONApiResponse(response, (jsonValue) => BusinessAccountMemberInviteListResponseFromJSON(jsonValue));
1521
+ }
1522
+ /**
1523
+ * Lists outstanding invitations for a business account. The caller must be authorized to remove members. Internal invitee user IDs are omitted.
1524
+ * Server — list pending business account member invites
1525
+ */
1526
+ async listBusinessAccountMemberInvitesServer(requestParameters, initOverrides) {
1527
+ const response = await this.listBusinessAccountMemberInvitesServerRaw(requestParameters, initOverrides);
1528
+ return await response.value();
1529
+ }
1530
+ /**
1531
+ * 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.
1532
+ * Server — list proposals awaiting the caller\'s approval, across accounts
1533
+ */
1534
+ async listBusinessAccountProposalsAwaitingApprovalServerRaw(requestParameters, initOverrides) {
1535
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1536
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling listBusinessAccountProposalsAwaitingApprovalServer.');
1537
+ }
1538
+ const queryParameters = {};
1539
+ const headerParameters = {};
1540
+ if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
1541
+ headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
1542
+ }
1543
+ const response = await this.request({
1544
+ path: `/server/{environmentId}/businessAccounts/proposals`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
1545
+ method: 'GET',
1546
+ headers: headerParameters,
1547
+ query: queryParameters,
1548
+ }, initOverrides);
1549
+ return new JSONApiResponse(response, (jsonValue) => jsonValue.map(BusinessAccountProposalFromJSON));
1550
+ }
1551
+ /**
1552
+ * 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.
1553
+ * Server — list proposals awaiting the caller\'s approval, across accounts
1554
+ */
1555
+ async listBusinessAccountProposalsAwaitingApprovalServer(requestParameters, initOverrides) {
1556
+ const response = await this.listBusinessAccountProposalsAwaitingApprovalServerRaw(requestParameters, initOverrides);
1557
+ return await response.value();
1558
+ }
1559
+ /**
1560
+ * 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.
1561
+ * Server — list the governed mutations awaiting approval
1562
+ */
1563
+ async listBusinessAccountProposalsServerRaw(requestParameters, initOverrides) {
1564
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1565
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling listBusinessAccountProposalsServer.');
1566
+ }
1567
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
1568
+ throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling listBusinessAccountProposalsServer.');
1569
+ }
1570
+ const queryParameters = {};
1571
+ if (requestParameters.status !== undefined) {
1572
+ queryParameters['status'] = requestParameters.status;
1573
+ }
1574
+ const headerParameters = {};
1575
+ if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
1576
+ headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
1577
+ }
1578
+ const response = await this.request({
1579
+ path: `/server/{environmentId}/businessAccounts/{businessAccountId}/proposals`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
1580
+ method: 'GET',
1581
+ headers: headerParameters,
1582
+ query: queryParameters,
1583
+ }, initOverrides);
1584
+ return new JSONApiResponse(response, (jsonValue) => jsonValue.map(BusinessAccountProposalFromJSON));
1585
+ }
1586
+ /**
1587
+ * 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.
1588
+ * Server — list the governed mutations awaiting approval
1589
+ */
1590
+ async listBusinessAccountProposalsServer(requestParameters, initOverrides) {
1591
+ const response = await this.listBusinessAccountProposalsServerRaw(requestParameters, initOverrides);
1592
+ return await response.value();
1593
+ }
1594
+ /**
1595
+ * 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.
1596
+ * Server — list the customer-defined roles for a business account
1597
+ */
1598
+ async listBusinessAccountRolesServerRaw(requestParameters, initOverrides) {
1599
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1600
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling listBusinessAccountRolesServer.');
1601
+ }
1602
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
1603
+ throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling listBusinessAccountRolesServer.');
1604
+ }
1605
+ const queryParameters = {};
1606
+ const headerParameters = {};
1607
+ if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
1608
+ headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
1609
+ }
1610
+ const response = await this.request({
1611
+ path: `/server/{environmentId}/businessAccounts/{businessAccountId}/roles`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
1612
+ method: 'GET',
1613
+ headers: headerParameters,
1614
+ query: queryParameters,
1615
+ }, initOverrides);
1616
+ return new JSONApiResponse(response, (jsonValue) => BusinessAccountRolesResponseFromJSON(jsonValue));
1617
+ }
1618
+ /**
1619
+ * 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.
1620
+ * Server — list the customer-defined roles for a business account
1621
+ */
1622
+ async listBusinessAccountRolesServer(requestParameters, initOverrides) {
1623
+ const response = await this.listBusinessAccountRolesServerRaw(requestParameters, initOverrides);
1624
+ return await response.value();
1625
+ }
1135
1626
  /**
1136
1627
  * Server — list business accounts the caller is a member of
1137
1628
  */
@@ -1396,6 +1887,43 @@ class ServerApi extends BaseAPI {
1396
1887
  async revokeDelegatedShareSetServer(requestParameters, initOverrides) {
1397
1888
  await this.revokeDelegatedShareSetServerRaw(requestParameters, initOverrides);
1398
1889
  }
1890
+ /**
1891
+ * 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.
1892
+ * Server — replace the approval requirements for a business account
1893
+ */
1894
+ async setBusinessAccountGovernanceServerRaw(requestParameters, initOverrides) {
1895
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
1896
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling setBusinessAccountGovernanceServer.');
1897
+ }
1898
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
1899
+ throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling setBusinessAccountGovernanceServer.');
1900
+ }
1901
+ if (requestParameters.setBusinessAccountGovernanceSdkRequest === null || requestParameters.setBusinessAccountGovernanceSdkRequest === undefined) {
1902
+ throw new RequiredError('setBusinessAccountGovernanceSdkRequest', 'Required parameter requestParameters.setBusinessAccountGovernanceSdkRequest was null or undefined when calling setBusinessAccountGovernanceServer.');
1903
+ }
1904
+ const queryParameters = {};
1905
+ const headerParameters = {};
1906
+ headerParameters['Content-Type'] = 'application/json';
1907
+ if (requestParameters.xDynRequestSigningProof !== undefined && requestParameters.xDynRequestSigningProof !== null) {
1908
+ headerParameters['x-dyn-request-signing-proof'] = String(requestParameters.xDynRequestSigningProof);
1909
+ }
1910
+ const response = await this.request({
1911
+ path: `/server/{environmentId}/businessAccounts/{businessAccountId}/governance`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
1912
+ method: 'PUT',
1913
+ headers: headerParameters,
1914
+ query: queryParameters,
1915
+ body: SetBusinessAccountGovernanceSdkRequestToJSON(requestParameters.setBusinessAccountGovernanceSdkRequest),
1916
+ }, initOverrides);
1917
+ return new JSONApiResponse(response, (jsonValue) => BusinessAccountMutationVersionFromJSON(jsonValue));
1918
+ }
1919
+ /**
1920
+ * 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.
1921
+ * Server — replace the approval requirements for a business account
1922
+ */
1923
+ async setBusinessAccountGovernanceServer(requestParameters, initOverrides) {
1924
+ const response = await this.setBusinessAccountGovernanceServerRaw(requestParameters, initOverrides);
1925
+ return await response.value();
1926
+ }
1399
1927
  /**
1400
1928
  * Signs a message using the specified WAAS wallet through an MPC ceremony.
1401
1929
  * Server — sign a message with a WAAS wallet