@dynamic-labs/sdk-api 0.45.0 → 0.47.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-api",
3
- "version": "0.45.0",
3
+ "version": "0.47.0",
4
4
  "author": "Dynamic Labs",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -8979,7 +8979,7 @@ class SDKApi extends runtime.BaseAPI {
8979
8979
  await this.screenTransactionOptionsRaw(requestParameters, initOverrides);
8980
8980
  }
8981
8981
  /**
8982
- * Owner or admin by default; an account whose governance sets `eligibleInitiatorRoles` for `addMember` can widen that. Target user is resolved by `userId` OR `identifier + type` (email/externalUserId create-or-resolve; id direct lookup). Idempotent: an already-active member returns the existing row with 200. When the account governs `addMember` the response is 202, not 201 — first with the intent to sign, then with the proposal collecting approvals. Neither is a failure.
8982
+ * Owner or admin by default; an account whose governance sets `eligibleInitiatorRoles` for `addMember` can widen that. Target user is resolved by `userId` OR `identifier + type` (email/externalUserId create-or-resolve; id direct lookup). Idempotent: an already-active member returns the existing row with 200. When the account governs `addMember` and nothing is signed yet, the response is `422 intent_required` with the intent to sign. Resend signed to move to 202 (the proposal collecting approvals) or straight to 201 if quorum is already met.
8983
8983
  * SDK — add a member to a business account
8984
8984
  */
8985
8985
  async sdkAddBusinessAccountMemberRaw(requestParameters, initOverrides) {
@@ -9012,7 +9012,7 @@ class SDKApi extends runtime.BaseAPI {
9012
9012
  return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountMember.BusinessAccountMemberFromJSON(jsonValue));
9013
9013
  }
9014
9014
  /**
9015
- * Owner or admin by default; an account whose governance sets `eligibleInitiatorRoles` for `addMember` can widen that. Target user is resolved by `userId` OR `identifier + type` (email/externalUserId create-or-resolve; id direct lookup). Idempotent: an already-active member returns the existing row with 200. When the account governs `addMember` the response is 202, not 201 — first with the intent to sign, then with the proposal collecting approvals. Neither is a failure.
9015
+ * Owner or admin by default; an account whose governance sets `eligibleInitiatorRoles` for `addMember` can widen that. Target user is resolved by `userId` OR `identifier + type` (email/externalUserId create-or-resolve; id direct lookup). Idempotent: an already-active member returns the existing row with 200. When the account governs `addMember` and nothing is signed yet, the response is `422 intent_required` with the intent to sign. Resend signed to move to 202 (the proposal collecting approvals) or straight to 201 if quorum is already met.
9016
9016
  * SDK — add a member to a business account
9017
9017
  */
