vesant-sdk 2.0.0-dev.51108af → 2.0.0-dev.93ecc12

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 (45) hide show
  1. package/dist/{client-CIEa7xYG.d.mts → client-BwkGrRW9.d.mts} +1 -1
  2. package/dist/{client-BJ87_Vv5.d.ts → client-CqSx0lAG.d.ts} +3 -3
  3. package/dist/{client-IAOGCBfm.d.mts → client-Dq0NMaXT.d.mts} +3 -3
  4. package/dist/{client-Bvp-f05-.d.ts → client-DvobLmsc.d.ts} +1 -1
  5. package/dist/compliance/index.d.mts +4 -4
  6. package/dist/compliance/index.d.ts +4 -4
  7. package/dist/decisions/index.d.mts +1 -1
  8. package/dist/decisions/index.d.ts +1 -1
  9. package/dist/geolocation/index.d.mts +3 -3
  10. package/dist/geolocation/index.d.ts +3 -3
  11. package/dist/index.d.mts +6 -6
  12. package/dist/index.d.ts +6 -6
  13. package/dist/index.js +54 -10
  14. package/dist/index.js.map +1 -1
  15. package/dist/index.mjs +54 -10
  16. package/dist/index.mjs.map +1 -1
  17. package/dist/kyc/core.d.mts +3 -3
  18. package/dist/kyc/core.d.ts +3 -3
  19. package/dist/kyc/core.js +54 -10
  20. package/dist/kyc/core.js.map +1 -1
  21. package/dist/kyc/core.mjs +54 -10
  22. package/dist/kyc/core.mjs.map +1 -1
  23. package/dist/kyc/index.d.mts +253 -21
  24. package/dist/kyc/index.d.ts +253 -21
  25. package/dist/kyc/index.js +54 -10
  26. package/dist/kyc/index.js.map +1 -1
  27. package/dist/kyc/index.mjs +54 -10
  28. package/dist/kyc/index.mjs.map +1 -1
  29. package/dist/react.d.mts +41 -6
  30. package/dist/react.d.ts +41 -6
  31. package/dist/react.js +603 -272
  32. package/dist/react.js.map +1 -1
  33. package/dist/react.mjs +603 -272
  34. package/dist/react.mjs.map +1 -1
  35. package/dist/risk-profile/index.d.mts +3 -3
  36. package/dist/risk-profile/index.d.ts +3 -3
  37. package/dist/scores/index.d.mts +1 -1
  38. package/dist/scores/index.d.ts +1 -1
  39. package/dist/{types-C4Zx0d_u.d.mts → types-BOFaMQxI.d.mts} +1 -1
  40. package/dist/{types-QUCWam16.d.mts → types-CBQRNL-l.d.mts} +10 -3
  41. package/dist/{types-QUCWam16.d.ts → types-CBQRNL-l.d.ts} +10 -3
  42. package/dist/{types-2utj53GK.d.ts → types-UGyDl1fd.d.ts} +1 -1
  43. package/dist/webhooks/index.d.mts +1 -1
  44. package/dist/webhooks/index.d.ts +1 -1
  45. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- export { CheckKycStatusRequest, CheckKycStatusResponse, CreateReuseKycSessionRequest, CreateReuseKycSessionResponse, DocumentType, DocumentVerificationRequest, DocumentVerificationResponse, FaceProof, KYC_DECLINED_DESCRIPTIONS, KycAlert, KycAlertFilters, KycAlertListResponse, KycAlertStatus, KycAlertType, KycClient, KycClientConfig, KycCustomerProfile, KycDeclinedCode, KycOverview, KycPagination, KycPreferences, KycRequest, KycRequestFilters, KycRequestListResponse, KycStatus, Name, Proof, ProofDownloadURL, ProofType, RequestAdditionalDocumentsRequest, RequestKycSubmitLinkRequest, RequestKycSubmitLinkResponse, SubmitReuseKycSessionRequest, SubmittedDocument, SupportedDocumentType, UpdateKycAlertRequest, UpdateKycPreferencesRequest, UpdateKycStatusRequest, UseKycAlertsOptions, UseKycAlertsResult, UseKycOverviewOptions, UseKycOverviewResult, UseKycPreferencesResult, UseKycRequestsOptions, UseKycRequestsResult, UseKycSubmissionOptions, UseKycSubmissionResult } from './index.mjs';
