@opencrvs/toolkit 2.0.0-rc.a7c070e → 2.0.0-rc.a928ed6

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 (37) hide show
  1. package/dist/application-config/index.js +186 -58
  2. package/dist/cli.js +389 -127
  3. package/dist/commons/api/router.d.ts +3277 -230
  4. package/dist/commons/conditionals/validate.d.ts +1 -0
  5. package/dist/commons/events/ActionInput.d.ts +72 -0
  6. package/dist/commons/events/Draft.d.ts +2 -0
  7. package/dist/commons/events/EventIndex.d.ts +0 -3
  8. package/dist/commons/events/EventMetadata.d.ts +0 -7
  9. package/dist/commons/events/WorkqueueConfig.d.ts +150 -150
  10. package/dist/commons/events/state/index.d.ts +0 -4
  11. package/dist/commons/events/state/utils.d.ts +0 -2
  12. package/dist/commons/events/utils.d.ts +1 -1
  13. package/dist/events/index.js +212 -106
  14. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +1 -1
  15. package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -1
  16. package/dist/migrations/v2.0/checkout-upstream-files.js +1 -2
  17. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts +9 -1
  18. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts.map +1 -1
  19. package/dist/migrations/v2.0/delete-infrastructure-directory.js +66 -20
  20. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts +3 -0
  21. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts.map +1 -0
  22. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.js +110 -0
  23. package/dist/migrations/v2.0/index.d.ts +5 -3
  24. package/dist/migrations/v2.0/index.d.ts.map +1 -1
  25. package/dist/migrations/v2.0/index.js +387 -125
  26. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts +11 -1
  27. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts.map +1 -1
  28. package/dist/migrations/v2.0/merge-infrastructure-directory.js +17 -16
  29. package/dist/migrations/v2.0/migrate-scopes.d.ts.map +1 -1
  30. package/dist/migrations/v2.0/migrate-scopes.js +54 -30
  31. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts.map +1 -1
  32. package/dist/migrations/v2.0/migrate-workqueue-configs.js +140 -59
  33. package/dist/notification/index.js +199 -76
  34. package/opencrvs-toolkit-2.0.0-rc.a928ed6.tgz +0 -0
  35. package/package.json +1 -1
  36. package/tsconfig.tsbuildinfo +1 -1
  37. package/opencrvs-toolkit-2.0.0-rc.a7c070e.tgz +0 -0