9018
9018
  async sdkAddBusinessAccountMember(requestParameters, initOverrides) {
@@ -4228,12 +4228,12 @@ export declare class SDKApi extends runtime.BaseAPI {
4228
4228
  */
4229
4229
  screenTransactionOptions(requestParameters: ScreenTransactionOptionsRequest, initOverrides?: RequestInit): Promise<void>;
4230
4230
  /**
4231
- * Owner or admin by default; an account whose governance sets `eligibleInitiatorRoles` for `addMember` can widen that. Target user is resolved by `userId` OR `identifier + type` (email/externalUserId create-or-resolve; id direct lookup). Idempotent: an already-active member returns the existing row with 200. When the account governs `addMember` the response is 202, not 201 — first with the intent to sign, then with the proposal collecting approvals. Neither is a failure.
4231
+ * Owner or admin by default; an account whose governance sets `eligibleInitiatorRoles` for `addMember` can widen that. Target user is resolved by `userId` OR `identifier + type` (email/externalUserId create-or-resolve; id direct lookup). Idempotent: an already-active member returns the existing row with 200. When the account governs `addMember` and nothing is signed yet, the response is `422 intent_required` with the intent to sign. Resend signed to move to 202 (the proposal collecting approvals) or straight to 201 if quorum is already met.
4232
4232
  * SDK — add a member to a business account
4233
4233
  */
4234
4234
  sdkAddBusinessAccountMemberRaw(requestParameters: SdkAddBusinessAccountMemberRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<BusinessAccountMember>>;
4235
4235
  /**
4236
- * Owner or admin by default; an account whose governance sets `eligibleInitiatorRoles` for `addMember` can widen that. Target user is resolved by `userId` OR `identifier + type` (email/externalUserId create-or-resolve; id direct lookup). Idempotent: an already-active member returns the existing row with 200. When the account governs `addMember` the response is 202, not 201 — first with the intent to sign, then with the proposal collecting approvals. Neither is a failure.
4236
+ * Owner or admin by default; an account whose governance sets `eligibleInitiatorRoles` for `addMember` can widen that. Target user is resolved by `userId` OR `identifier + type` (email/externalUserId create-or-resolve; id direct lookup). Idempotent: an already-active member returns the existing row with 200. When the account governs `addMember` and nothing is signed yet, the response is `422 intent_required` with the intent to sign. Resend signed to move to 202 (the proposal collecting approvals) or straight to 201 if quorum is already met.
4237
4237
  * SDK — add a member to a business account
4238
4238
  */
4239
4239
  sdkAddBusinessAccountMember(requestParameters: SdkAddBusinessAccountMemberRequest, initOverrides?: RequestInit): Promise<BusinessAccountMember>;
@@ -8975,7 +8975,7 @@ class SDKApi extends BaseAPI {
8975
8975
  await this.screenTransactionOptionsRaw(requestParameters, initOverrides);
8976
8976
  }
8977
8977
  /**
8978
- * Owner or admin by default; an account whose governance sets `eligibleInitiatorRoles` for `addMember` can widen that. Target user is resolved by `userId` OR `identifier + type` (email/externalUserId create-or-resolve; id direct lookup). Idempotent: an already-active member returns the existing row with 200. When the account governs `addMember` the response is 202, not 201 — first with the intent to sign, then with the proposal collecting approvals. Neither is a failure.
8978
+ * Owner or admin by default; an account whose governance sets `eligibleInitiatorRoles` for `addMember` can widen that. Target user is resolved by `userId` OR `identifier + type` (email/externalUserId create-or-resolve; id direct lookup). Idempotent: an already-active member returns the existing row with 200. When the account governs `addMember` and nothing is signed yet, the response is `422 intent_required` with the intent to sign. Resend signed to move to 202 (the proposal collecting approvals) or straight to 201 if quorum is already met.
8979
8979
  * SDK — add a member to a business account
8980
8980
  */
8981
8981
  async sdkAddBusinessAccountMemberRaw(requestParameters, initOverrides) {
@@ -9008,7 +9008,7 @@ class SDKApi extends BaseAPI {
9008
9008
  return new JSONApiResponse(response, (jsonValue) => BusinessAccountMemberFromJSON(jsonValue));
9009
9009
  }
9010
9010
  /**
9011
- * Owner or admin by default; an account whose governance sets `eligibleInitiatorRoles` for `addMember` can widen that. Target user is resolved by `userId` OR `identifier + type` (email/externalUserId create-or-resolve; id direct lookup). Idempotent: an already-active member returns the existing row with 200. When the account governs `addMember` the response is 202, not 201 — first with the intent to sign, then with the proposal collecting approvals. Neither is a failure.
9011
+ * Owner or admin by default; an account whose governance sets `eligibleInitiatorRoles` for `addMember` can widen that. Target user is resolved by `userId` OR `identifier + type` (email/externalUserId create-or-resolve; id direct lookup). Idempotent: an already-active member returns the existing row with 200. When the account governs `addMember` and nothing is signed yet, the response is `422 intent_required` with the intent to sign. Resend signed to move to 202 (the proposal collecting approvals) or straight to 201 if quorum is already met.
9012
9012
  * SDK — add a member to a business account
9013
9013
  */
9014
9014
  async sdkAddBusinessAccountMember(requestParameters, initOverrides) {
@@ -5,10 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var runtime = require('../runtime.cjs');
6
6
  require('../models/AccessOutcomeEnum.cjs');
7
7
  require('../models/ExchangeKeyEnum.cjs');
8
- require('../models/ProviderEnum.cjs');
9
- require('../models/UserIdentifierTypeEnum.cjs');
8
+ var AddBusinessAccountMemberSdkRequest = require('../models/AddBusinessAccountMemberSdkRequest.cjs');
10
9
  require('../models/BusinessAccountSignerType.cjs');
10
+ require('../models/ProviderEnum.cjs');
11
11
  require('../models/ThresholdSignatureScheme.cjs');
12
+ require('../models/UserIdentifierTypeEnum.cjs');
12
13
  require('../models/WaasChainEnum.cjs');
13
14
  require('../models/WaasPolicyConstraintCondition.cjs');
14
15
  require('../models/WaasPolicyRuleType.cjs');
@@ -51,10 +52,14 @@ require('../models/KycFieldType.cjs');
51
52
  require('../models/BillingSubscriptionPlanTypeEnum.cjs');
52
53
  require('../models/UnprocessableEntityErrorCode.cjs');
53
54
  require('../models/ChainalysisCheckResultEnum.cjs');
55
+ var BusinessAccount = require('../models/BusinessAccount.cjs');
54
56
  require('../models/BusinessAccountActionEnum.cjs');
57
+ var BusinessAccountMember = require('../models/BusinessAccountMember.cjs');
55
58
  require('../models/BusinessAccountApprovalRequirement.cjs');
56
59
  require('../models/BusinessAccountApprovalsPending.cjs');
60
+ var BusinessAccountDetail = require('../models/BusinessAccountDetail.cjs');
57
61
  require('../models/BusinessAccountGovernedAction.cjs');
62
+ var BusinessAccountList = require('../models/BusinessAccountList.cjs');
58
63
  require('../models/BusinessAccountMemberRole.cjs');
59
64
  require('../models/BusinessAccountProposalStatus.cjs');
60
65
  require('../models/BusinessAccountRoleDefinition.cjs');
@@ -78,6 +83,7 @@ require('../models/CoinbaseOnrampFeeType.cjs');
78
83
  require('../models/CoinbaseOnrampOrderPaymentMethod.cjs');
79
84
  require('../models/CoinbaseOnrampOrderStatus.cjs');
80
85
  require('../models/CoinbaseOnrampOrderPaymentLinkType.cjs');
86
+ var CreateBusinessAccountSdkRequest = require('../models/CreateBusinessAccountSdkRequest.cjs');
81
87
  require('../models/EmbeddedWalletChainEnum.cjs');
82
88
  require('../models/EmbeddedWalletProviderEnum.cjs');
83
89
  require('../models/TravelRuleData.cjs');
@@ -163,6 +169,7 @@ require('../models/ScreeningAddressScopeEnum.cjs');
163
169
  require('../models/ScreeningPolicyProviderEnum.cjs');
164
170
  require('../models/ScreeningPolicyScopeEnum.cjs');
165
171
  require('../models/ScreeningReason.cjs');
172
+ var ServerIdentityResponse = require('../models/ServerIdentityResponse.cjs');
166
173
  require('../models/SignMessageRawSign.cjs');
167
174
  var SoftDeleteWaasWalletsRequest = require('../models/SoftDeleteWaasWalletsRequest.cjs');
168
175
  var SoftDeleteWaasWalletsResponse = require('../models/SoftDeleteWaasWalletsResponse.cjs');
@@ -201,6 +208,68 @@ require('../models/WalletTransactionType.cjs');
201
208
  *
202
209
  */
203
210
  class ServerApi extends runtime.BaseAPI {
211
+ /**
212
+ * Owner or admin only. Target user is resolved by `userId` OR `identifier + type` (email/externalUserId create-or-resolve; id direct lookup). Idempotent: an already-active member returns the existing row with 200. When the account governs `addMember` the response is 202, not 201 — first with the intent to sign, then with the proposal collecting approvals. Neither is a failure.
213
+ * Server — add a member to a business account
214
+ */
215
+ async addBusinessAccountMemberServerRaw(requestParameters, initOverrides) {
216
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
217
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling addBusinessAccountMemberServer.');
218
+ }
219
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
220
+ throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling addBusinessAccountMemberServer.');
221
+ }
222
+ if (requestParameters.addBusinessAccountMemberSdkRequest === null || requestParameters.addBusinessAccountMemberSdkRequest === undefined) {
223
+ throw new runtime.RequiredError('addBusinessAccountMemberSdkRequest', 'Required parameter requestParameters.addBusinessAccountMemberSdkRequest was null or undefined when calling addBusinessAccountMemberServer.');
224
+ }
225
+ const queryParameters = {};
226
+ const headerParameters = {};
227
+ headerParameters['Content-Type'] = 'application/json';
228
+ const response = await this.request({
229
+ path: `/server/{environmentId}/businessAccounts/{businessAccountId}/members`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
230
+ method: 'POST',
231
+ headers: headerParameters,
232
+ query: queryParameters,
233
+ body: AddBusinessAccountMemberSdkRequest.AddBusinessAccountMemberSdkRequestToJSON(requestParameters.addBusinessAccountMemberSdkRequest),
234
+ }, initOverrides);
235
+ return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountMember.BusinessAccountMemberFromJSON(jsonValue));
236
+ }
237
+ /**
238
+ * Owner or admin only. Target user is resolved by `userId` OR `identifier + type` (email/externalUserId create-or-resolve; id direct lookup). Idempotent: an already-active member returns the existing row with 200. When the account governs `addMember` the response is 202, not 201 — first with the intent to sign, then with the proposal collecting approvals. Neither is a failure.
239
+ * Server — add a member to a business account
240
+ */
241
+ async addBusinessAccountMemberServer(requestParameters, initOverrides) {
242
+ const response = await this.addBusinessAccountMemberServerRaw(requestParameters, initOverrides);
243
+ return await response.value();
244
+ }
245
+ /**
246
+ * 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.
247
+ * Server — create a business account
248
+ */
249
+ async createBusinessAccountServerRaw(requestParameters, initOverrides) {
250
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
251
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling createBusinessAccountServer.');
252
+ }
253
+ const queryParameters = {};
254
+ const headerParameters = {};
255
+ headerParameters['Content-Type'] = 'application/json';
256
+ const response = await this.request({
257
+ path: `/server/{environmentId}/businessAccounts`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
258
+ method: 'POST',
259
+ headers: headerParameters,
260
+ query: queryParameters,
261
+ body: CreateBusinessAccountSdkRequest.CreateBusinessAccountSdkRequestToJSON(requestParameters.createBusinessAccountSdkRequest),
262
+ }, initOverrides);
263
+ return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccount.BusinessAccountFromJSON(jsonValue));
264
+ }
265
+ /**
266
+ * 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.
267
+ * Server — create a business account
268
+ */
269
+ async createBusinessAccountServer(requestParameters, initOverrides) {
270
+ const response = await this.createBusinessAccountServerRaw(requestParameters, initOverrides);
271
+ return await response.value();
272
+ }
204
273
  /**
205
274
  * Create a flow (payment, deposit, or withdraw) for the environment.
206
275
  * Create a flow
@@ -266,6 +335,35 @@ class ServerApi extends runtime.BaseAPI {
266
335
  const response = await this.createPaymentLinkServerRaw(requestParameters, initOverrides);
267
336
  return await response.value();
268
337
  }
338
+ /**
339
+ * Returns 404 if the caller is not a member of the business account (404 not 403 so we don\'t leak business-account existence).
340
+ * Server — get a business account with embedded members and signers
341
+ */
342
+ async getBusinessAccountByIdServerRaw(requestParameters, initOverrides) {
343
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
344
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getBusinessAccountByIdServer.');
345
+ }
346
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
347
+ throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling getBusinessAccountByIdServer.');
348
+ }
349
+ const queryParameters = {};
350
+ const headerParameters = {};
351
+ const response = await this.request({
352
+ path: `/server/{environmentId}/businessAccounts/{businessAccountId}`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
353
+ method: 'GET',
354
+ headers: headerParameters,
355
+ query: queryParameters,
356
+ }, initOverrides);
357
+ return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountDetail.BusinessAccountDetailFromJSON(jsonValue));
358
+ }
359
+ /**
360
+ * Returns 404 if the caller is not a member of the business account (404 not 403 so we don\'t leak business-account existence).
361
+ * Server — get a business account with embedded members and signers
362
+ */
363
+ async getBusinessAccountByIdServer(requestParameters, initOverrides) {
364
+ const response = await this.getBusinessAccountByIdServerRaw(requestParameters, initOverrides);
365
+ return await response.value();
366
+ }
269
367
  /**
270
368
  * Returns the recipient claimable fee balances across all providers.
271
369
  * Get claimable fee balances
@@ -331,6 +429,32 @@ class ServerApi extends runtime.BaseAPI {
331
429
  const response = await this.getFlowServerRaw(requestParameters, initOverrides);
332
430
  return await response.value();
333
431
  }
432
+ /**
433
+ * Resolves the userId the server itself is authenticated as. Feed it into addMember\'s targetIdentity.userId to add the server as a business-account member.
434
+ * Get the environment\'s server identity
435
+ */
436
+ async getServerIdentityServerRaw(requestParameters, initOverrides) {
437
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
438
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getServerIdentityServer.');
439
+ }
440
+ const queryParameters = {};
441
+ const headerParameters = {};
442
+ const response = await this.request({
443
+ path: `/server/{environmentId}/serverIdentity`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
444
+ method: 'GET',
445
+ headers: headerParameters,
446
+ query: queryParameters,
447
+ }, initOverrides);
448
+ return new runtime.JSONApiResponse(response, (jsonValue) => ServerIdentityResponse.ServerIdentityResponseFromJSON(jsonValue));
449
+ }
450
+ /**
451
+ * Resolves the userId the server itself is authenticated as. Feed it into addMember\'s targetIdentity.userId to add the server as a business-account member.
452
+ * Get the environment\'s server identity
453
+ */
454
+ async getServerIdentityServer(requestParameters, initOverrides) {
455
+ const response = await this.getServerIdentityServerRaw(requestParameters, initOverrides);
456
+ return await response.value();
457
+ }
334
458
  /**
335
459
  * Initiates a provider-agnostic fee claim for a recipient.
336
460
  * Initiate a fee claim
@@ -362,6 +486,33 @@ class ServerApi extends runtime.BaseAPI {
362
486
  const response = await this.initiateFlowFeeClaimServerRaw(requestParameters, initOverrides);
363
487
  return await response.value();
364
488
  }
489
+ /**
490
+ * Server — list business accounts the caller is a member of
491
+ */
492
+ async listBusinessAccountsServerRaw(requestParameters, initOverrides) {
493
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
494
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling listBusinessAccountsServer.');
495
+ }
496
+ const queryParameters = {};
497
+ if (requestParameters.externalRef) {
498
+ queryParameters['externalRef'] = requestParameters.externalRef;
499
+ }
500
+ const headerParameters = {};
501
+ const response = await this.request({
502
+ path: `/server/{environmentId}/businessAccounts`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
503
+ method: 'GET',
504
+ headers: headerParameters,
505
+ query: queryParameters,
506
+ }, initOverrides);
507
+ return new runtime.JSONApiResponse(response, (jsonValue) => BusinessAccountList.BusinessAccountListFromJSON(jsonValue));
508
+ }
509
+ /**
510
+ * Server — list business accounts the caller is a member of
511
+ */
512
+ async listBusinessAccountsServer(requestParameters, initOverrides) {
513
+ const response = await this.listBusinessAccountsServerRaw(requestParameters, initOverrides);
514
+ return await response.value();
515
+ }
365
516
  /**
366
517
  * Soft-deletes the specified WaaS wallets by ID. Only available in non-production environments.
367
518
  * Soft-delete WaaS wallets (non-production only)
@@ -10,7 +10,16 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { Flow, FlowCreateRequest, FlowCreateResponse, FlowFeeBalancesResponse, FlowFeeClaimRequest, FlowFeeClaimResponse, FlowFeeClaimSubmitRequest, FlowFeeClaimSubmitResponse, FlowModeEnum, FlowPaymentLinkCreateRequest, FlowPaymentLinkCreateResponse, SoftDeleteWaasWalletsRequest, SoftDeleteWaasWalletsResponse } from '../models';
13
+ import { AddBusinessAccountMemberSdkRequest, BusinessAccount, BusinessAccountDetail, BusinessAccountList, BusinessAccountMember, CreateBusinessAccountSdkRequest, Flow, FlowCreateRequest, FlowCreateResponse, FlowFeeBalancesResponse, FlowFeeClaimRequest, FlowFeeClaimResponse, FlowFeeClaimSubmitRequest, FlowFeeClaimSubmitResponse, FlowModeEnum, FlowPaymentLinkCreateRequest, FlowPaymentLinkCreateResponse, ServerIdentityResponse, SoftDeleteWaasWalletsRequest, SoftDeleteWaasWalletsResponse } from '../models';
14
+ export interface AddBusinessAccountMemberServerRequest {
15
+ environmentId: string;
16
+ businessAccountId: string;
17
+ addBusinessAccountMemberSdkRequest: AddBusinessAccountMemberSdkRequest;
18
+ }
19
+ export interface CreateBusinessAccountServerRequest {
20
+ environmentId: string;
21
+ createBusinessAccountSdkRequest?: CreateBusinessAccountSdkRequest;
22
+ }
14
23
  export interface CreateFlowServerRequest {
15
24
  environmentId: string;
16
25
  mode: FlowModeEnum;
@@ -20,6 +29,10 @@ export interface CreatePaymentLinkServerRequest {
20
29
  environmentId: string;
21
30
  flowPaymentLinkCreateRequest: FlowPaymentLinkCreateRequest;
22
31
  }
32
+ export interface GetBusinessAccountByIdServerRequest {
33
+ environmentId: string;
34
+ businessAccountId: string;
35
+ }
23
36
  export interface GetFlowFeeClaimBalancesServerRequest {
24
37
  environmentId: string;
25
38
  recipientAddress: string;
@@ -30,10 +43,17 @@ export interface GetFlowServerRequest {
30
43
  environmentId: string;
31
44
  mode: string;
32
45
  }
46
+ export interface GetServerIdentityServerRequest {
47
+ environmentId: string;
48
+ }
33
49
  export interface InitiateFlowFeeClaimServerRequest {
34
50
  environmentId: string;
35
51
  flowFeeClaimRequest: FlowFeeClaimRequest;
36
52
  }
53
+ export interface ListBusinessAccountsServerRequest {
54
+ environmentId: string;
55
+ externalRef?: Array<string>;
56
+ }
37
57
  export interface SoftDeleteWaasWalletsServerRequest {
38
58
  environmentId: string;
39
59
  softDeleteWaasWalletsRequest: SoftDeleteWaasWalletsRequest;
@@ -46,6 +66,26 @@ export interface SubmitFlowFeeClaimServerRequest {
46
66
  *
47
67
  */
