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.
- package/dist/{client-BY4Quazn.d.ts → client-B3DCAHlg.d.ts} +1 -1
- package/dist/{client-Yxat9wAO.d.mts → client-BwXMQA2a.d.mts} +35 -1
- package/dist/{client-CX1jcLNZ.d.mts → client-D23KhWeh.d.mts} +1 -1
- package/dist/{client-C-u9lE8N.d.ts → client-fy3trF2K.d.ts} +35 -1
- package/dist/compliance/index.d.mts +2 -2
- package/dist/compliance/index.d.ts +2 -2
- package/dist/compliance/index.js +47 -2
- package/dist/compliance/index.js.map +1 -1
- package/dist/compliance/index.mjs +47 -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/geolocation/index.d.mts +2 -2
- package/dist/geolocation/index.d.ts +2 -2
- package/dist/geolocation/index.js +47 -2
- package/dist/geolocation/index.js.map +1 -1
- package/dist/geolocation/index.mjs +47 -2
- package/dist/geolocation/index.mjs.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +47 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +47 -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.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.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- 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.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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as CipherTextOptions, F as GeolocationConfigResponse, l as CipherTextResult, j as CipherTextPayload } from '../client-
|
|
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,
|
|
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-
|
|
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,
|
|
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.
|
|
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",
|