@opencrvs/toolkit 1.8.0-rc.ff2e7b6 → 1.8.0-rc.ffe8c17

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.
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { EventConfig } from './EventConfig';
3
- import { FormConfig, FormConfigInput, FormPage } from './FormConfig';
3
+ import { FormConfig, FormConfigInput, Page, PageInput } from './FormConfig';
4
4
  export type EventConfigInput = z.input<typeof EventConfig>;
5
5
  export declare const defineForm: (form: FormConfigInput) => FormConfig;
6
- export declare const defineFormPage: (formPage: FormPage) => FormPage;
6
+ export declare const definePage: (formPage: PageInput) => Page;
7
7
  //# sourceMappingURL=EventConfigInput.d.ts.map
@@ -3190,10 +3190,183 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
3190
3190
  } | undefined;
3191
3191
  hideLabel?: boolean | undefined;
3192
3192
  }>;
3193
+ declare const Data: z.ZodObject<z.objectUtil.extendShape<{
3194
+ id: z.ZodString;
3195
+ defaultValue: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodString, z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodObject<{
3196
+ dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3197
+ expression: z.ZodString;
3198
+ }, "strip", z.ZodTypeAny, {
3199
+ dependsOn: string[];
3200
+ expression: string;
3201
+ }, {
3202
+ expression: string;
3203
+ dependsOn?: string[] | undefined;
3204
+ }>]>>;
3205
+ conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").AllActionConditionalFields[]>, "many">>>;
3206
+ required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3207
+ disabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3208
+ hidden: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3209
+ placeholder: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
3210
+ id: string;
3211
+ description: string;
3212
+ defaultMessage: string;
3213
+ }>>;
3214
+ validation: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
3215
+ validator: z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>;
3216
+ message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
3217
+ id: string;
3218
+ description: string;
3219
+ defaultMessage: string;
3220
+ }>;
3221
+ }, "strip", z.ZodTypeAny, {
3222
+ message: TranslationConfig;
3223
+ validator: import(".").JSONSchema;
3224
+ }, {
3225
+ message: {
3226
+ id: string;
3227
+ description: string;
3228
+ defaultMessage: string;
3229
+ };
3230
+ validator: import(".").JSONSchema;
3231
+ }>, "many">>>;
3232
+ dependsOn: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
3233
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
3234
+ id: string;
3235
+ description: string;
3236
+ defaultMessage: string;
3237
+ }>;
3238
+ hideLabel: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3239
+ }, {
3240
+ type: z.ZodLiteral<"DATA">;
3241
+ configuration: z.ZodObject<{
3242
+ title: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
3243
+ id: string;
3244
+ description: string;
3245
+ defaultMessage: string;
3246
+ }>>;
3247
+ subtitle: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
3248
+ id: string;
3249
+ description: string;
3250
+ defaultMessage: string;
3251
+ }>>;
3252
+ data: z.ZodArray<z.ZodObject<{
3253
+ fieldId: z.ZodString;
3254
+ }, "strip", z.ZodTypeAny, {
3255
+ fieldId: string;
3256
+ }, {
3257
+ fieldId: string;
3258
+ }>, "many">;
3259
+ }, "strip", z.ZodTypeAny, {
3260
+ data: {
3261
+ fieldId: string;
3262
+ }[];
3263
+ title?: TranslationConfig | undefined;
3264
+ subtitle?: TranslationConfig | undefined;
3265
+ }, {
3266
+ data: {
3267
+ fieldId: string;
3268
+ }[];
3269
+ title?: {
3270
+ id: string;
3271
+ description: string;
3272
+ defaultMessage: string;
3273
+ } | undefined;
3274
+ subtitle?: {
3275
+ id: string;
3276
+ description: string;
3277
+ defaultMessage: string;
3278
+ } | undefined;
3279
+ }>;
3280
+ }>, "strip", z.ZodTypeAny, {
3281
+ type: "DATA";
3282
+ id: string;
3283
+ label: TranslationConfig;
3284
+ configuration: {
3285
+ data: {
3286
+ fieldId: string;
3287
+ }[];
3288
+ title?: TranslationConfig | undefined;
3289
+ subtitle?: TranslationConfig | undefined;
3290
+ };
3291
+ validation?: {
3292
+ message: TranslationConfig;
3293
+ validator: import(".").JSONSchema;
3294
+ }[] | undefined;
3295
+ required?: boolean | undefined;
3296
+ dependsOn?: string[] | undefined;
3297
+ defaultValue?: string | number | boolean | {
3298
+ dependsOn: string[];
3299
+ expression: string;
3300
+ } | undefined;
3301
+ conditionals?: ({
3302
+ type: "SHOW";
3303
+ conditional: import(".").JSONSchema;
3304
+ } | {
3305
+ type: "ENABLE";
3306
+ conditional: import(".").JSONSchema;
3307
+ })[] | undefined;
3308
+ disabled?: boolean | undefined;
3309
+ hidden?: boolean | undefined;
3310
+ placeholder?: TranslationConfig | undefined;
3311
+ hideLabel?: boolean | undefined;
3312
+ }, {
3313
+ type: "DATA";
3314
+ id: string;
3315
+ label: {
3316
+ id: string;
3317
+ description: string;
3318
+ defaultMessage: string;
3319
+ };
3320
+ configuration: {
3321
+ data: {
3322
+ fieldId: string;
3323
+ }[];
3324
+ title?: {
3325
+ id: string;
3326
+ description: string;
3327
+ defaultMessage: string;
3328
+ } | undefined;
3329
+ subtitle?: {
3330
+ id: string;
3331
+ description: string;
3332
+ defaultMessage: string;
3333
+ } | undefined;
3334
+ };
3335
+ validation?: {
3336
+ message: {
3337
+ id: string;
3338
+ description: string;
3339
+ defaultMessage: string;
3340
+ };
3341
+ validator: import(".").JSONSchema;
3342
+ }[] | undefined;
3343
+ required?: boolean | undefined;
3344
+ dependsOn?: string[] | undefined;
3345
+ defaultValue?: string | number | boolean | {
3346
+ expression: string;
3347
+ dependsOn?: string[] | undefined;
3348
+ } | undefined;
3349
+ conditionals?: ({
3350
+ type: "SHOW";
3351
+ conditional: import(".").JSONSchema;
3352
+ } | {
3353
+ type: "ENABLE";
3354
+ conditional: import(".").JSONSchema;
3355
+ })[] | undefined;
3356
+ disabled?: boolean | undefined;
3357
+ hidden?: boolean | undefined;
3358
+ placeholder?: {
3359
+ id: string;
3360
+ description: string;
3361
+ defaultMessage: string;
3362
+ } | undefined;
3363
+ hideLabel?: boolean | undefined;
3364
+ }>;
3365
+ export type Data = z.infer<typeof Data>;
3193
3366
  /** @knipignore */
