@dynamic-labs/sdk-api 0.75.0 → 0.76.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.75.0",
3
+ "version": "0.76.0",
4
4
  "author": "Dynamic Labs",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -197,8 +197,9 @@ require('../models/WaasDelegationCredentialsResponse.cjs');
197
197
  require('../models/WaasPolicyLayerRule.cjs');
198
198
  require('../models/WaasPolicyAction.cjs');
199
199
  require('../models/WaasPolicyDeclarativeRule.cjs');
200
+ var WaasPolicyLayerResponse = require('../models/WaasPolicyLayerResponse.cjs');
200
201
  require('../models/WaasPolicyLayerRuleOperation.cjs');
201
- require('../models/WaasPolicyLayerUpdateRequest.cjs');
202
+ var WaasPolicyLayerUpdateRequest = require('../models/WaasPolicyLayerUpdateRequest.cjs');
202
203
  var WaasSignAndBroadcastRequest = require('../models/WaasSignAndBroadcastRequest.cjs');
203
204
  require('../models/WaasSignerPolicyLayerUpdateRequest.cjs');
204
205
  require('../models/WaasSvmCommitment.cjs');
@@ -377,6 +378,35 @@ class ServerApi extends runtime.BaseAPI {
377
378
  const response = await this.getBusinessAccountByIdServerRaw(requestParameters, initOverrides);
378
379
  return await response.value();
379
380
  }
381
+ /**
382
+ * Returns the Composition account-Layer content for the business account, the Rules that apply to every wallet in it. Business-account owner or admin only.
383
+ * Server — get the business account\'s account-Layer Rules
384
+ */
385
+ async getBusinessAccountPolicyLayerServerRaw(requestParameters, initOverrides) {
386
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
387
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getBusinessAccountPolicyLayerServer.');
388
+ }
389
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
390
+ throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling getBusinessAccountPolicyLayerServer.');
391
+ }
392
+ const queryParameters = {};
393
+ const headerParameters = {};
394
+ const response = await this.request({
395
+ path: `/server/{environmentId}/businessAccounts/{businessAccountId}/policy-layer`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
396
+ method: 'GET',
397
+ headers: headerParameters,
398
+ query: queryParameters,
399
+ }, initOverrides);
400
+ return new runtime.JSONApiResponse(response, (jsonValue) => WaasPolicyLayerResponse.WaasPolicyLayerResponseFromJSON(jsonValue));
401
+ }
402
+ /**
403
+ * Returns the Composition account-Layer content for the business account, the Rules that apply to every wallet in it. Business-account owner or admin only.
404
+ * Server — get the business account\'s account-Layer Rules
405
+ */
406
+ async getBusinessAccountPolicyLayerServer(requestParameters, initOverrides) {
407
+ const response = await this.getBusinessAccountPolicyLayerServerRaw(requestParameters, initOverrides);
408
+ return await response.value();
409
+ }
380
410
  /**
381
411
  * Returns the recipient claimable fee balances across all providers.
382
412
  * Get claimable fee balances
@@ -720,6 +750,40 @@ class ServerApi extends runtime.BaseAPI {
720
750
  const response = await this.submitFlowFeeClaimServerRaw(requestParameters, initOverrides);
721
751
  return await response.value();
722
752
  }
753
+ /**
754
+ * Applies a per-Rule upsert or remove, a batch, or a replace of the whole Rule list to the account-Layer, which applies to every wallet in the business account. Business-account owner or admin only. Creates the account-Layer if the account has none yet.
755
+ * Server — update the business account\'s account-Layer Rules
756
+ */
757
+ async updateBusinessAccountPolicyLayerServerRaw(requestParameters, initOverrides) {
758
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
759
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling updateBusinessAccountPolicyLayerServer.');
760
+ }
761
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
762
+ throw new runtime.RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling updateBusinessAccountPolicyLayerServer.');
763
+ }
764
+ if (requestParameters.waasPolicyLayerUpdateRequest === null || requestParameters.waasPolicyLayerUpdateRequest === undefined) {
765
+ throw new runtime.RequiredError('waasPolicyLayerUpdateRequest', 'Required parameter requestParameters.waasPolicyLayerUpdateRequest was null or undefined when calling updateBusinessAccountPolicyLayerServer.');
766
+ }
767
+ const queryParameters = {};
768
+ const headerParameters = {};
769
+ headerParameters['Content-Type'] = 'application/json';
770
+ const response = await this.request({
771
+ path: `/server/{environmentId}/businessAccounts/{businessAccountId}/policy-layer`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
772
+ method: 'PATCH',
773
+ headers: headerParameters,
774
+ query: queryParameters,
775
+ body: WaasPolicyLayerUpdateRequest.WaasPolicyLayerUpdateRequestToJSON(requestParameters.waasPolicyLayerUpdateRequest),
776
+ }, initOverrides);
777
+ return new runtime.JSONApiResponse(response, (jsonValue) => WaasPolicyLayerResponse.WaasPolicyLayerResponseFromJSON(jsonValue));
778
+ }
779
+ /**
780
+ * Applies a per-Rule upsert or remove, a batch, or a replace of the whole Rule list to the account-Layer, which applies to every wallet in the business account. Business-account owner or admin only. Creates the account-Layer if the account has none yet.
781
+ * Server — update the business account\'s account-Layer Rules
782
+ */
783
+ async updateBusinessAccountPolicyLayerServer(requestParameters, initOverrides) {
784
+ const response = await this.updateBusinessAccountPolicyLayerServerRaw(requestParameters, initOverrides);
785
+ return await response.value();
786
+ }
723
787
  }
724
788
 
