@opencrvs/toolkit 1.8.0-rc.ffe8c17 → 1.8.1-rc.0c972dc

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 (49) hide show
  1. package/README.md +1 -1
  2. package/dist/commons/api/router.d.ts +8949 -10987
  3. package/dist/commons/conditionals/conditionals.d.ts +31 -12
  4. package/dist/commons/conditionals/validate.d.ts +33 -18
  5. package/dist/commons/events/ActionConfig.d.ts +120316 -3282
  6. package/dist/commons/events/ActionDocument.d.ts +14099 -797
  7. package/dist/commons/events/ActionInput.d.ts +8194 -1095
  8. package/dist/commons/events/ActionType.d.ts +35 -11
  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 -114
  16. package/dist/commons/events/EventConfig.d.ts +54502 -3192
  17. package/dist/commons/events/EventConfigInput.d.ts +6 -3
  18. package/dist/commons/events/EventDocument.d.ts +5847 -999
  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 +7197 -1211
  22. package/dist/commons/events/FieldType.d.ts +8 -3
  23. package/dist/commons/events/FieldTypeMapping.d.ts +253 -268
  24. package/dist/commons/events/FieldValue.d.ts +159 -93
  25. package/dist/commons/events/FormConfig.d.ts +56618 -336
  26. package/dist/commons/events/PageConfig.d.ts +14169 -0
  27. package/dist/commons/events/SummaryConfig.d.ts +93 -42
  28. package/dist/commons/events/TemplateConfig.d.ts +5 -5
  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 +8634 -460
  33. package/dist/commons/events/event.d.ts +108 -0
  34. package/dist/commons/events/field.d.ts +108 -0
  35. package/dist/commons/events/index.d.ts +10 -1
  36. package/dist/commons/events/scopes.d.ts +45 -0
  37. package/dist/commons/events/serializer.d.ts +2 -0
  38. package/dist/commons/events/test.utils.d.ts +284 -237
  39. package/dist/commons/events/transactions.d.ts +1 -1
  40. package/dist/commons/events/utils.d.ts +15662 -168
  41. package/dist/commons/events/workqueueDefaultColumns.d.ts +3 -0
  42. package/dist/conditionals/index.js +211 -115
  43. package/dist/events/index.js +5405 -1871
  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
  49. package/dist/commons/conditionals/validate.test.d.ts +0 -2
@@ -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, Data } 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, TimeField } 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,201 +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;
95
- }>]> | z.ZodArray<z.ZodObject<{
96
- filename: z.ZodString;
97
- originalFilename: z.ZodString;
98
- type: z.ZodString;
99
- option: z.ZodString;
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>>;
100
160
  }, "strip", z.ZodTypeAny, {
101
- type: string;
102
- option: string;
103
- filename: string;
104
- originalFilename: string;
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;
105
170
  }, {
106
- type: string;
107
- option: string;
108
- filename: string;
109
- originalFilename: string;
110
- }>, "many"> | z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
111
- filename: z.ZodString;
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;
180
+ }>]> | z.ZodArray<z.ZodObject<{
181
+ path: z.ZodEffects<z.ZodString, string, string>;
112
182
  originalFilename: z.ZodString;
113
183
  type: z.ZodString;
114
184
  option: z.ZodString;
115
185
  }, "strip", z.ZodTypeAny, {
116
186
  type: string;
117
187
  option: string;
118
- filename: string;
188
+ path: string;
119
189
  originalFilename: string;
120
190
  }, {
121
191
  type: string;
122
192
  option: string;
123
- filename: string;
124
- originalFilename: string;
125
- }>, "many">>> | z.ZodBoolean | z.ZodOptional<z.ZodNullable<z.ZodBoolean>> | z.ZodNumber | z.ZodOptional<z.ZodNullable<z.ZodNumber>> | z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
126
- filename: z.ZodString;
127
- originalFilename: z.ZodString;
128
- type: z.ZodString;
129
- }, "strip", z.ZodTypeAny, {
130
- type: string;
131
- filename: string;
193
+ path: string;
132
194
  originalFilename: string;
133
- }, {
134
- type: string;
135
- filename: string;
136
- originalFilename: string;
137
- }>, z.ZodArray<z.ZodObject<{
138
- filename: z.ZodString;
195
+ }>, "many"> | z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
196
+ path: z.ZodEffects<z.ZodString, string, string>;
139
197
  originalFilename: z.ZodString;
