@dynamic-labs/sdk-api 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-api",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "author": "Dynamic Labs",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -903,7 +903,7 @@ class SDKApi extends runtime.BaseAPI {
903
903
  await this.broadcastFlowOptionsRaw(requestParameters, initOverrides);
904
904
  }
905
905
  /**
906
- * 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.
906
+ * 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.
907
907
  * Broadcast a signed transaction from a Dynamic v3 WaaS wallet
908
908
  */
909
909
  async broadcastWaasTransactionRaw(requestParameters, initOverrides) {
@@ -942,7 +942,7 @@ class SDKApi extends runtime.BaseAPI {
942
942
  return new runtime.JSONApiResponse(response, (jsonValue) => WaasTransactionBroadcastResponse.WaasTransactionBroadcastResponseFromJSON(jsonValue));
943
943
  }
944
944
  /**
945
- * 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.
945
+ * 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.
946
946
  * Broadcast a signed transaction from a Dynamic v3 WaaS wallet
947
947
  */
948
948
  async broadcastWaasTransaction(requestParameters, initOverrides) {
@@ -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 (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).
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 (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).
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
  */
@@ -10787,6 +10849,47 @@ class SDKApi extends runtime.BaseAPI {
10787
10849
  async updateAdditionalAddressesOptions(requestParameters, initOverrides) {
10788
10850
  await this.updateAdditionalAddressesOptionsRaw(requestParameters, initOverrides);
10789
10851
  }
10852
+ /**
10853
+ * 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.
10854
+ * Create, update, or remove a Rule on the business account\'s account-Layer
10855
+ */
10856
+ async updateBusinessAccountPolicyLayerRaw(requestParameters, initOverrides) {
10857
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
10858
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling updateBusinessAccountPolicyLayer.');
10859
+ }
10860
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
10861
+ throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling updateBusinessAccountPolicyLayer.');
10862
+ }
10863
+ if (requestParameters.waasPolicyLayerUpdateRequest === null || requestParameters.waasPolicyLayerUpdateRequest === undefined) {
10864
+ throw new runtime.RequiredError('waasPolicyLayerUpdateRequest', 'Required parameter requestParameters.waasPolicyLayerUpdateRequest was null or undefined when calling updateBusinessAccountPolicyLayer.');
10865
+ }
10866
+ const queryParameters = {};
10867
+ const headerParameters = {};
10868
+ headerParameters['Content-Type'] = 'application/json';
10869
+ if (this.configuration && this.configuration.accessToken) {
10870
+ const token = this.configuration.accessToken;
10871
+ const tokenString = await token("bearerAuth", []);
10872
+ if (tokenString) {
10873
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
10874
+ }
10875
+ }
10876
+ const response = await this.request({
10877
+ path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/policy-layer`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
10878
+ method: 'PATCH',
10879
+ headers: headerParameters,
10880
+ query: queryParameters,
10881
+ body: WaasPolicyLayerUpdateRequest.WaasPolicyLayerUpdateRequestToJSON(requestParameters.waasPolicyLayerUpdateRequest),
10882
+ }, initOverrides);
10883
+ return new runtime.JSONApiResponse(response, (jsonValue) => WaasPolicyLayerResponse.WaasPolicyLayerResponseFromJSON(jsonValue));
10884
+ }
10885
+ /**
10886
+ * 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.
10887
+ * Create, update, or remove a Rule on the business account\'s account-Layer
10888
+ */
10889
+ async updateBusinessAccountPolicyLayer(requestParameters, initOverrides) {
10890
+ const response = await this.updateBusinessAccountPolicyLayerRaw(requestParameters, initOverrides);
10891
+ return await response.value();
10892
+ }
10790
10893
  /**
10791
10894
  * Updates the V2 recovery email address for the authenticated user.
10792
10895
  * Update a user\'s V2 recovery email
@@ -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;
@@ -1374,6 +1382,11 @@ export interface UpdateAdditionalAddressesOptionsRequest {
1374
1382
  environmentId: string;
1375
1383
  walletId: string;
1376
1384
  }
1385
+ export interface UpdateBusinessAccountPolicyLayerRequest {
1386
+ environmentId: string;
1387
+ businessAccountId: string;
1388
+ waasPolicyLayerUpdateRequest: WaasPolicyLayerUpdateRequest;
1389
+ }
1377
1390
  export interface UpdateEmbeddedWalletRecoveryEmailRequest {
1378
1391
  environmentId: string;
1379
1392
  updateRecoveryEmailRequest: UpdateRecoveryEmailRequest;
@@ -1683,12 +1696,12 @@ export declare class SDKApi extends runtime.BaseAPI {
1683
1696
  */
1684
1697
  broadcastFlowOptions(requestParameters: BroadcastFlowOptionsRequest, initOverrides?: RequestInit): Promise<void>;
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
  broadcastWaasTransactionRaw(requestParameters: BroadcastWaasTransactionRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<WaasTransactionBroadcastResponse>>;
1690
1703
  /**
1691
- * 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.
1704
+ * 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.
1692
1705
  * Broadcast a signed transaction from a Dynamic v3 WaaS wallet
1693
1706
  */
1694
1707
  broadcastWaasTransaction(requestParameters: BroadcastWaasTransactionRequest, initOverrides?: RequestInit): Promise<WaasTransactionBroadcastResponse>;
@@ -2504,6 +2517,16 @@ export declare class SDKApi extends runtime.BaseAPI {
2504
2517
  * Options call for this endpoint
2505
2518
  */
2506
2519
  getBackupTokenOptions(requestParameters: GetBackupTokenOptionsRequest, initOverrides?: RequestInit): Promise<void>;
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
+ getBusinessAccountPolicyLayerRaw(requestParameters: GetBusinessAccountPolicyLayerRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<WaasPolicyLayerResponse>>;
2525
+ /**
2526
+ * 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).
2527
+ * Get the business account\'s account-Layer Rules
2528
+ */
2529
+ getBusinessAccountPolicyLayer(requestParameters: GetBusinessAccountPolicyLayerRequest, initOverrides?: RequestInit): Promise<WaasPolicyLayerResponse>;
2507
2530
  /**
2508
2531
  * Deprecated: use GET /sdk/{environmentId}/flow/{flowId} instead.
2509
2532
  * Get a checkout transaction by ID
@@ -4084,6 +4107,14 @@ export declare class SDKApi extends runtime.BaseAPI {
4084
4107
  * Options call for this endpoint
4085
4108
  */
4086
4109
  sdkBusinessAccountMembersOptions(requestParameters: SdkBusinessAccountMembersOptionsRequest, initOverrides?: RequestInit): Promise<void>;
4110
+ /**
4111
+ * Options call for this endpoint
4112
+ */
4113
+ sdkBusinessAccountPolicyLayerOptionsRaw(requestParameters: SdkBusinessAccountPolicyLayerOptionsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>>;
4114
+ /**
4115
+ * Options call for this endpoint
4116
+ */
4117
+ sdkBusinessAccountPolicyLayerOptions(requestParameters: SdkBusinessAccountPolicyLayerOptionsRequest, initOverrides?: RequestInit): Promise<void>;
4087
4118
  /**
4088
4119
  * Options call for this endpoint
4089
4120
  */
@@ -4624,6 +4655,16 @@ export declare class SDKApi extends runtime.BaseAPI {
4624
4655
  * Options call for this endpoint
4625
4656
  */
4626
4657
  updateAdditionalAddressesOptions(requestParameters: UpdateAdditionalAddressesOptionsRequest, initOverrides?: RequestInit): Promise<void>;
4658
+ /**
4659
+ * 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.
4660
+ * Create, update, or remove a Rule on the business account\'s account-Layer
4661
+ */
4662
+ updateBusinessAccountPolicyLayerRaw(requestParameters: UpdateBusinessAccountPolicyLayerRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<WaasPolicyLayerResponse>>;
4663
+ /**
4664
+ * 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.
4665
+ * Create, update, or remove a Rule on the business account\'s account-Layer
4666
+ */
4667
+ updateBusinessAccountPolicyLayer(requestParameters: UpdateBusinessAccountPolicyLayerRequest, initOverrides?: RequestInit): Promise<WaasPolicyLayerResponse>;
4627
4668
  /**
4628
4669
  * Updates the V2 recovery email address for the authenticated user.
4629
4670
  * Update a user\'s V2 recovery email
@@ -899,7 +899,7 @@ class SDKApi extends BaseAPI {
899
899
  await this.broadcastFlowOptionsRaw(requestParameters, initOverrides);
900
900
  }
901
901
  /**
902
- * 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.
902
+ * 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.
903
903
  * Broadcast a signed transaction from a Dynamic v3 WaaS wallet
904
904
  */
905
905
  async broadcastWaasTransactionRaw(requestParameters, initOverrides) {
@@ -938,7 +938,7 @@ class SDKApi extends BaseAPI {
938
938
  return new JSONApiResponse(response, (jsonValue) => WaasTransactionBroadcastResponseFromJSON(jsonValue));
939
939
  }
940
940
  /**
941
- * 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.
941
+ * 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.
942
942
  * Broadcast a signed transaction from a Dynamic v3 WaaS wallet
943
943
  */
944
944
  async broadcastWaasTransaction(requestParameters, initOverrides) {
@@ -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 (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).
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 (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).
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
  */
@@ -10783,6 +10845,47 @@ class SDKApi extends BaseAPI {
10783
10845
  async updateAdditionalAddressesOptions(requestParameters, initOverrides) {
10784
10846
  await this.updateAdditionalAddressesOptionsRaw(requestParameters, initOverrides);
10785
10847
  }
10848
+ /**
10849
+ * 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.
10850
+ * Create, update, or remove a Rule on the business account\'s account-Layer
10851
+ */
10852
+ async updateBusinessAccountPolicyLayerRaw(requestParameters, initOverrides) {
10853
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
10854
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling updateBusinessAccountPolicyLayer.');
10855
+ }
10856
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
10857
+ throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling updateBusinessAccountPolicyLayer.');
10858
+ }
10859
+ if (requestParameters.waasPolicyLayerUpdateRequest === null || requestParameters.waasPolicyLayerUpdateRequest === undefined) {
10860
+ throw new RequiredError('waasPolicyLayerUpdateRequest', 'Required parameter requestParameters.waasPolicyLayerUpdateRequest was null or undefined when calling updateBusinessAccountPolicyLayer.');
10861
+ }
10862
+ const queryParameters = {};
10863
+ const headerParameters = {};
10864
+ headerParameters['Content-Type'] = 'application/json';
10865
+ if (this.configuration && this.configuration.accessToken) {
10866
+ const token = this.configuration.accessToken;
10867
+ const tokenString = await token("bearerAuth", []);
10868
+ if (tokenString) {
10869
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
10870
+ }
10871
+ }
10872
+ const response = await this.request({
10873
+ path: `/sdk/{environmentId}/businessAccounts/{businessAccountId}/policy-layer`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
10874
+ method: 'PATCH',
10875
+ headers: headerParameters,
10876
+ query: queryParameters,
10877
+ body: WaasPolicyLayerUpdateRequestToJSON(requestParameters.waasPolicyLayerUpdateRequest),
10878
+ }, initOverrides);
10879
+ return new JSONApiResponse(response, (jsonValue) => WaasPolicyLayerResponseFromJSON(jsonValue));
10880
+ }
10881
+ /**
10882
+ * 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.
10883
+ * Create, update, or remove a Rule on the business account\'s account-Layer
10884
+ */
10885
+ async updateBusinessAccountPolicyLayer(requestParameters, initOverrides) {
10886
+ const response = await this.updateBusinessAccountPolicyLayerRaw(requestParameters, initOverrides);
10887
+ return await response.value();
10888
+ }
10786
10889
  /**
10787
10890
  * Updates the V2 recovery email address for the authenticated user.
10788
10891
  * Update a user\'s V2 recovery email
@@ -28,7 +28,7 @@ export interface WaasTransactionBroadcastRequest {
28
28
  * @type {string}
29
29
  * @memberof WaasTransactionBroadcastRequest
30
30
  */
31
- networkId: string | null;
31
+ networkId: string;
32
32
  /**
33
33
  * Immutable signed transaction payload, encoded per `encoding`.
34
34
  * @type {string}