@opencrvs/toolkit 2.0.0-rc.fe94e41 → 2.0.0-rc.fea498b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/application-config/index.js +51 -33
- package/dist/cli.js +9 -3
- package/dist/commons/api/router.d.ts +26 -17
- package/dist/commons/application-config/index.d.ts +1 -0
- package/dist/commons/conditionals/conditionals.d.ts +348 -4
- package/dist/commons/conditionals/validate.d.ts +51 -2
- package/dist/commons/events/ActionConfig.d.ts +37 -2
- package/dist/commons/events/AdvancedSearchConfig.d.ts +342 -0
- package/dist/commons/events/FieldConfig.d.ts +378 -50
- package/dist/commons/events/FieldType.d.ts +1 -0
- package/dist/commons/events/FieldTypeMapping.d.ts +1 -1
- package/dist/commons/events/FieldValue.d.ts +6 -0
- package/dist/commons/events/field.d.ts +53 -1
- package/dist/commons/events/state/utils.d.ts +12 -290
- package/dist/commons/events/utils.d.ts +1 -1
- package/dist/conditionals/index.js +48 -1
- package/dist/events/index.js +335 -145
- package/dist/migrations/v2.0/index.js +9 -3
- package/dist/notification/index.js +222 -37
- package/dist/scopes/index.d.ts +4 -6
- package/dist/scopes/index.js +9 -3
- package/opencrvs-toolkit-2.0.0-rc.fea498b.tgz +0 -0
- package/package.json +1 -1
- package/opencrvs-toolkit-2.0.0-rc.fe94e41.tgz +0 -0
|
@@ -206,6 +206,11 @@ var FieldTypesToHideInReview = [
|
|
|
206
206
|
FieldType.ALPHA_PRINT_BUTTON,
|
|
207
207
|
FieldType.ALPHA_HIDDEN
|
|
208
208
|
];
|
|
209
|
+
var HiddenFieldTypes = [
|
|
210
|
+
FieldType.HTTP,
|
|
211
|
+
FieldType.QUERY_PARAM_READER,
|
|
212
|
+
FieldType.ALPHA_HIDDEN
|
|
213
|
+
];
|
|
209
214
|
|
|
210
215
|
// ../commons/src/events/FieldValue.ts
|
|
211
216
|
var z7 = __toESM(require("zod/v4"));
|
|
@@ -324,7 +329,7 @@ var PlainDate = import_zod.z.string().date().brand("PlainDate").describe("Date i
|
|
|
324
329
|
// ../commons/src/events/FieldValue.ts
|
|
325
330
|
var TextValue = z7.string();
|
|
326
331
|
var HiddenFieldValue = z7.string();
|
|
327
|
-
var NonEmptyTextValue =
|
|
332
|
+
var NonEmptyTextValue = z7.string().trim().min(1);
|
|
328
333
|
var DateValue = z7.iso.date().describe("Date in the format YYYY-MM-DD");
|
|
329
334
|
var AgeValue = z7.object({
|
|
330
335
|
age: z7.number(),
|
|
@@ -353,6 +358,7 @@ var DateRangeFieldValue = z7.object({
|
|
|
353
358
|
var EmailValue = z7.email();
|
|
354
359
|
var CheckboxFieldValue = z7.boolean();
|
|
355
360
|
var NumberFieldValue = z7.number();
|
|
361
|
+
var SignatureFieldValue = FileFieldValue;
|
|
356
362
|
var ButtonFieldValue = z7.number();
|
|
357
363
|
var VerificationStatusValue = z7.enum([
|
|
358
364
|
"verified",
|
|
@@ -1411,8 +1417,18 @@ var FieldReference = import_v43.default.object({
|
|
|
1411
1417
|
$$field: FieldId.describe("Id of the field to reference"),
|
|
1412
1418
|
$$subfield: import_v43.default.array(import_v43.default.string()).optional().default([]).describe(
|
|
1413
1419
|
'If the FieldValue is an object, subfield can be used to refer to e.g. `["foo", "bar"]` in `{ foo: { bar: 3 } }`'
|
|
1420
|
+
),
|
|
1421
|
+
$$code: import_v43.default.string().optional().describe(
|
|
1422
|
+
"Serialised client-side function body. When present the expression is evaluated rather than dereferenced."
|
|
1423
|
+
)
|
|
1424
|
+
}).describe(
|
|
1425
|
+
"Reference to a field value, with an optional client-side computation applied."
|
|
1426
|
+
);
|
|
1427
|
+
var ComputedDefaultValue = import_v43.default.object({
|
|
1428
|
+
$$code: import_v43.default.string().describe(
|
|
1429
|
+
"Serialised client-side function body. Receives (undefined, context) where context includes $now, $online, and system variables."
|
|
1414
1430
|
)
|
|
1415
|
-
}).describe("
|
|
1431
|
+
}).describe("A context-only computation used as a field default value.");
|
|
1416
1432
|
var ValidationConfig = import_v43.default.object({
|
|
1417
1433
|
validator: Conditional.describe(
|
|
1418
1434
|
"Conditional expression that must hold for the field value to be considered valid."
|
|
@@ -1453,7 +1469,7 @@ var BaseField = import_v43.default.object({
|
|
|
1453
1469
|
"Indicates whether the field can be modified during record correction."
|
|
1454
1470
|
),
|
|
1455
1471
|
value: FieldReference.or(import_v43.default.array(FieldReference)).optional().describe(
|
|
1456
|
-
"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."
|
|
1472
|
+
"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."
|
|
1457
1473
|
),
|
|
1458
1474
|
analytics: import_v43.default.boolean().default(false).optional().describe(
|
|
1459
1475
|
"Indicates whether the field is included in analytics. When enabled, its value becomes available in the analytics dashboard."
|
|
@@ -1467,7 +1483,7 @@ var Divider = BaseField.extend({
|
|
|
1467
1483
|
});
|
|
1468
1484
|
var TextField = BaseField.extend({
|
|
1469
1485
|
type: import_v43.default.literal(FieldType.TEXT),
|
|
1470
|
-
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
|
|
1486
|
+
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField, ComputedDefaultValue]).optional(),
|
|
1471
1487
|
configuration: import_v43.default.object({
|
|
1472
1488
|
maxLength: import_v43.default.number().optional().describe("Maximum length of the text"),
|
|
1473
1489
|
type: import_v43.default.enum(["text", "password"]).optional(),
|
|
@@ -1480,10 +1496,11 @@ var TextField = BaseField.extend({
|
|
|
1480
1496
|
});
|
|
1481
1497
|
var NumberField = BaseField.extend({
|
|
1482
1498
|
type: import_v43.default.literal(FieldType.NUMBER),
|
|
1483
|
-
defaultValue: NumberFieldValue.optional(),
|
|
1499
|
+
defaultValue: NumberFieldValue.or(ComputedDefaultValue).optional(),
|
|
1484
1500
|
configuration: import_v43.default.object({
|
|
1485
1501
|
min: import_v43.default.number().optional().describe("Minimum value"),
|
|
1486
1502
|
max: import_v43.default.number().optional().describe("Maximum value"),
|
|
1503
|
+
integer: import_v43.default.boolean().optional().describe("When true, only whole numbers are allowed"),
|
|
1487
1504
|
prefix: TranslationConfig.optional(),
|
|
1488
1505
|
postfix: TranslationConfig.optional()
|
|
1489
1506
|
}).optional()
|
|
@@ -1493,7 +1510,7 @@ var NumberField = BaseField.extend({
|
|
|
1493
1510
|
});
|
|
1494
1511
|
var TextAreaField = BaseField.extend({
|
|
1495
1512
|
type: import_v43.default.literal(FieldType.TEXTAREA),
|
|
1496
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
1513
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1497
1514
|
configuration: import_v43.default.object({
|
|
1498
1515
|
maxLength: import_v43.default.number().optional().describe("Maximum length of the text"),
|
|
1499
1516
|
rows: import_v43.default.number().optional().describe("Number of visible text lines"),
|
|
@@ -1527,7 +1544,7 @@ var SignatureField = BaseField.extend({
|
|
|
1527
1544
|
signaturePromptLabel: TranslationConfig.describe(
|
|
1528
1545
|
"Title of the signature modal"
|
|
1529
1546
|
),
|
|
1530
|
-
defaultValue:
|
|
1547
|
+
defaultValue: SignatureFieldValue.or(ComputedDefaultValue).optional(),
|
|
1531
1548
|
configuration: import_v43.default.object({
|
|
1532
1549
|
maxFileSize: import_v43.default.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
|
|
1533
1550
|
acceptedFileTypes: MimeType.array().optional().describe("List of allowed file formats for the signature")
|
|
@@ -1543,14 +1560,14 @@ var EmailField = BaseField.extend({
|
|
|
1543
1560
|
configuration: import_v43.default.object({
|
|
1544
1561
|
maxLength: import_v43.default.number().optional().describe("Maximum length of the text")
|
|
1545
1562
|
}).default({ maxLength: 255 }).optional(),
|
|
1546
|
-
defaultValue: NonEmptyTextValue.optional()
|
|
1563
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional()
|
|
1547
1564
|
}).meta({
|
|
1548
1565
|
description: "An email input field",
|
|
1549
1566
|
id: "EmailField"
|
|
1550
1567
|
});
|
|
1551
1568
|
var DateField = BaseField.extend({
|
|
1552
1569
|
type: import_v43.default.literal(FieldType.DATE),
|
|
1553
|
-
defaultValue: SerializedNowDateTime.or(PlainDate).optional().describe("Default date value(yyyy-MM-dd)"),
|
|
1570
|
+
defaultValue: SerializedNowDateTime.or(PlainDate).or(ComputedDefaultValue).optional().describe("Default date value(yyyy-MM-dd)"),
|
|
1554
1571
|
configuration: import_v43.default.object({
|
|
1555
1572
|
notice: TranslationConfig.describe(
|
|
1556
1573
|
"Text to display above the date input"
|
|
@@ -1562,7 +1579,7 @@ var DateField = BaseField.extend({
|
|
|
1562
1579
|
});
|
|
1563
1580
|
var AgeField = BaseField.extend({
|
|
1564
1581
|
type: import_v43.default.literal(FieldType.AGE),
|
|
1565
|
-
defaultValue: NumberFieldValue.optional(),
|
|
1582
|
+
defaultValue: NumberFieldValue.or(ComputedDefaultValue).optional(),
|
|
1566
1583
|
configuration: import_v43.default.object({
|
|
1567
1584
|
asOfDate: FieldReference,
|
|
1568
1585
|
prefix: TranslationConfig.optional(),
|
|
@@ -1574,7 +1591,7 @@ var AgeField = BaseField.extend({
|
|
|
1574
1591
|
});
|
|
1575
1592
|
var TimeField = BaseField.extend({
|
|
1576
1593
|
type: import_v43.default.literal(FieldType.TIME),
|
|
1577
|
-
defaultValue: SerializedNowDateTime.or(TimeValue).optional().describe("Default time value (HH-mm)"),
|
|
1594
|
+
defaultValue: SerializedNowDateTime.or(TimeValue).or(ComputedDefaultValue).optional().describe("Default time value (HH-mm)"),
|
|
1578
1595
|
configuration: import_v43.default.object({
|
|
1579
1596
|
use12HourFormat: import_v43.default.boolean().optional().describe("Whether to use 12-hour format"),
|
|
1580
1597
|
notice: TranslationConfig.describe(
|
|
@@ -1587,7 +1604,7 @@ var TimeField = BaseField.extend({
|
|
|
1587
1604
|
});
|
|
1588
1605
|
var DateRangeField = BaseField.extend({
|
|
1589
1606
|
type: import_v43.default.literal(FieldType.DATE_RANGE),
|
|
1590
|
-
defaultValue: DateRangeFieldValue.optional(),
|
|
1607
|
+
defaultValue: DateRangeFieldValue.or(ComputedDefaultValue).optional(),
|
|
1591
1608
|
configuration: import_v43.default.object({
|
|
1592
1609
|
notice: TranslationConfig.describe(
|
|
1593
1610
|
"Text to display above the date input"
|
|
@@ -1666,7 +1683,7 @@ var PageHeader = BaseField.extend({
|
|
|
1666
1683
|
});
|
|
1667
1684
|
var File = BaseField.extend({
|
|
1668
1685
|
type: import_v43.default.literal(FieldType.FILE),
|
|
1669
|
-
defaultValue: FileFieldValue.optional(),
|
|
1686
|
+
defaultValue: FileFieldValue.or(ComputedDefaultValue).optional(),
|
|
1670
1687
|
configuration: import_v43.default.object({
|
|
1671
1688
|
maxFileSize: import_v43.default.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
|
|
1672
1689
|
acceptedFileTypes: MimeType.array().optional().describe("List of allowed file formats for the signature"),
|
|
@@ -1693,7 +1710,7 @@ var SelectOption = import_v43.default.object({
|
|
|
1693
1710
|
});
|
|
1694
1711
|
var NumberWithUnitField = BaseField.extend({
|
|
1695
1712
|
type: import_v43.default.literal(FieldType.NUMBER_WITH_UNIT),
|
|
1696
|
-
defaultValue: NumberWithUnitFieldValue.optional(),
|
|
1713
|
+
defaultValue: NumberWithUnitFieldValue.or(ComputedDefaultValue).optional(),
|
|
1697
1714
|
options: import_v43.default.array(SelectOption).describe("A list of options for the unit select"),
|
|
1698
1715
|
configuration: import_v43.default.object({
|
|
1699
1716
|
min: import_v43.default.number().optional().describe("Minimum value of the number field"),
|
|
@@ -1708,7 +1725,7 @@ var NumberWithUnitField = BaseField.extend({
|
|
|
1708
1725
|
});
|
|
1709
1726
|
var RadioGroup = BaseField.extend({
|
|
1710
1727
|
type: import_v43.default.literal(FieldType.RADIO_GROUP),
|
|
1711
|
-
defaultValue: TextValue.optional(),
|
|
1728
|
+
defaultValue: TextValue.or(ComputedDefaultValue).optional(),
|
|
1712
1729
|
options: import_v43.default.array(SelectOption).describe("A list of options"),
|
|
1713
1730
|
configuration: import_v43.default.object({
|
|
1714
1731
|
styles: import_v43.default.object({
|
|
@@ -1733,7 +1750,7 @@ var BulletList = BaseField.extend({
|
|
|
1733
1750
|
});
|
|
1734
1751
|
var Select = BaseField.extend({
|
|
1735
1752
|
type: import_v43.default.literal(FieldType.SELECT),
|
|
1736
|
-
defaultValue: TextValue.optional(),
|
|
1753
|
+
defaultValue: TextValue.or(ComputedDefaultValue).optional(),
|
|
1737
1754
|
options: import_v43.default.array(SelectOption).describe("A list of options"),
|
|
1738
1755
|
noOptionsMessage: TranslationConfig.optional().describe(
|
|
1739
1756
|
`
|
|
@@ -1755,7 +1772,7 @@ var SelectDateRangeOption = import_v43.default.object({
|
|
|
1755
1772
|
});
|
|
1756
1773
|
var SelectDateRangeField = BaseField.extend({
|
|
1757
1774
|
type: import_v43.default.literal(FieldType.SELECT_DATE_RANGE),
|
|
1758
|
-
defaultValue: SelectDateRangeValue.optional(),
|
|
1775
|
+
defaultValue: SelectDateRangeValue.or(ComputedDefaultValue).optional(),
|
|
1759
1776
|
options: import_v43.default.array(SelectDateRangeOption).describe("A list of options")
|
|
1760
1777
|
}).meta({
|
|
1761
1778
|
description: "A date range selection field",
|
|
@@ -1772,7 +1789,7 @@ var NameField = BaseField.extend({
|
|
|
1772
1789
|
firstname: SerializedUserField.or(NonEmptyTextValue).optional(),
|
|
1773
1790
|
middlename: SerializedUserField.or(NonEmptyTextValue).optional(),
|
|
1774
1791
|
surname: SerializedUserField.or(NonEmptyTextValue).optional()
|
|
1775
|
-
}).optional(),
|
|
1792
|
+
}).or(ComputedDefaultValue).optional(),
|
|
1776
1793
|
configuration: import_v43.default.object({
|
|
1777
1794
|
name: NameConfig.default({
|
|
1778
1795
|
firstname: { required: true },
|
|
@@ -1796,14 +1813,14 @@ var NameField = BaseField.extend({
|
|
|
1796
1813
|
id: "NameField"
|
|
1797
1814
|
});
|
|
1798
1815
|
var PhoneField = BaseField.extend({
|
|
1799
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
1816
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1800
1817
|
type: import_v43.default.literal(FieldType.PHONE)
|
|
1801
1818
|
}).meta({
|
|
1802
1819
|
description: "A field for entering a phone number",
|
|
1803
1820
|
id: "PhoneField"
|
|
1804
1821
|
});
|
|
1805
1822
|
var IdField = BaseField.extend({
|
|
1806
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
1823
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1807
1824
|
type: import_v43.default.literal(FieldType.ID)
|
|
1808
1825
|
}).meta({
|
|
1809
1826
|
description: "A field for entering an ID",
|
|
@@ -1811,14 +1828,14 @@ var IdField = BaseField.extend({
|
|
|
1811
1828
|
});
|
|
1812
1829
|
var Checkbox = BaseField.extend({
|
|
1813
1830
|
type: import_v43.default.literal(FieldType.CHECKBOX),
|
|
1814
|
-
defaultValue: CheckboxFieldValue.default(false)
|
|
1831
|
+
defaultValue: CheckboxFieldValue.or(ComputedDefaultValue).default(false)
|
|
1815
1832
|
}).meta({
|
|
1816
1833
|
description: "A boolean checkbox field",
|
|
1817
1834
|
id: "Checkbox"
|
|
1818
1835
|
});
|
|
1819
1836
|
var Country = BaseField.extend({
|
|
1820
1837
|
type: import_v43.default.literal(FieldType.COUNTRY),
|
|
1821
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
1838
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1822
1839
|
optionOverrides: import_v43.default.array(SelectOption.omit({ label: true })).optional().describe(
|
|
1823
1840
|
"Conditionals for specific countries. Countries not listed are always shown and enabled."
|
|
1824
1841
|
)
|
|
@@ -1836,7 +1853,7 @@ var AdministrativeAreas = import_v43.default.enum([
|
|
|
1836
1853
|
]);
|
|
1837
1854
|
var AdministrativeAreaField = BaseField.extend({
|
|
1838
1855
|
type: import_v43.default.literal(FieldType.ADMINISTRATIVE_AREA),
|
|
1839
|
-
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
|
|
1856
|
+
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField, ComputedDefaultValue]).optional(),
|
|
1840
1857
|
configuration: import_v43.default.object({
|
|
1841
1858
|
partOf: FieldReference.optional().describe("Parent location"),
|
|
1842
1859
|
type: AdministrativeAreas,
|
|
@@ -1848,7 +1865,7 @@ var AdministrativeAreaField = BaseField.extend({
|
|
|
1848
1865
|
});
|
|
1849
1866
|
var LocationInput = BaseField.extend({
|
|
1850
1867
|
type: import_v43.default.literal(FieldType.LOCATION),
|
|
1851
|
-
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField]).optional(),
|
|
1868
|
+
defaultValue: import_v43.default.union([NonEmptyTextValue, SerializedUserField, ComputedDefaultValue]).optional(),
|
|
1852
1869
|
configuration: import_v43.default.object({
|
|
1853
1870
|
locationTypes: import_v43.default.array(import_v43.default.string()).optional().describe("Types of the locations that are available for selection."),
|
|
1854
1871
|
allowedLocations: AllowedLocations
|
|
@@ -1860,7 +1877,7 @@ var LocationInput = BaseField.extend({
|
|
|
1860
1877
|
var FileUploadWithOptions = BaseField.extend({
|
|
1861
1878
|
type: import_v43.default.literal(FieldType.FILE_WITH_OPTIONS),
|
|
1862
1879
|
options: import_v43.default.array(SelectOption).describe("A list of options"),
|
|
1863
|
-
defaultValue: FileFieldWithOptionValue.optional(),
|
|
1880
|
+
defaultValue: FileFieldWithOptionValue.or(ComputedDefaultValue).optional(),
|
|
1864
1881
|
configuration: import_v43.default.object({
|
|
1865
1882
|
maxFileSize: import_v43.default.number().describe("Maximum file size in bytes").default(DEFAULT_MAX_FILE_SIZE_BYTES),
|
|
1866
1883
|
maxImageSize: import_v43.default.object({
|
|
@@ -1876,12 +1893,12 @@ var FileUploadWithOptions = BaseField.extend({
|
|
|
1876
1893
|
});
|
|
1877
1894
|
var Facility = BaseField.extend({
|
|
1878
1895
|
type: import_v43.default.literal(FieldType.FACILITY),
|
|
1879
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
1896
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1880
1897
|
configuration: import_v43.default.object({ allowedLocations: AllowedLocations }).optional()
|
|
1881
1898
|
}).describe("Input field for a facility");
|
|
1882
1899
|
var Office = BaseField.extend({
|
|
1883
1900
|
type: import_v43.default.literal(FieldType.OFFICE),
|
|
1884
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
1901
|
+
defaultValue: NonEmptyTextValue.or(ComputedDefaultValue).optional(),
|
|
1885
1902
|
configuration: import_v43.default.object({ allowedLocations: AllowedLocations }).optional()
|
|
1886
1903
|
}).describe("Input field for an office");
|
|
1887
1904
|
var DefaultAddressFieldValue = DomesticAddressFieldValue.extend({
|
|
@@ -1917,7 +1934,7 @@ var Address = BaseField.extend({
|
|
|
1917
1934
|
).optional(),
|
|
1918
1935
|
allowedLocations: AllowedLocations
|
|
1919
1936
|
}).optional(),
|
|
1920
|
-
defaultValue: DefaultAddressFieldValue.optional()
|
|
1937
|
+
defaultValue: DefaultAddressFieldValue.or(ComputedDefaultValue).optional()
|
|
1921
1938
|
}).meta({
|
|
1922
1939
|
description: "Address input field \u2013 a combination of location and text fields",
|
|
1923
1940
|
id: "Address"
|
|
@@ -1964,7 +1981,7 @@ var ButtonConfiguration = import_v43.default.object({
|
|
|
1964
1981
|
});
|
|
1965
1982
|
var ButtonField = BaseField.extend({
|
|
1966
1983
|
type: import_v43.default.literal(FieldType.BUTTON),
|
|
1967
|
-
defaultValue: ButtonFieldValue.optional(),
|
|
1984
|
+
defaultValue: ButtonFieldValue.or(ComputedDefaultValue).optional(),
|
|
1968
1985
|
configuration: ButtonConfiguration
|
|
1969
1986
|
}).meta({
|
|
1970
1987
|
description: "A generic button that can be used to trigger an action",
|
|
@@ -1992,7 +2009,7 @@ var AlphaPrintButton = BaseField.extend({
|
|
|
1992
2009
|
});
|
|
1993
2010
|
var HttpField = BaseField.extend({
|
|
1994
2011
|
type: import_v43.default.literal(FieldType.HTTP),
|
|
1995
|
-
defaultValue: HttpFieldValue.optional(),
|
|
2012
|
+
defaultValue: HttpFieldValue.or(ComputedDefaultValue).optional(),
|
|
1996
2013
|
configuration: import_v43.default.object({
|
|
1997
2014
|
trigger: FieldReference.optional().describe(
|
|
1998
2015
|
"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."
|
|
@@ -2078,7 +2095,7 @@ var LinkButtonField = BaseField.extend({
|
|
|
2078
2095
|
});
|
|
2079
2096
|
var VerificationStatus = BaseField.extend({
|
|
2080
2097
|
type: import_v43.default.literal(FieldType.VERIFICATION_STATUS),
|
|
2081
|
-
defaultValue: VerificationStatusValue.optional(),
|
|
2098
|
+
defaultValue: VerificationStatusValue.or(ComputedDefaultValue).optional(),
|
|
2082
2099
|
configuration: import_v43.default.object({
|
|
2083
2100
|
status: TranslationConfig.describe("Text to display on the status pill."),
|
|
2084
2101
|
description: TranslationConfig.describe(
|
|
@@ -2100,7 +2117,7 @@ var QueryParamReaderField = BaseField.extend({
|
|
|
2100
2117
|
});
|
|
2101
2118
|
var QrReaderField = BaseField.extend({
|
|
2102
2119
|
type: import_v43.default.literal(FieldType.QR_READER),
|
|
2103
|
-
defaultValue: QrReaderFieldValue.optional(),
|
|
2120
|
+
defaultValue: QrReaderFieldValue.or(ComputedDefaultValue).optional(),
|
|
2104
2121
|
configuration: import_v43.default.object({
|
|
2105
2122
|
validator: import_v43.default.any().meta({
|
|
2106
2123
|
description: "JSON Schema to validate the scanned QR code data against before populating the form fields.",
|
|
@@ -2113,7 +2130,7 @@ var QrReaderField = BaseField.extend({
|
|
|
2113
2130
|
});
|
|
2114
2131
|
var IdReaderField = BaseField.extend({
|
|
2115
2132
|
type: import_v43.default.literal(FieldType.ID_READER),
|
|
2116
|
-
defaultValue: IdReaderFieldValue.optional(),
|
|
2133
|
+
defaultValue: IdReaderFieldValue.or(ComputedDefaultValue).optional(),
|
|
2117
2134
|
methods: import_v43.default.array(
|
|
2118
2135
|
import_v43.default.union([QrReaderField, LinkButtonField]).describe("Methods for reading an ID")
|
|
2119
2136
|
)
|
|
@@ -2274,6 +2291,7 @@ var ClientConfig = z20.object({
|
|
|
2274
2291
|
COUNTRY: z20.string(),
|
|
2275
2292
|
LANGUAGES: z20.array(z20.string()),
|
|
2276
2293
|
SENTRY: z20.string().optional(),
|
|
2294
|
+
LOGIN_URL: z20.string().optional(),
|
|
2277
2295
|
REGISTER_BACKGROUND: BackgroundConfig,
|
|
2278
2296
|
DASHBOARDS: z20.array(
|
|
2279
2297
|
z20.object({
|
package/dist/cli.js
CHANGED
|
@@ -2382,14 +2382,20 @@ var encodeScope = (scope) => {
|
|
|
2382
2382
|
encode: false
|
|
2383
2383
|
});
|
|
2384
2384
|
};
|
|
2385
|
-
var
|
|
2386
|
-
|
|
2385
|
+
var decodedScopeCache = /* @__PURE__ */ new Map();
|
|
2386
|
+
var decodeScope = (encodedScope) => {
|
|
2387
|
+
if (decodedScopeCache.has(encodedScope)) {
|
|
2388
|
+
return decodedScopeCache.get(encodedScope);
|
|
2389
|
+
}
|
|
2390
|
+
const scope = qs.parse(encodedScope, {
|
|
2387
2391
|
ignoreQueryPrefix: true,
|
|
2388
2392
|
comma: true,
|
|
2389
2393
|
allowDots: true
|
|
2390
2394
|
});
|
|
2391
2395
|
const unflattenedScope = unflattenScope(scope);
|
|
2392
|
-
|
|
2396
|
+
const result = Scope2.safeParse(unflattenedScope)?.data;
|
|
2397
|
+
decodedScopeCache.set(encodedScope, result);
|
|
2398
|
+
return result;
|
|
2393
2399
|
};
|
|
2394
2400
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
2395
2401
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
@@ -417,7 +417,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
417
417
|
createdByUserType: "system" | "user";
|
|
418
418
|
createdAt: string;
|
|
419
419
|
createdBy: string;
|
|
420
|
-
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "
|
|
420
|
+
type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
|
|
421
421
|
status: "Rejected";
|
|
422
422
|
createdByRole?: string | undefined;
|
|
423
423
|
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
@@ -729,7 +729,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
729
729
|
createdByUserType: "system" | "user";
|
|
730
730
|
createdAt: string;
|
|
731
731
|
createdBy: string;
|
|
732
|
-
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "
|
|
732
|
+
type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
|
|
733
733
|
status: "Rejected";
|
|
734
734
|
createdByRole?: string | undefined;
|
|
735
735
|
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
@@ -1040,7 +1040,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1040
1040
|
createdByUserType: "system" | "user";
|
|
1041
1041
|
createdAt: string;
|
|
1042
1042
|
createdBy: string;
|
|
1043
|
-
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "
|
|
1043
|
+
type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
|
|
1044
1044
|
status: "Rejected";
|
|
1045
1045
|
createdByRole?: string | undefined;
|
|
1046
1046
|
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
@@ -1090,7 +1090,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1090
1090
|
transactionId: string;
|
|
1091
1091
|
createdAt: string;
|
|
1092
1092
|
action: {
|
|
1093
|
-
type: "
|
|
1093
|
+
type: "CREATE" | "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "DUPLICATE_DETECTED" | "REJECT" | "MARK_AS_DUPLICATE" | "MARK_AS_NOT_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN" | "CUSTOM";
|
|
1094
1094
|
transactionId: string;
|
|
1095
1095
|
createdByUserType: "system" | "user";
|
|
1096
1096
|
createdAt: string;
|
|
@@ -1109,7 +1109,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1109
1109
|
input: {
|
|
1110
1110
|
transactionId: string;
|
|
1111
1111
|
eventId: string;
|
|
1112
|
-
type: "
|
|
1112
|
+
type: "CREATE" | "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "DUPLICATE_DETECTED" | "REJECT" | "MARK_AS_DUPLICATE" | "MARK_AS_NOT_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN" | "CUSTOM";
|
|
1113
1113
|
status: "Requested" | "Accepted" | "Rejected";
|
|
1114
1114
|
createdAtLocation?: string | null | undefined;
|
|
1115
1115
|
declaration?: Record<string, unknown> | undefined;
|
|
@@ -1125,7 +1125,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1125
1125
|
transactionId: string;
|
|
1126
1126
|
createdAt: string;
|
|
1127
1127
|
action: {
|
|
1128
|
-
type: "
|
|
1128
|
+
type: "CREATE" | "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "DUPLICATE_DETECTED" | "REJECT" | "MARK_AS_DUPLICATE" | "MARK_AS_NOT_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN" | "CUSTOM";
|
|
1129
1129
|
transactionId: string;
|
|
1130
1130
|
createdByUserType: "system" | "user";
|
|
1131
1131
|
createdAt: string;
|
|
@@ -1788,7 +1788,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1788
1788
|
createdByUserType: "system" | "user";
|
|
1789
1789
|
createdAt: string;
|
|
1790
1790
|
createdBy: string;
|
|
1791
|
-
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "
|
|
1791
|
+
type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
|
|
1792
1792
|
status: "Rejected";
|
|
1793
1793
|
createdByRole?: string | undefined;
|
|
1794
1794
|
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
@@ -2131,7 +2131,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2131
2131
|
createdByUserType: "system" | "user";
|
|
2132
2132
|
createdAt: string;
|
|
2133
2133
|
createdBy: string;
|
|
2134
|
-
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "
|
|
2134
|
+
type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
|
|
2135
2135
|
status: "Rejected";
|
|
2136
2136
|
createdByRole?: string | undefined;
|
|
2137
2137
|
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
@@ -4217,7 +4217,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4217
4217
|
createdByUserType: "system" | "user";
|
|
4218
4218
|
createdAt: string;
|
|
4219
4219
|
createdBy: string;
|
|
4220
|
-
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "
|
|
4220
|
+
type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
|
|
4221
4221
|
status: "Rejected";
|
|
4222
4222
|
createdByRole?: string | undefined;
|
|
4223
4223
|
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
@@ -4828,7 +4828,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4828
4828
|
createdByUserType: "system" | "user";
|
|
4829
4829
|
createdAt: string;
|
|
4830
4830
|
createdBy: string;
|
|
4831
|
-
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "
|
|
4831
|
+
type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
|
|
4832
4832
|
status: "Rejected";
|
|
4833
4833
|
createdByRole?: string | undefined;
|
|
4834
4834
|
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
@@ -5149,7 +5149,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
5149
5149
|
createdByUserType: "system" | "user";
|
|
5150
5150
|
createdAt: string;
|
|
5151
5151
|
createdBy: string;
|
|
5152
|
-
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "
|
|
5152
|
+
type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
|
|
5153
5153
|
status: "Rejected";
|
|
5154
5154
|
createdByRole?: string | undefined;
|
|
5155
5155
|
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
@@ -6403,7 +6403,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
6403
6403
|
createdByUserType: "system" | "user";
|
|
6404
6404
|
createdAt: string;
|
|
6405
6405
|
createdBy: string;
|
|
6406
|
-
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "
|
|
6406
|
+
type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
|
|
6407
6407
|
status: "Rejected";
|
|
6408
6408
|
createdByRole?: string | undefined;
|
|
6409
6409
|
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
@@ -6723,7 +6723,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
6723
6723
|
createdByUserType: "system" | "user";
|
|
6724
6724
|
createdAt: string;
|
|
6725
6725
|
createdBy: string;
|
|
6726
|
-
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "
|
|
6726
|
+
type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
|
|
6727
6727
|
status: "Rejected";
|
|
6728
6728
|
createdByRole?: string | undefined;
|
|
6729
6729
|
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
@@ -7086,7 +7086,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
7086
7086
|
createdByUserType: "system" | "user";
|
|
7087
7087
|
createdAt: string;
|
|
7088
7088
|
createdBy: string;
|
|
7089
|
-
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "
|
|
7089
|
+
type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
|
|
7090
7090
|
status: "Rejected";
|
|
7091
7091
|
createdByRole?: string | undefined;
|
|
7092
7092
|
createdBySignature?: string | null | undefined;
|
|
@@ -7304,7 +7304,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
7304
7304
|
count?: number | undefined;
|
|
7305
7305
|
timeStart?: string | undefined;
|
|
7306
7306
|
timeEnd?: string | undefined;
|
|
7307
|
-
actionTypes?: ("
|
|
7307
|
+
actionTypes?: ("CREATE" | "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "DUPLICATE_DETECTED" | "REJECT" | "MARK_AS_DUPLICATE" | "MARK_AS_NOT_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN" | "CUSTOM")[] | undefined;
|
|
7308
7308
|
};
|
|
7309
7309
|
output: {
|
|
7310
7310
|
results: {
|
|
@@ -7374,9 +7374,18 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
7374
7374
|
output: void;
|
|
7375
7375
|
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
7376
7376
|
}>;
|
|
7377
|
-
|
|
7377
|
+
requestEmailChange: import("@trpc/server").TRPCMutationProcedure<{
|
|
7378
7378
|
input: {
|
|
7379
|
-
|
|
7379
|
+
email: string;
|
|
7380
|
+
};
|
|
7381
|
+
output: {
|
|
7382
|
+
nonce: string;
|
|
7383
|
+
};
|
|
7384
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
7385
|
+
}>;
|
|
7386
|
+
requestPhoneChange: import("@trpc/server").TRPCMutationProcedure<{
|
|
7387
|
+
input: {
|
|
7388
|
+
phoneNumber: string;
|
|
7380
7389
|
};
|
|
7381
7390
|
output: {
|
|
7382
7391
|
nonce: string;
|
|
@@ -74,6 +74,7 @@ export declare const ClientConfig: z.ZodObject<{
|
|
|
74
74
|
COUNTRY: z.ZodString;
|
|
75
75
|
LANGUAGES: z.ZodArray<z.ZodString>;
|
|
76
76
|
SENTRY: z.ZodOptional<z.ZodString>;
|
|
77
|
+
LOGIN_URL: z.ZodOptional<z.ZodString>;
|
|
77
78
|
REGISTER_BACKGROUND: z.ZodObject<{
|
|
78
79
|
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
79
80
|
backgroundImage: z.ZodOptional<z.ZodString>;
|