140
198
  type: z.ZodString;
141
199
  option: z.ZodString;
142
200
  }, "strip", z.ZodTypeAny, {
143
201
  type: string;
144
202
  option: string;
145
- filename: string;
203
+ path: string;
146
204
  originalFilename: string;
147
205
  }, {
148
206
  type: string;
149
207
  option: string;
150
- filename: string;
208
+ path: string;
151
209
  originalFilename: string;
152
- }>, "many">, z.ZodObject<z.objectUtil.extendShape<{
153
- country: z.ZodString;
154
- province: z.ZodString;
155
- district: z.ZodString;
156
- }, {
157
- urbanOrRural: z.ZodLiteral<"URBAN">;
158
- town: z.ZodOptional<z.ZodString>;
159
- residentialArea: z.ZodOptional<z.ZodString>;
160
- street: z.ZodOptional<z.ZodString>;
161
- number: z.ZodOptional<z.ZodString>;
162
- zipCode: z.ZodOptional<z.ZodString>;
163
- }>, "strip", z.ZodTypeAny, {
164
- country: string;
165
- district: string;
166
- province: string;
167
- urbanOrRural: "URBAN";
168
- number?: string | undefined;
169
- town?: string | undefined;
170
- residentialArea?: string | undefined;
171
- street?: string | undefined;
172
- zipCode?: string | undefined;
173
- }, {
174
- country: string;
175
- district: string;
176
- province: string;
177
- urbanOrRural: "URBAN";
178
- number?: string | undefined;
179
- town?: string | undefined;
180
- residentialArea?: string | undefined;
181
- street?: string | undefined;
182
- zipCode?: string | undefined;
183
- }>, z.ZodObject<z.objectUtil.extendShape<{
184
- country: z.ZodString;
185
- province: z.ZodString;
186
- district: z.ZodString;
187
- }, {
188
- urbanOrRural: z.ZodLiteral<"RURAL">;
189
- village: z.ZodOptional<z.ZodString>;
190
- }>, "strip", z.ZodTypeAny, {
191
- country: string;
192
- district: string;
193
- province: string;
194
- urbanOrRural: "RURAL";
195
- village?: string | undefined;
196
- }, {
197
- country: string;
198
- district: string;
199
- province: string;
200
- urbanOrRural: "RURAL";
201
- village?: string | undefined;
202
- }>]>> | z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
203
- filename: z.ZodString;
204
- originalFilename: z.ZodString;
205
- type: z.ZodString;
210
+ }>, "many">>> | z.ZodEnum<["last7Days", "last30Days", "last90Days", "last365Days"]> | z.ZodUnion<[z.ZodObject<{
211
+ start: z.ZodString;
212
+ end: z.ZodString;
206
213
  }, "strip", z.ZodTypeAny, {
207
- type: string;
208
- filename: string;
209
- originalFilename: string;
214
+ start: string;
215
+ end: string;
210
216
  }, {
211
- type: string;
212
- filename: string;
213
- originalFilename: string;
214
- }>, z.ZodArray<z.ZodObject<{
215
- filename: z.ZodString;
216
- originalFilename: z.ZodString;
217
- type: z.ZodString;
218
- option: z.ZodString;
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;
219
222
  }, "strip", z.ZodTypeAny, {
220
- type: string;
221
- option: string;
222
- filename: string;
223
- originalFilename: string;
224
- }, {
225
- type: string;
226
- option: string;
227
- filename: string;
228
- originalFilename: string;
229
- }>, "many">, z.ZodObject<z.objectUtil.extendShape<{
230
- country: z.ZodString;
231
- province: z.ZodString;
232
- district: z.ZodString;
233
- }, {
234
- urbanOrRural: z.ZodLiteral<"URBAN">;
235
- town: z.ZodOptional<z.ZodString>;
236
- residentialArea: z.ZodOptional<z.ZodString>;
237
- street: z.ZodOptional<z.ZodString>;
238
- number: z.ZodOptional<z.ZodString>;
239
- zipCode: z.ZodOptional<z.ZodString>;
240
- }>, "strip", z.ZodTypeAny, {
241
- country: string;
242
- district: string;
243
- province: string;
244
- urbanOrRural: "URBAN";
245
- number?: string | undefined;
246
- town?: string | undefined;
247
- residentialArea?: string | undefined;
248
- street?: string | undefined;
249
- zipCode?: string | undefined;
250
- }, {
251
- country: string;
252
- district: string;
253
- province: string;
254
- urbanOrRural: "URBAN";
255
- number?: string | undefined;
256
- town?: string | undefined;
257
- residentialArea?: string | undefined;
258
- street?: string | undefined;
259
- zipCode?: string | undefined;
260
- }>, z.ZodObject<z.objectUtil.extendShape<{
261
- country: z.ZodString;
262
- province: z.ZodString;
263
- district: z.ZodString;
264
- }, {
265
- urbanOrRural: z.ZodLiteral<"RURAL">;
266
- village: z.ZodOptional<z.ZodString>;
267
- }>, "strip", z.ZodTypeAny, {
268
- country: string;
269
- district: string;
270
- province: string;
271
- urbanOrRural: "RURAL";
272
- village?: string | undefined;
223
+ start: string;
224
+ end: string;
273
225
  }, {
274
- country: string;
275
- district: string;
276
- province: string;
277
- urbanOrRural: "RURAL";
278
- village?: string | undefined;
279
- }>]>>>> | z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
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<{
280
229
  country: z.ZodString;
230
+ addressType: z.ZodLiteral<"DOMESTIC">;
281
231
  province: z.ZodString;
282
232
  district: z.ZodString;
283
233
  }, {
@@ -290,6 +240,7 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
290
240
  }>, "strip", z.ZodTypeAny, {
291
241
  country: string;
292
242
  district: string;
243
+ addressType: "DOMESTIC";
293
244
  province: string;
294
245
  urbanOrRural: "URBAN";
295
246
  number?: string | null | undefined;
@@ -300,6 +251,7 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
300
251
  }, {
301
252
  country: string;
302
253
  district: string;
254
+ addressType: "DOMESTIC";
303
255
  province: string;
304
256
  urbanOrRural: "URBAN";
305
257
  number?: string | null | undefined;
@@ -309,6 +261,7 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
309
261
  zipCode?: string | null | undefined;
310
262
  }>, z.ZodObject<z.objectUtil.extendShape<{
311
263
  country: z.ZodString;
264
+ addressType: z.ZodLiteral<"DOMESTIC">;
312
265
  province: z.ZodString;
313
266
  district: z.ZodString;
314
267
  }, {
@@ -317,24 +270,57 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
317
270
  }>, "strip", z.ZodTypeAny, {
318
271
  country: string;
319
272
  district: string;
273
+ addressType: "DOMESTIC";
320
274
  province: string;
321
275
  urbanOrRural: "RURAL";
322
276
  village?: string | null | undefined;
323
277
  }, {
324
278
  country: string;
325
279
  district: string;
280
+ addressType: "DOMESTIC";
326
281
  province: string;
327
282
  urbanOrRural: "RURAL";
328
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;
329
314
  }>]>>>;
