vesant-sdk 1.6.6 → 1.7.0-dev.7d59b3e

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 (86) hide show
  1. package/README.md +14 -4
  2. package/dist/{client-ePzhQKp9.d.mts → client-BolQlL5e.d.mts} +1 -1
  3. package/dist/{client-ePzhQKp9.d.ts → client-BolQlL5e.d.ts} +1 -1
  4. package/dist/client-C3DCmGe9.d.ts +436 -0
  5. package/dist/{client-C_A7QLcB.d.ts → client-DMIRx7Tu.d.mts} +5 -3
  6. package/dist/{client-BlCxjbY2.d.mts → client-DoMSYMMR.d.ts} +5 -3
  7. package/dist/client-ZNdnpWe7.d.mts +436 -0
  8. package/dist/compliance/index.d.mts +25 -429
  9. package/dist/compliance/index.d.ts +25 -429
  10. package/dist/compliance/index.js +187 -103
  11. package/dist/compliance/index.js.map +1 -1
  12. package/dist/compliance/index.mjs +187 -104
  13. package/dist/compliance/index.mjs.map +1 -1
  14. package/dist/decisions/index.d.mts +2 -2
  15. package/dist/decisions/index.d.ts +2 -2
  16. package/dist/decisions/index.js +1 -1
  17. package/dist/decisions/index.js.map +1 -1
  18. package/dist/decisions/index.mjs +1 -1
  19. package/dist/decisions/index.mjs.map +1 -1
  20. package/dist/geolocation/index.d.mts +4 -4
  21. package/dist/geolocation/index.d.ts +4 -4
  22. package/dist/geolocation/index.js +7 -24
  23. package/dist/geolocation/index.js.map +1 -1
  24. package/dist/geolocation/index.mjs +7 -24
  25. package/dist/geolocation/index.mjs.map +1 -1
  26. package/dist/index.d.mts +12 -70
  27. package/dist/index.d.ts +12 -70
  28. package/dist/index.js +302 -296
  29. package/dist/index.js.map +1 -1
  30. package/dist/index.mjs +301 -295
  31. package/dist/index.mjs.map +1 -1
  32. package/dist/kyc/core.d.mts +4 -4
  33. package/dist/kyc/core.d.ts +4 -4
  34. package/dist/kyc/core.js +86 -27
  35. package/dist/kyc/core.js.map +1 -1
  36. package/dist/kyc/core.mjs +86 -28
  37. package/dist/kyc/core.mjs.map +1 -1
  38. package/dist/kyc/index.d.mts +280 -50
  39. package/dist/kyc/index.d.ts +280 -50
  40. package/dist/kyc/index.js +86 -27
  41. package/dist/kyc/index.js.map +1 -1
  42. package/dist/kyc/index.mjs +86 -28
  43. package/dist/kyc/index.mjs.map +1 -1
  44. package/dist/react.d.mts +46 -9
  45. package/dist/react.d.ts +46 -9
  46. package/dist/react.js +891 -276
  47. package/dist/react.js.map +1 -1
  48. package/dist/react.mjs +890 -275
  49. package/dist/react.mjs.map +1 -1
  50. package/dist/risk-profile/index.d.mts +4 -4
  51. package/dist/risk-profile/index.d.ts +4 -4
  52. package/dist/risk-profile/index.js +1 -1
  53. package/dist/risk-profile/index.js.map +1 -1
  54. package/dist/risk-profile/index.mjs +1 -1
  55. package/dist/risk-profile/index.mjs.map +1 -1
  56. package/dist/scores/index.d.mts +2 -2
  57. package/dist/scores/index.d.ts +2 -2
  58. package/dist/scores/index.js +1 -1
  59. package/dist/scores/index.js.map +1 -1
  60. package/dist/scores/index.mjs +1 -1
  61. package/dist/scores/index.mjs.map +1 -1
  62. package/dist/tax/index.d.mts +6 -41
  63. package/dist/tax/index.d.ts +6 -41
  64. package/dist/tax/index.js +1 -36
  65. package/dist/tax/index.js.map +1 -1
  66. package/dist/tax/index.mjs +1 -36
  67. package/dist/tax/index.mjs.map +1 -1
  68. package/dist/{types-1RzYeSal.d.mts → types-BOFaMQxI.d.mts} +2 -2
  69. package/dist/{types-B4Ezqo7V.d.mts → types-CBQRNL-l.d.mts} +14 -1
  70. package/dist/{types-B4Ezqo7V.d.ts → types-CBQRNL-l.d.ts} +14 -1
  71. package/dist/{types-X5Md_dD_.d.ts → types-UGyDl1fd.d.ts} +2 -2
  72. package/dist/webhooks/index.d.mts +189 -2
  73. package/dist/webhooks/index.d.ts +189 -2
  74. package/dist/webhooks/index.js +49 -7
  75. package/dist/webhooks/index.js.map +1 -1
  76. package/dist/webhooks/index.mjs +49 -7
  77. package/dist/webhooks/index.mjs.map +1 -1
  78. package/package.json +16 -13
  79. package/dist/fraud/index.d.mts +0 -80
  80. package/dist/fraud/index.d.ts +0 -80
  81. package/dist/fraud/index.js +0 -606
  82. package/dist/fraud/index.js.map +0 -1
  83. package/dist/fraud/index.mjs +0 -604
  84. package/dist/fraud/index.mjs.map +0 -1
  85. package/dist/index-B04H4xfJ.d.mts +0 -320
  86. package/dist/index-CItMPmLL.d.ts +0 -320
