@opencrvs/toolkit 2.1.0-rc.40789ee → 2.1.0-rc.462d2a9
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/application-config/index.js +200 -189
- package/dist/commons/conditionals/conditionals.d.ts +3 -3
- package/dist/commons/conditionals/validate.d.ts +2 -1
- package/dist/commons/events/ActionConfig.d.ts +21 -0
- package/dist/commons/events/ActionDocument.d.ts +1 -7
- package/dist/commons/events/ActionStatus.d.ts +14 -0
- package/dist/commons/events/AdvancedSearchConfig.d.ts +6 -0
- package/dist/commons/events/CountryConfigQueryInput.d.ts +18 -0
- package/dist/commons/events/EventIndex.d.ts +5 -24
- package/dist/commons/events/EventMetadata.d.ts +1 -0
- package/dist/commons/events/FieldConfig.d.ts +5 -0
- package/dist/commons/events/FieldTypeMapping.d.ts +19 -19
- package/dist/commons/events/Flag.d.ts +48 -0
- package/dist/commons/events/WorkqueueConfig.d.ts +27 -12
- package/dist/conditionals/index.js +303 -55
- package/dist/events/index.js +3203 -3163
- package/dist/notification/index.js +1442 -879
- package/dist/scopes/index.d.ts +250 -0
- package/dist/scopes/index.js +304 -55
- package/opencrvs-toolkit-2.1.0-rc.462d2a9.tgz +0 -0
- package/package.json +2 -3
- package/tsconfig.tsbuildinfo +1 -1
- package/opencrvs-toolkit-2.1.0-rc.40789ee.tgz +0 -0
|
@@ -11,6 +11,7 @@ export declare const InherentFlags: {
|
|
|
11
11
|
* We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
|
|
12
12
|
*/
|
|
13
13
|
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
14
|
+
readonly SEALED: 'sealed';
|
|
14
15
|
};
|
|
15
16
|
export type InherentFlags = (typeof InherentFlags)[keyof typeof InherentFlags];
|
|
16
17
|
export declare const ActionFlag: z.ZodString;
|
|
@@ -30,8 +31,54 @@ export declare const Flag: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
|
30
31
|
* We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
|
|
31
32
|
*/
|
|
32
33
|
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
34
|
+
readonly SEALED: 'sealed';
|
|
33
35
|
}>]>, z.ZodString]>;
|
|
34
36
|
export type Flag = z.infer<typeof Flag>;
|
|
37
|
+
export declare const ContainsFlags: z.ZodObject<{
|
|
38
|
+
anyOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
39
|
+
readonly INCOMPLETE: 'incomplete';
|
|
40
|
+
readonly REJECTED: 'rejected';
|
|
41
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
42
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
43
|
+
/**
|
|
44
|
+
* This flag is set by the Edit-action and removed after the declaration or registration.
|
|
45
|
+
* A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
|
|
46
|
+
*
|
|
47
|
+
* We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
|
|
48
|
+
*/
|
|
49
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
50
|
+
readonly SEALED: 'sealed';
|
|
51
|
+
}>]>, z.ZodString]>>>;
|
|
52
|
+
noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
53
|
+
readonly INCOMPLETE: 'incomplete';
|
|
54
|
+
readonly REJECTED: 'rejected';
|
|
55
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
56
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
57
|
+
/**
|
|
58
|
+
* This flag is set by the Edit-action and removed after the declaration or registration.
|
|
59
|
+
* A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
|
|
60
|
+
*
|
|
61
|
+
* We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
|
|
62
|
+
*/
|
|
63
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
64
|
+
readonly SEALED: 'sealed';
|
|
65
|
+
}>]>, z.ZodString]>>>;
|
|
66
|
+
allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
67
|
+
readonly INCOMPLETE: 'incomplete';
|
|
68
|
+
readonly REJECTED: 'rejected';
|
|
69
|
+
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
70
|
+
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
71
|
+
/**
|
|
72
|
+
* This flag is set by the Edit-action and removed after the declaration or registration.
|
|
73
|
+
* A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
|
|
74
|
+
*
|
|
75
|
+
* We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
|
|
76
|
+
*/
|
|
77
|
+
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
78
|
+
readonly SEALED: 'sealed';
|
|
79
|
+
}>]>, z.ZodString]>>>;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
export type ContainsFlags = z.infer<typeof ContainsFlags>;
|
|
35
82
|
/**
|
|
36
83
|
* Configuration of a custom flag that can be associated with a certain event type.
|
|
37
84
|
*/
|
|
@@ -57,6 +104,7 @@ export declare const ActionFlagConfig: z.ZodObject<{
|
|
|
57
104
|
* We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
|
|
58
105
|
*/
|
|
59
106
|
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
107
|
+
readonly SEALED: 'sealed';
|
|
60
108
|
}>]>, z.ZodString]>;
|
|
61
109
|
operation: z.ZodEnum<{
|
|
62
110
|
add: "add";
|
|
@@ -314,6 +314,7 @@ export declare const WorkqueueConfig: z.ZodObject<{
|
|
|
314
314
|
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
315
315
|
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
316
316
|
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
317
|
+
readonly SEALED: 'sealed';
|
|
317
318
|
}>]>, z.ZodString]>>>;
|
|
318
319
|
noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
319
320
|
readonly INCOMPLETE: 'incomplete';
|
|
@@ -321,6 +322,7 @@ export declare const WorkqueueConfig: z.ZodObject<{
|
|
|
321
322
|
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
322
323
|
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
323
324
|
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
325
|
+
readonly SEALED: 'sealed';
|
|
324
326
|
}>]>, z.ZodString]>>>;
|
|
325
327
|
allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
326
328
|
readonly INCOMPLETE: 'incomplete';
|
|
@@ -328,6 +330,7 @@ export declare const WorkqueueConfig: z.ZodObject<{
|
|
|
328
330
|
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
329
331
|
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
330
332
|
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
333
|
+
readonly SEALED: 'sealed';
|
|
331
334
|
}>]>, z.ZodString]>>>;
|
|
332
335
|
}, z.core.$strip>>>;
|
|
333
336
|
data: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
@@ -631,6 +634,7 @@ export declare const WorkqueueConfig: z.ZodObject<{
|
|
|
631
634
|
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
632
635
|
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
633
636
|
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
637
|
+
readonly SEALED: 'sealed';
|
|
634
638
|
}>]>, z.ZodString]>>>;
|
|
635
639
|
noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
636
640
|
readonly INCOMPLETE: 'incomplete';
|
|
@@ -638,6 +642,7 @@ export declare const WorkqueueConfig: z.ZodObject<{
|
|
|
638
642
|
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
639
643
|
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
640
644
|
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
645
|
+
readonly SEALED: 'sealed';
|
|
641
646
|
}>]>, z.ZodString]>>>;
|
|
642
647
|
allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
643
648
|
readonly INCOMPLETE: 'incomplete';
|
|
@@ -645,6 +650,7 @@ export declare const WorkqueueConfig: z.ZodObject<{
|
|
|
645
650
|
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
646
651
|
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
647
652
|
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
653
|
+
readonly SEALED: 'sealed';
|
|
648
654
|
}>]>, z.ZodString]>>>;
|
|
649
655
|
}, z.core.$strip>>>;
|
|
650
656
|
data: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
@@ -1370,6 +1376,7 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
|
|
|
1370
1376
|
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
1371
1377
|
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
1372
1378
|
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
1379
|
+
readonly SEALED: 'sealed';
|
|
1373
1380
|
}>]>, z.ZodString]>>>;
|
|
1374
1381
|
noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
1375
1382
|
readonly INCOMPLETE: 'incomplete';
|
|
@@ -1377,6 +1384,7 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
|
|
|
1377
1384
|
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
1378
1385
|
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
1379
1386
|
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
1387
|
+
readonly SEALED: 'sealed';
|
|
1380
1388
|
}>]>, z.ZodString]>>>;
|
|
1381
1389
|
allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
1382
1390
|
readonly INCOMPLETE: 'incomplete';
|
|
@@ -1384,6 +1392,7 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
|
|
|
1384
1392
|
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
1385
1393
|
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
1386
1394
|
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
1395
|
+
readonly SEALED: 'sealed';
|
|
1387
1396
|
}>]>, z.ZodString]>>>;
|
|
1388
1397
|
}, z.core.$strip>>>;
|
|
1389
1398
|
data: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
@@ -1686,6 +1695,7 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
|
|
|
1686
1695
|
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
1687
1696
|
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
1688
1697
|
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
1698
|
+
readonly SEALED: 'sealed';
|
|
1689
1699
|
}>]>, z.ZodString]>>>;
|
|
1690
1700
|
noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
1691
1701
|
readonly INCOMPLETE: 'incomplete';
|
|
@@ -1693,6 +1703,7 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
|
|
|
1693
1703
|
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
1694
1704
|
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
1695
1705
|
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
1706
|
+
readonly SEALED: 'sealed';
|
|
1696
1707
|
}>]>, z.ZodString]>>>;
|
|
1697
1708
|
allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
1698
1709
|
readonly INCOMPLETE: 'incomplete';
|
|
@@ -1700,6 +1711,7 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
|
|
|
1700
1711
|
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
1701
1712
|
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
1702
1713
|
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
1714
|
+
readonly SEALED: 'sealed';
|
|
1703
1715
|
}>]>, z.ZodString]>>>;
|
|
1704
1716
|
}, z.core.$strip>>>;
|
|
1705
1717
|
data: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
@@ -2003,6 +2015,7 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
|
|
|
2003
2015
|
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
2004
2016
|
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
2005
2017
|
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
2018
|
+
readonly SEALED: 'sealed';
|
|
2006
2019
|
}>]>, z.ZodString]>>>;
|
|
2007
2020
|
noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
2008
2021
|
readonly INCOMPLETE: 'incomplete';
|
|
@@ -2010,6 +2023,7 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
|
|
|
2010
2023
|
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
2011
2024
|
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
2012
2025
|
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
2026
|
+
readonly SEALED: 'sealed';
|
|
2013
2027
|
}>]>, z.ZodString]>>>;
|
|
2014
2028
|
allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
2015
2029
|
readonly INCOMPLETE: 'incomplete';
|
|
@@ -2017,6 +2031,7 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
|
|
|
2017
2031
|
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
2018
2032
|
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
2019
2033
|
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
2034
|
+
readonly SEALED: 'sealed';
|
|
2020
2035
|
}>]>, z.ZodString]>>>;
|
|
2021
2036
|
}, z.core.$strip>>>;
|
|
2022
2037
|
data: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
@@ -2038,11 +2053,11 @@ export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
|
|
|
2038
2053
|
clauses: {
|
|
2039
2054
|
eventType?: string | undefined;
|
|
2040
2055
|
status?: {
|
|
2041
|
-
type: "anyOf";
|
|
2042
|
-
terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
|
|
2043
|
-
} | {
|
|
2044
2056
|
type: "exact";
|
|
2045
2057
|
term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED";
|
|
2058
|
+
} | {
|
|
2059
|
+
type: "anyOf";
|
|
2060
|
+
terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
|
|
2046
2061
|
} | undefined;
|
|
2047
2062
|
createdAt?: {
|
|
2048
2063
|
type: "range";
|
|
@@ -2177,11 +2192,11 @@ export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
|
|
|
2177
2192
|
clauses: {
|
|
2178
2193
|
eventType?: string | undefined;
|
|
2179
2194
|
status?: {
|
|
2180
|
-
type: "anyOf";
|
|
2181
|
-
terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
|
|
2182
|
-
} | {
|
|
2183
2195
|
type: "exact";
|
|
2184
2196
|
term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED";
|
|
2197
|
+
} | {
|
|
2198
|
+
type: "anyOf";
|
|
2199
|
+
terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
|
|
2185
2200
|
} | undefined;
|
|
2186
2201
|
createdAt?: {
|
|
2187
2202
|
type: "range";
|
|
@@ -2349,11 +2364,11 @@ export declare function defineWorkqueues(workqueues: WorkqueueConfigInputWithV19
|
|
|
2349
2364
|
clauses: {
|
|
2350
2365
|
eventType?: string | undefined;
|
|
2351
2366
|
status?: {
|
|
2352
|
-
type: "anyOf";
|
|
2353
|
-
terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
|
|
2354
|
-
} | {
|
|
2355
2367
|
type: "exact";
|
|
2356
2368
|
term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED";
|
|
2369
|
+
} | {
|
|
2370
|
+
type: "anyOf";
|
|
2371
|
+
terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
|
|
2357
2372
|
} | undefined;
|
|
2358
2373
|
createdAt?: {
|
|
2359
2374
|
type: "range";
|
|
@@ -2488,11 +2503,11 @@ export declare function defineWorkqueues(workqueues: WorkqueueConfigInputWithV19
|
|
|
2488
2503
|
clauses: {
|
|
2489
2504
|
eventType?: string | undefined;
|
|
2490
2505
|
status?: {
|
|
2491
|
-
type: "anyOf";
|
|
2492
|
-
terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
|
|
2493
|
-
} | {
|
|
2494
2506
|
type: "exact";
|
|
2495
2507
|
term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED";
|
|
2508
|
+
} | {
|
|
2509
|
+
type: "anyOf";
|
|
2510
|
+
terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
|
|
2496
2511
|
} | undefined;
|
|
2497
2512
|
createdAt?: {
|
|
2498
2513
|
type: "range";
|