330
315
  export declare function createValidationSchema(config: FieldConfig[]): z.ZodObject<Record<string, FieldUpdateValueSchema | NullishFieldValueSchema>, "strip", z.ZodTypeAny, {
331
316
  [x: string]: string | number | boolean | {
332
317
  type: string;
333
- filename: string;
318
+ path: string;
334
319
  originalFilename: string;
335
320
  } | {
336
321
  country: string;
337
322
  district: string;
323
+ addressType: "DOMESTIC";
338
324
  province: string;
339
325
  urbanOrRural: "URBAN";
340
326
  number?: string | null | undefined;
@@ -343,50 +329,48 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
343
329
  street?: string | null | undefined;
344
330
  zipCode?: string | null | undefined;
345
331
  } | {
346
- country: string;
347
- district: string;
348
- province: string;
349
- urbanOrRural: "RURAL";
350
- village?: string | null | undefined;
332
+ firstname: string;
333
+ surname: string;
334
+ middlename?: string | undefined;
351
335
  } | {
352
- type: string;
353
- option: string;
354
- filename: string;
355
- originalFilename: string;
356
- }[] | Record<string, string | number | boolean | {
357
- type: string;
358
- filename: string;
359
- originalFilename: string;
336
+ firstname: string;
337
+ surname: string;
338
+ middlename?: string | null | undefined;
360
339
  } | {
361
340
  country: string;
362
341
  district: string;
342
+ addressType: "DOMESTIC";
363
343
  province: string;
364
- urbanOrRural: "URBAN";
365
- number?: string | undefined;
366
- town?: string | undefined;
367
- residentialArea?: string | undefined;
368
- street?: string | undefined;
369
- zipCode?: string | undefined;
344
+ urbanOrRural: "RURAL";
345
+ village?: string | null | undefined;
370
346
  } | {
371
347
  country: string;
372
- district: string;
373
- province: string;
374
- urbanOrRural: "RURAL";
375
- village?: string | undefined;
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;
376
356
  } | {
377
357
  type: string;
378
358
  option: string;
379
- filename: string;
359
+ path: string;
380
360
  originalFilename: string;
381
- }[]> | null | undefined;
361
+ }[] | {
362
+ start: string;
363
+ end: string;
364
+ } | null | undefined;
382
365
  }, {
383
366
  [x: string]: string | number | boolean | {
384
367
  type: string;
385
- filename: string;
368
+ path: string;
386
369
  originalFilename: string;
387
370
  } | {
388
371
  country: string;
389
372
  district: string;
373
+ addressType: "DOMESTIC";
390
374
  province: string;
391
375
  urbanOrRural: "URBAN";
392
376
  number?: string | null | undefined;
@@ -395,91 +379,46 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
395
379
  street?: string | null | undefined;
396
380
  zipCode?: string | null | undefined;
397
381
  } | {
398
- country: string;
399
- district: string;
400
- province: string;
401
- urbanOrRural: "RURAL";
402
- village?: string | null | undefined;
382
+ firstname: string;
383
+ surname: string;
384
+ middlename?: string | undefined;
403
385
  } | {
404
- type: string;
405
- option: string;
406
- filename: string;
407
- originalFilename: string;
408
- }[] | Record<string, string | number | boolean | {
409
- type: string;
410
- filename: string;
411
- originalFilename: string;
386
+ firstname: string;
387
+ surname: string;
388
+ middlename?: string | null | undefined;
412
389
  } | {
413
390
  country: string;
414
391
  district: string;
392
+ addressType: "DOMESTIC";
415
393
  province: string;
416
- urbanOrRural: "URBAN";
417
- number?: string | undefined;
418
- town?: string | undefined;
419
- residentialArea?: string | undefined;
420
- street?: string | undefined;
421
- zipCode?: string | undefined;
394
+ urbanOrRural: "RURAL";
395
+ village?: string | null | undefined;
422
396
  } | {
423
397
  country: string;
424
- district: string;
425
- province: string;
426
- urbanOrRural: "RURAL";
427
- village?: string | undefined;
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;
428
406
  } | {
429
407
  type: string;
430
408
  option: string;
431
- filename: string;
409
+ path: string;
432
410
  originalFilename: string;
433
- }[]> | null | undefined;
411
+ }[] | {
412
+ start: string;
413
+ end: string;
414
+ } | null | undefined;
434
415
  }>;