@@ -652,7 +652,10 @@ var ActionConditional = z7.discriminatedUnion("type", [
652
652
  ShowConditional,
653
653
  // Action can be shown to the user in the list but as disabled
654
654
  EnableConditional
655
- ]);
655
+ ]).meta({
656
+ description: "Action conditional configuration",
657
+ id: "ActionConditional"
658
+ });
656
659
  var DisplayOnReviewConditional = z7.object({
657
660
  type: z7.literal(ConditionalType.DISPLAY_ON_REVIEW),
658
661
  conditional: Conditional
@@ -1303,6 +1306,9 @@ var FlagConfig = z15.object({
1303
1306
  "Indicates if this flag expects an action to be performed to be cleared."
1304
1307
  ),
1305
1308
  label: TranslationConfig.describe("Human readable label of the flag.")
1309
+ }).meta({
1310
+ description: "Flag configuration",
1311
+ id: "FlagConfig"
1306
1312
  });
1307
1313
  var ActionFlagConfig = z15.object({
1308
1314
  id: Flag,
@@ -1310,6 +1316,9 @@ var ActionFlagConfig = z15.object({
1310
1316
  conditional: Conditional.optional().describe(
1311
1317
  "When conditional is met, the operation is performed on the flag. If not provided, the operation is performed unconditionally."
1312
1318
  )
1319
+ }).meta({
1320
+ description: "Action flag configuration",
1321
+ id: "ActionFlagConfig"
1313
1322
  });
1314
1323
 
1315
1324
  // ../commons/src/events/EventMetadata.ts
@@ -1331,8 +1340,7 @@ var ActionCreationMetadata = z16.object({
1331
1340
  ),
1332
1341
  createdByUserType: z16.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
1333
1342
  acceptedAt: z16.iso.datetime().describe("Timestamp when the action request was accepted."),
1334
- createdByRole: z16.string().optional().describe("Role of the user at the time of action request creation."),
1335
- createdBySignature: z16.string().nullish().describe("Signature of the user who created the action request.")
1343
+ createdByRole: z16.string().optional().describe("Role of the user at the time of action request creation.")
1336
1344
  });
1337
1345
  var RegistrationCreationMetadata = ActionCreationMetadata.extend({
1338
1346
  registrationNumber: z16.string().describe(
@@ -1360,9 +1368,6 @@ var EventMetadata = z16.object({
1360
1368
  createdAtLocation: UUID.nullish().describe(
1361
1369
  "Location of the user who created the event."
1362
1370
  ),
1363
- createdBySignature: DocumentPath.nullish().describe(
1364
- "Signature of the user who created the event."
1365
- ),
1366
1371
  updatedAtLocation: UUID.nullish().describe(
1367
1372
  "Location of the user who last changed the status."
1368
1373
  ),
@@ -1655,7 +1660,7 @@ var FieldId = import_v43.default.string().superRefine((val, ctx) => {
1655
1660
  }
1656
1661
  }).describe("Unique identifier for the field");
1657
1662
  var FieldReference = import_v43.default.object({
1658
- $$field: FieldId,
1663
+ $$field: FieldId.describe("Id of the field to reference"),
1659
1664
  $$subfield: import_v43.default.array(import_v43.default.string()).optional().default([]).describe(
1660
1665
  'If the FieldValue is an object, subfield can be used to refer to e.g. `["foo", "bar"]` in `{ foo: { bar: 3 } }`'
1661
1666
  )
@@ -1701,6 +1706,9 @@ var BaseField = import_v43.default.object({
1701
1706
  }).describe("Common properties shared across all field types.");
1702
1707
  var Divider = BaseField.extend({
1703
1708
  type: import_v43.default.literal(FieldType.DIVIDER)
1709
+ }).meta({
1710
+ description: "A horizontal line divider",
1711
+ id: "Divider"
1704
1712
  });
1705
1713
  var TextField = BaseField.extend({
1706
1714
  type: import_v43.default.literal(FieldType.TEXT),
@@ -1711,7 +1719,10 @@ var TextField = BaseField.extend({
1711
1719
  prefix: TranslationConfig.optional(),
1712
1720
  postfix: TranslationConfig.optional()
1713
1721
  }).default({ type: "text" }).optional()
1714
- }).describe("Text input");
1722
+ }).meta({
1723
+ description: "A text input field",
1724
+ id: "TextField"
1725
+ });
1715
1726
  var NumberField = BaseField.extend({
1716
1727
  type: import_v43.default.literal(FieldType.NUMBER),
1717
1728
  defaultValue: NumberFieldValue.optional(),
@@ -1721,7 +1732,10 @@ var NumberField = BaseField.extend({
1721
1732
  prefix: TranslationConfig.optional(),
1722
1733
  postfix: TranslationConfig.optional()
1723
1734
  }).optional()
1724
- }).describe("Number input");
1735
+ }).meta({
1736
+ description: "A number input field",
1737
+ id: "NumberField"
1738
+ });
1725
1739
  var TextAreaField = BaseField.extend({
1726
1740
  type: import_v43.default.literal(FieldType.TEXTAREA),
1727
1741
  defaultValue: NonEmptyTextValue.optional(),
@@ -1732,7 +1746,10 @@ var TextAreaField = BaseField.extend({
1732
1746
  prefix: TranslationConfig.optional(),
1733
1747
  postfix: TranslationConfig.optional()
1734
1748
  }).default({ rows: 4 }).optional()
1735
- }).describe("Multiline text input");
1749
+ }).meta({
1750
+ description: "A multiline text input",
1751
+ id: "TextAreaField"
1752
+ });
1736
1753
  var ImageMimeType = import_v43.default.enum([
1737
1754
  "image/png",
1738
1755
  "image/jpg",
@@ -1762,13 +1779,19 @@ var SignatureField = BaseField.extend({
1762
1779
  }).default({
1763
1780
  maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
1764
1781
  })
1765
- }).describe("Signature input field");
1782
+ }).meta({
1783
+ description: "A signature input field",
1784
+ id: "SignatureField"
1785
+ });
1766
1786
  var EmailField = BaseField.extend({
1767
1787
  type: import_v43.default.literal(FieldType.EMAIL),
1768
1788
  configuration: import_v43.default.object({
1769
1789
  maxLength: import_v43.default.number().optional().describe("Maximum length of the text")
1770
1790
  }).default({ maxLength: 255 }).optional(),
1771
1791
  defaultValue: NonEmptyTextValue.optional()
1792
+ }).meta({
1793
+ description: "An email input field",
1794
+ id: "EmailField"
1772
1795
  });