725
789
  exports.ServerApi = ServerApi;
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { AddBusinessAccountMemberSdkRequest, BusinessAccount, BusinessAccountDetail, BusinessAccountList, BusinessAccountMember, CreateBusinessAccountSdkRequest, Flow, FlowCreateRequest, FlowCreateResponse, FlowFeeBalancesResponse, FlowFeeClaimRequest, FlowFeeClaimResponse, FlowFeeClaimSubmitRequest, FlowFeeClaimSubmitResponse, FlowModeEnum, FlowPaymentLinkCreateRequest, FlowPaymentLinkCreateResponse, LinkBusinessAccountWalletSdkRequest, ServerIdentityResponse, SoftDeleteWaasWalletsRequest, SoftDeleteWaasWalletsResponse, WaasSignAndBroadcastRequest, WaasTransactionBroadcast } from '../models';
13
+ import { AddBusinessAccountMemberSdkRequest, BusinessAccount, BusinessAccountDetail, BusinessAccountList, BusinessAccountMember, CreateBusinessAccountSdkRequest, Flow, FlowCreateRequest, FlowCreateResponse, FlowFeeBalancesResponse, FlowFeeClaimRequest, FlowFeeClaimResponse, FlowFeeClaimSubmitRequest, FlowFeeClaimSubmitResponse, FlowModeEnum, FlowPaymentLinkCreateRequest, FlowPaymentLinkCreateResponse, LinkBusinessAccountWalletSdkRequest, ServerIdentityResponse, SoftDeleteWaasWalletsRequest, SoftDeleteWaasWalletsResponse, WaasPolicyLayerResponse, WaasPolicyLayerUpdateRequest, WaasSignAndBroadcastRequest, WaasTransactionBroadcast } from '../models';
14
14
  export interface AddBusinessAccountMemberServerRequest {
15
15
  environmentId: string;
16
16
  businessAccountId: string;
@@ -33,6 +33,10 @@ export interface GetBusinessAccountByIdServerRequest {
33
33
  environmentId: string;
34
34
  businessAccountId: string;
35
35
  }
36
+ export interface GetBusinessAccountPolicyLayerServerRequest {
37
+ environmentId: string;
38
+ businessAccountId: string;
39
+ }
36
40
  export interface GetFlowFeeClaimBalancesServerRequest {
37
41
  environmentId: string;
38
42
  recipientAddress: string;
@@ -80,6 +84,11 @@ export interface SubmitFlowFeeClaimServerRequest {
80
84
  environmentId: string;
81
85
  flowFeeClaimSubmitRequest: FlowFeeClaimSubmitRequest;
82
86
  }
87
+ export interface UpdateBusinessAccountPolicyLayerServerRequest {
88
+ environmentId: string;
89
+ businessAccountId: string;
90
+ waasPolicyLayerUpdateRequest: WaasPolicyLayerUpdateRequest;
91
+ }
83
92
  /**
84
93
  *
85
94
  */
@@ -134,6 +143,16 @@ export declare class ServerApi extends runtime.BaseAPI {
134
143
  * Server — get a business account with embedded members and signers
135
144
  */
136
145
  getBusinessAccountByIdServer(requestParameters: GetBusinessAccountByIdServerRequest, initOverrides?: RequestInit): Promise<BusinessAccountDetail>;
146
+ /**
147
+ * Returns the Composition account-Layer content for the business account, the Rules that apply to every wallet in it. Business-account owner or admin only.
148
+ * Server — get the business account\'s account-Layer Rules
149
+ */
150
+ getBusinessAccountPolicyLayerServerRaw(requestParameters: GetBusinessAccountPolicyLayerServerRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<WaasPolicyLayerResponse>>;
151
+ /**
152
+ * Returns the Composition account-Layer content for the business account, the Rules that apply to every wallet in it. Business-account owner or admin only.
153
+ * Server — get the business account\'s account-Layer Rules
154
+ */
155
+ getBusinessAccountPolicyLayerServer(requestParameters: GetBusinessAccountPolicyLayerServerRequest, initOverrides?: RequestInit): Promise<WaasPolicyLayerResponse>;
137
156
  /**
138
157
  * Returns the recipient claimable fee balances across all providers.
139
158
  * Get claimable fee balances
@@ -240,4 +259,14 @@ export declare class ServerApi extends runtime.BaseAPI {
240
259
  * Submit a fee claim
241
260
  */
242
261
  submitFlowFeeClaimServer(requestParameters: SubmitFlowFeeClaimServerRequest, initOverrides?: RequestInit): Promise<FlowFeeClaimSubmitResponse>;
262
+ /**
263
+ * Applies a per-Rule upsert or remove, a batch, or a replace of the whole Rule list to the account-Layer, which applies to every wallet in the business account. Business-account owner or admin only. Creates the account-Layer if the account has none yet.
264
+ * Server — update the business account\'s account-Layer Rules
265
+ */
266
+ updateBusinessAccountPolicyLayerServerRaw(requestParameters: UpdateBusinessAccountPolicyLayerServerRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<WaasPolicyLayerResponse>>;
267
+ /**
268
+ * Applies a per-Rule upsert or remove, a batch, or a replace of the whole Rule list to the account-Layer, which applies to every wallet in the business account. Business-account owner or admin only. Creates the account-Layer if the account has none yet.
269
+ * Server — update the business account\'s account-Layer Rules
270
+ */
271
+ updateBusinessAccountPolicyLayerServer(requestParameters: UpdateBusinessAccountPolicyLayerServerRequest, initOverrides?: RequestInit): Promise<WaasPolicyLayerResponse>;
243
272
  }
@@ -193,8 +193,9 @@ import '../models/WaasDelegationCredentialsResponse.js';
193
193
  import '../models/WaasPolicyLayerRule.js';
194
194
  import '../models/WaasPolicyAction.js';
195
195
  import '../models/WaasPolicyDeclarativeRule.js';
196
+ import { WaasPolicyLayerResponseFromJSON } from '../models/WaasPolicyLayerResponse.js';
196
197
  import '../models/WaasPolicyLayerRuleOperation.js';
197
- import '../models/WaasPolicyLayerUpdateRequest.js';
198
+ import { WaasPolicyLayerUpdateRequestToJSON } from '../models/WaasPolicyLayerUpdateRequest.js';
198
199
  import { WaasSignAndBroadcastRequestToJSON } from '../models/WaasSignAndBroadcastRequest.js';
199
200
  import '../models/WaasSignerPolicyLayerUpdateRequest.js';
200
201
  import '../models/WaasSvmCommitment.js';
@@ -373,6 +374,35 @@ class ServerApi extends BaseAPI {
373
374
  const response = await this.getBusinessAccountByIdServerRaw(requestParameters, initOverrides);
374
375
  return await response.value();
375
376
  }
377
+ /**
378
+ * Returns the Composition account-Layer content for the business account, the Rules that apply to every wallet in it. Business-account owner or admin only.
379
+ * Server — get the business account\'s account-Layer Rules
380
+ */
381
+ async getBusinessAccountPolicyLayerServerRaw(requestParameters, initOverrides) {
382
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
383
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getBusinessAccountPolicyLayerServer.');
384
+ }
385
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
386
+ throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling getBusinessAccountPolicyLayerServer.');
387
+ }
388
+ const queryParameters = {};
389
+ const headerParameters = {};
390
+ const response = await this.request({
391
+ path: `/server/{environmentId}/businessAccounts/{businessAccountId}/policy-layer`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
392
+ method: 'GET',
393
+ headers: headerParameters,
394
+ query: queryParameters,
395
+ }, initOverrides);
396
+ return new JSONApiResponse(response, (jsonValue) => WaasPolicyLayerResponseFromJSON(jsonValue));
397
+ }
398
+ /**
399
+ * Returns the Composition account-Layer content for the business account, the Rules that apply to every wallet in it. Business-account owner or admin only.
400
+ * Server — get the business account\'s account-Layer Rules
401
+ */
402
+ async getBusinessAccountPolicyLayerServer(requestParameters, initOverrides) {
403
+ const response = await this.getBusinessAccountPolicyLayerServerRaw(requestParameters, initOverrides);
404
+ return await response.value();
405
+ }
376
406
  /**
377
407
  * Returns the recipient claimable fee balances across all providers.
378
408
  * Get claimable fee balances
@@ -716,6 +746,40 @@ class ServerApi extends BaseAPI {
716
746
  const response = await this.submitFlowFeeClaimServerRaw(requestParameters, initOverrides);
717
747
  return await response.value();
718
748
  }
749
+ /**
750
+ * Applies a per-Rule upsert or remove, a batch, or a replace of the whole Rule list to the account-Layer, which applies to every wallet in the business account. Business-account owner or admin only. Creates the account-Layer if the account has none yet.
751
+ * Server — update the business account\'s account-Layer Rules
752
+ */
753
+ async updateBusinessAccountPolicyLayerServerRaw(requestParameters, initOverrides) {
754
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
755
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling updateBusinessAccountPolicyLayerServer.');
756
+ }
757
+ if (requestParameters.businessAccountId === null || requestParameters.businessAccountId === undefined) {
758
+ throw new RequiredError('businessAccountId', 'Required parameter requestParameters.businessAccountId was null or undefined when calling updateBusinessAccountPolicyLayerServer.');
759
+ }
760
+ if (requestParameters.waasPolicyLayerUpdateRequest === null || requestParameters.waasPolicyLayerUpdateRequest === undefined) {
761
+ throw new RequiredError('waasPolicyLayerUpdateRequest', 'Required parameter requestParameters.waasPolicyLayerUpdateRequest was null or undefined when calling updateBusinessAccountPolicyLayerServer.');
762
+ }
763
+ const queryParameters = {};
764
+ const headerParameters = {};
765
+ headerParameters['Content-Type'] = 'application/json';
766
+ const response = await this.request({
767
+ path: `/server/{environmentId}/businessAccounts/{businessAccountId}/policy-layer`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"businessAccountId"}}`, encodeURIComponent(String(requestParameters.businessAccountId))),
768
+ method: 'PATCH',
769
+ headers: headerParameters,
770
+ query: queryParameters,
771
+ body: WaasPolicyLayerUpdateRequestToJSON(requestParameters.waasPolicyLayerUpdateRequest),
772
+ }, initOverrides);
773
+ return new JSONApiResponse(response, (jsonValue) => WaasPolicyLayerResponseFromJSON(jsonValue));
774
+ }
775
+ /**
776
+ * Applies a per-Rule upsert or remove, a batch, or a replace of the whole Rule list to the account-Layer, which applies to every wallet in the business account. Business-account owner or admin only. Creates the account-Layer if the account has none yet.
777
+ * Server — update the business account\'s account-Layer Rules
778
+ */
779
+ async updateBusinessAccountPolicyLayerServer(requestParameters, initOverrides) {
780
+ const response = await this.updateBusinessAccountPolicyLayerServerRaw(requestParameters, initOverrides);
781
+ return await response.value();
782
+ }
719
783
  }
720
784
 
721
785
  export { ServerApi };
package/src/index.cjs CHANGED
@@ -938,6 +938,7 @@ var WaasPolicyAction = require('./models/WaasPolicyAction.cjs');
938
938
  var WaasPolicyArgumentConstraint = require('./models/WaasPolicyArgumentConstraint.cjs');
939
939
  var WaasPolicyConstraintCondition = require('./models/WaasPolicyConstraintCondition.cjs');
940
940
  var WaasPolicyCreateRequest = require('./models/WaasPolicyCreateRequest.cjs');
941
+ var WaasPolicyDeclarativeApprovalRequirement = require('./models/WaasPolicyDeclarativeApprovalRequirement.cjs');
941
942
  var WaasPolicyDeclarativeRule = require('./models/WaasPolicyDeclarativeRule.cjs');
942
943
  var WaasPolicyDeleteRequest = require('./models/WaasPolicyDeleteRequest.cjs');
943
944
  var WaasPolicyLayerResponse = require('./models/WaasPolicyLayerResponse.cjs');
@@ -4489,6 +4490,9 @@ exports.WaasPolicyConstraintConditionToJSON = WaasPolicyConstraintCondition.Waas
4489
4490
  exports.WaasPolicyCreateRequestFromJSON = WaasPolicyCreateRequest.WaasPolicyCreateRequestFromJSON;
4490
4491
  exports.WaasPolicyCreateRequestFromJSONTyped = WaasPolicyCreateRequest.WaasPolicyCreateRequestFromJSONTyped;
4491
4492
  exports.WaasPolicyCreateRequestToJSON = WaasPolicyCreateRequest.WaasPolicyCreateRequestToJSON;
4493
+ exports.WaasPolicyDeclarativeApprovalRequirementFromJSON = WaasPolicyDeclarativeApprovalRequirement.WaasPolicyDeclarativeApprovalRequirementFromJSON;
4494
+ exports.WaasPolicyDeclarativeApprovalRequirementFromJSONTyped = WaasPolicyDeclarativeApprovalRequirement.WaasPolicyDeclarativeApprovalRequirementFromJSONTyped;
4495
+ exports.WaasPolicyDeclarativeApprovalRequirementToJSON = WaasPolicyDeclarativeApprovalRequirement.WaasPolicyDeclarativeApprovalRequirementToJSON;
4492
4496
  exports.WaasPolicyDeclarativeRuleFromJSON = WaasPolicyDeclarativeRule.WaasPolicyDeclarativeRuleFromJSON;
4493
4497
  exports.WaasPolicyDeclarativeRuleFromJSONTyped = WaasPolicyDeclarativeRule.WaasPolicyDeclarativeRuleFromJSONTyped;
4494
4498
  Object.defineProperty(exports, 'WaasPolicyDeclarativeRulePhaseEnum', {
package/src/index.js CHANGED
@@ -934,6 +934,7 @@ export { WaasPolicyAction, WaasPolicyActionFromJSON, WaasPolicyActionFromJSONTyp
934
934
  export { WaasPolicyArgumentConstraintFromJSON, WaasPolicyArgumentConstraintFromJSONTyped, WaasPolicyArgumentConstraintToJSON } from './models/WaasPolicyArgumentConstraint.js';
935
935
  export { WaasPolicyConstraintCondition, WaasPolicyConstraintConditionFromJSON, WaasPolicyConstraintConditionFromJSONTyped, WaasPolicyConstraintConditionToJSON } from './models/WaasPolicyConstraintCondition.js';
936
936
  export { WaasPolicyCreateRequestFromJSON, WaasPolicyCreateRequestFromJSONTyped, WaasPolicyCreateRequestToJSON } from './models/WaasPolicyCreateRequest.js';
937
+ export { WaasPolicyDeclarativeApprovalRequirementFromJSON, WaasPolicyDeclarativeApprovalRequirementFromJSONTyped, WaasPolicyDeclarativeApprovalRequirementToJSON } from './models/WaasPolicyDeclarativeApprovalRequirement.js';
937
938
  export { WaasPolicyDeclarativeRuleFromJSON, WaasPolicyDeclarativeRuleFromJSONTyped, WaasPolicyDeclarativeRulePhaseEnum, WaasPolicyDeclarativeRuleToJSON } from './models/WaasPolicyDeclarativeRule.js';
938
939
  export { WaasPolicyDeleteRequestFromJSON, WaasPolicyDeleteRequestFromJSONTyped, WaasPolicyDeleteRequestToJSON } from './models/WaasPolicyDeleteRequest.js';
939
940
  export { WaasPolicyLayerResponseFromJSON, WaasPolicyLayerResponseFromJSONTyped, WaasPolicyLayerResponseToJSON } from './models/WaasPolicyLayerResponse.js';
@@ -16,7 +16,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
16
16
  * Do not edit the class manually.
17
17
  */
18
18
  /**
19
- * What a rule in the policy rule language decides when it matches
19
+ * What a rule in the policy rule language decides when it matches. REQUIRE_APPROVAL neither allows nor denies; it applies the Rule's approvalRequirements to a matching transaction, and is valid in the transaction phase only.
20
20
  * @export
21
21
  * @enum {string}
22
22
  */
@@ -24,6 +24,7 @@ exports.WaasPolicyAction = void 0;
24
24
  (function (WaasPolicyAction) {
25
25
  WaasPolicyAction["Allow"] = "ALLOW";
26
26
  WaasPolicyAction["Deny"] = "DENY";
27
+ WaasPolicyAction["RequireApproval"] = "REQUIRE_APPROVAL";
27
28
  })(exports.WaasPolicyAction || (exports.WaasPolicyAction = {}));
28
29
  function WaasPolicyActionFromJSON(json) {
29
30
  return WaasPolicyActionFromJSONTyped(json);
@@ -10,13 +10,14 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /**
13
- * What a rule in the policy rule language decides when it matches
13
+ * What a rule in the policy rule language decides when it matches. REQUIRE_APPROVAL neither allows nor denies; it applies the Rule's approvalRequirements to a matching transaction, and is valid in the transaction phase only.
14
14
  * @export
15
15
  * @enum {string}
16
16
  */
17
17
  export declare enum WaasPolicyAction {
18
18
  Allow = "ALLOW",
19
- Deny = "DENY"
19
+ Deny = "DENY",
20
+ RequireApproval = "REQUIRE_APPROVAL"
20
21
  }
21
22
  export declare function WaasPolicyActionFromJSON(json: any): WaasPolicyAction;
22
23
  export declare function WaasPolicyActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): WaasPolicyAction;
@@ -12,7 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  /**
15
- * What a rule in the policy rule language decides when it matches
15
+ * What a rule in the policy rule language decides when it matches. REQUIRE_APPROVAL neither allows nor denies; it applies the Rule's approvalRequirements to a matching transaction, and is valid in the transaction phase only.
16
16
  * @export
17
17
  * @enum {string}
18
18
  */
@@ -20,6 +20,7 @@ var WaasPolicyAction;
20
20
  (function (WaasPolicyAction) {
21
21
  WaasPolicyAction["Allow"] = "ALLOW";
22
22
  WaasPolicyAction["Deny"] = "DENY";
23
+ WaasPolicyAction["RequireApproval"] = "REQUIRE_APPROVAL";
23
24
  })(WaasPolicyAction || (WaasPolicyAction = {}));
24
25
  function WaasPolicyActionFromJSON(json) {
25
26
  return WaasPolicyActionFromJSONTyped(json);
@@ -0,0 +1,47 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var runtime = require('../runtime.cjs');
6
+
7
+ /* tslint:disable */
8
+ function WaasPolicyDeclarativeApprovalRequirementFromJSON(json) {
9
+ return WaasPolicyDeclarativeApprovalRequirementFromJSONTyped(json);
10
+ }
11
+ function WaasPolicyDeclarativeApprovalRequirementFromJSONTyped(json, ignoreDiscriminator) {
12
+ if ((json === undefined) || (json === null)) {
13
+ return json;
14
+ }
15
+ return {
16
+ 'v': json['v'],
17
+ 'id': json['id'],
18
+ 'eligibleApproverRoles': !runtime.exists(json, 'eligibleApproverRoles') ? undefined : json['eligibleApproverRoles'],
19
+ 'mandatoryApproverRoles': !runtime.exists(json, 'mandatoryApproverRoles') ? undefined : json['mandatoryApproverRoles'],
20
+ 'eligibleApproverRole': !runtime.exists(json, 'eligibleApproverRole') ? undefined : json['eligibleApproverRole'],
21
+ 'mandatoryApproverRole': !runtime.exists(json, 'mandatoryApproverRole') ? undefined : json['mandatoryApproverRole'],
22
+ 'requiredApprovals': json['requiredApprovals'],
23
+ 'completeWithinSeconds': !runtime.exists(json, 'completeWithinSeconds') ? undefined : json['completeWithinSeconds'],
24
+ };
25
+ }
26
+ function WaasPolicyDeclarativeApprovalRequirementToJSON(value) {
27
+ if (value === undefined) {
28
+ return undefined;
29
+ }
30
+ if (value === null) {
31
+ return null;
32
+ }
33
+ return {
34
+ 'v': value.v,
35
+ 'id': value.id,
36
+ 'eligibleApproverRoles': value.eligibleApproverRoles,
37
+ 'mandatoryApproverRoles': value.mandatoryApproverRoles,
38
+ 'eligibleApproverRole': value.eligibleApproverRole,
39
+ 'mandatoryApproverRole': value.mandatoryApproverRole,
40
+ 'requiredApprovals': value.requiredApprovals,
41
+ 'completeWithinSeconds': value.completeWithinSeconds,
42
+ };
43
+ }
44
+
45
+ exports.WaasPolicyDeclarativeApprovalRequirementFromJSON = WaasPolicyDeclarativeApprovalRequirementFromJSON;
46
+ exports.WaasPolicyDeclarativeApprovalRequirementFromJSONTyped = WaasPolicyDeclarativeApprovalRequirementFromJSONTyped;
47
+ exports.WaasPolicyDeclarativeApprovalRequirementToJSON = WaasPolicyDeclarativeApprovalRequirementToJSON;
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Dashboard API
3
+ * Dashboard API documentation
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * One approval requirement on a Rule in the policy rule language. It has no condition of its own: the Rule's own condition decides when it applies.
14
+ * @export
15
+ * @interface WaasPolicyDeclarativeApprovalRequirement
16
+ */
17
+ export interface WaasPolicyDeclarativeApprovalRequirement {
18
+ /**
19
+ * Schema version for this requirement. An unknown value rejects the Composition.
20
+ * @type {number}
21
+ * @memberof WaasPolicyDeclarativeApprovalRequirement
22
+ */
23
+ v: number;
24
+ /**
25
+ * Stable handle for this requirement, carried as requirementId in the deny reason.
26
+ * @type {string}
27
+ * @memberof WaasPolicyDeclarativeApprovalRequirement
28
+ */
29
+ id: string;
30
+ /**
31
+ * Names of the roles whose holders may satisfy this requirement. A holder of any listed role may approve. An empty array means no restriction.
32
+ * @type {Array<string>}
33
+ * @memberof WaasPolicyDeclarativeApprovalRequirement
34
+ */
35
+ eligibleApproverRoles?: Array<string>;
36
+ /**
37
+ * Names of the roles that must each be represented among the approvers, regardless of eligibleApproverRoles. An empty array means none.
38
+ * @type {Array<string>}
39
+ * @memberof WaasPolicyDeclarativeApprovalRequirement
40
+ */
41
+ mandatoryApproverRoles?: Array<string>;
42
+ /**
43
+ * Deprecated. Use eligibleApproverRoles. Do not send both.
44
+ * @type {string}
45
+ * @memberof WaasPolicyDeclarativeApprovalRequirement
46
+ */
47
+ eligibleApproverRole?: string;
48
+ /**
49
+ * Deprecated. Use mandatoryApproverRoles. Do not send both.
50
+ * @type {string}
51
+ * @memberof WaasPolicyDeclarativeApprovalRequirement
52
+ */
53
+ mandatoryApproverRole?: string;
54
+ /**
55
+ * Total approvals required. Never counts the Initiator.
56
+ * @type {number}
57
+ * @memberof WaasPolicyDeclarativeApprovalRequirement
58
+ */
59
+ requiredApprovals: number;
60
+ /**
61
+ * How long a collected-approvals proposal remains valid.
62
+ * @type {number}
63
+ * @memberof WaasPolicyDeclarativeApprovalRequirement
64
+ */
65
+ completeWithinSeconds?: number;
66
+ }
67
+ export declare function WaasPolicyDeclarativeApprovalRequirementFromJSON(json: any): WaasPolicyDeclarativeApprovalRequirement;
68
+ export declare function WaasPolicyDeclarativeApprovalRequirementFromJSONTyped(json: any, ignoreDiscriminator: boolean): WaasPolicyDeclarativeApprovalRequirement;
69
+ export declare function WaasPolicyDeclarativeApprovalRequirementToJSON(value?: WaasPolicyDeclarativeApprovalRequirement | null): any;
@@ -0,0 +1,41 @@
1
+ import { exists } from '../runtime.js';
2
+
3
+ /* tslint:disable */
4
+ function WaasPolicyDeclarativeApprovalRequirementFromJSON(json) {
5
+ return WaasPolicyDeclarativeApprovalRequirementFromJSONTyped(json);
6
+ }
7
+ function WaasPolicyDeclarativeApprovalRequirementFromJSONTyped(json, ignoreDiscriminator) {
8
+ if ((json === undefined) || (json === null)) {
9
+ return json;
10
+ }
11
+ return {
12
+ 'v': json['v'],
13
+ 'id': json['id'],
14
+ 'eligibleApproverRoles': !exists(json, 'eligibleApproverRoles') ? undefined : json['eligibleApproverRoles'],
15
+ 'mandatoryApproverRoles': !exists(json, 'mandatoryApproverRoles') ? undefined : json['mandatoryApproverRoles'],
16
+ 'eligibleApproverRole': !exists(json, 'eligibleApproverRole') ? undefined : json['eligibleApproverRole'],
17
+ 'mandatoryApproverRole': !exists(json, 'mandatoryApproverRole') ? undefined : json['mandatoryApproverRole'],
18
+ 'requiredApprovals': json['requiredApprovals'],
19
+ 'completeWithinSeconds': !exists(json, 'completeWithinSeconds') ? undefined : json['completeWithinSeconds'],
20
+ };
21
+ }
22
+ function WaasPolicyDeclarativeApprovalRequirementToJSON(value) {
23
+ if (value === undefined) {
24
+ return undefined;
25
+ }
26
+ if (value === null) {
27
+ return null;
28
+ }
29
+ return {
30
+ 'v': value.v,
31
+ 'id': value.id,
32
+ 'eligibleApproverRoles': value.eligibleApproverRoles,
33
+ 'mandatoryApproverRoles': value.mandatoryApproverRoles,
34
+ 'eligibleApproverRole': value.eligibleApproverRole,
35
+ 'mandatoryApproverRole': value.mandatoryApproverRole,
36
+ 'requiredApprovals': value.requiredApprovals,
37
+ 'completeWithinSeconds': value.completeWithinSeconds,
38
+ };
39
+ }
40
+
41
+ export { WaasPolicyDeclarativeApprovalRequirementFromJSON, WaasPolicyDeclarativeApprovalRequirementFromJSONTyped, WaasPolicyDeclarativeApprovalRequirementToJSON };
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var runtime = require('../runtime.cjs');
6
6
  var WaasPolicyAction = require('./WaasPolicyAction.cjs');
7
+ var WaasPolicyDeclarativeApprovalRequirement = require('./WaasPolicyDeclarativeApprovalRequirement.cjs');
7
8
 
8
9
  /* tslint:disable */
9
10
  /**
@@ -28,6 +29,7 @@ function WaasPolicyDeclarativeRuleFromJSONTyped(json, ignoreDiscriminator) {
28
29
  'phase': json['phase'],
29
30
  'when': json['when'],
30
31
  'then': WaasPolicyAction.WaasPolicyActionFromJSON(json['then']),
32
+ 'approvalRequirements': !runtime.exists(json, 'approvalRequirements') ? undefined : (json['approvalRequirements'].map(WaasPolicyDeclarativeApprovalRequirement.WaasPolicyDeclarativeApprovalRequirementFromJSON)),
31
33
  'modifiableBySigner': !runtime.exists(json, 'modifiableBySigner') ? undefined : json['modifiableBySigner'],
32
34
  };
33
35
  }
@@ -44,6 +46,7 @@ function WaasPolicyDeclarativeRuleToJSON(value) {
44
46
  'phase': value.phase,
45
47
  'when': value.when,
46
48
  'then': WaasPolicyAction.WaasPolicyActionToJSON(value.then),
49
+ 'approvalRequirements': value.approvalRequirements === undefined ? undefined : (value.approvalRequirements.map(WaasPolicyDeclarativeApprovalRequirement.WaasPolicyDeclarativeApprovalRequirementToJSON)),
47
50
  'modifiableBySigner': value.modifiableBySigner,
48
51
  };
49
52
  }
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import { WaasPolicyAction } from './WaasPolicyAction';
13
+ import { WaasPolicyDeclarativeApprovalRequirement } from './WaasPolicyDeclarativeApprovalRequirement';
13
14
  /**
14
15
  * A Rule authored in the policy rule language, evaluated by the engine as stored rather than compiled from WaasPolicyRule. Shares identity and authorship with a legacy Rule so the Layer machinery — deletion markers, authorship stamping, the edit guard — keys on the same fields and needs no second code path for anything but evaluation.
15
16
  * @export
@@ -46,6 +47,12 @@ export interface WaasPolicyDeclarativeRule {
46
47
  * @memberof WaasPolicyDeclarativeRule
47
48
  */
48
49
  then: WaasPolicyAction;
50
+ /**
51
+ * The approvals a matching transaction needs. Required when then is REQUIRE_APPROVAL and refused on any other action. A deny in the same Layer wins first; otherwise every REQUIRE_APPROVAL Rule whose when holds, or cannot be decided, applies. A message or raw sign has no transaction to test, so every such Rule applies. Enforced only for business-account wallets. Valid on business-account, wallet and signer Layers and refused on the environment Layer. Only admins and business-account admins may author one. May not read spendWindows.
52
+ * @type {Array<WaasPolicyDeclarativeApprovalRequirement>}
53
+ * @memberof WaasPolicyDeclarativeRule
54
+ */
55
+ approvalRequirements?: Array<WaasPolicyDeclarativeApprovalRequirement>;
49
56
  /**
50
57
  * When true, a Signer may adjust this Rule within its recognised shape
51
58
  * @type {boolean}
@@ -1,5 +1,6 @@
1
1
  import { exists } from '../runtime.js';
2
2
  import { WaasPolicyActionFromJSON, WaasPolicyActionToJSON } from './WaasPolicyAction.js';
3
+ import { WaasPolicyDeclarativeApprovalRequirementFromJSON, WaasPolicyDeclarativeApprovalRequirementToJSON } from './WaasPolicyDeclarativeApprovalRequirement.js';
3
4
 
4
5
  /* tslint:disable */
5
6
  /**
@@ -24,6 +25,7 @@ function WaasPolicyDeclarativeRuleFromJSONTyped(json, ignoreDiscriminator) {
24
25
  'phase': json['phase'],
25
26
  'when': json['when'],
26
27
  'then': WaasPolicyActionFromJSON(json['then']),
28
+ 'approvalRequirements': !exists(json, 'approvalRequirements') ? undefined : (json['approvalRequirements'].map(WaasPolicyDeclarativeApprovalRequirementFromJSON)),
27
29
  'modifiableBySigner': !exists(json, 'modifiableBySigner') ? undefined : json['modifiableBySigner'],
28
30
  };
29
31
  }
@@ -40,6 +42,7 @@ function WaasPolicyDeclarativeRuleToJSON(value) {
40
42
  'phase': value.phase,
41
43
  'when': value.when,
42
44
  'then': WaasPolicyActionToJSON(value.then),
45
+ 'approvalRequirements': value.approvalRequirements === undefined ? undefined : (value.approvalRequirements.map(WaasPolicyDeclarativeApprovalRequirementToJSON)),
43
46
  'modifiableBySigner': value.modifiableBySigner,
44
47
  };
45
48
  }
@@ -6,7 +6,7 @@ var runtime = require('../runtime.cjs');
6
6
  var WaasChainEnum = require('./WaasChainEnum.cjs');
7
7
  var WaasPolicyAction = require('./WaasPolicyAction.cjs');
8
8
  var WaasPolicyArgumentConstraint = require('./WaasPolicyArgumentConstraint.cjs');
9
- var WaasPolicyRuleApprovalRequirements = require('./WaasPolicyRuleApprovalRequirements.cjs');
9
+ var WaasPolicyDeclarativeApprovalRequirement = require('./WaasPolicyDeclarativeApprovalRequirement.cjs');
10
10
  var WaasPolicyRuleOperationRestrictions = require('./WaasPolicyRuleOperationRestrictions.cjs');
11
11
  var WaasPolicyRuleType = require('./WaasPolicyRuleType.cjs');
12
12
  var WaasPolicyRuleValueLimit = require('./WaasPolicyRuleValueLimit.cjs');
@@ -44,7 +44,7 @@ function WaasPolicyLayerRuleFromJSONTyped(json, ignoreDiscriminator) {
44
44
  'operationRestrictions': !runtime.exists(json, 'operationRestrictions') ? undefined : WaasPolicyRuleOperationRestrictions.WaasPolicyRuleOperationRestrictionsFromJSON(json['operationRestrictions']),
45
45
  'disableBlockaidSecurityChecks': !runtime.exists(json, 'disableBlockaidSecurityChecks') ? undefined : json['disableBlockaidSecurityChecks'],
46
46
  'modifiableBySigner': !runtime.exists(json, 'modifiableBySigner') ? undefined : json['modifiableBySigner'],
47
- 'approvalRequirements': !runtime.exists(json, 'approvalRequirements') ? undefined : (json['approvalRequirements'].map(WaasPolicyRuleApprovalRequirements.WaasPolicyRuleApprovalRequirementsFromJSON)),
47
+ 'approvalRequirements': !runtime.exists(json, 'approvalRequirements') ? undefined : (json['approvalRequirements'].map(WaasPolicyDeclarativeApprovalRequirement.WaasPolicyDeclarativeApprovalRequirementFromJSON)),
48
48
  'phase': json['phase'],
49
49
  'when': json['when'],
50
50
  'then': WaasPolicyAction.WaasPolicyActionFromJSON(json['then']),
@@ -73,7 +73,7 @@ function WaasPolicyLayerRuleToJSON(value) {
73
73
  'operationRestrictions': WaasPolicyRuleOperationRestrictions.WaasPolicyRuleOperationRestrictionsToJSON(value.operationRestrictions),
74
74
  'disableBlockaidSecurityChecks': value.disableBlockaidSecurityChecks,
75
75
  'modifiableBySigner': value.modifiableBySigner,
76
- 'approvalRequirements': value.approvalRequirements === undefined ? undefined : (value.approvalRequirements.map(WaasPolicyRuleApprovalRequirements.WaasPolicyRuleApprovalRequirementsToJSON)),
76
+ 'approvalRequirements': value.approvalRequirements === undefined ? undefined : (value.approvalRequirements.map(WaasPolicyDeclarativeApprovalRequirement.WaasPolicyDeclarativeApprovalRequirementToJSON)),
77
77
  'phase': value.phase,
78
78
  'when': value.when,
79
79
  'then': WaasPolicyAction.WaasPolicyActionToJSON(value.then),
@@ -12,7 +12,7 @@
12
12
  import { WaasChainEnum } from './WaasChainEnum';
13
13
  import { WaasPolicyAction } from './WaasPolicyAction';
14
14
  import { WaasPolicyArgumentConstraint } from './WaasPolicyArgumentConstraint';
15
- import { WaasPolicyRuleApprovalRequirements } from './WaasPolicyRuleApprovalRequirements';
15
+ import { WaasPolicyDeclarativeApprovalRequirement } from './WaasPolicyDeclarativeApprovalRequirement';
16
16
  import { WaasPolicyRuleOperationRestrictions } from './WaasPolicyRuleOperationRestrictions';
17
17
  import { WaasPolicyRuleType } from './WaasPolicyRuleType';
18
18
  import { WaasPolicyRuleValueLimit } from './WaasPolicyRuleValueLimit';
@@ -113,11 +113,11 @@ export interface WaasPolicyLayerRule {
113
113
  */
114
114
  modifiableBySigner?: boolean;
115
115
  /**
116
- * Multi-party approval requirements for this Rule. Enforced only for accounts that support them; ignored for other accounts. when.initiatorRole and when.actionTypes are not yet resolved — until they are, a requirement that sets either field applies to all approvers, not just the named role.
117
- * @type {Array<WaasPolicyRuleApprovalRequirements>}
116
+ * The approvals a matching transaction needs. Required when then is REQUIRE_APPROVAL and refused on any other action. A deny in the same Layer wins first; otherwise every REQUIRE_APPROVAL Rule whose when holds, or cannot be decided, applies. A message or raw sign has no transaction to test, so every such Rule applies. Enforced only for business-account wallets. Valid on business-account, wallet and signer Layers and refused on the environment Layer. Only admins and business-account admins may author one. May not read spendWindows.
117
+ * @type {Array<WaasPolicyDeclarativeApprovalRequirement>}
118
118
  * @memberof WaasPolicyLayerRule
119
119
  */
120
- approvalRequirements?: Array<WaasPolicyRuleApprovalRequirements>;
120
+ approvalRequirements?: Array<WaasPolicyDeclarativeApprovalRequirement>;
121
121
  /**
122
122
  * Which question this Rule answers. A Layer is one flat list, so the phase travels on the Rule rather than being implied by its position.
123
123
  * @type {string}
@@ -2,7 +2,7 @@ import { exists } from '../runtime.js';
2
2
  import { WaasChainEnumFromJSON, WaasChainEnumToJSON } from './WaasChainEnum.js';
3
3
  import { WaasPolicyActionFromJSON, WaasPolicyActionToJSON } from './WaasPolicyAction.js';
4
4
  import { WaasPolicyArgumentConstraintFromJSON, WaasPolicyArgumentConstraintToJSON } from './WaasPolicyArgumentConstraint.js';
5
- import { WaasPolicyRuleApprovalRequirementsFromJSON, WaasPolicyRuleApprovalRequirementsToJSON } from './WaasPolicyRuleApprovalRequirements.js';
5
+ import { WaasPolicyDeclarativeApprovalRequirementFromJSON, WaasPolicyDeclarativeApprovalRequirementToJSON } from './WaasPolicyDeclarativeApprovalRequirement.js';
6
6
  import { WaasPolicyRuleOperationRestrictionsFromJSON, WaasPolicyRuleOperationRestrictionsToJSON } from './WaasPolicyRuleOperationRestrictions.js';
7
7
  import { WaasPolicyRuleTypeFromJSON, WaasPolicyRuleTypeToJSON } from './WaasPolicyRuleType.js';
8
8
  import { WaasPolicyRuleValueLimitFromJSON, WaasPolicyRuleValueLimitToJSON } from './WaasPolicyRuleValueLimit.js';
@@ -40,7 +40,7 @@ function WaasPolicyLayerRuleFromJSONTyped(json, ignoreDiscriminator) {
40
40
  'operationRestrictions': !exists(json, 'operationRestrictions') ? undefined : WaasPolicyRuleOperationRestrictionsFromJSON(json['operationRestrictions']),
41
41
  'disableBlockaidSecurityChecks': !exists(json, 'disableBlockaidSecurityChecks') ? undefined : json['disableBlockaidSecurityChecks'],
42
42
  'modifiableBySigner': !exists(json, 'modifiableBySigner') ? undefined : json['modifiableBySigner'],
43
- 'approvalRequirements': !exists(json, 'approvalRequirements') ? undefined : (json['approvalRequirements'].map(WaasPolicyRuleApprovalRequirementsFromJSON)),
43
+ 'approvalRequirements': !exists(json, 'approvalRequirements') ? undefined : (json['approvalRequirements'].map(WaasPolicyDeclarativeApprovalRequirementFromJSON)),
44
44
  'phase': json['phase'],
45
45
  'when': json['when'],
46
46
  'then': WaasPolicyActionFromJSON(json['then']),
@@ -69,7 +69,7 @@ function WaasPolicyLayerRuleToJSON(value) {
69
69
  'operationRestrictions': WaasPolicyRuleOperationRestrictionsToJSON(value.operationRestrictions),
70
70
  'disableBlockaidSecurityChecks': value.disableBlockaidSecurityChecks,
71
71
  'modifiableBySigner': value.modifiableBySigner,
72
- 'approvalRequirements': value.approvalRequirements === undefined ? undefined : (value.approvalRequirements.map(WaasPolicyRuleApprovalRequirementsToJSON)),
72
+ 'approvalRequirements': value.approvalRequirements === undefined ? undefined : (value.approvalRequirements.map(WaasPolicyDeclarativeApprovalRequirementToJSON)),
73
73
  'phase': value.phase,
74
74
  'when': value.when,
75
75
  'then': WaasPolicyActionToJSON(value.then),
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var runtime = require('../runtime.cjs');
6
+ var WaasPolicyLayerRule = require('./WaasPolicyLayerRule.cjs');
6
7
  var WaasPolicyLayerRuleOperation = require('./WaasPolicyLayerRuleOperation.cjs');
7
8
  var WaasPolicyRule = require('./WaasPolicyRule.cjs');
8
9
 
@@ -16,6 +17,7 @@ exports.WaasPolicyLayerUpdateRequestOpEnum = void 0;
16
17
  WaasPolicyLayerUpdateRequestOpEnum["Upsert"] = "upsert";
17
18
  WaasPolicyLayerUpdateRequestOpEnum["Remove"] = "remove";
18
19
  WaasPolicyLayerUpdateRequestOpEnum["Batch"] = "batch";
20
+ WaasPolicyLayerUpdateRequestOpEnum["Replace"] = "replace";
19
21
  })(exports.WaasPolicyLayerUpdateRequestOpEnum || (exports.WaasPolicyLayerUpdateRequestOpEnum = {}));
20
22
  function WaasPolicyLayerUpdateRequestFromJSON(json) {
21
23
  return WaasPolicyLayerUpdateRequestFromJSONTyped(json);
@@ -29,6 +31,7 @@ function WaasPolicyLayerUpdateRequestFromJSONTyped(json, ignoreDiscriminator) {
29
31
  'rule': !runtime.exists(json, 'rule') ? undefined : WaasPolicyRule.WaasPolicyRuleFromJSON(json['rule']),
30
32
  'ruleId': !runtime.exists(json, 'ruleId') ? undefined : json['ruleId'],
31
33
  'operations': !runtime.exists(json, 'operations') ? undefined : (json['operations'].map(WaasPolicyLayerRuleOperation.WaasPolicyLayerRuleOperationFromJSON)),
34
+ 'rules': !runtime.exists(json, 'rules') ? undefined : (json['rules'].map(WaasPolicyLayerRule.WaasPolicyLayerRuleFromJSON)),
32
35
  };
33
36
  }
34
37
  function WaasPolicyLayerUpdateRequestToJSON(value) {
@@ -43,6 +46,7 @@ function WaasPolicyLayerUpdateRequestToJSON(value) {
43
46
  'rule': WaasPolicyRule.WaasPolicyRuleToJSON(value.rule),
44
47
  'ruleId': value.ruleId,
45
48
  'operations': value.operations === undefined ? undefined : (value.operations.map(WaasPolicyLayerRuleOperation.WaasPolicyLayerRuleOperationToJSON)),
49
+ 'rules': value.rules === undefined ? undefined : (value.rules.map(WaasPolicyLayerRule.WaasPolicyLayerRuleToJSON)),
46
50
  };
47
51
  }
48
52
 
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import { WaasPolicyLayerRule } from './WaasPolicyLayerRule';
12
13
  import { WaasPolicyLayerRuleOperation } from './WaasPolicyLayerRuleOperation';
13
14
  import { WaasPolicyRule } from './WaasPolicyRule';
14
15
  /**
@@ -18,7 +19,7 @@ import { WaasPolicyRule } from './WaasPolicyRule';
18
19
  */
19
20
  export interface WaasPolicyLayerUpdateRequest {
20
21
  /**
21
- * The per-Rule operation to apply to the wallet-Layer, or batch to apply multiple operations atomically in one enclave cycle
22
+ * The per-Rule operation to apply to the wallet-Layer, batch to apply multiple operations atomically in one enclave cycle, or replace to set the Layer's full Rule list
22
23
  * @type {string}
23
24
  * @memberof WaasPolicyLayerUpdateRequest
24
25
  */
@@ -41,6 +42,12 @@ export interface WaasPolicyLayerUpdateRequest {
41
42
  * @memberof WaasPolicyLayerUpdateRequest
42
43
  */
43
44
  operations?: Array<WaasPolicyLayerRuleOperation>;
45
+ /**
46
+ * Only used when op is replace — the Layer's full Rule list, in either syntax. Only admins and business-account admins may replace.
47
+ * @type {Array<WaasPolicyLayerRule>}
48
+ * @memberof WaasPolicyLayerUpdateRequest
49
+ */
50
+ rules?: Array<WaasPolicyLayerRule>;
44
51
  }
45
52
  /**
46
53
  * @export
@@ -49,7 +56,8 @@ export interface WaasPolicyLayerUpdateRequest {
49
56
  export declare enum WaasPolicyLayerUpdateRequestOpEnum {
50
57
  Upsert = "upsert",
51
58
  Remove = "remove",
52
- Batch = "batch"
59
+ Batch = "batch",
60
+ Replace = "replace"
53
61
  }
54
62
  export declare function WaasPolicyLayerUpdateRequestFromJSON(json: any): WaasPolicyLayerUpdateRequest;
55
63
  export declare function WaasPolicyLayerUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): WaasPolicyLayerUpdateRequest;
@@ -1,4 +1,5 @@
1
1
  import { exists } from '../runtime.js';
2
+ import { WaasPolicyLayerRuleFromJSON, WaasPolicyLayerRuleToJSON } from './WaasPolicyLayerRule.js';
2
3
  import { WaasPolicyLayerRuleOperationFromJSON, WaasPolicyLayerRuleOperationToJSON } from './WaasPolicyLayerRuleOperation.js';
3
4
  import { WaasPolicyRuleFromJSON, WaasPolicyRuleToJSON } from './WaasPolicyRule.js';
4
5
 
@@ -12,6 +13,7 @@ var WaasPolicyLayerUpdateRequestOpEnum;
12
13
  WaasPolicyLayerUpdateRequestOpEnum["Upsert"] = "upsert";
13
14
  WaasPolicyLayerUpdateRequestOpEnum["Remove"] = "remove";
14
15
  WaasPolicyLayerUpdateRequestOpEnum["Batch"] = "batch";
16
+ WaasPolicyLayerUpdateRequestOpEnum["Replace"] = "replace";
15
17
  })(WaasPolicyLayerUpdateRequestOpEnum || (WaasPolicyLayerUpdateRequestOpEnum = {}));
16
18
  function WaasPolicyLayerUpdateRequestFromJSON(json) {
17
19
  return WaasPolicyLayerUpdateRequestFromJSONTyped(json);
@@ -25,6 +27,7 @@ function WaasPolicyLayerUpdateRequestFromJSONTyped(json, ignoreDiscriminator) {
25
27
  'rule': !exists(json, 'rule') ? undefined : WaasPolicyRuleFromJSON(json['rule']),
26
28
  'ruleId': !exists(json, 'ruleId') ? undefined : json['ruleId'],
27
29
  'operations': !exists(json, 'operations') ? undefined : (json['operations'].map(WaasPolicyLayerRuleOperationFromJSON)),
30
+ 'rules': !exists(json, 'rules') ? undefined : (json['rules'].map(WaasPolicyLayerRuleFromJSON)),
28
31
  };
29
32
  }
30
33
  function WaasPolicyLayerUpdateRequestToJSON(value) {
@@ -39,6 +42,7 @@ function WaasPolicyLayerUpdateRequestToJSON(value) {
39
42
  'rule': WaasPolicyRuleToJSON(value.rule),
40
43
  'ruleId': value.ruleId,
41
44
  'operations': value.operations === undefined ? undefined : (value.operations.map(WaasPolicyLayerRuleOperationToJSON)),
45
+ 'rules': value.rules === undefined ? undefined : (value.rules.map(WaasPolicyLayerRuleToJSON)),
42
46
  };
43
47
  }
44
48
 
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var runtime = require('../runtime.cjs');
6
+ var WaasPolicyLayerRule = require('./WaasPolicyLayerRule.cjs');
6
7
  var WaasPolicyLayerRuleOperation = require('./WaasPolicyLayerRuleOperation.cjs');
7
8
  var WaasPolicyRule = require('./WaasPolicyRule.cjs');
8
9
 
@@ -16,6 +17,7 @@ exports.WaasSignerPolicyLayerUpdateRequestOpEnum = void 0;
16
17
  WaasSignerPolicyLayerUpdateRequestOpEnum["Upsert"] = "upsert";
17
18
  WaasSignerPolicyLayerUpdateRequestOpEnum["Remove"] = "remove";
18
19
  WaasSignerPolicyLayerUpdateRequestOpEnum["Batch"] = "batch";
20
+ WaasSignerPolicyLayerUpdateRequestOpEnum["Replace"] = "replace";
19
21
  })(exports.WaasSignerPolicyLayerUpdateRequestOpEnum || (exports.WaasSignerPolicyLayerUpdateRequestOpEnum = {}));
20
22
  function WaasSignerPolicyLayerUpdateRequestFromJSON(json) {
21
23
  return WaasSignerPolicyLayerUpdateRequestFromJSONTyped(json);
@@ -29,6 +31,7 @@ function WaasSignerPolicyLayerUpdateRequestFromJSONTyped(json, ignoreDiscriminat
29
31
  'rule': !runtime.exists(json, 'rule') ? undefined : WaasPolicyRule.WaasPolicyRuleFromJSON(json['rule']),
30
32
  'ruleId': !runtime.exists(json, 'ruleId') ? undefined : json['ruleId'],
31
33
  'operations': !runtime.exists(json, 'operations') ? undefined : (json['operations'].map(WaasPolicyLayerRuleOperation.WaasPolicyLayerRuleOperationFromJSON)),
34
+ 'rules': !runtime.exists(json, 'rules') ? undefined : (json['rules'].map(WaasPolicyLayerRule.WaasPolicyLayerRuleFromJSON)),
32
35
  'shareSetId': !runtime.exists(json, 'shareSetId') ? undefined : json['shareSetId'],
33
36
  };
34
37
  }
@@ -44,6 +47,7 @@ function WaasSignerPolicyLayerUpdateRequestToJSON(value) {
44
47
  'rule': WaasPolicyRule.WaasPolicyRuleToJSON(value.rule),
45
48
  'ruleId': value.ruleId,
46
49
  'operations': value.operations === undefined ? undefined : (value.operations.map(WaasPolicyLayerRuleOperation.WaasPolicyLayerRuleOperationToJSON)),
50
+ 'rules': value.rules === undefined ? undefined : (value.rules.map(WaasPolicyLayerRule.WaasPolicyLayerRuleToJSON)),
47
51
  'shareSetId': value.shareSetId,
48
52
  };
49
53
  }
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import { WaasPolicyLayerRule } from './WaasPolicyLayerRule';
12
13
  import { WaasPolicyLayerRuleOperation } from './WaasPolicyLayerRuleOperation';
13
14
  import { WaasPolicyRule } from './WaasPolicyRule';
14
15
  /**
@@ -18,7 +19,7 @@ import { WaasPolicyRule } from './WaasPolicyRule';
18
19
  */
19
20
  export interface WaasSignerPolicyLayerUpdateRequest {
20
21
  /**
21
- * The per-Rule operation to apply to the wallet-Layer, or batch to apply multiple operations atomically in one enclave cycle
22
+ * The per-Rule operation to apply to the wallet-Layer, batch to apply multiple operations atomically in one enclave cycle, or replace to set the Layer's full Rule list
22
23
  * @type {string}
23
24
  * @memberof WaasSignerPolicyLayerUpdateRequest
24
25
  */
@@ -41,6 +42,12 @@ export interface WaasSignerPolicyLayerUpdateRequest {
41
42
  * @memberof WaasSignerPolicyLayerUpdateRequest
42
43
  */
43
44
  operations?: Array<WaasPolicyLayerRuleOperation>;
45
+ /**
46
+ * Only used when op is replace — the Layer's full Rule list, in either syntax. Only admins and business-account admins may replace.
47
+ * @type {Array<WaasPolicyLayerRule>}
48
+ * @memberof WaasSignerPolicyLayerUpdateRequest
49
+ */
50
+ rules?: Array<WaasPolicyLayerRule>;
44
51
  /**
45
52
  * Targets a share set other than the caller's own, as returned in
46
53
  * the wallet's shareSetId or otherShareSets. Omit to target the
@@ -60,7 +67,8 @@ export interface WaasSignerPolicyLayerUpdateRequest {
60
67
  export declare enum WaasSignerPolicyLayerUpdateRequestOpEnum {
61
68
  Upsert = "upsert",
62
69
  Remove = "remove",
63
- Batch = "batch"
70
+ Batch = "batch",
71
+ Replace = "replace"
64
72
  }
65
73
  export declare function WaasSignerPolicyLayerUpdateRequestFromJSON(json: any): WaasSignerPolicyLayerUpdateRequest;
66
74
  export declare function WaasSignerPolicyLayerUpdateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): WaasSignerPolicyLayerUpdateRequest;
@@ -1,4 +1,5 @@
1
1
  import { exists } from '../runtime.js';
2
+ import { WaasPolicyLayerRuleFromJSON, WaasPolicyLayerRuleToJSON } from './WaasPolicyLayerRule.js';
2
3
  import { WaasPolicyLayerRuleOperationFromJSON, WaasPolicyLayerRuleOperationToJSON } from './WaasPolicyLayerRuleOperation.js';
3
4
  import { WaasPolicyRuleFromJSON, WaasPolicyRuleToJSON } from './WaasPolicyRule.js';
4
5
 
@@ -12,6 +13,7 @@ var WaasSignerPolicyLayerUpdateRequestOpEnum;
12
13
  WaasSignerPolicyLayerUpdateRequestOpEnum["Upsert"] = "upsert";
13
14
  WaasSignerPolicyLayerUpdateRequestOpEnum["Remove"] = "remove";
14
15
  WaasSignerPolicyLayerUpdateRequestOpEnum["Batch"] = "batch";
16
+ WaasSignerPolicyLayerUpdateRequestOpEnum["Replace"] = "replace";
15
17
  })(WaasSignerPolicyLayerUpdateRequestOpEnum || (WaasSignerPolicyLayerUpdateRequestOpEnum = {}));
16
18
  function WaasSignerPolicyLayerUpdateRequestFromJSON(json) {
17
19
  return WaasSignerPolicyLayerUpdateRequestFromJSONTyped(json);
@@ -25,6 +27,7 @@ function WaasSignerPolicyLayerUpdateRequestFromJSONTyped(json, ignoreDiscriminat
25
27
  'rule': !exists(json, 'rule') ? undefined : WaasPolicyRuleFromJSON(json['rule']),
26
28
  'ruleId': !exists(json, 'ruleId') ? undefined : json['ruleId'],
27
29
  'operations': !exists(json, 'operations') ? undefined : (json['operations'].map(WaasPolicyLayerRuleOperationFromJSON)),
30
+ 'rules': !exists(json, 'rules') ? undefined : (json['rules'].map(WaasPolicyLayerRuleFromJSON)),
28
31
  'shareSetId': !exists(json, 'shareSetId') ? undefined : json['shareSetId'],
29
32
  };
30
33
  }
@@ -40,6 +43,7 @@ function WaasSignerPolicyLayerUpdateRequestToJSON(value) {
40
43
  'rule': WaasPolicyRuleToJSON(value.rule),
41
44
  'ruleId': value.ruleId,
42
45
  'operations': value.operations === undefined ? undefined : (value.operations.map(WaasPolicyLayerRuleOperationToJSON)),
46
+ 'rules': value.rules === undefined ? undefined : (value.rules.map(WaasPolicyLayerRuleToJSON)),
43
47
  'shareSetId': value.shareSetId,
44
48
  };
45
49
  }
@@ -881,6 +881,7 @@ export * from './WaasPolicyAction';
881
881
  export * from './WaasPolicyArgumentConstraint';
882
882
  export * from './WaasPolicyConstraintCondition';
883
883
  export * from './WaasPolicyCreateRequest';
884
+ export * from './WaasPolicyDeclarativeApprovalRequirement';
884
885
  export * from './WaasPolicyDeclarativeRule';
885
886
  export * from './WaasPolicyDeleteRequest';
886
887
  export * from './WaasPolicyLayerResponse';