3194
- export type AllFields = typeof Address | typeof TextField | typeof NumberField | typeof TextAreaField | typeof DateField | typeof Paragraph | typeof RadioGroup | typeof BulletList | typeof PageHeader | typeof Select | typeof Checkbox | typeof File | typeof Country | typeof AdministrativeArea | typeof Divider | typeof Location | typeof Facility | typeof Office | typeof SignatureField | typeof EmailField | typeof FileUploadWithOptions;
3367
+ export type AllFields = typeof Address | typeof TextField | typeof NumberField | typeof TextAreaField | typeof DateField | typeof Paragraph | typeof RadioGroup | typeof BulletList | typeof PageHeader | typeof Select | typeof Checkbox | typeof File | typeof Country | typeof AdministrativeArea | typeof Divider | typeof Location | typeof Facility | typeof Office | typeof SignatureField | typeof EmailField | typeof FileUploadWithOptions | typeof Data;
3195
3368
  /** @knipignore */
3196
- export type Inferred = z.infer<typeof Address> | z.infer<typeof TextField> | z.infer<typeof NumberField> | z.infer<typeof TextAreaField> | z.infer<typeof DateField> | z.infer<typeof Paragraph> | z.infer<typeof RadioGroup> | z.infer<typeof BulletList> | z.infer<typeof PageHeader> | z.infer<typeof Select> | z.infer<typeof Checkbox> | z.infer<typeof File> | z.infer<typeof FileUploadWithOptions> | z.infer<typeof Country> | z.infer<typeof AdministrativeArea> | z.infer<typeof Divider> | z.infer<typeof Location> | z.infer<typeof Facility> | z.infer<typeof Office> | z.infer<typeof SignatureField> | z.infer<typeof EmailField>;
3369
+ export type Inferred = z.infer<typeof Address> | z.infer<typeof TextField> | z.infer<typeof NumberField> | z.infer<typeof TextAreaField> | z.infer<typeof DateField> | z.infer<typeof Paragraph> | z.infer<typeof RadioGroup> | z.infer<typeof BulletList> | z.infer<typeof PageHeader> | z.infer<typeof Select> | z.infer<typeof Checkbox> | z.infer<typeof File> | z.infer<typeof FileUploadWithOptions> | z.infer<typeof Country> | z.infer<typeof AdministrativeArea> | z.infer<typeof Divider> | z.infer<typeof Location> | z.infer<typeof Facility> | z.infer<typeof Office> | z.infer<typeof SignatureField> | z.infer<typeof EmailField> | z.infer<typeof Data>;
3197
3370
  export declare const FieldConfig: z.ZodType<Inferred, any, Inferred>;