package/dist/react.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { G as GeolocationClient, H as UseGeolocationOptions, I as UseGeolocationResult, $ as UseLocationRequestsOptions, a0 as UseLocationRequestsResult, a1 as UseLocationCaptureOptions, a2 as UseLocationCaptureResult, b as CipherTextOptions, c as CipherTextResult, D as DeviceFingerprintRequest } from './client-C_A7QLcB.js';
2
- import { ComplianceClient, RegistrationVerificationResponse, RegistrationVerificationRequest, LoginVerificationResponse, LoginVerificationRequest, TransactionVerificationResponse, TransactionVerificationRequest } from './compliance/index.js';
1
+ import { D as DeviceFingerprintRequest, G as GeolocationClient, i as CipherTextOptions, l as CipherTextResult, W as UseGeolocationOptions, X as UseGeolocationResult, Y as UseLocationCaptureOptions, Z as UseLocationCaptureResult, _ as UseLocationRequestsOptions, $ as UseLocationRequestsResult } from './client-DoMSYMMR.js';
2
+ import { e as LoginVerificationResponse, L as LoginVerificationRequest, f as RegistrationVerificationResponse, R as RegistrationVerificationRequest, h as TransactionVerificationResponse, g as TransactionVerificationRequest, C as ComplianceClient } from './client-C3DCmGe9.js';
3
3
  import { RiskProfileClient } from './risk-profile/index.js';
4
- import { C as CustomerProfile } from './types-X5Md_dD_.js';
5
- import { KycClient, UseKycSubmissionOptions, UseKycSubmissionResult, UseKycRequestsOptions, UseKycRequestsResult, UseKycAlertsOptions, UseKycAlertsResult, UseKycOverviewOptions, UseKycOverviewResult, UseKycPreferencesResult, CheckKycStatusResponse } from './kyc/index.js';
6
- import './client-ePzhQKp9.js';
7
- import './types-B4Ezqo7V.js';
4
+ import { C as CustomerProfile } from './types-UGyDl1fd.js';
5
+ import { KycClient, CreateEventBasedFaceVerificationSessionRequest, CreateEventBasedFaceVerificationSessionResponse, EventBasedFaceVerificationCallback, UseKycAlertsOptions, UseKycAlertsResult, UseKycOverviewOptions, UseKycOverviewResult, UseKycPreferencesResult, UseKycRequestsOptions, UseKycRequestsResult, UseKycSubmissionOptions, UseKycSubmissionResult } from './kyc/index.js';
6
+ import './client-BolQlL5e.js';
7
+ import './types-CBQRNL-l.js';
8
8
 
9
9
  /**
10
10
  * Detect browser information from user agent.
@@ -507,8 +507,45 @@ declare function getStatusColor(status: string): string;
507
507
  * @returns CSS color class or hex color
508
508
  */
509
509
  declare function getRiskColor(risk: string): string;
