@opencrvs/toolkit 1.8.0-rc.f5b8a8a → 1.8.0-rc.fc43738

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.
@@ -1322,37 +1322,40 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
1322
1322
  get: import("@trpc/server").TRPCQueryProcedure<{
1323
1323
  input: string;
1324
1324
  output: {
1325
+ type: string;
1326
+ id: string;
1327
+ createdAt: string;
1328
+ trackingId: string;
1329
+ updatedAt: string;
1325
1330
  actions: ({
1326
- data: {
1327
- [k: string]: string | number | boolean | {
1328
- type: string;
1329
- filename: string;
1330
- originalFilename: string;
1331
- } | {
1332
- country: string;
1333
- district: string;
1334
- province: string;
1335
- urbanOrRural: "URBAN";
1336
- number?: string | undefined;
1337
- town?: string | undefined;
1338
- residentialArea?: string | undefined;
1339
- street?: string | undefined;
1340
- zipCode?: string | undefined;
1341
- } | {
1342
- country: string;
1343
- district: string;
1344
- province: string;
1345
- urbanOrRural: "RURAL";
1346
- village?: string | undefined;
1347
- } | {
1348
- type: string;
1349
- option: string;
1350
- filename: string;
1351
- originalFilename: string;
1352
- }[];
1353
- };
1354
1331
  type: "ASSIGN";
1355
1332
  id: string;
1333
+ data: Record<string, string | number | boolean | {
1334
+ type: string;
1335
+ filename: string;
1336
+ originalFilename: string;
1337
+ } | {
1338
+ country: string;
1339
+ district: string;
1340
+ province: string;
1341
+ urbanOrRural: "URBAN";
1342
+ number?: string | undefined;
1343
+ town?: string | undefined;
1344
+ residentialArea?: string | undefined;
1345
+ street?: string | undefined;
1346
+ zipCode?: string | undefined;
1347
+ } | {
1348
+ country: string;
1349
+ district: string;
1350
+ province: string;
1351
+ urbanOrRural: "RURAL";
1352
+ village?: string | undefined;
1353
+ } | {
1354
+ type: string;
1355
+ option: string;
1356
+ filename: string;
1357
+ originalFilename: string;
1358
+ }[]>;
1356
1359
  createdAt: string;
1357
1360
  createdBy: string;
1358
1361
  createdAtLocation: string;
@@ -1384,40 +1387,9 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
1384
1387
  originalFilename: string;
1385
1388
  }[]> | undefined;
1386
1389
  } | {
1387
- data: {
1388
- [k: string]: string | number | boolean | {
1389
- type: string;
1390
- filename: string;
1391
- originalFilename: string;
1392
- } | {
1393
- country: string;
1394
- district: string;
1395
- province: string;
1396
- urbanOrRural: "URBAN";
1397
- number?: string | undefined;
1398
- town?: string | undefined;
1399
- residentialArea?: string | undefined;
1400
- street?: string | undefined;
1401
- zipCode?: string | undefined;
1402
- } | {
1403
- country: string;
1404
- district: string;
1405
- province: string;
1406
- urbanOrRural: "RURAL";
1407
- village?: string | undefined;
1408
- } | {
1409
- type: string;
1410
- option: string;
1411
- filename: string;
1412
- originalFilename: string;
1413
- }[];
1414
- };
1415
1390
  type: "UNASSIGN";
1416
1391
  id: string;
1417
- createdAt: string;
1418
- createdBy: string;
1419
- createdAtLocation: string;
1420
- metadata?: Record<string, string | number | boolean | {
1392
+ data: Record<string, string | number | boolean | {
1421
1393
  type: string;
1422
1394
  filename: string;
1423
1395
  originalFilename: string;
@@ -1442,45 +1414,10 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
1442
1414
  option: string;
1443
1415
  filename: string;
1444
1416
  originalFilename: string;
1445
- }[]> | undefined;
1446
- } | {
1447
- data: {
1448
- [k: string]: string | number | boolean | {
1449
- type: string;
1450
- filename: string;
1451
- originalFilename: string;
1452
- } | {
1453
- country: string;
1454
- district: string;
1455
- province: string;
1456
- urbanOrRural: "URBAN";
1457
- number?: string | undefined;
1458
- town?: string | undefined;
1459
- residentialArea?: string | undefined;
1460
- street?: string | undefined;
1461
- zipCode?: string | undefined;
1462
- } | {
1463
- country: string;
1464
- district: string;
1465
- province: string;
1466
- urbanOrRural: "RURAL";
1467
- village?: string | undefined;
1468
- } | {
1469
- type: string;
1470
- option: string;
1471
- filename: string;
1472
- originalFilename: string;
1473
- }[];
1474
- };
1475
- type: "REGISTER";
1476
- id: string;
1417
+ }[]>;
1477
1418
  createdAt: string;
1478
1419
  createdBy: string;
1479
1420
  createdAtLocation: string;
1480
- identifiers: {
1481
- trackingId: string;
1482
- registrationNumber: string;
1483
- };
1484
1421
  metadata?: Record<string, string | number | boolean | {
1485
1422
  type: string;
1486
1423
  filename: string;
@@ -1508,40 +1445,9 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
1508
1445
  originalFilename: string;
1509
1446
  }[]> | undefined;
1510
1447
  } | {
1511
- data: {
1512
- [k: string]: string | number | boolean | {
1513
- type: string;
1514
- filename: string;
1515
- originalFilename: string;
1516
- } | {
1517
- country: string;
1518
- district: string;
1519
- province: string;
1520
- urbanOrRural: "URBAN";
1521
- number?: string | undefined;
1522
- town?: string | undefined;
1523
- residentialArea?: string | undefined;
1524
- street?: string | undefined;
1525
- zipCode?: string | undefined;
1526
- } | {
1527
- country: string;
1528
- district: string;
1529
- province: string;
1530
- urbanOrRural: "RURAL";
1531
- village?: string | undefined;
1532
- } | {
1533
- type: string;
1534
- option: string;
1535
- filename: string;
1536
- originalFilename: string;
1537
- }[];
1538
- };
1539
- type: "DECLARE";
1448
+ type: "REGISTER";
1540
1449
  id: string;
1541
- createdAt: string;
1542
- createdBy: string;
1543
- createdAtLocation: string;
1544
- metadata?: Record<string, string | number | boolean | {
1450
+ data: Record<string, string | number | boolean | {
1545
1451
  type: string;
1546
1452
  filename: string;
1547
1453
  originalFilename: string;
@@ -1566,41 +1472,14 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
1566
1472
  option: string;
1567
1473
  filename: string;
1568
1474
  originalFilename: string;
1569
- }[]> | undefined;
1570
- } | {
1571
- data: {
1572
- [k: string]: string | number | boolean | {
1573
- type: string;
1574
- filename: string;
1575
- originalFilename: string;
1576
- } | {
1577
- country: string;
1578
- district: string;
1579
- province: string;
1580
- urbanOrRural: "URBAN";
1581
- number?: string | undefined;
1582
- town?: string | undefined;
1583
- residentialArea?: string | undefined;
1584
- street?: string | undefined;
1585
- zipCode?: string | undefined;
1586
- } | {
1587
- country: string;
1588
- district: string;
1589
- province: string;
1590
- urbanOrRural: "RURAL";
1591
- village?: string | undefined;
1592
- } | {
1593
- type: string;
1594
- option: string;
1595
- filename: string;
1596
- originalFilename: string;
1597
- }[];
1598
- };
1599
- type: "VALIDATE";
1600
- id: string;
1475
+ }[]>;
1601
1476
  createdAt: string;
1602
1477
  createdBy: string;
1603
1478
  createdAtLocation: string;
1479
+ identifiers: {
1480
+ trackingId: string;
1481
+ registrationNumber: string;
1482
+ };
1604
1483
  metadata?: Record<string, string | number | boolean | {
1605
1484
  type: string;
1606
1485
  filename: string;
@@ -1628,40 +1507,9 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
1628
1507
  originalFilename: string;
1629
1508
  }[]> | undefined;
1630
1509
  } | {
1631
- data: {
1632
- [k: string]: string | number | boolean | {
1633
- type: string;
1634
- filename: string;
1635
- originalFilename: string;
1636
- } | {
1637
- country: string;
1638
- district: string;
1639
- province: string;
1640
- urbanOrRural: "URBAN";
1641
- number?: string | undefined;
1642
- town?: string | undefined;
1643
- residentialArea?: string | undefined;
1644
- street?: string | undefined;
1645
- zipCode?: string | undefined;
1646
- } | {
1647
- country: string;
1648
- district: string;
1649
- province: string;
1650
- urbanOrRural: "RURAL";
1651
- village?: string | undefined;
1652
- } | {
1653
- type: string;
1654
- option: string;
1655
- filename: string;
1656
- originalFilename: string;
1657
- }[];
1658
- };
1659
- type: "REJECT";
1510
+ type: "DECLARE";
1660
1511
  id: string;
1661
- createdAt: string;
1662
- createdBy: string;
1663
- createdAtLocation: string;
1664
- metadata?: Record<string, string | number | boolean | {
1512
+ data: Record<string, string | number | boolean | {
1665
1513
  type: string;
1666
1514
  filename: string;
1667
1515
  originalFilename: string;
@@ -1686,38 +1534,181 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
1686
1534
  option: string;
1687
1535
  filename: string;
1688
1536
  originalFilename: string;
1689
- }[]> | undefined;
1690
- } | {
1691
- data: {
1692
- [k: string]: string | number | boolean | {
1693
- type: string;
1694
- filename: string;
1695
- originalFilename: string;
1696
- } | {
1697
- country: string;
1698
- district: string;
1699
- province: string;
1700
- urbanOrRural: "URBAN";
1701
- number?: string | undefined;
1702
- town?: string | undefined;
1703
- residentialArea?: string | undefined;
1704
- street?: string | undefined;
1705
- zipCode?: string | undefined;
1706
- } | {
1707
- country: string;
1708
- district: string;
1709
- province: string;
1710
- urbanOrRural: "RURAL";
1711
- village?: string | undefined;
1712
- } | {
1713
- type: string;
1714
- option: string;
1715
- filename: string;
1716
- originalFilename: string;
1717
- }[];
1718
- };
1719
- type: "MARKED_AS_DUPLICATE";
1720
- id: string;
1537
+ }[]>;
1538
+ createdAt: string;
1539
+ createdBy: string;
1540
+ createdAtLocation: string;
1541
+ metadata?: Record<string, string | number | boolean | {
1542
+ type: string;
1543
+ filename: string;
1544
+ originalFilename: string;
1545
+ } | {
1546
+ country: string;
1547
+ district: string;
1548
+ province: string;
1549
+ urbanOrRural: "URBAN";
1550
+ number?: string | undefined;
1551
+ town?: string | undefined;
1552
+ residentialArea?: string | undefined;
1553
+ street?: string | undefined;
1554
+ zipCode?: string | undefined;
1555
+ } | {
1556
+ country: string;
1557
+ district: string;
1558
+ province: string;
1559
+ urbanOrRural: "RURAL";
1560
+ village?: string | undefined;
1561
+ } | {
1562
+ type: string;
1563
+ option: string;
1564
+ filename: string;
1565
+ originalFilename: string;
1566
+ }[]> | undefined;
1567
+ } | {
1568
+ type: "VALIDATE";
1569
+ id: string;
1570
+ data: Record<string, string | number | boolean | {
1571
+ type: string;
1572
+ filename: string;
1573
+ originalFilename: string;
1574
+ } | {
1575
+ country: string;
1576
+ district: string;
1577
+ province: string;
1578
+ urbanOrRural: "URBAN";
1579
+ number?: string | undefined;
1580
+ town?: string | undefined;
1581
+ residentialArea?: string | undefined;
1582
+ street?: string | undefined;
1583
+ zipCode?: string | undefined;
1584
+ } | {
1585
+ country: string;
1586
+ district: string;
1587
+ province: string;
1588
+ urbanOrRural: "RURAL";
1589
+ village?: string | undefined;
1590
+ } | {
1591
+ type: string;
1592
+ option: string;
1593
+ filename: string;
1594
+ originalFilename: string;
1595
+ }[]>;
1596
+ createdAt: string;
1597
+ createdBy: string;
1598
+ createdAtLocation: string;
1599
+ metadata?: Record<string, string | number | boolean | {
1600
+ type: string;
1601
+ filename: string;
1602
+ originalFilename: string;
1603
+ } | {
1604
+ country: string;
1605
+ district: string;
1606
+ province: string;
1607
+ urbanOrRural: "URBAN";
1608
+ number?: string | undefined;
1609
+ town?: string | undefined;
1610
+ residentialArea?: string | undefined;
1611
+ street?: string | undefined;
1612
+ zipCode?: string | undefined;
1613
+ } | {
1614
+ country: string;
1615
+ district: string;
1616
+ province: string;
1617
+ urbanOrRural: "RURAL";
1618
+ village?: string | undefined;
1619
+ } | {
1620
+ type: string;
1621
+ option: string;
1622
+ filename: string;
1623
+ originalFilename: string;
1624
+ }[]> | undefined;
1625
+ } | {
1626
+ type: "REJECT";
1627
+ id: string;
1628
+ data: Record<string, string | number | boolean | {
1629
+ type: string;
1630
+ filename: string;
1631
+ originalFilename: string;
1632
+ } | {
1633
+ country: string;
1634
+ district: string;
1635
+ province: string;
1636
+ urbanOrRural: "URBAN";
1637
+ number?: string | undefined;
1638
+ town?: string | undefined;
1639
+ residentialArea?: string | undefined;
1640
+ street?: string | undefined;
1641
+ zipCode?: string | undefined;
1642
+ } | {
1643
+ country: string;
1644
+ district: string;
1645
+ province: string;
1646
+ urbanOrRural: "RURAL";
1647
+ village?: string | undefined;
1648
+ } | {
1649
+ type: string;
1650
+ option: string;
1651
+ filename: string;
1652
+ originalFilename: string;
1653
+ }[]>;
1654
+ createdAt: string;
1655
+ createdBy: string;
1656
+ createdAtLocation: string;
1657
+ metadata?: Record<string, string | number | boolean | {
1658
+ type: string;
1659
+ filename: string;
1660
+ originalFilename: string;
1661
+ } | {
1662
+ country: string;
1663
+ district: string;
1664
+ province: string;
1665
+ urbanOrRural: "URBAN";
1666
+ number?: string | undefined;
1667
+ town?: string | undefined;
1668
+ residentialArea?: string | undefined;
1669
+ street?: string | undefined;
1670
+ zipCode?: string | undefined;
1671
+ } | {
1672
+ country: string;
1673
+ district: string;
1674
+ province: string;
1675
+ urbanOrRural: "RURAL";
1676
+ village?: string | undefined;
1677
+ } | {
1678
+ type: string;
1679
+ option: string;
1680
+ filename: string;
1681
+ originalFilename: string;
1682
+ }[]> | undefined;
1683
+ } | {
1684
+ type: "MARKED_AS_DUPLICATE";
1685
+ id: string;
1686
+ data: Record<string, string | number | boolean | {
1687
+ type: string;
1688
+ filename: string;
1689
+ originalFilename: string;
1690
+ } | {
1691
+ country: string;
1692
+ district: string;
1693
+ province: string;
1694
+ urbanOrRural: "URBAN";
1695
+ number?: string | undefined;
1696
+ town?: string | undefined;
1697
+ residentialArea?: string | undefined;
1698
+ street?: string | undefined;
1699
+ zipCode?: string | undefined;
1700
+ } | {
1701
+ country: string;
1702
+ district: string;
1703
+ province: string;
1704
+ urbanOrRural: "RURAL";
1705
+ village?: string | undefined;
1706
+ } | {
1707
+ type: string;
1708
+ option: string;
1709
+ filename: string;
1710
+ originalFilename: string;
1711
+ }[]>;
1721
1712
  createdAt: string;
1722
1713
  createdBy: string;
1723
1714
  createdAtLocation: string;
@@ -1748,36 +1739,208 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
1748
1739
  originalFilename: string;
1749
1740
  }[]> | undefined;
1750
1741
  } | {
1751
- data: {
1752
- [k: string]: string | number | boolean | {
1753
- type: string;
1754
- filename: string;
1755
- originalFilename: string;
1756
- } | {
1757
- country: string;
1758
- district: string;
1759
- province: string;
1760
- urbanOrRural: "URBAN";
1761
- number?: string | undefined;
1762
- town?: string | undefined;
1763
- residentialArea?: string | undefined;
1764
- street?: string | undefined;
1765
- zipCode?: string | undefined;
1766
- } | {
1767
- country: string;
1768
- district: string;
1769
- province: string;
1770
- urbanOrRural: "RURAL";
1771
- village?: string | undefined;
1772
- } | {
1773
- type: string;
1774
- option: string;
1775
- filename: string;
1776
- originalFilename: string;
1777
- }[];
1778
- };
1779
1742
  type: "ARCHIVED";
1780
1743
  id: string;
1744
+ data: Record<string, string | number | boolean | {
1745
+ type: string;
1746
+ filename: string;
1747
+ originalFilename: string;
1748
+ } | {
1749
+ country: string;
1750
+ district: string;
1751
+ province: string;
1752
+ urbanOrRural: "URBAN";
1753
+ number?: string | undefined;
1754
+ town?: string | undefined;
1755
+ residentialArea?: string | undefined;
1756
+ street?: string | undefined;
1757
+ zipCode?: string | undefined;
1758
+ } | {
1759
+ country: string;
1760
+ district: string;
1761
+ province: string;
1762
+ urbanOrRural: "RURAL";
1763
+ village?: string | undefined;
1764
+ } | {
1765
+ type: string;
1766
+ option: string;
1767
+ filename: string;
1768
+ originalFilename: string;
1769
+ }[]>;
1770
+ createdAt: string;
1771
+ createdBy: string;
1772
+ createdAtLocation: string;
1773
+ metadata?: Record<string, string | number | boolean | {
1774
+ type: string;
1775
+ filename: string;
1776
+ originalFilename: string;
1777
+ } | {
1778
+ country: string;
1779
+ district: string;
1780
+ province: string;
1781
+ urbanOrRural: "URBAN";
1782
+ number?: string | undefined;
1783
+ town?: string | undefined;
1784
+ residentialArea?: string | undefined;
1785
+ street?: string | undefined;
1786
+ zipCode?: string | undefined;
1787
+ } | {
1788
+ country: string;
1789
+ district: string;
1790
+ province: string;
1791
+ urbanOrRural: "RURAL";
1792
+ village?: string | undefined;
1793
+ } | {
1794
+ type: string;
1795
+ option: string;
1796
+ filename: string;
1797
+ originalFilename: string;
1798
+ }[]> | undefined;
1799
+ } | {
1800
+ type: "CREATE";
1801
+ id: string;
1802
+ data: Record<string, string | number | boolean | {
1803
+ type: string;
1804
+ filename: string;
1805
+ originalFilename: string;
1806
+ } | {
1807
+ country: string;
1808
+ district: string;
1809
+ province: string;
1810
+ urbanOrRural: "URBAN";
1811
+ number?: string | undefined;
1812
+ town?: string | undefined;
1813
+ residentialArea?: string | undefined;
1814
+ street?: string | undefined;
1815
+ zipCode?: string | undefined;
1816
+ } | {
1817
+ country: string;
1818
+ district: string;
1819
+ province: string;
1820
+ urbanOrRural: "RURAL";
1821
+ village?: string | undefined;
1822
+ } | {
1823
+ type: string;
1824
+ option: string;
1825
+ filename: string;
1826
+ originalFilename: string;
1827
+ }[]>;
1828
+ createdAt: string;
1829
+ createdBy: string;
1830
+ createdAtLocation: string;
1831
+ metadata?: Record<string, string | number | boolean | {
1832
+ type: string;
1833
+ filename: string;
1834
+ originalFilename: string;
1835
+ } | {
1836
+ country: string;
1837
+ district: string;
1838
+ province: string;
1839
+ urbanOrRural: "URBAN";
1840
+ number?: string | undefined;
1841
+ town?: string | undefined;
1842
+ residentialArea?: string | undefined;
1843
+ street?: string | undefined;
1844
+ zipCode?: string | undefined;
1845
+ } | {
1846
+ country: string;
1847
+ district: string;
1848
+ province: string;
1849
+ urbanOrRural: "RURAL";
1850
+ village?: string | undefined;
1851
+ } | {
1852
+ type: string;
1853
+ option: string;
1854
+ filename: string;
1855
+ originalFilename: string;
1856
+ }[]> | undefined;
1857
+ } | {
1858
+ type: "NOTIFY";
1859
+ id: string;
1860
+ data: Record<string, string | number | boolean | {
1861
+ type: string;
1862
+ filename: string;
1863
+ originalFilename: string;
1864
+ } | {
1865
+ country: string;
1866
+ district: string;
1867
+ province: string;
1868
+ urbanOrRural: "URBAN";
1869
+ number?: string | undefined;
1870
+ town?: string | undefined;
1871
+ residentialArea?: string | undefined;
1872
+ street?: string | undefined;
1873
+ zipCode?: string | undefined;
1874
+ } | {
1875
+ country: string;
1876
+ district: string;
1877
+ province: string;
1878
+ urbanOrRural: "RURAL";
1879
+ village?: string | undefined;
1880
+ } | {
1881
+ type: string;
1882
+ option: string;
1883
+ filename: string;
1884
+ originalFilename: string;
1885
+ }[]>;
1886
+ createdAt: string;
1887
+ createdBy: string;
1888
+ createdAtLocation: string;
1889
+ metadata?: Record<string, string | number | boolean | {
1890
+ type: string;
1891
+ filename: string;
1892
+ originalFilename: string;
1893
+ } | {
1894
+ country: string;
1895
+ district: string;
1896
+ province: string;
1897
+ urbanOrRural: "URBAN";
1898
+ number?: string | undefined;
1899
+ town?: string | undefined;
1900
+ residentialArea?: string | undefined;
1901
+ street?: string | undefined;
1902
+ zipCode?: string | undefined;
1903
+ } | {
1904
+ country: string;
1905
+ district: string;
1906
+ province: string;
1907
+ urbanOrRural: "RURAL";
1908
+ village?: string | undefined;
1909
+ } | {
1910
+ type: string;
1911
+ option: string;
1912
+ filename: string;
1913
+ originalFilename: string;
1914
+ }[]> | undefined;
1915
+ } | {
1916
+ type: "PRINT_CERTIFICATE";
1917
+ id: string;
1918
+ data: Record<string, string | number | boolean | {
1919
+ type: string;
1920
+ filename: string;
1921
+ originalFilename: string;
1922
+ } | {
1923
+ country: string;
1924
+ district: string;
1925
+ province: string;
1926
+ urbanOrRural: "URBAN";
1927
+ number?: string | undefined;
1928
+ town?: string | undefined;
1929
+ residentialArea?: string | undefined;
1930
+ street?: string | undefined;
1931
+ zipCode?: string | undefined;
1932
+ } | {
1933
+ country: string;
1934
+ district: string;
1935
+ province: string;
1936
+ urbanOrRural: "RURAL";
1937
+ village?: string | undefined;
1938
+ } | {
1939
+ type: string;
1940
+ option: string;
1941
+ filename: string;
1942
+ originalFilename: string;
1943
+ }[]>;
1781
1944
  createdAt: string;
1782
1945
  createdBy: string;
1783
1946
  createdAtLocation: string;
@@ -1808,40 +1971,9 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
1808
1971
  originalFilename: string;
1809
1972
  }[]> | undefined;
1810
1973
  } | {
1811
- data: {
1812
- [k: string]: string | number | boolean | {
1813
- type: string;
1814
- filename: string;
1815
- originalFilename: string;
1816
- } | {
1817
- country: string;
1818
- district: string;
1819
- province: string;
1820
- urbanOrRural: "URBAN";
1821
- number?: string | undefined;
1822
- town?: string | undefined;
1823
- residentialArea?: string | undefined;
1824
- street?: string | undefined;
1825
- zipCode?: string | undefined;
1826
- } | {
1827
- country: string;
1828
- district: string;
1829
- province: string;
1830
- urbanOrRural: "RURAL";
1831
- village?: string | undefined;
1832
- } | {
1833
- type: string;
1834
- option: string;
1835
- filename: string;
1836
- originalFilename: string;
1837
- }[];
1838
- };
1839
- type: "CREATE";
1974
+ type: "REQUEST_CORRECTION";
1840
1975
  id: string;
1841
- createdAt: string;
1842
- createdBy: string;
1843
- createdAtLocation: string;
1844
- metadata?: Record<string, string | number | boolean | {
1976
+ data: Record<string, string | number | boolean | {
1845
1977
  type: string;
1846
1978
  filename: string;
1847
1979
  originalFilename: string;
@@ -1866,38 +1998,7 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
1866
1998
  option: string;
1867
1999
  filename: string;
1868
2000
  originalFilename: string;
1869
- }[]> | undefined;
1870
- } | {
1871
- data: {
1872
- [k: string]: string | number | boolean | {
1873
- type: string;
1874
- filename: string;
1875
- originalFilename: string;
1876
- } | {
1877
- country: string;
1878
- district: string;
1879
- province: string;
1880
- urbanOrRural: "URBAN";
1881
- number?: string | undefined;
1882
- town?: string | undefined;
1883
- residentialArea?: string | undefined;
1884
- street?: string | undefined;
1885
- zipCode?: string | undefined;
1886
- } | {
1887
- country: string;
1888
- district: string;
1889
- province: string;
1890
- urbanOrRural: "RURAL";
1891
- village?: string | undefined;
1892
- } | {
1893
- type: string;
1894
- option: string;
1895
- filename: string;
1896
- originalFilename: string;
1897
- }[];
1898
- };
1899
- type: "NOTIFY";
1900
- id: string;
2001
+ }[]>;
1901
2002
  createdAt: string;
1902
2003
  createdBy: string;
1903
2004
  createdAtLocation: string;
@@ -1928,40 +2029,9 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
1928
2029
  originalFilename: string;
1929
2030
  }[]> | undefined;
