@opencrvs/toolkit 1.8.0-rc.f466807 → 1.8.0-rc.f7e8fb5
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 +445 -697
- package/dist/commons/conditionals/validate.d.ts +0 -27
- package/dist/commons/events/ActionConfig.d.ts +142 -4410
- package/dist/commons/events/ActionDocument.d.ts +103 -103
- package/dist/commons/events/ActionInput.d.ts +156 -156
- package/dist/commons/events/Draft.d.ts +16 -16
- package/dist/commons/events/EventConfig.d.ts +112 -1680
- package/dist/commons/events/EventConfigInput.d.ts +2 -2
- package/dist/commons/events/EventDocument.d.ts +150 -150
- package/dist/commons/events/FieldConfig.d.ts +2 -158
- package/dist/commons/events/FieldType.d.ts +1 -2
- package/dist/commons/events/FieldTypeMapping.d.ts +2 -52
- package/dist/commons/events/FieldValue.d.ts +4 -6
- package/dist/commons/events/FormConfig.d.ts +23 -361
- package/dist/commons/events/defineConfig.d.ts +28 -280
- package/dist/commons/events/test.utils.d.ts +13 -15
- package/dist/commons/events/utils.d.ts +11 -84
- package/dist/events/index.js +57 -466
- package/package.json +1 -1
- package/dist/commons/conditionals/validate.test.d.ts +0 -2
@@ -1,9 +1,5 @@
|
|
1
1
|
import { z } from 'zod';
|
2
2
|
import { TranslationConfig } from './TranslationConfig';
|
3
|
-
export declare const FormPageType: {
|
4
|
-
readonly FORM: "FORM";
|
5
|
-
readonly VERIFICATION: "VERIFICATION";
|
6
|
-
};
|
7
3
|
export declare const FormPage: z.ZodObject<{
|
8
4
|
id: z.ZodString;
|
9
5
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
@@ -12,9 +8,7 @@ export declare const FormPage: z.ZodObject<{
|
|
12
8
|
defaultMessage: string;
|
13
9
|
}>;
|
14
10
|
fields: z.ZodArray<z.ZodType<import("./FieldConfig").Inferred, any, import("./FieldConfig").Inferred>, "many">;
|
15
|
-
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
16
11
|
}, "strip", z.ZodTypeAny, {
|
17
|
-
type: "FORM";
|
18
12
|
id: string;
|
19
13
|
title: TranslationConfig;
|
20
14
|
fields: import("./FieldConfig").Inferred[];
|
@@ -26,329 +20,53 @@ export declare const FormPage: z.ZodObject<{
|
|
26
20
|
defaultMessage: string;
|
27
21
|
};
|
28
22
|
fields: import("./FieldConfig").Inferred[];
|
29
|
-
type?: "FORM" | undefined;
|
30
23
|
}>;
|
31
|
-
export declare const
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
defaultMessage: string;
|
37
|
-
}>;
|
38
|
-
}, "strip", z.ZodTypeAny, {
|
39
|
-
label: TranslationConfig;
|
40
|
-
}, {
|
41
|
-
label: {
|
42
|
-
id: string;
|
43
|
-
description: string;
|
44
|
-
defaultMessage: string;
|
45
|
-
};
|
24
|
+
export declare const FormConfig: z.ZodObject<{
|
25
|
+
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
26
|
+
id: string;
|
27
|
+
description: string;
|
28
|
+
defaultMessage: string;
|
46
29
|
}>;
|
47
|
-
|
30
|
+
version: z.ZodObject<{
|
31
|
+
id: z.ZodString;
|
48
32
|
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
49
33
|
id: string;
|
50
34
|
description: string;
|
51
35
|
defaultMessage: string;
|
52
36
|
}>;
|
53
|
-
confirmation: z.ZodObject<{
|
54
|
-
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
55
|
-
id: string;
|
56
|
-
description: string;
|
57
|
-
defaultMessage: string;
|
58
|
-
}>;
|
59
|
-
body: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
60
|
-
id: string;
|
61
|
-
description: string;
|
62
|
-
defaultMessage: string;
|
63
|
-
}>;
|
64
|
-
}, "strip", z.ZodTypeAny, {
|
65
|
-
title: TranslationConfig;
|
66
|
-
body: TranslationConfig;
|
67
|
-
}, {
|
68
|
-
title: {
|
69
|
-
id: string;
|
70
|
-
description: string;
|
71
|
-
defaultMessage: string;
|
72
|
-
};
|
73
|
-
body: {
|
74
|
-
id: string;
|
75
|
-
description: string;
|
76
|
-
defaultMessage: string;
|
77
|
-
};
|
78
|
-
}>;
|
79
37
|
}, "strip", z.ZodTypeAny, {
|
38
|
+
id: string;
|
80
39
|
label: TranslationConfig;
|
81
|
-
confirmation: {
|
82
|
-
title: TranslationConfig;
|
83
|
-
body: TranslationConfig;
|
84
|
-
};
|
85
40
|
}, {
|
41
|
+
id: string;
|
86
42
|
label: {
|
87
43
|
id: string;
|
88
44
|
description: string;
|
89
45
|
defaultMessage: string;
|
90
46
|
};
|
91
|
-
confirmation: {
|
92
|
-
title: {
|
93
|
-
id: string;
|
94
|
-
description: string;
|
95
|
-
defaultMessage: string;
|
96
|
-
};
|
97
|
-
body: {
|
98
|
-
id: string;
|
99
|
-
description: string;
|
100
|
-
defaultMessage: string;
|
101
|
-
};
|
102
|
-
};
|
103
|
-
}>;
|
104
|
-
}, "strip", z.ZodTypeAny, {
|
105
|
-
verify: {
|
106
|
-
label: TranslationConfig;
|
107
|
-
};
|
108
|
-
cancel: {
|
109
|
-
label: TranslationConfig;
|
110
|
-
confirmation: {
|
111
|
-
title: TranslationConfig;
|
112
|
-
body: TranslationConfig;
|
113
|
-
};
|
114
|
-
};
|
115
|
-
}, {
|
116
|
-
verify: {
|
117
|
-
label: {
|
118
|
-
id: string;
|
119
|
-
description: string;
|
120
|
-
defaultMessage: string;
|
121
|
-
};
|
122
|
-
};
|
123
|
-
cancel: {
|
124
|
-
label: {
|
125
|
-
id: string;
|
126
|
-
description: string;
|
127
|
-
defaultMessage: string;
|
128
|
-
};
|
129
|
-
confirmation: {
|
130
|
-
title: {
|
131
|
-
id: string;
|
132
|
-
description: string;
|
133
|
-
defaultMessage: string;
|
134
|
-
};
|
135
|
-
body: {
|
136
|
-
id: string;
|
137
|
-
description: string;
|
138
|
-
defaultMessage: string;
|
139
|
-
};
|
140
|
-
};
|
141
|
-
};
|
142
|
-
}>;
|
143
|
-
export declare const VerificationPage: z.ZodObject<z.objectUtil.extendShape<{
|
144
|
-
id: z.ZodString;
|
145
|
-
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
146
|
-
id: string;
|
147
|
-
description: string;
|
148
|
-
defaultMessage: string;
|
149
|
-
}>;
|
150
|
-
fields: z.ZodArray<z.ZodType<import("./FieldConfig").Inferred, any, import("./FieldConfig").Inferred>, "many">;
|
151
|
-
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
152
|
-
}, {
|
153
|
-
type: z.ZodLiteral<"VERIFICATION">;
|
154
|
-
actions: z.ZodObject<{
|
155
|
-
verify: z.ZodObject<{
|
156
|
-
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
157
|
-
id: string;
|
158
|
-
description: string;
|
159
|
-
defaultMessage: string;
|
160
|
-
}>;
|
161
|
-
}, "strip", z.ZodTypeAny, {
|
162
|
-
label: TranslationConfig;
|
163
|
-
}, {
|
164
|
-
label: {
|
165
|
-
id: string;
|
166
|
-
description: string;
|
167
|
-
defaultMessage: string;
|
168
|
-
};
|
169
|
-
}>;
|
170
|
-
cancel: z.ZodObject<{
|
171
|
-
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
172
|
-
id: string;
|
173
|
-
description: string;
|
174
|
-
defaultMessage: string;
|
175
|
-
}>;
|
176
|
-
confirmation: z.ZodObject<{
|
177
|
-
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
178
|
-
id: string;
|
179
|
-
description: string;
|
180
|
-
defaultMessage: string;
|
181
|
-
}>;
|
182
|
-
body: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
183
|
-
id: string;
|
184
|
-
description: string;
|
185
|
-
defaultMessage: string;
|
186
|
-
}>;
|
187
|
-
}, "strip", z.ZodTypeAny, {
|
188
|
-
title: TranslationConfig;
|
189
|
-
body: TranslationConfig;
|
190
|
-
}, {
|
191
|
-
title: {
|
192
|
-
id: string;
|
193
|
-
description: string;
|
194
|
-
defaultMessage: string;
|
195
|
-
};
|
196
|
-
body: {
|
197
|
-
id: string;
|
198
|
-
description: string;
|
199
|
-
defaultMessage: string;
|
200
|
-
};
|
201
|
-
}>;
|
202
|
-
}, "strip", z.ZodTypeAny, {
|
203
|
-
label: TranslationConfig;
|
204
|
-
confirmation: {
|
205
|
-
title: TranslationConfig;
|
206
|
-
body: TranslationConfig;
|
207
|
-
};
|
208
|
-
}, {
|
209
|
-
label: {
|
210
|
-
id: string;
|
211
|
-
description: string;
|
212
|
-
defaultMessage: string;
|
213
|
-
};
|
214
|
-
confirmation: {
|
215
|
-
title: {
|
216
|
-
id: string;
|
217
|
-
description: string;
|
218
|
-
defaultMessage: string;
|
219
|
-
};
|
220
|
-
body: {
|
221
|
-
id: string;
|
222
|
-
description: string;
|
223
|
-
defaultMessage: string;
|
224
|
-
};
|
225
|
-
};
|
226
|
-
}>;
|
227
|
-
}, "strip", z.ZodTypeAny, {
|
228
|
-
verify: {
|
229
|
-
label: TranslationConfig;
|
230
|
-
};
|
231
|
-
cancel: {
|
232
|
-
label: TranslationConfig;
|
233
|
-
confirmation: {
|
234
|
-
title: TranslationConfig;
|
235
|
-
body: TranslationConfig;
|
236
|
-
};
|
237
|
-
};
|
238
|
-
}, {
|
239
|
-
verify: {
|
240
|
-
label: {
|
241
|
-
id: string;
|
242
|
-
description: string;
|
243
|
-
defaultMessage: string;
|
244
|
-
};
|
245
|
-
};
|
246
|
-
cancel: {
|
247
|
-
label: {
|
248
|
-
id: string;
|
249
|
-
description: string;
|
250
|
-
defaultMessage: string;
|
251
|
-
};
|
252
|
-
confirmation: {
|
253
|
-
title: {
|
254
|
-
id: string;
|
255
|
-
description: string;
|
256
|
-
defaultMessage: string;
|
257
|
-
};
|
258
|
-
body: {
|
259
|
-
id: string;
|
260
|
-
description: string;
|
261
|
-
defaultMessage: string;
|
262
|
-
};
|
263
|
-
};
|
264
|
-
};
|
265
|
-
}>;
|
266
|
-
}>, "strip", z.ZodTypeAny, {
|
267
|
-
type: "VERIFICATION";
|
268
|
-
id: string;
|
269
|
-
title: TranslationConfig;
|
270
|
-
actions: {
|
271
|
-
verify: {
|
272
|
-
label: TranslationConfig;
|
273
|
-
};
|
274
|
-
cancel: {
|
275
|
-
label: TranslationConfig;
|
276
|
-
confirmation: {
|
277
|
-
title: TranslationConfig;
|
278
|
-
body: TranslationConfig;
|
279
|
-
};
|
280
|
-
};
|
281
|
-
};
|
282
|
-
fields: import("./FieldConfig").Inferred[];
|
283
|
-
}, {
|
284
|
-
type: "VERIFICATION";
|
285
|
-
id: string;
|
286
|
-
title: {
|
287
|
-
id: string;
|
288
|
-
description: string;
|
289
|
-
defaultMessage: string;
|
290
|
-
};
|
291
|
-
actions: {
|
292
|
-
verify: {
|
293
|
-
label: {
|
294
|
-
id: string;
|
295
|
-
description: string;
|
296
|
-
defaultMessage: string;
|
297
|
-
};
|
298
|
-
};
|
299
|
-
cancel: {
|
300
|
-
label: {
|
301
|
-
id: string;
|
302
|
-
description: string;
|
303
|
-
defaultMessage: string;
|
304
|
-
};
|
305
|
-
confirmation: {
|
306
|
-
title: {
|
307
|
-
id: string;
|
308
|
-
description: string;
|
309
|
-
defaultMessage: string;
|
310
|
-
};
|
311
|
-
body: {
|
312
|
-
id: string;
|
313
|
-
description: string;
|
314
|
-
defaultMessage: string;
|
315
|
-
};
|
316
|
-
};
|
317
|
-
};
|
318
|
-
};
|
319
|
-
fields: import("./FieldConfig").Inferred[];
|
320
|
-
}>;
|
321
|
-
export type VerificationPageConfig = z.infer<typeof VerificationPageConfig>;
|
322
|
-
type AllPageConfigs = typeof FormPage | typeof VerificationPage;
|
323
|
-
export declare const PageConfig: z.ZodDiscriminatedUnion<"type", AllPageConfigs[]>;
|
324
|
-
export type PageInput = z.input<typeof PageConfig>;
|
325
|
-
export type Page = z.infer<typeof PageConfig>;
|
326
|
-
export declare const FormConfig: z.ZodObject<{
|
327
|
-
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
328
|
-
id: string;
|
329
|
-
description: string;
|
330
|
-
defaultMessage: string;
|
331
47
|
}>;
|
332
|
-
|
48
|
+
active: z.ZodDefault<z.ZodBoolean>;
|
49
|
+
pages: z.ZodArray<z.ZodObject<{
|
333
50
|
id: z.ZodString;
|
334
|
-
|
51
|
+
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
335
52
|
id: string;
|
336
53
|
description: string;
|
337
54
|
defaultMessage: string;
|
338
55
|
}>;
|
56
|
+
fields: z.ZodArray<z.ZodType<import("./FieldConfig").Inferred, any, import("./FieldConfig").Inferred>, "many">;
|
339
57
|
}, "strip", z.ZodTypeAny, {
|
340
58
|
id: string;
|
341
|
-
|
59
|
+
title: TranslationConfig;
|
60
|
+
fields: import("./FieldConfig").Inferred[];
|
342
61
|
}, {
|
343
62
|
id: string;
|
344
|
-
|
63
|
+
title: {
|
345
64
|
id: string;
|
346
65
|
description: string;
|
347
66
|
defaultMessage: string;
|
348
67
|
};
|
349
|
-
|
350
|
-
|
351
|
-
pages: z.ZodArray<z.ZodDiscriminatedUnion<"type", AllPageConfigs[]>, "many">;
|
68
|
+
fields: import("./FieldConfig").Inferred[];
|
69
|
+
}>, "many">;
|
352
70
|
review: z.ZodObject<{
|
353
71
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
354
72
|
id: string;
|
@@ -374,29 +92,11 @@ export declare const FormConfig: z.ZodObject<{
|
|
374
92
|
label: TranslationConfig;
|
375
93
|
};
|
376
94
|
label: TranslationConfig;
|
377
|
-
pages:
|
378
|
-
type: "FORM";
|
95
|
+
pages: {
|
379
96
|
id: string;
|
380
97
|
title: TranslationConfig;
|
381
98
|
fields: import("./FieldConfig").Inferred[];
|
382
|
-
}
|
383
|
-
type: "VERIFICATION";
|
384
|
-
id: string;
|
385
|
-
title: TranslationConfig;
|
386
|
-
actions: {
|
387
|
-
verify: {
|
388
|
-
label: TranslationConfig;
|
389
|
-
};
|
390
|
-
cancel: {
|
391
|
-
label: TranslationConfig;
|
392
|
-
confirmation: {
|
393
|
-
title: TranslationConfig;
|
394
|
-
body: TranslationConfig;
|
395
|
-
};
|
396
|
-
};
|
397
|
-
};
|
398
|
-
fields: import("./FieldConfig").Inferred[];
|
399
|
-
})[];
|
99
|
+
}[];
|
400
100
|
review: {
|
401
101
|
title: TranslationConfig;
|
402
102
|
fields: import("./FieldConfig").Inferred[];
|
@@ -415,53 +115,15 @@ export declare const FormConfig: z.ZodObject<{
|
|
415
115
|
description: string;
|
416
116
|
defaultMessage: string;
|
417
117
|
};
|
418
|
-
pages:
|
419
|
-
id: string;
|
420
|
-
title: {
|
421
|
-
id: string;
|
422
|
-
description: string;
|
423
|
-
defaultMessage: string;
|
424
|
-
};
|
425
|
-
fields: import("./FieldConfig").Inferred[];
|
426
|
-
type?: "FORM" | undefined;
|
427
|
-
} | {
|
428
|
-
type: "VERIFICATION";
|
118
|
+
pages: {
|
429
119
|
id: string;
|
430
120
|
title: {
|
431
121
|
id: string;
|
432
122
|
description: string;
|
433
123
|
defaultMessage: string;
|
434
124
|
};
|
435
|
-
actions: {
|
436
|
-
verify: {
|
437
|
-
label: {
|
438
|
-
id: string;
|
439
|
-
description: string;
|
440
|
-
defaultMessage: string;
|
441
|
-
};
|
442
|
-
};
|
443
|
-
cancel: {
|
444
|
-
label: {
|
445
|
-
id: string;
|
446
|
-
description: string;
|
447
|
-
defaultMessage: string;
|
448
|
-
};
|
449
|
-
confirmation: {
|
450
|
-
title: {
|
451
|
-
id: string;
|
452
|
-
description: string;
|
453
|
-
defaultMessage: string;
|
454
|
-
};
|
455
|
-
body: {
|
456
|
-
id: string;
|
457
|
-
description: string;
|
458
|
-
defaultMessage: string;
|
459
|
-
};
|
460
|
-
};
|
461
|
-
};
|
462
|
-
};
|
463
125
|
fields: import("./FieldConfig").Inferred[];
|
464
|
-
}
|
126
|
+
}[];
|
465
127
|
review: {
|
466
128
|
title: {
|
467
129
|
id: string;
|
@@ -472,7 +134,7 @@ export declare const FormConfig: z.ZodObject<{
|
|
472
134
|
};
|
473
135
|
active?: boolean | undefined;
|
474
136
|
}>;
|
137
|
+
export type FormPage = z.infer<typeof FormPage>;
|
475
138
|
export type FormConfig = z.infer<typeof FormConfig>;
|
476
139
|
export type FormConfigInput = z.input<typeof FormConfig>;
|
477
|
-
export {};
|
478
140
|
//# sourceMappingURL=FormConfig.d.ts.map
|