@corsa-labs/sdk 4.17.0 → 4.18.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/dist/ComplianceClient.d.ts +6 -0
- package/dist/ComplianceClient.js +9 -0
- package/dist/ComplianceClient.js.map +1 -1
- package/dist/models/ActionConfigDto.d.ts +19 -0
- package/dist/models/ActionConfigDto.js +15 -0
- package/dist/models/ActionConfigDto.js.map +1 -0
- package/dist/models/ActivateRuleDto.d.ts +6 -0
- package/dist/models/ActivateRuleDto.js +3 -0
- package/dist/models/ActivateRuleDto.js.map +1 -0
- package/dist/models/AggregationFilterDto.d.ts +20 -0
- package/dist/models/AggregationFilterDto.js +21 -0
- package/dist/models/AggregationFilterDto.js.map +1 -0
- package/dist/models/AlertCustomFieldDataDto.d.ts +22 -0
- package/dist/models/AlertCustomFieldDataDto.js +3 -0
- package/dist/models/AlertCustomFieldDataDto.js.map +1 -0
- package/dist/models/AlertDto.d.ts +2 -1
- package/dist/models/AlertDto.js.map +1 -1
- package/dist/models/BankAccountCustomFieldDataDto.d.ts +22 -0
- package/dist/models/BankAccountCustomFieldDataDto.js +3 -0
- package/dist/models/BankAccountCustomFieldDataDto.js.map +1 -0
- package/dist/models/BankAccountDto.d.ts +2 -1
- package/dist/models/BlockchainWalletCustomFieldDataDto.d.ts +22 -0
- package/dist/models/BlockchainWalletCustomFieldDataDto.js +3 -0
- package/dist/models/BlockchainWalletCustomFieldDataDto.js.map +1 -0
- package/dist/models/BlockchainWalletDto.d.ts +2 -1
- package/dist/models/ConditionDto.d.ts +133 -0
- package/dist/models/ConditionDto.js +73 -0
- package/dist/models/ConditionDto.js.map +1 -0
- package/dist/models/ConditionResultDto.d.ts +30 -0
- package/dist/models/ConditionResultDto.js +3 -0
- package/dist/models/ConditionResultDto.js.map +1 -0
- package/dist/models/ConditionsDto.d.ts +11 -0
- package/dist/models/ConditionsDto.js +3 -0
- package/dist/models/ConditionsDto.js.map +1 -0
- package/dist/models/CopyRuleTemplateResponseDto.d.ts +3 -0
- package/dist/models/CopyRuleTemplateResponseDto.js +3 -0
- package/dist/models/CopyRuleTemplateResponseDto.js.map +1 -0
- package/dist/models/CorporateClientCustomFieldDataDto.d.ts +40 -0
- package/dist/models/CorporateClientCustomFieldDataDto.js +20 -0
- package/dist/models/CorporateClientCustomFieldDataDto.js.map +1 -0
- package/dist/models/CorporateClientDto.d.ts +2 -1
- package/dist/models/CorporateClientDto.js.map +1 -1
- package/dist/models/CreateAlertDto.d.ts +2 -1
- package/dist/models/CreateAlertDto.js.map +1 -1
- package/dist/models/CreateBankAccountDto.d.ts +2 -1
- package/dist/models/CreateBankAccountDto.js.map +1 -1
- package/dist/models/CreateBlockchainWalletDto.d.ts +2 -1
- package/dist/models/CreateCorporateClientDto.d.ts +2 -1
- package/dist/models/CreateCorporateClientDto.js.map +1 -1
- package/dist/models/CreateIndividualClientDto.d.ts +2 -1
- package/dist/models/CreateIndividualClientDto.js.map +1 -1
- package/dist/models/CreateRuleDto.d.ts +20 -0
- package/dist/models/CreateRuleDto.js +3 -0
- package/dist/models/CreateRuleDto.js.map +1 -0
- package/dist/models/CreateTransactionDto.d.ts +2 -1
- package/dist/models/DisableRuleDto.d.ts +6 -0
- package/dist/models/DisableRuleDto.js +3 -0
- package/dist/models/DisableRuleDto.js.map +1 -0
- package/dist/models/EvaluationRequestDto.d.ts +10 -0
- package/dist/models/EvaluationRequestDto.js +3 -0
- package/dist/models/EvaluationRequestDto.js.map +1 -0
- package/dist/models/EvaluationResultDto.d.ts +27 -0
- package/dist/models/EvaluationResultDto.js +15 -0
- package/dist/models/EvaluationResultDto.js.map +1 -0
- package/dist/models/IndividualClientCustomFieldDataDto.d.ts +40 -0
- package/dist/models/IndividualClientCustomFieldDataDto.js +20 -0
- package/dist/models/IndividualClientCustomFieldDataDto.js.map +1 -0
- package/dist/models/IndividualClientDto.d.ts +2 -1
- package/dist/models/IndividualClientDto.js.map +1 -1
- package/dist/models/RuleMatchDto.d.ts +28 -0
- package/dist/models/RuleMatchDto.js +15 -0
- package/dist/models/RuleMatchDto.js.map +1 -0
- package/dist/models/RuleResponseDto.d.ts +18 -0
- package/dist/models/RuleResponseDto.js +13 -0
- package/dist/models/RuleResponseDto.js.map +1 -0
- package/dist/models/RuleTemplateResponseDto.d.ts +12 -0
- package/dist/models/RuleTemplateResponseDto.js +3 -0
- package/dist/models/RuleTemplateResponseDto.js.map +1 -0
- package/dist/models/TransactionCustomFieldDto.d.ts +22 -0
- package/dist/models/TransactionCustomFieldDto.js +3 -0
- package/dist/models/TransactionCustomFieldDto.js.map +1 -0
- package/dist/models/TransactionDto.d.ts +2 -1
- package/dist/models/TransactionDto.js.map +1 -1
- package/dist/models/UpdateAlertDto.d.ts +2 -1
- package/dist/models/UpdateAlertDto.js.map +1 -1
- package/dist/models/UpdateBankAccountDto.d.ts +2 -1
- package/dist/models/UpdateBankAccountDto.js.map +1 -1
- package/dist/models/UpdateBlockchainWalletDto.d.ts +2 -1
- package/dist/models/UpdateCorporateClientDto.d.ts +2 -1
- package/dist/models/UpdateCorporateClientDto.js.map +1 -1
- package/dist/models/UpdateIndividualClientDto.d.ts +2 -1
- package/dist/models/UpdateIndividualClientDto.js.map +1 -1
- package/dist/models/UpdateRuleDto.d.ts +15 -0
- package/dist/models/UpdateRuleDto.js +3 -0
- package/dist/models/UpdateRuleDto.js.map +1 -0
- package/dist/models/UpdateTransactionDto.d.ts +2 -1
- package/dist/services/EvaluationService.d.ts +16 -0
- package/dist/services/EvaluationService.js +26 -0
- package/dist/services/EvaluationService.js.map +1 -0
- package/dist/services/RuleTemplatesService.d.ts +157 -0
- package/dist/services/RuleTemplatesService.js +192 -0
- package/dist/services/RuleTemplatesService.js.map +1 -0
- package/dist/services/RulesService.d.ts +223 -0
- package/dist/services/RulesService.js +299 -0
- package/dist/services/RulesService.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateCorporateClientDto.js","sourceRoot":"","sources":["../../models/UpdateCorporateClientDto.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"UpdateCorporateClientDto.js","sourceRoot":"","sources":["../../models/UpdateCorporateClientDto.ts"],"names":[],"mappings":";;;AA+FA,IAAiB,wBAAwB,CAsBxC;AAtBD,WAAiB,wBAAwB;IACrC;;OAEG;IACH,IAAY,cAGX;IAHD,WAAY,cAAc;QACtB,mCAAiB,CAAA;QACjB,2CAAyB,CAAA;IAC7B,CAAC,EAHW,cAAc,GAAd,uCAAc,KAAd,uCAAc,QAGzB;IACD;;OAEG;IACH,IAAY,aAUX;IAVD,WAAY,aAAa;QACrB,sCAAqB,CAAA;QACrB,0DAAyC,CAAA;QACzC,wCAAuB,CAAA;QACvB,sCAAqB,CAAA;QACrB,4CAA2B,CAAA;QAC3B,kCAAiB,CAAA;QACjB,wDAAuC,CAAA;QACvC,sDAAqC,CAAA;QACrC,oEAAmD,CAAA;IACvD,CAAC,EAVW,aAAa,GAAb,sCAAa,KAAb,sCAAa,QAUxB;AACL,CAAC,EAtBgB,wBAAwB,wCAAxB,wBAAwB,QAsBxC"}
|
|
@@ -3,6 +3,7 @@ import type { CreateOrUpdateRiskDto } from './CreateOrUpdateRiskDto';
|
|
|
3
3
|
import type { IndividualClientAddressDto } from './IndividualClientAddressDto';
|
|
4
4
|
import type { IndividualClientApplicationInformationDto } from './IndividualClientApplicationInformationDto';
|
|
5
5
|
import type { IndividualClientContactInformationDto } from './IndividualClientContactInformationDto';
|
|
6
|
+
import type { IndividualClientCustomFieldDataDto } from './IndividualClientCustomFieldDataDto';
|
|
6
7
|
import type { IndividualClientFinancialInformationDto } from './IndividualClientFinancialInformationDto';
|
|
7
8
|
import type { IndividualClientGeneralInformationDto } from './IndividualClientGeneralInformationDto';
|
|
8
9
|
import type { IndividualClientIntegrationsDto } from './IndividualClientIntegrationsDto';
|
|
@@ -49,7 +50,7 @@ export type UpdateIndividualClientDto = {
|
|
|
49
50
|
/**
|
|
50
51
|
* Custom fields data
|
|
51
52
|
*/
|
|
52
|
-
customFields?: Record<string,
|
|
53
|
+
customFields?: Record<string, IndividualClientCustomFieldDataDto>;
|
|
53
54
|
/**
|
|
54
55
|
* Tags to add to the individual client (maximum 50)
|
|
55
56
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateIndividualClientDto.js","sourceRoot":"","sources":["../../models/UpdateIndividualClientDto.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"UpdateIndividualClientDto.js","sourceRoot":"","sources":["../../models/UpdateIndividualClientDto.ts"],"names":[],"mappings":";;;AAoGA,IAAiB,yBAAyB,CAsBzC;AAtBD,WAAiB,yBAAyB;IACtC;;OAEG;IACH,IAAY,cAGX;IAHD,WAAY,cAAc;QACtB,mCAAiB,CAAA;QACjB,2CAAyB,CAAA;IAC7B,CAAC,EAHW,cAAc,GAAd,wCAAc,KAAd,wCAAc,QAGzB;IACD;;OAEG;IACH,IAAY,aAUX;IAVD,WAAY,aAAa;QACrB,sCAAqB,CAAA;QACrB,0DAAyC,CAAA;QACzC,wCAAuB,CAAA;QACvB,sCAAqB,CAAA;QACrB,4CAA2B,CAAA;QAC3B,kCAAiB,CAAA;QACjB,wDAAuC,CAAA;QACvC,sDAAqC,CAAA;QACrC,oEAAmD,CAAA;IACvD,CAAC,EAVW,aAAa,GAAb,uCAAa,KAAb,uCAAa,QAUxB;AACL,CAAC,EAtBgB,yBAAyB,yCAAzB,yBAAyB,QAsBzC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ActionConfigDto } from './ActionConfigDto';
|
|
2
|
+
import type { ConditionsDto } from './ConditionsDto';
|
|
3
|
+
export type UpdateRuleDto = {
|
|
4
|
+
name?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
actions?: Array<ActionConfigDto>;
|
|
7
|
+
/**
|
|
8
|
+
* Rule conditions (IF logic)
|
|
9
|
+
*/
|
|
10
|
+
conditions?: ConditionsDto;
|
|
11
|
+
/**
|
|
12
|
+
* Reason for updating the rule (used for audit trail when updating active rules)
|
|
13
|
+
*/
|
|
14
|
+
reason?: string;
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UpdateRuleDto.js","sourceRoot":"","sources":["../../models/UpdateRuleDto.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { TransactionAmountDto } from './TransactionAmountDto';
|
|
2
|
+
import type { TransactionCustomFieldDto } from './TransactionCustomFieldDto';
|
|
2
3
|
import type { TransactionIntegrationsDto } from './TransactionIntegrationsDto';
|
|
3
4
|
export type UpdateTransactionDto = {
|
|
4
5
|
/**
|
|
@@ -24,5 +25,5 @@ export type UpdateTransactionDto = {
|
|
|
24
25
|
/**
|
|
25
26
|
* Custom fields data
|
|
26
27
|
*/
|
|
27
|
-
customFields?: Record<string,
|
|
28
|
+
customFields?: Record<string, TransactionCustomFieldDto>;
|
|
28
29
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { EvaluationRequestDto } from '../models/EvaluationRequestDto';
|
|
2
|
+
import type { EvaluationResultDto } from '../models/EvaluationResultDto';
|
|
3
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
4
|
+
import type { BaseHttpRequest } from '../core/BaseHttpRequest';
|
|
5
|
+
export declare class EvaluationService {
|
|
6
|
+
readonly httpRequest: BaseHttpRequest;
|
|
7
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
8
|
+
/**
|
|
9
|
+
* Evaluate rules against provided transaction
|
|
10
|
+
* Evaluate rules against provided transaction
|
|
11
|
+
* @param requestBody
|
|
12
|
+
* @returns EvaluationResultDto
|
|
13
|
+
* @throws ApiError
|
|
14
|
+
*/
|
|
15
|
+
evaluate(requestBody: EvaluationRequestDto): CancelablePromise<EvaluationResultDto>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EvaluationService = void 0;
|
|
4
|
+
class EvaluationService {
|
|
5
|
+
httpRequest;
|
|
6
|
+
constructor(httpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Evaluate rules against provided transaction
|
|
11
|
+
* Evaluate rules against provided transaction
|
|
12
|
+
* @param requestBody
|
|
13
|
+
* @returns EvaluationResultDto
|
|
14
|
+
* @throws ApiError
|
|
15
|
+
*/
|
|
16
|
+
evaluate(requestBody) {
|
|
17
|
+
return this.httpRequest.request({
|
|
18
|
+
method: 'POST',
|
|
19
|
+
url: '/v1/evaluation/evaluate',
|
|
20
|
+
body: requestBody,
|
|
21
|
+
mediaType: 'application/json',
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.EvaluationService = EvaluationService;
|
|
26
|
+
//# sourceMappingURL=EvaluationService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EvaluationService.js","sourceRoot":"","sources":["../../services/EvaluationService.ts"],"names":[],"mappings":";;;AAQA,MAAa,iBAAiB;IACE;IAA5B,YAA4B,WAA4B;QAA5B,gBAAW,GAAX,WAAW,CAAiB;IAAG,CAAC;IAC5D;;;;;;OAMG;IACI,QAAQ,CACX,WAAiC;QAEjC,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,yBAAyB;YAC9B,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,kBAAkB;SAChC,CAAC,CAAC;IACP,CAAC;CACJ;AAnBD,8CAmBC"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import type { CopyRuleTemplateResponseDto } from '../models/CopyRuleTemplateResponseDto';
|
|
2
|
+
import type { RuleTemplateResponseDto } from '../models/RuleTemplateResponseDto';
|
|
3
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
4
|
+
import type { BaseHttpRequest } from '../core/BaseHttpRequest';
|
|
5
|
+
export declare class RuleTemplatesService {
|
|
6
|
+
readonly httpRequest: BaseHttpRequest;
|
|
7
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
8
|
+
/**
|
|
9
|
+
* List rule templates with pagination
|
|
10
|
+
* List rule templates with pagination
|
|
11
|
+
* @param page Page number to retrieve. If you provide invalid value the default page number will applied
|
|
12
|
+
*
|
|
13
|
+
* **Example:** 1
|
|
14
|
+
*
|
|
15
|
+
*
|
|
16
|
+
* **Default Value:** 1
|
|
17
|
+
*
|
|
18
|
+
*
|
|
19
|
+
* @param limit Number of records per page.
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
* **Example:** 20
|
|
23
|
+
*
|
|
24
|
+
*
|
|
25
|
+
*
|
|
26
|
+
* **Default Value:** 20
|
|
27
|
+
*
|
|
28
|
+
*
|
|
29
|
+
*
|
|
30
|
+
* **Max Value:** 100
|
|
31
|
+
*
|
|
32
|
+
*
|
|
33
|
+
* If provided value is greater than max value, max value will be applied.
|
|
34
|
+
*
|
|
35
|
+
* @param filterId Filter by id query param.
|
|
36
|
+
*
|
|
37
|
+
* **Format:** filter.id={$not}:OPERATION:VALUE
|
|
38
|
+
*
|
|
39
|
+
*
|
|
40
|
+
*
|
|
41
|
+
* **Example:** filter.id=$eq:John Doe&filter.id=$in:John Doe
|
|
42
|
+
*
|
|
43
|
+
* **Available Operations**
|
|
44
|
+
* - $eq
|
|
45
|
+
*
|
|
46
|
+
* - $in
|
|
47
|
+
*
|
|
48
|
+
* - $and
|
|
49
|
+
*
|
|
50
|
+
* - $or
|
|
51
|
+
* @param filterName Filter by name query param.
|
|
52
|
+
*
|
|
53
|
+
* **Format:** filter.name={$not}:OPERATION:VALUE
|
|
54
|
+
*
|
|
55
|
+
*
|
|
56
|
+
*
|
|
57
|
+
* **Example:** filter.name=$eq:John Doe&filter.name=$ilike:John Doe
|
|
58
|
+
*
|
|
59
|
+
* **Available Operations**
|
|
60
|
+
* - $eq
|
|
61
|
+
*
|
|
62
|
+
* - $ilike
|
|
63
|
+
*
|
|
64
|
+
* - $in
|
|
65
|
+
*
|
|
66
|
+
* - $and
|
|
67
|
+
*
|
|
68
|
+
* - $or
|
|
69
|
+
* @param filterProducts Filter by products query param.
|
|
70
|
+
*
|
|
71
|
+
* **Format:** filter.products={$not}:OPERATION:VALUE
|
|
72
|
+
*
|
|
73
|
+
*
|
|
74
|
+
*
|
|
75
|
+
* **Example:** filter.products=$contains:John Doe
|
|
76
|
+
*
|
|
77
|
+
* **Available Operations**
|
|
78
|
+
* - $contains
|
|
79
|
+
*
|
|
80
|
+
* - $and
|
|
81
|
+
*
|
|
82
|
+
* - $or
|
|
83
|
+
* @param filterTypologies Filter by typologies query param.
|
|
84
|
+
*
|
|
85
|
+
* **Format:** filter.typologies={$not}:OPERATION:VALUE
|
|
86
|
+
*
|
|
87
|
+
*
|
|
88
|
+
*
|
|
89
|
+
* **Example:** filter.typologies=$contains:John Doe
|
|
90
|
+
*
|
|
91
|
+
* **Available Operations**
|
|
92
|
+
* - $contains
|
|
93
|
+
*
|
|
94
|
+
* - $and
|
|
95
|
+
*
|
|
96
|
+
* - $or
|
|
97
|
+
* @param sortBy Parameter to sort by.
|
|
98
|
+
* To sort by multiple fields, just provide query param multiple types. The order in url defines an order of sorting
|
|
99
|
+
*
|
|
100
|
+
* **Format:** {fieldName}:{DIRECTION}
|
|
101
|
+
*
|
|
102
|
+
*
|
|
103
|
+
* **Example:** sortBy=id:DESC&sortBy=name:DESC
|
|
104
|
+
*
|
|
105
|
+
*
|
|
106
|
+
* **Default Value:** name:ASC
|
|
107
|
+
*
|
|
108
|
+
* **Available Fields**
|
|
109
|
+
* - id
|
|
110
|
+
*
|
|
111
|
+
* - name
|
|
112
|
+
*
|
|
113
|
+
* - updatedAt
|
|
114
|
+
*
|
|
115
|
+
* - createdAt
|
|
116
|
+
*
|
|
117
|
+
* @param search Search term to filter result values
|
|
118
|
+
*
|
|
119
|
+
* **Example:** John
|
|
120
|
+
*
|
|
121
|
+
*
|
|
122
|
+
* **Default Value:** No default value
|
|
123
|
+
*
|
|
124
|
+
*
|
|
125
|
+
* @param searchBy List of fields to search by term to filter result values
|
|
126
|
+
*
|
|
127
|
+
* **Example:** name,description
|
|
128
|
+
*
|
|
129
|
+
*
|
|
130
|
+
* **Default Value:** By default all fields mentioned below will be used to search by term
|
|
131
|
+
*
|
|
132
|
+
* **Available Fields**
|
|
133
|
+
* - name
|
|
134
|
+
*
|
|
135
|
+
* - description
|
|
136
|
+
*
|
|
137
|
+
* @returns any
|
|
138
|
+
* @throws ApiError
|
|
139
|
+
*/
|
|
140
|
+
listRuleTemplates(page?: number, limit?: number, filterId?: Array<string>, filterName?: Array<string>, filterProducts?: Array<string>, filterTypologies?: Array<string>, sortBy?: Array<'id:ASC' | 'id:DESC' | 'name:ASC' | 'name:DESC' | 'updatedAt:ASC' | 'updatedAt:DESC' | 'createdAt:ASC' | 'createdAt:DESC'>, search?: string, searchBy?: Array<string>): CancelablePromise<any>;
|
|
141
|
+
/**
|
|
142
|
+
* Get a rule template by ID
|
|
143
|
+
* Get a rule template by ID
|
|
144
|
+
* @param id
|
|
145
|
+
* @returns RuleTemplateResponseDto
|
|
146
|
+
* @throws ApiError
|
|
147
|
+
*/
|
|
148
|
+
getRuleTemplate(id: string): CancelablePromise<RuleTemplateResponseDto>;
|
|
149
|
+
/**
|
|
150
|
+
* Copy a rule template to workspace as a draft rule
|
|
151
|
+
* Copy a rule template to workspace as a draft rule
|
|
152
|
+
* @param id
|
|
153
|
+
* @returns CopyRuleTemplateResponseDto
|
|
154
|
+
* @throws ApiError
|
|
155
|
+
*/
|
|
156
|
+
copyRuleTemplate(id: string): CancelablePromise<CopyRuleTemplateResponseDto>;
|
|
157
|
+
}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RuleTemplatesService = void 0;
|
|
4
|
+
class RuleTemplatesService {
|
|
5
|
+
httpRequest;
|
|
6
|
+
constructor(httpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* List rule templates with pagination
|
|
11
|
+
* List rule templates with pagination
|
|
12
|
+
* @param page Page number to retrieve. If you provide invalid value the default page number will applied
|
|
13
|
+
*
|
|
14
|
+
* **Example:** 1
|
|
15
|
+
*
|
|
16
|
+
*
|
|
17
|
+
* **Default Value:** 1
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
* @param limit Number of records per page.
|
|
21
|
+
*
|
|
22
|
+
*
|
|
23
|
+
* **Example:** 20
|
|
24
|
+
*
|
|
25
|
+
*
|
|
26
|
+
*
|
|
27
|
+
* **Default Value:** 20
|
|
28
|
+
*
|
|
29
|
+
*
|
|
30
|
+
*
|
|
31
|
+
* **Max Value:** 100
|
|
32
|
+
*
|
|
33
|
+
*
|
|
34
|
+
* If provided value is greater than max value, max value will be applied.
|
|
35
|
+
*
|
|
36
|
+
* @param filterId Filter by id query param.
|
|
37
|
+
*
|
|
38
|
+
* **Format:** filter.id={$not}:OPERATION:VALUE
|
|
39
|
+
*
|
|
40
|
+
*
|
|
41
|
+
*
|
|
42
|
+
* **Example:** filter.id=$eq:John Doe&filter.id=$in:John Doe
|
|
43
|
+
*
|
|
44
|
+
* **Available Operations**
|
|
45
|
+
* - $eq
|
|
46
|
+
*
|
|
47
|
+
* - $in
|
|
48
|
+
*
|
|
49
|
+
* - $and
|
|
50
|
+
*
|
|
51
|
+
* - $or
|
|
52
|
+
* @param filterName Filter by name query param.
|
|
53
|
+
*
|
|
54
|
+
* **Format:** filter.name={$not}:OPERATION:VALUE
|
|
55
|
+
*
|
|
56
|
+
*
|
|
57
|
+
*
|
|
58
|
+
* **Example:** filter.name=$eq:John Doe&filter.name=$ilike:John Doe
|
|
59
|
+
*
|
|
60
|
+
* **Available Operations**
|
|
61
|
+
* - $eq
|
|
62
|
+
*
|
|
63
|
+
* - $ilike
|
|
64
|
+
*
|
|
65
|
+
* - $in
|
|
66
|
+
*
|
|
67
|
+
* - $and
|
|
68
|
+
*
|
|
69
|
+
* - $or
|
|
70
|
+
* @param filterProducts Filter by products query param.
|
|
71
|
+
*
|
|
72
|
+
* **Format:** filter.products={$not}:OPERATION:VALUE
|
|
73
|
+
*
|
|
74
|
+
*
|
|
75
|
+
*
|
|
76
|
+
* **Example:** filter.products=$contains:John Doe
|
|
77
|
+
*
|
|
78
|
+
* **Available Operations**
|
|
79
|
+
* - $contains
|
|
80
|
+
*
|
|
81
|
+
* - $and
|
|
82
|
+
*
|
|
83
|
+
* - $or
|
|
84
|
+
* @param filterTypologies Filter by typologies query param.
|
|
85
|
+
*
|
|
86
|
+
* **Format:** filter.typologies={$not}:OPERATION:VALUE
|
|
87
|
+
*
|
|
88
|
+
*
|
|
89
|
+
*
|
|
90
|
+
* **Example:** filter.typologies=$contains:John Doe
|
|
91
|
+
*
|
|
92
|
+
* **Available Operations**
|
|
93
|
+
* - $contains
|
|
94
|
+
*
|
|
95
|
+
* - $and
|
|
96
|
+
*
|
|
97
|
+
* - $or
|
|
98
|
+
* @param sortBy Parameter to sort by.
|
|
99
|
+
* To sort by multiple fields, just provide query param multiple types. The order in url defines an order of sorting
|
|
100
|
+
*
|
|
101
|
+
* **Format:** {fieldName}:{DIRECTION}
|
|
102
|
+
*
|
|
103
|
+
*
|
|
104
|
+
* **Example:** sortBy=id:DESC&sortBy=name:DESC
|
|
105
|
+
*
|
|
106
|
+
*
|
|
107
|
+
* **Default Value:** name:ASC
|
|
108
|
+
*
|
|
109
|
+
* **Available Fields**
|
|
110
|
+
* - id
|
|
111
|
+
*
|
|
112
|
+
* - name
|
|
113
|
+
*
|
|
114
|
+
* - updatedAt
|
|
115
|
+
*
|
|
116
|
+
* - createdAt
|
|
117
|
+
*
|
|
118
|
+
* @param search Search term to filter result values
|
|
119
|
+
*
|
|
120
|
+
* **Example:** John
|
|
121
|
+
*
|
|
122
|
+
*
|
|
123
|
+
* **Default Value:** No default value
|
|
124
|
+
*
|
|
125
|
+
*
|
|
126
|
+
* @param searchBy List of fields to search by term to filter result values
|
|
127
|
+
*
|
|
128
|
+
* **Example:** name,description
|
|
129
|
+
*
|
|
130
|
+
*
|
|
131
|
+
* **Default Value:** By default all fields mentioned below will be used to search by term
|
|
132
|
+
*
|
|
133
|
+
* **Available Fields**
|
|
134
|
+
* - name
|
|
135
|
+
*
|
|
136
|
+
* - description
|
|
137
|
+
*
|
|
138
|
+
* @returns any
|
|
139
|
+
* @throws ApiError
|
|
140
|
+
*/
|
|
141
|
+
listRuleTemplates(page, limit, filterId, filterName, filterProducts, filterTypologies, sortBy, search, searchBy) {
|
|
142
|
+
return this.httpRequest.request({
|
|
143
|
+
method: 'GET',
|
|
144
|
+
url: '/v1/rule-templates',
|
|
145
|
+
query: {
|
|
146
|
+
'page': page,
|
|
147
|
+
'limit': limit,
|
|
148
|
+
'filter.id': filterId,
|
|
149
|
+
'filter.name': filterName,
|
|
150
|
+
'filter.products': filterProducts,
|
|
151
|
+
'filter.typologies': filterTypologies,
|
|
152
|
+
'sortBy': sortBy,
|
|
153
|
+
'search': search,
|
|
154
|
+
'searchBy': searchBy,
|
|
155
|
+
},
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Get a rule template by ID
|
|
160
|
+
* Get a rule template by ID
|
|
161
|
+
* @param id
|
|
162
|
+
* @returns RuleTemplateResponseDto
|
|
163
|
+
* @throws ApiError
|
|
164
|
+
*/
|
|
165
|
+
getRuleTemplate(id) {
|
|
166
|
+
return this.httpRequest.request({
|
|
167
|
+
method: 'GET',
|
|
168
|
+
url: '/v1/rule-templates/{id}',
|
|
169
|
+
path: {
|
|
170
|
+
'id': id,
|
|
171
|
+
},
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Copy a rule template to workspace as a draft rule
|
|
176
|
+
* Copy a rule template to workspace as a draft rule
|
|
177
|
+
* @param id
|
|
178
|
+
* @returns CopyRuleTemplateResponseDto
|
|
179
|
+
* @throws ApiError
|
|
180
|
+
*/
|
|
181
|
+
copyRuleTemplate(id) {
|
|
182
|
+
return this.httpRequest.request({
|
|
183
|
+
method: 'POST',
|
|
184
|
+
url: '/v1/rule-templates/{id}/copy',
|
|
185
|
+
path: {
|
|
186
|
+
'id': id,
|
|
187
|
+
},
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
exports.RuleTemplatesService = RuleTemplatesService;
|
|
192
|
+
//# sourceMappingURL=RuleTemplatesService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RuleTemplatesService.js","sourceRoot":"","sources":["../../services/RuleTemplatesService.ts"],"names":[],"mappings":";;;AAQA,MAAa,oBAAoB;IACD;IAA5B,YAA4B,WAA4B;QAA5B,gBAAW,GAAX,WAAW,CAAiB;IAAG,CAAC;IAC5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmIG;IACI,iBAAiB,CACpB,IAAa,EACb,KAAc,EACd,QAAwB,EACxB,UAA0B,EAC1B,cAA8B,EAC9B,gBAAgC,EAChC,MAAyI,EACzI,MAAe,EACf,QAAwB;QAExB,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,oBAAoB;YACzB,KAAK,EAAE;gBACH,MAAM,EAAE,IAAI;gBACZ,OAAO,EAAE,KAAK;gBACd,WAAW,EAAE,QAAQ;gBACrB,aAAa,EAAE,UAAU;gBACzB,iBAAiB,EAAE,cAAc;gBACjC,mBAAmB,EAAE,gBAAgB;gBACrC,QAAQ,EAAE,MAAM;gBAChB,QAAQ,EAAE,MAAM;gBAChB,UAAU,EAAE,QAAQ;aACvB;SACJ,CAAC,CAAC;IACP,CAAC;IACD;;;;;;OAMG;IACI,eAAe,CAClB,EAAU;QAEV,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,yBAAyB;YAC9B,IAAI,EAAE;gBACF,IAAI,EAAE,EAAE;aACX;SACJ,CAAC,CAAC;IACP,CAAC;IACD;;;;;;OAMG;IACI,gBAAgB,CACnB,EAAU;QAEV,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,8BAA8B;YACnC,IAAI,EAAE;gBACF,IAAI,EAAE,EAAE;aACX;SACJ,CAAC,CAAC;IACP,CAAC;CACJ;AArMD,oDAqMC"}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import type { ActivateRuleDto } from '../models/ActivateRuleDto';
|
|
2
|
+
import type { CreateRuleDto } from '../models/CreateRuleDto';
|
|
3
|
+
import type { DisableRuleDto } from '../models/DisableRuleDto';
|
|
4
|
+
import type { RuleResponseDto } from '../models/RuleResponseDto';
|
|
5
|
+
import type { UpdateRuleDto } from '../models/UpdateRuleDto';
|
|
6
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
7
|
+
import type { BaseHttpRequest } from '../core/BaseHttpRequest';
|
|
8
|
+
export declare class RulesService {
|
|
9
|
+
readonly httpRequest: BaseHttpRequest;
|
|
10
|
+
constructor(httpRequest: BaseHttpRequest);
|
|
11
|
+
/**
|
|
12
|
+
* Create a new rule (draft)
|
|
13
|
+
* Create a new rule (draft)
|
|
14
|
+
* @param requestBody
|
|
15
|
+
* @returns RuleResponseDto
|
|
16
|
+
* @throws ApiError
|
|
17
|
+
*/
|
|
18
|
+
createRule(requestBody: CreateRuleDto): CancelablePromise<RuleResponseDto>;
|
|
19
|
+
/**
|
|
20
|
+
* List rules with pagination
|
|
21
|
+
* List rules with pagination
|
|
22
|
+
* @param page Page number to retrieve. If you provide invalid value the default page number will applied
|
|
23
|
+
*
|
|
24
|
+
* **Example:** 1
|
|
25
|
+
*
|
|
26
|
+
*
|
|
27
|
+
* **Default Value:** 1
|
|
28
|
+
*
|
|
29
|
+
*
|
|
30
|
+
* @param limit Number of records per page.
|
|
31
|
+
*
|
|
32
|
+
*
|
|
33
|
+
* **Example:** 20
|
|
34
|
+
*
|
|
35
|
+
*
|
|
36
|
+
*
|
|
37
|
+
* **Default Value:** 20
|
|
38
|
+
*
|
|
39
|
+
*
|
|
40
|
+
*
|
|
41
|
+
* **Max Value:** 100
|
|
42
|
+
*
|
|
43
|
+
*
|
|
44
|
+
* If provided value is greater than max value, max value will be applied.
|
|
45
|
+
*
|
|
46
|
+
* @param filterId Filter by id query param.
|
|
47
|
+
*
|
|
48
|
+
* **Format:** filter.id={$not}:OPERATION:VALUE
|
|
49
|
+
*
|
|
50
|
+
*
|
|
51
|
+
*
|
|
52
|
+
* **Example:** filter.id=$eq:John Doe&filter.id=$in:John Doe
|
|
53
|
+
*
|
|
54
|
+
* **Available Operations**
|
|
55
|
+
* - $eq
|
|
56
|
+
*
|
|
57
|
+
* - $in
|
|
58
|
+
*
|
|
59
|
+
* - $and
|
|
60
|
+
*
|
|
61
|
+
* - $or
|
|
62
|
+
* @param filterName Filter by name query param.
|
|
63
|
+
*
|
|
64
|
+
* **Format:** filter.name={$not}:OPERATION:VALUE
|
|
65
|
+
*
|
|
66
|
+
*
|
|
67
|
+
*
|
|
68
|
+
* **Example:** filter.name=$eq:John Doe&filter.name=$ilike:John Doe
|
|
69
|
+
*
|
|
70
|
+
* **Available Operations**
|
|
71
|
+
* - $eq
|
|
72
|
+
*
|
|
73
|
+
* - $ilike
|
|
74
|
+
*
|
|
75
|
+
* - $in
|
|
76
|
+
*
|
|
77
|
+
* - $and
|
|
78
|
+
*
|
|
79
|
+
* - $or
|
|
80
|
+
* @param filterStatus Filter by status query param.
|
|
81
|
+
*
|
|
82
|
+
* **Format:** filter.status={$not}:OPERATION:VALUE
|
|
83
|
+
*
|
|
84
|
+
*
|
|
85
|
+
*
|
|
86
|
+
* **Example:** filter.status=$eq:John Doe&filter.status=$in:John Doe
|
|
87
|
+
*
|
|
88
|
+
* **Available Operations**
|
|
89
|
+
* - $eq
|
|
90
|
+
*
|
|
91
|
+
* - $in
|
|
92
|
+
*
|
|
93
|
+
* - $and
|
|
94
|
+
*
|
|
95
|
+
* - $or
|
|
96
|
+
* @param filterUpdatedAt Filter by updatedAt query param.
|
|
97
|
+
*
|
|
98
|
+
* **Format:** filter.updatedAt={$not}:OPERATION:VALUE
|
|
99
|
+
*
|
|
100
|
+
*
|
|
101
|
+
*
|
|
102
|
+
* **Example:** filter.updatedAt=$btw:John Doe&filter.updatedAt=$gte:John Doe
|
|
103
|
+
*
|
|
104
|
+
* **Available Operations**
|
|
105
|
+
* - $gte
|
|
106
|
+
*
|
|
107
|
+
* - $lte
|
|
108
|
+
*
|
|
109
|
+
* - $btw
|
|
110
|
+
*
|
|
111
|
+
* - $and
|
|
112
|
+
*
|
|
113
|
+
* - $or
|
|
114
|
+
* @param filterCreatedAt Filter by createdAt query param.
|
|
115
|
+
*
|
|
116
|
+
* **Format:** filter.createdAt={$not}:OPERATION:VALUE
|
|
117
|
+
*
|
|
118
|
+
*
|
|
119
|
+
*
|
|
120
|
+
* **Example:** filter.createdAt=$btw:John Doe&filter.createdAt=$gte:John Doe
|
|
121
|
+
*
|
|
122
|
+
* **Available Operations**
|
|
123
|
+
* - $gte
|
|
124
|
+
*
|
|
125
|
+
* - $lte
|
|
126
|
+
*
|
|
127
|
+
* - $btw
|
|
128
|
+
*
|
|
129
|
+
* - $and
|
|
130
|
+
*
|
|
131
|
+
* - $or
|
|
132
|
+
* @param sortBy Parameter to sort by.
|
|
133
|
+
* To sort by multiple fields, just provide query param multiple types. The order in url defines an order of sorting
|
|
134
|
+
*
|
|
135
|
+
* **Format:** {fieldName}:{DIRECTION}
|
|
136
|
+
*
|
|
137
|
+
*
|
|
138
|
+
* **Example:** sortBy=id:DESC&sortBy=name:DESC
|
|
139
|
+
*
|
|
140
|
+
*
|
|
141
|
+
* **Default Value:** updatedAt:DESC
|
|
142
|
+
*
|
|
143
|
+
* **Available Fields**
|
|
144
|
+
* - id
|
|
145
|
+
*
|
|
146
|
+
* - name
|
|
147
|
+
*
|
|
148
|
+
* - updatedAt
|
|
149
|
+
*
|
|
150
|
+
* - createdAt
|
|
151
|
+
*
|
|
152
|
+
* - status
|
|
153
|
+
*
|
|
154
|
+
* @param search Search term to filter result values
|
|
155
|
+
*
|
|
156
|
+
* **Example:** John
|
|
157
|
+
*
|
|
158
|
+
*
|
|
159
|
+
* **Default Value:** No default value
|
|
160
|
+
*
|
|
161
|
+
*
|
|
162
|
+
* @param searchBy List of fields to search by term to filter result values
|
|
163
|
+
*
|
|
164
|
+
* **Example:** name,description
|
|
165
|
+
*
|
|
166
|
+
*
|
|
167
|
+
* **Default Value:** By default all fields mentioned below will be used to search by term
|
|
168
|
+
*
|
|
169
|
+
* **Available Fields**
|
|
170
|
+
* - name
|
|
171
|
+
*
|
|
172
|
+
* - description
|
|
173
|
+
*
|
|
174
|
+
* @returns any
|
|
175
|
+
* @throws ApiError
|
|
176
|
+
*/
|
|
177
|
+
listRules(page?: number, limit?: number, filterId?: Array<string>, filterName?: Array<string>, filterStatus?: Array<string>, filterUpdatedAt?: Array<string>, filterCreatedAt?: Array<string>, sortBy?: Array<'id:ASC' | 'id:DESC' | 'name:ASC' | 'name:DESC' | 'updatedAt:ASC' | 'updatedAt:DESC' | 'createdAt:ASC' | 'createdAt:DESC' | 'status:ASC' | 'status:DESC'>, search?: string, searchBy?: Array<string>): CancelablePromise<any>;
|
|
178
|
+
/**
|
|
179
|
+
* Update a rule
|
|
180
|
+
* Update a rule
|
|
181
|
+
* @param id
|
|
182
|
+
* @param requestBody
|
|
183
|
+
* @returns RuleResponseDto
|
|
184
|
+
* @throws ApiError
|
|
185
|
+
*/
|
|
186
|
+
updateRule(id: string, requestBody: UpdateRuleDto): CancelablePromise<RuleResponseDto>;
|
|
187
|
+
/**
|
|
188
|
+
* Delete a non-active rule (soft delete)
|
|
189
|
+
* Delete a non-active rule (soft delete)
|
|
190
|
+
* @param id
|
|
191
|
+
* @param reason
|
|
192
|
+
* @returns any
|
|
193
|
+
* @throws ApiError
|
|
194
|
+
*/
|
|
195
|
+
deleteRule(id: string, reason?: string): CancelablePromise<any>;
|
|
196
|
+
/**
|
|
197
|
+
* Get a rule by ID
|
|
198
|
+
* Get a rule by ID
|
|
199
|
+
* @param id
|
|
200
|
+
* @param version
|
|
201
|
+
* @returns RuleResponseDto
|
|
202
|
+
* @throws ApiError
|
|
203
|
+
*/
|
|
204
|
+
getRule(id: string, version?: number): CancelablePromise<RuleResponseDto>;
|
|
205
|
+
/**
|
|
206
|
+
* Activate a rule
|
|
207
|
+
* Activate a rule
|
|
208
|
+
* @param id
|
|
209
|
+
* @param requestBody
|
|
210
|
+
* @returns RuleResponseDto
|
|
211
|
+
* @throws ApiError
|
|
212
|
+
*/
|
|
213
|
+
activateRule(id: string, requestBody?: ActivateRuleDto): CancelablePromise<RuleResponseDto>;
|
|
214
|
+
/**
|
|
215
|
+
* Disable an active rule
|
|
216
|
+
* Disable an active rule
|
|
217
|
+
* @param id
|
|
218
|
+
* @param requestBody
|
|
219
|
+
* @returns RuleResponseDto
|
|
220
|
+
* @throws ApiError
|
|
221
|
+
*/
|
|
222
|
+
disableRule(id: string, requestBody?: DisableRuleDto): CancelablePromise<RuleResponseDto>;
|
|
223
|
+
}
|