@zyphe-sdk/core 0.5.0 → 0.7.0

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/index.js CHANGED
@@ -1526,6 +1526,358 @@ async function sendKybUboReminder({ organizationId, kybResultId, recipientIndex,
1526
1526
  }
1527
1527
  });
1528
1528
  }
1529
+ async function getKybCase({ organizationId, caseId, isSandbox, locale }, opts) {
1530
+ ensureApiKeyType(opts.apiKey, ["SECRET"]);
1531
+ const client = zypheApiClient(opts);
1532
+ return client.GET("/sdk/organizations/{organization_id}/kyb-cases/{case_id}", {
1533
+ params: {
1534
+ path: {
1535
+ organization_id: organizationId,
1536
+ case_id: caseId
1537
+ },
1538
+ query: {
1539
+ sandbox: isSandbox,
1540
+ locale
1541
+ }
1542
+ },
1543
+ headers: {
1544
+ [API_KEY_HEADER]: opts.apiKey
1545
+ }
1546
+ });
1547
+ }
1548
+ async function decideKybCase({ organizationId, caseId, isSandbox, locale, outcome, reason, reasonCode, dueDiligenceLevel, confirmingProposalId }, opts) {
1549
+ ensureApiKeyType(opts.apiKey, ["SECRET"]);
1550
+ const client = zypheApiClient(opts);
1551
+ return client.POST("/sdk/organizations/{organization_id}/kyb-cases/{case_id}/decision", {
1552
+ params: {
1553
+ path: {
1554
+ organization_id: organizationId,
1555
+ case_id: caseId
1556
+ },
1557
+ query: {
1558
+ sandbox: isSandbox,
1559
+ locale
1560
+ }
1561
+ },
1562
+ body: {
1563
+ outcome,
1564
+ reason,
1565
+ reasonCode,
1566
+ dueDiligenceLevel,
1567
+ confirmingProposalId
1568
+ },
1569
+ headers: {
1570
+ [API_KEY_HEADER]: opts.apiKey
1571
+ }
1572
+ });
1573
+ }
1574
+ async function getKybCaseOfficers({ organizationId, caseId, isSandbox, locale }, opts) {
1575
+ ensureApiKeyType(opts.apiKey, ["SECRET"]);
1576
+ const client = zypheApiClient(opts);
1577
+ return client.GET("/sdk/organizations/{organization_id}/kyb-cases/{case_id}/officers", {
1578
+ params: {
1579
+ path: {
1580
+ organization_id: organizationId,
1581
+ case_id: caseId
1582
+ },
1583
+ query: {
1584
+ sandbox: isSandbox,
1585
+ locale
1586
+ }
1587
+ },
1588
+ headers: {
1589
+ [API_KEY_HEADER]: opts.apiKey
1590
+ }
1591
+ });
1592
+ }
1593
+ async function addKybCaseUbos({ organizationId, caseId, isSandbox, persons, locale }, opts) {
1594
+ ensureApiKeyType(opts.apiKey, ["SECRET"]);
1595
+ const client = zypheApiClient(opts);
1596
+ return client.POST("/sdk/organizations/{organization_id}/kyb-cases/{case_id}/ubos", {
1597
+ params: {
1598
+ path: {
1599
+ organization_id: organizationId,
1600
+ case_id: caseId
1601
+ },
1602
+ query: {
1603
+ sandbox: isSandbox,
1604
+ locale
1605
+ }
1606
+ },
1607
+ body: {
1608
+ persons
1609
+ },
1610
+ headers: {
1611
+ [API_KEY_HEADER]: opts.apiKey
1612
+ }
1613
+ });
1614
+ }
1615
+ async function removeKybCaseUbo({ organizationId, caseId, personId, isSandbox, locale }, opts) {
1616
+ ensureApiKeyType(opts.apiKey, ["SECRET"]);
1617
+ const client = zypheApiClient(opts);
1618
+ return client.DELETE("/sdk/organizations/{organization_id}/kyb-cases/{case_id}/ubos/{person_id}", {
1619
+ params: {
1620
+ path: {
1621
+ organization_id: organizationId,
1622
+ case_id: caseId,
1623
+ person_id: personId
1624
+ },
1625
+ query: {
1626
+ sandbox: isSandbox,
1627
+ locale
1628
+ }
1629
+ },
1630
+ headers: {
1631
+ [API_KEY_HEADER]: opts.apiKey
1632
+ }
1633
+ });
1634
+ }
1635
+ async function addKybCaseDirectors({ organizationId, caseId, isSandbox, persons, locale }, opts) {
1636
+ ensureApiKeyType(opts.apiKey, ["SECRET"]);
1637
+ const client = zypheApiClient(opts);
1638
+ return client.POST("/sdk/organizations/{organization_id}/kyb-cases/{case_id}/directors", {
1639
+ params: {
1640
+ path: {
1641
+ organization_id: organizationId,
1642
+ case_id: caseId
1643
+ },
1644
+ query: {
1645
+ sandbox: isSandbox,
1646
+ locale
1647
+ }
1648
+ },
1649
+ body: {
1650
+ persons
1651
+ },
1652
+ headers: {
1653
+ [API_KEY_HEADER]: opts.apiKey
1654
+ }
1655
+ });
1656
+ }
1657
+ async function removeKybCaseDirector({ organizationId, caseId, personId, isSandbox, locale }, opts) {
1658
+ ensureApiKeyType(opts.apiKey, ["SECRET"]);
1659
+ const client = zypheApiClient(opts);
1660
+ return client.DELETE("/sdk/organizations/{organization_id}/kyb-cases/{case_id}/directors/{person_id}", {
1661
+ params: {
1662
+ path: {
1663
+ organization_id: organizationId,
1664
+ case_id: caseId,
1665
+ person_id: personId
1666
+ },
1667
+ query: {
1668
+ sandbox: isSandbox,
1669
+ locale
1670
+ }
1671
+ },
1672
+ headers: {
1673
+ [API_KEY_HEADER]: opts.apiKey
1674
+ }
1675
+ });
1676
+ }
1677
+ async function requestKybCaseOnDemandDocument({
1678
+ organizationId,
1679
+ caseId,
1680
+ isSandbox,
1681
+ locale,
1682
+ documentKey,
1683
+ recipientEmail,
1684
+ subject,
1685
+ body,
1686
+ description
1687
+ }, opts) {
1688
+ ensureApiKeyType(opts.apiKey, ["SECRET"]);
1689
+ const client = zypheApiClient(opts);
1690
+ return client.POST("/sdk/organizations/{organization_id}/kyb-cases/{case_id}/document-requests/on-demand", {
1691
+ params: {
1692
+ path: {
1693
+ organization_id: organizationId,
1694
+ case_id: caseId
1695
+ },
1696
+ query: {
1697
+ sandbox: isSandbox,
1698
+ locale
1699
+ }
1700
+ },
1701
+ body: {
1702
+ documentKey,
1703
+ recipientEmail,
1704
+ subject,
1705
+ body,
1706
+ description
1707
+ },
1708
+ headers: {
1709
+ [API_KEY_HEADER]: opts.apiKey
1710
+ }
1711
+ });
1712
+ }
1713
+ async function sendKybCaseUboReminder({ organizationId, caseId, recipientIndex, isSandbox, locale }, opts) {
1714
+ ensureApiKeyType(opts.apiKey, ["SECRET"]);
1715
+ const client = zypheApiClient(opts);
1716
+ return client.POST("/sdk/organizations/{organization_id}/kyb-cases/{case_id}/reminders/ubo/{recipient_index}", {
1717
+ params: {
1718
+ path: {
1719
+ organization_id: organizationId,
1720
+ case_id: caseId,
1721
+ recipient_index: recipientIndex
1722
+ },
1723
+ query: {
1724
+ sandbox: isSandbox,
1725
+ locale
1726
+ }
1727
+ },
1728
+ headers: {
1729
+ [API_KEY_HEADER]: opts.apiKey
1730
+ }
1731
+ });
1732
+ }
1733
+
1734
+ // src/tin-check.ts
1735
+ async function runTinCheck({ organizationId, isSandbox, name, tin, address, giin, mock, locale }, opts) {
1736
+ ensureApiKeyType(opts.apiKey, ["SECRET"]);
1737
+ const client = zypheApiClient(opts);
1738
+ return client.POST("/sdk/organizations/{organization_id}/tin-checks", {
1739
+ params: {
1740
+ path: {
1741
+ organization_id: organizationId
1742
+ },
1743
+ query: {
1744
+ sandbox: isSandbox,
1745
+ locale
1746
+ }
1747
+ },
1748
+ body: {
1749
+ name,
1750
+ tin,
1751
+ address,
1752
+ giin,
1753
+ mock
1754
+ },
1755
+ headers: {
1756
+ [API_KEY_HEADER]: opts.apiKey
1757
+ }
1758
+ });
1759
+ }
1760
+ async function listTinChecks({ organizationId, isSandbox, take, skip, verificationRequestId, flowResultId, locale }, opts) {
1761
+ ensureApiKeyType(opts.apiKey, ["SECRET"]);
1762
+ const client = zypheApiClient(opts);
1763
+ return client.GET("/sdk/organizations/{organization_id}/tin-checks", {
1764
+ params: {
1765
+ path: {
1766
+ organization_id: organizationId
1767
+ },
1768
+ query: {
1769
+ take,
1770
+ skip,
1771
+ verificationRequestId,
1772
+ flowResultId,
1773
+ sandbox: isSandbox,
1774
+ locale
1775
+ }
1776
+ },
1777
+ headers: {
1778
+ [API_KEY_HEADER]: opts.apiKey
1779
+ }
1780
+ });
1781
+ }
1782
+ async function getTinCheck({ organizationId, checkId, isSandbox, locale }, opts) {
1783
+ ensureApiKeyType(opts.apiKey, ["SECRET"]);
1784
+ const client = zypheApiClient(opts);
1785
+ return client.GET("/sdk/organizations/{organization_id}/tin-checks/{check_id}", {
1786
+ params: {
1787
+ path: {
1788
+ organization_id: organizationId,
1789
+ check_id: checkId
1790
+ },
1791
+ query: {
1792
+ sandbox: isSandbox,
1793
+ locale
1794
+ }
1795
+ },
1796
+ headers: {
1797
+ [API_KEY_HEADER]: opts.apiKey
1798
+ }
1799
+ });
1800
+ }
1801
+ async function getTinCheckQuote({ organizationId, isSandbox, locale }, opts) {
1802
+ ensureApiKeyType(opts.apiKey, ["SECRET"]);
1803
+ const client = zypheApiClient(opts);
1804
+ return client.GET("/sdk/organizations/{organization_id}/tin-checks/quote", {
1805
+ params: {
1806
+ path: {
1807
+ organization_id: organizationId
1808
+ },
1809
+ query: {
1810
+ sandbox: isSandbox,
1811
+ locale
1812
+ }
1813
+ },
1814
+ headers: {
1815
+ [API_KEY_HEADER]: opts.apiKey
1816
+ }
1817
+ });
1818
+ }
1819
+
1820
+ // src/transaction-monitoring.ts
1821
+ async function ingestTransaction({ organizationId, isSandbox, transaction, locale }, opts) {
1822
+ ensureApiKeyType(opts.apiKey, ["SECRET"]);
1823
+ const client = zypheApiClient(opts);
1824
+ return client.POST("/sdk/organizations/{organization_id}/transactions", {
1825
+ params: {
1826
+ path: {
1827
+ organization_id: organizationId
1828
+ },
1829
+ query: {
1830
+ sandbox: isSandbox,
1831
+ locale
1832
+ }
1833
+ },
1834
+ body: transaction,
1835
+ headers: {
1836
+ [API_KEY_HEADER]: opts.apiKey
1837
+ }
1838
+ });
1839
+ }
1840
+ async function getTransaction({ organizationId, transactionId, isSandbox, locale }, opts) {
1841
+ ensureApiKeyType(opts.apiKey, ["SECRET"]);
1842
+ const client = zypheApiClient(opts);
1843
+ return client.GET("/sdk/organizations/{organization_id}/transactions/{transaction_id}", {
1844
+ params: {
1845
+ path: {
1846
+ organization_id: organizationId,
1847
+ transaction_id: transactionId
1848
+ },
1849
+ query: {
1850
+ sandbox: isSandbox,
1851
+ locale
1852
+ }
1853
+ },
1854
+ headers: {
1855
+ [API_KEY_HEADER]: opts.apiKey
1856
+ }
1857
+ });
1858
+ }
1859
+ async function updateTransactionStatus({ organizationId, transactionId, status, isSandbox, locale }, opts) {
1860
+ ensureApiKeyType(opts.apiKey, ["SECRET"]);
1861
+ const client = zypheApiClient(opts);
1862
+ return client.PATCH("/sdk/organizations/{organization_id}/transactions/{transaction_id}", {
1863
+ params: {
1864
+ path: {
1865
+ organization_id: organizationId,
1866
+ transaction_id: transactionId
1867
+ },
1868
+ query: {
1869
+ sandbox: isSandbox,
1870
+ locale
1871
+ }
1872
+ },
1873
+ body: {
1874
+ status
1875
+ },
1876
+ headers: {
1877
+ [API_KEY_HEADER]: opts.apiKey
1878
+ }
1879
+ });
1880
+ }
1529
1881
 
