@degenerate/rules 0.0.11 → 0.1.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/__testdata__/conditions/current-conditions.test-data.d.ts +1 -0
- package/dist/__testdata__/conditions/current-conditions.test-data.d.ts.map +1 -0
- package/dist/__testdata__/conditions/current-conditions.test-data.js +339 -0
- package/dist/__testdata__/rules/rules.test-data.d.ts +24 -0
- package/dist/__testdata__/rules/rules.test-data.d.ts.map +1 -0
- package/dist/__testdata__/rules/rules.test-data.js +339 -0
- package/dist/create/conditions/create-boolean-conditions.d.ts +12 -0
- package/dist/create/conditions/create-boolean-conditions.d.ts.map +1 -0
- package/dist/create/conditions/create-boolean-conditions.js +20 -0
- package/dist/create/conditions/create-contains-conditions.d.ts +12 -0
- package/dist/create/conditions/create-contains-conditions.d.ts.map +1 -0
- package/dist/create/conditions/create-contains-conditions.js +21 -0
- package/dist/create/conditions/create-empty-conditions.d.ts +11 -0
- package/dist/create/conditions/create-empty-conditions.d.ts.map +1 -0
- package/dist/create/conditions/create-empty-conditions.js +19 -0
- package/dist/create/conditions/create-equality-conditions.d.ts +12 -0
- package/dist/create/conditions/create-equality-conditions.d.ts.map +1 -0
- package/dist/create/conditions/create-equality-conditions.js +21 -0
- package/dist/create/conditions/create-null-conditions.d.ts +11 -0
- package/dist/create/conditions/create-null-conditions.d.ts.map +1 -0
- package/dist/create/conditions/create-null-conditions.js +19 -0
- package/dist/create/conditions/create-range-conditions.d.ts +13 -0
- package/dist/create/conditions/create-range-conditions.d.ts.map +1 -0
- package/dist/create/conditions/create-range-conditions.js +22 -0
- package/dist/create/conditions/create-special-conditions.d.ts +12 -0
- package/dist/create/conditions/create-special-conditions.d.ts.map +1 -0
- package/dist/create/conditions/create-special-conditions.js +21 -0
- package/dist/create/conditions/create-starts-end-with-conditions.d.ts +13 -0
- package/dist/create/conditions/create-starts-end-with-conditions.d.ts.map +1 -0
- package/dist/create/conditions/create-starts-end-with-conditions.js +22 -0
- package/dist/create/conditions/create-typeof-conditions.d.ts +12 -0
- package/dist/create/conditions/create-typeof-conditions.d.ts.map +1 -0
- package/dist/create/conditions/create-typeof-conditions.js +21 -0
- package/dist/create/create-share-rule-applied.d.ts +11 -0
- package/dist/create/create-share-rule-applied.d.ts.map +1 -0
- package/dist/create/create-share-rule-applied.js +17 -0
- package/dist/create/create-share-rule-id.d.ts +11 -0
- package/dist/create/create-share-rule-id.d.ts.map +1 -0
- package/dist/create/create-share-rule-id.js +25 -0
- package/dist/create/create-share-rule.d.ts +11 -0
- package/dist/create/create-share-rule.d.ts.map +1 -0
- package/dist/create/create-share-rule.js +28 -0
- package/dist/create/index.d.ts +13 -0
- package/dist/create/index.d.ts.map +1 -0
- package/dist/create/index.js +30 -0
- package/dist/evaluation/conditions/boolean-conditions.d.ts +2 -2
- package/dist/evaluation/conditions/boolean-conditions.d.ts.map +1 -1
- package/dist/evaluation/conditions/boolean-conditions.js +9 -8
- package/dist/evaluation/conditions/contains-conditions.d.ts +2 -2
- package/dist/evaluation/conditions/contains-conditions.d.ts.map +1 -1
- package/dist/evaluation/conditions/contains-conditions.js +2 -2
- package/dist/evaluation/conditions/empty-conditions.d.ts +2 -2
- package/dist/evaluation/conditions/empty-conditions.d.ts.map +1 -1
- package/dist/evaluation/conditions/empty-conditions.js +4 -13
- package/dist/evaluation/conditions/equality-conditions.d.ts +2 -2
- package/dist/evaluation/conditions/equality-conditions.d.ts.map +1 -1
- package/dist/evaluation/conditions/equality-conditions.js +4 -7
- package/dist/evaluation/conditions/null-conditions.d.ts +2 -2
- package/dist/evaluation/conditions/null-conditions.d.ts.map +1 -1
- package/dist/evaluation/conditions/null-conditions.js +4 -7
- package/dist/evaluation/conditions/range-conditions.d.ts +2 -2
- package/dist/evaluation/conditions/range-conditions.d.ts.map +1 -1
- package/dist/evaluation/conditions/range-conditions.js +16 -5
- package/dist/evaluation/conditions/special-conditions.d.ts +2 -2
- package/dist/evaluation/conditions/special-conditions.d.ts.map +1 -1
- package/dist/evaluation/conditions/special-conditions.js +11 -8
- package/dist/evaluation/conditions/starts-end-with-conditions.d.ts +2 -2
- package/dist/evaluation/conditions/starts-end-with-conditions.d.ts.map +1 -1
- package/dist/evaluation/conditions/starts-end-with-conditions.js +5 -3
- package/dist/evaluation/conditions/{typeof-rule-conditions.d.ts → typeof-conditions.d.ts} +3 -3
- package/dist/evaluation/conditions/typeof-conditions.d.ts.map +1 -0
- package/dist/evaluation/conditions/{typeof-rule-conditions.js → typeof-conditions.js} +2 -2
- package/dist/evaluation/evaluate-rule-conditions.d.ts.map +1 -1
- package/dist/evaluation/evaluate-rule-conditions.js +19 -22
- package/dist/evaluation/index.d.ts +1 -1
- package/dist/evaluation/index.d.ts.map +1 -1
- package/dist/evaluation/index.js +1 -1
- package/package.json +4 -4
- package/dist/evaluation/conditions/typeof-rule-conditions.d.ts.map +0 -1
- package/dist/evaluation/testdata/rules/rules.test-data.d.ts +0 -312
- package/dist/evaluation/testdata/rules/rules.test-data.d.ts.map +0 -1
- package/dist/evaluation/testdata/rules/rules.test-data.js +0 -212
- package/dist/evaluation/testdata/rules/share-data.test-data.d.ts +0 -1
- package/dist/evaluation/testdata/rules/share-data.test-data.d.ts.map +0 -1
- package/dist/evaluation/testdata/rules/share-data.test-data.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=current-conditions.test-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"current-conditions.test-data.d.ts","sourceRoot":"","sources":["../../../src/__testdata__/conditions/current-conditions.test-data.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// import { ConditionTypeOf, ConditionTypeTypeOf } from '@degenerate/generic';
|
|
3
|
+
// const loanAmountConditionTypeOfUndefined = { targettedProperty: 'loanAmount', conditionType: ConditionTypeTypeOf.IS_TYPEOF, conditionValue: ConditionTypeOf.UNDEFINED, }
|
|
4
|
+
// const testConditionTypeofUndefined: I = {}
|
|
5
|
+
// /**
|
|
6
|
+
// * This file contains the models for the rules used in the share data.
|
|
7
|
+
// */
|
|
8
|
+
// //#region Rule Evaluation
|
|
9
|
+
// /**
|
|
10
|
+
// * This contains the interface for the rule evaluation.
|
|
11
|
+
// */
|
|
12
|
+
// export interface IShareRuleEvalutionResult {
|
|
13
|
+
// ruleId: string; // the rule id
|
|
14
|
+
// currentResult: boolean; // the result of the rule evaluation
|
|
15
|
+
// currentConditionFailure: ICondition[]; // the conditions that failed for the current data
|
|
16
|
+
// proposedResult: boolean; // the result of the rule evaluation
|
|
17
|
+
// proposedConditionFailure: ICondition[]; // the conditions that failed for the proposed data
|
|
18
|
+
// }
|
|
19
|
+
// /**
|
|
20
|
+
// * This contains the interface for the rule evaluation.
|
|
21
|
+
// */
|
|
22
|
+
// export interface IShareRulesEvaluationResult {
|
|
23
|
+
// rootParam: string; // the root parameter that all the rules are providing a allow / deny for
|
|
24
|
+
// passedRuleCheck: boolean; // whether the rule check passed
|
|
25
|
+
// passedRuleId: string; // the rule id that passed
|
|
26
|
+
// shareRuleEvalutionResults: IShareRuleEvalutionResult[]; // the results of the rule evaluations
|
|
27
|
+
// }
|
|
28
|
+
// /**
|
|
29
|
+
// * This contains the interface for the rule evaluation results.
|
|
30
|
+
// */
|
|
31
|
+
// export interface IRuleEvaluationResults {
|
|
32
|
+
// shareDataId: string; // the share data id
|
|
33
|
+
// rulesResults: IShareRulesEvaluationResult[]; // the detailed results of the rule evaluations
|
|
34
|
+
// isValidProposal: boolean; // whether the proposal is valid
|
|
35
|
+
// }
|
|
36
|
+
// //#endregion Rule Evaluation
|
|
37
|
+
// //#region RuleSet
|
|
38
|
+
// /**
|
|
39
|
+
// * This contains the interface for the rule set in the share data object
|
|
40
|
+
// */
|
|
41
|
+
// export interface IRuleSet {
|
|
42
|
+
// id: string; // the id of the rule set
|
|
43
|
+
// version: number; // the version of the rule set
|
|
44
|
+
// name: string; // the name of the rule set
|
|
45
|
+
// description: string; // the description of the rule set
|
|
46
|
+
// ruleGroups: IRuleGroup[]; // the rules in the rule set
|
|
47
|
+
// }
|
|
48
|
+
// //#endregion RuleSet
|
|
49
|
+
// //#region RuleGroup
|
|
50
|
+
// /**
|
|
51
|
+
// * This contains the logical operators for combining rules.
|
|
52
|
+
// */
|
|
53
|
+
// export enum LogicalOperator {
|
|
54
|
+
// AND = 'AND',
|
|
55
|
+
// OR = 'OR'
|
|
56
|
+
// }
|
|
57
|
+
// /**
|
|
58
|
+
// * This contains the interface for a rule group.
|
|
59
|
+
// *
|
|
60
|
+
// * A rule group can contain individual rules or nested rule groups.
|
|
61
|
+
// */
|
|
62
|
+
// export interface IRuleGroup {
|
|
63
|
+
// operator: LogicalOperator; // The logical operator to combine the rules
|
|
64
|
+
// rules: (IShareRuleApplied | IRuleGroup)[]; // The rules or nested rule groups
|
|
65
|
+
// }
|
|
66
|
+
// //#endregion RuleGroup
|
|
67
|
+
// //#region Rule
|
|
68
|
+
// /**
|
|
69
|
+
// * This contains the interface for a share rule in the share data object
|
|
70
|
+
// */
|
|
71
|
+
// export interface IShareRule {
|
|
72
|
+
// ruleId: string; // the rule id
|
|
73
|
+
// currentDataConditions: ICondition[]; // the current data conditions
|
|
74
|
+
// proposedDataConditions: ICondition[]; // the proposed data conditions
|
|
75
|
+
// }
|
|
76
|
+
// /**
|
|
77
|
+
// * This contains the applied rule informaiton in the share data object.
|
|
78
|
+
// */
|
|
79
|
+
// export interface IShareRuleApplied extends IShareRule {
|
|
80
|
+
// targettedProperty: string; // this is the property that has the root of the rule object.
|
|
81
|
+
// }
|
|
82
|
+
// //#endregion Rule
|
|
83
|
+
// /// This defines the type of rules that can be applied in the share data network.
|
|
84
|
+
// //#region Conditions
|
|
85
|
+
// /**
|
|
86
|
+
// * This contains the different types of conditions that can be evaluated.
|
|
87
|
+
// */
|
|
88
|
+
// export type ConditionType =
|
|
89
|
+
// ConditionTypeTypeOf |
|
|
90
|
+
// ConditionTypeEquality |
|
|
91
|
+
// ConditionTypeRange |
|
|
92
|
+
// ConditionTypeContains |
|
|
93
|
+
// ConditionTypeStartsEndsWith |
|
|
94
|
+
// ConditionTypeNull |
|
|
95
|
+
// ConditionTypeBoolean |
|
|
96
|
+
// ConditionTypeEmpty |
|
|
97
|
+
// ConditionTypeCombinedRules;
|
|
98
|
+
// /**
|
|
99
|
+
// * This contains the choices for the type of qualifier.
|
|
100
|
+
// */
|
|
101
|
+
// export enum ConditionTypeQualifier {
|
|
102
|
+
// IS = 'is',
|
|
103
|
+
// IS_NOT = 'is not'
|
|
104
|
+
// }
|
|
105
|
+
// /**
|
|
106
|
+
// * This contains the choices for the type of condition.
|
|
107
|
+
// */
|
|
108
|
+
// export enum ConditionTypeSingle {
|
|
109
|
+
// TYPEOF = 'typeof',
|
|
110
|
+
// EQUAL = 'equal',
|
|
111
|
+
// }
|
|
112
|
+
// /**
|
|
113
|
+
// * This contains the choices for the typeof conditions.
|
|
114
|
+
// */
|
|
115
|
+
// export enum ConditionTypeTypeOf {
|
|
116
|
+
// IS_TYPEOF = 'is typeof',
|
|
117
|
+
// IS_NOT_TYPEOF = 'is not typeof'
|
|
118
|
+
// }
|
|
119
|
+
// /**
|
|
120
|
+
// * This contains the choices for the equality conditions.
|
|
121
|
+
// */
|
|
122
|
+
// export enum ConditionTypeEquality {
|
|
123
|
+
// EQUAL = 'equal',
|
|
124
|
+
// NOT_EQUAL = 'not equal'
|
|
125
|
+
// }
|
|
126
|
+
// /**
|
|
127
|
+
// * This contains the choices for the range conditions.
|
|
128
|
+
// */
|
|
129
|
+
// export enum ConditionTypeRange {
|
|
130
|
+
// GREATER_THAN = 'greater than',
|
|
131
|
+
// LESS_THAN = 'less than',
|
|
132
|
+
// GREATER_THAN_OR_EQUAL = 'greater than or equal',
|
|
133
|
+
// LESS_THAN_OR_EQUAL = 'less than or equal'
|
|
134
|
+
// }
|
|
135
|
+
// /**
|
|
136
|
+
// * This contains the choices for the contains conditions.
|
|
137
|
+
// */
|
|
138
|
+
// export enum ConditionTypeContains {
|
|
139
|
+
// CONTAINS = 'contains',
|
|
140
|
+
// NOT_CONTAINS = 'not contains',
|
|
141
|
+
// }
|
|
142
|
+
// /**
|
|
143
|
+
// * This contains the choices for the starts with and ends with conditions.
|
|
144
|
+
// */
|
|
145
|
+
// export enum ConditionTypeStartsEndsWith {
|
|
146
|
+
// STARTS_WITH = 'starts with',
|
|
147
|
+
// ENDS_WITH = 'ends with',
|
|
148
|
+
// }
|
|
149
|
+
// /**
|
|
150
|
+
// * This contains the choices for the null conditions.
|
|
151
|
+
// */
|
|
152
|
+
// export enum ConditionTypeNull {
|
|
153
|
+
// IS_NULL = 'is null',
|
|
154
|
+
// IS_NOT_NULL = 'is not null',
|
|
155
|
+
// }
|
|
156
|
+
// /**
|
|
157
|
+
// * This contains the choices for the boolean conditions.
|
|
158
|
+
// */
|
|
159
|
+
// export enum ConditionTypeBoolean {
|
|
160
|
+
// IS_TRUE = 'is true',
|
|
161
|
+
// IS_FALSE = 'is false',
|
|
162
|
+
// }
|
|
163
|
+
// /**
|
|
164
|
+
// * This contains the choices for the empty conditions.
|
|
165
|
+
// */
|
|
166
|
+
// export enum ConditionTypeEmpty {
|
|
167
|
+
// IS_EMPTY = 'is empty',
|
|
168
|
+
// IS_NOT_EMPTY = 'is not empty',
|
|
169
|
+
// }
|
|
170
|
+
// /**
|
|
171
|
+
// * This contains the choices for the special conditions.
|
|
172
|
+
// */
|
|
173
|
+
// export enum ConditionTypeSpecial {
|
|
174
|
+
// PATTERN = 'pattern',
|
|
175
|
+
// }
|
|
176
|
+
// /**
|
|
177
|
+
// * This contains the choices for the combined rule conditions that are a type of object
|
|
178
|
+
// */
|
|
179
|
+
// export enum ConditionTypeCombinedRules {
|
|
180
|
+
// OBJECT = 'object',
|
|
181
|
+
// }
|
|
182
|
+
// /**
|
|
183
|
+
// * This is the interface for the conditional information in the checks.
|
|
184
|
+
// */
|
|
185
|
+
// export type ICondition =
|
|
186
|
+
// IConditionTypeOf |
|
|
187
|
+
// IConditionEquality |
|
|
188
|
+
// IConditionRange |
|
|
189
|
+
// IConditionContains |
|
|
190
|
+
// IConditionStartsEndsWith |
|
|
191
|
+
// IConditionNull |
|
|
192
|
+
// IConditionBoolean |
|
|
193
|
+
// IConditionEmpty |
|
|
194
|
+
// IConditionSpecial;
|
|
195
|
+
// /**
|
|
196
|
+
// * These are the different choices for the types of data in a condition.
|
|
197
|
+
// */
|
|
198
|
+
// export enum ConditionTypeOf {
|
|
199
|
+
// STRING = 'string',
|
|
200
|
+
// NUMBER = 'number',
|
|
201
|
+
// INTEGER = 'integer',
|
|
202
|
+
// BOOLEAN = 'boolean',
|
|
203
|
+
// OBJECT = 'object',
|
|
204
|
+
// ARRAY = 'array',
|
|
205
|
+
// NULL = 'null',
|
|
206
|
+
// UNDEFINED = 'undefined',
|
|
207
|
+
// FUNCTION = 'function',
|
|
208
|
+
// // SYMBOL = 'symbol',
|
|
209
|
+
// BIGINT = 'bigint'
|
|
210
|
+
// }
|
|
211
|
+
// /**
|
|
212
|
+
// * This is the interface for the type of condition.
|
|
213
|
+
// *
|
|
214
|
+
// const exampleConditionTypeOf: IConditionTypeOf = {
|
|
215
|
+
// targettedProperty: 'address.city.total',
|
|
216
|
+
// conditionType: ConditionTypeTypeOf.IS_TYPEOF,
|
|
217
|
+
// conditionValue: ConditionTypeOf.NUMBER
|
|
218
|
+
// };
|
|
219
|
+
// */
|
|
220
|
+
// export interface IConditionTypeOf {
|
|
221
|
+
// targettedProperty: string; // the property that is being checked ('address.city.value')
|
|
222
|
+
// conditionType: ConditionTypeTypeOf; // the type of condition to evaluate
|
|
223
|
+
// conditionValue: ConditionTypeOf; // the value to evaluate the condition against
|
|
224
|
+
// }
|
|
225
|
+
// /**
|
|
226
|
+
// * This is the interface for the equality condition.
|
|
227
|
+
// *
|
|
228
|
+
// const exampleConditionEquality: IConditionEquality = {
|
|
229
|
+
// targettedProperty: 'address.city.total',
|
|
230
|
+
// conditionType: ConditionTypeEquality.EQUAL,
|
|
231
|
+
// conditionValue: 100
|
|
232
|
+
// };
|
|
233
|
+
// */
|
|
234
|
+
// export interface IConditionEquality {
|
|
235
|
+
// targettedProperty: string; // the property that is being checked ('address.city.value')
|
|
236
|
+
// conditionType: ConditionTypeEquality; // the type of condition to evaluate
|
|
237
|
+
// conditionValue: number | string; // the value to evaluate the condition against
|
|
238
|
+
// }
|
|
239
|
+
// /**
|
|
240
|
+
// * This is the interface for the range condition.
|
|
241
|
+
// *
|
|
242
|
+
// const exampleConditionRange: IConditionRange = {
|
|
243
|
+
// targettedProperty: 'address.city.total',
|
|
244
|
+
// conditionType: ConditionTypeRange.GREATER_THAN,
|
|
245
|
+
// conditionValue: 100
|
|
246
|
+
// };
|
|
247
|
+
// */
|
|
248
|
+
// export interface IConditionRange {
|
|
249
|
+
// targettedProperty: string; // the property that is being checked ('address.city.value')
|
|
250
|
+
// conditionType: ConditionTypeRange; // the type of condition to evaluate
|
|
251
|
+
// conditionValue: string | number; // the value to evaluate the condition against
|
|
252
|
+
// }
|
|
253
|
+
// /**
|
|
254
|
+
// * This is the interface for the contains condition.
|
|
255
|
+
// *
|
|
256
|
+
// const exampleConditionContains: IConditionContains = {
|
|
257
|
+
// targettedProperty: 'address.city.name',
|
|
258
|
+
// conditionType: ConditionTypeContains.CONTAINS,
|
|
259
|
+
// conditionValue: ['gar'| 'garison' | 'garage']
|
|
260
|
+
// * };
|
|
261
|
+
// */
|
|
262
|
+
// export interface IConditionContains {
|
|
263
|
+
// targettedProperty: string; // the property that is being checked ('address.city.value')
|
|
264
|
+
// conditionType: ConditionTypeContains; // the type of condition to evaluate
|
|
265
|
+
// conditionValue: string | string[] | number[]; // the value to evaluate the condition against
|
|
266
|
+
// }
|
|
267
|
+
// /**
|
|
268
|
+
// * This is the interface for the starts with and ends with condition.
|
|
269
|
+
// *
|
|
270
|
+
// const exampleConditionStartsEndsWith: IConditionStartsEndsWith = {
|
|
271
|
+
// targettedProperty: 'address.city.name',
|
|
272
|
+
// conditionType: ConditionTypeStartsEndsWith.STARTS_WITH,
|
|
273
|
+
// conditionValue: 'cal'
|
|
274
|
+
// };
|
|
275
|
+
// */
|
|
276
|
+
// export interface IConditionStartsEndsWith {
|
|
277
|
+
// targettedProperty: string; // the property that is being checked ('address.city.value')
|
|
278
|
+
// conditionType: ConditionTypeStartsEndsWith; // the type of condition to evaluate
|
|
279
|
+
// conditionValue: string; // the value to evaluate the condition against
|
|
280
|
+
// }
|
|
281
|
+
// /**
|
|
282
|
+
// * This is the interface for the null condition.
|
|
283
|
+
// *
|
|
284
|
+
// const exampleConditionNull: IConditionNull = {
|
|
285
|
+
// targettedProperty: 'address.city.name',
|
|
286
|
+
// conditionType: ConditionTypeNull.IS_NULL
|
|
287
|
+
// };
|
|
288
|
+
// */
|
|
289
|
+
// export interface IConditionNull {
|
|
290
|
+
// targettedProperty: string; // the property that is being checked ('address.city.value')
|
|
291
|
+
// conditionType: ConditionTypeNull; // the type of condition to evaluate
|
|
292
|
+
// }
|
|
293
|
+
// /**
|
|
294
|
+
// * This is the interface for the boolean condition.
|
|
295
|
+
// *
|
|
296
|
+
// const exampleConditionBoolean: IConditionBoolean = {
|
|
297
|
+
// targettedProperty: 'address.city.name',
|
|
298
|
+
// conditionType: ConditionTypeBoolean.IS_TRUE
|
|
299
|
+
// };
|
|
300
|
+
// */
|
|
301
|
+
// export interface IConditionBoolean {
|
|
302
|
+
// targettedProperty: string; // the property that is being checked ('address.city.value')
|
|
303
|
+
// conditionType: ConditionTypeBoolean; // the type of condition to evaluate
|
|
304
|
+
// }
|
|
305
|
+
// /**
|
|
306
|
+
// * This is the interface for the empty condition.
|
|
307
|
+
// *
|
|
308
|
+
// const exampleConditionEmpty: IConditionEmpty = {
|
|
309
|
+
// targettedProperty: 'address.city.name',
|
|
310
|
+
// conditionType: ConditionTypeEmpty.IS_EMPTY
|
|
311
|
+
// };
|
|
312
|
+
// */
|
|
313
|
+
// export interface IConditionEmpty {
|
|
314
|
+
// targettedProperty: string; // the property that is being checked ('address.city.value')
|
|
315
|
+
// conditionType: ConditionTypeEmpty; // the type of condition to evaluate
|
|
316
|
+
// }
|
|
317
|
+
// /**
|
|
318
|
+
// * This is the interface for the special condition.
|
|
319
|
+
// *
|
|
320
|
+
// const exampleConditionSpecial: IConditionSpecial = {
|
|
321
|
+
// targettedProperty: 'address.city.name',
|
|
322
|
+
// conditionType: ConditionTypeSpecial.PATTERN,
|
|
323
|
+
// conditionValue: '^[a-zA-Z0-9]*$'
|
|
324
|
+
// };
|
|
325
|
+
// */
|
|
326
|
+
// export interface IConditionSpecial {
|
|
327
|
+
// targettedProperty: string; // the property that is being checked ('address.city.value')
|
|
328
|
+
// conditionType: ConditionTypeSpecial; // the type of condition to evaluate
|
|
329
|
+
// conditionValue: string; // the value to evaluate the condition against
|
|
330
|
+
// }
|
|
331
|
+
// /**
|
|
332
|
+
// * This is the interface for the combined rule condition.
|
|
333
|
+
// */
|
|
334
|
+
// export interface IConditionCombinedRules {
|
|
335
|
+
// targettedProperty: string; // the property that is being checked ('address.city.value')
|
|
336
|
+
// conditionType: ConditionTypeCombinedRules; // the type of condition to evaluate
|
|
337
|
+
// conditionValue: IRuleGroup; // the value to evaluate the condition against
|
|
338
|
+
// }
|
|
339
|
+
// //#endregion Conditions
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IRuleGroup, IRuleSet, IShareRuleApplied } from '@degenerate/generic';
|
|
2
|
+
export declare const loanAmountCreate: IShareRuleApplied;
|
|
3
|
+
export declare const loanAmountCreateWithHold: IShareRuleApplied;
|
|
4
|
+
export declare const loanAmountCreateWithPink_A: IShareRuleApplied;
|
|
5
|
+
export declare const loanAmountUpdate: IShareRuleApplied;
|
|
6
|
+
export declare const loanAmountUpdateWithPink_BA: IShareRuleApplied;
|
|
7
|
+
export declare const loanAmountDelete: IShareRuleApplied;
|
|
8
|
+
export declare const loanCreateRuleGroup: IRuleGroup;
|
|
9
|
+
export declare const loanCreateWithHoldUntil: IRuleGroup;
|
|
10
|
+
export declare const loanCreateFullRuleGroup: IRuleGroup;
|
|
11
|
+
export declare const loanCreateRuleSet: IRuleSet;
|
|
12
|
+
export declare const userAgeCreate: IShareRuleApplied;
|
|
13
|
+
export declare const userAgeUpdate: IShareRuleApplied;
|
|
14
|
+
export declare const userAgeDelete: IShareRuleApplied;
|
|
15
|
+
export declare const userFirstNameCreate: IShareRuleApplied;
|
|
16
|
+
export declare const userLastNameCreate: IShareRuleApplied;
|
|
17
|
+
export declare const userFirstNameUpdate: IShareRuleApplied;
|
|
18
|
+
export declare const userLastNameUpdate: IShareRuleApplied;
|
|
19
|
+
export declare const userFirstNameDelete: IShareRuleApplied;
|
|
20
|
+
export declare const userLastNameDelete: IShareRuleApplied;
|
|
21
|
+
export declare const userCombinedCreate: IShareRuleApplied;
|
|
22
|
+
export declare const userCombinedUpdate: IShareRuleApplied;
|
|
23
|
+
export declare const userCombinedDelete: IShareRuleApplied;
|
|
24
|
+
//# sourceMappingURL=rules.test-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules.test-data.d.ts","sourceRoot":"","sources":["../../../src/__testdata__/rules/rules.test-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAKH,UAAU,EACV,QAAQ,EACR,iBAAiB,EAEpB,MAAM,qBAAqB,CAAC;AAK7B,eAAO,MAAM,gBAAgB,EAAE,iBAU9B,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,iBAStC,CAAA;AAED,eAAO,MAAM,0BAA0B,EAAE,iBAWxC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,iBAW9B,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,iBAazC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,iBAU9B,CAAC;AAmBF,eAAO,MAAM,mBAAmB,EAAE,UAGjC,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,UAGrC,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,UAGrC,CAAA;AA0FD,eAAO,MAAM,iBAAiB,EAAE,QAM/B,CAAA;AAQD,eAAO,MAAM,aAAa,EAAE,iBAU3B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,iBAW3B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,iBAU3B,CAAC;AAMF,eAAO,MAAM,mBAAmB,EAAE,iBASjC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,iBAShC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,iBASjC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,iBAShC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,iBASjC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,iBAShC,CAAC;AAIF,eAAO,MAAM,kBAAkB,EAAE,iBAchC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,iBAehC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,iBAchC,CAAC"}
|