@opencrvs/toolkit 2.0.0-rc.fb896bc → 2.0.0-rc.fbe5c02

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 (33) hide show
  1. package/dist/application-config/index.js +55 -35
  2. package/dist/cli.js +10 -4
  3. package/dist/commons/api/router.d.ts +94 -17
  4. package/dist/commons/application-config/index.d.ts +1 -0
  5. package/dist/commons/conditionals/conditionals.d.ts +348 -4
  6. package/dist/commons/conditionals/validate.d.ts +51 -2
  7. package/dist/commons/events/ActionConfig.d.ts +28 -2
  8. package/dist/commons/events/ActionDocument.d.ts +6 -0
  9. package/dist/commons/events/ActionInput.d.ts +6 -0
  10. package/dist/commons/events/AdvancedSearchConfig.d.ts +342 -0
  11. package/dist/commons/events/CountryConfigQueryInput.d.ts +42 -0
  12. package/dist/commons/events/EventDocument.d.ts +3 -0
  13. package/dist/commons/events/EventIndex.d.ts +14 -0
  14. package/dist/commons/events/FieldConfig.d.ts +378 -50
  15. package/dist/commons/events/FieldType.d.ts +1 -0
  16. package/dist/commons/events/FieldTypeMapping.d.ts +1 -1
  17. package/dist/commons/events/FieldValue.d.ts +6 -0
  18. package/dist/commons/events/WorkqueueConfig.d.ts +39 -0
  19. package/dist/commons/events/field.d.ts +53 -1
  20. package/dist/commons/events/state/utils.d.ts +12 -287
  21. package/dist/commons/events/utils.d.ts +12 -1
  22. package/dist/conditionals/index.js +48 -1
  23. package/dist/events/index.js +380 -148
  24. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +1 -1
  25. package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -1
  26. package/dist/migrations/v2.0/checkout-upstream-files.js +1 -1
  27. package/dist/migrations/v2.0/index.js +10 -4
  28. package/dist/notification/index.js +250 -40
  29. package/dist/scopes/index.d.ts +4 -6
  30. package/dist/scopes/index.js +9 -3
  31. package/opencrvs-toolkit-2.0.0-rc.fbe5c02.tgz +0 -0
  32. package/package.json +1 -1
  33. package/opencrvs-toolkit-2.0.0-rc.fb896bc.tgz +0 -0
@@ -206,6 +206,11 @@ var FieldTypesToHideInReview = [
206
206
  FieldType.ALPHA_PRINT_BUTTON,
207
207
  FieldType.ALPHA_HIDDEN
208
208
  ];
209
+ var HiddenFieldTypes = [
210
+ FieldType.HTTP,
211
+ FieldType.QUERY_PARAM_READER,
212
+ FieldType.ALPHA_HIDDEN
213
+ ];
209
214
 
210
215
  // ../commons/src/events/FieldValue.ts
211
216
  var z7 = __toESM(require("zod/v4"));
