vesant-sdk 1.7.0-dev.295e11e → 1.7.0-dev.31b7b05
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/{client-ZNdnpWe7.d.mts → client-B0qhE2kr.d.mts} +1 -1
- package/dist/{client-DoMSYMMR.d.ts → client-DF7hlMEz.d.ts} +13 -0
- package/dist/{client-DMIRx7Tu.d.mts → client-DrjgZoH_.d.mts} +13 -0
- package/dist/{client-C3DCmGe9.d.ts → client-DtH2RLuy.d.ts} +1 -1
- package/dist/compliance/index.d.mts +2 -2
- package/dist/compliance/index.d.ts +2 -2
- package/dist/compliance/index.js +0 -3
- package/dist/compliance/index.js.map +1 -1
- package/dist/compliance/index.mjs +0 -3
- package/dist/compliance/index.mjs.map +1 -1
- package/dist/geolocation/index.d.mts +2 -2
- package/dist/geolocation/index.d.ts +2 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +21 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -10
- 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 +106 -9
- package/dist/kyc/index.d.ts +106 -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/dist/react.d.mts +4 -2
- package/dist/react.d.ts +4 -2
- package/dist/react.js +112 -73
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +112 -73
- package/dist/react.mjs.map +1 -1
- package/dist/tax/index.js +1 -1
- package/dist/tax/index.js.map +1 -1
- package/dist/tax/index.mjs +1 -1
- package/dist/tax/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1798,9 +1798,6 @@ var ComplianceClient = class {
|
|
|
1798
1798
|
if (cipherTextResult.risk?.is_blocked) {
|
|
1799
1799
|
blockReasons.push(...cipherTextResult.risk.block_reasons_structured ?? []);
|
|
1800
1800
|
}
|
|
1801
|
-
if (cipherTextResult.risk?.location_mismatch) {
|
|
1802
|
-
blockReasons.push(sdkReasons.gpsIPMismatch());
|
|
1803
|
-
}
|
|
1804
1801
|
}
|
|
1805
1802
|
if (geoVerification.gps_required && !cipherTextResult) {
|
|
1806
1803
|
blockReasons.push(sdkReasons.gpsRequired());
|
|
@@ -2710,7 +2707,13 @@ var KycClient = class extends BaseClient {
|
|
|
2710
2707
|
*
|
|
2711
2708
|
* Generates a link that the user can visit to submit their KYC documents.
|
|
2712
2709
|
*
|
|
2713
|
-
*
|
|
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
|
|
2714
2717
|
* @returns Response containing the redirect link and KYC ID
|
|
2715
2718
|
*
|
|
2716
2719
|
* @example
|
|
@@ -2718,7 +2721,15 @@ var KycClient = class extends BaseClient {
|
|
|
2718
2721
|
* const result = await client.requestKycSubmitLink({
|
|
2719
2722
|
* user_id: "user_123",
|
|
2720
2723
|
* redirect_url: "https://merchant.com/kyc-complete", // optional
|
|
2721
|
-
* 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
|
+
* }
|
|
2722
2733
|
* });
|
|
2723
2734
|
*
|
|
2724
2735
|
* console.log(`Redirect user to: ${result.link}`);
|
|
@@ -2867,7 +2878,7 @@ var KycClient = class extends BaseClient {
|
|
|
2867
2878
|
* @example
|
|
2868
2879
|
* ```typescript
|
|
2869
2880
|
* const result = await client.submitVerification({
|
|
2870
|
-
* reference: "
|
|
2881
|
+
* reference: "4d2aff34-ab86-422d-992e-50b1234a5b67",
|
|
2871
2882
|
* email: "customer@example.com",
|
|
2872
2883
|
* country: "US",
|
|
2873
2884
|
* document: {
|
|
@@ -2899,7 +2910,7 @@ var KycClient = class extends BaseClient {
|
|
|
2899
2910
|
*
|
|
2900
2911
|
* @example
|
|
2901
2912
|
* ```typescript
|
|
2902
|
-
* const kyc = await client.getKycRequest("
|
|
2913
|
+
* const kyc = await client.getKycRequest("550e8400-e29b-41d4-a716-446655440000");
|
|
2903
2914
|
* console.log(`Status: ${kyc.status}, ID Verified: ${kyc.id_verified}`);
|
|
2904
2915
|
* ```
|
|
2905
2916
|
*/
|
|
@@ -2974,7 +2985,7 @@ var KycClient = class extends BaseClient {
|
|
|
2974
2985
|
* @example
|
|
2975
2986
|
* ```typescript
|
|
2976
2987
|
* await client.requestAdditionalDocuments({
|
|
2977
|
-
* id: "
|
|
2988
|
+
* id: "550e8400-e29b-41d4-a716-446655440000",
|
|
2978
2989
|
* document_types: ["address", "document_two"],
|
|
2979
2990
|
* message: "Please provide proof of address and secondary ID"
|
|
2980
2991
|
* });
|
|
@@ -2995,7 +3006,7 @@ var KycClient = class extends BaseClient {
|
|
|
2995
3006
|
*
|
|
2996
3007
|
* @example
|
|
2997
3008
|
* ```typescript
|
|
2998
|
-
* const proofs = await client.getProofDownloadURLs("
|
|
3009
|
+
* const proofs = await client.getProofDownloadURLs("550e8400-e29b-41d4-a716-446655440000");
|
|
2999
3010
|
* proofs.forEach(proof => {
|
|
3000
3011
|
* console.log(`${proof.type}: ${proof.url} (expires: ${proof.expires_at})`);
|
|
3001
3012
|
* });
|
|
@@ -3355,7 +3366,7 @@ var TaxClient = class extends BaseClient {
|
|
|
3355
3366
|
}
|
|
3356
3367
|
async getCustomerDocuments(customerID) {
|
|
3357
3368
|
return this.request(
|
|
3358
|
-
`/api/v1/
|
|
3369
|
+
`/api/v1/tm/customer-tax-profiles/${customerID}/documents`
|
|
3359
3370
|
);
|
|
3360
3371
|
}
|
|
3361
3372
|
async downloadTaxForm(customerID, requestOptions) {
|