vesant-sdk 1.6.3 → 1.6.5
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/compliance/index.js +21 -2
- package/dist/compliance/index.js.map +1 -1
- package/dist/compliance/index.mjs +21 -2
- package/dist/compliance/index.mjs.map +1 -1
- package/dist/decisions/index.js +1 -1
- package/dist/decisions/index.js.map +1 -1
- package/dist/decisions/index.mjs +1 -1
- package/dist/decisions/index.mjs.map +1 -1
- package/dist/fraud/index.js +1 -1
- package/dist/fraud/index.js.map +1 -1
- package/dist/fraud/index.mjs +1 -1
- package/dist/fraud/index.mjs.map +1 -1
- package/dist/geolocation/index.js +21 -2
- package/dist/geolocation/index.js.map +1 -1
- package/dist/geolocation/index.mjs +21 -2
- package/dist/geolocation/index.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +26 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -2
- package/dist/index.mjs.map +1 -1
- package/dist/kyc/core.js +1 -1
- package/dist/kyc/core.js.map +1 -1
- package/dist/kyc/core.mjs +1 -1
- package/dist/kyc/core.mjs.map +1 -1
- package/dist/kyc/index.d.mts +28 -9
- package/dist/kyc/index.d.ts +28 -9
- package/dist/kyc/index.js +1 -1
- package/dist/kyc/index.js.map +1 -1
- package/dist/kyc/index.mjs +1 -1
- package/dist/kyc/index.mjs.map +1 -1
- package/dist/react.js +1 -1
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +1 -1
- package/dist/react.mjs.map +1 -1
- package/dist/risk-profile/index.js +1 -1
- package/dist/risk-profile/index.js.map +1 -1
- package/dist/risk-profile/index.mjs +1 -1
- package/dist/risk-profile/index.mjs.map +1 -1
- package/dist/scores/index.js +1 -1
- package/dist/scores/index.js.map +1 -1
- package/dist/scores/index.mjs +1 -1
- package/dist/scores/index.mjs.map +1 -1
- package/dist/tax/index.d.mts +6 -1
- package/dist/tax/index.d.ts +6 -1
- package/dist/tax/index.js +6 -1
- package/dist/tax/index.js.map +1 -1
- package/dist/tax/index.mjs +6 -1
- package/dist/tax/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/compliance/index.js
CHANGED
|
@@ -224,7 +224,7 @@ function createConsoleLogger() {
|
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
// src/core/version.ts
|
|
227
|
-
var SDK_VERSION = "1.6.
|
|
227
|
+
var SDK_VERSION = "1.6.5";
|
|
228
228
|
|
|
229
229
|
// src/shared/browser-utils.ts
|
|
230
230
|
function generateUUID() {
|
|
@@ -847,9 +847,10 @@ var GeolocationClient = class extends BaseClient {
|
|
|
847
847
|
if (!request.ip_address?.trim()) {
|
|
848
848
|
throw new ValidationError("ip_address is required and must be a non-empty string", ["ip_address"]);
|
|
849
849
|
}
|
|
850
|
+
const enrichedRequest = request.device_fingerprint ? request : { ...request, device_fingerprint: collectDeviceFingerprint() };
|
|
850
851
|
return this.requestWithRetry("/api/v1/geo/verify", {
|
|
851
852
|
method: "POST",
|
|
852
|
-
body: JSON.stringify(
|
|
853
|
+
body: JSON.stringify(enrichedRequest)
|
|
853
854
|
}, void 0, void 0, requestOptions);
|
|
854
855
|
}
|
|
855
856
|
/**
|
|
@@ -1253,6 +1254,24 @@ var GeolocationClient = class extends BaseClient {
|
|
|
1253
1254
|
// Utility Methods (inherited from BaseClient: healthCheck, updateConfig, getConfig, buildQueryString)
|
|
1254
1255
|
// ============================================================================
|
|
1255
1256
|
};
|
|
1257
|
+
function collectDeviceFingerprint() {
|
|
1258
|
+
const deviceId = generateDeviceId();
|
|
1259
|
+
const browserInfo = getBrowserInfo();
|
|
1260
|
+
const userAgent = typeof navigator !== "undefined" ? navigator.userAgent : "server";
|
|
1261
|
+
const platform = typeof navigator !== "undefined" ? navigator.platform || "unknown" : "server";
|
|
1262
|
+
return {
|
|
1263
|
+
device_id: deviceId,
|
|
1264
|
+
user_agent: userAgent,
|
|
1265
|
+
platform,
|
|
1266
|
+
browser: browserInfo.browser,
|
|
1267
|
+
browser_version: browserInfo.browser_version,
|
|
1268
|
+
os: browserInfo.os,
|
|
1269
|
+
os_version: browserInfo.os_version,
|
|
1270
|
+
screen_resolution: typeof screen !== "undefined" ? `${screen.width}x${screen.height}` : void 0,
|
|
1271
|
+
language: typeof navigator !== "undefined" ? navigator.language : void 0,
|
|
1272
|
+
timezone: Intl?.DateTimeFormat?.()?.resolvedOptions?.()?.timeZone
|
|
1273
|
+
};
|
|
1274
|
+
}
|
|
1256
1275
|
|
|
1257
1276
|
// src/risk-profile/client.ts
|
|
1258
1277
|
var RiskProfileClient = class extends BaseClient {
|