48
68
  export declare class ServerApi extends runtime.BaseAPI {
69
+ /**
70
+ * Owner or admin only. Target user is resolved by `userId` OR `identifier + type` (email/externalUserId create-or-resolve; id direct lookup). Idempotent: an already-active member returns the existing row with 200. When the account governs `addMember` the response is 202, not 201 — first with the intent to sign, then with the proposal collecting approvals. Neither is a failure.
71
+ * Server — add a member to a business account
72
+ */
73
+ addBusinessAccountMemberServerRaw(requestParameters: AddBusinessAccountMemberServerRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<BusinessAccountMember>>;
74
+ /**
75
+ * Owner or admin only. Target user is resolved by `userId` OR `identifier + type` (email/externalUserId create-or-resolve; id direct lookup). Idempotent: an already-active member returns the existing row with 200. When the account governs `addMember` the response is 202, not 201 — first with the intent to sign, then with the proposal collecting approvals. Neither is a failure.
76
+ * Server — add a member to a business account
77
+ */
78
+ addBusinessAccountMemberServer(requestParameters: AddBusinessAccountMemberServerRequest, initOverrides?: RequestInit): Promise<BusinessAccountMember>;
79
+ /**
80
+ * 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.
81
+ * Server — create a business account
82
+ */
83
+ createBusinessAccountServerRaw(requestParameters: CreateBusinessAccountServerRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<BusinessAccount>>;
84
+ /**
85
+ * 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.
86
+ * Server — create a business account
87
+ */
88
+ createBusinessAccountServer(requestParameters: CreateBusinessAccountServerRequest, initOverrides?: RequestInit): Promise<BusinessAccount>;
49
89
  /**
50
90
  * Create a flow (payment, deposit, or withdraw) for the environment.
51
91
  * Create a flow
@@ -66,6 +106,16 @@ export declare class ServerApi extends runtime.BaseAPI {
66
106
  * Create a payment link
67
107
  */
68
108
  createPaymentLinkServer(requestParameters: CreatePaymentLinkServerRequest, initOverrides?: RequestInit): Promise<FlowPaymentLinkCreateResponse>;
109
+ /**
110
+ * Returns 404 if the caller is not a member of the business account (404 not 403 so we don\'t leak business-account existence).
111
+ * Server — get a business account with embedded members and signers
112
+ */
113
+ getBusinessAccountByIdServerRaw(requestParameters: GetBusinessAccountByIdServerRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<BusinessAccountDetail>>;
114
+ /**
115
+ * Returns 404 if the caller is not a member of the business account (404 not 403 so we don\'t leak business-account existence).
116
+ * Server — get a business account with embedded members and signers
117
+ */
118
+ getBusinessAccountByIdServer(requestParameters: GetBusinessAccountByIdServerRequest, initOverrides?: RequestInit): Promise<BusinessAccountDetail>;
69
119
  /**
70
120
  * Returns the recipient claimable fee balances across all providers.
71
121
  * Get claimable fee balances
@@ -84,6 +134,16 @@ export declare class ServerApi extends runtime.BaseAPI {
84
134
  * Get a flow by ID
85
135
  */
86
136
  getFlowServer(requestParameters: GetFlowServerRequest, initOverrides?: RequestInit): Promise<Flow>;
137
+ /**
138
+ * Resolves the userId the server itself is authenticated as. Feed it into addMember\'s targetIdentity.userId to add the server as a business-account member.
139
+ * Get the environment\'s server identity
140
+ */
141
+ getServerIdentityServerRaw(requestParameters: GetServerIdentityServerRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<ServerIdentityResponse>>;
142
+ /**
143
+ * Resolves the userId the server itself is authenticated as. Feed it into addMember\'s targetIdentity.userId to add the server as a business-account member.
144
+ * Get the environment\'s server identity
145
+ */
146
+ getServerIdentityServer(requestParameters: GetServerIdentityServerRequest, initOverrides?: RequestInit): Promise<ServerIdentityResponse>;
87
147
  /**
88
148
  * Initiates a provider-agnostic fee claim for a recipient.
89
149
  * Initiate a fee claim
@@ -94,6 +154,14 @@ export declare class ServerApi extends runtime.BaseAPI {
94
154
  * Initiate a fee claim
95
155
  */
96
156
  initiateFlowFeeClaimServer(requestParameters: InitiateFlowFeeClaimServerRequest, initOverrides?: RequestInit): Promise<FlowFeeClaimResponse>;
157
+ /**
158
+ * Server — list business accounts the caller is a member of
159
+ */
160
+ listBusinessAccountsServerRaw(requestParameters: ListBusinessAccountsServerRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<BusinessAccountList>>;
161
+ /**
162
+ * Server — list business accounts the caller is a member of
163
+ */
164
+ listBusinessAccountsServer(requestParameters: ListBusinessAccountsServerRequest, initOverrides?: RequestInit): Promise<BusinessAccountList>;
97
165
  /**
98
166
  * Soft-deletes the specified WaaS wallets by ID. Only available in non-production environments.
99
167
  * Soft-delete WaaS wallets (non-production only)
@@ -1,10 +1,11 @@
1
1
  import { BaseAPI, RequiredError, JSONApiResponse } from '../runtime.js';
2
2
  import '../models/AccessOutcomeEnum.js';
3
3
  import '../models/ExchangeKeyEnum.js';
4
- import '../models/ProviderEnum.js';
5
- import '../models/UserIdentifierTypeEnum.js';
4
+ import { AddBusinessAccountMemberSdkRequestToJSON } from '../models/AddBusinessAccountMemberSdkRequest.js';
6
5
  import '../models/BusinessAccountSignerType.js';
6
+ import '../models/ProviderEnum.js';
7
7
  import '../models/ThresholdSignatureScheme.js';
8
+ import '../models/UserIdentifierTypeEnum.js';
8
9
  import '../models/WaasChainEnum.js';
9
10
  import '../models/WaasPolicyConstraintCondition.js';
10
11
  import '../models/WaasPolicyRuleType.js';
@@ -47,10 +48,14 @@ import '../models/KycFieldType.js';
47
48
  import '../models/BillingSubscriptionPlanTypeEnum.js';
48
49
  import '../models/UnprocessableEntityErrorCode.js';
49
50
  import '../models/ChainalysisCheckResultEnum.js';
51
+ import { BusinessAccountFromJSON } from '../models/BusinessAccount.js';
50
52
  import '../models/BusinessAccountActionEnum.js';
53
+ import { BusinessAccountMemberFromJSON } from '../models/BusinessAccountMember.js';
51
54
  import '../models/BusinessAccountApprovalRequirement.js';
52
55
  import '../models/BusinessAccountApprovalsPending.js';
56
+ import { BusinessAccountDetailFromJSON } from '../models/BusinessAccountDetail.js';
53
57
  import '../models/BusinessAccountGovernedAction.js';
58
+ import { BusinessAccountListFromJSON } from '../models/BusinessAccountList.js';
54
59
  import '../models/BusinessAccountMemberRole.js';
55
60
  import '../models/BusinessAccountProposalStatus.js';
56
61
  import '../models/BusinessAccountRoleDefinition.js';
@@ -74,6 +79,7 @@ import '../models/CoinbaseOnrampFeeType.js';
74
79
  import '../models/CoinbaseOnrampOrderPaymentMethod.js';
75
80
  import '../models/CoinbaseOnrampOrderStatus.js';
76
81
  import '../models/CoinbaseOnrampOrderPaymentLinkType.js';
82
+ import { CreateBusinessAccountSdkRequestToJSON } from '../models/CreateBusinessAccountSdkRequest.js';
77
83
  import '../models/EmbeddedWalletChainEnum.js';
78
84
  import '../models/EmbeddedWalletProviderEnum.js';
79
85
  import '../models/TravelRuleData.js';
@@ -159,6 +165,7 @@ import '../models/ScreeningAddressScopeEnum.js';
159
165
  import '../models/ScreeningPolicyProviderEnum.js';
160
166
  import '../models/ScreeningPolicyScopeEnum.js';
161
167
  import '../models/ScreeningReason.js';
168
+ import { ServerIdentityResponseFromJSON } from '../models/ServerIdentityResponse.js';
162
169
  import '../models/SignMessageRawSign.js';
163
170
  import { SoftDeleteWaasWalletsRequestToJSON } from '../models/SoftDeleteWaasWalletsRequest.js';
164
171
  import { SoftDeleteWaasWalletsResponseFromJSON } from '../models/SoftDeleteWaasWalletsResponse.js';
@@ -197,6 +204,68 @@ import '../models/WalletTransactionType.js';
197
204
  *
198
205
  */
199
206
  class ServerApi extends BaseAPI {
207
+ /**
208
+ * Owner or admin only. Target user is resolved by `userId` OR `identifier + type` (email/externalUserId create-or-resolve; id direct lookup). Idempotent: an already-active member returns the existing row with 200. When the account governs `addMember` the response is 202, not 201 — first with the intent to sign, then with the proposal collecting approvals. Neither is a failure.
209
+ * Server — add a member to a business account
210
+ */
211
+ async addBusinessAccountMemberServerRaw(requestParameters, initOverrides) {
212
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
213
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling addBusinessAccountMemberServer.');
214
+ }
215
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
216
+ throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling addBusinessAccountMemberServer.');
217
+ }
218
+ if (requestParameters.addBusinessAccountMemberSdkRequest === null || requestParameters.addBusinessAccountMemberSdkRequest === undefined) {
219
+ throw new RequiredError('addBusinessAccountMemberSdkRequest', 'Required parameter requestParameters.addBusinessAccountMemberSdkRequest was null or undefined when calling addBusinessAccountMemberServer.');
220
+ }
221
+ const queryParameters = {};
222
+ const headerParameters = {};
223
+ headerParameters['Content-Type'] = 'application/json';
224
+ const response = await this.request({
225
+ path: `/server/{environmentId}/businessAccounts/{businessAccountId}/members`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
226
+ method: 'POST',
227
+ headers: headerParameters,
228
+ query: queryParameters,
229
+ body: AddBusinessAccountMemberSdkRequestToJSON(requestParameters.addBusinessAccountMemberSdkRequest),
230
+ }, initOverrides);
231
+ return new JSONApiResponse(response, (jsonValue) => BusinessAccountMemberFromJSON(jsonValue));
232
+ }
233
+ /**
234
+ * Owner or admin only. Target user is resolved by `userId` OR `identifier + type` (email/externalUserId create-or-resolve; id direct lookup). Idempotent: an already-active member returns the existing row with 200. When the account governs `addMember` the response is 202, not 201 — first with the intent to sign, then with the proposal collecting approvals. Neither is a failure.
235
+ * Server — add a member to a business account
236
+ */
237
+ async addBusinessAccountMemberServer(requestParameters, initOverrides) {
238
+ const response = await this.addBusinessAccountMemberServerRaw(requestParameters, initOverrides);
239
+ return await response.value();
240
+ }
241
+ /**
242
+ * 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.
243
+ * Server — create a business account
244
+ */
245
+ async createBusinessAccountServerRaw(requestParameters, initOverrides) {
246
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
247
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling createBusinessAccountServer.');
248
+ }
249
+ const queryParameters = {};
250
+ const headerParameters = {};
251
+ headerParameters['Content-Type'] = 'application/json';
252
+ const response = await this.request({
253
+ path: `/server/{environmentId}/businessAccounts`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
254
+ method: 'POST',
255
+ headers: headerParameters,
256
+ query: queryParameters,
257
+ body: CreateBusinessAccountSdkRequestToJSON(requestParameters.createBusinessAccountSdkRequest),
258
+ }, initOverrides);
259
+ return new JSONApiResponse(response, (jsonValue) => BusinessAccountFromJSON(jsonValue));
260
+ }
261
+ /**
262
+ * 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.
263
+ * Server — create a business account
264
+ */
265
+ async createBusinessAccountServer(requestParameters, initOverrides) {
266
+ const response = await this.createBusinessAccountServerRaw(requestParameters, initOverrides);
267
+ return await response.value();
268
+ }
200
269
  /**
201
270
  * Create a flow (payment, deposit, or withdraw) for the environment.
202
271
  * Create a flow
@@ -262,6 +331,35 @@ class ServerApi extends BaseAPI {
262
331
  const response = await this.createPaymentLinkServerRaw(requestParameters, initOverrides);
263
332
  return await response.value();
264
333
  }
334
+ /**
335
+ * Returns 404 if the caller is not a member of the business account (404 not 403 so we don\'t leak business-account existence).
336
+ * Server — get a business account with embedded members and signers
337
+ */
338
+ async getBusinessAccountByIdServerRaw(requestParameters, initOverrides) {
339
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
340
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getBusinessAccountByIdServer.');
341
+ }
342
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
343
+ throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling getBusinessAccountByIdServer.');
344
+ }
345
+ const queryParameters = {};
346
+ const headerParameters = {};
347
+ const response = await this.request({
348
+ path: `/server/{environmentId}/businessAccounts/{businessAccountId}`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
349
+ method: 'GET',
350
+ headers: headerParameters,
351
+ query: queryParameters,
352
+ }, initOverrides);
353
+ return new JSONApiResponse(response, (jsonValue) => BusinessAccountDetailFromJSON(jsonValue));
354
+ }
355
+ /**
356
+ * Returns 404 if the caller is not a member of the business account (404 not 403 so we don\'t leak business-account existence).
357
+ * Server — get a business account with embedded members and signers
358
+ */
359
+ async getBusinessAccountByIdServer(requestParameters, initOverrides) {
360
+ const response = await this.getBusinessAccountByIdServerRaw(requestParameters, initOverrides);
361
+ return await response.value();
362
+ }
265
363
  /**
266
364
  * Returns the recipient claimable fee balances across all providers.
267
365
  * Get claimable fee balances
@@ -327,6 +425,32 @@ class ServerApi extends BaseAPI {
327
425
  const response = await this.getFlowServerRaw(requestParameters, initOverrides);
328
426
  return await response.value();
329
427
  }
428
+ /**
429
+ * Resolves the userId the server itself is authenticated as. Feed it into addMember\'s targetIdentity.userId to add the server as a business-account member.
430
+ * Get the environment\'s server identity
431
+ */
432
+ async getServerIdentityServerRaw(requestParameters, initOverrides) {
433
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
434
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getServerIdentityServer.');
435
+ }
436
+ const queryParameters = {};
437
+ const headerParameters = {};
438
+ const response = await this.request({
439
+ path: `/server/{environmentId}/serverIdentity`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
440
+ method: 'GET',
441
+ headers: headerParameters,
442
+ query: queryParameters,
443
+ }, initOverrides);
444
+ return new JSONApiResponse(response, (jsonValue) => ServerIdentityResponseFromJSON(jsonValue));
445
+ }
446
+ /**
447
+ * Resolves the userId the server itself is authenticated as. Feed it into addMember\'s targetIdentity.userId to add the server as a business-account member.
448
+ * Get the environment\'s server identity
449
+ */
450
+ async getServerIdentityServer(requestParameters, initOverrides) {
451
+ const response = await this.getServerIdentityServerRaw(requestParameters, initOverrides);
452
+ return await response.value();
453
+ }
330
454
  /**
331
455
  * Initiates a provider-agnostic fee claim for a recipient.
332
456
  * Initiate a fee claim
@@ -358,6 +482,33 @@ class ServerApi extends BaseAPI {
358
482
  const response = await this.initiateFlowFeeClaimServerRaw(requestParameters, initOverrides);
359
483
  return await response.value();
360
484
  }
485
+ /**
486
+ * Server — list business accounts the caller is a member of
487
+ */
488
+ async listBusinessAccountsServerRaw(requestParameters, initOverrides) {
489
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
490
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling listBusinessAccountsServer.');
491
+ }
492
+ const queryParameters = {};
493
+ if (requestParameters.externalRef) {
494
+ queryParameters['externalRef'] = requestParameters.externalRef;
495
+ }
496
+ const headerParameters = {};
497
+ const response = await this.request({
498
+ path: `/server/{environmentId}/businessAccounts`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
499
+ method: 'GET',
500
+ headers: headerParameters,
501
+ query: queryParameters,
502
+ }, initOverrides);
503
+ return new JSONApiResponse(response, (jsonValue) => BusinessAccountListFromJSON(jsonValue));
504
+ }
505
+ /**
506
+ * Server — list business accounts the caller is a member of
507
+ */
508
+ async listBusinessAccountsServer(requestParameters, initOverrides) {
509
+ const response = await this.listBusinessAccountsServerRaw(requestParameters, initOverrides);
510
+ return await response.value();
511
+ }
361
512
  /**
362
513
  * Soft-deletes the specified WaaS wallets by ID. Only available in non-production environments.
363
514
  * Soft-delete WaaS wallets (non-production only)
package/src/index.cjs CHANGED
@@ -742,6 +742,7 @@ var SdkViewType = require('./models/SdkViewType.cjs');
742
742
  var SdkViewUpdateRequest = require('./models/SdkViewUpdateRequest.cjs');
743
743
  var SdkViewsResponse = require('./models/SdkViewsResponse.cjs');
744
744
  var SecurityNotifications = require('./models/SecurityNotifications.cjs');
745
+ var ServerIdentityResponse = require('./models/ServerIdentityResponse.cjs');
745
746
  var Session = require('./models/Session.cjs');
746
747
  var SessionsHeatmapResult = require('./models/SessionsHeatmapResult.cjs');
747
748
  var SessionsResponse = require('./models/SessionsResponse.cjs');
@@ -3719,6 +3720,9 @@ exports.SdkViewsResponseToJSON = SdkViewsResponse.SdkViewsResponseToJSON;
3719
3720
  exports.SecurityNotificationsFromJSON = SecurityNotifications.SecurityNotificationsFromJSON;
3720
3721
  exports.SecurityNotificationsFromJSONTyped = SecurityNotifications.SecurityNotificationsFromJSONTyped;
3721
3722
  exports.SecurityNotificationsToJSON = SecurityNotifications.SecurityNotificationsToJSON;
3723
+ exports.ServerIdentityResponseFromJSON = ServerIdentityResponse.ServerIdentityResponseFromJSON;
3724
+ exports.ServerIdentityResponseFromJSONTyped = ServerIdentityResponse.ServerIdentityResponseFromJSONTyped;
3725
+ exports.ServerIdentityResponseToJSON = ServerIdentityResponse.ServerIdentityResponseToJSON;
3722
3726
  exports.SessionFromJSON = Session.SessionFromJSON;
3723
3727
  exports.SessionFromJSONTyped = Session.SessionFromJSONTyped;
3724
3728
  exports.SessionToJSON = Session.SessionToJSON;
package/src/index.js CHANGED
@@ -738,6 +738,7 @@ export { SdkViewType, SdkViewTypeFromJSON, SdkViewTypeFromJSONTyped, SdkViewType
738
738
  export { SdkViewUpdateRequestFromJSON, SdkViewUpdateRequestFromJSONTyped, SdkViewUpdateRequestToJSON } from './models/SdkViewUpdateRequest.js';
739
739
  export { SdkViewsResponseFromJSON, SdkViewsResponseFromJSONTyped, SdkViewsResponseToJSON } from './models/SdkViewsResponse.js';
740
740
  export { SecurityNotificationsFromJSON, SecurityNotificationsFromJSONTyped, SecurityNotificationsToJSON } from './models/SecurityNotifications.js';
741
+ export { ServerIdentityResponseFromJSON, ServerIdentityResponseFromJSONTyped, ServerIdentityResponseToJSON } from './models/ServerIdentityResponse.js';
741
742
  export { SessionFromJSON, SessionFromJSONTyped, SessionToJSON } from './models/Session.js';
742
743
  export { SessionsHeatmapResultFromJSON, SessionsHeatmapResultFromJSONTyped, SessionsHeatmapResultToJSON } from './models/SessionsHeatmapResult.js';
743
744
  export { SessionsResponseFromJSON, SessionsResponseFromJSONTyped, SessionsResponseToJSON } from './models/SessionsResponse.js';
@@ -12,7 +12,6 @@ var BusinessAccountApprovalRequirementStatus = require('./BusinessAccountApprova
12
12
  */
