@zyphe-sdk/core 0.6.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.d.ts +4334 -1806
- package/dist/index.js +282 -2
- package/dist/index.js.map +1 -1
- package/dist/openapi.d.ts +2071 -625
- package/dist/openapi.json +3148 -625
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1526,6 +1526,210 @@ 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
|
+
}
|
|
1529
1733
|
|
|
1530
1734
|
// src/tin-check.ts
|
|
1531
1735
|
async function runTinCheck({ organizationId, isSandbox, name, tin, address, giin, mock, locale }, opts) {
|
|
@@ -1553,7 +1757,7 @@ async function runTinCheck({ organizationId, isSandbox, name, tin, address, giin
|
|
|
1553
1757
|
}
|
|
1554
1758
|
});
|
|
1555
1759
|
}
|
|
1556
|
-
async function listTinChecks({ organizationId, isSandbox, take, skip, locale }, opts) {
|
|
1760
|
+
async function listTinChecks({ organizationId, isSandbox, take, skip, verificationRequestId, flowResultId, locale }, opts) {
|
|
1557
1761
|
ensureApiKeyType(opts.apiKey, ["SECRET"]);
|
|
1558
1762
|
const client = zypheApiClient(opts);
|
|
1559
1763
|
return client.GET("/sdk/organizations/{organization_id}/tin-checks", {
|
|
@@ -1564,6 +1768,8 @@ async function listTinChecks({ organizationId, isSandbox, take, skip, locale },
|
|
|
1564
1768
|
query: {
|
|
1565
1769
|
take,
|
|
1566
1770
|
skip,
|
|
1771
|
+
verificationRequestId,
|
|
1772
|
+
flowResultId,
|
|
1567
1773
|
sandbox: isSandbox,
|
|
1568
1774
|
locale
|
|
1569
1775
|
}
|
|
@@ -1611,6 +1817,68 @@ async function getTinCheckQuote({ organizationId, isSandbox, locale }, opts) {
|
|
|
1611
1817
|
});
|
|
1612
1818
|
}
|
|
1613
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
|
+
}
|
|
1881
|
+
|
|
1614
1882
|
// src/types.ts
|
|
1615
1883
|
var DocumentType = {
|
|
1616
1884
|
IDENTITY_CARD: 12,
|
|
@@ -1782,6 +2050,8 @@ export {
|
|
|
1782
2050
|
WebhookSignatureErrorCodes,
|
|
1783
2051
|
WebhookSignatureErrorMessages,
|
|
1784
2052
|
ZypheError,
|
|
2053
|
+
addKybCaseDirectors,
|
|
2054
|
+
addKybCaseUbos,
|
|
1785
2055
|
addKybDirectors,
|
|
1786
2056
|
addKybUbos,
|
|
1787
2057
|
bufferToHex,
|
|
@@ -1790,21 +2060,31 @@ export {
|
|
|
1790
2060
|
completeLivenessStep,
|
|
1791
2061
|
constructVerificationSessionUrl,
|
|
1792
2062
|
createVerificationSession,
|
|
2063
|
+
decideKybCase,
|
|
1793
2064
|
getDvResult,
|
|
1794
2065
|
getFlowResult,
|
|
2066
|
+
getKybCase,
|
|
2067
|
+
getKybCaseOfficers,
|
|
1795
2068
|
getNextStepDetails,
|
|
1796
2069
|
getTinCheck,
|
|
1797
2070
|
getTinCheckQuote,
|
|
2071
|
+
getTransaction,
|
|
1798
2072
|
hexToBytes,
|
|
2073
|
+
ingestTransaction,
|
|
1799
2074
|
listFlowResults,
|
|
1800
2075
|
listTinChecks,
|
|
1801
2076
|
parseSignatureHeader,
|
|
2077
|
+
removeKybCaseDirector,
|
|
2078
|
+
removeKybCaseUbo,
|
|
1802
2079
|
removeKybDirector,
|
|
1803
2080
|
removeKybUbo,
|
|
2081
|
+
requestKybCaseOnDemandDocument,
|
|
1804
2082
|
requestKybOnDemandDocument,
|
|
1805
2083
|
runTinCheck,
|
|
1806
2084
|
screenAml,
|
|
2085
|
+
sendKybCaseUboReminder,
|
|
1807
2086
|
sendKybUboReminder,
|
|
1808
|
-
timingSafeEqual
|
|
2087
|
+
timingSafeEqual,
|
|
2088
|
+
updateTransactionStatus
|
|
1809
2089
|
};
|
|
1810
2090
|
//# sourceMappingURL=index.js.map
|