@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.
- package/dist/application-config/index.js +192 -60
- package/dist/cli.js +95 -6
- package/dist/commons/api/router.d.ts +347 -31
- 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/events/index.js +203 -94
- 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.map +1 -1
- package/dist/migrations/v2.0/index.js +93 -4
- package/dist/notification/index.js +203 -78
- package/opencrvs-toolkit-2.0.0-rc.f5b6bcb.tgz +0 -0
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/opencrvs-toolkit-2.0.0-rc.f58809d.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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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:
|
|
2011
|
-
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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
|
-
}).
|
|
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,20 +2250,30 @@ 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
|
-
}).
|
|
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({
|
|
2154
|
-
url: import_v43.default.string().describe(
|
|
2260
|
+
url: import_v43.default.string().describe(
|
|
2261
|
+
"URL to fetch autocomplete suggestions from. This should be a country config server endpoint."
|
|
2262
|
+
).optional(),
|
|
2155
2263
|
method: import_v43.default.enum(["GET", "POST"]).default("GET").optional(),
|
|
2156
2264
|
defaultOptions: import_v43.default.array(
|
|
2157
2265
|
import_v43.default.object({
|
|
2158
2266
|
label: import_v43.default.string(),
|
|
2159
2267
|
value: import_v43.default.string()
|
|
2160
2268
|
})
|
|
2161
|
-
).optional()
|
|
2269
|
+
).optional().describe(
|
|
2270
|
+
"Manual entry is supported through configuration, allowing users to provide values not currently represented in the dataset."
|
|
2271
|
+
)
|
|
2162
2272
|
})
|
|
2163
|
-
}).
|
|
2273
|
+
}).meta({
|
|
2274
|
+
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.",
|
|
2275
|
+
id: "AutocompleteField"
|
|
2276
|
+
});
|
|
2164
2277
|
var SearchField = HttpField.extend({
|
|
2165
2278
|
type: import_v43.default.literal(FieldType.SEARCH),
|
|
2166
2279
|
configuration: SearchQuery.pick({
|
|
@@ -2193,6 +2306,9 @@ var SearchField = HttpField.extend({
|
|
|
2193
2306
|
ok: TranslationConfig.optional()
|
|
2194
2307
|
}).optional()
|
|
2195
2308
|
})
|
|
2309
|
+
}).meta({
|
|
2310
|
+
description: "A search input field",
|
|
2311
|
+
id: "SearchField"
|
|
2196
2312
|
});
|
|
2197
2313
|
var LinkButtonField = BaseField.extend({
|
|
2198
2314
|
type: import_v43.default.literal(FieldType.LINK_BUTTON),
|
|
@@ -2201,7 +2317,10 @@ var LinkButtonField = BaseField.extend({
|
|
|
2201
2317
|
text: TranslationConfig.describe("Text to display on the button"),
|
|
2202
2318
|
icon: import_v43.default.string().optional().describe("Icon for the button. You can find icons from OpenCRVS UI-Kit.")
|
|
2203
2319
|
})
|
|
2204
|
-
}).
|
|
2320
|
+
}).meta({
|
|
2321
|
+
description: "A button that opens a URL link",
|
|
2322
|
+
id: "LinkButtonField"
|
|
2323
|
+
});
|
|
2205
2324
|
var VerificationStatus = BaseField.extend({
|
|
2206
2325
|
type: import_v43.default.literal(FieldType.VERIFICATION_STATUS),
|
|
2207
2326
|
defaultValue: VerificationStatusValue.optional(),
|
|
@@ -2211,15 +2330,19 @@ var VerificationStatus = BaseField.extend({
|
|
|
2211
2330
|
"Explaining text on the banner in form."
|
|
2212
2331
|
)
|
|
2213
2332
|
})
|
|
2333
|
+
}).meta({
|
|
2334
|
+
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.",
|
|
2335
|
+
id: "VerificationStatus"
|
|
2214
2336
|
});
|
|
2215
2337
|
var QueryParamReaderField = BaseField.extend({
|
|
2216
2338
|
type: import_v43.default.literal(FieldType.QUERY_PARAM_READER),
|
|
2217
2339
|
configuration: import_v43.default.object({
|
|
2218
2340
|
pickParams: import_v43.default.array(import_v43.default.string()).describe("List of query parameters to read from the URL")
|
|
2219
2341
|
})
|
|
2220
|
-
}).
|
|
2221
|
-
"A field that maps URL query params into form values and clears them afterward"
|
|
2222
|
-
|
|
2342
|
+
}).meta({
|
|
2343
|
+
description: "A field that maps URL query params into form values and clears them afterward",
|
|
2344
|
+
id: "QueryParamReaderField"
|
|
2345
|
+
});
|
|
2223
2346
|
var QrReaderField = BaseField.extend({
|
|
2224
2347
|
type: import_v43.default.literal(FieldType.QR_READER),
|
|
2225
2348
|
defaultValue: QrReaderFieldValue.optional(),
|
|
@@ -2230,7 +2353,7 @@ var QrReaderField = BaseField.extend({
|
|
|
2230
2353
|
})
|
|
2231
2354
|
}).optional()
|
|
2232
2355
|
}).meta({
|
|
2233
|
-
description: "
|
|
2356
|
+
description: "QR code reader field, including optional JSON Schema validator.",
|
|
2234
2357
|
id: "QrReaderField"
|
|
2235
2358
|
});
|
|
2236
2359
|
var IdReaderField = BaseField.extend({
|
|
@@ -2239,12 +2362,18 @@ var IdReaderField = BaseField.extend({
|
|
|
2239
2362
|
methods: import_v43.default.array(
|
|
2240
2363
|
import_v43.default.union([QrReaderField, LinkButtonField]).describe("Methods for reading an ID")
|
|
2241
2364
|
)
|
|
2365
|
+
}).meta({
|
|
2366
|
+
description: "A wrapper around nested form fields, specifically QR_READER and LINK_BUTTON. It can hold the QR_READERs value.",
|
|
2367
|
+
id: "IdReaderField"
|
|
2242
2368
|
});
|
|
2243
2369
|
var CustomField = BaseField.extend({
|
|
2244
2370
|
type: import_v43.default.literal(FieldType._EXPERIMENTAL_CUSTOM),
|
|
2245
2371
|
defaultValue: CustomFieldValue.optional(),
|
|
2246
2372
|
src: import_v43.default.string().describe("Module source path for the custom field component"),
|
|
2247
2373
|
configuration: import_v43.default.unknown().optional()
|
|
2374
|
+
}).meta({
|
|
2375
|
+
description: "An expiremental custom field that is defined by a module source path",
|
|
2376
|
+
id: "CustomField"
|
|
2248
2377
|
});
|
|
2249
2378
|
var FieldStyleVariant = import_v43.default.enum(["default", "highlighted"]);
|
|
2250
2379
|
var LoaderField = BaseField.extend({
|
|
@@ -2254,22 +2383,25 @@ var LoaderField = BaseField.extend({
|
|
|
2254
2383
|
configuration: import_v43.default.object({
|
|
2255
2384
|
text: TranslationConfig.describe("Display text above the loading spinner")
|
|
2256
2385
|
})
|
|
2257
|
-
}).
|
|
2258
|
-
"A non-interactive field that indicates an in progress operation in form"
|
|
2259
|
-
|
|
2386
|
+
}).meta({
|
|
2387
|
+
description: "A non-interactive field that indicates an in progress operation in form",
|
|
2388
|
+
id: "LoaderField"
|
|
2389
|
+
});
|
|
2260
2390
|
var HiddenField = BaseField.extend({
|
|
2261
2391
|
type: import_v43.default.literal(FieldType.ALPHA_HIDDEN),
|
|
2262
2392
|
required: import_v43.default.boolean().default(false).optional(),
|
|
2263
2393
|
defaultValue: TextValue.optional()
|
|
2264
|
-
}).
|
|
2265
|
-
"A non-interactive, hidden field that only hold a value in the form"
|
|
2266
|
-
|
|
2394
|
+
}).meta({
|
|
2395
|
+
description: "A non-interactive, hidden field that only hold a value in the form",
|
|
2396
|
+
id: "HiddenField"
|
|
2397
|
+
});
|
|
2267
2398
|
var UserRoleField = BaseField.extend({
|
|
2268
2399
|
type: import_v43.default.literal(FieldType.USER_ROLE),
|
|
2269
2400
|
defaultValue: TextValue.optional()
|
|
2270
|
-
}).
|
|
2271
|
-
"A select dropdown that is automatically populated with available user roles"
|
|
2272
|
-
|
|
2401
|
+
}).meta({
|
|
2402
|
+
description: "A select dropdown that is automatically populated with available user roles",
|
|
2403
|
+
id: "UserRoleField"
|
|
2404
|
+
});
|
|
2273
2405
|
var FieldConfig = import_v43.default.discriminatedUnion("type", [
|
|
2274
2406
|
FieldGroup,
|
|
2275
2407
|
Address,
|
|
@@ -2368,10 +2500,10 @@ var VerificationPageConfig = FormPageConfig.extend({
|
|
|
2368
2500
|
type: z21.literal(PageTypes.enum.VERIFICATION),
|
|
2369
2501
|
actions: VerificationActionConfig
|
|
2370
2502
|
});
|
|
2371
|
-
var PageConfig = z21.discriminatedUnion("type", [
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2503
|
+
var PageConfig = z21.discriminatedUnion("type", [FormPageConfig, VerificationPageConfig]).meta({
|
|
2504
|
+
description: "Page configuration",
|
|
2505
|
+
id: "PageConfig"
|
|
2506
|
+
});
|
|
2375
2507
|
|
|
2376
2508
|
// ../commons/src/events/FormConfig.ts
|
|
2377
2509
|
var DeclarationFormConfig = z22.object({
|
|
@@ -3671,7 +3803,7 @@ var _EventConfigBase = z33.object({
|
|
|
3671
3803
|
),
|
|
3672
3804
|
label: TranslationConfig.describe("Human-readable label for the event type."),
|
|
3673
3805
|
actions: z33.array(ActionConfig).describe(
|
|
3674
|
-
"Configuration of
|
|
3806
|
+
"Configuration of core and custom actions associated with the event."
|
|
3675
3807
|
),
|
|
3676
3808
|
actionOrder: z33.array(z33.string()).optional().describe(
|
|
3677
3809
|
"Order of actions in the action menu. Use either the action type for core actions or the customActionType for custom actions."
|
|
@@ -3683,7 +3815,7 @@ var _EventConfigBase = z33.object({
|
|
|
3683
3815
|
"Configuration of fields available in the advanced search feature."
|
|
3684
3816
|
),
|
|
3685
3817
|
flags: z33.array(FlagConfig).optional().default([]).describe(
|
|
3686
|
-
"Configuration of flags associated with the actions of this event type."
|
|
3818
|
+
"Configuration of custom flags associated with the actions of this event type."
|
|
3687
3819
|
),
|
|
3688
3820
|
analytics: z33.boolean().optional().default(true).describe(
|
|
3689
3821
|
"Indicates whether the records of this event type are included in analytics"
|
|
@@ -4121,18 +4253,11 @@ var WorkqueueConfigWithoutQuery = WorkqueueConfig.omit({
|
|
|
4121
4253
|
query: true,
|
|
4122
4254
|
columns: true
|
|
4123
4255
|
});
|
|
4124
|
-
var WorkqueueConfigInput =
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
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()
|
|
4256
|
+
var WorkqueueConfigInput = WorkqueueConfig.extend({
|
|
4257
|
+
query: CountryConfigQueryInputType
|
|
4258
|
+
}).meta({
|
|
4259
|
+
description: "Workqueue configuration",
|
|
4260
|
+
id: "WorkqueueConfig"
|
|
4136
4261
|
});
|
|
4137
4262
|
var WorkqueueCountInput = z37.array(
|
|
4138
4263
|
z37.object({ slug: z37.string(), query: QueryType })
|
|
Binary file
|
package/package.json
CHANGED
package/tsconfig.tsbuildinfo
CHANGED
|
@@ -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"}
|
|
Binary file
|