1530
1882
  // src/types.ts
1531
1883
  var DocumentType = {
@@ -1698,6 +2050,8 @@ export {
1698
2050
  WebhookSignatureErrorCodes,
1699
2051
  WebhookSignatureErrorMessages,
1700
2052
  ZypheError,
2053
+ addKybCaseDirectors,
2054
+ addKybCaseUbos,
1701
2055
  addKybDirectors,
1702
2056
  addKybUbos,
1703
2057
  bufferToHex,
@@ -1706,17 +2060,31 @@ export {
1706
2060
  completeLivenessStep,
1707
2061
  constructVerificationSessionUrl,
1708
2062
  createVerificationSession,
2063
+ decideKybCase,
1709
2064
  getDvResult,
1710
2065
  getFlowResult,
2066
+ getKybCase,
2067
+ getKybCaseOfficers,
1711
2068
  getNextStepDetails,
2069
+ getTinCheck,
2070
+ getTinCheckQuote,
2071
+ getTransaction,
1712
2072
  hexToBytes,
2073
+ ingestTransaction,
1713
2074
  listFlowResults,
2075
+ listTinChecks,
1714
2076
  parseSignatureHeader,
2077
+ removeKybCaseDirector,
2078
+ removeKybCaseUbo,
1715
2079
  removeKybDirector,
1716
2080
  removeKybUbo,
2081
+ requestKybCaseOnDemandDocument,
1717
2082
  requestKybOnDemandDocument,
2083
+ runTinCheck,
1718
2084
  screenAml,
2085
+ sendKybCaseUboReminder,
1719
2086
  sendKybUboReminder,
1720
- timingSafeEqual
2087
+ timingSafeEqual,
2088
+ updateTransactionStatus
1721
2089
  };
1722
2090
  //# sourceMappingURL=index.js.map