@opencrvs/toolkit 1.8.1-rc.06c1a33 → 1.8.1-rc.0c6d168

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 (30) hide show
  1. package/build.sh +5 -0
  2. package/dist/commons/api/router.d.ts +1 -1347
  3. package/dist/commons/events/ActionConfig.d.ts +3777 -13563
  4. package/dist/commons/events/ActionDocument.d.ts +1 -3036
  5. package/dist/commons/events/ActionInput.d.ts +0 -2460
  6. package/dist/commons/events/AdvancedSearchConfig.d.ts +3 -93
  7. package/dist/commons/events/CompositeFieldValue.d.ts +0 -60
  8. package/dist/commons/events/Draft.d.ts +0 -192
  9. package/dist/commons/events/EventConfig.d.ts +3864 -8123
  10. package/dist/commons/events/EventDocument.d.ts +0 -1704
  11. package/dist/commons/events/EventIndex.d.ts +1 -47
  12. package/dist/commons/events/FieldConfig.d.ts +990 -1752
  13. package/dist/commons/events/FieldType.d.ts +1 -3
  14. package/dist/commons/events/FieldTypeMapping.d.ts +3 -85
  15. package/dist/commons/events/FieldValue.d.ts +3 -62
  16. package/dist/commons/events/FormConfig.d.ts +1148 -5750
  17. package/dist/commons/events/PageConfig.d.ts +1206 -2352
  18. package/dist/commons/events/WorkqueueConfig.d.ts +8 -8
  19. package/dist/commons/events/defineConfig.d.ts +16 -727
  20. package/dist/commons/events/test.utils.d.ts +0 -42
  21. package/dist/commons/events/utils.d.ts +18 -1319
  22. package/dist/commons/notification/UserNotifications.d.ts +547 -0
  23. package/dist/commons/notification/index.d.ts +2 -0
  24. package/dist/events/index.js +19 -74
  25. package/dist/notification/index.d.ts +2 -0
  26. package/dist/notification/index.d.ts.map +1 -0
  27. package/dist/notification/index.js +5333 -0
  28. package/package.json +3 -2
  29. package/tsconfig.json +2 -1
  30. package/tsconfig.tsbuildinfo +1 -1
@@ -27,10 +27,8 @@ export declare const FieldType: {
27
27
  readonly OFFICE: "OFFICE";
28
28
  readonly SIGNATURE: "SIGNATURE";
29
29
  readonly DATA: "DATA";
30
- readonly BUTTON: "BUTTON";
31
- readonly HTTP: "HTTP";
32
30
  };
33
- export declare const fieldTypes: ("ID" | "NAME" | "PHONE" | "ADDRESS" | "TEXT" | "NUMBER" | "TEXTAREA" | "EMAIL" | "DATE" | "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" | "HTTP")[];
31
+ export declare const fieldTypes: ("ID" | "NAME" | "PHONE" | "ADDRESS" | "TEXT" | "NUMBER" | "TEXTAREA" | "EMAIL" | "DATE" | "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")[];
34
32
  export type FieldType = (typeof fieldTypes)[number];
