vesant-sdk 1.7.0-dev.e0ee6d5 → 1.7.0-dev.e1da577

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.
Files changed (43) hide show
  1. package/dist/{client-ZNdnpWe7.d.mts → client-B0qhE2kr.d.mts} +1 -1
  2. package/dist/{client-DoMSYMMR.d.ts → client-DF7hlMEz.d.ts} +13 -0
  3. package/dist/{client-DMIRx7Tu.d.mts → client-DrjgZoH_.d.mts} +13 -0
  4. package/dist/{client-C3DCmGe9.d.ts → client-DtH2RLuy.d.ts} +1 -1
  5. package/dist/compliance/index.d.mts +2 -2
  6. package/dist/compliance/index.d.ts +2 -2
  7. package/dist/compliance/index.js +0 -3
  8. package/dist/compliance/index.js.map +1 -1
  9. package/dist/compliance/index.mjs +0 -3
  10. package/dist/compliance/index.mjs.map +1 -1
  11. package/dist/geolocation/index.d.mts +2 -2
  12. package/dist/geolocation/index.d.ts +2 -2
  13. package/dist/index.d.mts +4 -4
  14. package/dist/index.d.ts +4 -4
  15. package/dist/index.js +40 -22
  16. package/dist/index.js.map +1 -1
  17. package/dist/index.mjs +40 -22
  18. package/dist/index.mjs.map +1 -1
  19. package/dist/kyc/core.d.mts +1 -1
  20. package/dist/kyc/core.d.ts +1 -1
  21. package/dist/kyc/core.js +36 -18
  22. package/dist/kyc/core.js.map +1 -1
  23. package/dist/kyc/core.mjs +36 -18
  24. package/dist/kyc/core.mjs.map +1 -1
  25. package/dist/kyc/index.d.mts +161 -58
  26. package/dist/kyc/index.d.ts +161 -58
  27. package/dist/kyc/index.js +36 -18
  28. package/dist/kyc/index.js.map +1 -1
  29. package/dist/kyc/index.mjs +36 -18
  30. package/dist/kyc/index.mjs.map +1 -1
  31. package/dist/react.d.mts +18 -14
  32. package/dist/react.d.ts +18 -14
  33. package/dist/react.js +303 -35
  34. package/dist/react.js.map +1 -1
  35. package/dist/react.mjs +303 -35
  36. package/dist/react.mjs.map +1 -1
  37. package/dist/tax/index.d.mts +18 -1
  38. package/dist/tax/index.d.ts +18 -1
  39. package/dist/tax/index.js +4 -1
  40. package/dist/tax/index.js.map +1 -1
  41. package/dist/tax/index.mjs +4 -1
  42. package/dist/tax/index.mjs.map +1 -1
  43. 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());
@@ -2710,7 +2707,13 @@ var KycClient = class extends BaseClient {
2710
2707
  *
2711
2708
  * Generates a link that the user can visit to submit their KYC documents.
2712
2709
  *
2713
- * @param request - Request containing the user ID, optional redirect URL, and optional callback URL (receives POST requests)
2710
+ * Optionally pass the customer's registered identity data as
2711
+ * `customer_data` (same shape as the geolocation `customer_data` block).
2712
+ * It seeds the customer's risk profile so document verification can
2713
+ * cross-check the submitted document against trusted reference data;
2714
+ * fields never overwrite data already on the profile.
2715
+ *
2716
+ * @param request - Request containing the user ID, optional redirect URL, optional callback URL (receives POST requests), and optional customer identity data
2714
2717
  * @returns Response containing the redirect link and KYC ID
2715
2718
  *
2716
2719
  * @example
@@ -2718,7 +2721,15 @@ var KycClient = class extends BaseClient {
2718
2721
  * const result = await client.requestKycSubmitLink({
2719
2722
  * user_id: "user_123",
2720
2723
  * redirect_url: "https://merchant.com/kyc-complete", // optional
2721
- * callback_url: "https://merchant.com/api/kyc-webhook" // optional - receives POST requests on status change
2724
+ * callback_url: "https://merchant.com/api/kyc-webhook", // optional - receives POST requests on status change
2725
+ * customer_data: { // optional - seeds the risk profile for document cross-checks
2726
+ * full_name: "John Doe",
2727
+ * date_of_birth: "1999-06-02", // ISO 8601
2728
+ * email: "john@example.com",
2729
+ * phone: "+94771234567",
2730
+ * address: "12 Main St, Colombo", // used for address verification
2731
+ * country: "LK"
2732
+ * }
2722
2733
  * });
2723
2734
  *
2724
2735
  * console.log(`Redirect user to: ${result.link}`);
@@ -2733,7 +2744,7 @@ var KycClient = class extends BaseClient {
2733
2744
  });
2734
2745
  }