435
- /**
436
- * Quick-and-dirty mock data generator for event actions.
437
- */
438
- export declare function mapFieldTypeToMockValue(field: FieldConfig, i: number): string | true | 19 | {
439
- country: string;
440
- province: string;
441
- district: string;
442
- urbanOrRural: string;
443
- town: string;
444
- residentialArea: string;
445
- street: string;
446
- number: string;
447
- zipCode: string;
448
- filename?: undefined;
449
- originalFilename?: undefined;
450
- type?: undefined;
451
- } | {
452
- filename: string;
453
- originalFilename: string;
454
- type: string;
455
- country?: undefined;
456
- province?: undefined;
457
- district?: undefined;
458
- urbanOrRural?: undefined;
459
- town?: undefined;
460
- residentialArea?: undefined;
461
- street?: undefined;
462
- number?: undefined;
463
- zipCode?: undefined;
464
- } | {
465
- country?: undefined;
466
- province?: undefined;
467
- district?: undefined;
468
- urbanOrRural?: undefined;
469
- town?: undefined;
470
- residentialArea?: undefined;
471
- street?: undefined;
472
- number?: undefined;
473
- zipCode?: undefined;
474
- filename?: undefined;
475
- originalFilename?: undefined;
476
- type?: undefined;
477
- } | null;
478
416
  /**
479
417
  * Maps complex or nested field types, such as Address fields, to their corresponding empty values.
480
418
  */