2
- export { a as CreateCustomerProfileRequest, C as CustomerProfile, P as CustomerProfileFilters, b as CustomerProfileListResponse } from '../types-C4Zx0d_u.mjs';
3
- export { P as PaginationParams, R as RiskLevel } from '../types-QUCWam16.mjs';
1
+ export { CheckKycStatusRequest, CheckKycStatusResponse, CreateReuseKycSessionRequest, CreateReuseKycSessionResponse, DocumentType, DocumentVerificationRequest, DocumentVerificationResponse, FaceProof, KYC_DECLINED_DESCRIPTIONS, KycAlert, KycAlertFilters, KycAlertListResponse, KycAlertStatus, KycAlertType, KycClient, KycClientConfig, KycCustomerProfile, KycDeclinedCode, KycHandoffSession, KycOverview, KycPagination, KycPreferences, KycRequest, KycRequestFilters, KycRequestListResponse, KycStatus, Name, Proof, ProofDownloadURL, ProofType, RequestAdditionalDocumentsRequest, RequestKycSubmitLinkRequest, RequestKycSubmitLinkResponse, ReuseKycCallback, ReuseKycDeviceType, ReuseKycEvent, ReuseKycFrequencyTrigger, ReuseKycReactionResult, ReuseKycReactions, ReuseKycThresholdTrigger, ReuseKycTriggers, SubmitReuseKycSessionRequest, SubmittedDocument, SupportedDocumentType, UpdateKycAlertRequest, UpdateKycPreferencesRequest, UpdateKycStatusRequest, UseKycAlertsOptions, UseKycAlertsResult, UseKycOverviewOptions, UseKycOverviewResult, UseKycPreferencesResult, UseKycRequestsOptions, UseKycRequestsResult, UseKycSubmissionOptions, UseKycSubmissionResult } from './index.mjs';
2
+ export { a as CreateCustomerProfileRequest, C as CustomerProfile, P as CustomerProfileFilters, b as CustomerProfileListResponse } from '../types-BOFaMQxI.mjs';
3
+ export { P as PaginationParams, R as RiskLevel } from '../types-CBQRNL-l.mjs';
4
4
  import '../client-BolQlL5e.mjs';
@@ -1,4 +1,4 @@
1
- export { CheckKycStatusRequest, CheckKycStatusResponse, CreateReuseKycSessionRequest, CreateReuseKycSessionResponse, DocumentType, DocumentVerificationRequest, DocumentVerificationResponse, FaceProof, KYC_DECLINED_DESCRIPTIONS, KycAlert, KycAlertFilters, KycAlertListResponse, KycAlertStatus, KycAlertType, KycClient, KycClientConfig, KycCustomerProfile, KycDeclinedCode, KycOverview, KycPagination, KycPreferences, KycRequest, KycRequestFilters, KycRequestListResponse, KycStatus, Name, Proof, ProofDownloadURL, ProofType, RequestAdditionalDocumentsRequest, RequestKycSubmitLinkRequest, RequestKycSubmitLinkResponse, SubmitReuseKycSessionRequest, SubmittedDocument, SupportedDocumentType, UpdateKycAlertRequest, UpdateKycPreferencesRequest, UpdateKycStatusRequest, UseKycAlertsOptions, UseKycAlertsResult, UseKycOverviewOptions, UseKycOverviewResult, UseKycPreferencesResult, UseKycRequestsOptions, UseKycRequestsResult, UseKycSubmissionOptions, UseKycSubmissionResult } from './index.js';
2
- export { a as CreateCustomerProfileRequest, C as CustomerProfile, P as CustomerProfileFilters, b as CustomerProfileListResponse } from '../types-2utj53GK.js';
3
- export { P as PaginationParams, R as RiskLevel } from '../types-QUCWam16.js';
1
+ export { CheckKycStatusRequest, CheckKycStatusResponse, CreateReuseKycSessionRequest, CreateReuseKycSessionResponse, DocumentType, DocumentVerificationRequest, DocumentVerificationResponse, FaceProof, KYC_DECLINED_DESCRIPTIONS, KycAlert, KycAlertFilters, KycAlertListResponse, KycAlertStatus, KycAlertType, KycClient, KycClientConfig, KycCustomerProfile, KycDeclinedCode, KycHandoffSession, KycOverview, KycPagination, KycPreferences, KycRequest, KycRequestFilters, KycRequestListResponse, KycStatus, Name, Proof, ProofDownloadURL, ProofType, RequestAdditionalDocumentsRequest, RequestKycSubmitLinkRequest, RequestKycSubmitLinkResponse, ReuseKycCallback, ReuseKycDeviceType, ReuseKycEvent, ReuseKycFrequencyTrigger, ReuseKycReactionResult, ReuseKycReactions, ReuseKycThresholdTrigger, ReuseKycTriggers, SubmitReuseKycSessionRequest, SubmittedDocument, SupportedDocumentType, UpdateKycAlertRequest, UpdateKycPreferencesRequest, UpdateKycStatusRequest, UseKycAlertsOptions, UseKycAlertsResult, UseKycOverviewOptions, UseKycOverviewResult, UseKycPreferencesResult, UseKycRequestsOptions, UseKycRequestsResult, UseKycSubmissionOptions, UseKycSubmissionResult } from './index.js';
2
+ export { a as CreateCustomerProfileRequest, C as CustomerProfile, P as CustomerProfileFilters, b as CustomerProfileListResponse } from '../types-UGyDl1fd.js';
3
+ export { P as PaginationParams, R as RiskLevel } from '../types-CBQRNL-l.js';
4
4
  import '../client-BolQlL5e.js';