3198
3371
  export type SelectField = z.infer<typeof Select>;
3199
3372
  export type LocationField = z.infer<typeof Location>;
@@ -21,8 +21,9 @@ export declare const FieldType: {
21
21
  readonly FACILITY: "FACILITY";
22
22
  readonly OFFICE: "OFFICE";
23
23
  readonly SIGNATURE: "SIGNATURE";
24
+ readonly DATA: "DATA";
24
25
  };
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")[];
26
+ 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" | "DATA")[];
26
27
  export type FieldType = (typeof fieldTypes)[number];
27
28
  /**
28
29
  * Composite field types are field types that consist of multiple field values.
@@ -1,5 +1,5 @@
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, Data } from './FieldConfig';
3
3
  import { FieldType } from './FieldType';
4
4
  import { FieldValue, FieldUpdateValueSchema } from './FieldValue';
5
5
  import { AddressFieldValue, FileFieldValue, FileFieldWithOptionValue } from './CompositeFieldValue';
@@ -122,7 +122,161 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
122
122
  option: string;
123
123
  filename: string;
124
124
  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<{
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;
132
+ originalFilename: string;
133
+ }, {
134
+ type: string;
135
+ filename: string;
136
+ originalFilename: string;
137
+ }>, z.ZodArray<z.ZodObject<{
138
+ filename: z.ZodString;
139
+ originalFilename: z.ZodString;
140
+ type: z.ZodString;
141
+ option: z.ZodString;
142
+ }, "strip", z.ZodTypeAny, {
143
+ type: string;
144
+ option: string;
145
+ filename: string;
146
+ originalFilename: string;
147
+ }, {
148
+ type: string;
149
+ option: string;
150
+ filename: string;
151
+ 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;
206
+ }, "strip", z.ZodTypeAny, {
207
+ type: string;
208
+ filename: string;
209
+ originalFilename: string;
210
+ }, {
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;
219
+ }, "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;
273
+ }, {
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<{
126
280
  country: z.ZodString;
127
281
  province: z.ZodString;
128
282
  district: z.ZodString;
@@ -199,7 +353,32 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
199
353
  option: string;
200
354
  filename: string;
201
355
  originalFilename: string;
202
- }[] | null | undefined;
356
+ }[] | Record<string, string | number | boolean | {
357
+ type: string;
358
+ filename: string;
359
+ originalFilename: string;
360
+ } | {
361
+ country: string;
362
+ district: string;
363
+ 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;
370
+ } | {
371
+ country: string;
372
+ district: string;
373
+ province: string;
374
+ urbanOrRural: "RURAL";
375
+ village?: string | undefined;
376
+ } | {
377
+ type: string;
378
+ option: string;
379
+ filename: string;
380
+ originalFilename: string;
381
+ }[]> | null | undefined;
203
382
  }, {
204
383
  [x: string]: string | number | boolean | {
205
384
  type: string;
@@ -226,7 +405,32 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
226
405
  option: string;
227
406
  filename: string;
228
407
  originalFilename: string;
229
- }[] | null | undefined;
408
+ }[] | Record<string, string | number | boolean | {
409
+ type: string;
410
+ filename: string;
411
+ originalFilename: string;
412
+ } | {
413
+ country: string;
414
+ district: string;
415
+ 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;
422
+ } | {
423
+ country: string;
424
+ district: string;
425
+ province: string;
426
+ urbanOrRural: "RURAL";
427
+ village?: string | undefined;
428
+ } | {
429
+ type: string;
430
+ option: string;
431
+ filename: string;
432
+ originalFilename: string;
433
+ }[]> | null | undefined;
230
434
  }>;
231
435
  /**
232
436
  * Quick-and-dirty mock data generator for event actions.
@@ -257,6 +461,49 @@ export declare function mapFieldTypeToMockValue(field: FieldConfig, i: number):
257
461
  street?: undefined;
258
462
  number?: undefined;
259
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
+ /**
479
+ * Maps complex or nested field types, such as Address fields, to their corresponding empty values.
480
+ */
481
+ export declare function mapFieldTypeToEmptyValue(field: FieldConfig): never[] | {
482
+ country: null;
483
+ province: null;
484
+ district: null;
485
+ urbanOrRural: string;
486
+ town: null;
487
+ residentialArea: null;
488
+ street: null;
489
+ number: null;
490
+ zipCode: null;
491
+ filename?: undefined;
492
+ originalFilename?: undefined;
493
+ type?: undefined;
494
+ } | {
495
+ filename: string;
496
+ originalFilename: string;
497
+ type: string;
498
+ country?: undefined;
499
+ province?: undefined;
500
+ district?: undefined;
501
+ urbanOrRural?: undefined;
502
+ town?: undefined;
503
+ residentialArea?: undefined;
504
+ street?: undefined;
505
+ number?: undefined;
506
+ zipCode?: undefined;
260
507
  } | null;
