@opencrvs/toolkit 2.0.0-rc.1b5d54a → 2.0.0-rc.1ddd150
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.
- package/create-countryconfig/index.js +50 -20
- package/create-countryconfig/package.json +12 -2
- package/dist/application-config/index.js +200 -64
- package/dist/cli.js +3 -1
- package/dist/commons/api/router.d.ts +15 -4
- package/dist/commons/events/ActionInput.d.ts +36 -36
- package/dist/commons/events/Draft.d.ts +2 -3
- package/dist/commons/events/WorkqueueConfig.d.ts +5 -5
- package/dist/conditionals/index.js +3 -1
- package/dist/events/index.js +262 -83
- package/dist/migrations/v2.0/index.js +3 -1
- package/dist/notification/index.js +262 -83
- package/dist/scopes/index.js +3 -1
- package/opencrvs-toolkit-2.0.0-rc.1ddd150.tgz +0 -0
- package/package.json +5 -1
- package/opencrvs-toolkit-2.0.0-rc.1b5d54a.tgz +0 -0
|
@@ -76,8 +76,8 @@ var ActionConditional = z.discriminatedUnion("type", [
|
|
|
76
76
|
// Action can be shown to the user in the list but as disabled
|
|
77
77
|
EnableConditional
|
|
78
78
|
]).meta({
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
id: "ActionConditional",
|
|
80
|
+
description: "Conditional gating whether an action is shown (SHOW) or enabled (ENABLE). When omitted from an action, the action is shown and enabled for everyone."
|
|
81
81
|
});
|
|
82
82
|
var DisplayOnReviewConditional = z.object({
|
|
83
83
|
type: z.literal(ConditionalType.DISPLAY_ON_REVIEW),
|
|
@@ -93,8 +93,8 @@ var FieldConditional = z.discriminatedUnion("type", [
|
|
|
93
93
|
// Field output can be shown / hidden on the review page
|
|
94
94
|
DisplayOnReviewConditional
|
|
95
95
|
]).meta({
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
id: "FieldConditional",
|
|
97
|
+
description: "Conditional gating whether a form field is shown (SHOW), enabled (ENABLE), or displayed on the review page (DISPLAY_ON_REVIEW). When omitted, the field is shown and enabled for everyone, and is displayed on review whenever it has a value."
|
|
98
98
|
});
|
|
99
99
|
|
|
100
100
|
// ../commons/src/events/TranslationConfig.ts
|
|
@@ -834,7 +834,9 @@ var ScopeType = z11.enum([
|
|
|
834
834
|
var EncodedScope = z11.string().brand("EncodedScope");
|
|
835
835
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
836
836
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
837
|
-
accessLevel: JurisdictionFilter.enum.all
|
|
837
|
+
accessLevel: JurisdictionFilter.enum.all,
|
|
838
|
+
registeredIn: JurisdictionFilter.enum.all,
|
|
839
|
+
declaredIn: JurisdictionFilter.enum.all
|
|
838
840
|
};
|
|
839
841
|
|
|
840
842
|
// ../commons/src/authentication.ts
|
|
@@ -1081,8 +1083,8 @@ var FlagConfig = z14.object({
|
|
|
1081
1083
|
),
|
|
1082
1084
|
label: TranslationConfig.describe("Human readable label of the flag.")
|
|
1083
1085
|
}).meta({
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
+
id: "FlagConfig",
|
|
1087
|
+
description: "Configuration for a custom flag that can be added to or removed from records by event actions."
|
|
1086
1088
|
});
|
|
1087
1089
|
var ActionFlagConfig = z14.object({
|
|
1088
1090
|
id: Flag,
|
|
@@ -1091,8 +1093,8 @@ var ActionFlagConfig = z14.object({
|
|
|
1091
1093
|
"When conditional is met, the operation is performed on the flag. If not provided, the operation is performed unconditionally."
|
|
1092
1094
|
)
|
|
1093
1095
|
}).meta({
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
+
id: "ActionFlagConfig",
|
|
1097
|
+
description: "Add or remove operation applied to a flag when the parent action is accepted. Optionally gated by a conditional."
|
|
1096
1098
|
});
|
|
1097
1099
|
|
|
1098
1100
|
// ../commons/src/events/EventMetadata.ts
|
|
@@ -1411,8 +1413,15 @@ var FieldReference = import_v43.default.object({
|
|
|
1411
1413
|
)
|
|
1412
1414
|
}).describe("Reference to a field by its ID");
|
|
1413
1415
|
var ValidationConfig = import_v43.default.object({
|
|
1414
|
-
validator: Conditional
|
|
1415
|
-
|
|
1416
|
+
validator: Conditional.describe(
|
|
1417
|
+
"Conditional expression that must hold for the field value to be considered valid."
|
|
1418
|
+
),
|
|
1419
|
+
message: TranslationConfig.describe(
|
|
1420
|
+
"Error message displayed when the validator does not hold."
|
|
1421
|
+
)
|
|
1422
|
+
}).meta({
|
|
1423
|
+
id: "ValidationConfig",
|
|
1424
|
+
description: "Validation rule applied to a form field. The validator is a conditional expression that must hold for the field value to be considered valid."
|
|
1416
1425
|
});
|
|
1417
1426
|
var requiredSchema = import_v43.default.union([
|
|
1418
1427
|
import_v43.default.boolean(),
|
|
@@ -1451,6 +1460,9 @@ var BaseField = import_v43.default.object({
|
|
|
1451
1460
|
}).describe("Common properties shared across all field types.");
|
|
1452
1461
|
var Divider = BaseField.extend({
|
|
1453
1462
|
type: import_v43.default.literal(FieldType.DIVIDER)
|
|
1463
|
+
}).meta({
|
|
1464
|
+
description: "A horizontal line divider",
|
|
1465
|
+
id: "Divider"
|
|
1454
1466
|
});
|
|
1455
1467
|
var TextField = BaseField.extend({
|
|
1456
1468
|
type: import_v43.default.literal(FieldType.TEXT),
|
|
@@ -1461,7 +1473,10 @@ var TextField = BaseField.extend({
|
|
|
1461
1473
|
prefix: TranslationConfig.optional(),
|
|
1462
1474
|
postfix: TranslationConfig.optional()
|
|
1463
1475
|
}).default({ type: "text" }).optional()
|
|
1464
|
-
}).
|
|
1476
|
+
}).meta({
|
|
1477
|
+
description: "A text input field",
|
|
1478
|
+
id: "TextField"
|
|
1479
|
+
});
|
|
1465
1480
|
var NumberField = BaseField.extend({
|
|
1466
1481
|
type: import_v43.default.literal(FieldType.NUMBER),
|
|
1467
1482
|
defaultValue: NumberFieldValue.optional(),
|
|
@@ -1471,7 +1486,10 @@ var NumberField = BaseField.extend({
|
|
|
1471
1486
|
prefix: TranslationConfig.optional(),
|
|
1472
1487
|
postfix: TranslationConfig.optional()
|
|
1473
1488
|
}).optional()
|
|
1474
|
-
}).
|
|
1489
|
+
}).meta({
|
|
1490
|
+
description: "A number input field",
|
|
1491
|
+
id: "NumberField"
|
|
1492
|
+
});
|
|
1475
1493
|
var TextAreaField = BaseField.extend({
|
|
1476
1494
|
type: import_v43.default.literal(FieldType.TEXTAREA),
|
|
1477
1495
|
defaultValue: NonEmptyTextValue.optional(),
|
|
@@ -1482,7 +1500,10 @@ var TextAreaField = BaseField.extend({
|
|
|
1482
1500
|
prefix: TranslationConfig.optional(),
|
|
1483
1501
|
postfix: TranslationConfig.optional()
|
|
1484
1502
|
}).default({ rows: 4 }).optional()
|
|
1485
|
-
}).
|
|
1503
|
+
}).meta({
|
|
1504
|
+
description: "A multiline text input",
|
|
1505
|
+
id: "TextAreaField"
|
|
1506
|
+
});
|
|
1486
1507
|
var ImageMimeType = import_v43.default.enum([
|
|
1487
1508
|
"image/png",
|
|
1488
1509
|
"image/jpg",
|
|
@@ -1512,13 +1533,19 @@ var SignatureField = BaseField.extend({
|
|
|
1512
1533
|
}).default({
|
|
1513
1534
|
maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
|
|
1514
1535
|
})
|
|
1515
|
-
}).
|
|
1536
|
+
}).meta({
|
|
1537
|
+
description: "A signature input field",
|
|
1538
|
+
id: "SignatureField"
|
|
1539
|
+
});
|
|
1516
1540
|
var EmailField = BaseField.extend({
|
|
1517
1541
|
type: import_v43.default.literal(FieldType.EMAIL),
|
|
1518
1542
|
configuration: import_v43.default.object({
|
|
1519
1543
|
maxLength: import_v43.default.number().optional().describe("Maximum length of the text")
|
|
1520
1544
|
}).default({ maxLength: 255 }).optional(),
|
|
1521
1545
|
defaultValue: NonEmptyTextValue.optional()
|
|
1546
|
+
}).meta({
|
|
1547
|
+
description: "An email input field",
|
|
1548
|
+
id: "EmailField"
|
|
1522
1549
|
});
|
|
1523
1550
|
var DateField = BaseField.extend({
|
|
1524
1551
|
type: import_v43.default.literal(FieldType.DATE),
|
|
@@ -1528,7 +1555,10 @@ var DateField = BaseField.extend({
|
|
|
1528
1555
|
"Text to display above the date input"
|
|
1529
1556
|
).optional()
|
|
1530
1557
|
}).optional()
|
|
1531
|
-
}).
|
|
1558
|
+
}).meta({
|
|
1559
|
+
description: "A date input (yyyy-MM-dd)",
|
|
1560
|
+
id: "DateField"
|
|
1561
|
+
});
|
|
1532
1562
|
var AgeField = BaseField.extend({
|
|
1533
1563
|
type: import_v43.default.literal(FieldType.AGE),
|
|
1534
1564
|
defaultValue: NumberFieldValue.optional(),
|
|
@@ -1537,7 +1567,10 @@ var AgeField = BaseField.extend({
|
|
|
1537
1567
|
prefix: TranslationConfig.optional(),
|
|
1538
1568
|
postfix: TranslationConfig.optional()
|
|
1539
1569
|
})
|
|
1540
|
-
}).
|
|
1570
|
+
}).meta({
|
|
1571
|
+
description: "An age input field which uses the current date as the asOfDate",
|
|
1572
|
+
id: "AgeField"
|
|
1573
|
+
});
|
|
1541
1574
|
var TimeField = BaseField.extend({
|
|
1542
1575
|
type: import_v43.default.literal(FieldType.TIME),
|
|
1543
1576
|
defaultValue: SerializedNowDateTime.or(TimeValue).optional().describe("Default time value (HH-mm)"),
|
|
@@ -1547,7 +1580,10 @@ var TimeField = BaseField.extend({
|
|
|
1547
1580
|
"Text to display above the time input"
|
|
1548
1581
|
).optional()
|
|
1549
1582
|
}).optional()
|
|
1550
|
-
}).
|
|
1583
|
+
}).meta({
|
|
1584
|
+
description: "A single time input (HH-mm)",
|
|
1585
|
+
id: "TimeField"
|
|
1586
|
+
});
|
|
1551
1587
|
var DateRangeField = BaseField.extend({
|
|
1552
1588
|
type: import_v43.default.literal(FieldType.DATE_RANGE),
|
|
1553
1589
|
defaultValue: DateRangeFieldValue.optional(),
|
|
@@ -1556,7 +1592,10 @@ var DateRangeField = BaseField.extend({
|
|
|
1556
1592
|
"Text to display above the date input"
|
|
1557
1593
|
).optional()
|
|
1558
1594
|
}).optional()
|
|
1559
|
-
}).
|
|
1595
|
+
}).meta({
|
|
1596
|
+
description: "A date range input ({ start: yyyy-MM-dd, end: yyyy-MM-dd })",
|
|
1597
|
+
id: "DateRangeField"
|
|
1598
|
+
});
|
|
1560
1599
|
var HtmlFontVariant = import_v43.default.enum([
|
|
1561
1600
|
"reg12",
|
|
1562
1601
|
"reg14",
|
|
@@ -1600,18 +1639,30 @@ var ImageViewField = BaseField.extend({
|
|
|
1600
1639
|
type: import_v43.default.literal(FieldType.IMAGE_VIEW),
|
|
1601
1640
|
defaultValue: NonEmptyTextValue.optional(),
|
|
1602
1641
|
configuration: ImageConfiguration
|
|
1603
|
-
}).
|
|
1642
|
+
}).meta({
|
|
1643
|
+
description: "A read-only image component for form pages",
|
|
1644
|
+
id: "ImageViewField"
|
|
1645
|
+
});
|
|
1604
1646
|
var Paragraph = BaseField.extend({
|
|
1605
1647
|
type: import_v43.default.literal(FieldType.PARAGRAPH),
|
|
1606
1648
|
configuration: ParagraphConfiguration
|
|
1607
|
-
}).
|
|
1649
|
+
}).meta({
|
|
1650
|
+
description: "A read-only HTML <p> paragraph",
|
|
1651
|
+
id: "Paragraph"
|
|
1652
|
+
});
|
|
1608
1653
|
var Heading = BaseField.extend({
|
|
1609
1654
|
type: import_v43.default.literal(FieldType.HEADING),
|
|
1610
1655
|
configuration: HeadingConfiguration
|
|
1611
|
-
}).
|
|
1656
|
+
}).meta({
|
|
1657
|
+
description: "A read-only heading component for form pages",
|
|
1658
|
+
id: "Heading"
|
|
1659
|
+
});
|
|
1612
1660
|
var PageHeader = BaseField.extend({
|
|
1613
1661
|
type: import_v43.default.literal(FieldType.PAGE_HEADER)
|
|
1614
|
-
}).
|
|
1662
|
+
}).meta({
|
|
1663
|
+
description: "A read-only header component for form pages",
|
|
1664
|
+
id: "PageHeader"
|
|
1665
|
+
});
|
|
1615
1666
|
var File = BaseField.extend({
|
|
1616
1667
|
type: import_v43.default.literal(FieldType.FILE),
|
|
1617
1668
|
defaultValue: FileFieldValue.optional(),
|
|
@@ -1630,7 +1681,10 @@ var File = BaseField.extend({
|
|
|
1630
1681
|
}).default({
|
|
1631
1682
|
maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
|
|
1632
1683
|
})
|
|
1633
|
-
}).
|
|
1684
|
+
}).meta({
|
|
1685
|
+
description: "A file upload field",
|
|
1686
|
+
id: "File"
|
|
1687
|
+
});
|
|
1634
1688
|
var SelectOption = import_v43.default.object({
|
|
1635
1689
|
value: import_v43.default.string().describe("The value of the option"),
|
|
1636
1690
|
label: import_v43.default.union([import_v43.default.string(), TranslationConfig]).describe("The label of the option"),
|
|
@@ -1647,7 +1701,10 @@ var NumberWithUnitField = BaseField.extend({
|
|
|
1647
1701
|
"Placeholder for the number field"
|
|
1648
1702
|
)
|
|
1649
1703
|
}).optional()
|
|
1650
|
-
}).
|
|
1704
|
+
}).meta({
|
|
1705
|
+
description: "A number with unit input field",
|
|
1706
|
+
id: "NumberWithUnitField"
|
|
1707
|
+
});
|
|
1651
1708
|
var RadioGroup = BaseField.extend({
|
|
1652
1709
|
type: import_v43.default.literal(FieldType.RADIO_GROUP),
|
|
1653
1710
|
defaultValue: TextValue.optional(),
|
|
@@ -1657,7 +1714,10 @@ var RadioGroup = BaseField.extend({
|
|
|
1657
1714
|
size: import_v43.default.enum(["NORMAL", "LARGE"]).optional()
|
|
1658
1715
|
}).optional()
|
|
1659
1716
|
}).optional()
|
|
1660
|
-
}).
|
|
1717
|
+
}).meta({
|
|
1718
|
+
description: "A grouped radio button field",
|
|
1719
|
+
id: "RadioGroup"
|
|
1720
|
+
});
|
|
1661
1721
|
var BulletList = BaseField.extend({
|
|
1662
1722
|
type: import_v43.default.literal(FieldType.BULLET_LIST),
|
|
1663
1723
|
items: import_v43.default.array(TranslationConfig).describe("A list of items"),
|
|
@@ -1666,7 +1726,10 @@ var BulletList = BaseField.extend({
|
|
|
1666
1726
|
fontVariant: HtmlFontVariant.optional()
|
|
1667
1727
|
}).optional()
|
|
1668
1728
|
}).default({})
|
|
1669
|
-
}).
|
|
1729
|
+
}).meta({
|
|
1730
|
+
description: "A list of bullet points",
|
|
1731
|
+
id: "BulletList"
|
|
1732
|
+
});
|
|
1670
1733
|
var Select = BaseField.extend({
|
|
1671
1734
|
type: import_v43.default.literal(FieldType.SELECT),
|
|
1672
1735
|
defaultValue: TextValue.optional(),
|
|
@@ -1681,7 +1744,10 @@ var Select = BaseField.extend({
|
|
|
1681
1744
|
{ ..., defaultMessage: "'{input}' is not listed among the health facilities." }
|
|
1682
1745
|
`
|
|
1683
1746
|
)
|
|
1684
|
-
}).
|
|
1747
|
+
}).meta({
|
|
1748
|
+
description: "A select input field",
|
|
1749
|
+
id: "Select"
|
|
1750
|
+
});
|
|
1685
1751
|
var SelectDateRangeOption = import_v43.default.object({
|
|
1686
1752
|
value: SelectDateRangeValue.describe("The value of the option"),
|
|
1687
1753
|
label: TranslationConfig.describe("The label of the option")
|
|
@@ -1690,7 +1756,10 @@ var SelectDateRangeField = BaseField.extend({
|
|
|
1690
1756
|
type: import_v43.default.literal(FieldType.SELECT_DATE_RANGE),
|
|
1691
1757
|
defaultValue: SelectDateRangeValue.optional(),
|
|
1692
1758
|
options: import_v43.default.array(SelectDateRangeOption).describe("A list of options")
|
|
1693
|
-
}).
|
|
1759
|
+
}).meta({
|
|
1760
|
+
description: "A date range selection field",
|
|
1761
|
+
id: "SelectDateRangeField"
|
|
1762
|
+
});
|
|
1694
1763
|
var NameConfig = import_v43.default.object({
|
|
1695
1764
|
firstname: import_v43.default.object({ required: requiredSchema, label: TranslationConfig.optional() }).optional(),
|
|
1696
1765
|
middlename: import_v43.default.object({ required: requiredSchema, label: TranslationConfig.optional() }).optional(),
|
|
@@ -1721,26 +1790,41 @@ var NameField = BaseField.extend({
|
|
|
1721
1790
|
surname: { required: true }
|
|
1722
1791
|
}
|
|
1723
1792
|
}).optional()
|
|
1724
|
-
}).
|
|
1793
|
+
}).meta({
|
|
1794
|
+
description: "A field for entering a persons name",
|
|
1795
|
+
id: "NameField"
|
|
1796
|
+
});
|
|
1725
1797
|
var PhoneField = BaseField.extend({
|
|
1726
1798
|
defaultValue: NonEmptyTextValue.optional(),
|
|
1727
1799
|
type: import_v43.default.literal(FieldType.PHONE)
|
|
1728
|
-
}).
|
|
1800
|
+
}).meta({
|
|
1801
|
+
description: "A field for entering a phone number",
|
|
1802
|
+
id: "PhoneField"
|
|
1803
|
+
});
|
|
1729
1804
|
var IdField = BaseField.extend({
|
|
1730
1805
|
defaultValue: NonEmptyTextValue.optional(),
|
|
1731
1806
|
type: import_v43.default.literal(FieldType.ID)
|
|
1732
|
-
}).
|
|
1807
|
+
}).meta({
|
|
1808
|
+
description: "A field for entering an ID",
|
|
1809
|
+
id: "IdField"
|
|
1810
|
+
});
|
|
1733
1811
|
var Checkbox = BaseField.extend({
|
|
1734
1812
|
type: import_v43.default.literal(FieldType.CHECKBOX),
|
|
1735
1813
|
defaultValue: CheckboxFieldValue.default(false)
|
|
1736
|
-
}).
|
|
1814
|
+
}).meta({
|
|
1815
|
+
description: "A boolean checkbox field",
|
|
1816
|
+
id: "Checkbox"
|
|
1817
|
+
});
|
|
1737
1818
|
var Country = BaseField.extend({
|
|
1738
1819
|
type: import_v43.default.literal(FieldType.COUNTRY),
|
|
1739
1820
|
defaultValue: NonEmptyTextValue.optional(),
|
|
1740
1821
|
optionOverrides: import_v43.default.array(SelectOption.omit({ label: true })).optional().describe(
|
|
1741
1822
|
"Conditionals for specific countries. Countries not listed are always shown and enabled."
|
|
1742
1823
|
)
|
|
1743
|
-
}).
|
|
1824
|
+
}).meta({
|
|
1825
|
+
description: "A field for selecting a country",
|
|
1826
|
+
id: "Country"
|
|
1827
|
+
});
|
|
1744
1828
|
var AllowedLocations = JurisdictionReference.optional().describe(
|
|
1745
1829
|
"Limits which location options are selectable depending on user jurisdiction and location."
|
|
1746
1830
|
);
|
|
@@ -1749,16 +1833,18 @@ var AdministrativeAreas = import_v43.default.enum([
|
|
|
1749
1833
|
"HEALTH_FACILITY",
|
|
1750
1834
|
"CRVS_OFFICE"
|
|
1751
1835
|
]);
|
|
1752
|
-
var AdministrativeAreaConfiguration = import_v43.default.object({
|
|
1753
|
-
partOf: FieldReference.optional().describe("Parent location"),
|
|
1754
|
-
type: AdministrativeAreas,
|
|
1755
|
-
allowedLocations: AllowedLocations
|
|
1756
|
-
}).describe("Administrative area options");
|
|
1757
1836
|
var AdministrativeAreaField = BaseField.extend({
|
|
1758
1837
|
type: import_v43.default.literal(FieldType.ADMINISTRATIVE_AREA),
|
|
1759
1838
|
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
|
|
1760
|
-
configuration:
|
|
1761
|
-
|
|
1839
|
+
configuration: import_v43.default.object({
|
|
1840
|
+
partOf: FieldReference.optional().describe("Parent location"),
|
|
1841
|
+
type: AdministrativeAreas,
|
|
1842
|
+
allowedLocations: AllowedLocations
|
|
1843
|
+
}).describe("Administrative area options")
|
|
1844
|
+
}).meta({
|
|
1845
|
+
description: "Administrative area input field",
|
|
1846
|
+
id: "AdministrativeAreaField"
|
|
1847
|
+
});
|
|
1762
1848
|
var LocationInput = BaseField.extend({
|
|
1763
1849
|
type: import_v43.default.literal(FieldType.LOCATION),
|
|
1764
1850
|
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
|
|
@@ -1766,7 +1852,10 @@ var LocationInput = BaseField.extend({
|
|
|
1766
1852
|
locationTypes: import_v43.default.array(import_v43.default.string()).optional().describe("Types of the locations that are available for selection."),
|
|
1767
1853
|
allowedLocations: AllowedLocations
|
|
1768
1854
|
}).optional()
|
|
1769
|
-
}).
|
|
1855
|
+
}).meta({
|
|
1856
|
+
description: "A field for selecting a location",
|
|
1857
|
+
id: "LocationInput"
|
|
1858
|
+
});
|
|
1770
1859
|
var FileUploadWithOptions = BaseField.extend({
|
|
1771
1860
|
type: import_v43.default.literal(FieldType.FILE_WITH_OPTIONS),
|
|
1772
1861
|
options: import_v43.default.array(SelectOption).describe("A list of options"),
|
|
@@ -1780,6 +1869,9 @@ var FileUploadWithOptions = BaseField.extend({
|
|
|
1780
1869
|
}).default({
|
|
1781
1870
|
maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
|
|
1782
1871
|
})
|
|
1872
|
+
}).meta({
|
|
1873
|
+
description: "A field for uploading files with file type options",
|
|
1874
|
+
id: "FileUploadWithOptions"
|
|
1783
1875
|
});
|
|
1784
1876
|
var Facility = BaseField.extend({
|
|
1785
1877
|
type: import_v43.default.literal(FieldType.FACILITY),
|
|
@@ -1825,7 +1917,10 @@ var Address = BaseField.extend({
|
|
|
1825
1917
|
allowedLocations: AllowedLocations
|
|
1826
1918
|
}).optional(),
|
|
1827
1919
|
defaultValue: DefaultAddressFieldValue.optional()
|
|
1828
|
-
}).
|
|
1920
|
+
}).meta({
|
|
1921
|
+
description: "Address input field \u2013 a combination of location and text fields",
|
|
1922
|
+
id: "Address"
|
|
1923
|
+
});
|
|
1829
1924
|
var StaticDataEntry = import_v43.default.object({
|
|
1830
1925
|
id: import_v43.default.string().describe("ID for the data entry."),
|
|
1831
1926
|
label: TranslationConfig,
|
|
@@ -1840,7 +1935,10 @@ var DataField = BaseField.extend({
|
|
|
1840
1935
|
subtitle: TranslationConfig.optional(),
|
|
1841
1936
|
data: import_v43.default.array(DataEntry)
|
|
1842
1937
|
})
|
|
1843
|
-
}).
|
|
1938
|
+
}).meta({
|
|
1939
|
+
description: "A field for displaying a table of read-only data",
|
|
1940
|
+
id: "DataField"
|
|
1941
|
+
});
|
|
1844
1942
|
var ButtonSize = import_v43.default.enum(["small", "medium", "large"]);
|
|
1845
1943
|
var ButtonType = import_v43.default.enum([
|
|
1846
1944
|
"primary",
|
|
@@ -1867,11 +1965,17 @@ var ButtonField = BaseField.extend({
|
|
|
1867
1965
|
type: import_v43.default.literal(FieldType.BUTTON),
|
|
1868
1966
|
defaultValue: ButtonFieldValue.optional(),
|
|
1869
1967
|
configuration: ButtonConfiguration
|
|
1870
|
-
}).
|
|
1968
|
+
}).meta({
|
|
1969
|
+
description: "A generic button that can be used to trigger an action",
|
|
1970
|
+
id: "ButtonField"
|
|
1971
|
+
});
|
|
1871
1972
|
var FieldGroup = BaseField.extend({
|
|
1872
1973
|
type: import_v43.default.literal(FieldType.FIELD_GROUP),
|
|
1873
1974
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
1874
1975
|
fields: import_v43.default.lazy(() => import_v43.default.array(FieldConfig))
|
|
1976
|
+
}).meta({
|
|
1977
|
+
description: "A group of fields that are displayed together",
|
|
1978
|
+
id: "FieldGroup"
|
|
1875
1979
|
});
|
|
1876
1980
|
var AlphaPrintButton = BaseField.extend({
|
|
1877
1981
|
type: import_v43.default.literal(FieldType.ALPHA_PRINT_BUTTON),
|
|
@@ -1881,7 +1985,10 @@ var AlphaPrintButton = BaseField.extend({
|
|
|
1881
1985
|
"Label for the print button"
|
|
1882
1986
|
)
|
|
1883
1987
|
})
|
|
1884
|
-
}).
|
|
1988
|
+
}).meta({
|
|
1989
|
+
description: "An experimental print button field for printing certificates during the declaration process",
|
|
1990
|
+
id: "AlphaPrintButton"
|
|
1991
|
+
});
|
|
1885
1992
|
var HttpField = BaseField.extend({
|
|
1886
1993
|
type: import_v43.default.literal(FieldType.HTTP),
|
|
1887
1994
|
defaultValue: HttpFieldValue.optional(),
|
|
@@ -1897,20 +2004,30 @@ var HttpField = BaseField.extend({
|
|
|
1897
2004
|
params: import_v43.default.record(import_v43.default.string(), import_v43.default.union([import_v43.default.string(), FieldReference])).optional(),
|
|
1898
2005
|
timeout: import_v43.default.number().default(15e3).describe("Request timeout in milliseconds")
|
|
1899
2006
|
})
|
|
1900
|
-
}).
|
|
2007
|
+
}).meta({
|
|
2008
|
+
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.",
|
|
2009
|
+
id: "HttpField"
|
|
2010
|
+
});
|
|
1901
2011
|
var AutocompleteField = BaseField.extend({
|
|
1902
2012
|
type: import_v43.default.literal(FieldType.AUTOCOMPLETE),
|
|
1903
2013
|
configuration: import_v43.default.object({
|
|
1904
|
-
url: import_v43.default.string().describe(
|
|
2014
|
+
url: import_v43.default.string().describe(
|
|
2015
|
+
"URL to fetch autocomplete suggestions from. This should be a country config server endpoint."
|
|
2016
|
+
).optional(),
|
|
1905
2017
|
method: import_v43.default.enum(["GET", "POST"]).default("GET").optional(),
|
|
1906
2018
|
defaultOptions: import_v43.default.array(
|
|
1907
2019
|
import_v43.default.object({
|
|
1908
2020
|
label: import_v43.default.string(),
|
|
1909
2021
|
value: import_v43.default.string()
|
|
1910
2022
|
})
|
|
1911
|
-
).optional()
|
|
2023
|
+
).optional().describe(
|
|
2024
|
+
"Manual entry is supported through configuration, allowing users to provide values not currently represented in the dataset."
|
|
2025
|
+
)
|
|
1912
2026
|
})
|
|
1913
|
-
}).
|
|
2027
|
+
}).meta({
|
|
2028
|
+
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.",
|
|
2029
|
+
id: "AutocompleteField"
|
|
2030
|
+
});
|
|
1914
2031
|
var SearchField = HttpField.extend({
|
|
1915
2032
|
type: import_v43.default.literal(FieldType.SEARCH),
|
|
1916
2033
|
configuration: SearchQuery.pick({
|
|
@@ -1943,6 +2060,9 @@ var SearchField = HttpField.extend({
|
|
|
1943
2060
|
ok: TranslationConfig.optional()
|
|
1944
2061
|
}).optional()
|
|
1945
2062
|
})
|
|
2063
|
+
}).meta({
|
|
2064
|
+
description: "A search input field",
|
|
2065
|
+
id: "SearchField"
|
|
1946
2066
|
});
|
|
1947
2067
|
var LinkButtonField = BaseField.extend({
|
|
1948
2068
|
type: import_v43.default.literal(FieldType.LINK_BUTTON),
|
|
@@ -1951,7 +2071,10 @@ var LinkButtonField = BaseField.extend({
|
|
|
1951
2071
|
text: TranslationConfig.describe("Text to display on the button"),
|
|
1952
2072
|
icon: import_v43.default.string().optional().describe("Icon for the button. You can find icons from OpenCRVS UI-Kit.")
|
|
1953
2073
|
})
|
|
1954
|
-
}).
|
|
2074
|
+
}).meta({
|
|
2075
|
+
description: "A button that opens a URL link",
|
|
2076
|
+
id: "LinkButtonField"
|
|
2077
|
+
});
|
|
1955
2078
|
var VerificationStatus = BaseField.extend({
|
|
1956
2079
|
type: import_v43.default.literal(FieldType.VERIFICATION_STATUS),
|
|
1957
2080
|
defaultValue: VerificationStatusValue.optional(),
|
|
@@ -1961,15 +2084,19 @@ var VerificationStatus = BaseField.extend({
|
|
|
1961
2084
|
"Explaining text on the banner in form."
|
|
1962
2085
|
)
|
|
1963
2086
|
})
|
|
2087
|
+
}).meta({
|
|
2088
|
+
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.",
|
|
2089
|
+
id: "VerificationStatus"
|
|
1964
2090
|
});
|
|
1965
2091
|
var QueryParamReaderField = BaseField.extend({
|
|
1966
2092
|
type: import_v43.default.literal(FieldType.QUERY_PARAM_READER),
|
|
1967
2093
|
configuration: import_v43.default.object({
|
|
1968
2094
|
pickParams: import_v43.default.array(import_v43.default.string()).describe("List of query parameters to read from the URL")
|
|
1969
2095
|
})
|
|
1970
|
-
}).
|
|
1971
|
-
"A field that maps URL query params into form values and clears them afterward"
|
|
1972
|
-
|
|
2096
|
+
}).meta({
|
|
2097
|
+
description: "A field that maps URL query params into form values and clears them afterward",
|
|
2098
|
+
id: "QueryParamReaderField"
|
|
2099
|
+
});
|
|
1973
2100
|
var QrReaderField = BaseField.extend({
|
|
1974
2101
|
type: import_v43.default.literal(FieldType.QR_READER),
|
|
1975
2102
|
defaultValue: QrReaderFieldValue.optional(),
|
|
@@ -1980,7 +2107,7 @@ var QrReaderField = BaseField.extend({
|
|
|
1980
2107
|
})
|
|
1981
2108
|
}).optional()
|
|
1982
2109
|
}).meta({
|
|
1983
|
-
description: "
|
|
2110
|
+
description: "QR code reader field, including optional JSON Schema validator.",
|
|
1984
2111
|
id: "QrReaderField"
|
|
1985
2112
|
});
|
|
1986
2113
|
var IdReaderField = BaseField.extend({
|
|
@@ -1989,12 +2116,18 @@ var IdReaderField = BaseField.extend({
|
|
|
1989
2116
|
methods: import_v43.default.array(
|
|
1990
2117
|
import_v43.default.union([QrReaderField, LinkButtonField]).describe("Methods for reading an ID")
|
|
1991
2118
|
)
|
|
2119
|
+
}).meta({
|
|
2120
|
+
description: "A wrapper around nested form fields, specifically QR_READER and LINK_BUTTON. It can hold the QR_READERs value.",
|
|
2121
|
+
id: "IdReaderField"
|
|
1992
2122
|
});
|
|
1993
2123
|
var CustomField = BaseField.extend({
|
|
1994
2124
|
type: import_v43.default.literal(FieldType._EXPERIMENTAL_CUSTOM),
|
|
1995
2125
|
defaultValue: CustomFieldValue.optional(),
|
|
1996
2126
|
src: import_v43.default.string().describe("Module source path for the custom field component"),
|
|
1997
2127
|
configuration: import_v43.default.unknown().optional()
|
|
2128
|
+
}).meta({
|
|
2129
|
+
description: "An expiremental custom field that is defined by a module source path",
|
|
2130
|
+
id: "CustomField"
|
|
1998
2131
|
});
|
|
1999
2132
|
var FieldStyleVariant = import_v43.default.enum(["default", "highlighted"]);
|
|
2000
2133
|
var LoaderField = BaseField.extend({
|
|
@@ -2004,22 +2137,25 @@ var LoaderField = BaseField.extend({
|
|
|
2004
2137
|
configuration: import_v43.default.object({
|
|
2005
2138
|
text: TranslationConfig.describe("Display text above the loading spinner")
|
|
2006
2139
|
})
|
|
2007
|
-
}).
|
|
2008
|
-
"A non-interactive field that indicates an in progress operation in form"
|
|
2009
|
-
|
|
2140
|
+
}).meta({
|
|
2141
|
+
description: "A non-interactive field that indicates an in progress operation in form",
|
|
2142
|
+
id: "LoaderField"
|
|
2143
|
+
});
|
|
2010
2144
|
var HiddenField = BaseField.extend({
|
|
2011
2145
|
type: import_v43.default.literal(FieldType.ALPHA_HIDDEN),
|
|
2012
2146
|
required: import_v43.default.boolean().default(false).optional(),
|
|
2013
2147
|
defaultValue: TextValue.optional()
|
|
2014
|
-
}).
|
|
2015
|
-
"A non-interactive, hidden field that only hold a value in the form"
|
|
2016
|
-
|
|
2148
|
+
}).meta({
|
|
2149
|
+
description: "A non-interactive, hidden field that only hold a value in the form",
|
|
2150
|
+
id: "HiddenField"
|
|
2151
|
+
});
|
|
2017
2152
|
var UserRoleField = BaseField.extend({
|
|
2018
2153
|
type: import_v43.default.literal(FieldType.USER_ROLE),
|
|
2019
2154
|
defaultValue: TextValue.optional()
|
|
2020
|
-
}).
|
|
2021
|
-
"A select dropdown that is automatically populated with available user roles"
|
|
2022
|
-
|
|
2155
|
+
}).meta({
|
|
2156
|
+
description: "A select dropdown that is automatically populated with available user roles",
|
|
2157
|
+
id: "UserRoleField"
|
|
2158
|
+
});
|
|
2023
2159
|
var FieldConfig = import_v43.default.discriminatedUnion("type", [
|
|
2024
2160
|
FieldGroup,
|
|
2025
2161
|
Address,
|
package/dist/cli.js
CHANGED
|
@@ -2393,7 +2393,9 @@ var decodeScope = (query) => {
|
|
|
2393
2393
|
};
|
|
2394
2394
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
2395
2395
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
2396
|
-
accessLevel: JurisdictionFilter.enum.all
|
|
2396
|
+
accessLevel: JurisdictionFilter.enum.all,
|
|
2397
|
+
registeredIn: JurisdictionFilter.enum.all,
|
|
2398
|
+
declaredIn: JurisdictionFilter.enum.all
|
|
2397
2399
|
};
|
|
2398
2400
|
|
|
2399
2401
|
// ../commons/src/scopes.deprecated.do-not-use.ts
|