13
13
  exports.BusinessAccountApprovalsPendingReasonEnum = void 0;
14
14
  (function (BusinessAccountApprovalsPendingReasonEnum) {
15
- BusinessAccountApprovalsPendingReasonEnum["IntentRequired"] = "INTENT_REQUIRED";
16
15
  BusinessAccountApprovalsPendingReasonEnum["ApprovalsRequired"] = "APPROVALS_REQUIRED";
17
16
  })(exports.BusinessAccountApprovalsPendingReasonEnum || (exports.BusinessAccountApprovalsPendingReasonEnum = {}));
18
17
  function BusinessAccountApprovalsPendingFromJSON(json) {
@@ -26,8 +25,8 @@ function BusinessAccountApprovalsPendingFromJSONTyped(json, ignoreDiscriminator)
26
25
  'reason': json['reason'],
27
26
  'intent': json['intent'],
28
27
  'message': !runtime.exists(json, 'message') ? undefined : json['message'],
29
- 'proposalId': !runtime.exists(json, 'proposalId') ? undefined : json['proposalId'],
30
- 'approvalRequirements': !runtime.exists(json, 'approvalRequirements') ? undefined : (json['approvalRequirements'].map(BusinessAccountApprovalRequirementStatus.BusinessAccountApprovalRequirementStatusFromJSON)),
28
+ 'proposalId': json['proposalId'],
29
+ 'approvalRequirements': (json['approvalRequirements'].map(BusinessAccountApprovalRequirementStatus.BusinessAccountApprovalRequirementStatusFromJSON)),
31
30
  };
