@opencrvs/toolkit 1.9.5-rc.710ac2d → 1.9.5-rc.8287bda

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.
@@ -198,7 +198,7 @@ export declare const defineConfig: (config: EventConfigInput) => {
198
198
  type: "exact" | "fuzzy" | "range" | "within";
199
199
  searchFields?: string[] | undefined;
200
200
  };
201
- fieldId: "event.status" | "event.trackingId" | "event.updatedAt" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation";
201
+ fieldId: "event.status" | "event.trackingId" | "event.updatedAt" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation" | "event.legalStatuses.REGISTERED.registrationNumber";
202
202
  fieldType: "event";
203
203
  type?: "NAME" | "PHONE" | "ID" | "ADDRESS" | "TEXT" | "NUMBER" | "TEXTAREA" | "EMAIL" | "DATE" | "AGE" | "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" | "SEARCH" | "ALPHA_PRINT_BUTTON" | "HTTP" | "LINK_BUTTON" | "VERIFICATION_STATUS" | "QUERY_PARAM_READER" | "QR_READER" | "ID_READER" | "LOADER" | undefined;
204
204
  options?: {
@@ -10,7 +10,7 @@ import { WorkqueueColumnKeys, WorkqueueColumnValue } from './WorkqueueColumnConf
10
10
  */
11
11
  declare function eventFn(fieldId: EventFieldIdInput): {
12
12
  range: () => {
13
- fieldId: "event.status" | "event.trackingId" | "event.updatedAt" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation";
13
+ fieldId: "event.status" | "event.trackingId" | "event.updatedAt" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation" | "event.legalStatuses.REGISTERED.registrationNumber";
14
14
  fieldType: "event";
15
15
  } & {
16
16
  config: {
@@ -18,7 +18,7 @@ declare function eventFn(fieldId: EventFieldIdInput): {
18
18
  };
19
19
  };
20
20
  exact: () => {
21
- fieldId: "event.status" | "event.trackingId" | "event.updatedAt" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation";
21
+ fieldId: "event.status" | "event.trackingId" | "event.updatedAt" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation" | "event.legalStatuses.REGISTERED.registrationNumber";
22
22
  fieldType: "event";
23
23
  } & {
24
24
  config: {
@@ -26,7 +26,7 @@ declare function eventFn(fieldId: EventFieldIdInput): {
26
26
  };
27
27
  };
28
28
  fuzzy: () => {
29
- fieldId: "event.status" | "event.trackingId" | "event.updatedAt" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation";
29
+ fieldId: "event.status" | "event.trackingId" | "event.updatedAt" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation" | "event.legalStatuses.REGISTERED.registrationNumber";
30
30
  fieldType: "event";
31
31
  } & {
32
32
  config: {
@@ -34,7 +34,7 @@ declare function eventFn(fieldId: EventFieldIdInput): {
34
34
  };
35
35
  };
36
36
  within: () => {
37
- fieldId: "event.status" | "event.trackingId" | "event.updatedAt" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation";
37
+ fieldId: "event.status" | "event.trackingId" | "event.updatedAt" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation" | "event.legalStatuses.REGISTERED.registrationNumber";
38
38
  fieldType: "event";
39
39
  } & {
40
40
  config: {
@@ -428,7 +428,7 @@ export declare function getEventConfigById(eventConfigs: EventConfig[], id: stri
428
428
  type: "exact" | "fuzzy" | "range" | "within";
429
429
  searchFields?: string[] | undefined;
430
430
  };
431
- fieldId: "event.status" | "event.trackingId" | "event.updatedAt" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation";
431
+ fieldId: "event.status" | "event.trackingId" | "event.updatedAt" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation" | "event.legalStatuses.REGISTERED.registrationNumber";
432
432
  fieldType: "event";
433
433
  type?: "NAME" | "PHONE" | "ID" | "ADDRESS" | "TEXT" | "NUMBER" | "TEXTAREA" | "EMAIL" | "DATE" | "AGE" | "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" | "SEARCH" | "ALPHA_PRINT_BUTTON" | "HTTP" | "LINK_BUTTON" | "VERIFICATION_STATUS" | "QUERY_PARAM_READER" | "QR_READER" | "ID_READER" | "LOADER" | undefined;
434
434
  options?: {
@@ -50,6 +50,7 @@ var objectHash = __toESM(require("object-hash"));
50
50
  var import_zod = require("zod");
51
51
  var SerializedUserField = import_zod.z.object({
52
52
  $userField: import_zod.z.enum([
53
+ "id",
53
54
  "name",
54
55
  "role",
55
56
  "fullHonorificName",
@@ -57,6 +58,8 @@ var SerializedUserField = import_zod.z.object({
57
58
  "firstname",
58
59
  "middlename",
59
60
  "surname",
61
+ "district",
62
+ "province",
60
63
  "primaryOfficeId"
61
64
  ]),
62
65
  $location: import_zod.z.string().optional()
@@ -863,6 +863,7 @@ function getUUID() {
863
863
  var import_zod9 = require("zod");
864
864
  var SerializedUserField = import_zod9.z.object({
865
865
  $userField: import_zod9.z.enum([
866
+ "id",
866
867
  "name",
867
868
  "role",
868
869
  "fullHonorificName",
@@ -870,6 +871,8 @@ var SerializedUserField = import_zod9.z.object({
870
871
  "firstname",
871
872
  "middlename",
872
873
  "surname",
874
+ "district",
875
+ "province",
873
876
  "primaryOfficeId"
874
877
  ]),
875
878
  $location: import_zod9.z.string().optional()
@@ -2087,6 +2090,9 @@ var File = BaseField.extend({
2087
2090
  configuration: import_zod15.z.object({
2088
2091
  maxFileSize: import_zod15.z.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
2089
2092
  acceptedFileTypes: MimeType.array().optional().describe("List of allowed file formats for the signature"),
2093
+ maxImageSize: import_zod15.z.object({
2094
+ targetSize: import_zod15.z.object({ width: import_zod15.z.number(), height: import_zod15.z.number() })
2095
+ }).optional(),
2090
2096
  style: import_zod15.z.object({
2091
2097
  width: import_zod15.z.enum(["full", "auto"]).optional().describe(
2092
2098
  "Whether the file upload button should take the full width of the container or not"
@@ -2218,6 +2224,9 @@ var FileUploadWithOptions = BaseField.extend({
2218
2224
  defaultValue: FileFieldWithOptionValue.optional(),
2219
2225
  configuration: import_zod15.z.object({
2220
2226
  maxFileSize: import_zod15.z.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
2227
+ maxImageSize: import_zod15.z.object({
2228
+ targetSize: import_zod15.z.object({ width: import_zod15.z.number(), height: import_zod15.z.number() })
2229
+ }).optional(),
2221
2230
  acceptedFileTypes: MimeType.array().optional().describe("List of allowed file formats for the signature")
2222
2231
  }).default({
2223
2232
  maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
@@ -2840,6 +2849,7 @@ var EventFieldIdInput = import_zod23.z.enum([
2840
2849
  "status",
2841
2850
  "legalStatuses.REGISTERED.acceptedAt",
2842
2851
  "legalStatuses.REGISTERED.createdAtLocation",
2852
+ "legalStatuses.REGISTERED.registrationNumber",
2843
2853
  "updatedAt"
2844
2854
  ]);
2845
2855
  var METADATA_FIELD_PREFIX = "event.";
@@ -2848,6 +2858,7 @@ var EventFieldId = import_zod23.z.enum([
2848
2858
  `${METADATA_FIELD_PREFIX}status`,
2849
2859
  `${METADATA_FIELD_PREFIX}legalStatuses.REGISTERED.acceptedAt`,
2850
2860
  `${METADATA_FIELD_PREFIX}legalStatuses.REGISTERED.createdAtLocation`,
2861
+ `${METADATA_FIELD_PREFIX}legalStatuses.REGISTERED.registrationNumber`,
2851
2862
  `${METADATA_FIELD_PREFIX}updatedAt`
2852
2863
  ]);
2853
2864
  var EventFieldConfigSchema = BaseField3.extend({
@@ -8927,7 +8938,7 @@ function userDeserializer(serializedUserField, user2) {
8927
8938
  if (typeof serializedUserField === "string") {
8928
8939
  return serializedUserField;
8929
8940
  }
8930
- if (serializedUserField.$userField === "name" || serializedUserField.$userField === "fullHonorificName" || serializedUserField.$userField === "device" || serializedUserField.$userField === "firstname" || serializedUserField.$userField === "middlename" || serializedUserField.$userField === "surname") {
8941
+ if (serializedUserField.$userField === "name" || serializedUserField.$userField === "fullHonorificName" || serializedUserField.$userField === "device" || serializedUserField.$userField === "firstname" || serializedUserField.$userField === "middlename" || serializedUserField.$userField === "province" || serializedUserField.$userField === "district" || serializedUserField.$userField === "surname") {
8931
8942
  throw new Error(
8932
8943
  `Deserializer for ${serializedUserField.$userField} is not implemented yet`
8933
8944
  );
@@ -524,6 +524,7 @@ function getUUID() {
524
524
  var import_zod9 = require("zod");
525
525
  var SerializedUserField = import_zod9.z.object({
526
526
  $userField: import_zod9.z.enum([
527
+ "id",
527
528
  "name",
528
529
  "role",
529
530
  "fullHonorificName",
@@ -531,6 +532,8 @@ var SerializedUserField = import_zod9.z.object({
531
532
  "firstname",
532
533
  "middlename",
533
534
  "surname",
535
+ "district",
536
+ "province",
534
537
  "primaryOfficeId"
535
538
  ]),
536
539
  $location: import_zod9.z.string().optional()
@@ -1613,6 +1616,9 @@ var File = BaseField.extend({
1613
1616
  configuration: import_zod15.z.object({
1614
1617
  maxFileSize: import_zod15.z.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
1615
1618
  acceptedFileTypes: MimeType.array().optional().describe("List of allowed file formats for the signature"),
1619
+ maxImageSize: import_zod15.z.object({
1620
+ targetSize: import_zod15.z.object({ width: import_zod15.z.number(), height: import_zod15.z.number() })
1621
+ }).optional(),
1616
1622
  style: import_zod15.z.object({
1617
1623
  width: import_zod15.z.enum(["full", "auto"]).optional().describe(
1618
1624
  "Whether the file upload button should take the full width of the container or not"
@@ -1744,6 +1750,9 @@ var FileUploadWithOptions = BaseField.extend({
1744
1750
  defaultValue: FileFieldWithOptionValue.optional(),
1745
1751
  configuration: import_zod15.z.object({
1746
1752
  maxFileSize: import_zod15.z.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
1753
+ maxImageSize: import_zod15.z.object({
1754
+ targetSize: import_zod15.z.object({ width: import_zod15.z.number(), height: import_zod15.z.number() })
1755
+ }).optional(),
1747
1756
  acceptedFileTypes: MimeType.array().optional().describe("List of allowed file formats for the signature")
1748
1757
  }).default({
1749
1758
  maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
@@ -2366,6 +2375,7 @@ var EventFieldIdInput = import_zod23.z.enum([
2366
2375
  "status",
2367
2376
  "legalStatuses.REGISTERED.acceptedAt",
2368
2377
  "legalStatuses.REGISTERED.createdAtLocation",
2378
+ "legalStatuses.REGISTERED.registrationNumber",
2369
2379
  "updatedAt"
2370
2380
  ]);
2371
2381
  var METADATA_FIELD_PREFIX = "event.";
@@ -2374,6 +2384,7 @@ var EventFieldId = import_zod23.z.enum([
2374
2384
  `${METADATA_FIELD_PREFIX}status`,
2375
2385
  `${METADATA_FIELD_PREFIX}legalStatuses.REGISTERED.acceptedAt`,
2376
2386
  `${METADATA_FIELD_PREFIX}legalStatuses.REGISTERED.createdAtLocation`,
2387
+ `${METADATA_FIELD_PREFIX}legalStatuses.REGISTERED.registrationNumber`,
2377
2388
  `${METADATA_FIELD_PREFIX}updatedAt`
2378
2389
  ]);
2379
2390
  var EventFieldConfigSchema = BaseField3.extend({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencrvs/toolkit",
3
- "version": "1.9.5-rc.710ac2d",
3
+ "version": "1.9.5-rc.8287bda",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "exports": {