35
33
  /**
36
34
  * 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, DataField, NameField, PhoneField, IdField, DateRangeField, SelectDateRangeField, TimeField, HttpField, ButtonField } 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, DataField, NameField, PhoneField, IdField, DateRangeField, SelectDateRangeField, TimeField } from './FieldConfig';
3
3
  import { FieldType } from './FieldType';
4
4
  import { FieldValue, FieldUpdateValueSchema, DateRangeFieldValue, SelectDateRangeValue } from './FieldValue';
5
5
  import { FullDocumentPath } from '../documents';
@@ -207,34 +207,7 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
207
207
  option: string;
208
208
  path: string;
209
209
  originalFilename: string;
210
- }>, "many">>> | z.ZodBoolean | z.ZodNumber | z.ZodOptional<z.ZodNullable<z.ZodNumber>> | z.ZodOptional<z.ZodNullable<z.ZodBoolean>> | z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
211
- loading: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
212
- error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
213
- statusCode: z.ZodNullable<z.ZodNumber>;
214
- message: z.ZodString;
215
- }, "strip", z.ZodTypeAny, {
216
- message: string;
217
- statusCode: number | null;
218
- }, {
219
- message: string;
220
- statusCode: number | null;
221
- }>>>;
222
- data: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
223
- }, "strip", z.ZodTypeAny, {
224
- data?: any;
225
- error?: {
226
- message: string;
227
- statusCode: number | null;
228
- } | null | undefined;
229
- loading?: boolean | null | undefined;
230
- }, {
231
- data?: any;
232
- error?: {
233
- message: string;
234
- statusCode: number | null;
235
- } | null | undefined;
236
- loading?: boolean | null | undefined;
237
- }>, z.ZodNull]>, z.ZodUndefined]> | z.ZodEnum<["last7Days", "last30Days", "last90Days", "last365Days"]> | z.ZodUnion<[z.ZodObject<{
210
+ }>, "many">>> | z.ZodEnum<["last7Days", "last30Days", "last90Days", "last365Days"]> | z.ZodUnion<[z.ZodObject<{
238
211
  start: z.ZodString;
239
212
  end: z.ZodString;
240
213
  }, "strip", z.ZodTypeAny, {
@@ -252,34 +225,7 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
252
225
  }, {
253
226
  start: string;
254
227
  end: string;
255
- }>, z.ZodString]>>> | z.ZodOptional<z.ZodNullable<z.ZodEnum<["last7Days", "last30Days", "last90Days", "last365Days"]>>> | z.ZodOptional<z.ZodNullable<z.ZodUndefined>> | z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
256
- loading: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
257
- error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
258
- statusCode: z.ZodNullable<z.ZodNumber>;
259
- message: z.ZodString;
260
- }, "strip", z.ZodTypeAny, {
261
- message: string;
262
- statusCode: number | null;
263
- }, {
264
- message: string;
265
- statusCode: number | null;
266
- }>>>;
267
- data: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
268
- }, "strip", z.ZodTypeAny, {
269
- data?: any;
270
- error?: {
271
- message: string;
272
- statusCode: number | null;
273
- } | null | undefined;
274
- loading?: boolean | null | undefined;
275
- }, {
276
- data?: any;
277
- error?: {
278
- message: string;
279
- statusCode: number | null;
280
- } | null | undefined;
281
- loading?: boolean | null | undefined;
282
- }>, z.ZodNull]>, z.ZodUndefined]>>> | z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
228
+ }>, z.ZodString]>>> | z.ZodOptional<z.ZodNullable<z.ZodEnum<["last7Days", "last30Days", "last90Days", "last365Days"]>>> | z.ZodBoolean | z.ZodOptional<z.ZodNullable<z.ZodBoolean>> | z.ZodNumber | z.ZodOptional<z.ZodNullable<z.ZodNumber>> | z.ZodOptional<z.ZodNullable<z.ZodUndefined>> | z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
283
229
  country: z.ZodString;
284
230
  addressType: z.ZodLiteral<"DOMESTIC">;
285
231
  province: z.ZodString;
@@ -413,13 +359,6 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
413
359
  path: string;
414
360
  originalFilename: string;
415
361
  }[] | {
416
- data?: any;
417
- error?: {
418
- message: string;
419
- statusCode: number | null;
420
- } | null | undefined;
421
- loading?: boolean | null | undefined;
422
- } | {
423
362
  start: string;
424
363
  end: string;
425
364
  } | null | undefined;
@@ -470,13 +409,6 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
470
409
  path: string;
471
410
  originalFilename: string;
472
411
  }[] | {
473
- data?: any;
474
- error?: {
475
- message: string;
476
- statusCode: number | null;
477
- } | null | undefined;
478
- loading?: boolean | null | undefined;
479
- } | {
480
412
  start: string;
481
413
  end: string;
482
414
  } | null | undefined;
@@ -709,20 +641,6 @@ export declare const isDataFieldType: (field: {
709
641
  value: undefined;
710
642
  config: DataField;
711
643
  };
712
- export declare const isButtonFieldType: (field: {
713
- config: FieldConfig;
714
- value: FieldValue;
715
- }) => field is {
716
- value: undefined;
717
- config: ButtonField;
718
- };
719
- export declare const isHttpFieldType: (field: {
720
- config: FieldConfig;
721
- value: FieldValue;
722
- }) => field is {
723
- value: undefined;
724
- config: HttpField;
725
- };
726
644
  export type NonInteractiveFieldType = Divider | PageHeader | Paragraph | BulletList | DataField;
727
645
  export type InteractiveFieldType = Exclude<FieldConfig, NonInteractiveFieldType>;
728
646
  export declare const isNonInteractiveFieldType: (field: FieldConfig) => field is NonInteractiveFieldType;
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { AddressFieldValue, AddressFieldUpdateValue, FileFieldValue, FileFieldWithOptionValue, NameFieldValue, NameFieldUpdateValue, HttpFieldUpdateValue } from './CompositeFieldValue';
2
+ import { AddressFieldValue, AddressFieldUpdateValue, FileFieldValue, FileFieldWithOptionValue, NameFieldValue, NameFieldUpdateValue } 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).
@@ -39,8 +39,6 @@ export declare const DataFieldValue: z.ZodUndefined;
39
39
  export type DataFieldValue = z.infer<typeof DataFieldValue>;
40
40
  export declare const SignatureFieldValue: z.ZodString;
41
41
  export type SignatureFieldValue = z.infer<typeof SignatureFieldValue>;
42
- export declare const ButtonFieldValue: z.ZodNumber;
43
- export type ButtonFieldValue = z.infer<typeof ButtonFieldValue>;
44
42
  export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodString, z.ZodUnion<[z.ZodObject<{
45
43
  start: z.ZodString;
46
44
  end: z.ZodString;
@@ -187,37 +185,7 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodStri
187
185
  firstname: string;
188
186
  surname: string;
189
187
  middlename?: string | null | undefined;
190
- }>, z.ZodNull]>, z.ZodUndefined]>, z.ZodNumber, z.ZodObject<{
191
- loading: z.ZodBoolean;
192
- error: z.ZodNullable<z.ZodObject<{
193
- statusCode: z.ZodNullable<z.ZodNumber>;
194
- message: z.ZodString;
195
- }, "strip", z.ZodTypeAny, {
196
- message: string;
197
- statusCode: number | null;
198
- }, {
199
- message: string;
200
- statusCode: number | null;
201
- }>>;
202
- data: z.ZodAny;
203
- trackingValue: z.ZodOptional<z.ZodString>;
204
- }, "strip", z.ZodTypeAny, {
205
- error: {
206
- message: string;
207
- statusCode: number | null;
208
- } | null;
209
- loading: boolean;
210
- data?: any;
211
- trackingValue?: string | undefined;
212
- }, {
213
- error: {
214
- message: string;
215
- statusCode: number | null;
216
- } | null;
217
- loading: boolean;
218
- data?: any;
219
- trackingValue?: string | undefined;
220
- }>]>;
188
+ }>, z.ZodNull]>, z.ZodUndefined]>]>;
221
189
  export type FieldValue = z.infer<typeof FieldValue>;
222
190
  export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodString, z.ZodUnion<[z.ZodObject<{
223
191
  start: z.ZodString;
@@ -353,33 +321,6 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
353
321
  firstname: string;
354
322
  surname: string;
355
323
  middlename?: string | null | undefined;
356
- }>, z.ZodNull]>, z.ZodUndefined]>, z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
357
- loading: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
358
- error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
359
- statusCode: z.ZodNullable<z.ZodNumber>;
360
- message: z.ZodString;
361
- }, "strip", z.ZodTypeAny, {
362
- message: string;
363
- statusCode: number | null;
364
- }, {
365
- message: string;
366
- statusCode: number | null;
367
- }>>>;
368
- data: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
369
- }, "strip", z.ZodTypeAny, {
370
- data?: any;
371
- error?: {
372
- message: string;
373
- statusCode: number | null;
374
- } | null | undefined;
375
- loading?: boolean | null | undefined;
376
- }, {
377
- data?: any;
378
- error?: {
379
- message: string;
380
- statusCode: number | null;
381
- } | null | undefined;
382
- loading?: boolean | null | undefined;
383
324
  }>, z.ZodNull]>, z.ZodUndefined]>]>;
384
325
  export type FieldUpdateValue = z.infer<typeof FieldUpdateValue>;
385
326
  /**
@@ -391,5 +332,5 @@ export type FieldValueSchema = typeof FileFieldValue | typeof FileFieldWithOptio
391
332
  *
392
333
  * FieldValueInputSchema uses Input types which have set optional values as nullish
393
334
  * */
394
- export type FieldUpdateValueSchema = typeof DateRangeFieldValue | typeof SelectDateRangeValue | typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldUpdateValue | typeof NumberFieldValue | typeof DataFieldValue | typeof NameFieldValue | typeof NameFieldUpdateValue | typeof HttpFieldUpdateValue | typeof ButtonFieldValue | z.ZodString | z.ZodBoolean;
335
+ export type FieldUpdateValueSchema = typeof DateRangeFieldValue | typeof SelectDateRangeValue | typeof FileFieldValue | typeof FileFieldWithOptionValue | typeof CheckboxFieldValue | typeof AddressFieldUpdateValue | typeof NumberFieldValue | typeof DataFieldValue | typeof NameFieldValue | typeof NameFieldUpdateValue | z.ZodString | z.ZodBoolean;
395
336
  //# sourceMappingURL=FieldValue.d.ts.map