@opencrvs/toolkit 1.8.0-rc.feef45c → 1.8.0-rc.ff0a1b5
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 +679 -332
- package/dist/commons/events/ActionConfig.d.ts +4879 -1232
- package/dist/commons/events/ActionDocument.d.ts +433 -413
- package/dist/commons/events/ActionInput.d.ts +180 -180
- package/dist/commons/events/AdvancedSearchConfig.d.ts +34 -36
- package/dist/commons/events/Draft.d.ts +24 -26
- package/dist/commons/events/EventConfig.d.ts +2711 -967
- package/dist/commons/events/EventDocument.d.ts +241 -312
- package/dist/commons/events/EventIndex.d.ts +817 -279
- package/dist/commons/events/EventMetadata.d.ts +263 -11
- package/dist/commons/events/FieldConfig.d.ts +267 -3
- package/dist/commons/events/FieldType.d.ts +3 -2
- package/dist/commons/events/FieldTypeMapping.d.ts +11 -4
- package/dist/commons/events/FieldValue.d.ts +6 -3
- package/dist/commons/events/FormConfig.d.ts +2279 -629
- package/dist/commons/events/PageConfig.d.ts +406 -0
- package/dist/commons/events/SummaryConfig.d.ts +17 -0
- package/dist/commons/events/WorkqueueConfig.d.ts +1222 -8
- package/dist/commons/events/defineConfig.d.ts +283 -2
- package/dist/commons/events/event.d.ts +3 -1
- package/dist/commons/events/field.d.ts +3 -3
- package/dist/commons/events/test.utils.d.ts +7 -7
- package/dist/commons/events/utils.d.ts +193 -21
- package/dist/events/index.js +1141 -774
- package/dist/scopes/index.d.ts +70 -1
- package/dist/scopes/index.js +130 -0
- package/package.json +1 -1
@@ -158,7 +158,7 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
|
|
158
158
|
option: string;
|
159
159
|
filename: string;
|
160
160
|
originalFilename: string;
|
161
|
-
}>, "many">>> | z.ZodBoolean | z.ZodOptional<z.ZodNullable<z.ZodBoolean>> | z.ZodNumber | z.ZodOptional<z.ZodNullable<z.ZodNumber>> | z.ZodUndefined | z.ZodOptional<z.ZodNullable<z.ZodUndefined>> | z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
|
161
|
+
}>, "many">>> | z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]> | z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>>> | z.ZodBoolean | z.ZodOptional<z.ZodNullable<z.ZodBoolean>> | z.ZodNumber | z.ZodOptional<z.ZodNullable<z.ZodNumber>> | z.ZodUndefined | z.ZodOptional<z.ZodNullable<z.ZodUndefined>> | z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
|
162
162
|
country: z.ZodString;
|
163
163
|
addressType: z.ZodLiteral<"DOMESTIC">;
|
164
164
|
province: z.ZodString;
|
@@ -283,7 +283,7 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
|
|
283
283
|
option: string;
|
284
284
|
filename: string;
|
285
285
|
originalFilename: string;
|
286
|
-
}[] | null | undefined;
|
286
|
+
}[] | [string, string] | null | undefined;
|
287
287
|
}, {
|
288
288
|
[x: string]: string | number | boolean | {
|
289
289
|
type: string;
|
@@ -322,12 +322,12 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
|
|
322
322
|
option: string;
|
323
323
|
filename: string;
|
324
324
|
originalFilename: string;
|
325
|
-
}[] | null | undefined;
|
325
|
+
}[] | [string, string] | null | undefined;
|
326
326
|
}>;
|
327
327
|
/**
|
328
328
|
* Quick-and-dirty mock data generator for event actions.
|
329
329
|
*/
|
330
|
-
export declare function mapFieldTypeToMockValue(field: FieldConfig, i: number): string | true | 19 | {
|
330
|
+
export declare function mapFieldTypeToMockValue(field: FieldConfig, i: number): string | true | string[] | 19 | {
|
331
331
|
country: string;
|
332
332
|
addressType: "DOMESTIC";
|
333
333
|
province: string;
|
@@ -416,6 +416,13 @@ export declare const isDateFieldType: (field: {
|
|
416
416
|
value: string;
|
417
417
|
config: DateField;
|
418
418
|
};
|
419
|
+
export declare const isDateRangeFieldType: (field: {
|
420
|
+
config: FieldConfig;
|
421
|
+
value: FieldValue;
|
422
|
+
}) => field is {
|
423
|
+
value: string;
|
424
|
+
config: DateField;
|
425
|
+
};
|
419
426
|
export declare const isPageHeaderFieldType: (field: {
|
420
427
|
config: FieldConfig;
|
421
428
|
value: FieldValue;
|
@@ -15,6 +15,9 @@ import { AddressFieldValue, AddressFieldUpdateValue, FileFieldValue, FileFieldWi
|
|
15
15
|
export declare const TextValue: z.ZodString;
|
16
16
|
export declare const NonEmptyTextValue: z.ZodString;
|
17
17
|
export declare const DateValue: z.ZodString;
|
18
|
+
export declare const DatetimeValue: z.ZodString;
|
19
|
+
export declare const DateRangeFieldValue: z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>;
|
20
|
+
export type DateRangeFieldValue = z.infer<typeof DateRangeFieldValue>;
|
18
21
|
export declare const EmailValue: z.ZodString;
|
19
22
|
export declare const CheckboxFieldValue: z.ZodBoolean;
|
20
23
|
export type CheckboxFieldValue = z.infer<typeof CheckboxFieldValue>;
|
@@ -22,7 +25,7 @@ export declare const NumberFieldValue: z.ZodNumber;
|
|
22
25
|
export type NumberFieldValue = z.infer<typeof NumberFieldValue>;
|
23
26
|
export declare const DataFieldValue: z.ZodUndefined;
|
24
27
|
export type DataFieldValue = z.infer<typeof DataFieldValue>;
|
25
|
-
export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
|
28
|
+
export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
|
26
29
|
filename: z.ZodString;
|
27
30
|
originalFilename: z.ZodString;
|
28
31
|
type: z.ZodString;
|
@@ -137,7 +140,7 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBool
|
|
137
140
|
postcodeOrZip?: string | undefined;
|
138
141
|
}>]>;
|
139
142
|
export type FieldValue = z.infer<typeof FieldValue>;
|
140
|
-
export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
|
143
|
+
export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
|
141
144
|
filename: z.ZodString;
|
142
145
|
originalFilename: z.ZodString;
|
143
146
|
type: z.ZodString;
|
@@ -261,5 +264,5 @@ export type FieldValueSchema = typeof FileFieldValue | typeof FileFieldWithOptio
|
|
261
264
|
*
|
262
265
|
* FieldValueInputSchema uses Input types which have set optional values as nullish
|
263
266
|
* */
|
264
|
-
export type FieldUpdateValueSchema = typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldUpdateValue | typeof NumberFieldValue | typeof DataFieldValue | z.ZodString | z.ZodBoolean;
|
267
|
+
export type FieldUpdateValueSchema = typeof DateRangeFieldValue | typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldUpdateValue | typeof NumberFieldValue | typeof DataFieldValue | z.ZodString | z.ZodBoolean;
|
265
268
|
//# sourceMappingURL=FieldValue.d.ts.map
|