@opencrvs/toolkit 2.0.0-rc.f58809d → 2.0.0-rc.f5b6bcb

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.
@@ -75,7 +75,10 @@ var ActionConditional = z.discriminatedUnion("type", [
75
75
  ShowConditional,
76
76
  // Action can be shown to the user in the list but as disabled
77
77
  EnableConditional
78
- ]);
78
+ ]).meta({
79
+ description: "Action conditional configuration",
80
+ id: "ActionConditional"
81
+ });
79
82
  var DisplayOnReviewConditional = z.object({
80
83
  type: z.literal(ConditionalType.DISPLAY_ON_REVIEW),
81
84
  conditional: Conditional
@@ -1077,6 +1080,9 @@ var FlagConfig = z14.object({
1077
1080
  "Indicates if this flag expects an action to be performed to be cleared."
1078
1081
  ),
1079
1082
  label: TranslationConfig.describe("Human readable label of the flag.")
1083
+ }).meta({
1084
+ description: "Flag configuration",
1085
+ id: "FlagConfig"
1080
1086
  });
1081
1087
  var ActionFlagConfig = z14.object({
1082
1088
  id: Flag,
@@ -1084,6 +1090,9 @@ var ActionFlagConfig = z14.object({
1084
1090
  conditional: Conditional.optional().describe(
1085
1091
  "When conditional is met, the operation is performed on the flag. If not provided, the operation is performed unconditionally."
1086
1092
  )
1093
+ }).meta({
1094
+ description: "Action flag configuration",
1095
+ id: "ActionFlagConfig"
1087
1096
  });
1088
1097
 
1089
1098
  // ../commons/src/events/EventMetadata.ts
@@ -1105,8 +1114,7 @@ var ActionCreationMetadata = z15.object({
1105
1114
  ),
1106
1115
  createdByUserType: z15.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
1107
1116
  acceptedAt: z15.iso.datetime().describe("Timestamp when the action request was accepted."),
1108
- createdByRole: z15.string().optional().describe("Role of the user at the time of action request creation."),
1109
- createdBySignature: z15.string().nullish().describe("Signature of the user who created the action request.")
1117
+ createdByRole: z15.string().optional().describe("Role of the user at the time of action request creation.")
1110
1118
  });
1111
1119
  var RegistrationCreationMetadata = ActionCreationMetadata.extend({
1112
1120
  registrationNumber: z15.string().describe(
@@ -1134,9 +1142,6 @@ var EventMetadata = z15.object({
1134
1142
  createdAtLocation: UUID.nullish().describe(
1135
1143
  "Location of the user who created the event."
1136
1144
  ),
1137
- createdBySignature: DocumentPath.nullish().describe(
1138
- "Signature of the user who created the event."
1139
- ),
1140
1145
  updatedAtLocation: UUID.nullish().describe(
1141
1146
  "Location of the user who last changed the status."
1142
1147
  ),
@@ -1400,7 +1405,7 @@ var FieldId = import_v43.default.string().superRefine((val, ctx) => {
1400
1405
  }
1401
1406
  }).describe("Unique identifier for the field");
1402
1407
  var FieldReference = import_v43.default.object({
1403
- $$field: FieldId,
1408
+ $$field: FieldId.describe("Id of the field to reference"),
1404
1409
  $$subfield: import_v43.default.array(import_v43.default.string()).optional().default([]).describe(
1405
1410
  'If the FieldValue is an object, subfield can be used to refer to e.g. `["foo", "bar"]` in `{ foo: { bar: 3 } }`'
1406
1411
  )
@@ -1446,6 +1451,9 @@ var BaseField = import_v43.default.object({
1446
1451
  }).describe("Common properties shared across all field types.");
1447
1452
  var Divider = BaseField.extend({
1448
1453
  type: import_v43.default.literal(FieldType.DIVIDER)
1454
+ }).meta({
1455
+ description: "A horizontal line divider",
1456
+ id: "Divider"
1449
1457
  });
1450
1458
  var TextField = BaseField.extend({
1451
1459
  type: import_v43.default.literal(FieldType.TEXT),
@@ -1456,7 +1464,10 @@ var TextField = BaseField.extend({
1456
1464
  prefix: TranslationConfig.optional(),
1457
1465
  postfix: TranslationConfig.optional()
1458
1466
  }).default({ type: "text" }).optional()
1459
- }).describe("Text input");
1467
+ }).meta({
1468
+ description: "A text input field",
1469
+ id: "TextField"
1470
+ });
1460
1471
  var NumberField = BaseField.extend({
1461
1472
  type: import_v43.default.literal(FieldType.NUMBER),
1462
1473
  defaultValue: NumberFieldValue.optional(),
@@ -1466,7 +1477,10 @@ var NumberField = BaseField.extend({
1466
1477
  prefix: TranslationConfig.optional(),
1467
1478
  postfix: TranslationConfig.optional()
1468
1479
  }).optional()
1469
- }).describe("Number input");
1480
+ }).meta({
1481
+ description: "A number input field",
1482
+ id: "NumberField"
1483
+ });
1470
1484
  var TextAreaField = BaseField.extend({
1471
1485
  type: import_v43.default.literal(FieldType.TEXTAREA),
1472
1486
  defaultValue: NonEmptyTextValue.optional(),
@@ -1477,7 +1491,10 @@ var TextAreaField = BaseField.extend({
1477
1491
  prefix: TranslationConfig.optional(),
1478
1492
  postfix: TranslationConfig.optional()
1479
1493
  }).default({ rows: 4 }).optional()
1480
- }).describe("Multiline text input");
1494
+ }).meta({
1495
+ description: "A multiline text input",
1496
+ id: "TextAreaField"
1497
+ });
1481
1498
  var ImageMimeType = import_v43.default.enum([
1482
1499
  "image/png",
1483
1500
  "image/jpg",
@@ -1507,13 +1524,19 @@ var SignatureField = BaseField.extend({
1507
1524
  }).default({
1508
1525
  maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
1509
1526
  })
1510
- }).describe("Signature input field");
1527
+ }).meta({
1528
+ description: "A signature input field",
1529
+ id: "SignatureField"
1530
+ });
1511
1531
  var EmailField = BaseField.extend({
1512
1532
  type: import_v43.default.literal(FieldType.EMAIL),
1513
1533
  configuration: import_v43.default.object({
1514
1534
  maxLength: import_v43.default.number().optional().describe("Maximum length of the text")
1515
1535
  }).default({ maxLength: 255 }).optional(),
1516
1536
  defaultValue: NonEmptyTextValue.optional()
1537
+ }).meta({
1538
+ description: "An email input field",
1539
+ id: "EmailField"
1517
1540
  });