@@ -324,7 +329,7 @@ var PlainDate = import_zod.z.string().date().brand("PlainDate").describe("Date i
324
329
  // ../commons/src/events/FieldValue.ts
325
330
  var TextValue = z7.string();
326
331
  var HiddenFieldValue = z7.string();
327
- var NonEmptyTextValue = TextValue.min(1);
332
+ var NonEmptyTextValue = z7.string().trim().min(1);
328
333
  var DateValue = z7.iso.date().describe("Date in the format YYYY-MM-DD");
329
334
  var AgeValue = z7.object({
330
335
  age: z7.number(),
@@ -353,6 +358,7 @@ var DateRangeFieldValue = z7.object({
353
358
  var EmailValue = z7.email();
354
359
  var CheckboxFieldValue = z7.boolean();
355
360
  var NumberFieldValue = z7.number();
361
+ var SignatureFieldValue = FileFieldValue;
356
362
  var ButtonFieldValue = z7.number();
357
363
  var VerificationStatusValue = z7.enum([
358
364
  "verified",
@@ -989,8 +995,9 @@ var RequestedCorrectionAction = ActionBase.extend(
989
995
  var ApprovedCorrectionAction = ActionBase.extend(
990
996
  z13.object({
991
997
  type: z13.literal(ActionType.APPROVE_CORRECTION),
992
- requestId: z13.string()
998
+ requestId: z13.string(),
993
999
  // TODO move into 'content' property
1000
+ content: z13.object({ immediateCorrection: z13.boolean().optional() }).optional()
994
1001
  }).shape
995
1002
  );
996
1003
  var RejectedCorrectionAction = ActionBase.extend(
@@ -1253,7 +1260,8 @@ var Range = import_v4.z.object({
1253
1260
  });
1254
1261
  var ContainsFlags = import_v4.z.object({
1255
1262
  anyOf: import_v4.z.array(Flag).optional(),
1256
- noneOf: import_v4.z.array(Flag).optional()
1263
+ noneOf: import_v4.z.array(Flag).optional(),
1264
+ allOf: import_v4.z.array(Flag).optional()
1257
1265
  }).meta({
1258
1266
  id: "ContainsFlags"
1259
1267
  });
@@ -1410,8 +1418,18 @@ var FieldReference = import_v43.default.object({
1410
1418
  $$field: FieldId.describe("Id of the field to reference"),
1411
1419
  $$subfield: import_v43.default.array(import_v43.default.string()).optional().default([]).describe(
1412
1420
  'If the FieldValue is an object, subfield can be used to refer to e.g. `["foo", "bar"]` in `{ foo: { bar: 3 } }`'
1421
+ ),
1422
+ $$code: import_v43.default.string().optional().describe(
1423
+ "Serialised client-side function body. When present the expression is evaluated rather than dereferenced."
1424
+ )
1425
+ }).describe(
1426
+ "Reference to a field value, with an optional client-side computation applied."
1427
+ );
1428
+ var ComputedDefaultValue = import_v43.default.object({
1429
+ $$code: import_v43.default.string().describe(
1430
+ "Serialised client-side function body. Receives (undefined, context) where context includes $now, $online, and system variables."
1413
1431
  )
1414
- }).describe("Reference to a field by its ID");
1432
+ }).describe("A context-only computation used as a field default value.");
1415
1433
  var ValidationConfig = import_v43.default.object({
1416
1434
  validator: Conditional.describe(
1417
1435
  "Conditional expression that must hold for the field value to be considered valid."
@@ -1452,7 +1470,7 @@ var BaseField = import_v43.default.object({
1452
1470
  "Indicates whether the field can be modified during record correction."
1453
1471
  ),
1454
1472
  value: FieldReference.or(import_v43.default.array(FieldReference)).optional().describe(
1455
- "Reference to the source field or fields. When a value is defined, it is copied from the parent field when changed. If multiple references are provided, the first truthy value is used."
1473
+ "Reference to the source field or fields. When a value is defined, it is copied from the parent field when changed. If multiple references are provided, the first truthy value is used. A FieldReference with $$code computes the value via a custom client-side function."
1456
1474
  ),
1457
1475
  analytics: import_v43.default.boolean().default(false).optional().describe(
1458
1476
  "Indicates whether the field is included in analytics. When enabled, its value becomes available in the analytics dashboard."
@@ -1466,7 +1484,7 @@ var Divider = BaseField.extend({
1466
1484
  });
1467
1485
  var TextField = BaseField.extend({
1468
1486
  type: import_v43.default.literal(FieldType.TEXT),
1469
- defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
1487
+ defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField, ComputedDefaultValue]).optional(),
1470
1488
  configuration: import_v43.default.object({
1471
1489
  maxLength: import_v43.default.number().optional().describe("Maximum length of the text"),
1472
1490
  type: import_v43.default.enum(["text", "password"]).optional(),
@@ -1479,10 +1497,11 @@ var TextField = BaseField.extend({
1479
1497
  });
1480
1498
  var NumberField = BaseField.extend({
1481
1499
  type: import_v43.default.literal(FieldType.NUMBER),
1482
- defaultValue: NumberFieldValue.optional(),
1500
+ defaultValue: NumberFieldValue.or(ComputedDefaultValue).optional(),
1483
1501
  configuration: import_v43.default.object({
1484
1502
  min: import_v43.default.number().optional().describe("Minimum value"),
1485
1503
  max: import_v43.default.number().optional().describe("Maximum value"),
1504
+ integer: import_v43.default.boolean().optional().describe("When true, only whole numbers are allowed"),
1486
1505
  prefix: TranslationConfig.optional(),
1487
1506
  postfix: TranslationConfig.optional()
1488
1507
  }).optional()
@@ -1492,7 +1511,7 @@ var NumberField = BaseField.extend({
1492
1511
  });
1493
1512
  var TextAreaField = BaseField.extend({
1494
1513
  type: import_v43.default.literal(FieldType.TEXTAREA),
1495
- defaultValue: NonEmptyTextValue.optional(),
1514
+ defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
1496
1515
  configuration: import_v43.default.object({
1497
1516
  maxLength: import_v43.default.number().optional().describe("Maximum length of the text"),
1498
1517
  rows: import_v43.default.number().optional().describe("Number of visible text lines"),
@@ -1526,7 +1545,7 @@ var SignatureField = BaseField.extend({
1526
1545
  signaturePromptLabel: TranslationConfig.describe(
1527
1546
  "Title of the signature modal"
1528
1547
  ),
1529
- defaultValue: FieldValue.optional(),
1548
+ defaultValue: SignatureFieldValue.or(ComputedDefaultValue).optional(),
1530
1549
  configuration: import_v43.default.object({
1531
1550
  maxFileSize: import_v43.default.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
1532
1551
  acceptedFileTypes: MimeType.array().optional().describe("List of allowed file formats for the signature")
@@ -1542,14 +1561,14 @@ var EmailField = BaseField.extend({
1542
1561
  configuration: import_v43.default.object({
1543
1562
  maxLength: import_v43.default.number().optional().describe("Maximum length of the text")
1544
1563
  }).default({ maxLength: 255 }).optional(),
1545
- defaultValue: NonEmptyTextValue.optional()
1564
+ defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional()
1546
1565
  }).meta({
1547
1566
  description: "An email input field",
1548
1567
  id: "EmailField"
1549
1568
  });
1550
1569
  var DateField = BaseField.extend({
1551
1570
  type: import_v43.default.literal(FieldType.DATE),
1552
- defaultValue: SerializedNowDateTime.or(PlainDate).optional().describe("Default date value(yyyy-MM-dd)"),
1571
+ defaultValue: SerializedNowDateTime.or(PlainDate).or(ComputedDefaultValue).optional().describe("Default date value(yyyy-MM-dd)"),
1553
1572
  configuration: import_v43.default.object({
1554
1573
  notice: TranslationConfig.describe(
1555
1574
  "Text to display above the date input"
@@ -1561,7 +1580,7 @@ var DateField = BaseField.extend({
1561
1580
  });
1562
1581
  var AgeField = BaseField.extend({
1563
1582
  type: import_v43.default.literal(FieldType.AGE),
1564
- defaultValue: NumberFieldValue.optional(),
1583
+ defaultValue: NumberFieldValue.or(ComputedDefaultValue).optional(),
1565
1584
  configuration: import_v43.default.object({
1566
1585
  asOfDate: FieldReference,
1567
1586
  prefix: TranslationConfig.optional(),
@@ -1573,7 +1592,7 @@ var AgeField = BaseField.extend({
1573
1592
  });
1574
1593
  var TimeField = BaseField.extend({
1575
1594
  type: import_v43.default.literal(FieldType.TIME),
1576
- defaultValue: SerializedNowDateTime.or(TimeValue).optional().describe("Default time value (HH-mm)"),
1595
+ defaultValue: SerializedNowDateTime.or(TimeValue).or(ComputedDefaultValue).optional().describe("Default time value (HH-mm)"),
1577
1596
  configuration: import_v43.default.object({
1578
1597
  use12HourFormat: import_v43.default.boolean().optional().describe("Whether to use 12-hour format"),
1579
1598
  notice: TranslationConfig.describe(
@@ -1586,7 +1605,7 @@ var TimeField = BaseField.extend({
1586
1605
  });
1587
1606
  var DateRangeField = BaseField.extend({
1588
1607
  type: import_v43.default.literal(FieldType.DATE_RANGE),
1589
- defaultValue: DateRangeFieldValue.optional(),
1608
+ defaultValue: DateRangeFieldValue.or(ComputedDefaultValue).optional(),
1590
1609
  configuration: import_v43.default.object({
1591
1610
  notice: TranslationConfig.describe(
1592
1611
  "Text to display above the date input"
@@ -1665,7 +1684,7 @@ var PageHeader = BaseField.extend({
1665
1684
  });
1666
1685
  var File = BaseField.extend({
1667
1686
  type: import_v43.default.literal(FieldType.FILE),
1668
- defaultValue: FileFieldValue.optional(),
1687
+ defaultValue: FileFieldValue.or(ComputedDefaultValue).optional(),
1669
1688
  configuration: import_v43.default.object({
1670
1689
  maxFileSize: import_v43.default.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
1671
1690
  acceptedFileTypes: MimeType.array().optional().describe("List of allowed file formats for the signature"),
@@ -1692,7 +1711,7 @@ var SelectOption = import_v43.default.object({
1692
1711
  });
1693
1712
  var NumberWithUnitField = BaseField.extend({
1694
1713
  type: import_v43.default.literal(FieldType.NUMBER_WITH_UNIT),
1695
- defaultValue: NumberWithUnitFieldValue.optional(),
1714
+ defaultValue: NumberWithUnitFieldValue.or(ComputedDefaultValue).optional(),
1696
1715
  options: import_v43.default.array(SelectOption).describe("A list of options for the unit select"),
1697
1716
  configuration: import_v43.default.object({
1698
1717
  min: import_v43.default.number().optional().describe("Minimum value of the number field"),
@@ -1707,7 +1726,7 @@ var NumberWithUnitField = BaseField.extend({
1707
1726
  });
1708
1727
  var RadioGroup = BaseField.extend({
1709
1728
  type: import_v43.default.literal(FieldType.RADIO_GROUP),
1710
- defaultValue: TextValue.optional(),
1729
+ defaultValue: TextValue.or(ComputedDefaultValue).optional(),
1711
1730
  options: import_v43.default.array(SelectOption).describe("A list of options"),
1712
1731
  configuration: import_v43.default.object({
1713
1732
  styles: import_v43.default.object({
@@ -1732,7 +1751,7 @@ var BulletList = BaseField.extend({
1732
1751
  });
1733
1752
  var Select = BaseField.extend({
1734
1753
  type: import_v43.default.literal(FieldType.SELECT),
1735
- defaultValue: TextValue.optional(),
1754
+ defaultValue: TextValue.or(ComputedDefaultValue).optional(),
1736
1755
  options: import_v43.default.array(SelectOption).describe("A list of options"),
1737
1756
  noOptionsMessage: TranslationConfig.optional().describe(
1738
1757
  `
@@ -1754,7 +1773,7 @@ var SelectDateRangeOption = import_v43.default.object({
1754
1773
  });
1755
1774
  var SelectDateRangeField = BaseField.extend({
1756
1775
  type: import_v43.default.literal(FieldType.SELECT_DATE_RANGE),
1757
- defaultValue: SelectDateRangeValue.optional(),
1776
+ defaultValue: SelectDateRangeValue.or(ComputedDefaultValue).optional(),
1758
1777
  options: import_v43.default.array(SelectDateRangeOption).describe("A list of options")
1759
1778
  }).meta({
1760
1779
  description: "A date range selection field",
@@ -1771,7 +1790,7 @@ var NameField = BaseField.extend({
1771
1790
  firstname: SerializedUserField.or(NonEmptyTextValue).optional(),
1772
1791
  middlename: SerializedUserField.or(NonEmptyTextValue).optional(),
1773
1792
  surname: SerializedUserField.or(NonEmptyTextValue).optional()
1774
- }).optional(),
1793
+ }).or(ComputedDefaultValue).optional(),
1775
1794
  configuration: import_v43.default.object({
1776
1795
  name: NameConfig.default({
1777
1796
  firstname: { required: true },
@@ -1795,14 +1814,14 @@ var NameField = BaseField.extend({
1795
1814
  id: "NameField"
1796
1815
  });
1797
1816
  var PhoneField = BaseField.extend({
1798
- defaultValue: NonEmptyTextValue.optional(),
1817
+ defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
1799
1818
  type: import_v43.default.literal(FieldType.PHONE)
1800
1819
  }).meta({
1801
1820
  description: "A field for entering a phone number",
1802
1821
  id: "PhoneField"
1803
1822
  });
1804
1823
  var IdField = BaseField.extend({
1805
- defaultValue: NonEmptyTextValue.optional(),
1824
+ defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
1806
1825
  type: import_v43.default.literal(FieldType.ID)
1807
1826
  }).meta({
1808
1827
  description: "A field for entering an ID",
@@ -1810,14 +1829,14 @@ var IdField = BaseField.extend({
1810
1829
  });
1811
1830
  var Checkbox = BaseField.extend({
1812
1831
  type: import_v43.default.literal(FieldType.CHECKBOX),
1813
- defaultValue: CheckboxFieldValue.default(false)
1832
+ defaultValue: CheckboxFieldValue.or(ComputedDefaultValue).default(false)
1814
1833
  }).meta({
1815
1834
  description: "A boolean checkbox field",
1816
1835
  id: "Checkbox"
1817
1836
  });
1818
1837
  var Country = BaseField.extend({
1819
1838
  type: import_v43.default.literal(FieldType.COUNTRY),
1820
- defaultValue: NonEmptyTextValue.optional(),
1839
+ defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
1821
1840
  optionOverrides: import_v43.default.array(SelectOption.omit({ label: true })).optional().describe(
1822
1841
  "Conditionals for specific countries. Countries not listed are always shown and enabled."
1823
1842
  )
@@ -1835,7 +1854,7 @@ var AdministrativeAreas = import_v43.default.enum([
1835
1854
  ]);
1836
1855
  var AdministrativeAreaField = BaseField.extend({
1837
1856
  type: import_v43.default.literal(FieldType.ADMINISTRATIVE_AREA),
1838
- defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
1857
+ defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField, ComputedDefaultValue]).optional(),
1839
1858
  configuration: import_v43.default.object({
1840
1859
  partOf: FieldReference.optional().describe("Parent location"),
1841
1860
  type: AdministrativeAreas,
@@ -1847,7 +1866,7 @@ var AdministrativeAreaField = BaseField.extend({
1847
1866
  });
1848
1867
  var LocationInput = BaseField.extend({
1849
1868
  type: import_v43.default.literal(FieldType.LOCATION),
1850
- defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
1869
+ defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField, ComputedDefaultValue]).optional(),
1851
1870
  configuration: import_v43.default.object({
1852
1871
  locationTypes: import_v43.default.array(import_v43.default.string()).optional().describe("Types of the locations that are available for selection."),
1853
1872
  allowedLocations: AllowedLocations
@@ -1859,7 +1878,7 @@ var LocationInput = BaseField.extend({
1859
1878
  var FileUploadWithOptions = BaseField.extend({
1860
1879
  type: import_v43.default.literal(FieldType.FILE_WITH_OPTIONS),
1861
1880
  options: import_v43.default.array(SelectOption).describe("A list of options"),
1862
- defaultValue: FileFieldWithOptionValue.optional(),
1881
+ defaultValue: FileFieldWithOptionValue.or(ComputedDefaultValue).optional(),
1863
1882
  configuration: import_v43.default.object({
1864
1883
  maxFileSize: import_v43.default.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
1865
1884
  maxImageSize: import_v43.default.object({
@@ -1875,12 +1894,12 @@ var FileUploadWithOptions = BaseField.extend({
1875
1894
  });
1876
1895
  var Facility = BaseField.extend({
1877
1896
  type: import_v43.default.literal(FieldType.FACILITY),
1878
- defaultValue: NonEmptyTextValue.optional(),
1897
+ defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
1879
1898
  configuration: import_v43.default.object({ allowedLocations: AllowedLocations }).optional()
1880
1899
  }).describe("Input field for a facility");
1881
1900
  var Office = BaseField.extend({
1882
1901
  type: import_v43.default.literal(FieldType.OFFICE),
1883
- defaultValue: NonEmptyTextValue.optional(),
1902
+ defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
1884
1903
  configuration: import_v43.default.object({ allowedLocations: AllowedLocations }).optional()
1885
1904
  }).describe("Input field for an office");
1886
1905
  var DefaultAddressFieldValue = DomesticAddressFieldValue.extend({
@@ -1916,7 +1935,7 @@ var Address = BaseField.extend({
1916
1935
  ).optional(),
1917
1936
  allowedLocations: AllowedLocations
1918
1937
  }).optional(),
1919
- defaultValue: DefaultAddressFieldValue.optional()
1938
+ defaultValue: DefaultAddressFieldValue.or(ComputedDefaultValue).optional()
1920
1939
  }).meta({
1921
1940
  description: "Address input field \u2013 a combination of location and text fields",
1922
1941
  id: "Address"
@@ -1963,7 +1982,7 @@ var ButtonConfiguration = import_v43.default.object({
1963
1982
  });
1964
1983
  var ButtonField = BaseField.extend({
1965
1984
  type: import_v43.default.literal(FieldType.BUTTON),
1966
- defaultValue: ButtonFieldValue.optional(),
1985
+ defaultValue: ButtonFieldValue.or(ComputedDefaultValue).optional(),
1967
1986
  configuration: ButtonConfiguration
1968
1987
  }).meta({
1969
1988
  description: "A generic button that can be used to trigger an action",
@@ -1991,7 +2010,7 @@ var AlphaPrintButton = BaseField.extend({
1991
2010
  });
1992
2011
  var HttpField = BaseField.extend({
1993
2012
  type: import_v43.default.literal(FieldType.HTTP),
1994
- defaultValue: HttpFieldValue.optional(),
2013
+ defaultValue: HttpFieldValue.or(ComputedDefaultValue).optional(),
1995
2014
  configuration: import_v43.default.object({
1996
2015
  trigger: FieldReference.optional().describe(
1997
2016
  "Reference to the field that triggers the HTTP request when its value changes. If not provided, the HTTP request is triggered once on component mount."
@@ -2077,7 +2096,7 @@ var LinkButtonField = BaseField.extend({
2077
2096
  });
2078
2097
  var VerificationStatus = BaseField.extend({
2079
2098
  type: import_v43.default.literal(FieldType.VERIFICATION_STATUS),
2080
- defaultValue: VerificationStatusValue.optional(),
2099
+ defaultValue: VerificationStatusValue.or(ComputedDefaultValue).optional(),
2081
2100
  configuration: import_v43.default.object({
2082
2101
  status: TranslationConfig.describe("Text to display on the status pill."),
2083
2102
  description: TranslationConfig.describe(
@@ -2099,7 +2118,7 @@ var QueryParamReaderField = BaseField.extend({
2099
2118
  });
2100
2119
  var QrReaderField = BaseField.extend({
2101
2120
  type: import_v43.default.literal(FieldType.QR_READER),
2102
- defaultValue: QrReaderFieldValue.optional(),
2121
+ defaultValue: QrReaderFieldValue.or(ComputedDefaultValue).optional(),
2103
2122
  configuration: import_v43.default.object({
2104
2123
  validator: import_v43.default.any().meta({
2105
2124
  description: "JSON Schema to validate the scanned QR code data against before populating the form fields.",
@@ -2112,7 +2131,7 @@ var QrReaderField = BaseField.extend({
2112
2131
  });
2113
2132
  var IdReaderField = BaseField.extend({
2114
2133
  type: import_v43.default.literal(FieldType.ID_READER),
2115
- defaultValue: IdReaderFieldValue.optional(),
2134
+ defaultValue: IdReaderFieldValue.or(ComputedDefaultValue).optional(),
2116
2135
  methods: import_v43.default.array(
2117
2136
  import_v43.default.union([QrReaderField, LinkButtonField]).describe("Methods for reading an ID")
2118
2137
  )
@@ -2273,6 +2292,7 @@ var ClientConfig = z20.object({
2273
2292
  COUNTRY: z20.string(),
2274
2293
  LANGUAGES: z20.array(z20.string()),
2275
2294
  SENTRY: z20.string().optional(),
2295
+ LOGIN_URL: z20.string().optional(),
2276
2296
  REGISTER_BACKGROUND: BackgroundConfig,
2277
2297
  DASHBOARDS: z20.array(
2278
2298
  z20.object({
package/dist/cli.js CHANGED
@@ -2382,14 +2382,20 @@ var encodeScope = (scope) => {
2382
2382
  encode: false
2383
2383
  });
2384
2384
  };
2385
- var decodeScope = (query) => {
2386
- const scope = qs.parse(query, {
2385
+ var decodedScopeCache = /* @__PURE__ */ new Map();
2386
+ var decodeScope = (encodedScope) => {
2387
+ if (decodedScopeCache.has(encodedScope)) {
2388
+ return decodedScopeCache.get(encodedScope);
2389
+ }
2390
+ const scope = qs.parse(encodedScope, {
2387
2391
  ignoreQueryPrefix: true,
2388
2392
  comma: true,
2389
2393
  allowDots: true
2390
2394
  });
2391
2395
  const unflattenedScope = unflattenScope(scope);
2392
- return Scope2.safeParse(unflattenedScope)?.data;
2396
+ const result = Scope2.safeParse(unflattenedScope)?.data;
2397
+ decodedScopeCache.set(encodedScope, result);
2398
+ return result;
2393
2399
  };
2394
2400
  var DEFAULT_SCOPE_OPTIONS = {
2395
2401
  placeOfEvent: JurisdictionFilter.enum.all,
@@ -4294,7 +4300,7 @@ Saved ${handlerRelPath}.`);
4294
4300
  // src/migrations/v2.0/checkout-upstream-files.ts
4295
4301
  var import_child_process = require("child_process");
4296
4302
  var UPSTREAM_URL = "https://github.com/opencrvs/opencrvs-countryconfig.git";
4297
- var UPSTREAM_BRANCH = "release-v2.0.0";
4303
+ var UPSTREAM_BRANCH = "release/2.0.0";
4298
4304
  var TEMP_REMOTE = "opencrvs-upgrade-v19-v20-codemod";
4299
4305
  var FILES_TO_CHECKOUT = [
4300
4306
  "src/analytics/analytics.ts",