32
31
  }
33
32
  function BusinessAccountApprovalsPendingToJSON(value) {
@@ -42,7 +41,7 @@ function BusinessAccountApprovalsPendingToJSON(value) {
42
41
  'intent': value.intent,
43
42
  'message': value.message,
44
43
  'proposalId': value.proposalId,
45
- 'approvalRequirements': value.approvalRequirements === undefined ? undefined : (value.approvalRequirements.map(BusinessAccountApprovalRequirementStatus.BusinessAccountApprovalRequirementStatusToJSON)),
44
+ 'approvalRequirements': (value.approvalRequirements.map(BusinessAccountApprovalRequirementStatus.BusinessAccountApprovalRequirementStatusToJSON)),
46
45
  };
47
46
  }
48
47
 
@@ -11,8 +11,8 @@
11
11
  */
12
12
  import { BusinessAccountApprovalRequirementStatus } from './BusinessAccountApprovalRequirementStatus';
13
13
  /**
14
- * The action is governed and has not been authorized yet. Not a refusal: the caller may perform it, they have simply not collected the consent it requires. `INTENT_REQUIRED` means nothing is signed yet — sign `intent` and resend. `APPROVALS_REQUIRED` means the intent is signed and recorded as `proposalId`, and `approvalRequirements` says what each rule still needs.
15
- * One schema for both, rather than a oneOf, so a generated client has a single type to read `reason` off.
14
+ * The action is governed, signed, and short of quorum — not a refusal: the caller may perform it, they have simply not collected every approval it requires. `proposalId` is the proposal collecting approvals, and `approvalRequirements` says what each rule still needs.
15
+ * A missing signed intent is a different case entirely and is reported as `422 intent_required` (see `UnprocessableEntity`), not this response — the caller made a mistake (nothing to sign yet was supplied) rather than something outstanding.
16
16
  * @export
17
17
  * @interface BusinessAccountApprovalsPending
18
18
  */
