@opencrvs/toolkit 1.8.0-rc.f988087 → 1.8.0-rc.f988670

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 (48) hide show
  1. package/README.md +1 -1
  2. package/dist/commons/api/router.d.ts +13703 -10688
  3. package/dist/commons/conditionals/conditionals.d.ts +32 -12
  4. package/dist/commons/conditionals/validate.d.ts +53 -17
  5. package/dist/commons/events/ActionConfig.d.ts +128971 -2093
  6. package/dist/commons/events/ActionDocument.d.ts +13021 -780
  7. package/dist/commons/events/ActionInput.d.ts +8135 -1182
  8. package/dist/commons/events/ActionType.d.ts +31 -12
  9. package/dist/commons/events/AdvancedSearchConfig.d.ts +1300 -22
  10. package/dist/commons/events/CompositeFieldValue.d.ts +192 -11
  11. package/dist/commons/events/Conditional.d.ts +21 -5
  12. package/dist/commons/events/Constants.d.ts +3 -0
  13. package/dist/commons/events/CountryConfigQueryInput.d.ts +4132 -0
  14. package/dist/commons/events/CreatedAtLocation.d.ts +2 -0
  15. package/dist/commons/events/Draft.d.ts +608 -117
  16. package/dist/commons/events/EventConfig.d.ts +61501 -1806
  17. package/dist/commons/events/EventConfigInput.d.ts +6 -3
  18. package/dist/commons/events/EventDocument.d.ts +5806 -1003
  19. package/dist/commons/events/EventIndex.d.ts +2350 -26
  20. package/dist/commons/events/EventMetadata.d.ts +347 -44
  21. package/dist/commons/events/FieldConfig.d.ts +7394 -956
  22. package/dist/commons/events/FieldType.d.ts +16 -2
  23. package/dist/commons/events/FieldTypeMapping.d.ts +269 -37
  24. package/dist/commons/events/FieldValue.d.ts +164 -20
  25. package/dist/commons/events/FormConfig.d.ts +54435 -90
  26. package/dist/commons/events/PageConfig.d.ts +13647 -0
  27. package/dist/commons/events/SummaryConfig.d.ts +93 -42
  28. package/dist/commons/events/TemplateConfig.d.ts +38 -0
  29. package/dist/commons/events/User.d.ts +34 -2
  30. package/dist/commons/events/WorkqueueColumnConfig.d.ts +53 -0
  31. package/dist/commons/events/WorkqueueConfig.d.ts +8240 -20
  32. package/dist/commons/events/defineConfig.d.ts +10034 -307
  33. package/dist/commons/events/event.d.ts +54 -0
  34. package/dist/commons/events/field.d.ts +108 -0
  35. package/dist/commons/events/index.d.ts +11 -1
  36. package/dist/commons/events/scopes.d.ts +44 -0
  37. package/dist/commons/events/serializer.d.ts +2 -0
  38. package/dist/commons/events/test.utils.d.ts +281 -237
  39. package/dist/commons/events/transactions.d.ts +1 -1
  40. package/dist/commons/events/utils.d.ts +16549 -70
  41. package/dist/commons/events/workqueueDefaultColumns.d.ts +3 -0
  42. package/dist/conditionals/index.js +228 -116
  43. package/dist/events/index.js +5572 -1907
  44. package/dist/scopes/index.d.ts +247 -1
  45. package/dist/scopes/index.js +231 -1
  46. package/package.json +4 -3
  47. package/tsconfig.json +1 -1
  48. package/dist/commons/conditionals/conditionals.test.d.ts +0 -2
