@dynamic-labs/sdk-api-core 0.1.0 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-api-core",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "author": "Dynamic Labs",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -3701,6 +3701,42 @@ class SDKApi extends runtime.BaseAPI {
3701
3701
  async getBackupTokenOptions(requestParameters, initOverrides) {
3702
3702
  await this.getBackupTokenOptionsRaw(requestParameters, initOverrides);
3703
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
+ }
3704
3740
  /**
3705
3741
  * Deprecated: use GET /sdk/{environmentId}/flow/{flowId} instead.
3706
3742
  * Get a checkout transaction by ID
@@ -8879,6 +8915,32 @@ class SDKApi extends runtime.BaseAPI {
8879
8915
  async sdkBusinessAccountMembersOptions(requestParameters, initOverrides) {
8880
8916
  await this.sdkBusinessAccountMembersOptionsRaw(requestParameters, initOverrides);
8881
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
+ }
8882
8944
  /**
8883
8945
  * Options call for this endpoint
8884
8946
  */