@@ -39,24 +39,23 @@ export interface BusinessAccountApprovalsPending {
39
39
  */
40
40
  message?: string;
41
41
  /**
42
- * The proposal collecting approvals. Absent for `INTENT_REQUIRED` — an unsigned intent is not evidence, so no proposal is opened for one.
42
+ * The proposal collecting approvals.
43
43
  * @type {string}
44
44
  * @memberof BusinessAccountApprovalsPending
45
45
  */
46
- proposalId?: string;
46
+ proposalId: string;
47
47
  /**
48
- * Set for `APPROVALS_REQUIRED`. Every matching requirement, met or not, so a client can render progress per rule.
48
+ * Every matching requirement, met or not, so a client can render progress per rule.
49
49
  * @type {Array<BusinessAccountApprovalRequirementStatus>}
50
50
  * @memberof BusinessAccountApprovalsPending
51
51
  */
52
- approvalRequirements?: Array<BusinessAccountApprovalRequirementStatus>;
52
+ approvalRequirements: Array<BusinessAccountApprovalRequirementStatus>;
53
53
  }
54
54
  /**
55
55
  * @export
56
56
  * @enum {string}
57
57
  */
58
58
  export declare enum BusinessAccountApprovalsPendingReasonEnum {
59
- IntentRequired = "INTENT_REQUIRED",
60
59
  ApprovalsRequired = "APPROVALS_REQUIRED"
61
60
  }
