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/index.mjs
CHANGED
|
@@ -3203,26 +3203,19 @@ var KycClient = class extends BaseClient {
|
|
|
3203
3203
|
}, void 0, requestOptions);
|
|
3204
3204
|
}
|
|
3205
3205
|
/**
|
|
3206
|
-
* Get a KYC
|
|
3206
|
+
* Get a KYC request by ID
|
|
3207
3207
|
*
|
|
3208
|
-
*
|
|
3209
|
-
*
|
|
3210
|
-
* your own customer reference (the `forward_reference`).
|
|
3211
|
-
*
|
|
3212
|
-
* @param id - KYC record ID (the `kyc_id` returned by `requestKycSubmitLink`)
|
|
3213
|
-
* @returns KYC record including proofs (with download links) and alerts
|
|
3208
|
+
* @param id - KYC request ID
|
|
3209
|
+
* @returns KYC request details including proofs and alerts
|
|
3214
3210
|
*
|
|
3215
3211
|
* @example
|
|
3216
3212
|
* ```typescript
|
|
3217
3213
|
* const kyc = await client.getKycRequest("550e8400-e29b-41d4-a716-446655440000");
|
|
3218
3214
|
* console.log(`Status: ${kyc.status}, ID Verified: ${kyc.id_verified}`);
|
|
3219
|
-
* kyc.proofs?.forEach(proof => console.log(`${proof.type}: ${proof.link}`));
|
|
3220
3215
|
* ```
|
|
3221
3216
|
*/
|
|
3222
3217
|
async getKycRequest(id) {
|
|
3223
|
-
return this.request(`/api/v1/kyc/${
|
|
3224
|
-
headers: this.getUserHeaders()
|
|
3225
|
-
});
|
|
3218
|
+
return this.request(`/api/v1/kyc/requests/${id}`);
|
|
3226
3219
|
}
|
|
3227
3220
|
/**
|
|
3228
3221
|
* List KYC requests with filters and pagination
|
|
@@ -3239,10 +3232,6 @@ var KycClient = class extends BaseClient {
|
|
|
3239
3232
|
* );
|
|
3240
3233
|
* console.log(`Found ${requests.total} pending requests`);
|
|
3241
3234
|
* ```
|
|
3242
|
-
*
|
|
3243
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
3244
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
3245
|
-
* fails with `AuthenticationError` or a permission error.
|
|
3246
3235
|
*/
|
|
3247
3236
|
async listKycRequests(filters, pagination) {
|
|
3248
3237
|
const params = {};
|
|
@@ -3280,10 +3269,6 @@ var KycClient = class extends BaseClient {
|
|
|
3280
3269
|
* reason: "Document expired"
|
|
3281
3270
|
* });
|
|
3282
3271
|
* ```
|
|
3283
|
-
*
|
|
3284
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
3285
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
3286
|
-
* fails with `AuthenticationError` or a permission error.
|
|
3287
3272
|
*/
|
|
3288
3273
|
async updateKycStatus(request) {
|
|
3289
3274
|
await this.request("/api/v1/kyc/status", {
|
|
@@ -3320,24 +3305,22 @@ var KycClient = class extends BaseClient {
|
|
|
3320
3305
|
/**
|
|
3321
3306
|
* Get downloadable URLs for KYC proofs/documents
|
|
3322
3307
|
*
|
|
3323
|
-
*
|
|
3324
|
-
*
|
|
3325
|
-
* separate endpoint is needed. Proofs without a link are omitted.
|
|
3326
|
-
*
|
|
3327
|
-
* @param kycId - KYC record ID
|
|
3328
|
-
* @returns Array of proof download URLs
|
|
3308
|
+
* @param kycId - KYC request ID
|
|
3309
|
+
* @returns Array of proof download URLs with expiration
|
|
3329
3310
|
*
|
|
3330
3311
|
* @example
|
|
3331
3312
|
* ```typescript
|
|
3332
3313
|
* const proofs = await client.getProofDownloadURLs("550e8400-e29b-41d4-a716-446655440000");
|
|
3333
3314
|
* proofs.forEach(proof => {
|
|
3334
|
-
* console.log(`${proof.type}: ${proof.url}`);
|
|
3315
|
+
* console.log(`${proof.type}: ${proof.url} (expires: ${proof.expires_at})`);
|
|
3335
3316
|
* });
|
|
3336
3317
|
* ```
|
|
3337
3318
|
*/
|
|
3338
3319
|
async getProofDownloadURLs(kycId) {
|
|
3339
|
-
|
|
3340
|
-
|
|
3320
|
+
return this.request(
|
|
3321
|
+
`/api/v1/kyc/proofs/${kycId}`,
|
|
3322
|
+
{ headers: this.getUserHeaders() }
|
|
3323
|
+
);
|
|
3341
3324
|
}
|
|
3342
3325
|
// ============================================================================
|
|
3343
3326
|
// KYC Overview & Statistics
|
|
@@ -3358,10 +3341,6 @@ var KycClient = class extends BaseClient {
|
|
|
3358
3341
|
* console.log(`Total: ${overview.total}, Pending: ${overview.pending}`);
|
|
3359
3342
|
* console.log(`Approved: ${overview.approved}, Rejected: ${overview.rejected}`);
|
|
3360
3343
|
* ```
|
|
3361
|
-
*
|
|
3362
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
3363
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
3364
|
-
* fails with `AuthenticationError` or a permission error.
|
|
3365
3344
|
*/
|
|
3366
3345
|
async getOverview(fromDate, toDate) {
|
|
3367
3346
|
const params = {};
|
|
@@ -3379,10 +3358,6 @@ var KycClient = class extends BaseClient {
|
|
|
3379
3358
|
*
|
|
3380
3359
|
* @param alertId - Alert ID
|
|
3381
3360
|
* @returns Alert details
|
|
3382
|
-
*
|
|
3383
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
3384
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
3385
|
-
* fails with `AuthenticationError` or a permission error.
|
|
3386
3361
|
*/
|
|
3387
3362
|
async getAlert(alertId) {
|
|
3388
3363
|
return this.request(`/api/v1/kyc/alerts/${alertId}`);
|
|
@@ -3406,10 +3381,6 @@ var KycClient = class extends BaseClient {
|
|
|
3406
3381
|
* );
|
|
3407
3382
|
* console.log(`Found ${alerts.total} alerts`);
|
|
3408
3383
|
* ```
|
|
3409
|
-
*
|
|
3410
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
3411
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
3412
|
-
* fails with `AuthenticationError` or a permission error.
|
|
3413
3384
|
*/
|
|
3414
3385
|
async listAlerts(filters, pagination) {
|
|
3415
3386
|
const params = {};
|
|
@@ -3456,10 +3427,6 @@ var KycClient = class extends BaseClient {
|
|
|
3456
3427
|
* reason: "Requires senior review - suspicious documents"
|
|
3457
3428
|
* });
|
|
3458
3429
|
* ```
|
|
3459
|
-
*
|
|
3460
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
3461
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
3462
|
-
* fails with `AuthenticationError` or a permission error.
|
|
3463
3430
|
*/
|
|
3464
3431
|
async updateAlert(alertId, update) {
|
|
3465
3432
|
await this.request(`/api/v1/kyc/alerts/${alertId}`, {
|
|
@@ -3482,10 +3449,6 @@ var KycClient = class extends BaseClient {
|
|
|
3482
3449
|
* console.log(`Face verification required: ${prefs.is_face_verification_required}`);
|
|
3483
3450
|
* console.log(`Required documents: ${prefs.required_document_count}`);
|
|
3484
3451
|
* ```
|
|
3485
|
-
*
|
|
3486
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
3487
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
3488
|
-
* fails with `AuthenticationError` or a permission error.
|
|
3489
3452
|
*/
|
|
3490
3453
|
async getPreferences() {
|
|
3491
3454
|
return this.request("/api/v1/kyc/preferences");
|