@dynamic-labs/sdk-api-core 0.1.0 → 0.3.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/src/apis/SDKApi.d.ts
CHANGED
|
@@ -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;
|
|
@@ -1134,6 +1138,10 @@ export interface SdkBusinessAccountMembersOptionsRequest {
|
|
|
1134
1138
|
environmentId: string;
|
|
1135
1139
|
businessAccountId: string;
|
|
1136
1140
|
}
|
|
1141
|
+
export interface SdkBusinessAccountPolicyLayerOptionsRequest {
|
|
1142
|
+
environmentId: string;
|
|
1143
|
+
businessAccountId: string;
|
|
1144
|
+
}
|
|
1137
1145
|
export interface SdkBusinessAccountTransferOwnershipOptionsRequest {
|
|
1138
1146
|
environmentId: string;
|
|
1139
1147
|
businessAccountId: string;
|
|
@@ -1369,6 +1377,11 @@ export interface UpdateAdditionalAddressesOptionsRequest {
|
|
|
1369
1377
|
environmentId: string;
|
|
1370
1378
|
walletId: string;
|
|
1371
1379
|
}
|
|
1380
|
+
export interface UpdateBusinessAccountPolicyLayerRequest {
|
|
1381
|
+
environmentId: string;
|
|
1382
|
+
businessAccountId: string;
|
|
1383
|
+
waasPolicyLayerUpdateRequest: WaasPolicyLayerUpdateRequest;
|
|
1384
|
+
}
|
|
1372
1385
|
export interface UpdateEmbeddedWalletRecoveryEmailRequest {
|
|
1373
1386
|
environmentId: string;
|
|
1374
1387
|
updateRecoveryEmailRequest: UpdateRecoveryEmailRequest;
|
|
@@ -1678,12 +1691,12 @@ export declare class SDKApi extends runtime.BaseAPI {
|
|
|
1678
1691
|
*/
|
|
1679
1692
|
broadcastFlowOptions(requestParameters: BroadcastFlowOptionsRequest, initOverrides?: RequestInit): Promise<void>;
|
|
1680
1693
|
/**
|
|
1681
|
-
* Relays an already-signed transaction from a Dynamic v3 WaaS wallet to the network. The server derives chain and wallet address from `walletId`, verifies the signed payload belongs to the wallet, owns provider selection and bounded retry/failover of the identical signed bytes, and replays a stored result when `x-idempotency-key` repeats.
|
|
1694
|
+
* Relays an already-signed transaction from a Dynamic v3 WaaS wallet to the network. The server derives chain and wallet address from `walletId`, verifies the signed payload belongs to the wallet, owns provider selection and bounded retry/failover of the identical signed bytes, and replays a stored result when `x-idempotency-key` repeats. Replacement or speed-up transactions use different signed bytes and require a new key; reusing an existing key with different bytes returns 409.
|
|
1682
1695
|
* Broadcast a signed transaction from a Dynamic v3 WaaS wallet
|
|
1683
1696
|
*/
|
|
1684
1697
|
broadcastWaasTransactionRaw(requestParameters: BroadcastWaasTransactionRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<WaasTransactionBroadcastResponse>>;
|
|
1685
1698
|
/**
|
|
1686
|
-
* Relays an already-signed transaction from a Dynamic v3 WaaS wallet to the network. The server derives chain and wallet address from `walletId`, verifies the signed payload belongs to the wallet, owns provider selection and bounded retry/failover of the identical signed bytes, and replays a stored result when `x-idempotency-key` repeats.
|
|
1699
|
+
* Relays an already-signed transaction from a Dynamic v3 WaaS wallet to the network. The server derives chain and wallet address from `walletId`, verifies the signed payload belongs to the wallet, owns provider selection and bounded retry/failover of the identical signed bytes, and replays a stored result when `x-idempotency-key` repeats. Replacement or speed-up transactions use different signed bytes and require a new key; reusing an existing key with different bytes returns 409.
|
|
1687
1700
|
* Broadcast a signed transaction from a Dynamic v3 WaaS wallet
|
|
1688
1701
|
*/
|
|
1689
1702
|
broadcastWaasTransaction(requestParameters: BroadcastWaasTransactionRequest, initOverrides?: RequestInit): Promise<WaasTransactionBroadcastResponse>;
|
|
@@ -2499,6 +2512,16 @@ export declare class SDKApi extends runtime.BaseAPI {
|
|
|
2499
2512
|
* Options call for this endpoint
|
|
2500
2513
|
*/
|
|
2501
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 (it\'s created by the first PATCH to this path, or the first time a signer is added to a wallet in this business account with Composition enabled — see the PATCH docs on this same path).
|
|
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 (it\'s created by the first PATCH to this path, or the first time a signer is added to a wallet in this business account with Composition enabled — see the PATCH docs on this same path).
|
|
2522
|
+
* Get the business account\'s account-Layer Rules
|
|
2523
|
+
*/
|
|
2524
|
+
getBusinessAccountPolicyLayer(requestParameters: GetBusinessAccountPolicyLayerRequest, initOverrides?: RequestInit): Promise<WaasPolicyLayerResponse>;
|
|
2502
2525
|
/**
|
|
2503
2526
|
* Deprecated: use GET /sdk/{environmentId}/flow/{flowId} instead.
|
|
2504
2527
|
* Get a checkout transaction by ID
|
|
@@ -4051,6 +4074,14 @@ export declare class SDKApi extends runtime.BaseAPI {
|
|
|
4051
4074
|
* Options call for this endpoint
|
|
4052
4075
|
*/
|
|
4053
4076
|
sdkBusinessAccountMembersOptions(requestParameters: SdkBusinessAccountMembersOptionsRequest, initOverrides?: RequestInit): Promise<void>;
|
|
4077
|
+
/**
|
|
4078
|
+
* Options call for this endpoint
|
|
4079
|
+
*/
|
|
4080
|
+
sdkBusinessAccountPolicyLayerOptionsRaw(requestParameters: SdkBusinessAccountPolicyLayerOptionsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>>;
|
|
4081
|
+
/**
|
|
4082
|
+
* Options call for this endpoint
|
|
4083
|
+
*/
|
|
4084
|
+
sdkBusinessAccountPolicyLayerOptions(requestParameters: SdkBusinessAccountPolicyLayerOptionsRequest, initOverrides?: RequestInit): Promise<void>;
|
|
4054
4085
|
/**
|
|
4055
4086
|
* Options call for this endpoint
|
|
4056
4087
|
*/
|
|
@@ -4591,6 +4622,16 @@ export declare class SDKApi extends runtime.BaseAPI {
|
|
|
4591
4622
|
* Options call for this endpoint
|
|
4592
4623
|
*/
|
|
4593
4624
|
updateAdditionalAddressesOptions(requestParameters: UpdateAdditionalAddressesOptionsRequest, initOverrides?: RequestInit): Promise<void>;
|
|
4625
|
+
/**
|
|
4626
|
+
* Applies a single per-Rule upsert (create when ruleId is new, update when it already exists) or remove operation to the business account\'s account-Layer, which applies to every wallet in the business account. BA owner/admin only. ruleId may be omitted on an upsert; the enclave then mints one and returns it in the response\'s layerContent.rules. Creates the account-Layer if this business account has none yet, so a first write succeeds rather than 404ing; it is otherwise minted the first time a signer is added to a wallet in the business account with Composition enabled. Set op to batch to apply several operations atomically in one enclave cycle.
|
|
4627
|
+
* Create, update, or remove a Rule on the business account\'s account-Layer
|
|
4628
|
+
*/
|
|
4629
|
+
updateBusinessAccountPolicyLayerRaw(requestParameters: UpdateBusinessAccountPolicyLayerRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<WaasPolicyLayerResponse>>;
|
|
4630
|
+
/**
|
|
4631
|
+
* Applies a single per-Rule upsert (create when ruleId is new, update when it already exists) or remove operation to the business account\'s account-Layer, which applies to every wallet in the business account. BA owner/admin only. ruleId may be omitted on an upsert; the enclave then mints one and returns it in the response\'s layerContent.rules. Creates the account-Layer if this business account has none yet, so a first write succeeds rather than 404ing; it is otherwise minted the first time a signer is added to a wallet in the business account with Composition enabled. Set op to batch to apply several operations atomically in one enclave cycle.
|
|
4632
|
+
* Create, update, or remove a Rule on the business account\'s account-Layer
|
|
4633
|
+
*/
|
|
4634
|
+
updateBusinessAccountPolicyLayer(requestParameters: UpdateBusinessAccountPolicyLayerRequest, initOverrides?: RequestInit): Promise<WaasPolicyLayerResponse>;
|
|
4594
4635
|
/**
|
|
4595
4636
|
* Updates the V2 recovery email address for the authenticated user.
|
|
4596
4637
|
* Update a user\'s V2 recovery email
|
package/src/apis/SDKApi.js
CHANGED
|
@@ -866,7 +866,7 @@ class SDKApi extends BaseAPI {
|
|
|
866
866
|
await this.broadcastFlowOptionsRaw(requestParameters, initOverrides);
|
|
867
867
|
}
|
|
868
868
|
/**
|
|
869
|
-
* Relays an already-signed transaction from a Dynamic v3 WaaS wallet to the network. The server derives chain and wallet address from `walletId`, verifies the signed payload belongs to the wallet, owns provider selection and bounded retry/failover of the identical signed bytes, and replays a stored result when `x-idempotency-key` repeats.
|
|
869
|
+
* Relays an already-signed transaction from a Dynamic v3 WaaS wallet to the network. The server derives chain and wallet address from `walletId`, verifies the signed payload belongs to the wallet, owns provider selection and bounded retry/failover of the identical signed bytes, and replays a stored result when `x-idempotency-key` repeats. Replacement or speed-up transactions use different signed bytes and require a new key; reusing an existing key with different bytes returns 409.
|
|
870
870
|
* Broadcast a signed transaction from a Dynamic v3 WaaS wallet
|
|
871
871
|
*/
|
|
872
872
|
async broadcastWaasTransactionRaw(requestParameters, initOverrides) {
|
|
@@ -905,7 +905,7 @@ class SDKApi extends BaseAPI {
|
|
|
905
905
|
return new JSONApiResponse(response, (jsonValue) => WaasTransactionBroadcastResponseFromJSON(jsonValue));
|
|
906
906
|
}
|
|
907
907
|
/**
|
|
908
|
-
* Relays an already-signed transaction from a Dynamic v3 WaaS wallet to the network. The server derives chain and wallet address from `walletId`, verifies the signed payload belongs to the wallet, owns provider selection and bounded retry/failover of the identical signed bytes, and replays a stored result when `x-idempotency-key` repeats.
|
|
908
|
+
* Relays an already-signed transaction from a Dynamic v3 WaaS wallet to the network. The server derives chain and wallet address from `walletId`, verifies the signed payload belongs to the wallet, owns provider selection and bounded retry/failover of the identical signed bytes, and replays a stored result when `x-idempotency-key` repeats. Replacement or speed-up transactions use different signed bytes and require a new key; reusing an existing key with different bytes returns 409.
|
|
909
909
|
* Broadcast a signed transaction from a Dynamic v3 WaaS wallet
|
|
910
910
|
*/
|
|
911
911
|
async broadcastWaasTransaction(requestParameters, initOverrides) {
|
|
@@ -3697,6 +3697,42 @@ class SDKApi extends BaseAPI {
|
|
|
3697
3697
|
async getBackupTokenOptions(requestParameters, initOverrides) {
|
|
3698
3698
|
await this.getBackupTokenOptionsRaw(requestParameters, initOverrides);
|
|
3699
3699
|
}
|
|
3700
|
+
/**
|
|
3701
|
+
* 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 (it\'s created by the first PATCH to this path, or the first time a signer is added to a wallet in this business account with Composition enabled — see the PATCH docs on this same path).
|
|
3702
|
+
* Get the business account\'s account-Layer Rules
|
|
3703
|
+
*/
|
|
3704
|
+
async getBusinessAccountPolicyLayerRaw(requestParameters, initOverrides) {
|
|
3705
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
3706
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getBusinessAccountPolicyLayer.');
|
|
3707
|
+
}
|
|
3708
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
3709
|
+
throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling getBusinessAccountPolicyLayer.');
|
|
3710
|
+
}
|
|
3711
|
+
const queryParameters = {};
|
|
3712
|
+
const headerParameters = {};
|
|
3713
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
3714
|
+
const token = this.configuration.accessToken;
|
|
3715
|
+
const tokenString = await token("bearerAuth", []);
|
|
3716
|
+
if (tokenString) {
|
|
3717
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
3718
|
+
}
|
|
3719
|
+
}
|
|
3720
|
+
const response = await this.request({
|
|
3721
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/policy-layer`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
3722
|
+
method: 'GET',
|
|
3723
|
+
headers: headerParameters,
|
|
3724
|
+
query: queryParameters,
|
|
3725
|
+
}, initOverrides);
|
|
3726
|
+
return new JSONApiResponse(response, (jsonValue) => WaasPolicyLayerResponseFromJSON(jsonValue));
|
|
3727
|
+
}
|
|
3728
|
+
/**
|
|
3729
|
+
* 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 (it\'s created by the first PATCH to this path, or the first time a signer is added to a wallet in this business account with Composition enabled — see the PATCH docs on this same path).
|
|
3730
|
+
* Get the business account\'s account-Layer Rules
|
|
3731
|
+
*/
|
|
3732
|
+
async getBusinessAccountPolicyLayer(requestParameters, initOverrides) {
|
|
3733
|
+
const response = await this.getBusinessAccountPolicyLayerRaw(requestParameters, initOverrides);
|
|
3734
|
+
return await response.value();
|
|
3735
|
+
}
|
|
3700
3736
|
/**
|
|
3701
3737
|
* Deprecated: use GET /sdk/{environmentId}/flow/{flowId} instead.
|
|
3702
3738
|
* Get a checkout transaction by ID
|
|
@@ -8875,6 +8911,32 @@ class SDKApi extends BaseAPI {
|
|
|
8875
8911
|
async sdkBusinessAccountMembersOptions(requestParameters, initOverrides) {
|
|
8876
8912
|
await this.sdkBusinessAccountMembersOptionsRaw(requestParameters, initOverrides);
|
|
8877
8913
|
}
|
|
8914
|
+
/**
|
|
8915
|
+
* Options call for this endpoint
|
|
8916
|
+
*/
|
|
8917
|
+
async sdkBusinessAccountPolicyLayerOptionsRaw(requestParameters, initOverrides) {
|
|
8918
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
8919
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountPolicyLayerOptions.');
|
|
8920
|
+
}
|
|
8921
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
8922
|
+
throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountPolicyLayerOptions.');
|
|
8923
|
+
}
|
|
8924
|
+
const queryParameters = {};
|
|
8925
|
+
const headerParameters = {};
|
|
8926
|
+
const response = await this.request({
|
|
8927
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/policy-layer`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
8928
|
+
method: 'OPTIONS',
|
|
8929
|
+
headers: headerParameters,
|
|
8930
|
+
query: queryParameters,
|
|
8931
|
+
}, initOverrides);
|
|
8932
|
+
return new VoidApiResponse(response);
|
|
8933
|
+
}
|
|
8934
|
+
/**
|
|
8935
|
+
* Options call for this endpoint
|
|
8936
|
+
*/
|
|
8937
|
+
async sdkBusinessAccountPolicyLayerOptions(requestParameters, initOverrides) {
|
|
8938
|
+
await this.sdkBusinessAccountPolicyLayerOptionsRaw(requestParameters, initOverrides);
|
|
8939
|
+
}
|
|
8878
8940
|
/**
|
|
8879
8941
|
* Options call for this endpoint
|
|
8880
8942
|
*/
|
|
@@ -10673,6 +10735,47 @@ class SDKApi extends BaseAPI {
|
|
|
10673
10735
|
async updateAdditionalAddressesOptions(requestParameters, initOverrides) {
|
|
10674
10736
|
await this.updateAdditionalAddressesOptionsRaw(requestParameters, initOverrides);
|
|
10675
10737
|
}
|
|
10738
|
+
/**
|
|
10739
|
+
* Applies a single per-Rule upsert (create when ruleId is new, update when it already exists) or remove operation to the business account\'s account-Layer, which applies to every wallet in the business account. BA owner/admin only. ruleId may be omitted on an upsert; the enclave then mints one and returns it in the response\'s layerContent.rules. Creates the account-Layer if this business account has none yet, so a first write succeeds rather than 404ing; it is otherwise minted the first time a signer is added to a wallet in the business account with Composition enabled. Set op to batch to apply several operations atomically in one enclave cycle.
|
|
10740
|
+
* Create, update, or remove a Rule on the business account\'s account-Layer
|
|
10741
|
+
*/
|
|
10742
|
+
async updateBusinessAccountPolicyLayerRaw(requestParameters, initOverrides) {
|
|
10743
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
10744
|
+
throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling updateBusinessAccountPolicyLayer.');
|
|
10745
|
+
}
|
|
10746
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
10747
|
+
throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling updateBusinessAccountPolicyLayer.');
|
|
10748
|
+
}
|
|
10749
|
+
if (requestParameters.waasPolicyLayerUpdateRequest === null || requestParameters.waasPolicyLayerUpdateRequest === undefined) {
|
|
10750
|
+
throw new RequiredError('waasPolicyLayerUpdateRequest', 'Required parameter requestParameters.waasPolicyLayerUpdateRequest was null or undefined when calling updateBusinessAccountPolicyLayer.');
|
|
10751
|
+
}
|
|
10752
|
+
const queryParameters = {};
|
|
10753
|
+
const headerParameters = {};
|
|
10754
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
10755
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
10756
|
+
const token = this.configuration.accessToken;
|
|
10757
|
+
const tokenString = await token("bearerAuth", []);
|
|
10758
|
+
if (tokenString) {
|
|
10759
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
10760
|
+
}
|
|
10761
|
+
}
|
|
10762
|
+
const response = await this.request({
|
|
10763
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/policy-layer`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
10764
|
+
method: 'PATCH',
|
|
10765
|
+
headers: headerParameters,
|
|
10766
|
+
query: queryParameters,
|
|
10767
|
+
body: WaasPolicyLayerUpdateRequestToJSON(requestParameters.waasPolicyLayerUpdateRequest),
|
|
10768
|
+
}, initOverrides);
|
|
10769
|
+
return new JSONApiResponse(response, (jsonValue) => WaasPolicyLayerResponseFromJSON(jsonValue));
|
|
10770
|
+
}
|
|
10771
|
+
/**
|
|
10772
|
+
* Applies a single per-Rule upsert (create when ruleId is new, update when it already exists) or remove operation to the business account\'s account-Layer, which applies to every wallet in the business account. BA owner/admin only. ruleId may be omitted on an upsert; the enclave then mints one and returns it in the response\'s layerContent.rules. Creates the account-Layer if this business account has none yet, so a first write succeeds rather than 404ing; it is otherwise minted the first time a signer is added to a wallet in the business account with Composition enabled. Set op to batch to apply several operations atomically in one enclave cycle.
|
|
10773
|
+
* Create, update, or remove a Rule on the business account\'s account-Layer
|
|
10774
|
+
*/
|
|
10775
|
+
async updateBusinessAccountPolicyLayer(requestParameters, initOverrides) {
|
|
10776
|
+
const response = await this.updateBusinessAccountPolicyLayerRaw(requestParameters, initOverrides);
|
|
10777
|
+
return await response.value();
|
|
10778
|
+
}
|
|
10676
10779
|
/**
|
|
10677
10780
|
* Updates the V2 recovery email address for the authenticated user.
|
|
10678
10781
|
* Update a user\'s V2 recovery email
|