62
61
  export declare function BusinessAccountApprovalsPendingFromJSON(json: any): BusinessAccountApprovalsPending;
@@ -8,7 +8,6 @@ import { BusinessAccountApprovalRequirementStatusFromJSON, BusinessAccountApprov
8
8
  */
9
9
  var BusinessAccountApprovalsPendingReasonEnum;
10
10
  (function (BusinessAccountApprovalsPendingReasonEnum) {
11
- BusinessAccountApprovalsPendingReasonEnum["IntentRequired"] = "INTENT_REQUIRED";
12
11
  BusinessAccountApprovalsPendingReasonEnum["ApprovalsRequired"] = "APPROVALS_REQUIRED";
13
12
  })(BusinessAccountApprovalsPendingReasonEnum || (BusinessAccountApprovalsPendingReasonEnum = {}));
14
13
  function BusinessAccountApprovalsPendingFromJSON(json) {
@@ -22,8 +21,8 @@ function BusinessAccountApprovalsPendingFromJSONTyped(json, ignoreDiscriminator)
22
21
  'reason': json['reason'],
23
22
  'intent': json['intent'],
24
23
  'message': !exists(json, 'message') ? undefined : json['message'],
25
- 'proposalId': !exists(json, 'proposalId') ? undefined : json['proposalId'],
26
- 'approvalRequirements': !exists(json, 'approvalRequirements') ? undefined : (json['approvalRequirements'].map(BusinessAccountApprovalRequirementStatusFromJSON)),
24
+ 'proposalId': json['proposalId'],
25
+ 'approvalRequirements': (json['approvalRequirements'].map(BusinessAccountApprovalRequirementStatusFromJSON)),
27
26
  };
28
27
  }
29
28
  function BusinessAccountApprovalsPendingToJSON(value) {
@@ -38,7 +37,7 @@ function BusinessAccountApprovalsPendingToJSON(value) {
38
37
  'intent': value.intent,
39
38
  'message': value.message,
40
39
  'proposalId': value.proposalId,
41
- 'approvalRequirements': value.approvalRequirements === undefined ? undefined : (value.approvalRequirements.map(BusinessAccountApprovalRequirementStatusToJSON)),
40
+ 'approvalRequirements': (value.approvalRequirements.map(BusinessAccountApprovalRequirementStatusToJSON)),
42
41
  };
43
42
  }
44
43
 
@@ -0,0 +1,43 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ /* tslint:disable */
6
+ /* eslint-disable */
7
+ /**
8
+ * Dashboard API
9
+ * Dashboard API documentation
10
+ *
11
+ * The version of the OpenAPI document: 1.0.0
12
+ *
13
+ *
14
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
15
+ * https://openapi-generator.tech
16
+ * Do not edit the class manually.
17
+ */
18
+ function ServerIdentityResponseFromJSON(json) {
19
+ return ServerIdentityResponseFromJSONTyped(json);
20
+ }
21
+ function ServerIdentityResponseFromJSONTyped(json, ignoreDiscriminator) {
22
+ if ((json === undefined) || (json === null)) {
23
+ return json;
24
+ }
25
+ return {
26
+ 'userId': json['userId'],
27
+ };
28
+ }
29
+ function ServerIdentityResponseToJSON(value) {
30
+ if (value === undefined) {
31
+ return undefined;
32
+ }
33
+ if (value === null) {
34
+ return null;
35
+ }
36
+ return {
37
+ 'userId': value.userId,
38
+ };
39
+ }
40
+
41
+ exports.ServerIdentityResponseFromJSON = ServerIdentityResponseFromJSON;
42
+ exports.ServerIdentityResponseFromJSONTyped = ServerIdentityResponseFromJSONTyped;
43
+ exports.ServerIdentityResponseToJSON = ServerIdentityResponseToJSON;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Dashboard API
3
+ * Dashboard API documentation
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface ServerIdentityResponse
16
+ */
17
+ export interface ServerIdentityResponse {
18
+ /**
19
+ * The environment's server identity. Pass this as targetIdentity.userId
20
+ * to addMember to add the server as a business-account member.
21
+ * @type {string}
22
+ * @memberof ServerIdentityResponse
23
+ */
24
+ userId: string | null;
25
+ }
26
+ export declare function ServerIdentityResponseFromJSON(json: any): ServerIdentityResponse;
27
+ export declare function ServerIdentityResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ServerIdentityResponse;
28
+ export declare function ServerIdentityResponseToJSON(value?: ServerIdentityResponse | null): any;
@@ -0,0 +1,37 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Dashboard API
5
+ * Dashboard API documentation
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ function ServerIdentityResponseFromJSON(json) {
15
+ return ServerIdentityResponseFromJSONTyped(json);
16
+ }
17
+ function ServerIdentityResponseFromJSONTyped(json, ignoreDiscriminator) {
18
+ if ((json === undefined) || (json === null)) {
19
+ return json;
20
+ }
21
+ return {
22
+ 'userId': json['userId'],
23
+ };
24
+ }
25
+ function ServerIdentityResponseToJSON(value) {
26
+ if (value === undefined) {
27
+ return undefined;
28
+ }
29
+ if (value === null) {
30
+ return null;
31
+ }
32
+ return {
33
+ 'userId': value.userId,
34
+ };
35
+ }
36
+
37
+ export { ServerIdentityResponseFromJSON, ServerIdentityResponseFromJSONTyped, ServerIdentityResponseToJSON };
@@ -30,6 +30,7 @@ exports.UnprocessableEntityErrorCode = void 0;
30
30
  UnprocessableEntityErrorCode["UnknownTransferError"] = "unknown_transfer_error";
