vesant-sdk 1.7.0-dev.b7f5c17 → 1.7.0-dev.ddb1fa4
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/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +20 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -6
- 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 +20 -6
- package/dist/kyc/core.js.map +1 -1
- package/dist/kyc/core.mjs +20 -6
- package/dist/kyc/core.mjs.map +1 -1
- package/dist/kyc/index.d.mts +77 -9
- package/dist/kyc/index.d.ts +77 -9
- package/dist/kyc/index.js +20 -6
- package/dist/kyc/index.js.map +1 -1
- package/dist/kyc/index.mjs +20 -6
- package/dist/kyc/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/kyc/index.d.mts
CHANGED
|
@@ -318,8 +318,49 @@ interface RequestKycSubmitLinkRequest {
|
|
|
318
318
|
redirect_url?: string;
|
|
319
319
|
/** URL to receive callback notifications via POST request when KYC status changes (optional) */
|
|
320
320
|
callback_url?: string;
|
|
321
|
-
/**
|
|
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
|
+
*/
|
|
322
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;
|
|
323
364
|
}
|
|
324
365
|
/**
|
|
325
366
|
* Trigger events that can request Event-Based Face Verification.
|
|
@@ -389,6 +430,19 @@ interface RequestKycSubmitLinkResponse {
|
|
|
389
430
|
link: string;
|
|
390
431
|
/** KYC request ID */
|
|
391
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;
|
|
392
446
|
}
|
|
393
447
|
/** Device class detected by the SDK (purely client-side — server doesn't care). */
|
|
394
448
|
type EventBasedFaceVerificationDeviceType = 'mobile' | 'desktop';
|
|
@@ -666,7 +720,7 @@ interface UseKycPreferencesResult extends BaseHookState {
|
|
|
666
720
|
*/
|
|
667
721
|
declare class KycClient extends BaseClient {
|
|
668
722
|
private userId?;
|
|
669
|
-
private riskProfileBaseURL?;
|
|
723
|
+
private readonly riskProfileBaseURL?;
|
|
670
724
|
constructor(config: KycClientConfig);
|
|
671
725
|
/**
|
|
672
726
|
* Set the user ID for operations requiring user context
|
|
@@ -685,7 +739,13 @@ declare class KycClient extends BaseClient {
|
|
|
685
739
|
*
|
|
686
740
|
* Generates a link that the user can visit to submit their KYC documents.
|
|
687
741
|
*
|
|
688
|
-
*
|
|
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
|
|
689
749
|
* @returns Response containing the redirect link and KYC ID
|
|
690
750
|
*
|
|
691
751
|
* @example
|
|
@@ -693,7 +753,15 @@ declare class KycClient extends BaseClient {
|
|
|
693
753
|
* const result = await client.requestKycSubmitLink({
|
|
694
754
|
* user_id: "user_123",
|
|
695
755
|
* redirect_url: "https://merchant.com/kyc-complete", // optional
|
|
696
|
-
* 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
|
+
* }
|
|
697
765
|
* });
|
|
698
766
|
*
|
|
699
767
|
* console.log(`Redirect user to: ${result.link}`);
|
|
@@ -798,7 +866,7 @@ declare class KycClient extends BaseClient {
|
|
|
798
866
|
* @example
|
|
799
867
|
* ```typescript
|
|
800
868
|
* const result = await client.submitVerification({
|
|
801
|
-
* reference: "
|
|
869
|
+
* reference: "4d2aff34-ab86-422d-992e-50b1234a5b67",
|
|
802
870
|
* email: "customer@example.com",
|
|
803
871
|
* country: "US",
|
|
804
872
|
* document: {
|
|
@@ -824,7 +892,7 @@ declare class KycClient extends BaseClient {
|
|
|
824
892
|
*
|
|
825
893
|
* @example
|
|
826
894
|
* ```typescript
|
|
827
|
-
* const kyc = await client.getKycRequest("
|
|
895
|
+
* const kyc = await client.getKycRequest("550e8400-e29b-41d4-a716-446655440000");
|
|
828
896
|
* console.log(`Status: ${kyc.status}, ID Verified: ${kyc.id_verified}`);
|
|
829
897
|
* ```
|
|
830
898
|
*/
|
|
@@ -877,7 +945,7 @@ declare class KycClient extends BaseClient {
|
|
|
877
945
|
* @example
|
|
878
946
|
* ```typescript
|
|
879
947
|
* await client.requestAdditionalDocuments({
|
|
880
|
-
* id: "
|
|
948
|
+
* id: "550e8400-e29b-41d4-a716-446655440000",
|
|
881
949
|
* document_types: ["address", "document_two"],
|
|
882
950
|
* message: "Please provide proof of address and secondary ID"
|
|
883
951
|
* });
|
|
@@ -892,7 +960,7 @@ declare class KycClient extends BaseClient {
|
|
|
892
960
|
*
|
|
893
961
|
* @example
|
|
894
962
|
* ```typescript
|
|
895
|
-
* const proofs = await client.getProofDownloadURLs("
|
|
963
|
+
* const proofs = await client.getProofDownloadURLs("550e8400-e29b-41d4-a716-446655440000");
|
|
896
964
|
* proofs.forEach(proof => {
|
|
897
965
|
* console.log(`${proof.type}: ${proof.url} (expires: ${proof.expires_at})`);
|
|
898
966
|
* });
|
|
@@ -1078,4 +1146,4 @@ declare class KycClient extends BaseClient {
|
|
|
1078
1146
|
createCustomerProfile(profile: CreateProfileRequest): Promise<CustomerProfile>;
|
|
1079
1147
|
}
|
|
1080
1148
|
|
|
1081
|
-
export { type CheckKycStatusRequest, type CheckKycStatusResponse, CreateProfileRequest as CreateCustomerProfileRequest, type CreateEventBasedFaceVerificationSessionRequest, type CreateEventBasedFaceVerificationSessionResponse, CustomerProfile, ProfileFilters as CustomerProfileFilters, ProfileListResponse as CustomerProfileListResponse, type DocumentType, type DocumentVerificationRequest, type DocumentVerificationResponse, type EventBasedFaceVerificationCallback, type EventBasedFaceVerificationDeviceType, type EventBasedFaceVerificationEvent, type EventBasedFaceVerificationFrequencyTrigger, type EventBasedFaceVerificationReactionResult, type EventBasedFaceVerificationReactions, type EventBasedFaceVerificationThresholdTrigger, type EventBasedFaceVerificationTriggers, type FaceProof, KYC_DECLINED_DESCRIPTIONS, type KycAlert, type KycAlertFilters, type KycAlertListResponse, type KycAlertStatus, type KycAlertType, KycClient, type KycClientConfig, type KycCustomerProfile, type KycDeclinedCode, type KycHandoffSession, type KycOverview, type KycPagination, type KycPreferences, type KycRequest, type KycRequestFilters, type KycRequestListResponse, type KycStatus, type Name, PaginationParams, type Proof, type ProofDownloadURL, type ProofType, type RequestAdditionalDocumentsRequest, type RequestKycSubmitLinkRequest, type RequestKycSubmitLinkResponse, RiskLevel, type SubmitEventBasedFaceVerificationSessionRequest, type SubmittedDocument, type SupportedDocumentType, type UpdateKycAlertRequest, type UpdateKycPreferencesRequest, type UpdateKycStatusRequest, type UseKycAlertsOptions, type UseKycAlertsResult, type UseKycOverviewOptions, type UseKycOverviewResult, type UseKycPreferencesResult, type UseKycRequestsOptions, type UseKycRequestsResult, type UseKycSubmissionOptions, type UseKycSubmissionResult };
|
|
1149
|
+
export { type CheckKycStatusRequest, type CheckKycStatusResponse, CreateProfileRequest as CreateCustomerProfileRequest, type CreateEventBasedFaceVerificationSessionRequest, type CreateEventBasedFaceVerificationSessionResponse, CustomerProfile, ProfileFilters as CustomerProfileFilters, ProfileListResponse as CustomerProfileListResponse, type DocumentType, type DocumentVerificationRequest, type DocumentVerificationResponse, type EventBasedFaceVerificationCallback, type EventBasedFaceVerificationDeviceType, type EventBasedFaceVerificationEvent, type EventBasedFaceVerificationFrequencyTrigger, type EventBasedFaceVerificationReactionResult, type EventBasedFaceVerificationReactions, type EventBasedFaceVerificationThresholdTrigger, type EventBasedFaceVerificationTriggers, type FaceProof, KYC_DECLINED_DESCRIPTIONS, type KycAlert, type KycAlertFilters, type KycAlertListResponse, type KycAlertStatus, type KycAlertType, KycClient, type KycClientConfig, type KycCustomerData, type KycCustomerProfile, type KycDeclinedCode, type KycHandoffSession, type KycOverview, type KycPagination, type KycPreferences, type KycRequest, type KycRequestFilters, type KycRequestListResponse, type KycStatus, type Name, PaginationParams, type Proof, type ProofDownloadURL, type ProofType, type RequestAdditionalDocumentsRequest, type RequestKycSubmitLinkRequest, type RequestKycSubmitLinkResponse, RiskLevel, type SubmitEventBasedFaceVerificationSessionRequest, type SubmittedDocument, type SupportedDocumentType, type UpdateKycAlertRequest, type UpdateKycPreferencesRequest, type UpdateKycStatusRequest, type UseKycAlertsOptions, type UseKycAlertsResult, type UseKycOverviewOptions, type UseKycOverviewResult, type UseKycPreferencesResult, type UseKycRequestsOptions, type UseKycRequestsResult, type UseKycSubmissionOptions, type UseKycSubmissionResult };
|
package/dist/kyc/index.d.ts
CHANGED
|
@@ -318,8 +318,49 @@ interface RequestKycSubmitLinkRequest {
|
|
|
318
318
|
redirect_url?: string;
|
|
319
319
|
/** URL to receive callback notifications via POST request when KYC status changes (optional) */
|
|
320
320
|
callback_url?: string;
|
|
321
|
-
/**
|
|
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
|
+
*/
|
|
322
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;
|
|
323
364
|
}
|
|
324
365
|
/**
|
|
325
366
|
* Trigger events that can request Event-Based Face Verification.
|
|
@@ -389,6 +430,19 @@ interface RequestKycSubmitLinkResponse {
|
|
|
389
430
|
link: string;
|
|
390
431
|
/** KYC request ID */
|
|
391
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;
|
|
392
446
|
}
|
|
393
447
|
/** Device class detected by the SDK (purely client-side — server doesn't care). */
|
|
394
448
|
type EventBasedFaceVerificationDeviceType = 'mobile' | 'desktop';
|
|
@@ -666,7 +720,7 @@ interface UseKycPreferencesResult extends BaseHookState {
|
|
|
666
720
|
*/
|
|
667
721
|
declare class KycClient extends BaseClient {
|
|
668
722
|
private userId?;
|
|
669
|
-
private riskProfileBaseURL?;
|
|
723
|
+
private readonly riskProfileBaseURL?;
|
|
670
724
|
constructor(config: KycClientConfig);
|
|
671
725
|
/**
|
|
672
726
|
* Set the user ID for operations requiring user context
|
|
@@ -685,7 +739,13 @@ declare class KycClient extends BaseClient {
|
|
|
685
739
|
*
|
|
686
740
|
* Generates a link that the user can visit to submit their KYC documents.
|
|
687
741
|
*
|
|
688
|
-
*
|
|
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
|
|
689
749
|
* @returns Response containing the redirect link and KYC ID
|
|
690
750
|
*
|
|
691
751
|
* @example
|
|
@@ -693,7 +753,15 @@ declare class KycClient extends BaseClient {
|
|
|
693
753
|
* const result = await client.requestKycSubmitLink({
|
|
694
754
|
* user_id: "user_123",
|
|
695
755
|
* redirect_url: "https://merchant.com/kyc-complete", // optional
|
|
696
|
-
* 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
|
+
* }
|
|
697
765
|
* });
|
|
698
766
|
*
|
|
699
767
|
* console.log(`Redirect user to: ${result.link}`);
|
|
@@ -798,7 +866,7 @@ declare class KycClient extends BaseClient {
|
|
|
798
866
|
* @example
|
|
799
867
|
* ```typescript
|
|
800
868
|
* const result = await client.submitVerification({
|
|
801
|
-
* reference: "
|
|
869
|
+
* reference: "4d2aff34-ab86-422d-992e-50b1234a5b67",
|
|
802
870
|
* email: "customer@example.com",
|
|
803
871
|
* country: "US",
|
|
804
872
|
* document: {
|
|
@@ -824,7 +892,7 @@ declare class KycClient extends BaseClient {
|
|
|
824
892
|
*
|
|
825
893
|
* @example
|
|
826
894
|
* ```typescript
|
|
827
|
-
* const kyc = await client.getKycRequest("
|
|
895
|
+
* const kyc = await client.getKycRequest("550e8400-e29b-41d4-a716-446655440000");
|
|
828
896
|
* console.log(`Status: ${kyc.status}, ID Verified: ${kyc.id_verified}`);
|
|
829
897
|
* ```
|
|
830
898
|
*/
|
|
@@ -877,7 +945,7 @@ declare class KycClient extends BaseClient {
|
|
|
877
945
|
* @example
|
|
878
946
|
* ```typescript
|
|
879
947
|
* await client.requestAdditionalDocuments({
|
|
880
|
-
* id: "
|
|
948
|
+
* id: "550e8400-e29b-41d4-a716-446655440000",
|
|
881
949
|
* document_types: ["address", "document_two"],
|
|
882
950
|
* message: "Please provide proof of address and secondary ID"
|
|
883
951
|
* });
|
|
@@ -892,7 +960,7 @@ declare class KycClient extends BaseClient {
|
|
|
892
960
|
*
|
|
893
961
|
* @example
|
|
894
962
|
* ```typescript
|
|
895
|
-
* const proofs = await client.getProofDownloadURLs("
|
|
963
|
+
* const proofs = await client.getProofDownloadURLs("550e8400-e29b-41d4-a716-446655440000");
|
|
896
964
|
* proofs.forEach(proof => {
|
|
897
965
|
* console.log(`${proof.type}: ${proof.url} (expires: ${proof.expires_at})`);
|
|
898
966
|
* });
|
|
@@ -1078,4 +1146,4 @@ declare class KycClient extends BaseClient {
|
|
|
1078
1146
|
createCustomerProfile(profile: CreateProfileRequest): Promise<CustomerProfile>;
|
|
1079
1147
|
}
|
|
1080
1148
|
|
|
1081
|
-
export { type CheckKycStatusRequest, type CheckKycStatusResponse, CreateProfileRequest as CreateCustomerProfileRequest, type CreateEventBasedFaceVerificationSessionRequest, type CreateEventBasedFaceVerificationSessionResponse, CustomerProfile, ProfileFilters as CustomerProfileFilters, ProfileListResponse as CustomerProfileListResponse, type DocumentType, type DocumentVerificationRequest, type DocumentVerificationResponse, type EventBasedFaceVerificationCallback, type EventBasedFaceVerificationDeviceType, type EventBasedFaceVerificationEvent, type EventBasedFaceVerificationFrequencyTrigger, type EventBasedFaceVerificationReactionResult, type EventBasedFaceVerificationReactions, type EventBasedFaceVerificationThresholdTrigger, type EventBasedFaceVerificationTriggers, type FaceProof, KYC_DECLINED_DESCRIPTIONS, type KycAlert, type KycAlertFilters, type KycAlertListResponse, type KycAlertStatus, type KycAlertType, KycClient, type KycClientConfig, type KycCustomerProfile, type KycDeclinedCode, type KycHandoffSession, type KycOverview, type KycPagination, type KycPreferences, type KycRequest, type KycRequestFilters, type KycRequestListResponse, type KycStatus, type Name, PaginationParams, type Proof, type ProofDownloadURL, type ProofType, type RequestAdditionalDocumentsRequest, type RequestKycSubmitLinkRequest, type RequestKycSubmitLinkResponse, RiskLevel, type SubmitEventBasedFaceVerificationSessionRequest, type SubmittedDocument, type SupportedDocumentType, type UpdateKycAlertRequest, type UpdateKycPreferencesRequest, type UpdateKycStatusRequest, type UseKycAlertsOptions, type UseKycAlertsResult, type UseKycOverviewOptions, type UseKycOverviewResult, type UseKycPreferencesResult, type UseKycRequestsOptions, type UseKycRequestsResult, type UseKycSubmissionOptions, type UseKycSubmissionResult };
|
|
1149
|
+
export { type CheckKycStatusRequest, type CheckKycStatusResponse, CreateProfileRequest as CreateCustomerProfileRequest, type CreateEventBasedFaceVerificationSessionRequest, type CreateEventBasedFaceVerificationSessionResponse, CustomerProfile, ProfileFilters as CustomerProfileFilters, ProfileListResponse as CustomerProfileListResponse, type DocumentType, type DocumentVerificationRequest, type DocumentVerificationResponse, type EventBasedFaceVerificationCallback, type EventBasedFaceVerificationDeviceType, type EventBasedFaceVerificationEvent, type EventBasedFaceVerificationFrequencyTrigger, type EventBasedFaceVerificationReactionResult, type EventBasedFaceVerificationReactions, type EventBasedFaceVerificationThresholdTrigger, type EventBasedFaceVerificationTriggers, type FaceProof, KYC_DECLINED_DESCRIPTIONS, type KycAlert, type KycAlertFilters, type KycAlertListResponse, type KycAlertStatus, type KycAlertType, KycClient, type KycClientConfig, type KycCustomerData, type KycCustomerProfile, type KycDeclinedCode, type KycHandoffSession, type KycOverview, type KycPagination, type KycPreferences, type KycRequest, type KycRequestFilters, type KycRequestListResponse, type KycStatus, type Name, PaginationParams, type Proof, type ProofDownloadURL, type ProofType, type RequestAdditionalDocumentsRequest, type RequestKycSubmitLinkRequest, type RequestKycSubmitLinkResponse, RiskLevel, type SubmitEventBasedFaceVerificationSessionRequest, type SubmittedDocument, type SupportedDocumentType, type UpdateKycAlertRequest, type UpdateKycPreferencesRequest, type UpdateKycStatusRequest, type UseKycAlertsOptions, type UseKycAlertsResult, type UseKycOverviewOptions, type UseKycOverviewResult, type UseKycPreferencesResult, type UseKycRequestsOptions, type UseKycRequestsResult, type UseKycSubmissionOptions, type UseKycSubmissionResult };
|
package/dist/kyc/index.js
CHANGED
|
@@ -603,7 +603,13 @@ var KycClient = class extends BaseClient {
|
|
|
603
603
|
*
|
|
604
604
|
* Generates a link that the user can visit to submit their KYC documents.
|
|
605
605
|
*
|
|
606
|
-
*
|
|
606
|
+
* Optionally pass the customer's registered identity data as
|
|
607
|
+
* `customer_data` (same shape as the geolocation `customer_data` block).
|
|
608
|
+
* It seeds the customer's risk profile so document verification can
|
|
609
|
+
* cross-check the submitted document against trusted reference data;
|
|
610
|
+
* fields never overwrite data already on the profile.
|
|
611
|
+
*
|
|
612
|
+
* @param request - Request containing the user ID, optional redirect URL, optional callback URL (receives POST requests), and optional customer identity data
|
|
607
613
|
* @returns Response containing the redirect link and KYC ID
|
|
608
614
|
*
|
|
609
615
|
* @example
|
|
@@ -611,7 +617,15 @@ var KycClient = class extends BaseClient {
|
|
|
611
617
|
* const result = await client.requestKycSubmitLink({
|
|
612
618
|
* user_id: "user_123",
|
|
613
619
|
* redirect_url: "https://merchant.com/kyc-complete", // optional
|
|
614
|
-
* callback_url: "https://merchant.com/api/kyc-webhook" // optional - receives POST requests on status change
|
|
620
|
+
* callback_url: "https://merchant.com/api/kyc-webhook", // optional - receives POST requests on status change
|
|
621
|
+
* customer_data: { // optional - seeds the risk profile for document cross-checks
|
|
622
|
+
* full_name: "John Doe",
|
|
623
|
+
* date_of_birth: "1999-06-02", // ISO 8601
|
|
624
|
+
* email: "john@example.com",
|
|
625
|
+
* phone: "+94771234567",
|
|
626
|
+
* address: "12 Main St, Colombo", // used for address verification
|
|
627
|
+
* country: "LK"
|
|
628
|
+
* }
|
|
615
629
|
* });
|
|
616
630
|
*
|
|
617
631
|
* console.log(`Redirect user to: ${result.link}`);
|
|
@@ -760,7 +774,7 @@ var KycClient = class extends BaseClient {
|
|
|
760
774
|
* @example
|
|
761
775
|
* ```typescript
|
|
762
776
|
* const result = await client.submitVerification({
|
|
763
|
-
* reference: "
|
|
777
|
+
* reference: "4d2aff34-ab86-422d-992e-50b1234a5b67",
|
|
764
778
|
* email: "customer@example.com",
|
|
765
779
|
* country: "US",
|
|
766
780
|
* document: {
|
|
@@ -792,7 +806,7 @@ var KycClient = class extends BaseClient {
|
|
|
792
806
|
*
|
|
793
807
|
* @example
|
|
794
808
|
* ```typescript
|
|
795
|
-
* const kyc = await client.getKycRequest("
|
|
809
|
+
* const kyc = await client.getKycRequest("550e8400-e29b-41d4-a716-446655440000");
|
|
796
810
|
* console.log(`Status: ${kyc.status}, ID Verified: ${kyc.id_verified}`);
|
|
797
811
|
* ```
|
|
798
812
|
*/
|
|
@@ -867,7 +881,7 @@ var KycClient = class extends BaseClient {
|
|
|
867
881
|
* @example
|
|
868
882
|
* ```typescript
|
|
869
883
|
* await client.requestAdditionalDocuments({
|
|
870
|
-
* id: "
|
|
884
|
+
* id: "550e8400-e29b-41d4-a716-446655440000",
|
|
871
885
|
* document_types: ["address", "document_two"],
|
|
872
886
|
* message: "Please provide proof of address and secondary ID"
|
|
873
887
|
* });
|
|
@@ -888,7 +902,7 @@ var KycClient = class extends BaseClient {
|
|
|
888
902
|
*
|
|
889
903
|
* @example
|
|
890
904
|
* ```typescript
|
|
891
|
-
* const proofs = await client.getProofDownloadURLs("
|
|
905
|
+
* const proofs = await client.getProofDownloadURLs("550e8400-e29b-41d4-a716-446655440000");
|
|
892
906
|
* proofs.forEach(proof => {
|
|
893
907
|
* console.log(`${proof.type}: ${proof.url} (expires: ${proof.expires_at})`);
|
|
894
908
|
* });
|