@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.
- package/build.sh +5 -0
- package/dist/commons/api/router.d.ts +1 -1347
- package/dist/commons/events/ActionConfig.d.ts +3777 -13563
- package/dist/commons/events/ActionDocument.d.ts +1 -3036
- package/dist/commons/events/ActionInput.d.ts +0 -2460
- package/dist/commons/events/AdvancedSearchConfig.d.ts +3 -93
- package/dist/commons/events/CompositeFieldValue.d.ts +0 -60
- package/dist/commons/events/Draft.d.ts +0 -192
- package/dist/commons/events/EventConfig.d.ts +3864 -8123
- package/dist/commons/events/EventDocument.d.ts +0 -1704
- package/dist/commons/events/EventIndex.d.ts +1 -47
- package/dist/commons/events/FieldConfig.d.ts +990 -1752
- package/dist/commons/events/FieldType.d.ts +1 -3
- package/dist/commons/events/FieldTypeMapping.d.ts +3 -85
- package/dist/commons/events/FieldValue.d.ts +3 -62
- package/dist/commons/events/FormConfig.d.ts +1148 -5750
- package/dist/commons/events/PageConfig.d.ts +1206 -2352
- package/dist/commons/events/WorkqueueConfig.d.ts +8 -8
- package/dist/commons/events/defineConfig.d.ts +16 -727
- package/dist/commons/events/test.utils.d.ts +0 -42
- package/dist/commons/events/utils.d.ts +18 -1319
- package/dist/commons/notification/UserNotifications.d.ts +547 -0
- package/dist/commons/notification/index.d.ts +2 -0
- package/dist/events/index.js +19 -74
- package/dist/notification/index.d.ts +2 -0
- package/dist/notification/index.d.ts.map +1 -0
- package/dist/notification/index.js +5333 -0
- package/package.json +3 -2
- package/tsconfig.json +2 -1
- 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"
|
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
|
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.
|
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.
|
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
|
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]
|
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 |
|
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
|