@opencrvs/toolkit 1.9.5-rc.4c04dcd → 1.9.5-rc.5b99334
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 +24 -26
- package/dist/commons/events/CountryConfigQueryInput.d.ts +350 -350
- package/dist/commons/events/FieldConfig.d.ts +214 -108
- package/dist/commons/events/FieldType.d.ts +1 -1
- package/dist/commons/events/TemplateConfig.d.ts +3 -15
- package/dist/commons/events/WorkqueueConfig.d.ts +525 -525
- package/dist/conditionals/index.js +2 -7
- package/dist/events/index.js +13 -13
- package/dist/notification/index.js +12 -12
- package/package.json +1 -1
|
@@ -53,13 +53,8 @@ var SerializedUserField = import_zod.z.object({
|
|
|
53
53
|
"id",
|
|
54
54
|
"name",
|
|
55
55
|
"role",
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"firstname",
|
|
59
|
-
"middlename",
|
|
60
|
-
"surname",
|
|
61
|
-
"district",
|
|
62
|
-
"province",
|
|
56
|
+
"signature",
|
|
57
|
+
"avatar",
|
|
63
58
|
"primaryOfficeId"
|
|
64
59
|
]),
|
|
65
60
|
$location: import_zod.z.string().optional()
|
package/dist/events/index.js
CHANGED
|
@@ -608,7 +608,6 @@ var FileFieldType = import_zod4.z.enum([
|
|
|
608
608
|
]);
|
|
609
609
|
var fieldTypes = Object.values(FieldType);
|
|
610
610
|
var compositeFieldTypes = [
|
|
611
|
-
FieldType.NAME,
|
|
612
611
|
FieldType.DATE_RANGE,
|
|
613
612
|
FieldType.ADDRESS,
|
|
614
613
|
FieldType.FILE_WITH_OPTIONS,
|
|
@@ -866,13 +865,8 @@ var SerializedUserField = import_zod9.z.object({
|
|
|
866
865
|
"id",
|
|
867
866
|
"name",
|
|
868
867
|
"role",
|
|
869
|
-
"
|
|
870
|
-
"
|
|
871
|
-
"firstname",
|
|
872
|
-
"middlename",
|
|
873
|
-
"surname",
|
|
874
|
-
"district",
|
|
875
|
-
"province",
|
|
868
|
+
"signature",
|
|
869
|
+
"avatar",
|
|
876
870
|
"primaryOfficeId"
|
|
877
871
|
]),
|
|
878
872
|
$location: import_zod9.z.string().optional()
|
|
@@ -1954,7 +1948,7 @@ var Divider = BaseField.extend({
|
|
|
1954
1948
|
});
|
|
1955
1949
|
var TextField = BaseField.extend({
|
|
1956
1950
|
type: import_zod15.z.literal(FieldType.TEXT),
|
|
1957
|
-
defaultValue:
|
|
1951
|
+
defaultValue: NonEmptyTextValue.optional(),
|
|
1958
1952
|
configuration: import_zod15.z.object({
|
|
1959
1953
|
maxLength: import_zod15.z.number().optional().describe("Maximum length of the text"),
|
|
1960
1954
|
type: import_zod15.z.enum(["text", "password"]).optional(),
|
|
@@ -2090,6 +2084,9 @@ var File = BaseField.extend({
|
|
|
2090
2084
|
configuration: import_zod15.z.object({
|
|
2091
2085
|
maxFileSize: import_zod15.z.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
|
|
2092
2086
|
acceptedFileTypes: MimeType.array().optional().describe("List of allowed file formats for the signature"),
|
|
2087
|
+
maxImageSize: import_zod15.z.object({
|
|
2088
|
+
targetSize: import_zod15.z.object({ width: import_zod15.z.number(), height: import_zod15.z.number() })
|
|
2089
|
+
}).optional(),
|
|
2093
2090
|
style: import_zod15.z.object({
|
|
2094
2091
|
width: import_zod15.z.enum(["full", "auto"]).optional().describe(
|
|
2095
2092
|
"Whether the file upload button should take the full width of the container or not"
|
|
@@ -2156,9 +2153,9 @@ var NameConfig = import_zod15.z.object({
|
|
|
2156
2153
|
var NameField = BaseField.extend({
|
|
2157
2154
|
type: import_zod15.z.literal(FieldType.NAME),
|
|
2158
2155
|
defaultValue: import_zod15.z.object({
|
|
2159
|
-
firstname:
|
|
2160
|
-
middlename:
|
|
2161
|
-
surname:
|
|
2156
|
+
firstname: NonEmptyTextValue.optional(),
|
|
2157
|
+
middlename: NonEmptyTextValue.optional(),
|
|
2158
|
+
surname: NonEmptyTextValue.optional()
|
|
2162
2159
|
}).optional(),
|
|
2163
2160
|
configuration: import_zod15.z.object({
|
|
2164
2161
|
name: NameConfig.default({
|
|
@@ -2221,6 +2218,9 @@ var FileUploadWithOptions = BaseField.extend({
|
|
|
2221
2218
|
defaultValue: FileFieldWithOptionValue.optional(),
|
|
2222
2219
|
configuration: import_zod15.z.object({
|
|
2223
2220
|
maxFileSize: import_zod15.z.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
|
|
2221
|
+
maxImageSize: import_zod15.z.object({
|
|
2222
|
+
targetSize: import_zod15.z.object({ width: import_zod15.z.number(), height: import_zod15.z.number() })
|
|
2223
|
+
}).optional(),
|
|
2224
2224
|
acceptedFileTypes: MimeType.array().optional().describe("List of allowed file formats for the signature")
|
|
2225
2225
|
}).default({
|
|
2226
2226
|
maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
|
|
@@ -8930,7 +8930,7 @@ function userDeserializer(serializedUserField, user2) {
|
|
|
8930
8930
|
if (typeof serializedUserField === "string") {
|
|
8931
8931
|
return serializedUserField;
|
|
8932
8932
|
}
|
|
8933
|
-
if (serializedUserField.$userField === "name" || serializedUserField.$userField === "
|
|
8933
|
+
if (serializedUserField.$userField === "name" || serializedUserField.$userField === "signature" || serializedUserField.$userField === "avatar") {
|
|
8934
8934
|
throw new Error(
|
|
8935
8935
|
`Deserializer for ${serializedUserField.$userField} is not implemented yet`
|
|
8936
8936
|
);
|
|
@@ -273,7 +273,6 @@ var FileFieldType = import_zod4.z.enum([
|
|
|
273
273
|
]);
|
|
274
274
|
var fieldTypes = Object.values(FieldType);
|
|
275
275
|
var compositeFieldTypes = [
|
|
276
|
-
FieldType.NAME,
|
|
277
276
|
FieldType.DATE_RANGE,
|
|
278
277
|
FieldType.ADDRESS,
|
|
279
278
|
FieldType.FILE_WITH_OPTIONS,
|
|
@@ -527,13 +526,8 @@ var SerializedUserField = import_zod9.z.object({
|
|
|
527
526
|
"id",
|
|
528
527
|
"name",
|
|
529
528
|
"role",
|
|
530
|
-
"
|
|
531
|
-
"
|
|
532
|
-
"firstname",
|
|
533
|
-
"middlename",
|
|
534
|
-
"surname",
|
|
535
|
-
"district",
|
|
536
|
-
"province",
|
|
529
|
+
"signature",
|
|
530
|
+
"avatar",
|
|
537
531
|
"primaryOfficeId"
|
|
538
532
|
]),
|
|
539
533
|
$location: import_zod9.z.string().optional()
|
|
@@ -1480,7 +1474,7 @@ var Divider = BaseField.extend({
|
|
|
1480
1474
|
});
|
|
1481
1475
|
var TextField = BaseField.extend({
|
|
1482
1476
|
type: import_zod15.z.literal(FieldType.TEXT),
|
|
1483
|
-
defaultValue:
|
|
1477
|
+
defaultValue: NonEmptyTextValue.optional(),
|
|
1484
1478
|
configuration: import_zod15.z.object({
|
|
1485
1479
|
maxLength: import_zod15.z.number().optional().describe("Maximum length of the text"),
|
|
1486
1480
|
type: import_zod15.z.enum(["text", "password"]).optional(),
|
|
@@ -1616,6 +1610,9 @@ var File = BaseField.extend({
|
|
|
1616
1610
|
configuration: import_zod15.z.object({
|
|
1617
1611
|
maxFileSize: import_zod15.z.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
|
|
1618
1612
|
acceptedFileTypes: MimeType.array().optional().describe("List of allowed file formats for the signature"),
|
|
1613
|
+
maxImageSize: import_zod15.z.object({
|
|
1614
|
+
targetSize: import_zod15.z.object({ width: import_zod15.z.number(), height: import_zod15.z.number() })
|
|
1615
|
+
}).optional(),
|
|
1619
1616
|
style: import_zod15.z.object({
|
|
1620
1617
|
width: import_zod15.z.enum(["full", "auto"]).optional().describe(
|
|
1621
1618
|
"Whether the file upload button should take the full width of the container or not"
|
|
@@ -1682,9 +1679,9 @@ var NameConfig = import_zod15.z.object({
|
|
|
1682
1679
|
var NameField = BaseField.extend({
|
|
1683
1680
|
type: import_zod15.z.literal(FieldType.NAME),
|
|
1684
1681
|
defaultValue: import_zod15.z.object({
|
|
1685
|
-
firstname:
|
|
1686
|
-
middlename:
|
|
1687
|
-
surname:
|
|
1682
|
+
firstname: NonEmptyTextValue.optional(),
|
|
1683
|
+
middlename: NonEmptyTextValue.optional(),
|
|
1684
|
+
surname: NonEmptyTextValue.optional()
|
|
1688
1685
|
}).optional(),
|
|
1689
1686
|
configuration: import_zod15.z.object({
|
|
1690
1687
|
name: NameConfig.default({
|
|
@@ -1747,6 +1744,9 @@ var FileUploadWithOptions = BaseField.extend({
|
|
|
1747
1744
|
defaultValue: FileFieldWithOptionValue.optional(),
|
|
1748
1745
|
configuration: import_zod15.z.object({
|
|
1749
1746
|
maxFileSize: import_zod15.z.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
|
|
1747
|
+
maxImageSize: import_zod15.z.object({
|
|
1748
|
+
targetSize: import_zod15.z.object({ width: import_zod15.z.number(), height: import_zod15.z.number() })
|
|
1749
|
+
}).optional(),
|
|
1750
1750
|
acceptedFileTypes: MimeType.array().optional().describe("List of allowed file formats for the signature")
|
|
1751
1751
|
}).default({
|
|
1752
1752
|
maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
|