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
@@ -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, 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';
1
+ export { CheckKycStatusRequest, CheckKycStatusResponse, CreateEventBasedFaceVerificationSessionRequest, CreateEventBasedFaceVerificationSessionResponse, DocumentType, DocumentVerificationRequest, DocumentVerificationResponse, EventBasedFaceVerificationCallback, EventBasedFaceVerificationDeviceType, EventBasedFaceVerificationEvent, EventBasedFaceVerificationFrequencyTrigger, EventBasedFaceVerificationReactionResult, EventBasedFaceVerificationReactions, EventBasedFaceVerificationThresholdTrigger, EventBasedFaceVerificationTriggers, FaceProof, KYC_DECLINED_DESCRIPTIONS, KycAlert, KycAlertFilters, KycAlertListResponse, KycAlertStatus, KycAlertType, KycClient, KycClientConfig, KycCustomerData, KycCustomerProfile, KycDeclinedCode, KycHandoffSession, KycOverview, KycPagination, KycPreferences, KycRequest, KycRequestFilters, KycRequestListResponse, KycStatus, Name, Proof, ProofDownloadURL, ProofType, RequestAdditionalDocumentsRequest, RequestKycSubmitLinkRequest, RequestKycSubmitLinkResponse, SubmitEventBasedFaceVerificationSessionRequest, SubmittedDocument, SupportedDocumentType, UpdateKycAlertRequest, UpdateKycPreferencesRequest, UpdateKycStatusRequest, UseKycAlertsOptions, UseKycAlertsResult, UseKycOverviewOptions, UseKycOverviewResult, UseKycPreferencesResult, UseKycRequestsOptions, UseKycRequestsResult, UseKycSubmissionOptions, UseKycSubmissionResult } from './index.mjs';
2
2
  export { a as CreateCustomerProfileRequest, C as CustomerProfile, P as CustomerProfileFilters, b as CustomerProfileListResponse } from '../types-BOFaMQxI.mjs';
3
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, 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';
1
+ export { CheckKycStatusRequest, CheckKycStatusResponse, CreateEventBasedFaceVerificationSessionRequest, CreateEventBasedFaceVerificationSessionResponse, DocumentType, DocumentVerificationRequest, DocumentVerificationResponse, EventBasedFaceVerificationCallback, EventBasedFaceVerificationDeviceType, EventBasedFaceVerificationEvent, EventBasedFaceVerificationFrequencyTrigger, EventBasedFaceVerificationReactionResult, EventBasedFaceVerificationReactions, EventBasedFaceVerificationThresholdTrigger, EventBasedFaceVerificationTriggers, FaceProof, KYC_DECLINED_DESCRIPTIONS, KycAlert, KycAlertFilters, KycAlertListResponse, KycAlertStatus, KycAlertType, KycClient, KycClientConfig, KycCustomerData, KycCustomerProfile, KycDeclinedCode, KycHandoffSession, KycOverview, KycPagination, KycPreferences, KycRequest, KycRequestFilters, KycRequestListResponse, KycStatus, Name, Proof, ProofDownloadURL, ProofType, RequestAdditionalDocumentsRequest, RequestKycSubmitLinkRequest, RequestKycSubmitLinkResponse, SubmitEventBasedFaceVerificationSessionRequest, SubmittedDocument, SupportedDocumentType, UpdateKycAlertRequest, UpdateKycPreferencesRequest, UpdateKycStatusRequest, UseKycAlertsOptions, UseKycAlertsResult, UseKycOverviewOptions, UseKycOverviewResult, UseKycPreferencesResult, UseKycRequestsOptions, UseKycRequestsResult, UseKycSubmissionOptions, UseKycSubmissionResult } from './index.js';
2
2
  export { a as CreateCustomerProfileRequest, C as CustomerProfile, P as CustomerProfileFilters, b as CustomerProfileListResponse } from '../types-UGyDl1fd.js';
3
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
@@ -603,7 +603,13 @@ var KycClient = class extends BaseClient {
603
603
  *
604
604
  * Generates a link that the user can visit to submit their KYC documents.
605
605
  *
606
- * @param request - Request containing the user ID, optional redirect URL, and optional callback URL (receives POST requests)
606
+ * Optionally pass the customer's registered identity data as
607
+ * `customer_data` (same shape as the geolocation `customer_data` block).
608
+ * It seeds the customer's risk profile so document verification can
609
+ * cross-check the submitted document against trusted reference data;
610
+ * fields never overwrite data already on the profile.
611
+ *
612
+ * @param request - Request containing the user ID, optional redirect URL, optional callback URL (receives POST requests), and optional customer identity data
607
613
  * @returns Response containing the redirect link and KYC ID
608
614
  *
609
615
  * @example
@@ -611,7 +617,15 @@ var KycClient = class extends BaseClient {
611
617
  * const result = await client.requestKycSubmitLink({
612
618
  * user_id: "user_123",
613
619
  * redirect_url: "https://merchant.com/kyc-complete", // optional
614
- * callback_url: "https://merchant.com/api/kyc-webhook" // optional - receives POST requests on status change
620
+ * callback_url: "https://merchant.com/api/kyc-webhook", // optional - receives POST requests on status change
621
+ * customer_data: { // optional - seeds the risk profile for document cross-checks
622
+ * full_name: "John Doe",
623
+ * date_of_birth: "1999-06-02", // ISO 8601
624
+ * email: "john@example.com",
625
+ * phone: "+94771234567",
626
+ * address: "12 Main St, Colombo", // used for address verification
627
+ * country: "LK"
628
+ * }
615
629
  * });
616
630
  *
617
631
  * console.log(`Redirect user to: ${result.link}`);
@@ -626,7 +640,7 @@ var KycClient = class extends BaseClient {
626
640
  });
627
641
  }