261
508
  export declare const isParagraphFieldType: (field: {
262
509
  config: FieldConfig;
@@ -405,5 +652,12 @@ export declare const isOfficeFieldType: (field: {
405
652
  value: string;
406
653
  config: Office;
407
654
  };
655
+ export declare const isDataFieldType: (field: {
656
+ config: FieldConfig;
657
+ value: FieldValue;
658
+ }) => field is {
659
+ value: any;
660
+ config: Data;
661
+ };
408
662
  export {};
409
663
  //# sourceMappingURL=FieldTypeMapping.d.ts.map
@@ -98,6 +98,85 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
98
98
  urbanOrRural: "RURAL";
99
99
  village?: string | undefined;
100
100
  }>]>;
101
+ export declare const DataFieldValue: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
102
+ filename: z.ZodString;
103
+ originalFilename: z.ZodString;
104
+ type: z.ZodString;
105
+ }, "strip", z.ZodTypeAny, {
106
+ type: string;
107
+ filename: string;
108
+ originalFilename: string;
109
+ }, {
110
+ type: string;
111
+ filename: string;
112
+ originalFilename: string;
113
+ }>, z.ZodArray<z.ZodObject<{
114
+ filename: z.ZodString;
115
+ originalFilename: z.ZodString;
116
+ type: z.ZodString;
117
+ option: z.ZodString;
118
+ }, "strip", z.ZodTypeAny, {
119
+ type: string;
120
+ option: string;
121
+ filename: string;
122
+ originalFilename: string;
123
+ }, {
124
+ type: string;
125
+ option: string;
126
+ filename: string;
127
+ originalFilename: string;
128
+ }>, "many">, z.ZodObject<z.objectUtil.extendShape<{
129
+ country: z.ZodString;
130
+ province: z.ZodString;
131
+ district: z.ZodString;
132
+ }, {
133
+ urbanOrRural: z.ZodLiteral<"URBAN">;
134
+ town: z.ZodOptional<z.ZodString>;
135
+ residentialArea: z.ZodOptional<z.ZodString>;
136
+ street: z.ZodOptional<z.ZodString>;
137
+ number: z.ZodOptional<z.ZodString>;
138
+ zipCode: z.ZodOptional<z.ZodString>;
139
+ }>, "strip", z.ZodTypeAny, {
140
+ country: string;
141
+ district: string;
142
+ province: string;
143
+ urbanOrRural: "URBAN";
144
+ number?: string | undefined;
145
+ town?: string | undefined;
146
+ residentialArea?: string | undefined;
147
+ street?: string | undefined;
148
+ zipCode?: string | undefined;
149
+ }, {
150
+ country: string;
151
+ district: string;
152
+ province: string;
153
+ urbanOrRural: "URBAN";
154
+ number?: string | undefined;
155
+ town?: string | undefined;
156
+ residentialArea?: string | undefined;
157
+ street?: string | undefined;
158
+ zipCode?: string | undefined;
159
+ }>, z.ZodObject<z.objectUtil.extendShape<{
160
+ country: z.ZodString;
161
+ province: z.ZodString;
162
+ district: z.ZodString;
163
+ }, {
164
+ urbanOrRural: z.ZodLiteral<"RURAL">;
165
+ village: z.ZodOptional<z.ZodString>;
166
+ }>, "strip", z.ZodTypeAny, {
167
+ country: string;
168
+ district: string;
169
+ province: string;
170
+ urbanOrRural: "RURAL";
171
+ village?: string | undefined;
172
+ }, {
173
+ country: string;
174
+ district: string;
175
+ province: string;
176
+ urbanOrRural: "RURAL";
177
+ village?: string | undefined;
178
+ }>]>>;
179
+ export type DataFieldValue = z.infer<typeof DataFieldValue>;
101
180
  export type FieldValue = z.infer<typeof FieldValue>;
102
181
  export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
103
182
  filename: z.ZodString;
@@ -181,11 +260,11 @@ export type FieldUpdateValue = z.infer<typeof FieldUpdateValue>;
181
260
  /**
182
261
  * NOTE: This is an exception. We need schema as a type in order to generate schema dynamically.
183
262
  * */
184
- export type FieldValueSchema = typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldValue | typeof NumberFieldValue | z.ZodString | z.ZodBoolean;
263
+ export type FieldValueSchema = typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldValue | typeof NumberFieldValue | typeof DataFieldValue | z.ZodString | z.ZodBoolean;
185
264
  /**
186
265
  * NOTE: This is an exception. We need schema as a type in order to generate schema dynamically.
187
266
  *
188
267
  * FieldValueInputSchema uses Input types which have set optional values as nullish
189
268
  * */
190
- export type FieldUpdateValueSchema = typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldUpdateValue | typeof NumberFieldValue | z.ZodString | z.ZodBoolean;
269
+ export type FieldUpdateValueSchema = typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldUpdateValue | typeof NumberFieldValue | typeof DataFieldValue | z.ZodString | z.ZodBoolean;
191
270
  //# sourceMappingURL=FieldValue.d.ts.map