vesant-sdk 1.7.1-dev.9fc141f → 1.7.1-dev.a461ee2

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.
@@ -571,6 +571,13 @@ interface CreateEventBasedFaceVerificationSessionResponse {
571
571
  * (`reuse_kyc_reactions.max_retry_attempts + 1`).
572
572
  */
573
573
  max_attempts: number;
574
+ /**
575
+ * Hosted verification journey URL. When present, the capture runs on a
576
+ * hosted page (embedded by `FaceCaptureModal` in an iframe) instead of the
577
+ * SDK's local camera; the verdict is read via the session status poll.
578
+ * Absent when the platform runs the local-capture flow.
579
+ */
580
+ verification_url?: string;
574
581
  }
575
582
  /**
576
583
  * Reaction outcome returned on every face-submit callback. Tenant apps
@@ -619,9 +626,10 @@ interface EventBasedFaceVerificationCallback {
619
626
  data: EventBasedFaceVerificationReactionResult;
620
627
  }
621
628
  /**
622
- * Server-side handoff session backed by Redis (TTL: 15 minutes). Shared
623
- * with the normal KYC mobile/desktop handoff. Desktop clients poll this
624
- * to detect when a mobile device has attached to the same token via QR.
629
+ * Server-side handoff state backed by the normal KYC Redis store (15-minute
630
+ * cache TTL). Event-Based Face Verification remains valid for 10 minutes;
631
+ * this cache does not extend that session. Desktop clients poll it to detect
632
+ * when a mobile device has attached to the same token via QR.
625
633
  */