1773
1796
  var DateField = BaseField.extend({
1774
1797
  type: import_v43.default.literal(FieldType.DATE),
@@ -1778,7 +1801,10 @@ var DateField = BaseField.extend({
1778
1801
  "Text to display above the date input"
1779
1802
  ).optional()
1780
1803
  }).optional()
1781
- }).describe("A single date input (yyyy-MM-dd)");
1804
+ }).meta({
1805
+ description: "A date input (yyyy-MM-dd)",
1806
+ id: "DateField"
1807
+ });
1782
1808
  var AgeField = BaseField.extend({
1783
1809
  type: import_v43.default.literal(FieldType.AGE),
1784
1810
  defaultValue: NumberFieldValue.optional(),
@@ -1787,7 +1813,10 @@ var AgeField = BaseField.extend({
1787
1813
  prefix: TranslationConfig.optional(),
1788
1814
  postfix: TranslationConfig.optional()
1789
1815
  })
1790
- }).describe("An age input field which uses the current date as the asOfDate");
1816
+ }).meta({
1817
+ description: "An age input field which uses the current date as the asOfDate",
1818
+ id: "AgeField"
1819
+ });
1791
1820
  var TimeField = BaseField.extend({
1792
1821
  type: import_v43.default.literal(FieldType.TIME),
1793
1822
  defaultValue: SerializedNowDateTime.or(TimeValue).optional().describe("Default time value (HH-mm)"),
@@ -1797,7 +1826,10 @@ var TimeField = BaseField.extend({
1797
1826
  "Text to display above the time input"
1798
1827
  ).optional()
1799
1828
  }).optional()
1800
- }).describe("A single date input (HH-mm)");
1829
+ }).meta({
1830
+ description: "A single time input (HH-mm)",
1831
+ id: "TimeField"
1832
+ });
1801
1833
  var DateRangeField = BaseField.extend({
1802
1834
  type: import_v43.default.literal(FieldType.DATE_RANGE),
1803
1835
  defaultValue: DateRangeFieldValue.optional(),
@@ -1806,7 +1838,10 @@ var DateRangeField = BaseField.extend({
1806
1838
  "Text to display above the date input"
1807
1839
  ).optional()
1808
1840
  }).optional()
1809
- }).describe("A date range input ({ start: yyyy-MM-dd, end: yyyy-MM-dd })");
1841
+ }).meta({
1842
+ description: "A date range input ({ start: yyyy-MM-dd, end: yyyy-MM-dd })",
1843
+ id: "DateRangeField"
1844
+ });
1810
1845
  var HtmlFontVariant = import_v43.default.enum([
1811
1846
  "reg12",
1812
1847
  "reg14",
@@ -1850,18 +1885,30 @@ var ImageViewField = BaseField.extend({
1850
1885
  type: import_v43.default.literal(FieldType.IMAGE_VIEW),
1851
1886
  defaultValue: NonEmptyTextValue.optional(),
1852
1887
  configuration: ImageConfiguration
1853
- }).describe("A read-only image component for form pages");
1888
+ }).meta({
1889
+ description: "A read-only image component for form pages",
1890
+ id: "ImageViewField"
1891
+ });
1854
1892
  var Paragraph = BaseField.extend({
1855
1893
  type: import_v43.default.literal(FieldType.PARAGRAPH),
1856
1894
  configuration: ParagraphConfiguration
1857
- }).describe("A read-only HTML <p> paragraph");
1895
+ }).meta({
1896
+ description: "A read-only HTML <p> paragraph",
1897
+ id: "Paragraph"
1898
+ });
1858
1899
  var Heading = BaseField.extend({
1859
1900
  type: import_v43.default.literal(FieldType.HEADING),
1860
1901
  configuration: HeadingConfiguration
1861
- }).describe("A read-only heading component for form pages");
1902
+ }).meta({
1903
+ description: "A read-only heading component for form pages",
1904
+ id: "Heading"
1905
+ });
1862
1906
  var PageHeader = BaseField.extend({
1863
1907
  type: import_v43.default.literal(FieldType.PAGE_HEADER)
1864
- }).describe("A read-only header component for form pages");
1908
+ }).meta({
1909
+ description: "A read-only header component for form pages",
1910
+ id: "PageHeader"
1911
+ });
1865
1912
  var File = BaseField.extend({
1866
1913
  type: import_v43.default.literal(FieldType.FILE),
1867
1914
  defaultValue: FileFieldValue.optional(),
@@ -1880,7 +1927,10 @@ var File = BaseField.extend({
1880
1927
  }).default({
1881
1928
  maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
1882
1929
  })
1883
- }).describe("File upload");
1930
+ }).meta({
1931
+ description: "A file upload field",
1932
+ id: "File"
1933
+ });
1884
1934
  var SelectOption = import_v43.default.object({
1885
1935
  value: import_v43.default.string().describe("The value of the option"),
1886
1936
  label: import_v43.default.union([import_v43.default.string(), TranslationConfig]).describe("The label of the option"),
@@ -1897,7 +1947,10 @@ var NumberWithUnitField = BaseField.extend({
1897
1947
  "Placeholder for the number field"
1898
1948
  )
1899
1949
  }).optional()
1900
- }).describe("Number with unit input");
1950
+ }).meta({
1951
+ description: "A number with unit input field",
1952
+ id: "NumberWithUnitField"
1953
+ });
1901
1954
  var RadioGroup = BaseField.extend({
1902
1955
  type: import_v43.default.literal(FieldType.RADIO_GROUP),
1903
1956
  defaultValue: TextValue.optional(),
@@ -1907,7 +1960,10 @@ var RadioGroup = BaseField.extend({
1907
1960
  size: import_v43.default.enum(["NORMAL", "LARGE"]).optional()
1908
1961
  }).optional()
1909
1962
  }).optional()
1910
- }).describe("Grouped radio options");
1963
+ }).meta({
1964
+ description: "A grouped radio button field",
1965
+ id: "RadioGroup"
1966
+ });
1911
1967
  var BulletList = BaseField.extend({
1912
1968
  type: import_v43.default.literal(FieldType.BULLET_LIST),
1913
1969
  items: import_v43.default.array(TranslationConfig).describe("A list of items"),
@@ -1916,7 +1972,10 @@ var BulletList = BaseField.extend({
1916
1972
  fontVariant: HtmlFontVariant.optional()
1917
1973
  }).optional()
1918
1974
  }).default({})