1930
2031
  } | {
1931
- data: {
1932
- [k: string]: string | number | boolean | {
1933
- type: string;
1934
- filename: string;
1935
- originalFilename: string;
1936
- } | {
1937
- country: string;
1938
- district: string;
1939
- province: string;
1940
- urbanOrRural: "URBAN";
1941
- number?: string | undefined;
1942
- town?: string | undefined;
1943
- residentialArea?: string | undefined;
1944
- street?: string | undefined;
1945
- zipCode?: string | undefined;
1946
- } | {
1947
- country: string;
1948
- district: string;
1949
- province: string;
1950
- urbanOrRural: "RURAL";
1951
- village?: string | undefined;
1952
- } | {
1953
- type: string;
1954
- option: string;
1955
- filename: string;
1956
- originalFilename: string;
1957
- }[];
1958
- };
1959
- type: "PRINT_CERTIFICATE";
2032
+ type: "APPROVE_CORRECTION";
1960
2033
  id: string;
1961
- createdAt: string;
1962
- createdBy: string;
1963
- createdAtLocation: string;
1964
- metadata?: Record<string, string | number | boolean | {
2034
+ data: Record<string, string | number | boolean | {
1965
2035
  type: string;
1966
2036
  filename: string;
1967
2037
  originalFilename: string;
@@ -1986,41 +2056,11 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
1986
2056
  option: string;
1987
2057
  filename: string;
1988
2058
  originalFilename: string;
1989
- }[]> | undefined;
1990
- } | {
1991
- data: {
1992
- [k: string]: string | number | boolean | {
1993
- type: string;
1994
- filename: string;
1995
- originalFilename: string;
1996
- } | {
1997
- country: string;
1998
- district: string;
1999
- province: string;
2000
- urbanOrRural: "URBAN";
2001
- number?: string | undefined;
2002
- town?: string | undefined;
2003
- residentialArea?: string | undefined;
2004
- street?: string | undefined;
2005
- zipCode?: string | undefined;
2006
- } | {
2007
- country: string;
2008
- district: string;
2009
- province: string;
2010
- urbanOrRural: "RURAL";
2011
- village?: string | undefined;
2012
- } | {
2013
- type: string;
2014
- option: string;
2015
- filename: string;
2016
- originalFilename: string;
2017
- }[];
2018
- };
2019
- type: "REQUEST_CORRECTION";
2020
- id: string;
2059
+ }[]>;
2021
2060
  createdAt: string;
2022
2061
  createdBy: string;
2023
2062
  createdAtLocation: string;
2063
+ requestId: string;
2024
2064
  metadata?: Record<string, string | number | boolean | {
2025
2065
  type: string;
2026
2066
  filename: string;
@@ -2048,41 +2088,9 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
2048
2088
  originalFilename: string;
2049
2089
  }[]> | undefined;
2050
2090
  } | {
2051
- data: {
2052
- [k: string]: string | number | boolean | {
2053
- type: string;
2054
- filename: string;
2055
- originalFilename: string;
2056
- } | {
2057
- country: string;
2058
- district: string;
2059
- province: string;
2060
- urbanOrRural: "URBAN";
2061
- number?: string | undefined;
2062
- town?: string | undefined;
2063
- residentialArea?: string | undefined;
2064
- street?: string | undefined;
2065
- zipCode?: string | undefined;
2066
- } | {
2067
- country: string;
2068
- district: string;
2069
- province: string;
2070
- urbanOrRural: "RURAL";
2071
- village?: string | undefined;
2072
- } | {
2073
- type: string;
2074
- option: string;
2075
- filename: string;
2076
- originalFilename: string;
2077
- }[];
2078
- };
2079
- type: "APPROVE_CORRECTION";
2091
+ type: "REJECT_CORRECTION";
2080
2092
  id: string;
2081
- createdAt: string;
2082
- createdBy: string;
2083
- createdAtLocation: string;
2084
- requestId: string;
2085
- metadata?: Record<string, string | number | boolean | {
2093
+ data: Record<string, string | number | boolean | {
2086
2094
  type: string;
2087
2095
  filename: string;
2088
2096
  originalFilename: string;
@@ -2107,38 +2115,7 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
2107
2115
  option: string;
2108
2116
  filename: string;
2109
2117
  originalFilename: string;
2110
- }[]> | undefined;
2111
- } | {
2112
- data: {
2113
- [k: string]: string | number | boolean | {
2114
- type: string;
2115
- filename: string;
2116
- originalFilename: string;
2117
- } | {
2118
- country: string;
2119
- district: string;
2120
- province: string;
2121
- urbanOrRural: "URBAN";
2122
- number?: string | undefined;
2123
- town?: string | undefined;
2124
- residentialArea?: string | undefined;
2125
- street?: string | undefined;
2126
- zipCode?: string | undefined;
2127
- } | {
2128
- country: string;
2129
- district: string;
2130
- province: string;
2131
- urbanOrRural: "RURAL";
2132
- village?: string | undefined;
2133
- } | {
2134
- type: string;
2135
- option: string;
2136
- filename: string;
2137
- originalFilename: string;
2138
- }[];
2139
- };
2140
- type: "REJECT_CORRECTION";
2141
- id: string;
2118
+ }[]>;
2142
2119
  createdAt: string;
2143
2120
  createdBy: string;
2144
2121
  createdAtLocation: string;
@@ -2170,36 +2147,34 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
2170
2147
  originalFilename: string;
2171
2148
  }[]> | undefined;
