@degenerate/rules 0.0.9 → 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/evaluate-rules.js +3 -5
- 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
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.userCombinedDelete = exports.userCombinedUpdate = exports.userCombinedCreate = exports.userLastNameDelete = exports.userFirstNameDelete = exports.userLastNameUpdate = exports.userFirstNameUpdate = exports.userLastNameCreate = exports.userFirstNameCreate = exports.userAgeDelete = exports.userAgeUpdate = exports.userAgeCreate = exports.loanCreateRuleSet = exports.loanCreateFullRuleGroup = exports.loanCreateWithHoldUntil = exports.loanCreateRuleGroup = exports.loanAmountDelete = exports.loanAmountUpdateWithPink_BA = exports.loanAmountUpdate = exports.loanAmountCreateWithPink_A = exports.loanAmountCreateWithHold = exports.loanAmountCreate = void 0;
|
|
4
|
+
const generic_1 = require("@degenerate/generic");
|
|
5
|
+
//#region property loanAmount
|
|
6
|
+
exports.loanAmountCreate = {
|
|
7
|
+
ruleId: 'loanAmountCreate',
|
|
8
|
+
currentDataConditions: [
|
|
9
|
+
{ targettedProperty: 'loanAmount', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.UNDEFINED, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS }
|
|
10
|
+
],
|
|
11
|
+
proposedDataConditions: [
|
|
12
|
+
{ targettedProperty: 'loanAmount', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.NUMBER, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS },
|
|
13
|
+
{ targettedProperty: 'loanAmount', conditionType: generic_1.ConditionTypeRange.GREATER_THAN_OR_EQUAL, conditionValue: 0, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS },
|
|
14
|
+
],
|
|
15
|
+
targettedProperty: 'loanAmount'
|
|
16
|
+
};
|
|
17
|
+
exports.loanAmountCreateWithHold = {
|
|
18
|
+
ruleId: 'loanAmountCreateWithHold',
|
|
19
|
+
currentDataConditions: [
|
|
20
|
+
{ targettedProperty: 'holdUntil', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.UNDEFINED, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS },
|
|
21
|
+
],
|
|
22
|
+
proposedDataConditions: [
|
|
23
|
+
{ targettedProperty: 'holdUntil', conditionType: generic_1.ConditionTypeRange.GREATER_THAN_OR_EQUAL, conditionValue: 0, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS },
|
|
24
|
+
],
|
|
25
|
+
targettedProperty: 'holdUntil'
|
|
26
|
+
};
|
|
27
|
+
exports.loanAmountCreateWithPink_A = {
|
|
28
|
+
ruleId: 'loanAmountCreate',
|
|
29
|
+
currentDataConditions: [
|
|
30
|
+
{ targettedProperty: 'loanAmount', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.UNDEFINED, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS }
|
|
31
|
+
],
|
|
32
|
+
proposedDataConditions: [
|
|
33
|
+
{ targettedProperty: 'loanAmount', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.NUMBER, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS },
|
|
34
|
+
{ targettedProperty: 'loanAmount', conditionType: generic_1.ConditionTypeRange.GREATER_THAN_OR_EQUAL, conditionValue: 0, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS },
|
|
35
|
+
{ targettedProperty: 'house.color.window', conditionType: generic_1.ConditionTypeSingle.EQUAL, conditionValue: 'pink', conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS }
|
|
36
|
+
],
|
|
37
|
+
targettedProperty: 'loanAmount'
|
|
38
|
+
};
|
|
39
|
+
exports.loanAmountUpdate = {
|
|
40
|
+
ruleId: 'loanAmountUpdate',
|
|
41
|
+
currentDataConditions: [
|
|
42
|
+
{ targettedProperty: 'loanAmount', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.NUMBER, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS },
|
|
43
|
+
{ targettedProperty: 'loanAmount', conditionType: generic_1.ConditionTypeRange.GREATER_THAN_OR_EQUAL, conditionValue: 0, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS },
|
|
44
|
+
],
|
|
45
|
+
proposedDataConditions: [
|
|
46
|
+
{ targettedProperty: 'loanAmount', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.NUMBER, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS },
|
|
47
|
+
{ targettedProperty: 'loanAmount', conditionType: generic_1.ConditionTypeRange.GREATER_THAN_OR_EQUAL, conditionValue: 0, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS },
|
|
48
|
+
],
|
|
49
|
+
targettedProperty: 'loanAmount'
|
|
50
|
+
};
|
|
51
|
+
exports.loanAmountUpdateWithPink_BA = {
|
|
52
|
+
ruleId: 'loanAmountUpdate',
|
|
53
|
+
currentDataConditions: [
|
|
54
|
+
{ targettedProperty: 'loanAmount', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.NUMBER, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS },
|
|
55
|
+
{ targettedProperty: 'loanAmount', conditionType: generic_1.ConditionTypeRange.GREATER_THAN_OR_EQUAL, conditionValue: 0, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS },
|
|
56
|
+
{ targettedProperty: 'house.color.window', conditionType: generic_1.ConditionTypeSingle.EQUAL, conditionValue: 'pink', conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS }
|
|
57
|
+
],
|
|
58
|
+
proposedDataConditions: [
|
|
59
|
+
{ targettedProperty: 'loanAmount', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.NUMBER, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS },
|
|
60
|
+
{ targettedProperty: 'loanAmount', conditionType: generic_1.ConditionTypeRange.GREATER_THAN_OR_EQUAL, conditionValue: 0, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS },
|
|
61
|
+
{ targettedProperty: 'house.color.window', conditionType: generic_1.ConditionTypeSingle.EQUAL, conditionValue: 'pink', conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS }
|
|
62
|
+
],
|
|
63
|
+
targettedProperty: 'loanAmount'
|
|
64
|
+
};
|
|
65
|
+
exports.loanAmountDelete = {
|
|
66
|
+
ruleId: 'loanAmountUpdate',
|
|
67
|
+
currentDataConditions: [
|
|
68
|
+
{ targettedProperty: 'loanAmount', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.NUMBER, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS },
|
|
69
|
+
{ targettedProperty: 'loanAmount', conditionType: generic_1.ConditionTypeRange.GREATER_THAN_OR_EQUAL, conditionValue: 0, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS }
|
|
70
|
+
],
|
|
71
|
+
proposedDataConditions: [
|
|
72
|
+
{ targettedProperty: 'loanAmount', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.UNDEFINED, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS }
|
|
73
|
+
],
|
|
74
|
+
targettedProperty: 'loanAmount'
|
|
75
|
+
};
|
|
76
|
+
//#endregion property loanAmount
|
|
77
|
+
//#region ruleSet LoanAmount
|
|
78
|
+
// const ruleGroupLoanAmount: IRuleSet = {
|
|
79
|
+
// /**
|
|
80
|
+
// * This contains the interface for the rule set in the share data object
|
|
81
|
+
// */
|
|
82
|
+
// export interface IRuleSet {
|
|
83
|
+
// id: string; // the id of the rule set
|
|
84
|
+
// name: string; // the name of the rule set
|
|
85
|
+
// description: string; // the description of the rule set
|
|
86
|
+
// ruleGroups: IRuleGroup[]; // the rules in the rule set
|
|
87
|
+
// }
|
|
88
|
+
exports.loanCreateRuleGroup = {
|
|
89
|
+
operator: generic_1.LogicalOperator.AND,
|
|
90
|
+
rules: [exports.loanAmountCreate]
|
|
91
|
+
};
|
|
92
|
+
exports.loanCreateWithHoldUntil = {
|
|
93
|
+
operator: generic_1.LogicalOperator.AND,
|
|
94
|
+
rules: [exports.loanAmountCreate, exports.loanAmountCreateWithHold]
|
|
95
|
+
};
|
|
96
|
+
exports.loanCreateFullRuleGroup = {
|
|
97
|
+
operator: generic_1.LogicalOperator.OR,
|
|
98
|
+
rules: [exports.loanCreateRuleGroup, exports.loanCreateWithHoldUntil]
|
|
99
|
+
};
|
|
100
|
+
// This looks like
|
|
101
|
+
// {
|
|
102
|
+
// "id": "loanCreateRuleSet",
|
|
103
|
+
// "name": "Loan Create Rule Set",
|
|
104
|
+
// "description": "The rules for creating a loan amount",
|
|
105
|
+
// "ruleGroups": [
|
|
106
|
+
// {
|
|
107
|
+
// "operator": "OR",
|
|
108
|
+
// "rules": [
|
|
109
|
+
// {
|
|
110
|
+
// "operator": "AND",
|
|
111
|
+
// "rules": [
|
|
112
|
+
// {
|
|
113
|
+
// "ruleId": "loanAmountCreate",
|
|
114
|
+
// "currentDataConditions": [
|
|
115
|
+
// {
|
|
116
|
+
// "targettedProperty": "loanAmount",
|
|
117
|
+
// "conditionType": "typeof",
|
|
118
|
+
// "conditionValue": "undefined"
|
|
119
|
+
// }
|
|
120
|
+
// ],
|
|
121
|
+
// "proposedDataConditions": [
|
|
122
|
+
// {
|
|
123
|
+
// "targettedProperty": "loanAmount",
|
|
124
|
+
// "conditionType": "is typeof",
|
|
125
|
+
// "conditionValue": "number"
|
|
126
|
+
// },
|
|
127
|
+
// {
|
|
128
|
+
// "targettedProperty": "loanAmount",
|
|
129
|
+
// "conditionType": "greater than or equal",
|
|
130
|
+
// "conditionValue": 0
|
|
131
|
+
// }
|
|
132
|
+
// ],
|
|
133
|
+
// "targettedProperty": "loanAmount"
|
|
134
|
+
// }
|
|
135
|
+
// ]
|
|
136
|
+
// },
|
|
137
|
+
// {
|
|
138
|
+
// "operator": "AND",
|
|
139
|
+
// "rules": [
|
|
140
|
+
// {
|
|
141
|
+
// "ruleId": "loanAmountCreate",
|
|
142
|
+
// "currentDataConditions": [
|
|
143
|
+
// {
|
|
144
|
+
// "targettedProperty": "loanAmount",
|
|
145
|
+
// "conditionType": "is typeof",
|
|
146
|
+
// "conditionValue": "undefined"
|
|
147
|
+
// }
|
|
148
|
+
// ],
|
|
149
|
+
// "proposedDataConditions": [
|
|
150
|
+
// {
|
|
151
|
+
// "targettedProperty": "loanAmount",
|
|
152
|
+
// "conditionType": "is typeof",
|
|
153
|
+
// "conditionValue": "number"
|
|
154
|
+
// },
|
|
155
|
+
// {
|
|
156
|
+
// "targettedProperty": "loanAmount",
|
|
157
|
+
// "conditionType": "greater than or equal",
|
|
158
|
+
// "conditionValue": 0
|
|
159
|
+
// }
|
|
160
|
+
// ],
|
|
161
|
+
// "targettedProperty": "loanAmount"
|
|
162
|
+
// },
|
|
163
|
+
// {
|
|
164
|
+
// "ruleId": "loanAmountCreateWithHold",
|
|
165
|
+
// "currentDataConditions": [
|
|
166
|
+
// {
|
|
167
|
+
// "targettedProperty": "holdUntil",
|
|
168
|
+
// "conditionType": "is typeof",
|
|
169
|
+
// "conditionValue": "undefined"
|
|
170
|
+
// }
|
|
171
|
+
// ],
|
|
172
|
+
// "proposedDataConditions": [
|
|
173
|
+
// {
|
|
174
|
+
// "targettedProperty": "holdUntil",
|
|
175
|
+
// "conditionType": "greater than or equal",
|
|
176
|
+
// "conditionValue": 0
|
|
177
|
+
// }
|
|
178
|
+
// ],
|
|
179
|
+
// "targettedProperty": "holdUntil"
|
|
180
|
+
// }
|
|
181
|
+
// ]
|
|
182
|
+
// }
|
|
183
|
+
// ]
|
|
184
|
+
// }
|
|
185
|
+
// ]
|
|
186
|
+
// }
|
|
187
|
+
exports.loanCreateRuleSet = {
|
|
188
|
+
version: 1,
|
|
189
|
+
id: 'loanCreateRuleSet',
|
|
190
|
+
name: 'Loan Create Rule Set',
|
|
191
|
+
description: 'The rules for creating a loan',
|
|
192
|
+
ruleGroups: [exports.loanCreateFullRuleGroup]
|
|
193
|
+
};
|
|
194
|
+
//#region User
|
|
195
|
+
//#region User.age
|
|
196
|
+
exports.userAgeCreate = {
|
|
197
|
+
ruleId: 'user.ageCreate',
|
|
198
|
+
currentDataConditions: [
|
|
199
|
+
{ targettedProperty: 'user.age', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.UNDEFINED, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, }
|
|
200
|
+
],
|
|
201
|
+
proposedDataConditions: [
|
|
202
|
+
{ targettedProperty: 'user.age', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.NUMBER, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
203
|
+
{ targettedProperty: 'user.age', conditionType: generic_1.ConditionTypeRange.GREATER_THAN_OR_EQUAL, conditionValue: 0, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
204
|
+
],
|
|
205
|
+
targettedProperty: 'user'
|
|
206
|
+
};
|
|
207
|
+
exports.userAgeUpdate = {
|
|
208
|
+
ruleId: 'user.ageUpdate',
|
|
209
|
+
currentDataConditions: [
|
|
210
|
+
{ targettedProperty: 'user.age', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.NUMBER, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
211
|
+
{ targettedProperty: 'user.age', conditionType: generic_1.ConditionTypeRange.GREATER_THAN_OR_EQUAL, conditionValue: 0, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
212
|
+
],
|
|
213
|
+
proposedDataConditions: [
|
|
214
|
+
{ targettedProperty: 'user.age', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.NUMBER, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
215
|
+
{ targettedProperty: 'user.age', conditionType: generic_1.ConditionTypeRange.GREATER_THAN_OR_EQUAL, conditionValue: 18, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
216
|
+
],
|
|
217
|
+
targettedProperty: 'user'
|
|
218
|
+
};
|
|
219
|
+
exports.userAgeDelete = {
|
|
220
|
+
ruleId: 'user.ageDelete',
|
|
221
|
+
currentDataConditions: [
|
|
222
|
+
{ targettedProperty: 'user.age', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.NUMBER, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
223
|
+
{ targettedProperty: 'user.age', conditionType: generic_1.ConditionTypeRange.GREATER_THAN_OR_EQUAL, conditionValue: 0, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, }
|
|
224
|
+
],
|
|
225
|
+
proposedDataConditions: [
|
|
226
|
+
{ targettedProperty: 'user.age', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.UNDEFINED, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, }
|
|
227
|
+
],
|
|
228
|
+
targettedProperty: 'user'
|
|
229
|
+
};
|
|
230
|
+
//#endregion User.age
|
|
231
|
+
//#region User.name
|
|
232
|
+
exports.userFirstNameCreate = {
|
|
233
|
+
ruleId: 'user.firstNameCreate',
|
|
234
|
+
currentDataConditions: [
|
|
235
|
+
{ targettedProperty: 'user.firstName', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.UNDEFINED, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, }
|
|
236
|
+
],
|
|
237
|
+
proposedDataConditions: [
|
|
238
|
+
{ targettedProperty: 'user.firstName', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.STRING, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
239
|
+
],
|
|
240
|
+
targettedProperty: 'user'
|
|
241
|
+
};
|
|
242
|
+
exports.userLastNameCreate = {
|
|
243
|
+
ruleId: 'user.lastNameCreate',
|
|
244
|
+
currentDataConditions: [
|
|
245
|
+
{ targettedProperty: 'user.lastName', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.UNDEFINED, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, }
|
|
246
|
+
],
|
|
247
|
+
proposedDataConditions: [
|
|
248
|
+
{ targettedProperty: 'user.lastName', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.STRING, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
249
|
+
],
|
|
250
|
+
targettedProperty: 'user'
|
|
251
|
+
};
|
|
252
|
+
exports.userFirstNameUpdate = {
|
|
253
|
+
ruleId: 'user.firstNameUpdate',
|
|
254
|
+
currentDataConditions: [
|
|
255
|
+
{ targettedProperty: 'user.firstName', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.STRING, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, }
|
|
256
|
+
],
|
|
257
|
+
proposedDataConditions: [
|
|
258
|
+
{ targettedProperty: 'user.firstName', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.STRING, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
259
|
+
],
|
|
260
|
+
targettedProperty: 'user'
|
|
261
|
+
};
|
|
262
|
+
exports.userLastNameUpdate = {
|
|
263
|
+
ruleId: 'user.lastNameUpdate',
|
|
264
|
+
currentDataConditions: [
|
|
265
|
+
{ targettedProperty: 'user.lastName', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.STRING, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, }
|
|
266
|
+
],
|
|
267
|
+
proposedDataConditions: [
|
|
268
|
+
{ targettedProperty: 'user.lastName', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.STRING, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
269
|
+
],
|
|
270
|
+
targettedProperty: 'user'
|
|
271
|
+
};
|
|
272
|
+
exports.userFirstNameDelete = {
|
|
273
|
+
ruleId: 'user.firstNameDelete',
|
|
274
|
+
currentDataConditions: [
|
|
275
|
+
{ targettedProperty: 'user.firstName', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.STRING, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, }
|
|
276
|
+
],
|
|
277
|
+
proposedDataConditions: [
|
|
278
|
+
{ targettedProperty: 'user.firstName', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.UNDEFINED, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, }
|
|
279
|
+
],
|
|
280
|
+
targettedProperty: 'user'
|
|
281
|
+
};
|
|
282
|
+
exports.userLastNameDelete = {
|
|
283
|
+
ruleId: 'user.lastNameDelete',
|
|
284
|
+
currentDataConditions: [
|
|
285
|
+
{ targettedProperty: 'user.lastName', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.STRING, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, }
|
|
286
|
+
],
|
|
287
|
+
proposedDataConditions: [
|
|
288
|
+
{ targettedProperty: 'user.lastName', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.UNDEFINED, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, }
|
|
289
|
+
],
|
|
290
|
+
targettedProperty: 'user'
|
|
291
|
+
};
|
|
292
|
+
//#endregion User.name
|
|
293
|
+
exports.userCombinedCreate = {
|
|
294
|
+
ruleId: 'user.combinedCreate',
|
|
295
|
+
currentDataConditions: [
|
|
296
|
+
{ targettedProperty: 'user.firstName', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.UNDEFINED, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
297
|
+
{ targettedProperty: 'user.lastName', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.UNDEFINED, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
298
|
+
{ targettedProperty: 'user.age', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.UNDEFINED, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, }
|
|
299
|
+
],
|
|
300
|
+
proposedDataConditions: [
|
|
301
|
+
{ targettedProperty: 'user.firstName', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.STRING, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
302
|
+
{ targettedProperty: 'user.lastName', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.STRING, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
303
|
+
{ targettedProperty: 'user.age', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.NUMBER, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
304
|
+
{ targettedProperty: 'user.age', conditionType: generic_1.ConditionTypeRange.GREATER_THAN_OR_EQUAL, conditionValue: 0, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
305
|
+
],
|
|
306
|
+
targettedProperty: 'user'
|
|
307
|
+
};
|
|
308
|
+
exports.userCombinedUpdate = {
|
|
309
|
+
ruleId: 'user.combinedUpdate',
|
|
310
|
+
currentDataConditions: [
|
|
311
|
+
{ targettedProperty: 'user.firstName', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.STRING, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
312
|
+
{ targettedProperty: 'user.lastName', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.STRING, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
313
|
+
{ targettedProperty: 'user.age', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.NUMBER, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
314
|
+
{ targettedProperty: 'user.age', conditionType: generic_1.ConditionTypeRange.GREATER_THAN_OR_EQUAL, conditionValue: 0, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
315
|
+
],
|
|
316
|
+
proposedDataConditions: [
|
|
317
|
+
{ targettedProperty: 'user.firstName', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.STRING, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
318
|
+
{ targettedProperty: 'user.lastName', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.STRING, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
319
|
+
{ targettedProperty: 'user.age', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.NUMBER, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
320
|
+
{ targettedProperty: 'user.age', conditionType: generic_1.ConditionTypeRange.GREATER_THAN_OR_EQUAL, conditionValue: 18, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
321
|
+
],
|
|
322
|
+
targettedProperty: 'user'
|
|
323
|
+
};
|
|
324
|
+
exports.userCombinedDelete = {
|
|
325
|
+
ruleId: 'user.combinedDelete',
|
|
326
|
+
currentDataConditions: [
|
|
327
|
+
{ targettedProperty: 'user.firstName', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.STRING, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
328
|
+
{ targettedProperty: 'user.lastName', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.STRING, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
329
|
+
{ targettedProperty: 'user.age', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.NUMBER, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
330
|
+
{ targettedProperty: 'user.age', conditionType: generic_1.ConditionTypeRange.GREATER_THAN_OR_EQUAL, conditionValue: 0, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
331
|
+
],
|
|
332
|
+
proposedDataConditions: [
|
|
333
|
+
{ targettedProperty: 'user.firstName', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.UNDEFINED, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
334
|
+
{ targettedProperty: 'user.lastName', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.UNDEFINED, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
335
|
+
{ targettedProperty: 'user.age', conditionType: generic_1.ConditionTypeSingle.TYPEOF, conditionValue: generic_1.ConditionTypeOf.UNDEFINED, conditionTypeQualifier: generic_1.ConditionTypeQualifier.IS, },
|
|
336
|
+
],
|
|
337
|
+
targettedProperty: 'user'
|
|
338
|
+
};
|
|
339
|
+
//#endregion User
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ConditionTypeBoolean, ConditionTypeQualifier, IConditionBoolean } from '@degenerate/generic';
|
|
2
|
+
/**
|
|
3
|
+
* This creates the boolean conditions for the share data rules
|
|
4
|
+
*
|
|
5
|
+
* @param targettedProperty the property to target
|
|
6
|
+
* @param conditionType the condition type
|
|
7
|
+
* @param conditionTypeQualifier the condition type qualifier
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
declare const createBooleanConditions: (targettedProperty: string, conditionType: ConditionTypeBoolean, conditionTypeQualifier?: ConditionTypeQualifier) => IConditionBoolean;
|
|
11
|
+
export { createBooleanConditions };
|
|
12
|
+
//# sourceMappingURL=create-boolean-conditions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-boolean-conditions.d.ts","sourceRoot":"","sources":["../../../src/create/conditions/create-boolean-conditions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAEtG;;;;;;;GAOG;AACH,QAAA,MAAM,uBAAuB,sBACN,MAAM,iBACV,oBAAoB,2BACX,sBAAsB,KAC/C,iBAMF,CAAC;AAEF,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createBooleanConditions = void 0;
|
|
4
|
+
const generic_1 = require("@degenerate/generic");
|
|
5
|
+
/**
|
|
6
|
+
* This creates the boolean conditions for the share data rules
|
|
7
|
+
*
|
|
8
|
+
* @param targettedProperty the property to target
|
|
9
|
+
* @param conditionType the condition type
|
|
10
|
+
* @param conditionTypeQualifier the condition type qualifier
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
const createBooleanConditions = (targettedProperty, conditionType, conditionTypeQualifier = generic_1.ConditionTypeQualifier.IS) => {
|
|
14
|
+
return {
|
|
15
|
+
conditionType,
|
|
16
|
+
conditionTypeQualifier,
|
|
17
|
+
targettedProperty,
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
exports.createBooleanConditions = createBooleanConditions;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ConditionTypeQualifier, IConditionContains } from '@degenerate/generic';
|
|
2
|
+
/**
|
|
3
|
+
* This creates the contains conditions for the share data rules
|
|
4
|
+
*
|
|
5
|
+
* @param targettedProperty the property to target
|
|
6
|
+
* @param conditionValue the condition value
|
|
7
|
+
* @param conditionTypeQualifier (optional) the condition type qualifier
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
declare const createContainsConditions: (targettedProperty: string, conditionValue: string | string[] | number[], conditionTypeQualifier?: ConditionTypeQualifier) => IConditionContains;
|
|
11
|
+
export { createContainsConditions };
|
|
12
|
+
//# sourceMappingURL=create-contains-conditions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-contains-conditions.d.ts","sourceRoot":"","sources":["../../../src/create/conditions/create-contains-conditions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAuB,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEtG;;;;;;;GAOG;AACH,QAAA,MAAM,wBAAwB,sBACP,MAAM,kBACT,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,2BACpB,sBAAsB,KAC/C,kBAOF,CAAC;AAEF,OAAO,EAAE,wBAAwB,EAAE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createContainsConditions = void 0;
|
|
4
|
+
const generic_1 = require("@degenerate/generic");
|
|
5
|
+
/**
|
|
6
|
+
* This creates the contains conditions for the share data rules
|
|
7
|
+
*
|
|
8
|
+
* @param targettedProperty the property to target
|
|
9
|
+
* @param conditionValue the condition value
|
|
10
|
+
* @param conditionTypeQualifier (optional) the condition type qualifier
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
const createContainsConditions = (targettedProperty, conditionValue, conditionTypeQualifier = generic_1.ConditionTypeQualifier.IS) => {
|
|
14
|
+
return {
|
|
15
|
+
conditionTypeQualifier,
|
|
16
|
+
conditionValue,
|
|
17
|
+
conditionType: generic_1.ConditionTypeSingle.CONTAINS,
|
|
18
|
+
targettedProperty,
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
exports.createContainsConditions = createContainsConditions;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ConditionTypeQualifier, IConditionEmpty } from '@degenerate/generic';
|
|
2
|
+
/**
|
|
3
|
+
* This creates the empty conditions for the share data rules
|
|
4
|
+
*
|
|
5
|
+
* @param targettedProperty the property to target
|
|
6
|
+
* @param conditionTypeQualifier the condition type qualifier
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
declare const createEmptyConditions: (targettedProperty: string, conditionTypeQualifier?: ConditionTypeQualifier) => IConditionEmpty;
|
|
10
|
+
export { createEmptyConditions };
|
|
11
|
+
//# sourceMappingURL=create-empty-conditions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-empty-conditions.d.ts","sourceRoot":"","sources":["../../../src/create/conditions/create-empty-conditions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAuB,eAAe,EAAG,MAAM,qBAAqB,CAAC;AAEpG;;;;;;GAMG;AACH,QAAA,MAAM,qBAAqB,sBACJ,MAAM,2BACD,sBAAsB,KAC/C,eAMF,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createEmptyConditions = void 0;
|
|
4
|
+
const generic_1 = require("@degenerate/generic");
|
|
5
|
+
/**
|
|
6
|
+
* This creates the empty conditions for the share data rules
|
|
7
|
+
*
|
|
8
|
+
* @param targettedProperty the property to target
|
|
9
|
+
* @param conditionTypeQualifier the condition type qualifier
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
const createEmptyConditions = (targettedProperty, conditionTypeQualifier = generic_1.ConditionTypeQualifier.IS) => {
|
|
13
|
+
return {
|
|
14
|
+
targettedProperty,
|
|
15
|
+
conditionType: generic_1.ConditionTypeSingle.EMPTY,
|
|
16
|
+
conditionTypeQualifier,
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
exports.createEmptyConditions = createEmptyConditions;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ConditionTypeQualifier, IConditionEquality } from '@degenerate/generic';
|
|
2
|
+
/**
|
|
3
|
+
* This creates the equality conditions for the share data rules
|
|
4
|
+
*
|
|
5
|
+
* @param targettedProperty the property to target
|
|
6
|
+
* @param conditionType the condition type
|
|
7
|
+
* @param conditionValue the value to compare
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
declare const createEqualityConditions: (targettedProperty: string, conditionValue: number | string, conditionTypeQualifier?: ConditionTypeQualifier) => IConditionEquality;
|
|
11
|
+
export { createEqualityConditions };
|
|
12
|
+
//# sourceMappingURL=create-equality-conditions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-equality-conditions.d.ts","sourceRoot":"","sources":["../../../src/create/conditions/create-equality-conditions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAuB,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEtG;;;;;;;GAOG;AACH,QAAA,MAAM,wBAAwB,sBACP,MAAM,kBACT,MAAM,GAAG,MAAM,2BACP,sBAAsB,KAC/C,kBAOF,CAAC;AAEF,OAAO,EAAE,wBAAwB,EAAE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createEqualityConditions = void 0;
|
|
4
|
+
const generic_1 = require("@degenerate/generic");
|
|
5
|
+
/**
|
|
6
|
+
* This creates the equality conditions for the share data rules
|
|
7
|
+
*
|
|
8
|
+
* @param targettedProperty the property to target
|
|
9
|
+
* @param conditionType the condition type
|
|
10
|
+
* @param conditionValue the value to compare
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
const createEqualityConditions = (targettedProperty, conditionValue, conditionTypeQualifier = generic_1.ConditionTypeQualifier.IS) => {
|
|
14
|
+
return {
|
|
15
|
+
targettedProperty,
|
|
16
|
+
conditionValue,
|
|
17
|
+
conditionType: generic_1.ConditionTypeSingle.EQUAL,
|
|
18
|
+
conditionTypeQualifier,
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
exports.createEqualityConditions = createEqualityConditions;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ConditionTypeQualifier, IConditionNull } from '@degenerate/generic';
|
|
2
|
+
/**
|
|
3
|
+
* This function creates a null condition for the sharedata rules engine.
|
|
4
|
+
*
|
|
5
|
+
* @param targettedProperty the property to check
|
|
6
|
+
* @param conditionTypeQualifier the condition type qualifier
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
declare const createNullConditions: (targettedProperty: string, conditionTypeQualifier?: ConditionTypeQualifier) => IConditionNull;
|
|
10
|
+
export { createNullConditions };
|
|
11
|
+
//# sourceMappingURL=create-null-conditions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-null-conditions.d.ts","sourceRoot":"","sources":["../../../src/create/conditions/create-null-conditions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAuB,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAElG;;;;;;GAMG;AACH,QAAA,MAAM,oBAAoB,sBACH,MAAM,2BACD,sBAAsB,KAC/C,cAMF,CAAA;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createNullConditions = void 0;
|
|
4
|
+
const generic_1 = require("@degenerate/generic");
|
|
5
|
+
/**
|
|
6
|
+
* This function creates a null condition for the sharedata rules engine.
|
|
7
|
+
*
|
|
8
|
+
* @param targettedProperty the property to check
|
|
9
|
+
* @param conditionTypeQualifier the condition type qualifier
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
const createNullConditions = (targettedProperty, conditionTypeQualifier = generic_1.ConditionTypeQualifier.IS) => {
|
|
13
|
+
return {
|
|
14
|
+
targettedProperty,
|
|
15
|
+
conditionType: generic_1.ConditionTypeSingle.NULL,
|
|
16
|
+
conditionTypeQualifier,
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
exports.createNullConditions = createNullConditions;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ConditionTypeQualifier, ConditionTypeRange, IConditionRange } from '@degenerate/generic';
|
|
2
|
+
/**
|
|
3
|
+
* This function creates a range condition for the sharedata rules engine.
|
|
4
|
+
*
|
|
5
|
+
* @param targettedProperty the property to check
|
|
6
|
+
* @param conditionType the type of range condition
|
|
7
|
+
* @param conditionValue the value to check against
|
|
8
|
+
* @param conditionTypeQualifier the condition type qualifier
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
declare const createRangeConditions: (targettedProperty: string, conditionType: ConditionTypeRange, conditionValue: string | number, conditionTypeQualifier?: ConditionTypeQualifier) => IConditionRange;
|
|
12
|
+
export { createRangeConditions };
|
|
13
|
+
//# sourceMappingURL=create-range-conditions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-range-conditions.d.ts","sourceRoot":"","sources":["../../../src/create/conditions/create-range-conditions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAElG;;;;;;;;GAQG;AACH,QAAA,MAAM,qBAAqB,sBACJ,MAAM,iBACV,kBAAkB,kBACjB,MAAM,GAAG,MAAM,2BACP,sBAAsB,KAC/C,eAOF,CAAA;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createRangeConditions = void 0;
|
|
4
|
+
const generic_1 = require("@degenerate/generic");
|
|
5
|
+
/**
|
|
6
|
+
* This function creates a range condition for the sharedata rules engine.
|
|
7
|
+
*
|
|
8
|
+
* @param targettedProperty the property to check
|
|
9
|
+
* @param conditionType the type of range condition
|
|
10
|
+
* @param conditionValue the value to check against
|
|
11
|
+
* @param conditionTypeQualifier the condition type qualifier
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
const createRangeConditions = (targettedProperty, conditionType, conditionValue, conditionTypeQualifier = generic_1.ConditionTypeQualifier.IS) => {
|
|
15
|
+
return {
|
|
16
|
+
targettedProperty,
|
|
17
|
+
conditionType,
|
|
18
|
+
conditionValue,
|
|
19
|
+
conditionTypeQualifier,
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
exports.createRangeConditions = createRangeConditions;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ConditionTypeQualifier, ConditionTypeSpecial, IConditionSpecial } from '@degenerate/generic';
|
|
2
|
+
/**
|
|
3
|
+
* This creates the special conditions for the share data rules
|
|
4
|
+
* @param targettedProperty the property to target
|
|
5
|
+
* @param conditionType the condition type
|
|
6
|
+
* @param conditionValue the value to compare
|
|
7
|
+
* @param conditionTypeQualifier the condition type qualifier
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
declare const createSpecialConditions: (targettedProperty: string, conditionType: ConditionTypeSpecial, conditionValue: string, conditionTypeQualifier?: ConditionTypeQualifier) => IConditionSpecial;
|
|
11
|
+
export { createSpecialConditions };
|
|
12
|
+
//# sourceMappingURL=create-special-conditions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-special-conditions.d.ts","sourceRoot":"","sources":["../../../src/create/conditions/create-special-conditions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAEtG;;;;;;;GAOG;AACH,QAAA,MAAM,uBAAuB,sBACN,MAAM,iBACV,oBAAoB,kBACnB,MAAM,2BACE,sBAAsB,KAC/C,iBAOF,CAAC;AAEF,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createSpecialConditions = void 0;
|
|
4
|
+
const generic_1 = require("@degenerate/generic");
|
|
5
|
+
/**
|
|
6
|
+
* This creates the special conditions for the share data rules
|
|
7
|
+
* @param targettedProperty the property to target
|
|
8
|
+
* @param conditionType the condition type
|
|
9
|
+
* @param conditionValue the value to compare
|
|
10
|
+
* @param conditionTypeQualifier the condition type qualifier
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
const createSpecialConditions = (targettedProperty, conditionType, conditionValue, conditionTypeQualifier = generic_1.ConditionTypeQualifier.IS) => {
|
|
14
|
+
return {
|
|
15
|
+
targettedProperty,
|
|
16
|
+
conditionType,
|
|
17
|
+
conditionValue,
|
|
18
|
+
conditionTypeQualifier,
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
exports.createSpecialConditions = createSpecialConditions;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ConditionTypeQualifier, ConditionTypeStartsEndsWith, IConditionStartsEndsWith } from '@degenerate/generic';
|
|
2
|
+
/**
|
|
3
|
+
* This creates the starts with or ends with conditions for the share data rules
|
|
4
|
+
*
|
|
5
|
+
* @param targettedProperty the property to target
|
|
6
|
+
* @param conditionType the condition type
|
|
7
|
+
* @param conditionValue the value to check against
|
|
8
|
+
* @param conditionTypeQualifier the condition type qualifier
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
declare const createStartsEndsWithConditions: (targettedProperty: string, conditionType: ConditionTypeStartsEndsWith, conditionValue: string, conditionTypeQualifier?: ConditionTypeQualifier) => IConditionStartsEndsWith;
|
|
12
|
+
export { createStartsEndsWithConditions };
|
|
13
|
+
//# sourceMappingURL=create-starts-end-with-conditions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-starts-end-with-conditions.d.ts","sourceRoot":"","sources":["../../../src/create/conditions/create-starts-end-with-conditions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,2BAA2B,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAEpH;;;;;;;;GAQG;AACH,QAAA,MAAM,8BAA8B,sBACb,MAAM,iBACV,2BAA2B,kBAC1B,MAAM,2BACE,sBAAsB,KAC/C,wBAOF,CAAC;AAEF,OAAO,EAAE,8BAA8B,EAAE,CAAC"}
|