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.mjs
CHANGED
|
@@ -601,7 +601,13 @@ var KycClient = class extends BaseClient {
|
|
|
601
601
|
*
|
|
602
602
|
* Generates a link that the user can visit to submit their KYC documents.
|
|
603
603
|
*
|
|
604
|
-
*
|
|
604
|
+
* Optionally pass the customer's registered identity data as
|
|
605
|
+
* `customer_data` (same shape as the geolocation `customer_data` block).
|
|
606
|
+
* It seeds the customer's risk profile so document verification can
|
|
607
|
+
* cross-check the submitted document against trusted reference data;
|
|
608
|
+
* fields never overwrite data already on the profile.
|
|
609
|
+
*
|
|
610
|
+
* @param request - Request containing the user ID, optional redirect URL, optional callback URL (receives POST requests), and optional customer identity data
|
|
605
611
|
* @returns Response containing the redirect link and KYC ID
|
|
606
612
|
*
|
|
607
613
|
* @example
|
|
@@ -609,7 +615,15 @@ var KycClient = class extends BaseClient {
|
|
|
609
615
|
* const result = await client.requestKycSubmitLink({
|
|
610
616
|
* user_id: "user_123",
|
|
611
617
|
* redirect_url: "https://merchant.com/kyc-complete", // optional
|
|
612
|
-
* callback_url: "https://merchant.com/api/kyc-webhook" // optional - receives POST requests on status change
|
|
618
|
+
* callback_url: "https://merchant.com/api/kyc-webhook", // optional - receives POST requests on status change
|
|
619
|
+
* customer_data: { // optional - seeds the risk profile for document cross-checks
|
|
620
|
+
* full_name: "John Doe",
|
|
621
|
+
* date_of_birth: "1999-06-02", // ISO 8601
|
|
622
|
+
* email: "john@example.com",
|
|
623
|
+
* phone: "+94771234567",
|
|
624
|
+
* address: "12 Main St, Colombo", // used for address verification
|
|
625
|
+
* country: "LK"
|
|
626
|
+
* }
|
|
613
627
|
* });
|
|
614
628
|
*
|
|
615
629
|
* console.log(`Redirect user to: ${result.link}`);
|
|
@@ -758,7 +772,7 @@ var KycClient = class extends BaseClient {
|
|
|
758
772
|
* @example
|
|
759
773
|
* ```typescript
|
|
760
774
|
* const result = await client.submitVerification({
|
|
761
|
-
* reference: "
|
|
775
|
+
* reference: "4d2aff34-ab86-422d-992e-50b1234a5b67",
|
|
762
776
|
* email: "customer@example.com",
|
|
763
777
|
* country: "US",
|
|
764
778
|
* document: {
|
|
@@ -790,7 +804,7 @@ var KycClient = class extends BaseClient {
|
|
|
790
804
|
*
|
|
791
805
|
* @example
|
|
792
806
|
* ```typescript
|
|
793
|
-
* const kyc = await client.getKycRequest("
|
|
807
|
+
* const kyc = await client.getKycRequest("550e8400-e29b-41d4-a716-446655440000");
|
|
794
808
|
* console.log(`Status: ${kyc.status}, ID Verified: ${kyc.id_verified}`);
|
|
795
809
|
* ```
|
|
796
810
|
*/
|
|
@@ -865,7 +879,7 @@ var KycClient = class extends BaseClient {
|
|
|
865
879
|
* @example
|
|
866
880
|
* ```typescript
|
|
867
881
|
* await client.requestAdditionalDocuments({
|
|
868
|
-
* id: "
|
|
882
|
+
* id: "550e8400-e29b-41d4-a716-446655440000",
|
|
869
883
|
* document_types: ["address", "document_two"],
|
|
870
884
|
* message: "Please provide proof of address and secondary ID"
|
|
871
885
|
* });
|
|
@@ -886,7 +900,7 @@ var KycClient = class extends BaseClient {
|
|
|
886
900
|
*
|
|
887
901
|
* @example
|
|
888
902
|
* ```typescript
|
|
889
|
-
* const proofs = await client.getProofDownloadURLs("
|
|
903
|
+
* const proofs = await client.getProofDownloadURLs("550e8400-e29b-41d4-a716-446655440000");
|
|
890
904
|
* proofs.forEach(proof => {
|
|
891
905
|
* console.log(`${proof.type}: ${proof.url} (expires: ${proof.expires_at})`);
|
|
892
906
|
* });
|