2172
2149
  } | {
2173
- data: {
2174
- [k: string]: string | number | boolean | {
2175
- type: string;
2176
- filename: string;
2177
- originalFilename: string;
2178
- } | {
2179
- country: string;
2180
- district: string;
2181
- province: string;
2182
- urbanOrRural: "URBAN";
2183
- number?: string | undefined;
2184
- town?: string | undefined;
2185
- residentialArea?: string | undefined;
2186
- street?: string | undefined;
2187
- zipCode?: string | undefined;
2188
- } | {
2189
- country: string;
2190
- district: string;
2191
- province: string;
2192
- urbanOrRural: "RURAL";
2193
- village?: string | undefined;
2194
- } | {
2195
- type: string;
2196
- option: string;
2197
- filename: string;
2198
- originalFilename: string;
2199
- }[];
2200
- };
2201
2150
  type: "CUSTOM";
2202
2151
  id: string;
2152
+ data: Record<string, string | number | boolean | {
2153
+ type: string;
2154
+ filename: string;
2155
+ originalFilename: string;
2156
+ } | {
2157
+ country: string;
2158
+ district: string;
2159
+ province: string;
2160
+ urbanOrRural: "URBAN";
2161
+ number?: string | undefined;
2162
+ town?: string | undefined;
2163
+ residentialArea?: string | undefined;
2164
+ street?: string | undefined;
2165
+ zipCode?: string | undefined;
2166
+ } | {
2167
+ country: string;
2168
+ district: string;
2169
+ province: string;
2170
+ urbanOrRural: "RURAL";
2171
+ village?: string | undefined;
2172
+ } | {
2173
+ type: string;
2174
+ option: string;
2175
+ filename: string;
2176
+ originalFilename: string;
2177
+ }[]>;
2203
2178
  createdAt: string;
2204
2179
  createdBy: string;
2205
2180
  createdAtLocation: string;
@@ -2230,11 +2205,6 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
2230
2205
  originalFilename: string;
2231
2206
  }[]> | undefined;
