vesant-sdk 1.6.5 → 1.6.6-next.72429ce
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-ePzhQKp9.d.mts → client-BolQlL5e.d.mts} +1 -1
- package/dist/{client-ePzhQKp9.d.ts → client-BolQlL5e.d.ts} +1 -1
- package/dist/{client-BlCxjbY2.d.mts → client-D6PE3pcB.d.mts} +2 -2
- package/dist/{client-C_A7QLcB.d.ts → client-DPtiuQvW.d.ts} +2 -2
- package/dist/compliance/index.d.mts +4 -4
- package/dist/compliance/index.d.ts +4 -4
- package/dist/compliance/index.js +5 -21
- package/dist/compliance/index.js.map +1 -1
- package/dist/compliance/index.mjs +5 -21
- package/dist/compliance/index.mjs.map +1 -1
- package/dist/decisions/index.d.mts +1 -1
- package/dist/decisions/index.d.ts +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 +3 -3
- package/dist/geolocation/index.d.ts +3 -3
- package/dist/geolocation/index.js +2 -21
- package/dist/geolocation/index.js.map +1 -1
- package/dist/geolocation/index.mjs +2 -21
- package/dist/geolocation/index.mjs.map +1 -1
- package/dist/index.d.mts +9 -68
- package/dist/index.d.ts +9 -68
- package/dist/index.js +11 -191
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -190
- package/dist/index.mjs.map +1 -1
- package/dist/kyc/core.d.mts +3 -3
- package/dist/kyc/core.d.ts +3 -3
- package/dist/kyc/core.js +7 -11
- package/dist/kyc/core.js.map +1 -1
- package/dist/kyc/core.mjs +7 -11
- package/dist/kyc/core.mjs.map +1 -1
- package/dist/kyc/index.d.mts +15 -26
- package/dist/kyc/index.d.ts +15 -26
- package/dist/kyc/index.js +7 -11
- package/dist/kyc/index.js.map +1 -1
- package/dist/kyc/index.mjs +7 -11
- package/dist/kyc/index.mjs.map +1 -1
- package/dist/react.d.mts +5 -5
- package/dist/react.d.ts +5 -5
- 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.d.mts +3 -3
- package/dist/risk-profile/index.d.ts +3 -3
- 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.d.mts +1 -1
- package/dist/scores/index.d.ts +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 -41
- package/dist/tax/index.d.ts +6 -41
- package/dist/tax/index.js +1 -36
- package/dist/tax/index.js.map +1 -1
- package/dist/tax/index.mjs +1 -36
- package/dist/tax/index.mjs.map +1 -1
- package/dist/{types-1RzYeSal.d.mts → types-DGDVnogO.d.mts} +1 -1
- package/dist/{types-X5Md_dD_.d.ts → types-_YQdS3Ax.d.ts} +1 -1
- package/dist/webhooks/index.d.mts +177 -2
- package/dist/webhooks/index.d.ts +177 -2
- package/package.json +16 -13
- package/dist/fraud/index.d.mts +0 -80
- package/dist/fraud/index.d.ts +0 -80
- package/dist/fraud/index.js +0 -606
- package/dist/fraud/index.js.map +0 -1
- package/dist/fraud/index.mjs +0 -604
- package/dist/fraud/index.mjs.map +0 -1
- package/dist/index-B04H4xfJ.d.mts +0 -320
- package/dist/index-CItMPmLL.d.ts +0 -320
|
@@ -237,4 +237,4 @@ declare abstract class BaseClient {
|
|
|
237
237
|
}>;
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
export { BaseClient as B, type
|
|
240
|
+
export { BaseClient as B, type CGSConfig as C, type Logger as L, type RequestOptions as R, type VesantConfig as V, type BaseClientConfig as a, CircuitBreaker as b, type CircuitBreakerConfig as c, type CircuitBreakerState as d, type CircuitBreakerStatus as e, type RateLimitStatus as f, RateLimitTracker as g, type RequestInterceptor as h, type RequiredBaseClientConfig as i, type RequiredCGSConfig as j, type RequiredVesantConfig as k };
|
|
@@ -237,4 +237,4 @@ declare abstract class BaseClient {
|
|
|
237
237
|
}>;
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
export { BaseClient as B, type
|
|
240
|
+
export { BaseClient as B, type CGSConfig as C, type Logger as L, type RequestOptions as R, type VesantConfig as V, type BaseClientConfig as a, CircuitBreaker as b, type CircuitBreakerConfig as c, type CircuitBreakerState as d, type CircuitBreakerStatus as e, type RateLimitStatus as f, RateLimitTracker as g, type RequestInterceptor as h, type RequiredBaseClientConfig as i, type RequiredCGSConfig as j, type RequiredVesantConfig as k };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as Logger, B as BaseClient, R as RequestOptions } from './client-
|
|
1
|
+
import { L as Logger, B as BaseClient, R as RequestOptions } from './client-BolQlL5e.mjs';
|
|
2
2
|
import { P as PaginationParams } from './types-B4Ezqo7V.mjs';
|
|
3
3
|
|
|
4
4
|
interface DeviceFingerprintRequest {
|
|
@@ -1016,4 +1016,4 @@ declare class GeolocationClient extends BaseClient {
|
|
|
1016
1016
|
generateCipherText(options: Omit<CipherTextOptions, 'apiKey' | 'signingKey'>, gpsConfig?: GeolocationConfigResponse): Promise<CipherTextResult>;
|
|
1017
1017
|
}
|
|
1018
1018
|
|
|
1019
|
-
export { type
|
|
1019
|
+
export { type ValidateCipherTextRequest as $, type APIError as A, type LocationCaptureResponse as B, type CipherTextCustomerData as C, type DashboardMetrics as D, type LocationRequest as E, type LocationRequestChannel as F, type GeoIPResult as G, type LocationRequestFilters as H, type LocationRequestListResponse as I, type JurisdictionConfig as J, type LocationRequestResult as K, type LocationCaptureRequest as L, type LocationRequestStatus as M, type LocationShareInfo as N, type LocationVerification as O, type UpdateGeofenceRuleRequest as P, type UpdateJurisdictionRequest as Q, type ResendLocationRequestRequest as R, type UseAlertsOptions as S, type UseAlertsResult as T, type UpdateDeviceTrustRequest as U, type UseGeolocationOptions as V, type UseGeolocationResult as W, type UseLocationCaptureOptions as X, type UseLocationCaptureResult as Y, type UseLocationRequestsOptions as Z, type UseLocationRequestsResult as _, type AlertFilters as a, type ValidateCipherTextResponse as a0, type VerifyIPRequest as a1, type WiFiNetwork as a2, type AlertListResponse as b, type AlertSeverity as c, type AlertStatus as d, type AlertType as e, type CipherTextOptions as f, type CipherTextPayload as g, type CipherTextReason as h, type CipherTextResult as i, type ComplianceCheckResponse as j, type CreateGeofenceRuleRequest as k, type CreateJurisdictionRequest as l, type CreateLocationRequestRequest as m, type DecryptedCipherText as n, type DeviceFingerprint as o, type DeviceFingerprintRequest as p, type DeviceTrustResult as q, type GeofenceAction as r, type GeofenceEvaluation as s, type GeofenceRule as t, type GeofenceRuleType as u, type GeolocationAlert as v, GeolocationClient as w, type GeolocationClientConfig as x, type GeolocationConfigResponse as y, type GeolocationRecord as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as Logger, B as BaseClient, R as RequestOptions } from './client-
|
|
1
|
+
import { L as Logger, B as BaseClient, R as RequestOptions } from './client-BolQlL5e.js';
|
|
2
2
|
import { P as PaginationParams } from './types-B4Ezqo7V.js';
|
|
3
3
|
|
|
4
4
|
interface DeviceFingerprintRequest {
|
|
@@ -1016,4 +1016,4 @@ declare class GeolocationClient extends BaseClient {
|
|
|
1016
1016
|
generateCipherText(options: Omit<CipherTextOptions, 'apiKey' | 'signingKey'>, gpsConfig?: GeolocationConfigResponse): Promise<CipherTextResult>;
|
|
1017
1017
|
}
|
|
1018
1018
|
|
|
1019
|
-
export { type
|
|
1019
|
+
export { type ValidateCipherTextRequest as $, type APIError as A, type LocationCaptureResponse as B, type CipherTextCustomerData as C, type DashboardMetrics as D, type LocationRequest as E, type LocationRequestChannel as F, type GeoIPResult as G, type LocationRequestFilters as H, type LocationRequestListResponse as I, type JurisdictionConfig as J, type LocationRequestResult as K, type LocationCaptureRequest as L, type LocationRequestStatus as M, type LocationShareInfo as N, type LocationVerification as O, type UpdateGeofenceRuleRequest as P, type UpdateJurisdictionRequest as Q, type ResendLocationRequestRequest as R, type UseAlertsOptions as S, type UseAlertsResult as T, type UpdateDeviceTrustRequest as U, type UseGeolocationOptions as V, type UseGeolocationResult as W, type UseLocationCaptureOptions as X, type UseLocationCaptureResult as Y, type UseLocationRequestsOptions as Z, type UseLocationRequestsResult as _, type AlertFilters as a, type ValidateCipherTextResponse as a0, type VerifyIPRequest as a1, type WiFiNetwork as a2, type AlertListResponse as b, type AlertSeverity as c, type AlertStatus as d, type AlertType as e, type CipherTextOptions as f, type CipherTextPayload as g, type CipherTextReason as h, type CipherTextResult as i, type ComplianceCheckResponse as j, type CreateGeofenceRuleRequest as k, type CreateJurisdictionRequest as l, type CreateLocationRequestRequest as m, type DecryptedCipherText as n, type DeviceFingerprint as o, type DeviceFingerprintRequest as p, type DeviceTrustResult as q, type GeofenceAction as r, type GeofenceEvaluation as s, type GeofenceRule as t, type GeofenceRuleType as u, type GeolocationAlert as v, GeolocationClient as w, type GeolocationClientConfig as x, type GeolocationConfigResponse as y, type GeolocationRecord as z };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { p as DeviceFingerprintRequest, O as LocationVerification, a0 as ValidateCipherTextResponse, E as LocationRequest, w as GeolocationClient, H as LocationRequestFilters, I as LocationRequestListResponse } from '../client-D6PE3pcB.mjs';
|
|
2
|
+
export { m as CreateLocationRequestRequest, L as LocationCaptureRequest, B as LocationCaptureResponse, F as LocationRequestChannel, K as LocationRequestResult, M as LocationRequestStatus, N as LocationShareInfo, R as ResendLocationRequestRequest } from '../client-D6PE3pcB.mjs';
|
|
3
3
|
import { RiskProfileClient } from '../risk-profile/index.mjs';
|
|
4
|
-
import { V as VesantConfig, R as RequestOptions } from '../client-
|
|
5
|
-
import {
|
|
4
|
+
import { V as VesantConfig, R as RequestOptions } from '../client-BolQlL5e.mjs';
|
|
5
|
+
import { a as CustomerProfile } from '../types-DGDVnogO.mjs';
|
|
6
6
|
import { E as EntityType, P as PaginationParams } from '../types-B4Ezqo7V.mjs';
|
|
7
7
|
|
|
8
8
|
interface RegistrationVerificationRequest {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { p as DeviceFingerprintRequest, O as LocationVerification, a0 as ValidateCipherTextResponse, E as LocationRequest, w as GeolocationClient, H as LocationRequestFilters, I as LocationRequestListResponse } from '../client-DPtiuQvW.js';
|
|
2
|
+
export { m as CreateLocationRequestRequest, L as LocationCaptureRequest, B as LocationCaptureResponse, F as LocationRequestChannel, K as LocationRequestResult, M as LocationRequestStatus, N as LocationShareInfo, R as ResendLocationRequestRequest } from '../client-DPtiuQvW.js';
|
|
3
3
|
import { RiskProfileClient } from '../risk-profile/index.js';
|
|
4
|
-
import { V as VesantConfig, R as RequestOptions } from '../client-
|
|
5
|
-
import {
|
|
4
|
+
import { V as VesantConfig, R as RequestOptions } from '../client-BolQlL5e.js';
|
|
5
|
+
import { a as CustomerProfile } from '../types-_YQdS3Ax.js';
|
|
6
6
|
import { E as EntityType, P as PaginationParams } from '../types-B4Ezqo7V.js';
|
|
7
7
|
|
|
8
8
|
interface RegistrationVerificationRequest {
|
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.6";
|
|
228
228
|
|
|
229
229
|
// src/shared/browser-utils.ts
|
|
230
230
|
function generateUUID() {
|
|
@@ -847,10 +847,9 @@ 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() };
|
|
851
850
|
return this.requestWithRetry("/api/v1/geo/verify", {
|
|
852
851
|
method: "POST",
|
|
853
|
-
body: JSON.stringify(
|
|
852
|
+
body: JSON.stringify(request)
|
|
854
853
|
}, void 0, void 0, requestOptions);
|
|
855
854
|
}
|
|
856
855
|
/**
|
|
@@ -1254,24 +1253,6 @@ var GeolocationClient = class extends BaseClient {
|
|
|
1254
1253
|
// Utility Methods (inherited from BaseClient: healthCheck, updateConfig, getConfig, buildQueryString)
|
|
1255
1254
|
// ============================================================================
|
|
1256
1255
|
};
|
|
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
|
-
}
|
|
1275
1256
|
|
|
1276
1257
|
// src/risk-profile/client.ts
|
|
1277
1258
|
var RiskProfileClient = class extends BaseClient {
|
|
@@ -1592,6 +1573,9 @@ var ComplianceClient = class {
|
|
|
1592
1573
|
message: error instanceof Error ? error.message : "Unknown error"
|
|
1593
1574
|
});
|
|
1594
1575
|
}
|
|
1576
|
+
if (error instanceof VesantError && error.code === "DUPLICATE_PROFILE") {
|
|
1577
|
+
throw error;
|
|
1578
|
+
}
|
|
1595
1579
|
throw new ComplianceError(
|
|
1596
1580
|
"Registration verification failed",
|
|
1597
1581
|
error instanceof Error ? error.message : void 0,
|