vesant-sdk 1.7.1-dev.ec505dc → 1.7.2-dev.5ca1247

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 (53) hide show
  1. package/dist/{client-BY4Quazn.d.ts → client-B3DCAHlg.d.ts} +1 -1
  2. package/dist/{client-Yxat9wAO.d.mts → client-BwXMQA2a.d.mts} +35 -1
  3. package/dist/{client-CX1jcLNZ.d.mts → client-D23KhWeh.d.mts} +1 -1
  4. package/dist/{client-C-u9lE8N.d.ts → client-fy3trF2K.d.ts} +35 -1
  5. package/dist/compliance/index.d.mts +2 -2
  6. package/dist/compliance/index.d.ts +2 -2
  7. package/dist/compliance/index.js +47 -2
  8. package/dist/compliance/index.js.map +1 -1
  9. package/dist/compliance/index.mjs +47 -2
  10. package/dist/compliance/index.mjs.map +1 -1
  11. package/dist/decisions/index.js +1 -1
  12. package/dist/decisions/index.js.map +1 -1
  13. package/dist/decisions/index.mjs +1 -1
  14. package/dist/decisions/index.mjs.map +1 -1
  15. package/dist/geolocation/index.d.mts +2 -2
  16. package/dist/geolocation/index.d.ts +2 -2
  17. package/dist/geolocation/index.js +47 -2
  18. package/dist/geolocation/index.js.map +1 -1
  19. package/dist/geolocation/index.mjs +47 -2
  20. package/dist/geolocation/index.mjs.map +1 -1
  21. package/dist/index.d.mts +3 -3
  22. package/dist/index.d.ts +3 -3
  23. package/dist/index.js +47 -2
  24. package/dist/index.js.map +1 -1
  25. package/dist/index.mjs +47 -2
  26. package/dist/index.mjs.map +1 -1
  27. package/dist/kyc/core.js +1 -1
  28. package/dist/kyc/core.js.map +1 -1
  29. package/dist/kyc/core.mjs +1 -1
  30. package/dist/kyc/core.mjs.map +1 -1
  31. package/dist/kyc/index.js +1 -1
  32. package/dist/kyc/index.js.map +1 -1
  33. package/dist/kyc/index.mjs +1 -1
  34. package/dist/kyc/index.mjs.map +1 -1
  35. package/dist/react.d.mts +2 -2
  36. package/dist/react.d.ts +2 -2
  37. package/dist/react.js +1 -1
  38. package/dist/react.js.map +1 -1
  39. package/dist/react.mjs +1 -1
  40. package/dist/react.mjs.map +1 -1
  41. package/dist/risk-profile/index.js +1 -1
  42. package/dist/risk-profile/index.js.map +1 -1
  43. package/dist/risk-profile/index.mjs +1 -1
  44. package/dist/risk-profile/index.mjs.map +1 -1
  45. package/dist/scores/index.js +1 -1
  46. package/dist/scores/index.js.map +1 -1
  47. package/dist/scores/index.mjs +1 -1
  48. package/dist/scores/index.mjs.map +1 -1
  49. package/dist/tax/index.js +1 -1
  50. package/dist/tax/index.js.map +1 -1
  51. package/dist/tax/index.mjs +1 -1
  52. package/dist/tax/index.mjs.map +1 -1
  53. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import { i as CipherTextOptions, F as GeolocationConfigResponse, l as CipherTextResult, j as CipherTextPayload } from '../client-Yxat9wAO.mjs';
