vesant-sdk 1.6.4 → 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.
Files changed (51) hide show
  1. package/dist/compliance/index.js +21 -2
  2. package/dist/compliance/index.js.map +1 -1
  3. package/dist/compliance/index.mjs +21 -2
  4. package/dist/compliance/index.mjs.map +1 -1
  5. package/dist/decisions/index.js +1 -1
  6. package/dist/decisions/index.js.map +1 -1
  7. package/dist/decisions/index.mjs +1 -1
  8. package/dist/decisions/index.mjs.map +1 -1
  9. package/dist/fraud/index.js +1 -1
  10. package/dist/fraud/index.js.map +1 -1
  11. package/dist/fraud/index.mjs +1 -1
  12. package/dist/fraud/index.mjs.map +1 -1
  13. package/dist/geolocation/index.js +21 -2
  14. package/dist/geolocation/index.js.map +1 -1
  15. package/dist/geolocation/index.mjs +21 -2
  16. package/dist/geolocation/index.mjs.map +1 -1
  17. package/dist/index.d.mts +2 -2
  18. package/dist/index.d.ts +2 -2
  19. package/dist/index.js +26 -2
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.mjs +26 -2
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/kyc/core.js +1 -1
  24. package/dist/kyc/core.js.map +1 -1
  25. package/dist/kyc/core.mjs +1 -1
  26. package/dist/kyc/core.mjs.map +1 -1
  27. package/dist/kyc/index.d.mts +1 -1
  28. package/dist/kyc/index.d.ts +1 -1
  29. package/dist/kyc/index.js +1 -1
  30. package/dist/kyc/index.js.map +1 -1
  31. package/dist/kyc/index.mjs +1 -1
  32. package/dist/kyc/index.mjs.map +1 -1
  33. package/dist/react.js +1 -1
  34. package/dist/react.js.map +1 -1
  35. package/dist/react.mjs +1 -1
  36. package/dist/react.mjs.map +1 -1
  37. package/dist/risk-profile/index.js +1 -1
  38. package/dist/risk-profile/index.js.map +1 -1
  39. package/dist/risk-profile/index.mjs +1 -1
  40. package/dist/risk-profile/index.mjs.map +1 -1
  41. package/dist/scores/index.js +1 -1
  42. package/dist/scores/index.js.map +1 -1
  43. package/dist/scores/index.mjs +1 -1
  44. package/dist/scores/index.mjs.map +1 -1
  45. package/dist/tax/index.d.mts +6 -1
  46. package/dist/tax/index.d.ts +6 -1
  47. package/dist/tax/index.js +6 -1
  48. package/dist/tax/index.js.map +1 -1
  49. package/dist/tax/index.mjs +6 -1
  50. package/dist/tax/index.mjs.map +1 -1
  51. package/package.json +1 -1
@@ -224,7 +224,7 @@ function createConsoleLogger() {
224
224
  }
225
225
 
226
226
  // src/core/version.ts
227
- var SDK_VERSION = "1.6.4";
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(request)
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 {