1518
1541
  var DateField = BaseField.extend({
1519
1542
  type: import_v43.default.literal(FieldType.DATE),
@@ -1523,7 +1546,10 @@ var DateField = BaseField.extend({
1523
1546
  "Text to display above the date input"
1524
1547
  ).optional()
1525
1548
  }).optional()
1526
- }).describe("A single date input (yyyy-MM-dd)");
1549
+ }).meta({
1550
+ description: "A date input (yyyy-MM-dd)",
1551
+ id: "DateField"
1552
+ });
1527
1553
  var AgeField = BaseField.extend({
1528
1554
  type: import_v43.default.literal(FieldType.AGE),
1529
1555
  defaultValue: NumberFieldValue.optional(),
@@ -1532,7 +1558,10 @@ var AgeField = BaseField.extend({
1532
1558
  prefix: TranslationConfig.optional(),
1533
1559
  postfix: TranslationConfig.optional()
1534
1560
  })
1535
- }).describe("An age input field which uses the current date as the asOfDate");
1561
+ }).meta({
1562
+ description: "An age input field which uses the current date as the asOfDate",
1563
+ id: "AgeField"
1564
+ });
1536
1565
  var TimeField = BaseField.extend({
1537
1566
  type: import_v43.default.literal(FieldType.TIME),
1538
1567
  defaultValue: SerializedNowDateTime.or(TimeValue).optional().describe("Default time value (HH-mm)"),
@@ -1542,7 +1571,10 @@ var TimeField = BaseField.extend({
1542
1571
  "Text to display above the time input"
1543
1572
  ).optional()
1544
1573
  }).optional()
1545
- }).describe("A single date input (HH-mm)");
1574
+ }).meta({
1575
+ description: "A single time input (HH-mm)",
1576
+ id: "TimeField"
1577
+ });
1546
1578
  var DateRangeField = BaseField.extend({
1547
1579
  type: import_v43.default.literal(FieldType.DATE_RANGE),
1548
1580
  defaultValue: DateRangeFieldValue.optional(),
@@ -1551,7 +1583,10 @@ var DateRangeField = BaseField.extend({
1551
1583
  "Text to display above the date input"
1552
1584
  ).optional()
1553
1585
  }).optional()
1554
- }).describe("A date range input ({ start: yyyy-MM-dd, end: yyyy-MM-dd })");
1586
+ }).meta({
1587
+ description: "A date range input ({ start: yyyy-MM-dd, end: yyyy-MM-dd })",
1588
+ id: "DateRangeField"
1589
+ });
1555
1590
  var HtmlFontVariant = import_v43.default.enum([
1556
1591
  "reg12",
1557
1592
  "reg14",
@@ -1595,18 +1630,30 @@ var ImageViewField = BaseField.extend({
1595
1630
  type: import_v43.default.literal(FieldType.IMAGE_VIEW),
1596
1631
  defaultValue: NonEmptyTextValue.optional(),
1597
1632
  configuration: ImageConfiguration
1598
- }).describe("A read-only image component for form pages");
1633
+ }).meta({
1634
+ description: "A read-only image component for form pages",
1635
+ id: "ImageViewField"
1636
+ });
1599
1637
  var Paragraph = BaseField.extend({
1600
1638
  type: import_v43.default.literal(FieldType.PARAGRAPH),
1601
1639
  configuration: ParagraphConfiguration
1602
- }).describe("A read-only HTML <p> paragraph");
1640
+ }).meta({
1641
+ description: "A read-only HTML <p> paragraph",
1642
+ id: "Paragraph"
1643
+ });
1603
1644
  var Heading = BaseField.extend({
1604
1645
  type: import_v43.default.literal(FieldType.HEADING),
1605
1646
  configuration: HeadingConfiguration
1606
- }).describe("A read-only heading component for form pages");
1647
+ }).meta({
1648
+ description: "A read-only heading component for form pages",
1649
+ id: "Heading"
1650
+ });
1607
1651
  var PageHeader = BaseField.extend({
1608
1652
  type: import_v43.default.literal(FieldType.PAGE_HEADER)
1609
- }).describe("A read-only header component for form pages");
1653
+ }).meta({
1654
+ description: "A read-only header component for form pages",
1655
+ id: "PageHeader"
1656
+ });
1610
1657
  var File = BaseField.extend({
1611
1658
  type: import_v43.default.literal(FieldType.FILE),
1612
1659
  defaultValue: FileFieldValue.optional(),
@@ -1625,7 +1672,10 @@ var File = BaseField.extend({
1625
1672
  }).default({
1626
1673
  maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
1627
1674
  })
1628
- }).describe("File upload");
1675
+ }).meta({
1676
+ description: "A file upload field",
1677
+ id: "File"
1678
+ });
1629
1679
  var SelectOption = import_v43.default.object({
1630
1680
  value: import_v43.default.string().describe("The value of the option"),
1631
1681
  label: import_v43.default.union([import_v43.default.string(), TranslationConfig]).describe("The label of the option"),
@@ -1642,7 +1692,10 @@ var NumberWithUnitField = BaseField.extend({
1642
1692
  "Placeholder for the number field"
1643
1693
  )
1644
1694
  }).optional()
1645
- }).describe("Number with unit input");
1695
+ }).meta({
1696
+ description: "A number with unit input field",
1697
+ id: "NumberWithUnitField"
1698
+ });
1646
1699
  var RadioGroup = BaseField.extend({
1647
1700
  type: import_v43.default.literal(FieldType.RADIO_GROUP),
1648
1701
  defaultValue: TextValue.optional(),
@@ -1652,7 +1705,10 @@ var RadioGroup = BaseField.extend({
1652
1705
  size: import_v43.default.enum(["NORMAL", "LARGE"]).optional()
1653
1706
  }).optional()
1654
1707
  }).optional()
