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