@opencrvs/toolkit 1.8.0-rc.faeb298 → 1.8.0-rc.fb0e687

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.
Files changed (31) hide show
  1. package/README.md +1 -1
  2. package/dist/commons/api/router.d.ts +6658 -9554
  3. package/dist/commons/conditionals/conditionals.d.ts +26 -3
  4. package/dist/commons/conditionals/validate-address.test.d.ts +2 -0
  5. package/dist/commons/conditionals/validate.d.ts +39 -11
  6. package/dist/commons/conditionals/validate.test.d.ts +2 -0
  7. package/dist/commons/events/ActionConfig.d.ts +1047 -3208
  8. package/dist/commons/events/ActionDocument.d.ts +9482 -312
  9. package/dist/commons/events/ActionInput.d.ts +5244 -477
  10. package/dist/commons/events/ActionType.d.ts +25 -12
  11. package/dist/commons/events/CompositeFieldValue.d.ts +152 -2
  12. package/dist/commons/events/Conditional.d.ts +21 -5
  13. package/dist/commons/events/Draft.d.ts +348 -48
  14. package/dist/commons/events/EventConfig.d.ts +715 -2746
  15. package/dist/commons/events/EventConfigInput.d.ts +6 -3
  16. package/dist/commons/events/EventDocument.d.ts +3340 -429
  17. package/dist/commons/events/EventIndex.d.ts +6 -3
  18. package/dist/commons/events/EventMetadata.d.ts +3 -0
  19. package/dist/commons/events/FieldConfig.d.ts +384 -104
  20. package/dist/commons/events/FieldTypeMapping.d.ts +136 -5
  21. package/dist/commons/events/FieldValue.d.ts +76 -2
  22. package/dist/commons/events/FormConfig.d.ts +534 -201
  23. package/dist/commons/events/PageConfig.d.ts +335 -0
  24. package/dist/commons/events/TemplateConfig.d.ts +2 -2
  25. package/dist/commons/events/defineConfig.d.ts +72 -421
  26. package/dist/commons/events/index.d.ts +2 -1
  27. package/dist/commons/events/test.utils.d.ts +140 -213
  28. package/dist/commons/events/utils.d.ts +190 -125
  29. package/dist/conditionals/index.js +166 -81
  30. package/dist/events/index.js +1372 -826
  31. package/package.json +1 -1
@@ -1,297 +1,651 @@
1
1
  import { z } from 'zod';
2
2
  import { TranslationConfig } from './TranslationConfig';
