vesant-sdk 1.7.0-dev.ac305d8 → 1.7.0-dev.b4284ca

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 (75) hide show
  1. package/dist/{client-DoMSYMMR.d.ts → client-0NOPDnT0.d.ts} +29 -26
  2. package/dist/{client-DMIRx7Tu.d.mts → client-CvWNRwwg.d.mts} +29 -26
  3. package/dist/{client-ZNdnpWe7.d.mts → client-Dps40EtF.d.mts} +2 -2
  4. package/dist/{client-C3DCmGe9.d.ts → client-SMxqod4j.d.ts} +2 -2
  5. package/dist/{client-BolQlL5e.d.mts → client-q9fN8Hhf.d.mts} +103 -1
  6. package/dist/{client-BolQlL5e.d.ts → client-q9fN8Hhf.d.ts} +103 -1
  7. package/dist/compliance/index.d.mts +3 -3
  8. package/dist/compliance/index.d.ts +3 -3
  9. package/dist/compliance/index.js +133 -22
  10. package/dist/compliance/index.js.map +1 -1
  11. package/dist/compliance/index.mjs +133 -22
  12. package/dist/compliance/index.mjs.map +1 -1
  13. package/dist/decisions/index.d.mts +1 -1
  14. package/dist/decisions/index.d.ts +1 -1
  15. package/dist/decisions/index.js +68 -7
  16. package/dist/decisions/index.js.map +1 -1
  17. package/dist/decisions/index.mjs +68 -7
  18. package/dist/decisions/index.mjs.map +1 -1
  19. package/dist/geolocation/index.d.mts +59 -4
  20. package/dist/geolocation/index.d.ts +59 -4
  21. package/dist/geolocation/index.js +136 -19
  22. package/dist/geolocation/index.js.map +1 -1
  23. package/dist/geolocation/index.mjs +134 -20
  24. package/dist/geolocation/index.mjs.map +1 -1
  25. package/dist/index-CPOrMRaH.d.ts +264 -0
  26. package/dist/index-CimDmgZb.d.mts +264 -0
  27. package/dist/index.d.mts +27 -10
  28. package/dist/index.d.ts +27 -10
  29. package/dist/index.js +325 -67
  30. package/dist/index.js.map +1 -1
  31. package/dist/index.mjs +318 -68
  32. package/dist/index.mjs.map +1 -1
  33. package/dist/kyc/core.d.mts +2 -2
  34. package/dist/kyc/core.d.ts +2 -2
  35. package/dist/kyc/core.js +94 -19
  36. package/dist/kyc/core.js.map +1 -1
  37. package/dist/kyc/core.mjs +94 -19
  38. package/dist/kyc/core.mjs.map +1 -1
  39. package/dist/kyc/index.d.mts +110 -13
  40. package/dist/kyc/index.d.ts +110 -13
  41. package/dist/kyc/index.js +94 -19
  42. package/dist/kyc/index.js.map +1 -1
  43. package/dist/kyc/index.mjs +94 -19
  44. package/dist/kyc/index.mjs.map +1 -1
  45. package/dist/react.d.mts +9 -3
  46. package/dist/react.d.ts +9 -3
  47. package/dist/react.js +180 -77
  48. package/dist/react.js.map +1 -1
  49. package/dist/react.mjs +180 -77
  50. package/dist/react.mjs.map +1 -1
  51. package/dist/risk-profile/index.d.mts +1 -1
  52. package/dist/risk-profile/index.d.ts +1 -1
  53. package/dist/risk-profile/index.js +68 -7
  54. package/dist/risk-profile/index.js.map +1 -1
  55. package/dist/risk-profile/index.mjs +68 -7
  56. package/dist/risk-profile/index.mjs.map +1 -1
  57. package/dist/scores/index.d.mts +1 -1
  58. package/dist/scores/index.d.ts +1 -1
  59. package/dist/scores/index.js +68 -7
  60. package/dist/scores/index.js.map +1 -1
  61. package/dist/scores/index.mjs +68 -7
  62. package/dist/scores/index.mjs.map +1 -1
  63. package/dist/tax/index.d.mts +3 -26
  64. package/dist/tax/index.d.ts +3 -26
  65. package/dist/tax/index.js +74 -19
  66. package/dist/tax/index.js.map +1 -1
  67. package/dist/tax/index.mjs +74 -19
  68. package/dist/tax/index.mjs.map +1 -1
  69. package/dist/webhooks/index.d.mts +2 -189
  70. package/dist/webhooks/index.d.ts +2 -189
  71. package/dist/webhooks/index.js +85 -21
  72. package/dist/webhooks/index.js.map +1 -1
  73. package/dist/webhooks/index.mjs +85 -22
  74. package/dist/webhooks/index.mjs.map +1 -1
  75. package/package.json +4 -1