2
- export { A as APIError, d as AlertFilters, e as AlertListResponse, f as AlertSeverity, g as AlertStatus, h as AlertType, C as CipherTextCustomerData, k as CipherTextReason, m as ComplianceCheckResponse, n as CreateGeofenceRuleRequest, o as CreateJurisdictionRequest, p as CreateLocationRequestRequest, q as DashboardMetrics, r as DecryptedCipherText, s as DeviceFingerprint, D as DeviceFingerprintRequest, t as DeviceSignalsEnvelope, u as DeviceTrustResult, v as GeoIPResult, w as GeofenceAction, x as GeofenceEvaluation, y as GeofenceRule, z as GeofenceRuleType, B as GeolocationAlert, G as GeolocationClient, E as GeolocationClientConfig, H as GeolocationRecord, J as JurisdictionConfig, I as LocationCaptureRequest, K as LocationCaptureResponse, a as LocationRequest, M as LocationRequestChannel, b as LocationRequestFilters, c as LocationRequestListResponse, N as LocationRequestResult, O as LocationRequestStatus, P as LocationShareInfo, L as LocationVerification, R as ResendLocationRequestRequest, U as UpdateDeviceTrustRequest, Q as UpdateGeofenceRuleRequest, S as UpdateJurisdictionRequest, T as UseAlertsOptions, W as UseAlertsResult, X as UseGeolocationOptions, Y as UseGeolocationResult, Z as UseLocationCaptureOptions, _ as UseLocationCaptureResult, $ as UseLocationRequestsOptions, a0 as UseLocationRequestsResult, a1 as ValidateCipherTextRequest, V as ValidateCipherTextResponse, a2 as VerifyIPRequest } from '../client-Yxat9wAO.mjs';
1
+ import { i as CipherTextOptions, F as GeolocationConfigResponse, l as CipherTextResult, j as CipherTextPayload } from '../client-BwXMQA2a.mjs';
2
+ export { A as APIError, d as AlertFilters, e as AlertListResponse, f as AlertSeverity, g as AlertStatus, h as AlertType, C as CipherTextCustomerData, k as CipherTextReason, m as ComplianceCheckResponse, n as CreateGeofenceRuleRequest, o as CreateJurisdictionRequest, p as CreateLocationRequestRequest, q as DashboardMetrics, r as DecryptedCipherText, s as DeviceFingerprint, D as DeviceFingerprintRequest, t as DeviceSignalsEnvelope, u as DeviceTrustResult, v as GeoIPResult, w as GeofenceAction, x as GeofenceEvaluation, y as GeofenceRule, z as GeofenceRuleType, B as GeolocationAlert, G as GeolocationClient, E as GeolocationClientConfig, H as GeolocationRecord, J as JurisdictionConfig, I as LocationCaptureRequest, K as LocationCaptureResponse, a as LocationRequest, M as LocationRequestChannel, b as LocationRequestFilters, c as LocationRequestListResponse, N as LocationRequestResult, O as LocationRequestStatus, P as LocationShareInfo, L as LocationVerification, R as ResendLocationRequestRequest, S as SignalsNonce, U as UpdateDeviceTrustRequest, Q as UpdateGeofenceRuleRequest, T as UpdateJurisdictionRequest, W as UseAlertsOptions, X as UseAlertsResult, Y as UseGeolocationOptions, Z as UseGeolocationResult, _ as UseLocationCaptureOptions, $ as UseLocationCaptureResult, a0 as UseLocationRequestsOptions, a1 as UseLocationRequestsResult, a2 as ValidateCipherTextRequest, V as ValidateCipherTextResponse, a3 as VerifyIPRequest } from '../client-BwXMQA2a.mjs';
3
3
  export { P as PaginationParams } from '../types-CBQRNL-l.mjs';
4
4
  import '../client-q9fN8Hhf.mjs';
5
5
 
@@ -1,5 +1,5 @@
1
- import { i as CipherTextOptions, F as GeolocationConfigResponse, l as CipherTextResult, j as CipherTextPayload } from '../client-C-u9lE8N.js';
2
- export { A as APIError, d as AlertFilters, e as AlertListResponse, f as AlertSeverity, g as AlertStatus, h as AlertType, C as CipherTextCustomerData, k as CipherTextReason, m as ComplianceCheckResponse, n as CreateGeofenceRuleRequest, o as CreateJurisdictionRequest, p as CreateLocationRequestRequest, q as DashboardMetrics, r as DecryptedCipherText, s as DeviceFingerprint, D as DeviceFingerprintRequest, t as DeviceSignalsEnvelope, u as DeviceTrustResult, v as GeoIPResult, w as GeofenceAction, x as GeofenceEvaluation, y as GeofenceRule, z as GeofenceRuleType, B as GeolocationAlert, G as GeolocationClient, E as GeolocationClientConfig, H as GeolocationRecord, J as JurisdictionConfig, I as LocationCaptureRequest, K as LocationCaptureResponse, a as LocationRequest, M as LocationRequestChannel, b as LocationRequestFilters, c as LocationRequestListResponse, N as LocationRequestResult, O as LocationRequestStatus, P as LocationShareInfo, L as LocationVerification, R as ResendLocationRequestRequest, U as UpdateDeviceTrustRequest, Q as UpdateGeofenceRuleRequest, S as UpdateJurisdictionRequest, T as UseAlertsOptions, W as UseAlertsResult, X as UseGeolocationOptions, Y as UseGeolocationResult, Z as UseLocationCaptureOptions, _ as UseLocationCaptureResult, $ as UseLocationRequestsOptions, a0 as UseLocationRequestsResult, a1 as ValidateCipherTextRequest, V as ValidateCipherTextResponse, a2 as VerifyIPRequest } from '../client-C-u9lE8N.js';
1
+ import { i as CipherTextOptions, F as GeolocationConfigResponse, l as CipherTextResult, j as CipherTextPayload } from '../client-fy3trF2K.js';
2
+ export { A as APIError, d as AlertFilters, e as AlertListResponse, f as AlertSeverity, g as AlertStatus, h as AlertType, C as CipherTextCustomerData, k as CipherTextReason, m as ComplianceCheckResponse, n as CreateGeofenceRuleRequest, o as CreateJurisdictionRequest, p as CreateLocationRequestRequest, q as DashboardMetrics, r as DecryptedCipherText, s as DeviceFingerprint, D as DeviceFingerprintRequest, t as DeviceSignalsEnvelope, u as DeviceTrustResult, v as GeoIPResult, w as GeofenceAction, x as GeofenceEvaluation, y as GeofenceRule, z as GeofenceRuleType, B as GeolocationAlert, G as GeolocationClient, E as GeolocationClientConfig, H as GeolocationRecord, J as JurisdictionConfig, I as LocationCaptureRequest, K as LocationCaptureResponse, a as LocationRequest, M as LocationRequestChannel, b as LocationRequestFilters, c as LocationRequestListResponse, N as LocationRequestResult, O as LocationRequestStatus, P as LocationShareInfo, L as LocationVerification, R as ResendLocationRequestRequest, S as SignalsNonce, U as UpdateDeviceTrustRequest, Q as UpdateGeofenceRuleRequest, T as UpdateJurisdictionRequest, W as UseAlertsOptions, X as UseAlertsResult, Y as UseGeolocationOptions, Z as UseGeolocationResult, _ as UseLocationCaptureOptions, $ as UseLocationCaptureResult, a0 as UseLocationRequestsOptions, a1 as UseLocationRequestsResult, a2 as ValidateCipherTextRequest, V as ValidateCipherTextResponse, a3 as VerifyIPRequest } from '../client-fy3trF2K.js';
3
3
  export { P as PaginationParams } from '../types-CBQRNL-l.js';
