vesant-sdk 1.8.0-dev.9f7204d → 1.8.0-dev.a131627
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 +1 -3
- package/dist/{client-4oLoc31v.d.ts → client-BPALLldd.d.ts} +1 -1
- package/dist/{client-CJI8VO1i.d.mts → client-_OhkfnyJ.d.mts} +1 -1
- package/dist/compliance/index.d.mts +2 -2
- package/dist/compliance/index.d.ts +2 -2
- package/dist/compliance/index.js +7 -6
- package/dist/compliance/index.js.map +1 -1
- package/dist/compliance/index.mjs +7 -6
- package/dist/compliance/index.mjs.map +1 -1
- package/dist/decisions/index.js +7 -6
- package/dist/decisions/index.js.map +1 -1
- package/dist/decisions/index.mjs +7 -6
- package/dist/decisions/index.mjs.map +1 -1
- package/dist/geolocation/index.js +7 -6
- package/dist/geolocation/index.js.map +1 -1
- package/dist/geolocation/index.mjs +7 -6
- package/dist/geolocation/index.mjs.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +14 -182
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -183
- 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 +14 -182
- package/dist/kyc/core.js.map +1 -1
- package/dist/kyc/core.mjs +14 -183
- package/dist/kyc/core.mjs.map +1 -1
- package/dist/kyc/index.d.mts +92 -236
- package/dist/kyc/index.d.ts +92 -236
- package/dist/kyc/index.js +14 -182
- package/dist/kyc/index.js.map +1 -1
- package/dist/kyc/index.mjs +14 -183
- package/dist/kyc/index.mjs.map +1 -1
- package/dist/react.d.mts +6 -122
- package/dist/react.d.ts +6 -122
- package/dist/react.js +0 -185
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +1 -183
- package/dist/react.mjs.map +1 -1
- package/dist/risk-profile/index.d.mts +2 -2
- package/dist/risk-profile/index.d.ts +2 -2
- package/dist/risk-profile/index.js +7 -6
- package/dist/risk-profile/index.js.map +1 -1
- package/dist/risk-profile/index.mjs +7 -6
- package/dist/risk-profile/index.mjs.map +1 -1
- package/dist/scores/index.js +7 -6
- package/dist/scores/index.js.map +1 -1
- package/dist/scores/index.mjs +7 -6
- 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 +7 -6
- package/dist/tax/index.js.map +1 -1
- package/dist/tax/index.mjs +7 -6
- package/dist/tax/index.mjs.map +1 -1
- package/dist/{types-DfbnIaW_.d.mts → types-DbvVph_0.d.mts} +1 -1
- package/dist/{types-1kI4SsKB.d.ts → types-qXamJr2q.d.ts} +1 -1
- package/package.json +1 -1
package/dist/kyc/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as CustomerProfile, P as ProfileFilters, b as ProfileListResponse, a as CreateProfileRequest } from '../types-DbvVph_0.mjs';
|
|
2
2
|
import { c as Reason, R as RiskLevel, P as PaginationParams } from '../types-CBQRNL-l.mjs';
|
|
3
3
|
import { B as BaseClient, R as RequestOptions } from '../client-q9fN8Hhf.mjs';
|
|
4
4
|
|
|
@@ -15,7 +15,7 @@ type KycStatus =
|
|
|
15
15
|
/** Submit link issued but the customer has not submitted documents yet — not "in progress". */
|
|
16
16
|
'awaiting_kyc'
|
|
17
17
|
/** Documents submitted, verification in progress. */
|
|
18
|
-
| 'pending' | 'accepted' | 'declined' | 'review.pending'
|
|
18
|
+
| 'pending' | 'accepted' | 'declined' | 'review.pending';
|
|
19
19
|
type KycDeclinedCode = 'KYC_DOCUMENT_EXPIRED' | 'KYC_DOCUMENT_INVALID' | 'KYC_FACE_MISMATCH' | 'KYC_AGE_REQUIREMENT' | 'KYC_DUPLICATE_IDENTITY' | 'KYC_ADDRESS_MISMATCH' | 'KYC_NAME_MISMATCH' | 'KYC_PROVIDER_REJECTED' | 'KYC_DECLINED';
|
|
20
20
|
declare const KYC_DECLINED_DESCRIPTIONS: Record<KycDeclinedCode, string>;
|
|
21
21
|
type KycAlertStatus = 'pending' | 'in_progress' | 'resolved' | 'closed' | 'escalated';
|
|
@@ -111,7 +111,8 @@ interface KycRequest {
|
|
|
111
111
|
block_reason?: string;
|
|
112
112
|
proofs?: Proof[];
|
|
113
113
|
alerts?: KycAlert[];
|
|
114
|
-
|
|
114
|
+
/** The customer's risk profile (`risk_category`, `risk_score`, `kyc_status`, ...). */
|
|
115
|
+
risk_profile?: CustomerProfile;
|
|
115
116
|
created_at: string;
|
|
116
117
|
updated_at: string;
|
|
117
118
|
}
|
|
@@ -136,21 +137,17 @@ interface ProofDownloadURL {
|
|
|
136
137
|
/** Not sent by the platform; the link itself is short-lived. */
|
|
137
138
|
expires_at?: string;
|
|
138
139
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
sanctions_status?: boolean;
|
|
151
|
-
created_at: string;
|
|
152
|
-
updated_at: string;
|
|
153
|
-
}
|
|
140
|
+
/**
|
|
141
|
+
* The customer's risk profile as embedded on a KYC record
|
|
142
|
+
* (`additional_data.risk_profile`). The platform preloads the full
|
|
143
|
+
* `customer_profiles` row, so this is the same shape as
|
|
144
|
+
* {@link CustomerProfile}: read `risk_category` / `risk_score`, `kyc_status`,
|
|
145
|
+
* `is_pep`, `has_sanctions`. There is no `risk_level` field on the wire.
|
|
146
|
+
*
|
|
147
|
+
* @deprecated Use {@link CustomerProfile}; this alias is kept for existing
|
|
148
|
+
* imports and will be removed in a future major.
|
|
149
|
+
*/
|
|
150
|
+
type KycCustomerProfile = CustomerProfile;
|
|
154
151
|
interface KycAlert {
|
|
155
152
|
id: string;
|
|
156
153
|
kyc_id: string;
|
|
@@ -180,12 +177,6 @@ interface KycAlertListResponse {
|
|
|
180
177
|
alerts: KycAlert[];
|
|
181
178
|
pagination: KycPagination;
|
|
182
179
|
}
|
|
183
|
-
interface UpdateKycAlertRequest {
|
|
184
|
-
assigned_for?: string;
|
|
185
|
-
reason?: string;
|
|
186
|
-
alert_type?: KycAlertType;
|
|
187
|
-
status?: KycAlertStatus;
|
|
188
|
-
}
|
|
189
180
|
/**
|
|
190
181
|
* Threshold-gated trigger for transaction events. Each rule is
|
|
191
182
|
* self-contained — there is no umbrella flag.
|
|
@@ -269,6 +260,16 @@ interface KycVerificationTriggers {
|
|
|
269
260
|
first_purchase: boolean;
|
|
270
261
|
/** Re-trigger verification once the customer's identity document has expired. */
|
|
271
262
|
auto_trigger_on_id_expiration: boolean;
|
|
263
|
+
/**
|
|
264
|
+
* Manual KYC Verification: whether customers may start a verification
|
|
265
|
+
* themselves (`trigger_event: "manual"`), independent of the event
|
|
266
|
+
* triggers and of their status. On by default. When on, a `manual`
|
|
267
|
+
* request always returns a link — an already verified customer included.
|
|
268
|
+
* When off, it answers `kyc_required: false` with reason
|
|
269
|
+
* `KYC_NOT_REQUIRED_TRIGGER_DISABLED`; hide your Verification option in
|
|
270
|
+
* that case.
|
|
271
|
+
*/
|
|
272
|
+
manual: boolean;
|
|
272
273
|
/** Hold sensitive profile changes (name, DOB, address) behind KYC. */
|
|
273
274
|
account_sensitive_action?: AccountSensitiveActionTrigger;
|
|
274
275
|
}
|
|
@@ -426,20 +427,11 @@ interface DocumentVerificationResponse {
|
|
|
426
427
|
verification_url?: string;
|
|
427
428
|
message?: string;
|
|
428
429
|
}
|
|
429
|
-
interface UpdateKycStatusRequest {
|
|
430
|
-
/** Provider reference or KYC ID */
|
|
431
|
-
reference: string;
|
|
432
|
-
/** Target status */
|
|
433
|
-
status: KycStatus;
|
|
434
|
-
/** Acceptance/decline reason */
|
|
435
|
-
reason?: string;
|
|
436
|
-
/** Provider warnings data */
|
|
437
|
-
warnings?: Record<string, Record<string, string>>;
|
|
438
|
-
}
|
|
439
430
|
/**
|
|
440
431
|
* Events that can trigger a KYC request. Each maps to a per-event toggle in
|
|
441
|
-
* the tenant's KYC verification trigger preferences
|
|
442
|
-
*
|
|
432
|
+
* the tenant's KYC verification trigger preferences (`manual` to the Manual
|
|
433
|
+
* KYC Verification toggle), except `login` (only for an expired identity
|
|
434
|
+
* document).
|
|
443
435
|
*/
|
|
444
436
|
type KycTriggerEvent = 'onboarding' | 'first_withdrawal' | 'first_purchase'
|
|
445
437
|
/** Aliases of `first_withdrawal` / `first_purchase` — same tenant toggles. */
|
|
@@ -501,8 +493,12 @@ interface RequestKycSubmitLinkRequest {
|
|
|
501
493
|
/**
|
|
502
494
|
* Event that triggered the KYC request. The tenant's KYC verification
|
|
503
495
|
* trigger preferences decide, per event, whether KYC is required
|
|
504
|
-
* (`kyc_required` in the response). "manual"
|
|
505
|
-
*
|
|
496
|
+
* (`kyc_required` in the response). "manual" — the customer starting
|
|
497
|
+
* verification themselves — is governed by the tenant's Manual KYC
|
|
498
|
+
* Verification toggle (on by default): when on it always returns a link,
|
|
499
|
+
* even for an already verified customer, and honors the
|
|
500
|
+
* allow-skip-on-manual option (`can_skip`); when off it answers
|
|
501
|
+
* `kyc_required: false` with `KYC_NOT_REQUIRED_TRIGGER_DISABLED`. "login"
|
|
506
502
|
* answers for any customer state — never verified (asked, not skippable),
|
|
507
503
|
* document expired (asked, skippable so you can offer "Remind me later"),
|
|
508
504
|
* or verified and valid (not asked) — so a platform that gates entry on KYC
|
|
@@ -627,7 +623,8 @@ interface RequestKycSubmitLinkResponse {
|
|
|
627
623
|
* Whether the user may skip verification. `true` for
|
|
628
624
|
* `trigger_event: "manual"` when the tenant enables allow-skip-on-manual,
|
|
629
625
|
* for `"login"` when an expired identity document triggered the request
|
|
630
|
-
* (offer "Remind me later"), and when the customer is already verified
|
|
626
|
+
* (offer "Remind me later"), and when the customer is already verified
|
|
627
|
+
* (except on `"manual"`, which always issues a link while enabled).
|
|
631
628
|
* Always `false` at `"withdrawal"` / `"purchase"` — that is where a
|
|
632
629
|
* postponed re-verification becomes mandatory.
|
|
633
630
|
*/
|
|
@@ -648,9 +645,9 @@ interface RequestKycSubmitLinkResponse {
|
|
|
648
645
|
* is the only signal for it — nothing the customer does triggers it. Delivered
|
|
649
646
|
* once per customer, when the document first becomes expired.
|
|
650
647
|
*
|
|
651
|
-
* It is sent
|
|
652
|
-
*
|
|
653
|
-
*
|
|
648
|
+
* It is sent only while the tenant's auto-trigger-on-ID-expiration setting is
|
|
649
|
+
* enabled; with the setting off the document is still flagged as expired, but
|
|
650
|
+
* no webhook is sent.
|
|
654
651
|
*/
|
|
655
652
|
interface KycDocumentExpiredCallbackEvent {
|
|
656
653
|
/** Always `"kyc_document_expired"` — dispatch on this. */
|
|
@@ -692,10 +689,49 @@ interface KycCallbackReactions {
|
|
|
692
689
|
trigger_alert: boolean;
|
|
693
690
|
block: boolean;
|
|
694
691
|
freeze_account: boolean;
|
|
695
|
-
/** Set when `freeze_account` is true: the tenant
|
|
692
|
+
/** Set when `freeze_account` is true: the freeze window the tenant set for the rules that fired. */
|
|
696
693
|
freeze_duration_minutes?: number;
|
|
697
694
|
enforce_logout: boolean;
|
|
698
695
|
}
|
|
696
|
+
/**
|
|
697
|
+
* Body POSTed to your KYC `callback_url` whenever a document verification
|
|
698
|
+
* reaches an outcome (`accepted`, `declined`, `review.pending`). This is a flat
|
|
699
|
+
* callback, not a platform event envelope: there is no `event_type`, `id` or
|
|
700
|
+
* `timestamp`, so it cannot go through `WebhookHandler`. Verify it with
|
|
701
|
+
* `verifyWebhookSignature`, narrow it with {@link isKycStatusCallbackEvent},
|
|
702
|
+
* and deduplicate on `resource_id` + `status` yourself.
|
|
703
|
+
*/
|
|
704
|
+
interface KycStatusCallbackEvent {
|
|
705
|
+
/** Always `"kyc"` — dispatch on this. */
|
|
706
|
+
event: 'kyc';
|
|
707
|
+
/** The verification reference (your customer identifier). */
|
|
708
|
+
reference: string;
|
|
709
|
+
/** Vesant KYC record ID (`kyc_id`). */
|
|
710
|
+
resource_id: string;
|
|
711
|
+
/** Verification outcome. `awaiting_kyc` / `pending` are never sent. */
|
|
712
|
+
status: 'accepted' | 'declined' | 'review.pending';
|
|
713
|
+
/**
|
|
714
|
+
* `true` when your app should block the triggering action. Set when a
|
|
715
|
+
* failed verification matched a per-event alert rule with the `block`
|
|
716
|
+
* reaction. Sticky once set on the record. Omitted when `false`.
|
|
717
|
+
*/
|
|
718
|
+
block?: boolean;
|
|
719
|
+
/** The event that triggered the block; omitted when not blocked. */
|
|
720
|
+
block_reason?: string;
|
|
721
|
+
/** Comma-joined decline text; the structured list is `data.declined_reasons`. */
|
|
722
|
+
declined_reason?: string;
|
|
723
|
+
/** @deprecated Legacy category → message map; use `data.warning_reasons`. */
|
|
724
|
+
warnings?: Record<string, Record<string, string>>;
|
|
725
|
+
/** Present only when a rule with reactions matched (On Account Sensitive Action). */
|
|
726
|
+
reactions?: KycCallbackReactions;
|
|
727
|
+
/** The full KYC record, with `risk_profile` and proof download links. */
|
|
728
|
+
data: KycRequest;
|
|
729
|
+
}
|
|
730
|
+
/**
|
|
731
|
+
* Type guard for the KYC status callback. Narrows an already
|
|
732
|
+
* signature-verified, parsed payload to {@link KycStatusCallbackEvent}.
|
|
733
|
+
*/
|
|
734
|
+
declare function isKycStatusCallbackEvent(value: unknown): value is KycStatusCallbackEvent;
|
|
699
735
|
/**
|
|
700
736
|
* Body POSTed to your `callback_url` when a held sensitive profile change is
|
|
701
737
|
* settled. Signed with `X-Webhook-Signature: sha256=<hex>` (HMAC-SHA256 of the
|
|
@@ -803,7 +839,11 @@ interface EventBasedFaceVerificationReactionResult {
|
|
|
803
839
|
/** Tenant app should block the action/account when true. */
|
|
804
840
|
block: boolean;
|
|
805
841
|
freeze_duration_minutes: number;
|
|
806
|
-
/**
|
|
842
|
+
/**
|
|
843
|
+
* Reserved. The dashboard alert is raised after the submit response and
|
|
844
|
+
* the webhook have been built, so neither carries the alert id today;
|
|
845
|
+
* read it from `listAlerts()` / the console instead.
|
|
846
|
+
*/
|
|
807
847
|
alert_id?: string;
|
|
808
848
|
}
|
|
809
849
|
/**
|
|
@@ -817,12 +857,12 @@ interface EventBasedFaceVerificationCallback {
|
|
|
817
857
|
resource_id: string;
|
|
818
858
|
status: KycStatus;
|
|
819
859
|
/**
|
|
820
|
-
*
|
|
821
|
-
*
|
|
822
|
-
*
|
|
860
|
+
* Reserved and not populated on face verification callbacks: the block
|
|
861
|
+
* decision is `data.block`. Only the document-KYC `kyc` callback sets a
|
|
862
|
+
* top-level `block`.
|
|
823
863
|
*/
|
|
824
864
|
block?: boolean;
|
|
825
|
-
/**
|
|
865
|
+
/** Reserved and not populated; see `data.block`. */
|
|
826
866
|
block_reason?: string;
|
|
827
867
|
/**
|
|
828
868
|
* Structured decline reasons. Returned by
|
|
@@ -928,38 +968,12 @@ interface RequestAdditionalDocumentsRequest {
|
|
|
928
968
|
/** Message to customer */
|
|
929
969
|
message?: string;
|
|
930
970
|
}
|
|
931
|
-
interface KycOverview {
|
|
932
|
-
total: number;
|
|
933
|
-
pending: number;
|
|
934
|
-
approved: number;
|
|
935
|
-
high_risk: number;
|
|
936
|
-
rejected: number;
|
|
937
|
-
id_verified: number;
|
|
938
|
-
address_verified: number;
|
|
939
|
-
face_verified: number;
|
|
940
|
-
rejections: number;
|
|
941
|
-
total_alerts: number;
|
|
942
|
-
pending_alerts: number;
|
|
943
|
-
resolved_alerts: number;
|
|
944
|
-
}
|
|
945
|
-
interface KycRequestFilters {
|
|
946
|
-
status?: KycStatus | KycStatus[];
|
|
947
|
-
search?: string;
|
|
948
|
-
fromDate?: string;
|
|
949
|
-
toDate?: string;
|
|
950
|
-
sortBy?: string;
|
|
951
|
-
order?: 'ASC' | 'DESC';
|
|
952
|
-
}
|
|
953
971
|
interface KycPagination {
|
|
954
972
|
limit: number;
|
|
955
973
|
page: number;
|
|
956
974
|
total: number;
|
|
957
975
|
totalPages: number;
|
|
958
976
|
}
|
|
959
|
-
interface KycRequestListResponse {
|
|
960
|
-
data: KycRequest[];
|
|
961
|
-
pagination: KycPagination;
|
|
962
|
-
}
|
|
963
977
|
|
|
964
978
|
interface KycClientConfig {
|
|
965
979
|
/** Base URL of the KYC Service API (e.g., "http://localhost:8088") */
|
|
@@ -1008,36 +1022,11 @@ interface UseKycSubmissionResult extends BaseHookState {
|
|
|
1008
1022
|
submission: DocumentVerificationResponse | null;
|
|
1009
1023
|
reset: () => void;
|
|
1010
1024
|
}
|
|
1011
|
-
type UseKycRequestsOptions = BaseListOptions<KycRequestFilters>;
|
|
1012
|
-
interface UseKycRequestsResult extends BaseHookState {
|
|
1013
|
-
requests: KycRequest[];
|
|
1014
|
-
pagination: KycPagination | null;
|
|
1015
|
-
fetchRequests: (filters?: KycRequestFilters, pagination?: PaginationParams) => Promise<void>;
|
|
1016
|
-
getRequest: (id: string) => Promise<KycRequest>;
|
|
1017
|
-
updateStatus: (reference: string, status: KycStatus, reason?: string) => Promise<void>;
|
|
1018
|
-
refresh: () => Promise<void>;
|
|
1019
|
-
}
|
|
1020
1025
|
type UseKycAlertsOptions = BaseListOptions<KycAlertFilters>;
|
|
1021
1026
|
interface UseKycAlertsResult extends BaseHookState {
|
|
1022
1027
|
alerts: KycAlert[];
|
|
1023
1028
|
pagination: KycPagination | null;
|
|
1024
1029
|
fetchAlerts: (filters?: KycAlertFilters, pagination?: PaginationParams) => Promise<void>;
|
|
1025
|
-
getAlert: (id: string) => Promise<KycAlert>;
|
|
1026
|
-
updateAlert: (id: string, update: UpdateKycAlertRequest) => Promise<void>;
|
|
1027
|
-
refresh: () => Promise<void>;
|
|
1028
|
-
}
|
|
1029
|
-
interface UseKycOverviewOptions extends BaseAutoFetchOptions {
|
|
1030
|
-
fromDate?: string;
|
|
1031
|
-
toDate?: string;
|
|
1032
|
-
}
|
|
1033
|
-
interface UseKycOverviewResult extends BaseHookState {
|
|
1034
|
-
overview: KycOverview | null;
|
|
1035
|
-
refresh: (fromDate?: string, toDate?: string) => Promise<void>;
|
|
1036
|
-
}
|
|
1037
|
-
interface UseKycPreferencesResult extends BaseHookState {
|
|
1038
|
-
preferences: KycPreferences | null;
|
|
1039
|
-
/** @deprecated The platform exposes no preference-update operation; this call always fails. */
|
|
1040
|
-
updatePreferences: (update: UpdateKycPreferencesRequest) => Promise<void>;
|
|
1041
1030
|
refresh: () => Promise<void>;
|
|
1042
1031
|
}
|
|
1043
1032
|
|
|
@@ -1269,54 +1258,6 @@ declare class KycClient extends BaseClient {
|
|
|
1269
1258
|
* ```
|
|
1270
1259
|
*/
|
|
1271
1260
|
getKycRequest(id: string): Promise<KycRequest>;
|
|
1272
|
-
/**
|
|
1273
|
-
* List KYC requests with filters and pagination
|
|
1274
|
-
*
|
|
1275
|
-
* @param filters - Optional filters (status, search, date range)
|
|
1276
|
-
* @param pagination - Optional pagination (page, page_size)
|
|
1277
|
-
* @returns Paginated list of KYC requests
|
|
1278
|
-
*
|
|
1279
|
-
* @example
|
|
1280
|
-
* ```typescript
|
|
1281
|
-
* const requests = await client.listKycRequests(
|
|
1282
|
-
* { status: "pending", search: "john" },
|
|
1283
|
-
* { page: 1, page_size: 20 }
|
|
1284
|
-
* );
|
|
1285
|
-
* console.log(`Found ${requests.total} pending requests`);
|
|
1286
|
-
* ```
|
|
1287
|
-
*
|
|
1288
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
1289
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
1290
|
-
* fails with `AuthenticationError` or a permission error.
|
|
1291
|
-
*/
|
|
1292
|
-
listKycRequests(filters?: KycRequestFilters, pagination?: PaginationParams): Promise<KycRequestListResponse>;
|
|
1293
|
-
/**
|
|
1294
|
-
* Update KYC request status (accept/decline)
|
|
1295
|
-
*
|
|
1296
|
-
* @param request - Status update request with reference, status, and reason
|
|
1297
|
-
*
|
|
1298
|
-
* @example
|
|
1299
|
-
* ```typescript
|
|
1300
|
-
* // Accept a KYC request
|
|
1301
|
-
* await client.updateKycStatus({
|
|
1302
|
-
* reference: "kyc-ref-123",
|
|
1303
|
-
* status: "accepted",
|
|
1304
|
-
* reason: "All documents verified successfully"
|
|
1305
|
-
* });
|
|
1306
|
-
*
|
|
1307
|
-
* // Decline a KYC request
|
|
1308
|
-
* await client.updateKycStatus({
|
|
1309
|
-
* reference: "kyc-ref-456",
|
|
1310
|
-
* status: "declined",
|
|
1311
|
-
* reason: "Document expired"
|
|
1312
|
-
* });
|
|
1313
|
-
* ```
|
|
1314
|
-
*
|
|
1315
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
1316
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
1317
|
-
* fails with `AuthenticationError` or a permission error.
|
|
1318
|
-
*/
|
|
1319
|
-
updateKycStatus(request: UpdateKycStatusRequest): Promise<void>;
|
|
1320
1261
|
/**
|
|
1321
1262
|
* Request additional documents from customer
|
|
1322
1263
|
*
|
|
@@ -1355,39 +1296,6 @@ declare class KycClient extends BaseClient {
|
|
|
1355
1296
|
* ```
|
|
1356
1297
|
*/
|
|
1357
1298
|
getProofDownloadURLs(kycId: string): Promise<ProofDownloadURL[]>;
|
|
1358
|
-
/**
|
|
1359
|
-
* Get KYC overview statistics
|
|
1360
|
-
*
|
|
1361
|
-
* @param fromDate - Optional start date (ISO 8601)
|
|
1362
|
-
* @param toDate - Optional end date (ISO 8601)
|
|
1363
|
-
* @returns KYC statistics including counts by status
|
|
1364
|
-
*
|
|
1365
|
-
* @example
|
|
1366
|
-
* ```typescript
|
|
1367
|
-
* const overview = await client.getOverview(
|
|
1368
|
-
* "2024-01-01T00:00:00Z",
|
|
1369
|
-
* "2024-12-31T23:59:59Z"
|
|
1370
|
-
* );
|
|
1371
|
-
* console.log(`Total: ${overview.total}, Pending: ${overview.pending}`);
|
|
1372
|
-
* console.log(`Approved: ${overview.approved}, Rejected: ${overview.rejected}`);
|
|
1373
|
-
* ```
|
|
1374
|
-
*
|
|
1375
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
1376
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
1377
|
-
* fails with `AuthenticationError` or a permission error.
|
|
1378
|
-
*/
|
|
1379
|
-
getOverview(fromDate?: string, toDate?: string): Promise<KycOverview>;
|
|
1380
|
-
/**
|
|
1381
|
-
* Get a KYC alert by ID
|
|
1382
|
-
*
|
|
1383
|
-
* @param alertId - Alert ID
|
|
1384
|
-
* @returns Alert details
|
|
1385
|
-
*
|
|
1386
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
1387
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
1388
|
-
* fails with `AuthenticationError` or a permission error.
|
|
1389
|
-
*/
|
|
1390
|
-
getAlert(alertId: string): Promise<KycAlert>;
|
|
1391
1299
|
/**
|
|
1392
1300
|
* List KYC alerts with filters and pagination
|
|
1393
1301
|
*
|
|
@@ -1408,68 +1316,16 @@ declare class KycClient extends BaseClient {
|
|
|
1408
1316
|
* console.log(`Found ${alerts.total} alerts`);
|
|
1409
1317
|
* ```
|
|
1410
1318
|
*
|
|
1411
|
-
* @remarks
|
|
1412
|
-
*
|
|
1413
|
-
* fails with `AuthenticationError` or a permission error.
|
|
1319
|
+
* @remarks Works with a tenant API key and returns the alerts raised for
|
|
1320
|
+
* your tenant's customers.
|
|
1414
1321
|
*/
|
|
1415
1322
|
listAlerts(filters?: KycAlertFilters, pagination?: PaginationParams): Promise<KycAlertListResponse>;
|
|
1416
|
-
/**
|
|
1417
|
-
* Update a KYC alert
|
|
1418
|
-
*
|
|
1419
|
-
* @param alertId - Alert ID
|
|
1420
|
-
* @param update - Fields to update (status, assigned_for, reason, alert_type)
|
|
1421
|
-
*
|
|
1422
|
-
* @example
|
|
1423
|
-
* ```typescript
|
|
1424
|
-
* // Assign an alert
|
|
1425
|
-
* await client.updateAlert("alert_123", {
|
|
1426
|
-
* assigned_for: "analyst_user_id",
|
|
1427
|
-
* status: "in_progress"
|
|
1428
|
-
* });
|
|
1429
|
-
*
|
|
1430
|
-
* // Resolve an alert
|
|
1431
|
-
* await client.updateAlert("alert_123", {
|
|
1432
|
-
* status: "resolved",
|
|
1433
|
-
* reason: "Customer verified via phone call"
|
|
1434
|
-
* });
|
|
1435
|
-
*
|
|
1436
|
-
* // Escalate an alert
|
|
1437
|
-
* await client.updateAlert("alert_123", {
|
|
1438
|
-
* status: "escalated",
|
|
1439
|
-
* assigned_for: "manager_user_id",
|
|
1440
|
-
* reason: "Requires senior review - suspicious documents"
|
|
1441
|
-
* });
|
|
1442
|
-
* ```
|
|
1443
|
-
*
|
|
1444
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
1445
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
1446
|
-
* fails with `AuthenticationError` or a permission error.
|
|
1447
|
-
*/
|
|
1448
|
-
updateAlert(alertId: string, update: UpdateKycAlertRequest): Promise<void>;
|
|
1449
|
-
/**
|
|
1450
|
-
* Get KYC preferences for the tenant
|
|
1451
|
-
*
|
|
1452
|
-
* @returns KYC preferences configuration
|
|
1453
|
-
*
|
|
1454
|
-
* @example
|
|
1455
|
-
* ```typescript
|
|
1456
|
-
* const prefs = await client.getPreferences();
|
|
1457
|
-
* console.log(`Face verification required: ${prefs.is_face_verification_required}`);
|
|
1458
|
-
* console.log(`Required documents: ${prefs.required_document_count}`);
|
|
1459
|
-
* ```
|
|
1460
|
-
*
|
|
1461
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
1462
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
1463
|
-
* fails with `AuthenticationError` or a permission error.
|
|
1464
|
-
*/
|
|
1465
|
-
getPreferences(): Promise<KycPreferences>;
|
|
1466
1323
|
/**
|
|
1467
1324
|
* Update KYC preferences for the tenant
|
|
1468
1325
|
*
|
|
1469
1326
|
* @deprecated KYC preferences are managed in the Vesant console; the
|
|
1470
1327
|
* platform exposes no update operation to the SDK, so this call always
|
|
1471
|
-
* fails.
|
|
1472
|
-
* in a future release.
|
|
1328
|
+
* fails. This method will be removed in a future release.
|
|
1473
1329
|
*
|
|
1474
1330
|
* @param update - Fields to update
|
|
1475
1331
|
* @returns Updated preferences
|
|
@@ -1559,4 +1415,4 @@ declare class KycClient extends BaseClient {
|
|
|
1559
1415
|
createCustomerProfile(profile: CreateProfileRequest): Promise<CustomerProfile>;
|
|
1560
1416
|
}
|
|
1561
1417
|
|
|
1562
|
-
export { type AccountSensitiveActionTrigger, 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, type KycCallbackReactions, KycClient, type KycClientConfig, type KycCustomerData, type KycCustomerProfile, type KycDeclinedCode, type KycDisclosureConsent, type KycDocumentExpiredCallbackEvent, type KycHandoffSession, type KycOtherReason, type
|
|
1418
|
+
export { type AccountSensitiveActionTrigger, 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, type KycCallbackReactions, KycClient, type KycClientConfig, type KycCustomerData, type KycCustomerProfile, type KycDeclinedCode, type KycDisclosureConsent, type KycDocumentExpiredCallbackEvent, type KycHandoffSession, type KycOtherReason, type KycPagination, type KycPreferences, type KycRequest, type KycRequestReason, type KycRequestReasonCode, type KycSkipOptions, type KycStatus, type KycStatusCallbackEvent, type KycTriggerEvent, type KycVerificationTriggers, type Name, PaginationParams, type ProfileChangeCallbackEvent, type ProfileChangeField, type ProfileChangeStatus, type Proof, type ProofDownloadURL, type ProofType, type RequestAdditionalDocumentsRequest, type RequestKycSubmitLinkRequest, type RequestKycSubmitLinkResponse, RiskLevel, type SubmitEventBasedFaceVerificationSessionRequest, type SubmittedDocument, type SupportedAddressDocumentType, type SupportedDocumentType, type UpdateKycPreferencesRequest, type UseKycAlertsOptions, type UseKycAlertsResult, type UseKycSubmissionOptions, type UseKycSubmissionResult, isKycDocumentExpiredCallbackEvent, isKycStatusCallbackEvent, isProfileChangeCallbackEvent };
|