package/dist/kyc/core.js CHANGED
@@ -626,40 +626,84 @@ var KycClient = class extends BaseClient {
626
626
  });
627
627
  }
628
628
  /**
629
- * Create a reuse KYC session for validate a user with existing KYC verification
629
+ * Create a Re-Use KYC session.
630
630
  *
631
- * @param request - Request containing the reference, customer_id, optional redirect URL, and callback URL (receives POST requests)
631
+ * Inspect the response before showing UI:
632
+ * - `is_required === false` → skip face capture; `reason` explains why.
633
+ * - `device_type === 'desktop'` → render `qr_payload` as a QR; the
634
+ * mobile device picks up the session via the connect endpoint.
635
+ * - `device_type === 'mobile'` → open the face capture modal directly.
636
+ *
637
+ * @param request - Reference, customer_id, event, amount (for threshold events), optional URLs.
632
638
  */
633
639
  async createReuseKycSession(request) {
634
- return this.requestWithRetry("/api/v1/kyc/face/session", {
640
+ return this.request("/api/v1/kyc/face/session", {
635
641
  method: "POST",
636
642
  body: JSON.stringify(request),
637
643
  headers: this.getUserHeaders()
638
644
  });
639
645
  }
640
646
  /**
641
- * Submit a reuse KYC session for validate a user with existing KYC verification
647
+ * Submit a real-time face capture for an active Re-Use KYC session.
648
+ *
649
+ * **Mobile-only.** The server rejects desktop User-Agents with HTTP
650
+ * 400 (`face capture must be completed on a mobile device`). Use the
651
+ * QR handoff from `createReuseKycSession` for desktop callers.
652
+ *
653
+ * The `data` field on the response carries `retries_remaining`,
654
+ * `retry_limit_exceeded`, and the reaction flags (`enforce_logout`,
655
+ * `freeze_account`, etc.) so the tenant app can act on a final failure.
642
656
  *
643
- * @param request - Request containing the reference, token and proof (receives POST requests)
657
+ * @param request - Token from `createReuseKycSession`, plus the base64 selfie.
644
658
  */
645
659
  async submitReuseKycSession(request) {
646
- return this.requestWithRetry("/api/v1/kyc/face/submit", {
660
+ return this.request("/api/v1/kyc/face/submit", {
647
661
  method: "POST",
648
662
  body: JSON.stringify(request),
649
663
  headers: this.getUserHeaders()
650
664
  });
651
665
  }
652
666
  /**
653
- * Check reuse KYC session status for a reference
654
- * @param reference - The unique reference used for the reuse KYC session (e.g., customer ID or transaction ID)
655
- * @returns Response with kyc_status and message (reason)
656
- * **/
667
+ * Look up the current state of a Re-Use KYC session by its forward
668
+ * reference. Useful for desktop pollers waiting on the mobile handoff.
669
+ *
670
+ * @param reference - The reference used when the session was created.
671
+ */
657
672
  async getReuseKycSessionStatus(reference) {
658
673
  return this.requestWithRetry(`/api/v1/kyc/face/verify/${encodeURIComponent(reference)}`, {
659
674
  method: "GET",
660
675
  headers: this.getUserHeaders()
661
676
  });
662
677
  }
678
+ /**
679
+ * Fetch the Redis-backed handoff session for a token. Same backing
680
+ * store as normal KYC (`kyc:session:<token>`, 15-minute TTL). Desktop
681
+ * callers poll `mobile_connected` to detect when a mobile device has
682
+ * scanned the QR and attached.
683
+ *
684
+ * @param token - The session token returned by `createReuseKycSession`.
685
+ */
686
+ async getHandoffSession(token) {
687
+ return this.request(
688
+ `/api/v1/kyc/session${this.buildQueryString({ token })}`,
689
+ { headers: this.getUserHeaders() }
690
+ );
691
+ }
692
+ /**
693
+ * Attach a mobile device to a desktop-initiated session. The mobile
694
+ * client calls this after scanning the QR code. The desktop poller
695
+ * sees `mobile_connected: true` on the next `getHandoffSession`.
696
+ *
697
+ * @param token - The session token transferred via the QR payload.
698
+ * @param isDisconnect - Pass true to release the session (default false).
699
+ */
700
+ async connectMobileSession(token, isDisconnect = false) {
701
+ return this.request("/api/v1/kyc/session/connect", {
702
+ method: "PUT",
703
+ body: JSON.stringify({ token, is_disconnect: isDisconnect }),
704
+ headers: this.getUserHeaders()
705
+ });
706
+ }
663
707
  /**
664
708
  * Check KYC status for a user
665
709
  *