@opencrvs/toolkit 1.8.0-rc.fd754eb → 1.8.0-rc.fd936ab

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 (33) hide show
  1. package/dist/commons/api/router.d.ts +4205 -7695
  2. package/dist/commons/conditionals/conditionals.d.ts +6 -9
  3. package/dist/commons/conditionals/validate.d.ts +6 -4
  4. package/dist/commons/events/ActionConfig.d.ts +1680 -90025
  5. package/dist/commons/events/ActionDocument.d.ts +211 -542
  6. package/dist/commons/events/ActionInput.d.ts +240 -248
  7. package/dist/commons/events/AdvancedSearchConfig.d.ts +25 -369
  8. package/dist/commons/events/CompositeFieldValue.d.ts +0 -3
  9. package/dist/commons/events/Draft.d.ts +20 -33
  10. package/dist/commons/events/EventConfig.d.ts +1344 -42812
  11. package/dist/commons/events/EventDocument.d.ts +156 -337
  12. package/dist/commons/events/EventIndex.d.ts +13 -1346
  13. package/dist/commons/events/EventInput.d.ts +0 -13
  14. package/dist/commons/events/EventMetadata.d.ts +11 -273
  15. package/dist/commons/events/FieldConfig.d.ts +724 -3733
  16. package/dist/commons/events/FieldType.d.ts +3 -3
  17. package/dist/commons/events/FieldTypeMapping.d.ts +4 -11
  18. package/dist/commons/events/FieldValue.d.ts +4 -7
  19. package/dist/commons/events/FormConfig.d.ts +441 -40419
  20. package/dist/commons/events/PageConfig.d.ts +194 -10068
  21. package/dist/commons/events/SummaryConfig.d.ts +39 -95
  22. package/dist/commons/events/User.d.ts +0 -5
  23. package/dist/commons/events/WorkqueueConfig.d.ts +19 -1135
  24. package/dist/commons/events/defineConfig.d.ts +35 -6966
  25. package/dist/commons/events/index.d.ts +0 -3
  26. package/dist/commons/events/test.utils.d.ts +44 -7
  27. package/dist/commons/events/utils.d.ts +67 -3550
  28. package/dist/conditionals/index.js +33 -36
  29. package/dist/events/index.js +977 -1672
  30. package/package.json +2 -3
  31. package/dist/commons/events/event.d.ts +0 -27
  32. package/dist/commons/events/field.d.ts +0 -68
  33. package/dist/commons/events/scopes.d.ts +0 -26
@@ -5,12 +5,12 @@ 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";
9
8
  readonly PARAGRAPH: "PARAGRAPH";
10
9
  readonly PAGE_HEADER: "PAGE_HEADER";
11
10
  readonly RADIO_GROUP: "RADIO_GROUP";
12
11
  readonly FILE: "FILE";
13
12
  readonly FILE_WITH_OPTIONS: "FILE_WITH_OPTIONS";
13
+ readonly HIDDEN: "HIDDEN";
14
14
  readonly BULLET_LIST: "BULLET_LIST";
15
15
  readonly CHECKBOX: "CHECKBOX";
16
16
  readonly SELECT: "SELECT";
@@ -23,10 +23,10 @@ export declare const FieldType: {
23
23
  readonly SIGNATURE: "SIGNATURE";
24
24
  readonly DATA: "DATA";
25
25
  };
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
+ 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")[];
27
27
  export type FieldType = (typeof fieldTypes)[number];
28
28
  /**
29
29
  * Composite field types are field types that consist of multiple field values.
30
30
  */
31
- export declare const compositeFieldTypes: ("ADDRESS" | "DATE_RANGE" | "FILE" | "FILE_WITH_OPTIONS")[];
31
+ export declare const compositeFieldTypes: ("ADDRESS" | "FILE" | "FILE_WITH_OPTIONS")[];
32
32
  //# sourceMappingURL=FieldType.d.ts.map
@@ -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.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<{
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<{
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
- }[] | [string, string] | null | undefined;
286
+ }[] | 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
- }[] | [string, string] | null | undefined;
325
+ }[] | 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 | string[] | 19 | {
330
+ export declare function mapFieldTypeToMockValue(field: FieldConfig, i: number): string | true | 19 | {
331
331
  country: string;
332
332
  addressType: "DOMESTIC";
333
333
  province: string;
@@ -416,13 +416,6 @@ 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
- };
426
419
  export declare const isPageHeaderFieldType: (field: {
427
420
  config: FieldConfig;
428
421
  value: FieldValue;
@@ -13,11 +13,8 @@ import { AddressFieldValue, AddressFieldUpdateValue, FileFieldValue, FileFieldWi
13
13
  *
14
14
  */
15
15
  export declare const TextValue: z.ZodString;
16
- export declare const NonEmptyTextValue: z.ZodString;
16
+ export declare const RequiredTextValue: 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>;
21
18
  export declare const EmailValue: z.ZodString;
22
19
  export declare const CheckboxFieldValue: z.ZodBoolean;
23
20
  export type CheckboxFieldValue = z.infer<typeof CheckboxFieldValue>;
@@ -25,7 +22,7 @@ export declare const NumberFieldValue: z.ZodNumber;
25
22
  export type NumberFieldValue = z.infer<typeof NumberFieldValue>;
26
23
  export declare const DataFieldValue: z.ZodUndefined;
27
24
  export type DataFieldValue = z.infer<typeof DataFieldValue>;
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<{
25
+ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
29
26
  filename: z.ZodString;
30
27
  originalFilename: z.ZodString;
31
28
  type: z.ZodString;
@@ -140,7 +137,7 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodUnio
140
137
  postcodeOrZip?: string | undefined;
141
138
  }>]>;
142
139
  export type FieldValue = z.infer<typeof FieldValue>;
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<{
140
+ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodBoolean, z.ZodNumber, z.ZodObject<{
144
141
  filename: z.ZodString;
145
142
  originalFilename: z.ZodString;
146
143
  type: z.ZodString;
@@ -264,5 +261,5 @@ export type FieldValueSchema = typeof FileFieldValue | typeof FileFieldWithOptio
264
261
  *
265
262
  * FieldValueInputSchema uses Input types which have set optional values as nullish
266
263
  * */
267
- export type FieldUpdateValueSchema = typeof DateRangeFieldValue | typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldUpdateValue | typeof NumberFieldValue | typeof DataFieldValue | z.ZodString | z.ZodBoolean;
264
+ export type FieldUpdateValueSchema = typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldUpdateValue | typeof NumberFieldValue | typeof DataFieldValue | z.ZodString | z.ZodBoolean;
268
265
  //# sourceMappingURL=FieldValue.d.ts.map