@opencrvs/toolkit 1.8.0-rc.fec1d5d → 1.8.0-rc.fef0fdd
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 +851 -10142
- package/dist/commons/events/ActionDocument.d.ts +486 -387
- package/dist/commons/events/ActionInput.d.ts +126 -126
- package/dist/commons/events/ActionType.d.ts +2 -0
- package/dist/commons/events/AdvancedSearchConfig.d.ts +204 -0
- package/dist/commons/events/CountryConfigQueryInput.d.ts +254 -168
- package/dist/commons/events/CreatedAtLocation.d.ts +1 -2
- package/dist/commons/events/Draft.d.ts +28 -23
- package/dist/commons/events/EventConfig.d.ts +132 -0
- package/dist/commons/events/EventDocument.d.ts +350 -275
- package/dist/commons/events/EventIndex.d.ts +572 -146
- package/dist/commons/events/EventMetadata.d.ts +59 -26
- package/dist/commons/events/FieldConfig.d.ts +19 -0
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +11 -11
- package/dist/commons/events/WorkqueueConfig.d.ts +1937 -459
- package/dist/commons/events/defineConfig.d.ts +8 -0
- package/dist/commons/events/field.d.ts +5 -0
- package/dist/commons/events/index.d.ts +1 -0
- package/dist/commons/events/scopes.d.ts +1 -2
- package/dist/commons/events/test.utils.d.ts +28 -5
- package/dist/commons/events/transactions.d.ts +1 -1
- package/dist/commons/events/utils.d.ts +16 -6
- package/dist/events/index.js +880 -567
- package/dist/scopes/index.d.ts +4 -1
- package/dist/scopes/index.js +67 -17
- package/package.json +3 -3
@@ -36,6 +36,8 @@ export declare const annotationActions: z.ZodEnum<["DELETE", "CREATE", "NOTIFY",
|
|
36
36
|
export type AnnotationActionType = z.infer<typeof annotationActions>;
|
37
37
|
/** Actions which requires the user to be assigned */
|
38
38
|
export declare const writeActions: z.ZodEnum<["DELETE", "NOTIFY", "DECLARE", "VALIDATE", "REGISTER", "DETECT_DUPLICATE", "REJECT", "MARKED_AS_DUPLICATE", "ARCHIVE", "PRINT_CERTIFICATE", "REQUEST_CORRECTION", "REJECT_CORRECTION", "APPROVE_CORRECTION"]>;
|
39
|
+
/** Actions which change the status of the event */
|
40
|
+
export declare const StatusChangingActions: z.ZodEnum<["CREATE", "NOTIFY", "DECLARE", "VALIDATE", "REGISTER", "REJECT", "ARCHIVE", "PRINT_CERTIFICATE"]>;
|
39
41
|
/** Actions which are visible in action menu and workqueue */
|
40
42
|
export declare const workqueueActions: z.ZodEnum<["DELETE", "DECLARE", "VALIDATE", "REGISTER", "PRINT_CERTIFICATE", "READ", "ASSIGN", "UNASSIGN"]>;
|
41
43
|
export type WorkqueueActionType = z.infer<typeof workqueueActions>;
|
@@ -451,6 +451,24 @@ export declare const FieldConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
451
451
|
defaultMessage: string;
|
452
452
|
}>>;
|
453
453
|
conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").FieldConditionalType[]>, "many">>>;
|
454
|
+
validations: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
|
455
|
+
validator: z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>;
|
456
|
+
message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
457
|
+
id: string;
|
458
|
+
description: string;
|
459
|
+
defaultMessage: string;
|
460
|
+
}>;
|
461
|
+
}, "strip", z.ZodTypeAny, {
|
462
|
+
message: TranslationConfig;
|
463
|
+
validator: import(".").JSONSchema;
|
464
|
+
}, {
|
465
|
+
message: {
|
466
|
+
id: string;
|
467
|
+
description: string;
|
468
|
+
defaultMessage: string;
|
469
|
+
};
|
470
|
+
validator: import(".").JSONSchema;
|
471
|
+
}>, "many">>>;
|
454
472
|
}, {
|
455
473
|
fieldId: z.ZodString;
|
456
474
|
fieldType: z.ZodLiteral<"field">;
|
@@ -475,6 +493,10 @@ export declare const FieldConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
475
493
|
conditional: import(".").JSONSchema;
|
476
494
|
})[] | undefined;
|
477
495
|
searchCriteriaLabelPrefix?: TranslationConfig | undefined;
|
496
|
+
validations?: {
|
497
|
+
message: TranslationConfig;
|
498
|
+
validator: import(".").JSONSchema;
|
499
|
+
}[] | undefined;
|
478
500
|
}, {
|
479
501
|
config: {
|
480
502
|
type: "exact" | "fuzzy" | "range";
|
@@ -504,6 +526,14 @@ export declare const FieldConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
504
526
|
description: string;
|
505
527
|
defaultMessage: string;
|
506
528
|
} | undefined;
|
529
|
+
validations?: {
|
530
|
+
message: {
|
531
|
+
id: string;
|
532
|
+
description: string;
|
533
|
+
defaultMessage: string;
|
534
|
+
};
|
535
|
+
validator: import(".").JSONSchema;
|
536
|
+
}[] | undefined;
|
507
537
|
}>;
|
508
538
|
export declare const EventFieldId: z.ZodEnum<["trackingId", "status", "legalStatus.REGISTERED.createdAt", "legalStatus.REGISTERED.createdAtLocation", "updatedAt"]>;
|
509
539
|
export type EventFieldId = z.infer<typeof EventFieldId>;
|
@@ -539,6 +569,24 @@ export declare const EventFieldConfigSchema: z.ZodObject<z.objectUtil.extendShap
|
|
539
569
|
defaultMessage: string;
|
540
570
|
}>>;
|
541
571
|
conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").FieldConditionalType[]>, "many">>>;
|
572
|
+
validations: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
|
573
|
+
validator: z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>;
|
574
|
+
message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
575
|
+
id: string;
|
576
|
+
description: string;
|
577
|
+
defaultMessage: string;
|
578
|
+
}>;
|
579
|
+
}, "strip", z.ZodTypeAny, {
|
580
|
+
message: TranslationConfig;
|
581
|
+
validator: import(".").JSONSchema;
|
582
|
+
}, {
|
583
|
+
message: {
|
584
|
+
id: string;
|
585
|
+
description: string;
|
586
|
+
defaultMessage: string;
|
587
|
+
};
|
588
|
+
validator: import(".").JSONSchema;
|
589
|
+
}>, "many">>>;
|
542
590
|
}, {
|
543
591
|
fieldId: z.ZodEnum<["trackingId", "status", "legalStatus.REGISTERED.createdAt", "legalStatus.REGISTERED.createdAtLocation", "updatedAt"]>;
|
544
592
|
fieldType: z.ZodLiteral<"event">;
|
@@ -563,6 +611,10 @@ export declare const EventFieldConfigSchema: z.ZodObject<z.objectUtil.extendShap
|
|
563
611
|
conditional: import(".").JSONSchema;
|
564
612
|
})[] | undefined;
|
565
613
|
searchCriteriaLabelPrefix?: TranslationConfig | undefined;
|
614
|
+
validations?: {
|
615
|
+
message: TranslationConfig;
|
616
|
+
validator: import(".").JSONSchema;
|
617
|
+
}[] | undefined;
|
566
618
|
}, {
|
567
619
|
config: {
|
568
620
|
type: "exact" | "fuzzy" | "range";
|
@@ -592,6 +644,14 @@ export declare const EventFieldConfigSchema: z.ZodObject<z.objectUtil.extendShap
|
|
592
644
|
description: string;
|
593
645
|
defaultMessage: string;
|
594
646
|
} | undefined;
|
647
|
+
validations?: {
|
648
|
+
message: {
|
649
|
+
id: string;
|
650
|
+
description: string;
|
651
|
+
defaultMessage: string;
|
652
|
+
};
|
653
|
+
validator: import(".").JSONSchema;
|
654
|
+
}[] | undefined;
|
595
655
|
}>;
|
596
656
|
export declare const SearchField: z.ZodDiscriminatedUnion<"fieldType", [z.ZodObject<z.objectUtil.extendShape<{
|
597
657
|
config: z.ZodObject<{
|
@@ -625,6 +685,24 @@ export declare const SearchField: z.ZodDiscriminatedUnion<"fieldType", [z.ZodObj
|
|
625
685
|
defaultMessage: string;
|
626
686
|
}>>;
|
627
687
|
conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").FieldConditionalType[]>, "many">>>;
|
688
|
+
validations: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
|
689
|
+
validator: z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>;
|
690
|
+
message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
691
|
+
id: string;
|
692
|
+
description: string;
|
693
|
+
defaultMessage: string;
|
694
|
+
}>;
|
695
|
+
}, "strip", z.ZodTypeAny, {
|
696
|
+
message: TranslationConfig;
|
697
|
+
validator: import(".").JSONSchema;
|
698
|
+
}, {
|
699
|
+
message: {
|
700
|
+
id: string;
|
701
|
+
description: string;
|
702
|
+
defaultMessage: string;
|
703
|
+
};
|
704
|
+
validator: import(".").JSONSchema;
|
705
|
+
}>, "many">>>;
|
628
706
|
}, {
|
629
707
|
fieldId: z.ZodString;
|
630
708
|
fieldType: z.ZodLiteral<"field">;
|
@@ -649,6 +727,10 @@ export declare const SearchField: z.ZodDiscriminatedUnion<"fieldType", [z.ZodObj
|
|
649
727
|
conditional: import(".").JSONSchema;
|
650
728
|
})[] | undefined;
|
651
729
|
searchCriteriaLabelPrefix?: TranslationConfig | undefined;
|
730
|
+
validations?: {
|
731
|
+
message: TranslationConfig;
|
732
|
+
validator: import(".").JSONSchema;
|
733
|
+
}[] | undefined;
|
652
734
|
}, {
|
653
735
|
config: {
|
654
736
|
type: "exact" | "fuzzy" | "range";
|
@@ -678,6 +760,14 @@ export declare const SearchField: z.ZodDiscriminatedUnion<"fieldType", [z.ZodObj
|
|
678
760
|
description: string;
|
679
761
|
defaultMessage: string;
|
680
762
|
} | undefined;
|
763
|
+
validations?: {
|
764
|
+
message: {
|
765
|
+
id: string;
|
766
|
+
description: string;
|
767
|
+
defaultMessage: string;
|
768
|
+
};
|
769
|
+
validator: import(".").JSONSchema;
|
770
|
+
}[] | undefined;
|
681
771
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
682
772
|
config: z.ZodObject<{
|
683
773
|
type: z.ZodEnum<["fuzzy", "exact", "range"]>;
|
@@ -710,6 +800,24 @@ export declare const SearchField: z.ZodDiscriminatedUnion<"fieldType", [z.ZodObj
|
|
710
800
|
defaultMessage: string;
|
711
801
|
}>>;
|
712
802
|
conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").FieldConditionalType[]>, "many">>>;
|
803
|
+
validations: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
|
804
|
+
validator: z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>;
|
805
|
+
message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
806
|
+
id: string;
|
807
|
+
description: string;
|
808
|
+
defaultMessage: string;
|
809
|
+
}>;
|
810
|
+
}, "strip", z.ZodTypeAny, {
|
811
|
+
message: TranslationConfig;
|
812
|
+
validator: import(".").JSONSchema;
|
813
|
+
}, {
|
814
|
+
message: {
|
815
|
+
id: string;
|
816
|
+
description: string;
|
817
|
+
defaultMessage: string;
|
818
|
+
};
|
819
|
+
validator: import(".").JSONSchema;
|
820
|
+
}>, "many">>>;
|
713
821
|
}, {
|
714
822
|
fieldId: z.ZodEnum<["trackingId", "status", "legalStatus.REGISTERED.createdAt", "legalStatus.REGISTERED.createdAtLocation", "updatedAt"]>;
|
715
823
|
fieldType: z.ZodLiteral<"event">;
|
@@ -734,6 +842,10 @@ export declare const SearchField: z.ZodDiscriminatedUnion<"fieldType", [z.ZodObj
|
|
734
842
|
conditional: import(".").JSONSchema;
|
735
843
|
})[] | undefined;
|
736
844
|
searchCriteriaLabelPrefix?: TranslationConfig | undefined;
|
845
|
+
validations?: {
|
846
|
+
message: TranslationConfig;
|
847
|
+
validator: import(".").JSONSchema;
|
848
|
+
}[] | undefined;
|
737
849
|
}, {
|
738
850
|
config: {
|
739
851
|
type: "exact" | "fuzzy" | "range";
|
@@ -763,6 +875,14 @@ export declare const SearchField: z.ZodDiscriminatedUnion<"fieldType", [z.ZodObj
|
|
763
875
|
description: string;
|
764
876
|
defaultMessage: string;
|
765
877
|
} | undefined;
|
878
|
+
validations?: {
|
879
|
+
message: {
|
880
|
+
id: string;
|
881
|
+
description: string;
|
882
|
+
defaultMessage: string;
|
883
|
+
};
|
884
|
+
validator: import(".").JSONSchema;
|
885
|
+
}[] | undefined;
|
766
886
|
}>]>;
|
767
887
|
export type SearchField = z.infer<typeof SearchField>;
|
768
888
|
export declare const AdvancedSearchConfig: z.ZodObject<{
|
@@ -803,6 +923,24 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
803
923
|
defaultMessage: string;
|
804
924
|
}>>;
|
805
925
|
conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").FieldConditionalType[]>, "many">>>;
|
926
|
+
validations: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
|
927
|
+
validator: z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>;
|
928
|
+
message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
929
|
+
id: string;
|
930
|
+
description: string;
|
931
|
+
defaultMessage: string;
|
932
|
+
}>;
|
933
|
+
}, "strip", z.ZodTypeAny, {
|
934
|
+
message: TranslationConfig;
|
935
|
+
validator: import(".").JSONSchema;
|
936
|
+
}, {
|
937
|
+
message: {
|
938
|
+
id: string;
|
939
|
+
description: string;
|
940
|
+
defaultMessage: string;
|
941
|
+
};
|
942
|
+
validator: import(".").JSONSchema;
|
943
|
+
}>, "many">>>;
|
806
944
|
}, {
|
807
945
|
fieldId: z.ZodString;
|
808
946
|
fieldType: z.ZodLiteral<"field">;
|
@@ -827,6 +965,10 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
827
965
|
conditional: import(".").JSONSchema;
|
828
966
|
})[] | undefined;
|
829
967
|
searchCriteriaLabelPrefix?: TranslationConfig | undefined;
|
968
|
+
validations?: {
|
969
|
+
message: TranslationConfig;
|
970
|
+
validator: import(".").JSONSchema;
|
971
|
+
}[] | undefined;
|
830
972
|
}, {
|
831
973
|
config: {
|
832
974
|
type: "exact" | "fuzzy" | "range";
|
@@ -856,6 +998,14 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
856
998
|
description: string;
|
857
999
|
defaultMessage: string;
|
858
1000
|
} | undefined;
|
1001
|
+
validations?: {
|
1002
|
+
message: {
|
1003
|
+
id: string;
|
1004
|
+
description: string;
|
1005
|
+
defaultMessage: string;
|
1006
|
+
};
|
1007
|
+
validator: import(".").JSONSchema;
|
1008
|
+
}[] | undefined;
|
859
1009
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
860
1010
|
config: z.ZodObject<{
|
861
1011
|
type: z.ZodEnum<["fuzzy", "exact", "range"]>;
|
@@ -888,6 +1038,24 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
888
1038
|
defaultMessage: string;
|
889
1039
|
}>>;
|
890
1040
|
conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").FieldConditionalType[]>, "many">>>;
|
1041
|
+
validations: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
|
1042
|
+
validator: z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>;
|
1043
|
+
message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
1044
|
+
id: string;
|
1045
|
+
description: string;
|
1046
|
+
defaultMessage: string;
|
1047
|
+
}>;
|
1048
|
+
}, "strip", z.ZodTypeAny, {
|
1049
|
+
message: TranslationConfig;
|
1050
|
+
validator: import(".").JSONSchema;
|
1051
|
+
}, {
|
1052
|
+
message: {
|
1053
|
+
id: string;
|
1054
|
+
description: string;
|
1055
|
+
defaultMessage: string;
|
1056
|
+
};
|
1057
|
+
validator: import(".").JSONSchema;
|
1058
|
+
}>, "many">>>;
|
891
1059
|
}, {
|
892
1060
|
fieldId: z.ZodEnum<["trackingId", "status", "legalStatus.REGISTERED.createdAt", "legalStatus.REGISTERED.createdAtLocation", "updatedAt"]>;
|
893
1061
|
fieldType: z.ZodLiteral<"event">;
|
@@ -912,6 +1080,10 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
912
1080
|
conditional: import(".").JSONSchema;
|
913
1081
|
})[] | undefined;
|
914
1082
|
searchCriteriaLabelPrefix?: TranslationConfig | undefined;
|
1083
|
+
validations?: {
|
1084
|
+
message: TranslationConfig;
|
1085
|
+
validator: import(".").JSONSchema;
|
1086
|
+
}[] | undefined;
|
915
1087
|
}, {
|
916
1088
|
config: {
|
917
1089
|
type: "exact" | "fuzzy" | "range";
|
@@ -941,6 +1113,14 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
941
1113
|
description: string;
|
942
1114
|
defaultMessage: string;
|
943
1115
|
} | undefined;
|
1116
|
+
validations?: {
|
1117
|
+
message: {
|
1118
|
+
id: string;
|
1119
|
+
description: string;
|
1120
|
+
defaultMessage: string;
|
1121
|
+
};
|
1122
|
+
validator: import(".").JSONSchema;
|
1123
|
+
}[] | undefined;
|
944
1124
|
}>]>, "many">;
|
945
1125
|
}, "strip", z.ZodTypeAny, {
|
946
1126
|
title: TranslationConfig;
|
@@ -965,6 +1145,10 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
965
1145
|
conditional: import(".").JSONSchema;
|
966
1146
|
})[] | undefined;
|
967
1147
|
searchCriteriaLabelPrefix?: TranslationConfig | undefined;
|
1148
|
+
validations?: {
|
1149
|
+
message: TranslationConfig;
|
1150
|
+
validator: import(".").JSONSchema;
|
1151
|
+
}[] | undefined;
|
968
1152
|
} | {
|
969
1153
|
config: {
|
970
1154
|
type: "exact" | "fuzzy" | "range";
|
@@ -986,6 +1170,10 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
986
1170
|
conditional: import(".").JSONSchema;
|
987
1171
|
})[] | undefined;
|
988
1172
|
searchCriteriaLabelPrefix?: TranslationConfig | undefined;
|
1173
|
+
validations?: {
|
1174
|
+
message: TranslationConfig;
|
1175
|
+
validator: import(".").JSONSchema;
|
1176
|
+
}[] | undefined;
|
989
1177
|
})[];
|
990
1178
|
}, {
|
991
1179
|
title: {
|
@@ -1022,6 +1210,14 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
1022
1210
|
description: string;
|
1023
1211
|
defaultMessage: string;
|
1024
1212
|
} | undefined;
|
1213
|
+
validations?: {
|
1214
|
+
message: {
|
1215
|
+
id: string;
|
1216
|
+
description: string;
|
1217
|
+
defaultMessage: string;
|
1218
|
+
};
|
1219
|
+
validator: import(".").JSONSchema;
|
1220
|
+
}[] | undefined;
|
1025
1221
|
} | {
|
1026
1222
|
config: {
|
1027
1223
|
type: "exact" | "fuzzy" | "range";
|
@@ -1051,6 +1247,14 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
1051
1247
|
description: string;
|
1052
1248
|
defaultMessage: string;
|
1053
1249
|
} | undefined;
|
1250
|
+
validations?: {
|
1251
|
+
message: {
|
1252
|
+
id: string;
|
1253
|
+
description: string;
|
1254
|
+
defaultMessage: string;
|
1255
|
+
};
|
1256
|
+
validator: import(".").JSONSchema;
|
1257
|
+
}[] | undefined;
|
1054
1258
|
})[];
|
1055
1259
|
}>;
|
1056
1260
|
export type AdvancedSearchConfigInput = z.infer<typeof AdvancedSearchConfig>;
|