@genesislcap/mock-server 15.74.0 → 15.76.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +296 -58
- package/dist/db/schema.d.ts +9 -1
- package/dist/db/schema.js +40 -11
- package/dist/db/store.d.ts +1 -0
- package/dist/db/store.js +4 -0
- package/dist/handlers/auth.d.ts +15 -6
- package/dist/handlers/auth.js +152 -33
- package/dist/handlers/commitEvent.js +43 -20
- package/dist/handlers/crudEvents.d.ts +3 -1
- package/dist/handlers/crudEvents.js +3 -2
- package/dist/handlers/eventValidation.js +6 -3
- package/dist/handlers/http.d.ts +2 -2
- package/dist/handlers/http.js +66 -43
- package/dist/handlers/jsonSchema.d.ts +1 -0
- package/dist/handlers/jsonSchema.js +72 -21
- package/dist/handlers/meta.d.ts +1 -1
- package/dist/handlers/meta.js +59 -10
- package/dist/handlers/requestReply.js +36 -9
- package/dist/index.d.ts +1 -1
- package/dist/presets/auth.d.ts +25 -0
- package/dist/presets/auth.js +855 -0
- package/dist/presets/cronExpression.d.ts +1 -0
- package/dist/presets/cronExpression.js +429 -0
- package/dist/presets/fileServer.d.ts +13 -0
- package/dist/presets/fileServer.js +399 -0
- package/dist/presets/gsf.d.ts +24 -0
- package/dist/presets/gsf.js +450 -0
- package/dist/presets/index.d.ts +1 -0
- package/dist/presets/index.js +1 -0
- package/dist/presets/javaTime.d.ts +7 -0
- package/dist/presets/javaTime.js +322 -0
- package/dist/presets/multipart.d.ts +14 -0
- package/dist/presets/multipart.js +91 -0
- package/dist/presets/notify.d.ts +27 -0
- package/dist/presets/notify.js +250 -0
- package/dist/presets/notifyDispatch.d.ts +28 -0
- package/dist/presets/notifyDispatch.js +570 -0
- package/dist/presets/notifyRules.d.ts +9 -0
- package/dist/presets/notifyRules.js +754 -0
- package/dist/presets/platform/backing.json +8058 -217
- package/dist/presets/platform/criteria-model.json +362 -0
- package/dist/presets/platform/time-zones.json +608 -0
- package/dist/presets/platform.d.ts +7 -0
- package/dist/presets/platform.js +145 -103
- package/dist/presets/products.d.ts +9 -7
- package/dist/presets/products.js +89 -21
- package/dist/presets/reconciliation.d.ts +18 -0
- package/dist/presets/reconciliation.js +721 -0
- package/dist/presets/reporting.d.ts +14 -0
- package/dist/presets/reporting.js +862 -0
- package/dist/protocol/connection.d.ts +2 -0
- package/dist/protocol/connection.js +4 -0
- package/dist/protocol/dtoTypes.d.ts +30 -0
- package/dist/protocol/dtoTypes.js +250 -0
- package/dist/protocol/errors.d.ts +3 -1
- package/dist/protocol/errors.js +2 -0
- package/dist/protocol/fieldTypes.js +5 -0
- package/dist/protocol/router.d.ts +1 -0
- package/dist/protocol/router.js +3 -3
- package/dist/protocol/schemaValidation.d.ts +1 -1
- package/dist/protocol/schemaValidation.js +53 -8
- package/dist/server.js +34 -2
- package/dist/types.d.ts +50 -2
- package/package.json +1 -1
- package/src/db/schema.ts +56 -13
- package/src/db/store.ts +5 -0
- package/src/handlers/auth.ts +211 -37
- package/src/handlers/commitEvent.ts +44 -19
- package/src/handlers/crudEvents.ts +9 -2
- package/src/handlers/eventValidation.ts +6 -3
- package/src/handlers/http.ts +83 -42
- package/src/handlers/jsonSchema.ts +86 -23
- package/src/handlers/meta.ts +77 -9
- package/src/handlers/requestReply.ts +42 -6
- package/src/index.ts +7 -0
- package/src/presets/auth.ts +961 -0
- package/src/presets/cronExpression.ts +445 -0
- package/src/presets/fileServer.ts +475 -0
- package/src/presets/gsf.ts +475 -0
- package/src/presets/index.ts +5 -0
- package/src/presets/javaTime.ts +354 -0
- package/src/presets/multipart.ts +110 -0
- package/src/presets/notify.ts +312 -0
- package/src/presets/notifyDispatch.ts +685 -0
- package/src/presets/notifyRules.ts +866 -0
- package/src/presets/platform/backing.json +8058 -217
- package/src/presets/platform/criteria-model.json +362 -0
- package/src/presets/platform/time-zones.json +608 -0
- package/src/presets/platform.ts +204 -115
- package/src/presets/products.ts +125 -19
- package/src/presets/reconciliation.ts +824 -0
- package/src/presets/reporting.ts +953 -0
- package/src/protocol/connection.ts +4 -0
- package/src/protocol/dtoTypes.ts +310 -0
- package/src/protocol/errors.ts +13 -1
- package/src/protocol/fieldTypes.ts +5 -0
- package/src/protocol/router.ts +3 -3
- package/src/protocol/schemaValidation.ts +61 -8
- package/src/server.ts +38 -2
- package/src/types.ts +147 -3
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
{
|
|
2
|
+
"RULE_EXPRESSION": {
|
|
3
|
+
"oneOf": [
|
|
4
|
+
{
|
|
5
|
+
"$ref": "#/$defs/global.genesis.criteria.model.RuleExpression"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"type": "null"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"RESULT_EXPRESSION": {
|
|
13
|
+
"$ref": "#/$defs/global.genesis.criteria.model.ResultExpression"
|
|
14
|
+
},
|
|
15
|
+
"$defs": {
|
|
16
|
+
"global.genesis.criteria.model.ResultExpression": {
|
|
17
|
+
"properties": {
|
|
18
|
+
"ASSIGNMENTS": {
|
|
19
|
+
"items": {
|
|
20
|
+
"$ref": "#/$defs/global.genesis.criteria.model.Assignment"
|
|
21
|
+
},
|
|
22
|
+
"uniqueItems": false,
|
|
23
|
+
"readOnly": false,
|
|
24
|
+
"description": "kotlin.collections.List",
|
|
25
|
+
"type": "array"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"required": ["ASSIGNMENTS"],
|
|
29
|
+
"description": "global.genesis.criteria.model.ResultExpression",
|
|
30
|
+
"type": "object"
|
|
31
|
+
},
|
|
32
|
+
"global.genesis.criteria.model.Assignment": {
|
|
33
|
+
"properties": {
|
|
34
|
+
"FIELD": {
|
|
35
|
+
"$ref": "#/$defs/global.genesis.criteria.model.Expression.SingleExpression.Field"
|
|
36
|
+
},
|
|
37
|
+
"VALUE": {
|
|
38
|
+
"$ref": "#/$defs/global.genesis.criteria.model.Expression"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"required": ["FIELD", "VALUE"],
|
|
42
|
+
"description": "global.genesis.criteria.model.Assignment",
|
|
43
|
+
"type": "object"
|
|
44
|
+
},
|
|
45
|
+
"global.genesis.criteria.model.Expression.SingleExpression.Field": {
|
|
46
|
+
"properties": {
|
|
47
|
+
"NAME": {
|
|
48
|
+
"readOnly": false,
|
|
49
|
+
"description": "kotlin.String",
|
|
50
|
+
"type": "string"
|
|
51
|
+
},
|
|
52
|
+
"TYPE": {
|
|
53
|
+
"readOnly": false,
|
|
54
|
+
"const": "FIELD",
|
|
55
|
+
"description": "kotlin.String",
|
|
56
|
+
"type": "string"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"required": ["NAME"],
|
|
60
|
+
"description": "global.genesis.criteria.model.Expression.SingleExpression.Field",
|
|
61
|
+
"type": "object"
|
|
62
|
+
},
|
|
63
|
+
"global.genesis.criteria.model.Expression": {
|
|
64
|
+
"oneOf": [
|
|
65
|
+
{
|
|
66
|
+
"$ref": "#/$defs/global.genesis.criteria.model.Expression.BinaryExpression"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"$ref": "#/$defs/global.genesis.criteria.model.Expression.MethodExpression"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"$ref": "#/$defs/global.genesis.criteria.model.Expression.PredicateExpression"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"$ref": "#/$defs/global.genesis.criteria.model.Expression.SingleExpression.BooleanValue"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"$ref": "#/$defs/global.genesis.criteria.model.Expression.SingleExpression.Field"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"$ref": "#/$defs/global.genesis.criteria.model.Expression.SingleExpression.NullValue"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"$ref": "#/$defs/global.genesis.criteria.model.Expression.SingleExpression.NumericValue"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"$ref": "#/$defs/global.genesis.criteria.model.Expression.SingleExpression.PlaceHolder"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"$ref": "#/$defs/global.genesis.criteria.model.Expression.SingleExpression.StringValue"
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"description": "global.genesis.criteria.model.Expression"
|
|
94
|
+
},
|
|
95
|
+
"global.genesis.criteria.model.Expression.BinaryExpression": {
|
|
96
|
+
"properties": {
|
|
97
|
+
"LEFT": {
|
|
98
|
+
"$ref": "#/$defs/global.genesis.criteria.model.Expression"
|
|
99
|
+
},
|
|
100
|
+
"OPERATION": {
|
|
101
|
+
"readOnly": false,
|
|
102
|
+
"enum": [
|
|
103
|
+
"GREATER_THAN",
|
|
104
|
+
"LESS_THAN",
|
|
105
|
+
"GREATER_THAN_OR_EQUAL",
|
|
106
|
+
"LESS_THAN_OR_EQUAL",
|
|
107
|
+
"EQUALS",
|
|
108
|
+
"NOT_EQUALS",
|
|
109
|
+
"AND",
|
|
110
|
+
"OR",
|
|
111
|
+
"PLUS",
|
|
112
|
+
"MINUS",
|
|
113
|
+
"MULTIPLY",
|
|
114
|
+
"DIVIDE",
|
|
115
|
+
"BITWISE_AND",
|
|
116
|
+
"BITWISE_OR",
|
|
117
|
+
"ASSIGNMENT"
|
|
118
|
+
],
|
|
119
|
+
"description": "global.genesis.criteria.model.Operation",
|
|
120
|
+
"type": "string"
|
|
121
|
+
},
|
|
122
|
+
"RIGHT": {
|
|
123
|
+
"$ref": "#/$defs/global.genesis.criteria.model.Expression"
|
|
124
|
+
},
|
|
125
|
+
"TYPE": {
|
|
126
|
+
"readOnly": false,
|
|
127
|
+
"const": "BINARY_EXPRESSION",
|
|
128
|
+
"description": "kotlin.String",
|
|
129
|
+
"type": "string"
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"required": ["LEFT", "OPERATION", "RIGHT"],
|
|
133
|
+
"description": "global.genesis.criteria.model.Expression.BinaryExpression",
|
|
134
|
+
"type": "object"
|
|
135
|
+
},
|
|
136
|
+
"global.genesis.criteria.model.Expression.MethodExpression": {
|
|
137
|
+
"properties": {
|
|
138
|
+
"METHOD": {
|
|
139
|
+
"readOnly": false,
|
|
140
|
+
"enum": [
|
|
141
|
+
"CONTAINS_IGNORE_CASE",
|
|
142
|
+
"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE",
|
|
143
|
+
"IS_NULL_OR_BLANK",
|
|
144
|
+
"NOT_NULL_OR_BLANK",
|
|
145
|
+
"LONG_TO_DATE",
|
|
146
|
+
"LONG_TO_DATE_TIME",
|
|
147
|
+
"DATE_TIME_IS_IN_RANGE"
|
|
148
|
+
],
|
|
149
|
+
"description": "global.genesis.criteria.model.MethodCall",
|
|
150
|
+
"type": "string"
|
|
151
|
+
},
|
|
152
|
+
"PARAMETERS": {
|
|
153
|
+
"items": {
|
|
154
|
+
"$ref": "#/$defs/global.genesis.criteria.model.Expression.SingleExpression"
|
|
155
|
+
},
|
|
156
|
+
"uniqueItems": false,
|
|
157
|
+
"readOnly": false,
|
|
158
|
+
"description": "kotlin.collections.List",
|
|
159
|
+
"type": "array"
|
|
160
|
+
},
|
|
161
|
+
"TYPE": {
|
|
162
|
+
"readOnly": false,
|
|
163
|
+
"const": "METHOD_EXPRESSION",
|
|
164
|
+
"description": "kotlin.String",
|
|
165
|
+
"type": "string"
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"required": ["METHOD", "PARAMETERS"],
|
|
169
|
+
"description": "global.genesis.criteria.model.Expression.MethodExpression",
|
|
170
|
+
"type": "object"
|
|
171
|
+
},
|
|
172
|
+
"global.genesis.criteria.model.Expression.SingleExpression": {
|
|
173
|
+
"oneOf": [
|
|
174
|
+
{
|
|
175
|
+
"$ref": "#/$defs/global.genesis.criteria.model.Expression.SingleExpression.BooleanValue"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"$ref": "#/$defs/global.genesis.criteria.model.Expression.SingleExpression.Field"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"$ref": "#/$defs/global.genesis.criteria.model.Expression.SingleExpression.NullValue"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"$ref": "#/$defs/global.genesis.criteria.model.Expression.SingleExpression.NumericValue"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"$ref": "#/$defs/global.genesis.criteria.model.Expression.SingleExpression.PlaceHolder"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"$ref": "#/$defs/global.genesis.criteria.model.Expression.SingleExpression.StringValue"
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
"description": "global.genesis.criteria.model.Expression.SingleExpression"
|
|
194
|
+
},
|
|
195
|
+
"global.genesis.criteria.model.Expression.SingleExpression.BooleanValue": {
|
|
196
|
+
"properties": {
|
|
197
|
+
"TYPE": {
|
|
198
|
+
"readOnly": false,
|
|
199
|
+
"const": "BOOLEAN",
|
|
200
|
+
"description": "kotlin.String",
|
|
201
|
+
"type": "string"
|
|
202
|
+
},
|
|
203
|
+
"VALUE": {
|
|
204
|
+
"readOnly": false,
|
|
205
|
+
"description": "kotlin.Boolean",
|
|
206
|
+
"type": "boolean"
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"required": ["VALUE"],
|
|
210
|
+
"description": "global.genesis.criteria.model.Expression.SingleExpression.BooleanValue",
|
|
211
|
+
"type": "object"
|
|
212
|
+
},
|
|
213
|
+
"global.genesis.criteria.model.Expression.SingleExpression.NullValue": {
|
|
214
|
+
"properties": {
|
|
215
|
+
"TYPE": {
|
|
216
|
+
"readOnly": false,
|
|
217
|
+
"const": "NULL",
|
|
218
|
+
"description": "kotlin.String",
|
|
219
|
+
"type": "string"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"required": [],
|
|
223
|
+
"description": "global.genesis.criteria.model.Expression.SingleExpression.NullValue",
|
|
224
|
+
"type": "object"
|
|
225
|
+
},
|
|
226
|
+
"global.genesis.criteria.model.Expression.SingleExpression.NumericValue": {
|
|
227
|
+
"properties": {
|
|
228
|
+
"TYPE": {
|
|
229
|
+
"readOnly": false,
|
|
230
|
+
"const": "NUMBER",
|
|
231
|
+
"description": "kotlin.String",
|
|
232
|
+
"type": "string"
|
|
233
|
+
},
|
|
234
|
+
"VALUE": {
|
|
235
|
+
"pattern": "[0-9]+(\\.[0-9]+)?",
|
|
236
|
+
"readOnly": false,
|
|
237
|
+
"description": "java.math.BigDecimal",
|
|
238
|
+
"type": "string"
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
"required": ["VALUE"],
|
|
242
|
+
"description": "global.genesis.criteria.model.Expression.SingleExpression.NumericValue",
|
|
243
|
+
"type": "object"
|
|
244
|
+
},
|
|
245
|
+
"global.genesis.criteria.model.Expression.SingleExpression.PlaceHolder": {
|
|
246
|
+
"properties": {
|
|
247
|
+
"KEY": {
|
|
248
|
+
"readOnly": false,
|
|
249
|
+
"description": "kotlin.String",
|
|
250
|
+
"type": "string"
|
|
251
|
+
},
|
|
252
|
+
"TYPE": {
|
|
253
|
+
"readOnly": false,
|
|
254
|
+
"const": "PLACEHOLDER",
|
|
255
|
+
"description": "kotlin.String",
|
|
256
|
+
"type": "string"
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
"required": ["KEY"],
|
|
260
|
+
"description": "global.genesis.criteria.model.Expression.SingleExpression.PlaceHolder",
|
|
261
|
+
"type": "object"
|
|
262
|
+
},
|
|
263
|
+
"global.genesis.criteria.model.Expression.SingleExpression.StringValue": {
|
|
264
|
+
"properties": {
|
|
265
|
+
"TYPE": {
|
|
266
|
+
"readOnly": false,
|
|
267
|
+
"const": "STRING",
|
|
268
|
+
"description": "kotlin.String",
|
|
269
|
+
"type": "string"
|
|
270
|
+
},
|
|
271
|
+
"VALUE": {
|
|
272
|
+
"readOnly": false,
|
|
273
|
+
"description": "kotlin.String",
|
|
274
|
+
"type": "string"
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
"required": ["VALUE"],
|
|
278
|
+
"description": "global.genesis.criteria.model.Expression.SingleExpression.StringValue",
|
|
279
|
+
"type": "object"
|
|
280
|
+
},
|
|
281
|
+
"global.genesis.criteria.model.Expression.PredicateExpression": {
|
|
282
|
+
"properties": {
|
|
283
|
+
"EXPRESSIONS": {
|
|
284
|
+
"items": {
|
|
285
|
+
"$ref": "#/$defs/global.genesis.criteria.model.Expression"
|
|
286
|
+
},
|
|
287
|
+
"uniqueItems": false,
|
|
288
|
+
"readOnly": false,
|
|
289
|
+
"description": "kotlin.collections.List",
|
|
290
|
+
"type": "array"
|
|
291
|
+
},
|
|
292
|
+
"OPERATION": {
|
|
293
|
+
"readOnly": false,
|
|
294
|
+
"enum": ["AND", "OR"],
|
|
295
|
+
"description": "global.genesis.criteria.model.LogicalOperation",
|
|
296
|
+
"default": "AND",
|
|
297
|
+
"type": "string"
|
|
298
|
+
},
|
|
299
|
+
"TYPE": {
|
|
300
|
+
"readOnly": false,
|
|
301
|
+
"const": "PREDICATE_EXPRESSION",
|
|
302
|
+
"description": "kotlin.String",
|
|
303
|
+
"type": "string"
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
"required": [],
|
|
307
|
+
"description": "global.genesis.criteria.model.Expression.PredicateExpression",
|
|
308
|
+
"type": "object"
|
|
309
|
+
},
|
|
310
|
+
"global.genesis.criteria.model.RuleExpression": {
|
|
311
|
+
"properties": {
|
|
312
|
+
"CONDITIONS": {
|
|
313
|
+
"items": {
|
|
314
|
+
"$ref": "#/$defs/global.genesis.criteria.model.Condition"
|
|
315
|
+
},
|
|
316
|
+
"uniqueItems": false,
|
|
317
|
+
"readOnly": false,
|
|
318
|
+
"description": "kotlin.collections.List",
|
|
319
|
+
"type": "array"
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
"required": ["CONDITIONS"],
|
|
323
|
+
"description": "global.genesis.criteria.model.RuleExpression",
|
|
324
|
+
"type": "object"
|
|
325
|
+
},
|
|
326
|
+
"global.genesis.criteria.model.Condition": {
|
|
327
|
+
"properties": {
|
|
328
|
+
"LEFT": {
|
|
329
|
+
"$ref": "#/$defs/global.genesis.criteria.model.Expression.SingleExpression"
|
|
330
|
+
},
|
|
331
|
+
"OPERATION": {
|
|
332
|
+
"readOnly": false,
|
|
333
|
+
"enum": [
|
|
334
|
+
"GREATER_THAN",
|
|
335
|
+
"LESS_THAN",
|
|
336
|
+
"GREATER_THAN_OR_EQUAL",
|
|
337
|
+
"LESS_THAN_OR_EQUAL",
|
|
338
|
+
"EQUALS",
|
|
339
|
+
"NOT_EQUALS",
|
|
340
|
+
"AND",
|
|
341
|
+
"OR",
|
|
342
|
+
"PLUS",
|
|
343
|
+
"MINUS",
|
|
344
|
+
"MULTIPLY",
|
|
345
|
+
"DIVIDE",
|
|
346
|
+
"BITWISE_AND",
|
|
347
|
+
"BITWISE_OR",
|
|
348
|
+
"ASSIGNMENT"
|
|
349
|
+
],
|
|
350
|
+
"description": "global.genesis.criteria.model.Operation",
|
|
351
|
+
"type": "string"
|
|
352
|
+
},
|
|
353
|
+
"RIGHT": {
|
|
354
|
+
"$ref": "#/$defs/global.genesis.criteria.model.Expression"
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
"required": ["LEFT", "OPERATION", "RIGHT"],
|
|
358
|
+
"description": "global.genesis.criteria.model.Condition",
|
|
359
|
+
"type": "object"
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}
|