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.
- package/dist/{client-ZNdnpWe7.d.mts → client-B0qhE2kr.d.mts} +1 -1
- package/dist/{client-DoMSYMMR.d.ts → client-DF7hlMEz.d.ts} +13 -0
- package/dist/{client-DMIRx7Tu.d.mts → client-DrjgZoH_.d.mts} +13 -0
- package/dist/{client-C3DCmGe9.d.ts → client-DtH2RLuy.d.ts} +1 -1
- package/dist/compliance/index.d.mts +2 -2
- package/dist/compliance/index.d.ts +2 -2
- package/dist/compliance/index.js +0 -3
- package/dist/compliance/index.js.map +1 -1
- package/dist/compliance/index.mjs +0 -3
- package/dist/compliance/index.mjs.map +1 -1
- package/dist/geolocation/index.d.mts +2 -2
- package/dist/geolocation/index.d.ts +2 -2
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +40 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +40 -22
- package/dist/index.mjs.map +1 -1
- package/dist/kyc/core.d.mts +1 -1
- package/dist/kyc/core.d.ts +1 -1
- package/dist/kyc/core.js +36 -18
- package/dist/kyc/core.js.map +1 -1
- package/dist/kyc/core.mjs +36 -18
- package/dist/kyc/core.mjs.map +1 -1
- package/dist/kyc/index.d.mts +161 -58
- package/dist/kyc/index.d.ts +161 -58
- package/dist/kyc/index.js +36 -18
- package/dist/kyc/index.js.map +1 -1
- package/dist/kyc/index.mjs +36 -18
- package/dist/kyc/index.mjs.map +1 -1
- package/dist/react.d.mts +18 -14
- package/dist/react.d.ts +18 -14
- package/dist/react.js +303 -35
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +303 -35
- package/dist/react.mjs.map +1 -1
- package/dist/tax/index.d.mts +18 -1
- package/dist/tax/index.d.ts +18 -1
- package/dist/tax/index.js +4 -1
- package/dist/tax/index.js.map +1 -1
- package/dist/tax/index.mjs +4 -1
- package/dist/tax/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/kyc/index.d.mts
CHANGED
|
@@ -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;
|
|
@@ -132,10 +144,10 @@ interface UpdateKycAlertRequest {
|
|
|
132
144
|
*
|
|
133
145
|
* - `enabled=false` → event blocked.
|
|
134
146
|
* - `enabled=true`, `threshold=0` (or null/omitted) → every event of this
|
|
135
|
-
* type triggers
|
|
147
|
+
* type triggers Event-Based Face Verification, regardless of amount.
|
|
136
148
|
* - `enabled=true`, `threshold>0` → only amounts `>= threshold` trigger.
|
|
137
149
|
*/
|
|
138
|
-
interface
|
|
150
|
+
interface EventBasedFaceVerificationThresholdTrigger {
|
|
139
151
|
enabled: boolean;
|
|
140
152
|
/** USD threshold; 0 / null / omitted means "any amount". */
|
|
141
153
|
threshold: number;
|
|
@@ -148,15 +160,15 @@ interface ReuseKycThresholdTrigger {
|
|
|
148
160
|
* `event_window_minutes <= window_minutes`. Either bound of 0 means
|
|
149
161
|
* "don't enforce that bound".
|
|
150
162
|
*/
|
|
151
|
-
interface
|
|
163
|
+
interface EventBasedFaceVerificationFrequencyTrigger {
|
|
152
164
|
enabled: boolean;
|
|
153
165
|
/** Minimum number of events; 0 / null / omitted means "any count". */
|
|
154
166
|
count: number;
|
|
155
167
|
/** Maximum lookback window in minutes; 0 / null / omitted means "any window". */
|
|
156
168
|
window_minutes: number;
|
|
157
169
|
}
|
|
158
|
-
/** Events that can trigger
|
|
159
|
-
interface
|
|
170
|
+
/** Events that can trigger Event-Based Face Verification for a tenant. */
|
|
171
|
+
interface EventBasedFaceVerificationTriggers {
|
|
160
172
|
login: boolean;
|
|
161
173
|
password_change: boolean;
|
|
162
174
|
name_change: boolean;
|
|
@@ -165,19 +177,19 @@ interface ReuseKycTriggers {
|
|
|
165
177
|
new_device_or_location: boolean;
|
|
166
178
|
device_fingerprint_change: boolean;
|
|
167
179
|
payment_method_change: boolean;
|
|
168
|
-
deposit:
|
|
169
|
-
withdrawal:
|
|
170
|
-
large_bet_placement:
|
|
171
|
-
high_frequency_betting:
|
|
180
|
+
deposit: EventBasedFaceVerificationThresholdTrigger;
|
|
181
|
+
withdrawal: EventBasedFaceVerificationThresholdTrigger;
|
|
182
|
+
large_bet_placement: EventBasedFaceVerificationThresholdTrigger;
|
|
183
|
+
high_frequency_betting: EventBasedFaceVerificationFrequencyTrigger;
|
|
172
184
|
account_balance_transfer: boolean;
|
|
173
185
|
}
|
|
174
186
|
/**
|
|
175
|
-
* Reactions taken when a customer exhausts the
|
|
187
|
+
* Reactions taken when a customer exhausts the Event-Based Face Verification retry limit.
|
|
176
188
|
* `trigger_alert` is enforced by the server (creates a KYC alert);
|
|
177
189
|
* `enforce_logout` and `freeze_account` are forwarded to the tenant app
|
|
178
190
|
* via the callback `data` field for it to enforce.
|
|
179
191
|
*/
|
|
180
|
-
interface
|
|
192
|
+
interface EventBasedFaceVerificationReactions {
|
|
181
193
|
/** Retries after the first attempt; total submissions = this + 1. */
|
|
182
194
|
max_retry_attempts: number;
|
|
183
195
|
trigger_alert: boolean;
|
|
@@ -193,7 +205,7 @@ interface KycPreferences {
|
|
|
193
205
|
is_face_verification_required: boolean;
|
|
194
206
|
is_address_verification_required: boolean;
|
|
195
207
|
is_age_verification_required: boolean;
|
|
196
|
-
/** Master switch for the
|
|
208
|
+
/** Master switch for the Event-Based Face Verification feature. */
|
|
197
209
|
is_reuse_kyc_enabled?: boolean;
|
|
198
210
|
min_age: number;
|
|
199
211
|
max_age: number;
|
|
@@ -202,10 +214,10 @@ interface KycPreferences {
|
|
|
202
214
|
high_risk_score: number;
|
|
203
215
|
medium_risk_score: number;
|
|
204
216
|
supported_document_types: SupportedDocumentType[];
|
|
205
|
-
/** Per-event triggers for
|
|
206
|
-
reuse_kyc_triggers?:
|
|
207
|
-
/** Retry / reaction policy for
|
|
208
|
-
reuse_kyc_reactions?:
|
|
217
|
+
/** Per-event triggers for Event-Based Face Verification. */
|
|
218
|
+
reuse_kyc_triggers?: EventBasedFaceVerificationTriggers;
|
|
219
|
+
/** Retry / reaction policy for Event-Based Face Verification. */
|
|
220
|
+
reuse_kyc_reactions?: EventBasedFaceVerificationReactions;
|
|
209
221
|
created_at: string;
|
|
210
222
|
updated_at: string;
|
|
211
223
|
}
|
|
@@ -224,9 +236,9 @@ interface UpdateKycPreferencesRequest {
|
|
|
224
236
|
medium_risk_score?: number;
|
|
225
237
|
supported_document_types?: SupportedDocumentType[];
|
|
226
238
|
/** Partial update — only the events present here are changed. */
|
|
227
|
-
reuse_kyc_triggers?: Partial<
|
|
239
|
+
reuse_kyc_triggers?: Partial<EventBasedFaceVerificationTriggers>;
|
|
228
240
|
/** Partial update — only the keys present here are changed. */
|
|
229
|
-
reuse_kyc_reactions?: Partial<
|
|
241
|
+
reuse_kyc_reactions?: Partial<EventBasedFaceVerificationReactions>;
|
|
230
242
|
}
|
|
231
243
|
interface Name {
|
|
232
244
|
first_name?: string;
|
|
@@ -306,29 +318,70 @@ 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
|
-
/**
|
|
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
|
-
* Trigger events that can request
|
|
366
|
+
* Trigger events that can request Event-Based Face Verification.
|
|
314
367
|
*
|
|
315
368
|
* Account-sensitive: any sensitive change to the account profile.
|
|
316
369
|
* Transaction events: covered by the per-event rules in
|
|
317
|
-
* `
|
|
370
|
+
* `EventBasedFaceVerificationTriggers` (`deposit`, `withdrawal`, `large_bet_placement`,
|
|
318
371
|
* `high_frequency_betting`, `account_balance_transfer`).
|
|
319
372
|
*/
|
|
320
|
-
type
|
|
321
|
-
interface
|
|
373
|
+
type EventBasedFaceVerificationEvent = 'login' | 'password_change' | 'name_change' | 'phone_number_change' | 'two_factor_auth_change' | 'new_device_or_location' | 'device_fingerprint_change' | 'payment_method_change' | 'deposit' | 'withdrawal' | 'large_bet_placement' | 'high_frequency_betting' | 'account_balance_transfer';
|
|
374
|
+
interface CreateEventBasedFaceVerificationSessionRequest {
|
|
322
375
|
/** Unique reference for the KYC session (e.g., customer ID or transaction ID) */
|
|
323
376
|
reference: string;
|
|
324
377
|
/** Customer ID to associate with the KYC session */
|
|
325
378
|
customer_id: string;
|
|
326
379
|
/**
|
|
327
|
-
* The triggering event. One of the `
|
|
380
|
+
* The triggering event. One of the `EventBasedFaceVerificationEvent` union members.
|
|
328
381
|
* Required — when empty, the server falls through to the unknown-event
|
|
329
382
|
* passthrough and allows the request silently.
|
|
330
383
|
*/
|
|
331
|
-
event:
|
|
384
|
+
event: EventBasedFaceVerificationEvent;
|
|
332
385
|
/**
|
|
333
386
|
* USD amount associated with the event. Required for threshold-gated
|
|
334
387
|
* events (`deposit`, `withdrawal`, `large_bet_placement`); ignored for
|
|
@@ -352,32 +405,54 @@ interface CreateReuseKycSessionRequest {
|
|
|
352
405
|
event_window_minutes?: number;
|
|
353
406
|
/** URL to redirect user after validate the facial submission (optional) */
|
|
354
407
|
redirect_url?: string;
|
|
355
|
-
/** URL to receive callback notifications via POST request when
|
|
408
|
+
/** URL to receive callback notifications via POST request when Event-Based Face Verification status changes (optional) */
|
|
356
409
|
callback_url?: string;
|
|
357
410
|
}
|
|
358
|
-
interface
|
|
359
|
-
/**
|
|
411
|
+
interface SubmitEventBasedFaceVerificationSessionRequest {
|
|
412
|
+
/** Event-Based Face Verification session token generated from createEventBasedFaceVerificationSession */
|
|
360
413
|
token: string;
|
|
361
414
|
/** Base64 encoded face image or selfie for verification */
|
|
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
|
-
type
|
|
374
|
-
interface
|
|
375
|
-
/**
|
|
448
|
+
type EventBasedFaceVerificationDeviceType = 'mobile' | 'desktop';
|
|
449
|
+
interface CreateEventBasedFaceVerificationSessionResponse {
|
|
450
|
+
/** Event-Based Face Verification session reference (echo of the request reference) */
|
|
376
451
|
reference: string;
|
|
377
|
-
/** Generated
|
|
452
|
+
/** Generated Event-Based Face Verification session token, valid 10 minutes */
|
|
378
453
|
token: string;
|
|
379
454
|
/**
|
|
380
|
-
* Empty string when
|
|
455
|
+
* Empty string when Event-Based Face Verification is required. When `is_required` is
|
|
381
456
|
* false, this contains the human-readable reason (e.g. feature
|
|
382
457
|
* disabled, threshold not met, customer has no prior KYC).
|
|
383
458
|
*/
|
|
@@ -406,7 +481,7 @@ interface CreateReuseKycSessionResponse {
|
|
|
406
481
|
* or freeze the account. Reaction flags are only populated when
|
|
407
482
|
* `retry_limit_exceeded` is true.
|
|
408
483
|
*/
|
|
409
|
-
interface
|
|
484
|
+
interface EventBasedFaceVerificationReactionResult {
|
|
410
485
|
/** Submissions the customer still has before the retry limit fires. */
|
|
411
486
|
retries_remaining: number;
|
|
412
487
|
/** True once the latest failed attempt exhausts the retry policy. */
|
|
@@ -414,27 +489,37 @@ interface ReuseKycReactionResult {
|
|
|
414
489
|
trigger_alert: boolean;
|
|
415
490
|
enforce_logout: boolean;
|
|
416
491
|
freeze_account: boolean;
|
|
492
|
+
/** Tenant app should block the action/account when true. */
|
|
493
|
+
block: boolean;
|
|
417
494
|
freeze_duration_minutes: number;
|
|
418
495
|
/** Set when an alert was raised on the dashboard. */
|
|
419
496
|
alert_id?: string;
|
|
420
497
|
}
|
|
421
498
|
/**
|
|
422
|
-
* Shape of the webhook body POSTed to `callback_url` after a
|
|
499
|
+
* Shape of the webhook body POSTed to `callback_url` after a Event-Based Face Verification
|
|
423
500
|
* submission completes (also returned synchronously from
|
|
424
|
-
* `
|
|
501
|
+
* `submitEventBasedFaceVerificationSession`).
|
|
425
502
|
*/
|
|
426
|
-
interface
|
|
503
|
+
interface EventBasedFaceVerificationCallback {
|
|
427
504
|
event: 'reuse_kyc';
|
|
428
505
|
reference: string;
|
|
429
506
|
resource_id: string;
|
|
430
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;
|
|
431
516
|
/** Structured decline reasons. */
|
|
432
517
|
declined_reasons?: Reason[];
|
|
433
518
|
/** @deprecated Use {@link declined_reasons}. */
|
|
434
519
|
declined_reason?: string;
|
|
435
520
|
/** @deprecated Use structured reasons. */
|
|
436
521
|
warnings?: Record<string, Record<string, string>>;
|
|
437
|
-
data:
|
|
522
|
+
data: EventBasedFaceVerificationReactionResult;
|
|
438
523
|
}
|
|
439
524
|
/**
|
|
440
525
|
* Server-side handoff session backed by Redis (TTL: 15 minutes). Shared
|
|
@@ -450,7 +535,7 @@ interface KycHandoffSession {
|
|
|
450
535
|
face: string;
|
|
451
536
|
/** True after a mobile device hits PUT /api/v1/kyc/session/connect. */
|
|
452
537
|
mobile_connected: boolean;
|
|
453
|
-
/** True after the (normal-KYC) document submission completes; unused for
|
|
538
|
+
/** True after the (normal-KYC) document submission completes; unused for Event-Based Face Verification. */
|
|
454
539
|
is_submitted: boolean;
|
|
455
540
|
}
|
|
456
541
|
interface CheckKycStatusRequest {
|
|
@@ -635,7 +720,7 @@ interface UseKycPreferencesResult extends BaseHookState {
|
|
|
635
720
|
*/
|
|
636
721
|
declare class KycClient extends BaseClient {
|
|
637
722
|
private userId?;
|
|
638
|
-
private riskProfileBaseURL?;
|
|
723
|
+
private readonly riskProfileBaseURL?;
|
|
639
724
|
constructor(config: KycClientConfig);
|
|
640
725
|
/**
|
|
641
726
|
* Set the user ID for operations requiring user context
|
|
@@ -654,7 +739,13 @@ declare class KycClient extends BaseClient {
|
|
|
654
739
|
*
|
|
655
740
|
* Generates a link that the user can visit to submit their KYC documents.
|
|
656
741
|
*
|
|
657
|
-
*
|
|
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
|
|
658
749
|
* @returns Response containing the redirect link and KYC ID
|
|
659
750
|
*
|
|
660
751
|
* @example
|
|
@@ -662,7 +753,15 @@ declare class KycClient extends BaseClient {
|
|
|
662
753
|
* const result = await client.requestKycSubmitLink({
|
|
663
754
|
* user_id: "user_123",
|
|
664
755
|
* redirect_url: "https://merchant.com/kyc-complete", // optional
|
|
665
|
-
* 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
|
+
* }
|
|
666
765
|
* });
|
|
667
766
|
*
|
|
668
767
|
* console.log(`Redirect user to: ${result.link}`);
|
|
@@ -671,7 +770,7 @@ declare class KycClient extends BaseClient {
|
|
|
671
770
|
*/
|
|
672
771
|
requestKycSubmitLink(request: RequestKycSubmitLinkRequest): Promise<RequestKycSubmitLinkResponse>;
|
|
673
772
|
/**
|
|
674
|
-
* Create a
|
|
773
|
+
* Create a Event-Based Face Verification session.
|
|
675
774
|
*
|
|
676
775
|
* Inspect the response before showing UI:
|
|
677
776
|
* - `is_required === false` → skip face capture; `reason` explains why.
|
|
@@ -681,35 +780,39 @@ declare class KycClient extends BaseClient {
|
|
|
681
780
|
*
|
|
682
781
|
* @param request - Reference, customer_id, event, amount (for threshold events), optional URLs.
|
|
683
782
|
*/
|
|
684
|
-
|
|
783
|
+
createEventBasedFaceVerificationSession(request: CreateEventBasedFaceVerificationSessionRequest): Promise<CreateEventBasedFaceVerificationSessionResponse>;
|
|
685
784
|
/**
|
|
686
|
-
* Submit a real-time face capture for an active
|
|
785
|
+
* Submit a real-time face capture for an active Event-Based Face Verification session.
|
|
687
786
|
*
|
|
688
787
|
* **Mobile-only.** The server rejects desktop User-Agents with HTTP
|
|
689
788
|
* 400 (`face capture must be completed on a mobile device`). Use the
|
|
690
|
-
* QR handoff from `
|
|
789
|
+
* QR handoff from `createEventBasedFaceVerificationSession` for desktop callers.
|
|
691
790
|
*
|
|
692
791
|
* The `data` field on the response carries `retries_remaining`,
|
|
693
792
|
* `retry_limit_exceeded`, and the reaction flags (`enforce_logout`,
|
|
694
793
|
* `freeze_account`, etc.) so the tenant app can act on a final failure.
|
|
695
794
|
*
|
|
696
|
-
* @param request - Token from `
|
|
795
|
+
* @param request - Token from `createEventBasedFaceVerificationSession`, plus the base64 selfie.
|
|
697
796
|
*/
|
|
698
|
-
|
|
797
|
+
submitEventBasedFaceVerificationSession(request: SubmitEventBasedFaceVerificationSessionRequest): Promise<EventBasedFaceVerificationCallback>;
|
|
699
798
|
/**
|
|
700
|
-
* Look up the current state of a
|
|
701
|
-
*
|
|
799
|
+
* Look up the current state of a Event-Based Face Verification session by its
|
|
800
|
+
* session token. Useful for desktop pollers waiting on the mobile handoff.
|
|
801
|
+
*
|
|
802
|
+
* The lookup is scoped by the unguessable, server-issued session token (not
|
|
803
|
+
* the enumerable forward reference): the endpoint is public/unauthenticated,
|
|
804
|
+
* and scoping by the token is what prevents cross-tenant status reads.
|
|
702
805
|
*
|
|
703
|
-
* @param
|
|
806
|
+
* @param token - The session token returned by `createEventBasedFaceVerificationSession`.
|
|
704
807
|
*/
|
|
705
|
-
|
|
808
|
+
getEventBasedFaceVerificationSessionStatus(token: string): Promise<EventBasedFaceVerificationCallback>;
|
|
706
809
|
/**
|
|
707
810
|
* Fetch the Redis-backed handoff session for a token. Same backing
|
|
708
811
|
* store as normal KYC (`kyc:session:<token>`, 15-minute TTL). Desktop
|
|
709
812
|
* callers poll `mobile_connected` to detect when a mobile device has
|
|
710
813
|
* scanned the QR and attached.
|
|
711
814
|
*
|
|
712
|
-
* @param token - The session token returned by `
|
|
815
|
+
* @param token - The session token returned by `createEventBasedFaceVerificationSession`.
|
|
713
816
|
*/
|
|
714
817
|
getHandoffSession(token: string): Promise<KycHandoffSession>;
|
|
715
818
|
/**
|
|
@@ -763,7 +866,7 @@ declare class KycClient extends BaseClient {
|
|
|
763
866
|
* @example
|
|
764
867
|
* ```typescript
|
|
765
868
|
* const result = await client.submitVerification({
|
|
766
|
-
* reference: "
|
|
869
|
+
* reference: "4d2aff34-ab86-422d-992e-50b1234a5b67",
|
|
767
870
|
* email: "customer@example.com",
|
|
768
871
|
* country: "US",
|
|
769
872
|
* document: {
|
|
@@ -789,7 +892,7 @@ declare class KycClient extends BaseClient {
|
|
|
789
892
|
*
|
|
790
893
|
* @example
|
|
791
894
|
* ```typescript
|
|
792
|
-
* const kyc = await client.getKycRequest("
|
|
895
|
+
* const kyc = await client.getKycRequest("550e8400-e29b-41d4-a716-446655440000");
|
|
793
896
|
* console.log(`Status: ${kyc.status}, ID Verified: ${kyc.id_verified}`);
|
|
794
897
|
* ```
|
|
795
898
|
*/
|
|
@@ -842,7 +945,7 @@ declare class KycClient extends BaseClient {
|
|
|
842
945
|
* @example
|
|
843
946
|
* ```typescript
|
|
844
947
|
* await client.requestAdditionalDocuments({
|
|
845
|
-
* id: "
|
|
948
|
+
* id: "550e8400-e29b-41d4-a716-446655440000",
|
|
846
949
|
* document_types: ["address", "document_two"],
|
|
847
950
|
* message: "Please provide proof of address and secondary ID"
|
|
848
951
|
* });
|
|
@@ -857,7 +960,7 @@ declare class KycClient extends BaseClient {
|
|
|
857
960
|
*
|
|
858
961
|
* @example
|
|
859
962
|
* ```typescript
|
|
860
|
-
* const proofs = await client.getProofDownloadURLs("
|
|
963
|
+
* const proofs = await client.getProofDownloadURLs("550e8400-e29b-41d4-a716-446655440000");
|
|
861
964
|
* proofs.forEach(proof => {
|
|
862
965
|
* console.log(`${proof.type}: ${proof.url} (expires: ${proof.expires_at})`);
|
|
863
966
|
* });
|
|
@@ -1043,4 +1146,4 @@ declare class KycClient extends BaseClient {
|
|
|
1043
1146
|
createCustomerProfile(profile: CreateProfileRequest): Promise<CustomerProfile>;
|
|
1044
1147
|
}
|
|
1045
1148
|
|
|
1046
|
-
export { type CheckKycStatusRequest, type CheckKycStatusResponse, CreateProfileRequest as CreateCustomerProfileRequest, type
|
|
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 };
|