@opencrvs/toolkit 2.1.0-rc.d876831 → 2.1.0-rc.d987aec

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 (81) hide show
  1. package/README.md +2 -12
  2. package/build.sh +9 -1
  3. package/create-countryconfig/index.js +412 -59
  4. package/create-countryconfig/node_modules/.bin/degit +21 -0
  5. package/create-countryconfig/package.json +4 -1
  6. package/dist/application-config/index.js +248 -215
  7. package/dist/authentication/index.d.ts +67 -0
  8. package/dist/authentication/index.d.ts.map +1 -0
  9. package/dist/authentication/index.js +750 -0
  10. package/dist/cli.js +1650 -100
  11. package/dist/commons/api/router.d.ts +407 -50
  12. package/dist/commons/conditionals/conditionals.d.ts +6 -6
  13. package/dist/commons/conditionals/validate.d.ts +7 -3
  14. package/dist/commons/events/ActionDocument.d.ts +4 -4
  15. package/dist/commons/events/ActionInput.d.ts +4 -4
  16. package/dist/commons/events/AdvancedSearchConfig.d.ts +12 -0
  17. package/dist/commons/events/EventDocument.d.ts +470 -2
  18. package/dist/commons/events/EventMetadata.d.ts +1 -11
  19. package/dist/commons/events/EventStatus.d.ts +19 -0
  20. package/dist/commons/events/FieldConfig.d.ts +24 -5
  21. package/dist/commons/events/FieldTypeMapping.d.ts +15 -15
  22. package/dist/commons/events/locations.d.ts +63 -10
  23. package/dist/commons/events/test.utils.d.ts +25 -4
  24. package/dist/commons/events/utils.d.ts +13 -2
  25. package/dist/commons/notification/UserNotifications.d.ts +28 -13
  26. package/dist/commons/notification/dispatch.d.ts +10 -0
  27. package/dist/commons/notification/index.d.ts +1 -0
  28. package/dist/conditionals/index.js +79 -57
  29. package/dist/csv.d.ts +25 -0
  30. package/dist/csv.d.ts.map +1 -0
  31. package/dist/csv.js +120 -0
  32. package/dist/environment/logger.d.ts +3 -0
  33. package/dist/environment/logger.d.ts.map +1 -1
  34. package/dist/environment/manage-users.js +1 -1
  35. package/dist/environment/questions.d.ts.map +1 -1
  36. package/dist/environment/questions.js +20 -14
  37. package/dist/environment/setup-environment.js +26 -6
  38. package/dist/environment/templates.d.ts +0 -1
  39. package/dist/environment/templates.d.ts.map +1 -1
  40. package/dist/environment/templates.js +3 -8
  41. package/dist/events/index.js +2632 -2481
  42. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +2 -2
  43. package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -1
  44. package/dist/migrations/v2.0/checkout-upstream-files.js +2 -2
  45. package/dist/migrations/v2.1/add-recovery-link-notifications.d.ts +3 -0
  46. package/dist/migrations/v2.1/add-recovery-link-notifications.d.ts.map +1 -0
  47. package/dist/migrations/v2.1/add-recovery-link-notifications.js +511 -0
  48. package/dist/migrations/v2.1/add-translations.d.ts +9 -0
  49. package/dist/migrations/v2.1/add-translations.d.ts.map +1 -0
  50. package/dist/migrations/v2.1/add-translations.js +213 -0
  51. package/dist/migrations/v2.1/enable-telemetry.d.ts +3 -0
  52. package/dist/migrations/v2.1/enable-telemetry.d.ts.map +1 -0
  53. package/dist/migrations/v2.1/enable-telemetry.js +438 -0
  54. package/dist/migrations/v2.1/index.d.ts.map +1 -1
  55. package/dist/migrations/v2.1/index.js +1058 -0
  56. package/dist/notification/index.js +1027 -1452
  57. package/dist/scopes/index.d.ts +77 -7
  58. package/dist/scopes/index.js +79 -57
  59. package/dist/telemetry/index.d.ts +45 -0
  60. package/dist/telemetry/index.d.ts.map +1 -0
  61. package/dist/telemetry/index.js +39 -0
  62. package/dist/templates/charts-values/dependencies/values.yaml +2 -0
  63. package/dist/templates/charts-values/opencrvs-services/values.yaml +1 -1
  64. package/dist/templates/charts-values/opentelemetry/values.yaml +22 -0
  65. package/dist/templates/charts-values/traefik/values.yaml +23 -9
  66. package/dist/templates/inventory/inventory.template.yml +1 -3
  67. package/dist/translations/check.d.ts +21 -0
  68. package/dist/translations/check.d.ts.map +1 -0
  69. package/dist/translations/check.js +132 -0
  70. package/dist/verify/endpoints.d.ts +2 -0
  71. package/dist/verify/endpoints.d.ts.map +1 -0
  72. package/dist/verify/endpoints.js +345 -0
  73. package/opencrvs-toolkit-2.1.0-rc.d987aec.tgz +0 -0
  74. package/package.json +9 -4
  75. package/tsconfig.build.json +11 -0
  76. package/tsconfig.build.tsbuildinfo +1 -0
  77. package/tsconfig.json +3 -0
  78. package/dist/templates/inventory/production.example.yml +0 -77
  79. package/dist/templates/inventory/qa.example.yml +0 -48
  80. package/opencrvs-toolkit-2.1.0-rc.d876831.tgz +0 -0
  81. package/tsconfig.tsbuildinfo +0 -1
