@opencrvs/toolkit 1.8.0-rc.fd6feaa → 1.8.0-rc.fd754eb
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 +10768 -13690
- package/dist/commons/conditionals/conditionals.d.ts +31 -5
- package/dist/commons/conditionals/validate.d.ts +12 -17
- package/dist/commons/events/ActionConfig.d.ts +89454 -2042
- package/dist/commons/events/ActionDocument.d.ts +8396 -446
- package/dist/commons/events/ActionInput.d.ts +3229 -704
- package/dist/commons/events/ActionType.d.ts +26 -11
- package/dist/commons/events/AdvancedSearchConfig.d.ts +369 -25
- package/dist/commons/events/CompositeFieldValue.d.ts +55 -12
- package/dist/commons/events/Conditional.d.ts +21 -5
- package/dist/commons/events/Draft.d.ts +167 -67
- package/dist/commons/events/EventConfig.d.ts +42579 -1766
- package/dist/commons/events/EventConfigInput.d.ts +6 -3
- package/dist/commons/events/EventDocument.d.ts +1751 -544
- package/dist/commons/events/EventIndex.d.ts +1346 -10
- package/dist/commons/events/EventInput.d.ts +13 -0
- package/dist/commons/events/EventMetadata.d.ts +273 -8
- package/dist/commons/events/FieldConfig.d.ts +4218 -802
- package/dist/commons/events/FieldType.d.ts +4 -3
- package/dist/commons/events/FieldTypeMapping.d.ts +67 -11
- package/dist/commons/events/FieldValue.d.ts +36 -13
- package/dist/commons/events/FormConfig.d.ts +40636 -73
- package/dist/commons/events/PageConfig.d.ts +10209 -0
- package/dist/commons/events/SummaryConfig.d.ts +95 -39
- package/dist/commons/events/TemplateConfig.d.ts +5 -5
- package/dist/commons/events/User.d.ts +5 -0
- package/dist/commons/events/WorkqueueConfig.d.ts +1135 -19
- package/dist/commons/events/defineConfig.d.ts +7030 -224
- package/dist/commons/events/event.d.ts +27 -0
- package/dist/commons/events/field.d.ts +68 -0
- package/dist/commons/events/index.d.ts +5 -1
- package/dist/commons/events/scopes.d.ts +26 -0
- package/dist/commons/events/test.utils.d.ts +84 -302
- package/dist/commons/events/utils.d.ts +3593 -95
- package/dist/commons/events/utils.test.d.ts +2 -0
- package/dist/conditionals/index.js +196 -108
- package/dist/events/index.js +2530 -1320
- package/dist/scopes/index.d.ts +70 -1
- package/dist/scopes/index.js +130 -0
- package/package.json +3 -2
@@ -6,6 +6,10 @@ export declare const GeographicalArea: {
|
|
6
6
|
readonly URBAN: "URBAN";
|
7
7
|
readonly RURAL: "RURAL";
|
8
8
|
};
|
9
|
+
export declare const AddressType: {
|
10
|
+
readonly DOMESTIC: "DOMESTIC";
|
11
|
+
readonly INTERNATIONAL: "INTERNATIONAL";
|
12
|
+
};
|
9
13
|
export declare const FileFieldValue: z.ZodObject<{
|
10
14
|
filename: z.ZodString;
|
11
15
|
originalFilename: z.ZodString;
|
@@ -21,7 +25,8 @@ export declare const FileFieldValue: z.ZodObject<{
|
|
21
25
|
}>;
|
22
26
|
export type FileFieldValue = z.infer<typeof FileFieldValue>;
|
23
27
|
export declare const UrbanAddressValue: z.ZodObject<z.objectUtil.extendShape<{
|
24
|
-
country: z.
|
28
|
+
country: z.ZodString;
|
29
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
25
30
|
province: z.ZodString;
|
26
31
|
district: z.ZodString;
|
27
32
|
}, {
|
@@ -34,6 +39,7 @@ export declare const UrbanAddressValue: z.ZodObject<z.objectUtil.extendShape<{
|
|
34
39
|
}>, "strip", z.ZodTypeAny, {
|
35
40
|
country: string;
|
36
41
|
district: string;
|
42
|
+
addressType: "DOMESTIC";
|
37
43
|
province: string;
|
38
44
|
urbanOrRural: "URBAN";
|
39
45
|
number?: string | undefined;
|
@@ -44,6 +50,7 @@ export declare const UrbanAddressValue: z.ZodObject<z.objectUtil.extendShape<{
|
|
44
50
|
}, {
|
45
51
|
country: string;
|
46
52
|
district: string;
|
53
|
+
addressType: "DOMESTIC";
|
47
54
|
province: string;
|
48
55
|
urbanOrRural: "URBAN";
|
49
56
|
number?: string | undefined;
|
@@ -53,7 +60,8 @@ export declare const UrbanAddressValue: z.ZodObject<z.objectUtil.extendShape<{
|
|
53
60
|
zipCode?: string | undefined;
|
54
61
|
}>;
|
55
62
|
export declare const RuralAddressValue: z.ZodObject<z.objectUtil.extendShape<{
|
56
|
-
country: z.
|
63
|
+
country: z.ZodString;
|
64
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
57
65
|
province: z.ZodString;
|
58
66
|
district: z.ZodString;
|
59
67
|
}, {
|
@@ -62,18 +70,21 @@ export declare const RuralAddressValue: z.ZodObject<z.objectUtil.extendShape<{
|
|
62
70
|
}>, "strip", z.ZodTypeAny, {
|
63
71
|
country: string;
|
64
72
|
district: string;
|
73
|
+
addressType: "DOMESTIC";
|
65
74
|
province: string;
|
66
75
|
urbanOrRural: "RURAL";
|
67
76
|
village?: string | undefined;
|
68
77
|
}, {
|
69
78
|
country: string;
|
70
79
|
district: string;
|
80
|
+
addressType: "DOMESTIC";
|
71
81
|
province: string;
|
72
82
|
urbanOrRural: "RURAL";
|
73
83
|
village?: string | undefined;
|
74
84
|
}>;
|
75
85
|
export declare const UrbanAddressUpdateValue: z.ZodObject<z.objectUtil.extendShape<{
|
76
|
-
country: z.
|
86
|
+
country: z.ZodString;
|
87
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
77
88
|
province: z.ZodString;
|
78
89
|
district: z.ZodString;
|
79
90
|
}, {
|
@@ -86,6 +97,7 @@ export declare const UrbanAddressUpdateValue: z.ZodObject<z.objectUtil.extendSha
|
|
86
97
|
}>, "strip", z.ZodTypeAny, {
|
87
98
|
country: string;
|
88
99
|
district: string;
|
100
|
+
addressType: "DOMESTIC";
|
89
101
|
province: string;
|
90
102
|
urbanOrRural: "URBAN";
|
91
103
|
number?: string | null | undefined;
|
@@ -96,6 +108,7 @@ export declare const UrbanAddressUpdateValue: z.ZodObject<z.objectUtil.extendSha
|
|
96
108
|
}, {
|
97
109
|
country: string;
|
98
110
|
district: string;
|
111
|
+
addressType: "DOMESTIC";
|
99
112
|
province: string;
|
100
113
|
urbanOrRural: "URBAN";
|
101
114
|
number?: string | null | undefined;
|
@@ -104,8 +117,10 @@ export declare const UrbanAddressUpdateValue: z.ZodObject<z.objectUtil.extendSha
|
|
104
117
|
street?: string | null | undefined;
|
105
118
|
zipCode?: string | null | undefined;
|
106
119
|
}>;
|
120
|
+
export type UrbanAddressUpdateValue = z.infer<typeof UrbanAddressUpdateValue>;
|
107
121
|
export declare const RuralAddressUpdateValue: z.ZodObject<z.objectUtil.extendShape<{
|
108
|
-
country: z.
|
122
|
+
country: z.ZodString;
|
123
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
109
124
|
province: z.ZodString;
|
110
125
|
district: z.ZodString;
|
111
126
|
}, {
|
@@ -114,18 +129,22 @@ export declare const RuralAddressUpdateValue: z.ZodObject<z.objectUtil.extendSha
|
|
114
129
|
}>, "strip", z.ZodTypeAny, {
|
115
130
|
country: string;
|
116
131
|
district: string;
|
132
|
+
addressType: "DOMESTIC";
|
117
133
|
province: string;
|
118
134
|
urbanOrRural: "RURAL";
|
119
135
|
village?: string | null | undefined;
|
120
136
|
}, {
|
121
137
|
country: string;
|
122
138
|
district: string;
|
139
|
+
addressType: "DOMESTIC";
|
123
140
|
province: string;
|
124
141
|
urbanOrRural: "RURAL";
|
125
142
|
village?: string | null | undefined;
|
126
143
|
}>;
|
144
|
+
export type RuralAddressUpdateValue = z.infer<typeof RuralAddressUpdateValue>;
|
127
145
|
export declare const GenericAddressValue: z.ZodObject<{
|
128
|
-
country: z.
|
146
|
+
country: z.ZodString;
|
147
|
+
addressType: z.ZodLiteral<"INTERNATIONAL">;
|
129
148
|
state: z.ZodString;
|
130
149
|
district2: z.ZodString;
|
131
150
|
cityOrTown: z.ZodOptional<z.ZodString>;
|
@@ -136,6 +155,7 @@ export declare const GenericAddressValue: z.ZodObject<{
|
|
136
155
|
}, "strip", z.ZodTypeAny, {
|
137
156
|
country: string;
|
138
157
|
state: string;
|
158
|
+
addressType: "INTERNATIONAL";
|
139
159
|
district2: string;
|
140
160
|
cityOrTown?: string | undefined;
|
141
161
|
addressLine1?: string | undefined;
|
@@ -145,6 +165,7 @@ export declare const GenericAddressValue: z.ZodObject<{
|
|
145
165
|
}, {
|
146
166
|
country: string;
|
147
167
|
state: string;
|
168
|
+
addressType: "INTERNATIONAL";
|
148
169
|
district2: string;
|
149
170
|
cityOrTown?: string | undefined;
|
150
171
|
addressLine1?: string | undefined;
|
@@ -153,7 +174,8 @@ export declare const GenericAddressValue: z.ZodObject<{
|
|
153
174
|
postcodeOrZip?: string | undefined;
|
154
175
|
}>;
|
155
176
|
export declare const AddressFieldValue: z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
|
156
|
-
country: z.
|
177
|
+
country: z.ZodString;
|
178
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
157
179
|
province: z.ZodString;
|
158
180
|
district: z.ZodString;
|
159
181
|
}, {
|
@@ -166,6 +188,7 @@ export declare const AddressFieldValue: z.ZodUnion<[z.ZodDiscriminatedUnion<"urb
|
|
166
188
|
}>, "strip", z.ZodTypeAny, {
|
167
189
|
country: string;
|
168
190
|
district: string;
|
191
|
+
addressType: "DOMESTIC";
|
169
192
|
province: string;
|
170
193
|
urbanOrRural: "URBAN";
|
171
194
|
number?: string | undefined;
|
@@ -176,6 +199,7 @@ export declare const AddressFieldValue: z.ZodUnion<[z.ZodDiscriminatedUnion<"urb
|
|
176
199
|
}, {
|
177
200
|
country: string;
|
178
201
|
district: string;
|
202
|
+
addressType: "DOMESTIC";
|
179
203
|
province: string;
|
180
204
|
urbanOrRural: "URBAN";
|
181
205
|
number?: string | undefined;
|
@@ -184,7 +208,8 @@ export declare const AddressFieldValue: z.ZodUnion<[z.ZodDiscriminatedUnion<"urb
|
|
184
208
|
street?: string | undefined;
|
185
209
|
zipCode?: string | undefined;
|
186
210
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
187
|
-
country: z.
|
211
|
+
country: z.ZodString;
|
212
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
188
213
|
province: z.ZodString;
|
189
214
|
district: z.ZodString;
|
190
215
|
}, {
|
@@ -193,17 +218,20 @@ export declare const AddressFieldValue: z.ZodUnion<[z.ZodDiscriminatedUnion<"urb
|
|
193
218
|
}>, "strip", z.ZodTypeAny, {
|
194
219
|
country: string;
|
195
220
|
district: string;
|
221
|
+
addressType: "DOMESTIC";
|
196
222
|
province: string;
|
197
223
|
urbanOrRural: "RURAL";
|
198
224
|
village?: string | undefined;
|
199
225
|
}, {
|
200
226
|
country: string;
|
201
227
|
district: string;
|
228
|
+
addressType: "DOMESTIC";
|
202
229
|
province: string;
|
203
230
|
urbanOrRural: "RURAL";
|
204
231
|
village?: string | undefined;
|
205
232
|
}>]>, z.ZodObject<{
|
206
|
-
country: z.
|
233
|
+
country: z.ZodString;
|
234
|
+
addressType: z.ZodLiteral<"INTERNATIONAL">;
|
207
235
|
state: z.ZodString;
|
208
236
|
district2: z.ZodString;
|
209
237
|
cityOrTown: z.ZodOptional<z.ZodString>;
|
@@ -214,6 +242,7 @@ export declare const AddressFieldValue: z.ZodUnion<[z.ZodDiscriminatedUnion<"urb
|
|
214
242
|
}, "strip", z.ZodTypeAny, {
|
215
243
|
country: string;
|
216
244
|
state: string;
|
245
|
+
addressType: "INTERNATIONAL";
|
217
246
|
district2: string;
|
218
247
|
cityOrTown?: string | undefined;
|
219
248
|
addressLine1?: string | undefined;
|
@@ -223,6 +252,7 @@ export declare const AddressFieldValue: z.ZodUnion<[z.ZodDiscriminatedUnion<"urb
|
|
223
252
|
}, {
|
224
253
|
country: string;
|
225
254
|
state: string;
|
255
|
+
addressType: "INTERNATIONAL";
|
226
256
|
district2: string;
|
227
257
|
cityOrTown?: string | undefined;
|
228
258
|
addressLine1?: string | undefined;
|
@@ -231,7 +261,8 @@ export declare const AddressFieldValue: z.ZodUnion<[z.ZodDiscriminatedUnion<"urb
|
|
231
261
|
postcodeOrZip?: string | undefined;
|
232
262
|
}>]>;
|
233
263
|
export declare const GenericAddressUpdateValue: z.ZodObject<{
|
234
|
-
country: z.
|
264
|
+
country: z.ZodString;
|
265
|
+
addressType: z.ZodLiteral<"INTERNATIONAL">;
|
235
266
|
state: z.ZodString;
|
236
267
|
district2: z.ZodString;
|
237
268
|
cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
@@ -242,6 +273,7 @@ export declare const GenericAddressUpdateValue: z.ZodObject<{
|
|
242
273
|
}, "strip", z.ZodTypeAny, {
|
243
274
|
country: string;
|
244
275
|
state: string;
|
276
|
+
addressType: "INTERNATIONAL";
|
245
277
|
district2: string;
|
246
278
|
cityOrTown?: string | null | undefined;
|
247
279
|
addressLine1?: string | null | undefined;
|
@@ -251,6 +283,7 @@ export declare const GenericAddressUpdateValue: z.ZodObject<{
|
|
251
283
|
}, {
|
252
284
|
country: string;
|
253
285
|
state: string;
|
286
|
+
addressType: "INTERNATIONAL";
|
254
287
|
district2: string;
|
255
288
|
cityOrTown?: string | null | undefined;
|
256
289
|
addressLine1?: string | null | undefined;
|
@@ -258,8 +291,10 @@ export declare const GenericAddressUpdateValue: z.ZodObject<{
|
|
258
291
|
addressLine3?: string | null | undefined;
|
259
292
|
postcodeOrZip?: string | null | undefined;
|
260
293
|
}>;
|
294
|
+
export type GenericAddressUpdateValue = z.infer<typeof GenericAddressUpdateValue>;
|
261
295
|
export declare const AddressFieldUpdateValue: z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
|
262
|
-
country: z.
|
296
|
+
country: z.ZodString;
|
297
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
263
298
|
province: z.ZodString;
|
264
299
|
district: z.ZodString;
|
265
300
|
}, {
|
@@ -272,6 +307,7 @@ export declare const AddressFieldUpdateValue: z.ZodUnion<[z.ZodDiscriminatedUnio
|
|
272
307
|
}>, "strip", z.ZodTypeAny, {
|
273
308
|
country: string;
|
274
309
|
district: string;
|
310
|
+
addressType: "DOMESTIC";
|
275
311
|
province: string;
|
276
312
|
urbanOrRural: "URBAN";
|
277
313
|
number?: string | null | undefined;
|
@@ -282,6 +318,7 @@ export declare const AddressFieldUpdateValue: z.ZodUnion<[z.ZodDiscriminatedUnio
|
|
282
318
|
}, {
|
283
319
|
country: string;
|
284
320
|
district: string;
|
321
|
+
addressType: "DOMESTIC";
|
285
322
|
province: string;
|
286
323
|
urbanOrRural: "URBAN";
|
287
324
|
number?: string | null | undefined;
|
@@ -290,7 +327,8 @@ export declare const AddressFieldUpdateValue: z.ZodUnion<[z.ZodDiscriminatedUnio
|
|
290
327
|
street?: string | null | undefined;
|
291
328
|
zipCode?: string | null | undefined;
|
292
329
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
293
|
-
country: z.
|
330
|
+
country: z.ZodString;
|
331
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
294
332
|
province: z.ZodString;
|
295
333
|
district: z.ZodString;
|
296
334
|
}, {
|
@@ -299,17 +337,20 @@ export declare const AddressFieldUpdateValue: z.ZodUnion<[z.ZodDiscriminatedUnio
|
|
299
337
|
}>, "strip", z.ZodTypeAny, {
|
300
338
|
country: string;
|
301
339
|
district: string;
|
340
|
+
addressType: "DOMESTIC";
|
302
341
|
province: string;
|
303
342
|
urbanOrRural: "RURAL";
|
304
343
|
village?: string | null | undefined;
|
305
344
|
}, {
|
306
345
|
country: string;
|
307
346
|
district: string;
|
347
|
+
addressType: "DOMESTIC";
|
308
348
|
province: string;
|
309
349
|
urbanOrRural: "RURAL";
|
310
350
|
village?: string | null | undefined;
|
311
351
|
}>]>, z.ZodObject<{
|
312
|
-
country: z.
|
352
|
+
country: z.ZodString;
|
353
|
+
addressType: z.ZodLiteral<"INTERNATIONAL">;
|
313
354
|
state: z.ZodString;
|
314
355
|
district2: z.ZodString;
|
315
356
|
cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
@@ -320,6 +361,7 @@ export declare const AddressFieldUpdateValue: z.ZodUnion<[z.ZodDiscriminatedUnio
|
|
320
361
|
}, "strip", z.ZodTypeAny, {
|
321
362
|
country: string;
|
322
363
|
state: string;
|
364
|
+
addressType: "INTERNATIONAL";
|
323
365
|
district2: string;
|
324
366
|
cityOrTown?: string | null | undefined;
|
325
367
|
addressLine1?: string | null | undefined;
|
@@ -329,6 +371,7 @@ export declare const AddressFieldUpdateValue: z.ZodUnion<[z.ZodDiscriminatedUnio
|
|
329
371
|
}, {
|
330
372
|
country: string;
|
331
373
|
state: string;
|
374
|
+
addressType: "INTERNATIONAL";
|
332
375
|
district2: string;
|
333
376
|
cityOrTown?: string | null | undefined;
|
334
377
|
addressLine1?: string | null | undefined;
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import { JSONSchema } from '../conditionals/conditionals';
|
2
2
|
import { z } from 'zod';
|
3
|
-
export declare
|
3
|
+
export declare const Conditional: z.ZodType<JSONSchema, z.ZodTypeDef, JSONSchema>;
|
4
4
|
/**
|
5
5
|
* By default, when conditionals are undefined, action is visible and enabled to everyone.
|
6
6
|
*/
|
7
7
|
export declare const ConditionalType: {
|
8
|
-
/** When 'SHOW' conditional is defined, the action is shown to the user only if the condition is met */
|
9
8
|
readonly SHOW: "SHOW";
|
10
|
-
/** If 'ENABLE' conditional is defined, the action is enabled only if the condition is met */
|
11
9
|
readonly ENABLE: "ENABLE";
|
10
|
+
readonly DISPLAY_ON_REVIEW: "DISPLAY_ON_REVIEW";
|
12
11
|
};
|
12
|
+
export type ConditionalType = (typeof ConditionalType)[keyof typeof ConditionalType];
|
13
13
|
export declare const ShowConditional: z.ZodObject<{
|
14
14
|
type: z.ZodLiteral<"SHOW">;
|
15
15
|
conditional: z.ZodType<JSONSchema, z.ZodTypeDef, JSONSchema>;
|
@@ -31,9 +31,25 @@ export declare const EnableConditional: z.ZodObject<{
|
|
31
31
|
conditional: JSONSchema;
|
32
32
|
}>;
|
33
33
|
/** @knipignore */
|
34
|
-
export type
|
34
|
+
export type ActionConditionalType = typeof ShowConditional | typeof EnableConditional;
|
35
35
|
/** @knipignore */
|
36
36
|
export type InferredActionConditional = z.infer<typeof ShowConditional> | z.infer<typeof EnableConditional>;
|
37
|
-
export declare const ActionConditional: z.ZodDiscriminatedUnion<"type",
|
37
|
+
export declare const ActionConditional: z.ZodDiscriminatedUnion<"type", ActionConditionalType[]>;
|
38
38
|
export type ActionConditional = InferredActionConditional;
|
39
|
+
export declare const DisplayOnReviewConditional: z.ZodObject<{
|
40
|
+
type: z.ZodLiteral<"DISPLAY_ON_REVIEW">;
|
41
|
+
conditional: z.ZodType<JSONSchema, z.ZodTypeDef, JSONSchema>;
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
43
|
+
type: "DISPLAY_ON_REVIEW";
|
44
|
+
conditional: JSONSchema;
|
45
|
+
}, {
|
46
|
+
type: "DISPLAY_ON_REVIEW";
|
47
|
+
conditional: JSONSchema;
|
48
|
+
}>;
|
49
|
+
/** @knipignore */
|
50
|
+
export type FieldConditionalType = typeof ShowConditional | typeof EnableConditional | typeof DisplayOnReviewConditional;
|
51
|
+
/** @knipignore */
|
52
|
+
export type InferredFieldConditional = z.infer<typeof ShowConditional> | z.infer<typeof EnableConditional> | z.infer<typeof DisplayOnReviewConditional>;
|
53
|
+
export declare const FieldConditional: z.ZodDiscriminatedUnion<"type", FieldConditionalType[]>;
|
54
|
+
export type FieldConditional = z.infer<typeof FieldConditional>;
|
39
55
|
//# sourceMappingURL=Conditional.d.ts.map
|