@opencrvs/toolkit 1.8.0-rc.f876361 → 1.8.0-rc.f8e4107
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/commons/api/router.d.ts +3159 -158
- package/dist/commons/conditionals/conditionals.d.ts +80 -8
- package/dist/commons/conditionals/validate.d.ts +14 -17
- package/dist/commons/events/ActionDocument.d.ts +212 -101
- package/dist/commons/events/ActionInput.d.ts +1109 -214
- package/dist/commons/events/ActionType.d.ts +5 -3
- package/dist/commons/events/AdvancedSearchConfig.d.ts +107 -14
- package/dist/commons/events/Conditional.d.ts +21 -5
- package/dist/commons/events/Draft.d.ts +24 -12
- package/dist/commons/events/EventConfig.d.ts +132 -66
- package/dist/commons/events/EventDocument.d.ts +161 -76
- package/dist/commons/events/EventIndex.d.ts +746 -4
- package/dist/commons/events/EventMetadata.d.ts +6 -3
- package/dist/commons/events/FieldConfig.d.ts +208 -70
- package/dist/commons/events/PageConfig.d.ts +0 -24
- package/dist/commons/events/TemplateConfig.d.ts +5 -5
- package/dist/commons/events/defineConfig.d.ts +15 -11
- package/dist/commons/events/test.utils.d.ts +20 -112
- package/dist/commons/events/utils.d.ts +60 -54
- package/dist/commons/events/utils.test.d.ts +2 -0
- package/dist/conditionals/index.js +180 -151
- package/dist/events/index.js +1325 -1103
- package/package.json +1 -1
@@ -247,31 +247,65 @@ export declare const EventConfig: z.ZodEffects<z.ZodObject<{
|
|
247
247
|
}>;
|
248
248
|
fields: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
249
249
|
fieldId: z.ZodString;
|
250
|
-
config: z.
|
250
|
+
config: z.ZodObject<{
|
251
251
|
type: z.ZodEnum<["FUZZY", "EXACT", "RANGE"]>;
|
252
252
|
}, "strip", z.ZodTypeAny, {
|
253
253
|
type: "FUZZY" | "EXACT" | "RANGE";
|
254
254
|
}, {
|
255
255
|
type: "FUZZY" | "EXACT" | "RANGE";
|
256
|
-
}
|
256
|
+
}>;
|
257
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
258
|
+
value: z.ZodString;
|
259
|
+
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
260
|
+
id: string;
|
261
|
+
description: string;
|
262
|
+
defaultMessage: string;
|
263
|
+
}>;
|
264
|
+
}, "strip", z.ZodTypeAny, {
|
265
|
+
value: string;
|
266
|
+
label: TranslationConfig;
|
267
|
+
}, {
|
268
|
+
value: string;
|
269
|
+
label: {
|
270
|
+
id: string;
|
271
|
+
description: string;
|
272
|
+
defaultMessage: string;
|
273
|
+
};
|
274
|
+
}>, "many">>;
|
257
275
|
}, "strip", z.ZodTypeAny, {
|
258
|
-
|
259
|
-
config?: {
|
276
|
+
config: {
|
260
277
|
type: "FUZZY" | "EXACT" | "RANGE";
|
261
|
-
}
|
262
|
-
}, {
|
278
|
+
};
|
263
279
|
fieldId: string;
|
264
|
-
|
280
|
+
options?: {
|
281
|
+
value: string;
|
282
|
+
label: TranslationConfig;
|
283
|
+
}[] | undefined;
|
284
|
+
}, {
|
285
|
+
config: {
|
265
286
|
type: "FUZZY" | "EXACT" | "RANGE";
|
266
|
-
}
|
287
|
+
};
|
288
|
+
fieldId: string;
|
289
|
+
options?: {
|
290
|
+
value: string;
|
291
|
+
label: {
|
292
|
+
id: string;
|
293
|
+
description: string;
|
294
|
+
defaultMessage: string;
|
295
|
+
};
|
296
|
+
}[] | undefined;
|
267
297
|
}>, "many">>>;
|
268
298
|
}, "strip", z.ZodTypeAny, {
|
269
299
|
title: TranslationConfig;
|
270
300
|
fields: {
|
271
|
-
|
272
|
-
config?: {
|
301
|
+
config: {
|
273
302
|
type: "FUZZY" | "EXACT" | "RANGE";
|
274
|
-
}
|
303
|
+
};
|
304
|
+
fieldId: string;
|
305
|
+
options?: {
|
306
|
+
value: string;
|
307
|
+
label: TranslationConfig;
|
308
|
+
}[] | undefined;
|
275
309
|
}[];
|
276
310
|
}, {
|
277
311
|
title: {
|
@@ -280,10 +314,18 @@ export declare const EventConfig: z.ZodEffects<z.ZodObject<{
|
|
280
314
|
defaultMessage: string;
|
281
315
|
};
|
282
316
|
fields?: {
|
283
|
-
|
284
|
-
config?: {
|
317
|
+
config: {
|
285
318
|
type: "FUZZY" | "EXACT" | "RANGE";
|
286
|
-
}
|
319
|
+
};
|
320
|
+
fieldId: string;
|
321
|
+
options?: {
|
322
|
+
value: string;
|
323
|
+
label: {
|
324
|
+
id: string;
|
325
|
+
description: string;
|
326
|
+
defaultMessage: string;
|
327
|
+
};
|
328
|
+
}[] | undefined;
|
287
329
|
}[] | undefined;
|
288
330
|
}>, "many">>>;
|
289
331
|
}, "strip", z.ZodTypeAny, {
|
@@ -329,7 +371,7 @@ export declare const EventConfig: z.ZodEffects<z.ZodObject<{
|
|
329
371
|
};
|
330
372
|
draft?: boolean | undefined;
|
331
373
|
} | {
|
332
|
-
type: "
|
374
|
+
type: "REJECT";
|
333
375
|
conditionals: ({
|
334
376
|
type: "SHOW";
|
335
377
|
conditional: import(".").JSONSchema;
|
@@ -338,13 +380,9 @@ export declare const EventConfig: z.ZodEffects<z.ZodObject<{
|
|
338
380
|
conditional: import(".").JSONSchema;
|
339
381
|
})[];
|
340
382
|
label: TranslationConfig;
|
341
|
-
review: {
|
342
|
-
title: TranslationConfig;
|
343
|
-
fields: import("./FieldConfig").Inferred[];
|
344
|
-
};
|
345
383
|
draft?: boolean | undefined;
|
346
384
|
} | {
|
347
|
-
type: "
|
385
|
+
type: "MARKED_AS_DUPLICATE";
|
348
386
|
conditionals: ({
|
349
387
|
type: "SHOW";
|
350
388
|
conditional: import(".").JSONSchema;
|
@@ -355,7 +393,7 @@ export declare const EventConfig: z.ZodEffects<z.ZodObject<{
|
|
355
393
|
label: TranslationConfig;
|
356
394
|
draft?: boolean | undefined;
|
357
395
|
} | {
|
358
|
-
type: "
|
396
|
+
type: "ARCHIVE";
|
359
397
|
conditionals: ({
|
360
398
|
type: "SHOW";
|
361
399
|
conditional: import(".").JSONSchema;
|
@@ -366,7 +404,7 @@ export declare const EventConfig: z.ZodEffects<z.ZodObject<{
|
|
366
404
|
label: TranslationConfig;
|
367
405
|
draft?: boolean | undefined;
|
368
406
|
} | {
|
369
|
-
type: "
|
407
|
+
type: "REGISTER";
|
370
408
|
conditionals: ({
|
371
409
|
type: "SHOW";
|
372
410
|
conditional: import(".").JSONSchema;
|
@@ -375,6 +413,10 @@ export declare const EventConfig: z.ZodEffects<z.ZodObject<{
|
|
375
413
|
conditional: import(".").JSONSchema;
|
376
414
|
})[];
|
377
415
|
label: TranslationConfig;
|
416
|
+
review: {
|
417
|
+
title: TranslationConfig;
|
418
|
+
fields: import("./FieldConfig").Inferred[];
|
419
|
+
};
|
378
420
|
draft?: boolean | undefined;
|
379
421
|
} | {
|
380
422
|
type: "DELETE";
|
@@ -538,10 +580,14 @@ export declare const EventConfig: z.ZodEffects<z.ZodObject<{
|
|
538
580
|
advancedSearch: {
|
539
581
|
title: TranslationConfig;
|
540
582
|
fields: {
|
541
|
-
|
542
|
-
config?: {
|
583
|
+
config: {
|
543
584
|
type: "FUZZY" | "EXACT" | "RANGE";
|
544
|
-
}
|
585
|
+
};
|
586
|
+
fieldId: string;
|
587
|
+
options?: {
|
588
|
+
value: string;
|
589
|
+
label: TranslationConfig;
|
590
|
+
}[] | undefined;
|
545
591
|
}[];
|
546
592
|
}[];
|
547
593
|
}, {
|
@@ -611,20 +657,12 @@ export declare const EventConfig: z.ZodEffects<z.ZodObject<{
|
|
611
657
|
conditional: import(".").JSONSchema;
|
612
658
|
})[] | undefined;
|
613
659
|
} | {
|
614
|
-
type: "
|
660
|
+
type: "REJECT";
|
615
661
|
label: {
|
616
662
|
id: string;
|
617
663
|
description: string;
|
618
664
|
defaultMessage: string;
|
619
665
|
};
|
620
|
-
review: {
|
621
|
-
title: {
|
622
|
-
id: string;
|
623
|
-
description: string;
|
624
|
-
defaultMessage: string;
|
625
|
-
};
|
626
|
-
fields: import("./FieldConfig").InferredInput[];
|
627
|
-
};
|
628
666
|
draft?: boolean | undefined;
|
629
667
|
conditionals?: ({
|
630
668
|
type: "SHOW";
|
@@ -634,7 +672,7 @@ export declare const EventConfig: z.ZodEffects<z.ZodObject<{
|
|
634
672
|
conditional: import(".").JSONSchema;
|
635
673
|
})[] | undefined;
|
636
674
|
} | {
|
637
|
-
type: "
|
675
|
+
type: "MARKED_AS_DUPLICATE";
|
638
676
|
label: {
|
639
677
|
id: string;
|
640
678
|
description: string;
|
@@ -649,7 +687,7 @@ export declare const EventConfig: z.ZodEffects<z.ZodObject<{
|
|
649
687
|
conditional: import(".").JSONSchema;
|
650
688
|
})[] | undefined;
|
651
689
|
} | {
|
652
|
-
type: "
|
690
|
+
type: "ARCHIVE";
|
653
691
|
label: {
|
654
692
|
id: string;
|
655
693
|
description: string;
|
@@ -664,12 +702,20 @@ export declare const EventConfig: z.ZodEffects<z.ZodObject<{
|
|
664
702
|
conditional: import(".").JSONSchema;
|
665
703
|
})[] | undefined;
|
666
704
|
} | {
|
667
|
-
type: "
|
705
|
+
type: "REGISTER";
|
668
706
|
label: {
|
669
707
|
id: string;
|
670
708
|
description: string;
|
671
709
|
defaultMessage: string;
|
672
710
|
};
|
711
|
+
review: {
|
712
|
+
title: {
|
713
|
+
id: string;
|
714
|
+
description: string;
|
715
|
+
defaultMessage: string;
|
716
|
+
};
|
717
|
+
fields: import("./FieldConfig").InferredInput[];
|
718
|
+
};
|
673
719
|
draft?: boolean | undefined;
|
674
720
|
conditionals?: ({
|
675
721
|
type: "SHOW";
|
@@ -968,10 +1014,18 @@ export declare const EventConfig: z.ZodEffects<z.ZodObject<{
|
|
968
1014
|
defaultMessage: string;
|
969
1015
|
};
|
970
1016
|
fields?: {
|
971
|
-
|
972
|
-
config?: {
|
1017
|
+
config: {
|
973
1018
|
type: "FUZZY" | "EXACT" | "RANGE";
|
974
|
-
}
|
1019
|
+
};
|
1020
|
+
fieldId: string;
|
1021
|
+
options?: {
|
1022
|
+
value: string;
|
1023
|
+
label: {
|
1024
|
+
id: string;
|
1025
|
+
description: string;
|
1026
|
+
defaultMessage: string;
|
1027
|
+
};
|
1028
|
+
}[] | undefined;
|
975
1029
|
}[] | undefined;
|
976
1030
|
}[] | undefined;
|
977
1031
|
}>, {
|
@@ -1017,7 +1071,7 @@ export declare const EventConfig: z.ZodEffects<z.ZodObject<{
|
|
1017
1071
|
};
|
1018
1072
|
draft?: boolean | undefined;
|
1019
1073
|
} | {
|
1020
|
-
type: "
|
1074
|
+
type: "REJECT";
|
1021
1075
|
conditionals: ({
|
1022
1076
|
type: "SHOW";
|
1023
1077
|
conditional: import(".").JSONSchema;
|
@@ -1026,13 +1080,9 @@ export declare const EventConfig: z.ZodEffects<z.ZodObject<{
|
|
1026
1080
|
conditional: import(".").JSONSchema;
|
1027
1081
|
})[];
|
1028
1082
|
label: TranslationConfig;
|
1029
|
-
review: {
|
1030
|
-
title: TranslationConfig;
|
1031
|
-
fields: import("./FieldConfig").Inferred[];
|
1032
|
-
};
|
1033
1083
|
draft?: boolean | undefined;
|
1034
1084
|
} | {
|
1035
|
-
type: "
|
1085
|
+
type: "MARKED_AS_DUPLICATE";
|
1036
1086
|
conditionals: ({
|
1037
1087
|
type: "SHOW";
|
1038
1088
|
conditional: import(".").JSONSchema;
|
@@ -1043,7 +1093,7 @@ export declare const EventConfig: z.ZodEffects<z.ZodObject<{
|
|
1043
1093
|
label: TranslationConfig;
|
1044
1094
|
draft?: boolean | undefined;
|
1045
1095
|
} | {
|
1046
|
-
type: "
|
1096
|
+
type: "ARCHIVE";
|
1047
1097
|
conditionals: ({
|
1048
1098
|
type: "SHOW";
|
1049
1099
|
conditional: import(".").JSONSchema;
|
@@ -1054,7 +1104,7 @@ export declare const EventConfig: z.ZodEffects<z.ZodObject<{
|
|
1054
1104
|
label: TranslationConfig;
|
1055
1105
|
draft?: boolean | undefined;
|
1056
1106
|
} | {
|
1057
|
-
type: "
|
1107
|
+
type: "REGISTER";
|
1058
1108
|
conditionals: ({
|
1059
1109
|
type: "SHOW";
|
1060
1110
|
conditional: import(".").JSONSchema;
|
@@ -1063,6 +1113,10 @@ export declare const EventConfig: z.ZodEffects<z.ZodObject<{
|
|
1063
1113
|
conditional: import(".").JSONSchema;
|
1064
1114
|
})[];
|
1065
1115
|
label: TranslationConfig;
|
1116
|
+
review: {
|
1117
|
+
title: TranslationConfig;
|
1118
|
+
fields: import("./FieldConfig").Inferred[];
|
1119
|
+
};
|
1066
1120
|
draft?: boolean | undefined;
|
1067
1121
|
} | {
|
1068
1122
|
type: "DELETE";
|
@@ -1226,10 +1280,14 @@ export declare const EventConfig: z.ZodEffects<z.ZodObject<{
|
|
1226
1280
|
advancedSearch: {
|
1227
1281
|
title: TranslationConfig;
|
1228
1282
|
fields: {
|
1229
|
-
|
1230
|
-
config?: {
|
1283
|
+
config: {
|
1231
1284
|
type: "FUZZY" | "EXACT" | "RANGE";
|
1232
|
-
}
|
1285
|
+
};
|
1286
|
+
fieldId: string;
|
1287
|
+
options?: {
|
1288
|
+
value: string;
|
1289
|
+
label: TranslationConfig;
|
1290
|
+
}[] | undefined;
|
1233
1291
|
}[];
|
1234
1292
|
}[];
|
1235
1293
|
}, {
|
@@ -1299,20 +1357,12 @@ export declare const EventConfig: z.ZodEffects<z.ZodObject<{
|
|
1299
1357
|
conditional: import(".").JSONSchema;
|
1300
1358
|
})[] | undefined;
|
1301
1359
|
} | {
|
1302
|
-
type: "
|
1360
|
+
type: "REJECT";
|
1303
1361
|
label: {
|
1304
1362
|
id: string;
|
1305
1363
|
description: string;
|
1306
1364
|
defaultMessage: string;
|
1307
1365
|
};
|
1308
|
-
review: {
|
1309
|
-
title: {
|
1310
|
-
id: string;
|
1311
|
-
description: string;
|
1312
|
-
defaultMessage: string;
|
1313
|
-
};
|
1314
|
-
fields: import("./FieldConfig").InferredInput[];
|
1315
|
-
};
|
1316
1366
|
draft?: boolean | undefined;
|
1317
1367
|
conditionals?: ({
|
1318
1368
|
type: "SHOW";
|
@@ -1322,7 +1372,7 @@ export declare const EventConfig: z.ZodEffects<z.ZodObject<{
|
|
1322
1372
|
conditional: import(".").JSONSchema;
|
1323
1373
|
})[] | undefined;
|
1324
1374
|
} | {
|
1325
|
-
type: "
|
1375
|
+
type: "MARKED_AS_DUPLICATE";
|
1326
1376
|
label: {
|
1327
1377
|
id: string;
|
1328
1378
|
description: string;
|
@@ -1337,7 +1387,7 @@ export declare const EventConfig: z.ZodEffects<z.ZodObject<{
|
|
1337
1387
|
conditional: import(".").JSONSchema;
|
1338
1388
|
})[] | undefined;
|
1339
1389
|
} | {
|
1340
|
-
type: "
|
1390
|
+
type: "ARCHIVE";
|
1341
1391
|
label: {
|
1342
1392
|
id: string;
|
1343
1393
|
description: string;
|
@@ -1352,12 +1402,20 @@ export declare const EventConfig: z.ZodEffects<z.ZodObject<{
|
|
1352
1402
|
conditional: import(".").JSONSchema;
|
1353
1403
|
})[] | undefined;
|
1354
1404
|
} | {
|
1355
|
-
type: "
|
1405
|
+
type: "REGISTER";
|
1356
1406
|
label: {
|
1357
1407
|
id: string;
|
1358
1408
|
description: string;
|
1359
1409
|
defaultMessage: string;
|
1360
1410
|
};
|
1411
|
+
review: {
|
1412
|
+
title: {
|
1413
|
+
id: string;
|
1414
|
+
description: string;
|
1415
|
+
defaultMessage: string;
|
1416
|
+
};
|
1417
|
+
fields: import("./FieldConfig").InferredInput[];
|
1418
|
+
};
|
1361
1419
|
draft?: boolean | undefined;
|
1362
1420
|
conditionals?: ({
|
1363
1421
|
type: "SHOW";
|
@@ -1656,10 +1714,18 @@ export declare const EventConfig: z.ZodEffects<z.ZodObject<{
|
|
1656
1714
|
defaultMessage: string;
|
1657
1715
|
};
|
1658
1716
|
fields?: {
|
1659
|
-
|
1660
|
-
config?: {
|
1717
|
+
config: {
|
1661
1718
|
type: "FUZZY" | "EXACT" | "RANGE";
|
1662
|
-
}
|
1719
|
+
};
|
1720
|
+
fieldId: string;
|
1721
|
+
options?: {
|
1722
|
+
value: string;
|
1723
|
+
label: {
|
1724
|
+
id: string;
|
1725
|
+
description: string;
|
1726
|
+
defaultMessage: string;
|
1727
|
+
};
|
1728
|
+
}[] | undefined;
|
1663
1729
|
}[] | undefined;
|
1664
1730
|
}[] | undefined;
|
1665
1731
|
}>;
|