2232
2207
  })[];
2233
- type: string;
2234
- id: string;
2235
- createdAt: string;
2236
- trackingId: string;
2237
- updatedAt: string;
2238
2208
  };
2239
2209
  }>;
2240
2210
  delete: import("@trpc/server").TRPCMutationProcedure<{
@@ -2489,6 +2459,7 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
2489
2459
  filename: string;
2490
2460
  originalFilename: string;
2491
2461
  }[]>;
2462
+ createdAtLocation: string;
2492
2463
  eventId: string;
2493
2464
  transactionId: string;
2494
2465
  type?: "NOTIFY" | undefined;
@@ -11986,7 +11957,7 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
11986
11957
  }[]>;
11987
11958
  eventId: string;
11988
11959
  };
11989
- output: Omit<{
11960
+ output: {
11990
11961
  type: string;
11991
11962
  id: string;
11992
11963
  createdAt: string;
@@ -12870,7 +12841,7 @@ export declare const appRouter: import("@trpc/server/unstable-core-do-not-import
12870
12841
  originalFilename: string;
12871
12842
  }[]> | undefined;
12872
12843
  })[];
12873
- }, "_id">;
12844
+ };
12874
12845
  }>;
12875
12846
  }>>;
12876
12847
  search: import("@trpc/server").TRPCQueryProcedure<{
@@ -1011,6 +1011,7 @@ export declare const NotifyActionInput: z.ZodObject<z.objectUtil.extendShape<{
1011
1011
  }>]>>>;
