@dynamic-labs/sdk-api 0.0.1126 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/apis/SDKApi.cjs +67 -6
- package/src/apis/SDKApi.d.ts +33 -7
- package/src/apis/SDKApi.js +67 -6
- package/src/models/AddBusinessAccountSignerSdkRequest.d.ts +1 -1
- package/src/models/WaasTransactionBroadcastErrorPayload.cjs +1 -1
- package/src/models/WaasTransactionBroadcastErrorPayload.d.ts +1 -1
- package/src/models/WaasTransactionBroadcastErrorPayload.js +1 -1
package/package.json
CHANGED
package/src/apis/SDKApi.cjs
CHANGED
|
@@ -58,7 +58,6 @@ var MFADevice = require('../models/MFADevice.cjs');
|
|
|
58
58
|
var BusinessAccount = require('../models/BusinessAccount.cjs');
|
|
59
59
|
var BusinessAccountDetail = require('../models/BusinessAccountDetail.cjs');
|
|
60
60
|
var BusinessAccountMember = require('../models/BusinessAccountMember.cjs');
|
|
61
|
-
var BusinessAccountSigner = require('../models/BusinessAccountSigner.cjs');
|
|
62
61
|
var BusinessAccountList = require('../models/BusinessAccountList.cjs');
|
|
63
62
|
require('../models/CaptchaProviderEnum.cjs');
|
|
64
63
|
require('../models/DestinationTypeEnum.cjs');
|
|
@@ -3735,6 +3734,42 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
3735
3734
|
async getBackupTokenOptions(requestParameters, initOverrides) {
|
|
3736
3735
|
await this.getBackupTokenOptionsRaw(requestParameters, initOverrides);
|
|
3737
3736
|
}
|
|
3737
|
+
/**
|
|
3738
|
+
* Returns the Composition account-Layer content for the business account — the Rules that apply to every wallet in the business account. BA owner/admin only. Returns 404 if the caller is not a qualifying owner/admin of the business account, or if the account-Layer has not been minted yet.
|
|
3739
|
+
* Get the business account\'s account-Layer Rules
|
|
3740
|
+
*/
|
|
3741
|
+
async getBusinessAccountPolicyLayerRaw(requestParameters, initOverrides) {
|
|
3742
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
3743
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getBusinessAccountPolicyLayer.');
|
|
3744
|
+
}
|
|
3745
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
3746
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling getBusinessAccountPolicyLayer.');
|
|
3747
|
+
}
|
|
3748
|
+
const queryParameters = {};
|
|
3749
|
+
const headerParameters = {};
|
|
3750
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
3751
|
+
const token = this.configuration.accessToken;
|
|
3752
|
+
const tokenString = await token("bearerAuth", []);
|
|
3753
|
+
if (tokenString) {
|
|
3754
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
3755
|
+
}
|
|
3756
|
+
}
|
|
3757
|
+
const response = await this.request({
|
|
3758
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/policy-layer`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
3759
|
+
method: 'GET',
|
|
3760
|
+
headers: headerParameters,
|
|
3761
|
+
query: queryParameters,
|
|
3762
|
+
}, initOverrides);
|
|
3763
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WaasPolicyLayerResponse.WaasPolicyLayerResponseFromJSON(jsonValue));
|
|
3764
|
+
}
|
|
3765
|
+
/**
|
|
3766
|
+
* Returns the Composition account-Layer content for the business account — the Rules that apply to every wallet in the business account. BA owner/admin only. Returns 404 if the caller is not a qualifying owner/admin of the business account, or if the account-Layer has not been minted yet.
|
|
3767
|
+
* Get the business account\'s account-Layer Rules
|
|
3768
|
+
*/
|
|
3769
|
+
async getBusinessAccountPolicyLayer(requestParameters, initOverrides) {
|
|
3770
|
+
const response = await this.getBusinessAccountPolicyLayerRaw(requestParameters, initOverrides);
|
|
3771
|
+
return await response.value();
|
|
3772
|
+
}
|
|
3738
3773
|
/**
|
|
3739
3774
|
* Deprecated: use GET /sdk/{environmentId}/flow/{flowId} instead.
|
|
3740
3775
|
* Get a checkout transaction by ID
|
|
@@ -8843,8 +8878,8 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
8843
8878
|
return await response.value();
|
|
8844
8879
|
}
|
|
8845
8880
|
/**
|
|
8846
|
-
*
|
|
8847
|
-
* SDK — add a signer to a wallet in a business account
|
|
8881
|
+
* Adds a signer to a business-account wallet by running a same-parties 2/2 -> 2/2 MPC reshare ceremony. The caller must hold an active share on the wallet (only existing share-holders can reshare). The target user is resolved the same way as addMember and, if absent, is created and added to the account. The response is `text/event-stream` (NOT JSON): clients consume it via EventSource and receive `room_created` and `ceremony_complete` events; the new signer share is delivered to the initiating client (iframe) via Sodot\'s relay and backed up to the client-keyshare service on the target\'s behalf.
|
|
8882
|
+
* SDK — add a signer to a wallet in a business account
|
|
8848
8883
|
*/
|
|
8849
8884
|
async sdkAddBusinessAccountSignerRaw(requestParameters, initOverrides) {
|
|
8850
8885
|
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
@@ -8876,11 +8911,11 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
8876
8911
|
query: queryParameters,
|
|
8877
8912
|
body: AddBusinessAccountSignerSdkRequest.AddBusinessAccountSignerSdkRequestToJSON(requestParameters.addBusinessAccountSignerSdkRequest),
|
|
8878
8913
|
}, initOverrides);
|
|
8879
|
-
return new runtime.
|
|
8914
|
+
return new runtime.TextApiResponse(response);
|
|
8880
8915
|
}
|
|
8881
8916
|
/**
|
|
8882
|
-
*
|
|
8883
|
-
* SDK — add a signer to a wallet in a business account
|
|
8917
|
+
* Adds a signer to a business-account wallet by running a same-parties 2/2 -> 2/2 MPC reshare ceremony. The caller must hold an active share on the wallet (only existing share-holders can reshare). The target user is resolved the same way as addMember and, if absent, is created and added to the account. The response is `text/event-stream` (NOT JSON): clients consume it via EventSource and receive `room_created` and `ceremony_complete` events; the new signer share is delivered to the initiating client (iframe) via Sodot\'s relay and backed up to the client-keyshare service on the target\'s behalf.
|
|
8918
|
+
* SDK — add a signer to a wallet in a business account
|
|
8884
8919
|
*/
|
|
8885
8920
|
async sdkAddBusinessAccountSigner(requestParameters, initOverrides) {
|
|
8886
8921
|
const response = await this.sdkAddBusinessAccountSignerRaw(requestParameters, initOverrides);
|
|
@@ -8990,6 +9025,32 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
8990
9025
|
async sdkBusinessAccountMembersOptions(requestParameters, initOverrides) {
|
|
8991
9026
|
await this.sdkBusinessAccountMembersOptionsRaw(requestParameters, initOverrides);
|
|
8992
9027
|
}
|
|
9028
|
+
/**
|
|
9029
|
+
* Options call for this endpoint
|
|
9030
|
+
*/
|
|
9031
|
+
async sdkBusinessAccountPolicyLayerOptionsRaw(requestParameters, initOverrides) {
|
|
9032
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9033
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountPolicyLayerOptions.');
|
|
9034
|
+
}
|
|
9035
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9036
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountPolicyLayerOptions.');
|
|
9037
|
+
}
|
|
9038
|
+
const queryParameters = {};
|
|
9039
|
+
const headerParameters = {};
|
|
9040
|
+
const response = await this.request({
|
|
9041
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/policy-layer`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
9042
|
+
method: 'OPTIONS',
|
|
9043
|
+
headers: headerParameters,
|
|
9044
|
+
query: queryParameters,
|
|
9045
|
+
}, initOverrides);
|
|
9046
|
+
return new runtime.VoidApiResponse(response);
|
|
9047
|
+
}
|
|
9048
|
+
/**
|
|
9049
|
+
* Options call for this endpoint
|
|
9050
|
+
*/
|
|
9051
|
+
async sdkBusinessAccountPolicyLayerOptions(requestParameters, initOverrides) {
|
|
9052
|
+
await this.sdkBusinessAccountPolicyLayerOptionsRaw(requestParameters, initOverrides);
|
|
9053
|
+
}
|
|
8993
9054
|
/**
|
|
8994
9055
|
* Options call for this endpoint
|
|
8995
9056
|
*/
|
package/src/apis/SDKApi.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import { Account, AddBusinessAccountMemberSdkRequest, AddBusinessAccountSignerSdkRequest, AleoCuratedPricesResponse, AleoProverEncryptedRequest, AleoProverPubkeyResponse, AttachSourceRequest, BackupKeySharesToLocationsRequest, BackupKeySharesToLocationsResponse, BusinessAccount, BusinessAccountDetail, BusinessAccountList, BusinessAccountMember,
|
|
13
|
+
import { Account, AddBusinessAccountMemberSdkRequest, AddBusinessAccountSignerSdkRequest, AleoCuratedPricesResponse, AleoProverEncryptedRequest, AleoProverPubkeyResponse, AttachSourceRequest, BackupKeySharesToLocationsRequest, BackupKeySharesToLocationsResponse, BusinessAccount, BusinessAccountDetail, BusinessAccountList, BusinessAccountMember, ChainEnum, CheckoutTransaction, CheckoutTransactionCreateRequest, CheckoutTransactionCreateResponse, CoinbaseOnrampGetBuyUrlRequest, CoinbaseOnrampGetBuyUrlResponse, CoinbaseOnrampOrderCreateRequest, CoinbaseOnrampOrderResponse, CompletePasskeyRecoveryRequest, ConnectRequest, CreateBusinessAccountSdkRequest, CreateEmbeddedWalletsRequest, CreateExchangeTransferRequest, CreateRoomsRequest, CreateRoomsResponse, CreateRoomsWithoutWalletIdRequest, CreateRoomsWithoutWalletIdResponse, CreateWaasAccountRequest, CreateWalletAccountRequest, CryptoDotComPaymentCreateRequest, CryptoDotComPaymentResponse, Currency, DelegatedShareDeliveryRequest, DelegatedShareDeliveryResponse, DeleteDeviceRegistrationResponse, DeleteEmbeddedWalletsRequest, DeleteUserPasskeyRequest, DeviceRegistrationsResponse, EmailProviderResponse, EmailVerificationCreateRequest, EmailVerificationCreateResponse, EmailVerificationMfaRequest, EmailVerificationRetryRequest, EmailVerificationVerifyRequest, EmbeddedWalletAuthToken, EmbeddedWalletAuthType, EmbeddedWalletChainEnum, EmbeddedWalletPasscodeClaimRequest, EmbeddedWalletSecret, ExchangeKeyEnum, ExchangeTransaction, ExchangeTransferResponse, ExportAleoViewKeyRequest, ExportEmbeddedWalletResponse, ExportWaasWalletPrivateKeyRequest, ExternalAuthAssertionResponse, ExternalAuthSigninRequest, FarcasterSignInRequest, Flow, FlowAttachSourceRequest, FlowPrepareSigningRequest, FlowQuoteRequest, FlowRecordBroadcastRequest, FlowSourceResponse, GeneratedTokenResponse, GetAvailableEVMGaslessRelayerResponse, GetEVMSponsoredTransactionStatusResponse, GetPasskeyAuthenticationOptionsResponse, GetPasskeyRegistrationOptionsResponse, GetUserPasskeysResponse, GlobalWalletConnection, GlobalWalletConnectionCreateRequest, GlobalWalletSettings, HealthcheckResponse, ImportWaasPrivateKeyRequest, InitEmailAuthRequest, InitEmailAuthResponse, InitPasskeyRecoveryRequest, InitPasskeyRecoveryResponse, InlineObject1, InlineObject2, InlineObject3, InlineObject4, InlineObject5, InlineResponse2001, InlineResponse2002, InlineResponse2003, InlineResponse2004, InlineResponse2005, InlineResponse2006, InlineResponse2007, InlineResponse2008, InlineResponse2009, JwksResponse, LinkBusinessAccountWalletSdkRequest, MFAAuthRecoveryDevicePostRequest, MFAAuthTotpDevicePostRequest, MFADevice, MFAGetRecoveryCodesResponse, MFAListDevicesResponse, MFAMethodsResponse, MFARegenRecoveryCodesResponse, MFARegisterPasskeyDeviceGetResponse, MFARegisterPasskeyDevicePostRequest, MFARegisterTotpDeviceGetResponse, MFARegisterTotpDevicePostRequest, MFAUpdateDeviceRequest, MergeUserConflictResolutions, MoonPayCurrenciesResponse, MultichainAccountBalanceResponse, MultichainAccountBalancesRequest, NetworkConfigurationResponse, NonceResponse, NoncesResponse, OauthInitAuthRequest, OauthProviderLoginUrl, OauthRequest, OauthResultRequest, OauthResultResponse, OpenRoomResponse, OpenRoomResponseForReshare, OpenRoomResponseWithServerKeygenIds, PasskeyAuthRequest, PasskeyRegisterRequest, PrefetchRequest, ProjectSettings, ProviderEnum, PublishEvents, RealtimeAuthTokenResponse, RecoverMultipleClientKeySharesRequest, RecoverMultipleClientKeySharesResponse, RefreshKeySharesRequest, RefreshKeySharesResponse, RegisterEmbeddedWalletSessionKeyResponse, RegisterSessionKeyRequest, ReshareRequest, ScanWebsiteUrlRequest, ScanWebsiteUrlResponse, ScreenTransactionRequest, ScreenTransactionResponse, SdkSettingsRequest, SdkUser, SignAleoRequestWithWaasRequest, SignMessageWithWaasRequest, SimulateEVMTransactionRequest, SimulateSVMTransactionRequest, SimulateTransactionResponse, SimulateUserOpRequest, SmsVerificationCreateRequest, SmsVerificationCreateResponse, SmsVerificationRetryRequest, SmsVerificationVerifyRequest, SolanaTransactionOptimizationRequest, SolanaTransactionOptimizationResponse, SponsorEVMTransactionRequest, SponsorEVMTransactionResponse, SponsorSVMTransactionRequest, SponsorSVMTransactionResponse, SsoProviderCheckRequest, SsoProviderCheckResponse, StepUpCheckRequest, StepUpCheckResponse, SupportedOfframpsResponse, SupportedOnrampsResponse, SwapQuoteRequest, SwapQuoteResponse, SwapStatusRequest, SwapStatusResponse, TelegramPostRequest, TokenBalance, TransactionFeeEstimateRequest, TransactionFeeEstimateResponse, TransferBusinessAccountOwnershipSdkRequest, TransferDestinationResponse, TurnkeyCreateWalletAccountsRequestBody, TurnkeyDeleteEmbeddedWalletsRequestBody, UpdateBusinessAccountMemberRoleSdkRequest, UpdateBusinessAccountSdkRequest, UpdateRecoveryEmailRequest, UpdateSelfResponse, UpdateUserPasskeyRequest, UpdateWaasWalletSettingsRequest, UpdateWaasWalletSettingsResponse, UpgradeEmbeddedWalletToV2Request, UserFields, UserFieldsCheckParams, UserFieldsCheckResponse, UserOauthAccessTokenResponse, UserPasskey, UserWalletSelectionRequest, VerifyRequest, VerifyResponse, VerifyUnlinkRequest, WaasPolicyLayerResponse, WaasPolicyLayerUpdateRequest, WaasSignerPolicyLayerUpdateRequest, WaasTransactionBroadcastRequest, WaasTransactionBroadcastResponse, WalletSanctionsResponse, WalletTransactionsResponse, YieldVaultDetails, YieldVaultListResponse, YieldVaultPosition, YieldVaultRewardsResponse } from '../models';
|
|
14
14
|
export interface AttachFlowSourceRequest {
|
|
15
15
|
environmentId: string;
|
|
16
16
|
flowId: string;
|
|
@@ -449,6 +449,10 @@ export interface GetBackupTokenRequest {
|
|
|
449
449
|
export interface GetBackupTokenOptionsRequest {
|
|
450
450
|
environmentId: string;
|
|
451
451
|
}
|
|
452
|
+
export interface GetBusinessAccountPolicyLayerRequest {
|
|
453
|
+
environmentId: string;
|
|
454
|
+
businessAccountId: string;
|
|
455
|
+
}
|
|
452
456
|
export interface GetCheckoutTransactionRequest {
|
|
453
457
|
environmentId: string;
|
|
454
458
|
transactionId: string;
|
|
@@ -1139,6 +1143,10 @@ export interface SdkBusinessAccountMembersOptionsRequest {
|
|
|
1139
1143
|
environmentId: string;
|
|
1140
1144
|
businessAccountId: string;
|
|
1141
1145
|
}
|
|
1146
|
+
export interface SdkBusinessAccountPolicyLayerOptionsRequest {
|
|
1147
|
+
environmentId: string;
|
|
1148
|
+
businessAccountId: string;
|
|
1149
|
+
}
|
|
1142
1150
|
export interface SdkBusinessAccountTransferOwnershipOptionsRequest {
|
|
1143
1151
|
environmentId: string;
|
|
1144
1152
|
businessAccountId: string;
|
|
@@ -2504,6 +2512,16 @@ export declare class SDKApi extends runtime.BaseAPI {
|
|
|
2504
2512
|
* Options call for this endpoint
|
|
2505
2513
|
*/
|
|
2506
2514
|
getBackupTokenOptions(requestParameters: GetBackupTokenOptionsRequest, initOverrides?: RequestInit): Promise<void>;
|
|
2515
|
+
/**
|
|
2516
|
+
* Returns the Composition account-Layer content for the business account — the Rules that apply to every wallet in the business account. BA owner/admin only. Returns 404 if the caller is not a qualifying owner/admin of the business account, or if the account-Layer has not been minted yet.
|
|
2517
|
+
* Get the business account\'s account-Layer Rules
|
|
2518
|
+
*/
|
|
2519
|
+
getBusinessAccountPolicyLayerRaw(requestParameters: GetBusinessAccountPolicyLayerRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<WaasPolicyLayerResponse>>;
|
|
2520
|
+
/**
|
|
2521
|
+
* Returns the Composition account-Layer content for the business account — the Rules that apply to every wallet in the business account. BA owner/admin only. Returns 404 if the caller is not a qualifying owner/admin of the business account, or if the account-Layer has not been minted yet.
|
|
2522
|
+
* Get the business account\'s account-Layer Rules
|
|
2523
|
+
*/
|
|
2524
|
+
getBusinessAccountPolicyLayer(requestParameters: GetBusinessAccountPolicyLayerRequest, initOverrides?: RequestInit): Promise<WaasPolicyLayerResponse>;
|
|
2507
2525
|
/**
|
|
2508
2526
|
* Deprecated: use GET /sdk/{environmentId}/flow/{flowId} instead.
|
|
2509
2527
|
* Get a checkout transaction by ID
|
|
@@ -4043,15 +4061,15 @@ export declare class SDKApi extends runtime.BaseAPI {
|
|
|
4043
4061
|
*/
|
|
4044
4062
|
sdkAddBusinessAccountMember(requestParameters: SdkAddBusinessAccountMemberRequest, initOverrides?: RequestInit): Promise<BusinessAccountMember>;
|
|
4045
4063
|
/**
|
|
4046
|
-
*
|
|
4047
|
-
* SDK — add a signer to a wallet in a business account
|
|
4064
|
+
* Adds a signer to a business-account wallet by running a same-parties 2/2 -> 2/2 MPC reshare ceremony. The caller must hold an active share on the wallet (only existing share-holders can reshare). The target user is resolved the same way as addMember and, if absent, is created and added to the account. The response is `text/event-stream` (NOT JSON): clients consume it via EventSource and receive `room_created` and `ceremony_complete` events; the new signer share is delivered to the initiating client (iframe) via Sodot\'s relay and backed up to the client-keyshare service on the target\'s behalf.
|
|
4065
|
+
* SDK — add a signer to a wallet in a business account
|
|
4048
4066
|
*/
|
|
4049
|
-
sdkAddBusinessAccountSignerRaw(requestParameters: SdkAddBusinessAccountSignerRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<
|
|
4067
|
+
sdkAddBusinessAccountSignerRaw(requestParameters: SdkAddBusinessAccountSignerRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<string>>;
|
|
4050
4068
|
/**
|
|
4051
|
-
*
|
|
4052
|
-
* SDK — add a signer to a wallet in a business account
|
|
4069
|
+
* Adds a signer to a business-account wallet by running a same-parties 2/2 -> 2/2 MPC reshare ceremony. The caller must hold an active share on the wallet (only existing share-holders can reshare). The target user is resolved the same way as addMember and, if absent, is created and added to the account. The response is `text/event-stream` (NOT JSON): clients consume it via EventSource and receive `room_created` and `ceremony_complete` events; the new signer share is delivered to the initiating client (iframe) via Sodot\'s relay and backed up to the client-keyshare service on the target\'s behalf.
|
|
4070
|
+
* SDK — add a signer to a wallet in a business account
|
|
4053
4071
|
*/
|
|
4054
|
-
sdkAddBusinessAccountSigner(requestParameters: SdkAddBusinessAccountSignerRequest, initOverrides?: RequestInit): Promise<
|
|
4072
|
+
sdkAddBusinessAccountSigner(requestParameters: SdkAddBusinessAccountSignerRequest, initOverrides?: RequestInit): Promise<string>;
|
|
4055
4073
|
/**
|
|
4056
4074
|
* Options call for this endpoint
|
|
4057
4075
|
*/
|
|
@@ -4084,6 +4102,14 @@ export declare class SDKApi extends runtime.BaseAPI {
|
|
|
4084
4102
|
* Options call for this endpoint
|
|
4085
4103
|
*/
|
|
4086
4104
|
sdkBusinessAccountMembersOptions(requestParameters: SdkBusinessAccountMembersOptionsRequest, initOverrides?: RequestInit): Promise<void>;
|
|
4105
|
+
/**
|
|
4106
|
+
* Options call for this endpoint
|
|
4107
|
+
*/
|
|
4108
|
+
sdkBusinessAccountPolicyLayerOptionsRaw(requestParameters: SdkBusinessAccountPolicyLayerOptionsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>>;
|
|
4109
|
+
/**
|
|
4110
|
+
* Options call for this endpoint
|
|
4111
|
+
*/
|
|
4112
|
+
sdkBusinessAccountPolicyLayerOptions(requestParameters: SdkBusinessAccountPolicyLayerOptionsRequest, initOverrides?: RequestInit): Promise<void>;
|
|
4087
4113
|
/**
|
|
4088
4114
|
* Options call for this endpoint
|
|
4089
4115
|
*/
|
package/src/apis/SDKApi.js
CHANGED
|
@@ -54,7 +54,6 @@ import { MFADeviceFromJSON } from '../models/MFADevice.js';
|
|
|
54
54
|
import { BusinessAccountFromJSON } from '../models/BusinessAccount.js';
|
|
55
55
|
import { BusinessAccountDetailFromJSON } from '../models/BusinessAccountDetail.js';
|
|
56
56
|
import { BusinessAccountMemberFromJSON } from '../models/BusinessAccountMember.js';
|
|
57
|
-
import { BusinessAccountSignerFromJSON } from '../models/BusinessAccountSigner.js';
|
|
58
57
|
import { BusinessAccountListFromJSON } from '../models/BusinessAccountList.js';
|
|
59
58
|
import '../models/CaptchaProviderEnum.js';
|
|
60
59
|
import '../models/DestinationTypeEnum.js';
|
|
@@ -3731,6 +3730,42 @@ class SDKApi extends BaseAPI {
|
|
|
3731
3730
|
async getBackupTokenOptions(requestParameters, initOverrides) {
|
|
3732
3731
|
await this.getBackupTokenOptionsRaw(requestParameters, initOverrides);
|
|
3733
3732
|
}
|
|
3733
|
+
/**
|
|
3734
|
+
* Returns the Composition account-Layer content for the business account — the Rules that apply to every wallet in the business account. BA owner/admin only. Returns 404 if the caller is not a qualifying owner/admin of the business account, or if the account-Layer has not been minted yet.
|
|
3735
|
+
* Get the business account\'s account-Layer Rules
|
|
3736
|
+
*/
|
|
3737
|
+
async getBusinessAccountPolicyLayerRaw(requestParameters, initOverrides) {
|
|
3738
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
3739
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getBusinessAccountPolicyLayer.');
|
|
3740
|
+
}
|
|
3741
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
3742
|
+
throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling getBusinessAccountPolicyLayer.');
|
|
3743
|
+
}
|
|
3744
|
+
const queryParameters = {};
|
|
3745
|
+
const headerParameters = {};
|
|
3746
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
3747
|
+
const token = this.configuration.accessToken;
|
|
3748
|
+
const tokenString = await token("bearerAuth", []);
|
|
3749
|
+
if (tokenString) {
|
|
3750
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
3751
|
+
}
|
|
3752
|
+
}
|
|
3753
|
+
const response = await this.request({
|
|
3754
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/policy-layer`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
3755
|
+
method: 'GET',
|
|
3756
|
+
headers: headerParameters,
|
|
3757
|
+
query: queryParameters,
|
|
3758
|
+
}, initOverrides);
|
|
3759
|
+
return new JSONApiResponse(response, (jsonValue) => WaasPolicyLayerResponseFromJSON(jsonValue));
|
|
3760
|
+
}
|
|
3761
|
+
/**
|
|
3762
|
+
* Returns the Composition account-Layer content for the business account — the Rules that apply to every wallet in the business account. BA owner/admin only. Returns 404 if the caller is not a qualifying owner/admin of the business account, or if the account-Layer has not been minted yet.
|
|
3763
|
+
* Get the business account\'s account-Layer Rules
|
|
3764
|
+
*/
|
|
3765
|
+
async getBusinessAccountPolicyLayer(requestParameters, initOverrides) {
|
|
3766
|
+
const response = await this.getBusinessAccountPolicyLayerRaw(requestParameters, initOverrides);
|
|
3767
|
+
return await response.value();
|
|
3768
|
+
}
|
|
3734
3769
|
/**
|
|
3735
3770
|
* Deprecated: use GET /sdk/{environmentId}/flow/{flowId} instead.
|
|
3736
3771
|
* Get a checkout transaction by ID
|
|
@@ -8839,8 +8874,8 @@ class SDKApi extends BaseAPI {
|
|
|
8839
8874
|
return await response.value();
|
|
8840
8875
|
}
|
|
8841
8876
|
/**
|
|
8842
|
-
*
|
|
8843
|
-
* SDK — add a signer to a wallet in a business account
|
|
8877
|
+
* Adds a signer to a business-account wallet by running a same-parties 2/2 -> 2/2 MPC reshare ceremony. The caller must hold an active share on the wallet (only existing share-holders can reshare). The target user is resolved the same way as addMember and, if absent, is created and added to the account. The response is `text/event-stream` (NOT JSON): clients consume it via EventSource and receive `room_created` and `ceremony_complete` events; the new signer share is delivered to the initiating client (iframe) via Sodot\'s relay and backed up to the client-keyshare service on the target\'s behalf.
|
|
8878
|
+
* SDK — add a signer to a wallet in a business account
|
|
8844
8879
|
*/
|
|
8845
8880
|
async sdkAddBusinessAccountSignerRaw(requestParameters, initOverrides) {
|
|
8846
8881
|
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
@@ -8872,11 +8907,11 @@ class SDKApi extends BaseAPI {
|
|
|
8872
8907
|
query: queryParameters,
|
|
8873
8908
|
body: AddBusinessAccountSignerSdkRequestToJSON(requestParameters.addBusinessAccountSignerSdkRequest),
|
|
8874
8909
|
}, initOverrides);
|
|
8875
|
-
return new
|
|
8910
|
+
return new TextApiResponse(response);
|
|
8876
8911
|
}
|
|
8877
8912
|
/**
|
|
8878
|
-
*
|
|
8879
|
-
* SDK — add a signer to a wallet in a business account
|
|
8913
|
+
* Adds a signer to a business-account wallet by running a same-parties 2/2 -> 2/2 MPC reshare ceremony. The caller must hold an active share on the wallet (only existing share-holders can reshare). The target user is resolved the same way as addMember and, if absent, is created and added to the account. The response is `text/event-stream` (NOT JSON): clients consume it via EventSource and receive `room_created` and `ceremony_complete` events; the new signer share is delivered to the initiating client (iframe) via Sodot\'s relay and backed up to the client-keyshare service on the target\'s behalf.
|
|
8914
|
+
* SDK — add a signer to a wallet in a business account
|
|
8880
8915
|
*/
|
|
8881
8916
|
async sdkAddBusinessAccountSigner(requestParameters, initOverrides) {
|
|
8882
8917
|
const response = await this.sdkAddBusinessAccountSignerRaw(requestParameters, initOverrides);
|
|
@@ -8986,6 +9021,32 @@ class SDKApi extends BaseAPI {
|
|
|
8986
9021
|
async sdkBusinessAccountMembersOptions(requestParameters, initOverrides) {
|
|
8987
9022
|
await this.sdkBusinessAccountMembersOptionsRaw(requestParameters, initOverrides);
|
|
8988
9023
|
}
|
|
9024
|
+
/**
|
|
9025
|
+
* Options call for this endpoint
|
|
9026
|
+
*/
|
|
9027
|
+
async sdkBusinessAccountPolicyLayerOptionsRaw(requestParameters, initOverrides) {
|
|
9028
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
9029
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountPolicyLayerOptions.');
|
|
9030
|
+
}
|
|
9031
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
9032
|
+
throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountPolicyLayerOptions.');
|
|
9033
|
+
}
|
|
9034
|
+
const queryParameters = {};
|
|
9035
|
+
const headerParameters = {};
|
|
9036
|
+
const response = await this.request({
|
|
9037
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/policy-layer`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
9038
|
+
method: 'OPTIONS',
|
|
9039
|
+
headers: headerParameters,
|
|
9040
|
+
query: queryParameters,
|
|
9041
|
+
}, initOverrides);
|
|
9042
|
+
return new VoidApiResponse(response);
|
|
9043
|
+
}
|
|
9044
|
+
/**
|
|
9045
|
+
* Options call for this endpoint
|
|
9046
|
+
*/
|
|
9047
|
+
async sdkBusinessAccountPolicyLayerOptions(requestParameters, initOverrides) {
|
|
9048
|
+
await this.sdkBusinessAccountPolicyLayerOptionsRaw(requestParameters, initOverrides);
|
|
9049
|
+
}
|
|
8989
9050
|
/**
|
|
8990
9051
|
* Options call for this endpoint
|
|
8991
9052
|
*/
|
|
@@ -17,7 +17,7 @@ import { UserIdentifierTypeEnum } from './UserIdentifierTypeEnum';
|
|
|
17
17
|
import { WaasPolicyRule } from './WaasPolicyRule';
|
|
18
18
|
/**
|
|
19
19
|
* SDK addSigner body. Same user resolution shape as addMember (userId OR identifier + type), plus `signerType` for the signer-role enum (endUser/server). `type` here is the user-resolution type, NOT the signer type — `signerType` lives on a dedicated field. `smsCountryCode` is required when `type` is `phoneNumber`; `socialProvider` is required when `type` is `socialUsername` or `socialAccountId`.
|
|
20
|
-
* The remaining fields parameterise the reshare ceremony that runs
|
|
20
|
+
* The remaining fields parameterise the MPC reshare ceremony that runs during the SSE response. `clientKeygenIds` come from the caller's local MPC state (the JS SDK obtains them internally by calling `exportID()` on the existing client share); the threshold scheme fields describe the source share set (old) and the destination share set (new) that the ceremony produces.
|
|
21
21
|
* @export
|
|
22
22
|
* @interface AddBusinessAccountSignerSdkRequest
|
|
23
23
|
*/
|
|
@@ -15,7 +15,7 @@ function WaasTransactionBroadcastErrorPayloadFromJSONTyped(json, ignoreDiscrimin
|
|
|
15
15
|
}
|
|
16
16
|
return {
|
|
17
17
|
'attempts': json['attempts'],
|
|
18
|
-
'broadcastId': json['broadcastId'],
|
|
18
|
+
'broadcastId': !runtime.exists(json, 'broadcastId') ? undefined : json['broadcastId'],
|
|
19
19
|
'retryable': json['retryable'],
|
|
20
20
|
'submissionState': WaasTransactionBroadcastSubmissionState.WaasTransactionBroadcastSubmissionStateFromJSON(json['submissionState']),
|
|
21
21
|
'transactionId': !runtime.exists(json, 'transactionId') ? undefined : json['transactionId'],
|
|
@@ -27,7 +27,7 @@ export interface WaasTransactionBroadcastErrorPayload {
|
|
|
27
27
|
* @type {string}
|
|
28
28
|
* @memberof WaasTransactionBroadcastErrorPayload
|
|
29
29
|
*/
|
|
30
|
-
broadcastId
|
|
30
|
+
broadcastId?: string;
|
|
31
31
|
/**
|
|
32
32
|
* Whether re-sending the identical signed payload may succeed.
|
|
33
33
|
* @type {boolean}
|
|
@@ -11,7 +11,7 @@ function WaasTransactionBroadcastErrorPayloadFromJSONTyped(json, ignoreDiscrimin
|
|
|
11
11
|
}
|
|
12
12
|
return {
|
|
13
13
|
'attempts': json['attempts'],
|
|
14
|
-
'broadcastId': json['broadcastId'],
|
|
14
|
+
'broadcastId': !exists(json, 'broadcastId') ? undefined : json['broadcastId'],
|
|
15
15
|
'retryable': json['retryable'],
|
|
16
16
|
'submissionState': WaasTransactionBroadcastSubmissionStateFromJSON(json['submissionState']),
|
|
17
17
|
'transactionId': !exists(json, 'transactionId') ? undefined : json['transactionId'],
|