@dynamic-labs/sdk-api 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",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "author": "Dynamic Labs",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -3734,6 +3734,42 @@ class SDKApi extends runtime.BaseAPI {
3734
3734
  async getBackupTokenOptions(requestParameters, initOverrides) {
3735
3735
  await this.getBackupTokenOptionsRaw(requestParameters, initOverrides);
3736
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
+ }
3737
3773
  /**
3738
3774
  * Deprecated: use GET /sdk/{environmentId}/flow/{flowId} instead.
3739
3775
  * Get a checkout transaction by ID
@@ -8989,6 +9025,32 @@ class SDKApi extends runtime.BaseAPI {
8989
9025
  async sdkBusinessAccountMembersOptions(requestParameters, initOverrides) {
8990
9026
  await this.sdkBusinessAccountMembersOptionsRaw(requestParameters, initOverrides);
8991
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
+ }
8992
9054
  /**
8993
9055
  * Options call for this endpoint
8994
9056
  */
@@ -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
@@ -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
  */
@@ -3730,6 +3730,42 @@ class SDKApi extends BaseAPI {
3730
3730
  async getBackupTokenOptions(requestParameters, initOverrides) {
3731
3731
  await this.getBackupTokenOptionsRaw(requestParameters, initOverrides);
3732
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
+ }
3733
3769
  /**
3734
3770
  * Deprecated: use GET /sdk/{environmentId}/flow/{flowId} instead.
3735
3771
  * Get a checkout transaction by ID
@@ -8985,6 +9021,32 @@ class SDKApi extends BaseAPI {
8985
9021
  async sdkBusinessAccountMembersOptions(requestParameters, initOverrides) {
8986
9022
  await this.sdkBusinessAccountMembersOptionsRaw(requestParameters, initOverrides);
8987
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
+ }
8988
9050
  /**
8989
9051
  * Options call for this endpoint
8990
9052
  */