31
31
  UnprocessableEntityErrorCode["TransferMfaRequired"] = "transfer_mfa_required";
32
32
  UnprocessableEntityErrorCode["TransferMfaFailed"] = "transfer_mfa_failed";
33
+ UnprocessableEntityErrorCode["IntentRequired"] = "intent_required";
33
34
  UnprocessableEntityErrorCode["InvalidTransferFunds"] = "invalid_transfer_funds";
34
35
  UnprocessableEntityErrorCode["InvalidTransferCurrency"] = "invalid_transfer_currency";
35
36
  UnprocessableEntityErrorCode["InvalidExchangeProvider"] = "invalid_exchange_provider";
@@ -23,6 +23,7 @@ export declare enum UnprocessableEntityErrorCode {
23
23
  UnknownTransferError = "unknown_transfer_error",
24
24
  TransferMfaRequired = "transfer_mfa_required",
25
25
  TransferMfaFailed = "transfer_mfa_failed",
26
+ IntentRequired = "intent_required",
26
27
  InvalidTransferFunds = "invalid_transfer_funds",
27
28
  InvalidTransferCurrency = "invalid_transfer_currency",
28
29
  InvalidExchangeProvider = "invalid_exchange_provider",
@@ -26,6 +26,7 @@ var UnprocessableEntityErrorCode;
26
26
  UnprocessableEntityErrorCode["UnknownTransferError"] = "unknown_transfer_error";
27
27
  UnprocessableEntityErrorCode["TransferMfaRequired"] = "transfer_mfa_required";
28
28
  UnprocessableEntityErrorCode["TransferMfaFailed"] = "transfer_mfa_failed";
29
+ UnprocessableEntityErrorCode["IntentRequired"] = "intent_required";
29
30
  UnprocessableEntityErrorCode["InvalidTransferFunds"] = "invalid_transfer_funds";
30
31
  UnprocessableEntityErrorCode["InvalidTransferCurrency"] = "invalid_transfer_currency";
31
32
  UnprocessableEntityErrorCode["InvalidExchangeProvider"] = "invalid_exchange_provider";
@@ -20,6 +20,7 @@ function UnprocessableEntityErrorPayloadFromJSONTyped(json, ignoreDiscriminator)
20
20
  'embeddedWalletName': !runtime.exists(json, 'embeddedWalletName') ? undefined : json['embeddedWalletName'],
21
21
  'embeddedSocialSigninProvider': !runtime.exists(json, 'embeddedSocialSigninProvider') ? undefined : ProviderEnum.ProviderEnumFromJSON(json['embeddedSocialSigninProvider']),
22
22
  'mergeConflicts': !runtime.exists(json, 'mergeConflicts') ? undefined : MergeConflicts.MergeConflictsFromJSON(json['mergeConflicts']),
23
+ 'intent': !runtime.exists(json, 'intent') ? undefined : json['intent'],
23
24
  'additionalMessages': !runtime.exists(json, 'additionalMessages') ? undefined : json['additionalMessages'],
24
25
  };
25
26
  }
@@ -36,6 +37,7 @@ function UnprocessableEntityErrorPayloadToJSON(value) {
36
37
  'embeddedWalletName': value.embeddedWalletName,
37
38
  'embeddedSocialSigninProvider': ProviderEnum.ProviderEnumToJSON(value.embeddedSocialSigninProvider),
38
39
  'mergeConflicts': MergeConflicts.MergeConflictsToJSON(value.mergeConflicts),
40
+ 'intent': value.intent,
39
41
  'additionalMessages': value.additionalMessages,
40
42
  };
41
43
  }
@@ -47,6 +47,15 @@ export interface UnprocessableEntityErrorPayload {
47
47
  * @memberof UnprocessableEntityErrorPayload
48
48
  */
49
49
  mergeConflicts?: MergeConflicts;
50
+ /**
51
+ * The initiator's proposal, signed with their session key. Built by the API, not the client — sign these exact bytes verbatim, because re-serializing can change them and invalidate the signature.
52
+ * `autoExecute` is inside the signed bytes, so an approver consents to it and nothing can flip it afterwards.
53
+ * @type {{ [key: string]: object; }}
54
+ * @memberof UnprocessableEntityErrorPayload
55
+ */
56
+ intent?: {
57
+ [key: string]: object;
58
+ };
50
59
  /**
51
60
  * List of additional validation error messages
52
61
  * @type {Array<string>}
@@ -16,6 +16,7 @@ function UnprocessableEntityErrorPayloadFromJSONTyped(json, ignoreDiscriminator)
16
16
  'embeddedWalletName': !exists(json, 'embeddedWalletName') ? undefined : json['embeddedWalletName'],
17
17
  'embeddedSocialSigninProvider': !exists(json, 'embeddedSocialSigninProvider') ? undefined : ProviderEnumFromJSON(json['embeddedSocialSigninProvider']),
18
18
  'mergeConflicts': !exists(json, 'mergeConflicts') ? undefined : MergeConflictsFromJSON(json['mergeConflicts']),
19
+ 'intent': !exists(json, 'intent') ? undefined : json['intent'],
19
20
  'additionalMessages': !exists(json, 'additionalMessages') ? undefined : json['additionalMessages'],
20
21
  };
21
22
  }
@@ -32,6 +33,7 @@ function UnprocessableEntityErrorPayloadToJSON(value) {
32
33
  'embeddedWalletName': value.embeddedWalletName,
33
34
  'embeddedSocialSigninProvider': ProviderEnumToJSON(value.embeddedSocialSigninProvider),
34
35
  'mergeConflicts': MergeConflictsToJSON(value.mergeConflicts),
36
+ 'intent': value.intent,
35
37
  'additionalMessages': value.additionalMessages,
36
38
  };
37
39
  }
@@ -685,6 +685,7 @@ export * from './SdkViewType';
685
685
  export * from './SdkViewUpdateRequest';
686
686
  export * from './SdkViewsResponse';
687
687
  export * from './SecurityNotifications';
688
+ export * from './ServerIdentityResponse';
688
689
  export * from './Session';
689
690
  export * from './SessionsHeatmapResult';
690
691
  export * from './SessionsResponse';