626
634
  interface KycHandoffSession {
627
635
  document: string;
@@ -879,10 +887,9 @@ declare class KycClient extends BaseClient {
879
887
  * Create a Event-Based Face Verification session.
880
888
  *
881
889
  * Inspect the response before showing UI:
882
- * - `is_required === false` → skip face capture; `reason` explains why.
883
- * - `device_type === 'desktop'` render `qr_payload` as a QR; the
884
- * mobile device picks up the session via the connect endpoint.
885
- * - `device_type === 'mobile'` → open the face capture modal directly.
890
+ * - `is_required === false` → skip face verification; `reason` explains why.
891
+ * - `verification_url` presentembed the hosted journey and poll status.
892
+ * - `verification_url` absent → use the local camera / QR fallback.
886
893
  *
887
894
  * @param request - Reference, customer_id, event, amount (for threshold events), optional URLs.
888
895
  */
@@ -912,11 +919,22 @@ declare class KycClient extends BaseClient {
912
919
  * @param token - The session token returned by `createEventBasedFaceVerificationSession`.
913
920
  */
914
921
  getEventBasedFaceVerificationSessionStatus(token: string): Promise<EventBasedFaceVerificationCallback>;
922
+ /**
923
+ * Mint a fresh hosted verification journey for the next attempt on an
924
+ * active session whose previous hosted-journey attempt was declined.
925
+ * Only valid while the session is active and attempts remain; the
926
+ * response carries the new `verification_url` to embed. Used internally
927
+ * by `FaceCaptureModal`'s Try Again flow in hosted-journey mode.
928
+ *
929
+ * @param token - The session token returned by `createEventBasedFaceVerificationSession`.
930
+ */
931
+ retryEventBasedFaceVerificationJourney(token: string): Promise<CreateEventBasedFaceVerificationSessionResponse>;
915
932
  /**
916
933
  * Fetch the Redis-backed handoff session for a token. Same backing
917
- * store as normal KYC (`kyc:session:<token>`, 15-minute TTL). Desktop
918
- * callers poll `mobile_connected` to detect when a mobile device has
919
- * scanned the QR and attached.
934
+ * store as normal KYC (`kyc:session:<token>`, 15-minute TTL). The
935
+ * Event-Based Face Verification database session still expires after
936
+ * 10 minutes. Desktop callers poll `mobile_connected` to detect when a
937
+ * mobile device has scanned the QR and attached.
920
938
  *
921
939
  * @param token - The session token returned by `createEventBasedFaceVerificationSession`.
922
940
  */
@@ -571,6 +571,13 @@ interface CreateEventBasedFaceVerificationSessionResponse {
571
571
  * (`reuse_kyc_reactions.max_retry_attempts + 1`).
572
572
  */
573
573
  max_attempts: number;
574
+ /**
575
+ * Hosted verification journey URL. When present, the capture runs on a
576
+ * hosted page (embedded by `FaceCaptureModal` in an iframe) instead of the
577
+ * SDK's local camera; the verdict is read via the session status poll.
578
+ * Absent when the platform runs the local-capture flow.
579
+ */
580
+ verification_url?: string;
574
581
  }
575
582
  /**
576
583
  * Reaction outcome returned on every face-submit callback. Tenant apps
@@ -619,9 +626,10 @@ interface EventBasedFaceVerificationCallback {
619
626
  data: EventBasedFaceVerificationReactionResult;
620
627
  }
621
628
  /**
622
- * Server-side handoff session backed by Redis (TTL: 15 minutes). Shared
623
- * with the normal KYC mobile/desktop handoff. Desktop clients poll this
624
- * to detect when a mobile device has attached to the same token via QR.
629
+ * Server-side handoff state backed by the normal KYC Redis store (15-minute
630
+ * cache TTL). Event-Based Face Verification remains valid for 10 minutes;
631
+ * this cache does not extend that session. Desktop clients poll it to detect
632
+ * when a mobile device has attached to the same token via QR.
625
633
  */
626
634
  interface KycHandoffSession {
627
635
  document: string;
@@ -879,10 +887,9 @@ declare class KycClient extends BaseClient {
879
887
  * Create a Event-Based Face Verification session.
880
888
  *
881
889
  * Inspect the response before showing UI:
882
- * - `is_required === false` → skip face capture; `reason` explains why.
883
- * - `device_type === 'desktop'` render `qr_payload` as a QR; the
884
- * mobile device picks up the session via the connect endpoint.
885
- * - `device_type === 'mobile'` → open the face capture modal directly.
890
+ * - `is_required === false` → skip face verification; `reason` explains why.
891
+ * - `verification_url` presentembed the hosted journey and poll status.
892
+ * - `verification_url` absent → use the local camera / QR fallback.
886
893
  *
887
894
  * @param request - Reference, customer_id, event, amount (for threshold events), optional URLs.
888
895
  */
@@ -912,11 +919,22 @@ declare class KycClient extends BaseClient {
912
919
  * @param token - The session token returned by `createEventBasedFaceVerificationSession`.
913
920
  */
914
921
  getEventBasedFaceVerificationSessionStatus(token: string): Promise<EventBasedFaceVerificationCallback>;
922
+ /**
923
+ * Mint a fresh hosted verification journey for the next attempt on an
924
+ * active session whose previous hosted-journey attempt was declined.
925
+ * Only valid while the session is active and attempts remain; the
926
+ * response carries the new `verification_url` to embed. Used internally
927
+ * by `FaceCaptureModal`'s Try Again flow in hosted-journey mode.
928
+ *
929
+ * @param token - The session token returned by `createEventBasedFaceVerificationSession`.
930
+ */
931
+ retryEventBasedFaceVerificationJourney(token: string): Promise<CreateEventBasedFaceVerificationSessionResponse>;
915
932
  /**
916
933
  * Fetch the Redis-backed handoff session for a token. Same backing
917
- * store as normal KYC (`kyc:session:<token>`, 15-minute TTL). Desktop
918
- * callers poll `mobile_connected` to detect when a mobile device has
919
- * scanned the QR and attached.
934
+ * store as normal KYC (`kyc:session:<token>`, 15-minute TTL). The
935
+ * Event-Based Face Verification database session still expires after
936
+ * 10 minutes. Desktop callers poll `mobile_connected` to detect when a
937
+ * mobile device has scanned the QR and attached.
920
938
  *
921
939
  * @param token - The session token returned by `createEventBasedFaceVerificationSession`.
922
940
  */
package/dist/kyc/index.js CHANGED
@@ -704,10 +704,9 @@ var KycClient = class extends BaseClient {
704
704
  * Create a Event-Based Face Verification session.
705
705
  *
706
706
  * Inspect the response before showing UI:
707
- * - `is_required === false` → skip face capture; `reason` explains why.
708
- * - `device_type === 'desktop'` render `qr_payload` as a QR; the
709
- * mobile device picks up the session via the connect endpoint.
710
- * - `device_type === 'mobile'` → open the face capture modal directly.
707
+ * - `is_required === false` → skip face verification; `reason` explains why.
708
+ * - `verification_url` presentembed the hosted journey and poll status.
709
+ * - `verification_url` absent → use the local camera / QR fallback.
711
710
  *
712
711
  * @param request - Reference, customer_id, event, amount (for threshold events), optional URLs.
713
712
  */
@@ -754,11 +753,28 @@ var KycClient = class extends BaseClient {
754
753
  headers: this.getUserHeaders()
755
754
  });
756
755
  }
756
+ /**
757
+ * Mint a fresh hosted verification journey for the next attempt on an
758
+ * active session whose previous hosted-journey attempt was declined.
759
+ * Only valid while the session is active and attempts remain; the
760
+ * response carries the new `verification_url` to embed. Used internally
761
+ * by `FaceCaptureModal`'s Try Again flow in hosted-journey mode.
762
+ *
763
+ * @param token - The session token returned by `createEventBasedFaceVerificationSession`.
764
+ */
765
+ async retryEventBasedFaceVerificationJourney(token) {
766
+ return this.request("/api/v1/kyc/face/onsite/journey", {
767
+ method: "POST",
768
+ body: JSON.stringify({ token }),
769
+ headers: this.getUserHeaders()
770
+ });
771
+ }
757
772
  /**
758
773
  * Fetch the Redis-backed handoff session for a token. Same backing
759
- * store as normal KYC (`kyc:session:<token>`, 15-minute TTL). Desktop
760
- * callers poll `mobile_connected` to detect when a mobile device has
761
- * scanned the QR and attached.
774
+ * store as normal KYC (`kyc:session:<token>`, 15-minute TTL). The
775
+ * Event-Based Face Verification database session still expires after
776
+ * 10 minutes. Desktop callers poll `mobile_connected` to detect when a
777
+ * mobile device has scanned the QR and attached.
762
778
  *
763
779
  * @param token - The session token returned by `createEventBasedFaceVerificationSession`.
764
780
  */