@opencrvs/toolkit 2.0.0-rc.fdc585a → 2.0.0-rc.fe94e41
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 +103 -0
- package/create-countryconfig/package.json +21 -0
- package/dist/application-config/index.js +220 -86
- package/dist/cli.js +392 -128
- package/dist/commons/api/router.d.ts +3369 -238
- package/dist/commons/conditionals/conditionals.d.ts +6 -0
- package/dist/commons/conditionals/validate.d.ts +1 -0
- package/dist/commons/events/ActionDocument.d.ts +6 -0
- package/dist/commons/events/ActionInput.d.ts +114 -0
- package/dist/commons/events/Draft.d.ts +4 -2
- package/dist/commons/events/EventDocument.d.ts +3 -0
- package/dist/commons/events/EventIndex.d.ts +0 -3
- package/dist/commons/events/EventMetadata.d.ts +0 -7
- package/dist/commons/events/WorkqueueConfig.d.ts +150 -150
- package/dist/commons/events/index.d.ts +2 -0
- package/dist/commons/events/locations.d.ts +21 -0
- package/dist/commons/events/mocks.test.utils.d.ts +19 -0
- package/dist/commons/events/scopes.d.ts +24 -1
- package/dist/commons/events/state/flags.d.ts +16 -0
- package/dist/commons/events/state/index.d.ts +0 -4
- package/dist/commons/events/state/utils.d.ts +3 -2
- package/dist/commons/events/utils.d.ts +12 -1
- package/dist/conditionals/index.js +7 -1
- package/dist/events/index.js +808 -174
- package/dist/migrations/v2.0/checkout-upstream-files.d.ts +1 -1
- package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -1
- package/dist/migrations/v2.0/checkout-upstream-files.js +1 -2
- package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts +9 -1
- package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts.map +1 -1
- package/dist/migrations/v2.0/delete-infrastructure-directory.js +66 -20
- package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts +3 -0
- package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts.map +1 -0
- package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.js +110 -0
- package/dist/migrations/v2.0/index.d.ts +5 -3
- package/dist/migrations/v2.0/index.d.ts.map +1 -1
- package/dist/migrations/v2.0/index.js +390 -126
- package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts +11 -1
- package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts.map +1 -1
- package/dist/migrations/v2.0/merge-infrastructure-directory.js +17 -16
- package/dist/migrations/v2.0/migrate-scopes.d.ts.map +1 -1
- package/dist/migrations/v2.0/migrate-scopes.js +54 -30
- package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts.map +1 -1
- package/dist/migrations/v2.0/migrate-workqueue-configs.js +140 -59
- package/dist/notification/index.js +656 -119
- package/dist/scopes/index.js +3 -1
- package/opencrvs-toolkit-2.0.0-rc.fe94e41.tgz +0 -0
- package/package.json +6 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/opencrvs-toolkit-2.0.0-rc.fdc585a.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
|
|
@@ -980,28 +985,20 @@ function schemaPriority(schema) {
|
|
|
980
985
|
return idx === -1 ? 9999 : idx;
|
|
981
986
|
}
|
|
982
987
|
function safeUnion(schemas) {
|
|
988
|
+
const sortedSchemas = [...schemas].sort(
|
|
989
|
+
(a, b) => schemaPriority(a) - schemaPriority(b)
|
|
990
|
+
);
|
|
983
991
|
return z12.any().superRefine((val, ctx) => {
|
|
984
|
-
const
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
if (successful.length === 0) {
|
|
989
|
-
ctx.addIssue({
|
|
990
|
-
code: "invalid_type",
|
|
991
|
-
expected: "custom",
|
|
992
|
-
message: "Value does not match any schema"
|
|
993
|
-
});
|
|
994
|
-
return;
|
|
995
|
-
}
|
|
996
|
-
successful.sort((a, b) => schemaPriority(a) - schemaPriority(b));
|
|
997
|
-
const best = successful[0];
|
|
998
|
-
if (!best.safeParse(val).success) {
|
|
999
|
-
ctx.addIssue({
|
|
1000
|
-
expected: "custom",
|
|
1001
|
-
code: "invalid_type",
|
|
1002
|
-
message: "Value did not match the best schema"
|
|
1003
|
-
});
|
|
992
|
+
for (const schema of sortedSchemas) {
|
|
993
|
+
if (schema.safeParse(val).success) {
|
|
994
|
+
return;
|
|
995
|
+
}
|
|
1004
996
|
}
|
|
997
|
+
ctx.addIssue({
|
|
998
|
+
code: "invalid_type",
|
|
999
|
+
expected: "custom",
|
|
1000
|
+
message: "Value does not match any schema"
|
|
1001
|
+
});
|
|
1005
1002
|
}).meta({
|
|
1006
1003
|
description: "Value that matches exactly one of the possible schema types (TextValue, DateValue, DateRangeFieldValue). The best matching schema is chosen by priority."
|
|
1007
1004
|
});
|
|
@@ -1218,8 +1215,9 @@ var RequestedCorrectionAction = ActionBase.extend(
|
|
|
1218
1215
|
var ApprovedCorrectionAction = ActionBase.extend(
|
|
1219
1216
|
z14.object({
|
|
1220
1217
|
type: z14.literal(ActionType.APPROVE_CORRECTION),
|
|
1221
|
-
requestId: z14.string()
|
|
1218
|
+
requestId: z14.string(),
|
|
1222
1219
|
// TODO move into 'content' property
|
|
1220
|
+
content: z14.object({ immediateCorrection: z14.boolean().optional() }).optional()
|
|
1223
1221
|
}).shape
|
|
1224
1222
|
);
|
|
1225
1223
|
var RejectedCorrectionAction = ActionBase.extend(
|
|
@@ -1311,6 +1309,9 @@ var FlagConfig = z15.object({
|
|
|
1311
1309
|
"Indicates if this flag expects an action to be performed to be cleared."
|
|
1312
1310
|
),
|
|
1313
1311
|
label: TranslationConfig.describe("Human readable label of the flag.")
|
|
1312
|
+
}).meta({
|
|
1313
|
+
id: "FlagConfig",
|
|
1314
|
+
description: "Configuration for a custom flag that can be added to or removed from records by event actions."
|
|
1314
1315
|
});
|
|
1315
1316
|
var ActionFlagConfig = z15.object({
|
|
1316
1317
|
id: Flag,
|
|
@@ -1318,6 +1319,9 @@ var ActionFlagConfig = z15.object({
|
|
|
1318
1319
|
conditional: Conditional.optional().describe(
|
|
1319
1320
|
"When conditional is met, the operation is performed on the flag. If not provided, the operation is performed unconditionally."
|
|
1320
1321
|
)
|
|
1322
|
+
}).meta({
|
|
1323
|
+
id: "ActionFlagConfig",
|
|
1324
|
+
description: "Add or remove operation applied to a flag when the parent action is accepted. Optionally gated by a conditional."
|
|
1321
1325
|
});
|
|
1322
1326
|
|
|
1323
1327
|
// ../commons/src/events/EventMetadata.ts
|
|
@@ -1339,8 +1343,7 @@ var ActionCreationMetadata = z16.object({
|
|
|
1339
1343
|
),
|
|
1340
1344
|
createdByUserType: z16.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
|
|
1341
1345
|
acceptedAt: z16.iso.datetime().describe("Timestamp when the action request was accepted."),
|
|
1342
|
-
createdByRole: z16.string().optional().describe("Role of the user at the time of action request creation.")
|
|
1343
|
-
createdBySignature: z16.string().nullish().describe("Signature of the user who created the action request.")
|
|
1346
|
+
createdByRole: z16.string().optional().describe("Role of the user at the time of action request creation.")
|
|
1344
1347
|
});
|
|
1345
1348
|
var RegistrationCreationMetadata = ActionCreationMetadata.extend({
|
|
1346
1349
|
registrationNumber: z16.string().describe(
|
|
@@ -1368,9 +1371,6 @@ var EventMetadata = z16.object({
|
|
|
1368
1371
|
createdAtLocation: UUID.nullish().describe(
|
|
1369
1372
|
"Location of the user who created the event."
|
|
1370
1373
|
),
|
|
1371
|
-
createdBySignature: DocumentPath.nullish().describe(
|
|
1372
|
-
"Signature of the user who created the event."
|
|
1373
|
-
),
|
|
1374
1374
|
updatedAtLocation: UUID.nullish().describe(
|
|
1375
1375
|
"Location of the user who last changed the status."
|
|
1376
1376
|
),
|
|
@@ -1663,14 +1663,21 @@ var FieldId = import_v43.default.string().superRefine((val, ctx) => {
|
|
|
1663
1663
|
}
|
|
1664
1664
|
}).describe("Unique identifier for the field");
|
|
1665
1665
|
var FieldReference = import_v43.default.object({
|
|
1666
|
-
$$field: FieldId,
|
|
1666
|
+
$$field: FieldId.describe("Id of the field to reference"),
|
|
1667
1667
|
$$subfield: import_v43.default.array(import_v43.default.string()).optional().default([]).describe(
|
|
1668
1668
|
'If the FieldValue is an object, subfield can be used to refer to e.g. `["foo", "bar"]` in `{ foo: { bar: 3 } }`'
|
|
1669
1669
|
)
|
|
1670
1670
|
}).describe("Reference to a field by its ID");
|
|
1671
1671
|
var ValidationConfig = import_v43.default.object({
|
|
1672
|
-
validator: Conditional
|
|
1673
|
-
|
|
1672
|
+
validator: Conditional.describe(
|
|
1673
|
+
"Conditional expression that must hold for the field value to be considered valid."
|
|
1674
|
+
),
|
|
1675
|
+
message: TranslationConfig.describe(
|
|
1676
|
+
"Error message displayed when the validator does not hold."
|
|
1677
|
+
)
|
|
1678
|
+
}).meta({
|
|
1679
|
+
id: "ValidationConfig",
|
|
1680
|
+
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."
|
|
1674
1681
|
});
|
|
1675
1682
|
var requiredSchema = import_v43.default.union([
|
|
1676
1683
|
import_v43.default.boolean(),
|
|
@@ -1709,6 +1716,9 @@ var BaseField = import_v43.default.object({
|
|
|
1709
1716
|
}).describe("Common properties shared across all field types.");
|
|
1710
1717
|
var Divider = BaseField.extend({
|
|
1711
1718
|
type: import_v43.default.literal(FieldType.DIVIDER)
|
|
1719
|
+
}).meta({
|
|
1720
|
+
description: "A horizontal line divider",
|
|
1721
|
+
id: "Divider"
|
|
1712
1722
|
});
|
|
1713
1723
|
var TextField = BaseField.extend({
|
|
1714
1724
|
type: import_v43.default.literal(FieldType.TEXT),
|
|
@@ -1719,7 +1729,10 @@ var TextField = BaseField.extend({
|
|
|
1719
1729
|
prefix: TranslationConfig.optional(),
|
|
1720
1730
|
postfix: TranslationConfig.optional()
|
|
1721
1731
|
}).default({ type: "text" }).optional()
|
|
1722
|
-
}).
|
|
1732
|
+
}).meta({
|
|
1733
|
+
description: "A text input field",
|
|
1734
|
+
id: "TextField"
|
|
1735
|
+
});
|
|
1723
1736
|
var NumberField = BaseField.extend({
|
|
1724
1737
|
type: import_v43.default.literal(FieldType.NUMBER),
|
|
1725
1738
|
defaultValue: NumberFieldValue.optional(),
|
|
@@ -1729,7 +1742,10 @@ var NumberField = BaseField.extend({
|
|
|
1729
1742
|
prefix: TranslationConfig.optional(),
|
|
1730
1743
|
postfix: TranslationConfig.optional()
|
|
1731
1744
|
}).optional()
|
|
1732
|
-
}).
|
|
1745
|
+
}).meta({
|
|
1746
|
+
description: "A number input field",
|
|
1747
|
+
id: "NumberField"
|
|
1748
|
+
});
|
|
1733
1749
|
var TextAreaField = BaseField.extend({
|
|
1734
1750
|
type: import_v43.default.literal(FieldType.TEXTAREA),
|
|
1735
1751
|
defaultValue: NonEmptyTextValue.optional(),
|
|
@@ -1740,7 +1756,10 @@ var TextAreaField = BaseField.extend({
|
|
|
1740
1756
|
prefix: TranslationConfig.optional(),
|
|
1741
1757
|
postfix: TranslationConfig.optional()
|
|
1742
1758
|
}).default({ rows: 4 }).optional()
|
|
1743
|
-
}).
|
|
1759
|
+
}).meta({
|
|
1760
|
+
description: "A multiline text input",
|
|
1761
|
+
id: "TextAreaField"
|
|
1762
|
+
});
|
|
1744
1763
|
var ImageMimeType = import_v43.default.enum([
|
|
1745
1764
|
"image/png",
|
|
1746
1765
|
"image/jpg",
|
|
@@ -1770,13 +1789,19 @@ var SignatureField = BaseField.extend({
|
|
|
1770
1789
|
}).default({
|
|
1771
1790
|
maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
|
|
1772
1791
|
})
|
|
1773
|
-
}).
|
|
1792
|
+
}).meta({
|
|
1793
|
+
description: "A signature input field",
|
|
1794
|
+
id: "SignatureField"
|
|
1795
|
+
});
|
|
1774
1796
|
var EmailField = BaseField.extend({
|
|
1775
1797
|
type: import_v43.default.literal(FieldType.EMAIL),
|
|
1776
1798
|
configuration: import_v43.default.object({
|
|
1777
1799
|
maxLength: import_v43.default.number().optional().describe("Maximum length of the text")
|
|
1778
1800
|
}).default({ maxLength: 255 }).optional(),
|
|
1779
1801
|
defaultValue: NonEmptyTextValue.optional()
|
|
1802
|
+
}).meta({
|
|
1803
|
+
description: "An email input field",
|
|
1804
|
+
id: "EmailField"
|
|
1780
1805
|
});
|
|
1781
1806
|
var DateField = BaseField.extend({
|
|
1782
1807
|
type: import_v43.default.literal(FieldType.DATE),
|
|
@@ -1786,7 +1811,10 @@ var DateField = BaseField.extend({
|
|
|
1786
1811
|
"Text to display above the date input"
|
|
1787
1812
|
).optional()
|
|
1788
1813
|
}).optional()
|
|
1789
|
-
}).
|
|
1814
|
+
}).meta({
|
|
1815
|
+
description: "A date input (yyyy-MM-dd)",
|
|
1816
|
+
id: "DateField"
|
|
1817
|
+
});
|
|
1790
1818
|
var AgeField = BaseField.extend({
|
|
1791
1819
|
type: import_v43.default.literal(FieldType.AGE),
|
|
1792
1820
|
defaultValue: NumberFieldValue.optional(),
|
|
@@ -1795,7 +1823,10 @@ var AgeField = BaseField.extend({
|
|
|
1795
1823
|
prefix: TranslationConfig.optional(),
|
|
1796
1824
|
postfix: TranslationConfig.optional()
|
|
1797
1825
|
})
|
|
1798
|
-
}).
|
|
1826
|
+
}).meta({
|
|
1827
|
+
description: "An age input field which uses the current date as the asOfDate",
|
|
1828
|
+
id: "AgeField"
|
|
1829
|
+
});
|
|
1799
1830
|
var TimeField = BaseField.extend({
|
|
1800
1831
|
type: import_v43.default.literal(FieldType.TIME),
|
|
1801
1832
|
defaultValue: SerializedNowDateTime.or(TimeValue).optional().describe("Default time value (HH-mm)"),
|
|
@@ -1805,7 +1836,10 @@ var TimeField = BaseField.extend({
|
|
|
1805
1836
|
"Text to display above the time input"
|
|
1806
1837
|
).optional()
|
|
1807
1838
|
}).optional()
|
|
1808
|
-
}).
|
|
1839
|
+
}).meta({
|
|
1840
|
+
description: "A single time input (HH-mm)",
|
|
1841
|
+
id: "TimeField"
|
|
1842
|
+
});
|
|
1809
1843
|
var DateRangeField = BaseField.extend({
|
|
1810
1844
|
type: import_v43.default.literal(FieldType.DATE_RANGE),
|
|
1811
1845
|
defaultValue: DateRangeFieldValue.optional(),
|
|
@@ -1814,7 +1848,10 @@ var DateRangeField = BaseField.extend({
|
|
|
1814
1848
|
"Text to display above the date input"
|
|
1815
1849
|
).optional()
|
|
1816
1850
|
}).optional()
|
|
1817
|
-
}).
|
|
1851
|
+
}).meta({
|
|
1852
|
+
description: "A date range input ({ start: yyyy-MM-dd, end: yyyy-MM-dd })",
|
|
1853
|
+
id: "DateRangeField"
|
|
1854
|
+
});
|
|
1818
1855
|
var HtmlFontVariant = import_v43.default.enum([
|
|
1819
1856
|
"reg12",
|
|
1820
1857
|
"reg14",
|
|
@@ -1858,18 +1895,30 @@ var ImageViewField = BaseField.extend({
|
|
|
1858
1895
|
type: import_v43.default.literal(FieldType.IMAGE_VIEW),
|
|
1859
1896
|
defaultValue: NonEmptyTextValue.optional(),
|
|
1860
1897
|
configuration: ImageConfiguration
|
|
1861
|
-
}).
|
|
1898
|
+
}).meta({
|
|
1899
|
+
description: "A read-only image component for form pages",
|
|
1900
|
+
id: "ImageViewField"
|
|
1901
|
+
});
|
|
1862
1902
|
var Paragraph = BaseField.extend({
|
|
1863
1903
|
type: import_v43.default.literal(FieldType.PARAGRAPH),
|
|
1864
1904
|
configuration: ParagraphConfiguration
|
|
1865
|
-
}).
|
|
1905
|
+
}).meta({
|
|
1906
|
+
description: "A read-only HTML <p> paragraph",
|
|
1907
|
+
id: "Paragraph"
|
|
1908
|
+
});
|
|
1866
1909
|
var Heading = BaseField.extend({
|
|
1867
1910
|
type: import_v43.default.literal(FieldType.HEADING),
|
|
1868
1911
|
configuration: HeadingConfiguration
|
|
1869
|
-
}).
|
|
1912
|
+
}).meta({
|
|
1913
|
+
description: "A read-only heading component for form pages",
|
|
1914
|
+
id: "Heading"
|
|
1915
|
+
});
|
|
1870
1916
|
var PageHeader = BaseField.extend({
|
|
1871
1917
|
type: import_v43.default.literal(FieldType.PAGE_HEADER)
|
|
1872
|
-
}).
|
|
1918
|
+
}).meta({
|
|
1919
|
+
description: "A read-only header component for form pages",
|
|
1920
|
+
id: "PageHeader"
|
|
1921
|
+
});
|
|
1873
1922
|
var File = BaseField.extend({
|
|
1874
1923
|
type: import_v43.default.literal(FieldType.FILE),
|
|
1875
1924
|
defaultValue: FileFieldValue.optional(),
|
|
@@ -1888,7 +1937,10 @@ var File = BaseField.extend({
|
|
|
1888
1937
|
}).default({
|
|
1889
1938
|
maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
|
|
1890
1939
|
})
|
|
1891
|
-
}).
|
|
1940
|
+
}).meta({
|
|
1941
|
+
description: "A file upload field",
|
|
1942
|
+
id: "File"
|
|
1943
|
+
});
|
|
1892
1944
|
var SelectOption = import_v43.default.object({
|
|
1893
1945
|
value: import_v43.default.string().describe("The value of the option"),
|
|
1894
1946
|
label: import_v43.default.union([import_v43.default.string(), TranslationConfig]).describe("The label of the option"),
|
|
@@ -1905,7 +1957,10 @@ var NumberWithUnitField = BaseField.extend({
|
|
|
1905
1957
|
"Placeholder for the number field"
|
|
1906
1958
|
)
|
|
1907
1959
|
}).optional()
|
|
1908
|
-
}).
|
|
1960
|
+
}).meta({
|
|
1961
|
+
description: "A number with unit input field",
|
|
1962
|
+
id: "NumberWithUnitField"
|
|
1963
|
+
});
|
|
1909
1964
|
var RadioGroup = BaseField.extend({
|
|
1910
1965
|
type: import_v43.default.literal(FieldType.RADIO_GROUP),
|
|
1911
1966
|
defaultValue: TextValue.optional(),
|
|
@@ -1915,7 +1970,10 @@ var RadioGroup = BaseField.extend({
|
|
|
1915
1970
|
size: import_v43.default.enum(["NORMAL", "LARGE"]).optional()
|
|
1916
1971
|
}).optional()
|
|
1917
1972
|
}).optional()
|
|
1918
|
-
}).
|
|
1973
|
+
}).meta({
|
|
1974
|
+
description: "A grouped radio button field",
|
|
1975
|
+
id: "RadioGroup"
|
|
1976
|
+
});
|
|
1919
1977
|
var BulletList = BaseField.extend({
|
|
1920
1978
|
type: import_v43.default.literal(FieldType.BULLET_LIST),
|
|
1921
1979
|
items: import_v43.default.array(TranslationConfig).describe("A list of items"),
|
|
@@ -1924,7 +1982,10 @@ var BulletList = BaseField.extend({
|
|
|
1924
1982
|
fontVariant: HtmlFontVariant.optional()
|
|
1925
1983
|
}).optional()
|
|
1926
1984
|
}).default({})
|
|
1927
|
-
}).
|
|
1985
|
+
}).meta({
|
|
1986
|
+
description: "A list of bullet points",
|
|
1987
|
+
id: "BulletList"
|
|
1988
|
+
});
|
|
1928
1989
|
var Select = BaseField.extend({
|
|
1929
1990
|
type: import_v43.default.literal(FieldType.SELECT),
|
|
1930
1991
|
defaultValue: TextValue.optional(),
|
|
@@ -1939,7 +2000,10 @@ var Select = BaseField.extend({
|
|
|
1939
2000
|
{ ..., defaultMessage: "'{input}' is not listed among the health facilities." }
|
|
1940
2001
|
`
|
|
1941
2002
|
)
|
|
1942
|
-
}).
|
|
2003
|
+
}).meta({
|
|
2004
|
+
description: "A select input field",
|
|
2005
|
+
id: "Select"
|
|
2006
|
+
});
|
|
1943
2007
|
var SelectDateRangeOption = import_v43.default.object({
|
|
1944
2008
|
value: SelectDateRangeValue.describe("The value of the option"),
|
|
1945
2009
|
label: TranslationConfig.describe("The label of the option")
|
|
@@ -1948,7 +2012,10 @@ var SelectDateRangeField = BaseField.extend({
|
|
|
1948
2012
|
type: import_v43.default.literal(FieldType.SELECT_DATE_RANGE),
|
|
1949
2013
|
defaultValue: SelectDateRangeValue.optional(),
|
|
1950
2014
|
options: import_v43.default.array(SelectDateRangeOption).describe("A list of options")
|
|
1951
|
-
}).
|
|
2015
|
+
}).meta({
|
|
2016
|
+
description: "A date range selection field",
|
|
2017
|
+
id: "SelectDateRangeField"
|
|
2018
|
+
});
|
|
1952
2019
|
var NameConfig = import_v43.default.object({
|
|
1953
2020
|
firstname: import_v43.default.object({ required: requiredSchema, label: TranslationConfig.optional() }).optional(),
|
|
1954
2021
|
middlename: import_v43.default.object({ required: requiredSchema, label: TranslationConfig.optional() }).optional(),
|
|
@@ -1979,26 +2046,41 @@ var NameField = BaseField.extend({
|
|
|
1979
2046
|
surname: { required: true }
|
|
1980
2047
|
}
|
|
1981
2048
|
}).optional()
|
|
1982
|
-
}).
|
|
2049
|
+
}).meta({
|
|
2050
|
+
description: "A field for entering a persons name",
|
|
2051
|
+
id: "NameField"
|
|
2052
|
+
});
|
|
1983
2053
|
var PhoneField = BaseField.extend({
|
|
1984
2054
|
defaultValue: NonEmptyTextValue.optional(),
|
|
1985
2055
|
type: import_v43.default.literal(FieldType.PHONE)
|
|
1986
|
-
}).
|
|
2056
|
+
}).meta({
|
|
2057
|
+
description: "A field for entering a phone number",
|
|
2058
|
+
id: "PhoneField"
|
|
2059
|
+
});
|
|
1987
2060
|
var IdField = BaseField.extend({
|
|
1988
2061
|
defaultValue: NonEmptyTextValue.optional(),
|
|
1989
2062
|
type: import_v43.default.literal(FieldType.ID)
|
|
1990
|
-
}).
|
|
2063
|
+
}).meta({
|
|
2064
|
+
description: "A field for entering an ID",
|
|
2065
|
+
id: "IdField"
|
|
2066
|
+
});
|
|
1991
2067
|
var Checkbox = BaseField.extend({
|
|
1992
2068
|
type: import_v43.default.literal(FieldType.CHECKBOX),
|
|
1993
2069
|
defaultValue: CheckboxFieldValue.default(false)
|
|
1994
|
-
}).
|
|
2070
|
+
}).meta({
|
|
2071
|
+
description: "A boolean checkbox field",
|
|
2072
|
+
id: "Checkbox"
|
|
2073
|
+
});
|
|
1995
2074
|
var Country = BaseField.extend({
|
|
1996
2075
|
type: import_v43.default.literal(FieldType.COUNTRY),
|
|
1997
2076
|
defaultValue: NonEmptyTextValue.optional(),
|
|
1998
2077
|
optionOverrides: import_v43.default.array(SelectOption.omit({ label: true })).optional().describe(
|
|
1999
2078
|
"Conditionals for specific countries. Countries not listed are always shown and enabled."
|
|
2000
2079
|
)
|
|
2001
|
-
}).
|
|
2080
|
+
}).meta({
|
|
2081
|
+
description: "A field for selecting a country",
|
|
2082
|
+
id: "Country"
|
|
2083
|
+
});
|
|
2002
2084
|
var AllowedLocations = JurisdictionReference.optional().describe(
|
|
2003
2085
|
"Limits which location options are selectable depending on user jurisdiction and location."
|
|
2004
2086
|
);
|
|
@@ -2007,16 +2089,18 @@ var AdministrativeAreas = import_v43.default.enum([
|
|
|
2007
2089
|
"HEALTH_FACILITY",
|
|
2008
2090
|
"CRVS_OFFICE"
|
|
2009
2091
|
]);
|
|
2010
|
-
var AdministrativeAreaConfiguration = import_v43.default.object({
|
|
2011
|
-
partOf: FieldReference.optional().describe("Parent location"),
|
|
2012
|
-
type: AdministrativeAreas,
|
|
2013
|
-
allowedLocations: AllowedLocations
|
|
2014
|
-
}).describe("Administrative area options");
|
|
2015
2092
|
var AdministrativeAreaField = BaseField.extend({
|
|
2016
2093
|
type: import_v43.default.literal(FieldType.ADMINISTRATIVE_AREA),
|
|
2017
2094
|
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
|
|
2018
|
-
configuration:
|
|
2019
|
-
|
|
2095
|
+
configuration: import_v43.default.object({
|
|
2096
|
+
partOf: FieldReference.optional().describe("Parent location"),
|
|
2097
|
+
type: AdministrativeAreas,
|
|
2098
|
+
allowedLocations: AllowedLocations
|
|
2099
|
+
}).describe("Administrative area options")
|
|
2100
|
+
}).meta({
|
|
2101
|
+
description: "Administrative area input field",
|
|
2102
|
+
id: "AdministrativeAreaField"
|
|
2103
|
+
});
|
|
2020
2104
|
var LocationInput = BaseField.extend({
|
|
2021
2105
|
type: import_v43.default.literal(FieldType.LOCATION),
|
|
2022
2106
|
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
|
|
@@ -2024,7 +2108,10 @@ var LocationInput = BaseField.extend({
|
|
|
2024
2108
|
locationTypes: import_v43.default.array(import_v43.default.string()).optional().describe("Types of the locations that are available for selection."),
|
|
2025
2109
|
allowedLocations: AllowedLocations
|
|
2026
2110
|
}).optional()
|
|
2027
|
-
}).
|
|
2111
|
+
}).meta({
|
|
2112
|
+
description: "A field for selecting a location",
|
|
2113
|
+
id: "LocationInput"
|
|
2114
|
+
});
|
|
2028
2115
|
var FileUploadWithOptions = BaseField.extend({
|
|
2029
2116
|
type: import_v43.default.literal(FieldType.FILE_WITH_OPTIONS),
|
|
2030
2117
|
options: import_v43.default.array(SelectOption).describe("A list of options"),
|
|
@@ -2038,6 +2125,9 @@ var FileUploadWithOptions = BaseField.extend({
|
|
|
2038
2125
|
}).default({
|
|
2039
2126
|
maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
|
|
2040
2127
|
})
|
|
2128
|
+
}).meta({
|
|
2129
|
+
description: "A field for uploading files with file type options",
|
|
2130
|
+
id: "FileUploadWithOptions"
|
|
2041
2131
|
});
|
|
2042
2132
|
var Facility = BaseField.extend({
|
|
2043
2133
|
type: import_v43.default.literal(FieldType.FACILITY),
|
|
@@ -2083,7 +2173,10 @@ var Address = BaseField.extend({
|
|
|
2083
2173
|
allowedLocations: AllowedLocations
|
|
2084
2174
|
}).optional(),
|
|
2085
2175
|
defaultValue: DefaultAddressFieldValue.optional()
|
|
2086
|
-
}).
|
|
2176
|
+
}).meta({
|
|
2177
|
+
description: "Address input field \u2013 a combination of location and text fields",
|
|
2178
|
+
id: "Address"
|
|
2179
|
+
});
|
|
2087
2180
|
var StaticDataEntry = import_v43.default.object({
|
|
2088
2181
|
id: import_v43.default.string().describe("ID for the data entry."),
|
|
2089
2182
|
label: TranslationConfig,
|
|
@@ -2098,7 +2191,10 @@ var DataField = BaseField.extend({
|
|
|
2098
2191
|
subtitle: TranslationConfig.optional(),
|
|
2099
2192
|
data: import_v43.default.array(DataEntry)
|
|
2100
2193
|
})
|
|
2101
|
-
}).
|
|
2194
|
+
}).meta({
|
|
2195
|
+
description: "A field for displaying a table of read-only data",
|
|
2196
|
+
id: "DataField"
|
|
2197
|
+
});
|
|
2102
2198
|
var ButtonSize = import_v43.default.enum(["small", "medium", "large"]);
|
|
2103
2199
|
var ButtonType = import_v43.default.enum([
|
|
2104
2200
|
"primary",
|
|
@@ -2125,11 +2221,17 @@ var ButtonField = BaseField.extend({
|
|
|
2125
2221
|
type: import_v43.default.literal(FieldType.BUTTON),
|
|
2126
2222
|
defaultValue: ButtonFieldValue.optional(),
|
|
2127
2223
|
configuration: ButtonConfiguration
|
|
2128
|
-
}).
|
|
2224
|
+
}).meta({
|
|
2225
|
+
description: "A generic button that can be used to trigger an action",
|
|
2226
|
+
id: "ButtonField"
|
|
2227
|
+
});
|
|
2129
2228
|
var FieldGroup = BaseField.extend({
|
|
2130
2229
|
type: import_v43.default.literal(FieldType.FIELD_GROUP),
|
|
2131
2230
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
2132
2231
|
fields: import_v43.default.lazy(() => import_v43.default.array(FieldConfig))
|
|
2232
|
+
}).meta({
|
|
2233
|
+
description: "A group of fields that are displayed together",
|
|
2234
|
+
id: "FieldGroup"
|
|
2133
2235
|
});
|
|
2134
2236
|
var AlphaPrintButton = BaseField.extend({
|
|
2135
2237
|
type: import_v43.default.literal(FieldType.ALPHA_PRINT_BUTTON),
|
|
@@ -2139,7 +2241,10 @@ var AlphaPrintButton = BaseField.extend({
|
|
|
2139
2241
|
"Label for the print button"
|
|
2140
2242
|
)
|
|
2141
2243
|
})
|
|
2142
|
-
}).
|
|
2244
|
+
}).meta({
|
|
2245
|
+
description: "An experimental print button field for printing certificates during the declaration process",
|
|
2246
|
+
id: "AlphaPrintButton"
|
|
2247
|
+
});
|
|
2143
2248
|
var HttpField = BaseField.extend({
|
|
2144
2249
|
type: import_v43.default.literal(FieldType.HTTP),
|
|
2145
2250
|
defaultValue: HttpFieldValue.optional(),
|
|
@@ -2155,20 +2260,30 @@ var HttpField = BaseField.extend({
|
|
|
2155
2260
|
params: import_v43.default.record(import_v43.default.string(), import_v43.default.union([import_v43.default.string(), FieldReference])).optional(),
|
|
2156
2261
|
timeout: import_v43.default.number().default(15e3).describe("Request timeout in milliseconds")
|
|
2157
2262
|
})
|
|
2158
|
-
}).
|
|
2263
|
+
}).meta({
|
|
2264
|
+
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.",
|
|
2265
|
+
id: "HttpField"
|
|
2266
|
+
});
|
|
2159
2267
|
var AutocompleteField = BaseField.extend({
|
|
2160
2268
|
type: import_v43.default.literal(FieldType.AUTOCOMPLETE),
|
|
2161
2269
|
configuration: import_v43.default.object({
|
|
2162
|
-
url: import_v43.default.string().describe(
|
|
2270
|
+
url: import_v43.default.string().describe(
|
|
2271
|
+
"URL to fetch autocomplete suggestions from. This should be a country config server endpoint."
|
|
2272
|
+
).optional(),
|
|
2163
2273
|
method: import_v43.default.enum(["GET", "POST"]).default("GET").optional(),
|
|
2164
2274
|
defaultOptions: import_v43.default.array(
|
|
2165
2275
|
import_v43.default.object({
|
|
2166
2276
|
label: import_v43.default.string(),
|
|
2167
2277
|
value: import_v43.default.string()
|
|
2168
2278
|
})
|
|
2169
|
-
).optional()
|
|
2279
|
+
).optional().describe(
|
|
2280
|
+
"Manual entry is supported through configuration, allowing users to provide values not currently represented in the dataset."
|
|
2281
|
+
)
|
|
2170
2282
|
})
|
|
2171
|
-
}).
|
|
2283
|
+
}).meta({
|
|
2284
|
+
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.",
|
|
2285
|
+
id: "AutocompleteField"
|
|
2286
|
+
});
|
|
2172
2287
|
var SearchField = HttpField.extend({
|
|
2173
2288
|
type: import_v43.default.literal(FieldType.SEARCH),
|
|
2174
2289
|
configuration: SearchQuery.pick({
|
|
@@ -2201,6 +2316,9 @@ var SearchField = HttpField.extend({
|
|
|
2201
2316
|
ok: TranslationConfig.optional()
|
|
2202
2317
|
}).optional()
|
|
2203
2318
|
})
|
|
2319
|
+
}).meta({
|
|
2320
|
+
description: "A search input field",
|
|
2321
|
+
id: "SearchField"
|
|
2204
2322
|
});
|
|
2205
2323
|
var LinkButtonField = BaseField.extend({
|
|
2206
2324
|
type: import_v43.default.literal(FieldType.LINK_BUTTON),
|
|
@@ -2209,7 +2327,10 @@ var LinkButtonField = BaseField.extend({
|
|
|
2209
2327
|
text: TranslationConfig.describe("Text to display on the button"),
|
|
2210
2328
|
icon: import_v43.default.string().optional().describe("Icon for the button. You can find icons from OpenCRVS UI-Kit.")
|
|
2211
2329
|
})
|
|
2212
|
-
}).
|
|
2330
|
+
}).meta({
|
|
2331
|
+
description: "A button that opens a URL link",
|
|
2332
|
+
id: "LinkButtonField"
|
|
2333
|
+
});
|
|
2213
2334
|
var VerificationStatus = BaseField.extend({
|
|
2214
2335
|
type: import_v43.default.literal(FieldType.VERIFICATION_STATUS),
|
|
2215
2336
|
defaultValue: VerificationStatusValue.optional(),
|
|
@@ -2219,15 +2340,19 @@ var VerificationStatus = BaseField.extend({
|
|
|
2219
2340
|
"Explaining text on the banner in form."
|
|
2220
2341
|
)
|
|
2221
2342
|
})
|
|
2343
|
+
}).meta({
|
|
2344
|
+
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.",
|
|
2345
|
+
id: "VerificationStatus"
|
|
2222
2346
|
});
|
|
2223
2347
|
var QueryParamReaderField = BaseField.extend({
|
|
2224
2348
|
type: import_v43.default.literal(FieldType.QUERY_PARAM_READER),
|
|
2225
2349
|
configuration: import_v43.default.object({
|
|
2226
2350
|
pickParams: import_v43.default.array(import_v43.default.string()).describe("List of query parameters to read from the URL")
|
|
2227
2351
|
})
|
|
2228
|
-
}).
|
|
2229
|
-
"A field that maps URL query params into form values and clears them afterward"
|
|
2230
|
-
|
|
2352
|
+
}).meta({
|
|
2353
|
+
description: "A field that maps URL query params into form values and clears them afterward",
|
|
2354
|
+
id: "QueryParamReaderField"
|
|
2355
|
+
});
|
|
2231
2356
|
var QrReaderField = BaseField.extend({
|
|
2232
2357
|
type: import_v43.default.literal(FieldType.QR_READER),
|
|
2233
2358
|
defaultValue: QrReaderFieldValue.optional(),
|
|
@@ -2238,7 +2363,7 @@ var QrReaderField = BaseField.extend({
|
|
|
2238
2363
|
})
|
|
2239
2364
|
}).optional()
|
|
2240
2365
|
}).meta({
|
|
2241
|
-
description: "
|
|
2366
|
+
description: "QR code reader field, including optional JSON Schema validator.",
|
|
2242
2367
|
id: "QrReaderField"
|
|
2243
2368
|
});
|
|
2244
2369
|
var IdReaderField = BaseField.extend({
|
|
@@ -2247,12 +2372,18 @@ var IdReaderField = BaseField.extend({
|
|
|
2247
2372
|
methods: import_v43.default.array(
|
|
2248
2373
|
import_v43.default.union([QrReaderField, LinkButtonField]).describe("Methods for reading an ID")
|
|
2249
2374
|
)
|
|
2375
|
+
}).meta({
|
|
2376
|
+
description: "A wrapper around nested form fields, specifically QR_READER and LINK_BUTTON. It can hold the QR_READERs value.",
|
|
2377
|
+
id: "IdReaderField"
|
|
2250
2378
|
});
|
|
2251
2379
|
var CustomField = BaseField.extend({
|
|
2252
2380
|
type: import_v43.default.literal(FieldType._EXPERIMENTAL_CUSTOM),
|
|
2253
2381
|
defaultValue: CustomFieldValue.optional(),
|
|
2254
2382
|
src: import_v43.default.string().describe("Module source path for the custom field component"),
|
|
2255
2383
|
configuration: import_v43.default.unknown().optional()
|
|
2384
|
+
}).meta({
|
|
2385
|
+
description: "An expiremental custom field that is defined by a module source path",
|
|
2386
|
+
id: "CustomField"
|
|
2256
2387
|
});
|
|
2257
2388
|
var FieldStyleVariant = import_v43.default.enum(["default", "highlighted"]);
|
|
2258
2389
|
var LoaderField = BaseField.extend({
|
|
@@ -2262,22 +2393,25 @@ var LoaderField = BaseField.extend({
|
|
|
2262
2393
|
configuration: import_v43.default.object({
|
|
2263
2394
|
text: TranslationConfig.describe("Display text above the loading spinner")
|
|
2264
2395
|
})
|
|
2265
|
-
}).
|
|
2266
|
-
"A non-interactive field that indicates an in progress operation in form"
|
|
2267
|
-
|
|
2396
|
+
}).meta({
|
|
2397
|
+
description: "A non-interactive field that indicates an in progress operation in form",
|
|
2398
|
+
id: "LoaderField"
|
|
2399
|
+
});
|
|
2268
2400
|
var HiddenField = BaseField.extend({
|
|
2269
2401
|
type: import_v43.default.literal(FieldType.ALPHA_HIDDEN),
|
|
2270
2402
|
required: import_v43.default.boolean().default(false).optional(),
|
|
2271
2403
|
defaultValue: TextValue.optional()
|
|
2272
|
-
}).
|
|
2273
|
-
"A non-interactive, hidden field that only hold a value in the form"
|
|
2274
|
-
|
|
2404
|
+
}).meta({
|
|
2405
|
+
description: "A non-interactive, hidden field that only hold a value in the form",
|
|
2406
|
+
id: "HiddenField"
|
|
2407
|
+
});
|
|
2275
2408
|
var UserRoleField = BaseField.extend({
|
|
2276
2409
|
type: import_v43.default.literal(FieldType.USER_ROLE),
|
|
2277
2410
|
defaultValue: TextValue.optional()
|
|
2278
|
-
}).
|
|
2279
|
-
"A select dropdown that is automatically populated with available user roles"
|
|
2280
|
-
|
|
2411
|
+
}).meta({
|
|
2412
|
+
description: "A select dropdown that is automatically populated with available user roles",
|
|
2413
|
+
id: "UserRoleField"
|
|
2414
|
+
});
|
|
2281
2415
|
var FieldConfig = import_v43.default.discriminatedUnion("type", [
|
|
2282
2416
|
FieldGroup,
|
|
2283
2417
|
Address,
|
|
@@ -2376,16 +2510,19 @@ var VerificationPageConfig = FormPageConfig.extend({
|
|
|
2376
2510
|
type: z21.literal(PageTypes.enum.VERIFICATION),
|
|
2377
2511
|
actions: VerificationActionConfig
|
|
2378
2512
|
});
|
|
2379
|
-
var PageConfig = z21.discriminatedUnion("type", [
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2513
|
+
var PageConfig = z21.discriminatedUnion("type", [FormPageConfig, VerificationPageConfig]).meta({
|
|
2514
|
+
id: "PageConfig",
|
|
2515
|
+
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."
|
|
2516
|
+
});
|
|
2383
2517
|
|
|
2384
2518
|
// ../commons/src/events/FormConfig.ts
|
|
2385
2519
|
var DeclarationFormConfig = z22.object({
|
|
2386
2520
|
label: TranslationConfig.describe("Human readable description of the form"),
|
|
2387
2521
|
pages: z22.array(FormPageConfig)
|
|
2388
|
-
}).
|
|
2522
|
+
}).meta({
|
|
2523
|
+
id: "DeclarationFormConfig",
|
|
2524
|
+
description: "Configuration of the declaration form."
|
|
2525
|
+
});
|
|
2389
2526
|
var ActionFormConfig = z22.object({
|
|
2390
2527
|
label: TranslationConfig.describe("Human readable description of the form"),
|
|
2391
2528
|
pages: z22.array(PageConfig)
|
|
@@ -2485,6 +2622,9 @@ var DeduplicationConfig = z23.object({
|
|
|
2485
2622
|
id: z23.string(),
|
|
2486
2623
|
label: TranslationConfig,
|
|
2487
2624
|
query: Clause
|
|
2625
|
+
}).meta({
|
|
2626
|
+
id: "DeduplicationConfig",
|
|
2627
|
+
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."
|
|
2488
2628
|
});
|
|
2489
2629
|
|
|
2490
2630
|
// ../commons/src/events/ActionConfig.ts
|
|
@@ -2602,17 +2742,42 @@ var ActionConfig = z24.discriminatedUnion("type", [
|
|
|
2602
2742
|
* OpenAPI references are defined here so our generated OpenAPI spec knows to reuse the models
|
|
2603
2743
|
* and treat them as "models" instead of duplicating the data structure in each endpoint.
|
|
2604
2744
|
*/
|
|
2605
|
-
ReadActionConfig.meta({
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2745
|
+
ReadActionConfig.meta({
|
|
2746
|
+
id: "ReadActionConfig",
|
|
2747
|
+
description: "Configuration for the read action \u2014 defines the record-tab content displayed on the event overview page."
|
|
2748
|
+
}),
|
|
2749
|
+
DeclareConfig.meta({
|
|
2750
|
+
id: "DeclareActionConfig",
|
|
2751
|
+
description: "Configuration for the declare action. Includes review-page fields. Shared with the notify action (ActionType.NOTIFY)."
|
|
2752
|
+
}),
|
|
2753
|
+
RejectConfig.meta({
|
|
2754
|
+
id: "RejectActionConfig",
|
|
2755
|
+
description: "Configuration for rejecting a record before registration."
|
|
2756
|
+
}),
|
|
2757
|
+
RegisterConfig.meta({
|
|
2758
|
+
id: "RegisterActionConfig",
|
|
2759
|
+
description: "Configuration for registering a record."
|
|
2760
|
+
}),
|
|
2609
2761
|
PrintCertificateActionConfig.meta({
|
|
2610
|
-
id: "PrintCertificateActionConfig"
|
|
2762
|
+
id: "PrintCertificateActionConfig",
|
|
2763
|
+
description: "Configuration for printing a certificate of a registered record."
|
|
2764
|
+
}),
|
|
2765
|
+
RequestCorrectionConfig.meta({
|
|
2766
|
+
id: "RequestCorrectionActionConfig",
|
|
2767
|
+
description: "Configuration for requesting a correction on a registered record."
|
|
2768
|
+
}),
|
|
2769
|
+
EditActionConfig.meta({
|
|
2770
|
+
id: "EditActionConfig",
|
|
2771
|
+
description: "Configuration for editing a record before registration."
|
|
2772
|
+
}),
|
|
2773
|
+
ArchiveConfig.meta({
|
|
2774
|
+
id: "ArchiveActionConfig",
|
|
2775
|
+
description: "Configuration for archiving a record."
|
|
2611
2776
|
}),
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2777
|
+
CustomActionConfig.meta({
|
|
2778
|
+
id: "CustomActionConfig",
|
|
2779
|
+
description: "Configuration for a country-defined custom action. An event may include any number of these."
|
|
2780
|
+
})
|
|
2616
2781
|
]).describe(
|
|
2617
2782
|
"Configuration of an action available for an event. Data collected depends on the action type and is accessible through the annotation property in ActionDocument."
|
|
2618
2783
|
).meta({ id: "ActionConfig" });
|
|
@@ -2688,7 +2853,10 @@ var Field = BaseField2.extend({
|
|
|
2688
2853
|
}).describe("Custom field defined for the summary view.");
|
|
2689
2854
|
var SummaryConfig = z27.object({
|
|
2690
2855
|
fields: z27.array(z27.union([Field, ReferenceField])).describe("Fields displayed in the event summary view.")
|
|
2691
|
-
}).
|
|
2856
|
+
}).meta({
|
|
2857
|
+
id: "SummaryConfig",
|
|
2858
|
+
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."
|
|
2859
|
+
});
|
|
2692
2860
|
|
|
2693
2861
|
// ../commons/src/events/AdvancedSearchConfig.ts
|
|
2694
2862
|
var z28 = __toESM(require("zod/v4"));
|
|
@@ -2812,6 +2980,9 @@ var AdvancedSearchField = z28.discriminatedUnion("fieldType", [FieldConfigSchema
|
|
|
2812
2980
|
var AdvancedSearchConfig = z28.object({
|
|
2813
2981
|
title: TranslationConfig.describe("Advanced search tab title"),
|
|
2814
2982
|
fields: z28.array(AdvancedSearchField).describe("Advanced search fields within the tab.")
|
|
2983
|
+
}).meta({
|
|
2984
|
+
id: "AdvancedSearchConfig",
|
|
2985
|
+
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()`)."
|
|
2815
2986
|
});
|
|
2816
2987
|
|
|
2817
2988
|
// ../commons/src/events/utils.ts
|
|
@@ -3679,7 +3850,7 @@ var _EventConfigBase = z33.object({
|
|
|
3679
3850
|
),
|
|
3680
3851
|
label: TranslationConfig.describe("Human-readable label for the event type."),
|
|
3681
3852
|
actions: z33.array(ActionConfig).describe(
|
|
3682
|
-
"Configuration of
|
|
3853
|
+
"Configuration of core and custom actions associated with the event."
|
|
3683
3854
|
),
|
|
3684
3855
|
actionOrder: z33.array(z33.string()).optional().describe(
|
|
3685
3856
|
"Order of actions in the action menu. Use either the action type for core actions or the customActionType for custom actions."
|
|
@@ -3691,7 +3862,7 @@ var _EventConfigBase = z33.object({
|
|
|
3691
3862
|
"Configuration of fields available in the advanced search feature."
|
|
3692
3863
|
),
|
|
3693
3864
|
flags: z33.array(FlagConfig).optional().default([]).describe(
|
|
3694
|
-
"Configuration of flags associated with the actions of this event type."
|
|
3865
|
+
"Configuration of custom flags associated with the actions of this event type."
|
|
3695
3866
|
),
|
|
3696
3867
|
analytics: z33.boolean().optional().default(true).describe(
|
|
3697
3868
|
"Indicates whether the records of this event type are included in analytics"
|
|
@@ -3704,8 +3875,9 @@ var EventConfig = _EventConfigBase.superRefine((event2, ctx) => {
|
|
|
3704
3875
|
validateActionFlags(event2, ctx);
|
|
3705
3876
|
validateActionOrder(event2, ctx);
|
|
3706
3877
|
}).meta({
|
|
3707
|
-
id: "EventConfig"
|
|
3708
|
-
|
|
3878
|
+
id: "EventConfig",
|
|
3879
|
+
description: "Configuration defining an event type registered in OpenCRVS (for example birth or death)."
|
|
3880
|
+
});
|
|
3709
3881
|
|
|
3710
3882
|
// ../commons/src/events/EventConfigInput.ts
|
|
3711
3883
|
var defineDeclarationForm = (form) => DeclarationFormConfig.parse(form);
|
|
@@ -3927,6 +4099,9 @@ var WorkqueueColumnValue = z34.object({
|
|
|
3927
4099
|
var WorkqueueColumn = z34.object({
|
|
3928
4100
|
label: TranslationConfig,
|
|
3929
4101
|
value: WorkqueueColumnValue
|
|
4102
|
+
}).meta({
|
|
4103
|
+
id: "WorkqueueColumn",
|
|
4104
|
+
description: "Configuration for a single workqueue column. The value references an event metadata key (e.g. `dateOfEvent`, `status`, `trackingId`)."
|
|
3930
4105
|
});
|
|
3931
4106
|
function defineWorkqueuesColumns(workqueueColumns) {
|
|
3932
4107
|
return workqueueColumns.map(
|
|
@@ -4129,18 +4304,11 @@ var WorkqueueConfigWithoutQuery = WorkqueueConfig.omit({
|
|
|
4129
4304
|
query: true,
|
|
4130
4305
|
columns: true
|
|
4131
4306
|
});
|
|
4132
|
-
var WorkqueueConfigInput =
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
query: CountryConfigQueryInputType,
|
|
4138
|
-
action: z37.object({ type: WorkqueueActionType }).optional().describe(
|
|
4139
|
-
"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."
|
|
4140
|
-
),
|
|
4141
|
-
columns: z37.array(WorkqueueColumn).default(mandatoryColumns),
|
|
4142
|
-
icon: AvailableIcons,
|
|
4143
|
-
emptyMessage: TranslationConfig.optional()
|
|
4307
|
+
var WorkqueueConfigInput = WorkqueueConfig.extend({
|
|
4308
|
+
query: CountryConfigQueryInputType
|
|
4309
|
+
}).meta({
|
|
4310
|
+
id: "WorkqueueConfig",
|
|
4311
|
+
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."
|
|
4144
4312
|
});
|
|
4145
4313
|
var WorkqueueCountInput = z37.array(
|
|
4146
4314
|
z37.object({ slug: z37.string(), query: QueryType })
|
|
@@ -4180,6 +4348,11 @@ var BaseActionInput = z38.object({
|
|
|
4180
4348
|
originalActionId: UUID.optional(),
|
|
4181
4349
|
// should not be part of base action.
|
|
4182
4350
|
keepAssignment: z38.boolean().optional(),
|
|
4351
|
+
keepAssignmentIfAccepted: z38.boolean().optional(),
|
|
4352
|
+
keepAssignmentIfRejected: z38.boolean().optional(),
|
|
4353
|
+
waitFor: z38.boolean().default(true).describe(
|
|
4354
|
+
"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."
|
|
4355
|
+
),
|
|
4183
4356
|
// For normal users, the createdAtLocation is resolved on the backend from the user's primaryOfficeId.
|
|
4184
4357
|
// @TODO: createdAtLocation should be limited to actions that system users can perform. For normal users, it should not be part of the base action.
|
|
4185
4358
|
createdAtLocation: UUID.nullish().describe(
|
|
@@ -4297,7 +4470,8 @@ var RejectCorrectionActionInput = BaseActionInput.extend(
|
|
|
4297
4470
|
var ApproveCorrectionActionInput = BaseActionInput.extend(
|
|
4298
4471
|
z38.object({
|
|
4299
4472
|
requestId: z38.string(),
|
|
4300
|
-
type: z38.literal(ActionType.APPROVE_CORRECTION).default(ActionType.APPROVE_CORRECTION)
|
|
4473
|
+
type: z38.literal(ActionType.APPROVE_CORRECTION).default(ActionType.APPROVE_CORRECTION),
|
|
4474
|
+
content: z38.object({ immediateCorrection: z38.boolean().optional() }).optional()
|
|
4301
4475
|
}).shape
|
|
4302
4476
|
);
|
|
4303
4477
|
var ReadActionInput = BaseActionInput.extend(
|
|
@@ -4359,7 +4533,7 @@ var Draft = z39.object({
|
|
|
4359
4533
|
}).describe(
|
|
4360
4534
|
"A temporary storage for an action. Stored with details of the event, creator and creation time."
|
|
4361
4535
|
);
|
|
4362
|
-
var DraftInput = BaseActionInput.extend({
|
|
4536
|
+
var DraftInput = BaseActionInput.omit({ waitFor: true }).extend({
|
|
4363
4537
|
type: ActionTypes.exclude([ActionTypes.enum.DELETE]),
|
|
4364
4538
|
status: z39.enum([
|
|
4365
4539
|
ActionStatus.Requested,
|
|
@@ -6957,6 +7131,369 @@ var ACTION_FILTERS = {
|
|
|
6957
7131
|
// ../commons/src/events/FileUtils.ts
|
|
6958
7132
|
var import_lodash7 = require("lodash");
|
|
6959
7133
|
|
|
7134
|
+
// ../commons/src/events/mocks.test.utils.ts
|
|
7135
|
+
var V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS = [
|
|
7136
|
+
{
|
|
7137
|
+
id: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7138
|
+
name: "Central",
|
|
7139
|
+
parentId: null,
|
|
7140
|
+
validUntil: null,
|
|
7141
|
+
externalId: "ydyJb1RAy4U1"
|
|
7142
|
+
},
|
|
7143
|
+
{
|
|
7144
|
+
id: "c599b691-fd2d-45e1-abf4-d185de727fb5",
|
|
7145
|
+
name: "Sulaka",
|
|
7146
|
+
parentId: null,
|
|
7147
|
+
validUntil: null,
|
|
7148
|
+
externalId: "pQ8nGxWmZ2Q3"
|
|
7149
|
+
},
|
|
7150
|
+
{
|
|
7151
|
+
id: "7ef2b9c7-5e6d-49f6-ae05-656207d0fc64",
|
|
7152
|
+
name: "Pualula",
|
|
7153
|
+
parentId: null,
|
|
7154
|
+
validUntil: null,
|
|
7155
|
+
externalId: "Aq91DweLmT8k"
|
|
7156
|
+
},
|
|
7157
|
+
{
|
|
7158
|
+
id: "6d1a59df-988c-4021-a846-ccbc021931a7",
|
|
7159
|
+
name: "Chuminga",
|
|
7160
|
+
parentId: null,
|
|
7161
|
+
validUntil: null,
|
|
7162
|
+
externalId: "Rw0fYNh2Xk9a"
|
|
7163
|
+
},
|
|
7164
|
+
{
|
|
7165
|
+
id: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7166
|
+
name: "Ibombo",
|
|
7167
|
+
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7168
|
+
validUntil: null,
|
|
7169
|
+
externalId: "k7DsP4vbN1Qe"
|
|
7170
|
+
},
|
|
7171
|
+
{
|
|
7172
|
+
id: "27160bbd-32d1-4625-812f-860226bfb92a",
|
|
7173
|
+
name: "Isango",
|
|
7174
|
+
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7175
|
+
validUntil: null,
|
|
7176
|
+
externalId: "Gm3Z9eQpHw4L"
|
|
7177
|
+
},
|
|
7178
|
+
{
|
|
7179
|
+
id: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7180
|
+
name: "Isamba",
|
|
7181
|
+
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7182
|
+
validUntil: null,
|
|
7183
|
+
externalId: "sT0xVu1KqJ7r"
|
|
7184
|
+
},
|
|
7185
|
+
{
|
|
7186
|
+
id: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7187
|
+
name: "Itambo",
|
|
7188
|
+
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7189
|
+
validUntil: null,
|
|
7190
|
+
externalId: "Nq6Bv2HpL9Te"
|
|
7191
|
+
},
|
|
7192
|
+
{
|
|
7193
|
+
id: "d42ab2fe-e7ed-470e-8b31-4fb27f9b8250",
|
|
7194
|
+
name: "Ezhi",
|
|
7195
|
+
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7196
|
+
validUntil: null,
|
|
7197
|
+
externalId: "xK8cQ0ZRy5Wd"
|
|
7198
|
+
},
|
|
7199
|
+
{
|
|
7200
|
+
id: "8fbd09d2-212b-47f4-beb3-5e1694931d9f",
|
|
7201
|
+
name: "Ilanga",
|
|
7202
|
+
parentId: "c599b691-fd2d-45e1-abf4-d185de727fb5",
|
|
7203
|
+
validUntil: null,
|
|
7204
|
+
externalId: "Cq4Jm1XvN8Ls"
|
|
7205
|
+
},
|
|
7206
|
+
// Villages under Ibombo (62a0ccb4-880d-4f30-8882-f256007dfff9)
|
|
7207
|
+
{
|
|
7208
|
+
id: "1d4e5f6a-7b8c-4912-8efa-345678901234",
|
|
7209
|
+
name: "Klow",
|
|
7210
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7211
|
+
validUntil: null,
|
|
7212
|
+
externalId: "IkYcYBUcyY2"
|
|
7213
|
+
},
|
|
7214
|
+
{
|
|
7215
|
+
id: "2e5f6a7b-8c9d-4a23-8fab-456789012345",
|
|
7216
|
+
name: "Mbondo",
|
|
7217
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7218
|
+
validUntil: null,
|
|
7219
|
+
externalId: "Qhvv5hvo3mY"
|
|
7220
|
+
},
|
|
7221
|
+
{
|
|
7222
|
+
id: "3f6a7b8c-9d0e-4b34-8abc-567890123456",
|
|
7223
|
+
name: "Ndara",
|
|
7224
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7225
|
+
validUntil: null,
|
|
7226
|
+
externalId: "crXh068O9TR"
|
|
7227
|
+
},
|
|
7228
|
+
{
|
|
7229
|
+
id: "4a7b8c9d-0e1f-4c45-abcd-678901234567",
|
|
7230
|
+
name: "Olani",
|
|
7231
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7232
|
+
validUntil: null,
|
|
7233
|
+
externalId: "r00It8Tvvp7"
|
|
7234
|
+
},
|
|
7235
|
+
{
|
|
7236
|
+
id: "5b8c9d0e-1f2a-4d56-bcde-789012345678",
|
|
7237
|
+
name: "Pemba",
|
|
7238
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7239
|
+
validUntil: null,
|
|
7240
|
+
externalId: "ZnUWsbONIaH"
|
|
7241
|
+
},
|
|
7242
|
+
{
|
|
7243
|
+
id: "6c9d0e1f-2a3b-4e67-8def-890123456789",
|
|
7244
|
+
name: "Quanza",
|
|
7245
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7246
|
+
validUntil: null,
|
|
7247
|
+
externalId: "fDZycvQTa7l"
|
|
7248
|
+
},
|
|
7249
|
+
{
|
|
7250
|
+
id: "7d0e1f2a-3b4c-4f78-8efa-901234567890",
|
|
7251
|
+
name: "Rivka",
|
|
7252
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7253
|
+
validUntil: null,
|
|
7254
|
+
externalId: "KqswxCGTELa"
|
|
7255
|
+
},
|
|
7256
|
+
// Villages under Isamba (967032fd-3f81-478a-826c-30cb8fe121bd)
|
|
7257
|
+
{
|
|
7258
|
+
id: "8e1f2a3b-4c5d-4089-8fab-012345678901",
|
|
7259
|
+
name: "Mbula",
|
|
7260
|
+
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7261
|
+
validUntil: null,
|
|
7262
|
+
externalId: "osEbKjRc9Kg"
|
|
7263
|
+
},
|
|
7264
|
+
{
|
|
7265
|
+
id: "9f2a3b4c-5d6e-4190-8abf-123456789012",
|
|
7266
|
+
name: "Ndoki",
|
|
7267
|
+
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7268
|
+
validUntil: null,
|
|
7269
|
+
externalId: "aq4daBUAGr3"
|
|
7270
|
+
},
|
|
7271
|
+
{
|
|
7272
|
+
id: "0a3b4c5d-6e7f-4201-abcd-234567890123",
|
|
7273
|
+
name: "Tsanga",
|
|
7274
|
+
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7275
|
+
validUntil: null,
|
|
7276
|
+
externalId: "cqis6Y8trbJ"
|
|
7277
|
+
},
|
|
7278
|
+
{
|
|
7279
|
+
id: "1b4c5d6e-7f8a-4312-bcde-345678901234",
|
|
7280
|
+
name: "Waziri",
|
|
7281
|
+
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7282
|
+
validUntil: null,
|
|
7283
|
+
externalId: "LMijHPyyx6d"
|
|
7284
|
+
},
|
|
7285
|
+
{
|
|
7286
|
+
id: "2c5d6e7f-8a9b-4423-8def-456789012345",
|
|
7287
|
+
name: "Zimbi",
|
|
7288
|
+
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7289
|
+
validUntil: null,
|
|
7290
|
+
externalId: "pcQYbPuKGZ7"
|
|
7291
|
+
},
|
|
7292
|
+
// Villages under Itambo (89a33893-b17d-481d-a26d-6461e7ac1651)
|
|
7293
|
+
{
|
|
7294
|
+
id: "3d6e7f8a-9b0c-4534-8efa-567890123456",
|
|
7295
|
+
name: "Felani",
|
|
7296
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7297
|
+
validUntil: null,
|
|
7298
|
+
externalId: "gSqpoCGdMXp"
|
|
7299
|
+
},
|
|
7300
|
+
{
|
|
7301
|
+
id: "4e7f8a9b-0c1d-4645-8fab-678901234567",
|
|
7302
|
+
name: "Goroma",
|
|
7303
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7304
|
+
validUntil: null,
|
|
7305
|
+
externalId: "KvAAIaNqVrp"
|
|
7306
|
+
},
|
|
7307
|
+
{
|
|
7308
|
+
id: "5f8a9b0c-1d2e-4756-8abc-789012345678",
|
|
7309
|
+
name: "Halifu",
|
|
7310
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7311
|
+
validUntil: null,
|
|
7312
|
+
externalId: "qe4UnEVt1hv"
|
|
7313
|
+
},
|
|
7314
|
+
{
|
|
7315
|
+
id: "6a9b0c1d-2e3f-4867-abcd-890123456789",
|
|
7316
|
+
name: "Jabari",
|
|
7317
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7318
|
+
validUntil: null,
|
|
7319
|
+
externalId: "yHH9Nz4rLOt"
|
|
7320
|
+
},
|
|
7321
|
+
{
|
|
7322
|
+
id: "7b0c1d2e-3f4a-4978-bcde-901234567890",
|
|
7323
|
+
name: "Kifani",
|
|
7324
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7325
|
+
validUntil: null,
|
|
7326
|
+
externalId: "eSWmXIGeu1I"
|
|
7327
|
+
},
|
|
7328
|
+
{
|
|
7329
|
+
id: "8c1d2e3f-4a5b-4089-8def-012345678901",
|
|
7330
|
+
name: "Lumela",
|
|
7331
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7332
|
+
validUntil: null,
|
|
7333
|
+
externalId: "bh0b3aI1uP3"
|
|
7334
|
+
}
|
|
7335
|
+
];
|
|
7336
|
+
var V2_DEFAULT_MOCK_LOCATIONS = [
|
|
7337
|
+
{
|
|
7338
|
+
id: "6f6186ce-cd5f-4a5f-810a-2d99e7c4ba12",
|
|
7339
|
+
name: "Central Provincial Office",
|
|
7340
|
+
locationType: "CRVS_OFFICE",
|
|
7341
|
+
administrativeAreaId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7342
|
+
validUntil: null,
|
|
7343
|
+
externalId: "Xr3Df8WpK6Ys"
|
|
7344
|
+
},
|
|
7345
|
+
{
|
|
7346
|
+
id: "b1c2d3e4-f5a6-7890-bcde-f12345678901",
|
|
7347
|
+
name: "Central Health Post",
|
|
7348
|
+
locationType: "HEALTH_FACILITY",
|
|
7349
|
+
administrativeAreaId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7350
|
+
validUntil: null
|
|
7351
|
+
},
|
|
7352
|
+
{
|
|
7353
|
+
id: "028d2c85-ca31-426d-b5d1-2cef545a4902",
|
|
7354
|
+
name: "Ibombo District Office",
|
|
7355
|
+
locationType: "CRVS_OFFICE",
|
|
7356
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7357
|
+
validUntil: null,
|
|
7358
|
+
externalId: "Sm4Nw7GrD2Vy"
|
|
7359
|
+
},
|
|
7360
|
+
{
|
|
7361
|
+
id: "62a0ccb4-4f30-4f30-8882-f256007dff9f",
|
|
7362
|
+
name: "Isamba District Office",
|
|
7363
|
+
locationType: "CRVS_OFFICE",
|
|
7364
|
+
administrativeAreaId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7365
|
+
validUntil: null,
|
|
7366
|
+
externalId: "Vg1Bq5XeH9Lt"
|
|
7367
|
+
},
|
|
7368
|
+
{
|
|
7369
|
+
id: "954c93e1-13f7-4435-bb82-35e0e215e07d",
|
|
7370
|
+
name: "Isango District Office",
|
|
7371
|
+
locationType: "CRVS_OFFICE",
|
|
7372
|
+
administrativeAreaId: "27160bbd-32d1-4625-812f-860226bfb92a",
|
|
7373
|
+
validUntil: null,
|
|
7374
|
+
externalId: "Je7Lm2XqN9Vz"
|
|
7375
|
+
},
|
|
7376
|
+
{
|
|
7377
|
+
id: "2884f5b9-17b4-49ce-bf4d-f538228935df",
|
|
7378
|
+
name: "Sulaka Provincial Office",
|
|
7379
|
+
locationType: "CRVS_OFFICE",
|
|
7380
|
+
administrativeAreaId: "c599b691-fd2d-45e1-abf4-d185de727fb5",
|
|
7381
|
+
validUntil: null,
|
|
7382
|
+
externalId: "Ht2Wp9KcX5Qv"
|
|
7383
|
+
},
|
|
7384
|
+
{
|
|
7385
|
+
id: "030358c6-54af-44be-821b-8e4af963a49c",
|
|
7386
|
+
name: "Ilanga District Office",
|
|
7387
|
+
locationType: "CRVS_OFFICE",
|
|
7388
|
+
administrativeAreaId: "8fbd09d2-212b-47f4-beb3-5e1694931d9f",
|
|
7389
|
+
validUntil: null,
|
|
7390
|
+
externalId: "Yp6Ds1WqN3Xz"
|
|
7391
|
+
},
|
|
7392
|
+
{
|
|
7393
|
+
id: "423d000f-101b-47c0-8b86-21a908067cee",
|
|
7394
|
+
name: "Chamakubi Health Post",
|
|
7395
|
+
locationType: "HEALTH_FACILITY",
|
|
7396
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7397
|
+
validUntil: null,
|
|
7398
|
+
externalId: "M1nFr8LbC2Qy"
|
|
7399
|
+
},
|
|
7400
|
+
{
|
|
7401
|
+
id: "4d3279be-d026-420c-88f7-f0a4ae986973",
|
|
7402
|
+
name: "Ibombo Rural Health Centre",
|
|
7403
|
+
locationType: "HEALTH_FACILITY",
|
|
7404
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7405
|
+
validUntil: null,
|
|
7406
|
+
externalId: "bT7pV6YrW0Xc"
|
|
7407
|
+
},
|
|
7408
|
+
{
|
|
7409
|
+
id: "190902f4-1d77-476a-8947-41145af1db7d",
|
|
7410
|
+
name: "Chikobo Rural Health Centre",
|
|
7411
|
+
locationType: "HEALTH_FACILITY",
|
|
7412
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7413
|
+
validUntil: null,
|
|
7414
|
+
externalId: "zE4qPn2SgJ5d"
|
|
7415
|
+
},
|
|
7416
|
+
{
|
|
7417
|
+
id: "f5ecbd9b-a01e-4a65-910e-70e86ab41b71",
|
|
7418
|
+
name: "Chilochabalenje Health Post",
|
|
7419
|
+
locationType: "HEALTH_FACILITY",
|
|
7420
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7421
|
+
validUntil: null,
|
|
7422
|
+
externalId: "H8vDs1MqR4Uf"
|
|
7423
|
+
},
|
|
7424
|
+
{
|
|
7425
|
+
id: "dbfc178f-7295-4b90-b28d-111c95b03127",
|
|
7426
|
+
name: "Chipeso Rural Health Centre",
|
|
7427
|
+
locationType: "HEALTH_FACILITY",
|
|
7428
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7429
|
+
validUntil: null,
|
|
7430
|
+
externalId: "Qw3uZ9KfX6Lm"
|
|
7431
|
+
},
|
|
7432
|
+
{
|
|
7433
|
+
id: "09862bfe-c7ac-46cd-987b-668681533c80",
|
|
7434
|
+
name: "Chisamba Rural Health Centre",
|
|
7435
|
+
locationType: "HEALTH_FACILITY",
|
|
7436
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7437
|
+
validUntil: null,
|
|
7438
|
+
externalId: "Yr0pCg8LdM2s"
|
|
7439
|
+
},
|
|
7440
|
+
{
|
|
7441
|
+
id: "834ce389-e95b-4fb0-96a0-33e9ab323059",
|
|
7442
|
+
name: "Chitanda Rural Health Centre",
|
|
7443
|
+
locationType: "HEALTH_FACILITY",
|
|
7444
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7445
|
+
validUntil: null,
|
|
7446
|
+
externalId: "tS9gJ4PwB1Qx"
|
|
7447
|
+
},
|
|
7448
|
+
{
|
|
7449
|
+
id: "0431c433-6062-4a4c-aee9-25271aec61ee",
|
|
7450
|
+
name: "Golden Valley Rural Health Centre",
|
|
7451
|
+
locationType: "HEALTH_FACILITY",
|
|
7452
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7453
|
+
validUntil: null,
|
|
7454
|
+
externalId: "Ld7Qm3XsA8Vr"
|
|
7455
|
+
},
|
|
7456
|
+
{
|
|
7457
|
+
id: "bc84d0b6-7ba7-480d-a339-5d9920d90eb2",
|
|
7458
|
+
name: "Ipongo Rural Health Centre",
|
|
7459
|
+
locationType: "HEALTH_FACILITY",
|
|
7460
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7461
|
+
validUntil: null,
|
|
7462
|
+
externalId: "kF2sW9DmH0Bt"
|
|
7463
|
+
},
|
|
7464
|
+
{
|
|
7465
|
+
id: "4cf1f53b-b730-41d2-8649-dff7eeed970d",
|
|
7466
|
+
name: "Itumbwe Health Post",
|
|
7467
|
+
locationType: "HEALTH_FACILITY",
|
|
7468
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7469
|
+
validUntil: null,
|
|
7470
|
+
externalId: "Ue5Xb3VaC7Pq"
|
|
7471
|
+
},
|
|
7472
|
+
{
|
|
7473
|
+
id: "4b3676cb-9355-4942-9eb9-2ce46acaf0e0",
|
|
7474
|
+
name: "Kabangalala Rural Health Centre",
|
|
7475
|
+
locationType: "HEALTH_FACILITY",
|
|
7476
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7477
|
+
validUntil: null,
|
|
7478
|
+
externalId: "Pz8Kc1TqH6Jn"
|
|
7479
|
+
},
|
|
7480
|
+
// Village offices
|
|
7481
|
+
{
|
|
7482
|
+
id: "1f4a5b6c-7d8e-4312-8abc-345678901234",
|
|
7483
|
+
name: "Klow Village Office",
|
|
7484
|
+
locationType: "CRVS_OFFICE",
|
|
7485
|
+
administrativeAreaId: "1d4e5f6a-7b8c-4912-8efa-345678901234",
|
|
7486
|
+
validUntil: null,
|
|
7487
|
+
externalId: "PmAyxAJkxiJ"
|
|
7488
|
+
}
|
|
7489
|
+
];
|
|
7490
|
+
var V2_DEFAULT_MOCK_LOCATIONS_MAP = new Map(
|
|
7491
|
+
V2_DEFAULT_MOCK_LOCATIONS.map((l) => [l.id, l])
|
|
7492
|
+
);
|
|
7493
|
+
var V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS_MAP = new Map(
|
|
7494
|
+
V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS.map((a) => [a.id, a])
|
|
7495
|
+
);
|
|
7496
|
+
|
|
6960
7497
|
// ../commons/src/notification/UserNotifications.ts
|
|
6961
7498
|
var z44 = __toESM(require("zod/v4"));
|
|
6962
7499
|
var TriggerEvent = {
|