@@ -42,7 +42,7 @@ __export(application_config_exports, {
42
42
  module.exports = __toCommonJS(application_config_exports);
43
43
 
44
44
  // ../commons/src/application-config.ts
45
- var z20 = __toESM(require("zod/v4"));
45
+ var z21 = __toESM(require("zod/v4"));
46
46
 
47
47
  // ../commons/src/events/FieldConfig.ts
48
48
  var import_v43 = __toESM(require("zod/v4"));
@@ -497,10 +497,10 @@ var SerializedUserField = z9.object({
497
497
  var import_v4 = require("zod/v4");
498
498
 
499
499
  // ../commons/src/events/EventMetadata.ts
500
- var z15 = __toESM(require("zod/v4"));
500
+ var z16 = __toESM(require("zod/v4"));
501
501
 
502
502
  // ../commons/src/events/ActionDocument.ts
503
- var z14 = __toESM(require("zod/v4"));
503
+ var z15 = __toESM(require("zod/v4"));
504
504
 
505
505
  // ../commons/src/events/ActionType.ts
506
506
  var z10 = __toESM(require("zod/v4"));
@@ -612,10 +612,10 @@ var META_ACTIONS = [
612
612
 
613
613
  // ../commons/src/authentication.ts
614
614
  var import_jwt_decode = __toESM(require("jwt-decode"));
615
- var z13 = __toESM(require("zod/v4"));
615
+ var z14 = __toESM(require("zod/v4"));
616
616
 
617
617
  // ../commons/src/scopes.ts
618
- var z12 = __toESM(require("zod/v4"));
618
+ var z13 = __toESM(require("zod/v4"));
619
619
  var qs = __toESM(require("qs"));
620
620
 
621
621
  // ../commons/src/events/ActionStatus.ts
@@ -688,12 +688,22 @@ var ActionFlagConfig = z11.object({
688
688
  description: "Add or remove operation applied to a flag when the parent action is accepted. Optionally gated by a conditional."
689
689
  });
690
690
 
691
+ // ../commons/src/events/EventStatus.ts
692
+ var z12 = __toESM(require("zod/v4"));
693
+ var EventStatus = z12.enum([
694
+ "CREATED",
695
+ "NOTIFIED",
696
+ "DECLARED",
697
+ "REGISTERED",
698
+ "ARCHIVED"
699
+ ]);
700
+
691
701
  // ../commons/src/scopes.ts
692
- var JurisdictionFilter = z12.enum(["administrativeArea", "location", "all"]).describe(
702
+ var JurisdictionFilter = z13.enum(["administrativeArea", "location", "all"]).describe(
693
703
  "Filters based on user jurisdiction relative to their office location in hierarchy."
694
704
  );
695
- var UserFilter = z12.enum(["user"]).describe("Filters based on the user. Limits to self.");
696
- var RecordScopeTypeV2 = z12.enum([
705
+ var UserFilter = z13.enum(["user"]).describe("Filters based on the user. Limits to self.");
706
+ var RecordScopeTypeV2 = z13.enum([
697
707
  "record.search",
698
708
  "record.create",
699
709
  "record.read",
@@ -711,12 +721,17 @@ var RecordScopeTypeV2 = z12.enum([
711
721
  "record.unassign-others",
712
722
  "record.custom-action"
713
723
  ]);
714
- var PlainScopeType = z12.enum([
724
+ var PlainScopeType = z13.enum([
715
725
  // Misc. system scopes
716
726
  "bypassratelimit",
717
727
  "record.reindex",
718
728
  "user.data-seeding",
719
729
  "integration.create",
730
+ // Reading an integration's audit log. Deliberately separate from
731
+ // 'integration.create' so read-only oversight can be granted on its own, and
732
+ // deliberately option-less: system clients have no office and no
733
+ // administrative area, so jurisdiction options would have nothing to bind to.
734
+ "integration.audit.read",
720
735
  "record.import",
721
736
  "config.update-all",
722
737
  "location.edit",
@@ -731,15 +746,21 @@ var PlainScopeType = z12.enum([
731
746
  "record.confirm-registration",
732
747
  "record.reject-registration"
733
748
  ]);
734
- var scopeByEvent = z12.preprocess(
749
+ var scopeByEvent = z13.preprocess(
735
750
  (val) => val === void 0 ? void 0 : [val].flat(),
736
- z12.array(z12.string()).optional()
751
+ z13.array(z13.string()).optional()
737
752
  ).describe("Event type, e.g. birth, death");
738
- var userRole = z12.preprocess(
753
+ var scopeByStatus = z13.preprocess(
754
+ (val) => val === void 0 ? void 0 : [val].flat(),
755
+ z13.array(EventStatus).optional()
756
+ ).describe(
757
+ "Restricts the scope to records currently in one of these statuses."
758
+ );
759
+ var userRole = z13.preprocess(
739
760
  (val) => val === void 0 ? void 0 : [val].flat(),
740
- z12.array(z12.string()).optional()
761
+ z13.array(z13.string()).optional()
741
762
  ).describe("User role, e.g. admin, field agent");
742
- var scopeOptionsPlaceEvent = z12.object({
763
+ var scopeOptionsPlaceEvent = z13.object({
743
764
  event: scopeByEvent,
744
765
  placeOfEvent: JurisdictionFilter.optional()
745
766
  }).describe("Options applicable to all record scopes.");
@@ -747,7 +768,8 @@ var scopeOptionsDeclaredOrNotified = scopeOptionsPlaceEvent.extend({
747
768
  notifiedIn: JurisdictionFilter.optional(),
748
769
  notifiedBy: UserFilter.optional(),
749
770
  declaredIn: JurisdictionFilter.optional(),
750
- declaredBy: UserFilter.optional()
771
+ declaredBy: UserFilter.optional(),
772
+ status: scopeByStatus
751
773
  }).describe("Options applicable to actions that may take place after DECLARE");
752
774
  var AllRecordScopeOptions = scopeOptionsDeclaredOrNotified.extend({
753
775
  registeredIn: JurisdictionFilter.optional(),
@@ -757,31 +779,31 @@ var AllRecordScopeOptions = scopeOptionsDeclaredOrNotified.extend({
757
779
  "Options applicable to actions that may take place after REGISTER, with full filtering capabilities."
758
780
  );
759
781
  var CustomActionScopeOptions = AllRecordScopeOptions.extend({
760
- customActionTypes: z12.preprocess(
782
+ customActionTypes: z13.preprocess(
761
783
  (val) => val === void 0 ? void 0 : [val].flat(),
762
- z12.array(z12.string()).optional()
784
+ z13.array(z13.string()).optional()
763
785
  ).describe("Allowed custom action types")
764
786
  });
765
- var AccessLevelOptions = z12.object({
787
+ var AccessLevelOptions = z13.object({
766
788
  accessLevel: JurisdictionFilter.optional()
767
789
  });
768
790
  var AllUserScopeOptions = AccessLevelOptions.extend({
769
791
  role: userRole.optional()
770
792
  });
771
- var WorkqueueOrDashboardOptions = z12.object({
772
- ids: z12.preprocess(
793
+ var WorkqueueOrDashboardOptions = z13.object({
794
+ ids: z13.preprocess(
773
795
  (val) => val === void 0 ? void 0 : [val].flat(),
774
- z12.array(z12.string())
796
+ z13.array(z13.string())
775
797
  ).describe("Must contain a list of workqueue or dashboard ids.")
776
798
  });
777
- var AllScopeOptions = z12.object({
799
+ var AllScopeOptions = z13.object({
778
800
  ...AllRecordScopeOptions.shape,
779
801
  ...AccessLevelOptions.shape,
780
802
  ...AllUserScopeOptions.shape,
781
803
  ...WorkqueueOrDashboardOptions.shape
782
804
  });
783
805
  var ScopeOptionKey = AllScopeOptions.keyof();
784
- var ResolvedScopeOptionsPlaceEvent = z12.object({
806
+ var ResolvedScopeOptionsPlaceEvent = z13.object({
785
807
  event: scopeByEvent,
786
808
  placeOfEvent: UUID.nullish()
787
809
  }).describe(
@@ -789,15 +811,15 @@ var ResolvedScopeOptionsPlaceEvent = z12.object({
789
811
  );
790
812
  var ResolvedScopeOptionsDeclared = ResolvedScopeOptionsPlaceEvent.extend({
791
813
  notifiedIn: UUID.nullish(),
792
- notifiedBy: z12.string().optional(),
814
+ notifiedBy: z13.string().optional(),
793
815
  declaredIn: UUID.nullish(),
794
- declaredBy: z12.string().optional()
816
+ declaredBy: z13.string().optional()
795
817
  }).describe(
796
818
  "Resolved options applicable to actions that may take place after DECLARE, with location ID and user ID instead of filters."
797
819
  );
798
820
  var ResolvedScopeOptionsFull = ResolvedScopeOptionsDeclared.extend({
799
821
  registeredIn: UUID.nullish(),
800
- registeredBy: z12.string().optional(),
822
+ registeredBy: z13.string().optional(),
801
823
  flags: ContainsFlags.optional()
802
824
  }).describe(
803
825
  "Resolved options applicable to actions that may take place after REGISTER, with full filtering capabilities and location/user IDs instead of filters."
@@ -812,7 +834,6 @@ var ScopesWithDeclaredOptions = RecordScopeTypeV2.extract([
812
834
  "record.reject",
813
835
  "record.archive",
814
836
  "record.unarchive",
815
- "record.review-duplicates",
816
837
  "record.register"
817
838
  ]);
818
839
  var ScopesWithFullOptions = RecordScopeTypeV2.extract([
@@ -820,41 +841,42 @@ var ScopesWithFullOptions = RecordScopeTypeV2.extract([
820
841
  "record.read",
821
842
  "record.request-correction",
822
843
  "record.correct",
823
- "record.unassign-others"
844
+ "record.unassign-others",
845
+ "record.review-duplicates"
824
846
  ]);
825
847
  var ScopeOptionsPrintCertifiedCopies = AllRecordScopeOptions.extend({
826
- templates: z12.preprocess(
848
+ templates: z13.preprocess(
827
849
  (val) => val === void 0 ? void 0 : [val].flat(),
828
- z12.array(z12.string()).optional()
850
+ z13.array(z13.string()).optional()
829
851
  ).describe(
830
852
  "Template IDs for certified copies. Controls which certificate templates are returned to the client via the config service. Certificate printing is a client-side operation \u2014 this option is not validated when the printCertificate action is submitted."
831
853
  )
832
854
  });
833
- var RecordScopeV2 = z12.discriminatedUnion("type", [
834
- z12.object({
855
+ var RecordScopeV2 = z13.discriminatedUnion("type", [
856
+ z13.object({
835
857
  type: ScopesWithPlaceEventOptions,
836
858
  options: scopeOptionsPlaceEvent.optional()
837
859
  }),
838
- z12.object({
860
+ z13.object({
839
861
  type: ScopesWithDeclaredOptions,
840
862
  options: scopeOptionsDeclaredOrNotified.optional()
841
863
  }),
842
- z12.object({
864
+ z13.object({
843
865
  type: ScopesWithFullOptions,
844
866
  options: AllRecordScopeOptions.optional()
845
867
  }),
846
- z12.object({
847
- type: z12.literal("record.custom-action"),
868
+ z13.object({
869
+ type: z13.literal("record.custom-action"),
848
870
  options: CustomActionScopeOptions.optional()
849
871
  }),
850
- z12.object({
851
- type: z12.literal("record.print-certified-copies"),
872
+ z13.object({
873
+ type: z13.literal("record.print-certified-copies"),
852
874
  options: ScopeOptionsPrintCertifiedCopies.optional()
853
875
  })
854
876
  ]).describe(
855
877
  "Scopes used to check user's permission to perform actions on a record."
856
878
  );
857
- var SystemScopeType = z12.enum([
879
+ var SystemScopeType = z13.enum([
858
880
  "organisation.read-locations",
859
881
  "user.read",
860
882
  "user.create",
@@ -868,61 +890,61 @@ var UserScopeType = SystemScopeType.extract([
868
890
  "user.search"
869
891
  ]);
870
892
  var ScopesWithRoleOption = UserScopeType.extract(["user.edit", "user.create"]);
871
- var UserScopeV2 = z12.discriminatedUnion("type", [
872
- z12.object({
893
+ var UserScopeV2 = z13.discriminatedUnion("type", [
894
+ z13.object({
873
895
  type: ScopesWithRoleOption,
874
896
  options: AllUserScopeOptions.optional()
875
897
  }),
876
- z12.object({
898
+ z13.object({
877
899
  type: UserScopeType.extract(["user.read", "user.search"]),
878
900
  options: AccessLevelOptions.optional()
879
901
  })
880
902
  ]);
881
- var ResolvedRecordScopeV2 = z12.discriminatedUnion("type", [
882
- z12.object({
903
+ var ResolvedRecordScopeV2 = z13.discriminatedUnion("type", [
904
+ z13.object({
883
905
  type: ScopesWithPlaceEventOptions,
884
906
  options: ResolvedScopeOptionsPlaceEvent.optional()
885
907
  }),
886
- z12.object({
908
+ z13.object({
887
909
  type: ScopesWithDeclaredOptions,
888
910
  options: ResolvedScopeOptionsDeclared.optional()
889
911
  }),
890
- z12.object({
912
+ z13.object({
891
913
  type: ScopesWithFullOptions,
892
914
  options: ResolvedScopeOptionsFull.optional()
893
915
  }),
894
- z12.object({
895
- type: z12.literal("record.print-certified-copies"),
916
+ z13.object({
917
+ type: z13.literal("record.print-certified-copies"),
896
918
  options: ResolvedScopeOptionsFull.extend({
897
- templates: z12.array(z12.string()).optional()
919
+ templates: z13.array(z13.string()).optional()
898
920
  }).optional()
899
921
  })
900
922
  ]).describe("Resolved scope with location/user IDs instead of filters.");
901
- var Scope = z12.discriminatedUnion("type", [
902
- z12.object({ type: PlainScopeType }),
923
+ var Scope = z13.discriminatedUnion("type", [
924
+ z13.object({ type: PlainScopeType }),
903
925
  ...RecordScopeV2.options,
904
926
  ...UserScopeV2.options,
905
- z12.object({
906
- type: z12.literal("organisation.read-locations"),
927
+ z13.object({
928
+ type: z13.literal("organisation.read-locations"),
907
929
  options: AccessLevelOptions.optional()
908
930
  }),
909
- z12.object({
910
- type: z12.literal("workqueue"),
931
+ z13.object({
932
+ type: z13.literal("workqueue"),
911
933
  options: WorkqueueOrDashboardOptions
912
934
  }),
913
- z12.object({
914
- type: z12.literal("dashboard.view"),
935
+ z13.object({
936
+ type: z13.literal("dashboard.view"),
915
937
  options: WorkqueueOrDashboardOptions
916
938
  })
917
939
  ]);
918
- var ScopeType = z12.enum([
940
+ var ScopeType = z13.enum([
919
941
  ...SystemScopeType.options,
920
942
  ...RecordScopeTypeV2.options,
921
943
  ...PlainScopeType.options,
922
944
  "workqueue",
923
945
  "dashboard.view"
924
946
  ]);
925
- var EncodedScope = z12.string().brand("EncodedScope");
947
+ var EncodedScope = z13.string().brand("EncodedScope");
926
948
  var DEFAULT_SCOPE_OPTIONS = {
927
949
  placeOfEvent: JurisdictionFilter.enum.all,
928
950
  accessLevel: JurisdictionFilter.enum.all,
@@ -932,25 +954,25 @@ var DEFAULT_SCOPE_OPTIONS = {
932
954
  };
933
955
 
934
956
  // ../commons/src/authentication.ts
935
- var TokenUserType = z13.enum(["user", "system"]);
936
- var TokenWithBearer = z13.string().regex(/^Bearer\s/);
957
+ var TokenUserType = z14.enum(["user", "system"]);
958
+ var TokenWithBearer = z14.string().regex(/^Bearer\s/);
937
959
 
938
960
  // ../commons/src/events/ActionDocument.ts
939
- var ActionUpdate = z14.record(z14.string(), FieldUpdateValue).describe(
961
+ var ActionUpdate = z15.record(z15.string(), FieldUpdateValue).describe(
940
962
  "Record of field-level changes made by an action. Supports partial updates and nullable values."
941
963
  );
942
- var EventState = z14.record(z14.string(), FieldValue).describe(
964
+ var EventState = z15.record(z15.string(), FieldValue).describe(
943
965
  "Aggregate representation of event data after all actions have been applied, with all updates consolidated and null values removed."
944
966
  );
945
- var ActionBase = z14.object({
967
+ var ActionBase = z15.object({
946
968
  id: UUID.describe("Unique identifier of the action."),
947
- transactionId: z14.string().describe("Unique identifier of the transaction."),
969
+ transactionId: z15.string().describe("Unique identifier of the transaction."),
948
970
  createdByUserType: TokenUserType.describe(
949
971
  "Indicates whether the action was created by a human-user or by a system-user."
950
972
  ),
951
- createdAt: z14.string().datetime().describe("Timestamp indicating when the action was created."),
952
- createdBy: z14.string().describe("Identifier of the user who created the action."),
953
- createdByRole: z14.string().optional().describe("Role of the user who created the action."),
973
+ createdAt: z15.string().datetime().describe("Timestamp indicating when the action was created."),
974
+ createdBy: z15.string().describe("Identifier of the user who created the action."),
975
+ createdByRole: z15.string().optional().describe("Role of the user who created the action."),
954
976
  createdBySignature: DocumentPath.nullish().describe(
955
977
  "Reference to the signature of the user who created the action."
956
978
  ),
@@ -962,7 +984,7 @@ var ActionBase = z14.object({
962
984
  "Declaration data defined by the ActionConfig. Supports partial updates."
963
985
  ),
964
986
  annotation: ActionUpdate.optional().nullable().describe("Action-specific metadata used to annotate the event."),
965
- status: z14.enum([
987
+ status: z15.enum([
966
988
  ActionStatus.Requested,
967
989
  ActionStatus.Accepted,
968
990
  ActionStatus.Rejected
@@ -974,139 +996,143 @@ var ActionBase = z14.object({
974
996
  )
975
997
  });
976
998
  var AssignedAction = ActionBase.extend(
977
- z14.object({
978
- type: z14.literal(ActionType.ASSIGN),
979
- assignedTo: z14.string().describe("Identifier of the user to whom the action is assigned.")
999
+ z15.object({
1000
+ type: z15.literal(ActionType.ASSIGN),
1001
+ assignedTo: z15.string().describe("Identifier of the user to whom the action is assigned.")
980
1002
  // TODO move into 'content' property
981
1003
  }).shape
982
1004
  );
983
1005
  var UnassignedAction = ActionBase.extend(
984
- z14.object({
985
- type: z14.literal(ActionType.UNASSIGN)
1006
+ z15.object({
1007
+ type: z15.literal(ActionType.UNASSIGN)
986
1008
  }).shape
987
1009
  );
988
1010
  var RegisterAction = ActionBase.extend(
989
- z14.object({
990
- type: z14.literal(ActionType.REGISTER),
991
- registrationNumber: z14.string().optional().describe(
1011
+ z15.object({
1012
+ type: z15.literal(ActionType.REGISTER),
1013
+ registrationNumber: z15.string().optional().describe(
992
1014
  "Registration number of the event. Always present for accepted registrations."
993
1015
  )
994
1016
  // TODO move into 'content' property
995
1017
  }).shape
996
1018
  );
997
1019
  var DeclareAction = ActionBase.extend(
998
- z14.object({
999
- type: z14.literal(ActionType.DECLARE)
1020
+ z15.object({
1021
+ type: z15.literal(ActionType.DECLARE)
1000
1022
  }).shape
1001
1023
  );
1002
- var ReasonContent = z14.object({
1003
- reason: z14.string().min(1, { error: "Message cannot be empty" }).describe(
1024
+ var ReasonContent = z15.object({
1025
+ reason: z15.string().min(1, { error: "Message cannot be empty" }).describe(
1004
1026
  "Message describing the reason for rejecting or archiving the event."
1005
1027
  )
1006
1028
  });
1007
1029
  var RejectAction = ActionBase.extend(
1008
- z14.object({
1009
- type: z14.literal(ActionType.REJECT),
1030
+ z15.object({
1031
+ type: z15.literal(ActionType.REJECT),
1010
1032
  content: ReasonContent
1011
1033
  }).shape
1012
1034
  );
1013
- var PotentialDuplicate = z14.object({
1035
+ var PotentialDuplicate = z15.object({
1014
1036
  id: UUID,
1015
- trackingId: z14.string()
1037
+ trackingId: z15.string()
1016
1038
  });
1017
1039
  var DuplicateDetectedAction = ActionBase.extend(
1018
- z14.object({
1019
- type: z14.literal(ActionType.DUPLICATE_DETECTED),
1020
- content: z14.object({
1021
- duplicates: z14.array(PotentialDuplicate)
1040
+ z15.object({
1041
+ type: z15.literal(ActionType.DUPLICATE_DETECTED),
1042
+ content: z15.object({
1043
+ duplicates: z15.array(PotentialDuplicate)
1022
1044
  })
1023
1045
  }).shape
1024
1046
  );
1025
1047
  var MarkNotDuplicateAction = ActionBase.extend(
1026
- z14.object({
1027
- type: z14.literal(ActionType.MARK_AS_NOT_DUPLICATE)
1048
+ z15.object({
1049
+ type: z15.literal(ActionType.MARK_AS_NOT_DUPLICATE)
1028
1050
  }).shape
1029
1051
  );
1030
1052
  var MarkAsDuplicateAction = ActionBase.extend(
1031
- z14.object({
1032
- type: z14.literal(ActionType.MARK_AS_DUPLICATE),
1033
- content: z14.object({
1053
+ z15.object({
1054
+ type: z15.literal(ActionType.MARK_AS_DUPLICATE),
1055
+ content: z15.object({
1034
1056
  duplicateOf: UUID
1035
1057
  }).optional()
1036
1058
  }).shape
1037
1059
  );
1038
1060
  var ArchiveAction = ActionBase.extend(
1039
- z14.object({
1040
- type: z14.literal(ActionType.ARCHIVE),
1041
- content: ReasonContent
1061
+ z15.object({
1062
+ type: z15.literal(ActionType.ARCHIVE),
1063
+ /**
1064
+ * Archiving does not collect a reason on its own. Only the
1065
+ * "mark as duplicate" flow archives with a reason attached.
1066
+ */
1067
+ content: ReasonContent.optional()
1042
1068
  }).shape
1043
1069
  );
1044
1070
  var UnarchiveAction = ActionBase.extend(
1045
- z14.object({
1046
- type: z14.literal(ActionType.UNARCHIVE)
1071
+ z15.object({
1072
+ type: z15.literal(ActionType.UNARCHIVE)
1047
1073
  }).shape
1048
1074
  );
1049
1075
  var CreatedAction = ActionBase.extend(
1050
- z14.object({
1051
- type: z14.literal(ActionType.CREATE)
1076
+ z15.object({
1077
+ type: z15.literal(ActionType.CREATE)
1052
1078
  }).shape
1053
1079
  );
1054
1080
  var NotifiedAction = ActionBase.extend(
1055
- z14.object({
1056
- type: z14.literal(ActionType.NOTIFY)
1081
+ z15.object({
1082
+ type: z15.literal(ActionType.NOTIFY)
1057
1083
  }).shape
1058
1084
  );
1059
1085
  var EditAction = ActionBase.extend(
1060
- z14.object({
1061
- type: z14.literal(ActionType.EDIT),
1086
+ z15.object({
1087
+ type: z15.literal(ActionType.EDIT),
1062
1088
  /** @deprecated New Edit-actions should no longer contain content. This is kept for old 2.0 edits. */
1063
- content: z14.object({
1064
- comment: z14.string().describe("Comment for the edit action.").optional()
1089
+ content: z15.object({
1090
+ comment: z15.string().describe("Comment for the edit action.").optional()
1065
1091
  }).optional()
1066
1092
  }).shape
1067
1093
  );
1068
- var PrintContent = z14.object({
1069
- templateId: z14.string().optional()
1094
+ var PrintContent = z15.object({
1095
+ templateId: z15.string().optional()
1070
1096
  });
1071
1097
  var PrintCertificateAction = ActionBase.extend(
1072
- z14.object({
1073
- type: z14.literal(ActionType.PRINT_CERTIFICATE),
1098
+ z15.object({
1099
+ type: z15.literal(ActionType.PRINT_CERTIFICATE),
1074
1100
  content: PrintContent.optional().nullable()
1075
1101
  }).shape
1076
1102
  );
1077
1103
  var RequestedCorrectionAction = ActionBase.extend(
1078
- z14.object({
1079
- type: z14.literal(ActionType.REQUEST_CORRECTION)
1104
+ z15.object({
1105
+ type: z15.literal(ActionType.REQUEST_CORRECTION)
1080
1106
  }).shape
1081
1107
  );
1082
1108
  var ApprovedCorrectionAction = ActionBase.extend(
1083
- z14.object({
1084
- type: z14.literal(ActionType.APPROVE_CORRECTION),
1085
- requestId: z14.string(),
1109
+ z15.object({
1110
+ type: z15.literal(ActionType.APPROVE_CORRECTION),
1111
+ requestId: z15.string(),
1086
1112
  // TODO move into 'content' property
1087
- content: z14.object({ immediateCorrection: z14.boolean().optional() }).optional()
1113
+ content: z15.object({ immediateCorrection: z15.boolean().optional() }).optional()
1088
1114
  }).shape
1089
1115
  );
1090
1116
  var RejectedCorrectionAction = ActionBase.extend(
1091
- z14.object({
1092
- type: z14.literal(ActionType.REJECT_CORRECTION),
1093
- requestId: z14.string(),
1117
+ z15.object({
1118
+ type: z15.literal(ActionType.REJECT_CORRECTION),
1119
+ requestId: z15.string(),
1094
1120
  // TODO move into 'content' property
1095
1121
  content: ReasonContent
1096
1122
  }).shape
1097
1123
  );
1098
1124
  var ReadAction = ActionBase.extend(
1099
- z14.object({
1100
- type: z14.literal(ActionType.READ)
1125
+ z15.object({
1126
+ type: z15.literal(ActionType.READ)
1101
1127
  }).shape
1102
1128
  );
1103
1129
  var CustomAction = ActionBase.merge(
1104
- z14.object({
1105
- type: z14.literal(ActionType.CUSTOM),
1106
- customActionType: z14.string()
1130
+ z15.object({
1131
+ type: z15.literal(ActionType.CUSTOM),
1132
+ customActionType: z15.string()
1107
1133
  })
1108
1134
  );
1109
- var ActionDocument = z14.discriminatedUnion("type", [
1135
+ var ActionDocument = z15.discriminatedUnion("type", [
1110
1136
  CreatedAction.meta({ id: "CreatedAction" }),
1111
1137
  RejectAction.meta({ id: "RejectAction" }),
1112
1138
  DuplicateDetectedAction.meta({ id: "DuplicateDetectedAction" }),
@@ -1133,57 +1159,50 @@ var AsyncRejectActionDocument = ActionBase.omit({
1133
1159
  declaration: true,
1134
1160
  annotation: true
1135
1161
  }).extend(
1136
- z14.object({
1137
- type: z14.enum(ConfirmableActions),
1138
- status: z14.literal(ActionStatus.Rejected)
1162
+ z15.object({
1163
+ type: z15.enum(ConfirmableActions),
1164
+ status: z15.literal(ActionStatus.Rejected)
1139
1165
  }).shape
1140
1166
  );
1141
- var Action = z14.union([ActionDocument, AsyncRejectActionDocument]);
1167
+ var Action = z15.union([ActionDocument, AsyncRejectActionDocument]);
1142
1168
 
1143
1169
  // ../commons/src/events/EventMetadata.ts
1144
- var EventStatus = z15.enum([
1145
- "CREATED",
1146
- "NOTIFIED",
1147
- "DECLARED",
1148
- "REGISTERED",
1149
- "ARCHIVED"
1150
- ]);
1151
- var ZodDate = z15.iso.date();
1152
- var ZodDateTime = z15.string().datetime();
1153
- var ActionCreationMetadata = z15.object({
1154
- createdAt: z15.iso.datetime().describe("The timestamp when the action request was created."),
1155
- createdBy: z15.string().describe("ID of the user who created the action request."),
1170
+ var ZodDate = z16.iso.date();
1171
+ var ZodDateTime = z16.string().datetime();
1172
+ var ActionCreationMetadata = z16.object({
1173
+ createdAt: z16.iso.datetime().describe("The timestamp when the action request was created."),
1174
+ createdBy: z16.string().describe("ID of the user who created the action request."),
1156
1175
  // @TODO: createdAtLocation should be non-nullable in the future once all action requests have this field populated.
1157
1176
  createdAtLocation: UUID.nullish().describe(
1158
1177
  "Location of the user who created the action request."
1159
1178
  ),
1160
- createdByUserType: z15.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
1161
- acceptedAt: z15.iso.datetime().describe("Timestamp when the action request was accepted."),
1162
- createdByRole: z15.string().optional().describe("Role of the user at the time of action request creation.")
1179
+ createdByUserType: z16.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
1180
+ acceptedAt: z16.iso.datetime().describe("Timestamp when the action request was accepted."),
1181
+ createdByRole: z16.string().optional().describe("Role of the user at the time of action request creation.")
1163
1182
  });
1164
1183
  var RegistrationCreationMetadata = ActionCreationMetadata.extend({
1165
- registrationNumber: z15.string().describe(
1184
+ registrationNumber: z16.string().describe(
1166
1185
  "Registration number of the event. Always present for accepted registrations."
1167
1186
  )
1168
1187
  });
1169
- var LegalStatuses = z15.object({
1188
+ var LegalStatuses = z16.object({
1170
1189
  [EventStatus.enum.NOTIFIED]: ActionCreationMetadata.nullish(),
1171
1190
  [EventStatus.enum.DECLARED]: ActionCreationMetadata.nullish(),
1172
1191
  [EventStatus.enum.REGISTERED]: RegistrationCreationMetadata.nullish()
1173
1192
  });
1174
- var EventMetadata = z15.object({
1193
+ var EventMetadata = z16.object({
1175
1194
  id: UUID,
1176
- type: z15.string().describe("The type of event, such as birth, death, or marriage."),
1195
+ type: z16.string().describe("The type of event, such as birth, death, or marriage."),
1177
1196
  status: EventStatus,
1178
1197
  legalStatuses: LegalStatuses.describe(
1179
1198
  "Metadata related to the legal registration of the event, such as who registered it and when."
1180
1199
  ),
1181
- createdAt: z15.iso.datetime().describe("The timestamp when the event was first created and saved."),
1200
+ createdAt: z16.iso.datetime().describe("The timestamp when the event was first created and saved."),
1182
1201
  dateOfEvent: ZodDate.nullish(),
1183
1202
  placeOfEvent: UUID.nullish(),
1184
- createdBy: z15.string().describe("ID of the user who created the event."),
1185
- createdByUserType: z15.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
1186
- updatedByUserRole: z15.string().nullish().describe("Role of the user who last changed the status."),
1203
+ createdBy: z16.string().describe("ID of the user who created the event."),
1204
+ createdByUserType: z16.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
1205
+ updatedByUserRole: z16.string().nullish().describe("Role of the user who last changed the status."),
1187
1206
  // @TODO: createdAtLocation should be non-nullable in the future once all action requests have this field populated.
1188
1207
  createdAtLocation: UUID.nullish().describe(
1189
1208
  "Location of the user who created the event."
@@ -1191,18 +1210,18 @@ var EventMetadata = z15.object({
1191
1210
  updatedAtLocation: UUID.nullish().describe(
1192
1211
  "Location of the user who last changed the status."
1193
1212
  ),
1194
- updatedAt: z15.iso.datetime().describe(
1213
+ updatedAt: z16.iso.datetime().describe(
1195
1214
  "Timestamp of the most recent *accepted* status change. Possibly 3rd party update, if action is validation asynchronously."
1196
1215
  ),
1197
- assignedTo: z15.string().nullish().describe("ID of the user currently assigned to the event."),
1198
- updatedBy: z15.string().nullish().describe("ID of the user who last changed the status."),
1199
- trackingId: z15.string().describe(
1216
+ assignedTo: z16.string().nullish().describe("ID of the user currently assigned to the event."),
1217
+ updatedBy: z16.string().nullish().describe("ID of the user who last changed the status."),
1218
+ trackingId: z16.string().describe(
1200
1219
  "System-generated tracking ID used by informants or registrars to look up the event."
1201
1220
  ),
1202
- potentialDuplicates: z15.array(PotentialDuplicate).describe(
1221
+ potentialDuplicates: z16.array(PotentialDuplicate).describe(
1203
1222
  "List of event IDs and their tracking IDs that this event could be a duplicate of."
1204
1223
  ),
1205
- flags: z15.array(Flag)
1224
+ flags: z16.array(Flag)
1206
1225
  });
1207
1226
  var EventMetadataKeysArray = [
1208
1227
  "id",
@@ -1223,8 +1242,8 @@ var EventMetadataKeysArray = [
1223
1242
  "legalStatuses",
1224
1243
  "flags"
1225
1244
  ];
1226
- var EventMetadataKeys = z15.enum(EventMetadataKeysArray);
1227
- var EventMetadataDateFieldIdInput = z15.enum([
1245
+ var EventMetadataKeys = z16.enum(EventMetadataKeysArray);
1246
+ var EventMetadataDateFieldIdInput = z16.enum([
1228
1247
  "createdAt",
1229
1248
  "updatedAt",
1230
1249
  "legalStatuses.NOTIFIED.createdAt",
@@ -1234,7 +1253,7 @@ var EventMetadataDateFieldIdInput = z15.enum([
1234
1253
  "legalStatuses.REGISTERED.createdAt",
1235
1254
  "legalStatuses.REGISTERED.acceptedAt"
1236
1255
  ]);
1237
- var EventMetadataDateFieldId = z15.enum([
1256
+ var EventMetadataDateFieldId = z16.enum([
1238
1257
  "event.createdAt",
1239
1258
  "event.updatedAt",
1240
1259
  "event.legalStatuses.NOTIFIED.createdAt",
@@ -1893,11 +1912,11 @@ var AdministrativeAreaField = BaseField.extend({
1893
1912
  partOf: FieldReference.optional().describe("Parent location"),
1894
1913
  type: AdministrativeAreas,
1895
1914
  allowedLocations: AllowedLocations,
1896
- listHistoricalNames: import_v43.default.boolean().optional().describe(
1897
- "Advanced search: list every historical name a location has had as a separate, selectable option."
1898
- ),
1899
1915
  activeOnly: import_v43.default.boolean().optional().describe(
1900
- "Advanced search: offer only currently-active locations; inactivated ones are excluded."
1916
+ "Offer only locations that are active at the resolved anchor date (today, or the date of event when anchorToDateOfEvent is set); inactive or not-yet-effective versions are excluded."
1917
+ ),
1918
+ anchorToDateOfEvent: import_v43.default.boolean().optional().describe(
1919
+ "Resolve selectable/displayed versions against the event's date of event (falling back to the record's creation date when empty) instead of today. Does not by itself exclude inactive versions; combine with activeOnly for that."
1901
1920
  )
1902
1921
  }).describe("Administrative area options")
1903
1922
  }).meta({
@@ -1910,8 +1929,11 @@ var LocationInput = BaseField.extend({
1910
1929
  configuration: import_v43.default.object({
1911
1930
  locationTypes: import_v43.default.array(import_v43.default.string()).optional().describe("Types of the locations that are available for selection."),
1912
1931
  allowedLocations: AllowedLocations,
1913
- listHistoricalNames: import_v43.default.boolean().optional().describe(
1914
- "Advanced search: list every historical name a location has had as a separate, selectable option."
1932
+ activeOnly: import_v43.default.boolean().optional().describe(
1933
+ "Offer only locations that are active at the resolved anchor date (today, or the date of event when anchorToDateOfEvent is set); inactive or not-yet-effective versions are excluded."
1934
+ ),
1935
+ anchorToDateOfEvent: import_v43.default.boolean().optional().describe(
1936
+ "Resolve selectable/displayed versions against the event's date of event (falling back to the record's creation date when empty) instead of today. Does not by itself exclude inactive versions; combine with activeOnly for that."
1915
1937
  )
1916
1938
  }).optional()
1917
1939
  }).meta({
@@ -1940,7 +1962,8 @@ var Facility = BaseField.extend({
1940
1962
  defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
1941
1963
  configuration: import_v43.default.object({
1942
1964
  allowedLocations: AllowedLocations,
1943
- listHistoricalNames: import_v43.default.boolean().optional()
1965
+ activeOnly: import_v43.default.boolean().optional(),
1966
+ anchorToDateOfEvent: import_v43.default.boolean().optional()
1944
1967
  }).optional()
1945
1968
  }).describe("Input field for a facility");
1946
1969
  var Office = BaseField.extend({
@@ -1948,7 +1971,8 @@ var Office = BaseField.extend({
1948
1971
  defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
1949
1972
  configuration: import_v43.default.object({
1950
1973
  allowedLocations: AllowedLocations,
1951
- listHistoricalNames: import_v43.default.boolean().optional()
1974
+ activeOnly: import_v43.default.boolean().optional(),
1975
+ anchorToDateOfEvent: import_v43.default.boolean().optional()
1952
1976
  }).optional()
1953
1977
  }).describe("Input field for an office");
1954
1978
  var DefaultAddressFieldValue = DomesticAddressFieldValue.extend({
@@ -1983,11 +2007,11 @@ var Address = BaseField.extend({
1983
2007
  })
1984
2008
  ).optional(),
1985
2009
  allowedLocations: AllowedLocations,
1986
- listHistoricalNames: import_v43.default.boolean().optional().describe(
1987
- "Advanced search: list every historical name a location has had as a separate, selectable option. Propagated to the embedded admin-area selectors."
1988
- ),
1989
2010
  activeOnly: import_v43.default.boolean().optional().describe(
1990
- "Advanced search: offer only currently-active admin areas; inactivated ones are excluded. Propagated to the embedded admin-area selectors."
2011
+ "Offer only admin areas that are active at the resolved anchor date (today, or the date of event when anchorToDateOfEvent is set); inactive or not-yet-effective versions are excluded. Propagated to the embedded admin-area selectors."
2012
+ ),
2013
+ anchorToDateOfEvent: import_v43.default.boolean().optional().describe(
2014
+ "Resolve selectable/displayed versions against the event's date of event (falling back to the record's creation date when empty) instead of today. Does not by itself exclude inactive versions; combine with activeOnly for that. Propagated to the embedded admin-area selectors."
1991
2015
  )
1992
2016
  }).optional(),
1993
2017
  defaultValue: DefaultAddressFieldValue.or(ComputedDefaultValue).optional()
@@ -2043,10 +2067,19 @@ var ButtonField = BaseField.extend({
2043
2067
  description: "A generic button that can be used to trigger an action",
2044
2068
  id: "ButtonField"
2045
2069
  });
2070
+ var FieldGroupConfiguration = import_v43.default.object({
2071
+ separator: import_v43.default.string().optional().describe(
2072
+ 'Joins the subfield values when the group is rendered as output, e.g. ", ". Defaults to one subfield per line.'
2073
+ ),
2074
+ hideEmptyFields: import_v43.default.boolean().default(false).optional().describe(
2075
+ "Leaves subfields without a value out of the output. Pair it with a separator so the separator does not double up around the gaps."
2076
+ )
2077
+ });
2046
2078
  var FieldGroup = BaseField.extend({
2047
2079
  type: import_v43.default.literal(FieldType.FIELD_GROUP),
2048
2080
  // eslint-disable-next-line @typescript-eslint/no-use-before-define
2049
- fields: import_v43.default.lazy(() => import_v43.default.array(FieldConfig))
2081
+ fields: import_v43.default.lazy(() => import_v43.default.array(FieldConfig)),
2082
+ configuration: FieldGroupConfiguration.optional()
2050
2083
  }).meta({
2051
2084
  description: "A group of fields that are displayed together",
2052
2085
  id: "FieldGroup"
@@ -2289,7 +2322,7 @@ var AnyFileField = import_v43.default.discriminatedUnion("type", [
2289
2322
  ]);
2290
2323
 
2291
2324
  // ../commons/src/application-config.ts
2292
- var SearchCriteria = z20.enum([
2325
+ var SearchCriteria = z21.enum([
2293
2326
  "TRACKING_ID",
2294
2327
  "REGISTRATION_NUMBER",
2295
2328
  "NATIONAL_ID",
@@ -2297,69 +2330,69 @@ var SearchCriteria = z20.enum([
2297
2330
  "PHONE_NUMBER",
2298
2331
  "EMAIL"
2299
2332
  ]);
2300
- var ApplicationConfig = z20.object({
2301
- APPLICATION_NAME: z20.string(),
2302
- COUNTRY_LOGO: z20.object({
2303
- fileName: z20.string(),
2304
- file: z20.string()
2333
+ var ApplicationConfig = z21.object({
2334
+ APPLICATION_NAME: z21.string(),
2335
+ COUNTRY_LOGO: z21.object({
2336
+ fileName: z21.string(),
2337
+ file: z21.string()
2305
2338
  }),
2306
- SYSTEM_IANA_TIMEZONE: z20.string(),
2307
- CURRENCY: z20.object({
2308
- languagesAndCountry: z20.array(z20.string()),
2309
- isoCode: z20.string()
2339
+ SYSTEM_IANA_TIMEZONE: z21.string(),
2340
+ CURRENCY: z21.object({
2341
+ languagesAndCountry: z21.array(z21.string()),
2342
+ isoCode: z21.string()
2310
2343
  }),
2311
- ADMIN_STRUCTURE: z20.array(
2312
- z20.object({
2313
- id: z20.string(),
2344
+ ADMIN_STRUCTURE: z21.array(
2345
+ z21.object({
2346
+ id: z21.string(),
2314
2347
  label: TranslationConfig
2315
2348
  })
2316
2349
  ),
2317
- PHONE_NUMBER_PATTERN: z20.string().or(z20.instanceof(RegExp)),
2318
- USER_NOTIFICATION_DELIVERY_METHOD: z20.enum(["email", "sms"]),
2319
- INFORMANT_NOTIFICATION_DELIVERY_METHOD: z20.enum(["email", "sms"]),
2350
+ PHONE_NUMBER_PATTERN: z21.string().or(z21.instanceof(RegExp)),
2351
+ USER_NOTIFICATION_DELIVERY_METHOD: z21.enum(["email", "sms"]),
2352
+ INFORMANT_NOTIFICATION_DELIVERY_METHOD: z21.enum(["email", "sms"]),
2320
2353
  SEARCH_DEFAULT_CRITERIA: SearchCriteria.optional().default("TRACKING_ID"),
2321
- ADDITIONAL_USER_FIELDS: z20.array(FieldConfig).optional().default([])
2354
+ ADDITIONAL_USER_FIELDS: z21.array(FieldConfig).optional().default([])
2322
2355
  });
2323
2356
  var defineApplicationConfig = (config) => {
2324
2357
  return ApplicationConfig.parse(config);
2325
2358
  };
2326
- var BackgroundConfig = z20.object({
2327
- backgroundColor: z20.string().optional(),
2328
- backgroundImage: z20.string().optional(),
2329
- imageFit: z20.string().optional()
2359
+ var BackgroundConfig = z21.object({
2360
+ backgroundColor: z21.string().optional(),
2361
+ backgroundImage: z21.string().optional(),
2362
+ imageFit: z21.string().optional()
2330
2363
  }).refine(
2331
2364
  (data) => !!(data.backgroundColor || data.backgroundImage),
2332
2365
  "backgroundColor and backgroundImage cannot be empty at the same time"
2333
2366
  );
2334
- var LoginConfig = z20.object({
2335
- COUNTRY: z20.string(),
2336
- LANGUAGES: z20.array(z20.string()),
2337
- USER_NOTIFICATION_DELIVERY_METHOD: z20.enum(["email", "sms"]),
2338
- INFORMANT_NOTIFICATION_DELIVERY_METHOD: z20.enum(["email", "sms"]),
2339
- PHONE_NUMBER_PATTERN: z20.string().or(z20.instanceof(RegExp)),
2367
+ var LoginConfig = z21.object({
2368
+ COUNTRY: z21.string(),
2369
+ LANGUAGES: z21.array(z21.string()),
2370
+ USER_NOTIFICATION_DELIVERY_METHOD: z21.enum(["email", "sms"]),
2371
+ INFORMANT_NOTIFICATION_DELIVERY_METHOD: z21.enum(["email", "sms"]),
2372
+ PHONE_NUMBER_PATTERN: z21.string().or(z21.instanceof(RegExp)),
2340
2373
  LOGIN_BACKGROUND: BackgroundConfig,
2341
- SENTRY: z20.string().optional()
2374
+ SENTRY: z21.string().optional()
2342
2375
  });
2343
2376
  var defineLoginConfig = (config) => {
2344
2377
  return LoginConfig.parse(config);
2345
2378
  };
2346
- var ClientConfig = z20.object({
2347
- COUNTRY: z20.string(),
2348
- LANGUAGES: z20.array(z20.string()),
2349
- SENTRY: z20.string().optional(),
2350
- LOGIN_URL: z20.string().optional(),
2379
+ var ClientConfig = z21.object({
2380
+ COUNTRY: z21.string(),
2381
+ LANGUAGES: z21.array(z21.string()),
2382
+ SENTRY: z21.string().optional(),
2383
+ LOGIN_URL: z21.string().optional(),
2351
2384
  REGISTER_BACKGROUND: BackgroundConfig,
2352
- DASHBOARDS: z20.array(
2353
- z20.object({
2354
- id: z20.string(),
2385
+ DASHBOARDS: z21.array(
2386
+ z21.object({
2387
+ id: z21.string(),
2355
2388
  title: TranslationConfig,
2356
- url: z20.string(),
2357
- context: z20.object({
2358
- auth: z20.literal("REQUEST_AUTH_TOKEN")
2389
+ url: z21.string(),
2390
+ context: z21.object({
2391
+ auth: z21.literal("REQUEST_AUTH_TOKEN")
2359
2392
  }).optional()
2360
2393
  })
2361
2394
  ),
2362
- FEATURES: z20.object({ V2_EVENTS: z20.boolean().optional().default(true) }).optional().default({ V2_EVENTS: true })
2395
+ FEATURES: z21.object({ V2_EVENTS: z21.boolean().optional().default(true) }).optional().default({ V2_EVENTS: true })
2363
2396
  });
2364
2397
  var defineClientConfig = (config) => {
2365
2398
  return ClientConfig.parse(config);