@@ -1,16 +1,21 @@
1
+ import { z } from 'zod';
1
2
  export declare const FieldType: {
3
+ readonly NAME: "NAME";
4
+ readonly PHONE: "PHONE";
5
+ readonly ID: "ID";
2
6
  readonly ADDRESS: "ADDRESS";
3
7
  readonly TEXT: "TEXT";
4
8
  readonly NUMBER: "NUMBER";
5
9
  readonly TEXTAREA: "TEXTAREA";
6
10
  readonly EMAIL: "EMAIL";
7
11
  readonly DATE: "DATE";
12
+ readonly DATE_RANGE: "DATE_RANGE";
13
+ readonly SELECT_DATE_RANGE: "SELECT_DATE_RANGE";
8
14
  readonly PARAGRAPH: "PARAGRAPH";
9
15
  readonly PAGE_HEADER: "PAGE_HEADER";
10
16
  readonly RADIO_GROUP: "RADIO_GROUP";
11
17
  readonly FILE: "FILE";
12
18
  readonly FILE_WITH_OPTIONS: "FILE_WITH_OPTIONS";
13
- readonly HIDDEN: "HIDDEN";
14
19
  readonly BULLET_LIST: "BULLET_LIST";
15
20
  readonly CHECKBOX: "CHECKBOX";
16
21
  readonly SELECT: "SELECT";
@@ -21,7 +26,16 @@ export declare const FieldType: {
21
26
  readonly FACILITY: "FACILITY";
22
27
  readonly OFFICE: "OFFICE";
23
28
  readonly SIGNATURE: "SIGNATURE";
29
+ readonly DATA: "DATA";
24
30
  };
25
- export declare const fieldTypes: ("ADDRESS" | "TEXT" | "NUMBER" | "TEXTAREA" | "EMAIL" | "DATE" | "PARAGRAPH" | "PAGE_HEADER" | "RADIO_GROUP" | "FILE" | "FILE_WITH_OPTIONS" | "HIDDEN" | "BULLET_LIST" | "CHECKBOX" | "SELECT" | "COUNTRY" | "LOCATION" | "DIVIDER" | "ADMINISTRATIVE_AREA" | "FACILITY" | "OFFICE" | "SIGNATURE")[];
31
+ /**
32
+ * Union of types that handle files. Using common type should help with compiler to know where to add new cases.
33
+ */
34
+ export declare const FileFieldType: z.ZodEnum<["FILE", "FILE_WITH_OPTIONS", "SIGNATURE"]>;
35
+ export declare const fieldTypes: ("ID" | "NAME" | "PHONE" | "ADDRESS" | "TEXT" | "NUMBER" | "TEXTAREA" | "EMAIL" | "DATE" | "DATE_RANGE" | "SELECT_DATE_RANGE" | "PARAGRAPH" | "PAGE_HEADER" | "RADIO_GROUP" | "FILE" | "FILE_WITH_OPTIONS" | "BULLET_LIST" | "CHECKBOX" | "SELECT" | "COUNTRY" | "LOCATION" | "DIVIDER" | "ADMINISTRATIVE_AREA" | "FACILITY" | "OFFICE" | "SIGNATURE" | "DATA")[];
26
36
  export type FieldType = (typeof fieldTypes)[number];
37
+ /**
38
+ * Composite field types are field types that consist of multiple field values.
39
+ */
40
+ export declare const compositeFieldTypes: ("ADDRESS" | "DATE_RANGE" | "FILE" | "FILE_WITH_OPTIONS")[];
27
41
  //# sourceMappingURL=FieldType.d.ts.map
@@ -1,8 +1,9 @@
1
1
  import { z } from 'zod';
2
- import { AddressField, AdministrativeArea, BulletList, Checkbox, Country, DateField, Divider, Facility, EmailField, FieldConfig, File, FileUploadWithOptions, Location, Office, PageHeader, Paragraph, RadioGroup, SelectField, SignatureField, TextAreaField, TextField, NumberField } from './FieldConfig';
2
+ import { AddressField, AdministrativeArea, BulletList, Checkbox, Country, DateField, Divider, Facility, EmailField, FieldConfig, File, FileUploadWithOptions, Location, Office, PageHeader, Paragraph, RadioGroup, SelectField, SignatureField, TextAreaField, TextField, NumberField, DataField, NameField, PhoneField, IdField, DateRangeField, SelectDateRangeField } from './FieldConfig';
3
3
  import { FieldType } from './FieldType';
4
- import { FieldValue, FieldUpdateValueSchema } from './FieldValue';
5
- import { AddressFieldValue, FileFieldValue, FileFieldWithOptionValue } from './CompositeFieldValue';
4
+ import { FieldValue, FieldUpdateValueSchema, DateRangeFieldValue, SelectDateRangeValue } from './FieldValue';
5
+ import { FullDocumentPath } from '../documents';
6
+ import { AddressFieldValue, FileFieldValue, FileFieldWithOptionValue, NameFieldValue } from './CompositeFieldValue';
6
7
  /**
7
8
  * FieldTypeMapping.ts should include functions that map field types to different formats dynamically.
8
9
  * File is separated from FieldType and FieldConfig to avoid circular dependencies.
@@ -19,31 +20,80 @@ type NullishFieldValueSchema = z.ZodOptional<z.ZodNullable<FieldUpdateValueSchem
19
20
  * Useful for building dynamic validations against FieldConfig
20
21
  */
21
22
  export declare function mapFieldTypeToZod(type: FieldType, required?: boolean): z.ZodString | z.ZodOptional<z.ZodNullable<z.ZodString>> | z.ZodObject<{
22
- filename: z.ZodString;
23
+ path: z.ZodEffects<z.ZodString, string, string>;
23
24
  originalFilename: z.ZodString;
24
25
  type: z.ZodString;
25
26
  }, "strip", z.ZodTypeAny, {
26
27
  type: string;
27
- filename: string;
28
+ path: string;
28
29
  originalFilename: string;
29
30
  }, {
30
31
  type: string;
31
- filename: string;
32
+ path: string;
32
33
  originalFilename: string;
33
34
  }> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
34
- filename: z.ZodString;
35
+ path: z.ZodEffects<z.ZodString, string, string>;
35
36
  originalFilename: z.ZodString;
36
37
  type: z.ZodString;
37
38
  }, "strip", z.ZodTypeAny, {
38
39
  type: string;
39
- filename: string;
40
+ path: string;
40
41
  originalFilename: string;
41
42
  }, {
42
43
  type: string;
43
- filename: string;
44
+ path: string;
44
45
  originalFilename: string;
45
- }>>> | z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
46
+ }>>> | z.ZodObject<{
47
+ firstname: z.ZodString;
48
+ surname: z.ZodString;
49
+ middlename: z.ZodOptional<z.ZodString>;
50
+ }, "strip", z.ZodTypeAny, {
51
+ firstname: string;
52
+ surname: string;
53
+ middlename?: string | undefined;
54
+ }, {
55
+ firstname: string;
56
+ surname: string;
57
+ middlename?: string | undefined;
58
+ }> | z.ZodUndefined | z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
59
+ firstname: z.ZodString;
60
+ surname: z.ZodString;
61
+ middlename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
62
+ }, "strip", z.ZodTypeAny, {
63
+ firstname: string;
64
+ surname: string;
65
+ middlename?: string | null | undefined;
66
+ }, {
67
+ firstname: string;
68
+ surname: string;
69
+ middlename?: string | null | undefined;
70
+ }>, z.ZodNull]>, z.ZodUndefined]> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
71
+ firstname: z.ZodString;
72
+ surname: z.ZodString;
73
+ middlename: z.ZodOptional<z.ZodString>;
74
+ }, "strip", z.ZodTypeAny, {
75
+ firstname: string;
76
+ surname: string;
77
+ middlename?: string | undefined;
78
+ }, {
79
+ firstname: string;
80
+ surname: string;
81
+ middlename?: string | undefined;
82
+ }>>> | z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
83
+ firstname: z.ZodString;
84
+ surname: z.ZodString;
85
+ middlename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
86
+ }, "strip", z.ZodTypeAny, {
87
+ firstname: string;
88
+ surname: string;
89
+ middlename?: string | null | undefined;
90
+ }, {
91
+ firstname: string;
92
+ surname: string;
93
+ middlename?: string | null | undefined;
94
+ }>, z.ZodNull]>, z.ZodUndefined]>>> | z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
46
95
  country: z.ZodString;
