@opencrvs/toolkit 2.0.0-rc.9fb7bf7 → 2.0.0-rc.a0fc425
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/create-countryconfig/index.js +50 -20
- package/create-countryconfig/package.json +12 -2
- package/dist/application-config/index.js +262 -117
- package/dist/cli.js +206 -36
- package/dist/commons/api/router.d.ts +3311 -246
- package/dist/commons/application-config/index.d.ts +1 -0
- package/dist/commons/conditionals/conditionals.d.ts +354 -4
- package/dist/commons/conditionals/validate.d.ts +52 -2
- 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 +377 -50
- package/dist/commons/events/FieldValue.d.ts +6 -0
- package/dist/commons/events/WorkqueueConfig.d.ts +150 -150
- package/dist/commons/events/field.d.ts +47 -1
- package/dist/commons/events/index.d.ts +2 -0
- package/dist/commons/events/state/flags.d.ts +16 -0
- package/dist/commons/events/state/index.d.ts +0 -4
- package/dist/commons/events/state/utils.d.ts +0 -2
- package/dist/commons/events/utils.d.ts +2 -2
- package/dist/conditionals/index.js +55 -2
- package/dist/events/index.js +916 -246
- package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts +3 -0
- package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts.map +1 -0
- package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.js +110 -0
- package/dist/migrations/v2.0/index.d.ts.map +1 -1
- package/dist/migrations/v2.0/index.js +204 -34
- package/dist/migrations/v2.0/migrate-scopes.d.ts.map +1 -1
- package/dist/migrations/v2.0/migrate-scopes.js +54 -30
- package/dist/notification/index.js +797 -151
- package/dist/scopes/index.js +3 -1
- package/opencrvs-toolkit-2.0.0-rc.a0fc425.tgz +0 -0
- package/package.json +6 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/opencrvs-toolkit-2.0.0-rc.9fb7bf7.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
|
|
@@ -912,6 +917,7 @@ var DateRangeFieldValue = z12.object({
|
|
|
912
917
|
var EmailValue = z12.email();
|
|
913
918
|
var CheckboxFieldValue = z12.boolean();
|
|
914
919
|
var NumberFieldValue = z12.number();
|
|
920
|
+
var SignatureFieldValue = FileFieldValue;
|
|
915
921
|
var ButtonFieldValue = z12.number();
|
|
916
922
|
var VerificationStatusValue = z12.enum([
|
|
917
923
|
"verified",
|
|
@@ -980,28 +986,20 @@ function schemaPriority(schema) {
|
|
|
980
986
|
return idx === -1 ? 9999 : idx;
|
|
981
987
|
}
|
|
982
988
|
function safeUnion(schemas) {
|
|
989
|
+
const sortedSchemas = [...schemas].sort(
|
|
990
|
+
(a, b) => schemaPriority(a) - schemaPriority(b)
|
|
991
|
+
);
|
|
983
992
|
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
|
-
});
|
|
993
|
+
for (const schema of sortedSchemas) {
|
|
994
|
+
if (schema.safeParse(val).success) {
|
|
995
|
+
return;
|
|
996
|
+
}
|
|
1004
997
|
}
|
|
998
|
+
ctx.addIssue({
|
|
999
|
+
code: "invalid_type",
|
|
1000
|
+
expected: "custom",
|
|
1001
|
+
message: "Value does not match any schema"
|
|
1002
|
+
});
|
|
1005
1003
|
}).meta({
|
|
1006
1004
|
description: "Value that matches exactly one of the possible schema types (TextValue, DateValue, DateRangeFieldValue). The best matching schema is chosen by priority."
|
|
1007
1005
|
});
|
|
@@ -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,31 @@ 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
|
+
),
|
|
1670
|
+
$$code: import_v43.default.string().optional().describe(
|
|
1671
|
+
"Serialised client-side function body. When present the expression is evaluated rather than dereferenced."
|
|
1669
1672
|
)
|
|
1670
|
-
}).describe(
|
|
1673
|
+
}).describe(
|
|
1674
|
+
"Reference to a field value, with an optional client-side computation applied."
|
|
1675
|
+
);
|
|
1676
|
+
var ComputedDefaultValue = import_v43.default.object({
|
|
1677
|
+
$$code: import_v43.default.string().describe(
|
|
1678
|
+
"Serialised client-side function body. Receives (undefined, context) where context includes $now, $online, and system variables."
|
|
1679
|
+
)
|
|
1680
|
+
}).describe("A context-only computation used as a field default value.");
|
|
1671
1681
|
var ValidationConfig = import_v43.default.object({
|
|
1672
|
-
validator: Conditional
|
|
1673
|
-
|
|
1682
|
+
validator: Conditional.describe(
|
|
1683
|
+
"Conditional expression that must hold for the field value to be considered valid."
|
|
1684
|
+
),
|
|
1685
|
+
message: TranslationConfig.describe(
|
|
1686
|
+
"Error message displayed when the validator does not hold."
|
|
1687
|
+
)
|
|
1688
|
+
}).meta({
|
|
1689
|
+
id: "ValidationConfig",
|
|
1690
|
+
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
1691
|
});
|
|
1675
1692
|
var requiredSchema = import_v43.default.union([
|
|
1676
1693
|
import_v43.default.boolean(),
|
|
@@ -1701,7 +1718,7 @@ var BaseField = import_v43.default.object({
|
|
|
1701
1718
|
"Indicates whether the field can be modified during record correction."
|
|
1702
1719
|
),
|
|
1703
1720
|
value: FieldReference.or(import_v43.default.array(FieldReference)).optional().describe(
|
|
1704
|
-
"Reference to the source field or fields. When a value is defined, it is copied from the parent field when changed. If multiple references are provided, the first truthy value is used."
|
|
1721
|
+
"Reference to the source field or fields. When a value is defined, it is copied from the parent field when changed. If multiple references are provided, the first truthy value is used. A FieldReference with $$code computes the value via a custom client-side function."
|
|
1705
1722
|
),
|
|
1706
1723
|
analytics: import_v43.default.boolean().default(false).optional().describe(
|
|
1707
1724
|
"Indicates whether the field is included in analytics. When enabled, its value becomes available in the analytics dashboard."
|
|
@@ -1709,30 +1726,39 @@ var BaseField = import_v43.default.object({
|
|
|
1709
1726
|
}).describe("Common properties shared across all field types.");
|
|
1710
1727
|
var Divider = BaseField.extend({
|
|
1711
1728
|
type: import_v43.default.literal(FieldType.DIVIDER)
|
|
1729
|
+
}).meta({
|
|
1730
|
+
description: "A horizontal line divider",
|
|
1731
|
+
id: "Divider"
|
|
1712
1732
|
});
|
|
1713
1733
|
var TextField = BaseField.extend({
|
|
1714
1734
|
type: import_v43.default.literal(FieldType.TEXT),
|
|
1715
|
-
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
|
|
1735
|
+
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField, ComputedDefaultValue]).optional(),
|
|
1716
1736
|
configuration: import_v43.default.object({
|
|
1717
1737
|
maxLength: import_v43.default.number().optional().describe("Maximum length of the text"),
|
|
1718
1738
|
type: import_v43.default.enum(["text", "password"]).optional(),
|
|
1719
1739
|
prefix: TranslationConfig.optional(),
|
|
1720
1740
|
postfix: TranslationConfig.optional()
|
|
1721
1741
|
}).default({ type: "text" }).optional()
|
|
1722
|
-
}).
|
|
1742
|
+
}).meta({
|
|
1743
|
+
description: "A text input field",
|
|
1744
|
+
id: "TextField"
|
|
1745
|
+
});
|
|
1723
1746
|
var NumberField = BaseField.extend({
|
|
1724
1747
|
type: import_v43.default.literal(FieldType.NUMBER),
|
|
1725
|
-
defaultValue: NumberFieldValue.optional(),
|
|
1748
|
+
defaultValue: NumberFieldValue.or(ComputedDefaultValue).optional(),
|
|
1726
1749
|
configuration: import_v43.default.object({
|
|
1727
1750
|
min: import_v43.default.number().optional().describe("Minimum value"),
|
|
1728
1751
|
max: import_v43.default.number().optional().describe("Maximum value"),
|
|
1729
1752
|
prefix: TranslationConfig.optional(),
|
|
1730
1753
|
postfix: TranslationConfig.optional()
|
|
1731
1754
|
}).optional()
|
|
1732
|
-
}).
|
|
1755
|
+
}).meta({
|
|
1756
|
+
description: "A number input field",
|
|
1757
|
+
id: "NumberField"
|
|
1758
|
+
});
|
|
1733
1759
|
var TextAreaField = BaseField.extend({
|
|
1734
1760
|
type: import_v43.default.literal(FieldType.TEXTAREA),
|
|
1735
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
1761
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1736
1762
|
configuration: import_v43.default.object({
|
|
1737
1763
|
maxLength: import_v43.default.number().optional().describe("Maximum length of the text"),
|
|
1738
1764
|
rows: import_v43.default.number().optional().describe("Number of visible text lines"),
|
|
@@ -1740,7 +1766,10 @@ var TextAreaField = BaseField.extend({
|
|
|
1740
1766
|
prefix: TranslationConfig.optional(),
|
|
1741
1767
|
postfix: TranslationConfig.optional()
|
|
1742
1768
|
}).default({ rows: 4 }).optional()
|
|
1743
|
-
}).
|
|
1769
|
+
}).meta({
|
|
1770
|
+
description: "A multiline text input",
|
|
1771
|
+
id: "TextAreaField"
|
|
1772
|
+
});
|
|
1744
1773
|
var ImageMimeType = import_v43.default.enum([
|
|
1745
1774
|
"image/png",
|
|
1746
1775
|
"image/jpg",
|
|
@@ -1763,58 +1792,76 @@ var SignatureField = BaseField.extend({
|
|
|
1763
1792
|
signaturePromptLabel: TranslationConfig.describe(
|
|
1764
1793
|
"Title of the signature modal"
|
|
1765
1794
|
),
|
|
1766
|
-
defaultValue:
|
|
1795
|
+
defaultValue: SignatureFieldValue.or(ComputedDefaultValue).optional(),
|
|
1767
1796
|
configuration: import_v43.default.object({
|
|
1768
1797
|
maxFileSize: import_v43.default.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
|
|
1769
1798
|
acceptedFileTypes: MimeType.array().optional().describe("List of allowed file formats for the signature")
|
|
1770
1799
|
}).default({
|
|
1771
1800
|
maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
|
|
1772
1801
|
})
|
|
1773
|
-
}).
|
|
1802
|
+
}).meta({
|
|
1803
|
+
description: "A signature input field",
|
|
1804
|
+
id: "SignatureField"
|
|
1805
|
+
});
|
|
1774
1806
|
var EmailField = BaseField.extend({
|
|
1775
1807
|
type: import_v43.default.literal(FieldType.EMAIL),
|
|
1776
1808
|
configuration: import_v43.default.object({
|
|
1777
1809
|
maxLength: import_v43.default.number().optional().describe("Maximum length of the text")
|
|
1778
1810
|
}).default({ maxLength: 255 }).optional(),
|
|
1779
|
-
defaultValue: NonEmptyTextValue.optional()
|
|
1811
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional()
|
|
1812
|
+
}).meta({
|
|
1813
|
+
description: "An email input field",
|
|
1814
|
+
id: "EmailField"
|
|
1780
1815
|
});
|
|
1781
1816
|
var DateField = BaseField.extend({
|
|
1782
1817
|
type: import_v43.default.literal(FieldType.DATE),
|
|
1783
|
-
defaultValue: SerializedNowDateTime.or(PlainDate).optional().describe("Default date value(yyyy-MM-dd)"),
|
|
1818
|
+
defaultValue: SerializedNowDateTime.or(PlainDate).or(ComputedDefaultValue).optional().describe("Default date value(yyyy-MM-dd)"),
|
|
1784
1819
|
configuration: import_v43.default.object({
|
|
1785
1820
|
notice: TranslationConfig.describe(
|
|
1786
1821
|
"Text to display above the date input"
|
|
1787
1822
|
).optional()
|
|
1788
1823
|
}).optional()
|
|
1789
|
-
}).
|
|
1824
|
+
}).meta({
|
|
1825
|
+
description: "A date input (yyyy-MM-dd)",
|
|
1826
|
+
id: "DateField"
|
|
1827
|
+
});
|
|
1790
1828
|
var AgeField = BaseField.extend({
|
|
1791
1829
|
type: import_v43.default.literal(FieldType.AGE),
|
|
1792
|
-
defaultValue: NumberFieldValue.optional(),
|
|
1830
|
+
defaultValue: NumberFieldValue.or(ComputedDefaultValue).optional(),
|
|
1793
1831
|
configuration: import_v43.default.object({
|
|
1794
1832
|
asOfDate: FieldReference,
|
|
1795
1833
|
prefix: TranslationConfig.optional(),
|
|
1796
1834
|
postfix: TranslationConfig.optional()
|
|
1797
1835
|
})
|
|
1798
|
-
}).
|
|
1836
|
+
}).meta({
|
|
1837
|
+
description: "An age input field which uses the current date as the asOfDate",
|
|
1838
|
+
id: "AgeField"
|
|
1839
|
+
});
|
|
1799
1840
|
var TimeField = BaseField.extend({
|
|
1800
1841
|
type: import_v43.default.literal(FieldType.TIME),
|
|
1801
|
-
defaultValue: SerializedNowDateTime.or(TimeValue).optional().describe("Default time value (HH-mm)"),
|
|
1842
|
+
defaultValue: SerializedNowDateTime.or(TimeValue).or(ComputedDefaultValue).optional().describe("Default time value (HH-mm)"),
|
|
1802
1843
|
configuration: import_v43.default.object({
|
|
1803
1844
|
use12HourFormat: import_v43.default.boolean().optional().describe("Whether to use 12-hour format"),
|
|
1804
1845
|
notice: TranslationConfig.describe(
|
|
1805
1846
|
"Text to display above the time input"
|
|
1806
1847
|
).optional()
|
|
1807
1848
|
}).optional()
|
|
1808
|
-
}).
|
|
1849
|
+
}).meta({
|
|
1850
|
+
description: "A single time input (HH-mm)",
|
|
1851
|
+
id: "TimeField"
|
|
1852
|
+
});
|
|
1809
1853
|
var DateRangeField = BaseField.extend({
|
|
1810
1854
|
type: import_v43.default.literal(FieldType.DATE_RANGE),
|
|
1811
|
-
defaultValue: DateRangeFieldValue.optional(),
|
|
1855
|
+
defaultValue: DateRangeFieldValue.or(ComputedDefaultValue).optional(),
|
|
1812
1856
|
configuration: import_v43.default.object({
|
|
1813
1857
|
notice: TranslationConfig.describe(
|
|
1814
1858
|
"Text to display above the date input"
|
|
1815
1859
|
).optional()
|
|
1816
1860
|
}).optional()
|
|
1817
|
-
}).
|
|
1861
|
+
}).meta({
|
|
1862
|
+
description: "A date range input ({ start: yyyy-MM-dd, end: yyyy-MM-dd })",
|
|
1863
|
+
id: "DateRangeField"
|
|
1864
|
+
});
|
|
1818
1865
|
var HtmlFontVariant = import_v43.default.enum([
|
|
1819
1866
|
"reg12",
|
|
1820
1867
|
"reg14",
|
|
@@ -1858,21 +1905,33 @@ var ImageViewField = BaseField.extend({
|
|
|
1858
1905
|
type: import_v43.default.literal(FieldType.IMAGE_VIEW),
|
|
1859
1906
|
defaultValue: NonEmptyTextValue.optional(),
|
|
1860
1907
|
configuration: ImageConfiguration
|
|
1861
|
-
}).
|
|
1908
|
+
}).meta({
|
|
1909
|
+
description: "A read-only image component for form pages",
|
|
1910
|
+
id: "ImageViewField"
|
|
1911
|
+
});
|
|
1862
1912
|
var Paragraph = BaseField.extend({
|
|
1863
1913
|
type: import_v43.default.literal(FieldType.PARAGRAPH),
|
|
1864
1914
|
configuration: ParagraphConfiguration
|
|
1865
|
-
}).
|
|
1915
|
+
}).meta({
|
|
1916
|
+
description: "A read-only HTML <p> paragraph",
|
|
1917
|
+
id: "Paragraph"
|
|
1918
|
+
});
|
|
1866
1919
|
var Heading = BaseField.extend({
|
|
1867
1920
|
type: import_v43.default.literal(FieldType.HEADING),
|
|
1868
1921
|
configuration: HeadingConfiguration
|
|
1869
|
-
}).
|
|
1922
|
+
}).meta({
|
|
1923
|
+
description: "A read-only heading component for form pages",
|
|
1924
|
+
id: "Heading"
|
|
1925
|
+
});
|
|
1870
1926
|
var PageHeader = BaseField.extend({
|
|
1871
1927
|
type: import_v43.default.literal(FieldType.PAGE_HEADER)
|
|
1872
|
-
}).
|
|
1928
|
+
}).meta({
|
|
1929
|
+
description: "A read-only header component for form pages",
|
|
1930
|
+
id: "PageHeader"
|
|
1931
|
+
});
|
|
1873
1932
|
var File = BaseField.extend({
|
|
1874
1933
|
type: import_v43.default.literal(FieldType.FILE),
|
|
1875
|
-
defaultValue: FileFieldValue.optional(),
|
|
1934
|
+
defaultValue: FileFieldValue.or(ComputedDefaultValue).optional(),
|
|
1876
1935
|
configuration: import_v43.default.object({
|
|
1877
1936
|
maxFileSize: import_v43.default.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
|
|
1878
1937
|
acceptedFileTypes: MimeType.array().optional().describe("List of allowed file formats for the signature"),
|
|
@@ -1888,7 +1947,10 @@ var File = BaseField.extend({
|
|
|
1888
1947
|
}).default({
|
|
1889
1948
|
maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
|
|
1890
1949
|
})
|
|
1891
|
-
}).
|
|
1950
|
+
}).meta({
|
|
1951
|
+
description: "A file upload field",
|
|
1952
|
+
id: "File"
|
|
1953
|
+
});
|
|
1892
1954
|
var SelectOption = import_v43.default.object({
|
|
1893
1955
|
value: import_v43.default.string().describe("The value of the option"),
|
|
1894
1956
|
label: import_v43.default.union([import_v43.default.string(), TranslationConfig]).describe("The label of the option"),
|
|
@@ -1896,7 +1958,7 @@ var SelectOption = import_v43.default.object({
|
|
|
1896
1958
|
});
|
|
1897
1959
|
var NumberWithUnitField = BaseField.extend({
|
|
1898
1960
|
type: import_v43.default.literal(FieldType.NUMBER_WITH_UNIT),
|
|
1899
|
-
defaultValue: NumberWithUnitFieldValue.optional(),
|
|
1961
|
+
defaultValue: NumberWithUnitFieldValue.or(ComputedDefaultValue).optional(),
|
|
1900
1962
|
options: import_v43.default.array(SelectOption).describe("A list of options for the unit select"),
|
|
1901
1963
|
configuration: import_v43.default.object({
|
|
1902
1964
|
min: import_v43.default.number().optional().describe("Minimum value of the number field"),
|
|
@@ -1905,17 +1967,23 @@ var NumberWithUnitField = BaseField.extend({
|
|
|
1905
1967
|
"Placeholder for the number field"
|
|
1906
1968
|
)
|
|
1907
1969
|
}).optional()
|
|
1908
|
-
}).
|
|
1970
|
+
}).meta({
|
|
1971
|
+
description: "A number with unit input field",
|
|
1972
|
+
id: "NumberWithUnitField"
|
|
1973
|
+
});
|
|
1909
1974
|
var RadioGroup = BaseField.extend({
|
|
1910
1975
|
type: import_v43.default.literal(FieldType.RADIO_GROUP),
|
|
1911
|
-
defaultValue: TextValue.optional(),
|
|
1976
|
+
defaultValue: TextValue.or(ComputedDefaultValue).optional(),
|
|
1912
1977
|
options: import_v43.default.array(SelectOption).describe("A list of options"),
|
|
1913
1978
|
configuration: import_v43.default.object({
|
|
1914
1979
|
styles: import_v43.default.object({
|
|
1915
1980
|
size: import_v43.default.enum(["NORMAL", "LARGE"]).optional()
|
|
1916
1981
|
}).optional()
|
|
1917
1982
|
}).optional()
|
|
1918
|
-
}).
|
|
1983
|
+
}).meta({
|
|
1984
|
+
description: "A grouped radio button field",
|
|
1985
|
+
id: "RadioGroup"
|
|
1986
|
+
});
|
|
1919
1987
|
var BulletList = BaseField.extend({
|
|
1920
1988
|
type: import_v43.default.literal(FieldType.BULLET_LIST),
|
|
1921
1989
|
items: import_v43.default.array(TranslationConfig).describe("A list of items"),
|
|
@@ -1924,10 +1992,13 @@ var BulletList = BaseField.extend({
|
|
|
1924
1992
|
fontVariant: HtmlFontVariant.optional()
|
|
1925
1993
|
}).optional()
|
|
1926
1994
|
}).default({})
|
|
1927
|
-
}).
|
|
1995
|
+
}).meta({
|
|
1996
|
+
description: "A list of bullet points",
|
|
1997
|
+
id: "BulletList"
|
|
1998
|
+
});
|
|
1928
1999
|
var Select = BaseField.extend({
|
|
1929
2000
|
type: import_v43.default.literal(FieldType.SELECT),
|
|
1930
|
-
defaultValue: TextValue.optional(),
|
|
2001
|
+
defaultValue: TextValue.or(ComputedDefaultValue).optional(),
|
|
1931
2002
|
options: import_v43.default.array(SelectOption).describe("A list of options"),
|
|
1932
2003
|
noOptionsMessage: TranslationConfig.optional().describe(
|
|
1933
2004
|
`
|
|
@@ -1939,16 +2010,22 @@ var Select = BaseField.extend({
|
|
|
1939
2010
|
{ ..., defaultMessage: "'{input}' is not listed among the health facilities." }
|
|
1940
2011
|
`
|
|
1941
2012
|
)
|
|
1942
|
-
}).
|
|
2013
|
+
}).meta({
|
|
2014
|
+
description: "A select input field",
|
|
2015
|
+
id: "Select"
|
|
2016
|
+
});
|
|
1943
2017
|
var SelectDateRangeOption = import_v43.default.object({
|
|
1944
2018
|
value: SelectDateRangeValue.describe("The value of the option"),
|
|
1945
2019
|
label: TranslationConfig.describe("The label of the option")
|
|
1946
2020
|
});
|
|
1947
2021
|
var SelectDateRangeField = BaseField.extend({
|
|
1948
2022
|
type: import_v43.default.literal(FieldType.SELECT_DATE_RANGE),
|
|
1949
|
-
defaultValue: SelectDateRangeValue.optional(),
|
|
2023
|
+
defaultValue: SelectDateRangeValue.or(ComputedDefaultValue).optional(),
|
|
1950
2024
|
options: import_v43.default.array(SelectDateRangeOption).describe("A list of options")
|
|
1951
|
-
}).
|
|
2025
|
+
}).meta({
|
|
2026
|
+
description: "A date range selection field",
|
|
2027
|
+
id: "SelectDateRangeField"
|
|
2028
|
+
});
|
|
1952
2029
|
var NameConfig = import_v43.default.object({
|
|
1953
2030
|
firstname: import_v43.default.object({ required: requiredSchema, label: TranslationConfig.optional() }).optional(),
|
|
1954
2031
|
middlename: import_v43.default.object({ required: requiredSchema, label: TranslationConfig.optional() }).optional(),
|
|
@@ -1960,7 +2037,7 @@ var NameField = BaseField.extend({
|
|
|
1960
2037
|
firstname: SerializedUserField.or(NonEmptyTextValue).optional(),
|
|
1961
2038
|
middlename: SerializedUserField.or(NonEmptyTextValue).optional(),
|
|
1962
2039
|
surname: SerializedUserField.or(NonEmptyTextValue).optional()
|
|
1963
|
-
}).optional(),
|
|
2040
|
+
}).or(ComputedDefaultValue).optional(),
|
|
1964
2041
|
configuration: import_v43.default.object({
|
|
1965
2042
|
name: NameConfig.default({
|
|
1966
2043
|
firstname: { required: true },
|
|
@@ -1979,26 +2056,41 @@ var NameField = BaseField.extend({
|
|
|
1979
2056
|
surname: { required: true }
|
|
1980
2057
|
}
|
|
1981
2058
|
}).optional()
|
|
1982
|
-
}).
|
|
2059
|
+
}).meta({
|
|
2060
|
+
description: "A field for entering a persons name",
|
|
2061
|
+
id: "NameField"
|
|
2062
|
+
});
|
|
1983
2063
|
var PhoneField = BaseField.extend({
|
|
1984
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
2064
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1985
2065
|
type: import_v43.default.literal(FieldType.PHONE)
|
|
1986
|
-
}).
|
|
2066
|
+
}).meta({
|
|
2067
|
+
description: "A field for entering a phone number",
|
|
2068
|
+
id: "PhoneField"
|
|
2069
|
+
});
|
|
1987
2070
|
var IdField = BaseField.extend({
|
|
1988
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
2071
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1989
2072
|
type: import_v43.default.literal(FieldType.ID)
|
|
1990
|
-
}).
|
|
2073
|
+
}).meta({
|
|
2074
|
+
description: "A field for entering an ID",
|
|
2075
|
+
id: "IdField"
|
|
2076
|
+
});
|
|
1991
2077
|
var Checkbox = BaseField.extend({
|
|
1992
2078
|
type: import_v43.default.literal(FieldType.CHECKBOX),
|
|
1993
|
-
defaultValue: CheckboxFieldValue.default(false)
|
|
1994
|
-
}).
|
|
2079
|
+
defaultValue: CheckboxFieldValue.or(ComputedDefaultValue).default(false)
|
|
2080
|
+
}).meta({
|
|
2081
|
+
description: "A boolean checkbox field",
|
|
2082
|
+
id: "Checkbox"
|
|
2083
|
+
});
|
|
1995
2084
|
var Country = BaseField.extend({
|
|
1996
2085
|
type: import_v43.default.literal(FieldType.COUNTRY),
|
|
1997
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
2086
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1998
2087
|
optionOverrides: import_v43.default.array(SelectOption.omit({ label: true })).optional().describe(
|
|
1999
2088
|
"Conditionals for specific countries. Countries not listed are always shown and enabled."
|
|
2000
2089
|
)
|
|
2001
|
-
}).
|
|
2090
|
+
}).meta({
|
|
2091
|
+
description: "A field for selecting a country",
|
|
2092
|
+
id: "Country"
|
|
2093
|
+
});
|
|
2002
2094
|
var AllowedLocations = JurisdictionReference.optional().describe(
|
|
2003
2095
|
"Limits which location options are selectable depending on user jurisdiction and location."
|
|
2004
2096
|
);
|
|
@@ -2007,28 +2099,33 @@ var AdministrativeAreas = import_v43.default.enum([
|
|
|
2007
2099
|
"HEALTH_FACILITY",
|
|
2008
2100
|
"CRVS_OFFICE"
|
|
2009
2101
|
]);
|
|
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
2102
|
var AdministrativeAreaField = BaseField.extend({
|
|
2016
2103
|
type: import_v43.default.literal(FieldType.ADMINISTRATIVE_AREA),
|
|
2017
|
-
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
|
|
2018
|
-
configuration:
|
|
2019
|
-
|
|
2104
|
+
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField, ComputedDefaultValue]).optional(),
|
|
2105
|
+
configuration: import_v43.default.object({
|
|
2106
|
+
partOf: FieldReference.optional().describe("Parent location"),
|
|
2107
|
+
type: AdministrativeAreas,
|
|
2108
|
+
allowedLocations: AllowedLocations
|
|
2109
|
+
}).describe("Administrative area options")
|
|
2110
|
+
}).meta({
|
|
2111
|
+
description: "Administrative area input field",
|
|
2112
|
+
id: "AdministrativeAreaField"
|
|
2113
|
+
});
|
|
2020
2114
|
var LocationInput = BaseField.extend({
|
|
2021
2115
|
type: import_v43.default.literal(FieldType.LOCATION),
|
|
2022
|
-
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
|
|
2116
|
+
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField, ComputedDefaultValue]).optional(),
|
|
2023
2117
|
configuration: import_v43.default.object({
|
|
2024
2118
|
locationTypes: import_v43.default.array(import_v43.default.string()).optional().describe("Types of the locations that are available for selection."),
|
|
2025
2119
|
allowedLocations: AllowedLocations
|
|
2026
2120
|
}).optional()
|
|
2027
|
-
}).
|
|
2121
|
+
}).meta({
|
|
2122
|
+
description: "A field for selecting a location",
|
|
2123
|
+
id: "LocationInput"
|
|
2124
|
+
});
|
|
2028
2125
|
var FileUploadWithOptions = BaseField.extend({
|
|
2029
2126
|
type: import_v43.default.literal(FieldType.FILE_WITH_OPTIONS),
|
|
2030
2127
|
options: import_v43.default.array(SelectOption).describe("A list of options"),
|
|
2031
|
-
defaultValue: FileFieldWithOptionValue.optional(),
|
|
2128
|
+
defaultValue: FileFieldWithOptionValue.or(ComputedDefaultValue).optional(),
|
|
2032
2129
|
configuration: import_v43.default.object({
|
|
2033
2130
|
maxFileSize: import_v43.default.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
|
|
2034
2131
|
maxImageSize: import_v43.default.object({
|
|
@@ -2038,15 +2135,18 @@ var FileUploadWithOptions = BaseField.extend({
|
|
|
2038
2135
|
}).default({
|
|
2039
2136
|
maxFileSize: DEFAULT_MAX_FILE_SIZE_BYTES
|
|
2040
2137
|
})
|
|
2138
|
+
}).meta({
|
|
2139
|
+
description: "A field for uploading files with file type options",
|
|
2140
|
+
id: "FileUploadWithOptions"
|
|
2041
2141
|
});
|
|
2042
2142
|
var Facility = BaseField.extend({
|
|
2043
2143
|
type: import_v43.default.literal(FieldType.FACILITY),
|
|
2044
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
2144
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
2045
2145
|
configuration: import_v43.default.object({ allowedLocations: AllowedLocations }).optional()
|
|
2046
2146
|
}).describe("Input field for a facility");
|
|
2047
2147
|
var Office = BaseField.extend({
|
|
2048
2148
|
type: import_v43.default.literal(FieldType.OFFICE),
|
|
2049
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
2149
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
2050
2150
|
configuration: import_v43.default.object({ allowedLocations: AllowedLocations }).optional()
|
|
2051
2151
|
}).describe("Input field for an office");
|
|
2052
2152
|
var DefaultAddressFieldValue = DomesticAddressFieldValue.extend({
|
|
@@ -2082,8 +2182,11 @@ var Address = BaseField.extend({
|
|
|
2082
2182
|
).optional(),
|
|
2083
2183
|
allowedLocations: AllowedLocations
|
|
2084
2184
|
}).optional(),
|
|
2085
|
-
defaultValue: DefaultAddressFieldValue.optional()
|
|
2086
|
-
}).
|
|
2185
|
+
defaultValue: DefaultAddressFieldValue.or(ComputedDefaultValue).optional()
|
|
2186
|
+
}).meta({
|
|
2187
|
+
description: "Address input field \u2013 a combination of location and text fields",
|
|
2188
|
+
id: "Address"
|
|
2189
|
+
});
|
|
2087
2190
|
var StaticDataEntry = import_v43.default.object({
|
|
2088
2191
|
id: import_v43.default.string().describe("ID for the data entry."),
|
|
2089
2192
|
label: TranslationConfig,
|
|
@@ -2098,7 +2201,10 @@ var DataField = BaseField.extend({
|
|
|
2098
2201
|
subtitle: TranslationConfig.optional(),
|
|
2099
2202
|
data: import_v43.default.array(DataEntry)
|
|
2100
2203
|
})
|
|
2101
|
-
}).
|
|
2204
|
+
}).meta({
|
|
2205
|
+
description: "A field for displaying a table of read-only data",
|
|
2206
|
+
id: "DataField"
|
|
2207
|
+
});
|
|
2102
2208
|
var ButtonSize = import_v43.default.enum(["small", "medium", "large"]);
|
|
2103
2209
|
var ButtonType = import_v43.default.enum([
|
|
2104
2210
|
"primary",
|
|
@@ -2123,13 +2229,19 @@ var ButtonConfiguration = import_v43.default.object({
|
|
|
2123
2229
|
});
|
|
2124
2230
|
var ButtonField = BaseField.extend({
|
|
2125
2231
|
type: import_v43.default.literal(FieldType.BUTTON),
|
|
2126
|
-
defaultValue: ButtonFieldValue.optional(),
|
|
2232
|
+
defaultValue: ButtonFieldValue.or(ComputedDefaultValue).optional(),
|
|
2127
2233
|
configuration: ButtonConfiguration
|
|
2128
|
-
}).
|
|
2234
|
+
}).meta({
|
|
2235
|
+
description: "A generic button that can be used to trigger an action",
|
|
2236
|
+
id: "ButtonField"
|
|
2237
|
+
});
|
|
2129
2238
|
var FieldGroup = BaseField.extend({
|
|
2130
2239
|
type: import_v43.default.literal(FieldType.FIELD_GROUP),
|
|
2131
2240
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
2132
2241
|
fields: import_v43.default.lazy(() => import_v43.default.array(FieldConfig))
|
|
2242
|
+
}).meta({
|
|
2243
|
+
description: "A group of fields that are displayed together",
|
|
2244
|
+
id: "FieldGroup"
|
|
2133
2245
|
});
|
|
2134
2246
|
var AlphaPrintButton = BaseField.extend({
|
|
2135
2247
|
type: import_v43.default.literal(FieldType.ALPHA_PRINT_BUTTON),
|
|
@@ -2139,10 +2251,13 @@ var AlphaPrintButton = BaseField.extend({
|
|
|
2139
2251
|
"Label for the print button"
|
|
2140
2252
|
)
|
|
2141
2253
|
})
|
|
2142
|
-
}).
|
|
2254
|
+
}).meta({
|
|
2255
|
+
description: "An experimental print button field for printing certificates during the declaration process",
|
|
2256
|
+
id: "AlphaPrintButton"
|
|
2257
|
+
});
|
|
2143
2258
|
var HttpField = BaseField.extend({
|
|
2144
2259
|
type: import_v43.default.literal(FieldType.HTTP),
|
|
2145
|
-
defaultValue: HttpFieldValue.optional(),
|
|
2260
|
+
defaultValue: HttpFieldValue.or(ComputedDefaultValue).optional(),
|
|
2146
2261
|
configuration: import_v43.default.object({
|
|
2147
2262
|
trigger: FieldReference.optional().describe(
|
|
2148
2263
|
"Reference to the field that triggers the HTTP request when its value changes. If not provided, the HTTP request is triggered once on component mount."
|
|
@@ -2155,20 +2270,30 @@ var HttpField = BaseField.extend({
|
|
|
2155
2270
|
params: import_v43.default.record(import_v43.default.string(), import_v43.default.union([import_v43.default.string(), FieldReference])).optional(),
|
|
2156
2271
|
timeout: import_v43.default.number().default(15e3).describe("Request timeout in milliseconds")
|
|
2157
2272
|
})
|
|
2158
|
-
}).
|
|
2273
|
+
}).meta({
|
|
2274
|
+
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.",
|
|
2275
|
+
id: "HttpField"
|
|
2276
|
+
});
|
|
2159
2277
|
var AutocompleteField = BaseField.extend({
|
|
2160
2278
|
type: import_v43.default.literal(FieldType.AUTOCOMPLETE),
|
|
2161
2279
|
configuration: import_v43.default.object({
|
|
2162
|
-
url: import_v43.default.string().describe(
|
|
2280
|
+
url: import_v43.default.string().describe(
|
|
2281
|
+
"URL to fetch autocomplete suggestions from. This should be a country config server endpoint."
|
|
2282
|
+
).optional(),
|
|
2163
2283
|
method: import_v43.default.enum(["GET", "POST"]).default("GET").optional(),
|
|
2164
2284
|
defaultOptions: import_v43.default.array(
|
|
2165
2285
|
import_v43.default.object({
|
|
2166
2286
|
label: import_v43.default.string(),
|
|
2167
2287
|
value: import_v43.default.string()
|
|
2168
2288
|
})
|
|
2169
|
-
).optional()
|
|
2289
|
+
).optional().describe(
|
|
2290
|
+
"Manual entry is supported through configuration, allowing users to provide values not currently represented in the dataset."
|
|
2291
|
+
)
|
|
2170
2292
|
})
|
|
2171
|
-
}).
|
|
2293
|
+
}).meta({
|
|
2294
|
+
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.",
|
|
2295
|
+
id: "AutocompleteField"
|
|
2296
|
+
});
|
|
2172
2297
|
var SearchField = HttpField.extend({
|
|
2173
2298
|
type: import_v43.default.literal(FieldType.SEARCH),
|
|
2174
2299
|
configuration: SearchQuery.pick({
|
|
@@ -2201,6 +2326,9 @@ var SearchField = HttpField.extend({
|
|
|
2201
2326
|
ok: TranslationConfig.optional()
|
|
2202
2327
|
}).optional()
|
|
2203
2328
|
})
|
|
2329
|
+
}).meta({
|
|
2330
|
+
description: "A search input field",
|
|
2331
|
+
id: "SearchField"
|
|
2204
2332
|
});
|
|
2205
2333
|
var LinkButtonField = BaseField.extend({
|
|
2206
2334
|
type: import_v43.default.literal(FieldType.LINK_BUTTON),
|
|
@@ -2209,28 +2337,35 @@ var LinkButtonField = BaseField.extend({
|
|
|
2209
2337
|
text: TranslationConfig.describe("Text to display on the button"),
|
|
2210
2338
|
icon: import_v43.default.string().optional().describe("Icon for the button. You can find icons from OpenCRVS UI-Kit.")
|
|
2211
2339
|
})
|
|
2212
|
-
}).
|
|
2340
|
+
}).meta({
|
|
2341
|
+
description: "A button that opens a URL link",
|
|
2342
|
+
id: "LinkButtonField"
|
|
2343
|
+
});
|
|
2213
2344
|
var VerificationStatus = BaseField.extend({
|
|
2214
2345
|
type: import_v43.default.literal(FieldType.VERIFICATION_STATUS),
|
|
2215
|
-
defaultValue: VerificationStatusValue.optional(),
|
|
2346
|
+
defaultValue: VerificationStatusValue.or(ComputedDefaultValue).optional(),
|
|
2216
2347
|
configuration: import_v43.default.object({
|
|
2217
2348
|
status: TranslationConfig.describe("Text to display on the status pill."),
|
|
2218
2349
|
description: TranslationConfig.describe(
|
|
2219
2350
|
"Explaining text on the banner in form."
|
|
2220
2351
|
)
|
|
2221
2352
|
})
|
|
2353
|
+
}).meta({
|
|
2354
|
+
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.",
|
|
2355
|
+
id: "VerificationStatus"
|
|
2222
2356
|
});
|
|
2223
2357
|
var QueryParamReaderField = BaseField.extend({
|
|
2224
2358
|
type: import_v43.default.literal(FieldType.QUERY_PARAM_READER),
|
|
2225
2359
|
configuration: import_v43.default.object({
|
|
2226
2360
|
pickParams: import_v43.default.array(import_v43.default.string()).describe("List of query parameters to read from the URL")
|
|
2227
2361
|
})
|
|
2228
|
-
}).
|
|
2229
|
-
"A field that maps URL query params into form values and clears them afterward"
|
|
2230
|
-
|
|
2362
|
+
}).meta({
|
|
2363
|
+
description: "A field that maps URL query params into form values and clears them afterward",
|
|
2364
|
+
id: "QueryParamReaderField"
|
|
2365
|
+
});
|
|
2231
2366
|
var QrReaderField = BaseField.extend({
|
|
2232
2367
|
type: import_v43.default.literal(FieldType.QR_READER),
|
|
2233
|
-
defaultValue: QrReaderFieldValue.optional(),
|
|
2368
|
+
defaultValue: QrReaderFieldValue.or(ComputedDefaultValue).optional(),
|
|
2234
2369
|
configuration: import_v43.default.object({
|
|
2235
2370
|
validator: import_v43.default.any().meta({
|
|
2236
2371
|
description: "JSON Schema to validate the scanned QR code data against before populating the form fields.",
|
|
@@ -2238,21 +2373,27 @@ var QrReaderField = BaseField.extend({
|
|
|
2238
2373
|
})
|
|
2239
2374
|
}).optional()
|
|
2240
2375
|
}).meta({
|
|
2241
|
-
description: "
|
|
2376
|
+
description: "QR code reader field, including optional JSON Schema validator.",
|
|
2242
2377
|
id: "QrReaderField"
|
|
2243
2378
|
});
|
|
2244
2379
|
var IdReaderField = BaseField.extend({
|
|
2245
2380
|
type: import_v43.default.literal(FieldType.ID_READER),
|
|
2246
|
-
defaultValue: IdReaderFieldValue.optional(),
|
|
2381
|
+
defaultValue: IdReaderFieldValue.or(ComputedDefaultValue).optional(),
|
|
2247
2382
|
methods: import_v43.default.array(
|
|
2248
2383
|
import_v43.default.union([QrReaderField, LinkButtonField]).describe("Methods for reading an ID")
|
|
2249
2384
|
)
|
|
2385
|
+
}).meta({
|
|
2386
|
+
description: "A wrapper around nested form fields, specifically QR_READER and LINK_BUTTON. It can hold the QR_READERs value.",
|
|
2387
|
+
id: "IdReaderField"
|
|
2250
2388
|
});
|
|
2251
2389
|
var CustomField = BaseField.extend({
|
|
2252
2390
|
type: import_v43.default.literal(FieldType._EXPERIMENTAL_CUSTOM),
|
|
2253
2391
|
defaultValue: CustomFieldValue.optional(),
|
|
2254
2392
|
src: import_v43.default.string().describe("Module source path for the custom field component"),
|
|
2255
2393
|
configuration: import_v43.default.unknown().optional()
|
|
2394
|
+
}).meta({
|
|
2395
|
+
description: "An expiremental custom field that is defined by a module source path",
|
|
2396
|
+
id: "CustomField"
|
|
2256
2397
|
});
|
|
2257
2398
|
var FieldStyleVariant = import_v43.default.enum(["default", "highlighted"]);
|
|
2258
2399
|
var LoaderField = BaseField.extend({
|
|
@@ -2262,22 +2403,25 @@ var LoaderField = BaseField.extend({
|
|
|
2262
2403
|
configuration: import_v43.default.object({
|
|
2263
2404
|
text: TranslationConfig.describe("Display text above the loading spinner")
|
|
2264
2405
|
})
|
|
2265
|
-
}).
|
|
2266
|
-
"A non-interactive field that indicates an in progress operation in form"
|
|
2267
|
-
|
|
2406
|
+
}).meta({
|
|
2407
|
+
description: "A non-interactive field that indicates an in progress operation in form",
|
|
2408
|
+
id: "LoaderField"
|
|
2409
|
+
});
|
|
2268
2410
|
var HiddenField = BaseField.extend({
|
|
2269
2411
|
type: import_v43.default.literal(FieldType.ALPHA_HIDDEN),
|
|
2270
2412
|
required: import_v43.default.boolean().default(false).optional(),
|
|
2271
2413
|
defaultValue: TextValue.optional()
|
|
2272
|
-
}).
|
|
2273
|
-
"A non-interactive, hidden field that only hold a value in the form"
|
|
2274
|
-
|
|
2414
|
+
}).meta({
|
|
2415
|
+
description: "A non-interactive, hidden field that only hold a value in the form",
|
|
2416
|
+
id: "HiddenField"
|
|
2417
|
+
});
|
|
2275
2418
|
var UserRoleField = BaseField.extend({
|
|
2276
2419
|
type: import_v43.default.literal(FieldType.USER_ROLE),
|
|
2277
2420
|
defaultValue: TextValue.optional()
|
|
2278
|
-
}).
|
|
2279
|
-
"A select dropdown that is automatically populated with available user roles"
|
|
2280
|
-
|
|
2421
|
+
}).meta({
|
|
2422
|
+
description: "A select dropdown that is automatically populated with available user roles",
|
|
2423
|
+
id: "UserRoleField"
|
|
2424
|
+
});
|
|
2281
2425
|
var FieldConfig = import_v43.default.discriminatedUnion("type", [
|
|
2282
2426
|
FieldGroup,
|
|
2283
2427
|
Address,
|
|
@@ -2376,16 +2520,19 @@ var VerificationPageConfig = FormPageConfig.extend({
|
|
|
2376
2520
|
type: z21.literal(PageTypes.enum.VERIFICATION),
|
|
2377
2521
|
actions: VerificationActionConfig
|
|
2378
2522
|
});
|
|
2379
|
-
var PageConfig = z21.discriminatedUnion("type", [
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2523
|
+
var PageConfig = z21.discriminatedUnion("type", [FormPageConfig, VerificationPageConfig]).meta({
|
|
2524
|
+
id: "PageConfig",
|
|
2525
|
+
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."
|
|
2526
|
+
});
|
|
2383
2527
|
|
|
2384
2528
|
// ../commons/src/events/FormConfig.ts
|
|
2385
2529
|
var DeclarationFormConfig = z22.object({
|
|
2386
2530
|
label: TranslationConfig.describe("Human readable description of the form"),
|
|
2387
2531
|
pages: z22.array(FormPageConfig)
|
|
2388
|
-
}).
|
|
2532
|
+
}).meta({
|
|
2533
|
+
id: "DeclarationFormConfig",
|
|
2534
|
+
description: "Configuration of the declaration form."
|
|
2535
|
+
});
|
|
2389
2536
|
var ActionFormConfig = z22.object({
|
|
2390
2537
|
label: TranslationConfig.describe("Human readable description of the form"),
|
|
2391
2538
|
pages: z22.array(PageConfig)
|
|
@@ -2485,6 +2632,9 @@ var DeduplicationConfig = z23.object({
|
|
|
2485
2632
|
id: z23.string(),
|
|
2486
2633
|
label: TranslationConfig,
|
|
2487
2634
|
query: Clause
|
|
2635
|
+
}).meta({
|
|
2636
|
+
id: "DeduplicationConfig",
|
|
2637
|
+
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
2638
|
});
|
|
2489
2639
|
|
|
2490
2640
|
// ../commons/src/events/ActionConfig.ts
|
|
@@ -2602,17 +2752,42 @@ var ActionConfig = z24.discriminatedUnion("type", [
|
|
|
2602
2752
|
* OpenAPI references are defined here so our generated OpenAPI spec knows to reuse the models
|
|
2603
2753
|
* and treat them as "models" instead of duplicating the data structure in each endpoint.
|
|
2604
2754
|
*/
|
|
2605
|
-
ReadActionConfig.meta({
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2755
|
+
ReadActionConfig.meta({
|
|
2756
|
+
id: "ReadActionConfig",
|
|
2757
|
+
description: "Configuration for the read action \u2014 defines the record-tab content displayed on the event overview page."
|
|
2758
|
+
}),
|
|
2759
|
+
DeclareConfig.meta({
|
|
2760
|
+
id: "DeclareActionConfig",
|
|
2761
|
+
description: "Configuration for the declare action. Includes review-page fields. Shared with the notify action (ActionType.NOTIFY)."
|
|
2762
|
+
}),
|
|
2763
|
+
RejectConfig.meta({
|
|
2764
|
+
id: "RejectActionConfig",
|
|
2765
|
+
description: "Configuration for rejecting a record before registration."
|
|
2766
|
+
}),
|
|
2767
|
+
RegisterConfig.meta({
|
|
2768
|
+
id: "RegisterActionConfig",
|
|
2769
|
+
description: "Configuration for registering a record."
|
|
2770
|
+
}),
|
|
2609
2771
|
PrintCertificateActionConfig.meta({
|
|
2610
|
-
id: "PrintCertificateActionConfig"
|
|
2772
|
+
id: "PrintCertificateActionConfig",
|
|
2773
|
+
description: "Configuration for printing a certificate of a registered record."
|
|
2611
2774
|
}),
|
|
2612
|
-
RequestCorrectionConfig.meta({
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2775
|
+
RequestCorrectionConfig.meta({
|
|
2776
|
+
id: "RequestCorrectionActionConfig",
|
|
2777
|
+
description: "Configuration for requesting a correction on a registered record."
|
|
2778
|
+
}),
|
|
2779
|
+
EditActionConfig.meta({
|
|
2780
|
+
id: "EditActionConfig",
|
|
2781
|
+
description: "Configuration for editing a record before registration."
|
|
2782
|
+
}),
|
|
2783
|
+
ArchiveConfig.meta({
|
|
2784
|
+
id: "ArchiveActionConfig",
|
|
2785
|
+
description: "Configuration for archiving a record."
|
|
2786
|
+
}),
|
|
2787
|
+
CustomActionConfig.meta({
|
|
2788
|
+
id: "CustomActionConfig",
|
|
2789
|
+
description: "Configuration for a country-defined custom action. An event may include any number of these."
|
|
2790
|
+
})
|
|
2616
2791
|
]).describe(
|
|
2617
2792
|
"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
2793
|
).meta({ id: "ActionConfig" });
|
|
@@ -2688,7 +2863,10 @@ var Field = BaseField2.extend({
|
|
|
2688
2863
|
}).describe("Custom field defined for the summary view.");
|
|
2689
2864
|
var SummaryConfig = z27.object({
|
|
2690
2865
|
fields: z27.array(z27.union([Field, ReferenceField])).describe("Fields displayed in the event summary view.")
|
|
2691
|
-
}).
|
|
2866
|
+
}).meta({
|
|
2867
|
+
id: "SummaryConfig",
|
|
2868
|
+
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."
|
|
2869
|
+
});
|
|
2692
2870
|
|
|
2693
2871
|
// ../commons/src/events/AdvancedSearchConfig.ts
|
|
2694
2872
|
var z28 = __toESM(require("zod/v4"));
|
|
@@ -2812,6 +2990,9 @@ var AdvancedSearchField = z28.discriminatedUnion("fieldType", [FieldConfigSchema
|
|
|
2812
2990
|
var AdvancedSearchConfig = z28.object({
|
|
2813
2991
|
title: TranslationConfig.describe("Advanced search tab title"),
|
|
2814
2992
|
fields: z28.array(AdvancedSearchField).describe("Advanced search fields within the tab.")
|
|
2993
|
+
}).meta({
|
|
2994
|
+
id: "AdvancedSearchConfig",
|
|
2995
|
+
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
2996
|
});
|
|
2816
2997
|
|
|
2817
2998
|
// ../commons/src/events/utils.ts
|
|
@@ -2862,7 +3043,37 @@ function resolveDataPath(rootData, dataPath, instancePath) {
|
|
|
2862
3043
|
}
|
|
2863
3044
|
return current;
|
|
2864
3045
|
}
|
|
3046
|
+
function todayISO() {
|
|
3047
|
+
return (0, import_date_fns.formatISO)(/* @__PURE__ */ new Date(), { representation: "date" });
|
|
3048
|
+
}
|
|
3049
|
+
var compiledFunctionCache = /* @__PURE__ */ new Map();
|
|
3050
|
+
function compileClientFunction(code) {
|
|
3051
|
+
let fn = compiledFunctionCache.get(code);
|
|
3052
|
+
if (!fn) {
|
|
3053
|
+
fn = new Function(`return (${code})`)();
|
|
3054
|
+
compiledFunctionCache.set(code, fn);
|
|
3055
|
+
}
|
|
3056
|
+
return fn;
|
|
3057
|
+
}
|
|
2865
3058
|
(0, import_ajv_formats.default)(ajv);
|
|
3059
|
+
function buildClientFunctionContext(input) {
|
|
3060
|
+
return {
|
|
3061
|
+
$form: input.form,
|
|
3062
|
+
$now: todayISO(),
|
|
3063
|
+
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
3064
|
+
$online: isOnline(),
|
|
3065
|
+
$user: input.validatorContext?.user,
|
|
3066
|
+
$event: input.validatorContext?.event,
|
|
3067
|
+
$leafAdminStructureLocationIds: input.validatorContext?.leafAdminStructureLocationIds ?? [],
|
|
3068
|
+
user: input.systemVariables?.user,
|
|
3069
|
+
$window: input.systemVariables?.$window,
|
|
3070
|
+
locations: input.locations,
|
|
3071
|
+
adminLevelIds: input.adminLevelIds
|
|
3072
|
+
};
|
|
3073
|
+
}
|
|
3074
|
+
function runClientFunction(code, data, context) {
|
|
3075
|
+
return compileClientFunction(code)(data, context);
|
|
3076
|
+
}
|
|
2866
3077
|
ajv.addKeyword({
|
|
2867
3078
|
keyword: "daysFromDate",
|
|
2868
3079
|
type: "string",
|
|
@@ -2907,12 +3118,35 @@ ajv.addKeyword({
|
|
|
2907
3118
|
$data: true,
|
|
2908
3119
|
errors: true,
|
|
2909
3120
|
// @ts-ignore -- Force type. We will move this away from AJV next. Parsing the array will take seconds and is only called by core.
|
|
2910
|
-
validate(
|
|
3121
|
+
validate(_schema, data, _2, dataContext) {
|
|
2911
3122
|
const locationIdInput = data;
|
|
2912
3123
|
const locations = dataContext?.rootData.$leafAdminStructureLocationIds ?? [];
|
|
2913
3124
|
return locations.some((location) => location.id === locationIdInput);
|
|
2914
3125
|
}
|
|
2915
3126
|
});
|
|
3127
|
+
ajv.addKeyword({
|
|
3128
|
+
keyword: "customClientValidator",
|
|
3129
|
+
schemaType: "object",
|
|
3130
|
+
errors: true,
|
|
3131
|
+
// @ts-expect-error -- AJV's public types don't expose `rootData`. All
|
|
3132
|
+
// `validate()` callers build root data via `buildClientFunctionContext`,
|
|
3133
|
+
// so the cast holds.
|
|
3134
|
+
validate(schema, data, _2, dataContext) {
|
|
3135
|
+
return Boolean(
|
|
3136
|
+
runClientFunction(
|
|
3137
|
+
schema.code,
|
|
3138
|
+
data,
|
|
3139
|
+
dataContext?.rootData ?? buildClientFunctionContext({ form: {} })
|
|
3140
|
+
)
|
|
3141
|
+
);
|
|
3142
|
+
}
|
|
3143
|
+
});
|
|
3144
|
+
function isOnline() {
|
|
3145
|
+
if (typeof window !== "undefined" && typeof navigator !== "undefined") {
|
|
3146
|
+
return navigator.onLine;
|
|
3147
|
+
}
|
|
3148
|
+
return true;
|
|
3149
|
+
}
|
|
2916
3150
|
|
|
2917
3151
|
// ../commons/src/utils.ts
|
|
2918
3152
|
var z32 = __toESM(require("zod/v4"));
|
|
@@ -3531,7 +3765,54 @@ function createFieldConditionals(fieldId) {
|
|
|
3531
3765
|
}
|
|
3532
3766
|
},
|
|
3533
3767
|
required: [fieldId]
|
|
3534
|
-
})
|
|
3768
|
+
}),
|
|
3769
|
+
/**
|
|
3770
|
+
* Custom client-side validator. The provided function is serialised and executed
|
|
3771
|
+
* just-in-time on the client only. External references (e.g. lodash) are not
|
|
3772
|
+
* available inside the function body — all logic must be self-contained.
|
|
3773
|
+
*
|
|
3774
|
+
* @example
|
|
3775
|
+
* field('nid').customClientValidator((value) => {
|
|
3776
|
+
* // LUHN check — all logic must be inline
|
|
3777
|
+
* const digits = String(value).split('').map(Number)
|
|
3778
|
+
* // ...
|
|
3779
|
+
* return isValid
|
|
3780
|
+
* })
|
|
3781
|
+
*/
|
|
3782
|
+
customClientValidator(validationFn) {
|
|
3783
|
+
const code = validationFn.toString();
|
|
3784
|
+
return defineFormConditional({
|
|
3785
|
+
type: "object",
|
|
3786
|
+
properties: wrapToPath(
|
|
3787
|
+
{ [fieldId]: { customClientValidator: { code } } },
|
|
3788
|
+
this.$$subfield
|
|
3789
|
+
),
|
|
3790
|
+
required: [fieldId]
|
|
3791
|
+
});
|
|
3792
|
+
},
|
|
3793
|
+
/**
|
|
3794
|
+
* Custom client-side evaluation. Returns a {@link FieldReference} descriptor
|
|
3795
|
+
* that can be used as the `value` property or a DATA component entry.
|
|
3796
|
+
* The function receives the referenced field's value as the first argument and
|
|
3797
|
+
* the full form context as the second; its return value replaces the field reference.
|
|
3798
|
+
* The function is serialised and executed just-in-time on the client only.
|
|
3799
|
+
* External references (e.g. lodash) are not available inside the function body.
|
|
3800
|
+
*
|
|
3801
|
+
* For computing a default value without referencing a specific field, use
|
|
3802
|
+
* `evaluate(fn)` in the `defaultValue` property instead.
|
|
3803
|
+
*
|
|
3804
|
+
* @example
|
|
3805
|
+
* field('a').customClientEvaluation((aValue, ctx) =>
|
|
3806
|
+
* Number(aValue) + Number(ctx.$form.b)
|
|
3807
|
+
* )
|
|
3808
|
+
*/
|
|
3809
|
+
customClientEvaluation(computationFn) {
|
|
3810
|
+
return {
|
|
3811
|
+
$$code: computationFn.toString(),
|
|
3812
|
+
$$field: fieldId,
|
|
3813
|
+
$$subfield: this.$$subfield
|
|
3814
|
+
};
|
|
3815
|
+
}
|
|
3535
3816
|
};
|
|
3536
3817
|
}
|
|
3537
3818
|
|
|
@@ -3679,7 +3960,7 @@ var _EventConfigBase = z33.object({
|
|
|
3679
3960
|
),
|
|
3680
3961
|
label: TranslationConfig.describe("Human-readable label for the event type."),
|
|
3681
3962
|
actions: z33.array(ActionConfig).describe(
|
|
3682
|
-
"Configuration of
|
|
3963
|
+
"Configuration of core and custom actions associated with the event."
|
|
3683
3964
|
),
|
|
3684
3965
|
actionOrder: z33.array(z33.string()).optional().describe(
|
|
3685
3966
|
"Order of actions in the action menu. Use either the action type for core actions or the customActionType for custom actions."
|
|
@@ -3691,7 +3972,7 @@ var _EventConfigBase = z33.object({
|
|
|
3691
3972
|
"Configuration of fields available in the advanced search feature."
|
|
3692
3973
|
),
|
|
3693
3974
|
flags: z33.array(FlagConfig).optional().default([]).describe(
|
|
3694
|
-
"Configuration of flags associated with the actions of this event type."
|
|
3975
|
+
"Configuration of custom flags associated with the actions of this event type."
|
|
3695
3976
|
),
|
|
3696
3977
|
analytics: z33.boolean().optional().default(true).describe(
|
|
3697
3978
|
"Indicates whether the records of this event type are included in analytics"
|
|
@@ -3704,8 +3985,9 @@ var EventConfig = _EventConfigBase.superRefine((event2, ctx) => {
|
|
|
3704
3985
|
validateActionFlags(event2, ctx);
|
|
3705
3986
|
validateActionOrder(event2, ctx);
|
|
3706
3987
|
}).meta({
|
|
3707
|
-
id: "EventConfig"
|
|
3708
|
-
|
|
3988
|
+
id: "EventConfig",
|
|
3989
|
+
description: "Configuration defining an event type registered in OpenCRVS (for example birth or death)."
|
|
3990
|
+
});
|
|
3709
3991
|
|
|
3710
3992
|
// ../commons/src/events/EventConfigInput.ts
|
|
3711
3993
|
var defineDeclarationForm = (form) => DeclarationFormConfig.parse(form);
|
|
@@ -3927,6 +4209,9 @@ var WorkqueueColumnValue = z34.object({
|
|
|
3927
4209
|
var WorkqueueColumn = z34.object({
|
|
3928
4210
|
label: TranslationConfig,
|
|
3929
4211
|
value: WorkqueueColumnValue
|
|
4212
|
+
}).meta({
|
|
4213
|
+
id: "WorkqueueColumn",
|
|
4214
|
+
description: "Configuration for a single workqueue column. The value references an event metadata key (e.g. `dateOfEvent`, `status`, `trackingId`)."
|
|
3930
4215
|
});
|
|
3931
4216
|
function defineWorkqueuesColumns(workqueueColumns) {
|
|
3932
4217
|
return workqueueColumns.map(
|
|
@@ -4129,18 +4414,11 @@ var WorkqueueConfigWithoutQuery = WorkqueueConfig.omit({
|
|
|
4129
4414
|
query: true,
|
|
4130
4415
|
columns: true
|
|
4131
4416
|
});
|
|
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()
|
|
4417
|
+
var WorkqueueConfigInput = WorkqueueConfig.extend({
|
|
4418
|
+
query: CountryConfigQueryInputType
|
|
4419
|
+
}).meta({
|
|
4420
|
+
id: "WorkqueueConfig",
|
|
4421
|
+
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
4422
|
});
|
|
4145
4423
|
var WorkqueueCountInput = z37.array(
|
|
4146
4424
|
z37.object({ slug: z37.string(), query: QueryType })
|
|
@@ -4180,6 +4458,11 @@ var BaseActionInput = z38.object({
|
|
|
4180
4458
|
originalActionId: UUID.optional(),
|
|
4181
4459
|
// should not be part of base action.
|
|
4182
4460
|
keepAssignment: z38.boolean().optional(),
|
|
4461
|
+
keepAssignmentIfAccepted: z38.boolean().optional(),
|
|
4462
|
+
keepAssignmentIfRejected: z38.boolean().optional(),
|
|
4463
|
+
waitFor: z38.boolean().default(true).describe(
|
|
4464
|
+
"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."
|
|
4465
|
+
),
|
|
4183
4466
|
// For normal users, the createdAtLocation is resolved on the backend from the user's primaryOfficeId.
|
|
4184
4467
|
// @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
4468
|
createdAtLocation: UUID.nullish().describe(
|
|
@@ -4359,7 +4642,7 @@ var Draft = z39.object({
|
|
|
4359
4642
|
}).describe(
|
|
4360
4643
|
"A temporary storage for an action. Stored with details of the event, creator and creation time."
|
|
4361
4644
|
);
|
|
4362
|
-
var DraftInput = BaseActionInput.extend({
|
|
4645
|
+
var DraftInput = BaseActionInput.omit({ waitFor: true }).extend({
|
|
4363
4646
|
type: ActionTypes.exclude([ActionTypes.enum.DELETE]),
|
|
4364
4647
|
status: z39.enum([
|
|
4365
4648
|
ActionStatus.Requested,
|
|
@@ -6957,6 +7240,369 @@ var ACTION_FILTERS = {
|
|
|
6957
7240
|
// ../commons/src/events/FileUtils.ts
|
|
6958
7241
|
var import_lodash7 = require("lodash");
|
|
6959
7242
|
|
|
7243
|
+
// ../commons/src/events/mocks.test.utils.ts
|
|
7244
|
+
var V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS = [
|
|
7245
|
+
{
|
|
7246
|
+
id: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7247
|
+
name: "Central",
|
|
7248
|
+
parentId: null,
|
|
7249
|
+
validUntil: null,
|
|
7250
|
+
externalId: "ydyJb1RAy4U1"
|
|
7251
|
+
},
|
|
7252
|
+
{
|
|
7253
|
+
id: "c599b691-fd2d-45e1-abf4-d185de727fb5",
|
|
7254
|
+
name: "Sulaka",
|
|
7255
|
+
parentId: null,
|
|
7256
|
+
validUntil: null,
|
|
7257
|
+
externalId: "pQ8nGxWmZ2Q3"
|
|
7258
|
+
},
|
|
7259
|
+
{
|
|
7260
|
+
id: "7ef2b9c7-5e6d-49f6-ae05-656207d0fc64",
|
|
7261
|
+
name: "Pualula",
|
|
7262
|
+
parentId: null,
|
|
7263
|
+
validUntil: null,
|
|
7264
|
+
externalId: "Aq91DweLmT8k"
|
|
7265
|
+
},
|
|
7266
|
+
{
|
|
7267
|
+
id: "6d1a59df-988c-4021-a846-ccbc021931a7",
|
|
7268
|
+
name: "Chuminga",
|
|
7269
|
+
parentId: null,
|
|
7270
|
+
validUntil: null,
|
|
7271
|
+
externalId: "Rw0fYNh2Xk9a"
|
|
7272
|
+
},
|
|
7273
|
+
{
|
|
7274
|
+
id: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7275
|
+
name: "Ibombo",
|
|
7276
|
+
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7277
|
+
validUntil: null,
|
|
7278
|
+
externalId: "k7DsP4vbN1Qe"
|
|
7279
|
+
},
|
|
7280
|
+
{
|
|
7281
|
+
id: "27160bbd-32d1-4625-812f-860226bfb92a",
|
|
7282
|
+
name: "Isango",
|
|
7283
|
+
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7284
|
+
validUntil: null,
|
|
7285
|
+
externalId: "Gm3Z9eQpHw4L"
|
|
7286
|
+
},
|
|
7287
|
+
{
|
|
7288
|
+
id: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7289
|
+
name: "Isamba",
|
|
7290
|
+
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7291
|
+
validUntil: null,
|
|
7292
|
+
externalId: "sT0xVu1KqJ7r"
|
|
7293
|
+
},
|
|
7294
|
+
{
|
|
7295
|
+
id: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7296
|
+
name: "Itambo",
|
|
7297
|
+
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7298
|
+
validUntil: null,
|
|
7299
|
+
externalId: "Nq6Bv2HpL9Te"
|
|
7300
|
+
},
|
|
7301
|
+
{
|
|
7302
|
+
id: "d42ab2fe-e7ed-470e-8b31-4fb27f9b8250",
|
|
7303
|
+
name: "Ezhi",
|
|
7304
|
+
parentId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7305
|
+
validUntil: null,
|
|
7306
|
+
externalId: "xK8cQ0ZRy5Wd"
|
|
7307
|
+
},
|
|
7308
|
+
{
|
|
7309
|
+
id: "8fbd09d2-212b-47f4-beb3-5e1694931d9f",
|
|
7310
|
+
name: "Ilanga",
|
|
7311
|
+
parentId: "c599b691-fd2d-45e1-abf4-d185de727fb5",
|
|
7312
|
+
validUntil: null,
|
|
7313
|
+
externalId: "Cq4Jm1XvN8Ls"
|
|
7314
|
+
},
|
|
7315
|
+
// Villages under Ibombo (62a0ccb4-880d-4f30-8882-f256007dfff9)
|
|
7316
|
+
{
|
|
7317
|
+
id: "1d4e5f6a-7b8c-4912-8efa-345678901234",
|
|
7318
|
+
name: "Klow",
|
|
7319
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7320
|
+
validUntil: null,
|
|
7321
|
+
externalId: "IkYcYBUcyY2"
|
|
7322
|
+
},
|
|
7323
|
+
{
|
|
7324
|
+
id: "2e5f6a7b-8c9d-4a23-8fab-456789012345",
|
|
7325
|
+
name: "Mbondo",
|
|
7326
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7327
|
+
validUntil: null,
|
|
7328
|
+
externalId: "Qhvv5hvo3mY"
|
|
7329
|
+
},
|
|
7330
|
+
{
|
|
7331
|
+
id: "3f6a7b8c-9d0e-4b34-8abc-567890123456",
|
|
7332
|
+
name: "Ndara",
|
|
7333
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7334
|
+
validUntil: null,
|
|
7335
|
+
externalId: "crXh068O9TR"
|
|
7336
|
+
},
|
|
7337
|
+
{
|
|
7338
|
+
id: "4a7b8c9d-0e1f-4c45-abcd-678901234567",
|
|
7339
|
+
name: "Olani",
|
|
7340
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7341
|
+
validUntil: null,
|
|
7342
|
+
externalId: "r00It8Tvvp7"
|
|
7343
|
+
},
|
|
7344
|
+
{
|
|
7345
|
+
id: "5b8c9d0e-1f2a-4d56-bcde-789012345678",
|
|
7346
|
+
name: "Pemba",
|
|
7347
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7348
|
+
validUntil: null,
|
|
7349
|
+
externalId: "ZnUWsbONIaH"
|
|
7350
|
+
},
|
|
7351
|
+
{
|
|
7352
|
+
id: "6c9d0e1f-2a3b-4e67-8def-890123456789",
|
|
7353
|
+
name: "Quanza",
|
|
7354
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7355
|
+
validUntil: null,
|
|
7356
|
+
externalId: "fDZycvQTa7l"
|
|
7357
|
+
},
|
|
7358
|
+
{
|
|
7359
|
+
id: "7d0e1f2a-3b4c-4f78-8efa-901234567890",
|
|
7360
|
+
name: "Rivka",
|
|
7361
|
+
parentId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7362
|
+
validUntil: null,
|
|
7363
|
+
externalId: "KqswxCGTELa"
|
|
7364
|
+
},
|
|
7365
|
+
// Villages under Isamba (967032fd-3f81-478a-826c-30cb8fe121bd)
|
|
7366
|
+
{
|
|
7367
|
+
id: "8e1f2a3b-4c5d-4089-8fab-012345678901",
|
|
7368
|
+
name: "Mbula",
|
|
7369
|
+
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7370
|
+
validUntil: null,
|
|
7371
|
+
externalId: "osEbKjRc9Kg"
|
|
7372
|
+
},
|
|
7373
|
+
{
|
|
7374
|
+
id: "9f2a3b4c-5d6e-4190-8abf-123456789012",
|
|
7375
|
+
name: "Ndoki",
|
|
7376
|
+
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7377
|
+
validUntil: null,
|
|
7378
|
+
externalId: "aq4daBUAGr3"
|
|
7379
|
+
},
|
|
7380
|
+
{
|
|
7381
|
+
id: "0a3b4c5d-6e7f-4201-abcd-234567890123",
|
|
7382
|
+
name: "Tsanga",
|
|
7383
|
+
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7384
|
+
validUntil: null,
|
|
7385
|
+
externalId: "cqis6Y8trbJ"
|
|
7386
|
+
},
|
|
7387
|
+
{
|
|
7388
|
+
id: "1b4c5d6e-7f8a-4312-bcde-345678901234",
|
|
7389
|
+
name: "Waziri",
|
|
7390
|
+
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7391
|
+
validUntil: null,
|
|
7392
|
+
externalId: "LMijHPyyx6d"
|
|
7393
|
+
},
|
|
7394
|
+
{
|
|
7395
|
+
id: "2c5d6e7f-8a9b-4423-8def-456789012345",
|
|
7396
|
+
name: "Zimbi",
|
|
7397
|
+
parentId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7398
|
+
validUntil: null,
|
|
7399
|
+
externalId: "pcQYbPuKGZ7"
|
|
7400
|
+
},
|
|
7401
|
+
// Villages under Itambo (89a33893-b17d-481d-a26d-6461e7ac1651)
|
|
7402
|
+
{
|
|
7403
|
+
id: "3d6e7f8a-9b0c-4534-8efa-567890123456",
|
|
7404
|
+
name: "Felani",
|
|
7405
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7406
|
+
validUntil: null,
|
|
7407
|
+
externalId: "gSqpoCGdMXp"
|
|
7408
|
+
},
|
|
7409
|
+
{
|
|
7410
|
+
id: "4e7f8a9b-0c1d-4645-8fab-678901234567",
|
|
7411
|
+
name: "Goroma",
|
|
7412
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7413
|
+
validUntil: null,
|
|
7414
|
+
externalId: "KvAAIaNqVrp"
|
|
7415
|
+
},
|
|
7416
|
+
{
|
|
7417
|
+
id: "5f8a9b0c-1d2e-4756-8abc-789012345678",
|
|
7418
|
+
name: "Halifu",
|
|
7419
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7420
|
+
validUntil: null,
|
|
7421
|
+
externalId: "qe4UnEVt1hv"
|
|
7422
|
+
},
|
|
7423
|
+
{
|
|
7424
|
+
id: "6a9b0c1d-2e3f-4867-abcd-890123456789",
|
|
7425
|
+
name: "Jabari",
|
|
7426
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7427
|
+
validUntil: null,
|
|
7428
|
+
externalId: "yHH9Nz4rLOt"
|
|
7429
|
+
},
|
|
7430
|
+
{
|
|
7431
|
+
id: "7b0c1d2e-3f4a-4978-bcde-901234567890",
|
|
7432
|
+
name: "Kifani",
|
|
7433
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7434
|
+
validUntil: null,
|
|
7435
|
+
externalId: "eSWmXIGeu1I"
|
|
7436
|
+
},
|
|
7437
|
+
{
|
|
7438
|
+
id: "8c1d2e3f-4a5b-4089-8def-012345678901",
|
|
7439
|
+
name: "Lumela",
|
|
7440
|
+
parentId: "89a33893-b17d-481d-a26d-6461e7ac1651",
|
|
7441
|
+
validUntil: null,
|
|
7442
|
+
externalId: "bh0b3aI1uP3"
|
|
7443
|
+
}
|
|
7444
|
+
];
|
|
7445
|
+
var V2_DEFAULT_MOCK_LOCATIONS = [
|
|
7446
|
+
{
|
|
7447
|
+
id: "6f6186ce-cd5f-4a5f-810a-2d99e7c4ba12",
|
|
7448
|
+
name: "Central Provincial Office",
|
|
7449
|
+
locationType: "CRVS_OFFICE",
|
|
7450
|
+
administrativeAreaId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7451
|
+
validUntil: null,
|
|
7452
|
+
externalId: "Xr3Df8WpK6Ys"
|
|
7453
|
+
},
|
|
7454
|
+
{
|
|
7455
|
+
id: "b1c2d3e4-f5a6-7890-bcde-f12345678901",
|
|
7456
|
+
name: "Central Health Post",
|
|
7457
|
+
locationType: "HEALTH_FACILITY",
|
|
7458
|
+
administrativeAreaId: "a45b982a-5c7b-4bd9-8fd8-a42d0994054c",
|
|
7459
|
+
validUntil: null
|
|
7460
|
+
},
|
|
7461
|
+
{
|
|
7462
|
+
id: "028d2c85-ca31-426d-b5d1-2cef545a4902",
|
|
7463
|
+
name: "Ibombo District Office",
|
|
7464
|
+
locationType: "CRVS_OFFICE",
|
|
7465
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7466
|
+
validUntil: null,
|
|
7467
|
+
externalId: "Sm4Nw7GrD2Vy"
|
|
7468
|
+
},
|
|
7469
|
+
{
|
|
7470
|
+
id: "62a0ccb4-4f30-4f30-8882-f256007dff9f",
|
|
7471
|
+
name: "Isamba District Office",
|
|
7472
|
+
locationType: "CRVS_OFFICE",
|
|
7473
|
+
administrativeAreaId: "967032fd-3f81-478a-826c-30cb8fe121bd",
|
|
7474
|
+
validUntil: null,
|
|
7475
|
+
externalId: "Vg1Bq5XeH9Lt"
|
|
7476
|
+
},
|
|
7477
|
+
{
|
|
7478
|
+
id: "954c93e1-13f7-4435-bb82-35e0e215e07d",
|
|
7479
|
+
name: "Isango District Office",
|
|
7480
|
+
locationType: "CRVS_OFFICE",
|
|
7481
|
+
administrativeAreaId: "27160bbd-32d1-4625-812f-860226bfb92a",
|
|
7482
|
+
validUntil: null,
|
|
7483
|
+
externalId: "Je7Lm2XqN9Vz"
|
|
7484
|
+
},
|
|
7485
|
+
{
|
|
7486
|
+
id: "2884f5b9-17b4-49ce-bf4d-f538228935df",
|
|
7487
|
+
name: "Sulaka Provincial Office",
|
|
7488
|
+
locationType: "CRVS_OFFICE",
|
|
7489
|
+
administrativeAreaId: "c599b691-fd2d-45e1-abf4-d185de727fb5",
|
|
7490
|
+
validUntil: null,
|
|
7491
|
+
externalId: "Ht2Wp9KcX5Qv"
|
|
7492
|
+
},
|
|
7493
|
+
{
|
|
7494
|
+
id: "030358c6-54af-44be-821b-8e4af963a49c",
|
|
7495
|
+
name: "Ilanga District Office",
|
|
7496
|
+
locationType: "CRVS_OFFICE",
|
|
7497
|
+
administrativeAreaId: "8fbd09d2-212b-47f4-beb3-5e1694931d9f",
|
|
7498
|
+
validUntil: null,
|
|
7499
|
+
externalId: "Yp6Ds1WqN3Xz"
|
|
7500
|
+
},
|
|
7501
|
+
{
|
|
7502
|
+
id: "423d000f-101b-47c0-8b86-21a908067cee",
|
|
7503
|
+
name: "Chamakubi Health Post",
|
|
7504
|
+
locationType: "HEALTH_FACILITY",
|
|
7505
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7506
|
+
validUntil: null,
|
|
7507
|
+
externalId: "M1nFr8LbC2Qy"
|
|
7508
|
+
},
|
|
7509
|
+
{
|
|
7510
|
+
id: "4d3279be-d026-420c-88f7-f0a4ae986973",
|
|
7511
|
+
name: "Ibombo Rural Health Centre",
|
|
7512
|
+
locationType: "HEALTH_FACILITY",
|
|
7513
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7514
|
+
validUntil: null,
|
|
7515
|
+
externalId: "bT7pV6YrW0Xc"
|
|
7516
|
+
},
|
|
7517
|
+
{
|
|
7518
|
+
id: "190902f4-1d77-476a-8947-41145af1db7d",
|
|
7519
|
+
name: "Chikobo Rural Health Centre",
|
|
7520
|
+
locationType: "HEALTH_FACILITY",
|
|
7521
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7522
|
+
validUntil: null,
|
|
7523
|
+
externalId: "zE4qPn2SgJ5d"
|
|
7524
|
+
},
|
|
7525
|
+
{
|
|
7526
|
+
id: "f5ecbd9b-a01e-4a65-910e-70e86ab41b71",
|
|
7527
|
+
name: "Chilochabalenje Health Post",
|
|
7528
|
+
locationType: "HEALTH_FACILITY",
|
|
7529
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7530
|
+
validUntil: null,
|
|
7531
|
+
externalId: "H8vDs1MqR4Uf"
|
|
7532
|
+
},
|
|
7533
|
+
{
|
|
7534
|
+
id: "dbfc178f-7295-4b90-b28d-111c95b03127",
|
|
7535
|
+
name: "Chipeso Rural Health Centre",
|
|
7536
|
+
locationType: "HEALTH_FACILITY",
|
|
7537
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7538
|
+
validUntil: null,
|
|
7539
|
+
externalId: "Qw3uZ9KfX6Lm"
|
|
7540
|
+
},
|
|
7541
|
+
{
|
|
7542
|
+
id: "09862bfe-c7ac-46cd-987b-668681533c80",
|
|
7543
|
+
name: "Chisamba Rural Health Centre",
|
|
7544
|
+
locationType: "HEALTH_FACILITY",
|
|
7545
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7546
|
+
validUntil: null,
|
|
7547
|
+
externalId: "Yr0pCg8LdM2s"
|
|
7548
|
+
},
|
|
7549
|
+
{
|
|
7550
|
+
id: "834ce389-e95b-4fb0-96a0-33e9ab323059",
|
|
7551
|
+
name: "Chitanda Rural Health Centre",
|
|
7552
|
+
locationType: "HEALTH_FACILITY",
|
|
7553
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7554
|
+
validUntil: null,
|
|
7555
|
+
externalId: "tS9gJ4PwB1Qx"
|
|
7556
|
+
},
|
|
7557
|
+
{
|
|
7558
|
+
id: "0431c433-6062-4a4c-aee9-25271aec61ee",
|
|
7559
|
+
name: "Golden Valley Rural Health Centre",
|
|
7560
|
+
locationType: "HEALTH_FACILITY",
|
|
7561
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7562
|
+
validUntil: null,
|
|
7563
|
+
externalId: "Ld7Qm3XsA8Vr"
|
|
7564
|
+
},
|
|
7565
|
+
{
|
|
7566
|
+
id: "bc84d0b6-7ba7-480d-a339-5d9920d90eb2",
|
|
7567
|
+
name: "Ipongo Rural Health Centre",
|
|
7568
|
+
locationType: "HEALTH_FACILITY",
|
|
7569
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7570
|
+
validUntil: null,
|
|
7571
|
+
externalId: "kF2sW9DmH0Bt"
|
|
7572
|
+
},
|
|
7573
|
+
{
|
|
7574
|
+
id: "4cf1f53b-b730-41d2-8649-dff7eeed970d",
|
|
7575
|
+
name: "Itumbwe Health Post",
|
|
7576
|
+
locationType: "HEALTH_FACILITY",
|
|
7577
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7578
|
+
validUntil: null,
|
|
7579
|
+
externalId: "Ue5Xb3VaC7Pq"
|
|
7580
|
+
},
|
|
7581
|
+
{
|
|
7582
|
+
id: "4b3676cb-9355-4942-9eb9-2ce46acaf0e0",
|
|
7583
|
+
name: "Kabangalala Rural Health Centre",
|
|
7584
|
+
locationType: "HEALTH_FACILITY",
|
|
7585
|
+
administrativeAreaId: "62a0ccb4-880d-4f30-8882-f256007dfff9",
|
|
7586
|
+
validUntil: null,
|
|
7587
|
+
externalId: "Pz8Kc1TqH6Jn"
|
|
7588
|
+
},
|
|
7589
|
+
// Village offices
|
|
7590
|
+
{
|
|
7591
|
+
id: "1f4a5b6c-7d8e-4312-8abc-345678901234",
|
|
7592
|
+
name: "Klow Village Office",
|
|
7593
|
+
locationType: "CRVS_OFFICE",
|
|
7594
|
+
administrativeAreaId: "1d4e5f6a-7b8c-4912-8efa-345678901234",
|
|
7595
|
+
validUntil: null,
|
|
7596
|
+
externalId: "PmAyxAJkxiJ"
|
|
7597
|
+
}
|
|
7598
|
+
];
|
|
7599
|
+
var V2_DEFAULT_MOCK_LOCATIONS_MAP = new Map(
|
|
7600
|
+
V2_DEFAULT_MOCK_LOCATIONS.map((l) => [l.id, l])
|
|
7601
|
+
);
|
|
7602
|
+
var V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS_MAP = new Map(
|
|
7603
|
+
V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS.map((a) => [a.id, a])
|
|
7604
|
+
);
|
|
7605
|
+
|
|
6960
7606
|
// ../commons/src/notification/UserNotifications.ts
|
|
6961
7607
|
var z44 = __toESM(require("zod/v4"));
|
|
6962
7608
|
var TriggerEvent = {
|