@@ -1,6 +1,6 @@
1
1
  import { P as ProfileFilters, b as ProfileListResponse, C as CustomerProfile, a as CreateProfileRequest } from '../types-BOFaMQxI.mjs';
2
2
  import { c as Reason, R as RiskLevel, P as PaginationParams } from '../types-CBQRNL-l.mjs';
3
- import { B as BaseClient } from '../client-BolQlL5e.mjs';
3
+ import { B as BaseClient, R as RequestOptions } from '../client-q9fN8Hhf.mjs';
4
4
 
5
5
  /**
6
6
  * TypeScript type definitions for Vesant KYC Service API
@@ -57,6 +57,18 @@ interface KycRequest {
57
57
  other_reason?: string;
58
58
  /** @deprecated Use {@link warning_reasons}. */
59
59
  warnings?: Record<string, Record<string, string>>;
60
+ /**
61
+ * Tenant app should block onboarding/the action when true. Set when a
62
+ * failed verification matches a per-event KYC alert rule with the `block`
63
+ * reaction; sticky once set (a later non-blocking update won't clear it).
64
+ */
65
+ block: boolean;
66
+ /**
67
+ * Names the configured verification that triggered the block (e.g.
68
+ * `document_verification`, `face_verification`, `address_verification`,
69
+ * `age_verification`). Empty when {@link block} is false.
70
+ */
71
+ block_reason?: string;
60
72
  proofs?: Proof[];
61
73
  alerts?: KycAlert[];
62
74
  risk_profile?: KycCustomerProfile;
@@ -306,8 +318,49 @@ interface RequestKycSubmitLinkRequest {
306
318
  redirect_url?: string;
307
319
  /** URL to receive callback notifications via POST request when KYC status changes (optional) */
308
320
  callback_url?: string;
309
- /** Event that triggered the KYC request (e.g. "onboarding", "login", "transaction") */
321
+ /**
322
+ * Event that triggered the KYC request. Valid values: "onboarding",
323
+ * "first_withdrawal", "first_purchase", "manual". The tenant's KYC
324
+ * verification trigger preferences decide, per event, whether KYC is
325
+ * required (`kyc_required` in the response). "manual" always requires
326
+ * KYC and honors the tenant's allow-skip-on-manual option (`can_skip`).
327
+ * Omitted or unknown values default to KYC required with no skip.
328
+ */
310
329
  trigger_event?: string;
330
+ /**
331
+ * Registered customer identity data (optional). Seeds the customer's risk
332
+ * profile so document verification can cross-check the submitted document
333
+ * against trusted reference data (name/DOB match, address verification).
334
+ * Fields never overwrite data already on the profile.
335
+ */
336
+ customer_data?: KycCustomerData;
337
+ }
338
+ /**
339
+ * Customer identity data supplied by your platform on a submit-link request.
340
+ * Mirrors the geolocation `customer_data` contract. Every field is optional
341
+ * and never overwrites data already on the customer's risk profile.
342
+ */
343
+ interface KycCustomerData {
344
+ /**
345
+ * Customer's registered full name. Used to match the OCR-extracted name
346
+ * on the submitted document.
347
+ */
348
+ full_name?: string;
349
+ /**
350
+ * Customer's registered date of birth. ISO 8601 date ("1999-06-02") or an
351
+ * RFC 3339 timestamp ("1986-09-06T18:30:00.000+00:00", as produced by
352
+ * `Date.prototype.toISOString()`) — for timestamps the date portion is
353
+ * used. Used for DOB matching against the submitted document.
354
+ */
355
+ date_of_birth?: string;
356
+ /** Customer's email address */
357
+ email?: string;
358
+ /** Customer's phone number */
359
+ phone?: string;
360
+ /** Customer's residential address. Used for address verification. */
361
+ address?: string;
362
+ /** Customer's country of residence */
363
+ country?: string;
311
364
  }
312
365
  /**
313
366
  * Trigger events that can request Event-Based Face Verification.
@@ -362,12 +415,34 @@ interface SubmitEventBasedFaceVerificationSessionRequest {
362
415
  proof: string;
363
416
  /** Unique reference for the KYC session (e.g., customer ID or transaction ID) */
364
417
  reference?: string;
418
+ /**
419
+ * Optional capture telemetry (JSON string): the face-detection
420
+ * bounding-box samples recorded in the moments before capture. Attached
421
+ * automatically by `FaceCaptureModal` when in-modal detection is active;
422
+ * omit when building a custom capture UI without detection. Stored
423
+ * verbatim server-side for audit/review — a weak presence signal, not
424
+ * certified anti-spoofing.
425
+ */
426
+ liveness_artifact?: string;
365
427
  }