481
419
  export declare function mapFieldTypeToEmptyValue(field: FieldConfig): never[] | {
482
420
  country: null;
421
+ addressType: "DOMESTIC";
483
422
  province: null;
484
423
  district: null;
485
424
  urbanOrRural: string;
@@ -488,14 +427,15 @@ export declare function mapFieldTypeToEmptyValue(field: FieldConfig): never[] |
488
427
  street: null;
489
428
  number: null;
490
429
  zipCode: null;
491
- filename?: undefined;
430
+ path?: undefined;
492
431
  originalFilename?: undefined;
493
432
  type?: undefined;
494
433
  } | {
495
- filename: string;
434
+ path: FullDocumentPath;
496
435
  originalFilename: string;
497
436
  type: string;
498
437
  country?: undefined;
438
+ addressType?: undefined;
499
439
  province?: undefined;
500
440
  district?: undefined;
501
441
  urbanOrRural?: undefined;
@@ -519,6 +459,27 @@ export declare const isDateFieldType: (field: {
519
459
  value: string;
520
460
  config: DateField;
521
461
  };
462
+ export declare const isTimeFieldType: (field: {
463
+ config: FieldConfig;
464
+ value: FieldValue;
465
+ }) => field is {
466
+ value: string;
467
+ config: TimeField;
468
+ };
469
+ export declare const isDateRangeFieldType: (field: {
470
+ config: FieldConfig;
471
+ value: FieldValue;
472
+ }) => field is {
473
+ value: DateRangeFieldValue;
474
+ config: DateRangeField;
475
+ };
476
+ export declare const isSelectDateRangeFieldType: (field: {
477
+ config: FieldConfig;
478
+ value: FieldValue;
479
+ }) => field is {
480
+ value: SelectDateRangeValue;
481
+ config: SelectDateRangeField;
482
+ };
522
483
  export declare const isPageHeaderFieldType: (field: {
523
484
  config: FieldConfig;
524
485
  value: FieldValue;
@@ -540,6 +501,27 @@ export declare const isNumberFieldType: (field: {
540
501
  value: number;
541
502
  config: NumberField;
542
503
  };
504
+ export declare const isNameFieldType: (field: {
505
+ config: FieldConfig;
506
+ value: FieldValue;
507
+ }) => field is {
508
+ value: NameFieldValue;
509
+ config: NameField;
510
+ };
511
+ export declare const isPhoneFieldType: (field: {
512
+ config: FieldConfig;
513
+ value: FieldValue;
514
+ }) => field is {
515
+ value: string;
516
+ config: PhoneField;
517
+ };
518
+ export declare const isIdFieldType: (field: {
519
+ config: FieldConfig;
520
+ value: FieldValue;
521
+ }) => field is {
522
+ value: string;
523
+ config: IdField;
524
+ };
543
525
  export declare const isTextAreaFieldType: (field: {
544
526
  config: FieldConfig;
545
527
  value: FieldValue;
@@ -549,9 +531,9 @@ export declare const isTextAreaFieldType: (field: {
549
531
  };
550
532
  export declare const isSignatureFieldType: (field: {
551
533
  config: FieldConfig;
552
- value: FieldValue;
534
+ value: FieldValue | undefined;
553
535
  }) => field is {
554
- value: string;
536
+ value: FileFieldValue | undefined;
555
537
  config: SignatureField;
556
538
  };
557
539
  export declare const isEmailFieldType: (field: {
@@ -656,8 +638,11 @@ export declare const isDataFieldType: (field: {
656
638
  config: FieldConfig;
657
639
  value: FieldValue;
658
640
  }) => field is {
659
- value: any;
660
- config: Data;
641
+ value: undefined;
642
+ config: DataField;
661
643
  };
644
+ export type NonInteractiveFieldType = Divider | PageHeader | Paragraph | BulletList | DataField;
645
+ export type InteractiveFieldType = Exclude<FieldConfig, NonInteractiveFieldType>;
646
+ export declare const isNonInteractiveFieldType: (field: FieldConfig) => field is NonInteractiveFieldType;
662
647
  export {};
663
648
  //# sourceMappingURL=FieldTypeMapping.d.ts.map