@opencrvs/toolkit 1.9.6-rc.a60374d → 1.9.6-rc.cb62364

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.
@@ -2440,7 +2440,6 @@ declare const TimeField: z.ZodObject<z.objectUtil.extendShape<{
2440
2440
  } | undefined;
2441
2441
  }>;
2442
2442
  export type TimeField = z.infer<typeof TimeField>;
2443
- export type TimeField2 = z.input<typeof TimeField>;
2444
2443
  declare const DateRangeField: z.ZodObject<z.objectUtil.extendShape<{
2445
2444
  id: z.ZodEffects<z.ZodString, string, string>;
2446
2445
  label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
@@ -5714,7 +5714,7 @@ function field(fieldId, options = {}) {
5714
5714
 
5715
5715
  // ../commons/src/fixtures/forms.ts
5716
5716
  var import_date_fns3 = require("date-fns");
5717
- var PRINT_CERTIFICATE_FORM = {
5717
+ var PRINT_CERTIFICATE_FORM = defineActionForm({
5718
5718
  label: {
5719
5719
  id: "event.tennis-club-membership.action.certificate.form.label",
5720
5720
  defaultMessage: "Tennis club membership certificate collector",
@@ -6370,7 +6370,7 @@ var PRINT_CERTIFICATE_FORM = {
6370
6370
  }
6371
6371
  }
6372
6372
  ]
6373
- };
6373
+ });
6374
6374
  var TENNIS_CLUB_DECLARATION_REVIEW = {
6375
6375
  title: {
6376
6376
  id: "event.tennis-club-membership.action.declare.form.review.title",
@@ -6415,7 +6415,7 @@ function isDomesticAddress() {
6415
6415
  field("addressType").isEqualTo(AddressType.DOMESTIC)
6416
6416
  );
6417
6417
  }
6418
- var TENNIS_CLUB_DECLARATION_FORM = {
6418
+ var TENNIS_CLUB_DECLARATION_FORM = defineDeclarationForm({
6419
6419
  label: {
6420
6420
  id: "event.tennis-club-membership.action.declare.form.label",
6421
6421
  defaultMessage: "Tennis club membership application",
@@ -6900,7 +6900,7 @@ var TENNIS_CLUB_DECLARATION_FORM = {
6900
6900
  // Intentional always-true page conditional to exercise interactions between page-level and field-level conditionals in tests
6901
6901
  }
6902
6902
  ]
6903
- };
6903
+ });
6904
6904
  var statusOptions = [
6905
6905
  {
6906
6906
  value: "ALL",
@@ -7709,7 +7709,7 @@ var footballClubMembershipEvent = defineConfig({
7709
7709
  });
7710
7710
 
7711
7711
  // ../commons/src/fixtures/library-membership-event.ts
7712
- var libraryMembershipForm = {
7712
+ var libraryMembershipForm = defineDeclarationForm({
7713
7713
  label: {
7714
7714
  id: "event.library-membership.action.declare.form.label",
7715
7715
  defaultMessage: "Library membership application",
@@ -7749,7 +7749,7 @@ var libraryMembershipForm = {
7749
7749
  ]
7750
7750
  }
7751
7751
  ]
7752
- };
7752
+ });
7753
7753
  var libraryMembershipEvent = defineConfig({
7754
7754
  id: "library-membership",
7755
7755
  label: {
@@ -7775,7 +7775,7 @@ function generateTranslationConfig(message) {
7775
7775
  id: message
7776
7776
  };
7777
7777
  }
7778
- var child = {
7778
+ var child = defineFormPage({
7779
7779
  id: "child",
7780
7780
  type: PageTypes.enum.FORM,
7781
7781
  title: generateTranslationConfig("Child's details"),
@@ -7798,8 +7798,8 @@ var child = {
7798
7798
  label: generateTranslationConfig("Date of birth")
7799
7799
  }
7800
7800
  ]
7801
- };
7802
- var mother = {
7801
+ });
7802
+ var mother = defineFormPage({
7803
7803
  id: "mother",
7804
7804
  type: PageTypes.enum.FORM,
7805
7805
  title: generateTranslationConfig("Mother's details"),
@@ -7871,7 +7871,7 @@ var mother = {
7871
7871
  validation: []
7872
7872
  }
7873
7873
  ]
7874
- };
7874
+ });
7875
7875
  var BIRTH_DECLARATION_REVIEW = {
7876
7876
  title: generateTranslationConfig(
7877
7877
  "{child.name.firstname, select, __EMPTY__ {Birth declaration} other {{child.name.surname, select, __EMPTY__ {Birth declaration for {child.name.firstname}} other {Birth declaration for {child.name.firstname} {child.name.surname}}}}}"
@@ -7892,10 +7892,10 @@ var BIRTH_DECLARATION_REVIEW = {
7892
7892
  }
7893
7893
  ]
7894
7894
  };
7895
- var BIRTH_DECLARATION_FORM = {
7895
+ var BIRTH_DECLARATION_FORM = defineDeclarationForm({
7896
7896
  label: generateTranslationConfig("Birth decalration form"),
7897
7897
  pages: [child, mother]
7898
- };
7898
+ });
7899
7899
  var v2BirthEvent = defineConfig({
7900
7900
  id: BIRTH_EVENT,
7901
7901
  title: generateTranslationConfig(
@@ -7932,7 +7932,7 @@ var v2BirthEvent = defineConfig({
7932
7932
  });
7933
7933
 
7934
7934
  // ../commons/src/fixtures/digital-identity-issuance-event.ts
7935
- var PRINT_DIGITAL_ID_CERTIFICATE_FORM = {
7935
+ var PRINT_DIGITAL_ID_CERTIFICATE_FORM = defineActionForm({
7936
7936
  label: {
7937
7937
  id: "event.digital-identity.action.certificate.form.label",
7938
7938
  defaultMessage: "Digital identity certificate printer",
@@ -8076,8 +8076,8 @@ var PRINT_DIGITAL_ID_CERTIFICATE_FORM = {
8076
8076
  ]
8077
8077
  }
8078
8078
  ]
8079
- };
8080
- var digitalIdentityForm = {
8079
+ });
8080
+ var digitalIdentityForm = defineDeclarationForm({
8081
8081
  label: {
8082
8082
  id: "event.digital-identity.action.declare.form.label",
8083
8083
  defaultMessage: "Digital identity issuance",
@@ -8117,7 +8117,7 @@ var digitalIdentityForm = {
8117
8117
  ]
8118
8118
  }
8119
8119
  ]
8120
- };
8120
+ });
8121
8121
  var digitalIdentityEvent = defineConfig({
8122
8122
  id: "digital-identity",
8123
8123
  label: {
@@ -2699,6 +2699,11 @@ var EventConfig = import_zod27.z.object({
2699
2699
  ref: "EventConfig"
2700
2700
  }).describe("Configuration defining an event type.");
2701
2701
 
2702
+ // ../commons/src/events/EventConfigInput.ts
2703
+ var defineDeclarationForm = (form) => DeclarationFormConfig.parse(form);
2704
+ var defineActionForm = (actionForm) => ActionFormConfig.parse(actionForm);
2705
+ var defineFormPage = (formPage) => FormPageConfig.parse(formPage);
2706
+
2702
2707
  // ../commons/src/events/WorkqueueConfig.ts
2703
2708
  var import_zod31 = require("zod");
2704
2709
 
@@ -3962,7 +3967,7 @@ function field(fieldId, options = {}) {
3962
3967
 
3963
3968
  // ../commons/src/fixtures/forms.ts
3964
3969
  var import_date_fns3 = require("date-fns");
3965
- var PRINT_CERTIFICATE_FORM = {
3970
+ var PRINT_CERTIFICATE_FORM = defineActionForm({
3966
3971
  label: {
3967
3972
  id: "event.tennis-club-membership.action.certificate.form.label",
3968
3973
  defaultMessage: "Tennis club membership certificate collector",
@@ -4618,7 +4623,7 @@ var PRINT_CERTIFICATE_FORM = {
4618
4623
  }
4619
4624
  }
4620
4625
  ]
4621
- };
4626
+ });
4622
4627
  var TENNIS_CLUB_DECLARATION_REVIEW = {
4623
4628
  title: {
4624
4629
  id: "event.tennis-club-membership.action.declare.form.review.title",
@@ -4663,7 +4668,7 @@ function isDomesticAddress() {
4663
4668
  field("addressType").isEqualTo(AddressType.DOMESTIC)
4664
4669
  );
4665
4670
  }
4666
- var TENNIS_CLUB_DECLARATION_FORM = {
4671
+ var TENNIS_CLUB_DECLARATION_FORM = defineDeclarationForm({
4667
4672
  label: {
4668
4673
  id: "event.tennis-club-membership.action.declare.form.label",
4669
4674
  defaultMessage: "Tennis club membership application",
@@ -5148,7 +5153,7 @@ var TENNIS_CLUB_DECLARATION_FORM = {
5148
5153
  // Intentional always-true page conditional to exercise interactions between page-level and field-level conditionals in tests
5149
5154
  }
5150
5155
  ]
5151
- };
5156
+ });
5152
5157
  var statusOptions = [
5153
5158
  {
5154
5159
  value: "ALL",
@@ -5957,7 +5962,7 @@ var footballClubMembershipEvent = defineConfig({
5957
5962
  });
5958
5963
 
5959
5964
  // ../commons/src/fixtures/library-membership-event.ts
5960
- var libraryMembershipForm = {
5965
+ var libraryMembershipForm = defineDeclarationForm({
5961
5966
  label: {
5962
5967
  id: "event.library-membership.action.declare.form.label",
5963
5968
  defaultMessage: "Library membership application",
@@ -5997,7 +6002,7 @@ var libraryMembershipForm = {
5997
6002
  ]
5998
6003
  }
5999
6004
  ]
6000
- };
6005
+ });
6001
6006
  var libraryMembershipEvent = defineConfig({
6002
6007
  id: "library-membership",
6003
6008
  label: {
@@ -6023,7 +6028,7 @@ function generateTranslationConfig(message) {
6023
6028
  id: message
6024
6029
  };
6025
6030
  }
6026
- var child = {
6031
+ var child = defineFormPage({
6027
6032
  id: "child",
6028
6033
  type: PageTypes.enum.FORM,
6029
6034
  title: generateTranslationConfig("Child's details"),
@@ -6046,8 +6051,8 @@ var child = {
6046
6051
  label: generateTranslationConfig("Date of birth")
6047
6052
  }
6048
6053
  ]
6049
- };
6050
- var mother = {
6054
+ });
6055
+ var mother = defineFormPage({
6051
6056
  id: "mother",
6052
6057
  type: PageTypes.enum.FORM,
6053
6058
  title: generateTranslationConfig("Mother's details"),
@@ -6119,7 +6124,7 @@ var mother = {
6119
6124
  validation: []
6120
6125
  }
6121
6126
  ]
6122
- };
6127
+ });
6123
6128
  var BIRTH_DECLARATION_REVIEW = {
6124
6129
  title: generateTranslationConfig(
6125
6130
  "{child.name.firstname, select, __EMPTY__ {Birth declaration} other {{child.name.surname, select, __EMPTY__ {Birth declaration for {child.name.firstname}} other {Birth declaration for {child.name.firstname} {child.name.surname}}}}}"
@@ -6140,10 +6145,10 @@ var BIRTH_DECLARATION_REVIEW = {
6140
6145
  }
6141
6146
  ]
6142
6147
  };
6143
- var BIRTH_DECLARATION_FORM = {
6148
+ var BIRTH_DECLARATION_FORM = defineDeclarationForm({
6144
6149
  label: generateTranslationConfig("Birth decalration form"),
6145
6150
  pages: [child, mother]
6146
- };
6151
+ });
6147
6152
  var v2BirthEvent = defineConfig({
6148
6153
  id: BIRTH_EVENT,
6149
6154
  title: generateTranslationConfig(
@@ -6180,7 +6185,7 @@ var v2BirthEvent = defineConfig({
6180
6185
  });
6181
6186
 
6182
6187
  // ../commons/src/fixtures/digital-identity-issuance-event.ts
6183
- var PRINT_DIGITAL_ID_CERTIFICATE_FORM = {
6188
+ var PRINT_DIGITAL_ID_CERTIFICATE_FORM = defineActionForm({
6184
6189
  label: {
6185
6190
  id: "event.digital-identity.action.certificate.form.label",
6186
6191
  defaultMessage: "Digital identity certificate printer",
@@ -6324,8 +6329,8 @@ var PRINT_DIGITAL_ID_CERTIFICATE_FORM = {
6324
6329
  ]
6325
6330
  }
6326
6331
  ]
6327
- };
6328
- var digitalIdentityForm = {
6332
+ });
6333
+ var digitalIdentityForm = defineDeclarationForm({
6329
6334
  label: {
6330
6335
  id: "event.digital-identity.action.declare.form.label",
6331
6336
  defaultMessage: "Digital identity issuance",
@@ -6365,7 +6370,7 @@ var digitalIdentityForm = {
6365
6370
  ]
6366
6371
  }
6367
6372
  ]
6368
- };
6373
+ });
6369
6374
  var digitalIdentityEvent = defineConfig({
6370
6375
  id: "digital-identity",
6371
6376
  label: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencrvs/toolkit",
3
- "version": "1.9.6-rc.a60374d",
3
+ "version": "1.9.6-rc.cb62364",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "exports": {