96
+ addressType: z.ZodLiteral<"DOMESTIC">;
47
97
  province: z.ZodString;
48
98
  district: z.ZodString;
49
99
  }, {
@@ -56,6 +106,7 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
56
106
  }>, "strip", z.ZodTypeAny, {
57
107
  country: string;
58
108
  district: string;
109
+ addressType: "DOMESTIC";
59
110
  province: string;
60
111
  urbanOrRural: "URBAN";
61
112
  number?: string | null | undefined;
@@ -66,6 +117,7 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
66
117
  }, {
67
118
  country: string;
68
119
  district: string;
120
+ addressType: "DOMESTIC";
69
121
  province: string;
70
122
  urbanOrRural: "URBAN";
71
123
  number?: string | null | undefined;
@@ -75,6 +127,7 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
75
127
  zipCode?: string | null | undefined;
76
128
  }>, z.ZodObject<z.objectUtil.extendShape<{
77
129
  country: z.ZodString;
130
+ addressType: z.ZodLiteral<"DOMESTIC">;
78
131
  province: z.ZodString;
79
132
  district: z.ZodString;
80
133
  }, {
@@ -83,47 +136,98 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
83
136
  }>, "strip", z.ZodTypeAny, {
84
137
  country: string;
85
138
  district: string;
139
+ addressType: "DOMESTIC";
86
140
  province: string;
87
141
  urbanOrRural: "RURAL";
88
142
  village?: string | null | undefined;
89
143
  }, {
90
144
  country: string;
91
145
  district: string;
146
+ addressType: "DOMESTIC";
92
147
  province: string;
93
148
  urbanOrRural: "RURAL";
94
149
  village?: string | null | undefined;
150
+ }>]>, z.ZodObject<{
151
+ country: z.ZodString;
152
+ addressType: z.ZodLiteral<"INTERNATIONAL">;
153
+ state: z.ZodString;
154
+ district2: z.ZodString;
155
+ cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
156
+ addressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
157
+ addressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
158
+ addressLine3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
159
+ postcodeOrZip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
160
+ }, "strip", z.ZodTypeAny, {
161
+ country: string;
162
+ state: string;
163
+ addressType: "INTERNATIONAL";
164
+ district2: string;
165
+ cityOrTown?: string | null | undefined;
166
+ addressLine1?: string | null | undefined;
167
+ addressLine2?: string | null | undefined;
168
+ addressLine3?: string | null | undefined;
169
+ postcodeOrZip?: string | null | undefined;
170
+ }, {
171
+ country: string;
172
+ state: string;
173
+ addressType: "INTERNATIONAL";
174
+ district2: string;
175
+ cityOrTown?: string | null | undefined;
176
+ addressLine1?: string | null | undefined;
177
+ addressLine2?: string | null | undefined;
178
+ addressLine3?: string | null | undefined;
179
+ postcodeOrZip?: string | null | undefined;
95
180
  }>]> | z.ZodArray<z.ZodObject<{
96
- filename: z.ZodString;
181
+ path: z.ZodEffects<z.ZodString, string, string>;
97
182
  originalFilename: z.ZodString;
98
183
  type: z.ZodString;
99
184
  option: z.ZodString;
100
185
  }, "strip", z.ZodTypeAny, {
101
186
  type: string;
102
187
  option: string;
103
- filename: string;
188
+ path: string;
104
189
  originalFilename: string;
105
190
  }, {
106
191
  type: string;
107
192
  option: string;
108
- filename: string;
193
+ path: string;
109
194
  originalFilename: string;
110
195
  }>, "many"> | z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
