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.mjs CHANGED
@@ -2707,7 +2707,13 @@ var KycClient = class extends BaseClient {
2707
2707
  *
2708
2708
  * Generates a link that the user can visit to submit their KYC documents.
2709
2709
  *
2710
- * @param request - Request containing the user ID, optional redirect URL, and optional callback URL (receives POST requests)
2710
+ * Optionally pass the customer's registered identity data as
2711
+ * `customer_data` (same shape as the geolocation `customer_data` block).
2712
+ * It seeds the customer's risk profile so document verification can
2713
+ * cross-check the submitted document against trusted reference data;
2714
+ * fields never overwrite data already on the profile.
2715
+ *
2716
+ * @param request - Request containing the user ID, optional redirect URL, optional callback URL (receives POST requests), and optional customer identity data
2711
2717
  * @returns Response containing the redirect link and KYC ID
2712
2718
  *
2713
2719
  * @example
@@ -2715,7 +2721,15 @@ var KycClient = class extends BaseClient {
2715
2721
  * const result = await client.requestKycSubmitLink({
2716
2722
  * user_id: "user_123",
2717
2723
  * redirect_url: "https://merchant.com/kyc-complete", // optional
2718
- * callback_url: "https://merchant.com/api/kyc-webhook" // optional - receives POST requests on status change
2724
+ * callback_url: "https://merchant.com/api/kyc-webhook", // optional - receives POST requests on status change
2725
+ * customer_data: { // optional - seeds the risk profile for document cross-checks
2726
+ * full_name: "John Doe",
2727
+ * date_of_birth: "1999-06-02", // ISO 8601
2728
+ * email: "john@example.com",
2729
+ * phone: "+94771234567",
2730
+ * address: "12 Main St, Colombo", // used for address verification
2731
+ * country: "LK"
2732
+ * }
2719
2733
  * });
2720
2734
  *
2721
2735
  * console.log(`Redirect user to: ${result.link}`);
@@ -2864,7 +2878,7 @@ var KycClient = class extends BaseClient {
2864
2878
  * @example
2865
2879
  * ```typescript
2866
2880
  * const result = await client.submitVerification({
2867
- * reference: "customer_123",
2881
+ * reference: "4d2aff34-ab86-422d-992e-50b1234a5b67",
2868
2882
  * email: "customer@example.com",
2869
2883
  * country: "US",
2870
2884
  * document: {
@@ -2896,7 +2910,7 @@ var KycClient = class extends BaseClient {
2896
2910
  *
2897
2911
  * @example
2898
2912
  * ```typescript
2899
- * const kyc = await client.getKycRequest("kyc_abc123");
2913
+ * const kyc = await client.getKycRequest("550e8400-e29b-41d4-a716-446655440000");
2900
2914
  * console.log(`Status: ${kyc.status}, ID Verified: ${kyc.id_verified}`);
2901
2915
  * ```
2902
2916
  */
@@ -2971,7 +2985,7 @@ var KycClient = class extends BaseClient {
2971
2985
  * @example
2972
2986
  * ```typescript
2973
2987
  * await client.requestAdditionalDocuments({
2974
- * id: "kyc_abc123",
2988
+ * id: "550e8400-e29b-41d4-a716-446655440000",
2975
2989
  * document_types: ["address", "document_two"],
2976
2990
  * message: "Please provide proof of address and secondary ID"
2977
2991
  * });
@@ -2992,7 +3006,7 @@ var KycClient = class extends BaseClient {
2992
3006
  *
2993
3007
  * @example
2994
3008
  * ```typescript
2995
- * const proofs = await client.getProofDownloadURLs("kyc_abc123");
3009
+ * const proofs = await client.getProofDownloadURLs("550e8400-e29b-41d4-a716-446655440000");
2996
3010
  * proofs.forEach(proof => {
2997
3011
  * console.log(`${proof.type}: ${proof.url} (expires: ${proof.expires_at})`);
2998
3012
  * });