3
- export declare enum PageType {
4
- FORM = "FORM",
5
- VERIFICATION = "VERIFICATION"
6
- }
7
- export declare const PageBase: z.ZodObject<{
8
- id: z.ZodString;
9
- title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
3
+ export declare const DeclarationFormConfig: z.ZodObject<{
4
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
10
5
  id: string;
11
6
  description: string;
12
7
  defaultMessage: string;
13
8
  }>;
14
- fields: z.ZodArray<z.ZodType<import("./FieldConfig").Inferred, any, import("./FieldConfig").Inferred>, "many">;
15
- type: z.ZodDefault<z.ZodEnum<["FORM", "VERIFICATION"]>>;
9
+ pages: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
10
+ id: z.ZodString;
11
+ title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
12
+ id: string;
13
+ description: string;
14
+ defaultMessage: string;
15
+ }>;
16
+ fields: z.ZodArray<z.ZodType<import("./FieldConfig").Inferred, any, import("./FieldConfig").InferredInput>, "many">;
17
+ conditional: z.ZodOptional<z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>>;
18
+ }, {
19
+ type: z.ZodDefault<z.ZodLiteral<"FORM">>;
20
+ }>, "strip", z.ZodTypeAny, {
21
+ type: "FORM";
22
+ id: string;
23
+ title: TranslationConfig;
24
+ fields: import("./FieldConfig").Inferred[];
25
+ conditional?: import(".").JSONSchema | undefined;
26
+ }, {
27
+ id: string;
28
+ title: {
29
+ id: string;
30
+ description: string;
31
+ defaultMessage: string;
32
+ };
33
+ fields: import("./FieldConfig").InferredInput[];
34
+ type?: "FORM" | undefined;
35
+ conditional?: import(".").JSONSchema | undefined;
36
+ }>, "many">;
16
37
  }, "strip", z.ZodTypeAny, {
17
- type: "FORM" | "VERIFICATION";
18
- id: string;
19
- title: TranslationConfig;
20
- fields: import("./FieldConfig").Inferred[];
38
+ label: TranslationConfig;
39
+ pages: {
40
+ type: "FORM";
41
+ id: string;
42
+ title: TranslationConfig;
43
+ fields: import("./FieldConfig").Inferred[];
44
+ conditional?: import(".").JSONSchema | undefined;
45
+ }[];
21
46
  }, {
22
- id: string;
23
- title: {
47
+ label: {
24
48
  id: string;
25
49
  description: string;
26
50
  defaultMessage: string;
27
51
  };
28
- fields: import("./FieldConfig").Inferred[];
29
- type?: "FORM" | "VERIFICATION" | undefined;
52
+ pages: {
53
+ id: string;
54
+ title: {
55
+ id: string;
56
+ description: string;
57
+ defaultMessage: string;
58
+ };
59
+ fields: import("./FieldConfig").InferredInput[];
60
+ type?: "FORM" | undefined;
61
+ conditional?: import(".").JSONSchema | undefined;
62
+ }[];
30
63
  }>;
31
- export declare const FormPage: z.ZodObject<z.objectUtil.extendShape<{
32
- id: z.ZodString;
33
- title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
64
+ export type DeclarationFormConfig = z.infer<typeof DeclarationFormConfig>;
65
+ export type DeclarationFormConfigInput = z.input<typeof DeclarationFormConfig>;
66
+ export declare const ActionFormConfig: z.ZodObject<{
67
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
34
68
  id: string;
35
69
  description: string;
36
70
  defaultMessage: string;
37
71
  }>;
38
- fields: z.ZodArray<z.ZodType<import("./FieldConfig").Inferred, any, import("./FieldConfig").Inferred>, "many">;
39
- type: z.ZodDefault<z.ZodEnum<["FORM", "VERIFICATION"]>>;
40
- }, {
41
- type: z.ZodOptional<z.ZodLiteral<"FORM">>;
42
- }>, "strip", z.ZodTypeAny, {
43
- id: string;
44
- title: TranslationConfig;
45
- fields: import("./FieldConfig").Inferred[];
46
- type?: "FORM" | undefined;
47
- }, {
48
- id: string;
49
- title: {
72
+ pages: z.ZodArray<z.ZodDiscriminatedUnion<"type", (z.ZodObject<z.objectUtil.extendShape<{
73
+ id: z.ZodString;
74
+ title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
75
+ id: string;
76
+ description: string;
77
+ defaultMessage: string;
78
+ }>;
79
+ fields: z.ZodArray<z.ZodType<import("./FieldConfig").Inferred, any, import("./FieldConfig").InferredInput>, "many">;
80
+ conditional: z.ZodOptional<z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>>;
81
+ }, {
82
+ type: z.ZodDefault<z.ZodLiteral<"FORM">>;
83
+ }>, "strip", z.ZodTypeAny, {
84
+ type: "FORM";
50
85
  id: string;
51
- description: string;
52
- defaultMessage: string;
53
- };
54
- fields: import("./FieldConfig").Inferred[];
55
- type?: "FORM" | undefined;
56
- }>;
57
- export declare const VerificationPage: z.ZodObject<z.objectUtil.extendShape<{
58
- id: z.ZodString;
59
- title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
86
+ title: TranslationConfig;
87
+ fields: import("./FieldConfig").Inferred[];
88
+ conditional?: import(".").JSONSchema | undefined;
89
+ }, {
60
90
  id: string;
61
- description: string;
62
- defaultMessage: string;
63
- }>;
64
- fields: z.ZodArray<z.ZodType<import("./FieldConfig").Inferred, any, import("./FieldConfig").Inferred>, "many">;
65
- type: z.ZodDefault<z.ZodEnum<["FORM", "VERIFICATION"]>>;
66
- }, {
67
- type: z.ZodLiteral<"VERIFICATION">;
68
- actions: z.ZodObject<{
69
- verify: z.ZodObject<{
70
- label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
71
- id: string;
72
- description: string;
73
- defaultMessage: string;
74
- }>;
75
- }, "strip", z.ZodTypeAny, {
76
- label: TranslationConfig;
77
- }, {
78
- label: {
79
- id: string;
80
- description: string;
81
- defaultMessage: string;
82
- };
91
+ title: {
92
+ id: string;
93
+ description: string;
94
+ defaultMessage: string;
95
+ };
96
+ fields: import("./FieldConfig").InferredInput[];
97
+ type?: "FORM" | undefined;
98
+ conditional?: import(".").JSONSchema | undefined;
99
+ }> | z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
100
+ id: z.ZodString;
101
+ title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
102
+ id: string;
103
+ description: string;
104
+ defaultMessage: string;
83
105
  }>;
84
- cancel: z.ZodObject<{
85
- label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
86
- id: string;
87
- description: string;
88
- defaultMessage: string;
89
- }>;
90
- confirmation: z.ZodObject<{
91
- title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
106
+ fields: z.ZodArray<z.ZodType<import("./FieldConfig").Inferred, any, import("./FieldConfig").InferredInput>, "many">;
107
+ conditional: z.ZodOptional<z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>>;
108
+ }, {
109
+ type: z.ZodDefault<z.ZodLiteral<"FORM">>;
110
+ }>, {
111
+ type: z.ZodLiteral<"VERIFICATION">;
112
+ actions: z.ZodObject<{
113
+ verify: z.ZodObject<{
114
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
92
115
  id: string;
93
116
  description: string;
94
117
  defaultMessage: string;
95
118
  }>;
96
- body: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
119
+ }, "strip", z.ZodTypeAny, {
120
+ label: TranslationConfig;
121
+ }, {
122
+ label: {
97
123
  id: string;
98
124
  description: string;
99
125
  defaultMessage: string;
100
- }>;
101
- }, "strip", z.ZodTypeAny, {
102
- title: TranslationConfig;
103
- body: TranslationConfig;
104
- }, {
105
- title: {
126
+ };
127
+ }>;
128
+ cancel: z.ZodObject<{
129
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
106
130
  id: string;
107
131
  description: string;
108
132
  defaultMessage: string;
133
+ }>;
134
+ confirmation: z.ZodObject<{
135
+ title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
136
+ id: string;
137
+ description: string;
138
+ defaultMessage: string;
139
+ }>;
140
+ body: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
141
+ id: string;
142
+ description: string;
143
+ defaultMessage: string;
144
+ }>;
145
+ }, "strip", z.ZodTypeAny, {
146
+ title: TranslationConfig;
147
+ body: TranslationConfig;
148
+ }, {
149
+ title: {
150
+ id: string;
151
+ description: string;
152
+ defaultMessage: string;
153
+ };
154
+ body: {
155
+ id: string;
156
+ description: string;
157
+ defaultMessage: string;
158
+ };
159
+ }>;
160
+ }, "strip", z.ZodTypeAny, {
161
+ label: TranslationConfig;
162
+ confirmation: {
163
+ title: TranslationConfig;
164
+ body: TranslationConfig;
109
165
  };
110
- body: {
166
+ }, {
167
+ label: {
111
168
  id: string;
112
169
  description: string;
113
170
  defaultMessage: string;
114
171
  };
172
+ confirmation: {
173
+ title: {
174
+ id: string;
175
+ description: string;
176
+ defaultMessage: string;
177
+ };
178
+ body: {
179
+ id: string;
180
+ description: string;
181
+ defaultMessage: string;
182
+ };
183
+ };
115
184
  }>;
116
185
  }, "strip", z.ZodTypeAny, {
117
- label: TranslationConfig;
118
- confirmation: {
119
- title: TranslationConfig;
120
- body: TranslationConfig;
186
+ verify: {
187
+ label: TranslationConfig;
121
188
  };
122
- }, {
123
- label: {
124
- id: string;
125
- description: string;
126
- defaultMessage: string;
189
+ cancel: {
190
+ label: TranslationConfig;
191
+ confirmation: {
192
+ title: TranslationConfig;
193
+ body: TranslationConfig;
194
+ };
127
195
  };
128
- confirmation: {
129
- title: {
196
+ }, {
197
+ verify: {
198
+ label: {
130
199
  id: string;
131
200
  description: string;
132
201
  defaultMessage: string;
133
202
  };
134
- body: {
203
+ };
204
+ cancel: {
205
+ label: {
135
206
  id: string;
136
207
  description: string;
137
208
  defaultMessage: string;
138
209
  };
210
+ confirmation: {
211
+ title: {
212
+ id: string;
213
+ description: string;
214
+ defaultMessage: string;
215
+ };
216
+ body: {
217
+ id: string;
218
+ description: string;
219
+ defaultMessage: string;
220
+ };
221
+ };
139
222
  };
140
223
  }>;
141
- }, "strip", z.ZodTypeAny, {
142
- verify: {
143
- label: TranslationConfig;
144
- };
145
- cancel: {
146
- label: TranslationConfig;
147
- confirmation: {
148
- title: TranslationConfig;
149
- body: TranslationConfig;
224
+ }>, "strip", z.ZodTypeAny, {
225
+ type: "VERIFICATION";
226
+ id: string;
227
+ title: TranslationConfig;
228
+ actions: {
229
+ verify: {
230
+ label: TranslationConfig;
231
+ };
232
+ cancel: {
233
+ label: TranslationConfig;
234
+ confirmation: {
235
+ title: TranslationConfig;
236
+ body: TranslationConfig;
237
+ };
150
238
  };
151
239
  };
240
+ fields: import("./FieldConfig").Inferred[];
241
+ conditional?: import(".").JSONSchema | undefined;
152
242
  }, {
153
- verify: {
154
- label: {
155
- id: string;
156
- description: string;
157
- defaultMessage: string;
158
- };
243
+ type: "VERIFICATION";
244
+ id: string;
245
+ title: {
246
+ id: string;
247
+ description: string;
248
+ defaultMessage: string;
159
249
  };
160
- cancel: {
161
- label: {
162
- id: string;
163
- description: string;
164
- defaultMessage: string;
165
- };
166
- confirmation: {
167
- title: {
250
+ actions: {
251
+ verify: {
252
+ label: {
168
253
  id: string;
169
254
  description: string;
170
255
  defaultMessage: string;
171
256
  };
172
- body: {
257
+ };
258
+ cancel: {
259
+ label: {
173
260
  id: string;
174
261
  description: string;
175
262
  defaultMessage: string;
176
263
  };
264
+ confirmation: {
265
+ title: {
266
+ id: string;
267
+ description: string;
268
+ defaultMessage: string;
269
+ };
270
+ body: {
271
+ id: string;
272
+ description: string;
273
+ defaultMessage: string;
274
+ };
275
+ };
177
276
  };
178
277
  };
179
- }>;
180
- }>, "strip", z.ZodTypeAny, {
181
- type: "VERIFICATION";
182
- id: string;
183
- title: TranslationConfig;
184
- actions: {
185
- verify: {
186
- label: TranslationConfig;
187
- };
188
- cancel: {
189
- label: TranslationConfig;
190
- confirmation: {
191
- title: TranslationConfig;
192
- body: TranslationConfig;
278
+ fields: import("./FieldConfig").InferredInput[];
279
+ conditional?: import(".").JSONSchema | undefined;
280
+ }>)[]>, "many">;
281
+ }, "strip", z.ZodTypeAny, {
282
+ label: TranslationConfig;
283
+ pages: ({
284
+ type: "FORM";
285
+ id: string;
286
+ title: TranslationConfig;
287
+ fields: import("./FieldConfig").Inferred[];
288
+ conditional?: import(".").JSONSchema | undefined;
289
+ } | {
290
+ type: "VERIFICATION";
291
+ id: string;
292
+ title: TranslationConfig;
293
+ actions: {
294
+ verify: {
295
+ label: TranslationConfig;
296
+ };
297
+ cancel: {
298
+ label: TranslationConfig;
299
+ confirmation: {
300
+ title: TranslationConfig;
301
+ body: TranslationConfig;
302
+ };
193
303
  };
194
304
  };
195
- };
196
- fields: import("./FieldConfig").Inferred[];
305
+ fields: import("./FieldConfig").Inferred[];
306
+ conditional?: import(".").JSONSchema | undefined;
307
+ })[];
197
308
  }, {
198
- type: "VERIFICATION";
199
- id: string;
200
- title: {
309
+ label: {
201
310
  id: string;
202
311
  description: string;
203
312
  defaultMessage: string;
204
313
  };
205
- actions: {
206
- verify: {
207
- label: {
208
- id: string;
209
- description: string;
210
- defaultMessage: string;
211
- };
314
+ pages: ({
315
+ id: string;
316
+ title: {
317
+ id: string;
318
+ description: string;
319
+ defaultMessage: string;
212
320
  };
213
- cancel: {
214
- label: {
215
- id: string;
216
- description: string;
217
- defaultMessage: string;
218
- };
219
- confirmation: {
220
- title: {
321
+ fields: import("./FieldConfig").InferredInput[];
322
+ type?: "FORM" | undefined;
323
+ conditional?: import(".").JSONSchema | undefined;
324
+ } | {
325
+ type: "VERIFICATION";
326
+ id: string;
327
+ title: {
328
+ id: string;
329
+ description: string;
330
+ defaultMessage: string;
331
+ };
332
+ actions: {
333
+ verify: {
334
+ label: {
221
335
  id: string;
222
336
  description: string;
223
337
  defaultMessage: string;
224
338
  };
225
- body: {
339
+ };
340
+ cancel: {
341
+ label: {
226
342
  id: string;
227
343
  description: string;
228
344
  defaultMessage: string;
229
345
  };
346
+ confirmation: {
347
+ title: {
348
+ id: string;
349
+ description: string;
350
+ defaultMessage: string;
351
+ };
352
+ body: {
353
+ id: string;
354
+ description: string;
355
+ defaultMessage: string;
356
+ };
357
+ };
230
358
  };
231
359
  };
232
- };
233
- fields: import("./FieldConfig").Inferred[];
360
+ fields: import("./FieldConfig").InferredInput[];
361
+ conditional?: import(".").JSONSchema | undefined;
362
+ })[];
234
363
  }>;
235
- export type AllPageConfigs = typeof FormPage | typeof VerificationPage;
236
- export declare const PageConfig: z.ZodDiscriminatedUnion<"type", AllPageConfigs[]>;
237
- export type PageInput = z.input<typeof PageConfig>;
238
- export type Page = z.infer<typeof PageConfig>;
239
- export declare const FormConfig: z.ZodObject<{
364
+ export type ActionFormConfig = z.infer<typeof ActionFormConfig>;
365
+ export type ActionFormConfigInput = z.input<typeof ActionFormConfig>;
366
+ export declare const FormConfig: z.ZodUnion<[z.ZodObject<{
240
367
  label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
241
368
  id: string;
242
369
  description: string;
243
370
  defaultMessage: string;
244
371
  }>;
245
- version: z.ZodObject<{
372
+ pages: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
246
373
  id: z.ZodString;
247
- label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
374
+ title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
248
375
  id: string;
249
376
  description: string;
250
377
  defaultMessage: string;
251
378
  }>;
252
- }, "strip", z.ZodTypeAny, {
379
+ fields: z.ZodArray<z.ZodType<import("./FieldConfig").Inferred, any, import("./FieldConfig").InferredInput>, "many">;
380
+ conditional: z.ZodOptional<z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>>;
381
+ }, {
382
+ type: z.ZodDefault<z.ZodLiteral<"FORM">>;
383
+ }>, "strip", z.ZodTypeAny, {
384
+ type: "FORM";
253
385
  id: string;
254
- label: TranslationConfig;
386
+ title: TranslationConfig;
387
+ fields: import("./FieldConfig").Inferred[];
388
+ conditional?: import(".").JSONSchema | undefined;
255
389
  }, {
256
390
  id: string;
257
- label: {
391
+ title: {
392
+ id: string;
393
+ description: string;
394
+ defaultMessage: string;
395
+ };
396
+ fields: import("./FieldConfig").InferredInput[];
397
+ type?: "FORM" | undefined;
398
+ conditional?: import(".").JSONSchema | undefined;
399
+ }>, "many">;
400
+ }, "strip", z.ZodTypeAny, {
401
+ label: TranslationConfig;
402
+ pages: {
403
+ type: "FORM";
404
+ id: string;
405
+ title: TranslationConfig;
406
+ fields: import("./FieldConfig").Inferred[];
407
+ conditional?: import(".").JSONSchema | undefined;
408
+ }[];
409
+ }, {
410
+ label: {
411
+ id: string;
412
+ description: string;
413
+ defaultMessage: string;
414
+ };
415
+ pages: {
416
+ id: string;
417
+ title: {
258
418
  id: string;
259
419
  description: string;
260
420
  defaultMessage: string;
261
421
  };
422
+ fields: import("./FieldConfig").InferredInput[];
423
+ type?: "FORM" | undefined;
424
+ conditional?: import(".").JSONSchema | undefined;
425
+ }[];
426
+ }>, z.ZodObject<{
427
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
428
+ id: string;
429
+ description: string;
430
+ defaultMessage: string;
262
431
  }>;
263
- active: z.ZodDefault<z.ZodBoolean>;
264
- pages: z.ZodArray<z.ZodDiscriminatedUnion<"type", AllPageConfigs[]>, "many">;
265
- review: z.ZodObject<{
432
+ pages: z.ZodArray<z.ZodDiscriminatedUnion<"type", (z.ZodObject<z.objectUtil.extendShape<{
433
+ id: z.ZodString;
266
434
  title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
267
435
  id: string;
268
436
  description: string;
269
437
  defaultMessage: string;
270
438
  }>;
271
- fields: z.ZodArray<z.ZodType<import("./FieldConfig").Inferred, any, import("./FieldConfig").Inferred>, "many">;
272
- }, "strip", z.ZodTypeAny, {
439
+ fields: z.ZodArray<z.ZodType<import("./FieldConfig").Inferred, any, import("./FieldConfig").InferredInput>, "many">;
440
+ conditional: z.ZodOptional<z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>>;
441
+ }, {
442
+ type: z.ZodDefault<z.ZodLiteral<"FORM">>;
443
+ }>, "strip", z.ZodTypeAny, {
444
+ type: "FORM";
445
+ id: string;
273
446
  title: TranslationConfig;
274
447
  fields: import("./FieldConfig").Inferred[];
448
+ conditional?: import(".").JSONSchema | undefined;
275
449
  }, {
450
+ id: string;
276
451
  title: {
277
452
  id: string;
278
453
  description: string;
279
454
  defaultMessage: string;
280
455
  };
456
+ fields: import("./FieldConfig").InferredInput[];
457
+ type?: "FORM" | undefined;
458
+ conditional?: import(".").JSONSchema | undefined;
459
+ }> | z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
460
+ id: z.ZodString;
461
+ title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
462
+ id: string;
463
+ description: string;
464
+ defaultMessage: string;
465
+ }>;
466
+ fields: z.ZodArray<z.ZodType<import("./FieldConfig").Inferred, any, import("./FieldConfig").InferredInput>, "many">;
467
+ conditional: z.ZodOptional<z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>>;
468
+ }, {
469
+ type: z.ZodDefault<z.ZodLiteral<"FORM">>;
470
+ }>, {
471
+ type: z.ZodLiteral<"VERIFICATION">;
472
+ actions: z.ZodObject<{
473
+ verify: z.ZodObject<{
474
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
475
+ id: string;
476
+ description: string;
477
+ defaultMessage: string;
478
+ }>;
479
+ }, "strip", z.ZodTypeAny, {
480
+ label: TranslationConfig;
481
+ }, {
482
+ label: {
483
+ id: string;
484
+ description: string;
485
+ defaultMessage: string;
486
+ };
487
+ }>;
488
+ cancel: z.ZodObject<{
489
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
490
+ id: string;
491
+ description: string;
492
+ defaultMessage: string;
493
+ }>;
494
+ confirmation: z.ZodObject<{
495
+ title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
496
+ id: string;
497
+ description: string;
498
+ defaultMessage: string;
499
+ }>;
500
+ body: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
501
+ id: string;
502
+ description: string;
503
+ defaultMessage: string;
504
+ }>;
505
+ }, "strip", z.ZodTypeAny, {
506
+ title: TranslationConfig;
507
+ body: TranslationConfig;
508
+ }, {
509
+ title: {
510
+ id: string;
511
+ description: string;
512
+ defaultMessage: string;
513
+ };
514
+ body: {
515
+ id: string;
516
+ description: string;
517
+ defaultMessage: string;
518
+ };
519
+ }>;
520
+ }, "strip", z.ZodTypeAny, {
521
+ label: TranslationConfig;
522
+ confirmation: {
523
+ title: TranslationConfig;
524
+ body: TranslationConfig;
525
+ };
526
+ }, {
527
+ label: {
528
+ id: string;
529
+ description: string;
530
+ defaultMessage: string;
531
+ };
532
+ confirmation: {
533
+ title: {
534
+ id: string;
535
+ description: string;
536
+ defaultMessage: string;
537
+ };
538
+ body: {
539
+ id: string;
540
+ description: string;
541
+ defaultMessage: string;
542
+ };
543
+ };
544
+ }>;
545
+ }, "strip", z.ZodTypeAny, {
546
+ verify: {
547
+ label: TranslationConfig;
548
+ };
549
+ cancel: {
550
+ label: TranslationConfig;
551
+ confirmation: {
552
+ title: TranslationConfig;
553
+ body: TranslationConfig;
554
+ };
555
+ };
556
+ }, {
557
+ verify: {
558
+ label: {
559
+ id: string;
560
+ description: string;
561
+ defaultMessage: string;
562
+ };
563
+ };
564
+ cancel: {
565
+ label: {
566
+ id: string;
567
+ description: string;
568
+ defaultMessage: string;
569
+ };
570
+ confirmation: {
571
+ title: {
572
+ id: string;
573
+ description: string;
574
+ defaultMessage: string;
575
+ };
576
+ body: {
577
+ id: string;
578
+ description: string;
579
+ defaultMessage: string;
580
+ };
581
+ };
582
+ };
583
+ }>;
584
+ }>, "strip", z.ZodTypeAny, {
585
+ type: "VERIFICATION";
586
+ id: string;
587
+ title: TranslationConfig;
588
+ actions: {
589
+ verify: {
590
+ label: TranslationConfig;
591
+ };
592
+ cancel: {
593
+ label: TranslationConfig;
594
+ confirmation: {
595
+ title: TranslationConfig;
596
+ body: TranslationConfig;
597
+ };
598
+ };
599
+ };
281
600
  fields: import("./FieldConfig").Inferred[];
282
- }>;
283
- }, "strip", z.ZodTypeAny, {
284
- active: boolean;
285
- version: {
601
+ conditional?: import(".").JSONSchema | undefined;
602
+ }, {
603
+ type: "VERIFICATION";
286
604
  id: string;
287
- label: TranslationConfig;
288
- };
605
+ title: {
606
+ id: string;
607
+ description: string;
608
+ defaultMessage: string;
609
+ };
610
+ actions: {
611
+ verify: {
612
+ label: {
613
+ id: string;
614
+ description: string;
615
+ defaultMessage: string;
616
+ };
617
+ };
618
+ cancel: {
619
+ label: {
620
+ id: string;
621
+ description: string;
622
+ defaultMessage: string;
623
+ };
624
+ confirmation: {
625
+ title: {
626
+ id: string;
627
+ description: string;
628
+ defaultMessage: string;
629
+ };
630
+ body: {
631
+ id: string;
632
+ description: string;
633
+ defaultMessage: string;
634
+ };
635
+ };
636
+ };
637
+ };
638
+ fields: import("./FieldConfig").InferredInput[];
639
+ conditional?: import(".").JSONSchema | undefined;
640
+ }>)[]>, "many">;
641
+ }, "strip", z.ZodTypeAny, {
289
642
  label: TranslationConfig;
290
643
  pages: ({
644
+ type: "FORM";
291
645
  id: string;
292
646
  title: TranslationConfig;
293
647
  fields: import("./FieldConfig").Inferred[];
294
- type?: "FORM" | undefined;
648
+ conditional?: import(".").JSONSchema | undefined;
295
649
  } | {
296
650
  type: "VERIFICATION";
297
651
  id: string;
@@ -309,20 +663,9 @@ export declare const FormConfig: z.ZodObject<{
309
663
  };
310
664
  };
311
665
  fields: import("./FieldConfig").Inferred[];
666
+ conditional?: import(".").JSONSchema | undefined;
312
667
  })[];
313
- review: {
314
- title: TranslationConfig;
315
- fields: import("./FieldConfig").Inferred[];
316
- };
317
668
  }, {
318
- version: {
319
- id: string;
320
- label: {
321
- id: string;
322
- description: string;
323
- defaultMessage: string;
324
- };
325
- };
326
669
  label: {
327
670
  id: string;
328
671
  description: string;
@@ -335,8 +678,9 @@ export declare const FormConfig: z.ZodObject<{
335
678
  description: string;
336
679
  defaultMessage: string;
337
680
  };
338
- fields: import("./FieldConfig").Inferred[];
681
+ fields: import("./FieldConfig").InferredInput[];
339
682
  type?: "FORM" | undefined;
683
+ conditional?: import(".").JSONSchema | undefined;
340
684
  } | {
341
685
  type: "VERIFICATION";
342
686
  id: string;
@@ -373,20 +717,9 @@ export declare const FormConfig: z.ZodObject<{
373
717
  };
374
718
  };
375
719
  };
376
- fields: import("./FieldConfig").Inferred[];
720
+ fields: import("./FieldConfig").InferredInput[];
721
+ conditional?: import(".").JSONSchema | undefined;
377
722
  })[];
378
- review: {
379
- title: {
380
- id: string;
381
- description: string;
382
- defaultMessage: string;
383
- };
384
- fields: import("./FieldConfig").Inferred[];
385
- };
386
- active?: boolean | undefined;
387
- }>;
388
- export type FormPage = z.infer<typeof FormPage>;
389
- export type FormPageInput = z.input<typeof FormPage>;
723
+ }>]>;
390
724
  export type FormConfig = z.infer<typeof FormConfig>;
391
- export type FormConfigInput = z.input<typeof FormConfig>;
392
725
  //# sourceMappingURL=FormConfig.d.ts.map