@opencrvs/toolkit 1.8.0-rc.f9911ed → 1.8.0-rc.faacbde
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 +1 -1
- package/dist/commons/api/router.d.ts +872 -1303
- package/dist/commons/conditionals/conditionals.d.ts +7 -0
- package/dist/commons/events/ActionConfig.d.ts +1255 -6456
- package/dist/commons/events/ActionDocument.d.ts +173 -173
- package/dist/commons/events/ActionInput.d.ts +1016 -228
- package/dist/commons/events/ActionType.d.ts +23 -16
- package/dist/commons/events/Draft.d.ts +32 -33
- package/dist/commons/events/EventConfig.d.ts +614 -2837
- package/dist/commons/events/EventConfigInput.d.ts +5 -2
- package/dist/commons/events/EventDocument.d.ts +275 -275
- package/dist/commons/events/EventIndex.d.ts +3 -3
- package/dist/commons/events/FieldConfig.d.ts +84 -22
- package/dist/commons/events/FormConfig.d.ts +520 -273
- package/dist/commons/events/PageConfig.d.ts +359 -0
- package/dist/commons/events/defineConfig.d.ts +34 -411
- package/dist/commons/events/index.d.ts +2 -1
- package/dist/commons/events/test.utils.d.ts +52 -182
- package/dist/commons/events/utils.d.ts +38 -153
- package/dist/conditionals/index.js +38 -0
- package/dist/events/index.js +717 -605
- package/package.json +1 -1
@@ -1,29 +1,36 @@
|
|
1
|
+
import { z } from 'zod';
|
1
2
|
/**
|
2
3
|
* Actions recognized by the system
|
3
4
|
*/
|
4
5
|
export declare const ActionType: {
|
6
|
+
readonly DELETE: "DELETE";
|
5
7
|
readonly CREATE: "CREATE";
|
6
|
-
readonly ASSIGN: "ASSIGN";
|
7
|
-
readonly UNASSIGN: "UNASSIGN";
|
8
|
-
readonly REGISTER: "REGISTER";
|
9
|
-
readonly VALIDATE: "VALIDATE";
|
10
|
-
readonly REQUEST_CORRECTION: "REQUEST_CORRECTION";
|
11
|
-
readonly REJECT_CORRECTION: "REJECT_CORRECTION";
|
12
|
-
readonly APPROVE_CORRECTION: "APPROVE_CORRECTION";
|
13
|
-
readonly DETECT_DUPLICATE: "DETECT_DUPLICATE";
|
14
8
|
readonly NOTIFY: "NOTIFY";
|
15
9
|
readonly DECLARE: "DECLARE";
|
16
|
-
readonly
|
17
|
-
readonly
|
18
|
-
readonly
|
10
|
+
readonly VALIDATE: "VALIDATE";
|
11
|
+
readonly REGISTER: "REGISTER";
|
12
|
+
readonly DETECT_DUPLICATE: "DETECT_DUPLICATE";
|
19
13
|
readonly REJECT: "REJECT";
|
20
14
|
readonly MARKED_AS_DUPLICATE: "MARKED_AS_DUPLICATE";
|
21
15
|
readonly ARCHIVE: "ARCHIVE";
|
16
|
+
readonly PRINT_CERTIFICATE: "PRINT_CERTIFICATE";
|
17
|
+
readonly REQUEST_CORRECTION: "REQUEST_CORRECTION";
|
18
|
+
readonly REJECT_CORRECTION: "REJECT_CORRECTION";
|
19
|
+
readonly APPROVE_CORRECTION: "APPROVE_CORRECTION";
|
20
|
+
readonly READ: "READ";
|
21
|
+
readonly ASSIGN: "ASSIGN";
|
22
|
+
readonly UNASSIGN: "UNASSIGN";
|
22
23
|
};
|
23
|
-
/**
|
24
|
-
* Actions that can be attached to an event document
|
25
|
-
* even if they are not in event configuration
|
26
|
-
*/
|
27
|
-
export declare const LatentActions: ("REJECT" | "ARCHIVE")[];
|
28
24
|
export type ActionType = (typeof ActionType)[keyof typeof ActionType];
|
25
|
+
/** Testing building types from enums as an alternative */
|
26
|
+
export declare const ActionTypes: z.ZodEnum<["DELETE", "CREATE", "NOTIFY", "DECLARE", "VALIDATE", "REGISTER", "DETECT_DUPLICATE", "REJECT", "MARKED_AS_DUPLICATE", "ARCHIVE", "PRINT_CERTIFICATE", "REQUEST_CORRECTION", "REJECT_CORRECTION", "APPROVE_CORRECTION", "READ", "ASSIGN", "UNASSIGN"]>;
|
27
|
+
/** Actions which change event data (declaration) before registration / during declaration. */
|
28
|
+
export declare const DeclarationActions: z.ZodEnum<["DECLARE", "VALIDATE", "REGISTER"]>;
|
29
|
+
export type DeclarationAction = z.infer<typeof DeclarationActions>;
|
30
|
+
/** Actions that can modify declaration data. Request can be corrected after declaring it. */
|
31
|
+
export declare const DeclarationUpdateActions: z.ZodEnum<["DECLARE", "VALIDATE", "REGISTER", "REQUEST_CORRECTION"]>;
|
32
|
+
export type DeclarationUpdateAction = z.infer<typeof DeclarationUpdateActions>;
|
33
|
+
/** Actions which update annotation or status of an event. */
|
34
|
+
export declare const annotationActions: z.ZodEnum<["DELETE", "CREATE", "NOTIFY", "DETECT_DUPLICATE", "REJECT", "MARKED_AS_DUPLICATE", "ARCHIVE", "PRINT_CERTIFICATE", "REQUEST_CORRECTION", "REJECT_CORRECTION", "APPROVE_CORRECTION", "READ", "ASSIGN", "UNASSIGN"]>;
|
35
|
+
export type MetadataAction = z.infer<typeof annotationActions>;
|
29
36
|
//# sourceMappingURL=ActionType.d.ts.map
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { z } from 'zod';
|
2
|
-
import { ActionType } from './ActionType';
|
3
2
|
export declare const Draft: z.ZodObject<{
|
4
3
|
id: z.ZodString;
|
5
4
|
eventId: z.ZodString;
|
@@ -9,7 +8,7 @@ export declare const Draft: z.ZodObject<{
|
|
9
8
|
id: z.ZodString;
|
10
9
|
createdAt: z.ZodString;
|
11
10
|
createdBy: z.ZodString;
|
12
|
-
|
11
|
+
declaration: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
|
13
12
|
filename: z.ZodString;
|
14
13
|
originalFilename: z.ZodString;
|
15
14
|
type: z.ZodString;
|
@@ -123,7 +122,7 @@ export declare const Draft: z.ZodObject<{
|
|
123
122
|
addressLine3?: string | null | undefined;
|
124
123
|
postcodeOrZip?: string | null | undefined;
|
125
124
|
}>]>>;
|
126
|
-
|
125
|
+
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
|
127
126
|
filename: z.ZodString;
|
128
127
|
originalFilename: z.ZodString;
|
129
128
|
type: z.ZodString;
|
@@ -239,10 +238,12 @@ export declare const Draft: z.ZodObject<{
|
|
239
238
|
}>]>>>;
|
240
239
|
createdAtLocation: z.ZodString;
|
241
240
|
}, {
|
242
|
-
type: z.ZodEnum<[
|
241
|
+
type: z.ZodEnum<["DELETE", "CREATE", "NOTIFY", "DECLARE", "VALIDATE", "REGISTER", "DETECT_DUPLICATE", "REJECT", "MARKED_AS_DUPLICATE", "ARCHIVE", "PRINT_CERTIFICATE", "REQUEST_CORRECTION", "REJECT_CORRECTION", "APPROVE_CORRECTION", "READ", "ASSIGN", "UNASSIGN"]>;
|
243
242
|
}>, "id">, "strip", z.ZodTypeAny, {
|
244
|
-
type:
|
245
|
-
|
243
|
+
type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "CREATE" | "NOTIFY" | "DETECT_DUPLICATE" | "REJECT" | "MARKED_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
|
244
|
+
createdAt: string;
|
245
|
+
createdBy: string;
|
246
|
+
declaration: Record<string, string | number | boolean | {
|
246
247
|
type: string;
|
247
248
|
filename: string;
|
248
249
|
originalFilename: string;
|
@@ -280,10 +281,8 @@ export declare const Draft: z.ZodObject<{
|
|
280
281
|
filename: string;
|
281
282
|
originalFilename: string;
|
282
283
|
}[] | undefined>;
|
283
|
-
createdAt: string;
|
284
|
-
createdBy: string;
|
285
284
|
createdAtLocation: string;
|
286
|
-
|
285
|
+
annotation?: Record<string, string | number | boolean | {
|
287
286
|
type: string;
|
288
287
|
filename: string;
|
289
288
|
originalFilename: string;
|
@@ -322,8 +321,10 @@ export declare const Draft: z.ZodObject<{
|
|
322
321
|
originalFilename: string;
|
323
322
|
}[] | undefined> | undefined;
|
324
323
|
}, {
|
325
|
-
type:
|
326
|
-
|
324
|
+
type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "CREATE" | "NOTIFY" | "DETECT_DUPLICATE" | "REJECT" | "MARKED_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
|
325
|
+
createdAt: string;
|
326
|
+
createdBy: string;
|
327
|
+
declaration: Record<string, string | number | boolean | {
|
327
328
|
type: string;
|
328
329
|
filename: string;
|
329
330
|
originalFilename: string;
|
@@ -361,10 +362,8 @@ export declare const Draft: z.ZodObject<{
|
|
361
362
|
filename: string;
|
362
363
|
originalFilename: string;
|
363
364
|
}[] | undefined>;
|
364
|
-
createdAt: string;
|
365
|
-
createdBy: string;
|
366
365
|
createdAtLocation: string;
|
367
|
-
|
366
|
+
annotation?: Record<string, string | number | boolean | {
|
368
367
|
type: string;
|
369
368
|
filename: string;
|
370
369
|
originalFilename: string;
|
@@ -409,8 +408,10 @@ export declare const Draft: z.ZodObject<{
|
|
409
408
|
eventId: string;
|
410
409
|
transactionId: string;
|
411
410
|
action: {
|
412
|
-
type:
|
413
|
-
|
411
|
+
type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "CREATE" | "NOTIFY" | "DETECT_DUPLICATE" | "REJECT" | "MARKED_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
|
412
|
+
createdAt: string;
|
413
|
+
createdBy: string;
|
414
|
+
declaration: Record<string, string | number | boolean | {
|
414
415
|
type: string;
|
415
416
|
filename: string;
|
416
417
|
originalFilename: string;
|
@@ -448,10 +449,8 @@ export declare const Draft: z.ZodObject<{
|
|
448
449
|
filename: string;
|
449
450
|
originalFilename: string;
|
450
451
|
}[] | undefined>;
|
451
|
-
createdAt: string;
|
452
|
-
createdBy: string;
|
453
452
|
createdAtLocation: string;
|
454
|
-
|
453
|
+
annotation?: Record<string, string | number | boolean | {
|
455
454
|
type: string;
|
456
455
|
filename: string;
|
457
456
|
originalFilename: string;
|
@@ -496,8 +495,10 @@ export declare const Draft: z.ZodObject<{
|
|
496
495
|
eventId: string;
|
497
496
|
transactionId: string;
|
498
497
|
action: {
|
499
|
-
type:
|
500
|
-
|
498
|
+
type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "CREATE" | "NOTIFY" | "DETECT_DUPLICATE" | "REJECT" | "MARKED_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
|
499
|
+
createdAt: string;
|
500
|
+
createdBy: string;
|
501
|
+
declaration: Record<string, string | number | boolean | {
|
501
502
|
type: string;
|
502
503
|
filename: string;
|
503
504
|
originalFilename: string;
|
@@ -535,10 +536,8 @@ export declare const Draft: z.ZodObject<{
|
|
535
536
|
filename: string;
|
536
537
|
originalFilename: string;
|
537
538
|
}[] | undefined>;
|
538
|
-
createdAt: string;
|
539
|
-
createdBy: string;
|
540
539
|
createdAtLocation: string;
|
541
|
-
|
540
|
+
annotation?: Record<string, string | number | boolean | {
|
542
541
|
type: string;
|
543
542
|
filename: string;
|
544
543
|
originalFilename: string;
|
@@ -581,7 +580,7 @@ export declare const Draft: z.ZodObject<{
|
|
581
580
|
export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
|
582
581
|
eventId: z.ZodString;
|
583
582
|
transactionId: z.ZodString;
|
584
|
-
|
583
|
+
declaration: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
|
585
584
|
filename: z.ZodString;
|
586
585
|
originalFilename: z.ZodString;
|
587
586
|
type: z.ZodString;
|
@@ -695,7 +694,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
|
|
695
694
|
addressLine3?: string | null | undefined;
|
696
695
|
postcodeOrZip?: string | null | undefined;
|
697
696
|
}>]>>;
|
698
|
-
|
697
|
+
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
|
699
698
|
filename: z.ZodString;
|
700
699
|
originalFilename: z.ZodString;
|
701
700
|
type: z.ZodString;
|
@@ -810,10 +809,10 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
|
|
810
809
|
postcodeOrZip?: string | null | undefined;
|
811
810
|
}>]>>>;
|
812
811
|
}, {
|
813
|
-
type: z.ZodEnum<[
|
812
|
+
type: z.ZodEnum<["DELETE", "CREATE", "NOTIFY", "DECLARE", "VALIDATE", "REGISTER", "DETECT_DUPLICATE", "REJECT", "MARKED_AS_DUPLICATE", "ARCHIVE", "PRINT_CERTIFICATE", "REQUEST_CORRECTION", "REJECT_CORRECTION", "APPROVE_CORRECTION", "READ", "ASSIGN", "UNASSIGN"]>;
|
814
813
|
}>, "strip", z.ZodTypeAny, {
|
815
|
-
type:
|
816
|
-
|
814
|
+
type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "CREATE" | "NOTIFY" | "DETECT_DUPLICATE" | "REJECT" | "MARKED_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
|
815
|
+
declaration: Record<string, string | number | boolean | {
|
817
816
|
type: string;
|
818
817
|
filename: string;
|
819
818
|
originalFilename: string;
|
@@ -853,7 +852,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
|
|
853
852
|
}[] | undefined>;
|
854
853
|
eventId: string;
|
855
854
|
transactionId: string;
|
856
|
-
|
855
|
+
annotation?: Record<string, string | number | boolean | {
|
857
856
|
type: string;
|
858
857
|
filename: string;
|
859
858
|
originalFilename: string;
|
@@ -892,8 +891,8 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
|
|
892
891
|
originalFilename: string;
|
893
892
|
}[] | undefined> | undefined;
|
894
893
|
}, {
|
895
|
-
type:
|
896
|
-
|
894
|
+
type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "CREATE" | "NOTIFY" | "DETECT_DUPLICATE" | "REJECT" | "MARKED_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
|
895
|
+
declaration: Record<string, string | number | boolean | {
|
897
896
|
type: string;
|
898
897
|
filename: string;
|
899
898
|
originalFilename: string;
|
@@ -933,7 +932,7 @@ export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
|
|
933
932
|
}[] | undefined>;
|
934
933
|
eventId: string;
|
935
934
|
transactionId: string;
|
936
|
-
|
935
|
+
annotation?: Record<string, string | number | boolean | {
|
937
936
|
type: string;
|
938
937
|
filename: string;
|
939
938
|
originalFilename: string;
|