@opencrvs/toolkit 1.9.3-rc.858ec14 → 1.9.3-rc.85c6402
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.
- package/dist/commons/api/router.d.ts +2 -2
- package/dist/commons/events/AdvancedSearchConfig.d.ts +24 -30
- package/dist/commons/events/CompositeFieldValue.d.ts +0 -22
- package/dist/commons/events/EventConfig.d.ts +20 -22
- package/dist/commons/events/FieldConfig.d.ts +2 -284
- package/dist/commons/events/FieldType.d.ts +1 -2
- package/dist/commons/events/FieldTypeMapping.d.ts +3 -88
- package/dist/commons/events/FieldValue.d.ts +4 -52
- package/dist/commons/events/defineConfig.d.ts +2 -2
- package/dist/commons/events/utils.d.ts +2 -14
- package/dist/events/index.js +0 -37
- package/dist/notification/index.js +0 -26
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { AddressField, AdministrativeArea, BulletList, Checkbox, Country, DateField, Divider, Facility, EmailField, FieldConfig, File, FileUploadWithOptions, LocationInput, Office, PageHeader, Paragraph, RadioGroup, SelectField, SignatureField, TextAreaField, TextField, NumberField,
|
|
3
|
-
import { FieldValue, DataFieldValue, DateRangeFieldValue, SelectDateRangeValue, VerificationStatusValue, AgeValue
|
|
2
|
+
import { AddressField, AdministrativeArea, BulletList, Checkbox, Country, DateField, Divider, Facility, EmailField, FieldConfig, File, FileUploadWithOptions, LocationInput, Office, PageHeader, Paragraph, RadioGroup, SelectField, SignatureField, TextAreaField, TextField, NumberField, DataField, NameField, PhoneField, IdField, DateRangeField, SelectDateRangeField, TimeField, AlphaPrintButton, HttpField, SearchField, ButtonField, LinkButtonField, VerificationStatus, QueryParamReaderField, QrReaderField, IdReaderField, LoaderField, AgeField } from './FieldConfig';
|
|
3
|
+
import { FieldValue, DataFieldValue, DateRangeFieldValue, SelectDateRangeValue, VerificationStatusValue, AgeValue } from './FieldValue';
|
|
4
4
|
import { FullDocumentPath } from '../documents';
|
|
5
|
-
import { AddressFieldValue, FileFieldValue, FileFieldWithOptionValue, NameFieldValue
|
|
5
|
+
import { AddressFieldValue, FileFieldValue, FileFieldWithOptionValue, NameFieldValue } from './CompositeFieldValue';
|
|
6
6
|
import { ActionType } from './ActionType';
|
|
7
7
|
/**
|
|
8
8
|
* Mapping of field types to Zod schema.
|
|
@@ -229,24 +229,6 @@ export declare function mapFieldTypeToZod(field: FieldConfig, actionType?: Actio
|
|
|
229
229
|
data?: any;
|
|
230
230
|
}, {
|
|
231
231
|
data?: any;
|
|
232
|
-
}>>> | z.ZodObject<{
|
|
233
|
-
numericValue: z.ZodOptional<z.ZodNumber>;
|
|
234
|
-
unit: z.ZodOptional<z.ZodString>;
|
|
235
|
-
}, "strip", z.ZodTypeAny, {
|
|
236
|
-
numericValue?: number | undefined;
|
|
237
|
-
unit?: string | undefined;
|
|
238
|
-
}, {
|
|
239
|
-
numericValue?: number | undefined;
|
|
240
|
-
unit?: string | undefined;
|
|
241
|
-
}> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
242
|
-
numericValue: z.ZodOptional<z.ZodNumber>;
|
|
243
|
-
unit: z.ZodOptional<z.ZodString>;
|
|
244
|
-
}, "strip", z.ZodTypeAny, {
|
|
245
|
-
numericValue?: number | undefined;
|
|
246
|
-
unit?: string | undefined;
|
|
247
|
-
}, {
|
|
248
|
-
numericValue?: number | undefined;
|
|
249
|
-
unit?: string | undefined;
|
|
250
232
|
}>>> | z.ZodObject<{
|
|
251
233
|
age: z.ZodNumber;
|
|
252
234
|
asOfDateRef: z.ZodString;
|
|
@@ -332,24 +314,6 @@ export declare function mapFieldTypeToZod(field: FieldConfig, actionType?: Actio
|
|
|
332
314
|
start: string;
|
|
333
315
|
end: string;
|
|
334
316
|
}>, z.ZodString]>, z.ZodEnum<["last7Days", "last30Days", "last90Days", "last365Days"]>, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
|
|
335
|
-
numericValue: z.ZodNumber;
|
|
336
|
-
unit: z.ZodString;
|
|
337
|
-
}, "strip", z.ZodTypeAny, {
|
|
338
|
-
numericValue: number;
|
|
339
|
-
unit: string;
|
|
340
|
-
}, {
|
|
341
|
-
numericValue: number;
|
|
342
|
-
unit: string;
|
|
343
|
-
}>, z.ZodObject<{
|
|
344
|
-
numericValue: z.ZodOptional<z.ZodNumber>;
|
|
345
|
-
unit: z.ZodOptional<z.ZodString>;
|
|
346
|
-
}, "strip", z.ZodTypeAny, {
|
|
347
|
-
numericValue?: number | undefined;
|
|
348
|
-
unit?: string | undefined;
|
|
349
|
-
}, {
|
|
350
|
-
numericValue?: number | undefined;
|
|
351
|
-
unit?: string | undefined;
|
|
352
|
-
}>, z.ZodObject<{
|
|
353
317
|
path: z.ZodEffects<z.ZodString, string, string>;
|
|
354
318
|
originalFilename: z.ZodString;
|
|
355
319
|
type: z.ZodString;
|
|
@@ -484,12 +448,6 @@ export declare function mapFieldTypeToZod(field: FieldConfig, actionType?: Actio
|
|
|
484
448
|
data: Record<string, string>;
|
|
485
449
|
} | {
|
|
486
450
|
data?: any;
|
|
487
|
-
} | {
|
|
488
|
-
numericValue: number;
|
|
489
|
-
unit: string;
|
|
490
|
-
} | {
|
|
491
|
-
numericValue?: number | undefined;
|
|
492
|
-
unit?: string | undefined;
|
|
493
451
|
} | {
|
|
494
452
|
age: number;
|
|
495
453
|
asOfDateRef: string;
|
|
@@ -535,12 +493,6 @@ export declare function mapFieldTypeToZod(field: FieldConfig, actionType?: Actio
|
|
|
535
493
|
data: Record<string, string>;
|
|
536
494
|
} | {
|
|
537
495
|
data?: any;
|
|
538
|
-
} | {
|
|
539
|
-
numericValue: number;
|
|
540
|
-
unit: string;
|
|
541
|
-
} | {
|
|
542
|
-
numericValue?: number | undefined;
|
|
543
|
-
unit?: string | undefined;
|
|
544
496
|
} | {
|
|
545
497
|
age: number;
|
|
546
498
|
asOfDateRef: string;
|
|
@@ -597,24 +549,6 @@ export declare function mapFieldTypeToZod(field: FieldConfig, actionType?: Actio
|
|
|
597
549
|
start: string;
|
|
598
550
|
end: string;
|
|
599
551
|
}>, z.ZodString]>, z.ZodEnum<["last7Days", "last30Days", "last90Days", "last365Days"]>, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
|
|
600
|
-
numericValue: z.ZodNumber;
|
|
601
|
-
unit: z.ZodString;
|
|
602
|
-
}, "strip", z.ZodTypeAny, {
|
|
603
|
-
numericValue: number;
|
|
604
|
-
unit: string;
|
|
605
|
-
}, {
|
|
606
|
-
numericValue: number;
|
|
607
|
-
unit: string;
|
|
608
|
-
}>, z.ZodObject<{
|
|
609
|
-
numericValue: z.ZodOptional<z.ZodNumber>;
|
|
610
|
-
unit: z.ZodOptional<z.ZodString>;
|
|
611
|
-
}, "strip", z.ZodTypeAny, {
|
|
612
|
-
numericValue?: number | undefined;
|
|
613
|
-
unit?: string | undefined;
|
|
614
|
-
}, {
|
|
615
|
-
numericValue?: number | undefined;
|
|
616
|
-
unit?: string | undefined;
|
|
617
|
-
}>, z.ZodObject<{
|
|
618
552
|
path: z.ZodEffects<z.ZodString, string, string>;
|
|
619
553
|
originalFilename: z.ZodString;
|
|
620
554
|
type: z.ZodString;
|
|
@@ -749,12 +683,6 @@ export declare function mapFieldTypeToZod(field: FieldConfig, actionType?: Actio
|
|
|
749
683
|
data: Record<string, string>;
|
|
750
684
|
} | {
|
|
751
685
|
data?: any;
|
|
752
|
-
} | {
|
|
753
|
-
numericValue: number;
|
|
754
|
-
unit: string;
|
|
755
|
-
} | {
|
|
756
|
-
numericValue?: number | undefined;
|
|
757
|
-
unit?: string | undefined;
|
|
758
686
|
} | {
|
|
759
687
|
age: number;
|
|
760
688
|
asOfDateRef: string;
|
|
@@ -800,12 +728,6 @@ export declare function mapFieldTypeToZod(field: FieldConfig, actionType?: Actio
|
|
|
800
728
|
data: Record<string, string>;
|
|
801
729
|
} | {
|
|
802
730
|
data?: any;
|
|
803
|
-
} | {
|
|
804
|
-
numericValue: number;
|
|
805
|
-
unit: string;
|
|
806
|
-
} | {
|
|
807
|
-
numericValue?: number | undefined;
|
|
808
|
-
unit?: string | undefined;
|
|
809
731
|
} | {
|
|
810
732
|
age: number;
|
|
811
733
|
asOfDateRef: string;
|
|
@@ -1048,13 +970,6 @@ export declare const isNumberFieldType: (field: {
|
|
|
1048
970
|
value: number;
|
|
1049
971
|
config: NumberField;
|
|
1050
972
|
};
|
|
1051
|
-
export declare const isNumberWithUnitFieldType: (field: {
|
|
1052
|
-
config: FieldConfig;
|
|
1053
|
-
value: FieldValue | FieldUpdateValue;
|
|
1054
|
-
}) => field is {
|
|
1055
|
-
value: NumberWithUnitFieldValue;
|
|
1056
|
-
config: NumberWithUnitField;
|
|
1057
|
-
};
|
|
1058
973
|
export declare const isNameFieldType: (field: {
|
|
1059
974
|
config: FieldConfig;
|
|
1060
975
|
value: FieldValue;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { AddressFieldValue, AddressFieldUpdateValue, FileFieldValue, FileFieldWithOptionValue, NameFieldValue, NameFieldUpdateValue,
|
|
2
|
+
import { AddressFieldValue, AddressFieldUpdateValue, FileFieldValue, FileFieldWithOptionValue, NameFieldValue, NameFieldUpdateValue, HttpFieldUpdateValue, QueryParamReaderFieldUpdateValue, QrReaderFieldValue, IdReaderFieldValue } from './CompositeFieldValue';
|
|
3
3
|
/**
|
|
4
4
|
* FieldValues defined in this file are primitive field values.
|
|
5
5
|
* FieldValues defined in CompositeFieldValue.ts are composed of multiple primitive field values (Address, File etc).
|
|
@@ -111,24 +111,6 @@ declare const FieldValuesWithoutDataField: z.ZodUnion<[z.ZodDiscriminatedUnion<"
|
|
|
111
111
|
start: string;
|
|
112
112
|
end: string;
|
|
113
113
|
}>, z.ZodString]>, z.ZodEnum<["last7Days", "last30Days", "last90Days", "last365Days"]>, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
|
|
114
|
-
numericValue: z.ZodNumber;
|
|
115
|
-
unit: z.ZodString;
|
|
116
|
-
}, "strip", z.ZodTypeAny, {
|
|
117
|
-
numericValue: number;
|
|
118
|
-
unit: string;
|
|
119
|
-
}, {
|
|
120
|
-
numericValue: number;
|
|
121
|
-
unit: string;
|
|
122
|
-
}>, z.ZodObject<{
|
|
123
|
-
numericValue: z.ZodOptional<z.ZodNumber>;
|
|
124
|
-
unit: z.ZodOptional<z.ZodString>;
|
|
125
|
-
}, "strip", z.ZodTypeAny, {
|
|
126
|
-
numericValue?: number | undefined;
|
|
127
|
-
unit?: string | undefined;
|
|
128
|
-
}, {
|
|
129
|
-
numericValue?: number | undefined;
|
|
130
|
-
unit?: string | undefined;
|
|
131
|
-
}>, z.ZodObject<{
|
|
132
114
|
path: z.ZodEffects<z.ZodString, string, string>;
|
|
133
115
|
originalFilename: z.ZodString;
|
|
134
116
|
type: z.ZodString;
|
|
@@ -275,24 +257,6 @@ export declare const DataFieldValue: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
|
275
257
|
start: string;
|
|
276
258
|
end: string;
|
|
277
259
|
}>, z.ZodString]>, z.ZodEnum<["last7Days", "last30Days", "last90Days", "last365Days"]>, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
|
|
278
|
-
numericValue: z.ZodNumber;
|
|
279
|
-
unit: z.ZodString;
|
|
280
|
-
}, "strip", z.ZodTypeAny, {
|
|
281
|
-
numericValue: number;
|
|
282
|
-
unit: string;
|
|
283
|
-
}, {
|
|
284
|
-
numericValue: number;
|
|
285
|
-
unit: string;
|
|
286
|
-
}>, z.ZodObject<{
|
|
287
|
-
numericValue: z.ZodOptional<z.ZodNumber>;
|
|
288
|
-
unit: z.ZodOptional<z.ZodString>;
|
|
289
|
-
}, "strip", z.ZodTypeAny, {
|
|
290
|
-
numericValue?: number | undefined;
|
|
291
|
-
unit?: string | undefined;
|
|
292
|
-
}, {
|
|
293
|
-
numericValue?: number | undefined;
|
|
294
|
-
unit?: string | undefined;
|
|
295
|
-
}>, z.ZodObject<{
|
|
296
260
|
path: z.ZodEffects<z.ZodString, string, string>;
|
|
297
261
|
originalFilename: z.ZodString;
|
|
298
262
|
type: z.ZodString;
|
|
@@ -427,12 +391,6 @@ export declare const DataFieldValue: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
|
427
391
|
data: Record<string, string>;
|
|
428
392
|
} | {
|
|
429
393
|
data?: any;
|
|
430
|
-
} | {
|
|
431
|
-
numericValue: number;
|
|
432
|
-
unit: string;
|
|
433
|
-
} | {
|
|
434
|
-
numericValue?: number | undefined;
|
|
435
|
-
unit?: string | undefined;
|
|
436
394
|
} | {
|
|
437
395
|
age: number;
|
|
438
396
|
asOfDateRef: string;
|
|
@@ -478,12 +436,6 @@ export declare const DataFieldValue: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
|
478
436
|
data: Record<string, string>;
|
|
479
437
|
} | {
|
|
480
438
|
data?: any;
|
|
481
|
-
} | {
|
|
482
|
-
numericValue: number;
|
|
483
|
-
unit: string;
|
|
484
|
-
} | {
|
|
485
|
-
numericValue?: number | undefined;
|
|
486
|
-
unit?: string | undefined;
|
|
487
439
|
} | {
|
|
488
440
|
age: number;
|
|
489
441
|
asOfDateRef: string;
|
|
@@ -496,17 +448,17 @@ export type DataFieldValue = z.infer<typeof DataFieldValue>;
|
|
|
496
448
|
export type FieldValue = FieldValuesWithoutDataField | DataFieldValue;
|
|
497
449
|
export declare const FieldValue: z.ZodType<FieldValue>;
|
|
498
450
|
export declare function safeUnion<T extends [z.ZodTypeAny, ...z.ZodTypeAny[]]>(schemas: T): z.ZodType<z.TypeOf<T[number]>, z.ZodTypeDef, z.TypeOf<T[number]>>;
|
|
499
|
-
export type FieldUpdateValue = z.infer<typeof TextValue> | z.infer<typeof DateValue> | z.infer<typeof TimeValue> | z.infer<typeof AgeUpdateValue> | z.infer<typeof AddressFieldUpdateValue> | z.infer<typeof DateRangeFieldValue> | z.infer<typeof SelectDateRangeValue> | z.infer<typeof CheckboxFieldValue> | z.infer<typeof NumberFieldValue> | z.infer<typeof
|
|
451
|
+
export type FieldUpdateValue = z.infer<typeof TextValue> | z.infer<typeof DateValue> | z.infer<typeof TimeValue> | z.infer<typeof AgeUpdateValue> | z.infer<typeof AddressFieldUpdateValue> | z.infer<typeof DateRangeFieldValue> | z.infer<typeof SelectDateRangeValue> | z.infer<typeof CheckboxFieldValue> | z.infer<typeof NumberFieldValue> | z.infer<typeof FileFieldValue> | z.infer<typeof FileFieldWithOptionValue> | z.infer<typeof DataFieldValue> | z.infer<typeof NameFieldUpdateValue> | z.infer<typeof HttpFieldUpdateValue> | z.infer<typeof QueryParamReaderFieldUpdateValue>;
|
|
500
452
|
export declare const FieldUpdateValue: z.ZodType<FieldUpdateValue>;
|
|
501
453
|
/**
|
|
502
454
|
* NOTE: This is an exception. We need schema as a type in order to generate schema dynamically.
|
|
503
455
|
* */
|
|
504
|
-
export type FieldValueSchema = typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldValue | typeof NumberFieldValue | typeof
|
|
456
|
+
export type FieldValueSchema = typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldValue | typeof NumberFieldValue | typeof DataFieldValue | typeof NameFieldValue | z.ZodString | z.ZodBoolean;
|
|
505
457
|
/**
|
|
506
458
|
* NOTE: This is an exception. We need schema as a type in order to generate schema dynamically.
|
|
507
459
|
*
|
|
508
460
|
* FieldValueInputSchema uses Input types which have set optional values as nullish
|
|
509
461
|
* */
|
|
510
|
-
export type FieldUpdateValueSchema = typeof DateRangeFieldValue | typeof AgeValue | typeof SelectDateRangeValue | typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldUpdateValue | typeof NumberFieldValue | typeof
|
|
462
|
+
export type FieldUpdateValueSchema = typeof DateRangeFieldValue | typeof AgeValue | typeof SelectDateRangeValue | typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldUpdateValue | typeof NumberFieldValue | typeof DataFieldValue | typeof NameFieldValue | typeof NameFieldUpdateValue | typeof HttpFieldUpdateValue | typeof QueryParamReaderFieldUpdateValue | typeof ButtonFieldValue | typeof QrReaderFieldValue | typeof IdReaderFieldValue | z.ZodString | z.ZodBoolean;
|
|
511
463
|
export {};
|
|
512
464
|
//# sourceMappingURL=FieldValue.d.ts.map
|
|
@@ -172,7 +172,7 @@ export declare const defineConfig: (config: EventConfigInput) => {
|
|
|
172
172
|
};
|
|
173
173
|
fieldId: string;
|
|
174
174
|
fieldType: "field";
|
|
175
|
-
type?: "NAME" | "PHONE" | "ID" | "ADDRESS" | "TEXT" | "NUMBER" | "
|
|
175
|
+
type?: "NAME" | "PHONE" | "ID" | "ADDRESS" | "TEXT" | "NUMBER" | "TEXTAREA" | "EMAIL" | "DATE" | "AGE" | "DATE_RANGE" | "SELECT_DATE_RANGE" | "TIME" | "PARAGRAPH" | "PAGE_HEADER" | "RADIO_GROUP" | "FILE" | "FILE_WITH_OPTIONS" | "BULLET_LIST" | "CHECKBOX" | "SELECT" | "COUNTRY" | "LOCATION" | "DIVIDER" | "ADMINISTRATIVE_AREA" | "FACILITY" | "OFFICE" | "SIGNATURE" | "DATA" | "BUTTON" | "SEARCH" | "ALPHA_PRINT_BUTTON" | "HTTP" | "LINK_BUTTON" | "VERIFICATION_STATUS" | "QUERY_PARAM_READER" | "QR_READER" | "ID_READER" | "LOADER" | undefined;
|
|
176
176
|
options?: {
|
|
177
177
|
value: string;
|
|
178
178
|
label: string | import("./TranslationConfig").TranslationConfig;
|
|
@@ -200,7 +200,7 @@ export declare const defineConfig: (config: EventConfigInput) => {
|
|
|
200
200
|
};
|
|
201
201
|
fieldId: "event.status" | "event.trackingId" | "event.updatedAt" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation";
|
|
202
202
|
fieldType: "event";
|
|
203
|
-
type?: "NAME" | "PHONE" | "ID" | "ADDRESS" | "TEXT" | "NUMBER" | "
|
|
203
|
+
type?: "NAME" | "PHONE" | "ID" | "ADDRESS" | "TEXT" | "NUMBER" | "TEXTAREA" | "EMAIL" | "DATE" | "AGE" | "DATE_RANGE" | "SELECT_DATE_RANGE" | "TIME" | "PARAGRAPH" | "PAGE_HEADER" | "RADIO_GROUP" | "FILE" | "FILE_WITH_OPTIONS" | "BULLET_LIST" | "CHECKBOX" | "SELECT" | "COUNTRY" | "LOCATION" | "DIVIDER" | "ADMINISTRATIVE_AREA" | "FACILITY" | "OFFICE" | "SIGNATURE" | "DATA" | "BUTTON" | "SEARCH" | "ALPHA_PRINT_BUTTON" | "HTTP" | "LINK_BUTTON" | "VERIFICATION_STATUS" | "QUERY_PARAM_READER" | "QR_READER" | "ID_READER" | "LOADER" | undefined;
|
|
204
204
|
options?: {
|
|
205
205
|
value: string;
|
|
206
206
|
label: string | import("./TranslationConfig").TranslationConfig;
|
|
@@ -150,12 +150,6 @@ export declare function omitHiddenAnnotationFields(actionConfig: ActionConfig, d
|
|
|
150
150
|
data: Record<string, string>;
|
|
151
151
|
} | {
|
|
152
152
|
data?: any;
|
|
153
|
-
} | {
|
|
154
|
-
numericValue: number;
|
|
155
|
-
unit: string;
|
|
156
|
-
} | {
|
|
157
|
-
numericValue?: number | undefined;
|
|
158
|
-
unit?: string | undefined;
|
|
159
153
|
} | {
|
|
160
154
|
age: number;
|
|
161
155
|
asOfDateRef: string;
|
|
@@ -200,12 +194,6 @@ export declare function omitHiddenAnnotationFields(actionConfig: ActionConfig, d
|
|
|
200
194
|
data: Record<string, string>;
|
|
201
195
|
} | {
|
|
202
196
|
data?: any;
|
|
203
|
-
} | {
|
|
204
|
-
numericValue: number;
|
|
205
|
-
unit: string;
|
|
206
|
-
} | {
|
|
207
|
-
numericValue?: number | undefined;
|
|
208
|
-
unit?: string | undefined;
|
|
209
197
|
} | {
|
|
210
198
|
age: number;
|
|
211
199
|
asOfDateRef: string;
|
|
@@ -414,7 +402,7 @@ export declare function getEventConfigById(eventConfigs: EventConfig[], id: stri
|
|
|
414
402
|
};
|
|
415
403
|
fieldId: string;
|
|
416
404
|
fieldType: "field";
|
|
417
|
-
type?: "NAME" | "PHONE" | "ID" | "ADDRESS" | "TEXT" | "NUMBER" | "
|
|
405
|
+
type?: "NAME" | "PHONE" | "ID" | "ADDRESS" | "TEXT" | "NUMBER" | "TEXTAREA" | "EMAIL" | "DATE" | "AGE" | "DATE_RANGE" | "SELECT_DATE_RANGE" | "TIME" | "PARAGRAPH" | "PAGE_HEADER" | "RADIO_GROUP" | "FILE" | "FILE_WITH_OPTIONS" | "BULLET_LIST" | "CHECKBOX" | "SELECT" | "COUNTRY" | "LOCATION" | "DIVIDER" | "ADMINISTRATIVE_AREA" | "FACILITY" | "OFFICE" | "SIGNATURE" | "DATA" | "BUTTON" | "SEARCH" | "ALPHA_PRINT_BUTTON" | "HTTP" | "LINK_BUTTON" | "VERIFICATION_STATUS" | "QUERY_PARAM_READER" | "QR_READER" | "ID_READER" | "LOADER" | undefined;
|
|
418
406
|
options?: {
|
|
419
407
|
value: string;
|
|
420
408
|
label: string | import("./TranslationConfig").TranslationConfig;
|
|
@@ -442,7 +430,7 @@ export declare function getEventConfigById(eventConfigs: EventConfig[], id: stri
|
|
|
442
430
|
};
|
|
443
431
|
fieldId: "event.status" | "event.trackingId" | "event.updatedAt" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation";
|
|
444
432
|
fieldType: "event";
|
|
445
|
-
type?: "NAME" | "PHONE" | "ID" | "ADDRESS" | "TEXT" | "NUMBER" | "
|
|
433
|
+
type?: "NAME" | "PHONE" | "ID" | "ADDRESS" | "TEXT" | "NUMBER" | "TEXTAREA" | "EMAIL" | "DATE" | "AGE" | "DATE_RANGE" | "SELECT_DATE_RANGE" | "TIME" | "PARAGRAPH" | "PAGE_HEADER" | "RADIO_GROUP" | "FILE" | "FILE_WITH_OPTIONS" | "BULLET_LIST" | "CHECKBOX" | "SELECT" | "COUNTRY" | "LOCATION" | "DIVIDER" | "ADMINISTRATIVE_AREA" | "FACILITY" | "OFFICE" | "SIGNATURE" | "DATA" | "BUTTON" | "SEARCH" | "ALPHA_PRINT_BUTTON" | "HTTP" | "LINK_BUTTON" | "VERIFICATION_STATUS" | "QUERY_PARAM_READER" | "QR_READER" | "ID_READER" | "LOADER" | undefined;
|
|
446
434
|
options?: {
|
|
447
435
|
value: string;
|
|
448
436
|
label: string | import("./TranslationConfig").TranslationConfig;
|
package/dist/events/index.js
CHANGED
|
@@ -153,8 +153,6 @@ __export(events_exports, {
|
|
|
153
153
|
NonEmptyTextValue: () => NonEmptyTextValue,
|
|
154
154
|
NotifyActionInput: () => NotifyActionInput,
|
|
155
155
|
NumberFieldValue: () => NumberFieldValue,
|
|
156
|
-
NumberWithUnitFieldUpdateValue: () => NumberWithUnitFieldUpdateValue,
|
|
157
|
-
NumberWithUnitFieldValue: () => NumberWithUnitFieldValue,
|
|
158
156
|
PageConfig: () => PageConfig,
|
|
159
157
|
PageTypes: () => PageTypes,
|
|
160
158
|
PotentialDuplicate: () => PotentialDuplicate,
|
|
@@ -332,7 +330,6 @@ __export(events_exports, {
|
|
|
332
330
|
isNameFieldType: () => isNameFieldType,
|
|
333
331
|
isNonInteractiveFieldType: () => isNonInteractiveFieldType,
|
|
334
332
|
isNumberFieldType: () => isNumberFieldType,
|
|
335
|
-
isNumberWithUnitFieldType: () => isNumberWithUnitFieldType,
|
|
336
333
|
isOfficeFieldType: () => isOfficeFieldType,
|
|
337
334
|
isOnline: () => isOnline,
|
|
338
335
|
isPageHeaderFieldType: () => isPageHeaderFieldType,
|
|
@@ -568,7 +565,6 @@ var FieldType = {
|
|
|
568
565
|
ADDRESS: "ADDRESS",
|
|
569
566
|
TEXT: "TEXT",
|
|
570
567
|
NUMBER: "NUMBER",
|
|
571
|
-
NUMBER_WITH_UNIT: "NUMBER_WITH_UNIT",
|
|
572
568
|
TEXTAREA: "TEXTAREA",
|
|
573
569
|
EMAIL: "EMAIL",
|
|
574
570
|
DATE: "DATE",
|
|
@@ -736,14 +732,6 @@ var ReadDataValue = import_zod6.z.object({
|
|
|
736
732
|
});
|
|
737
733
|
var QrReaderFieldValue = ReadDataValue;
|
|
738
734
|
var IdReaderFieldValue = ReadDataValue;
|
|
739
|
-
var NumberWithUnitFieldValue = import_zod6.z.object({
|
|
740
|
-
numericValue: import_zod6.z.number(),
|
|
741
|
-
unit: import_zod6.z.string()
|
|
742
|
-
});
|
|
743
|
-
var NumberWithUnitFieldUpdateValue = import_zod6.z.object({
|
|
744
|
-
numericValue: import_zod6.z.number().optional(),
|
|
745
|
-
unit: import_zod6.z.string().optional()
|
|
746
|
-
});
|
|
747
735
|
|
|
748
736
|
// ../commons/src/events/FieldValue.ts
|
|
749
737
|
var TextValue = import_zod7.z.string();
|
|
@@ -789,8 +777,6 @@ var FieldValuesWithoutDataField = import_zod7.z.union([
|
|
|
789
777
|
SelectDateRangeValue,
|
|
790
778
|
CheckboxFieldValue,
|
|
791
779
|
NumberFieldValue,
|
|
792
|
-
NumberWithUnitFieldValue,
|
|
793
|
-
NumberWithUnitFieldUpdateValue,
|
|
794
780
|
FileFieldValue,
|
|
795
781
|
FileFieldWithOptionValue,
|
|
796
782
|
NameFieldValue,
|
|
@@ -820,7 +806,6 @@ var PRIORITY_ORDER = [
|
|
|
820
806
|
"SelectDateRangeValue",
|
|
821
807
|
"CheckboxFieldValue",
|
|
822
808
|
"NumberFieldValue",
|
|
823
|
-
"NumberWithUnitFieldUpdateValue",
|
|
824
809
|
"FileFieldValue",
|
|
825
810
|
"FileFieldWithOptionValue",
|
|
826
811
|
"DataFieldValue"
|
|
@@ -854,7 +839,6 @@ var FieldUpdateValue = safeUnion([
|
|
|
854
839
|
SelectDateRangeValue.describe("SelectDateRangeValue"),
|
|
855
840
|
CheckboxFieldValue.describe("CheckboxFieldValue"),
|
|
856
841
|
NumberFieldValue.describe("NumberFieldValue"),
|
|
857
|
-
NumberWithUnitFieldUpdateValue.describe("NumberWithUnitFieldUpdateValue"),
|
|
858
842
|
FileFieldValue.describe("FileFieldValue"),
|
|
859
843
|
FileFieldWithOptionValue.describe("FileFieldWithOptionValue"),
|
|
860
844
|
DataFieldValue.describe("DataFieldValue"),
|
|
@@ -2114,18 +2098,6 @@ var SelectOption = import_zod15.z.object({
|
|
|
2114
2098
|
value: import_zod15.z.string().describe("The value of the option"),
|
|
2115
2099
|
label: import_zod15.z.union([import_zod15.z.string(), TranslationConfig]).describe("The label of the option")
|
|
2116
2100
|
});
|
|
2117
|
-
var NumberWithUnitField = BaseField.extend({
|
|
2118
|
-
type: import_zod15.z.literal(FieldType.NUMBER_WITH_UNIT),
|
|
2119
|
-
defaultValue: NumberWithUnitFieldValue.optional(),
|
|
2120
|
-
options: import_zod15.z.array(SelectOption).describe("A list of options for the unit select"),
|
|
2121
|
-
configuration: import_zod15.z.object({
|
|
2122
|
-
min: import_zod15.z.number().optional().describe("Minimum value of the number field"),
|
|
2123
|
-
max: import_zod15.z.number().optional().describe("Maximum value of the number field"),
|
|
2124
|
-
numberFieldPlaceholder: TranslationConfig.optional().describe(
|
|
2125
|
-
"Placeholder for the number field"
|
|
2126
|
-
)
|
|
2127
|
-
}).optional()
|
|
2128
|
-
}).describe("Number with unit input");
|
|
2129
2101
|
var RadioGroup = BaseField.extend({
|
|
2130
2102
|
type: import_zod15.z.literal(FieldType.RADIO_GROUP),
|
|
2131
2103
|
defaultValue: TextValue.optional(),
|
|
@@ -2414,7 +2386,6 @@ var FieldConfig = import_zod15.z.discriminatedUnion("type", [
|
|
|
2414
2386
|
Address,
|
|
2415
2387
|
TextField,
|
|
2416
2388
|
NumberField,
|
|
2417
|
-
NumberWithUnitField,
|
|
2418
2389
|
TextAreaField,
|
|
2419
2390
|
AgeField,
|
|
2420
2391
|
DateField,
|
|
@@ -2984,9 +2955,6 @@ function mapFieldTypeToZod(field3, actionType) {
|
|
|
2984
2955
|
case FieldType.NUMBER:
|
|
2985
2956
|
schema = NumberFieldValue;
|
|
2986
2957
|
break;
|
|
2987
|
-
case FieldType.NUMBER_WITH_UNIT:
|
|
2988
|
-
schema = NumberWithUnitFieldUpdateValue;
|
|
2989
|
-
break;
|
|
2990
2958
|
case FieldType.CHECKBOX:
|
|
2991
2959
|
schema = CheckboxFieldValue;
|
|
2992
2960
|
break;
|
|
@@ -3044,7 +3012,6 @@ function mapFieldTypeToEmptyValue(field3) {
|
|
|
3044
3012
|
case FieldType.FACILITY:
|
|
3045
3013
|
case FieldType.OFFICE:
|
|
3046
3014
|
case FieldType.NUMBER:
|
|
3047
|
-
case FieldType.NUMBER_WITH_UNIT:
|
|
3048
3015
|
case FieldType.EMAIL:
|
|
3049
3016
|
case FieldType.DATE:
|
|
3050
3017
|
case FieldType.AGE:
|
|
@@ -3112,9 +3079,6 @@ var isTextFieldType = (field3) => {
|
|
|
3112
3079
|
var isNumberFieldType = (field3) => {
|
|
3113
3080
|
return field3.config.type === FieldType.NUMBER;
|
|
3114
3081
|
};
|
|
3115
|
-
var isNumberWithUnitFieldType = (field3) => {
|
|
3116
|
-
return field3.config.type === FieldType.NUMBER_WITH_UNIT;
|
|
3117
|
-
};
|
|
3118
3082
|
var isNameFieldType = (field3) => {
|
|
3119
3083
|
return field3.config.type === FieldType.NAME;
|
|
3120
3084
|
};
|
|
@@ -8203,7 +8167,6 @@ function mapFieldTypeToMockValue(field3, i, rng) {
|
|
|
8203
8167
|
case FieldType.ID:
|
|
8204
8168
|
case FieldType.OFFICE:
|
|
8205
8169
|
case FieldType.LINK_BUTTON:
|
|
8206
|
-
case FieldType.NUMBER_WITH_UNIT:
|
|
8207
8170
|
case FieldType.LOADER:
|
|
8208
8171
|
return `${field3.id}-${field3.type}-${i}`;
|
|
8209
8172
|
case FieldType.VERIFICATION_STATUS:
|
|
@@ -230,7 +230,6 @@ var FieldType = {
|
|
|
230
230
|
ADDRESS: "ADDRESS",
|
|
231
231
|
TEXT: "TEXT",
|
|
232
232
|
NUMBER: "NUMBER",
|
|
233
|
-
NUMBER_WITH_UNIT: "NUMBER_WITH_UNIT",
|
|
234
233
|
TEXTAREA: "TEXTAREA",
|
|
235
234
|
EMAIL: "EMAIL",
|
|
236
235
|
DATE: "DATE",
|
|
@@ -394,14 +393,6 @@ var ReadDataValue = import_zod6.z.object({
|
|
|
394
393
|
});
|
|
395
394
|
var QrReaderFieldValue = ReadDataValue;
|
|
396
395
|
var IdReaderFieldValue = ReadDataValue;
|
|
397
|
-
var NumberWithUnitFieldValue = import_zod6.z.object({
|
|
398
|
-
numericValue: import_zod6.z.number(),
|
|
399
|
-
unit: import_zod6.z.string()
|
|
400
|
-
});
|
|
401
|
-
var NumberWithUnitFieldUpdateValue = import_zod6.z.object({
|
|
402
|
-
numericValue: import_zod6.z.number().optional(),
|
|
403
|
-
unit: import_zod6.z.string().optional()
|
|
404
|
-
});
|
|
405
396
|
|
|
406
397
|
// ../commons/src/events/FieldValue.ts
|
|
407
398
|
var TextValue = import_zod7.z.string();
|
|
@@ -447,8 +438,6 @@ var FieldValuesWithoutDataField = import_zod7.z.union([
|
|
|
447
438
|
SelectDateRangeValue,
|
|
448
439
|
CheckboxFieldValue,
|
|
449
440
|
NumberFieldValue,
|
|
450
|
-
NumberWithUnitFieldValue,
|
|
451
|
-
NumberWithUnitFieldUpdateValue,
|
|
452
441
|
FileFieldValue,
|
|
453
442
|
FileFieldWithOptionValue,
|
|
454
443
|
NameFieldValue,
|
|
@@ -478,7 +467,6 @@ var PRIORITY_ORDER = [
|
|
|
478
467
|
"SelectDateRangeValue",
|
|
479
468
|
"CheckboxFieldValue",
|
|
480
469
|
"NumberFieldValue",
|
|
481
|
-
"NumberWithUnitFieldUpdateValue",
|
|
482
470
|
"FileFieldValue",
|
|
483
471
|
"FileFieldWithOptionValue",
|
|
484
472
|
"DataFieldValue"
|
|
@@ -512,7 +500,6 @@ var FieldUpdateValue = safeUnion([
|
|
|
512
500
|
SelectDateRangeValue.describe("SelectDateRangeValue"),
|
|
513
501
|
CheckboxFieldValue.describe("CheckboxFieldValue"),
|
|
514
502
|
NumberFieldValue.describe("NumberFieldValue"),
|
|
515
|
-
NumberWithUnitFieldUpdateValue.describe("NumberWithUnitFieldUpdateValue"),
|
|
516
503
|
FileFieldValue.describe("FileFieldValue"),
|
|
517
504
|
FileFieldWithOptionValue.describe("FileFieldWithOptionValue"),
|
|
518
505
|
DataFieldValue.describe("DataFieldValue"),
|
|
@@ -1637,18 +1624,6 @@ var SelectOption = import_zod15.z.object({
|
|
|
1637
1624
|
value: import_zod15.z.string().describe("The value of the option"),
|
|
1638
1625
|
label: import_zod15.z.union([import_zod15.z.string(), TranslationConfig]).describe("The label of the option")
|
|
1639
1626
|
});
|
|
1640
|
-
var NumberWithUnitField = BaseField.extend({
|
|
1641
|
-
type: import_zod15.z.literal(FieldType.NUMBER_WITH_UNIT),
|
|
1642
|
-
defaultValue: NumberWithUnitFieldValue.optional(),
|
|
1643
|
-
options: import_zod15.z.array(SelectOption).describe("A list of options for the unit select"),
|
|
1644
|
-
configuration: import_zod15.z.object({
|
|
1645
|
-
min: import_zod15.z.number().optional().describe("Minimum value of the number field"),
|
|
1646
|
-
max: import_zod15.z.number().optional().describe("Maximum value of the number field"),
|
|
1647
|
-
numberFieldPlaceholder: TranslationConfig.optional().describe(
|
|
1648
|
-
"Placeholder for the number field"
|
|
1649
|
-
)
|
|
1650
|
-
}).optional()
|
|
1651
|
-
}).describe("Number with unit input");
|
|
1652
1627
|
var RadioGroup = BaseField.extend({
|
|
1653
1628
|
type: import_zod15.z.literal(FieldType.RADIO_GROUP),
|
|
1654
1629
|
defaultValue: TextValue.optional(),
|
|
@@ -1937,7 +1912,6 @@ var FieldConfig = import_zod15.z.discriminatedUnion("type", [
|
|
|
1937
1912
|
Address,
|
|
1938
1913
|
TextField,
|
|
1939
1914
|
NumberField,
|
|
1940
|
-
NumberWithUnitField,
|
|
1941
1915
|
TextAreaField,
|
|
1942
1916
|
AgeField,
|
|
1943
1917
|
DateField,
|