@opencrvs/toolkit 2.0.0-rc.65195ed → 2.0.0-rc.654a81d
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/create-countryconfig/index.js +50 -20
- package/dist/commons/api/router.d.ts +29 -18
- package/dist/commons/conditionals/conditionals.d.ts +6 -0
- package/dist/commons/events/ActionInput.d.ts +36 -36
- package/dist/commons/events/Draft.d.ts +2 -3
- package/dist/commons/events/index.d.ts +2 -0
- package/dist/commons/events/state/flags.d.ts +16 -0
- package/dist/conditionals/index.js +4 -0
- package/dist/events/index.js +455 -33
- package/dist/notification/index.js +382 -5
- package/opencrvs-toolkit-2.0.0-rc.654a81d.tgz +0 -0
- package/package.json +2 -2
- package/opencrvs-toolkit-2.0.0-rc.65195ed.tgz +0 -0
|
@@ -8,7 +8,7 @@ export declare const BaseActionInput: z.ZodObject<{
|
|
|
8
8
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
9
9
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
10
10
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
-
waitFor: z.
|
|
11
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
12
12
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
13
13
|
}, z.core.$strip>;
|
|
14
14
|
export declare const RegisterActionInput: z.ZodObject<{
|
|
@@ -20,7 +20,7 @@ export declare const RegisterActionInput: z.ZodObject<{
|
|
|
20
20
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
21
21
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
22
22
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
23
|
-
waitFor: z.
|
|
23
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
24
24
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
25
25
|
type: z.ZodDefault<z.ZodLiteral<"REGISTER">>;
|
|
26
26
|
registrationNumber: z.ZodOptional<z.ZodString>;
|
|
@@ -35,7 +35,7 @@ export declare const NotifyActionInput: z.ZodObject<{
|
|
|
35
35
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
36
36
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
37
37
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
-
waitFor: z.
|
|
38
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
39
39
|
type: z.ZodDefault<z.ZodLiteral<"NOTIFY">>;
|
|
40
40
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
41
41
|
}, z.core.$strip>;
|
|
@@ -49,7 +49,7 @@ export declare const DeclareActionInput: z.ZodObject<{
|
|
|
49
49
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
50
50
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
51
51
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
52
|
-
waitFor: z.
|
|
52
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
53
53
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
54
54
|
type: z.ZodDefault<z.ZodLiteral<"DECLARE">>;
|
|
55
55
|
}, z.core.$strip>;
|
|
@@ -62,7 +62,7 @@ export declare const EditActionInput: z.ZodObject<{
|
|
|
62
62
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
63
63
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
64
64
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
65
|
-
waitFor: z.
|
|
65
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
66
66
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
67
67
|
type: z.ZodDefault<z.ZodLiteral<"EDIT">>;
|
|
68
68
|
content: z.ZodObject<{
|
|
@@ -79,7 +79,7 @@ export declare const PrintCertificateActionInput: z.ZodObject<{
|
|
|
79
79
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
80
80
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
81
81
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
82
|
-
waitFor: z.
|
|
82
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
83
83
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
84
84
|
type: z.ZodDefault<z.ZodLiteral<"PRINT_CERTIFICATE">>;
|
|
85
85
|
content: z.ZodOptional<z.ZodObject<{
|
|
@@ -96,7 +96,7 @@ export declare const RejectDeclarationActionInput: z.ZodObject<{
|
|
|
96
96
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
97
97
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
98
98
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
99
|
-
waitFor: z.
|
|
99
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
100
100
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
101
101
|
type: z.ZodDefault<z.ZodLiteral<"REJECT">>;
|
|
102
102
|
content: z.ZodObject<{
|
|
@@ -113,7 +113,7 @@ export declare const DuplicateDetectedActionInput: z.ZodObject<{
|
|
|
113
113
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
114
114
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
115
115
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
116
|
-
waitFor: z.
|
|
116
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
117
117
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
118
118
|
type: z.ZodDefault<z.ZodLiteral<"DUPLICATE_DETECTED">>;
|
|
119
119
|
content: z.ZodObject<{
|
|
@@ -132,7 +132,7 @@ export declare const MarkAsDuplicateActionInput: z.ZodObject<{
|
|
|
132
132
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
133
133
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
134
134
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
135
|
-
waitFor: z.
|
|
135
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
136
136
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
137
137
|
type: z.ZodDefault<z.ZodLiteral<"MARK_AS_DUPLICATE">>;
|
|
138
138
|
content: z.ZodOptional<z.ZodObject<{
|
|
@@ -149,7 +149,7 @@ export declare const MarkNotDuplicateActionInput: z.ZodObject<{
|
|
|
149
149
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
150
150
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
151
151
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
152
|
-
waitFor: z.
|
|
152
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
153
153
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
154
154
|
type: z.ZodDefault<z.ZodLiteral<"MARK_AS_NOT_DUPLICATE">>;
|
|
155
155
|
}, z.core.$strip>;
|
|
@@ -163,7 +163,7 @@ export declare const ArchiveActionInput: z.ZodObject<{
|
|
|
163
163
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
164
164
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
165
165
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
166
|
-
waitFor: z.
|
|
166
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
167
167
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
168
168
|
type: z.ZodDefault<z.ZodLiteral<"ARCHIVE">>;
|
|
169
169
|
content: z.ZodObject<{
|
|
@@ -180,7 +180,7 @@ export declare const AssignActionInput: z.ZodObject<{
|
|
|
180
180
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
181
181
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
182
182
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
183
|
-
waitFor: z.
|
|
183
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
184
184
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
185
185
|
type: z.ZodLiteral<"ASSIGN">;
|
|
186
186
|
assignedTo: z.ZodString;
|
|
@@ -195,7 +195,7 @@ export declare const UnassignActionInput: z.ZodObject<{
|
|
|
195
195
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
196
196
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
197
197
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
198
|
-
waitFor: z.
|
|
198
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
199
199
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
200
200
|
type: z.ZodDefault<z.ZodLiteral<"UNASSIGN">>;
|
|
201
201
|
assignedTo: z.ZodDefault<z.ZodLiteral<null>>;
|
|
@@ -210,7 +210,7 @@ export declare const RequestCorrectionActionInput: z.ZodObject<{
|
|
|
210
210
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
211
211
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
212
212
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
213
|
-
waitFor: z.
|
|
213
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
214
214
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
215
215
|
type: z.ZodDefault<z.ZodLiteral<"REQUEST_CORRECTION">>;
|
|
216
216
|
}, z.core.$strip>;
|
|
@@ -224,7 +224,7 @@ export declare const RejectCorrectionActionInput: z.ZodObject<{
|
|
|
224
224
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
225
225
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
226
226
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
227
|
-
waitFor: z.
|
|
227
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
228
228
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
229
229
|
requestId: z.ZodString;
|
|
230
230
|
type: z.ZodDefault<z.ZodLiteral<"REJECT_CORRECTION">>;
|
|
@@ -242,7 +242,7 @@ export declare const ApproveCorrectionActionInput: z.ZodObject<{
|
|
|
242
242
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
243
243
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
244
244
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
245
|
-
waitFor: z.
|
|
245
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
246
246
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
247
247
|
requestId: z.ZodString;
|
|
248
248
|
type: z.ZodDefault<z.ZodLiteral<"APPROVE_CORRECTION">>;
|
|
@@ -260,7 +260,7 @@ export declare const ReadActionInput: z.ZodObject<{
|
|
|
260
260
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
261
261
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
262
262
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
263
|
-
waitFor: z.
|
|
263
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
264
264
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
265
265
|
type: z.ZodDefault<z.ZodLiteral<"READ">>;
|
|
266
266
|
}, z.core.$strip>;
|
|
@@ -278,7 +278,7 @@ export declare const CustomActionInput: z.ZodObject<{
|
|
|
278
278
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
279
279
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
280
280
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
281
|
-
waitFor: z.
|
|
281
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
282
282
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
283
283
|
type: z.ZodDefault<z.ZodLiteral<"CUSTOM">>;
|
|
284
284
|
customActionType: z.ZodString;
|
|
@@ -301,7 +301,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
301
301
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
302
302
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
303
303
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
304
|
-
waitFor: z.
|
|
304
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
305
305
|
type: z.ZodDefault<z.ZodLiteral<"CREATE">>;
|
|
306
306
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
307
307
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -313,7 +313,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
313
313
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
314
314
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
315
315
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
316
|
-
waitFor: z.
|
|
316
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
317
317
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
318
318
|
type: z.ZodDefault<z.ZodLiteral<"REGISTER">>;
|
|
319
319
|
registrationNumber: z.ZodOptional<z.ZodString>;
|
|
@@ -326,7 +326,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
326
326
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
327
327
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
328
328
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
329
|
-
waitFor: z.
|
|
329
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
330
330
|
type: z.ZodDefault<z.ZodLiteral<"NOTIFY">>;
|
|
331
331
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
332
332
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -338,7 +338,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
338
338
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
339
339
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
340
340
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
341
|
-
waitFor: z.
|
|
341
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
342
342
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
343
343
|
type: z.ZodDefault<z.ZodLiteral<"DECLARE">>;
|
|
344
344
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -350,7 +350,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
350
350
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
351
351
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
352
352
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
353
|
-
waitFor: z.
|
|
353
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
354
354
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
355
355
|
type: z.ZodDefault<z.ZodLiteral<"REJECT">>;
|
|
356
356
|
content: z.ZodObject<{
|
|
@@ -365,7 +365,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
365
365
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
366
366
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
367
367
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
368
|
-
waitFor: z.
|
|
368
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
369
369
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
370
370
|
type: z.ZodDefault<z.ZodLiteral<"DUPLICATE_DETECTED">>;
|
|
371
371
|
content: z.ZodObject<{
|
|
@@ -383,7 +383,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
383
383
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
384
384
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
385
385
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
386
|
-
waitFor: z.
|
|
386
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
387
387
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
388
388
|
type: z.ZodDefault<z.ZodLiteral<"MARK_AS_DUPLICATE">>;
|
|
389
389
|
content: z.ZodOptional<z.ZodObject<{
|
|
@@ -398,7 +398,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
398
398
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
399
399
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
400
400
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
401
|
-
waitFor: z.
|
|
401
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
402
402
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
403
403
|
type: z.ZodDefault<z.ZodLiteral<"MARK_AS_NOT_DUPLICATE">>;
|
|
404
404
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -410,7 +410,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
410
410
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
411
411
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
412
412
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
413
|
-
waitFor: z.
|
|
413
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
414
414
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
415
415
|
type: z.ZodDefault<z.ZodLiteral<"ARCHIVE">>;
|
|
416
416
|
content: z.ZodObject<{
|
|
@@ -425,7 +425,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
425
425
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
426
426
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
427
427
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
428
|
-
waitFor: z.
|
|
428
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
429
429
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
430
430
|
type: z.ZodLiteral<"ASSIGN">;
|
|
431
431
|
assignedTo: z.ZodString;
|
|
@@ -438,7 +438,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
438
438
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
439
439
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
440
440
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
441
|
-
waitFor: z.
|
|
441
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
442
442
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
443
443
|
type: z.ZodDefault<z.ZodLiteral<"UNASSIGN">>;
|
|
444
444
|
assignedTo: z.ZodDefault<z.ZodLiteral<null>>;
|
|
@@ -451,7 +451,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
451
451
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
452
452
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
453
453
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
454
|
-
waitFor: z.
|
|
454
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
455
455
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
456
456
|
type: z.ZodDefault<z.ZodLiteral<"PRINT_CERTIFICATE">>;
|
|
457
457
|
content: z.ZodOptional<z.ZodObject<{
|
|
@@ -466,7 +466,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
466
466
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
467
467
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
468
468
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
469
|
-
waitFor: z.
|
|
469
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
470
470
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
471
471
|
type: z.ZodDefault<z.ZodLiteral<"REQUEST_CORRECTION">>;
|
|
472
472
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -478,7 +478,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
478
478
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
479
479
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
480
480
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
481
|
-
waitFor: z.
|
|
481
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
482
482
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
483
483
|
requestId: z.ZodString;
|
|
484
484
|
type: z.ZodDefault<z.ZodLiteral<"REJECT_CORRECTION">>;
|
|
@@ -494,7 +494,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
494
494
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
495
495
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
496
496
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
497
|
-
waitFor: z.
|
|
497
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
498
498
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
499
499
|
requestId: z.ZodString;
|
|
500
500
|
type: z.ZodDefault<z.ZodLiteral<"APPROVE_CORRECTION">>;
|
|
@@ -510,7 +510,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
510
510
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
511
511
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
512
512
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
513
|
-
waitFor: z.
|
|
513
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
514
514
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
515
515
|
type: z.ZodDefault<z.ZodLiteral<"READ">>;
|
|
516
516
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -522,7 +522,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
522
522
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
523
523
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
524
524
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
525
|
-
waitFor: z.
|
|
525
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
526
526
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
527
527
|
type: z.ZodDefault<z.ZodLiteral<"CUSTOM">>;
|
|
528
528
|
customActionType: z.ZodString;
|
|
@@ -535,7 +535,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
535
535
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
536
536
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
537
537
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
538
|
-
waitFor: z.
|
|
538
|
+
waitFor: z.ZodDefault<z.ZodBoolean>;
|
|
539
539
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
540
540
|
type: z.ZodDefault<z.ZodLiteral<"EDIT">>;
|
|
541
541
|
content: z.ZodObject<{
|
|
@@ -45,16 +45,15 @@ export declare const Draft: z.ZodObject<{
|
|
|
45
45
|
}, z.core.$strip>;
|
|
46
46
|
}, z.core.$strip>;
|
|
47
47
|
export declare const DraftInput: z.ZodObject<{
|
|
48
|
-
eventId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
49
48
|
transactionId: z.ZodString;
|
|
49
|
+
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
50
50
|
declaration: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
51
51
|
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
|
|
52
52
|
originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
53
|
+
eventId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
53
54
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
54
55
|
keepAssignmentIfAccepted: z.ZodOptional<z.ZodBoolean>;
|
|
55
56
|
keepAssignmentIfRejected: z.ZodOptional<z.ZodBoolean>;
|
|
56
|
-
waitFor: z.ZodOptional<z.ZodBoolean>;
|
|
57
|
-
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
58
57
|
type: z.ZodEnum<{
|
|
59
58
|
CUSTOM: "CUSTOM";
|
|
60
59
|
CREATE: "CREATE";
|
|
@@ -22,6 +22,7 @@ export * from './FieldValue';
|
|
|
22
22
|
export * from './FormConfig';
|
|
23
23
|
export * from './CompositeFieldValue';
|
|
24
24
|
export * from './state';
|
|
25
|
+
export * from './state/flags';
|
|
25
26
|
export * from './utils';
|
|
26
27
|
export * from './defineConfig';
|
|
27
28
|
export * from './DeduplicationConfig';
|
|
@@ -37,6 +38,7 @@ export * from './scopes';
|
|
|
37
38
|
export * from './serializer';
|
|
38
39
|
export * from './state/availableActions';
|
|
39
40
|
export * from './FileUtils';
|
|
41
|
+
export * from './mocks.test.utils';
|
|
40
42
|
export * from '../conditionals/conditionals';
|
|
41
43
|
export * from '../conditionals/validate';
|
|
42
44
|
export * from './field';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { Action, RequestedCorrectionAction } from '../ActionDocument';
|
|
1
2
|
import { Flag, CustomFlag } from '../Flag';
|
|
2
3
|
import { EventConfig } from '../EventConfig';
|
|
3
4
|
import { EventDocument } from '../EventDocument';
|
|
5
|
+
export declare function findPendingCorrectionAction(writeActions: Action[]): RequestedCorrectionAction | undefined;
|
|
6
|
+
export declare function isPotentialDuplicate(actions: Action[]): boolean;
|
|
4
7
|
/**
|
|
5
8
|
* This function resolves custom flags for an event based on its actions.
|
|
6
9
|
* Flags are not stored to the event state or any database directly, instead they are always computed/evaluated from the event actions.
|
|
@@ -18,5 +21,18 @@ import { EventDocument } from '../EventDocument';
|
|
|
18
21
|
* // Returns: ['flag-1', 'flag-3']
|
|
19
22
|
*/
|
|
20
23
|
export declare function resolveEventCustomFlags(event: EventDocument, eventConfiguration: EventConfig): CustomFlag[];
|
|
24
|
+
/**
|
|
25
|
+
* Computes all flags (inherent, action status, and custom) that should be attached to the given event,
|
|
26
|
+
* based on its actions and event-specific configuration.
|
|
27
|
+
*
|
|
28
|
+
* Flags are determined by combining:
|
|
29
|
+
* - Action status flags (format 'ActionType:ActionStatus')
|
|
30
|
+
* - Inherent flags (e.g. incomplete, rejected, correction requested, potential duplicate, edit in progress)
|
|
31
|
+
* - Event type-specific custom flags defined in the event configuration
|
|
32
|
+
*
|
|
33
|
+
* @param event - The EventDocument containing the action history and payload
|
|
34
|
+
* @param config - The EventConfig providing rules for custom flag evaluation
|
|
35
|
+
* @returns An array of flags currently relevant/applicable to the event
|
|
36
|
+
*/
|
|
21
37
|
export declare function getEventFlags(event: EventDocument, config: EventConfig): Flag[];
|
|
22
38
|
//# sourceMappingURL=flags.d.ts.map
|
|
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/conditionals/index.ts
|
|
31
31
|
var conditionals_exports = {};
|
|
32
32
|
__export(conditionals_exports, {
|
|
33
|
+
always: () => always,
|
|
33
34
|
alwaysTrue: () => alwaysTrue,
|
|
34
35
|
and: () => and,
|
|
35
36
|
createFieldConditionals: () => createFieldConditionals,
|
|
@@ -454,6 +455,9 @@ function not(condition) {
|
|
|
454
455
|
function never() {
|
|
455
456
|
return not(alwaysTrue());
|
|
456
457
|
}
|
|
458
|
+
function always() {
|
|
459
|
+
return defineConditional(alwaysTrue());
|
|
460
|
+
}
|
|
457
461
|
function jsonFieldPath(field) {
|
|
458
462
|
return [field.$$field, ...field.$$subfield].join("/");
|
|
459
463
|
}
|