vesant-sdk 1.7.0-dev.9f7da53 → 1.7.0-dev.ab7ff29

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/index.mjs CHANGED
@@ -2733,7 +2733,7 @@ var KycClient = class extends BaseClient {
2733
2733
  });
2734
2734
  }
2735
2735
  /**
2736
- * Create a Re-Use KYC session.
2736
+ * Create a Event-Based Face Verification session.
2737
2737
  *
2738
2738
  * Inspect the response before showing UI:
2739
2739
  * - `is_required === false` → skip face capture; `reason` explains why.
@@ -2743,7 +2743,7 @@ var KycClient = class extends BaseClient {
2743
2743
  *
2744
2744
  * @param request - Reference, customer_id, event, amount (for threshold events), optional URLs.
2745
2745
  */
2746
- async createReuseKycSession(request) {
2746
+ async createEventBasedFaceVerificationSession(request) {
2747
2747
  return this.request("/api/v1/kyc/face/session", {
2748
2748
  method: "POST",
2749
2749
  body: JSON.stringify(request),
@@ -2751,19 +2751,19 @@ var KycClient = class extends BaseClient {
2751
2751
  });
2752
2752
  }
2753
2753
  /**
2754
- * Submit a real-time face capture for an active Re-Use KYC session.
2754
+ * Submit a real-time face capture for an active Event-Based Face Verification session.
2755
2755
  *
2756
2756
  * **Mobile-only.** The server rejects desktop User-Agents with HTTP
2757
2757
  * 400 (`face capture must be completed on a mobile device`). Use the
2758
- * QR handoff from `createReuseKycSession` for desktop callers.
2758
+ * QR handoff from `createEventBasedFaceVerificationSession` for desktop callers.
2759
2759
  *
2760
2760
  * The `data` field on the response carries `retries_remaining`,
2761
2761
  * `retry_limit_exceeded`, and the reaction flags (`enforce_logout`,
2762
2762
  * `freeze_account`, etc.) so the tenant app can act on a final failure.
2763
2763
  *
2764
- * @param request - Token from `createReuseKycSession`, plus the base64 selfie.
2764
+ * @param request - Token from `createEventBasedFaceVerificationSession`, plus the base64 selfie.
2765
2765
  */
2766
- async submitReuseKycSession(request) {
2766
+ async submitEventBasedFaceVerificationSession(request) {
2767
2767
  return this.request("/api/v1/kyc/face/submit", {
2768
2768
  method: "POST",
2769
2769
  body: JSON.stringify(request),
@@ -2771,13 +2771,17 @@ var KycClient = class extends BaseClient {
2771
2771
  });
2772
2772
  }
2773
2773
  /**
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.
2774
+ * Look up the current state of a Event-Based Face Verification session by its
2775
+ * session token. Useful for desktop pollers waiting on the mobile handoff.
2776
2776
  *
2777
- * @param reference - The reference used when the session was created.
2777
+ * The lookup is scoped by the unguessable, server-issued session token (not
2778
+ * the enumerable forward reference): the endpoint is public/unauthenticated,
2779
+ * and scoping by the token is what prevents cross-tenant status reads.
2780
+ *
2781
+ * @param token - The session token returned by `createEventBasedFaceVerificationSession`.
2778
2782
  */
2779
- async getReuseKycSessionStatus(reference) {
2780
- return this.requestWithRetry(`/api/v1/kyc/face/verify/${encodeURIComponent(reference)}`, {
2783
+ async getEventBasedFaceVerificationSessionStatus(token) {
2784
+ return this.requestWithRetry(`/api/v1/kyc/face/verify/${encodeURIComponent(token)}`, {
2781
2785
  method: "GET",
2782
2786
  headers: this.getUserHeaders()
2783
2787
  });
@@ -2788,7 +2792,7 @@ var KycClient = class extends BaseClient {
2788
2792
  * callers poll `mobile_connected` to detect when a mobile device has
2789
2793
  * scanned the QR and attached.
2790
2794
  *
2791
- * @param token - The session token returned by `createReuseKycSession`.
2795
+ * @param token - The session token returned by `createEventBasedFaceVerificationSession`.
2792
2796
  */
2793
2797
  async getHandoffSession(token) {
2794
2798
  return this.request(