111
- filename: z.ZodString;
196
+ path: z.ZodEffects<z.ZodString, string, string>;
112
197
  originalFilename: z.ZodString;
113
198
  type: z.ZodString;
114
199
  option: z.ZodString;
115
200
  }, "strip", z.ZodTypeAny, {
116
201
  type: string;
117
202
  option: string;
118
- filename: string;
203
+ path: string;
119
204
  originalFilename: string;
120
205
  }, {
121
206
  type: string;
122
207
  option: string;
123
- filename: string;
208
+ path: string;
124
209
  originalFilename: string;
125
- }>, "many">>> | z.ZodBoolean | z.ZodOptional<z.ZodNullable<z.ZodBoolean>> | z.ZodNumber | z.ZodOptional<z.ZodNullable<z.ZodNumber>> | z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
210
+ }>, "many">>> | z.ZodEnum<["last7Days", "last30Days", "last90Days", "last365Days"]> | z.ZodUnion<[z.ZodObject<{
211
+ start: z.ZodString;
212
+ end: z.ZodString;
213
+ }, "strip", z.ZodTypeAny, {
214
+ start: string;
215
+ end: string;
216
+ }, {
217
+ start: string;
218
+ end: string;
219
+ }>, z.ZodString]> | z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodObject<{
220
+ start: z.ZodString;
221
+ end: z.ZodString;
222
+ }, "strip", z.ZodTypeAny, {
223
+ start: string;
224
+ end: string;
225
+ }, {
226
+ start: string;
227
+ end: string;
228
+ }>, z.ZodString]>>> | z.ZodOptional<z.ZodNullable<z.ZodEnum<["last7Days", "last30Days", "last90Days", "last365Days"]>>> | z.ZodBoolean | z.ZodOptional<z.ZodNullable<z.ZodBoolean>> | z.ZodNumber | z.ZodOptional<z.ZodNullable<z.ZodNumber>> | z.ZodOptional<z.ZodNullable<z.ZodUndefined>> | z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
126
229
  country: z.ZodString;