510
- declare function useReuseKYCSubmission(client: KycClient): {
511
- verifyFace: (reference: string, token: string) => Promise<CheckKycStatusResponse | null>;
510
+ /**
511
+ * Hook for the Event-Based Face Verification face-capture flow.
512
+ *
513
+ * Returns helpers that cover both mobile (direct capture) and desktop
514
+ * (QR + polling) modes. Device detection happens here on the client —
515
+ * the server accepts submissions from any User-Agent.
516
+ *
517
+ * - `startSession(req)` — POST /face/session. Inspect `is_required` first;
518
+ * skip the modal entirely when it's `false`.
519
+ * - `verifyFace(session, opts?)` — mount FaceCaptureModal and resolve once
520
+ * the user reaches a terminal state (accepted / declined-after-max /
521
+ * cancelled). The modal handles the device picker, QR handoff,
522
+ * selfie capture, retries within the configured `max_attempts`, and
523
+ * surfacing of the decline reason — all without unmounting in between.
524
+ * - `runFlow(req, opts?)` — convenience wrapper: `startSession` then
525
+ * `verifyFace`, with a short-circuit when `is_required` is false.
526
+ */
527
+ declare function useEventBasedFaceVerificationSubmission(client: KycClient): {
528
+ startSession: (request: CreateEventBasedFaceVerificationSessionRequest) => Promise<CreateEventBasedFaceVerificationSessionResponse>;
529
+ verifyFace: (session: CreateEventBasedFaceVerificationSessionResponse, opts?: {
530
+ defaultDevice?: "ask" | "this" | "mobile";
531
+ renderQR?: (payload: string) => React.ReactNode;
532
+ onCancel?: () => void;
533
+ }) => Promise<EventBasedFaceVerificationCallback | null>;
534
+ runFlow: (request: CreateEventBasedFaceVerificationSessionRequest, opts?: {
535
+ defaultDevice?: "ask" | "this" | "mobile";
536
+ renderQR?: (payload: string) => React.ReactNode;
537
+ onCancel?: () => void;
538
+ }) => Promise<{
539
+ kind: "not_required";
540
+ session: CreateEventBasedFaceVerificationSessionResponse;
541
+ } | {
542
+ kind: "cancelled";
543
+ session: CreateEventBasedFaceVerificationSessionResponse;
544
+ } | {
545
+ kind: "completed";
546
+ session: CreateEventBasedFaceVerificationSessionResponse;
547
+ result: EventBasedFaceVerificationCallback;
548
+ }>;
512
549
  };
513
550
 
514
- export { type UseCustomerProfileOptions, type UseCustomerProfileResult, UseGeolocationOptions, UseGeolocationResult, UseKycAlertsOptions, UseKycAlertsResult, UseKycOverviewOptions, UseKycOverviewResult, UseKycPreferencesResult, UseKycRequestsOptions, UseKycRequestsResult, UseKycSubmissionOptions, UseKycSubmissionResult, UseLocationCaptureOptions, UseLocationCaptureResult, UseLocationRequestsOptions, UseLocationRequestsResult, type UseLoginVerificationOptions, type UseLoginVerificationResult, type UseRegistrationOptions, type UseRegistrationResult, type UseTransactionVerificationOptions, type UseTransactionVerificationResult, createDeviceFingerprint, fileToBase64, formatKycStatus, getBrowserInfo, getRiskColor, getStatusColor, isValidFileSize, isValidFileType, useCipherText, useCustomerProfile, useGeolocation, useKycAlerts, useKycOverview, useKycPreferences, useKycRequests, useKycSubmission, useLocationCapture, useLocationRequests, useLoginVerification, useRegistration, useReuseKYCSubmission, useTransactionVerification };
551
+ export { type UseCustomerProfileOptions, type UseCustomerProfileResult, UseGeolocationOptions, UseGeolocationResult, UseKycAlertsOptions, UseKycAlertsResult, UseKycOverviewOptions, UseKycOverviewResult, UseKycPreferencesResult, UseKycRequestsOptions, UseKycRequestsResult, UseKycSubmissionOptions, UseKycSubmissionResult, UseLocationCaptureOptions, UseLocationCaptureResult, UseLocationRequestsOptions, UseLocationRequestsResult, type UseLoginVerificationOptions, type UseLoginVerificationResult, type UseRegistrationOptions, type UseRegistrationResult, type UseTransactionVerificationOptions, type UseTransactionVerificationResult, createDeviceFingerprint, fileToBase64, formatKycStatus, getBrowserInfo, getRiskColor, getStatusColor, isValidFileSize, isValidFileType, useCipherText, useCustomerProfile, useEventBasedFaceVerificationSubmission, useGeolocation, useKycAlerts, useKycOverview, useKycPreferences, useKycRequests, useKycSubmission, useLocationCapture, useLocationRequests, useLoginVerification, useRegistration, useTransactionVerification };