@opencrvs/toolkit 1.9.2-rc.c76ff3e → 1.9.2-rc.f1d7235

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.
@@ -77,6 +77,7 @@ __export(events_exports, {
77
77
  CustomActionInput: () => CustomActionInput,
78
78
  CustomFlag: () => CustomFlag,
79
79
  DEFAULT_DATE_OF_EVENT_PROPERTY: () => DEFAULT_DATE_OF_EVENT_PROPERTY,
80
+ DEFAULT_PLACE_OF_EVENT_PROPERTY: () => DEFAULT_PLACE_OF_EVENT_PROPERTY,
80
81
  DataEntry: () => DataEntry,
81
82
  DataFieldValue: () => DataFieldValue,
82
83
  DateCondition: () => DateCondition,
@@ -137,6 +138,7 @@ __export(events_exports, {
137
138
  FormPageConfig: () => FormPageConfig,
138
139
  Fuzzy: () => Fuzzy,
139
140
  GeographicalArea: () => GeographicalArea,
141
+ HiddenFieldValue: () => HiddenFieldValue,
140
142
  HttpFieldUpdateValue: () => HttpFieldUpdateValue,
141
143
  HttpFieldValue: () => HttpFieldValue,
142
144
  IdReaderFieldValue: () => IdReaderFieldValue,
@@ -216,6 +218,7 @@ __export(events_exports, {
216
218
  ZodDate: () => ZodDate,
217
219
  actionConfigTypes: () => actionConfigTypes,
218
220
  ageToDate: () => ageToDate,
221
+ aggregateActionAnnotations: () => aggregateActionAnnotations,
219
222
  aggregateActionDeclarations: () => aggregateActionDeclarations,
220
223
  alwaysTrue: () => alwaysTrue,
221
224
  and: () => and,
@@ -331,6 +334,7 @@ __export(events_exports, {
331
334
  isFieldVisible: () => isFieldVisible,
332
335
  isFileFieldType: () => isFileFieldType,
333
336
  isFileFieldWithOptionType: () => isFileFieldWithOptionType,
337
+ isHiddenFieldType: () => isHiddenFieldType,
334
338
  isHttpFieldType: () => isHttpFieldType,
335
339
  isIdFieldType: () => isIdFieldType,
336
340
  isIdReaderFieldType: () => isIdReaderFieldType,
@@ -375,6 +379,7 @@ __export(events_exports, {
375
379
  or: () => or,
376
380
  pickRandom: () => pickRandom,
377
381
  resolveDateOfEvent: () => resolveDateOfEvent,
382
+ resolvePlaceOfEvent: () => resolvePlaceOfEvent,
378
383
  runFieldValidations: () => runFieldValidations,
379
384
  runStructuralValidations: () => runStructuralValidations,
380
385
  safeUnion: () => safeUnion,
@@ -395,7 +400,7 @@ var TENNIS_CLUB_MEMBERSHIP = "tennis-club-membership";
395
400
  var CHILD_ONBOARDING_EVENT = "child-onboarding";
396
401
 
397
402
  // ../commons/src/events/ActionConfig.ts
398
- var z20 = __toESM(require("zod/v4"));
403
+ var z21 = __toESM(require("zod/v4"));
399
404
 
400
405
  // ../commons/src/events/TranslationConfig.ts
401
406
  var z = __toESM(require("zod/v4"));
@@ -613,7 +618,8 @@ var FieldType = {
613
618
  QUERY_PARAM_READER: "QUERY_PARAM_READER",
614
619
  QR_READER: "QR_READER",
615
620
  ID_READER: "ID_READER",
616
- LOADER: "LOADER"
621
+ LOADER: "LOADER",
622
+ HIDDEN: "HIDDEN"
617
623
  };
618
624
  var FileFieldType = z4.enum([
619
625
  FieldType.FILE,
@@ -747,6 +753,7 @@ var IdReaderFieldValue = ReadDataValue;
747
753
 
748
754
  // ../commons/src/events/FieldValue.ts
749
755
  var TextValue = z7.string();
756
+ var HiddenFieldValue = z7.string();
750
757
  var NonEmptyTextValue = TextValue.min(1);
751
758
  var DateValue = z7.iso.date().describe("Date in the format YYYY-MM-DD");
752
759
  var AgeValue = z7.object({
@@ -872,7 +879,8 @@ var FieldUpdateValue = safeUnion([
872
879
  DataFieldValue.describe("DataFieldValue"),
873
880
  NameFieldUpdateValue.describe("NameFieldUpdateValue"),
874
881
  HttpFieldUpdateValue.describe("HttpFieldUpdateValue"),
875
- QueryParamReaderFieldUpdateValue.describe("QueryParamReaderFieldUpdateValue")
882
+ QueryParamReaderFieldUpdateValue.describe("QueryParamReaderFieldUpdateValue"),
883
+ HiddenFieldValue.describe("HiddenFieldValue")
876
884
  ]);
877
885
 
878
886
  // ../commons/src/uuid.ts
@@ -1166,6 +1174,11 @@ var ConfigurableRawScopes = z10.discriminatedUnion("type", [
1166
1174
  RecordScope,
1167
1175
  CustomActionScope
1168
1176
  ]);
1177
+ var ConfigurableActionScopes = z10.discriminatedUnion("type", [
1178
+ // @TODO - Record scope holds non-action scopes as well e.g., `record.read`
1179
+ RecordScope,
1180
+ CustomActionScope
1181
+ ]);
1169
1182
  function flattenAndMergeScopes(scopes2) {
1170
1183
  if (scopes2.length === 0) return null;
1171
1184
  const type = scopes2[0].type;
@@ -1591,7 +1604,7 @@ var FlagConfig = z13.object({
1591
1604
  label: TranslationConfig.describe("Human readable label of the flag.")
1592
1605
  });
1593
1606
  var ActionFlagConfig = z13.object({
1594
- id: CustomFlag,
1607
+ id: Flag,
1595
1608
  operation: z13.enum(["add", "remove"]).describe("Operation to perform on the flag."),
1596
1609
  conditional: Conditional.optional().describe(
1597
1610
  "When conditional is met, the operation is performed on the flag. If not provided, the operation is performed unconditionally."
@@ -1636,6 +1649,7 @@ var EventMetadata = z14.object({
1636
1649
  ),
1637
1650
  createdAt: z14.iso.datetime().describe("The timestamp when the event was first created and saved."),
1638
1651
  dateOfEvent: ZodDate.nullish(),
1652
+ placeOfEvent: CreatedAtLocation,
1639
1653
  createdBy: z14.string().describe("ID of the user who created the event."),
1640
1654
  createdByUserType: z14.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
1641
1655
  updatedByUserRole: z14.string().describe("Role of the user who last changed the status."),
@@ -1665,6 +1679,7 @@ var EventMetadataKeysArray = [
1665
1679
  "status",
1666
1680
  "createdAt",
1667
1681
  "dateOfEvent",
1682
+ "placeOfEvent",
1668
1683
  "createdBy",
1669
1684
  "createdByUserType",
1670
1685
  "updatedByUserRole",
@@ -1699,6 +1714,11 @@ var eventMetadataLabelMap = {
1699
1714
  defaultMessage: "Date of Event",
1700
1715
  description: "Date of Event"
1701
1716
  },
1717
+ "event.placeOfEvent": {
1718
+ id: "event.placeOfEvent.label",
1719
+ defaultMessage: "Place of Event",
1720
+ description: "Place of Event"
1721
+ },
1702
1722
  "event.createdAtLocation": {
1703
1723
  id: "event.createdAtLocation.label",
1704
1724
  defaultMessage: "Location",
@@ -2439,6 +2459,13 @@ var LoaderField = BaseField.extend({
2439
2459
  }).describe(
2440
2460
  "A non-interactive field that indicates an in progress operation in form"
2441
2461
  );
2462
+ var HiddenField = BaseField.extend({
2463
+ type: z16.literal(FieldType.HIDDEN),
2464
+ required: z16.literal(false).optional()
2465
+ // Hidden fields cannot be required
2466
+ }).describe(
2467
+ "A non-interactive, hidden field that only hold a value in the form"
2468
+ );
2442
2469
  var FieldConfig = z16.discriminatedUnion("type", [
2443
2470
  Address,
2444
2471
  TextField,
@@ -2478,7 +2505,8 @@ var FieldConfig = z16.discriminatedUnion("type", [
2478
2505
  IdReaderField,
2479
2506
  QueryParamReaderField,
2480
2507
  LoaderField,
2481
- SearchField
2508
+ SearchField,
2509
+ HiddenField
2482
2510
  ]).meta({
2483
2511
  description: "Form field configuration",
2484
2512
  id: "FieldConfig"
@@ -2633,82 +2661,188 @@ var DeduplicationConfig = z19.object({
2633
2661
  query: Clause
2634
2662
  });
2635
2663
 
2664
+ // ../commons/src/icons.ts
2665
+ var z20 = __toESM(require("zod/v4"));
2666
+ var AvailableIcons = z20.enum([
2667
+ "Archived",
2668
+ "Assigned",
2669
+ "Certified",
2670
+ "Close",
2671
+ "Collapse",
2672
+ "Draft",
2673
+ "DuplicateYellow",
2674
+ "Expand",
2675
+ "ExternalValidate",
2676
+ "FilledCheck",
2677
+ "InReview",
2678
+ "Offline",
2679
+ "Registered",
2680
+ "RequiresUpdates",
2681
+ "Sent",
2682
+ "Validated",
2683
+ "WaitingApproval",
2684
+ "ChartActivity",
2685
+ "Activity",
2686
+ "Archive",
2687
+ "ArchiveTray",
2688
+ "ArrowLeft",
2689
+ "ArrowRight",
2690
+ "Buildings",
2691
+ "Circle",
2692
+ "CaretDown",
2693
+ "CaretLeft",
2694
+ "CaretRight",
2695
+ "ChartBar",
2696
+ "ChartLine",
2697
+ "ChatCircle",
2698
+ "CheckSquare",
2699
+ "Compass",
2700
+ "Check",
2701
+ "Copy",
2702
+ "Database",
2703
+ "DotsThreeVertical",
2704
+ "ArrowCounterClockwise",
2705
+ "MagnifyingGlassMinus",
2706
+ "MagnifyingGlassPlus",
2707
+ "Export",
2708
+ "Eye",
2709
+ "EyeSlash",
2710
+ "Envelope",
2711
+ "File",
2712
+ "FileSearch",
2713
+ "FileMinus",
2714
+ "FilePlus",
2715
+ "FileText",
2716
+ "FileX",
2717
+ "Handshake",
2718
+ "Gear",
2719
+ "GitBranch",
2720
+ "IdentificationCard",
2721
+ "List",
2722
+ "ListBullets",
2723
+ "Lock",
2724
+ "MagnifyingGlass",
2725
+ "MapPin",
2726
+ "Medal",
2727
+ "NotePencil",
2728
+ "Paperclip",
2729
+ "PaperPlaneTilt",
2730
+ "Pen",
2731
+ "Pencil",
2732
+ "PencilSimpleLine",
2733
+ "Phone",
2734
+ "Plus",
2735
+ "Printer",
2736
+ "SignOut",
2737
+ "Stamp",
2738
+ "Star",
2739
+ "Target",
2740
+ "TextT",
2741
+ "Trash",
2742
+ "UploadSimple",
2743
+ "User",
2744
+ "UserPlus",
2745
+ "Users",
2746
+ "WarningCircle",
2747
+ "X",
2748
+ "CircleWavyCheck",
2749
+ "CircleWavyQuestion",
2750
+ "ArchiveBox",
2751
+ "ArrowCircleDown",
2752
+ "FileArrowUp",
2753
+ "FileDotted",
2754
+ "Files",
2755
+ "PencilLine",
2756
+ "PencilCircle",
2757
+ "UserCircle",
2758
+ "Clock",
2759
+ "QrCode",
2760
+ "Webcam",
2761
+ "Sun",
2762
+ "DeviceTabletCamera",
2763
+ "Globe",
2764
+ "Fingerprint",
2765
+ "PushPin",
2766
+ "Timer"
2767
+ ]);
2768
+
2636
2769
  // ../commons/src/events/ActionConfig.ts
2637
- var DeclarationReviewConfig = z20.object({
2770
+ var DeclarationReviewConfig = z21.object({
2638
2771
  title: TranslationConfig.describe("Title of the review page"),
2639
- fields: z20.array(FieldConfig).describe("Fields displayed on the review page for annotations.")
2772
+ fields: z21.array(FieldConfig).describe("Fields displayed on the review page for annotations.")
2640
2773
  }).describe(
2641
2774
  "Configuration of the declaration review page for collecting event-related metadata."
2642
2775
  );
2643
- var ActionConfigBase = z20.object({
2776
+ var ActionConfigBase = z21.object({
2644
2777
  label: TranslationConfig.describe("Human readable description of the action"),
2645
- flags: z20.array(ActionFlagConfig).optional().default([]).describe("Flag actions which are executed when the action is performed."),
2778
+ flags: z21.array(ActionFlagConfig).optional().default([]).describe("Flag actions which are executed when the action is performed."),
2646
2779
  auditHistoryLabel: TranslationConfig.describe(
2647
2780
  'The label to show in audit history for this action. For example "Approved".'
2648
2781
  ).optional(),
2649
2782
  supportingCopy: TranslationConfig.optional().describe(
2650
2783
  "Text displayed on the confirmation"
2651
2784
  ),
2652
- conditionals: z20.array(ActionConditional).optional().describe("Conditionals which can disable or hide actions.")
2785
+ icon: AvailableIcons.describe("Icon representing the action").optional(),
2786
+ conditionals: z21.array(ActionConditional).optional().describe("Conditionals which can disable or hide actions.")
2653
2787
  });
2654
2788
  var DeclarationActionBase = ActionConfigBase.extend({
2655
2789
  deduplication: DeduplicationConfig.optional()
2656
2790
  });
2657
2791
  var ReadActionConfig = ActionConfigBase.extend(
2658
- z20.object({
2659
- type: z20.literal(ActionType.READ),
2792
+ z21.object({
2793
+ type: z21.literal(ActionType.READ),
2660
2794
  review: DeclarationReviewConfig.describe(
2661
2795
  "Configuration of the review page for read-only view."
2662
2796
  ),
2663
- conditionals: z20.never().optional().describe("Read-action can not be disabled or hidden with conditionals.")
2797
+ conditionals: z21.never().optional().describe("Read-action can not be disabled or hidden with conditionals.")
2664
2798
  }).shape
2665
2799
  );
2666
2800
  var DeclareConfig = DeclarationActionBase.extend(
2667
- z20.object({
2668
- type: z20.literal(ActionType.DECLARE),
2801
+ z21.object({
2802
+ type: z21.literal(ActionType.DECLARE),
2669
2803
  review: DeclarationReviewConfig.describe(
2670
2804
  "Configuration of the review page fields."
2671
2805
  )
2672
2806
  }).shape
2673
2807
  );
2674
2808
  var RejectConfig = ActionConfigBase.extend(
2675
- z20.object({
2676
- type: z20.literal(ActionType.REJECT)
2809
+ z21.object({
2810
+ type: z21.literal(ActionType.REJECT)
2677
2811
  }).shape
2678
2812
  );
2679
2813
  var ValidateConfig = DeclarationActionBase.extend(
2680
- z20.object({
2681
- type: z20.literal(ActionType.VALIDATE)
2814
+ z21.object({
2815
+ type: z21.literal(ActionType.VALIDATE)
2682
2816
  }).shape
2683
2817
  );
2684
2818
  var RegisterConfig = DeclarationActionBase.extend(
2685
- z20.object({
2686
- type: z20.literal(ActionType.REGISTER)
2819
+ z21.object({
2820
+ type: z21.literal(ActionType.REGISTER)
2687
2821
  }).shape
2688
2822
  );
2689
2823
  var PrintCertificateActionConfig = ActionConfigBase.extend(
2690
- z20.object({
2691
- type: z20.literal(ActionType.PRINT_CERTIFICATE),
2824
+ z21.object({
2825
+ type: z21.literal(ActionType.PRINT_CERTIFICATE),
2692
2826
  printForm: ActionFormConfig
2693
2827
  }).shape
2694
2828
  );
2695
2829
  var RequestCorrectionConfig = ActionConfigBase.extend(
2696
- z20.object({
2697
- type: z20.literal(ActionType.REQUEST_CORRECTION),
2830
+ z21.object({
2831
+ type: z21.literal(ActionType.REQUEST_CORRECTION),
2698
2832
  correctionForm: ActionFormConfig
2699
2833
  }).shape
2700
2834
  );
2701
2835
  var CustomActionConfig = ActionConfigBase.merge(
2702
- z20.object({
2703
- type: z20.literal(ActionType.CUSTOM),
2704
- customActionType: z20.string().describe("Type identifier of the custom action."),
2836
+ z21.object({
2837
+ type: z21.literal(ActionType.CUSTOM),
2838
+ customActionType: z21.string().describe("Type identifier of the custom action."),
2705
2839
  /** Custom action form configuration supports a simple array of field configs, which should be rendered on the action modal. In the future, we might add support for pages etc. */
2706
- form: z20.array(FieldConfig).describe(
2840
+ form: z21.array(FieldConfig).describe(
2707
2841
  "Form configuration for the custom action. The form configured here will be used on the custom action confirmation modal."
2708
2842
  )
2709
2843
  })
2710
2844
  );
2711
- var ActionConfig = z20.discriminatedUnion("type", [
2845
+ var ActionConfig = z21.discriminatedUnion("type", [
2712
2846
  /*
2713
2847
  * OpenAPI references are defined here so our generated OpenAPI spec knows to reuse the models
2714
2848
  * and treat them as "models" instead of duplicating the data structure in each endpoint.
@@ -2729,87 +2863,87 @@ var ActionConfig = z20.discriminatedUnion("type", [
2729
2863
  var actionConfigTypes = new Set(
2730
2864
  ActionConfig.options.map((opt) => opt.shape.type.value)
2731
2865
  );
2732
- var DeclarationActionConfig = z20.discriminatedUnion("type", [
2866
+ var DeclarationActionConfig = z21.discriminatedUnion("type", [
2733
2867
  DeclareConfig,
2734
2868
  ValidateConfig,
2735
2869
  RegisterConfig
2736
2870
  ]);
2737
2871
 
2738
2872
  // ../commons/src/events/offline/CertificateConfig.ts
2739
- var z21 = __toESM(require("zod/v4"));
2740
- var FontFamily = z21.object({
2741
- normal: z21.string(),
2742
- bold: z21.string(),
2743
- italics: z21.string(),
2744
- bolditalics: z21.string()
2873
+ var z22 = __toESM(require("zod/v4"));
2874
+ var FontFamily = z22.object({
2875
+ normal: z22.string(),
2876
+ bold: z22.string(),
2877
+ italics: z22.string(),
2878
+ bolditalics: z22.string()
2745
2879
  });
2746
- var CertificateConfig = z21.object({
2747
- id: z21.string(),
2748
- event: z21.string(),
2749
- isV2Template: z21.boolean().optional(),
2880
+ var CertificateConfig = z22.object({
2881
+ id: z22.string(),
2882
+ event: z22.string(),
2883
+ isV2Template: z22.boolean().optional(),
2750
2884
  label: TranslationConfig,
2751
- isDefault: z21.boolean(),
2752
- fee: z21.object({
2753
- onTime: z21.number(),
2754
- late: z21.number(),
2755
- delayed: z21.number()
2885
+ isDefault: z22.boolean(),
2886
+ fee: z22.object({
2887
+ onTime: z22.number(),
2888
+ late: z22.number(),
2889
+ delayed: z22.number()
2756
2890
  }),
2757
- svgUrl: z21.string(),
2758
- fonts: z21.record(z21.string(), FontFamily).optional(),
2759
- conditionals: z21.array(ShowConditional).optional()
2891
+ svgUrl: z22.string(),
2892
+ fonts: z22.record(z22.string(), FontFamily).optional(),
2893
+ conditionals: z22.array(ShowConditional).optional()
2760
2894
  });
2761
2895
  var CertificateTemplateConfig = CertificateConfig.extend({
2762
- hash: z21.string().optional(),
2763
- svg: z21.string()
2896
+ hash: z22.string().optional(),
2897
+ svg: z22.string()
2764
2898
  });
2765
2899
 
2766
2900
  // ../commons/src/events/offline/LanguageConfig.ts
2767
- var z22 = __toESM(require("zod/v4"));
2768
- var LanguageConfig = z22.object({
2769
- lang: z22.string(),
2901
+ var z23 = __toESM(require("zod/v4"));
2902
+ var LanguageConfig = z23.object({
2903
+ lang: z23.string(),
2770
2904
  /**
2771
2905
  * client.csv contents
2772
2906
  */
2773
- messages: z22.record(z22.string(), z22.string())
2907
+ messages: z23.record(z23.string(), z23.string())
2774
2908
  });
2775
2909
 
2776
2910
  // ../commons/src/events/EventConfig.ts
2777
- var z28 = __toESM(require("zod/v4"));
2911
+ var z29 = __toESM(require("zod/v4"));
2778
2912
 
2779
2913
  // ../commons/src/events/SummaryConfig.ts
2780
- var z23 = __toESM(require("zod/v4"));
2781
- var BaseField2 = z23.object({
2914
+ var z24 = __toESM(require("zod/v4"));
2915
+ var BaseField2 = z24.object({
2782
2916
  emptyValueMessage: TranslationConfig.optional().describe(
2783
2917
  "Default message displayed when the field value is empty."
2784
2918
  ),
2785
- conditionals: z23.array(ShowConditional).default([]).optional()
2919
+ conditionals: z24.array(ShowConditional).default([]).optional()
2786
2920
  });
2787
2921
  var ReferenceField = BaseField2.extend({
2788
- fieldId: z23.string(),
2922
+ fieldId: z24.string(),
2789
2923
  label: TranslationConfig.optional().describe(
2790
2924
  "Overrides the default label from the referenced field when provided."
2791
2925
  )
2792
2926
  }).describe("Field referencing existing event data by field ID.");
2793
2927
  var Field = BaseField2.extend({
2794
- id: z23.string().describe("Identifier of the summary field."),
2928
+ id: z24.string().describe("Identifier of the summary field."),
2795
2929
  value: TranslationConfig.describe(
2796
2930
  'Field value template supporting variables from configuration and EventMetadata (e.g. "{informant.phoneNo} {informant.email}").'
2797
2931
  ),
2798
2932
  label: TranslationConfig
2799
2933
  }).describe("Custom field defined for the summary view.");
2800
- var SummaryConfig = z23.object({
2801
- fields: z23.array(z23.union([Field, ReferenceField])).describe("Fields displayed in the event summary view.")
2934
+ var SummaryConfig = z24.object({
2935
+ fields: z24.array(z24.union([Field, ReferenceField])).describe("Fields displayed in the event summary view.")
2802
2936
  }).describe("Configuration of the event summary section.");
2803
2937
 
2804
2938
  // ../commons/src/events/AdvancedSearchConfig.ts
2805
- var z24 = __toESM(require("zod/v4"));
2806
- var MatchType = z24.enum(["fuzzy", "exact", "range", "within"]);
2807
- var BaseField3 = z24.object({
2808
- config: z24.object({
2939
+ var z25 = __toESM(require("zod/v4"));
2940
+ var MatchType = z25.enum(["fuzzy", "exact", "range", "within"]);
2941
+ var BaseField3 = z25.object({
2942
+ config: z25.object({
2809
2943
  type: MatchType.describe(
2810
2944
  "Determines the search type of field. How to match value."
2811
2945
  ),
2812
- searchFields: z24.array(z24.string()).optional().describe(
2946
+ searchFields: z25.array(z25.string()).optional().describe(
2813
2947
  `
2814
2948
  Defines multiple form fields that should be searched when this field has a value.
2815
2949
  All specified fields will be combined using OR logic.
@@ -2819,7 +2953,7 @@ var BaseField3 = z24.object({
2819
2953
  `
2820
2954
  )
2821
2955
  }),
2822
- type: z24.nativeEnum(FieldType).optional().describe(
2956
+ type: z25.nativeEnum(FieldType).optional().describe(
2823
2957
  `
2824
2958
  Explicitly specify the field type for searchFields.
2825
2959
  This is required when searchFields is defined, to show the correct control in the UI.
@@ -2833,7 +2967,7 @@ var BaseField3 = z24.object({
2833
2967
  This is required when searchFields is defined.
2834
2968
  `
2835
2969
  ),
2836
- options: z24.array(SelectOption).optional(),
2970
+ options: z25.array(SelectOption).optional(),
2837
2971
  searchCriteriaLabelPrefix: TranslationConfig.optional().describe(
2838
2972
  `
2839
2973
  This property determines whether to add a prefix (such as "Child" or "Applicant") before the field label
@@ -2854,7 +2988,7 @@ var BaseField3 = z24.object({
2854
2988
  in the country-config > event.advancedSearch configuration. For example: field("child.dob", { searchCriteriaLabelPrefix: TranslationConfig }).
2855
2989
  `
2856
2990
  ),
2857
- conditionals: z24.array(FieldConditional).optional().describe(
2991
+ conditionals: z25.array(FieldConditional).optional().describe(
2858
2992
  `
2859
2993
  In advanced search, we sometimes need to override the default field visibility conditionals.
2860
2994
 
@@ -2868,59 +3002,61 @@ var BaseField3 = z24.object({
2868
3002
  are always rendered in the advanced search form.
2869
3003
  `
2870
3004
  ),
2871
- validations: z24.array(ValidationConfig).optional().describe(
3005
+ validations: z25.array(ValidationConfig).optional().describe(
2872
3006
  `Option for overriding the field validations specifically for advanced search form.`
2873
3007
  )
2874
3008
  });
2875
- var SearchQueryParams = z24.object({
2876
- eventType: z24.string().optional().describe(
3009
+ var SearchQueryParams = z25.object({
3010
+ eventType: z25.string().optional().describe(
2877
3011
  "Defines type of event so that when redirecting to Advanced Search page, appropriate tab can be selected"
2878
3012
  )
2879
3013
  }).catchall(FieldValue);
2880
3014
  var FieldConfigSchema = BaseField3.extend({
2881
- fieldId: z24.string(),
2882
- fieldType: z24.literal("field")
3015
+ fieldId: z25.string(),
3016
+ fieldType: z25.literal("field")
2883
3017
  });
2884
- var EventFieldIdInput = z24.enum([
3018
+ var EventFieldIdInput = z25.enum([
2885
3019
  "trackingId",
2886
3020
  "status",
2887
3021
  "legalStatuses.REGISTERED.acceptedAt",
2888
3022
  "legalStatuses.REGISTERED.createdAtLocation",
3023
+ "legalStatuses.REGISTERED.registrationNumber",
2889
3024
  "updatedAt"
2890
3025
  ]);
2891
3026
  var METADATA_FIELD_PREFIX = "event.";
2892
- var EventFieldId = z24.enum([
3027
+ var EventFieldId = z25.enum([
2893
3028
  `${METADATA_FIELD_PREFIX}trackingId`,
2894
3029
  `${METADATA_FIELD_PREFIX}status`,
2895
3030
  `${METADATA_FIELD_PREFIX}legalStatuses.REGISTERED.acceptedAt`,
2896
3031
  `${METADATA_FIELD_PREFIX}legalStatuses.REGISTERED.createdAtLocation`,
3032
+ `${METADATA_FIELD_PREFIX}legalStatuses.REGISTERED.registrationNumber`,
2897
3033
  `${METADATA_FIELD_PREFIX}updatedAt`
2898
3034
  ]);
2899
3035
  var EventFieldConfigSchema = BaseField3.extend({
2900
3036
  fieldId: EventFieldId,
2901
- fieldType: z24.literal("event")
3037
+ fieldType: z25.literal("event")
2902
3038
  });
2903
- var AdvancedSearchField = z24.discriminatedUnion("fieldType", [FieldConfigSchema, EventFieldConfigSchema]).superRefine((data, ctx) => {
3039
+ var AdvancedSearchField = z25.discriminatedUnion("fieldType", [FieldConfigSchema, EventFieldConfigSchema]).superRefine((data, ctx) => {
2904
3040
  if (data.config.searchFields && data.config.searchFields.length > 0) {
2905
3041
  if (!data.label) {
2906
3042
  ctx.addIssue({
2907
- code: z24.ZodIssueCode.custom,
3043
+ code: z25.ZodIssueCode.custom,
2908
3044
  message: "label is required when config.searchFields is defined.",
2909
3045
  path: ["label"]
2910
3046
  });
2911
3047
  }
2912
3048
  if (!data.type) {
2913
3049
  ctx.addIssue({
2914
- code: z24.ZodIssueCode.custom,
3050
+ code: z25.ZodIssueCode.custom,
2915
3051
  message: "type is required when config.searchFields is defined.",
2916
3052
  path: ["type"]
2917
3053
  });
2918
3054
  }
2919
3055
  }
2920
3056
  });
2921
- var AdvancedSearchConfig = z24.object({
3057
+ var AdvancedSearchConfig = z25.object({
2922
3058
  title: TranslationConfig.describe("Advanced search tab title"),
2923
- fields: z24.array(AdvancedSearchField).describe("Advanced search fields within the tab.")
3059
+ fields: z25.array(AdvancedSearchField).describe("Advanced search fields within the tab.")
2924
3060
  });
2925
3061
 
2926
3062
  // ../commons/src/events/utils.ts
@@ -2929,14 +3065,14 @@ var import_lodash = require("lodash");
2929
3065
  // ../commons/src/conditionals/validate.ts
2930
3066
  var import__ = __toESM(require("ajv/dist/2019"));
2931
3067
  var import_ajv_formats = __toESM(require("ajv-formats"));
2932
- var z26 = __toESM(require("zod/v4"));
3068
+ var z27 = __toESM(require("zod/v4"));
2933
3069
  var import_date_fns = require("date-fns");
2934
3070
 
2935
3071
  // ../commons/src/events/DynamicFieldValue.ts
2936
- var z25 = __toESM(require("zod/v4"));
3072
+ var z26 = __toESM(require("zod/v4"));
2937
3073
  function getDynamicNameValue(field3) {
2938
3074
  const nameConfiguration = field3.configuration?.name;
2939
- return z25.object({
3075
+ return z26.object({
2940
3076
  firstname: nameConfiguration?.firstname?.required ? NonEmptyTextValue : TextValue,
2941
3077
  surname: nameConfiguration?.surname?.required ? NonEmptyTextValue : TextValue,
2942
3078
  middlename: nameConfiguration?.middlename?.required ? NonEmptyTextValue : TextValue.optional()
@@ -3002,6 +3138,7 @@ function mapFieldTypeToZod(field3, actionType) {
3002
3138
  case FieldType.VERIFICATION_STATUS:
3003
3139
  case FieldType.ID:
3004
3140
  case FieldType.LOADER:
3141
+ case FieldType.HIDDEN:
3005
3142
  schema = field3.required ? NonEmptyTextValue : TextValue;
3006
3143
  break;
3007
3144
  case FieldType.NUMBER:
@@ -3085,6 +3222,7 @@ function mapFieldTypeToEmptyValue(field3) {
3085
3222
  case FieldType.QR_READER:
3086
3223
  case FieldType.ID_READER:
3087
3224
  case FieldType.LOADER:
3225
+ case FieldType.HIDDEN:
3088
3226
  return null;
3089
3227
  case FieldType.ADDRESS:
3090
3228
  return {
@@ -3221,6 +3359,9 @@ var isIdReaderFieldType = (field3) => {
3221
3359
  var isLoaderFieldType = (field3) => {
3222
3360
  return field3.config.type === FieldType.LOADER;
3223
3361
  };
3362
+ var isHiddenFieldType = (field3) => {
3363
+ return field3.config.type === FieldType.HIDDEN;
3364
+ };
3224
3365
  var isNonInteractiveFieldType = (field3) => {
3225
3366
  return field3.type === FieldType.DIVIDER || field3.type === FieldType.PAGE_HEADER || field3.type === FieldType.PARAGRAPH || field3.type === FieldType.BULLET_LIST || field3.type === FieldType.DATA || field3.type === FieldType.ALPHA_PRINT_BUTTON || field3.type === FieldType.HTTP || field3.type === FieldType.LINK_BUTTON || field3.type === FieldType.QUERY_PARAM_READER || field3.type === FieldType.LOADER;
3226
3367
  };
@@ -3232,9 +3373,9 @@ var ajv = new import__.default({
3232
3373
  strict: false
3233
3374
  // Allow minContains and other newer features
3234
3375
  });
3235
- var DataContext = z26.object({
3236
- rootData: z26.object({
3237
- $leafAdminStructureLocationIds: z26.array(z26.object({ id: UUID }))
3376
+ var DataContext = z27.object({
3377
+ rootData: z27.object({
3378
+ $leafAdminStructureLocationIds: z27.array(z27.object({ id: UUID }))
3238
3379
  })
3239
3380
  });
3240
3381
  (0, import_ajv_formats.default)(ajv);
@@ -3605,7 +3746,7 @@ function areCertificateConditionsMet(conditions, values) {
3605
3746
  }
3606
3747
 
3607
3748
  // ../commons/src/utils.ts
3608
- var z27 = __toESM(require("zod/v4"));
3749
+ var z28 = __toESM(require("zod/v4"));
3609
3750
  function getOrThrow(x, message) {
3610
3751
  if (x === void 0 || x === null) {
3611
3752
  throw new Error(message);
@@ -3615,11 +3756,11 @@ function getOrThrow(x, message) {
3615
3756
  function joinValues(values, separator = " ") {
3616
3757
  return values.filter((value) => !!value).join(separator).trim();
3617
3758
  }
3618
- var FullNameV1 = z27.array(
3619
- z27.object({
3620
- use: z27.string(),
3621
- family: z27.string(),
3622
- given: z27.array(z27.string())
3759
+ var FullNameV1 = z28.array(
3760
+ z28.object({
3761
+ use: z28.string(),
3762
+ family: z28.string(),
3763
+ given: z28.array(z28.string())
3623
3764
  })
3624
3765
  );
3625
3766
  function omitKeyDeep(obj, keyToRemove) {
@@ -3995,15 +4136,23 @@ function aggregateActionDeclarations(event2) {
3995
4136
  return getCompleteActionDeclaration(declaration, event2, action);
3996
4137
  }, {});
3997
4138
  }
4139
+ function aggregateActionAnnotations(actions) {
4140
+ return actions.reduce((ann, sortedAction) => {
4141
+ return deepMerge(ann, sortedAction.annotation ?? {});
4142
+ }, {});
4143
+ }
3998
4144
 
3999
4145
  // ../commons/src/events/EventConfig.ts
4000
- var EventConfig = z28.object({
4001
- id: z28.string().describe(
4146
+ var EventConfig = z29.object({
4147
+ id: z29.string().describe(
4002
4148
  'Machine-readable identifier of the event (e.g. "birth", "death").'
4003
4149
  ),
4004
4150
  dateOfEvent: FieldReference.optional().describe(
4005
4151
  "Reference to the field capturing the date of the event (e.g. date of birth). Defaults to the event creation date if unspecified."
4006
4152
  ),
4153
+ placeOfEvent: FieldReference.optional().describe(
4154
+ "Reference to the field capturing the place of the event (e.g. place of birth). Defaults to the meta.createdAtLocation if unspecified."
4155
+ ),
4007
4156
  title: TranslationConfig.describe(
4008
4157
  'Title template for the singular event, supporting variables (e.g. "{applicant.name.firstname} {applicant.name.surname}").'
4009
4158
  ),
@@ -4016,16 +4165,16 @@ var EventConfig = z28.object({
4016
4165
  label: TranslationConfig.describe(
4017
4166
  "Human-readable label for the event type."
4018
4167
  ),
4019
- actions: z28.array(ActionConfig).describe(
4168
+ actions: z29.array(ActionConfig).describe(
4020
4169
  "Configuration of system-defined actions associated with the event."
4021
4170
  ),
4022
4171
  declaration: DeclarationFormConfig.describe(
4023
4172
  "Configuration of the form used to gather event data."
4024
4173
  ),
4025
- advancedSearch: z28.array(AdvancedSearchConfig).optional().default([]).describe(
4174
+ advancedSearch: z29.array(AdvancedSearchConfig).optional().default([]).describe(
4026
4175
  "Configuration of fields available in the advanced search feature."
4027
4176
  ),
4028
- flags: z28.array(FlagConfig).optional().default([]).describe(
4177
+ flags: z29.array(FlagConfig).optional().default([]).describe(
4029
4178
  "Configuration of flags associated with the actions of this event type."
4030
4179
  )
4031
4180
  }).superRefine((event2, ctx) => {
@@ -4078,15 +4227,31 @@ var EventConfig = z28.object({
4078
4227
  });
4079
4228
  }
4080
4229
  }
4230
+ if (event2.placeOfEvent) {
4231
+ const eventPlaceFieldId = getDeclarationFields(event2).find(
4232
+ ({ id }) => id === event2.placeOfEvent?.$$field
4233
+ );
4234
+ if (!eventPlaceFieldId) {
4235
+ ctx.addIssue({
4236
+ code: "custom",
4237
+ message: `Place of event field id must match a field id in the event.declaration fields.
4238
+ Invalid place of event field ID for event ${event2.id}: ${event2.placeOfEvent.$$field}`,
4239
+ path: ["placeOfEvent"]
4240
+ });
4241
+ }
4242
+ }
4243
+ const isInherentFlag = (value) => Object.values(InherentFlags).includes(value);
4081
4244
  const configuredFlagIds = event2.flags.map((flag2) => flag2.id);
4082
4245
  const actionFlagIds = event2.actions.flatMap(
4083
4246
  (action) => action.flags.map((flag2) => flag2.id)
4084
4247
  );
4085
4248
  for (const actionFlagId of actionFlagIds) {
4086
- if (!configuredFlagIds.includes(actionFlagId)) {
4249
+ const isConfigured = configuredFlagIds.includes(actionFlagId);
4250
+ const isInherent = isInherentFlag(actionFlagId);
4251
+ if (!isConfigured && !isInherent) {
4087
4252
  ctx.addIssue({
4088
4253
  code: "custom",
4089
- message: `Action flag id must match a configured flag in the flags array. Invalid action flag ID for event '${event2.id}': '${actionFlagId}'`,
4254
+ message: `Action flag id must match an inherent flag or a configured flag in the flags array. Invalid action flag ID for event '${event2.id}': '${actionFlagId}'`,
4090
4255
  path: ["actions"]
4091
4256
  });
4092
4257
  }
@@ -4823,17 +4988,17 @@ var event = Object.assign(eventFn, {
4823
4988
  });
4824
4989
 
4825
4990
  // ../commons/src/events/WorkqueueColumnConfig.ts
4826
- var z29 = __toESM(require("zod/v4"));
4991
+ var z30 = __toESM(require("zod/v4"));
4827
4992
  var WorkqueueColumnKeysArray = [
4828
4993
  ...EventMetadataKeysArray,
4829
4994
  "title",
4830
4995
  "outbox"
4831
4996
  ];
4832
- var WorkqueueColumnKeys = z29.enum(WorkqueueColumnKeysArray);
4833
- var WorkqueueColumnValue = z29.object({
4997
+ var WorkqueueColumnKeys = z30.enum(WorkqueueColumnKeysArray);
4998
+ var WorkqueueColumnValue = z30.object({
4834
4999
  $event: WorkqueueColumnKeys
4835
5000
  });
4836
- var WorkqueueColumn = z29.object({
5001
+ var WorkqueueColumn = z30.object({
4837
5002
  label: TranslationConfig,
4838
5003
  value: WorkqueueColumnValue
4839
5004
  });
@@ -4844,158 +5009,54 @@ function defineWorkqueuesColumns(workqueueColumns) {
4844
5009
  }
4845
5010
 
4846
5011
  // ../commons/src/events/CountryConfigQueryInput.ts
4847
- var z30 = __toESM(require("zod/v4"));
4848
- var SerializableExact = z30.object({
4849
- type: z30.literal("exact"),
4850
- term: z30.union([z30.string(), SerializedUserField])
5012
+ var z31 = __toESM(require("zod/v4"));
5013
+ var SerializableExact = z31.object({
5014
+ type: z31.literal("exact"),
5015
+ term: z31.union([z31.string(), SerializedUserField])
4851
5016
  });
4852
- var SerializableWithin = z30.object({
4853
- type: z30.literal("within"),
4854
- location: z30.union([z30.string(), SerializedUserField])
5017
+ var SerializableWithin = z31.object({
5018
+ type: z31.literal("within"),
5019
+ location: z31.union([z31.string(), SerializedUserField])
4855
5020
  });
4856
- var SerializedQueryExpression = z30.object({
4857
- eventType: z30.string(),
4858
- status: z30.optional(z30.union([AnyOfStatus, ExactStatus])),
4859
- createdAt: z30.optional(DateCondition),
4860
- updatedAt: z30.optional(DateCondition),
4861
- "legalStatuses.REGISTERED.createdAt": z30.optional(DateCondition),
4862
- "legalStatuses.REGISTERED.createdAtLocation": z30.optional(
4863
- z30.union([Within, Exact])
5021
+ var SerializedQueryExpression = z31.object({
5022
+ eventType: z31.string(),
5023
+ status: z31.optional(z31.union([AnyOfStatus, ExactStatus])),
5024
+ createdAt: z31.optional(DateCondition),
5025
+ updatedAt: z31.optional(DateCondition),
5026
+ "legalStatuses.REGISTERED.createdAt": z31.optional(DateCondition),
5027
+ "legalStatuses.REGISTERED.createdAtLocation": z31.optional(
5028
+ z31.union([Within, Exact])
4864
5029
  ),
4865
- "legalStatuses.REGISTERED.registrationNumber": z30.optional(Exact),
4866
- createdAtLocation: z30.optional(
4867
- z30.union([SerializableWithin, SerializableExact])
5030
+ "legalStatuses.REGISTERED.registrationNumber": z31.optional(Exact),
5031
+ createdAtLocation: z31.optional(
5032
+ z31.union([SerializableWithin, SerializableExact])
4868
5033
  ),
4869
- updatedAtLocation: z30.optional(
4870
- z30.union([SerializableWithin, SerializableExact])
5034
+ updatedAtLocation: z31.optional(
5035
+ z31.union([SerializableWithin, SerializableExact])
4871
5036
  ),
4872
- assignedTo: z30.optional(SerializableExact),
4873
- createdBy: z30.optional(SerializableExact),
5037
+ assignedTo: z31.optional(SerializableExact),
5038
+ createdBy: z31.optional(SerializableExact),
4874
5039
  createdByUserType: ExactUserType,
4875
- updatedBy: z30.optional(SerializableExact),
4876
- trackingId: z30.optional(Exact),
4877
- flags: z30.optional(ContainsFlags),
5040
+ updatedBy: z31.optional(SerializableExact),
5041
+ trackingId: z31.optional(Exact),
5042
+ flags: z31.optional(ContainsFlags),
4878
5043
  data: QueryInput
4879
5044
  }).partial();
4880
- var Or2 = z30.object({
4881
- type: z30.literal("or"),
4882
- clauses: z30.array(SerializedQueryExpression)
5045
+ var Or2 = z31.object({
5046
+ type: z31.literal("or"),
5047
+ clauses: z31.array(SerializedQueryExpression)
4883
5048
  });
4884
- var And2 = z30.object({
4885
- type: z30.literal("and"),
4886
- clauses: z30.array(SerializedQueryExpression)
5049
+ var And2 = z31.object({
5050
+ type: z31.literal("and"),
5051
+ clauses: z31.array(SerializedQueryExpression)
4887
5052
  });
4888
- var CountryConfigQueryType = z30.discriminatedUnion("type", [And2, Or2]);
4889
- var CountryConfigQueryInputType = z30.union([
5053
+ var CountryConfigQueryType = z31.discriminatedUnion("type", [And2, Or2]);
5054
+ var CountryConfigQueryInputType = z31.union([
4890
5055
  SerializedQueryExpression,
4891
5056
  And2,
4892
5057
  Or2
4893
5058
  ]);
4894
5059
 
4895
- // ../commons/src/icons.ts
4896
- var z31 = __toESM(require("zod/v4"));
4897
- var AvailableIcons = z31.enum([
4898
- "Archived",
4899
- "Assigned",
4900
- "Certified",
4901
- "Close",
4902
- "Collapse",
4903
- "Draft",
4904
- "DuplicateYellow",
4905
- "Expand",
4906
- "ExternalValidate",
4907
- "FilledCheck",
4908
- "InReview",
4909
- "Offline",
4910
- "Registered",
4911
- "RequiresUpdates",
4912
- "Sent",
4913
- "Validated",
4914
- "WaitingApproval",
4915
- "ChartActivity",
4916
- "Activity",
4917
- "Archive",
4918
- "ArchiveTray",
4919
- "ArrowLeft",
4920
- "ArrowRight",
4921
- "Buildings",
4922
- "Circle",
4923
- "CaretDown",
4924
- "CaretLeft",
4925
- "CaretRight",
4926
- "ChartBar",
4927
- "ChartLine",
4928
- "ChatCircle",
4929
- "CheckSquare",
4930
- "Compass",
4931
- "Check",
4932
- "Copy",
4933
- "Database",
4934
- "DotsThreeVertical",
4935
- "ArrowCounterClockwise",
4936
- "MagnifyingGlassMinus",
4937
- "MagnifyingGlassPlus",
4938
- "Export",
4939
- "Eye",
4940
- "EyeSlash",
4941
- "Envelope",
4942
- "File",
4943
- "FileSearch",
4944
- "FileMinus",
4945
- "FilePlus",
4946
- "FileText",
4947
- "FileX",
4948
- "Handshake",
4949
- "Gear",
4950
- "GitBranch",
4951
- "IdentificationCard",
4952
- "List",
4953
- "ListBullets",
4954
- "Lock",
4955
- "MagnifyingGlass",
4956
- "MapPin",
4957
- "Medal",
4958
- "NotePencil",
4959
- "Paperclip",
4960
- "PaperPlaneTilt",
4961
- "Pen",
4962
- "Pencil",
4963
- "PencilSimpleLine",
4964
- "Phone",
4965
- "Plus",
4966
- "Printer",
4967
- "SignOut",
4968
- "Star",
4969
- "Target",
4970
- "TextT",
4971
- "Trash",
4972
- "UploadSimple",
4973
- "User",
4974
- "UserPlus",
4975
- "Users",
4976
- "WarningCircle",
4977
- "X",
4978
- "CircleWavyCheck",
4979
- "CircleWavyQuestion",
4980
- "ArchiveBox",
4981
- "ArrowCircleDown",
4982
- "FileArrowUp",
4983
- "FileDotted",
4984
- "Files",
4985
- "PencilLine",
4986
- "PencilCircle",
4987
- "UserCircle",
4988
- "Clock",
4989
- "QrCode",
4990
- "Webcam",
4991
- "Sun",
4992
- "DeviceTabletCamera",
4993
- "Globe",
4994
- "Fingerprint",
4995
- "PushPin",
4996
- "Timer"
4997
- ]);
4998
-
4999
5060
  // ../commons/src/events/WorkqueueConfig.ts
5000
5061
  var mandatoryColumns = defineWorkqueuesColumns([
5001
5062
  {
@@ -5354,7 +5415,8 @@ var updateActions = ActionTypes.extract([
5354
5415
  ActionType.REJECT,
5355
5416
  ActionType.ARCHIVE,
5356
5417
  ActionType.PRINT_CERTIFICATE,
5357
- ActionType.REQUEST_CORRECTION
5418
+ ActionType.REQUEST_CORRECTION,
5419
+ ActionType.CUSTOM
5358
5420
  ]);
5359
5421
  function getActionUpdateMetadata(actions) {
5360
5422
  const createAction = getOrThrow(
@@ -5476,7 +5538,7 @@ function resolveEventCustomFlags(event2, eventConfiguration) {
5476
5538
  actions: actions.slice(0, idx + 1)
5477
5539
  };
5478
5540
  const declaration = aggregateActionDeclarations(eventUpToThisAction);
5479
- const annotation = aggregateActionDeclarations(eventUpToThisAction);
5541
+ const annotation = aggregateActionAnnotations(eventUpToThisAction.actions);
5480
5542
  const form = { ...declaration, ...annotation };
5481
5543
  const flagsWithMetConditions = actionConfig.flags.filter(
5482
5544
  ({ conditional }) => (
@@ -5605,6 +5667,33 @@ function resolveDateOfEvent(eventMetadata, declaration, config) {
5605
5667
  const parsedDate = ZodDate.safeParse(declaration[config.dateOfEvent.$$field]);
5606
5668
  return parsedDate.success ? parsedDate.data : void 0;
5607
5669
  }
5670
+ var DEFAULT_PLACE_OF_EVENT_PROPERTY = "createdAtLocation";
5671
+ function getParsedUUID(value, oldValue) {
5672
+ const parsed = UUID.safeParse(value);
5673
+ return parsed.success ? parsed.data : oldValue;
5674
+ }
5675
+ function resolvePlaceOfEvent(eventMetadata, declaration, config) {
5676
+ let placeOfEvent = getParsedUUID(
5677
+ eventMetadata[DEFAULT_PLACE_OF_EVENT_PROPERTY]
5678
+ );
5679
+ if (config.placeOfEvent) {
5680
+ const addressFieldValue = AddressFieldValue.safeParse(
5681
+ declaration[config.placeOfEvent.$$field]
5682
+ );
5683
+ if (addressFieldValue.success && addressFieldValue.data.addressType === AddressType.DOMESTIC && addressFieldValue.data.administrativeArea) {
5684
+ placeOfEvent = getParsedUUID(
5685
+ addressFieldValue.data.administrativeArea,
5686
+ placeOfEvent
5687
+ );
5688
+ } else {
5689
+ placeOfEvent = getParsedUUID(
5690
+ declaration[config.placeOfEvent.$$field],
5691
+ placeOfEvent
5692
+ );
5693
+ }
5694
+ }
5695
+ return placeOfEvent;
5696
+ }
5608
5697
  function extractPotentialDuplicatesFromActions(actions) {
5609
5698
  return actions.reduce((duplicates, action) => {
5610
5699
  if (action.type === ActionType.DUPLICATE_DETECTED) {
@@ -5649,6 +5738,11 @@ function getCurrentEventState(event2, config) {
5649
5738
  trackingId: event2.trackingId,
5650
5739
  updatedByUserRole: requestActionMetadata.createdByRole,
5651
5740
  dateOfEvent: resolveDateOfEvent(event2, declaration, config),
5741
+ placeOfEvent: resolvePlaceOfEvent(
5742
+ { createdAtLocation: creationAction.createdAtLocation },
5743
+ declaration,
5744
+ config
5745
+ ),
5652
5746
  potentialDuplicates: extractPotentialDuplicatesFromActions(sortedActions),
5653
5747
  flags: getEventFlags(event2, config)
5654
5748
  });
@@ -5693,6 +5787,11 @@ function applyDeclarationToEventIndex(eventIndex, declaration, eventConfiguratio
5693
5787
  updatedDeclaration,
5694
5788
  eventConfiguration
5695
5789
  ),
5790
+ placeOfEvent: resolvePlaceOfEvent(
5791
+ eventIndex,
5792
+ updatedDeclaration,
5793
+ eventConfiguration
5794
+ ),
5696
5795
  declaration: updatedDeclaration
5697
5796
  };
5698
5797
  }
@@ -8000,6 +8099,7 @@ function mapFieldTypeToMockValue(field3, i, rng) {
8000
8099
  case FieldType.OFFICE:
8001
8100
  case FieldType.LINK_BUTTON:
8002
8101
  case FieldType.LOADER:
8102
+ case FieldType.HIDDEN:
8003
8103
  return `${field3.id}-${field3.type}-${i}`;
8004
8104
  case FieldType.VERIFICATION_STATUS:
8005
8105
  return "verified";