230
+ addressType: z.ZodLiteral<"DOMESTIC">;
127
231
  province: z.ZodString;
128
232
  district: z.ZodString;
129
233
  }, {
@@ -136,6 +240,7 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
136
240
  }>, "strip", z.ZodTypeAny, {
137
241
  country: string;
138
242
  district: string;
243
+ addressType: "DOMESTIC";
139
244
  province: string;
140
245
  urbanOrRural: "URBAN";
141
246
  number?: string | null | undefined;
@@ -146,6 +251,7 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
146
251
  }, {
147
252
  country: string;
148
253
  district: string;
254
+ addressType: "DOMESTIC";
149
255
  province: string;
150
256
  urbanOrRural: "URBAN";
151
257
  number?: string | null | undefined;
@@ -155,6 +261,7 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
155
261
  zipCode?: string | null | undefined;
156
262
  }>, z.ZodObject<z.objectUtil.extendShape<{
157
263
  country: z.ZodString;
264
+ addressType: z.ZodLiteral<"DOMESTIC">;
158
265
  province: z.ZodString;
159
266
  district: z.ZodString;
160
267
  }, {
@@ -163,24 +270,57 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
163
270
  }>, "strip", z.ZodTypeAny, {
164
271
  country: string;
165
272
  district: string;
273
+ addressType: "DOMESTIC";
166
274
  province: string;
167
275
  urbanOrRural: "RURAL";
168
276
  village?: string | null | undefined;
169
277
  }, {
170
278
  country: string;
171
279
  district: string;
280
+ addressType: "DOMESTIC";
172
281
  province: string;
173
282
  urbanOrRural: "RURAL";
174
283
  village?: string | null | undefined;
284
+ }>]>, z.ZodObject<{
285
+ country: z.ZodString;
286
+ addressType: z.ZodLiteral<"INTERNATIONAL">;
287
+ state: z.ZodString;
288
+ district2: z.ZodString;
289
+ cityOrTown: z.ZodOptional<z.ZodNullable<z.ZodString>>;
290
+ addressLine1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
291
+ addressLine2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
292
+ addressLine3: z.ZodOptional<z.ZodNullable<z.ZodString>>;
293
+ postcodeOrZip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
294
+ }, "strip", z.ZodTypeAny, {
295
+ country: string;
296
+ state: string;
297
+ addressType: "INTERNATIONAL";
298
+ district2: string;
299
+ cityOrTown?: string | null | undefined;
300
+ addressLine1?: string | null | undefined;
301
+ addressLine2?: string | null | undefined;
302
+ addressLine3?: string | null | undefined;
303
+ postcodeOrZip?: string | null | undefined;
304
+ }, {
305
+ country: string;
306
+ state: string;
307
+ addressType: "INTERNATIONAL";
308
+ district2: string;
309
+ cityOrTown?: string | null | undefined;
310
+ addressLine1?: string | null | undefined;
311
+ addressLine2?: string | null | undefined;
312
+ addressLine3?: string | null | undefined;
313
+ postcodeOrZip?: string | null | undefined;
175
314
  }>]>>>;
