vesant-sdk 1.8.0-dev.d4d3b0d → 1.8.0-dev.d8b25c5
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/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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -182
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -182
- 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 +10 -182
- package/dist/kyc/core.js.map +1 -1
- package/dist/kyc/core.mjs +10 -182
- package/dist/kyc/core.mjs.map +1 -1
- package/dist/kyc/index.d.mts +4 -204
- package/dist/kyc/index.d.ts +4 -204
- package/dist/kyc/index.js +10 -182
- package/dist/kyc/index.js.map +1 -1
- package/dist/kyc/index.mjs +10 -182
- package/dist/kyc/index.mjs.map +1 -1
- package/dist/react.d.mts +4 -120
- package/dist/react.d.ts +4 -120
- 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.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.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/package.json +1 -1
package/dist/kyc/index.d.mts
CHANGED
|
@@ -177,12 +177,6 @@ interface KycAlertListResponse {
|
|
|
177
177
|
alerts: KycAlert[];
|
|
178
178
|
pagination: KycPagination;
|
|
179
179
|
}
|
|
180
|
-
interface UpdateKycAlertRequest {
|
|
181
|
-
assigned_for?: string;
|
|
182
|
-
reason?: string;
|
|
183
|
-
alert_type?: KycAlertType;
|
|
184
|
-
status?: KycAlertStatus;
|
|
185
|
-
}
|
|
186
180
|
/**
|
|
187
181
|
* Threshold-gated trigger for transaction events. Each rule is
|
|
188
182
|
* self-contained — there is no umbrella flag.
|
|
@@ -433,16 +427,6 @@ interface DocumentVerificationResponse {
|
|
|
433
427
|
verification_url?: string;
|
|
434
428
|
message?: string;
|
|
435
429
|
}
|
|
436
|
-
interface UpdateKycStatusRequest {
|
|
437
|
-
/** Provider reference or KYC ID */
|
|
438
|
-
reference: string;
|
|
439
|
-
/** Target status */
|
|
440
|
-
status: KycStatus;
|
|
441
|
-
/** Acceptance/decline reason */
|
|
442
|
-
reason?: string;
|
|
443
|
-
/** Provider warnings data */
|
|
444
|
-
warnings?: Record<string, Record<string, string>>;
|
|
445
|
-
}
|
|
446
430
|
/**
|
|
447
431
|
* Events that can trigger a KYC request. Each maps to a per-event toggle in
|
|
448
432
|
* the tenant's KYC verification trigger preferences (`manual` to the Manual
|
|
@@ -984,38 +968,12 @@ interface RequestAdditionalDocumentsRequest {
|
|
|
984
968
|
/** Message to customer */
|
|
985
969
|
message?: string;
|
|
986
970
|
}
|
|
987
|
-
interface KycOverview {
|
|
988
|
-
total: number;
|
|
989
|
-
pending: number;
|
|
990
|
-
approved: number;
|
|
991
|
-
high_risk: number;
|
|
992
|
-
rejected: number;
|
|
993
|
-
id_verified: number;
|
|
994
|
-
address_verified: number;
|
|
995
|
-
face_verified: number;
|
|
996
|
-
rejections: number;
|
|
997
|
-
total_alerts: number;
|
|
998
|
-
pending_alerts: number;
|
|
999
|
-
resolved_alerts: number;
|
|
1000
|
-
}
|
|
1001
|
-
interface KycRequestFilters {
|
|
1002
|
-
status?: KycStatus | KycStatus[];
|
|
1003
|
-
search?: string;
|
|
1004
|
-
fromDate?: string;
|
|
1005
|
-
toDate?: string;
|
|
1006
|
-
sortBy?: string;
|
|
1007
|
-
order?: 'ASC' | 'DESC';
|
|
1008
|
-
}
|
|
1009
971
|
interface KycPagination {
|
|
1010
972
|
limit: number;
|
|
1011
973
|
page: number;
|
|
1012
974
|
total: number;
|
|
1013
975
|
totalPages: number;
|
|
1014
976
|
}
|
|
1015
|
-
interface KycRequestListResponse {
|
|
1016
|
-
data: KycRequest[];
|
|
1017
|
-
pagination: KycPagination;
|
|
1018
|
-
}
|
|
1019
977
|
|
|
1020
978
|
interface KycClientConfig {
|
|
1021
979
|
/** Base URL of the KYC Service API (e.g., "http://localhost:8088") */
|
|
@@ -1064,36 +1022,11 @@ interface UseKycSubmissionResult extends BaseHookState {
|
|
|
1064
1022
|
submission: DocumentVerificationResponse | null;
|
|
1065
1023
|
reset: () => void;
|
|
1066
1024
|
}
|
|
1067
|
-
type UseKycRequestsOptions = BaseListOptions<KycRequestFilters>;
|
|
1068
|
-
interface UseKycRequestsResult extends BaseHookState {
|
|
1069
|
-
requests: KycRequest[];
|
|
1070
|
-
pagination: KycPagination | null;
|
|
1071
|
-
fetchRequests: (filters?: KycRequestFilters, pagination?: PaginationParams) => Promise<void>;
|
|
1072
|
-
getRequest: (id: string) => Promise<KycRequest>;
|
|
1073
|
-
updateStatus: (reference: string, status: KycStatus, reason?: string) => Promise<void>;
|
|
1074
|
-
refresh: () => Promise<void>;
|
|
1075
|
-
}
|
|
1076
1025
|
type UseKycAlertsOptions = BaseListOptions<KycAlertFilters>;
|
|
1077
1026
|
interface UseKycAlertsResult extends BaseHookState {
|
|
1078
1027
|
alerts: KycAlert[];
|
|
1079
1028
|
pagination: KycPagination | null;
|
|
1080
1029
|
fetchAlerts: (filters?: KycAlertFilters, pagination?: PaginationParams) => Promise<void>;
|
|
1081
|
-
getAlert: (id: string) => Promise<KycAlert>;
|
|
1082
|
-
updateAlert: (id: string, update: UpdateKycAlertRequest) => Promise<void>;
|
|
1083
|
-
refresh: () => Promise<void>;
|
|
1084
|
-
}
|
|
1085
|
-
interface UseKycOverviewOptions extends BaseAutoFetchOptions {
|
|
1086
|
-
fromDate?: string;
|
|
1087
|
-
toDate?: string;
|
|
1088
|
-
}
|
|
1089
|
-
interface UseKycOverviewResult extends BaseHookState {
|
|
1090
|
-
overview: KycOverview | null;
|
|
1091
|
-
refresh: (fromDate?: string, toDate?: string) => Promise<void>;
|
|
1092
|
-
}
|
|
1093
|
-
interface UseKycPreferencesResult extends BaseHookState {
|
|
1094
|
-
preferences: KycPreferences | null;
|
|
1095
|
-
/** @deprecated The platform exposes no preference-update operation; this call always fails. */
|
|
1096
|
-
updatePreferences: (update: UpdateKycPreferencesRequest) => Promise<void>;
|
|
1097
1030
|
refresh: () => Promise<void>;
|
|
1098
1031
|
}
|
|
1099
1032
|
|
|
@@ -1325,54 +1258,6 @@ declare class KycClient extends BaseClient {
|
|
|
1325
1258
|
* ```
|
|
1326
1259
|
*/
|
|
1327
1260
|
getKycRequest(id: string): Promise<KycRequest>;
|
|
1328
|
-
/**
|
|
1329
|
-
* List KYC requests with filters and pagination
|
|
1330
|
-
*
|
|
1331
|
-
* @param filters - Optional filters (status, search, date range)
|
|
1332
|
-
* @param pagination - Optional pagination (page, page_size)
|
|
1333
|
-
* @returns Paginated list of KYC requests
|
|
1334
|
-
*
|
|
1335
|
-
* @example
|
|
1336
|
-
* ```typescript
|
|
1337
|
-
* const requests = await client.listKycRequests(
|
|
1338
|
-
* { status: "pending", search: "john" },
|
|
1339
|
-
* { page: 1, page_size: 20 }
|
|
1340
|
-
* );
|
|
1341
|
-
* console.log(`Found ${requests.total} pending requests`);
|
|
1342
|
-
* ```
|
|
1343
|
-
*
|
|
1344
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
1345
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
1346
|
-
* fails with `AuthenticationError` or a permission error.
|
|
1347
|
-
*/
|
|
1348
|
-
listKycRequests(filters?: KycRequestFilters, pagination?: PaginationParams): Promise<KycRequestListResponse>;
|
|
1349
|
-
/**
|
|
1350
|
-
* Update KYC request status (accept/decline)
|
|
1351
|
-
*
|
|
1352
|
-
* @param request - Status update request with reference, status, and reason
|
|
1353
|
-
*
|
|
1354
|
-
* @example
|
|
1355
|
-
* ```typescript
|
|
1356
|
-
* // Accept a KYC request
|
|
1357
|
-
* await client.updateKycStatus({
|
|
1358
|
-
* reference: "kyc-ref-123",
|
|
1359
|
-
* status: "accepted",
|
|
1360
|
-
* reason: "All documents verified successfully"
|
|
1361
|
-
* });
|
|
1362
|
-
*
|
|
1363
|
-
* // Decline a KYC request
|
|
1364
|
-
* await client.updateKycStatus({
|
|
1365
|
-
* reference: "kyc-ref-456",
|
|
1366
|
-
* status: "declined",
|
|
1367
|
-
* reason: "Document expired"
|
|
1368
|
-
* });
|
|
1369
|
-
* ```
|
|
1370
|
-
*
|
|
1371
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
1372
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
1373
|
-
* fails with `AuthenticationError` or a permission error.
|
|
1374
|
-
*/
|
|
1375
|
-
updateKycStatus(request: UpdateKycStatusRequest): Promise<void>;
|
|
1376
1261
|
/**
|
|
1377
1262
|
* Request additional documents from customer
|
|
1378
1263
|
*
|
|
@@ -1411,39 +1296,6 @@ declare class KycClient extends BaseClient {
|
|
|
1411
1296
|
* ```
|
|
1412
1297
|
*/
|
|
1413
1298
|
getProofDownloadURLs(kycId: string): Promise<ProofDownloadURL[]>;
|
|
1414
|
-
/**
|
|
1415
|
-
* Get KYC overview statistics
|
|
1416
|
-
*
|
|
1417
|
-
* @param fromDate - Optional start date (ISO 8601)
|
|
1418
|
-
* @param toDate - Optional end date (ISO 8601)
|
|
1419
|
-
* @returns KYC statistics including counts by status
|
|
1420
|
-
*
|
|
1421
|
-
* @example
|
|
1422
|
-
* ```typescript
|
|
1423
|
-
* const overview = await client.getOverview(
|
|
1424
|
-
* "2024-01-01T00:00:00Z",
|
|
1425
|
-
* "2024-12-31T23:59:59Z"
|
|
1426
|
-
* );
|
|
1427
|
-
* console.log(`Total: ${overview.total}, Pending: ${overview.pending}`);
|
|
1428
|
-
* console.log(`Approved: ${overview.approved}, Rejected: ${overview.rejected}`);
|
|
1429
|
-
* ```
|
|
1430
|
-
*
|
|
1431
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
1432
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
1433
|
-
* fails with `AuthenticationError` or a permission error.
|
|
1434
|
-
*/
|
|
1435
|
-
getOverview(fromDate?: string, toDate?: string): Promise<KycOverview>;
|
|
1436
|
-
/**
|
|
1437
|
-
* Get a KYC alert by ID
|
|
1438
|
-
*
|
|
1439
|
-
* @param alertId - Alert ID
|
|
1440
|
-
* @returns Alert details
|
|
1441
|
-
*
|
|
1442
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
1443
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
1444
|
-
* fails with `AuthenticationError` or a permission error.
|
|
1445
|
-
*/
|
|
1446
|
-
getAlert(alertId: string): Promise<KycAlert>;
|
|
1447
1299
|
/**
|
|
1448
1300
|
* List KYC alerts with filters and pagination
|
|
1449
1301
|
*
|
|
@@ -1464,68 +1316,16 @@ declare class KycClient extends BaseClient {
|
|
|
1464
1316
|
* console.log(`Found ${alerts.total} alerts`);
|
|
1465
1317
|
* ```
|
|
1466
1318
|
*
|
|
1467
|
-
* @remarks
|
|
1468
|
-
*
|
|
1469
|
-
* 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.
|
|
1470
1321
|
*/
|
|
1471
1322
|
listAlerts(filters?: KycAlertFilters, pagination?: PaginationParams): Promise<KycAlertListResponse>;
|
|
1472
|
-
/**
|
|
1473
|
-
* Update a KYC alert
|
|
1474
|
-
*
|
|
1475
|
-
* @param alertId - Alert ID
|
|
1476
|
-
* @param update - Fields to update (status, assigned_for, reason, alert_type)
|
|
1477
|
-
*
|
|
1478
|
-
* @example
|
|
1479
|
-
* ```typescript
|
|
1480
|
-
* // Assign an alert
|
|
1481
|
-
* await client.updateAlert("alert_123", {
|
|
1482
|
-
* assigned_for: "analyst_user_id",
|
|
1483
|
-
* status: "in_progress"
|
|
1484
|
-
* });
|
|
1485
|
-
*
|
|
1486
|
-
* // Resolve an alert
|
|
1487
|
-
* await client.updateAlert("alert_123", {
|
|
1488
|
-
* status: "resolved",
|
|
1489
|
-
* reason: "Customer verified via phone call"
|
|
1490
|
-
* });
|
|
1491
|
-
*
|
|
1492
|
-
* // Escalate an alert
|
|
1493
|
-
* await client.updateAlert("alert_123", {
|
|
1494
|
-
* status: "escalated",
|
|
1495
|
-
* assigned_for: "manager_user_id",
|
|
1496
|
-
* reason: "Requires senior review - suspicious documents"
|
|
1497
|
-
* });
|
|
1498
|
-
* ```
|
|
1499
|
-
*
|
|
1500
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
1501
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
1502
|
-
* fails with `AuthenticationError` or a permission error.
|
|
1503
|
-
*/
|
|
1504
|
-
updateAlert(alertId: string, update: UpdateKycAlertRequest): Promise<void>;
|
|
1505
|
-
/**
|
|
1506
|
-
* Get KYC preferences for the tenant
|
|
1507
|
-
*
|
|
1508
|
-
* @returns KYC preferences configuration
|
|
1509
|
-
*
|
|
1510
|
-
* @example
|
|
1511
|
-
* ```typescript
|
|
1512
|
-
* const prefs = await client.getPreferences();
|
|
1513
|
-
* console.log(`Face verification required: ${prefs.is_face_verification_required}`);
|
|
1514
|
-
* console.log(`Required documents: ${prefs.required_document_count}`);
|
|
1515
|
-
* ```
|
|
1516
|
-
*
|
|
1517
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
1518
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
1519
|
-
* fails with `AuthenticationError` or a permission error.
|
|
1520
|
-
*/
|
|
1521
|
-
getPreferences(): Promise<KycPreferences>;
|
|
1522
1323
|
/**
|
|
1523
1324
|
* Update KYC preferences for the tenant
|
|
1524
1325
|
*
|
|
1525
1326
|
* @deprecated KYC preferences are managed in the Vesant console; the
|
|
1526
1327
|
* platform exposes no update operation to the SDK, so this call always
|
|
1527
|
-
* fails.
|
|
1528
|
-
* in a future release.
|
|
1328
|
+
* fails. This method will be removed in a future release.
|
|
1529
1329
|
*
|
|
1530
1330
|
* @param update - Fields to update
|
|
1531
1331
|
* @returns Updated preferences
|
|
@@ -1615,4 +1415,4 @@ declare class KycClient extends BaseClient {
|
|
|
1615
1415
|
createCustomerProfile(profile: CreateProfileRequest): Promise<CustomerProfile>;
|
|
1616
1416
|
}
|
|
1617
1417
|
|
|
1618
|
-
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 };
|
package/dist/kyc/index.d.ts
CHANGED
|
@@ -177,12 +177,6 @@ interface KycAlertListResponse {
|
|
|
177
177
|
alerts: KycAlert[];
|
|
178
178
|
pagination: KycPagination;
|
|
179
179
|
}
|
|
180
|
-
interface UpdateKycAlertRequest {
|
|
181
|
-
assigned_for?: string;
|
|
182
|
-
reason?: string;
|
|
183
|
-
alert_type?: KycAlertType;
|
|
184
|
-
status?: KycAlertStatus;
|
|
185
|
-
}
|
|
186
180
|
/**
|
|
187
181
|
* Threshold-gated trigger for transaction events. Each rule is
|
|
188
182
|
* self-contained — there is no umbrella flag.
|
|
@@ -433,16 +427,6 @@ interface DocumentVerificationResponse {
|
|
|
433
427
|
verification_url?: string;
|
|
434
428
|
message?: string;
|
|
435
429
|
}
|
|
436
|
-
interface UpdateKycStatusRequest {
|
|
437
|
-
/** Provider reference or KYC ID */
|
|
438
|
-
reference: string;
|
|
439
|
-
/** Target status */
|
|
440
|
-
status: KycStatus;
|
|
441
|
-
/** Acceptance/decline reason */
|
|
442
|
-
reason?: string;
|
|
443
|
-
/** Provider warnings data */
|
|
444
|
-
warnings?: Record<string, Record<string, string>>;
|
|
445
|
-
}
|
|
446
430
|
/**
|
|
447
431
|
* Events that can trigger a KYC request. Each maps to a per-event toggle in
|
|
448
432
|
* the tenant's KYC verification trigger preferences (`manual` to the Manual
|
|
@@ -984,38 +968,12 @@ interface RequestAdditionalDocumentsRequest {
|
|
|
984
968
|
/** Message to customer */
|
|
985
969
|
message?: string;
|
|
986
970
|
}
|
|
987
|
-
interface KycOverview {
|
|
988
|
-
total: number;
|
|
989
|
-
pending: number;
|
|
990
|
-
approved: number;
|
|
991
|
-
high_risk: number;
|
|
992
|
-
rejected: number;
|
|
993
|
-
id_verified: number;
|
|
994
|
-
address_verified: number;
|
|
995
|
-
face_verified: number;
|
|
996
|
-
rejections: number;
|
|
997
|
-
total_alerts: number;
|
|
998
|
-
pending_alerts: number;
|
|
999
|
-
resolved_alerts: number;
|
|
1000
|
-
}
|
|
1001
|
-
interface KycRequestFilters {
|
|
1002
|
-
status?: KycStatus | KycStatus[];
|
|
1003
|
-
search?: string;
|
|
1004
|
-
fromDate?: string;
|
|
1005
|
-
toDate?: string;
|
|
1006
|
-
sortBy?: string;
|
|
1007
|
-
order?: 'ASC' | 'DESC';
|
|
1008
|
-
}
|
|
1009
971
|
interface KycPagination {
|
|
1010
972
|
limit: number;
|
|
1011
973
|
page: number;
|
|
1012
974
|
total: number;
|
|
1013
975
|
totalPages: number;
|
|
1014
976
|
}
|
|
1015
|
-
interface KycRequestListResponse {
|
|
1016
|
-
data: KycRequest[];
|
|
1017
|
-
pagination: KycPagination;
|
|
1018
|
-
}
|
|
1019
977
|
|
|
1020
978
|
interface KycClientConfig {
|
|
1021
979
|
/** Base URL of the KYC Service API (e.g., "http://localhost:8088") */
|
|
@@ -1064,36 +1022,11 @@ interface UseKycSubmissionResult extends BaseHookState {
|
|
|
1064
1022
|
submission: DocumentVerificationResponse | null;
|
|
1065
1023
|
reset: () => void;
|
|
1066
1024
|
}
|
|
1067
|
-
type UseKycRequestsOptions = BaseListOptions<KycRequestFilters>;
|
|
1068
|
-
interface UseKycRequestsResult extends BaseHookState {
|
|
1069
|
-
requests: KycRequest[];
|
|
1070
|
-
pagination: KycPagination | null;
|
|
1071
|
-
fetchRequests: (filters?: KycRequestFilters, pagination?: PaginationParams) => Promise<void>;
|
|
1072
|
-
getRequest: (id: string) => Promise<KycRequest>;
|
|
1073
|
-
updateStatus: (reference: string, status: KycStatus, reason?: string) => Promise<void>;
|
|
1074
|
-
refresh: () => Promise<void>;
|
|
1075
|
-
}
|
|
1076
1025
|
type UseKycAlertsOptions = BaseListOptions<KycAlertFilters>;
|
|
1077
1026
|
interface UseKycAlertsResult extends BaseHookState {
|
|
1078
1027
|
alerts: KycAlert[];
|
|
1079
1028
|
pagination: KycPagination | null;
|
|
1080
1029
|
fetchAlerts: (filters?: KycAlertFilters, pagination?: PaginationParams) => Promise<void>;
|
|
1081
|
-
getAlert: (id: string) => Promise<KycAlert>;
|
|
1082
|
-
updateAlert: (id: string, update: UpdateKycAlertRequest) => Promise<void>;
|
|
1083
|
-
refresh: () => Promise<void>;
|
|
1084
|
-
}
|
|
1085
|
-
interface UseKycOverviewOptions extends BaseAutoFetchOptions {
|
|
1086
|
-
fromDate?: string;
|
|
1087
|
-
toDate?: string;
|
|
1088
|
-
}
|
|
1089
|
-
interface UseKycOverviewResult extends BaseHookState {
|
|
1090
|
-
overview: KycOverview | null;
|
|
1091
|
-
refresh: (fromDate?: string, toDate?: string) => Promise<void>;
|
|
1092
|
-
}
|
|
1093
|
-
interface UseKycPreferencesResult extends BaseHookState {
|
|
1094
|
-
preferences: KycPreferences | null;
|
|
1095
|
-
/** @deprecated The platform exposes no preference-update operation; this call always fails. */
|
|
1096
|
-
updatePreferences: (update: UpdateKycPreferencesRequest) => Promise<void>;
|
|
1097
1030
|
refresh: () => Promise<void>;
|
|
1098
1031
|
}
|
|
1099
1032
|
|
|
@@ -1325,54 +1258,6 @@ declare class KycClient extends BaseClient {
|
|
|
1325
1258
|
* ```
|
|
1326
1259
|
*/
|
|
1327
1260
|
getKycRequest(id: string): Promise<KycRequest>;
|
|
1328
|
-
/**
|
|
1329
|
-
* List KYC requests with filters and pagination
|
|
1330
|
-
*
|
|
1331
|
-
* @param filters - Optional filters (status, search, date range)
|
|
1332
|
-
* @param pagination - Optional pagination (page, page_size)
|
|
1333
|
-
* @returns Paginated list of KYC requests
|
|
1334
|
-
*
|
|
1335
|
-
* @example
|
|
1336
|
-
* ```typescript
|
|
1337
|
-
* const requests = await client.listKycRequests(
|
|
1338
|
-
* { status: "pending", search: "john" },
|
|
1339
|
-
* { page: 1, page_size: 20 }
|
|
1340
|
-
* );
|
|
1341
|
-
* console.log(`Found ${requests.total} pending requests`);
|
|
1342
|
-
* ```
|
|
1343
|
-
*
|
|
1344
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
1345
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
1346
|
-
* fails with `AuthenticationError` or a permission error.
|
|
1347
|
-
*/
|
|
1348
|
-
listKycRequests(filters?: KycRequestFilters, pagination?: PaginationParams): Promise<KycRequestListResponse>;
|
|
1349
|
-
/**
|
|
1350
|
-
* Update KYC request status (accept/decline)
|
|
1351
|
-
*
|
|
1352
|
-
* @param request - Status update request with reference, status, and reason
|
|
1353
|
-
*
|
|
1354
|
-
* @example
|
|
1355
|
-
* ```typescript
|
|
1356
|
-
* // Accept a KYC request
|
|
1357
|
-
* await client.updateKycStatus({
|
|
1358
|
-
* reference: "kyc-ref-123",
|
|
1359
|
-
* status: "accepted",
|
|
1360
|
-
* reason: "All documents verified successfully"
|
|
1361
|
-
* });
|
|
1362
|
-
*
|
|
1363
|
-
* // Decline a KYC request
|
|
1364
|
-
* await client.updateKycStatus({
|
|
1365
|
-
* reference: "kyc-ref-456",
|
|
1366
|
-
* status: "declined",
|
|
1367
|
-
* reason: "Document expired"
|
|
1368
|
-
* });
|
|
1369
|
-
* ```
|
|
1370
|
-
*
|
|
1371
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
1372
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
1373
|
-
* fails with `AuthenticationError` or a permission error.
|
|
1374
|
-
*/
|
|
1375
|
-
updateKycStatus(request: UpdateKycStatusRequest): Promise<void>;
|
|
1376
1261
|
/**
|
|
1377
1262
|
* Request additional documents from customer
|
|
1378
1263
|
*
|
|
@@ -1411,39 +1296,6 @@ declare class KycClient extends BaseClient {
|
|
|
1411
1296
|
* ```
|
|
1412
1297
|
*/
|
|
1413
1298
|
getProofDownloadURLs(kycId: string): Promise<ProofDownloadURL[]>;
|
|
1414
|
-
/**
|
|
1415
|
-
* Get KYC overview statistics
|
|
1416
|
-
*
|
|
1417
|
-
* @param fromDate - Optional start date (ISO 8601)
|
|
1418
|
-
* @param toDate - Optional end date (ISO 8601)
|
|
1419
|
-
* @returns KYC statistics including counts by status
|
|
1420
|
-
*
|
|
1421
|
-
* @example
|
|
1422
|
-
* ```typescript
|
|
1423
|
-
* const overview = await client.getOverview(
|
|
1424
|
-
* "2024-01-01T00:00:00Z",
|
|
1425
|
-
* "2024-12-31T23:59:59Z"
|
|
1426
|
-
* );
|
|
1427
|
-
* console.log(`Total: ${overview.total}, Pending: ${overview.pending}`);
|
|
1428
|
-
* console.log(`Approved: ${overview.approved}, Rejected: ${overview.rejected}`);
|
|
1429
|
-
* ```
|
|
1430
|
-
*
|
|
1431
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
1432
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
1433
|
-
* fails with `AuthenticationError` or a permission error.
|
|
1434
|
-
*/
|
|
1435
|
-
getOverview(fromDate?: string, toDate?: string): Promise<KycOverview>;
|
|
1436
|
-
/**
|
|
1437
|
-
* Get a KYC alert by ID
|
|
1438
|
-
*
|
|
1439
|
-
* @param alertId - Alert ID
|
|
1440
|
-
* @returns Alert details
|
|
1441
|
-
*
|
|
1442
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
1443
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
1444
|
-
* fails with `AuthenticationError` or a permission error.
|
|
1445
|
-
*/
|
|
1446
|
-
getAlert(alertId: string): Promise<KycAlert>;
|
|
1447
1299
|
/**
|
|
1448
1300
|
* List KYC alerts with filters and pagination
|
|
1449
1301
|
*
|
|
@@ -1464,68 +1316,16 @@ declare class KycClient extends BaseClient {
|
|
|
1464
1316
|
* console.log(`Found ${alerts.total} alerts`);
|
|
1465
1317
|
* ```
|
|
1466
1318
|
*
|
|
1467
|
-
* @remarks
|
|
1468
|
-
*
|
|
1469
|
-
* 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.
|
|
1470
1321
|
*/
|
|
1471
1322
|
listAlerts(filters?: KycAlertFilters, pagination?: PaginationParams): Promise<KycAlertListResponse>;
|
|
1472
|
-
/**
|
|
1473
|
-
* Update a KYC alert
|
|
1474
|
-
*
|
|
1475
|
-
* @param alertId - Alert ID
|
|
1476
|
-
* @param update - Fields to update (status, assigned_for, reason, alert_type)
|
|
1477
|
-
*
|
|
1478
|
-
* @example
|
|
1479
|
-
* ```typescript
|
|
1480
|
-
* // Assign an alert
|
|
1481
|
-
* await client.updateAlert("alert_123", {
|
|
1482
|
-
* assigned_for: "analyst_user_id",
|
|
1483
|
-
* status: "in_progress"
|
|
1484
|
-
* });
|
|
1485
|
-
*
|
|
1486
|
-
* // Resolve an alert
|
|
1487
|
-
* await client.updateAlert("alert_123", {
|
|
1488
|
-
* status: "resolved",
|
|
1489
|
-
* reason: "Customer verified via phone call"
|
|
1490
|
-
* });
|
|
1491
|
-
*
|
|
1492
|
-
* // Escalate an alert
|
|
1493
|
-
* await client.updateAlert("alert_123", {
|
|
1494
|
-
* status: "escalated",
|
|
1495
|
-
* assigned_for: "manager_user_id",
|
|
1496
|
-
* reason: "Requires senior review - suspicious documents"
|
|
1497
|
-
* });
|
|
1498
|
-
* ```
|
|
1499
|
-
*
|
|
1500
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
1501
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
1502
|
-
* fails with `AuthenticationError` or a permission error.
|
|
1503
|
-
*/
|
|
1504
|
-
updateAlert(alertId: string, update: UpdateKycAlertRequest): Promise<void>;
|
|
1505
|
-
/**
|
|
1506
|
-
* Get KYC preferences for the tenant
|
|
1507
|
-
*
|
|
1508
|
-
* @returns KYC preferences configuration
|
|
1509
|
-
*
|
|
1510
|
-
* @example
|
|
1511
|
-
* ```typescript
|
|
1512
|
-
* const prefs = await client.getPreferences();
|
|
1513
|
-
* console.log(`Face verification required: ${prefs.is_face_verification_required}`);
|
|
1514
|
-
* console.log(`Required documents: ${prefs.required_document_count}`);
|
|
1515
|
-
* ```
|
|
1516
|
-
*
|
|
1517
|
-
* @remarks Console session only. This endpoint accepts a Vesant console
|
|
1518
|
-
* (dashboard login) token, not a tenant API key; called with an API key it
|
|
1519
|
-
* fails with `AuthenticationError` or a permission error.
|
|
1520
|
-
*/
|
|
1521
|
-
getPreferences(): Promise<KycPreferences>;
|
|
1522
1323
|
/**
|
|
1523
1324
|
* Update KYC preferences for the tenant
|
|
1524
1325
|
*
|
|
1525
1326
|
* @deprecated KYC preferences are managed in the Vesant console; the
|
|
1526
1327
|
* platform exposes no update operation to the SDK, so this call always
|
|
1527
|
-
* fails.
|
|
1528
|
-
* in a future release.
|
|
1328
|
+
* fails. This method will be removed in a future release.
|
|
1529
1329
|
*
|
|
1530
1330
|
* @param update - Fields to update
|
|
1531
1331
|
* @returns Updated preferences
|
|
@@ -1615,4 +1415,4 @@ declare class KycClient extends BaseClient {
|
|
|
1615
1415
|
createCustomerProfile(profile: CreateProfileRequest): Promise<CustomerProfile>;
|
|
1616
1416
|
}
|
|
1617
1417
|
|
|
1618
|
-
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 };
|