628
642
  /**
629
- * Create a Re-Use KYC session.
643
+ * Create a Event-Based Face Verification session.
630
644
  *
631
645
  * Inspect the response before showing UI:
632
646
  * - `is_required === false` → skip face capture; `reason` explains why.
@@ -636,7 +650,7 @@ var KycClient = class extends BaseClient {
636
650
  *
637
651
  * @param request - Reference, customer_id, event, amount (for threshold events), optional URLs.
638
652
  */
639
- async createReuseKycSession(request) {
653
+ async createEventBasedFaceVerificationSession(request) {
640
654
  return this.request("/api/v1/kyc/face/session", {
641
655
  method: "POST",
642
656
  body: JSON.stringify(request),
@@ -644,19 +658,19 @@ var KycClient = class extends BaseClient {
644
658
  });
645
659
  }
646
660
  /**
647
- * Submit a real-time face capture for an active Re-Use KYC session.
661
+ * Submit a real-time face capture for an active Event-Based Face Verification session.
648
662
  *
649
663
  * **Mobile-only.** The server rejects desktop User-Agents with HTTP
650
664
  * 400 (`face capture must be completed on a mobile device`). Use the
651
- * QR handoff from `createReuseKycSession` for desktop callers.
665
+ * QR handoff from `createEventBasedFaceVerificationSession` for desktop callers.
652
666
  *
653
667
  * The `data` field on the response carries `retries_remaining`,
654
668
  * `retry_limit_exceeded`, and the reaction flags (`enforce_logout`,
655
669
  * `freeze_account`, etc.) so the tenant app can act on a final failure.
656
670
  *
657
- * @param request - Token from `createReuseKycSession`, plus the base64 selfie.
671
+ * @param request - Token from `createEventBasedFaceVerificationSession`, plus the base64 selfie.
658
672
  */
659
- async submitReuseKycSession(request) {
673
+ async submitEventBasedFaceVerificationSession(request) {
660
674
  return this.request("/api/v1/kyc/face/submit", {
661
675
  method: "POST",
662
676
  body: JSON.stringify(request),
@@ -664,13 +678,17 @@ var KycClient = class extends BaseClient {
664
678
  });
665
679
  }
666
680
  /**
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.
681
+ * Look up the current state of a Event-Based Face Verification session by its
682
+ * session token. Useful for desktop pollers waiting on the mobile handoff.
683
+ *
684
+ * The lookup is scoped by the unguessable, server-issued session token (not
685
+ * the enumerable forward reference): the endpoint is public/unauthenticated,
686
+ * and scoping by the token is what prevents cross-tenant status reads.
669
687
  *
670
- * @param reference - The reference used when the session was created.
688
+ * @param token - The session token returned by `createEventBasedFaceVerificationSession`.
671
689
  */
672
- async getReuseKycSessionStatus(reference) {
673
- return this.requestWithRetry(`/api/v1/kyc/face/verify/${encodeURIComponent(reference)}`, {
690
+ async getEventBasedFaceVerificationSessionStatus(token) {
691
+ return this.requestWithRetry(`/api/v1/kyc/face/verify/${encodeURIComponent(token)}`, {
674
692
  method: "GET",
675
693
  headers: this.getUserHeaders()
676
694
  });
@@ -681,7 +699,7 @@ var KycClient = class extends BaseClient {
681
699
  * callers poll `mobile_connected` to detect when a mobile device has
682
700
  * scanned the QR and attached.
683
701
  *
684
- * @param token - The session token returned by `createReuseKycSession`.
702
+ * @param token - The session token returned by `createEventBasedFaceVerificationSession`.
685
703
  */
686
704
  async getHandoffSession(token) {
687
705
  return this.request(
@@ -756,7 +774,7 @@ var KycClient = class extends BaseClient {
756
774
  * @example
757
775
  * ```typescript
758
776
  * const result = await client.submitVerification({
759
- * reference: "customer_123",
777
+ * reference: "4d2aff34-ab86-422d-992e-50b1234a5b67",
760
778
  * email: "customer@example.com",
761
779
  * country: "US",
762
780
  * document: {
@@ -788,7 +806,7 @@ var KycClient = class extends BaseClient {
788
806
  *
789
807
  * @example
790
808
  * ```typescript
791
- * const kyc = await client.getKycRequest("kyc_abc123");
809
+ * const kyc = await client.getKycRequest("550e8400-e29b-41d4-a716-446655440000");
792
810
  * console.log(`Status: ${kyc.status}, ID Verified: ${kyc.id_verified}`);
793
811
  * ```
794
812
  */
@@ -863,7 +881,7 @@ var KycClient = class extends BaseClient {
863
881
  * @example
864
882
  * ```typescript
865
883
  * await client.requestAdditionalDocuments({
866
- * id: "kyc_abc123",
884
+ * id: "550e8400-e29b-41d4-a716-446655440000",
867
885
  * document_types: ["address", "document_two"],
868
886
  * message: "Please provide proof of address and secondary ID"
869
887
  * });
@@ -884,7 +902,7 @@ var KycClient = class extends BaseClient {
884
902
  *
885
903
  * @example
886
904
  * ```typescript
887
- * const proofs = await client.getProofDownloadURLs("kyc_abc123");
905
+ * const proofs = await client.getProofDownloadURLs("550e8400-e29b-41d4-a716-446655440000");
888
906
  * proofs.forEach(proof => {
889
907
  * console.log(`${proof.type}: ${proof.url} (expires: ${proof.expires_at})`);
890
908
  * });