vesant-sdk 1.7.2 → 1.8.0-dev.00f6233
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/README.md +3 -3
- package/dist/{client-B3DCAHlg.d.ts → client-BPALLldd.d.ts} +2 -2
- package/dist/{client-fy3trF2K.d.ts → client-BaUekQT8.d.ts} +32 -10
- package/dist/{client-BwXMQA2a.d.mts → client-XDEhh9VN.d.mts} +32 -10
- package/dist/{client-D23KhWeh.d.mts → client-_OhkfnyJ.d.mts} +2 -2
- package/dist/compliance/index.d.mts +3 -3
- package/dist/compliance/index.d.ts +3 -3
- package/dist/compliance/index.js +66 -11
- package/dist/compliance/index.js.map +1 -1
- package/dist/compliance/index.mjs +66 -11
- package/dist/compliance/index.mjs.map +1 -1
- package/dist/decisions/index.js +8 -7
- package/dist/decisions/index.js.map +1 -1
- package/dist/decisions/index.mjs +8 -7
- package/dist/decisions/index.mjs.map +1 -1
- package/dist/geolocation/index.d.mts +2 -2
- package/dist/geolocation/index.d.ts +2 -2
- package/dist/geolocation/index.js +47 -8
- package/dist/geolocation/index.js.map +1 -1
- package/dist/geolocation/index.mjs +47 -8
- package/dist/geolocation/index.mjs.map +1 -1
- package/dist/{index-DSDgS09k.d.ts → index-BosFSGan.d.ts} +57 -2
- package/dist/{index-C3zUKydT.d.mts → index-C49a7fg2.d.mts} +57 -2
- package/dist/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +104 -169
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +101 -170
- package/dist/index.mjs.map +1 -1
- package/dist/kyc/core.d.mts +2 -2
- package/dist/kyc/core.d.ts +2 -2
- package/dist/kyc/core.js +39 -165
- package/dist/kyc/core.js.map +1 -1
- package/dist/kyc/core.mjs +38 -166
- package/dist/kyc/core.mjs.map +1 -1
- package/dist/kyc/index.d.mts +219 -218
- package/dist/kyc/index.d.ts +219 -218
- package/dist/kyc/index.js +39 -165
- package/dist/kyc/index.js.map +1 -1
- package/dist/kyc/index.mjs +38 -166
- package/dist/kyc/index.mjs.map +1 -1
- package/dist/react.d.mts +24 -115
- package/dist/react.d.ts +24 -115
- package/dist/react.js +23 -196
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +24 -194
- package/dist/react.mjs.map +1 -1
- package/dist/risk-profile/index.d.mts +16 -6
- package/dist/risk-profile/index.d.ts +16 -6
- package/dist/risk-profile/index.js +26 -9
- package/dist/risk-profile/index.js.map +1 -1
- package/dist/risk-profile/index.mjs +26 -10
- package/dist/risk-profile/index.mjs.map +1 -1
- package/dist/scores/index.js +8 -7
- package/dist/scores/index.js.map +1 -1
- package/dist/scores/index.mjs +8 -7
- package/dist/scores/index.mjs.map +1 -1
- package/dist/tax/index.d.mts +1 -1
- package/dist/tax/index.d.ts +1 -1
- package/dist/tax/index.js +8 -7
- package/dist/tax/index.js.map +1 -1
- package/dist/tax/index.mjs +8 -7
- package/dist/tax/index.mjs.map +1 -1
- package/dist/{types-BOFaMQxI.d.mts → types-DbvVph_0.d.mts} +45 -2
- package/dist/{types-UGyDl1fd.d.ts → types-qXamJr2q.d.ts} +45 -2
- package/dist/webhooks/index.d.mts +1 -1
- package/dist/webhooks/index.d.ts +1 -1
- package/dist/webhooks/index.js +6 -0
- package/dist/webhooks/index.js.map +1 -1
- package/dist/webhooks/index.mjs +6 -1
- package/dist/webhooks/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { D as DeviceFingerprintRequest, G as GeolocationClient, i as CipherTextOptions, l as CipherTextResult, Y as UseGeolocationOptions, Z as UseGeolocationResult, _ as UseLocationCaptureOptions, $ as UseLocationCaptureResult, a0 as UseLocationRequestsOptions, a1 as UseLocationRequestsResult } from './client-
|
|
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-
|
|
1
|
+
import { D as DeviceFingerprintRequest, G as GeolocationClient, i as CipherTextOptions, l as CipherTextResult, Y as UseGeolocationOptions, Z as UseGeolocationResult, _ as UseLocationCaptureOptions, $ as UseLocationCaptureResult, a0 as UseLocationRequestsOptions, a1 as UseLocationRequestsResult } from './client-XDEhh9VN.mjs';
|
|
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-_OhkfnyJ.mjs';
|
|
3
3
|
import { RiskProfileClient } from './risk-profile/index.mjs';
|
|
4
|
-
import { C as CustomerProfile } from './types-
|
|
5
|
-
import { CreateEventBasedFaceVerificationSessionResponse, EventBasedFaceVerificationCallback, KycClient, CreateEventBasedFaceVerificationSessionRequest, UseKycAlertsOptions, UseKycAlertsResult,
|
|
4
|
+
import { C as CustomerProfile, j as UpdateProfileResult } from './types-DbvVph_0.mjs';
|
|
5
|
+
import { CreateEventBasedFaceVerificationSessionResponse, EventBasedFaceVerificationCallback, KycClient, CreateEventBasedFaceVerificationSessionRequest, UseKycAlertsOptions, UseKycAlertsResult, UseKycSubmissionOptions, UseKycSubmissionResult } from './kyc/index.mjs';
|
|
6
6
|
import React$1 from 'react';
|
|
7
7
|
import './client-q9fN8Hhf.mjs';
|
|
8
8
|
import './types-CBQRNL-l.mjs';
|
|
@@ -64,6 +64,12 @@ declare function createDeviceFingerprint(): DeviceFingerprintRequest;
|
|
|
64
64
|
/**
|
|
65
65
|
* React hook for generating cipherText
|
|
66
66
|
*
|
|
67
|
+
* The tenant's GPS requirements are read from the client before each generation.
|
|
68
|
+
* The client reuses a fetched copy for a short period, so this does not add a
|
|
69
|
+
* request per event, and a requirement changed in the compliance console takes
|
|
70
|
+
* effect without reloading the page. Call `refreshConfig` to apply a change
|
|
71
|
+
* immediately.
|
|
72
|
+
*
|
|
67
73
|
* @example
|
|
68
74
|
* ```tsx
|
|
69
75
|
* function LoginForm() {
|
|
@@ -80,6 +86,7 @@ declare function createDeviceFingerprint(): DeviceFingerprintRequest;
|
|
|
80
86
|
*/
|
|
81
87
|
declare function useCipherText(client?: GeolocationClient): {
|
|
82
88
|
generate: (options: CipherTextOptions) => Promise<CipherTextResult | null>;
|
|
89
|
+
refreshConfig: () => Promise<void>;
|
|
83
90
|
configLoading: boolean;
|
|
84
91
|
configError: Error | null;
|
|
85
92
|
};
|
|
@@ -214,7 +221,13 @@ interface UseCustomerProfileResult {
|
|
|
214
221
|
loading: boolean;
|
|
215
222
|
error: Error | null;
|
|
216
223
|
fetchProfile: () => Promise<CustomerProfile>;
|
|
217
|
-
|
|
224
|
+
/**
|
|
225
|
+
* Update the loaded profile. Resolves to the updated profile, or to a
|
|
226
|
+
* `ProfileUpdateHeldResponse` when the tenant holds a name / date of birth /
|
|
227
|
+
* address change behind KYC — narrow with `isProfileUpdateHeld`. The hook's
|
|
228
|
+
* `profile` state is updated either way (with the profile as stored).
|
|
229
|
+
*/
|
|
230
|
+
updateProfile: (updates: Partial<CustomerProfile>) => Promise<UpdateProfileResult>;
|
|
218
231
|
refresh: () => Promise<CustomerProfile>;
|
|
219
232
|
}
|
|
220
233
|
/**
|
|
@@ -293,45 +306,6 @@ declare function useCustomerProfile(client: RiskProfileClient, customerId: strin
|
|
|
293
306
|
* ```
|
|
294
307
|
*/
|
|
295
308
|
declare function useKycSubmission(client: KycClient, options?: UseKycSubmissionOptions): UseKycSubmissionResult;
|
|
296
|
-
/**
|
|
297
|
-
* React hook for managing KYC requests
|
|
298
|
-
*
|
|
299
|
-
* @param client - KycClient instance
|
|
300
|
-
* @param options - Hook options
|
|
301
|
-
* @returns KYC requests state and management methods
|
|
302
|
-
*
|
|
303
|
-
* @example
|
|
304
|
-
* ```tsx
|
|
305
|
-
* function KycDashboard() {
|
|
306
|
-
* const {
|
|
307
|
-
* requests,
|
|
308
|
-
* total,
|
|
309
|
-
* loading,
|
|
310
|
-
* fetchRequests,
|
|
311
|
-
* updateStatus
|
|
312
|
-
* } = useKycRequests(client, {
|
|
313
|
-
* autoFetch: true,
|
|
314
|
-
* filters: { status: "pending" },
|
|
315
|
-
* pagination: { page: 1, page_size: 20 }
|
|
316
|
-
* });
|
|
317
|
-
*
|
|
318
|
-
* return (
|
|
319
|
-
* <div>
|
|
320
|
-
* <h2>{total} Pending KYC Requests</h2>
|
|
321
|
-
* {requests.map(req => (
|
|
322
|
-
* <KycCard
|
|
323
|
-
* key={req.id}
|
|
324
|
-
* request={req}
|
|
325
|
-
* onApprove={() => updateStatus(req.reference, "accepted", "Verified")}
|
|
326
|
-
* onReject={() => updateStatus(req.reference, "declined", "Invalid document")}
|
|
327
|
-
* />
|
|
328
|
-
* ))}
|
|
329
|
-
* </div>
|
|
330
|
-
* );
|
|
331
|
-
* }
|
|
332
|
-
* ```
|
|
333
|
-
*/
|
|
334
|
-
declare function useKycRequests(client: KycClient, options?: UseKycRequestsOptions): UseKycRequestsResult;
|
|
335
309
|
/**
|
|
336
310
|
* React hook for managing KYC alerts
|
|
337
311
|
*
|
|
@@ -346,8 +320,7 @@ declare function useKycRequests(client: KycClient, options?: UseKycRequestsOptio
|
|
|
346
320
|
* alerts,
|
|
347
321
|
* total,
|
|
348
322
|
* loading,
|
|
349
|
-
* fetchAlerts
|
|
350
|
-
* updateAlert
|
|
323
|
+
* fetchAlerts
|
|
351
324
|
* } = useKycAlerts(client, {
|
|
352
325
|
* autoFetch: true,
|
|
353
326
|
* filters: { status: ["pending", "in_progress"], risk: "critical" },
|
|
@@ -358,81 +331,17 @@ declare function useKycRequests(client: KycClient, options?: UseKycRequestsOptio
|
|
|
358
331
|
* <div>
|
|
359
332
|
* <h2>{total} Critical Alerts</h2>
|
|
360
333
|
* {alerts.map(alert => (
|
|
361
|
-
* <AlertCard
|
|
362
|
-
* key={alert.id}
|
|
363
|
-
* alert={alert}
|
|
364
|
-
* onAssign={(userId) => updateAlert(alert.id, { assigned_for: userId, status: "in_progress" })}
|
|
365
|
-
* onResolve={() => updateAlert(alert.id, { status: "resolved", reason: "Verified" })}
|
|
366
|
-
* />
|
|
334
|
+
* <AlertCard key={alert.id} alert={alert} />
|
|
367
335
|
* ))}
|
|
368
336
|
* </div>
|
|
369
337
|
* );
|
|
370
338
|
* }
|
|
371
339
|
* ```
|
|
372
|
-
*/
|
|
373
|
-
declare function useKycAlerts(client: KycClient, options?: UseKycAlertsOptions): UseKycAlertsResult;
|
|
374
|
-
/**
|
|
375
|
-
* React hook for KYC overview statistics
|
|
376
340
|
*
|
|
377
|
-
* @
|
|
378
|
-
*
|
|
379
|
-
* @returns KYC overview state
|
|
380
|
-
*
|
|
381
|
-
* @example
|
|
382
|
-
* ```tsx
|
|
383
|
-
* function KycStats() {
|
|
384
|
-
* const { overview, loading, refresh } = useKycOverview(client, {
|
|
385
|
-
* autoFetch: true,
|
|
386
|
-
* fromDate: "2024-01-01T00:00:00Z",
|
|
387
|
-
* toDate: "2024-12-31T23:59:59Z"
|
|
388
|
-
* });
|
|
389
|
-
*
|
|
390
|
-
* if (loading) return <Spinner />;
|
|
391
|
-
*
|
|
392
|
-
* return (
|
|
393
|
-
* <div>
|
|
394
|
-
* <StatCard label="Total" value={overview?.total} />
|
|
395
|
-
* <StatCard label="Pending" value={overview?.pending} />
|
|
396
|
-
* <StatCard label="Approved" value={overview?.approved} />
|
|
397
|
-
* <StatCard label="Rejected" value={overview?.rejected} />
|
|
398
|
-
* <StatCard label="High Risk" value={overview?.high_risk} />
|
|
399
|
-
* </div>
|
|
400
|
-
* );
|
|
401
|
-
* }
|
|
402
|
-
* ```
|
|
403
|
-
*/
|
|
404
|
-
declare function useKycOverview(client: KycClient, options?: UseKycOverviewOptions): UseKycOverviewResult;
|
|
405
|
-
/**
|
|
406
|
-
* React hook for reading KYC preferences
|
|
407
|
-
*
|
|
408
|
-
* Preferences are managed in the Vesant console. The returned
|
|
409
|
-
* `updatePreferences` is deprecated: the platform exposes no update
|
|
410
|
-
* operation, so it always fails.
|
|
411
|
-
*
|
|
412
|
-
* @param client - KycClient instance
|
|
413
|
-
* @param autoFetch - Auto-fetch preferences on mount (default: true)
|
|
414
|
-
* @returns KYC preferences state and methods
|
|
415
|
-
*
|
|
416
|
-
* @example
|
|
417
|
-
* ```tsx
|
|
418
|
-
* function PreferencesSummary() {
|
|
419
|
-
* const { preferences, loading, refresh } = useKycPreferences(client);
|
|
420
|
-
*
|
|
421
|
-
* if (loading) return <Spinner />;
|
|
422
|
-
*
|
|
423
|
-
* return (
|
|
424
|
-
* <dl>
|
|
425
|
-
* <dt>Face verification required</dt>
|
|
426
|
-
* <dd>{String(preferences?.is_face_verification_required)}</dd>
|
|
427
|
-
* <dt>Required documents</dt>
|
|
428
|
-
* <dd>{preferences?.required_document_count}</dd>
|
|
429
|
-
* <button onClick={refresh}>Refresh</button>
|
|
430
|
-
* </dl>
|
|
431
|
-
* );
|
|
432
|
-
* }
|
|
433
|
-
* ```
|
|
341
|
+
* @remarks Console session only: the alert endpoints need a dashboard login
|
|
342
|
+
* token and fail with a tenant API key.
|
|
434
343
|
*/
|
|
435
|
-
declare function
|
|
344
|
+
declare function useKycAlerts(client: KycClient, options?: UseKycAlertsOptions): UseKycAlertsResult;
|
|
436
345
|
/**
|
|
437
346
|
* Convert a File to base64 string for document upload
|
|
438
347
|
*
|
|
@@ -625,4 +534,4 @@ interface FaceCaptureModalProps {
|
|
|
625
534
|
}
|
|
626
535
|
declare function FaceCaptureModal({ client, session, onComplete, onCancel, defaultDevice, renderQR, mediapipeAssetBasePath, }: Readonly<FaceCaptureModalProps>): React$1.ReactElement;
|
|
627
536
|
|
|
628
|
-
export { FaceCaptureModal, type FaceCaptureModalProps, type RunFlowResult, type UseCustomerProfileOptions, type UseCustomerProfileResult, UseGeolocationOptions, UseGeolocationResult, UseKycAlertsOptions, UseKycAlertsResult,
|
|
537
|
+
export { FaceCaptureModal, type FaceCaptureModalProps, type RunFlowResult, type UseCustomerProfileOptions, type UseCustomerProfileResult, UseGeolocationOptions, UseGeolocationResult, UseKycAlertsOptions, UseKycAlertsResult, UseKycSubmissionOptions, UseKycSubmissionResult, UseLocationCaptureOptions, UseLocationCaptureResult, UseLocationRequestsOptions, UseLocationRequestsResult, type UseLoginVerificationOptions, type UseLoginVerificationResult, type UseRegistrationOptions, type UseRegistrationResult, type UseTransactionVerificationOptions, type UseTransactionVerificationResult, type VerifyFaceOptions, buildEventBasedFaceVerificationQrPayload, createDeviceFingerprint, fileToBase64, formatKycStatus, getBrowserInfo, getRiskColor, getStatusColor, isMobileDevice, isValidFileSize, isValidFileType, useCipherText, useCustomerProfile, useEventBasedFaceVerificationSubmission, useGeolocation, useKycAlerts, useKycSubmission, useLocationCapture, useLocationRequests, useLoginVerification, useRegistration, useTransactionVerification };
|
package/dist/react.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { D as DeviceFingerprintRequest, G as GeolocationClient, i as CipherTextOptions, l as CipherTextResult, Y as UseGeolocationOptions, Z as UseGeolocationResult, _ as UseLocationCaptureOptions, $ as UseLocationCaptureResult, a0 as UseLocationRequestsOptions, a1 as UseLocationRequestsResult } from './client-
|
|
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-
|
|
1
|
+
import { D as DeviceFingerprintRequest, G as GeolocationClient, i as CipherTextOptions, l as CipherTextResult, Y as UseGeolocationOptions, Z as UseGeolocationResult, _ as UseLocationCaptureOptions, $ as UseLocationCaptureResult, a0 as UseLocationRequestsOptions, a1 as UseLocationRequestsResult } from './client-BaUekQT8.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-BPALLldd.js';
|
|
3
3
|
import { RiskProfileClient } from './risk-profile/index.js';
|
|
4
|
-
import { C as CustomerProfile } from './types-
|
|
5
|
-
import { CreateEventBasedFaceVerificationSessionResponse, EventBasedFaceVerificationCallback, KycClient, CreateEventBasedFaceVerificationSessionRequest, UseKycAlertsOptions, UseKycAlertsResult,
|
|
4
|
+
import { C as CustomerProfile, j as UpdateProfileResult } from './types-qXamJr2q.js';
|
|
5
|
+
import { CreateEventBasedFaceVerificationSessionResponse, EventBasedFaceVerificationCallback, KycClient, CreateEventBasedFaceVerificationSessionRequest, UseKycAlertsOptions, UseKycAlertsResult, UseKycSubmissionOptions, UseKycSubmissionResult } from './kyc/index.js';
|
|
6
6
|
import React$1 from 'react';
|
|
7
7
|
import './client-q9fN8Hhf.js';
|
|
8
8
|
import './types-CBQRNL-l.js';
|
|
@@ -64,6 +64,12 @@ declare function createDeviceFingerprint(): DeviceFingerprintRequest;
|
|
|
64
64
|
/**
|
|
65
65
|
* React hook for generating cipherText
|
|
66
66
|
*
|
|
67
|
+
* The tenant's GPS requirements are read from the client before each generation.
|
|
68
|
+
* The client reuses a fetched copy for a short period, so this does not add a
|
|
69
|
+
* request per event, and a requirement changed in the compliance console takes
|
|
70
|
+
* effect without reloading the page. Call `refreshConfig` to apply a change
|
|
71
|
+
* immediately.
|
|
72
|
+
*
|
|
67
73
|
* @example
|
|
68
74
|
* ```tsx
|
|
69
75
|
* function LoginForm() {
|
|
@@ -80,6 +86,7 @@ declare function createDeviceFingerprint(): DeviceFingerprintRequest;
|
|
|
80
86
|
*/
|
|
81
87
|
declare function useCipherText(client?: GeolocationClient): {
|
|
82
88
|
generate: (options: CipherTextOptions) => Promise<CipherTextResult | null>;
|
|
89
|
+
refreshConfig: () => Promise<void>;
|
|
83
90
|
configLoading: boolean;
|
|
84
91
|
configError: Error | null;
|
|
85
92
|
};
|
|
@@ -214,7 +221,13 @@ interface UseCustomerProfileResult {
|
|
|
214
221
|
loading: boolean;
|
|
215
222
|
error: Error | null;
|
|
216
223
|
fetchProfile: () => Promise<CustomerProfile>;
|
|
217
|
-
|
|
224
|
+
/**
|
|
225
|
+
* Update the loaded profile. Resolves to the updated profile, or to a
|
|
226
|
+
* `ProfileUpdateHeldResponse` when the tenant holds a name / date of birth /
|
|
227
|
+
* address change behind KYC — narrow with `isProfileUpdateHeld`. The hook's
|
|
228
|
+
* `profile` state is updated either way (with the profile as stored).
|
|
229
|
+
*/
|
|
230
|
+
updateProfile: (updates: Partial<CustomerProfile>) => Promise<UpdateProfileResult>;
|
|
218
231
|
refresh: () => Promise<CustomerProfile>;
|
|
219
232
|
}
|
|
220
233
|
/**
|
|
@@ -293,45 +306,6 @@ declare function useCustomerProfile(client: RiskProfileClient, customerId: strin
|
|
|
293
306
|
* ```
|
|
294
307
|
*/
|
|
295
308
|
declare function useKycSubmission(client: KycClient, options?: UseKycSubmissionOptions): UseKycSubmissionResult;
|
|
296
|
-
/**
|
|
297
|
-
* React hook for managing KYC requests
|
|
298
|
-
*
|
|
299
|
-
* @param client - KycClient instance
|
|
300
|
-
* @param options - Hook options
|
|
301
|
-
* @returns KYC requests state and management methods
|
|
302
|
-
*
|
|
303
|
-
* @example
|
|
304
|
-
* ```tsx
|
|
305
|
-
* function KycDashboard() {
|
|
306
|
-
* const {
|
|
307
|
-
* requests,
|
|
308
|
-
* total,
|
|
309
|
-
* loading,
|
|
310
|
-
* fetchRequests,
|
|
311
|
-
* updateStatus
|
|
312
|
-
* } = useKycRequests(client, {
|
|
313
|
-
* autoFetch: true,
|
|
314
|
-
* filters: { status: "pending" },
|
|
315
|
-
* pagination: { page: 1, page_size: 20 }
|
|
316
|
-
* });
|
|
317
|
-
*
|
|
318
|
-
* return (
|
|
319
|
-
* <div>
|
|
320
|
-
* <h2>{total} Pending KYC Requests</h2>
|
|
321
|
-
* {requests.map(req => (
|
|
322
|
-
* <KycCard
|
|
323
|
-
* key={req.id}
|
|
324
|
-
* request={req}
|
|
325
|
-
* onApprove={() => updateStatus(req.reference, "accepted", "Verified")}
|
|
326
|
-
* onReject={() => updateStatus(req.reference, "declined", "Invalid document")}
|
|
327
|
-
* />
|
|
328
|
-
* ))}
|
|
329
|
-
* </div>
|
|
330
|
-
* );
|
|
331
|
-
* }
|
|
332
|
-
* ```
|
|
333
|
-
*/
|
|
334
|
-
declare function useKycRequests(client: KycClient, options?: UseKycRequestsOptions): UseKycRequestsResult;
|
|
335
309
|
/**
|
|
336
310
|
* React hook for managing KYC alerts
|
|
337
311
|
*
|
|
@@ -346,8 +320,7 @@ declare function useKycRequests(client: KycClient, options?: UseKycRequestsOptio
|
|
|
346
320
|
* alerts,
|
|
347
321
|
* total,
|
|
348
322
|
* loading,
|
|
349
|
-
* fetchAlerts
|
|
350
|
-
* updateAlert
|
|
323
|
+
* fetchAlerts
|
|
351
324
|
* } = useKycAlerts(client, {
|
|
352
325
|
* autoFetch: true,
|
|
353
326
|
* filters: { status: ["pending", "in_progress"], risk: "critical" },
|
|
@@ -358,81 +331,17 @@ declare function useKycRequests(client: KycClient, options?: UseKycRequestsOptio
|
|
|
358
331
|
* <div>
|
|
359
332
|
* <h2>{total} Critical Alerts</h2>
|
|
360
333
|
* {alerts.map(alert => (
|
|
361
|
-
* <AlertCard
|
|
362
|
-
* key={alert.id}
|
|
363
|
-
* alert={alert}
|
|
364
|
-
* onAssign={(userId) => updateAlert(alert.id, { assigned_for: userId, status: "in_progress" })}
|
|
365
|
-
* onResolve={() => updateAlert(alert.id, { status: "resolved", reason: "Verified" })}
|
|
366
|
-
* />
|
|
334
|
+
* <AlertCard key={alert.id} alert={alert} />
|
|
367
335
|
* ))}
|
|
368
336
|
* </div>
|
|
369
337
|
* );
|
|
370
338
|
* }
|
|
371
339
|
* ```
|
|
372
|
-
*/
|
|
373
|
-
declare function useKycAlerts(client: KycClient, options?: UseKycAlertsOptions): UseKycAlertsResult;
|
|
374
|
-
/**
|
|
375
|
-
* React hook for KYC overview statistics
|
|
376
340
|
*
|
|
377
|
-
* @
|
|
378
|
-
*
|
|
379
|
-
* @returns KYC overview state
|
|
380
|
-
*
|
|
381
|
-
* @example
|
|
382
|
-
* ```tsx
|
|
383
|
-
* function KycStats() {
|
|
384
|
-
* const { overview, loading, refresh } = useKycOverview(client, {
|
|
385
|
-
* autoFetch: true,
|
|
386
|
-
* fromDate: "2024-01-01T00:00:00Z",
|
|
387
|
-
* toDate: "2024-12-31T23:59:59Z"
|
|
388
|
-
* });
|
|
389
|
-
*
|
|
390
|
-
* if (loading) return <Spinner />;
|
|
391
|
-
*
|
|
392
|
-
* return (
|
|
393
|
-
* <div>
|
|
394
|
-
* <StatCard label="Total" value={overview?.total} />
|
|
395
|
-
* <StatCard label="Pending" value={overview?.pending} />
|
|
396
|
-
* <StatCard label="Approved" value={overview?.approved} />
|
|
397
|
-
* <StatCard label="Rejected" value={overview?.rejected} />
|
|
398
|
-
* <StatCard label="High Risk" value={overview?.high_risk} />
|
|
399
|
-
* </div>
|
|
400
|
-
* );
|
|
401
|
-
* }
|
|
402
|
-
* ```
|
|
403
|
-
*/
|
|
404
|
-
declare function useKycOverview(client: KycClient, options?: UseKycOverviewOptions): UseKycOverviewResult;
|
|
405
|
-
/**
|
|
406
|
-
* React hook for reading KYC preferences
|
|
407
|
-
*
|
|
408
|
-
* Preferences are managed in the Vesant console. The returned
|
|
409
|
-
* `updatePreferences` is deprecated: the platform exposes no update
|
|
410
|
-
* operation, so it always fails.
|
|
411
|
-
*
|
|
412
|
-
* @param client - KycClient instance
|
|
413
|
-
* @param autoFetch - Auto-fetch preferences on mount (default: true)
|
|
414
|
-
* @returns KYC preferences state and methods
|
|
415
|
-
*
|
|
416
|
-
* @example
|
|
417
|
-
* ```tsx
|
|
418
|
-
* function PreferencesSummary() {
|
|
419
|
-
* const { preferences, loading, refresh } = useKycPreferences(client);
|
|
420
|
-
*
|
|
421
|
-
* if (loading) return <Spinner />;
|
|
422
|
-
*
|
|
423
|
-
* return (
|
|
424
|
-
* <dl>
|
|
425
|
-
* <dt>Face verification required</dt>
|
|
426
|
-
* <dd>{String(preferences?.is_face_verification_required)}</dd>
|
|
427
|
-
* <dt>Required documents</dt>
|
|
428
|
-
* <dd>{preferences?.required_document_count}</dd>
|
|
429
|
-
* <button onClick={refresh}>Refresh</button>
|
|
430
|
-
* </dl>
|
|
431
|
-
* );
|
|
432
|
-
* }
|
|
433
|
-
* ```
|
|
341
|
+
* @remarks Console session only: the alert endpoints need a dashboard login
|
|
342
|
+
* token and fail with a tenant API key.
|
|
434
343
|
*/
|
|
435
|
-
declare function
|
|
344
|
+
declare function useKycAlerts(client: KycClient, options?: UseKycAlertsOptions): UseKycAlertsResult;
|
|
436
345
|
/**
|
|
437
346
|
* Convert a File to base64 string for document upload
|
|
438
347
|
*
|
|
@@ -625,4 +534,4 @@ interface FaceCaptureModalProps {
|
|
|
625
534
|
}
|
|
626
535
|
declare function FaceCaptureModal({ client, session, onComplete, onCancel, defaultDevice, renderQR, mediapipeAssetBasePath, }: Readonly<FaceCaptureModalProps>): React$1.ReactElement;
|
|
627
536
|
|
|
628
|
-
export { FaceCaptureModal, type FaceCaptureModalProps, type RunFlowResult, type UseCustomerProfileOptions, type UseCustomerProfileResult, UseGeolocationOptions, UseGeolocationResult, UseKycAlertsOptions, UseKycAlertsResult,
|
|
537
|
+
export { FaceCaptureModal, type FaceCaptureModalProps, type RunFlowResult, type UseCustomerProfileOptions, type UseCustomerProfileResult, UseGeolocationOptions, UseGeolocationResult, UseKycAlertsOptions, UseKycAlertsResult, UseKycSubmissionOptions, UseKycSubmissionResult, UseLocationCaptureOptions, UseLocationCaptureResult, UseLocationRequestsOptions, UseLocationRequestsResult, type UseLoginVerificationOptions, type UseLoginVerificationResult, type UseRegistrationOptions, type UseRegistrationResult, type UseTransactionVerificationOptions, type UseTransactionVerificationResult, type VerifyFaceOptions, buildEventBasedFaceVerificationQrPayload, createDeviceFingerprint, fileToBase64, formatKycStatus, getBrowserInfo, getRiskColor, getStatusColor, isMobileDevice, isValidFileSize, isValidFileType, useCipherText, useCustomerProfile, useEventBasedFaceVerificationSubmission, useGeolocation, useKycAlerts, useKycSubmission, useLocationCapture, useLocationRequests, useLoginVerification, useRegistration, useTransactionVerification };
|