@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.
- package/dist/application-config/index.js +186 -58
- package/dist/cli.js +389 -127
- package/dist/commons/api/router.d.ts +3277 -230
- package/dist/commons/conditionals/validate.d.ts +1 -0
- package/dist/commons/events/ActionInput.d.ts +72 -0
- package/dist/commons/events/Draft.d.ts +2 -0
- package/dist/commons/events/EventIndex.d.ts +0 -3
- package/dist/commons/events/EventMetadata.d.ts +0 -7
- package/dist/commons/events/WorkqueueConfig.d.ts +150 -150
- package/dist/commons/events/state/index.d.ts +0 -4
- package/dist/commons/events/state/utils.d.ts +0 -2
- package/dist/commons/events/utils.d.ts +1 -1
- package/dist/events/index.js +212 -106
- package/dist/migrations/v2.0/checkout-upstream-files.d.ts +1 -1
- package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -1
- package/dist/migrations/v2.0/checkout-upstream-files.js +1 -2
- package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts +9 -1
- package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts.map +1 -1
- package/dist/migrations/v2.0/delete-infrastructure-directory.js +66 -20
- package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts +3 -0
- package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts.map +1 -0
- package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.js +110 -0
- package/dist/migrations/v2.0/index.d.ts +5 -3
- package/dist/migrations/v2.0/index.d.ts.map +1 -1
- package/dist/migrations/v2.0/index.js +387 -125
- package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts +11 -1
- package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts.map +1 -1
- package/dist/migrations/v2.0/merge-infrastructure-directory.js +17 -16
- package/dist/migrations/v2.0/migrate-scopes.d.ts.map +1 -1
- package/dist/migrations/v2.0/migrate-scopes.js +54 -30
- package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts.map +1 -1
- package/dist/migrations/v2.0/migrate-workqueue-configs.js +140 -59
- package/dist/notification/index.js +199 -76
- package/opencrvs-toolkit-2.0.0-rc.a928ed6.tgz +0 -0
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/opencrvs-toolkit-2.0.0-rc.a7c070e.tgz +0 -0
|
@@ -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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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:
|
|
1756
|
-
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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,7 +1995,10 @@ 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
|
-
}).
|
|
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({
|
|
@@ -1905,7 +2011,10 @@ var AutocompleteField = BaseField.extend({
|
|
|
1905
2011
|
})
|
|
1906
2012
|
).optional()
|
|
1907
2013
|
})
|
|
1908
|
-
}).
|
|
2014
|
+
}).meta({
|
|
2015
|
+
description: "Autocomplete input field",
|
|
2016
|
+
id: "AutocompleteField"
|
|
2017
|
+
});
|
|
1909
2018
|
var SearchField = HttpField.extend({
|
|
1910
2019
|
type: import_v43.default.literal(FieldType.SEARCH),
|
|
1911
2020
|
configuration: SearchQuery.pick({
|
|
@@ -1938,6 +2047,9 @@ var SearchField = HttpField.extend({
|
|
|
1938
2047
|
ok: TranslationConfig.optional()
|
|
1939
2048
|
}).optional()
|
|
1940
2049
|
})
|
|
2050
|
+
}).meta({
|
|
2051
|
+
description: "A search input field",
|
|
2052
|
+
id: "SearchField"
|
|
1941
2053
|
});
|
|
1942
2054
|
var LinkButtonField = BaseField.extend({
|
|
1943
2055
|
type: import_v43.default.literal(FieldType.LINK_BUTTON),
|
|
@@ -1946,7 +2058,10 @@ var LinkButtonField = BaseField.extend({
|
|
|
1946
2058
|
text: TranslationConfig.describe("Text to display on the button"),
|
|
1947
2059
|
icon: import_v43.default.string().optional().describe("Icon for the button. You can find icons from OpenCRVS UI-Kit.")
|
|
1948
2060
|
})
|
|
1949
|
-
}).
|
|
2061
|
+
}).meta({
|
|
2062
|
+
description: "A button that opens a URL link",
|
|
2063
|
+
id: "LinkButtonField"
|
|
2064
|
+
});
|
|
1950
2065
|
var VerificationStatus = BaseField.extend({
|
|
1951
2066
|
type: import_v43.default.literal(FieldType.VERIFICATION_STATUS),
|
|
1952
2067
|
defaultValue: VerificationStatusValue.optional(),
|
|
@@ -1956,15 +2071,19 @@ var VerificationStatus = BaseField.extend({
|
|
|
1956
2071
|
"Explaining text on the banner in form."
|
|
1957
2072
|
)
|
|
1958
2073
|
})
|
|
2074
|
+
}).meta({
|
|
2075
|
+
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.",
|
|
2076
|
+
id: "VerificationStatus"
|
|
1959
2077
|
});
|
|
1960
2078
|
var QueryParamReaderField = BaseField.extend({
|
|
1961
2079
|
type: import_v43.default.literal(FieldType.QUERY_PARAM_READER),
|
|
1962
2080
|
configuration: import_v43.default.object({
|
|
1963
2081
|
pickParams: import_v43.default.array(import_v43.default.string()).describe("List of query parameters to read from the URL")
|
|
1964
2082
|
})
|
|
1965
|
-
}).
|
|
1966
|
-
"A field that maps URL query params into form values and clears them afterward"
|
|
1967
|
-
|
|
2083
|
+
}).meta({
|
|
2084
|
+
description: "A field that maps URL query params into form values and clears them afterward",
|
|
2085
|
+
id: "QueryParamReaderField"
|
|
2086
|
+
});
|
|
1968
2087
|
var QrReaderField = BaseField.extend({
|
|
1969
2088
|
type: import_v43.default.literal(FieldType.QR_READER),
|
|
1970
2089
|
defaultValue: QrReaderFieldValue.optional(),
|
|
@@ -1975,7 +2094,7 @@ var QrReaderField = BaseField.extend({
|
|
|
1975
2094
|
})
|
|
1976
2095
|
}).optional()
|
|
1977
2096
|
}).meta({
|
|
1978
|
-
description: "
|
|
2097
|
+
description: "QR code reader field, including optional JSON Schema validator.",
|
|
1979
2098
|
id: "QrReaderField"
|
|
1980
2099
|
});
|
|
1981
2100
|
var IdReaderField = BaseField.extend({
|
|
@@ -1984,12 +2103,18 @@ var IdReaderField = BaseField.extend({
|
|
|
1984
2103
|
methods: import_v43.default.array(
|
|
1985
2104
|
import_v43.default.union([QrReaderField, LinkButtonField]).describe("Methods for reading an ID")
|
|
1986
2105
|
)
|
|
2106
|
+
}).meta({
|
|
2107
|
+
description: "A wrapper around nested form fields, specifically QR_READER and LINK_BUTTON. It can hold the QR_READERs value.",
|
|
2108
|
+
id: "IdReaderField"
|
|
1987
2109
|
});
|
|
1988
2110
|
var CustomField = BaseField.extend({
|
|
1989
2111
|
type: import_v43.default.literal(FieldType._EXPERIMENTAL_CUSTOM),
|
|
1990
2112
|
defaultValue: CustomFieldValue.optional(),
|
|
1991
2113
|
src: import_v43.default.string().describe("Module source path for the custom field component"),
|
|
1992
2114
|
configuration: import_v43.default.unknown().optional()
|
|
2115
|
+
}).meta({
|
|
2116
|
+
description: "An expiremental custom field that is defined by a module source path",
|
|
2117
|
+
id: "CustomField"
|
|
1993
2118
|
});
|
|
1994
2119
|
var FieldStyleVariant = import_v43.default.enum(["default", "highlighted"]);
|
|
1995
2120
|
var LoaderField = BaseField.extend({
|
|
@@ -1999,22 +2124,25 @@ var LoaderField = BaseField.extend({
|
|
|
1999
2124
|
configuration: import_v43.default.object({
|
|
2000
2125
|
text: TranslationConfig.describe("Display text above the loading spinner")
|
|
2001
2126
|
})
|
|
2002
|
-
}).
|
|
2003
|
-
"A non-interactive field that indicates an in progress operation in form"
|
|
2004
|
-
|
|
2127
|
+
}).meta({
|
|
2128
|
+
description: "A non-interactive field that indicates an in progress operation in form",
|
|
2129
|
+
id: "LoaderField"
|
|
2130
|
+
});
|
|
2005
2131
|
var HiddenField = BaseField.extend({
|
|
2006
2132
|
type: import_v43.default.literal(FieldType.ALPHA_HIDDEN),
|
|
2007
2133
|
required: import_v43.default.boolean().default(false).optional(),
|
|
2008
2134
|
defaultValue: TextValue.optional()
|
|
2009
|
-
}).
|
|
2010
|
-
"A non-interactive, hidden field that only hold a value in the form"
|
|
2011
|
-
|
|
2135
|
+
}).meta({
|
|
2136
|
+
description: "A non-interactive, hidden field that only hold a value in the form",
|
|
2137
|
+
id: "HiddenField"
|
|
2138
|
+
});
|
|
2012
2139
|
var UserRoleField = BaseField.extend({
|
|
2013
2140
|
type: import_v43.default.literal(FieldType.USER_ROLE),
|
|
2014
2141
|
defaultValue: TextValue.optional()
|
|
2015
|
-
}).
|
|
2016
|
-
"A select dropdown that is automatically populated with available user roles"
|
|
2017
|
-
|
|
2142
|
+
}).meta({
|
|
2143
|
+
description: "A select dropdown that is automatically populated with available user roles",
|
|
2144
|
+
id: "UserRoleField"
|
|
2145
|
+
});
|
|
2018
2146
|
var FieldConfig = import_v43.default.discriminatedUnion("type", [
|
|
2019
2147
|
FieldGroup,
|
|
2020
2148
|
Address,
|