4
4
  import '../client-q9fN8Hhf.js';
5
5
 
@@ -229,7 +229,7 @@ function createConsoleLogger() {
229
229
  }
230
230
 
231
231
  // src/core/version.ts
232
- var SDK_VERSION = "1.7.1";
232
+ var SDK_VERSION = "1.7.2";
233
233
 
234
234
  // src/shared/browser-utils.ts
235
235
  function generateUUID() {
@@ -1014,6 +1014,49 @@ var GeolocationClient = class extends BaseClient {
1014
1014
  async getGPSConfig(requestOptions) {
1015
1015
  return this.requestWithRetry("/api/v1/geo/config", void 0, void 0, void 0, requestOptions);
1016
1016
  }
1017
+ /**
1018
+ * Mint a short-lived, single-use device-signals nonce.
1019
+ *
1020
+ * The nonce is bound to the tenant, user, and event type and is consumed
1021
+ * server-side during validation, so a captured device-signals envelope cannot
1022
+ * be replayed. `validateCipherText` mints and attaches one automatically; call
1023
+ * this directly only if you manage the nonce yourself.
1024
+ *
1025
+ * @param userId - User ID the nonce is bound to
1026
+ * @param eventType - Event type the nonce is bound to (login, registration, ...)
1027
+ * @returns The nonce and its expiry
1028
+ */
1029
+ async fetchSignalsNonce(userId, eventType, requestOptions) {
1030
+ if (!userId?.trim()) {
1031
+ throw new ValidationError("userId is required and must be a non-empty string", ["userId"]);
1032
+ }
1033
+ const request = { user_id: userId, event_type: eventType };
1034
+ return this.request(
1035
+ "/api/v1/geo/signals-token",
1036
+ {
1037
+ method: "POST",
1038
+ body: JSON.stringify(request)
1039
+ },
1040
+ void 0,
1041
+ requestOptions
1042
+ );
1043
+ }
1044
+ /**
1045
+ * Best-effort nonce mint for validation. Returns undefined if minting fails —
1046
+ * the server is the sole authority and blocks when a nonce is required, so this
1047
+ * never downgrades security on the client's say-so.
1048
+ */
1049
+ async resolveSignalsNonce(userId, eventType, requestOptions) {
1050
+ try {
1051
+ const { nonce } = await this.fetchSignalsNonce(userId, eventType, requestOptions);
1052
+ return nonce;
1053
+ } catch (err) {
1054
+ this.logger.warn(
1055
+ `Failed to mint device-signals nonce; proceeding without it: ${err instanceof Error ? err.message : String(err)}`
1056
+ );
1057
+ return void 0;
1058
+ }
1059
+ }
1017
1060
  // ============================================================================
1018
1061
  // CipherText Validation
1019
1062
  // ============================================================================
@@ -1065,12 +1108,14 @@ var GeolocationClient = class extends BaseClient {
1065
1108
  if (!userId?.trim()) {
1066
1109
  throw new ValidationError("userId is required and must be a non-empty string", ["userId"]);
1067
1110
  }
1111
+ const nonce = await this.resolveSignalsNonce(userId, eventType, requestOptions);
1068
1112
  const request = {
1069
1113
  cipher_text: cipherText,
1070
1114
  user_id: userId,
1071
1115
  event_type: eventType,
1072
1116
  expected_ip: expectedIP,
1073
- customer_data: customerData
1117
+ customer_data: customerData,
1118
+ nonce
1074
1119
  };
1075
1120
  return this.requestWithRetry(
1076
1121
  "/api/v1/geo/validate-ciphertext",