176
315
  export declare function createValidationSchema(config: FieldConfig[]): z.ZodObject<Record<string, FieldUpdateValueSchema | NullishFieldValueSchema>, "strip", z.ZodTypeAny, {
177
316
  [x: string]: string | number | boolean | {
178
317
  type: string;
179
- filename: string;
318
+ path: string;
180
319
  originalFilename: string;
181
320
  } | {
182
321
  country: string;
183
322
  district: string;
323
+ addressType: "DOMESTIC";
184
324
  province: string;
185
325
  urbanOrRural: "URBAN";
186
326
  number?: string | null | undefined;
@@ -188,26 +328,49 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
188
328
  residentialArea?: string | null | undefined;
189
329
  street?: string | null | undefined;
190
330
  zipCode?: string | null | undefined;
331
+ } | {
332
+ firstname: string;
333
+ surname: string;
334
+ middlename?: string | undefined;
335
+ } | {
336
+ firstname: string;
337
+ surname: string;
338
+ middlename?: string | null | undefined;
191
339
  } | {
192
340
  country: string;
193
341
  district: string;
342
+ addressType: "DOMESTIC";
194
343
  province: string;
195
344
  urbanOrRural: "RURAL";
196
345
  village?: string | null | undefined;
346
+ } | {
347
+ country: string;
348
+ state: string;
349
+ addressType: "INTERNATIONAL";
350
+ district2: string;
351
+ cityOrTown?: string | null | undefined;
352
+ addressLine1?: string | null | undefined;
353
+ addressLine2?: string | null | undefined;
354
+ addressLine3?: string | null | undefined;
355
+ postcodeOrZip?: string | null | undefined;
197
356
  } | {
198
357
  type: string;
199
358
  option: string;
200
- filename: string;
359
+ path: string;
201
360
  originalFilename: string;
202
- }[] | null | undefined;
361
+ }[] | {
362
+ start: string;
363
+ end: string;
364
+ } | null | undefined;
203
365
  }, {
204
366
  [x: string]: string | number | boolean | {
205
367
  type: string;
206
- filename: string;
368
+ path: string;
207
369
  originalFilename: string;
208
370
  } | {
209
371
  country: string;
210
372
  district: string;
373
+ addressType: "DOMESTIC";
211
374
  province: string;
212
375
  urbanOrRural: "URBAN";
213
376
  number?: string | null | undefined;
@@ -215,40 +378,64 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
215
378
  residentialArea?: string | null | undefined;
216
379
  street?: string | null | undefined;
217
380
  zipCode?: string | null | undefined;
381
+ } | {
382
+ firstname: string;
383
+ surname: string;
384
+ middlename?: string | undefined;
385
+ } | {
386
+ firstname: string;
387
+ surname: string;
388
+ middlename?: string | null | undefined;
218
389
  } | {
219
390
  country: string;
220
391
  district: string;
392
+ addressType: "DOMESTIC";
221
393
  province: string;
222
394
  urbanOrRural: "RURAL";
223
395
  village?: string | null | undefined;
396
+ } | {
397
+ country: string;
398
+ state: string;
399
+ addressType: "INTERNATIONAL";
400
+ district2: string;
401
+ cityOrTown?: string | null | undefined;
402
+ addressLine1?: string | null | undefined;
403
+ addressLine2?: string | null | undefined;
404
+ addressLine3?: string | null | undefined;
405
+ postcodeOrZip?: string | null | undefined;
224
406
  } | {
225
407
  type: string;
226
408
  option: string;
227
- filename: string;
409
+ path: string;
228
410
  originalFilename: string;
229
- }[] | null | undefined;
411
+ }[] | {
412
+ start: string;
413
+ end: string;
414
+ } | null | undefined;
230
415
  }>;
231
416
  /**
232
- * Quick-and-dirty mock data generator for event actions.
417
+ * Maps complex or nested field types, such as Address fields, to their corresponding empty values.
233
418
  */
