vesant-sdk 1.7.2 → 1.8.0-dev.2b9e28d
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-D23KhWeh.d.mts → client-5q4whhGu.d.mts} +1 -1
- package/dist/{client-fy3trF2K.d.ts → client-BaUekQT8.d.ts} +32 -10
- package/dist/{client-B3DCAHlg.d.ts → client-DUHC-68_.d.ts} +1 -1
- package/dist/{client-BwXMQA2a.d.mts → client-XDEhh9VN.d.mts} +32 -10
- package/dist/compliance/index.d.mts +2 -2
- package/dist/compliance/index.d.ts +2 -2
- package/dist/compliance/index.js +40 -2
- package/dist/compliance/index.js.map +1 -1
- package/dist/compliance/index.mjs +40 -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 +40 -2
- package/dist/geolocation/index.js.map +1 -1
- package/dist/geolocation/index.mjs +40 -2
- package/dist/geolocation/index.mjs.map +1 -1
- package/dist/{index-DSDgS09k.d.ts → index-BosFSGan.d.ts} +57 -2
- package/dist/{index-C3zUKydT.d.mts → index-C49a7fg2.d.mts} +57 -2
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +46 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +46 -3
- 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 +9 -2
- package/dist/react.d.ts +9 -2
- package/dist/react.js +15 -10
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +15 -10
- 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/dist/webhooks/index.d.mts +1 -1
- package/dist/webhooks/index.d.ts +1 -1
- package/dist/webhooks/index.js +6 -0
- package/dist/webhooks/index.js.map +1 -1
- package/dist/webhooks/index.mjs +6 -1
- package/dist/webhooks/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, 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-
|
|
1
|
+
import { i as CipherTextOptions, F as GeolocationConfigResponse, l as CipherTextResult, j as CipherTextPayload } from '../client-XDEhh9VN.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-XDEhh9VN.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, 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-
|
|
1
|
+
import { i as CipherTextOptions, F as GeolocationConfigResponse, l as CipherTextResult, j as CipherTextPayload } from '../client-BaUekQT8.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-BaUekQT8.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.
|
|
232
|
+
var SDK_VERSION = "1.8.0";
|
|
233
233
|
|
|
234
234
|
// src/shared/browser-utils.ts
|
|
235
235
|
function generateUUID() {
|
|
@@ -912,6 +912,7 @@ function isCipherTextExpired(cipherText) {
|
|
|
912
912
|
}
|
|
913
913
|
|
|
914
914
|
// src/geolocation/client.ts
|
|
915
|
+
var DEFAULT_GPS_CONFIG_TTL_MS = 5 * 60 * 1e3;
|
|
915
916
|
var GeolocationClient = class extends BaseClient {
|
|
916
917
|
constructor(config) {
|
|
917
918
|
const baseConfig = {
|
|
@@ -927,6 +928,8 @@ var GeolocationClient = class extends BaseClient {
|
|
|
927
928
|
environment: config.environment
|
|
928
929
|
};
|
|
929
930
|
super(baseConfig);
|
|
931
|
+
this.gpsConfigCache = null;
|
|
932
|
+
this.gpsConfigTtlMs = config.gpsConfigTtlMs ?? DEFAULT_GPS_CONFIG_TTL_MS;
|
|
930
933
|
}
|
|
931
934
|
// ============================================================================
|
|
932
935
|
// IP Verification & Compliance
|
|
@@ -1012,7 +1015,42 @@ var GeolocationClient = class extends BaseClient {
|
|
|
1012
1015
|
* ```
|
|
1013
1016
|
*/
|
|
1014
1017
|
async getGPSConfig(requestOptions) {
|
|
1015
|
-
|
|
1018
|
+
const cached = this.gpsConfigCache;
|
|
1019
|
+
if (cached && cached.expiresAt > Date.now()) {
|
|
1020
|
+
return cached.value;
|
|
1021
|
+
}
|
|
1022
|
+
return this.refreshGPSConfig(requestOptions);
|
|
1023
|
+
}
|
|
1024
|
+
/**
|
|
1025
|
+
* Re-read the tenant's GPS requirement configuration, ignoring any copy held
|
|
1026
|
+
* from an earlier read.
|
|
1027
|
+
*
|
|
1028
|
+
* These requirements are edited in the compliance console while your
|
|
1029
|
+
* application is running. `getGPSConfig` reuses a fetched copy for a short
|
|
1030
|
+
* period so a long-lived session does not call the API on every event; call
|
|
1031
|
+
* this when you need a change to take effect immediately — for example right
|
|
1032
|
+
* after an administrator saves new settings.
|
|
1033
|
+
*
|
|
1034
|
+
* @returns The current GPS requirement config per event type
|
|
1035
|
+
*
|
|
1036
|
+
* @example
|
|
1037
|
+
* ```typescript
|
|
1038
|
+
* const config = await client.refreshGPSConfig();
|
|
1039
|
+
* if (config.require_gps.login) {
|
|
1040
|
+
* // GPS is now required for login
|
|
1041
|
+
* }
|
|
1042
|
+
* ```
|
|
1043
|
+
*/
|
|
1044
|
+
async refreshGPSConfig(requestOptions) {
|
|
1045
|
+
const value = await this.requestWithRetry(
|
|
1046
|
+
"/api/v1/geo/config",
|
|
1047
|
+
void 0,
|
|
1048
|
+
void 0,
|
|
1049
|
+
void 0,
|
|
1050
|
+
requestOptions
|
|
1051
|
+
);
|
|
1052
|
+
this.gpsConfigCache = { value, expiresAt: Date.now() + this.gpsConfigTtlMs };
|
|
1053
|
+
return value;
|
|
1016
1054
|
}
|
|
1017
1055
|
/**
|
|
1018
1056
|
* Mint a short-lived, single-use device-signals nonce.
|