2735
2746
  /**
2736
- * Create a Re-Use KYC session.
2747
+ * Create a Event-Based Face Verification session.
2737
2748
  *
2738
2749
  * Inspect the response before showing UI:
2739
2750
  * - `is_required === false` → skip face capture; `reason` explains why.
@@ -2743,7 +2754,7 @@ var KycClient = class extends BaseClient {
2743
2754
  *
2744
2755
  * @param request - Reference, customer_id, event, amount (for threshold events), optional URLs.
2745
2756
  */
2746
- async createReuseKycSession(request) {
2757
+ async createEventBasedFaceVerificationSession(request) {
2747
2758
  return this.request("/api/v1/kyc/face/session", {
2748
2759
  method: "POST",
2749
2760
  body: JSON.stringify(request),
@@ -2751,19 +2762,19 @@ var KycClient = class extends BaseClient {
2751
2762
  });
2752
2763
  }
2753
2764
  /**
2754
- * Submit a real-time face capture for an active Re-Use KYC session.
2765
+ * Submit a real-time face capture for an active Event-Based Face Verification session.
2755
2766
  *
2756
2767
  * **Mobile-only.** The server rejects desktop User-Agents with HTTP
2757
2768
  * 400 (`face capture must be completed on a mobile device`). Use the
2758
- * QR handoff from `createReuseKycSession` for desktop callers.
2769
+ * QR handoff from `createEventBasedFaceVerificationSession` for desktop callers.
2759
2770
  *
2760
2771
  * The `data` field on the response carries `retries_remaining`,
2761
2772
  * `retry_limit_exceeded`, and the reaction flags (`enforce_logout`,
2762
2773
  * `freeze_account`, etc.) so the tenant app can act on a final failure.
2763
2774
  *
2764
- * @param request - Token from `createReuseKycSession`, plus the base64 selfie.
2775
+ * @param request - Token from `createEventBasedFaceVerificationSession`, plus the base64 selfie.
2765
2776
  */
2766
- async submitReuseKycSession(request) {
2777
+ async submitEventBasedFaceVerificationSession(request) {
2767
2778
  return this.request("/api/v1/kyc/face/submit", {
2768
2779
  method: "POST",
2769
2780
  body: JSON.stringify(request),
@@ -2771,13 +2782,17 @@ var KycClient = class extends BaseClient {
2771
2782
  });
2772
2783
  }
2773
2784
  /**
2774
- * Look up the current state of a Re-Use KYC session by its forward
2775
- * reference. Useful for desktop pollers waiting on the mobile handoff.
2785
+ * Look up the current state of a Event-Based Face Verification session by its
2786
+ * session token. Useful for desktop pollers waiting on the mobile handoff.
2776
2787
  *
2777
- * @param reference - The reference used when the session was created.
2788
+ * The lookup is scoped by the unguessable, server-issued session token (not
2789
+ * the enumerable forward reference): the endpoint is public/unauthenticated,
2790
+ * and scoping by the token is what prevents cross-tenant status reads.
2791
+ *
2792
+ * @param token - The session token returned by `createEventBasedFaceVerificationSession`.
2778
2793
  */
2779
- async getReuseKycSessionStatus(reference) {
2780
- return this.requestWithRetry(`/api/v1/kyc/face/verify/${encodeURIComponent(reference)}`, {
2794
+ async getEventBasedFaceVerificationSessionStatus(token) {
2795
+ return this.requestWithRetry(`/api/v1/kyc/face/verify/${encodeURIComponent(token)}`, {
2781
2796
  method: "GET",
2782
2797
  headers: this.getUserHeaders()
2783
2798
  });
@@ -2788,7 +2803,7 @@ var KycClient = class extends BaseClient {
2788
2803
  * callers poll `mobile_connected` to detect when a mobile device has
2789
2804
  * scanned the QR and attached.
2790
2805
  *
2791
- * @param token - The session token returned by `createReuseKycSession`.
2806
+ * @param token - The session token returned by `createEventBasedFaceVerificationSession`.
2792
2807
  */
2793
2808
  async getHandoffSession(token) {
2794
2809
  return this.request(
@@ -2863,7 +2878,7 @@ var KycClient = class extends BaseClient {
2863
2878
  * @example
2864
2879
  * ```typescript
2865
2880
  * const result = await client.submitVerification({
2866
- * reference: "customer_123",
2881
+ * reference: "4d2aff34-ab86-422d-992e-50b1234a5b67",
2867
2882
  * email: "customer@example.com",
2868
2883
  * country: "US",
2869
2884
  * document: {
@@ -2895,7 +2910,7 @@ var KycClient = class extends BaseClient {
2895
2910
  *
2896
2911
  * @example
2897
2912
  * ```typescript
2898
- * const kyc = await client.getKycRequest("kyc_abc123");
2913
+ * const kyc = await client.getKycRequest("550e8400-e29b-41d4-a716-446655440000");
2899
2914
  * console.log(`Status: ${kyc.status}, ID Verified: ${kyc.id_verified}`);
2900
2915
  * ```
2901
2916
  */
@@ -2970,7 +2985,7 @@ var KycClient = class extends BaseClient {
2970
2985
  * @example
2971
2986
  * ```typescript
2972
2987
  * await client.requestAdditionalDocuments({
2973
- * id: "kyc_abc123",
2988
+ * id: "550e8400-e29b-41d4-a716-446655440000",
2974
2989
  * document_types: ["address", "document_two"],
2975
2990
  * message: "Please provide proof of address and secondary ID"
2976
2991
  * });
@@ -2991,7 +3006,7 @@ var KycClient = class extends BaseClient {
2991
3006
  *
2992
3007
  * @example
2993
3008
  * ```typescript
2994
- * const proofs = await client.getProofDownloadURLs("kyc_abc123");
3009
+ * const proofs = await client.getProofDownloadURLs("550e8400-e29b-41d4-a716-446655440000");
2995
3010
  * proofs.forEach(proof => {
2996
3011
  * console.log(`${proof.type}: ${proof.url} (expires: ${proof.expires_at})`);
2997
3012
  * });
@@ -3351,7 +3366,7 @@ var TaxClient = class extends BaseClient {
3351
3366
  }
3352
3367
  async getCustomerDocuments(customerID) {
3353
3368
  return this.request(
3354
- `/api/v1/tax/customer-tax-profiles/${customerID}/documents`
3369
+ `/api/v1/tm/customer-tax-profiles/${customerID}/documents`
3355
3370
  );
3356
3371
  }
3357
3372
  async downloadTaxForm(customerID, requestOptions) {
@@ -3376,6 +3391,9 @@ var TaxClient = class extends BaseClient {
3376
3391
  });
3377
3392
  return res.version;
3378
3393
  }
3394
+ async runReminders() {
3395
+ return this.request("/api/v1/tax/reminders/run", { method: "POST" });
3396
+ }
3379
3397
  async getComplianceStats(filters) {
3380
3398
  const params = {};
3381
3399
  if (filters?.time_range) params.time_range = filters.time_range;