234
- export declare function mapFieldTypeToMockValue(field: FieldConfig, i: number): string | true | 19 | {
235
- country: string;
236
- province: string;
237
- district: string;
419
+ export declare function mapFieldTypeToEmptyValue(field: FieldConfig): never[] | {
420
+ country: null;
421
+ addressType: "DOMESTIC";
422
+ province: null;
423
+ district: null;
238
424
  urbanOrRural: string;
239
- town: string;
240
- residentialArea: string;
241
- street: string;
242
- number: string;
243
- zipCode: string;
244
- filename?: undefined;
425
+ town: null;
426
+ residentialArea: null;
427
+ street: null;
428
+ number: null;
429
+ zipCode: null;
430
+ path?: undefined;
245
431
  originalFilename?: undefined;
246
432
  type?: undefined;
247
433
  } | {
248
- filename: string;
434
+ path: FullDocumentPath;
249
435
  originalFilename: string;
250
436
  type: string;
251
437
  country?: undefined;
438
+ addressType?: undefined;
252
439
  province?: undefined;
253
440
  district?: undefined;
254
441
  urbanOrRural?: undefined;
@@ -272,6 +459,20 @@ export declare const isDateFieldType: (field: {
272
459
  value: string;
273
460
  config: DateField;
274
461
  };
462
+ export declare const isDateRangeFieldType: (field: {
463
+ config: FieldConfig;
464
+ value: FieldValue;
465
+ }) => field is {
466
+ value: DateRangeFieldValue;
467
+ config: DateRangeField;
468
+ };
469
+ export declare const isSelectDateRangeFieldType: (field: {
470
+ config: FieldConfig;
471
+ value: FieldValue;
472
+ }) => field is {
473
+ value: SelectDateRangeValue;
474
+ config: SelectDateRangeField;
475
+ };
275
476
  export declare const isPageHeaderFieldType: (field: {
276
477
  config: FieldConfig;
277
478
  value: FieldValue;
@@ -293,6 +494,27 @@ export declare const isNumberFieldType: (field: {
293
494
  value: number;
294
495
  config: NumberField;
295
496
  };
497
+ export declare const isNameFieldType: (field: {
498
+ config: FieldConfig;
499
+ value: FieldValue;
500
+ }) => field is {
501
+ value: NameFieldValue;
502
+ config: NameField;
503
+ };
504
+ export declare const isPhoneFieldType: (field: {
505
+ config: FieldConfig;
506
+ value: FieldValue;
507
+ }) => field is {
508
+ value: string;
509
+ config: PhoneField;
510
+ };
511
+ export declare const isIdFieldType: (field: {
512
+ config: FieldConfig;
513
+ value: FieldValue;
514
+ }) => field is {
515
+ value: string;
516
+ config: IdField;
517
+ };
296
518
  export declare const isTextAreaFieldType: (field: {
297
519
  config: FieldConfig;
298
520
  value: FieldValue;
@@ -302,9 +524,9 @@ export declare const isTextAreaFieldType: (field: {
302
524
  };
303
525
  export declare const isSignatureFieldType: (field: {
304
526
  config: FieldConfig;
305
- value: FieldValue;
527
+ value: FieldValue | undefined;
306
528
  }) => field is {
307
- value: string;
529
+ value: FileFieldValue | undefined;
308
530
  config: SignatureField;
309
531
  };
310
532
  export declare const isEmailFieldType: (field: {
@@ -405,5 +627,15 @@ export declare const isOfficeFieldType: (field: {
405
627
  value: string;
406
628
  config: Office;
407
629
  };
630
+ export declare const isDataFieldType: (field: {
631
+ config: FieldConfig;
632
+ value: FieldValue;
633
+ }) => field is {
634
+ value: undefined;
635
+ config: DataField;
636
+ };
637
+ export type NonInteractiveFieldType = Divider | PageHeader | Paragraph | BulletList | DataField;
638
+ export type InteractiveFieldType = Exclude<FieldConfig, NonInteractiveFieldType>;
639
+ export declare const isNonInteractiveFieldType: (field: FieldConfig) => field is NonInteractiveFieldType;
408
640
  export {};
409
641
  //# sourceMappingURL=FieldTypeMapping.d.ts.map