1012
1012
  }, {
1013
1013
  type: z.ZodDefault<z.ZodLiteral<"NOTIFY">>;
1014
+ createdAtLocation: z.ZodString;
1014
1015
  }>, "strip", z.ZodTypeAny, {
1015
1016
  type: "NOTIFY";
1016
1017
  data: Record<string, string | number | boolean | {
@@ -1039,6 +1040,7 @@ export declare const NotifyActionInput: z.ZodObject<z.objectUtil.extendShape<{
1039
1040
  filename: string;
1040
1041
  originalFilename: string;
1041
1042
  }[]>;
1043
+ createdAtLocation: string;
1042
1044
  eventId: string;
1043
1045
  transactionId: string;
1044
1046
  incomplete: boolean;
@@ -1095,6 +1097,7 @@ export declare const NotifyActionInput: z.ZodObject<z.objectUtil.extendShape<{
1095
1097
  filename: string;
1096
1098
  originalFilename: string;
1097
1099
  }[]>;
1100
+ createdAtLocation: string;
1098
1101
  eventId: string;
1099
1102
  transactionId: string;
1100
1103
  type?: "NOTIFY" | undefined;
@@ -4378,6 +4381,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
4378
4381
  }>]>>>;
4379
4382
  }, {
4380
4383
  type: z.ZodDefault<z.ZodLiteral<"NOTIFY">>;
4384
+ createdAtLocation: z.ZodString;
4381
4385
  }>, "strip", z.ZodTypeAny, {
4382
4386
  type: "NOTIFY";
4383
4387
  data: Record<string, string | number | boolean | {
@@ -4406,6 +4410,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
4406
4410
  filename: string;
4407
4411
  originalFilename: string;
4408
4412
  }[]>;
4413
+ createdAtLocation: string;
4409
4414
  eventId: string;
4410
4415
  transactionId: string;
4411
4416
  incomplete: boolean;
@@ -4462,6 +4467,7 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
4462
4467
  filename: string;
4463
4468
  originalFilename: string;
4464
4469
  }[]>;
