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