@opencrvs/toolkit 1.8.0-rc.f82791e → 1.8.0-rc.f85d424

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.
@@ -14,6 +14,15 @@ export declare const EventStatus: {
14
14
  readonly ARCHIVED: "ARCHIVED";
15
15
  };
16
16
  export type EventStatus = (typeof EventStatus)[keyof typeof EventStatus];
17
+ export declare const EventStatusEnum: z.ZodEnum<["CREATED", "NOTIFIED", "DECLARED", "VALIDATED", "REGISTERED", "CERTIFIED", "REJECTED", "ARCHIVED"]>;
18
+ export declare const CustomFlags: {
19
+ readonly CERTIFICATE_PRINTED: "certificate-printed";
20
+ };
21
+ export type CustomFlags = (typeof CustomFlags)[keyof typeof CustomFlags];
22
+ export declare const Flag: z.ZodUnion<[z.ZodString, z.ZodNativeEnum<{
23
+ readonly CERTIFICATE_PRINTED: "certificate-printed";
24
+ }>]>;
25
+ export type Flag = z.infer<typeof Flag>;
17
26
  export declare const eventStatuses: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
18
27
  export declare const EventStatuses: z.ZodNativeEnum<{
19
28
  readonly CREATED: "CREATED";
@@ -26,6 +35,126 @@ export declare const EventStatuses: z.ZodNativeEnum<{
26
35
  readonly ARCHIVED: "ARCHIVED";
27
36
  }>;
28
37
  export declare const ZodDate: z.ZodString;
38
+ export declare const ActionCreationMetadata: z.ZodObject<{
39
+ createdAt: z.ZodString;
40
+ createdBy: z.ZodString;
41
+ createdAtLocation: z.ZodString;
42
+ acceptedAt: z.ZodString;
43
+ createdByRole: z.ZodString;
44
+ }, "strip", z.ZodTypeAny, {
45
+ createdAt: string;
46
+ createdBy: string;
47
+ createdByRole: string;
48
+ createdAtLocation: string;
49
+ acceptedAt: string;
50
+ }, {
51
+ createdAt: string;
52
+ createdBy: string;
53
+ createdByRole: string;
54
+ createdAtLocation: string;
55
+ acceptedAt: string;
56
+ }>;
57
+ export type ActionCreationMetadata = z.infer<typeof ActionCreationMetadata>;
58
+ export declare const RegistrationCreationMetadata: z.ZodObject<z.objectUtil.extendShape<{
59
+ createdAt: z.ZodString;
60
+ createdBy: z.ZodString;
61
+ createdAtLocation: z.ZodString;
62
+ acceptedAt: z.ZodString;
63
+ createdByRole: z.ZodString;
64
+ }, {
65
+ registrationNumber: z.ZodString;
66
+ }>, "strip", z.ZodTypeAny, {
67
+ createdAt: string;
68
+ createdBy: string;
69
+ createdByRole: string;
70
+ createdAtLocation: string;
71
+ registrationNumber: string;
72
+ acceptedAt: string;
73
+ }, {
74
+ createdAt: string;
75
+ createdBy: string;
76
+ createdByRole: string;
77
+ createdAtLocation: string;
78
+ registrationNumber: string;
79
+ acceptedAt: string;
80
+ }>;
81
+ export type RegistrationCreationMetadata = z.infer<typeof RegistrationCreationMetadata>;
82
+ export declare const LegalStatuses: z.ZodObject<{
83
+ DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
84
+ createdAt: z.ZodString;
85
+ createdBy: z.ZodString;
86
+ createdAtLocation: z.ZodString;
87
+ acceptedAt: z.ZodString;
88
+ createdByRole: z.ZodString;
89
+ }, "strip", z.ZodTypeAny, {
90
+ createdAt: string;
91
+ createdBy: string;
92
+ createdByRole: string;
93
+ createdAtLocation: string;
94
+ acceptedAt: string;
95
+ }, {
96
+ createdAt: string;
97
+ createdBy: string;
98
+ createdByRole: string;
99
+ createdAtLocation: string;
100
+ acceptedAt: string;
101
+ }>>>;
102
+ REGISTERED: z.ZodOptional<z.ZodNullable<z.ZodObject<z.objectUtil.extendShape<{
103
+ createdAt: z.ZodString;
104
+ createdBy: z.ZodString;
105
+ createdAtLocation: z.ZodString;
106
+ acceptedAt: z.ZodString;
107
+ createdByRole: z.ZodString;
108
+ }, {
109
+ registrationNumber: z.ZodString;
110
+ }>, "strip", z.ZodTypeAny, {
111
+ createdAt: string;
112
+ createdBy: string;
113
+ createdByRole: string;
114
+ createdAtLocation: string;
115
+ registrationNumber: string;
116
+ acceptedAt: string;
117
+ }, {
118
+ createdAt: string;
119
+ createdBy: string;
120
+ createdByRole: string;
121
+ createdAtLocation: string;
122
+ registrationNumber: string;
123
+ acceptedAt: string;
124
+ }>>>;
125
+ }, "strip", z.ZodTypeAny, {
126
+ DECLARED?: {
127
+ createdAt: string;
128
+ createdBy: string;
129
+ createdByRole: string;
130
+ createdAtLocation: string;
131
+ acceptedAt: string;
132
+ } | null | undefined;
133
+ REGISTERED?: {
134
+ createdAt: string;
135
+ createdBy: string;
136
+ createdByRole: string;
137
+ createdAtLocation: string;
138
+ registrationNumber: string;
139
+ acceptedAt: string;
140
+ } | null | undefined;
141
+ }, {
142
+ DECLARED?: {
143
+ createdAt: string;
144
+ createdBy: string;
145
+ createdByRole: string;
146
+ createdAtLocation: string;
147
+ acceptedAt: string;
148
+ } | null | undefined;
149
+ REGISTERED?: {
150
+ createdAt: string;
151
+ createdBy: string;
152
+ createdByRole: string;
153
+ createdAtLocation: string;
154
+ registrationNumber: string;
155
+ acceptedAt: string;
156
+ } | null | undefined;
157
+ }>;
29
158
  /**
30
159
  * Event metadata exposed to client.
31
160
  *
@@ -44,17 +173,95 @@ export declare const EventMetadata: z.ZodObject<{
44
173
  readonly REJECTED: "REJECTED";
45
174
  readonly ARCHIVED: "ARCHIVED";
46
175
  }>;
176
+ legalStatuses: z.ZodObject<{
177
+ DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
178
+ createdAt: z.ZodString;
179
+ createdBy: z.ZodString;
180
+ createdAtLocation: z.ZodString;
181
+ acceptedAt: z.ZodString;
182
+ createdByRole: z.ZodString;
183
+ }, "strip", z.ZodTypeAny, {
184
+ createdAt: string;
185
+ createdBy: string;
186
+ createdByRole: string;
187
+ createdAtLocation: string;
188
+ acceptedAt: string;
189
+ }, {
190
+ createdAt: string;
191
+ createdBy: string;
192
+ createdByRole: string;
193
+ createdAtLocation: string;
194
+ acceptedAt: string;
195
+ }>>>;
196
+ REGISTERED: z.ZodOptional<z.ZodNullable<z.ZodObject<z.objectUtil.extendShape<{
197
+ createdAt: z.ZodString;
198
+ createdBy: z.ZodString;
199
+ createdAtLocation: z.ZodString;
200
+ acceptedAt: z.ZodString;
201
+ createdByRole: z.ZodString;
202
+ }, {
203
+ registrationNumber: z.ZodString;
204
+ }>, "strip", z.ZodTypeAny, {
205
+ createdAt: string;
206
+ createdBy: string;
207
+ createdByRole: string;
208
+ createdAtLocation: string;
209
+ registrationNumber: string;
210
+ acceptedAt: string;
211
+ }, {
212
+ createdAt: string;
213
+ createdBy: string;
214
+ createdByRole: string;
215
+ createdAtLocation: string;
216
+ registrationNumber: string;
217
+ acceptedAt: string;
218
+ }>>>;
219
+ }, "strip", z.ZodTypeAny, {
220
+ DECLARED?: {
221
+ createdAt: string;
222
+ createdBy: string;
223
+ createdByRole: string;
224
+ createdAtLocation: string;
225
+ acceptedAt: string;
226
+ } | null | undefined;
227
+ REGISTERED?: {
228
+ createdAt: string;
229
+ createdBy: string;
230
+ createdByRole: string;
231
+ createdAtLocation: string;
232
+ registrationNumber: string;
233
+ acceptedAt: string;
234
+ } | null | undefined;
235
+ }, {
236
+ DECLARED?: {
237
+ createdAt: string;
238
+ createdBy: string;
239
+ createdByRole: string;
240
+ createdAtLocation: string;
241
+ acceptedAt: string;
242
+ } | null | undefined;
243
+ REGISTERED?: {
244
+ createdAt: string;
245
+ createdBy: string;
246
+ createdByRole: string;
247
+ createdAtLocation: string;
248
+ registrationNumber: string;
249
+ acceptedAt: string;
250
+ } | null | undefined;
251
+ }>;
47
252
  createdAt: z.ZodString;
48
253
  dateOfEvent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
49
254
  createdBy: z.ZodString;
50
255
  updatedByUserRole: z.ZodString;
51
256
  createdAtLocation: z.ZodString;
52
- updatedAtLocation: z.ZodString;
257
+ updatedAtLocation: z.ZodOptional<z.ZodNullable<z.ZodString>>;
53
258
  updatedAt: z.ZodString;
54
259
  assignedTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
55
- updatedBy: z.ZodString;
260
+ updatedBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
56
261
  trackingId: z.ZodString;
57
- registrationNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
262
+ flags: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNativeEnum<{
263
+ readonly CERTIFICATE_PRINTED: "certificate-printed";
264
+ }>]>, "many">;
58
265
  }, "strip", z.ZodTypeAny, {
59
266
  type: string;
60
267
  id: string;
@@ -62,14 +269,31 @@ export declare const EventMetadata: z.ZodObject<{
62
269
  createdAt: string;
63
270
  createdBy: string;
64
271
  createdAtLocation: string;
65
- updatedAtLocation: string;
66
272
  updatedAt: string;
67
273
  trackingId: string;
274
+ legalStatuses: {
275
+ DECLARED?: {
276
+ createdAt: string;
277
+ createdBy: string;
278
+ createdByRole: string;
279
+ createdAtLocation: string;
280
+ acceptedAt: string;
281
+ } | null | undefined;
282
+ REGISTERED?: {
283
+ createdAt: string;
284
+ createdBy: string;
285
+ createdByRole: string;
286
+ createdAtLocation: string;
287
+ registrationNumber: string;
288
+ acceptedAt: string;
289
+ } | null | undefined;
290
+ };
68
291
  updatedByUserRole: string;
69
- updatedBy: string;
292
+ flags: string[];
70
293
  assignedTo?: string | null | undefined;
71
- registrationNumber?: string | null | undefined;
72
294
  dateOfEvent?: string | null | undefined;
295
+ updatedAtLocation?: string | null | undefined;
296
+ updatedBy?: string | null | undefined;
73
297
  }, {
74
298
  type: string;
75
299
  id: string;
@@ -77,21 +301,50 @@ export declare const EventMetadata: z.ZodObject<{
77
301
  createdAt: string;
78
302
  createdBy: string;
79
303
  createdAtLocation: string;
80
- updatedAtLocation: string;
81
304
  updatedAt: string;
82
305
  trackingId: string;
306
+ legalStatuses: {
307
+ DECLARED?: {
308
+ createdAt: string;
309
+ createdBy: string;
310
+ createdByRole: string;
311
+ createdAtLocation: string;
312
+ acceptedAt: string;
313
+ } | null | undefined;
314
+ REGISTERED?: {
315
+ createdAt: string;
316
+ createdBy: string;
317
+ createdByRole: string;
318
+ createdAtLocation: string;
319
+ registrationNumber: string;
320
+ acceptedAt: string;
321
+ } | null | undefined;
322
+ };
83
323
  updatedByUserRole: string;
84
- updatedBy: string;
324
+ flags: string[];
85
325
  assignedTo?: string | null | undefined;
86
- registrationNumber?: string | null | undefined;
87
326
  dateOfEvent?: string | null | undefined;
327
+ updatedAtLocation?: string | null | undefined;
328
+ updatedBy?: string | null | undefined;
88
329
  }>;
89
330
  export type EventMetadata = z.infer<typeof EventMetadata>;
90
- export type EventMetadataKeys = `event.${keyof EventMetadata}`;
331
+ export declare const EventMetadataKeys: z.ZodEnum<["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags"]>;
332
+ export type EventMetadataKeys = z.infer<typeof EventMetadataKeys>;
333
+ /**
334
+ * This ensures `event.field()` takes a key from `EventMetadata`
335
+ */
336
+ export declare const EventMetadataParameter: z.ZodObject<{
337
+ $event: z.ZodEnum<["id", "type", "status", "createdAt", "dateOfEvent", "createdBy", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags"]>;
338
+ }, "strip", z.ZodTypeAny, {
339
+ $event: "type" | "id" | "status" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "dateOfEvent" | "updatedAt" | "trackingId" | "legalStatuses" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags";
340
+ }, {
341
+ $event: "type" | "id" | "status" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "dateOfEvent" | "updatedAt" | "trackingId" | "legalStatuses" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags";
342
+ }>;
343
+ export type EventMetadataParameter = z.infer<typeof EventMetadataParameter>;
91
344
  /**
92
345
  * Mapping of event metadata keys to translation configuration.
93
346
  * Consider introducing type in same manner as we have in FieldConfig.
94
347
  * We need a way to know how to parse it.
95
348
  */
96
- export declare const eventMetadataLabelMap: Record<EventMetadataKeys, TranslationConfig>;
349
+ export declare const eventMetadataLabelMap: Record<Exclude<`event.${EventMetadataKeys}`, 'event.legalStatuses'>, TranslationConfig>;
97
350
  //# sourceMappingURL=EventMetadata.d.ts.map
@@ -1088,6 +1088,139 @@ declare const DateField: z.ZodObject<z.objectUtil.extendShape<{
1088
1088
  } | undefined;
1089
1089
  }>;