1919
- }).describe("A list of bullet points");
1975
+ }).meta({
1976
+ description: "A list of bullet points",
1977
+ id: "BulletList"
1978
+ });
1920
1979
  var Select = BaseField.extend({
1921
1980
  type: import_v43.default.literal(FieldType.SELECT),
1922
1981
  defaultValue: TextValue.optional(),
@@ -1931,7 +1990,10 @@ var Select = BaseField.extend({
1931
1990
  { ..., defaultMessage: "'{input}' is not listed among the health facilities." }
1932
1991
  `
1933
1992
  )
1934
- }).describe("Select input");
1993
+ }).meta({
1994
+ description: "A select input field",
1995
+ id: "Select"
1996
+ });
1935
1997
  var SelectDateRangeOption = import_v43.default.object({
1936
1998
  value: SelectDateRangeValue.describe("The value of the option"),
1937
1999
  label: TranslationConfig.describe("The label of the option")
@@ -1940,7 +2002,10 @@ var SelectDateRangeField = BaseField.extend({
1940
2002
  type: import_v43.default.literal(FieldType.SELECT_DATE_RANGE),
1941
2003
  defaultValue: SelectDateRangeValue.optional(),
1942
2004
  options: import_v43.default.array(SelectDateRangeOption).describe("A list of options")
1943
- }).describe("Select input with date range options");
2005
+ }).meta({
2006
+ description: "A date range selection field",
2007
+ id: "SelectDateRangeField"
2008
+ });
1944
2009
  var NameConfig = import_v43.default.object({
1945
2010
  firstname: import_v43.default.object({ required: requiredSchema, label: TranslationConfig.optional() }).optional(),
1946
2011
  middlename: import_v43.default.object({ required: requiredSchema, label: TranslationConfig.optional() }).optional(),
@@ -1971,26 +2036,41 @@ var NameField = BaseField.extend({
1971
2036
  surname: { required: true }
1972
2037
  }
1973
2038
  }).optional()
1974
- }).describe("Name input field");
2039
+ }).meta({
2040
+ description: "A field for entering a persons name",
2041
+ id: "NameField"
2042
+ });
1975
2043
  var PhoneField = BaseField.extend({
1976
2044
  defaultValue: NonEmptyTextValue.optional(),
1977
2045
  type: import_v43.default.literal(FieldType.PHONE)
1978
- }).describe("Phone input field");
2046
+ }).meta({
2047
+ description: "A field for entering a phone number",
2048
+ id: "PhoneField"
2049
+ });
1979
2050
  var IdField = BaseField.extend({
1980
2051
  defaultValue: NonEmptyTextValue.optional(),
1981
2052
  type: import_v43.default.literal(FieldType.ID)
1982
- }).describe("ID input field");
2053
+ }).meta({
2054
+ description: "A field for entering an ID",
2055
+ id: "IdField"
2056
+ });
1983
2057
  var Checkbox = BaseField.extend({
1984
2058
  type: import_v43.default.literal(FieldType.CHECKBOX),
1985
2059
  defaultValue: CheckboxFieldValue.default(false)
1986
- }).describe("Boolean checkbox field");
2060
+ }).meta({
2061
+ description: "A boolean checkbox field",
2062
+ id: "Checkbox"
2063
+ });
1987
2064
  var Country = BaseField.extend({
1988
2065
  type: import_v43.default.literal(FieldType.COUNTRY),
1989
2066
  defaultValue: NonEmptyTextValue.optional(),
1990
2067
  optionOverrides: import_v43.default.array(SelectOption.omit({ label: true })).optional().describe(
1991
2068
  "Conditionals for specific countries. Countries not listed are always shown and enabled."
1992
2069
  )
1993
- }).describe("Country select field");
2070
+ }).meta({
2071
+ description: "A field for selecting a country",
2072
+ id: "Country"
2073
+ });
1994
2074
  var AllowedLocations = JurisdictionReference.optional().describe(
1995
2075
  "Limits which location options are selectable depending on user jurisdiction and location."
1996
2076
  );
@@ -1999,16 +2079,18 @@ var AdministrativeAreas = import_v43.default.enum([
1999
2079
  "HEALTH_FACILITY",
2000
2080
  "CRVS_OFFICE"
2001
2081
  ]);
2002
- var AdministrativeAreaConfiguration = import_v43.default.object({
2003
- partOf: FieldReference.optional().describe("Parent location"),
2004
- type: AdministrativeAreas,
2005
- allowedLocations: AllowedLocations
2006
- }).describe("Administrative area options");
2007
2082
  var AdministrativeAreaField = BaseField.extend({
2008
2083
  type: import_v43.default.literal(FieldType.ADMINISTRATIVE_AREA),
2009
2084
  defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
2010
- configuration: AdministrativeAreaConfiguration
2011
- }).describe("Administrative area input field e.g. facility, office");
2085
+ configuration: import_v43.default.object({
2086
+ partOf: FieldReference.optional().describe("Parent location"),
2087
+ type: AdministrativeAreas,
2088
+ allowedLocations: AllowedLocations
2089
+ }).describe("Administrative area options")
2090
+ }).meta({
2091
+ description: "Administrative area input field",
2092
+ id: "AdministrativeAreaField"
2093
+ });
2012
2094
  var LocationInput = BaseField.extend({
2013
2095
  type: import_v43.default.literal(FieldType.LOCATION),
2014
2096
  defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
@@ -2016,7 +2098,10 @@ var LocationInput = BaseField.extend({
2016
2098
  locationTypes: import_v43.default.array(import_v43.default.string()).optional().describe("Types of the locations that are available for selection."),
2017
2099
  allowedLocations: AllowedLocations
2018
2100
  }).optional()
2019
- }).describe("Input field for a location");
2101
+ }).meta({
2102
+ description: "A field for selecting a location",
2103
+ id: "LocationInput"
2104
+ });
2020
2105
  var FileUploadWithOptions = BaseField.extend({
2021
2106
  type: import_v43.default.literal(FieldType.FILE_WITH_OPTIONS),
2022
2107
  options: import_v43.default.array(SelectOption).describe("A list of options"),
@@ -2030,6 +2115,9 @@ var FileUploadWithOptions = BaseField.extend({
2030
2115
  }).default({
2031
2116
  maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
2032
2117
  })
2118
+ }).meta({
2119
+ description: "A field for uploading files with file type options",
2120
+ id: "FileUploadWithOptions"
2033
2121
  });
2034
2122
  var Facility = BaseField.extend({
2035
2123
  type: import_v43.default.literal(FieldType.FACILITY),
@@ -2075,7 +2163,10 @@ var Address = BaseField.extend({
2075
2163
  allowedLocations: AllowedLocations
2076
2164
  }).optional(),
2077
2165
  defaultValue: DefaultAddressFieldValue.optional()
2078
- }).describe("Address input field \u2013 a combination of location and text fields");
2166
+ }).meta({
2167
+ description: "Address input field \u2013 a combination of location and text fields",
2168
+ id: "Address"
2169
+ });
2079
2170
  var StaticDataEntry = import_v43.default.object({
2080
2171
  id: import_v43.default.string().describe("ID for the data entry."),
2081
2172
  label: TranslationConfig,
@@ -2090,7 +2181,10 @@ var DataField = BaseField.extend({
2090
2181
  subtitle: TranslationConfig.optional(),
2091
2182
  data: import_v43.default.array(DataEntry)
2092
2183
  })
2093
- }).describe("Data field for displaying read-only data");
2184
+ }).meta({
2185
+ description: "A field for displaying a table of read-only data",
2186
+ id: "DataField"
2187
+ });
2094
2188
  var ButtonSize = import_v43.default.enum(["small", "medium", "large"]);
2095
2189
  var ButtonType = import_v43.default.enum([
2096
2190
  "primary",
@@ -2117,11 +2211,17 @@ var ButtonField = BaseField.extend({
2117
2211
  type: import_v43.default.literal(FieldType.BUTTON),
2118
2212
  defaultValue: ButtonFieldValue.optional(),
2119
2213
  configuration: ButtonConfiguration
2120
- }).describe("Generic button without any built-in functionality");
2214
+ }).meta({
2215
+ description: "A generic button that can be used to trigger an action",
2216
+ id: "ButtonField"
2217
+ });
2121
2218
  var FieldGroup = BaseField.extend({
2122
2219
  type: import_v43.default.literal(FieldType.FIELD_GROUP),
2123
2220
  // eslint-disable-next-line @typescript-eslint/no-use-before-define
2124
2221
  fields: import_v43.default.lazy(() => import_v43.default.array(FieldConfig))
2222
+ }).meta({
2223
+ description: "A group of fields that are displayed together",
2224
+ id: "FieldGroup"
2125
2225
  });
2126
2226
  var AlphaPrintButton = BaseField.extend({
2127
2227
  type: import_v43.default.literal(FieldType.ALPHA_PRINT_BUTTON),
@@ -2131,7 +2231,10 @@ var AlphaPrintButton = BaseField.extend({
2131
2231
  "Label for the print button"
2132
2232
  )
2133
2233
  })
2134
- }).describe("Print button field for printing certificates");
2234
+ }).meta({
2235
+ description: "An experimental print button field for printing certificates during the declaration process",
2236
+ id: "AlphaPrintButton"
2237
+ });
2135
2238
  var HttpField = BaseField.extend({
2136
2239
  type: import_v43.default.literal(FieldType.HTTP),
2137
2240
  defaultValue: HttpFieldValue.optional(),
@@ -2147,7 +2250,10 @@ var HttpField = BaseField.extend({
2147
2250
  params: import_v43.default.record(import_v43.default.string(), import_v43.default.union([import_v43.default.string(), FieldReference])).optional(),
2148
2251
  timeout: import_v43.default.number().default(15e3).describe("Request timeout in milliseconds")
2149
2252
  })
2150
- }).describe("HTTP request function triggered by a button click or other event");
2253
+ }).meta({
2254
+ description: "Makes a background HTTP request to an external service and stores the response so other fields can use it. Has no visible UI \u2014 pair with LOADER to show request status.",
2255
+ id: "HttpField"
2256
+ });
2151
2257
  var AutocompleteField = BaseField.extend({
2152
2258
  type: import_v43.default.literal(FieldType.AUTOCOMPLETE),
2153
2259
  configuration: import_v43.default.object({
@@ -2160,7 +2266,10 @@ var AutocompleteField = BaseField.extend({
2160
2266
  })
2161
2267
  ).optional()
2162
2268
  })
2163
- }).describe("Autocomplete input field");
2269
+ }).meta({
2270
+ description: "Autocomplete input field",
2271
+ id: "AutocompleteField"
2272
+ });
2164
2273
  var SearchField = HttpField.extend({
2165
2274
  type: import_v43.default.literal(FieldType.SEARCH),
2166
2275
  configuration: SearchQuery.pick({
@@ -2193,6 +2302,9 @@ var SearchField = HttpField.extend({
2193
2302
  ok: TranslationConfig.optional()
2194
2303
  }).optional()
2195
2304
  })
2305
+ }).meta({
2306
+ description: "A search input field",
2307
+ id: "SearchField"
2196
2308
  });
2197
2309
  var LinkButtonField = BaseField.extend({
2198
2310
  type: import_v43.default.literal(FieldType.LINK_BUTTON),
@@ -2201,7 +2313,10 @@ var LinkButtonField = BaseField.extend({
2201
2313
  text: TranslationConfig.describe("Text to display on the button"),
2202
2314
  icon: import_v43.default.string().optional().describe("Icon for the button. You can find icons from OpenCRVS UI-Kit.")
2203
2315
  })
2204
- }).describe("Button that opens a link");
2316
+ }).meta({
2317
+ description: "A button that opens a URL link",
2318
+ id: "LinkButtonField"
2319
+ });
2205
2320
  var VerificationStatus = BaseField.extend({
2206
2321
  type: import_v43.default.literal(FieldType.VERIFICATION_STATUS),
2207
2322
  defaultValue: VerificationStatusValue.optional(),
@@ -2211,15 +2326,19 @@ var VerificationStatus = BaseField.extend({
2211
2326
  "Explaining text on the banner in form."
2212
2327
  )
2213
2328
  })
2329
+ }).meta({
2330
+ description: "Displays a verification state (e.g. ID verified / pending). Often paired with ID_READER \u2014 it can read its value off an ID_READER rather than holding its own.",
2331
+ id: "VerificationStatus"
2214
2332
  });
2215
2333
  var QueryParamReaderField = BaseField.extend({
2216
2334
  type: import_v43.default.literal(FieldType.QUERY_PARAM_READER),
2217
2335
  configuration: import_v43.default.object({
2218
2336
  pickParams: import_v43.default.array(import_v43.default.string()).describe("List of query parameters to read from the URL")
2219
2337
  })
2220
- }).describe(
2221
- "A field that maps URL query params into form values and clears them afterward"
2222
- );
2338
+ }).meta({
2339
+ description: "A field that maps URL query params into form values and clears them afterward",
2340
+ id: "QueryParamReaderField"
2341
+ });
2223
2342
  var QrReaderField = BaseField.extend({
2224
2343
  type: import_v43.default.literal(FieldType.QR_READER),
2225
2344
  defaultValue: QrReaderFieldValue.optional(),
@@ -2230,7 +2349,7 @@ var QrReaderField = BaseField.extend({
2230
2349
  })
2231
2350
  }).optional()
2232
2351
  }).meta({
2233
- description: "Configuration for QR code reader field, including optional JSON Schema validator.",
2352
+ description: "QR code reader field, including optional JSON Schema validator.",
2234
2353
  id: "QrReaderField"
2235
2354
  });
2236
2355
  var IdReaderField = BaseField.extend({
@@ -2239,12 +2358,18 @@ var IdReaderField = BaseField.extend({
2239
2358
  methods: import_v43.default.array(
2240
2359
  import_v43.default.union([QrReaderField, LinkButtonField]).describe("Methods for reading an ID")
2241
2360
  )
2361
+ }).meta({
2362
+ description: "A wrapper around nested form fields, specifically QR_READER and LINK_BUTTON. It can hold the QR_READERs value.",
2363
+ id: "IdReaderField"
2242
2364
  });
2243
2365
  var CustomField = BaseField.extend({
2244
2366
  type: import_v43.default.literal(FieldType._EXPERIMENTAL_CUSTOM),
2245
2367
  defaultValue: CustomFieldValue.optional(),
2246
2368
  src: import_v43.default.string().describe("Module source path for the custom field component"),
2247
2369
  configuration: import_v43.default.unknown().optional()
2370
+ }).meta({
2371
+ description: "An expiremental custom field that is defined by a module source path",
2372
+ id: "CustomField"
2248
2373
  });
2249
2374
  var FieldStyleVariant = import_v43.default.enum(["default", "highlighted"]);
2250
2375
  var LoaderField = BaseField.extend({
@@ -2254,22 +2379,25 @@ var LoaderField = BaseField.extend({
2254
2379
  configuration: import_v43.default.object({
2255
2380
  text: TranslationConfig.describe("Display text above the loading spinner")
2256
2381
  })
2257
- }).describe(
2258
- "A non-interactive field that indicates an in progress operation in form"
2259
- );
2382
+ }).meta({
2383
+ description: "A non-interactive field that indicates an in progress operation in form",
2384
+ id: "LoaderField"
2385
+ });
2260
2386
  var HiddenField = BaseField.extend({
2261
2387
  type: import_v43.default.literal(FieldType.ALPHA_HIDDEN),
2262
2388
  required: import_v43.default.boolean().default(false).optional(),
2263
2389
  defaultValue: TextValue.optional()
2264
- }).describe(
2265
- "A non-interactive, hidden field that only hold a value in the form"
2266
- );
2390
+ }).meta({
2391
+ description: "A non-interactive, hidden field that only hold a value in the form",
2392
+ id: "HiddenField"
2393
+ });
2267
2394
  var UserRoleField = BaseField.extend({
2268
2395
  type: import_v43.default.literal(FieldType.USER_ROLE),
2269
2396
  defaultValue: TextValue.optional()
2270
- }).describe(
2271
- "A select dropdown that is automatically populated with available user roles"
2272
- );
2397
+ }).meta({
2398
+ description: "A select dropdown that is automatically populated with available user roles",
2399
+ id: "UserRoleField"
2400
+ });
2273
2401
  var FieldConfig = import_v43.default.discriminatedUnion("type", [
2274
2402
  FieldGroup,
2275
2403
  Address,
@@ -2368,10 +2496,10 @@ var VerificationPageConfig = FormPageConfig.extend({
2368
2496
  type: z21.literal(PageTypes.enum.VERIFICATION),
2369
2497
  actions: VerificationActionConfig
2370
2498
  });
2371
- var PageConfig = z21.discriminatedUnion("type", [
2372
- FormPageConfig,
2373
- VerificationPageConfig
2374
- ]);
2499
+ var PageConfig = z21.discriminatedUnion("type", [FormPageConfig, VerificationPageConfig]).meta({
2500
+ description: "Page configuration",
2501
+ id: "PageConfig"
2502
+ });
2375
2503
 
2376
2504
  // ../commons/src/events/FormConfig.ts
2377
2505
  var DeclarationFormConfig = z22.object({
@@ -3671,7 +3799,7 @@ var _EventConfigBase = z33.object({
3671
3799
  ),
3672
3800
  label: TranslationConfig.describe("Human-readable label for the event type."),
3673
3801
  actions: z33.array(ActionConfig).describe(
3674
- "Configuration of system-defined actions associated with the event."
3802
+ "Configuration of core and custom actions associated with the event."
3675
3803
  ),
3676
3804
  actionOrder: z33.array(z33.string()).optional().describe(
3677
3805
  "Order of actions in the action menu. Use either the action type for core actions or the customActionType for custom actions."
@@ -3683,7 +3811,7 @@ var _EventConfigBase = z33.object({
3683
3811
  "Configuration of fields available in the advanced search feature."
3684
3812
  ),
3685
3813
  flags: z33.array(FlagConfig).optional().default([]).describe(
3686
- "Configuration of flags associated with the actions of this event type."
3814
+ "Configuration of custom flags associated with the actions of this event type."
3687
3815
  ),
3688
3816
  analytics: z33.boolean().optional().default(true).describe(
3689
3817
  "Indicates whether the records of this event type are included in analytics"
@@ -4121,18 +4249,11 @@ var WorkqueueConfigWithoutQuery = WorkqueueConfig.omit({
4121
4249
  query: true,
4122
4250
  columns: true
4123
4251
  });
4124
- var WorkqueueConfigInput = z37.object({
4125
- slug: z37.string().describe("Determines the url of the workqueue."),
4126
- name: TranslationConfig.describe(
4127
- "Title of the workflow (both in navigation and on the page)"
4128
- ),
4129
- query: CountryConfigQueryInputType,
4130
- action: z37.object({ type: WorkqueueActionType }).optional().describe(
4131
- "Workqueue call-to-action button configuration. This determines the quick action button shown on each event card and the action taken when the button is clicked."
4132
- ),
4133
- columns: z37.array(WorkqueueColumn).default(mandatoryColumns),
4134
- icon: AvailableIcons,
4135
- emptyMessage: TranslationConfig.optional()
4252
+ var WorkqueueConfigInput = WorkqueueConfig.extend({
4253
+ query: CountryConfigQueryInputType
4254
+ }).meta({
4255
+ description: "Workqueue configuration",
4256
+ id: "WorkqueueConfig"
4136
4257
  });
4137
4258
  var WorkqueueCountInput = z37.array(
4138
4259
  z37.object({ slug: z37.string(), query: QueryType })
@@ -4172,6 +4293,8 @@ var BaseActionInput = z38.object({
4172
4293
  originalActionId: UUID.optional(),
4173
4294
  // should not be part of base action.
4174
4295
  keepAssignment: z38.boolean().optional(),
4296
+ keepAssignmentIfAccepted: z38.boolean().optional(),
4297
+ keepAssignmentIfRejected: z38.boolean().optional(),
4175
4298
  waitFor: z38.boolean().optional(),
4176
4299
  // For normal users, the createdAtLocation is resolved on the backend from the user's primaryOfficeId.
4177
4300
  // @TODO: createdAtLocation should be limited to actions that system users can perform. For normal users, it should not be part of the base action.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencrvs/toolkit",
3
- "version": "2.0.0-rc.a7c070e",
3
+ "version": "2.0.0-rc.a928ed6",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "bin": {
@@ -1 +1 @@
1
- {"root":["./src/cli.ts","./src/api/index.ts","./src/application-config/index.ts","./src/conditionals/index.ts","./src/events/deduplication.ts","./src/events/index.ts","./src/migrations/v2.0/add-birth-certificate-issuance-flag.ts","./src/migrations/v2.0/add-resend-invite-notification.ts","./src/migrations/v2.0/checkout-upstream-files.ts","./src/migrations/v2.0/convert-config-files-to-ts.ts","./src/migrations/v2.0/convert-paragraph-to-heading.ts","./src/migrations/v2.0/create-events-index.ts","./src/migrations/v2.0/delete-infrastructure-directory.ts","./src/migrations/v2.0/index.ts","./src/migrations/v2.0/make-built-in-validate-actions-custom.ts","./src/migrations/v2.0/merge-infrastructure-directory.ts","./src/migrations/v2.0/migrate-application-config-url.ts","./src/migrations/v2.0/migrate-scopes.ts","./src/migrations/v2.0/migrate-validated-workqueue-status-to-flag.ts","./src/migrations/v2.0/migrate-workqueue-configs.ts","./src/migrations/v2.0/remove-delete-actions.ts","./src/migrations/v2.0/remove-demo-scope.ts","./src/migrations/v2.0/remove-deprecated-imports.ts","./src/migrations/v2.0/remove-fhir-url-helpers.ts","./src/migrations/v2.0/remove-hearth-migrations.ts","./src/migrations/v2.0/remove-old-statistics-service.ts","./src/migrations/v2.0/remove-pending-certification-flag.ts","./src/migrations/v2.0/remove-review-from-register-action.ts","./src/migrations/v2.0/remove-unused-environment-variables.ts","./src/migrations/v2.0/rename-api-paths.ts","./src/migrations/v2.0/rename-location-parent-id.ts","./src/migrations/v2.0/simplify-analytics-precalculations.ts","./src/migrations/v2.0/update-package-json.ts","./src/notification/index.ts","./src/scopes/index.ts"],"version":"5.6.3"}
1
+ {"root":["./src/cli.ts","./src/api/index.ts","./src/application-config/index.ts","./src/conditionals/index.ts","./src/events/deduplication.ts","./src/events/index.ts","./src/migrations/v2.0/add-birth-certificate-issuance-flag.ts","./src/migrations/v2.0/add-resend-invite-notification.ts","./src/migrations/v2.0/checkout-upstream-files.ts","./src/migrations/v2.0/convert-config-files-to-ts.ts","./src/migrations/v2.0/convert-paragraph-to-heading.ts","./src/migrations/v2.0/create-events-index.ts","./src/migrations/v2.0/delete-infrastructure-directory.ts","./src/migrations/v2.0/fix-accept-requested-registration-function-type.ts","./src/migrations/v2.0/index.ts","./src/migrations/v2.0/make-built-in-validate-actions-custom.ts","./src/migrations/v2.0/merge-infrastructure-directory.ts","./src/migrations/v2.0/migrate-application-config-url.ts","./src/migrations/v2.0/migrate-scopes.ts","./src/migrations/v2.0/migrate-validated-workqueue-status-to-flag.ts","./src/migrations/v2.0/migrate-workqueue-configs.ts","./src/migrations/v2.0/remove-delete-actions.ts","./src/migrations/v2.0/remove-demo-scope.ts","./src/migrations/v2.0/remove-deprecated-imports.ts","./src/migrations/v2.0/remove-fhir-url-helpers.ts","./src/migrations/v2.0/remove-hearth-migrations.ts","./src/migrations/v2.0/remove-old-statistics-service.ts","./src/migrations/v2.0/remove-pending-certification-flag.ts","./src/migrations/v2.0/remove-review-from-register-action.ts","./src/migrations/v2.0/remove-unused-environment-variables.ts","./src/migrations/v2.0/rename-api-paths.ts","./src/migrations/v2.0/rename-location-parent-id.ts","./src/migrations/v2.0/simplify-analytics-precalculations.ts","./src/migrations/v2.0/update-package-json.ts","./src/notification/index.ts","./src/scopes/index.ts"],"version":"5.6.3"}