1655
- }).describe("Grouped radio options");
1708
+ }).meta({
1709
+ description: "A grouped radio button field",
1710
+ id: "RadioGroup"
1711
+ });
1656
1712
  var BulletList = BaseField.extend({
1657
1713
  type: import_v43.default.literal(FieldType.BULLET_LIST),
1658
1714
  items: import_v43.default.array(TranslationConfig).describe("A list of items"),
@@ -1661,7 +1717,10 @@ var BulletList = BaseField.extend({
1661
1717
  fontVariant: HtmlFontVariant.optional()
1662
1718
  }).optional()
1663
1719
  }).default({})
1664
- }).describe("A list of bullet points");
1720
+ }).meta({
1721
+ description: "A list of bullet points",
1722
+ id: "BulletList"
1723
+ });
1665
1724
  var Select = BaseField.extend({
1666
1725
  type: import_v43.default.literal(FieldType.SELECT),
1667
1726
  defaultValue: TextValue.optional(),
@@ -1676,7 +1735,10 @@ var Select = BaseField.extend({
1676
1735
  { ..., defaultMessage: "'{input}' is not listed among the health facilities." }
1677
1736
  `
1678
1737
  )
1679
- }).describe("Select input");
1738
+ }).meta({
1739
+ description: "A select input field",
1740
+ id: "Select"
1741
+ });
1680
1742
  var SelectDateRangeOption = import_v43.default.object({
1681
1743
  value: SelectDateRangeValue.describe("The value of the option"),
1682
1744
  label: TranslationConfig.describe("The label of the option")
@@ -1685,7 +1747,10 @@ var SelectDateRangeField = BaseField.extend({
1685
1747
  type: import_v43.default.literal(FieldType.SELECT_DATE_RANGE),
1686
1748
  defaultValue: SelectDateRangeValue.optional(),
1687
1749
  options: import_v43.default.array(SelectDateRangeOption).describe("A list of options")
1688
- }).describe("Select input with date range options");
1750
+ }).meta({
1751
+ description: "A date range selection field",
1752
+ id: "SelectDateRangeField"
1753
+ });
1689
1754
  var NameConfig = import_v43.default.object({
1690
1755
  firstname: import_v43.default.object({ required: requiredSchema, label: TranslationConfig.optional() }).optional(),
1691
1756
  middlename: import_v43.default.object({ required: requiredSchema, label: TranslationConfig.optional() }).optional(),
@@ -1716,26 +1781,41 @@ var NameField = BaseField.extend({
1716
1781
  surname: { required: true }
1717
1782
  }
1718
1783
  }).optional()
1719
- }).describe("Name input field");
1784
+ }).meta({
1785
+ description: "A field for entering a persons name",
1786
+ id: "NameField"
1787
+ });
1720
1788
  var PhoneField = BaseField.extend({
1721
1789
  defaultValue: NonEmptyTextValue.optional(),
1722
1790
  type: import_v43.default.literal(FieldType.PHONE)
1723
- }).describe("Phone input field");
1791
+ }).meta({
1792
+ description: "A field for entering a phone number",
1793
+ id: "PhoneField"
1794
+ });
1724
1795
  var IdField = BaseField.extend({
1725
1796
  defaultValue: NonEmptyTextValue.optional(),
1726
1797
  type: import_v43.default.literal(FieldType.ID)
1727
- }).describe("ID input field");
1798
+ }).meta({
1799
+ description: "A field for entering an ID",
1800
+ id: "IdField"
1801
+ });
1728
1802
  var Checkbox = BaseField.extend({
1729
1803
  type: import_v43.default.literal(FieldType.CHECKBOX),
1730
1804
  defaultValue: CheckboxFieldValue.default(false)
1731
- }).describe("Boolean checkbox field");
1805
+ }).meta({
1806
+ description: "A boolean checkbox field",
1807
+ id: "Checkbox"
1808
+ });
1732
1809
  var Country = BaseField.extend({
1733
1810
  type: import_v43.default.literal(FieldType.COUNTRY),
1734
1811
  defaultValue: NonEmptyTextValue.optional(),
1735
1812
  optionOverrides: import_v43.default.array(SelectOption.omit({ label: true })).optional().describe(
1736
1813
  "Conditionals for specific countries. Countries not listed are always shown and enabled."
1737
1814
  )
1738
- }).describe("Country select field");
1815
+ }).meta({
1816
+ description: "A field for selecting a country",
1817
+ id: "Country"
1818
+ });
1739
1819
  var AllowedLocations = JurisdictionReference.optional().describe(
1740
1820
  "Limits which location options are selectable depending on user jurisdiction and location."
1741
1821
  );
@@ -1744,16 +1824,18 @@ var AdministrativeAreas = import_v43.default.enum([
1744
1824
  "HEALTH_FACILITY",
1745
1825
  "CRVS_OFFICE"
1746
1826
  ]);
1747
- var AdministrativeAreaConfiguration = import_v43.default.object({
1748
- partOf: FieldReference.optional().describe("Parent location"),
1749
- type: AdministrativeAreas,
1750
- allowedLocations: AllowedLocations
1751
- }).describe("Administrative area options");
1752
1827
  var AdministrativeAreaField = BaseField.extend({
1753
1828
  type: import_v43.default.literal(FieldType.ADMINISTRATIVE_AREA),
1754
1829
  defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
1755
- configuration: AdministrativeAreaConfiguration
1756
- }).describe("Administrative area input field e.g. facility, office");
1830
+ configuration: import_v43.default.object({
1831
+ partOf: FieldReference.optional().describe("Parent location"),
1832
+ type: AdministrativeAreas,
1833
+ allowedLocations: AllowedLocations
1834
+ }).describe("Administrative area options")
1835
+ }).meta({
1836
+ description: "Administrative area input field",
1837
+ id: "AdministrativeAreaField"
1838
+ });
1757
1839
  var LocationInput = BaseField.extend({
1758
1840
  type: import_v43.default.literal(FieldType.LOCATION),
1759
1841
  defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
@@ -1761,7 +1843,10 @@ var LocationInput = BaseField.extend({
1761
1843
  locationTypes: import_v43.default.array(import_v43.default.string()).optional().describe("Types of the locations that are available for selection."),
1762
1844
  allowedLocations: AllowedLocations
1763
1845
  }).optional()
1764
- }).describe("Input field for a location");
1846
+ }).meta({
1847
+ description: "A field for selecting a location",
1848
+ id: "LocationInput"
1849
+ });
1765
1850
  var FileUploadWithOptions = BaseField.extend({
1766
1851
  type: import_v43.default.literal(FieldType.FILE_WITH_OPTIONS),
1767
1852
  options: import_v43.default.array(SelectOption).describe("A list of options"),
@@ -1775,6 +1860,9 @@ var FileUploadWithOptions = BaseField.extend({
1775
1860
  }).default({
1776
1861
  maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
1777
1862
  })
1863
+ }).meta({
1864
+ description: "A field for uploading files with file type options",
1865
+ id: "FileUploadWithOptions"
1778
1866
  });
1779
1867
  var Facility = BaseField.extend({
1780
1868
  type: import_v43.default.literal(FieldType.FACILITY),
@@ -1820,7 +1908,10 @@ var Address = BaseField.extend({
1820
1908
  allowedLocations: AllowedLocations
1821
1909
  }).optional(),
1822
1910
  defaultValue: DefaultAddressFieldValue.optional()
1823
- }).describe("Address input field \u2013 a combination of location and text fields");
1911
+ }).meta({
1912
+ description: "Address input field \u2013 a combination of location and text fields",
1913
+ id: "Address"
1914
+ });
1824
1915
  var StaticDataEntry = import_v43.default.object({
1825
1916
  id: import_v43.default.string().describe("ID for the data entry."),
1826
1917
  label: TranslationConfig,
@@ -1835,7 +1926,10 @@ var DataField = BaseField.extend({
1835
1926
  subtitle: TranslationConfig.optional(),
1836
1927
  data: import_v43.default.array(DataEntry)
1837
1928
  })
1838
- }).describe("Data field for displaying read-only data");
1929
+ }).meta({
1930
+ description: "A field for displaying a table of read-only data",
1931
+ id: "DataField"
1932
+ });
1839
1933
  var ButtonSize = import_v43.default.enum(["small", "medium", "large"]);
1840
1934
  var ButtonType = import_v43.default.enum([
1841
1935
  "primary",
@@ -1862,11 +1956,17 @@ var ButtonField = BaseField.extend({
1862
1956
  type: import_v43.default.literal(FieldType.BUTTON),
1863
1957
  defaultValue: ButtonFieldValue.optional(),
1864
1958
  configuration: ButtonConfiguration
1865
- }).describe("Generic button without any built-in functionality");
1959
+ }).meta({
1960
+ description: "A generic button that can be used to trigger an action",
1961
+ id: "ButtonField"
1962
+ });
1866
1963
  var FieldGroup = BaseField.extend({
1867
1964
  type: import_v43.default.literal(FieldType.FIELD_GROUP),
1868
1965
  // eslint-disable-next-line @typescript-eslint/no-use-before-define
1869
1966
  fields: import_v43.default.lazy(() => import_v43.default.array(FieldConfig))
1967
+ }).meta({
1968
+ description: "A group of fields that are displayed together",
1969
+ id: "FieldGroup"
1870
1970
  });
1871
1971
  var AlphaPrintButton = BaseField.extend({
1872
1972
  type: import_v43.default.literal(FieldType.ALPHA_PRINT_BUTTON),
@@ -1876,7 +1976,10 @@ var AlphaPrintButton = BaseField.extend({
1876
1976
  "Label for the print button"
1877
1977
  )
1878
1978
  })
1879
- }).describe("Print button field for printing certificates");
1979
+ }).meta({
1980
+ description: "An experimental print button field for printing certificates during the declaration process",
1981
+ id: "AlphaPrintButton"
1982
+ });
1880
1983
  var HttpField = BaseField.extend({
1881
1984
  type: import_v43.default.literal(FieldType.HTTP),
1882
1985
  defaultValue: HttpFieldValue.optional(),
@@ -1892,20 +1995,30 @@ var HttpField = BaseField.extend({
1892
1995
  params: import_v43.default.record(import_v43.default.string(), import_v43.default.union([import_v43.default.string(), FieldReference])).optional(),
1893
1996
  timeout: import_v43.default.number().default(15e3).describe("Request timeout in milliseconds")
1894
1997
  })
1895
- }).describe("HTTP request function triggered by a button click or other event");
1998
+ }).meta({
1999
+ 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.",
2000
+ id: "HttpField"
2001
+ });
1896
2002
  var AutocompleteField = BaseField.extend({
1897
2003
  type: import_v43.default.literal(FieldType.AUTOCOMPLETE),
1898
2004
  configuration: import_v43.default.object({
1899
- url: import_v43.default.string().describe("URL to fetch autocomplete suggestions from").optional(),
2005
+ url: import_v43.default.string().describe(
2006
+ "URL to fetch autocomplete suggestions from. This should be a country config server endpoint."
2007
+ ).optional(),
1900
2008
  method: import_v43.default.enum(["GET", "POST"]).default("GET").optional(),
1901
2009
  defaultOptions: import_v43.default.array(
1902
2010
  import_v43.default.object({
1903
2011
  label: import_v43.default.string(),
1904
2012
  value: import_v43.default.string()
1905
2013
  })
1906
- ).optional()
2014
+ ).optional().describe(
2015
+ "Manual entry is supported through configuration, allowing users to provide values not currently represented in the dataset."
2016
+ )
1907
2017
  })
1908
- }).describe("Autocomplete input field");
2018
+ }).meta({
2019
+ description: "Generic autocomplete component designed for use with large dictionary-based datasets. The component supports dynamic retrieval of options from configurable data sources and is intended for datasets that may contain tens or hundreds of thousands of records.",
2020
+ id: "AutocompleteField"
2021
+ });
1909
2022
  var SearchField = HttpField.extend({
1910
2023
  type: import_v43.default.literal(FieldType.SEARCH),
1911
2024
  configuration: SearchQuery.pick({
@@ -1938,6 +2051,9 @@ var SearchField = HttpField.extend({
1938
2051
  ok: TranslationConfig.optional()
1939
2052
  }).optional()
1940
2053
  })
2054
+ }).meta({
2055
+ description: "A search input field",
2056
+ id: "SearchField"
1941
2057
  });
1942
2058
  var LinkButtonField = BaseField.extend({
1943
2059
  type: import_v43.default.literal(FieldType.LINK_BUTTON),
@@ -1946,7 +2062,10 @@ var LinkButtonField = BaseField.extend({
1946
2062
  text: TranslationConfig.describe("Text to display on the button"),
1947
2063
  icon: import_v43.default.string().optional().describe("Icon for the button. You can find icons from OpenCRVS UI-Kit.")
1948
2064
  })
1949
- }).describe("Button that opens a link");
2065
+ }).meta({
2066
+ description: "A button that opens a URL link",
2067
+ id: "LinkButtonField"
2068
+ });
1950
2069
  var VerificationStatus = BaseField.extend({
1951
2070
  type: import_v43.default.literal(FieldType.VERIFICATION_STATUS),
1952
2071
  defaultValue: VerificationStatusValue.optional(),
@@ -1956,15 +2075,19 @@ var VerificationStatus = BaseField.extend({
1956
2075
  "Explaining text on the banner in form."
1957
2076
  )
1958
2077
  })
2078
+ }).meta({
2079
+ 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.",
2080
+ id: "VerificationStatus"
1959
2081
  });
1960
2082
  var QueryParamReaderField = BaseField.extend({
1961
2083
  type: import_v43.default.literal(FieldType.QUERY_PARAM_READER),
1962
2084
  configuration: import_v43.default.object({
1963
2085
  pickParams: import_v43.default.array(import_v43.default.string()).describe("List of query parameters to read from the URL")
1964
2086
  })
1965
- }).describe(
1966
- "A field that maps URL query params into form values and clears them afterward"
1967
- );
2087
+ }).meta({
2088
+ description: "A field that maps URL query params into form values and clears them afterward",
2089
+ id: "QueryParamReaderField"
2090
+ });
1968
2091
  var QrReaderField = BaseField.extend({
1969
2092
  type: import_v43.default.literal(FieldType.QR_READER),
1970
2093
  defaultValue: QrReaderFieldValue.optional(),
@@ -1975,7 +2098,7 @@ var QrReaderField = BaseField.extend({
1975
2098
  })
1976
2099
  }).optional()
1977
2100
  }).meta({
1978
- description: "Configuration for QR code reader field, including optional JSON Schema validator.",
2101
+ description: "QR code reader field, including optional JSON Schema validator.",
1979
2102
  id: "QrReaderField"
1980
2103
  });
1981
2104
  var IdReaderField = BaseField.extend({
@@ -1984,12 +2107,18 @@ var IdReaderField = BaseField.extend({
1984
2107
  methods: import_v43.default.array(
1985
2108
  import_v43.default.union([QrReaderField, LinkButtonField]).describe("Methods for reading an ID")
1986
2109
  )
2110
+ }).meta({
2111
+ description: "A wrapper around nested form fields, specifically QR_READER and LINK_BUTTON. It can hold the QR_READERs value.",
2112
+ id: "IdReaderField"
1987
2113
  });
1988
2114
  var CustomField = BaseField.extend({
1989
2115
  type: import_v43.default.literal(FieldType._EXPERIMENTAL_CUSTOM),
1990
2116
  defaultValue: CustomFieldValue.optional(),
1991
2117
  src: import_v43.default.string().describe("Module source path for the custom field component"),
1992
2118
  configuration: import_v43.default.unknown().optional()
2119
+ }).meta({
2120
+ description: "An expiremental custom field that is defined by a module source path",
2121
+ id: "CustomField"
1993
2122
  });
1994
2123
  var FieldStyleVariant = import_v43.default.enum(["default", "highlighted"]);
1995
2124
  var LoaderField = BaseField.extend({
@@ -1999,22 +2128,25 @@ var LoaderField = BaseField.extend({
1999
2128
  configuration: import_v43.default.object({
2000
2129
  text: TranslationConfig.describe("Display text above the loading spinner")
2001
2130
  })
2002
- }).describe(
2003
- "A non-interactive field that indicates an in progress operation in form"
2004
- );
2131
+ }).meta({
2132
+ description: "A non-interactive field that indicates an in progress operation in form",
2133
+ id: "LoaderField"
2134
+ });
2005
2135
  var HiddenField = BaseField.extend({
2006
2136
  type: import_v43.default.literal(FieldType.ALPHA_HIDDEN),
2007
2137
  required: import_v43.default.boolean().default(false).optional(),
2008
2138
  defaultValue: TextValue.optional()
2009
- }).describe(
2010
- "A non-interactive, hidden field that only hold a value in the form"
2011
- );
2139
+ }).meta({
2140
+ description: "A non-interactive, hidden field that only hold a value in the form",
2141
+ id: "HiddenField"
2142
+ });
2012
2143
  var UserRoleField = BaseField.extend({
2013
2144
  type: import_v43.default.literal(FieldType.USER_ROLE),
2014
2145
  defaultValue: TextValue.optional()
2015
- }).describe(
2016
- "A select dropdown that is automatically populated with available user roles"
2017
- );
2146
+ }).meta({
2147
+ description: "A select dropdown that is automatically populated with available user roles",
2148
+ id: "UserRoleField"
2149
+ });
2018
2150
  var FieldConfig = import_v43.default.discriminatedUnion("type", [
2019
2151
  FieldGroup,
2020
2152
  Address,