vesant-sdk 1.7.0-dev.9f7da53 → 1.7.0-dev.ab635a0
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-DoMSYMMR.d.ts → client-0NOPDnT0.d.ts} +29 -26
- package/dist/{client-DMIRx7Tu.d.mts → client-CvWNRwwg.d.mts} +29 -26
- package/dist/{client-ZNdnpWe7.d.mts → client-Dps40EtF.d.mts} +2 -2
- package/dist/{client-C3DCmGe9.d.ts → client-SMxqod4j.d.ts} +2 -2
- package/dist/{client-BolQlL5e.d.mts → client-q9fN8Hhf.d.mts} +103 -1
- package/dist/{client-BolQlL5e.d.ts → client-q9fN8Hhf.d.ts} +103 -1
- package/dist/compliance/index.d.mts +3 -3
- package/dist/compliance/index.d.ts +3 -3
- package/dist/compliance/index.js +133 -22
- package/dist/compliance/index.js.map +1 -1
- package/dist/compliance/index.mjs +133 -22
- 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 +68 -7
- package/dist/decisions/index.js.map +1 -1
- package/dist/decisions/index.mjs +68 -7
- package/dist/decisions/index.mjs.map +1 -1
- package/dist/geolocation/index.d.mts +59 -4
- package/dist/geolocation/index.d.ts +59 -4
- package/dist/geolocation/index.js +136 -19
- package/dist/geolocation/index.js.map +1 -1
- package/dist/geolocation/index.mjs +134 -20
- package/dist/geolocation/index.mjs.map +1 -1
- package/dist/index-C3zUKydT.d.mts +264 -0
- package/dist/index-DSDgS09k.d.ts +264 -0
- package/dist/index.d.mts +27 -10
- package/dist/index.d.ts +27 -10
- package/dist/index.js +343 -69
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +336 -70
- package/dist/index.mjs.map +1 -1
- package/dist/kyc/core.d.mts +2 -2
- package/dist/kyc/core.d.ts +2 -2
- package/dist/kyc/core.js +109 -30
- package/dist/kyc/core.js.map +1 -1
- package/dist/kyc/core.mjs +109 -30
- package/dist/kyc/core.mjs.map +1 -1
- package/dist/kyc/index.d.mts +164 -61
- package/dist/kyc/index.d.ts +164 -61
- package/dist/kyc/index.js +109 -30
- package/dist/kyc/index.js.map +1 -1
- package/dist/kyc/index.mjs +109 -30
- package/dist/kyc/index.mjs.map +1 -1
- package/dist/react.d.mts +21 -15
- package/dist/react.d.ts +21 -15
- package/dist/react.js +199 -87
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +199 -87
- package/dist/react.mjs.map +1 -1
- package/dist/risk-profile/index.d.mts +1 -1
- package/dist/risk-profile/index.d.ts +1 -1
- package/dist/risk-profile/index.js +68 -7
- package/dist/risk-profile/index.js.map +1 -1
- package/dist/risk-profile/index.mjs +68 -7
- 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 +68 -7
- package/dist/scores/index.js.map +1 -1
- package/dist/scores/index.mjs +68 -7
- package/dist/scores/index.mjs.map +1 -1
- package/dist/tax/index.d.mts +20 -3
- package/dist/tax/index.d.ts +20 -3
- package/dist/tax/index.js +77 -10
- package/dist/tax/index.js.map +1 -1
- package/dist/tax/index.mjs +77 -10
- package/dist/tax/index.mjs.map +1 -1
- package/dist/webhooks/index.d.mts +2 -189
- package/dist/webhooks/index.d.ts +2 -189
- package/dist/webhooks/index.js +85 -21
- package/dist/webhooks/index.js.map +1 -1
- package/dist/webhooks/index.mjs +85 -22
- package/dist/webhooks/index.mjs.map +1 -1
- package/package.json +4 -1
|
@@ -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-q9fN8Hhf.js';
|
|
2
2
|
import { B as BlockReason, P as PaginationParams } from './types-CBQRNL-l.js';
|
|
3
3
|
|
|
4
4
|
interface DeviceFingerprintRequest {
|
|
@@ -47,6 +47,8 @@ interface CipherTextPayload {
|
|
|
47
47
|
heading?: number;
|
|
48
48
|
speed?: number;
|
|
49
49
|
timestamp: number;
|
|
50
|
+
/** Advisory client-side GPS integrity flags; the server weighs these as risk factors. */
|
|
51
|
+
integrity_flags?: string[];
|
|
50
52
|
};
|
|
51
53
|
/** Network information */
|
|
52
54
|
network?: {
|
|
@@ -212,9 +214,26 @@ interface ValidateCipherTextResponse {
|
|
|
212
214
|
geofence_evaluation?: GeofenceEvaluation;
|
|
213
215
|
record_id?: string;
|
|
214
216
|
gps_required?: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* IP-derived location the GPS coordinates were cross-validated against.
|
|
219
|
+
* `location` carries the GPS-derived city when GPS was provided, so this is
|
|
220
|
+
* what explains a gps_ip_location_mismatch risk factor.
|
|
221
|
+
*/
|
|
222
|
+
ip_location?: {
|
|
223
|
+
country?: string;
|
|
224
|
+
country_iso?: string;
|
|
225
|
+
city?: string;
|
|
226
|
+
region?: string;
|
|
227
|
+
latitude: number;
|
|
228
|
+
longitude: number;
|
|
229
|
+
};
|
|
215
230
|
}
|
|
216
231
|
interface VerifyIPRequest {
|
|
217
|
-
|
|
232
|
+
/**
|
|
233
|
+
* Optional. Omit to let the server derive the connecting IP — the SDK never
|
|
234
|
+
* asserts the client IP (spoofable, and the server extracts it authoritatively).
|
|
235
|
+
*/
|
|
236
|
+
ip_address?: string;
|
|
218
237
|
user_id: string;
|
|
219
238
|
event_type: string;
|
|
220
239
|
device_fingerprint?: DeviceFingerprintRequest;
|
|
@@ -611,16 +630,6 @@ interface ResendLocationRequestRequest {
|
|
|
611
630
|
email?: string;
|
|
612
631
|
phone?: string;
|
|
613
632
|
}
|
|
614
|
-
interface WiFiNetwork {
|
|
615
|
-
/** MAC address (BSSID) */
|
|
616
|
-
macAddress: string;
|
|
617
|
-
/** Signal strength in dBm (negative number) */
|
|
618
|
-
signalStrength?: number;
|
|
619
|
-
/** WiFi channel */
|
|
620
|
-
channel?: number;
|
|
621
|
-
/** Network name (optional) */
|
|
622
|
-
ssid?: string;
|
|
623
|
-
}
|
|
624
633
|
interface LocationCaptureRequest {
|
|
625
634
|
/** GPS latitude (if available) */
|
|
626
635
|
latitude?: number;
|
|
@@ -628,8 +637,8 @@ interface LocationCaptureRequest {
|
|
|
628
637
|
longitude?: number;
|
|
629
638
|
/** GPS accuracy in meters */
|
|
630
639
|
accuracy?: number;
|
|
631
|
-
/**
|
|
632
|
-
|
|
640
|
+
/** Advisory client-side GPS integrity flags; the server weighs these as risk factors. */
|
|
641
|
+
integrity_flags?: string[];
|
|
633
642
|
/** User agent string */
|
|
634
643
|
user_agent?: string;
|
|
635
644
|
/** Device metadata */
|
|
@@ -649,6 +658,10 @@ interface LocationShareInfo {
|
|
|
649
658
|
status: string;
|
|
650
659
|
is_expired: boolean;
|
|
651
660
|
is_completed: boolean;
|
|
661
|
+
/**
|
|
662
|
+
* Server-only hint. The web SDK cannot enumerate WiFi networks (no browser API
|
|
663
|
+
* for BSSIDs); this flag is informational and never satisfied client-side.
|
|
664
|
+
*/
|
|
652
665
|
requires_wifi: boolean;
|
|
653
666
|
}
|
|
654
667
|
interface LocationCaptureResponse {
|
|
@@ -717,8 +730,6 @@ interface UseLocationCaptureOptions {
|
|
|
717
730
|
autoFetch?: boolean;
|
|
718
731
|
/** Auto-request GPS permission on mount */
|
|
719
732
|
autoRequestGPS?: boolean;
|
|
720
|
-
/** Collect WiFi data as fallback (requires explicit permission) */
|
|
721
|
-
collectWiFi?: boolean;
|
|
722
733
|
}
|
|
723
734
|
interface UseLocationCaptureResult {
|
|
724
735
|
/** Location share info */
|
|
@@ -982,20 +993,12 @@ declare class GeolocationClient extends BaseClient {
|
|
|
982
993
|
*
|
|
983
994
|
* @example
|
|
984
995
|
* ```typescript
|
|
985
|
-
* //
|
|
996
|
+
* // GPS (the web SDK is GPS + IP only; the server handles the IP fallback)
|
|
986
997
|
* const result = await client.captureLocation(token, {
|
|
987
998
|
* latitude: 37.7749,
|
|
988
999
|
* longitude: -122.4194,
|
|
989
1000
|
* accuracy: 10
|
|
990
1001
|
* });
|
|
991
|
-
*
|
|
992
|
-
* // Using WiFi positioning (fallback)
|
|
993
|
-
* const result = await client.captureLocation(token, {
|
|
994
|
-
* wifi_networks: [
|
|
995
|
-
* { macAddress: "00:11:22:33:44:55", signalStrength: -50 },
|
|
996
|
-
* { macAddress: "AA:BB:CC:DD:EE:FF", signalStrength: -70 }
|
|
997
|
-
* ]
|
|
998
|
-
* });
|
|
999
1002
|
* ```
|
|
1000
1003
|
*/
|
|
1001
1004
|
captureLocation(token: string, capture: LocationCaptureRequest, requestOptions?: RequestOptions): Promise<LocationCaptureResponse>;
|
|
@@ -1018,4 +1021,4 @@ declare class GeolocationClient extends BaseClient {
|
|
|
1018
1021
|
generateCipherText(options: Omit<CipherTextOptions, 'apiKey' | 'signingKey'>, gpsConfig?: GeolocationConfigResponse): Promise<CipherTextResult>;
|
|
1019
1022
|
}
|
|
1020
1023
|
|
|
1021
|
-
export { type UseLocationRequestsResult as $, type APIError as A, type GeolocationClientConfig as B, type CipherTextCustomerData as C, type DeviceFingerprintRequest as D, type GeolocationConfigResponse as E, type GeolocationRecord as F, GeolocationClient as G, type LocationCaptureRequest as H, type LocationCaptureResponse as I, type JurisdictionConfig as J, type LocationRequestChannel as K, type LocationVerification as L, type LocationRequestResult as M, type LocationRequestStatus as N, type LocationShareInfo 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 ValidateCipherTextResponse as V, type UseGeolocationOptions as W, type UseGeolocationResult as X, type UseLocationCaptureOptions as Y, type UseLocationCaptureResult as Z, type UseLocationRequestsOptions as _, type LocationRequest as a, type ValidateCipherTextRequest as a0, type VerifyIPRequest as a1, type
|
|
1024
|
+
export { type UseLocationRequestsResult as $, type APIError as A, type GeolocationClientConfig as B, type CipherTextCustomerData as C, type DeviceFingerprintRequest as D, type GeolocationConfigResponse as E, type GeolocationRecord as F, GeolocationClient as G, type LocationCaptureRequest as H, type LocationCaptureResponse as I, type JurisdictionConfig as J, type LocationRequestChannel as K, type LocationVerification as L, type LocationRequestResult as M, type LocationRequestStatus as N, type LocationShareInfo 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 ValidateCipherTextResponse as V, type UseGeolocationOptions as W, type UseGeolocationResult as X, type UseLocationCaptureOptions as Y, type UseLocationCaptureResult as Z, type UseLocationRequestsOptions as _, type LocationRequest as a, type ValidateCipherTextRequest as a0, type VerifyIPRequest as a1, type LocationRequestFilters as b, type LocationRequestListResponse as c, type AlertFilters as d, type AlertListResponse as e, type AlertSeverity as f, type AlertStatus as g, type AlertType as h, type CipherTextOptions as i, type CipherTextPayload as j, type CipherTextReason as k, type CipherTextResult as l, type ComplianceCheckResponse as m, type CreateGeofenceRuleRequest as n, type CreateJurisdictionRequest as o, type CreateLocationRequestRequest as p, type DashboardMetrics as q, type DecryptedCipherText as r, type DeviceFingerprint as s, type DeviceTrustResult as t, type GeoIPResult as u, type GeofenceAction as v, type GeofenceEvaluation as w, type GeofenceRule as x, type GeofenceRuleType as y, type GeolocationAlert 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-q9fN8Hhf.mjs';
|
|
2
2
|
import { B as BlockReason, P as PaginationParams } from './types-CBQRNL-l.mjs';
|
|
3
3
|
|
|
4
4
|
interface DeviceFingerprintRequest {
|
|
@@ -47,6 +47,8 @@ interface CipherTextPayload {
|
|
|
47
47
|
heading?: number;
|
|
48
48
|
speed?: number;
|
|
49
49
|
timestamp: number;
|
|
50
|
+
/** Advisory client-side GPS integrity flags; the server weighs these as risk factors. */
|
|
51
|
+
integrity_flags?: string[];
|
|
50
52
|
};
|
|
51
53
|
/** Network information */
|
|
52
54
|
network?: {
|
|
@@ -212,9 +214,26 @@ interface ValidateCipherTextResponse {
|
|
|
212
214
|
geofence_evaluation?: GeofenceEvaluation;
|
|
213
215
|
record_id?: string;
|
|
214
216
|
gps_required?: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* IP-derived location the GPS coordinates were cross-validated against.
|
|
219
|
+
* `location` carries the GPS-derived city when GPS was provided, so this is
|
|
220
|
+
* what explains a gps_ip_location_mismatch risk factor.
|
|
221
|
+
*/
|
|
222
|
+
ip_location?: {
|
|
223
|
+
country?: string;
|
|
224
|
+
country_iso?: string;
|
|
225
|
+
city?: string;
|
|
226
|
+
region?: string;
|
|
227
|
+
latitude: number;
|
|
228
|
+
longitude: number;
|
|
229
|
+
};
|
|
215
230
|
}
|
|
216
231
|
interface VerifyIPRequest {
|
|
217
|
-
|
|
232
|
+
/**
|
|
233
|
+
* Optional. Omit to let the server derive the connecting IP — the SDK never
|
|
234
|
+
* asserts the client IP (spoofable, and the server extracts it authoritatively).
|
|
235
|
+
*/
|
|
236
|
+
ip_address?: string;
|
|
218
237
|
user_id: string;
|
|
219
238
|
event_type: string;
|
|
220
239
|
device_fingerprint?: DeviceFingerprintRequest;
|
|
@@ -611,16 +630,6 @@ interface ResendLocationRequestRequest {
|
|
|
611
630
|
email?: string;
|
|
612
631
|
phone?: string;
|
|
613
632
|
}
|
|
614
|
-
interface WiFiNetwork {
|
|
615
|
-
/** MAC address (BSSID) */
|
|
616
|
-
macAddress: string;
|
|
617
|
-
/** Signal strength in dBm (negative number) */
|
|
618
|
-
signalStrength?: number;
|
|
619
|
-
/** WiFi channel */
|
|
620
|
-
channel?: number;
|
|
621
|
-
/** Network name (optional) */
|
|
622
|
-
ssid?: string;
|
|
623
|
-
}
|
|
624
633
|
interface LocationCaptureRequest {
|
|
625
634
|
/** GPS latitude (if available) */
|
|
626
635
|
latitude?: number;
|
|
@@ -628,8 +637,8 @@ interface LocationCaptureRequest {
|
|
|
628
637
|
longitude?: number;
|
|
629
638
|
/** GPS accuracy in meters */
|
|
630
639
|
accuracy?: number;
|
|
631
|
-
/**
|
|
632
|
-
|
|
640
|
+
/** Advisory client-side GPS integrity flags; the server weighs these as risk factors. */
|
|
641
|
+
integrity_flags?: string[];
|
|
633
642
|
/** User agent string */
|
|
634
643
|
user_agent?: string;
|
|
635
644
|
/** Device metadata */
|
|
@@ -649,6 +658,10 @@ interface LocationShareInfo {
|
|
|
649
658
|
status: string;
|
|
650
659
|
is_expired: boolean;
|
|
651
660
|
is_completed: boolean;
|
|
661
|
+
/**
|
|
662
|
+
* Server-only hint. The web SDK cannot enumerate WiFi networks (no browser API
|
|
663
|
+
* for BSSIDs); this flag is informational and never satisfied client-side.
|
|
664
|
+
*/
|
|
652
665
|
requires_wifi: boolean;
|
|
653
666
|
}
|
|
654
667
|
interface LocationCaptureResponse {
|
|
@@ -717,8 +730,6 @@ interface UseLocationCaptureOptions {
|
|
|
717
730
|
autoFetch?: boolean;
|
|
718
731
|
/** Auto-request GPS permission on mount */
|
|
719
732
|
autoRequestGPS?: boolean;
|
|
720
|
-
/** Collect WiFi data as fallback (requires explicit permission) */
|
|
721
|
-
collectWiFi?: boolean;
|
|
722
733
|
}
|
|
723
734
|
interface UseLocationCaptureResult {
|
|
724
735
|
/** Location share info */
|
|
@@ -982,20 +993,12 @@ declare class GeolocationClient extends BaseClient {
|
|
|
982
993
|
*
|
|
983
994
|
* @example
|
|
984
995
|
* ```typescript
|
|
985
|
-
* //
|
|
996
|
+
* // GPS (the web SDK is GPS + IP only; the server handles the IP fallback)
|
|
986
997
|
* const result = await client.captureLocation(token, {
|
|
987
998
|
* latitude: 37.7749,
|
|
988
999
|
* longitude: -122.4194,
|
|
989
1000
|
* accuracy: 10
|
|
990
1001
|
* });
|
|
991
|
-
*
|
|
992
|
-
* // Using WiFi positioning (fallback)
|
|
993
|
-
* const result = await client.captureLocation(token, {
|
|
994
|
-
* wifi_networks: [
|
|
995
|
-
* { macAddress: "00:11:22:33:44:55", signalStrength: -50 },
|
|
996
|
-
* { macAddress: "AA:BB:CC:DD:EE:FF", signalStrength: -70 }
|
|
997
|
-
* ]
|
|
998
|
-
* });
|
|
999
1002
|
* ```
|
|
1000
1003
|
*/
|
|
1001
1004
|
captureLocation(token: string, capture: LocationCaptureRequest, requestOptions?: RequestOptions): Promise<LocationCaptureResponse>;
|
|
@@ -1018,4 +1021,4 @@ declare class GeolocationClient extends BaseClient {
|
|
|
1018
1021
|
generateCipherText(options: Omit<CipherTextOptions, 'apiKey' | 'signingKey'>, gpsConfig?: GeolocationConfigResponse): Promise<CipherTextResult>;
|
|
1019
1022
|
}
|
|
1020
1023
|
|
|
1021
|
-
export { type UseLocationRequestsResult as $, type APIError as A, type GeolocationClientConfig as B, type CipherTextCustomerData as C, type DeviceFingerprintRequest as D, type GeolocationConfigResponse as E, type GeolocationRecord as F, GeolocationClient as G, type LocationCaptureRequest as H, type LocationCaptureResponse as I, type JurisdictionConfig as J, type LocationRequestChannel as K, type LocationVerification as L, type LocationRequestResult as M, type LocationRequestStatus as N, type LocationShareInfo 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 ValidateCipherTextResponse as V, type UseGeolocationOptions as W, type UseGeolocationResult as X, type UseLocationCaptureOptions as Y, type UseLocationCaptureResult as Z, type UseLocationRequestsOptions as _, type LocationRequest as a, type ValidateCipherTextRequest as a0, type VerifyIPRequest as a1, type
|
|
1024
|
+
export { type UseLocationRequestsResult as $, type APIError as A, type GeolocationClientConfig as B, type CipherTextCustomerData as C, type DeviceFingerprintRequest as D, type GeolocationConfigResponse as E, type GeolocationRecord as F, GeolocationClient as G, type LocationCaptureRequest as H, type LocationCaptureResponse as I, type JurisdictionConfig as J, type LocationRequestChannel as K, type LocationVerification as L, type LocationRequestResult as M, type LocationRequestStatus as N, type LocationShareInfo 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 ValidateCipherTextResponse as V, type UseGeolocationOptions as W, type UseGeolocationResult as X, type UseLocationCaptureOptions as Y, type UseLocationCaptureResult as Z, type UseLocationRequestsOptions as _, type LocationRequest as a, type ValidateCipherTextRequest as a0, type VerifyIPRequest as a1, type LocationRequestFilters as b, type LocationRequestListResponse as c, type AlertFilters as d, type AlertListResponse as e, type AlertSeverity as f, type AlertStatus as g, type AlertType as h, type CipherTextOptions as i, type CipherTextPayload as j, type CipherTextReason as k, type CipherTextResult as l, type ComplianceCheckResponse as m, type CreateGeofenceRuleRequest as n, type CreateJurisdictionRequest as o, type CreateLocationRequestRequest as p, type DashboardMetrics as q, type DecryptedCipherText as r, type DeviceFingerprint as s, type DeviceTrustResult as t, type GeoIPResult as u, type GeofenceAction as v, type GeofenceEvaluation as w, type GeofenceRule as x, type GeofenceRuleType as y, type GeolocationAlert as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { D as DeviceFingerprintRequest, L as LocationVerification, V as ValidateCipherTextResponse, a as LocationRequest, G as GeolocationClient, b as LocationRequestFilters, c as LocationRequestListResponse } from './client-
|
|
1
|
+
import { D as DeviceFingerprintRequest, L as LocationVerification, V as ValidateCipherTextResponse, a as LocationRequest, G as GeolocationClient, b as LocationRequestFilters, c as LocationRequestListResponse } from './client-CvWNRwwg.mjs';
|
|
2
2
|
import { RiskProfileClient } from './risk-profile/index.mjs';
|
|
3
|
-
import { V as VesantConfig, R as RequestOptions } from './client-
|
|
3
|
+
import { V as VesantConfig, R as RequestOptions } from './client-q9fN8Hhf.mjs';
|
|
4
4
|
import { C as CustomerProfile } from './types-BOFaMQxI.mjs';
|
|
5
5
|
import { E as EntityType, B as BlockReason, P as PaginationParams } from './types-CBQRNL-l.mjs';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { D as DeviceFingerprintRequest, L as LocationVerification, V as ValidateCipherTextResponse, a as LocationRequest, G as GeolocationClient, b as LocationRequestFilters, c as LocationRequestListResponse } from './client-
|
|
1
|
+
import { D as DeviceFingerprintRequest, L as LocationVerification, V as ValidateCipherTextResponse, a as LocationRequest, G as GeolocationClient, b as LocationRequestFilters, c as LocationRequestListResponse } from './client-0NOPDnT0.js';
|
|
2
2
|
import { RiskProfileClient } from './risk-profile/index.js';
|
|
3
|
-
import { V as VesantConfig, R as RequestOptions } from './client-
|
|
3
|
+
import { V as VesantConfig, R as RequestOptions } from './client-q9fN8Hhf.js';
|
|
4
4
|
import { C as CustomerProfile } from './types-UGyDl1fd.js';
|
|
5
5
|
import { E as EntityType, B as BlockReason, P as PaginationParams } from './types-CBQRNL-l.js';
|
|
6
6
|
|
|
@@ -50,6 +50,80 @@ declare class CircuitBreaker {
|
|
|
50
50
|
reset(): void;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
/**
|
|
54
|
+
* Pluggable authentication for BaseClient.
|
|
55
|
+
*
|
|
56
|
+
* A TokenProvider supplies the credential used for the Authorization header on
|
|
57
|
+
* every request, resolved per-request (async) so callers can source short-lived
|
|
58
|
+
* or rotating credentials (OAuth2 client-credentials, STS, Vault / Secrets
|
|
59
|
+
* Manager) instead of a single static API key. The default StaticApiKeyProvider
|
|
60
|
+
* preserves the original `apiKey` behavior with zero change for existing callers.
|
|
61
|
+
*/
|
|
62
|
+
interface AuthCredential {
|
|
63
|
+
/** Authorization scheme (e.g. 'Bearer'); defaults to 'Bearer' when omitted. */
|
|
64
|
+
scheme?: string;
|
|
65
|
+
/** The credential value (bearer token / API key). */
|
|
66
|
+
token: string;
|
|
67
|
+
}
|
|
68
|
+
interface TokenProviderContext {
|
|
69
|
+
tenantId: string;
|
|
70
|
+
requestId: string;
|
|
71
|
+
/** When true, bypass any cache and obtain a fresh credential (e.g. after a 401). */
|
|
72
|
+
forceRefresh?: boolean;
|
|
73
|
+
}
|
|
74
|
+
interface TokenProvider {
|
|
75
|
+
/** Resolve the credential for a request, or null to send no Authorization header. */
|
|
76
|
+
getCredential(ctx: TokenProviderContext): Promise<AuthCredential | null>;
|
|
77
|
+
/** Whether this provider can obtain a fresh credential on demand (drives 401 retry). */
|
|
78
|
+
canRefresh?(): boolean;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Default provider: wraps a static API key. Returns null when the key is empty
|
|
82
|
+
* so the client sends no Authorization header, matching the pre-provider behavior.
|
|
83
|
+
*/
|
|
84
|
+
declare class StaticApiKeyProvider implements TokenProvider {
|
|
85
|
+
private readonly apiKey;
|
|
86
|
+
constructor(apiKey: string);
|
|
87
|
+
getCredential(): Promise<AuthCredential | null>;
|
|
88
|
+
canRefresh(): boolean;
|
|
89
|
+
}
|
|
90
|
+
interface CachedToken {
|
|
91
|
+
token: string;
|
|
92
|
+
expiresAt?: number;
|
|
93
|
+
}
|
|
94
|
+
interface RefreshingTokenProviderOptions {
|
|
95
|
+
/** Fetches a fresh token. `expiresAt` is epoch milliseconds (optional). */
|
|
96
|
+
fetchToken: () => Promise<CachedToken>;
|
|
97
|
+
/** Refresh this many ms before expiry (default: 30_000). */
|
|
98
|
+
skewMs?: number;
|
|
99
|
+
/** Authorization scheme to emit (default: 'Bearer'). */
|
|
100
|
+
scheme?: string;
|
|
101
|
+
/** Observe each successful (re)fetch — for logging / metrics. */
|
|
102
|
+
onRotate?: (meta: {
|
|
103
|
+
expiresAt?: number;
|
|
104
|
+
}) => void;
|
|
105
|
+
/** Injectable clock (default: Date.now). */
|
|
106
|
+
now?: () => number;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Caches a fetched token and refreshes it when it is within the skew window of
|
|
110
|
+
* expiry or when `forceRefresh` is requested. Concurrent refreshes are de-duped
|
|
111
|
+
* into a single in-flight fetch.
|
|
112
|
+
*/
|
|
113
|
+
declare class RefreshingTokenProvider implements TokenProvider {
|
|
114
|
+
private readonly opts;
|
|
115
|
+
private cached;
|
|
116
|
+
private inFlight;
|
|
117
|
+
private readonly skewMs;
|
|
118
|
+
private readonly scheme;
|
|
119
|
+
private readonly now;
|
|
120
|
+
constructor(opts: RefreshingTokenProviderOptions);
|
|
121
|
+
canRefresh(): boolean;
|
|
122
|
+
getCredential(ctx?: TokenProviderContext): Promise<AuthCredential | null>;
|
|
123
|
+
private isExpiring;
|
|
124
|
+
private refresh;
|
|
125
|
+
}
|
|
126
|
+
|
|
53
127
|
/**
|
|
54
128
|
* Configuration types for Vesant SDK clients
|
|
55
129
|
*/
|
|
@@ -82,6 +156,16 @@ interface BaseClientConfig {
|
|
|
82
156
|
tenantId: string;
|
|
83
157
|
/** Optional API key for authentication */
|
|
84
158
|
apiKey?: string;
|
|
159
|
+
/**
|
|
160
|
+
* Pluggable auth token provider. When set, it supplies the Authorization
|
|
161
|
+
* credential per-request (overriding `apiKey`), enabling OAuth2 / STS / rotating
|
|
162
|
+
* secrets and single-shot 401 re-auth. Defaults to a static-apiKey provider.
|
|
163
|
+
*/
|
|
164
|
+
authProvider?: TokenProvider;
|
|
165
|
+
/** Observe credential rotation triggered by a 401 re-auth (logging / metrics). */
|
|
166
|
+
onCredentialRotated?: (meta: {
|
|
167
|
+
reason: string;
|
|
168
|
+
}) => void;
|
|
85
169
|
/** Custom headers to include in all requests */
|
|
86
170
|
headers?: Record<string, string>;
|
|
87
171
|
/** Request timeout in milliseconds (default: 10000) */
|
|
@@ -108,6 +192,16 @@ interface VesantConfig {
|
|
|
108
192
|
tenantId: string;
|
|
109
193
|
/** Optional API key for authentication */
|
|
110
194
|
apiKey?: string;
|
|
195
|
+
/**
|
|
196
|
+
* Pluggable auth token provider. When set, it supplies the Authorization
|
|
197
|
+
* credential per-request (overriding `apiKey`), enabling OAuth2 / STS / rotating
|
|
198
|
+
* secrets and single-shot 401 re-auth. Defaults to a static-apiKey provider.
|
|
199
|
+
*/
|
|
200
|
+
authProvider?: TokenProvider;
|
|
201
|
+
/** Observe credential rotation triggered by a 401 re-auth (logging / metrics). */
|
|
202
|
+
onCredentialRotated?: (meta: {
|
|
203
|
+
reason: string;
|
|
204
|
+
}) => void;
|
|
111
205
|
/** Custom headers to include in all requests */
|
|
112
206
|
headers?: Record<string, string>;
|
|
113
207
|
/** Request timeout in milliseconds (default: 10000) */
|
|
@@ -195,7 +289,15 @@ declare abstract class BaseClient {
|
|
|
195
289
|
private interceptors;
|
|
196
290
|
private circuitBreaker;
|
|
197
291
|
private rateLimitTracker;
|
|
292
|
+
private authProvider;
|
|
198
293
|
constructor(config: BaseClientConfig);
|
|
294
|
+
/**
|
|
295
|
+
* Resolve the Idempotency-Key for a request. Mutating methods (POST/PUT/PATCH)
|
|
296
|
+
* get the caller-supplied key or a freshly minted UUID; non-mutating methods get
|
|
297
|
+
* none. requestWithRetry resolves this once and injects it so every retry reuses
|
|
298
|
+
* one key (letting the server dedup replays); a direct request() resolves per call.
|
|
299
|
+
*/
|
|
300
|
+
private resolveIdempotencyKey;
|
|
199
301
|
/**
|
|
200
302
|
* Make an HTTP request with timeout and error handling
|
|
201
303
|
*/
|
|
@@ -237,4 +339,4 @@ declare abstract class BaseClient {
|
|
|
237
339
|
}>;
|
|
238
340
|
}
|
|
239
341
|
|
|
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
|
|
342
|
+
export { type AuthCredential as A, BaseClient as B, type CGSConfig as C, type Logger as L, type RequestOptions as R, StaticApiKeyProvider as S, type TokenProvider as T, 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, RefreshingTokenProvider as h, type RefreshingTokenProviderOptions as i, type RequestInterceptor as j, type RequiredBaseClientConfig as k, type RequiredCGSConfig as l, type RequiredVesantConfig as m, type TokenProviderContext as n };
|
|
@@ -50,6 +50,80 @@ declare class CircuitBreaker {
|
|
|
50
50
|
reset(): void;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
/**
|
|
54
|
+
* Pluggable authentication for BaseClient.
|
|
55
|
+
*
|
|
56
|
+
* A TokenProvider supplies the credential used for the Authorization header on
|
|
57
|
+
* every request, resolved per-request (async) so callers can source short-lived
|
|
58
|
+
* or rotating credentials (OAuth2 client-credentials, STS, Vault / Secrets
|
|
59
|
+
* Manager) instead of a single static API key. The default StaticApiKeyProvider
|
|
60
|
+
* preserves the original `apiKey` behavior with zero change for existing callers.
|
|
61
|
+
*/
|
|
62
|
+
interface AuthCredential {
|
|
63
|
+
/** Authorization scheme (e.g. 'Bearer'); defaults to 'Bearer' when omitted. */
|
|
64
|
+
scheme?: string;
|
|
65
|
+
/** The credential value (bearer token / API key). */
|
|
66
|
+
token: string;
|
|
67
|
+
}
|
|
68
|
+
interface TokenProviderContext {
|
|
69
|
+
tenantId: string;
|
|
70
|
+
requestId: string;
|
|
71
|
+
/** When true, bypass any cache and obtain a fresh credential (e.g. after a 401). */
|
|
72
|
+
forceRefresh?: boolean;
|
|
73
|
+
}
|
|
74
|
+
interface TokenProvider {
|
|
75
|
+
/** Resolve the credential for a request, or null to send no Authorization header. */
|
|
76
|
+
getCredential(ctx: TokenProviderContext): Promise<AuthCredential | null>;
|
|
77
|
+
/** Whether this provider can obtain a fresh credential on demand (drives 401 retry). */
|
|
78
|
+
canRefresh?(): boolean;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Default provider: wraps a static API key. Returns null when the key is empty
|
|
82
|
+
* so the client sends no Authorization header, matching the pre-provider behavior.
|
|
83
|
+
*/
|
|
84
|
+
declare class StaticApiKeyProvider implements TokenProvider {
|
|
85
|
+
private readonly apiKey;
|
|
86
|
+
constructor(apiKey: string);
|
|
87
|
+
getCredential(): Promise<AuthCredential | null>;
|
|
88
|
+
canRefresh(): boolean;
|
|
89
|
+
}
|
|
90
|
+
interface CachedToken {
|
|
91
|
+
token: string;
|
|
92
|
+
expiresAt?: number;
|
|
93
|
+
}
|
|
94
|
+
interface RefreshingTokenProviderOptions {
|
|
95
|
+
/** Fetches a fresh token. `expiresAt` is epoch milliseconds (optional). */
|
|
96
|
+
fetchToken: () => Promise<CachedToken>;
|
|
97
|
+
/** Refresh this many ms before expiry (default: 30_000). */
|
|
98
|
+
skewMs?: number;
|
|
99
|
+
/** Authorization scheme to emit (default: 'Bearer'). */
|
|
100
|
+
scheme?: string;
|
|
101
|
+
/** Observe each successful (re)fetch — for logging / metrics. */
|
|
102
|
+
onRotate?: (meta: {
|
|
103
|
+
expiresAt?: number;
|
|
104
|
+
}) => void;
|
|
105
|
+
/** Injectable clock (default: Date.now). */
|
|
106
|
+
now?: () => number;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Caches a fetched token and refreshes it when it is within the skew window of
|
|
110
|
+
* expiry or when `forceRefresh` is requested. Concurrent refreshes are de-duped
|
|
111
|
+
* into a single in-flight fetch.
|
|
112
|
+
*/
|
|
113
|
+
declare class RefreshingTokenProvider implements TokenProvider {
|
|
114
|
+
private readonly opts;
|
|
115
|
+
private cached;
|
|
116
|
+
private inFlight;
|
|
117
|
+
private readonly skewMs;
|
|
118
|
+
private readonly scheme;
|
|
119
|
+
private readonly now;
|
|
120
|
+
constructor(opts: RefreshingTokenProviderOptions);
|
|
121
|
+
canRefresh(): boolean;
|
|
122
|
+
getCredential(ctx?: TokenProviderContext): Promise<AuthCredential | null>;
|
|
123
|
+
private isExpiring;
|
|
124
|
+
private refresh;
|
|
125
|
+
}
|
|
126
|
+
|
|
53
127
|
/**
|
|
54
128
|
* Configuration types for Vesant SDK clients
|
|
55
129
|
*/
|
|
@@ -82,6 +156,16 @@ interface BaseClientConfig {
|
|
|
82
156
|
tenantId: string;
|
|
83
157
|
/** Optional API key for authentication */
|
|
84
158
|
apiKey?: string;
|
|
159
|
+
/**
|
|
160
|
+
* Pluggable auth token provider. When set, it supplies the Authorization
|
|
161
|
+
* credential per-request (overriding `apiKey`), enabling OAuth2 / STS / rotating
|
|
162
|
+
* secrets and single-shot 401 re-auth. Defaults to a static-apiKey provider.
|
|
163
|
+
*/
|
|
164
|
+
authProvider?: TokenProvider;
|
|
165
|
+
/** Observe credential rotation triggered by a 401 re-auth (logging / metrics). */
|
|
166
|
+
onCredentialRotated?: (meta: {
|
|
167
|
+
reason: string;
|
|
168
|
+
}) => void;
|
|
85
169
|
/** Custom headers to include in all requests */
|
|
86
170
|
headers?: Record<string, string>;
|
|
87
171
|
/** Request timeout in milliseconds (default: 10000) */
|
|
@@ -108,6 +192,16 @@ interface VesantConfig {
|
|
|
108
192
|
tenantId: string;
|
|
109
193
|
/** Optional API key for authentication */
|
|
110
194
|
apiKey?: string;
|
|
195
|
+
/**
|
|
196
|
+
* Pluggable auth token provider. When set, it supplies the Authorization
|
|
197
|
+
* credential per-request (overriding `apiKey`), enabling OAuth2 / STS / rotating
|
|
198
|
+
* secrets and single-shot 401 re-auth. Defaults to a static-apiKey provider.
|
|
199
|
+
*/
|
|
200
|
+
authProvider?: TokenProvider;
|
|
201
|
+
/** Observe credential rotation triggered by a 401 re-auth (logging / metrics). */
|
|
202
|
+
onCredentialRotated?: (meta: {
|
|
203
|
+
reason: string;
|
|
204
|
+
}) => void;
|
|
111
205
|
/** Custom headers to include in all requests */
|
|
112
206
|
headers?: Record<string, string>;
|
|
113
207
|
/** Request timeout in milliseconds (default: 10000) */
|
|
@@ -195,7 +289,15 @@ declare abstract class BaseClient {
|
|
|
195
289
|
private interceptors;
|
|
196
290
|
private circuitBreaker;
|
|
197
291
|
private rateLimitTracker;
|
|
292
|
+
private authProvider;
|
|
198
293
|
constructor(config: BaseClientConfig);
|
|
294
|
+
/**
|
|
295
|
+
* Resolve the Idempotency-Key for a request. Mutating methods (POST/PUT/PATCH)
|
|
296
|
+
* get the caller-supplied key or a freshly minted UUID; non-mutating methods get
|
|
297
|
+
* none. requestWithRetry resolves this once and injects it so every retry reuses
|
|
298
|
+
* one key (letting the server dedup replays); a direct request() resolves per call.
|
|
299
|
+
*/
|
|
300
|
+
private resolveIdempotencyKey;
|
|
199
301
|
/**
|
|
200
302
|
* Make an HTTP request with timeout and error handling
|
|
201
303
|
*/
|
|
@@ -237,4 +339,4 @@ declare abstract class BaseClient {
|
|
|
237
339
|
}>;
|
|
238
340
|
}
|
|
239
341
|
|
|
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
|
|
342
|
+
export { type AuthCredential as A, BaseClient as B, type CGSConfig as C, type Logger as L, type RequestOptions as R, StaticApiKeyProvider as S, type TokenProvider as T, 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, RefreshingTokenProvider as h, type RefreshingTokenProviderOptions as i, type RequestInterceptor as j, type RequiredBaseClientConfig as k, type RequiredCGSConfig as l, type RequiredVesantConfig as m, type TokenProviderContext as n };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { B as BlockReason } from '../types-CBQRNL-l.mjs';
|
|
2
|
-
export { C as ComplianceClient, a as ComplianceLocationRequestInput, b as ComplianceLocationRequestResult, c as CurrencyRates, D as DEFAULT_CURRENCY_RATES, E as EventVerificationRequest, d as EventVerificationResponse, L as LoginVerificationRequest, e as LoginVerificationResponse, R as RegistrationVerificationRequest, f as RegistrationVerificationResponse, T as TransactionRiskResult, g as TransactionVerificationRequest, h as TransactionVerificationResponse } from '../client-
|
|
3
|
-
export { p as CreateLocationRequestRequest, H as LocationCaptureRequest, I as LocationCaptureResponse, a as LocationRequest, K as LocationRequestChannel, b as LocationRequestFilters, c as LocationRequestListResponse, M as LocationRequestResult, N as LocationRequestStatus, O as LocationShareInfo, R as ResendLocationRequestRequest } from '../client-
|
|
2
|
+
export { C as ComplianceClient, a as ComplianceLocationRequestInput, b as ComplianceLocationRequestResult, c as CurrencyRates, D as DEFAULT_CURRENCY_RATES, E as EventVerificationRequest, d as EventVerificationResponse, L as LoginVerificationRequest, e as LoginVerificationResponse, R as RegistrationVerificationRequest, f as RegistrationVerificationResponse, T as TransactionRiskResult, g as TransactionVerificationRequest, h as TransactionVerificationResponse } from '../client-Dps40EtF.mjs';
|
|
3
|
+
export { p as CreateLocationRequestRequest, H as LocationCaptureRequest, I as LocationCaptureResponse, a as LocationRequest, K as LocationRequestChannel, b as LocationRequestFilters, c as LocationRequestListResponse, M as LocationRequestResult, N as LocationRequestStatus, O as LocationShareInfo, R as ResendLocationRequestRequest } from '../client-CvWNRwwg.mjs';
|
|
4
4
|
import '../risk-profile/index.mjs';
|
|
5
|
-
import '../client-
|
|
5
|
+
import '../client-q9fN8Hhf.mjs';
|
|
6
6
|
import '../types-BOFaMQxI.mjs';
|
|
7
7
|
|
|
8
8
|
declare const sdkReasons: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { B as BlockReason } from '../types-CBQRNL-l.js';
|
|
2
|
-
export { C as ComplianceClient, a as ComplianceLocationRequestInput, b as ComplianceLocationRequestResult, c as CurrencyRates, D as DEFAULT_CURRENCY_RATES, E as EventVerificationRequest, d as EventVerificationResponse, L as LoginVerificationRequest, e as LoginVerificationResponse, R as RegistrationVerificationRequest, f as RegistrationVerificationResponse, T as TransactionRiskResult, g as TransactionVerificationRequest, h as TransactionVerificationResponse } from '../client-
|
|
3
|
-
export { p as CreateLocationRequestRequest, H as LocationCaptureRequest, I as LocationCaptureResponse, a as LocationRequest, K as LocationRequestChannel, b as LocationRequestFilters, c as LocationRequestListResponse, M as LocationRequestResult, N as LocationRequestStatus, O as LocationShareInfo, R as ResendLocationRequestRequest } from '../client-
|
|
2
|
+
export { C as ComplianceClient, a as ComplianceLocationRequestInput, b as ComplianceLocationRequestResult, c as CurrencyRates, D as DEFAULT_CURRENCY_RATES, E as EventVerificationRequest, d as EventVerificationResponse, L as LoginVerificationRequest, e as LoginVerificationResponse, R as RegistrationVerificationRequest, f as RegistrationVerificationResponse, T as TransactionRiskResult, g as TransactionVerificationRequest, h as TransactionVerificationResponse } from '../client-SMxqod4j.js';
|
|
3
|
+
export { p as CreateLocationRequestRequest, H as LocationCaptureRequest, I as LocationCaptureResponse, a as LocationRequest, K as LocationRequestChannel, b as LocationRequestFilters, c as LocationRequestListResponse, M as LocationRequestResult, N as LocationRequestStatus, O as LocationShareInfo, R as ResendLocationRequestRequest } from '../client-0NOPDnT0.js';
|
|
4
4
|
import '../risk-profile/index.js';
|
|
5
|
-
import '../client-
|
|
5
|
+
import '../client-q9fN8Hhf.js';
|
|
6
6
|
import '../types-UGyDl1fd.js';
|
|
7
7
|
|
|
8
8
|
declare const sdkReasons: {
|