1090
1090
  export type DateField = z.infer<typeof DateField>;
1091
+ declare const DateRangeField: z.ZodObject<z.objectUtil.extendShape<{
1092
+ id: z.ZodString;
1093
+ defaultValue: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString, z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
1094
+ parent: z.ZodOptional<z.ZodObject<{
1095
+ _fieldId: z.ZodOptional<z.ZodString>;
1096
+ }, "strip", z.ZodTypeAny, {
1097
+ _fieldId?: string | undefined;
1098
+ }, {
1099
+ _fieldId?: string | undefined;
1100
+ }>>;
1101
+ conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").FieldConditionalType[]>, "many">>>;
1102
+ required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1103
+ placeholder: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
1104
+ id: string;
1105
+ description: string;
1106
+ defaultMessage: string;
1107
+ }>>;
1108
+ validation: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
1109
+ validator: z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>;
1110
+ message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
1111
+ id: string;
1112
+ description: string;
1113
+ defaultMessage: string;
1114
+ }>;
1115
+ }, "strip", z.ZodTypeAny, {
1116
+ message: TranslationConfig;
1117
+ validator: import(".").JSONSchema;
1118
+ }, {
1119
+ message: {
1120
+ id: string;
1121
+ description: string;
1122
+ defaultMessage: string;
1123
+ };
1124
+ validator: import(".").JSONSchema;
1125
+ }>, "many">>>;
1126
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
1127
+ id: string;
1128
+ description: string;
1129
+ defaultMessage: string;
1130
+ }>;
1131
+ hideLabel: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1132
+ }, {
1133
+ type: z.ZodLiteral<"DATE_RANGE">;
1134
+ defaultValue: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>>;
1135
+ configuration: z.ZodOptional<z.ZodObject<{
1136
+ notice: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
1137
+ id: string;
1138
+ description: string;
1139
+ defaultMessage: string;
1140
+ }>>;
1141
+ }, "strip", z.ZodTypeAny, {
1142
+ notice?: TranslationConfig | undefined;
1143
+ }, {
1144
+ notice?: {
1145
+ id: string;
1146
+ description: string;
1147
+ defaultMessage: string;
1148
+ } | undefined;
1149
+ }>>;
1150
+ }>, "strip", z.ZodTypeAny, {
1151
+ type: "DATE_RANGE";
1152
+ id: string;
1153
+ label: TranslationConfig;
1154
+ parent?: {
1155
+ _fieldId?: string | undefined;
1156
+ } | undefined;
1157
+ validation?: {
1158
+ message: TranslationConfig;
1159
+ validator: import(".").JSONSchema;
1160
+ }[] | undefined;
1161
+ required?: boolean | undefined;
1162
+ defaultValue?: string | [string, string] | undefined;
1163
+ conditionals?: ({
1164
+ type: "SHOW";
1165
+ conditional: import(".").JSONSchema;
1166
+ } | {
1167
+ type: "ENABLE";
1168
+ conditional: import(".").JSONSchema;
1169
+ } | {
1170
+ type: "DISPLAY_ON_REVIEW";
1171
+ conditional: import(".").JSONSchema;
1172
+ })[] | undefined;
1173
+ placeholder?: TranslationConfig | undefined;
1174
+ hideLabel?: boolean | undefined;
1175
+ configuration?: {
1176
+ notice?: TranslationConfig | undefined;
1177
+ } | undefined;
1178
+ }, {
1179
+ type: "DATE_RANGE";
1180
+ id: string;
1181
+ label: {
1182
+ id: string;
1183
+ description: string;
1184
+ defaultMessage: string;
1185
+ };
1186
+ parent?: {
1187
+ _fieldId?: string | undefined;
1188
+ } | undefined;
1189
+ validation?: {
1190
+ message: {
1191
+ id: string;
1192
+ description: string;
1193
+ defaultMessage: string;
1194
+ };
1195
+ validator: import(".").JSONSchema;
1196
+ }[] | undefined;
1197
+ required?: boolean | undefined;
1198
+ defaultValue?: string | [string, string] | undefined;
1199
+ conditionals?: ({
1200
+ type: "SHOW";
1201
+ conditional: import(".").JSONSchema;
1202
+ } | {
1203
+ type: "ENABLE";
1204
+ conditional: import(".").JSONSchema;
1205
+ } | {
1206
+ type: "DISPLAY_ON_REVIEW";
1207
+ conditional: import(".").JSONSchema;
1208
+ })[] | undefined;
1209
+ placeholder?: {
1210
+ id: string;
1211
+ description: string;
1212
+ defaultMessage: string;
1213
+ } | undefined;
1214
+ hideLabel?: boolean | undefined;
1215
+ configuration?: {
1216
+ notice?: {
1217
+ id: string;
1218
+ description: string;
1219
+ defaultMessage: string;
1220
+ } | undefined;
1221
+ } | undefined;
1222
+ }>;
1223
+ export type DateRangeField = z.infer<typeof DateRangeField>;
1091
1224
  declare const HtmlFontVariant: z.ZodEnum<["reg12", "reg14", "reg16", "reg18", "h4", "h3", "h2", "h1"]>;
