@dynamic-labs/sdk-api-core 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.cjs.map +1 -1
- package/src/apis/SDKApi.d.ts +33 -7
- package/src/apis/SDKApi.js +67 -6
- package/src/apis/SDKApi.js.map +1 -1
- package/src/models/AddBusinessAccountSignerSdkRequest.d.ts +1 -1
- package/src/models/WaasTransactionBroadcastErrorPayload.cjs +1 -1
- package/src/models/WaasTransactionBroadcastErrorPayload.cjs.map +1 -1
- package/src/models/WaasTransactionBroadcastErrorPayload.d.ts +1 -1
- package/src/models/WaasTransactionBroadcastErrorPayload.js +1 -1
- package/src/models/WaasTransactionBroadcastErrorPayload.js.map +1 -1
package/package.json
CHANGED
package/src/apis/SDKApi.cjs
CHANGED
|
@@ -44,7 +44,6 @@ require('../models/KycFieldType.cjs');
|
|
|
44
44
|
var BusinessAccount = require('../models/BusinessAccount.cjs');
|
|
45
45
|
var BusinessAccountDetail = require('../models/BusinessAccountDetail.cjs');
|
|
46
46
|
var BusinessAccountMember = require('../models/BusinessAccountMember.cjs');
|
|
47
|
-
var BusinessAccountSigner = require('../models/BusinessAccountSigner.cjs');
|
|
48
47
|
require('../models/ChainEnum.cjs');
|
|
49
48
|
var BusinessAccountList = require('../models/BusinessAccountList.cjs');
|
|
50
49
|
require('../models/CaptchaProviderEnum.cjs');
|
|
@@ -3702,6 +3701,42 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
3702
3701
|
async getBackupTokenOptions(requestParameters, initOverrides) {
|
|
3703
3702
|
await this.getBackupTokenOptionsRaw(requestParameters, initOverrides);
|
|
3704
3703
|
}
|
|
3704
|
+
/**
|
|
3705
|
+
* 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.
|
|
3706
|
+
* Get the business account\'s account-Layer Rules
|
|
3707
|
+
*/
|
|
3708
|
+
async getBusinessAccountPolicyLayerRaw(requestParameters, initOverrides) {
|
|
3709
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
3710
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getBusinessAccountPolicyLayer.');
|
|
3711
|
+
}
|
|
3712
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
3713
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling getBusinessAccountPolicyLayer.');
|
|
3714
|
+
}
|
|
3715
|
+
const queryParameters = {};
|
|
3716
|
+
const headerParameters = {};
|
|
3717
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
3718
|
+
const token = this.configuration.accessToken;
|
|
3719
|
+
const tokenString = await token("bearerAuth", []);
|
|
3720
|
+
if (tokenString) {
|
|
3721
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
3722
|
+
}
|
|
3723
|
+
}
|
|
3724
|
+
const response = await this.request({
|
|
3725
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/policy-layer`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
3726
|
+
method: 'GET',
|
|
3727
|
+
headers: headerParameters,
|
|
3728
|
+
query: queryParameters,
|
|
3729
|
+
}, initOverrides);
|
|
3730
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WaasPolicyLayerResponse.WaasPolicyLayerResponseFromJSON(jsonValue));
|
|
3731
|
+
}
|
|
3732
|
+
/**
|
|
3733
|
+
* 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.
|
|
3734
|
+
* Get the business account\'s account-Layer Rules
|
|
3735
|
+
*/
|
|
3736
|
+
async getBusinessAccountPolicyLayer(requestParameters, initOverrides) {
|
|
3737
|
+
const response = await this.getBusinessAccountPolicyLayerRaw(requestParameters, initOverrides);
|
|
3738
|
+
return await response.value();
|
|
3739
|
+
}
|
|
3705
3740
|
/**
|
|
3706
3741
|
* Deprecated: use GET /sdk/{environmentId}/flow/{flowId} instead.
|
|
3707
3742
|
* Get a checkout transaction by ID
|
|
@@ -8733,8 +8768,8 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
8733
8768
|
return await response.value();
|
|
8734
8769
|
}
|
|
8735
8770
|
/**
|
|
8736
|
-
*
|
|
8737
|
-
* SDK — add a signer to a wallet in a business account
|
|
8771
|
+
* 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.
|
|
8772
|
+
* SDK — add a signer to a wallet in a business account
|
|
8738
8773
|
*/
|
|
8739
8774
|
async sdkAddBusinessAccountSignerRaw(requestParameters, initOverrides) {
|
|
8740
8775
|
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
@@ -8766,11 +8801,11 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
8766
8801
|
query: queryParameters,
|
|
8767
8802
|
body: AddBusinessAccountSignerSdkRequest.AddBusinessAccountSignerSdkRequestToJSON(requestParameters.addBusinessAccountSignerSdkRequest),
|
|
8768
8803
|
}, initOverrides);
|
|
8769
|
-
return new runtime.
|
|
8804
|
+
return new runtime.TextApiResponse(response);
|
|
8770
8805
|
}
|
|
8771
8806
|
/**
|
|
8772
|
-
*
|
|
8773
|
-
* SDK — add a signer to a wallet in a business account
|
|
8807
|
+
* 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.
|
|
8808
|
+
* SDK — add a signer to a wallet in a business account
|
|
8774
8809
|
*/
|
|
8775
8810
|
async sdkAddBusinessAccountSigner(requestParameters, initOverrides) {
|
|
8776
8811
|
const response = await this.sdkAddBusinessAccountSignerRaw(requestParameters, initOverrides);
|
|
@@ -8880,6 +8915,32 @@ class SDKApi extends runtime.BaseAPI {
|
|
|
8880
8915
|
async sdkBusinessAccountMembersOptions(requestParameters, initOverrides) {
|
|
8881
8916
|
await this.sdkBusinessAccountMembersOptionsRaw(requestParameters, initOverrides);
|
|
8882
8917
|
}
|
|
8918
|
+
/**
|
|
8919
|
+
* Options call for this endpoint
|
|
8920
|
+
*/
|
|
8921
|
+
async sdkBusinessAccountPolicyLayerOptionsRaw(requestParameters, initOverrides) {
|
|
8922
|
+
if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
|
|
8923
|
+
throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling sdkBusinessAccountPolicyLayerOptions.');
|
|
8924
|
+
}
|
|
8925
|
+
if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
|
|
8926
|
+
throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling sdkBusinessAccountPolicyLayerOptions.');
|
|
8927
|
+
}
|
|
8928
|
+
const queryParameters = {};
|
|
8929
|
+
const headerParameters = {};
|
|
8930
|
+
const response = await this.request({
|
|
8931
|
+
path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/policy-layer`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
|
|
8932
|
+
method: 'OPTIONS',
|
|
8933
|
+
headers: headerParameters,
|
|
8934
|
+
query: queryParameters,
|
|
8935
|
+
}, initOverrides);
|
|
8936
|
+
return new runtime.VoidApiResponse(response);
|
|
8937
|
+
}
|
|
8938
|
+
/**
|
|
8939
|
+
* Options call for this endpoint
|
|
8940
|
+
*/
|
|
8941
|
+
async sdkBusinessAccountPolicyLayerOptions(requestParameters, initOverrides) {
|
|
8942
|
+
await this.sdkBusinessAccountPolicyLayerOptionsRaw(requestParameters, initOverrides);
|
|
8943
|
+
}
|
|
8883
8944
|
/**
|
|
8884
8945
|
* Options call for this endpoint
|
|
8885
8946
|
*/
|