4470
+ createdAtLocation: string;
4465
4471
  eventId: string;
4466
4472
  transactionId: string;
4467
4473
  type?: "NOTIFY" | undefined;
@@ -61,8 +61,24 @@ export declare const findActiveActionForm: (configuration: EventConfig, action:
61
61
  fields: import("./FieldConfig").Inferred[];
62
62
  };
63
63
  } | undefined;
64
+ export declare const findActiveActionFormPages: (configuration: EventConfig, action: ActionType) => {
65
+ id: string;
66
+ title: TranslationConfig;
67
+ fields: import("./FieldConfig").Inferred[];
68
+ }[] | undefined;
64
69
  export declare const getFormFields: (formConfig: FormConfig) => import("./FieldConfig").Inferred[];
65
- export declare const findActiveActionFields: (configuration: EventConfig, action: ActionType) => FieldConfig[];
70
+ /**
71
+ * Returns only form fields for the action type, if any, excluding review fields.
72
+ */
73
+ export declare const findActiveActionFormFields: (configuration: EventConfig, action: ActionType) => FieldConfig[] | undefined;
74
+ /**
75
+ * Returns all fields for the action type, including review fields, if any.
76
+ */
77
+ export declare const findActiveActionFields: (configuration: EventConfig, action: ActionType) => FieldConfig[] | undefined;
78
+ /**
79
+ * Returns all fields for the action type, including review fields, or throws
80
+ */
81
+ export declare function getActiveActionFields(configuration: EventConfig, action: ActionType): FieldConfig[];
66
82
  export declare function getEventConfiguration(eventConfigurations: EventConfig[], type: string): EventConfig;
