@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.
@@ -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;
@@ -2499,6 +2507,16 @@ export declare class SDKApi extends runtime.BaseAPI {
2499
2507
  * Options call for this endpoint
2500
2508
  */
2501
2509
  getBackupTokenOptions(requestParameters: GetBackupTokenOptionsRequest, initOverrides?: RequestInit): Promise<void>;
2510
+ /**
2511
+ * 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.
2512
+ * Get the business account\'s account-Layer Rules
2513
+ */
2514
+ getBusinessAccountPolicyLayerRaw(requestParameters: GetBusinessAccountPolicyLayerRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<WaasPolicyLayerResponse>>;
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
+ getBusinessAccountPolicyLayer(requestParameters: GetBusinessAccountPolicyLayerRequest, initOverrides?: RequestInit): Promise<WaasPolicyLayerResponse>;
2502
2520
  /**
2503
2521
  * Deprecated: use GET /sdk/{environmentId}/flow/{flowId} instead.
2504
2522
  * Get a checkout transaction by ID
@@ -4051,6 +4069,14 @@ export declare class SDKApi extends runtime.BaseAPI {
4051
4069
  * Options call for this endpoint
4052
4070
  */
4053
4071
  sdkBusinessAccountMembersOptions(requestParameters: SdkBusinessAccountMembersOptionsRequest, initOverrides?: RequestInit): Promise<void>;
4072
+ /**
4073
+ * Options call for this endpoint
4074
+ */
4075
+ sdkBusinessAccountPolicyLayerOptionsRaw(requestParameters: SdkBusinessAccountPolicyLayerOptionsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>>;
4076
+ /**
4077
+ * Options call for this endpoint
4078
+ */
4079
+ sdkBusinessAccountPolicyLayerOptions(requestParameters: SdkBusinessAccountPolicyLayerOptionsRequest, initOverrides?: RequestInit): Promise<void>;
4054
4080
  /**
4055
4081
  * Options call for this endpoint
4056
4082
  */
@@ -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.
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.
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
  */