vesant-sdk 1.7.0-dev.9f7da53 → 1.7.0-dev.a85efc5
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/{client-ZNdnpWe7.d.mts → client-B0qhE2kr.d.mts} +1 -1
- package/dist/{client-DoMSYMMR.d.ts → client-DF7hlMEz.d.ts} +13 -0
- package/dist/{client-DMIRx7Tu.d.mts → client-DrjgZoH_.d.mts} +13 -0
- package/dist/{client-C3DCmGe9.d.ts → client-DtH2RLuy.d.ts} +1 -1
- package/dist/compliance/index.d.mts +2 -2
- package/dist/compliance/index.d.ts +2 -2
- package/dist/compliance/index.js +0 -3
- package/dist/compliance/index.js.map +1 -1
- package/dist/compliance/index.mjs +0 -3
- package/dist/compliance/index.mjs.map +1 -1
- package/dist/geolocation/index.d.mts +2 -2
- package/dist/geolocation/index.d.ts +2 -2
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +24 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -20
- package/dist/index.mjs.map +1 -1
- package/dist/kyc/core.d.mts +1 -1
- package/dist/kyc/core.d.ts +1 -1
- package/dist/kyc/core.js +20 -16
- package/dist/kyc/core.js.map +1 -1
- package/dist/kyc/core.mjs +20 -16
- package/dist/kyc/core.mjs.map +1 -1
- package/dist/kyc/index.d.mts +110 -55
- package/dist/kyc/index.d.ts +110 -55
- package/dist/kyc/index.js +20 -16
- package/dist/kyc/index.js.map +1 -1
- package/dist/kyc/index.mjs +20 -16
- package/dist/kyc/index.mjs.map +1 -1
- package/dist/react.d.mts +16 -14
- package/dist/react.d.ts +16 -14
- package/dist/react.js +131 -83
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +131 -83
- package/dist/react.mjs.map +1 -1
- package/dist/tax/index.d.mts +18 -1
- package/dist/tax/index.d.ts +18 -1
- package/dist/tax/index.js +4 -1
- package/dist/tax/index.js.map +1 -1
- package/dist/tax/index.mjs +4 -1
- package/dist/tax/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1798,9 +1798,6 @@ var ComplianceClient = class {
|
|
|
1798
1798
|
if (cipherTextResult.risk?.is_blocked) {
|
|
1799
1799
|
blockReasons.push(...cipherTextResult.risk.block_reasons_structured ?? []);
|
|
1800
1800
|
}
|
|
1801
|
-
if (cipherTextResult.risk?.location_mismatch) {
|
|
1802
|
-
blockReasons.push(sdkReasons.gpsIPMismatch());
|
|
1803
|
-
}
|
|
1804
1801
|
}
|
|
1805
1802
|
if (geoVerification.gps_required && !cipherTextResult) {
|
|
1806
1803
|
blockReasons.push(sdkReasons.gpsRequired());
|
|
@@ -2733,7 +2730,7 @@ var KycClient = class extends BaseClient {
|
|
|
2733
2730
|
});
|
|
2734
2731
|
}
|
|
2735
2732
|
/**
|
|
2736
|
-
* Create a
|
|
2733
|
+
* Create a Event-Based Face Verification session.
|
|
2737
2734
|
*
|
|
2738
2735
|
* Inspect the response before showing UI:
|
|
2739
2736
|
* - `is_required === false` → skip face capture; `reason` explains why.
|
|
@@ -2743,7 +2740,7 @@ var KycClient = class extends BaseClient {
|
|
|
2743
2740
|
*
|
|
2744
2741
|
* @param request - Reference, customer_id, event, amount (for threshold events), optional URLs.
|
|
2745
2742
|
*/
|
|
2746
|
-
async
|
|
2743
|
+
async createEventBasedFaceVerificationSession(request) {
|
|
2747
2744
|
return this.request("/api/v1/kyc/face/session", {
|
|
2748
2745
|
method: "POST",
|
|
2749
2746
|
body: JSON.stringify(request),
|
|
@@ -2751,19 +2748,19 @@ var KycClient = class extends BaseClient {
|
|
|
2751
2748
|
});
|
|
2752
2749
|
}
|
|
2753
2750
|
/**
|
|
2754
|
-
* Submit a real-time face capture for an active
|
|
2751
|
+
* Submit a real-time face capture for an active Event-Based Face Verification session.
|
|
2755
2752
|
*
|
|
2756
2753
|
* **Mobile-only.** The server rejects desktop User-Agents with HTTP
|
|
2757
2754
|
* 400 (`face capture must be completed on a mobile device`). Use the
|
|
2758
|
-
* QR handoff from `
|
|
2755
|
+
* QR handoff from `createEventBasedFaceVerificationSession` for desktop callers.
|
|
2759
2756
|
*
|
|
2760
2757
|
* The `data` field on the response carries `retries_remaining`,
|
|
2761
2758
|
* `retry_limit_exceeded`, and the reaction flags (`enforce_logout`,
|
|
2762
2759
|
* `freeze_account`, etc.) so the tenant app can act on a final failure.
|
|
2763
2760
|
*
|
|
2764
|
-
* @param request - Token from `
|
|
2761
|
+
* @param request - Token from `createEventBasedFaceVerificationSession`, plus the base64 selfie.
|
|
2765
2762
|
*/
|
|
2766
|
-
async
|
|
2763
|
+
async submitEventBasedFaceVerificationSession(request) {
|
|
2767
2764
|
return this.request("/api/v1/kyc/face/submit", {
|
|
2768
2765
|
method: "POST",
|
|
2769
2766
|
body: JSON.stringify(request),
|
|
@@ -2771,13 +2768,17 @@ var KycClient = class extends BaseClient {
|
|
|
2771
2768
|
});
|
|
2772
2769
|
}
|
|
2773
2770
|
/**
|
|
2774
|
-
* Look up the current state of a
|
|
2775
|
-
*
|
|
2771
|
+
* Look up the current state of a Event-Based Face Verification session by its
|
|
2772
|
+
* session token. Useful for desktop pollers waiting on the mobile handoff.
|
|
2776
2773
|
*
|
|
2777
|
-
*
|
|
2774
|
+
* The lookup is scoped by the unguessable, server-issued session token (not
|
|
2775
|
+
* the enumerable forward reference): the endpoint is public/unauthenticated,
|
|
2776
|
+
* and scoping by the token is what prevents cross-tenant status reads.
|
|
2777
|
+
*
|
|
2778
|
+
* @param token - The session token returned by `createEventBasedFaceVerificationSession`.
|
|
2778
2779
|
*/
|
|
2779
|
-
async
|
|
2780
|
-
return this.requestWithRetry(`/api/v1/kyc/face/verify/${encodeURIComponent(
|
|
2780
|
+
async getEventBasedFaceVerificationSessionStatus(token) {
|
|
2781
|
+
return this.requestWithRetry(`/api/v1/kyc/face/verify/${encodeURIComponent(token)}`, {
|
|
2781
2782
|
method: "GET",
|
|
2782
2783
|
headers: this.getUserHeaders()
|
|
2783
2784
|
});
|
|
@@ -2788,7 +2789,7 @@ var KycClient = class extends BaseClient {
|
|
|
2788
2789
|
* callers poll `mobile_connected` to detect when a mobile device has
|
|
2789
2790
|
* scanned the QR and attached.
|
|
2790
2791
|
*
|
|
2791
|
-
* @param token - The session token returned by `
|
|
2792
|
+
* @param token - The session token returned by `createEventBasedFaceVerificationSession`.
|
|
2792
2793
|
*/
|
|
2793
2794
|
async getHandoffSession(token) {
|
|
2794
2795
|
return this.request(
|
|
@@ -2863,7 +2864,7 @@ var KycClient = class extends BaseClient {
|
|
|
2863
2864
|
* @example
|
|
2864
2865
|
* ```typescript
|
|
2865
2866
|
* const result = await client.submitVerification({
|
|
2866
|
-
* reference: "
|
|
2867
|
+
* reference: "4d2aff34-ab86-422d-992e-50b1234a5b67",
|
|
2867
2868
|
* email: "customer@example.com",
|
|
2868
2869
|
* country: "US",
|
|
2869
2870
|
* document: {
|
|
@@ -2895,7 +2896,7 @@ var KycClient = class extends BaseClient {
|
|
|
2895
2896
|
*
|
|
2896
2897
|
* @example
|
|
2897
2898
|
* ```typescript
|
|
2898
|
-
* const kyc = await client.getKycRequest("
|
|
2899
|
+
* const kyc = await client.getKycRequest("550e8400-e29b-41d4-a716-446655440000");
|
|
2899
2900
|
* console.log(`Status: ${kyc.status}, ID Verified: ${kyc.id_verified}`);
|
|
2900
2901
|
* ```
|
|
2901
2902
|
*/
|
|
@@ -2970,7 +2971,7 @@ var KycClient = class extends BaseClient {
|
|
|
2970
2971
|
* @example
|
|
2971
2972
|
* ```typescript
|
|
2972
2973
|
* await client.requestAdditionalDocuments({
|
|
2973
|
-
* id: "
|
|
2974
|
+
* id: "550e8400-e29b-41d4-a716-446655440000",
|
|
2974
2975
|
* document_types: ["address", "document_two"],
|
|
2975
2976
|
* message: "Please provide proof of address and secondary ID"
|
|
2976
2977
|
* });
|
|
@@ -2991,7 +2992,7 @@ var KycClient = class extends BaseClient {
|
|
|
2991
2992
|
*
|
|
2992
2993
|
* @example
|
|
2993
2994
|
* ```typescript
|
|
2994
|
-
* const proofs = await client.getProofDownloadURLs("
|
|
2995
|
+
* const proofs = await client.getProofDownloadURLs("550e8400-e29b-41d4-a716-446655440000");
|
|
2995
2996
|
* proofs.forEach(proof => {
|
|
2996
2997
|
* console.log(`${proof.type}: ${proof.url} (expires: ${proof.expires_at})`);
|
|
2997
2998
|
* });
|
|
@@ -3351,7 +3352,7 @@ var TaxClient = class extends BaseClient {
|
|
|
3351
3352
|
}
|
|
3352
3353
|
async getCustomerDocuments(customerID) {
|
|
3353
3354
|
return this.request(
|
|
3354
|
-
`/api/v1/
|
|
3355
|
+
`/api/v1/tm/customer-tax-profiles/${customerID}/documents`
|
|
3355
3356
|
);
|
|
3356
3357
|
}
|
|
3357
3358
|
async downloadTaxForm(customerID, requestOptions) {
|
|
@@ -3376,6 +3377,9 @@ var TaxClient = class extends BaseClient {
|
|
|
3376
3377
|
});
|
|
3377
3378
|
return res.version;
|
|
3378
3379
|
}
|
|
3380
|
+
async runReminders() {
|
|
3381
|
+
return this.request("/api/v1/tax/reminders/run", { method: "POST" });
|
|
3382
|
+
}
|
|
3379
3383
|
async getComplianceStats(filters) {
|
|
3380
3384
|
const params = {};
|
|
3381
3385
|
if (filters?.time_range) params.time_range = filters.time_range;
|