1092
1225
  export type HtmlFontVariant = z.infer<typeof HtmlFontVariant>;
1093
1226
  declare const Paragraph: z.ZodObject<z.objectUtil.extendShape<{
@@ -3303,14 +3436,14 @@ declare const DataField: z.ZodObject<z.objectUtil.extendShape<{
3303
3436
  }>;
3304
3437
  export type DataField = z.infer<typeof DataField>;
3305
3438
  /** @knipignore */
3306
- 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 DataField;
3439
+ export type AllFields = typeof Address | typeof TextField | typeof NumberField | typeof TextAreaField | typeof DateField | typeof DateRangeField | 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 DataField;
3307
3440
  /** @knipignore */
3308
- 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 DataField>;
3441
+ 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 DateRangeField> | 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 DataField>;
3309
3442
  /** @knipignore */
3310
3443
  /**
3311
3444
  * This is the type that should be used for the input of the FieldConfig. Useful when config uses zod defaults.
3312
3445
  */
3313
- export type InferredInput = z.input<typeof Address> | z.input<typeof TextField> | z.input<typeof NumberField> | z.input<typeof TextAreaField> | z.input<typeof DateField> | z.input<typeof Paragraph> | z.input<typeof RadioGroup> | z.input<typeof BulletList> | z.input<typeof PageHeader> | z.input<typeof Select> | z.input<typeof Checkbox> | z.input<typeof File> | z.input<typeof FileUploadWithOptions> | z.input<typeof Country> | z.input<typeof AdministrativeArea> | z.input<typeof Divider> | z.input<typeof Location> | z.input<typeof Facility> | z.input<typeof Office> | z.input<typeof SignatureField> | z.input<typeof EmailField> | z.input<typeof DataField>;
3446
+ export type InferredInput = z.input<typeof Address> | z.input<typeof TextField> | z.input<typeof NumberField> | z.input<typeof TextAreaField> | z.input<typeof DateField> | z.input<typeof DateRangeField> | z.input<typeof Paragraph> | z.input<typeof RadioGroup> | z.input<typeof BulletList> | z.input<typeof PageHeader> | z.input<typeof Select> | z.input<typeof Checkbox> | z.input<typeof File> | z.input<typeof FileUploadWithOptions> | z.input<typeof Country> | z.input<typeof AdministrativeArea> | z.input<typeof Divider> | z.input<typeof Location> | z.input<typeof Facility> | z.input<typeof Office> | z.input<typeof SignatureField> | z.input<typeof EmailField> | z.input<typeof DataField>;
3314
3447
  export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{
3315
3448
  id: z.ZodString;
3316
3449
  defaultValue: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString, z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
@@ -4210,6 +4343,137 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
4210
4343
  defaultMessage: string;
4211
4344
  }>;
4212
4345
  hideLabel: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4346
+ }, {
4347
+ type: z.ZodLiteral<"DATE_RANGE">;
4348
+ defaultValue: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>>;
4349
+ configuration: z.ZodOptional<z.ZodObject<{
4350
+ notice: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
4351
+ id: string;
4352
+ description: string;
4353
+ defaultMessage: string;
4354
+ }>>;
4355
+ }, "strip", z.ZodTypeAny, {
4356
+ notice?: TranslationConfig | undefined;
4357
+ }, {
4358
+ notice?: {
4359
+ id: string;
4360
+ description: string;
4361
+ defaultMessage: string;
4362
+ } | undefined;
4363
+ }>>;
4364
+ }>, "strip", z.ZodTypeAny, {
4365
+ type: "DATE_RANGE";
4366
+ id: string;
4367
+ label: TranslationConfig;
4368
+ parent?: {
4369
+ _fieldId?: string | undefined;
4370
+ } | undefined;
4371
+ validation?: {
4372
+ message: TranslationConfig;
4373
+ validator: import(".").JSONSchema;
4374
+ }[] | undefined;
4375
+ required?: boolean | undefined;
4376
+ defaultValue?: string | [string, string] | undefined;
4377
+ conditionals?: ({
4378
+ type: "SHOW";
4379
+ conditional: import(".").JSONSchema;
4380
+ } | {
4381
+ type: "ENABLE";
4382
+ conditional: import(".").JSONSchema;
4383
+ } | {
4384
+ type: "DISPLAY_ON_REVIEW";
4385
+ conditional: import(".").JSONSchema;
4386
+ })[] | undefined;
4387
+ placeholder?: TranslationConfig | undefined;
4388
+ hideLabel?: boolean | undefined;
4389
+ configuration?: {
4390
+ notice?: TranslationConfig | undefined;
4391
+ } | undefined;
4392
+ }, {
4393
+ type: "DATE_RANGE";
4394
+ id: string;
4395
+ label: {
4396
+ id: string;
4397
+ description: string;
4398
+ defaultMessage: string;
4399
+ };
4400
+ parent?: {
4401
+ _fieldId?: string | undefined;
4402
+ } | undefined;
4403
+ validation?: {
4404
+ message: {
4405
+ id: string;
4406
+ description: string;
4407
+ defaultMessage: string;
4408
+ };
4409
+ validator: import(".").JSONSchema;
4410
+ }[] | undefined;
4411
+ required?: boolean | undefined;
4412
+ defaultValue?: string | [string, string] | undefined;
4413
+ conditionals?: ({
4414
+ type: "SHOW";
4415
+ conditional: import(".").JSONSchema;
4416
+ } | {
4417
+ type: "ENABLE";
4418
+ conditional: import(".").JSONSchema;
4419
+ } | {
4420
+ type: "DISPLAY_ON_REVIEW";
4421
+ conditional: import(".").JSONSchema;
4422
+ })[] | undefined;
4423
+ placeholder?: {
4424
+ id: string;
4425
+ description: string;
4426
+ defaultMessage: string;
4427
+ } | undefined;
4428
+ hideLabel?: boolean | undefined;
4429
+ configuration?: {
4430
+ notice?: {
4431
+ id: string;
4432
+ description: string;
4433
+ defaultMessage: string;
4434
+ } | undefined;
4435
+ } | undefined;
4436
+ }>, z.ZodObject<z.objectUtil.extendShape<{
4437
+ id: z.ZodString;
4438
+ defaultValue: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodString, z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
4439
+ parent: z.ZodOptional<z.ZodObject<{
4440
+ _fieldId: z.ZodOptional<z.ZodString>;
4441
+ }, "strip", z.ZodTypeAny, {
4442
+ _fieldId?: string | undefined;
4443
+ }, {
4444
+ _fieldId?: string | undefined;
4445
+ }>>;
4446
+ conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").FieldConditionalType[]>, "many">>>;
4447
+ required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4448
+ placeholder: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
4449
+ id: string;
4450
+ description: string;
4451
+ defaultMessage: string;
4452
+ }>>;
4453
+ validation: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
4454
+ validator: z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>;
4455
+ message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
4456
+ id: string;
4457
+ description: string;
4458
+ defaultMessage: string;
4459
+ }>;
4460
+ }, "strip", z.ZodTypeAny, {
4461
+ message: TranslationConfig;
4462
+ validator: import(".").JSONSchema;
4463
+ }, {
4464
+ message: {
4465
+ id: string;
4466
+ description: string;
4467
+ defaultMessage: string;
4468
+ };
4469
+ validator: import(".").JSONSchema;
4470
+ }>, "many">>>;
4471
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
4472
+ id: string;
4473
+ description: string;
4474
+ defaultMessage: string;
4475
+ }>;
4476
+ hideLabel: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4213
4477
  }, {
4214
4478
  type: z.ZodLiteral<"PARAGRAPH">;
4215
4479
  defaultValue: z.ZodOptional<z.ZodString>;
@@ -5,6 +5,7 @@ export declare const FieldType: {
5
5
  readonly TEXTAREA: "TEXTAREA";
6
6
  readonly EMAIL: "EMAIL";
7
7
  readonly DATE: "DATE";
8
+ readonly DATE_RANGE: "DATE_RANGE";
8
9
  readonly PARAGRAPH: "PARAGRAPH";
9
10
  readonly PAGE_HEADER: "PAGE_HEADER";
10
11
  readonly RADIO_GROUP: "RADIO_GROUP";
@@ -22,10 +23,10 @@ export declare const FieldType: {
22
23
  readonly SIGNATURE: "SIGNATURE";
23
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" | "BULLET_LIST" | "CHECKBOX" | "SELECT" | "COUNTRY" | "LOCATION" | "DIVIDER" | "ADMINISTRATIVE_AREA" | "FACILITY" | "OFFICE" | "SIGNATURE" | "DATA")[];
26
+ export declare const fieldTypes: ("ADDRESS" | "TEXT" | "NUMBER" | "TEXTAREA" | "EMAIL" | "DATE" | "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
27
  export type FieldType = (typeof fieldTypes)[number];
27
28
  /**
28
29
  * Composite field types are field types that consist of multiple field values.
29
30
  */
30
- export declare const compositeFieldTypes: ("ADDRESS" | "FILE" | "FILE_WITH_OPTIONS")[];
31
+ export declare const compositeFieldTypes: ("ADDRESS" | "DATE_RANGE" | "FILE" | "FILE_WITH_OPTIONS")[];
31
32
  //# sourceMappingURL=FieldType.d.ts.map