@opencrvs/toolkit 2.0.0-rc.06a0baa → 2.0.0-rc.07776ed
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 +257 -94
- package/dist/cli.js +12 -4
- package/dist/commons/api/router.d.ts +440 -20
- package/dist/commons/application-config/index.d.ts +1 -0
- package/dist/commons/conditionals/conditionals.d.ts +354 -4
- package/dist/commons/conditionals/validate.d.ts +51 -2
- package/dist/commons/events/ActionDocument.d.ts +6 -0
- package/dist/commons/events/ActionInput.d.ts +42 -36
- package/dist/commons/events/AdvancedSearchConfig.d.ts +342 -0
- package/dist/commons/events/Draft.d.ts +2 -3
- package/dist/commons/events/EventDocument.d.ts +3 -0
- package/dist/commons/events/FieldConfig.d.ts +377 -50
- package/dist/commons/events/FieldType.d.ts +1 -0
- package/dist/commons/events/FieldValue.d.ts +6 -0
- package/dist/commons/events/WorkqueueConfig.d.ts +150 -150
- package/dist/commons/events/field.d.ts +53 -1
- package/dist/commons/events/index.d.ts +2 -0
- package/dist/commons/events/state/flags.d.ts +16 -0
- package/dist/commons/events/state/utils.d.ts +12 -287
- package/dist/commons/events/utils.d.ts +12 -1
- package/dist/conditionals/index.js +55 -2
- package/dist/events/index.js +945 -212
- package/dist/migrations/v2.0/index.js +12 -4
- package/dist/notification/index.js +802 -130
- package/dist/scopes/index.d.ts +4 -6
- package/dist/scopes/index.js +12 -4
- package/opencrvs-toolkit-2.0.0-rc.07776ed.tgz +0 -0
- package/package.json +6 -2
- package/opencrvs-toolkit-2.0.0-rc.06a0baa.tgz +0 -0
|
@@ -293,7 +293,9 @@ var ScopeType = z2.enum([
|
|
|
293
293
|
var EncodedScope = z2.string().brand("EncodedScope");
|
|
294
294
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
295
295
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
296
|
-
accessLevel: JurisdictionFilter.enum.all
|
|
296
|
+
accessLevel: JurisdictionFilter.enum.all,
|
|
297
|
+
registeredIn: JurisdictionFilter.enum.all,
|
|
298
|
+
declaredIn: JurisdictionFilter.enum.all
|
|
297
299
|
};
|
|
298
300
|
|
|
299
301
|
// ../commons/src/authentication.ts
|
|
@@ -652,7 +654,10 @@ var ActionConditional = z7.discriminatedUnion("type", [
|
|
|
652
654
|
ShowConditional,
|
|
653
655
|
// Action can be shown to the user in the list but as disabled
|
|
654
656
|
EnableConditional
|
|
655
|
-
])
|
|
657
|
+
]).meta({
|
|
658
|
+
id: "ActionConditional",
|
|
659
|
+
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."
|
|
660
|
+
});
|
|
656
661
|
var DisplayOnReviewConditional = z7.object({
|
|
657
662
|
type: z7.literal(ConditionalType.DISPLAY_ON_REVIEW),
|
|
658
663
|
conditional: Conditional
|
|
@@ -667,8 +672,8 @@ var FieldConditional = z7.discriminatedUnion("type", [
|
|
|
667
672
|
// Field output can be shown / hidden on the review page
|
|
668
673
|
DisplayOnReviewConditional
|
|
669
674
|
]).meta({
|
|
670
|
-
|
|
671
|
-
|
|
675
|
+
id: "FieldConditional",
|
|
676
|
+
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."
|
|
672
677
|
});
|
|
673
678
|
|
|
674
679
|
// ../commons/src/events/FieldType.ts
|
|
@@ -765,6 +770,11 @@ var FieldTypesToHideInReview = [
|
|
|
765
770
|
FieldType.ALPHA_PRINT_BUTTON,
|
|
766
771
|
FieldType.ALPHA_HIDDEN
|
|
767
772
|
];
|
|
773
|
+
var HiddenFieldTypes = [
|
|
774
|
+
FieldType.HTTP,
|
|
775
|
+
FieldType.QUERY_PARAM_READER,
|
|
776
|
+
FieldType.ALPHA_HIDDEN
|
|
777
|
+
];
|
|
768
778
|
|
|
769
779
|
// ../commons/src/events/FieldValue.ts
|
|
770
780
|
var z12 = __toESM(require("zod/v4"));
|
|
@@ -883,7 +893,7 @@ var PlainDate = import_zod.z.string().date().brand("PlainDate").describe("Date i
|
|
|
883
893
|
// ../commons/src/events/FieldValue.ts
|
|
884
894
|
var TextValue = z12.string();
|
|
885
895
|
var HiddenFieldValue = z12.string();
|
|
886
|
-
var NonEmptyTextValue =
|
|
896
|
+
var NonEmptyTextValue = z12.string().trim().min(1);
|
|
887
897
|
var DateValue = z12.iso.date().describe("Date in the format YYYY-MM-DD");
|
|
888
898
|
var AgeValue = z12.object({
|
|
889
899
|
age: z12.number(),
|
|
@@ -912,6 +922,7 @@ var DateRangeFieldValue = z12.object({
|
|
|
912
922
|
var EmailValue = z12.email();
|
|
913
923
|
var CheckboxFieldValue = z12.boolean();
|
|
914
924
|
var NumberFieldValue = z12.number();
|
|
925
|
+
var SignatureFieldValue = FileFieldValue;
|
|
915
926
|
var ButtonFieldValue = z12.number();
|
|
916
927
|
var VerificationStatusValue = z12.enum([
|
|
917
928
|
"verified",
|
|
@@ -1210,8 +1221,9 @@ var RequestedCorrectionAction = ActionBase.extend(
|
|
|
1210
1221
|
var ApprovedCorrectionAction = ActionBase.extend(
|
|
1211
1222
|
z14.object({
|
|
1212
1223
|
type: z14.literal(ActionType.APPROVE_CORRECTION),
|
|
1213
|
-
requestId: z14.string()
|
|
1224
|
+
requestId: z14.string(),
|
|
1214
1225
|
// TODO move into 'content' property
|
|
1226
|
+
content: z14.object({ immediateCorrection: z14.boolean().optional() }).optional()
|
|
1215
1227
|
}).shape
|
|
1216
1228
|
);
|
|
1217
1229
|
var RejectedCorrectionAction = ActionBase.extend(
|
|
@@ -1303,6 +1315,9 @@ var FlagConfig = z15.object({
|
|
|
1303
1315
|
"Indicates if this flag expects an action to be performed to be cleared."
|
|
1304
1316
|
),
|
|
1305
1317
|
label: TranslationConfig.describe("Human readable label of the flag.")
|
|
1318
|
+
}).meta({
|
|
1319
|
+
id: "FlagConfig",
|
|
1320
|
+
description: "Configuration for a custom flag that can be added to or removed from records by event actions."
|
|
1306
1321
|
});
|
|
1307
1322
|
var ActionFlagConfig = z15.object({
|
|
1308
1323
|
id: Flag,
|
|
@@ -1310,6 +1325,9 @@ var ActionFlagConfig = z15.object({
|
|
|
1310
1325
|
conditional: Conditional.optional().describe(
|
|
1311
1326
|
"When conditional is met, the operation is performed on the flag. If not provided, the operation is performed unconditionally."
|
|
1312
1327
|
)
|
|
1328
|
+
}).meta({
|
|
1329
|
+
id: "ActionFlagConfig",
|
|
1330
|
+
description: "Add or remove operation applied to a flag when the parent action is accepted. Optionally gated by a conditional."
|
|
1313
1331
|
});
|
|
1314
1332
|
|
|
1315
1333
|
// ../commons/src/events/EventMetadata.ts
|
|
@@ -1651,14 +1669,31 @@ var FieldId = import_v43.default.string().superRefine((val, ctx) => {
|
|
|
1651
1669
|
}
|
|
1652
1670
|
}).describe("Unique identifier for the field");
|
|
1653
1671
|
var FieldReference = import_v43.default.object({
|
|
1654
|
-
$$field: FieldId,
|
|
1672
|
+
$$field: FieldId.describe("Id of the field to reference"),
|
|
1655
1673
|
$$subfield: import_v43.default.array(import_v43.default.string()).optional().default([]).describe(
|
|
1656
1674
|
'If the FieldValue is an object, subfield can be used to refer to e.g. `["foo", "bar"]` in `{ foo: { bar: 3 } }`'
|
|
1675
|
+
),
|
|
1676
|
+
$$code: import_v43.default.string().optional().describe(
|
|
1677
|
+
"Serialised client-side function body. When present the expression is evaluated rather than dereferenced."
|
|
1657
1678
|
)
|
|
1658
|
-
}).describe(
|
|
1679
|
+
}).describe(
|
|
1680
|
+
"Reference to a field value, with an optional client-side computation applied."
|
|
1681
|
+
);
|
|
1682
|
+
var ComputedDefaultValue = import_v43.default.object({
|
|
1683
|
+
$$code: import_v43.default.string().describe(
|
|
1684
|
+
"Serialised client-side function body. Receives (undefined, context) where context includes $now, $online, and system variables."
|
|
1685
|
+
)
|
|
1686
|
+
}).describe("A context-only computation used as a field default value.");
|
|
1659
1687
|
var ValidationConfig = import_v43.default.object({
|
|
1660
|
-
validator: Conditional
|
|
1661
|
-
|
|
1688
|
+
validator: Conditional.describe(
|
|
1689
|
+
"Conditional expression that must hold for the field value to be considered valid."
|
|
1690
|
+
),
|
|
1691
|
+
message: TranslationConfig.describe(
|
|
1692
|
+
"Error message displayed when the validator does not hold."
|
|
1693
|
+
)
|
|
1694
|
+
}).meta({
|
|
1695
|
+
id: "ValidationConfig",
|
|
1696
|
+
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."
|
|
1662
1697
|
});
|
|
1663
1698
|
var requiredSchema = import_v43.default.union([
|
|
1664
1699
|
import_v43.default.boolean(),
|
|
@@ -1689,7 +1724,7 @@ var BaseField = import_v43.default.object({
|
|
|
1689
1724
|
"Indicates whether the field can be modified during record correction."
|
|
1690
1725
|
),
|
|
1691
1726
|
value: FieldReference.or(import_v43.default.array(FieldReference)).optional().describe(
|
|
1692
|
-
"Reference to the source field or fields. When a value is defined, it is copied from the parent field when changed. If multiple references are provided, the first truthy value is used."
|
|
1727
|
+
"Reference to the source field or fields. When a value is defined, it is copied from the parent field when changed. If multiple references are provided, the first truthy value is used. A FieldReference with $$code computes the value via a custom client-side function."
|
|
1693
1728
|
),
|
|
1694
1729
|
analytics: import_v43.default.boolean().default(false).optional().describe(
|
|
1695
1730
|
"Indicates whether the field is included in analytics. When enabled, its value becomes available in the analytics dashboard."
|
|
@@ -1697,30 +1732,39 @@ var BaseField = import_v43.default.object({
|
|
|
1697
1732
|
}).describe("Common properties shared across all field types.");
|
|
1698
1733
|
var Divider = BaseField.extend({
|
|
1699
1734
|
type: import_v43.default.literal(FieldType.DIVIDER)
|
|
1735
|
+
}).meta({
|
|
1736
|
+
description: "A horizontal line divider",
|
|
1737
|
+
id: "Divider"
|
|
1700
1738
|
});
|
|
1701
1739
|
var TextField = BaseField.extend({
|
|
1702
1740
|
type: import_v43.default.literal(FieldType.TEXT),
|
|
1703
|
-
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
|
|
1741
|
+
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField, ComputedDefaultValue]).optional(),
|
|
1704
1742
|
configuration: import_v43.default.object({
|
|
1705
1743
|
maxLength: import_v43.default.number().optional().describe("Maximum length of the text"),
|
|
1706
1744
|
type: import_v43.default.enum(["text", "password"]).optional(),
|
|
1707
1745
|
prefix: TranslationConfig.optional(),
|
|
1708
1746
|
postfix: TranslationConfig.optional()
|
|
1709
1747
|
}).default({ type: "text" }).optional()
|
|
1710
|
-
}).
|
|
1748
|
+
}).meta({
|
|
1749
|
+
description: "A text input field",
|
|
1750
|
+
id: "TextField"
|
|
1751
|
+
});
|
|
1711
1752
|
var NumberField = BaseField.extend({
|
|
1712
1753
|
type: import_v43.default.literal(FieldType.NUMBER),
|
|
1713
|
-
defaultValue: NumberFieldValue.optional(),
|
|
1754
|
+
defaultValue: NumberFieldValue.or(ComputedDefaultValue).optional(),
|
|
1714
1755
|
configuration: import_v43.default.object({
|
|
1715
1756
|
min: import_v43.default.number().optional().describe("Minimum value"),
|
|
1716
1757
|
max: import_v43.default.number().optional().describe("Maximum value"),
|
|
1717
1758
|
prefix: TranslationConfig.optional(),
|
|
1718
1759
|
postfix: TranslationConfig.optional()
|
|
1719
1760
|
}).optional()
|
|
1720
|
-
}).
|
|
1761
|
+
}).meta({
|
|
1762
|
+
description: "A number input field",
|
|
1763
|
+
id: "NumberField"
|
|
1764
|
+
});
|
|
1721
1765
|
var TextAreaField = BaseField.extend({
|
|
1722
1766
|
type: import_v43.default.literal(FieldType.TEXTAREA),
|
|
1723
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
1767
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1724
1768
|
configuration: import_v43.default.object({
|
|
1725
1769
|
maxLength: import_v43.default.number().optional().describe("Maximum length of the text"),
|
|
1726
1770
|
rows: import_v43.default.number().optional().describe("Number of visible text lines"),
|
|
@@ -1728,7 +1772,10 @@ var TextAreaField = BaseField.extend({
|
|
|
1728
1772
|
prefix: TranslationConfig.optional(),
|
|
1729
1773
|
postfix: TranslationConfig.optional()
|
|
1730
1774
|
}).default({ rows: 4 }).optional()
|
|
1731
|
-
}).
|
|
1775
|
+
}).meta({
|
|
1776
|
+
description: "A multiline text input",
|
|
1777
|
+
id: "TextAreaField"
|
|
1778
|
+
});
|
|
1732
1779
|
var ImageMimeType = import_v43.default.enum([
|
|
1733
1780
|
"image/png",
|
|
1734
1781
|
"image/jpg",
|
|
@@ -1751,58 +1798,76 @@ var SignatureField = BaseField.extend({
|
|
|
1751
1798
|
signaturePromptLabel: TranslationConfig.describe(
|
|
1752
1799
|
"Title of the signature modal"
|
|
1753
1800
|
),
|
|
1754
|
-
defaultValue:
|
|
1801
|
+
defaultValue: SignatureFieldValue.or(ComputedDefaultValue).optional(),
|
|
1755
1802
|
configuration: import_v43.default.object({
|
|
1756
1803
|
maxFileSize: import_v43.default.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
|
|
1757
1804
|
acceptedFileTypes: MimeType.array().optional().describe("List of allowed file formats for the signature")
|
|
1758
1805
|
}).default({
|
|
1759
1806
|
maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
|
|
1760
1807
|
})
|
|
1761
|
-
}).
|
|
1808
|
+
}).meta({
|
|
1809
|
+
description: "A signature input field",
|
|
1810
|
+
id: "SignatureField"
|
|
1811
|
+
});
|
|
1762
1812
|
var EmailField = BaseField.extend({
|
|
1763
1813
|
type: import_v43.default.literal(FieldType.EMAIL),
|
|
1764
1814
|
configuration: import_v43.default.object({
|
|
1765
1815
|
maxLength: import_v43.default.number().optional().describe("Maximum length of the text")
|
|
1766
1816
|
}).default({ maxLength: 255 }).optional(),
|
|
1767
|
-
defaultValue: NonEmptyTextValue.optional()
|
|
1817
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional()
|
|
1818
|
+
}).meta({
|
|
1819
|
+
description: "An email input field",
|
|
1820
|
+
id: "EmailField"
|
|
1768
1821
|
});
|
|
1769
1822
|
var DateField = BaseField.extend({
|
|
1770
1823
|
type: import_v43.default.literal(FieldType.DATE),
|
|
1771
|
-
defaultValue: SerializedNowDateTime.or(PlainDate).optional().describe("Default date value(yyyy-MM-dd)"),
|
|
1824
|
+
defaultValue: SerializedNowDateTime.or(PlainDate).or(ComputedDefaultValue).optional().describe("Default date value(yyyy-MM-dd)"),
|
|
1772
1825
|
configuration: import_v43.default.object({
|
|
1773
1826
|
notice: TranslationConfig.describe(
|
|
1774
1827
|
"Text to display above the date input"
|
|
1775
1828
|
).optional()
|
|
1776
1829
|
}).optional()
|
|
1777
|
-
}).
|
|
1830
|
+
}).meta({
|
|
1831
|
+
description: "A date input (yyyy-MM-dd)",
|
|
1832
|
+
id: "DateField"
|
|
1833
|
+
});
|
|
1778
1834
|
var AgeField = BaseField.extend({
|
|
1779
1835
|
type: import_v43.default.literal(FieldType.AGE),
|
|
1780
|
-
defaultValue: NumberFieldValue.optional(),
|
|
1836
|
+
defaultValue: NumberFieldValue.or(ComputedDefaultValue).optional(),
|
|
1781
1837
|
configuration: import_v43.default.object({
|
|
1782
1838
|
asOfDate: FieldReference,
|
|
1783
1839
|
prefix: TranslationConfig.optional(),
|
|
1784
1840
|
postfix: TranslationConfig.optional()
|
|
1785
1841
|
})
|
|
1786
|
-
}).
|
|
1842
|
+
}).meta({
|
|
1843
|
+
description: "An age input field which uses the current date as the asOfDate",
|
|
1844
|
+
id: "AgeField"
|
|
1845
|
+
});
|
|
1787
1846
|
var TimeField = BaseField.extend({
|
|
1788
1847
|
type: import_v43.default.literal(FieldType.TIME),
|
|
1789
|
-
defaultValue: SerializedNowDateTime.or(TimeValue).optional().describe("Default time value (HH-mm)"),
|
|
1848
|
+
defaultValue: SerializedNowDateTime.or(TimeValue).or(ComputedDefaultValue).optional().describe("Default time value (HH-mm)"),
|
|
1790
1849
|
configuration: import_v43.default.object({
|
|
1791
1850
|
use12HourFormat: import_v43.default.boolean().optional().describe("Whether to use 12-hour format"),
|
|
1792
1851
|
notice: TranslationConfig.describe(
|
|
1793
1852
|
"Text to display above the time input"
|
|
1794
1853
|
).optional()
|
|
1795
1854
|
}).optional()
|
|
1796
|
-
}).
|
|
1855
|
+
}).meta({
|
|
1856
|
+
description: "A single time input (HH-mm)",
|
|
1857
|
+
id: "TimeField"
|
|
1858
|
+
});
|
|
1797
1859
|
var DateRangeField = BaseField.extend({
|
|
1798
1860
|
type: import_v43.default.literal(FieldType.DATE_RANGE),
|
|
1799
|
-
defaultValue: DateRangeFieldValue.optional(),
|
|
1861
|
+
defaultValue: DateRangeFieldValue.or(ComputedDefaultValue).optional(),
|
|
1800
1862
|
configuration: import_v43.default.object({
|
|
1801
1863
|
notice: TranslationConfig.describe(
|
|
1802
1864
|
"Text to display above the date input"
|
|
1803
1865
|
).optional()
|
|
1804
1866
|
}).optional()
|
|
1805
|
-
}).
|
|
1867
|
+
}).meta({
|
|
1868
|
+
description: "A date range input ({ start: yyyy-MM-dd, end: yyyy-MM-dd })",
|
|
1869
|
+
id: "DateRangeField"
|
|
1870
|
+
});
|
|
1806
1871
|
var HtmlFontVariant = import_v43.default.enum([
|
|
1807
1872
|
"reg12",
|
|
1808
1873
|
"reg14",
|
|
@@ -1846,21 +1911,33 @@ var ImageViewField = BaseField.extend({
|
|
|
1846
1911
|
type: import_v43.default.literal(FieldType.IMAGE_VIEW),
|
|
1847
1912
|
defaultValue: NonEmptyTextValue.optional(),
|
|
1848
1913
|
configuration: ImageConfiguration
|
|
1849
|
-
}).
|
|
1914
|
+
}).meta({
|
|
1915
|
+
description: "A read-only image component for form pages",
|
|
1916
|
+
id: "ImageViewField"
|
|
1917
|
+
});
|
|
1850
1918
|
var Paragraph = BaseField.extend({
|
|
1851
1919
|
type: import_v43.default.literal(FieldType.PARAGRAPH),
|
|
1852
1920
|
configuration: ParagraphConfiguration
|
|
1853
|
-
}).
|
|
1921
|
+
}).meta({
|
|
1922
|
+
description: "A read-only HTML <p> paragraph",
|
|
1923
|
+
id: "Paragraph"
|
|
1924
|
+
});
|
|
1854
1925
|
var Heading = BaseField.extend({
|
|
1855
1926
|
type: import_v43.default.literal(FieldType.HEADING),
|
|
1856
1927
|
configuration: HeadingConfiguration
|
|
1857
|
-
}).
|
|
1928
|
+
}).meta({
|
|
1929
|
+
description: "A read-only heading component for form pages",
|
|
1930
|
+
id: "Heading"
|
|
1931
|
+
});
|
|
1858
1932
|
var PageHeader = BaseField.extend({
|
|
1859
1933
|
type: import_v43.default.literal(FieldType.PAGE_HEADER)
|
|
1860
|
-
}).
|
|
1934
|
+
}).meta({
|
|
1935
|
+
description: "A read-only header component for form pages",
|
|
1936
|
+
id: "PageHeader"
|
|
1937
|
+
});
|
|
1861
1938
|
var File = BaseField.extend({
|
|
1862
1939
|
type: import_v43.default.literal(FieldType.FILE),
|
|
1863
|
-
defaultValue: FileFieldValue.optional(),
|
|
1940
|
+
defaultValue: FileFieldValue.or(ComputedDefaultValue).optional(),
|
|
1864
1941
|
configuration: import_v43.default.object({
|
|
1865
1942
|
maxFileSize: import_v43.default.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
|
|
1866
1943
|
acceptedFileTypes: MimeType.array().optional().describe("List of allowed file formats for the signature"),
|
|
@@ -1876,7 +1953,10 @@ var File = BaseField.extend({
|
|
|
1876
1953
|
}).default({
|
|
1877
1954
|
maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
|
|
1878
1955
|
})
|
|
1879
|
-
}).
|
|
1956
|
+
}).meta({
|
|
1957
|
+
description: "A file upload field",
|
|
1958
|
+
id: "File"
|
|
1959
|
+
});
|
|
1880
1960
|
var SelectOption = import_v43.default.object({
|
|
1881
1961
|
value: import_v43.default.string().describe("The value of the option"),
|
|
1882
1962
|
label: import_v43.default.union([import_v43.default.string(), TranslationConfig]).describe("The label of the option"),
|
|
@@ -1884,7 +1964,7 @@ var SelectOption = import_v43.default.object({
|
|
|
1884
1964
|
});
|
|
1885
1965
|
var NumberWithUnitField = BaseField.extend({
|
|
1886
1966
|
type: import_v43.default.literal(FieldType.NUMBER_WITH_UNIT),
|
|
1887
|
-
defaultValue: NumberWithUnitFieldValue.optional(),
|
|
1967
|
+
defaultValue: NumberWithUnitFieldValue.or(ComputedDefaultValue).optional(),
|
|
1888
1968
|
options: import_v43.default.array(SelectOption).describe("A list of options for the unit select"),
|
|
1889
1969
|
configuration: import_v43.default.object({
|
|
1890
1970
|
min: import_v43.default.number().optional().describe("Minimum value of the number field"),
|
|
@@ -1893,17 +1973,23 @@ var NumberWithUnitField = BaseField.extend({
|
|
|
1893
1973
|
"Placeholder for the number field"
|
|
1894
1974
|
)
|
|
1895
1975
|
}).optional()
|
|
1896
|
-
}).
|
|
1976
|
+
}).meta({
|
|
1977
|
+
description: "A number with unit input field",
|
|
1978
|
+
id: "NumberWithUnitField"
|
|
1979
|
+
});
|
|
1897
1980
|
var RadioGroup = BaseField.extend({
|
|
1898
1981
|
type: import_v43.default.literal(FieldType.RADIO_GROUP),
|
|
1899
|
-
defaultValue: TextValue.optional(),
|
|
1982
|
+
defaultValue: TextValue.or(ComputedDefaultValue).optional(),
|
|
1900
1983
|
options: import_v43.default.array(SelectOption).describe("A list of options"),
|
|
1901
1984
|
configuration: import_v43.default.object({
|
|
1902
1985
|
styles: import_v43.default.object({
|
|
1903
1986
|
size: import_v43.default.enum(["NORMAL", "LARGE"]).optional()
|
|
1904
1987
|
}).optional()
|
|
1905
1988
|
}).optional()
|
|
1906
|
-
}).
|
|
1989
|
+
}).meta({
|
|
1990
|
+
description: "A grouped radio button field",
|
|
1991
|
+
id: "RadioGroup"
|
|
1992
|
+
});
|
|
1907
1993
|
var BulletList = BaseField.extend({
|
|
1908
1994
|
type: import_v43.default.literal(FieldType.BULLET_LIST),
|
|
1909
1995
|
items: import_v43.default.array(TranslationConfig).describe("A list of items"),
|
|
@@ -1912,10 +1998,13 @@ var BulletList = BaseField.extend({
|
|
|
1912
1998
|
fontVariant: HtmlFontVariant.optional()
|
|
1913
1999
|
}).optional()
|
|
1914
2000
|
}).default({})
|
|
1915
|
-
}).
|
|
2001
|
+
}).meta({
|
|
2002
|
+
description: "A list of bullet points",
|
|
2003
|
+
id: "BulletList"
|
|
2004
|
+
});
|
|
1916
2005
|
var Select = BaseField.extend({
|
|
1917
2006
|
type: import_v43.default.literal(FieldType.SELECT),
|
|
1918
|
-
defaultValue: TextValue.optional(),
|
|
2007
|
+
defaultValue: TextValue.or(ComputedDefaultValue).optional(),
|
|
1919
2008
|
options: import_v43.default.array(SelectOption).describe("A list of options"),
|
|
1920
2009
|
noOptionsMessage: TranslationConfig.optional().describe(
|
|
1921
2010
|
`
|
|
@@ -1927,16 +2016,22 @@ var Select = BaseField.extend({
|
|
|
1927
2016
|
{ ..., defaultMessage: "'{input}' is not listed among the health facilities." }
|
|
1928
2017
|
`
|
|
1929
2018
|
)
|
|
1930
|
-
}).
|
|
2019
|
+
}).meta({
|
|
2020
|
+
description: "A select input field",
|
|
2021
|
+
id: "Select"
|
|
2022
|
+
});
|
|
1931
2023
|
var SelectDateRangeOption = import_v43.default.object({
|
|
1932
2024
|
value: SelectDateRangeValue.describe("The value of the option"),
|
|
1933
2025
|
label: TranslationConfig.describe("The label of the option")
|
|
1934
2026
|
});
|
|
1935
2027
|
var SelectDateRangeField = BaseField.extend({
|
|
1936
2028
|
type: import_v43.default.literal(FieldType.SELECT_DATE_RANGE),
|
|
1937
|
-
defaultValue: SelectDateRangeValue.optional(),
|
|
2029
|
+
defaultValue: SelectDateRangeValue.or(ComputedDefaultValue).optional(),
|
|
1938
2030
|
options: import_v43.default.array(SelectDateRangeOption).describe("A list of options")
|
|
1939
|
-
}).
|
|
2031
|
+
}).meta({
|
|
2032
|
+
description: "A date range selection field",
|
|
2033
|
+
id: "SelectDateRangeField"
|
|
2034
|
+
});
|
|
1940
2035
|
var NameConfig = import_v43.default.object({
|
|
1941
2036
|
firstname: import_v43.default.object({ required: requiredSchema, label: TranslationConfig.optional() }).optional(),
|
|
1942
2037
|
middlename: import_v43.default.object({ required: requiredSchema, label: TranslationConfig.optional() }).optional(),
|
|
@@ -1948,7 +2043,7 @@ var NameField = BaseField.extend({
|
|
|
1948
2043
|
firstname: SerializedUserField.or(NonEmptyTextValue).optional(),
|
|
1949
2044
|
middlename: SerializedUserField.or(NonEmptyTextValue).optional(),
|
|
1950
2045
|
surname: SerializedUserField.or(NonEmptyTextValue).optional()
|
|
1951
|
-
}).optional(),
|
|
2046
|
+
}).or(ComputedDefaultValue).optional(),
|
|
1952
2047
|
configuration: import_v43.default.object({
|
|
1953
2048
|
name: NameConfig.default({
|
|
1954
2049
|
firstname: { required: true },
|
|
@@ -1967,26 +2062,41 @@ var NameField = BaseField.extend({
|
|
|
1967
2062
|
surname: { required: true }
|
|
1968
2063
|
}
|
|
1969
2064
|
}).optional()
|
|
1970
|
-
}).
|
|
2065
|
+
}).meta({
|
|
2066
|
+
description: "A field for entering a persons name",
|
|
2067
|
+
id: "NameField"
|
|
2068
|
+
});
|
|
1971
2069
|
var PhoneField = BaseField.extend({
|
|
1972
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
2070
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1973
2071
|
type: import_v43.default.literal(FieldType.PHONE)
|
|
1974
|
-
}).
|
|
2072
|
+
}).meta({
|
|
2073
|
+
description: "A field for entering a phone number",
|
|
2074
|
+
id: "PhoneField"
|
|
2075
|
+
});
|
|
1975
2076
|
var IdField = BaseField.extend({
|
|
1976
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
2077
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1977
2078
|
type: import_v43.default.literal(FieldType.ID)
|
|
1978
|
-
}).
|
|
2079
|
+
}).meta({
|
|
2080
|
+
description: "A field for entering an ID",
|
|
2081
|
+
id: "IdField"
|
|
2082
|
+
});
|
|
1979
2083
|
var Checkbox = BaseField.extend({
|
|
1980
2084
|
type: import_v43.default.literal(FieldType.CHECKBOX),
|
|
1981
|
-
defaultValue: CheckboxFieldValue.default(false)
|
|
1982
|
-
}).
|
|
2085
|
+
defaultValue: CheckboxFieldValue.or(ComputedDefaultValue).default(false)
|
|
2086
|
+
}).meta({
|
|
2087
|
+
description: "A boolean checkbox field",
|
|
2088
|
+
id: "Checkbox"
|
|
2089
|
+
});
|
|
1983
2090
|
var Country = BaseField.extend({
|
|
1984
2091
|
type: import_v43.default.literal(FieldType.COUNTRY),
|
|
1985
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
2092
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1986
2093
|
optionOverrides: import_v43.default.array(SelectOption.omit({ label: true })).optional().describe(
|
|
1987
2094
|
"Conditionals for specific countries. Countries not listed are always shown and enabled."
|
|
1988
2095
|
)
|
|
1989
|
-
}).
|
|
2096
|
+
}).meta({
|
|
2097
|
+
description: "A field for selecting a country",
|
|
2098
|
+
id: "Country"
|
|
2099
|
+
});
|
|
1990
2100
|
var AllowedLocations = JurisdictionReference.optional().describe(
|
|
1991
2101
|
"Limits which location options are selectable depending on user jurisdiction and location."
|
|
1992
2102
|
);
|
|
@@ -1995,28 +2105,33 @@ var AdministrativeAreas = import_v43.default.enum([
|
|
|
1995
2105
|
"HEALTH_FACILITY",
|
|
1996
2106
|
"CRVS_OFFICE"
|
|
1997
2107
|
]);
|
|
1998
|
-
var AdministrativeAreaConfiguration = import_v43.default.object({
|
|
1999
|
-
partOf: FieldReference.optional().describe("Parent location"),
|
|
2000
|
-
type: AdministrativeAreas,
|
|
2001
|
-
allowedLocations: AllowedLocations
|
|
2002
|
-
}).describe("Administrative area options");
|
|
2003
2108
|
var AdministrativeAreaField = BaseField.extend({
|
|
2004
2109
|
type: import_v43.default.literal(FieldType.ADMINISTRATIVE_AREA),
|
|
2005
|
-
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
|
|
2006
|
-
configuration:
|
|
2007
|
-
|
|
2110
|
+
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField, ComputedDefaultValue]).optional(),
|
|
2111
|
+
configuration: import_v43.default.object({
|
|
2112
|
+
partOf: FieldReference.optional().describe("Parent location"),
|
|
2113
|
+
type: AdministrativeAreas,
|
|
2114
|
+
allowedLocations: AllowedLocations
|
|
2115
|
+
}).describe("Administrative area options")
|
|
2116
|
+
}).meta({
|
|
2117
|
+
description: "Administrative area input field",
|
|
2118
|
+
id: "AdministrativeAreaField"
|
|
2119
|
+
});
|
|
2008
2120
|
var LocationInput = BaseField.extend({
|
|
2009
2121
|
type: import_v43.default.literal(FieldType.LOCATION),
|
|
2010
|
-
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
|
|
2122
|
+
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField, ComputedDefaultValue]).optional(),
|
|
2011
2123
|
configuration: import_v43.default.object({
|
|
2012
2124
|
locationTypes: import_v43.default.array(import_v43.default.string()).optional().describe("Types of the locations that are available for selection."),
|
|
2013
2125
|
allowedLocations: AllowedLocations
|
|
2014
2126
|
}).optional()
|
|
2015
|
-
}).
|
|
2127
|
+
}).meta({
|
|
2128
|
+
description: "A field for selecting a location",
|
|
2129
|
+
id: "LocationInput"
|
|
2130
|
+
});
|
|
2016
2131
|
var FileUploadWithOptions = BaseField.extend({
|
|
2017
2132
|
type: import_v43.default.literal(FieldType.FILE_WITH_OPTIONS),
|
|
2018
2133
|
options: import_v43.default.array(SelectOption).describe("A list of options"),
|
|
2019
|
-
defaultValue: FileFieldWithOptionValue.optional(),
|
|
2134
|
+
defaultValue: FileFieldWithOptionValue.or(ComputedDefaultValue).optional(),
|
|
2020
2135
|
configuration: import_v43.default.object({
|
|
2021
2136
|
maxFileSize: import_v43.default.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
|
|
2022
2137
|
maxImageSize: import_v43.default.object({
|
|
@@ -2026,15 +2141,18 @@ var FileUploadWithOptions = BaseField.extend({
|
|
|
2026
2141
|
}).default({
|
|
2027
2142
|
maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
|
|
2028
2143
|
})
|
|
2144
|
+
}).meta({
|
|
2145
|
+
description: "A field for uploading files with file type options",
|
|
2146
|
+
id: "FileUploadWithOptions"
|
|
2029
2147
|
});
|
|
2030
2148
|
var Facility = BaseField.extend({
|
|
2031
2149
|
type: import_v43.default.literal(FieldType.FACILITY),
|
|
2032
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
2150
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
2033
2151
|
configuration: import_v43.default.object({ allowedLocations: AllowedLocations }).optional()
|
|
2034
2152
|
}).describe("Input field for a facility");
|
|
2035
2153
|
var Office = BaseField.extend({
|
|
2036
2154
|
type: import_v43.default.literal(FieldType.OFFICE),
|
|
2037
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
2155
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
2038
2156
|
configuration: import_v43.default.object({ allowedLocations: AllowedLocations }).optional()
|
|
2039
2157
|
}).describe("Input field for an office");
|
|
2040
2158
|
var DefaultAddressFieldValue = DomesticAddressFieldValue.extend({
|
|
@@ -2070,8 +2188,11 @@ var Address = BaseField.extend({
|
|
|
2070
2188
|
).optional(),
|
|
2071
2189
|
allowedLocations: AllowedLocations
|
|
2072
2190
|
}).optional(),
|
|
2073
|
-
defaultValue: DefaultAddressFieldValue.optional()
|
|
2074
|
-
}).
|
|
2191
|
+
defaultValue: DefaultAddressFieldValue.or(ComputedDefaultValue).optional()
|
|
2192
|
+
}).meta({
|
|
2193
|
+
description: "Address input field \u2013 a combination of location and text fields",
|
|
2194
|
+
id: "Address"
|
|
2195
|
+
});
|
|
2075
2196
|
var StaticDataEntry = import_v43.default.object({
|
|
2076
2197
|
id: import_v43.default.string().describe("ID for the data entry."),
|
|
2077
2198
|
label: TranslationConfig,
|
|
@@ -2086,7 +2207,10 @@ var DataField = BaseField.extend({
|
|
|
2086
2207
|
subtitle: TranslationConfig.optional(),
|
|
2087
2208
|
data: import_v43.default.array(DataEntry)
|
|
2088
2209
|
})
|
|
2089
|
-
}).
|
|
2210
|
+
}).meta({
|
|
2211
|
+
description: "A field for displaying a table of read-only data",
|
|
2212
|
+
id: "DataField"
|
|
2213
|
+
});
|
|
2090
2214
|
var ButtonSize = import_v43.default.enum(["small", "medium", "large"]);
|
|
2091
2215
|
var ButtonType = import_v43.default.enum([
|
|
2092
2216
|
"primary",
|
|
@@ -2111,13 +2235,19 @@ var ButtonConfiguration = import_v43.default.object({
|
|
|
2111
2235
|
});
|
|
2112
2236
|
var ButtonField = BaseField.extend({
|
|
2113
2237
|
type: import_v43.default.literal(FieldType.BUTTON),
|
|
2114
|
-
defaultValue: ButtonFieldValue.optional(),
|
|
2238
|
+
defaultValue: ButtonFieldValue.or(ComputedDefaultValue).optional(),
|
|
2115
2239
|
configuration: ButtonConfiguration
|
|
2116
|
-
}).
|
|
2240
|
+
}).meta({
|
|
2241
|
+
description: "A generic button that can be used to trigger an action",
|
|
2242
|
+
id: "ButtonField"
|
|
2243
|
+
});
|
|
2117
2244
|
var FieldGroup = BaseField.extend({
|
|
2118
2245
|
type: import_v43.default.literal(FieldType.FIELD_GROUP),
|
|
2119
2246
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
2120
2247
|
fields: import_v43.default.lazy(() => import_v43.default.array(FieldConfig))
|
|
2248
|
+
}).meta({
|
|
2249
|
+
description: "A group of fields that are displayed together",
|
|
2250
|
+
id: "FieldGroup"
|
|
2121
2251
|
});
|
|
2122
2252
|
var AlphaPrintButton = BaseField.extend({
|
|
2123
2253
|
type: import_v43.default.literal(FieldType.ALPHA_PRINT_BUTTON),
|
|
@@ -2127,10 +2257,13 @@ var AlphaPrintButton = BaseField.extend({
|
|
|
2127
2257
|
"Label for the print button"
|
|
2128
2258
|
)
|
|
2129
2259
|
})
|
|
2130
|
-
}).
|
|
2260
|
+
}).meta({
|
|
2261
|
+
description: "An experimental print button field for printing certificates during the declaration process",
|
|
2262
|
+
id: "AlphaPrintButton"
|
|
2263
|
+
});
|
|
2131
2264
|
var HttpField = BaseField.extend({
|
|
2132
2265
|
type: import_v43.default.literal(FieldType.HTTP),
|
|
2133
|
-
defaultValue: HttpFieldValue.optional(),
|
|
2266
|
+
defaultValue: HttpFieldValue.or(ComputedDefaultValue).optional(),
|
|
2134
2267
|
configuration: import_v43.default.object({
|
|
2135
2268
|
trigger: FieldReference.optional().describe(
|
|
2136
2269
|
"Reference to the field that triggers the HTTP request when its value changes. If not provided, the HTTP request is triggered once on component mount."
|
|
@@ -2143,20 +2276,30 @@ var HttpField = BaseField.extend({
|
|
|
2143
2276
|
params: import_v43.default.record(import_v43.default.string(), import_v43.default.union([import_v43.default.string(), FieldReference])).optional(),
|
|
2144
2277
|
timeout: import_v43.default.number().default(15e3).describe("Request timeout in milliseconds")
|
|
2145
2278
|
})
|
|
2146
|
-
}).
|
|
2279
|
+
}).meta({
|
|
2280
|
+
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.",
|
|
2281
|
+
id: "HttpField"
|
|
2282
|
+
});
|
|
2147
2283
|
var AutocompleteField = BaseField.extend({
|
|
2148
2284
|
type: import_v43.default.literal(FieldType.AUTOCOMPLETE),
|
|
2149
2285
|
configuration: import_v43.default.object({
|
|
2150
|
-
url: import_v43.default.string().describe(
|
|
2286
|
+
url: import_v43.default.string().describe(
|
|
2287
|
+
"URL to fetch autocomplete suggestions from. This should be a country config server endpoint."
|
|
2288
|
+
).optional(),
|
|
2151
2289
|
method: import_v43.default.enum(["GET", "POST"]).default("GET").optional(),
|
|
2152
2290
|
defaultOptions: import_v43.default.array(
|
|
2153
2291
|
import_v43.default.object({
|
|
2154
2292
|
label: import_v43.default.string(),
|
|
2155
2293
|
value: import_v43.default.string()
|
|
2156
2294
|
})
|
|
2157
|
-
).optional()
|
|
2295
|
+
).optional().describe(
|
|
2296
|
+
"Manual entry is supported through configuration, allowing users to provide values not currently represented in the dataset."
|
|
2297
|
+
)
|
|
2158
2298
|
})
|
|
2159
|
-
}).
|
|
2299
|
+
}).meta({
|
|
2300
|
+
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.",
|
|
2301
|
+
id: "AutocompleteField"
|
|
2302
|
+
});
|
|
2160
2303
|
var SearchField = HttpField.extend({
|
|
2161
2304
|
type: import_v43.default.literal(FieldType.SEARCH),
|
|
2162
2305
|
configuration: SearchQuery.pick({
|
|
@@ -2189,6 +2332,9 @@ var SearchField = HttpField.extend({
|
|
|
2189
2332
|
ok: TranslationConfig.optional()
|
|
2190
2333
|
}).optional()
|
|
2191
2334
|
})
|
|
2335
|
+
}).meta({
|
|
2336
|
+
description: "A search input field",
|
|
2337
|
+
id: "SearchField"
|
|
2192
2338
|
});
|
|
2193
2339
|
var LinkButtonField = BaseField.extend({
|
|
2194
2340
|
type: import_v43.default.literal(FieldType.LINK_BUTTON),
|
|
@@ -2197,28 +2343,35 @@ var LinkButtonField = BaseField.extend({
|
|
|
2197
2343
|
text: TranslationConfig.describe("Text to display on the button"),
|
|
2198
2344
|
icon: import_v43.default.string().optional().describe("Icon for the button. You can find icons from OpenCRVS UI-Kit.")
|
|
2199
2345
|
})
|
|
2200
|
-
}).
|
|
2346
|
+
}).meta({
|
|
2347
|
+
description: "A button that opens a URL link",
|
|
2348
|
+
id: "LinkButtonField"
|
|
2349
|
+
});
|
|
2201
2350
|
var VerificationStatus = BaseField.extend({
|
|
2202
2351
|
type: import_v43.default.literal(FieldType.VERIFICATION_STATUS),
|
|
2203
|
-
defaultValue: VerificationStatusValue.optional(),
|
|
2352
|
+
defaultValue: VerificationStatusValue.or(ComputedDefaultValue).optional(),
|
|
2204
2353
|
configuration: import_v43.default.object({
|
|
2205
2354
|
status: TranslationConfig.describe("Text to display on the status pill."),
|
|
2206
2355
|
description: TranslationConfig.describe(
|
|
2207
2356
|
"Explaining text on the banner in form."
|
|
2208
2357
|
)
|
|
2209
2358
|
})
|
|
2359
|
+
}).meta({
|
|
2360
|
+
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.",
|
|
2361
|
+
id: "VerificationStatus"
|
|
2210
2362
|
});
|
|
2211
2363
|
var QueryParamReaderField = BaseField.extend({
|
|
2212
2364
|
type: import_v43.default.literal(FieldType.QUERY_PARAM_READER),
|
|
2213
2365
|
configuration: import_v43.default.object({
|
|
2214
2366
|
pickParams: import_v43.default.array(import_v43.default.string()).describe("List of query parameters to read from the URL")
|
|
2215
2367
|
})
|
|
2216
|
-
}).
|
|
2217
|
-
"A field that maps URL query params into form values and clears them afterward"
|
|
2218
|
-
|
|
2368
|
+
}).meta({
|
|
2369
|
+
description: "A field that maps URL query params into form values and clears them afterward",
|
|
2370
|
+
id: "QueryParamReaderField"
|
|
2371
|
+
});
|
|
2219
2372
|
var QrReaderField = BaseField.extend({
|
|
2220
2373
|
type: import_v43.default.literal(FieldType.QR_READER),
|
|
2221
|
-
defaultValue: QrReaderFieldValue.optional(),
|
|
2374
|
+
defaultValue: QrReaderFieldValue.or(ComputedDefaultValue).optional(),
|
|
2222
2375
|
configuration: import_v43.default.object({
|
|
2223
2376
|
validator: import_v43.default.any().meta({
|
|
2224
2377
|
description: "JSON Schema to validate the scanned QR code data against before populating the form fields.",
|
|
@@ -2226,21 +2379,27 @@ var QrReaderField = BaseField.extend({
|
|
|
2226
2379
|
})
|
|
2227
2380
|
}).optional()
|
|
2228
2381
|
}).meta({
|
|
2229
|
-
description: "
|
|
2382
|
+
description: "QR code reader field, including optional JSON Schema validator.",
|
|
2230
2383
|
id: "QrReaderField"
|
|
2231
2384
|
});
|
|
2232
2385
|
var IdReaderField = BaseField.extend({
|
|
2233
2386
|
type: import_v43.default.literal(FieldType.ID_READER),
|
|
2234
|
-
defaultValue: IdReaderFieldValue.optional(),
|
|
2387
|
+
defaultValue: IdReaderFieldValue.or(ComputedDefaultValue).optional(),
|
|
2235
2388
|
methods: import_v43.default.array(
|
|
2236
2389
|
import_v43.default.union([QrReaderField, LinkButtonField]).describe("Methods for reading an ID")
|
|
2237
2390
|
)
|
|
2391
|
+
}).meta({
|
|
2392
|
+
description: "A wrapper around nested form fields, specifically QR_READER and LINK_BUTTON. It can hold the QR_READERs value.",
|
|
2393
|
+
id: "IdReaderField"
|
|
2238
2394
|
});
|
|
2239
2395
|
var CustomField = BaseField.extend({
|
|
2240
2396
|
type: import_v43.default.literal(FieldType._EXPERIMENTAL_CUSTOM),
|
|
2241
2397
|
defaultValue: CustomFieldValue.optional(),
|
|
2242
2398
|
src: import_v43.default.string().describe("Module source path for the custom field component"),
|
|
2243
2399
|
configuration: import_v43.default.unknown().optional()
|
|
2400
|
+
}).meta({
|
|
2401
|
+
description: "An expiremental custom field that is defined by a module source path",
|
|
2402
|
+
id: "CustomField"
|
|
2244
2403
|
});
|
|
2245
2404
|
var FieldStyleVariant = import_v43.default.enum(["default", "highlighted"]);
|
|
2246
2405
|
var LoaderField = BaseField.extend({
|
|
@@ -2250,22 +2409,25 @@ var LoaderField = BaseField.extend({
|
|
|
2250
2409
|
configuration: import_v43.default.object({
|
|
2251
2410
|
text: TranslationConfig.describe("Display text above the loading spinner")
|
|
2252
2411
|
})
|
|
2253
|
-
}).
|
|
2254
|
-
"A non-interactive field that indicates an in progress operation in form"
|
|
2255
|
-
|
|
2412
|
+
}).meta({
|
|
2413
|
+
description: "A non-interactive field that indicates an in progress operation in form",
|
|
2414
|
+
id: "LoaderField"
|
|
2415
|
+
});
|
|
2256
2416
|
var HiddenField = BaseField.extend({
|
|
2257
2417
|
type: import_v43.default.literal(FieldType.ALPHA_HIDDEN),
|
|
2258
2418
|
required: import_v43.default.boolean().default(false).optional(),
|
|
2259
2419
|
defaultValue: TextValue.optional()
|
|
2260
|
-
}).
|
|
2261
|
-
"A non-interactive, hidden field that only hold a value in the form"
|
|
2262
|
-
|
|
2420
|
+
}).meta({
|
|
2421
|
+
description: "A non-interactive, hidden field that only hold a value in the form",
|
|
2422
|
+
id: "HiddenField"
|
|
2423
|
+
});
|
|
2263
2424
|
var UserRoleField = BaseField.extend({
|
|
2264
2425
|
type: import_v43.default.literal(FieldType.USER_ROLE),
|
|
2265
2426
|
defaultValue: TextValue.optional()
|
|
2266
|
-
}).
|
|
2267
|
-
"A select dropdown that is automatically populated with available user roles"
|
|
2268
|
-
|
|
2427
|
+
}).meta({
|
|
2428
|
+
description: "A select dropdown that is automatically populated with available user roles",
|
|
2429
|
+
id: "UserRoleField"
|
|
2430
|
+
});
|
|
2269
2431
|
var FieldConfig = import_v43.default.discriminatedUnion("type", [
|
|
2270
2432
|
FieldGroup,
|
|
2271
2433
|
Address,
|
|
@@ -2364,16 +2526,19 @@ var VerificationPageConfig = FormPageConfig.extend({
|
|
|
2364
2526
|
type: z21.literal(PageTypes.enum.VERIFICATION),
|
|
2365
2527
|
actions: VerificationActionConfig
|
|
2366
2528
|
});
|
|
2367
|
-
var PageConfig = z21.discriminatedUnion("type", [
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2529
|
+
var PageConfig = z21.discriminatedUnion("type", [FormPageConfig, VerificationPageConfig]).meta({
|
|
2530
|
+
id: "PageConfig",
|
|
2531
|
+
description: "Configuration for a single page in a form. Either a form page with fields and a continue button, or a verification page with verify/cancel options."
|
|
2532
|
+
});
|
|
2371
2533
|
|
|
2372
2534
|
// ../commons/src/events/FormConfig.ts
|
|
2373
2535
|
var DeclarationFormConfig = z22.object({
|
|
2374
2536
|
label: TranslationConfig.describe("Human readable description of the form"),
|
|
2375
2537
|
pages: z22.array(FormPageConfig)
|
|
2376
|
-
}).
|
|
2538
|
+
}).meta({
|
|
2539
|
+
id: "DeclarationFormConfig",
|
|
2540
|
+
description: "Configuration of the declaration form."
|
|
2541
|
+
});
|
|
2377
2542
|
var ActionFormConfig = z22.object({
|
|
2378
2543
|
label: TranslationConfig.describe("Human readable description of the form"),
|
|
2379
2544
|
pages: z22.array(PageConfig)
|
|
@@ -2473,6 +2638,9 @@ var DeduplicationConfig = z23.object({
|
|
|
2473
2638
|
id: z23.string(),
|
|
2474
2639
|
label: TranslationConfig,
|
|
2475
2640
|
query: Clause
|
|
2641
|
+
}).meta({
|
|
2642
|
+
id: "DeduplicationConfig",
|
|
2643
|
+
description: "Configuration for duplicate detection on a declare or register action. The query is built from fuzzy / strict / date-range matchers combined with and/or/not."
|
|
2476
2644
|
});
|
|
2477
2645
|
|
|
2478
2646
|
// ../commons/src/events/ActionConfig.ts
|
|
@@ -2590,17 +2758,42 @@ var ActionConfig = z24.discriminatedUnion("type", [
|
|
|
2590
2758
|
* OpenAPI references are defined here so our generated OpenAPI spec knows to reuse the models
|
|
2591
2759
|
* and treat them as "models" instead of duplicating the data structure in each endpoint.
|
|
2592
2760
|
*/
|
|
2593
|
-
ReadActionConfig.meta({
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2761
|
+
ReadActionConfig.meta({
|
|
2762
|
+
id: "ReadActionConfig",
|
|
2763
|
+
description: "Configuration for the read action \u2014 defines the record-tab content displayed on the event overview page."
|
|
2764
|
+
}),
|
|
2765
|
+
DeclareConfig.meta({
|
|
2766
|
+
id: "DeclareActionConfig",
|
|
2767
|
+
description: "Configuration for the declare action. Includes review-page fields. Shared with the notify action (ActionType.NOTIFY)."
|
|
2768
|
+
}),
|
|
2769
|
+
RejectConfig.meta({
|
|
2770
|
+
id: "RejectActionConfig",
|
|
2771
|
+
description: "Configuration for rejecting a record before registration."
|
|
2772
|
+
}),
|
|
2773
|
+
RegisterConfig.meta({
|
|
2774
|
+
id: "RegisterActionConfig",
|
|
2775
|
+
description: "Configuration for registering a record."
|
|
2776
|
+
}),
|
|
2597
2777
|
PrintCertificateActionConfig.meta({
|
|
2598
|
-
id: "PrintCertificateActionConfig"
|
|
2778
|
+
id: "PrintCertificateActionConfig",
|
|
2779
|
+
description: "Configuration for printing a certificate of a registered record."
|
|
2780
|
+
}),
|
|
2781
|
+
RequestCorrectionConfig.meta({
|
|
2782
|
+
id: "RequestCorrectionActionConfig",
|
|
2783
|
+
description: "Configuration for requesting a correction on a registered record."
|
|
2599
2784
|
}),
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2785
|
+
EditActionConfig.meta({
|
|
2786
|
+
id: "EditActionConfig",
|
|
2787
|
+
description: "Configuration for editing a record before registration."
|
|
2788
|
+
}),
|
|
2789
|
+
ArchiveConfig.meta({
|
|
2790
|
+
id: "ArchiveActionConfig",
|
|
2791
|
+
description: "Configuration for archiving a record."
|
|
2792
|
+
}),
|
|
2793
|
+
CustomActionConfig.meta({
|
|
2794
|
+
id: "CustomActionConfig",
|
|
2795
|
+
description: "Configuration for a country-defined custom action. An event may include any number of these."
|
|
2796
|
+
})
|
|
2604
2797
|
]).describe(
|
|
2605
2798
|
"Configuration of an action available for an event. Data collected depends on the action type and is accessible through the annotation property in ActionDocument."
|
|
2606
2799
|
).meta({ id: "ActionConfig" });
|
|
@@ -2676,7 +2869,10 @@ var Field = BaseField2.extend({
|
|
|
2676
2869
|
}).describe("Custom field defined for the summary view.");
|
|
2677
2870
|
var SummaryConfig = z27.object({
|
|
2678
2871
|
fields: z27.array(z27.union([Field, ReferenceField])).describe("Fields displayed in the event summary view.")
|
|
2679
|
-
}).
|
|
2872
|
+
}).meta({
|
|
2873
|
+
id: "SummaryConfig",
|
|
2874
|
+
description: "Configuration of the event overview page. Defines which declaration fields appear in the record summary, optionally with custom labels, empty-value messages, and templated values."
|
|
2875
|
+
});
|
|
2680
2876
|
|
|
2681
2877
|
// ../commons/src/events/AdvancedSearchConfig.ts
|
|
2682
2878
|
var z28 = __toESM(require("zod/v4"));
|
|
@@ -2747,6 +2943,9 @@ var BaseField3 = z28.object({
|
|
|
2747
2943
|
),
|
|
2748
2944
|
validations: z28.array(ValidationConfig).optional().describe(
|
|
2749
2945
|
`Option for overriding the field validations specifically for advanced search form.`
|
|
2946
|
+
),
|
|
2947
|
+
allowedLocations: JurisdictionReference.optional().describe(
|
|
2948
|
+
`Override the allowedLocations for a location field in advanced search. Use this when the declaration form's allowedLocations references a scope (e.g. record.create) that search-only users don't have \u2014 specify record.search scope instead.`
|
|
2750
2949
|
)
|
|
2751
2950
|
});
|
|
2752
2951
|
var SearchQueryParams = z28.object({
|
|
@@ -2800,6 +2999,9 @@ var AdvancedSearchField = z28.discriminatedUnion("fieldType", [FieldConfigSchema
|
|
|
2800
2999
|
var AdvancedSearchConfig = z28.object({
|
|
2801
3000
|
title: TranslationConfig.describe("Advanced search tab title"),
|
|
2802
3001
|
fields: z28.array(AdvancedSearchField).describe("Advanced search fields within the tab.")
|
|
3002
|
+
}).meta({
|
|
3003
|
+
id: "AdvancedSearchConfig",
|
|
3004
|
+
description: "Configuration of one advanced search tab. Each tab has a title and a list of searchable fields \u2014 either declaration fields (via `field()`) or event metadata (via `event()`)."
|
|
2803
3005
|
});
|
|
2804
3006
|
|
|
2805
3007
|
// ../commons/src/events/utils.ts
|
|
@@ -2850,7 +3052,37 @@ function resolveDataPath(rootData, dataPath, instancePath) {
|
|
|
2850
3052
|
}
|
|
2851
3053
|
return current;
|
|
2852
3054
|
}
|
|
3055
|
+
function todayISO() {
|
|
3056
|
+
return (0, import_date_fns.formatISO)(/* @__PURE__ */ new Date(), { representation: "date" });
|
|
3057
|
+
}
|
|
3058
|
+
var compiledFunctionCache = /* @__PURE__ */ new Map();
|
|
3059
|
+
function compileClientFunction(code) {
|
|
3060
|
+
let fn = compiledFunctionCache.get(code);
|
|
3061
|
+
if (!fn) {
|
|
3062
|
+
fn = new Function(`return (${code})`)();
|
|
3063
|
+
compiledFunctionCache.set(code, fn);
|
|
3064
|
+
}
|
|
3065
|
+
return fn;
|
|
3066
|
+
}
|
|
2853
3067
|
(0, import_ajv_formats.default)(ajv);
|
|
3068
|
+
function buildClientFunctionContext(input) {
|
|
3069
|
+
return {
|
|
3070
|
+
$form: input.form,
|
|
3071
|
+
$now: todayISO(),
|
|
3072
|
+
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
3073
|
+
$online: isOnline(),
|
|
3074
|
+
$user: input.validatorContext?.user,
|
|
3075
|
+
$event: input.validatorContext?.event,
|
|
3076
|
+
$leafAdminStructureLocationIds: input.validatorContext?.leafAdminStructureLocationIds ?? [],
|
|
3077
|
+
user: input.systemVariables?.user,
|
|
3078
|
+
$window: input.systemVariables?.$window,
|
|
3079
|
+
locations: input.locations,
|
|
3080
|
+
adminLevelIds: input.adminLevelIds
|
|
3081
|
+
};
|
|
3082
|
+
}
|
|
3083
|
+
function runClientFunction(code, data, context) {
|
|
3084
|
+
return compileClientFunction(code)(data, context);
|
|
3085
|
+
}
|
|
2854
3086
|
ajv.addKeyword({
|
|
2855
3087
|
keyword: "daysFromDate",
|
|
2856
3088
|
type: "string",
|
|
@@ -2895,12 +3127,35 @@ ajv.addKeyword({
|
|
|
2895
3127
|
$data: true,
|
|
2896
3128
|
errors: true,
|
|
2897
3129
|
// @ts-ignore -- Force type. We will move this away from AJV next. Parsing the array will take seconds and is only called by core.
|
|
2898
|
-
validate(
|
|
3130
|
+
validate(_schema, data, _2, dataContext) {
|
|
2899
3131
|
const locationIdInput = data;
|
|
2900
3132
|
const locations = dataContext?.rootData.$leafAdminStructureLocationIds ?? [];
|
|
2901
3133
|
return locations.some((location) => location.id === locationIdInput);
|
|
2902
3134
|
}
|
|
2903
3135
|
});
|
|
3136
|
+
ajv.addKeyword({
|
|
3137
|
+
keyword: "customClientValidator",
|
|
3138
|
+
schemaType: "object",
|
|
3139
|
+
errors: true,
|
|
3140
|
+
// @ts-expect-error -- AJV's public types don't expose `rootData`. All
|
|
3141
|
+
// `validate()` callers build root data via `buildClientFunctionContext`,
|
|
3142
|
+
// so the cast holds.
|
|
3143
|
+
validate(schema, data, _2, dataContext) {
|
|
3144
|
+
return Boolean(
|
|
3145
|
+
runClientFunction(
|
|
3146
|
+
schema.code,
|
|
3147
|
+
data,
|
|
3148
|
+
dataContext?.rootData ?? buildClientFunctionContext({ form: {} })
|
|
3149
|
+
)
|
|
3150
|
+
);
|
|
3151
|
+
}
|
|
3152
|
+
});
|
|
3153
|
+
function isOnline() {
|
|
3154
|
+
if (typeof window !== "undefined" && typeof navigator !== "undefined") {
|
|
3155
|
+
return navigator.onLine;
|
|
3156
|
+
}
|
|
3157
|
+
return true;
|
|
3158
|
+
}
|
|
2904
3159
|
|
|
2905
3160
|
// ../commons/src/utils.ts
|
|
2906
3161
|
var z32 = __toESM(require("zod/v4"));
|
|
@@ -3519,7 +3774,54 @@ function createFieldConditionals(fieldId) {
|
|
|
3519
3774
|
}
|
|
3520
3775
|
},
|
|
3521
3776
|
required: [fieldId]
|
|
3522
|
-
})
|
|
3777
|
+
}),
|
|
3778
|
+
/**
|
|
3779
|
+
* Custom client-side validator. The provided function is serialised and executed
|
|
3780
|
+
* just-in-time on the client only. External references (e.g. lodash) are not
|
|
3781
|
+
* available inside the function body — all logic must be self-contained.
|
|
3782
|
+
*
|
|
3783
|
+
* @example
|
|
3784
|
+
* field('nid').customClientValidator((value) => {
|
|
3785
|
+
* // LUHN check — all logic must be inline
|
|
3786
|
+
* const digits = String(value).split('').map(Number)
|
|
3787
|
+
* // ...
|
|
3788
|
+
* return isValid
|
|
3789
|
+
* })
|
|
3790
|
+
*/
|
|
3791
|
+
customClientValidator(validationFn) {
|
|
3792
|
+
const code = validationFn.toString();
|
|
3793
|
+
return defineFormConditional({
|
|
3794
|
+
type: "object",
|
|
3795
|
+
properties: wrapToPath(
|
|
3796
|
+
{ [fieldId]: { customClientValidator: { code } } },
|
|
3797
|
+
this.$$subfield
|
|
3798
|
+
),
|
|
3799
|
+
required: [fieldId]
|
|
3800
|
+
});
|
|
3801
|
+
},
|
|
3802
|
+
/**
|
|
3803
|
+
* Custom client-side evaluation. Returns a {@link FieldReference} descriptor
|
|
3804
|
+
* that can be used as the `value` property or a DATA component entry.
|
|
3805
|
+
* The function receives the referenced field's value as the first argument and
|
|
3806
|
+
* the full form context as the second; its return value replaces the field reference.
|
|
3807
|
+
* The function is serialised and executed just-in-time on the client only.
|
|
3808
|
+
* External references (e.g. lodash) are not available inside the function body.
|
|
3809
|
+
*
|
|
3810
|
+
* For computing a default value without referencing a specific field, use
|
|
3811
|
+
* `evaluate(fn)` in the `defaultValue` property instead.
|
|
3812
|
+
*
|
|
3813
|
+
* @example
|
|
3814
|
+
* field('a').customClientEvaluation((aValue, ctx) =>
|
|
3815
|
+
* Number(aValue) + Number(ctx.$form.b)
|
|
3816
|
+
* )
|
|
3817
|
+
*/
|
|
3818
|
+
customClientEvaluation(computationFn) {
|
|
3819
|
+
return {
|
|
3820
|
+
$$code: computationFn.toString(),
|
|
3821
|
+
$$field: fieldId,
|
|
3822
|
+
$$subfield: this.$$subfield
|
|
3823
|
+
};
|
|
3824
|
+
}
|
|
3523
3825
|
};
|
|
3524
3826
|
}
|
|
3525
3827
|
|
|
@@ -3667,7 +3969,7 @@ var _EventConfigBase = z33.object({
|
|
|
3667
3969
|
),
|
|
3668
3970
|
label: TranslationConfig.describe("Human-readable label for the event type."),
|
|
3669
3971
|
actions: z33.array(ActionConfig).describe(
|
|
3670
|
-
"Configuration of
|
|
3972
|
+
"Configuration of core and custom actions associated with the event."
|
|
3671
3973
|
),
|
|
3672
3974
|
actionOrder: z33.array(z33.string()).optional().describe(
|
|
3673
3975
|
"Order of actions in the action menu. Use either the action type for core actions or the customActionType for custom actions."
|
|
@@ -3679,7 +3981,7 @@ var _EventConfigBase = z33.object({
|
|
|
3679
3981
|
"Configuration of fields available in the advanced search feature."
|
|
3680
3982
|
),
|
|
3681
3983
|
flags: z33.array(FlagConfig).optional().default([]).describe(
|
|
3682
|
-
"Configuration of flags associated with the actions of this event type."
|
|
3984
|
+
"Configuration of custom flags associated with the actions of this event type."
|
|
3683
3985
|
),
|
|
3684
3986
|
analytics: z33.boolean().optional().default(true).describe(
|
|
3685
3987
|
"Indicates whether the records of this event type are included in analytics"
|
|
@@ -3692,8 +3994,9 @@ var EventConfig = _EventConfigBase.superRefine((event2, ctx) => {
|
|
|
3692
3994
|
validateActionFlags(event2, ctx);
|
|
3693
3995
|
validateActionOrder(event2, ctx);
|
|
3694
3996
|
}).meta({
|
|
3695
|
-
id: "EventConfig"
|
|
3696
|
-
|
|
3997
|
+
id: "EventConfig",
|
|
3998
|
+
description: "Configuration defining an event type registered in OpenCRVS (for example birth or death)."
|
|
3999
|
+
});
|
|
3697
4000
|
|
|
3698
4001
|
// ../commons/src/events/EventConfigInput.ts
|
|
3699
4002
|
var defineDeclarationForm = (form) => DeclarationFormConfig.parse(form);
|
|
@@ -3915,6 +4218,9 @@ var WorkqueueColumnValue = z34.object({
|
|
|
3915
4218
|
var WorkqueueColumn = z34.object({
|
|
3916
4219
|
label: TranslationConfig,
|
|
3917
4220
|
value: WorkqueueColumnValue
|
|
4221
|
+
}).meta({
|
|
4222
|
+
id: "WorkqueueColumn",
|
|
4223
|
+
description: "Configuration for a single workqueue column. The value references an event metadata key (e.g. `dateOfEvent`, `status`, `trackingId`)."
|
|
3918
4224
|
});
|
|
3919
4225
|
function defineWorkqueuesColumns(workqueueColumns) {
|
|
3920
4226
|
return workqueueColumns.map(
|
|
@@ -4117,18 +4423,11 @@ var WorkqueueConfigWithoutQuery = WorkqueueConfig.omit({
|
|
|
4117
4423
|
query: true,
|
|
4118
4424
|
columns: true
|
|
4119
4425
|
});
|
|
4120
|
-
var WorkqueueConfigInput =
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
query: CountryConfigQueryInputType,
|
|
4126
|
-
action: z37.object({ type: WorkqueueActionType }).optional().describe(
|
|
4127
|
-
"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."
|
|
4128
|
-
),
|
|
4129
|
-
columns: z37.array(WorkqueueColumn).default(mandatoryColumns),
|
|
4130
|
-
icon: AvailableIcons,
|
|
4131
|
-
emptyMessage: TranslationConfig.optional()
|
|
4426
|
+
var WorkqueueConfigInput = WorkqueueConfig.extend({
|
|
4427
|
+
query: CountryConfigQueryInputType
|
|
4428
|
+
}).meta({
|
|
4429
|
+
id: "WorkqueueConfig",
|
|
4430
|
+
description: "Configuration for a single workqueue. Defines the filter applied to the event index, the quick-action button, the columns shown on each row, and the message rendered when the queue is empty."
|
|
4132
4431
|
});
|
|
4133
4432
|
var WorkqueueCountInput = z37.array(
|
|
4134
4433
|
z37.object({ slug: z37.string(), query: QueryType })
|
|
@@ -4170,7 +4469,9 @@ var BaseActionInput = z38.object({
|
|
|
4170
4469
|
keepAssignment: z38.boolean().optional(),
|
|
4171
4470
|
keepAssignmentIfAccepted: z38.boolean().optional(),
|
|
4172
4471
|
keepAssignmentIfRejected: z38.boolean().optional(),
|
|
4173
|
-
waitFor: z38.boolean().
|
|
4472
|
+
waitFor: z38.boolean().default(true).describe(
|
|
4473
|
+
"Whether action waits for the indexing before returning. Defaults to true. Setting this to to false completes faster but might lead to stale data in the client if the client tries to read the event immediately after performing the action. Use with care."
|
|
4474
|
+
),
|
|
4174
4475
|
// For normal users, the createdAtLocation is resolved on the backend from the user's primaryOfficeId.
|
|
4175
4476
|
// @TODO: createdAtLocation should be limited to actions that system users can perform. For normal users, it should not be part of the base action.
|
|
4176
4477
|
createdAtLocation: UUID.nullish().describe(
|
|
@@ -4288,7 +4589,8 @@ var RejectCorrectionActionInput = BaseActionInput.extend(
|
|
|
4288
4589
|
var ApproveCorrectionActionInput = BaseActionInput.extend(
|
|
4289
4590
|
z38.object({
|
|
4290
4591
|
requestId: z38.string(),
|
|
4291
|
-
type: z38.literal(ActionType.APPROVE_CORRECTION).default(ActionType.APPROVE_CORRECTION)
|
|
4592
|
+
type: z38.literal(ActionType.APPROVE_CORRECTION).default(ActionType.APPROVE_CORRECTION),
|
|
4593
|
+
content: z38.object({ immediateCorrection: z38.boolean().optional() }).optional()
|
|
4292
4594
|
}).shape
|
|
4293
4595
|
);
|
|
4294
4596
|
var ReadActionInput = BaseActionInput.extend(
|
|
@@ -4350,7 +4652,7 @@ var Draft = z39.object({
|
|
|
4350
4652
|
}).describe(
|
|
4351
4653
|
"A temporary storage for an action. Stored with details of the event, creator and creation time."
|
|
4352
4654
|
);
|
|
4353
|
-
var DraftInput = BaseActionInput.extend({
|
|
4655
|
+
var DraftInput = BaseActionInput.omit({ waitFor: true }).extend({
|
|
4354
4656
|
type: ActionTypes.exclude([ActionTypes.enum.DELETE]),
|
|
4355
4657
|
status: z39.enum([
|
|
4356
4658
|
ActionStatus.Requested,
|
|
@@ -6944,10 +7246,380 @@ var ACTION_FILTERS = {
|
|
|
6944
7246
|
[ActionType.UNASSIGN]: (flags) => !flags.some((flag) => flag.endsWith(":requested")),
|
|
6945
7247
|
[ActionType.CUSTOM]: (flags) => !flags.some((flag) => flag.endsWith(":requested"))
|
|
6946
7248
|
};
|
|
7249
|
+
var REJECTED_ACTIONS = [
|
|
7250
|
+
ActionType.READ,
|
|
7251
|
+
ActionType.NOTIFY,
|
|
7252
|
+
ActionType.CUSTOM,
|
|
7253
|
+
ActionType.EDIT,
|
|
7254
|
+
ActionType.ARCHIVE
|
|
7255
|
+
];
|
|
6947
7256
|
|
|
6948
7257
|
// ../commons/src/events/FileUtils.ts
|
|
6949
7258
|
var import_lodash7 = require("lodash");
|
|
6950
7259
|
|
|
7260
|
+
// ../commons/src/events/mocks.test.utils.ts
|
|
7261
|
+
var V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS = [
|
|
7262
|
+
{
|
|
7263
|
+
id: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7264
|
+
name: "Central",
|
|
7265
|
+
parentId: null,
|
|
7266
|
+
validUntil: null,
|
|
7267
|
+
externalId: "ydyJb1RAy4U1"
|
|
7268
|
+
},
|
|
7269
|
+
{
|
|
7270
|
+
id: "c599b691-fd2d-45e1-abf4-d185de727fb5",
|
|
7271
|
+
name: "Sulaka",
|
|
7272
|
+
parentId: null,
|
|
7273
|
+
validUntil: null,
|
|
7274
|
+
externalId: "pQ8nGxWmZ2Q3"
|
|
7275
|
+
},
|
|
7276
|
+
{
|
|
7277
|
+
id: "7ef2b9c7-5e6d-49f6-ae05-656207d0fc64",
|
|
7278
|
+
name: "Pualula",
|
|
7279
|
+
parentId: null,
|
|
7280
|
+
validUntil: null,
|
|
7281
|
+
externalId: "Aq91DweLmT8k"
|
|
7282
|
+
},
|
|
7283
|
+
{
|
|
7284
|
+
id: "6d1a59df-988c-4021-a846-ccbc021931a7",
|
|
7285
|
+
name: "Chuminga",
|
|
7286
|
+
parentId: null,
|
|
7287
|
+
validUntil: null,
|
|
7288
|
+
externalId: "Rw0fYNh2Xk9a"
|
|
7289
|
+
},
|
|
7290
|
+
{
|
|
7291
|
+
id: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7292
|
+
name: "Ibombo",
|
|
7293
|
+
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7294
|
+
validUntil: null,
|
|
7295
|
+
externalId: "k7DsP4vbN1Qe"
|
|
7296
|
+
},
|
|
7297
|
+
{
|
|
7298
|
+
id: "27160bbd-32d1-4625-812f-860226bfb92a",
|
|
7299
|
+
name: "Isango",
|
|
7300
|
+
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7301
|
+
validUntil: null,
|
|
7302
|
+
externalId: "Gm3Z9eQpHw4L"
|
|
7303
|
+
},
|
|
7304
|
+
{
|
|
7305
|
+
id: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7306
|
+
name: "Isamba",
|
|
7307
|
+
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7308
|
+
validUntil: null,
|
|
7309
|
+
externalId: "sT0xVu1KqJ7r"
|
|
7310
|
+
},
|
|
7311
|
+
{
|
|
7312
|
+
id: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7313
|
+
name: "Itambo",
|
|
7314
|
+
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7315
|
+
validUntil: null,
|
|
7316
|
+
externalId: "Nq6Bv2HpL9Te"
|
|
7317
|
+
},
|
|
7318
|
+
{
|
|
7319
|
+
id: "d42ab2fe-e7ed-470e-8b31-4fb27f9b8250",
|
|
7320
|
+
name: "Ezhi",
|
|
7321
|
+
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7322
|
+
validUntil: null,
|
|
7323
|
+
externalId: "xK8cQ0ZRy5Wd"
|
|
7324
|
+
},
|
|
7325
|
+
{
|
|
7326
|
+
id: "8fbd09d2-212b-47f4-beb3-5e1694931d9f",
|
|
7327
|
+
name: "Ilanga",
|
|
7328
|
+
parentId: "c599b691-fd2d-45e1-abf4-d185de727fb5",
|
|
7329
|
+
validUntil: null,
|
|
7330
|
+
externalId: "Cq4Jm1XvN8Ls"
|
|
7331
|
+
},
|
|
7332
|
+
// Villages under Ibombo (62a0ccb4-880d-4f30-8882-f256007dfff9)
|
|
7333
|
+
{
|
|
7334
|
+
id: "1d4e5f6a-7b8c-4912-8efa-345678901234",
|
|
7335
|
+
name: "Klow",
|
|
7336
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7337
|
+
validUntil: null,
|
|
7338
|
+
externalId: "IkYcYBUcyY2"
|
|
7339
|
+
},
|
|
7340
|
+
{
|
|
7341
|
+
id: "2e5f6a7b-8c9d-4a23-8fab-456789012345",
|
|
7342
|
+
name: "Mbondo",
|
|
7343
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7344
|
+
validUntil: null,
|
|
7345
|
+
externalId: "Qhvv5hvo3mY"
|
|
7346
|
+
},
|
|
7347
|
+
{
|
|
7348
|
+
id: "3f6a7b8c-9d0e-4b34-8abc-567890123456",
|
|
7349
|
+
name: "Ndara",
|
|
7350
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7351
|
+
validUntil: null,
|
|
7352
|
+
externalId: "crXh068O9TR"
|
|
7353
|
+
},
|
|
7354
|
+
{
|
|
7355
|
+
id: "4a7b8c9d-0e1f-4c45-abcd-678901234567",
|
|
7356
|
+
name: "Olani",
|
|
7357
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7358
|
+
validUntil: null,
|
|
7359
|
+
externalId: "r00It8Tvvp7"
|
|
7360
|
+
},
|
|
7361
|
+
{
|
|
7362
|
+
id: "5b8c9d0e-1f2a-4d56-bcde-789012345678",
|
|
7363
|
+
name: "Pemba",
|
|
7364
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7365
|
+
validUntil: null,
|
|
7366
|
+
externalId: "ZnUWsbONIaH"
|
|
7367
|
+
},
|
|
7368
|
+
{
|
|
7369
|
+
id: "6c9d0e1f-2a3b-4e67-8def-890123456789",
|
|
7370
|
+
name: "Quanza",
|
|
7371
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7372
|
+
validUntil: null,
|
|
7373
|
+
externalId: "fDZycvQTa7l"
|
|
7374
|
+
},
|
|
7375
|
+
{
|
|
7376
|
+
id: "7d0e1f2a-3b4c-4f78-8efa-901234567890",
|
|
7377
|
+
name: "Rivka",
|
|
7378
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7379
|
+
validUntil: null,
|
|
7380
|
+
externalId: "KqswxCGTELa"
|
|
7381
|
+
},
|
|
7382
|
+
// Villages under Isamba (967032fd-3f81-478a-826c-30cb8fe121bd)
|
|
7383
|
+
{
|
|
7384
|
+
id: "8e1f2a3b-4c5d-4089-8fab-012345678901",
|
|
7385
|
+
name: "Mbula",
|
|
7386
|
+
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7387
|
+
validUntil: null,
|
|
7388
|
+
externalId: "osEbKjRc9Kg"
|
|
7389
|
+
},
|
|
7390
|
+
{
|
|
7391
|
+
id: "9f2a3b4c-5d6e-4190-8abf-123456789012",
|
|
7392
|
+
name: "Ndoki",
|
|
7393
|
+
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7394
|
+
validUntil: null,
|
|
7395
|
+
externalId: "aq4daBUAGr3"
|
|
7396
|
+
},
|
|
7397
|
+
{
|
|
7398
|
+
id: "0a3b4c5d-6e7f-4201-abcd-234567890123",
|
|
7399
|
+
name: "Tsanga",
|
|
7400
|
+
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7401
|
+
validUntil: null,
|
|
7402
|
+
externalId: "cqis6Y8trbJ"
|
|
7403
|
+
},
|
|
7404
|
+
{
|
|
7405
|
+
id: "1b4c5d6e-7f8a-4312-bcde-345678901234",
|
|
7406
|
+
name: "Waziri",
|
|
7407
|
+
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7408
|
+
validUntil: null,
|
|
7409
|
+
externalId: "LMijHPyyx6d"
|
|
7410
|
+
},
|
|
7411
|
+
{
|
|
7412
|
+
id: "2c5d6e7f-8a9b-4423-8def-456789012345",
|
|
7413
|
+
name: "Zimbi",
|
|
7414
|
+
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7415
|
+
validUntil: null,
|
|
7416
|
+
externalId: "pcQYbPuKGZ7"
|
|
7417
|
+
},
|
|
7418
|
+
// Villages under Itambo (89a33893-b17d-481d-a26d-6461e7ac1651)
|
|
7419
|
+
{
|
|
7420
|
+
id: "3d6e7f8a-9b0c-4534-8efa-567890123456",
|
|
7421
|
+
name: "Felani",
|
|
7422
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7423
|
+
validUntil: null,
|
|
7424
|
+
externalId: "gSqpoCGdMXp"
|
|
7425
|
+
},
|
|
7426
|
+
{
|
|
7427
|
+
id: "4e7f8a9b-0c1d-4645-8fab-678901234567",
|
|
7428
|
+
name: "Goroma",
|
|
7429
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7430
|
+
validUntil: null,
|
|
7431
|
+
externalId: "KvAAIaNqVrp"
|
|
7432
|
+
},
|
|
7433
|
+
{
|
|
7434
|
+
id: "5f8a9b0c-1d2e-4756-8abc-789012345678",
|
|
7435
|
+
name: "Halifu",
|
|
7436
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7437
|
+
validUntil: null,
|
|
7438
|
+
externalId: "qe4UnEVt1hv"
|
|
7439
|
+
},
|
|
7440
|
+
{
|
|
7441
|
+
id: "6a9b0c1d-2e3f-4867-abcd-890123456789",
|
|
7442
|
+
name: "Jabari",
|
|
7443
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7444
|
+
validUntil: null,
|
|
7445
|
+
externalId: "yHH9Nz4rLOt"
|
|
7446
|
+
},
|
|
7447
|
+
{
|
|
7448
|
+
id: "7b0c1d2e-3f4a-4978-bcde-901234567890",
|
|
7449
|
+
name: "Kifani",
|
|
7450
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7451
|
+
validUntil: null,
|
|
7452
|
+
externalId: "eSWmXIGeu1I"
|
|
7453
|
+
},
|
|
7454
|
+
{
|
|
7455
|
+
id: "8c1d2e3f-4a5b-4089-8def-012345678901",
|
|
7456
|
+
name: "Lumela",
|
|
7457
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7458
|
+
validUntil: null,
|
|
7459
|
+
externalId: "bh0b3aI1uP3"
|
|
7460
|
+
}
|
|
7461
|
+
];
|
|
7462
|
+
var V2_DEFAULT_MOCK_LOCATIONS = [
|
|
7463
|
+
{
|
|
7464
|
+
id: "6f6186ce-cd5f-4a5f-810a-2d99e7c4ba12",
|
|
7465
|
+
name: "Central Provincial Office",
|
|
7466
|
+
locationType: "CRVS_OFFICE",
|
|
7467
|
+
administrativeAreaId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7468
|
+
validUntil: null,
|
|
7469
|
+
externalId: "Xr3Df8WpK6Ys"
|
|
7470
|
+
},
|
|
7471
|
+
{
|
|
7472
|
+
id: "b1c2d3e4-f5a6-7890-bcde-f12345678901",
|
|
7473
|
+
name: "Central Health Post",
|
|
7474
|
+
locationType: "HEALTH_FACILITY",
|
|
7475
|
+
administrativeAreaId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7476
|
+
validUntil: null
|
|
7477
|
+
},
|
|
7478
|
+
{
|
|
7479
|
+
id: "028d2c85-ca31-426d-b5d1-2cef545a4902",
|
|
7480
|
+
name: "Ibombo District Office",
|
|
7481
|
+
locationType: "CRVS_OFFICE",
|
|
7482
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7483
|
+
validUntil: null,
|
|
7484
|
+
externalId: "Sm4Nw7GrD2Vy"
|
|
7485
|
+
},
|
|
7486
|
+
{
|
|
7487
|
+
id: "62a0ccb4-4f30-4f30-8882-f256007dff9f",
|
|
7488
|
+
name: "Isamba District Office",
|
|
7489
|
+
locationType: "CRVS_OFFICE",
|
|
7490
|
+
administrativeAreaId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7491
|
+
validUntil: null,
|
|
7492
|
+
externalId: "Vg1Bq5XeH9Lt"
|
|
7493
|
+
},
|
|
7494
|
+
{
|
|
7495
|
+
id: "954c93e1-13f7-4435-bb82-35e0e215e07d",
|
|
7496
|
+
name: "Isango District Office",
|
|
7497
|
+
locationType: "CRVS_OFFICE",
|
|
7498
|
+
administrativeAreaId: "27160bbd-32d1-4625-812f-860226bfb92a",
|
|
7499
|
+
validUntil: null,
|
|
7500
|
+
externalId: "Je7Lm2XqN9Vz"
|
|
7501
|
+
},
|
|
7502
|
+
{
|
|
7503
|
+
id: "2884f5b9-17b4-49ce-bf4d-f538228935df",
|
|
7504
|
+
name: "Sulaka Provincial Office",
|
|
7505
|
+
locationType: "CRVS_OFFICE",
|
|
7506
|
+
administrativeAreaId: "c599b691-fd2d-45e1-abf4-d185de727fb5",
|
|
7507
|
+
validUntil: null,
|
|
7508
|
+
externalId: "Ht2Wp9KcX5Qv"
|
|
7509
|
+
},
|
|
7510
|
+
{
|
|
7511
|
+
id: "030358c6-54af-44be-821b-8e4af963a49c",
|
|
7512
|
+
name: "Ilanga District Office",
|
|
7513
|
+
locationType: "CRVS_OFFICE",
|
|
7514
|
+
administrativeAreaId: "8fbd09d2-212b-47f4-beb3-5e1694931d9f",
|
|
7515
|
+
validUntil: null,
|
|
7516
|
+
externalId: "Yp6Ds1WqN3Xz"
|
|
7517
|
+
},
|
|
7518
|
+
{
|
|
7519
|
+
id: "423d000f-101b-47c0-8b86-21a908067cee",
|
|
7520
|
+
name: "Chamakubi Health Post",
|
|
7521
|
+
locationType: "HEALTH_FACILITY",
|
|
7522
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7523
|
+
validUntil: null,
|
|
7524
|
+
externalId: "M1nFr8LbC2Qy"
|
|
7525
|
+
},
|
|
7526
|
+
{
|
|
7527
|
+
id: "4d3279be-d026-420c-88f7-f0a4ae986973",
|
|
7528
|
+
name: "Ibombo Rural Health Centre",
|
|
7529
|
+
locationType: "HEALTH_FACILITY",
|
|
7530
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7531
|
+
validUntil: null,
|
|
7532
|
+
externalId: "bT7pV6YrW0Xc"
|
|
7533
|
+
},
|
|
7534
|
+
{
|
|
7535
|
+
id: "190902f4-1d77-476a-8947-41145af1db7d",
|
|
7536
|
+
name: "Chikobo Rural Health Centre",
|
|
7537
|
+
locationType: "HEALTH_FACILITY",
|
|
7538
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7539
|
+
validUntil: null,
|
|
7540
|
+
externalId: "zE4qPn2SgJ5d"
|
|
7541
|
+
},
|
|
7542
|
+
{
|
|
7543
|
+
id: "f5ecbd9b-a01e-4a65-910e-70e86ab41b71",
|
|
7544
|
+
name: "Chilochabalenje Health Post",
|
|
7545
|
+
locationType: "HEALTH_FACILITY",
|
|
7546
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7547
|
+
validUntil: null,
|
|
7548
|
+
externalId: "H8vDs1MqR4Uf"
|
|
7549
|
+
},
|
|
7550
|
+
{
|
|
7551
|
+
id: "dbfc178f-7295-4b90-b28d-111c95b03127",
|
|
7552
|
+
name: "Chipeso Rural Health Centre",
|
|
7553
|
+
locationType: "HEALTH_FACILITY",
|
|
7554
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7555
|
+
validUntil: null,
|
|
7556
|
+
externalId: "Qw3uZ9KfX6Lm"
|
|
7557
|
+
},
|
|
7558
|
+
{
|
|
7559
|
+
id: "09862bfe-c7ac-46cd-987b-668681533c80",
|
|
7560
|
+
name: "Chisamba Rural Health Centre",
|
|
7561
|
+
locationType: "HEALTH_FACILITY",
|
|
7562
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7563
|
+
validUntil: null,
|
|
7564
|
+
externalId: "Yr0pCg8LdM2s"
|
|
7565
|
+
},
|
|
7566
|
+
{
|
|
7567
|
+
id: "834ce389-e95b-4fb0-96a0-33e9ab323059",
|
|
7568
|
+
name: "Chitanda Rural Health Centre",
|
|
7569
|
+
locationType: "HEALTH_FACILITY",
|
|
7570
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7571
|
+
validUntil: null,
|
|
7572
|
+
externalId: "tS9gJ4PwB1Qx"
|
|
7573
|
+
},
|
|
7574
|
+
{
|
|
7575
|
+
id: "0431c433-6062-4a4c-aee9-25271aec61ee",
|
|
7576
|
+
name: "Golden Valley Rural Health Centre",
|
|
7577
|
+
locationType: "HEALTH_FACILITY",
|
|
7578
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7579
|
+
validUntil: null,
|
|
7580
|
+
externalId: "Ld7Qm3XsA8Vr"
|
|
7581
|
+
},
|
|
7582
|
+
{
|
|
7583
|
+
id: "bc84d0b6-7ba7-480d-a339-5d9920d90eb2",
|
|
7584
|
+
name: "Ipongo Rural Health Centre",
|
|
7585
|
+
locationType: "HEALTH_FACILITY",
|
|
7586
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7587
|
+
validUntil: null,
|
|
7588
|
+
externalId: "kF2sW9DmH0Bt"
|
|
7589
|
+
},
|
|
7590
|
+
{
|
|
7591
|
+
id: "4cf1f53b-b730-41d2-8649-dff7eeed970d",
|
|
7592
|
+
name: "Itumbwe Health Post",
|
|
7593
|
+
locationType: "HEALTH_FACILITY",
|
|
7594
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7595
|
+
validUntil: null,
|
|
7596
|
+
externalId: "Ue5Xb3VaC7Pq"
|
|
7597
|
+
},
|
|
7598
|
+
{
|
|
7599
|
+
id: "4b3676cb-9355-4942-9eb9-2ce46acaf0e0",
|
|
7600
|
+
name: "Kabangalala Rural Health Centre",
|
|
7601
|
+
locationType: "HEALTH_FACILITY",
|
|
7602
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7603
|
+
validUntil: null,
|
|
7604
|
+
externalId: "Pz8Kc1TqH6Jn"
|
|
7605
|
+
},
|
|
7606
|
+
// Village offices
|
|
7607
|
+
{
|
|
7608
|
+
id: "1f4a5b6c-7d8e-4312-8abc-345678901234",
|
|
7609
|
+
name: "Klow Village Office",
|
|
7610
|
+
locationType: "CRVS_OFFICE",
|
|
7611
|
+
administrativeAreaId: "1d4e5f6a-7b8c-4912-8efa-345678901234",
|
|
7612
|
+
validUntil: null,
|
|
7613
|
+
externalId: "PmAyxAJkxiJ"
|
|
7614
|
+
}
|
|
7615
|
+
];
|
|
7616
|
+
var V2_DEFAULT_MOCK_LOCATIONS_MAP = new Map(
|
|
7617
|
+
V2_DEFAULT_MOCK_LOCATIONS.map((l) => [l.id, l])
|
|
7618
|
+
);
|
|
7619
|
+
var V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS_MAP = new Map(
|
|
7620
|
+
V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS.map((a) => [a.id, a])
|
|
7621
|
+
);
|
|
7622
|
+
|
|
6951
7623
|
// ../commons/src/notification/UserNotifications.ts
|
|
6952
7624
|
var z44 = __toESM(require("zod/v4"));
|
|
6953
7625
|
var TriggerEvent = {
|