67
83
  export declare function isOptionalUncheckedCheckbox(field: FieldConfig, form: ActionFormData): boolean;
68
84
  export declare function stripHiddenFields(fields: FieldConfig[], data: ActionFormData): import("lodash").Dictionary<string | number | boolean | {
@@ -107,12 +107,15 @@ __export(events_exports, {
107
107
  fieldTypes: () => fieldTypes,
108
108
  findActiveActionFields: () => findActiveActionFields,
109
109
  findActiveActionForm: () => findActiveActionForm,
110
+ findActiveActionFormFields: () => findActiveActionFormFields,
111
+ findActiveActionFormPages: () => findActiveActionFormPages,
110
112
  findInputPageFields: () => findInputPageFields,
111
113
  findPageFields: () => findPageFields,
112
114
  generateActionInput: () => generateActionInput,
113
115
  generateEventDocument: () => generateEventDocument,
114
116
  generateEventDraftDocument: () => generateEventDraftDocument,
115
117
  generateTransactionId: () => generateTransactionId,
118
+ getActiveActionFields: () => getActiveActionFields,
116
119
  getAllFields: () => getAllFields,
117
120
  getAllPages: () => getAllPages,
118
121
  getCurrentEventState: () => getCurrentEventState,
@@ -1396,14 +1399,30 @@ var findActiveActionForm = (configuration, action) => {
1396
1399
  const form = actionConfig?.forms.find((f) => f.active);
1397
1400
  return form;
1398
1401
  };
1402
+ var findActiveActionFormPages = (configuration, action) => {
1403
+ return findActiveActionForm(configuration, action)?.pages;
1404
+ };
1399
1405
  var getFormFields = (formConfig) => {
1400
1406
  return formConfig.pages.flatMap((p) => p.fields);
1401
1407
  };
1408
+ var findActiveActionFormFields = (configuration, action) => {
1409
+ const form = findActiveActionForm(configuration, action);
1410
+ return form ? getFormFields(form) : void 0;
1411
+ };
1402
1412
  var findActiveActionFields = (configuration, action) => {
1403
1413
  const form = findActiveActionForm(configuration, action);
1404
- const reviewFields = form?.review.fields || [];
1405
- return (form ? getFormFields(form) : []).concat(reviewFields);
1414
+ const reviewFields = form?.review.fields;
1415
+ const formFields = form ? getFormFields(form) : void 0;
1416
+ const allFields = formFields ? formFields.concat(reviewFields ?? []) : reviewFields;
1417
+ return allFields;
1406
1418
  };
1419
+ function getActiveActionFields(configuration, action) {
1420
+ const fields = findActiveActionFields(configuration, action);
1421
+ if (!fields) {
1422
+ throw new Error(`No active field config found for action type ${action}`);
1423
+ }
1424
+ return fields;
1425
+ }
1407
1426
  function getEventConfiguration(eventConfigurations, type) {
1408
1427
  const config = eventConfigurations.find((config2) => config2.id === type);
1409
1428
  if (!config) {
@@ -1412,7 +1431,7 @@ function getEventConfiguration(eventConfigurations, type) {
1412
1431
  return config;
1413
1432
  }
1414
1433
  function isOptionalUncheckedCheckbox(field2, form) {
1415
- if (field2.type !== "CHECKBOX") {
1434
+ if (field2.type !== FieldType.CHECKBOX) {
1416
1435
  return false;
1417
1436
  }
1418
1437
  if (field2.required) {
@@ -1632,7 +1651,8 @@ var ValidateActionInput = BaseActionInput.merge(
1632
1651
  );
1633
1652
  var NotifyActionInput = BaseActionInput.merge(
1634
1653
  import_zod19.z.object({
1635
- type: import_zod19.z.literal(ActionType.NOTIFY).default(ActionType.NOTIFY)
1654
+ type: import_zod19.z.literal(ActionType.NOTIFY).default(ActionType.NOTIFY),
1655
+ createdAtLocation: import_zod19.z.string()
1636
1656
  })
1637
1657
  );
1638
1658
  var DeclareActionInput = BaseActionInput.merge(
@@ -1770,9 +1790,6 @@ function getStatusFromActions(actions) {
1770
1790
  if (action.type === ActionType.ARCHIVED) {
1771
1791
  return EventStatus.ARCHIVED;
1772
1792
  }
1773
- if (action.type === ActionType.NOTIFY) {
1774
- return EventStatus.NOTIFIED;
1775
- }
1776
1793
  return status;
1777
1794
  }, EventStatus.CREATED);
1778
1795
  }
@@ -2779,7 +2796,7 @@ var TENNIS_CLUB_FORM = defineForm({
2779
2796
  review: {
2780
2797
  title: {
2781
2798
  id: "v2.event.tennis-club-membership.action.declare.form.review.title",
2782
- defaultMessage: "Member declaration for {firstname} {surname}",
2799
+ defaultMessage: "Member declaration{hasAnyKey, select, true { for {applicant.firstname} {applicant.surname}} other {}}",
2783
2800
  description: "Title of the form to show in review page"
2784
2801
  },
2785
2802
  fields: [
@@ -3049,7 +3066,7 @@ var tennisClubMembershipEvent = defineConfig({
3049
3066
  ],
3050
3067
  actions: [
3051
3068
  {
3052
- type: "DECLARE",
3069
+ type: ActionType.DECLARE,
3053
3070
  label: {
3054
3071
  defaultMessage: "Send an application",
3055
3072
  description: "This is shown as the action name anywhere the user can trigger the action from",
@@ -3058,25 +3075,25 @@ var tennisClubMembershipEvent = defineConfig({
3058
3075
  forms: [TENNIS_CLUB_FORM]
3059
3076
  },
3060
3077
  {
3061
- type: "REGISTER",
3078
+ type: ActionType.VALIDATE,
3062
3079
  label: {
3063
- defaultMessage: "Register",
3080
+ defaultMessage: "Validate",
3064
3081
  description: "This is shown as the action name anywhere the user can trigger the action from",
3065
- id: "event.tennis-club-membership.action.register.label"
3082
+ id: "event.tennis-club-membership.action.validate.label"
3066
3083
  },
3067
3084
  forms: [TENNIS_CLUB_FORM]
3068
3085
  },
3069
3086
  {
3070
- type: "VALIDATE",
3087
+ type: ActionType.REGISTER,
3071
3088
  label: {
3072
- defaultMessage: "Validate",
3089
+ defaultMessage: "Register",
3073
3090
  description: "This is shown as the action name anywhere the user can trigger the action from",
3074
- id: "event.tennis-club-membership.action.validate.label"
3091
+ id: "event.tennis-club-membership.action.register.label"
3075
3092
  },
3076
- forms: []
3093
+ forms: [TENNIS_CLUB_FORM]
3077
3094
  },
3078
3095
  {
3079
- type: "REQUEST_CORRECTION",
3096
+ type: ActionType.REQUEST_CORRECTION,
3080
3097
  label: {
3081
3098
  defaultMessage: "Request correction",
3082
3099
  description: "This is shown as the action name anywhere the user can trigger the action from",
@@ -3272,7 +3289,7 @@ var tennisClubMembershipEvent = defineConfig({
3272
3289
  ]
3273
3290
  },
3274
3291
  {
3275
- type: "APPROVE_CORRECTION",
3292
+ type: ActionType.APPROVE_CORRECTION,
3276
3293
  forms: [TENNIS_CLUB_FORM],
3277
3294
  label: {
3278
3295
  defaultMessage: "Approve correction",
@@ -3347,7 +3364,7 @@ var tennisClubMembershipEvent = defineConfig({
3347
3364
 
3348
3365
  // ../commons/src/events/test.utils.ts
3349
3366
  function generateActionInput(configuration, action) {
3350
- const fields = findActiveActionFields(configuration, action) ?? [];
3367
+ const fields = findActiveActionFormFields(configuration, action) ?? [];
3351
3368
  const data = fields.reduce(
3352
3369
  (acc, field2, i) => ({
3353
3370
  ...acc,
@@ -3402,7 +3419,7 @@ var eventPayloadGenerator = {
3402
3419
  validate: (eventId, input = {}) => ({
3403
3420
  type: ActionType.VALIDATE,
3404
3421
  transactionId: input.transactionId ?? getUUID(),
3405
- data: input.data ?? {},
3422
+ data: input.data ?? generateActionInput(tennisClubMembershipEvent, ActionType.VALIDATE),
3406
3423
  duplicates: [],
3407
3424
  eventId
3408
3425
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencrvs/toolkit",
3
- "version": "1.8.0-rc.f5b8a8a",
3
+ "version": "1.8.0-rc.fc43738",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "exports": {