vesant-sdk 1.5.0 → 1.5.2
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/README.md +5 -3
- package/dist/{client-3cBb_Pp-.d.ts → client-B8pFrXx_.d.ts} +9 -3
- package/dist/{client-DKqyESgT.d.mts → client-BZxzOidG.d.mts} +9 -3
- package/dist/{client-BQRONu8q.d.mts → client-CIon-bGS.d.mts} +1 -1
- package/dist/{client-BQRONu8q.d.ts → client-CIon-bGS.d.ts} +1 -1
- package/dist/compliance/index.d.mts +5 -5
- package/dist/compliance/index.d.ts +5 -5
- package/dist/compliance/index.js +3 -1
- package/dist/compliance/index.js.map +1 -1
- package/dist/compliance/index.mjs +3 -1
- package/dist/compliance/index.mjs.map +1 -1
- package/dist/decisions/index.d.mts +2 -2
- package/dist/decisions/index.d.ts +2 -2
- package/dist/decisions/index.js +3 -1
- package/dist/decisions/index.js.map +1 -1
- package/dist/decisions/index.mjs +3 -1
- package/dist/decisions/index.mjs.map +1 -1
- package/dist/geolocation/index.d.mts +4 -4
- package/dist/geolocation/index.d.ts +4 -4
- package/dist/geolocation/index.js +3 -1
- package/dist/geolocation/index.js.map +1 -1
- package/dist/geolocation/index.mjs +3 -1
- package/dist/geolocation/index.mjs.map +1 -1
- package/dist/index.d.mts +537 -9
- package/dist/index.d.ts +537 -9
- package/dist/index.js +274 -110
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +273 -108
- 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 +3 -1
- package/dist/kyc/core.js.map +1 -1
- package/dist/kyc/core.mjs +3 -1
- package/dist/kyc/core.mjs.map +1 -1
- package/dist/kyc/index.d.mts +7 -3
- package/dist/kyc/index.d.ts +7 -3
- package/dist/kyc/index.js +3 -1
- package/dist/kyc/index.js.map +1 -1
- package/dist/kyc/index.mjs +3 -1
- package/dist/kyc/index.mjs.map +1 -1
- package/dist/react.d.mts +4 -4
- package/dist/react.d.ts +4 -4
- 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 +4 -4
- package/dist/risk-profile/index.d.ts +4 -4
- package/dist/risk-profile/index.js +3 -1
- package/dist/risk-profile/index.js.map +1 -1
- package/dist/risk-profile/index.mjs +3 -1
- package/dist/risk-profile/index.mjs.map +1 -1
- package/dist/scores/index.d.mts +2 -2
- package/dist/scores/index.d.ts +2 -2
- package/dist/scores/index.js +3 -1
- package/dist/scores/index.js.map +1 -1
- package/dist/scores/index.mjs +3 -1
- package/dist/scores/index.mjs.map +1 -1
- package/dist/{types-_hsTA3Ez.d.mts → types-1RzYeSal.d.mts} +1 -1
- package/dist/{types-B1OzEQR3.d.mts → types-B4Ezqo7V.d.mts} +1 -1
- package/dist/{types-B1OzEQR3.d.ts → types-B4Ezqo7V.d.ts} +1 -1
- package/dist/{types-BnL66DB3.d.ts → types-X5Md_dD_.d.ts} +1 -1
- package/dist/webhooks/index.d.mts +1 -1
- package/dist/webhooks/index.d.ts +1 -1
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -316,14 +316,16 @@ interface ComplianceClientConfig {
|
|
|
316
316
|
|
|
317
317
|
| Method | Description |
|
|
318
318
|
|--------|-------------|
|
|
319
|
-
| `verifyIP(request)` | Verify IP address and check compliance |
|
|
319
|
+
| `verifyIP(request)` | Verify IP address and check compliance (**use this for allowed/blocked decisions**) |
|
|
320
320
|
| `checkCompliance(countryISO)` | Check jurisdiction compliance |
|
|
321
|
-
| `validateCipherText(cipherText, userId, eventType)` | Validate device fingerprint |
|
|
322
|
-
| `validateAndVerify(cipherText, ip, userId, eventType)` | Combined cipherText + IP verification |
|
|
321
|
+
| `validateCipherText(cipherText, userId, eventType)` | Validate device fingerprint integrity (does **not** check jurisdiction rules) |
|
|
322
|
+
| `validateAndVerify(cipherText, ip, userId, eventType)` | Combined cipherText validation + IP verification |
|
|
323
323
|
| `getGPSConfig()` | Get GPS requirement config per event type |
|
|
324
324
|
| `createLocationRequest(request)` | Create a live location request |
|
|
325
325
|
| `captureLocation(token, capture)` | Submit location capture (customer-facing) |
|
|
326
326
|
|
|
327
|
+
> **Which API should I use?** For registration, login, and transaction flows, use `ComplianceClient` methods (`verifyAtRegistration`, `verifyAtLogin`, `verifyAtTransaction`). These orchestrate geolocation + risk profiling and return a single `allowed` decision. Only use `GeolocationClient` directly if you need low-level access to individual APIs.
|
|
328
|
+
|
|
327
329
|
### RiskProfileClient
|
|
328
330
|
|
|
329
331
|
| Method | Description |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as Logger, B as BaseClient, R as RequestOptions } from './client-
|
|
2
|
-
import { P as PaginationParams } from './types-
|
|
1
|
+
import { L as Logger, B as BaseClient, R as RequestOptions } from './client-CIon-bGS.js';
|
|
2
|
+
import { P as PaginationParams } from './types-B4Ezqo7V.js';
|
|
3
3
|
|
|
4
4
|
interface DeviceFingerprintRequest {
|
|
5
5
|
device_id: string;
|
|
@@ -428,6 +428,10 @@ interface GeolocationRecord {
|
|
|
428
428
|
postal_code?: string;
|
|
429
429
|
latitude: number;
|
|
430
430
|
longitude: number;
|
|
431
|
+
/** Source of the coordinates: "gps" when device GPS was provided, "ip" when derived from IP lookup */
|
|
432
|
+
position_source?: 'gps' | 'ip';
|
|
433
|
+
/** GPS accuracy in meters (only present when position_source is "gps") */
|
|
434
|
+
gps_accuracy?: number;
|
|
431
435
|
timezone?: string;
|
|
432
436
|
is_vpn: boolean;
|
|
433
437
|
is_proxy: boolean;
|
|
@@ -454,6 +458,8 @@ interface GeolocationConfigResponse {
|
|
|
454
458
|
registration: boolean;
|
|
455
459
|
transaction: boolean;
|
|
456
460
|
};
|
|
461
|
+
/** When true, GPS-verified location overrides anonymizer-based blocking */
|
|
462
|
+
trust_gps_over_anonymizer: boolean;
|
|
457
463
|
/** Public signing key (pk_) for client-side HMAC signing */
|
|
458
464
|
signing_key?: string;
|
|
459
465
|
}
|
|
@@ -1002,4 +1008,4 @@ declare class GeolocationClient extends BaseClient {
|
|
|
1002
1008
|
generateCipherText(options: Omit<CipherTextOptions, 'apiKey' | 'signingKey'>, gpsConfig?: GeolocationConfigResponse): Promise<CipherTextResult>;
|
|
1003
1009
|
}
|
|
1004
1010
|
|
|
1005
|
-
export { type
|
|
1011
|
+
export { type WiFiNetwork as $, type AlertStatus as A, type GeofenceAction as B, type CipherTextOptions as C, type DeviceFingerprintRequest as D, type GeofenceRule as E, type CreateGeofenceRuleRequest as F, GeolocationClient as G, type UpdateGeofenceRuleRequest as H, type UpdateDeviceTrustRequest as I, type JurisdictionConfig as J, type GeolocationRecord as K, type LocationVerification as L, type APIError as M, type GeolocationConfigResponse as N, type GeolocationClientConfig as O, type UseAlertsOptions as P, type UseAlertsResult as Q, type LocationRequestStatus as R, type LocationRequestChannel as S, type LocationRequest as T, type UseGeolocationOptions as U, type ValidateCipherTextRequest as V, type CreateLocationRequestRequest as W, type LocationRequestResult as X, type LocationRequestFilters as Y, type LocationRequestListResponse as Z, type ResendLocationRequestRequest as _, type UseGeolocationResult as a, type LocationCaptureRequest as a0, type LocationShareInfo as a1, type LocationCaptureResponse as a2, type UseLocationRequestsOptions as b, type UseLocationRequestsResult as c, type UseLocationCaptureOptions as d, type UseLocationCaptureResult as e, type CipherTextResult as f, type CipherTextPayload as g, type CipherTextReason as h, type DecryptedCipherText as i, type CipherTextCustomerData as j, type ValidateCipherTextResponse as k, type VerifyIPRequest as l, type GeoIPResult as m, type GeofenceEvaluation as n, type DeviceFingerprint as o, type DeviceTrustResult as p, type ComplianceCheckResponse as q, type AlertSeverity as r, type AlertType as s, type GeolocationAlert as t, type AlertFilters as u, type AlertListResponse as v, type DashboardMetrics as w, type CreateJurisdictionRequest as x, type UpdateJurisdictionRequest as y, type GeofenceRuleType as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as Logger, B as BaseClient, R as RequestOptions } from './client-
|
|
2
|
-
import { P as PaginationParams } from './types-
|
|
1
|
+
import { L as Logger, B as BaseClient, R as RequestOptions } from './client-CIon-bGS.mjs';
|
|
2
|
+
import { P as PaginationParams } from './types-B4Ezqo7V.mjs';
|
|
3
3
|
|
|
4
4
|
interface DeviceFingerprintRequest {
|
|
5
5
|
device_id: string;
|
|
@@ -428,6 +428,10 @@ interface GeolocationRecord {
|
|
|
428
428
|
postal_code?: string;
|
|
429
429
|
latitude: number;
|
|
430
430
|
longitude: number;
|
|
431
|
+
/** Source of the coordinates: "gps" when device GPS was provided, "ip" when derived from IP lookup */
|
|
432
|
+
position_source?: 'gps' | 'ip';
|
|
433
|
+
/** GPS accuracy in meters (only present when position_source is "gps") */
|
|
434
|
+
gps_accuracy?: number;
|
|
431
435
|
timezone?: string;
|
|
432
436
|
is_vpn: boolean;
|
|
433
437
|
is_proxy: boolean;
|
|
@@ -454,6 +458,8 @@ interface GeolocationConfigResponse {
|
|
|
454
458
|
registration: boolean;
|
|
455
459
|
transaction: boolean;
|
|
456
460
|
};
|
|
461
|
+
/** When true, GPS-verified location overrides anonymizer-based blocking */
|
|
462
|
+
trust_gps_over_anonymizer: boolean;
|
|
457
463
|
/** Public signing key (pk_) for client-side HMAC signing */
|
|
458
464
|
signing_key?: string;
|
|
459
465
|
}
|
|
@@ -1002,4 +1008,4 @@ declare class GeolocationClient extends BaseClient {
|
|
|
1002
1008
|
generateCipherText(options: Omit<CipherTextOptions, 'apiKey' | 'signingKey'>, gpsConfig?: GeolocationConfigResponse): Promise<CipherTextResult>;
|
|
1003
1009
|
}
|
|
1004
1010
|
|
|
1005
|
-
export { type
|
|
1011
|
+
export { type WiFiNetwork as $, type AlertStatus as A, type GeofenceAction as B, type CipherTextOptions as C, type DeviceFingerprintRequest as D, type GeofenceRule as E, type CreateGeofenceRuleRequest as F, GeolocationClient as G, type UpdateGeofenceRuleRequest as H, type UpdateDeviceTrustRequest as I, type JurisdictionConfig as J, type GeolocationRecord as K, type LocationVerification as L, type APIError as M, type GeolocationConfigResponse as N, type GeolocationClientConfig as O, type UseAlertsOptions as P, type UseAlertsResult as Q, type LocationRequestStatus as R, type LocationRequestChannel as S, type LocationRequest as T, type UseGeolocationOptions as U, type ValidateCipherTextRequest as V, type CreateLocationRequestRequest as W, type LocationRequestResult as X, type LocationRequestFilters as Y, type LocationRequestListResponse as Z, type ResendLocationRequestRequest as _, type UseGeolocationResult as a, type LocationCaptureRequest as a0, type LocationShareInfo as a1, type LocationCaptureResponse as a2, type UseLocationRequestsOptions as b, type UseLocationRequestsResult as c, type UseLocationCaptureOptions as d, type UseLocationCaptureResult as e, type CipherTextResult as f, type CipherTextPayload as g, type CipherTextReason as h, type DecryptedCipherText as i, type CipherTextCustomerData as j, type ValidateCipherTextResponse as k, type VerifyIPRequest as l, type GeoIPResult as m, type GeofenceEvaluation as n, type DeviceFingerprint as o, type DeviceTrustResult as p, type ComplianceCheckResponse as q, type AlertSeverity as r, type AlertType as s, type GeolocationAlert as t, type AlertFilters as u, type AlertListResponse as v, type DashboardMetrics as w, type CreateJurisdictionRequest as x, type UpdateJurisdictionRequest as y, type GeofenceRuleType as z };
|
|
@@ -235,4 +235,4 @@ declare abstract class BaseClient {
|
|
|
235
235
|
}>;
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
export { BaseClient as B, type CircuitBreakerConfig as C, type Logger as L, type RequestOptions as R, type VesantConfig as V, type
|
|
238
|
+
export { BaseClient as B, type CircuitBreakerConfig as C, type Logger as L, type RequestOptions as R, type VesantConfig as V, type BaseClientConfig as a, type RequestInterceptor as b, type RequiredVesantConfig as c, type CGSConfig as d, type RequiredCGSConfig as e, type RequiredBaseClientConfig as f, type CircuitBreakerState as g, type CircuitBreakerStatus as h, CircuitBreaker as i, type RateLimitStatus as j, RateLimitTracker as k };
|
|
@@ -235,4 +235,4 @@ declare abstract class BaseClient {
|
|
|
235
235
|
}>;
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
export { BaseClient as B, type CircuitBreakerConfig as C, type Logger as L, type RequestOptions as R, type VesantConfig as V, type
|
|
238
|
+
export { BaseClient as B, type CircuitBreakerConfig as C, type Logger as L, type RequestOptions as R, type VesantConfig as V, type BaseClientConfig as a, type RequestInterceptor as b, type RequiredVesantConfig as c, type CGSConfig as d, type RequiredCGSConfig as e, type RequiredBaseClientConfig as f, type CircuitBreakerState as g, type CircuitBreakerStatus as h, CircuitBreaker as i, type RateLimitStatus as j, RateLimitTracker as k };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { D as DeviceFingerprintRequest, L as LocationVerification,
|
|
2
|
-
export {
|
|
1
|
+
import { D as DeviceFingerprintRequest, L as LocationVerification, T as LocationRequest, G as GeolocationClient, Y as LocationRequestFilters, Z as LocationRequestListResponse } from '../client-BZxzOidG.mjs';
|
|
2
|
+
export { W as CreateLocationRequestRequest, a0 as LocationCaptureRequest, a2 as LocationCaptureResponse, S as LocationRequestChannel, X as LocationRequestResult, R as LocationRequestStatus, a1 as LocationShareInfo, _ as ResendLocationRequestRequest } from '../client-BZxzOidG.mjs';
|
|
3
3
|
import { RiskProfileClient } from '../risk-profile/index.mjs';
|
|
4
|
-
import { V as VesantConfig, R as RequestOptions } from '../client-
|
|
5
|
-
import { C as CustomerProfile } from '../types-
|
|
6
|
-
import { E as EntityType, P as PaginationParams } from '../types-
|
|
4
|
+
import { V as VesantConfig, R as RequestOptions } from '../client-CIon-bGS.mjs';
|
|
5
|
+
import { C as CustomerProfile } from '../types-1RzYeSal.mjs';
|
|
6
|
+
import { E as EntityType, P as PaginationParams } from '../types-B4Ezqo7V.mjs';
|
|
7
7
|
|
|
8
8
|
interface RegistrationVerificationRequest {
|
|
9
9
|
customerId: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { D as DeviceFingerprintRequest, L as LocationVerification,
|
|
2
|
-
export {
|
|
1
|
+
import { D as DeviceFingerprintRequest, L as LocationVerification, T as LocationRequest, G as GeolocationClient, Y as LocationRequestFilters, Z as LocationRequestListResponse } from '../client-B8pFrXx_.js';
|
|
2
|
+
export { W as CreateLocationRequestRequest, a0 as LocationCaptureRequest, a2 as LocationCaptureResponse, S as LocationRequestChannel, X as LocationRequestResult, R as LocationRequestStatus, a1 as LocationShareInfo, _ as ResendLocationRequestRequest } from '../client-B8pFrXx_.js';
|
|
3
3
|
import { RiskProfileClient } from '../risk-profile/index.js';
|
|
4
|
-
import { V as VesantConfig, R as RequestOptions } from '../client-
|
|
5
|
-
import { C as CustomerProfile } from '../types-
|
|
6
|
-
import { E as EntityType, P as PaginationParams } from '../types-
|
|
4
|
+
import { V as VesantConfig, R as RequestOptions } from '../client-CIon-bGS.js';
|
|
5
|
+
import { C as CustomerProfile } from '../types-X5Md_dD_.js';
|
|
6
|
+
import { E as EntityType, P as PaginationParams } from '../types-B4Ezqo7V.js';
|
|
7
7
|
|
|
8
8
|
interface RegistrationVerificationRequest {
|
|
9
9
|
customerId: string;
|
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.5.
|
|
227
|
+
var SDK_VERSION = "1.5.2";
|
|
228
228
|
|
|
229
229
|
// src/shared/browser-utils.ts
|
|
230
230
|
function generateUUID() {
|
|
@@ -512,6 +512,8 @@ var BaseClient = class {
|
|
|
512
512
|
return new VesantError(message, "FORBIDDEN", 403);
|
|
513
513
|
case 404:
|
|
514
514
|
return new VesantError(message, "NOT_FOUND", 404);
|
|
515
|
+
case 409:
|
|
516
|
+
return new VesantError(message, "DUPLICATE_PROFILE", 409);
|
|
515
517
|
case 429: {
|
|
516
518
|
const retryAfter = data.retry_after || data.retryAfter;
|
|
517
519
|
return new RateLimitError(retryAfter);
|