366
428
  interface RequestKycSubmitLinkResponse {
367
429
  /** Generated KYC submission redirect URL */
368
430
  link: string;
369
431
  /** KYC request ID */
370
432
  kyc_id: string;
433
+ /**
434
+ * Whether KYC is required for the reported `trigger_event`, per the
435
+ * tenant's verification trigger preferences. `false` when the trigger
436
+ * is disabled for the tenant, or when the customer is already verified
437
+ * (in that case `link` and `kyc_id` are empty).
438
+ */
439
+ kyc_required: boolean;
440
+ /**
441
+ * Whether the user may skip verification. Only `true` for
442
+ * `trigger_event: "manual"` when the tenant enables allow-skip-on-manual,
443
+ * or when the customer is already verified.
444
+ */
445
+ can_skip: boolean;
371
446
  }
372
447
  /** Device class detected by the SDK (purely client-side — server doesn't care). */
373
448
  type EventBasedFaceVerificationDeviceType = 'mobile' | 'desktop';
@@ -430,6 +505,14 @@ interface EventBasedFaceVerificationCallback {
430
505
  reference: string;
431
506
  resource_id: string;
432
507
  status: KycStatus;
508
+ /**
509
+ * True when the tenant app should block the action/account. Mirrors the
510
+ * `block` reaction on {@link data} at the top level of the callback so
511
+ * consumers can branch without inspecting `data`. Omitted when false.
512
+ */
513
+ block?: boolean;
514
+ /** Names the event/verification that triggered the block. Omitted when not blocked. */
515
+ block_reason?: string;
433
516
  /** Structured decline reasons. */
434
517
  declined_reasons?: Reason[];
435
518
  /** @deprecated Use {@link declined_reasons}. */
@@ -637,7 +720,7 @@ interface UseKycPreferencesResult extends BaseHookState {
637
720
  */
638
721
  declare class KycClient extends BaseClient {
639
722
  private userId?;
640
- private riskProfileBaseURL?;
723
+ private readonly riskProfileBaseURL?;
641
724
  constructor(config: KycClientConfig);
642
725
  /**
643
726
  * Set the user ID for operations requiring user context
@@ -656,7 +739,13 @@ declare class KycClient extends BaseClient {
656
739
  *
657
740
  * Generates a link that the user can visit to submit their KYC documents.
658
741
  *
659
- * @param request - Request containing the user ID, optional redirect URL, and optional callback URL (receives POST requests)
742
+ * Optionally pass the customer's registered identity data as
743
+ * `customer_data` (same shape as the geolocation `customer_data` block).
744
+ * It seeds the customer's risk profile so document verification can
745
+ * cross-check the submitted document against trusted reference data;
746
+ * fields never overwrite data already on the profile.
747
+ *
748
+ * @param request - Request containing the user ID, optional redirect URL, optional callback URL (receives POST requests), and optional customer identity data
660
749
  * @returns Response containing the redirect link and KYC ID
661
750
  *
662
751
  * @example
@@ -664,14 +753,22 @@ declare class KycClient extends BaseClient {
664
753
  * const result = await client.requestKycSubmitLink({
665
754
  * user_id: "user_123",
666
755
  * redirect_url: "https://merchant.com/kyc-complete", // optional
667
- * callback_url: "https://merchant.com/api/kyc-webhook" // optional - receives POST requests on status change
756
+ * callback_url: "https://merchant.com/api/kyc-webhook", // optional - receives POST requests on status change
757
+ * customer_data: { // optional - seeds the risk profile for document cross-checks
758
+ * full_name: "John Doe",
759
+ * date_of_birth: "1999-06-02", // ISO 8601
760
+ * email: "john@example.com",
761
+ * phone: "+94771234567",
762
+ * address: "12 Main St, Colombo", // used for address verification
763
+ * country: "LK"
764
+ * }
668
765
  * });
669
766
  *
670
767
  * console.log(`Redirect user to: ${result.link}`);
671
768
  * console.log(`KYC ID: ${result.kyc_id}`);
672
769
  * ```
673
770
  */
674
- requestKycSubmitLink(request: RequestKycSubmitLinkRequest): Promise<RequestKycSubmitLinkResponse>;
771
+ requestKycSubmitLink(request: RequestKycSubmitLinkRequest, requestOptions?: RequestOptions): Promise<RequestKycSubmitLinkResponse>;
675
772
  /**
676
773
  * Create a Event-Based Face Verification session.
677
774
  *
@@ -697,7 +794,7 @@ declare class KycClient extends BaseClient {
697
794
  *
698
795
  * @param request - Token from `createEventBasedFaceVerificationSession`, plus the base64 selfie.
699
796
  */
700
- submitEventBasedFaceVerificationSession(request: SubmitEventBasedFaceVerificationSessionRequest): Promise<EventBasedFaceVerificationCallback>;
797
+ submitEventBasedFaceVerificationSession(request: SubmitEventBasedFaceVerificationSessionRequest, requestOptions?: RequestOptions): Promise<EventBasedFaceVerificationCallback>;
701
798
  /**
702
799
  * Look up the current state of a Event-Based Face Verification session by its
703
800
  * session token. Useful for desktop pollers waiting on the mobile handoff.
@@ -769,7 +866,7 @@ declare class KycClient extends BaseClient {
769
866
  * @example
770
867
  * ```typescript
771
868
  * const result = await client.submitVerification({
772
- * reference: "customer_123",
869
+ * reference: "4d2aff34-ab86-422d-992e-50b1234a5b67",
773
870
  * email: "customer@example.com",
774
871
  * country: "US",
775
872
  * document: {
@@ -786,7 +883,7 @@ declare class KycClient extends BaseClient {
786
883
  * console.log(`Verification submitted: ${result.reference}`);
787
884
  * ```
788
885
  */
789
- submitVerification(request: DocumentVerificationRequest): Promise<DocumentVerificationResponse>;
886
+ submitVerification(request: DocumentVerificationRequest, requestOptions?: RequestOptions): Promise<DocumentVerificationResponse>;
790
887
  /**
791
888
  * Get a KYC request by ID
792
889
  *
@@ -795,7 +892,7 @@ declare class KycClient extends BaseClient {
795
892
  *
796
893
  * @example
797
894
  * ```typescript
798
- * const kyc = await client.getKycRequest("kyc_abc123");
895
+ * const kyc = await client.getKycRequest("550e8400-e29b-41d4-a716-446655440000");
799
896
  * console.log(`Status: ${kyc.status}, ID Verified: ${kyc.id_verified}`);
800
897
  * ```
801
898
  */
@@ -848,7 +945,7 @@ declare class KycClient extends BaseClient {
848
945
  * @example
849
946
  * ```typescript
850
947
  * await client.requestAdditionalDocuments({
851
- * id: "kyc_abc123",
948
+ * id: "550e8400-e29b-41d4-a716-446655440000",
852
949
  * document_types: ["address", "document_two"],
853
950
  * message: "Please provide proof of address and secondary ID"
854
951
  * });
@@ -863,7 +960,7 @@ declare class KycClient extends BaseClient {
863
960
  *
864
961
  * @example
865
962
  * ```typescript
866
- * const proofs = await client.getProofDownloadURLs("kyc_abc123");
963
+ * const proofs = await client.getProofDownloadURLs("550e8400-e29b-41d4-a716-446655440000");
867
964
  * proofs.forEach(proof => {
868
965
  * console.log(`${proof.type}: ${proof.url} (expires: ${proof.expires_at})`);
869
966
  * });
@@ -1049,4 +1146,4 @@ declare class KycClient extends BaseClient {
1049
1146
  createCustomerProfile(profile: CreateProfileRequest): Promise<CustomerProfile>;
1050
1147
  }
1051
1148
 
1052
- export { type CheckKycStatusRequest, type CheckKycStatusResponse, CreateProfileRequest as CreateCustomerProfileRequest, type CreateEventBasedFaceVerificationSessionRequest, type CreateEventBasedFaceVerificationSessionResponse, CustomerProfile, ProfileFilters as CustomerProfileFilters, ProfileListResponse as CustomerProfileListResponse, type DocumentType, type DocumentVerificationRequest, type DocumentVerificationResponse, type EventBasedFaceVerificationCallback, type EventBasedFaceVerificationDeviceType, type EventBasedFaceVerificationEvent, type EventBasedFaceVerificationFrequencyTrigger, type EventBasedFaceVerificationReactionResult, type EventBasedFaceVerificationReactions, type EventBasedFaceVerificationThresholdTrigger, type EventBasedFaceVerificationTriggers, type FaceProof, KYC_DECLINED_DESCRIPTIONS, type KycAlert, type KycAlertFilters, type KycAlertListResponse, type KycAlertStatus, type KycAlertType, KycClient, type KycClientConfig, type KycCustomerProfile, type KycDeclinedCode, type KycHandoffSession, type KycOverview, type KycPagination, type KycPreferences, type KycRequest, type KycRequestFilters, type KycRequestListResponse, type KycStatus, type Name, PaginationParams, type Proof, type ProofDownloadURL, type ProofType, type RequestAdditionalDocumentsRequest, type RequestKycSubmitLinkRequest, type RequestKycSubmitLinkResponse, RiskLevel, type SubmitEventBasedFaceVerificationSessionRequest, type SubmittedDocument, type SupportedDocumentType, type UpdateKycAlertRequest, type UpdateKycPreferencesRequest, type UpdateKycStatusRequest, type UseKycAlertsOptions, type UseKycAlertsResult, type UseKycOverviewOptions, type UseKycOverviewResult, type UseKycPreferencesResult, type UseKycRequestsOptions, type UseKycRequestsResult, type UseKycSubmissionOptions, type UseKycSubmissionResult };
1149
+ export { type CheckKycStatusRequest, type CheckKycStatusResponse, CreateProfileRequest as CreateCustomerProfileRequest, type CreateEventBasedFaceVerificationSessionRequest, type CreateEventBasedFaceVerificationSessionResponse, CustomerProfile, ProfileFilters as CustomerProfileFilters, ProfileListResponse as CustomerProfileListResponse, type DocumentType, type DocumentVerificationRequest, type DocumentVerificationResponse, type EventBasedFaceVerificationCallback, type EventBasedFaceVerificationDeviceType, type EventBasedFaceVerificationEvent, type EventBasedFaceVerificationFrequencyTrigger, type EventBasedFaceVerificationReactionResult, type EventBasedFaceVerificationReactions, type EventBasedFaceVerificationThresholdTrigger, type EventBasedFaceVerificationTriggers, type FaceProof, KYC_DECLINED_DESCRIPTIONS, type KycAlert, type KycAlertFilters, type KycAlertListResponse, type KycAlertStatus, type KycAlertType, KycClient, type KycClientConfig, type KycCustomerData, type KycCustomerProfile, type KycDeclinedCode, type KycHandoffSession, type KycOverview, type KycPagination, type KycPreferences, type KycRequest, type KycRequestFilters, type KycRequestListResponse, type KycStatus, type Name, PaginationParams, type Proof, type ProofDownloadURL, type ProofType, type RequestAdditionalDocumentsRequest, type RequestKycSubmitLinkRequest, type RequestKycSubmitLinkResponse, RiskLevel, type SubmitEventBasedFaceVerificationSessionRequest, type SubmittedDocument, type SupportedDocumentType, type UpdateKycAlertRequest, type UpdateKycPreferencesRequest, type UpdateKycStatusRequest, type UseKycAlertsOptions, type UseKycAlertsResult, type UseKycOverviewOptions, type UseKycOverviewResult, type UseKycPreferencesResult, type UseKycRequestsOptions, type UseKycRequestsResult, type UseKycSubmissionOptions, type UseKycSubmissionResult };
@@ -1,6 +1,6 @@
1
1
  import { P as ProfileFilters, b as ProfileListResponse, C as CustomerProfile, a as CreateProfileRequest } from '../types-UGyDl1fd.js';
2
2
  import { c as Reason, R as RiskLevel, P as PaginationParams } from '../types-CBQRNL-l.js';
3
- import { B as BaseClient } from '../client-BolQlL5e.js';
3
+ import { B as BaseClient, R as RequestOptions } from '../client-q9fN8Hhf.js';
4
4
 
5
5
  /**
6
6
  * TypeScript type definitions for Vesant KYC Service API
@@ -57,6 +57,18 @@ interface KycRequest {
57
57
  other_reason?: string;
58
58
  /** @deprecated Use {@link warning_reasons}. */
59
59
  warnings?: Record<string, Record<string, string>>;
60
+ /**
61
+ * Tenant app should block onboarding/the action when true. Set when a
62
+ * failed verification matches a per-event KYC alert rule with the `block`
63
+ * reaction; sticky once set (a later non-blocking update won't clear it).
64
+ */
65
+ block: boolean;
66
+ /**
67
+ * Names the configured verification that triggered the block (e.g.
68
+ * `document_verification`, `face_verification`, `address_verification`,
69
+ * `age_verification`). Empty when {@link block} is false.
70
+ */
71
+ block_reason?: string;
60
72
  proofs?: Proof[];
61
73
  alerts?: KycAlert[];
62
74
  risk_profile?: KycCustomerProfile;
@@ -306,8 +318,49 @@ interface RequestKycSubmitLinkRequest {
306
318
  redirect_url?: string;
307
319
  /** URL to receive callback notifications via POST request when KYC status changes (optional) */
308
320
  callback_url?: string;
309
- /** Event that triggered the KYC request (e.g. "onboarding", "login", "transaction") */
321
+ /**
322
+ * Event that triggered the KYC request. Valid values: "onboarding",
323
+ * "first_withdrawal", "first_purchase", "manual". The tenant's KYC
324
+ * verification trigger preferences decide, per event, whether KYC is
325
+ * required (`kyc_required` in the response). "manual" always requires
326
+ * KYC and honors the tenant's allow-skip-on-manual option (`can_skip`).
327
+ * Omitted or unknown values default to KYC required with no skip.
328
+ */
310
329
  trigger_event?: string;
330
+ /**
331
+ * Registered customer identity data (optional). Seeds the customer's risk
332
+ * profile so document verification can cross-check the submitted document
333
+ * against trusted reference data (name/DOB match, address verification).
334
+ * Fields never overwrite data already on the profile.
335
+ */
336
+ customer_data?: KycCustomerData;
337
+ }
338
+ /**
339
+ * Customer identity data supplied by your platform on a submit-link request.
340
+ * Mirrors the geolocation `customer_data` contract. Every field is optional
341
+ * and never overwrites data already on the customer's risk profile.
342
+ */
343
+ interface KycCustomerData {
344
+ /**
345
+ * Customer's registered full name. Used to match the OCR-extracted name
346
+ * on the submitted document.
347
+ */
348
+ full_name?: string;
349
+ /**
350
+ * Customer's registered date of birth. ISO 8601 date ("1999-06-02") or an
351
+ * RFC 3339 timestamp ("1986-09-06T18:30:00.000+00:00", as produced by
352
+ * `Date.prototype.toISOString()`) — for timestamps the date portion is
353
+ * used. Used for DOB matching against the submitted document.
354
+ */
355
+ date_of_birth?: string;
356
+ /** Customer's email address */
357
+ email?: string;
358
+ /** Customer's phone number */
359
+ phone?: string;
360
+ /** Customer's residential address. Used for address verification. */
361
+ address?: string;
362
+ /** Customer's country of residence */
363
+ country?: string;
311
364
  }
312
365
  /**
313
366
  * Trigger events that can request Event-Based Face Verification.
@@ -362,12 +415,34 @@ interface SubmitEventBasedFaceVerificationSessionRequest {
362
415
  proof: string;
363
416
  /** Unique reference for the KYC session (e.g., customer ID or transaction ID) */
364
417
  reference?: string;
418
+ /**
419
+ * Optional capture telemetry (JSON string): the face-detection
420
+ * bounding-box samples recorded in the moments before capture. Attached
421
+ * automatically by `FaceCaptureModal` when in-modal detection is active;
422
+ * omit when building a custom capture UI without detection. Stored
423
+ * verbatim server-side for audit/review — a weak presence signal, not
424
+ * certified anti-spoofing.
425
+ */
426
+ liveness_artifact?: string;
365
427
  }
366
428
  interface RequestKycSubmitLinkResponse {
367
429
  /** Generated KYC submission redirect URL */
368
430
  link: string;
369
431
  /** KYC request ID */
370
432
  kyc_id: string;
433
+ /**
434
+ * Whether KYC is required for the reported `trigger_event`, per the
435
+ * tenant's verification trigger preferences. `false` when the trigger
436
+ * is disabled for the tenant, or when the customer is already verified
437
+ * (in that case `link` and `kyc_id` are empty).
438
+ */
439
+ kyc_required: boolean;
440
+ /**
441
+ * Whether the user may skip verification. Only `true` for
442
+ * `trigger_event: "manual"` when the tenant enables allow-skip-on-manual,
443
+ * or when the customer is already verified.
444
+ */
445
+ can_skip: boolean;
371
446
  }
372
447
  /** Device class detected by the SDK (purely client-side — server doesn't care). */
373
448
  type EventBasedFaceVerificationDeviceType = 'mobile' | 'desktop';
@@ -430,6 +505,14 @@ interface EventBasedFaceVerificationCallback {
430
505
  reference: string;
431
506
  resource_id: string;
432
507
  status: KycStatus;
508
+ /**
509
+ * True when the tenant app should block the action/account. Mirrors the
510
+ * `block` reaction on {@link data} at the top level of the callback so
511
+ * consumers can branch without inspecting `data`. Omitted when false.
512
+ */
513
+ block?: boolean;
514
+ /** Names the event/verification that triggered the block. Omitted when not blocked. */
515
+ block_reason?: string;
433
516
  /** Structured decline reasons. */
434
517
  declined_reasons?: Reason[];
435
518
  /** @deprecated Use {@link declined_reasons}. */
@@ -637,7 +720,7 @@ interface UseKycPreferencesResult extends BaseHookState {
637
720
  */
638
721
  declare class KycClient extends BaseClient {
639
722
  private userId?;
640
- private riskProfileBaseURL?;
723
+ private readonly riskProfileBaseURL?;
641
724
  constructor(config: KycClientConfig);
642
725
  /**
643
726
  * Set the user ID for operations requiring user context
@@ -656,7 +739,13 @@ declare class KycClient extends BaseClient {
656
739
  *
657
740
  * Generates a link that the user can visit to submit their KYC documents.
658
741
  *
659
- * @param request - Request containing the user ID, optional redirect URL, and optional callback URL (receives POST requests)
742
+ * Optionally pass the customer's registered identity data as
743
+ * `customer_data` (same shape as the geolocation `customer_data` block).
744
+ * It seeds the customer's risk profile so document verification can
745
+ * cross-check the submitted document against trusted reference data;
746
+ * fields never overwrite data already on the profile.
747
+ *
748
+ * @param request - Request containing the user ID, optional redirect URL, optional callback URL (receives POST requests), and optional customer identity data
660
749
  * @returns Response containing the redirect link and KYC ID
661
750
  *
662
751
  * @example
@@ -664,14 +753,22 @@ declare class KycClient extends BaseClient {
664
753
  * const result = await client.requestKycSubmitLink({
665
754
  * user_id: "user_123",
666
755
  * redirect_url: "https://merchant.com/kyc-complete", // optional
667
- * callback_url: "https://merchant.com/api/kyc-webhook" // optional - receives POST requests on status change
756
+ * callback_url: "https://merchant.com/api/kyc-webhook", // optional - receives POST requests on status change
757
+ * customer_data: { // optional - seeds the risk profile for document cross-checks
758
+ * full_name: "John Doe",
759
+ * date_of_birth: "1999-06-02", // ISO 8601
760
+ * email: "john@example.com",
761
+ * phone: "+94771234567",
762
+ * address: "12 Main St, Colombo", // used for address verification
763
+ * country: "LK"
764
+ * }
668
765
  * });
669
766
  *
670
767
  * console.log(`Redirect user to: ${result.link}`);
671
768
  * console.log(`KYC ID: ${result.kyc_id}`);
672
769
  * ```
673
770
  */
674
- requestKycSubmitLink(request: RequestKycSubmitLinkRequest): Promise<RequestKycSubmitLinkResponse>;
771
+ requestKycSubmitLink(request: RequestKycSubmitLinkRequest, requestOptions?: RequestOptions): Promise<RequestKycSubmitLinkResponse>;
675
772
  /**
676
773
  * Create a Event-Based Face Verification session.
677
774
  *
@@ -697,7 +794,7 @@ declare class KycClient extends BaseClient {
697
794
  *
698
795
  * @param request - Token from `createEventBasedFaceVerificationSession`, plus the base64 selfie.
699
796
  */
700
- submitEventBasedFaceVerificationSession(request: SubmitEventBasedFaceVerificationSessionRequest): Promise<EventBasedFaceVerificationCallback>;
797
+ submitEventBasedFaceVerificationSession(request: SubmitEventBasedFaceVerificationSessionRequest, requestOptions?: RequestOptions): Promise<EventBasedFaceVerificationCallback>;
701
798
  /**
702
799
  * Look up the current state of a Event-Based Face Verification session by its
703
800
  * session token. Useful for desktop pollers waiting on the mobile handoff.
@@ -769,7 +866,7 @@ declare class KycClient extends BaseClient {
769
866
  * @example
770
867
  * ```typescript
771
868
  * const result = await client.submitVerification({
772
- * reference: "customer_123",
869
+ * reference: "4d2aff34-ab86-422d-992e-50b1234a5b67",
773
870
  * email: "customer@example.com",
774
871
  * country: "US",
775
872
  * document: {
@@ -786,7 +883,7 @@ declare class KycClient extends BaseClient {
786
883
  * console.log(`Verification submitted: ${result.reference}`);
787
884
  * ```
788
885
  */
789
- submitVerification(request: DocumentVerificationRequest): Promise<DocumentVerificationResponse>;
886
+ submitVerification(request: DocumentVerificationRequest, requestOptions?: RequestOptions): Promise<DocumentVerificationResponse>;
790
887
  /**
791
888
  * Get a KYC request by ID
792
889
  *
@@ -795,7 +892,7 @@ declare class KycClient extends BaseClient {
795
892
  *
796
893
  * @example
797
894
  * ```typescript
798
- * const kyc = await client.getKycRequest("kyc_abc123");
895
+ * const kyc = await client.getKycRequest("550e8400-e29b-41d4-a716-446655440000");
799
896
  * console.log(`Status: ${kyc.status}, ID Verified: ${kyc.id_verified}`);
800
897
  * ```
801
898
  */
@@ -848,7 +945,7 @@ declare class KycClient extends BaseClient {
848
945
  * @example
849
946
  * ```typescript
850
947
  * await client.requestAdditionalDocuments({
851
- * id: "kyc_abc123",
948
+ * id: "550e8400-e29b-41d4-a716-446655440000",
852
949
  * document_types: ["address", "document_two"],
853
950
  * message: "Please provide proof of address and secondary ID"
854
951
  * });
@@ -863,7 +960,7 @@ declare class KycClient extends BaseClient {
863
960
  *
864
961
  * @example
865
962
  * ```typescript
866
- * const proofs = await client.getProofDownloadURLs("kyc_abc123");
963
+ * const proofs = await client.getProofDownloadURLs("550e8400-e29b-41d4-a716-446655440000");
867
964
  * proofs.forEach(proof => {
868
965
  * console.log(`${proof.type}: ${proof.url} (expires: ${proof.expires_at})`);
869
966
  * });
@@ -1049,4 +1146,4 @@ declare class KycClient extends BaseClient {
1049
1146
  createCustomerProfile(profile: CreateProfileRequest): Promise<CustomerProfile>;
1050
1147
  }
1051
1148
 
1052
- export { type CheckKycStatusRequest, type CheckKycStatusResponse, CreateProfileRequest as CreateCustomerProfileRequest, type CreateEventBasedFaceVerificationSessionRequest, type CreateEventBasedFaceVerificationSessionResponse, CustomerProfile, ProfileFilters as CustomerProfileFilters, ProfileListResponse as CustomerProfileListResponse, type DocumentType, type DocumentVerificationRequest, type DocumentVerificationResponse, type EventBasedFaceVerificationCallback, type EventBasedFaceVerificationDeviceType, type EventBasedFaceVerificationEvent, type EventBasedFaceVerificationFrequencyTrigger, type EventBasedFaceVerificationReactionResult, type EventBasedFaceVerificationReactions, type EventBasedFaceVerificationThresholdTrigger, type EventBasedFaceVerificationTriggers, type FaceProof, KYC_DECLINED_DESCRIPTIONS, type KycAlert, type KycAlertFilters, type KycAlertListResponse, type KycAlertStatus, type KycAlertType, KycClient, type KycClientConfig, type KycCustomerProfile, type KycDeclinedCode, type KycHandoffSession, type KycOverview, type KycPagination, type KycPreferences, type KycRequest, type KycRequestFilters, type KycRequestListResponse, type KycStatus, type Name, PaginationParams, type Proof, type ProofDownloadURL, type ProofType, type RequestAdditionalDocumentsRequest, type RequestKycSubmitLinkRequest, type RequestKycSubmitLinkResponse, RiskLevel, type SubmitEventBasedFaceVerificationSessionRequest, type SubmittedDocument, type SupportedDocumentType, type UpdateKycAlertRequest, type UpdateKycPreferencesRequest, type UpdateKycStatusRequest, type UseKycAlertsOptions, type UseKycAlertsResult, type UseKycOverviewOptions, type UseKycOverviewResult, type UseKycPreferencesResult, type UseKycRequestsOptions, type UseKycRequestsResult, type UseKycSubmissionOptions, type UseKycSubmissionResult };
1149
+ export { type CheckKycStatusRequest, type CheckKycStatusResponse, CreateProfileRequest as CreateCustomerProfileRequest, type CreateEventBasedFaceVerificationSessionRequest, type CreateEventBasedFaceVerificationSessionResponse, CustomerProfile, ProfileFilters as CustomerProfileFilters, ProfileListResponse as CustomerProfileListResponse, type DocumentType, type DocumentVerificationRequest, type DocumentVerificationResponse, type EventBasedFaceVerificationCallback, type EventBasedFaceVerificationDeviceType, type EventBasedFaceVerificationEvent, type EventBasedFaceVerificationFrequencyTrigger, type EventBasedFaceVerificationReactionResult, type EventBasedFaceVerificationReactions, type EventBasedFaceVerificationThresholdTrigger, type EventBasedFaceVerificationTriggers, type FaceProof, KYC_DECLINED_DESCRIPTIONS, type KycAlert, type KycAlertFilters, type KycAlertListResponse, type KycAlertStatus, type KycAlertType, KycClient, type KycClientConfig, type KycCustomerData, type KycCustomerProfile, type KycDeclinedCode, type KycHandoffSession, type KycOverview, type KycPagination, type KycPreferences, type KycRequest, type KycRequestFilters, type KycRequestListResponse, type KycStatus, type Name, PaginationParams, type Proof, type ProofDownloadURL, type ProofType, type RequestAdditionalDocumentsRequest, type RequestKycSubmitLinkRequest, type RequestKycSubmitLinkResponse, RiskLevel, type SubmitEventBasedFaceVerificationSessionRequest, type SubmittedDocument, type SupportedDocumentType, type UpdateKycAlertRequest, type UpdateKycPreferencesRequest, type UpdateKycStatusRequest, type UseKycAlertsOptions, type UseKycAlertsResult, type UseKycOverviewOptions, type UseKycOverviewResult, type UseKycPreferencesResult, type UseKycRequestsOptions, type UseKycRequestsResult, type UseKycSubmissionOptions, type UseKycSubmissionResult };