vesant-sdk 1.8.0-dev.9f7204d → 1.8.0-next.65ec9ad
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/README.md +3 -5
- package/dist/index.js +11 -48
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -48
- package/dist/index.mjs.map +1 -1
- package/dist/kyc/core.js +11 -48
- package/dist/kyc/core.js.map +1 -1
- package/dist/kyc/core.mjs +11 -48
- package/dist/kyc/core.mjs.map +1 -1
- package/dist/kyc/index.d.mts +8 -53
- package/dist/kyc/index.d.ts +8 -53
- package/dist/kyc/index.js +11 -48
- package/dist/kyc/index.js.map +1 -1
- package/dist/kyc/index.mjs +11 -48
- package/dist/kyc/index.mjs.map +1 -1
- package/dist/react.d.mts +0 -12
- package/dist/react.d.ts +0 -12
- package/dist/react.js.map +1 -1
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/kyc/core.mjs
CHANGED
|
@@ -890,26 +890,19 @@ var KycClient = class extends BaseClient {
|
|
|
890
890
|
}, void 0, requestOptions);
|
|
891
891
|
}
|
|
892
892
|
/**
|
|
893
|
-
* Get a KYC
|
|
893
|
+
* Get a KYC request by ID
|
|
894
894
|
*
|
|
895
|
-
*
|
|
896
|
-
*
|
|
897
|
-
* your own customer reference (the `forward_reference`).
|
|
898
|
-
*
|
|
899
|
-
* @param id - KYC record ID (the `kyc_id` returned by `requestKycSubmitLink`)
|
|
900
|
-
* @returns KYC record including proofs (with download links) and alerts
|
|
895
|
+
* @param id - KYC request ID
|
|
896
|
+
* @returns KYC request details including proofs and alerts
|
|
901
897
|
*
|
|
902
898
|
* @example
|
|
903
899
|
* ```typescript
|
|
904
900
|
* const kyc = await client.getKycRequest("550e8400-e29b-41d4-a716-446655440000");
|
|
905
901
|
* console.log(`Status: ${kyc.status}, ID Verified: ${kyc.id_verified}`);
|
|
906
|
-
* kyc.proofs?.forEach(proof => console.log(`${proof.type}: ${proof.link}`));
|
|
907
902
|
* ```
|
|
908
903
|
*/
|
|
909
904
|
async getKycRequest(id) {
|
|
910
|
-
return this.request(`/api/v1/kyc/${
|
|
911
|
-
headers: this.getUserHeaders()
|
|
912
|
-
});
|
|
905
|
+
return this.request(`/api/v1/kyc/requests/${id}`);
|
|
913
906
|
}
|
|
914
907
|
/**
|
|
915
908
|
* List KYC requests with filters and pagination
|
|
@@ -926,10 +919,6 @@ var KycClient = class extends BaseClient {
|
|
|
926
919
|
* );
|
|
927
920
|
* console.log(`Found ${requests.total} pending requests`);
|
|
928
921
|
* ```
|
|
929
|
-
*
|
|
930
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
931
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
932
|
-
* fails with `AuthenticationError` or a permission error.
|
|
933
922
|
*/
|
|
934
923
|
async listKycRequests(filters, pagination) {
|
|
935
924
|
const params = {};
|
|
@@ -967,10 +956,6 @@ var KycClient = class extends BaseClient {
|
|
|
967
956
|
* reason: "Document expired"
|
|
968
957
|
* });
|
|
969
958
|
* ```
|
|
970
|
-
*
|
|
971
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
972
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
973
|
-
* fails with `AuthenticationError` or a permission error.
|
|
974
959
|
*/
|
|
975
960
|
async updateKycStatus(request) {
|
|
976
961
|
await this.request("/api/v1/kyc/status", {
|
|
@@ -1007,24 +992,22 @@ var KycClient = class extends BaseClient {
|
|
|
1007
992
|
/**
|
|
1008
993
|
* Get downloadable URLs for KYC proofs/documents
|
|
1009
994
|
*
|
|
1010
|
-
*
|
|
1011
|
-
*
|
|
1012
|
-
* separate endpoint is needed. Proofs without a link are omitted.
|
|
1013
|
-
*
|
|
1014
|
-
* @param kycId - KYC record ID
|
|
1015
|
-
* @returns Array of proof download URLs
|
|
995
|
+
* @param kycId - KYC request ID
|
|
996
|
+
* @returns Array of proof download URLs with expiration
|
|
1016
997
|
*
|
|
1017
998
|
* @example
|
|
1018
999
|
* ```typescript
|
|
1019
1000
|
* const proofs = await client.getProofDownloadURLs("550e8400-e29b-41d4-a716-446655440000");
|
|
1020
1001
|
* proofs.forEach(proof => {
|
|
1021
|
-
* console.log(`${proof.type}: ${proof.url}`);
|
|
1002
|
+
* console.log(`${proof.type}: ${proof.url} (expires: ${proof.expires_at})`);
|
|
1022
1003
|
* });
|
|
1023
1004
|
* ```
|
|
1024
1005
|
*/
|
|
1025
1006
|
async getProofDownloadURLs(kycId) {
|
|
1026
|
-
|
|
1027
|
-
|
|
1007
|
+
return this.request(
|
|
1008
|
+
`/api/v1/kyc/proofs/${kycId}`,
|
|
1009
|
+
{ headers: this.getUserHeaders() }
|
|
1010
|
+
);
|
|
1028
1011
|
}
|
|
1029
1012
|
// ============================================================================
|
|
1030
1013
|
// KYC Overview & Statistics
|
|
@@ -1045,10 +1028,6 @@ var KycClient = class extends BaseClient {
|
|
|
1045
1028
|
* console.log(`Total: ${overview.total}, Pending: ${overview.pending}`);
|
|
1046
1029
|
* console.log(`Approved: ${overview.approved}, Rejected: ${overview.rejected}`);
|
|
1047
1030
|
* ```
|
|
1048
|
-
*
|
|
1049
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
1050
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
1051
|
-
* fails with `AuthenticationError` or a permission error.
|
|
1052
1031
|
*/
|
|
1053
1032
|
async getOverview(fromDate, toDate) {
|
|
1054
1033
|
const params = {};
|
|
@@ -1066,10 +1045,6 @@ var KycClient = class extends BaseClient {
|
|
|
1066
1045
|
*
|
|
1067
1046
|
* @param alertId - Alert ID
|
|
1068
1047
|
* @returns Alert details
|
|
1069
|
-
*
|
|
1070
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
1071
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
1072
|
-
* fails with `AuthenticationError` or a permission error.
|
|
1073
1048
|
*/
|
|
1074
1049
|
async getAlert(alertId) {
|
|
1075
1050
|
return this.request(`/api/v1/kyc/alerts/${alertId}`);
|
|
@@ -1093,10 +1068,6 @@ var KycClient = class extends BaseClient {
|
|
|
1093
1068
|
* );
|
|
1094
1069
|
* console.log(`Found ${alerts.total} alerts`);
|
|
1095
1070
|
* ```
|
|
1096
|
-
*
|
|
1097
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
1098
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
1099
|
-
* fails with `AuthenticationError` or a permission error.
|
|
1100
1071
|
*/
|
|
1101
1072
|
async listAlerts(filters, pagination) {
|
|
1102
1073
|
const params = {};
|
|
@@ -1143,10 +1114,6 @@ var KycClient = class extends BaseClient {
|
|
|
1143
1114
|
* reason: "Requires senior review - suspicious documents"
|
|
1144
1115
|
* });
|
|
1145
1116
|
* ```
|
|
1146
|
-
*
|
|
1147
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
1148
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
1149
|
-
* fails with `AuthenticationError` or a permission error.
|
|
1150
1117
|
*/
|
|
1151
1118
|
async updateAlert(alertId, update) {
|
|
1152
1119
|
await this.request(`/api/v1/kyc/alerts/${alertId}`, {
|
|
@@ -1169,10 +1136,6 @@ var KycClient = class extends BaseClient {
|
|
|
1169
1136
|
* console.log(`Face verification required: ${prefs.is_face_verification_required}`);
|
|
1170
1137
|
* console.log(`Required documents: ${prefs.required_document_count}`);
|
|
1171
1138
|
* ```
|
|
1172
|
-
*
|
|
1173
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
1174
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
1175
|
-
* fails with `AuthenticationError` or a permission error.
|
|
1176
1139
|
*/
|
|
1177
1140
|
async getPreferences() {
|
|
1178
1141
|
return this.request("/api/v1/kyc/preferences");
|