vesant-sdk 1.6.6-next.ac58d2b → 2.0.0-dev.318e523
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 +4 -4
- package/dist/client-BJ87_Vv5.d.ts +430 -0
- package/dist/{client-DPtiuQvW.d.ts → client-Bvp-f05-.d.ts} +6 -6
- package/dist/{client-D6PE3pcB.d.mts → client-CIEa7xYG.d.mts} +6 -6
- package/dist/client-IAOGCBfm.d.mts +430 -0
- package/dist/compliance/index.d.mts +25 -429
- package/dist/compliance/index.d.ts +25 -429
- package/dist/compliance/index.js +131 -34
- package/dist/compliance/index.js.map +1 -1
- package/dist/compliance/index.mjs +131 -35
- 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 +1 -1
- package/dist/geolocation/index.js.map +1 -1
- package/dist/geolocation/index.mjs +1 -1
- package/dist/geolocation/index.mjs.map +1 -1
- package/dist/index.d.mts +10 -8
- package/dist/index.d.ts +10 -8
- package/dist/index.js +145 -34
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +144 -35
- 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 +15 -1
- package/dist/kyc/core.js.map +1 -1
- package/dist/kyc/core.mjs +15 -2
- package/dist/kyc/core.mjs.map +1 -1
- package/dist/kyc/index.d.mts +9 -3
- package/dist/kyc/index.d.ts +9 -3
- package/dist/kyc/index.js +15 -1
- package/dist/kyc/index.js.map +1 -1
- package/dist/kyc/index.mjs +15 -2
- 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 +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.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/{types-_YQdS3Ax.d.ts → types-2utj53GK.d.ts} +2 -2
- package/dist/{types-DGDVnogO.d.mts → types-C4Zx0d_u.d.mts} +2 -2
- package/dist/{types-B4Ezqo7V.d.mts → types-QUCWam16.d.mts} +7 -1
- package/dist/{types-B4Ezqo7V.d.ts → types-QUCWam16.d.ts} +7 -1
- package/dist/webhooks/index.d.mts +1 -1
- package/dist/webhooks/index.d.ts +1 -1
- package/dist/webhooks/index.js.map +1 -1
- package/dist/webhooks/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -74,7 +74,7 @@ if (result.allowed) {
|
|
|
74
74
|
// Redirect to KYC flow
|
|
75
75
|
}
|
|
76
76
|
} else {
|
|
77
|
-
console.log('Registration blocked:', result.blockReasons);
|
|
77
|
+
console.log('Registration blocked:', result.blockReasons.map(r => r.message).join(', '));
|
|
78
78
|
}
|
|
79
79
|
```
|
|
80
80
|
|
|
@@ -94,7 +94,7 @@ if (result.allowed) {
|
|
|
94
94
|
// Allow login
|
|
95
95
|
}
|
|
96
96
|
} else {
|
|
97
|
-
console.log('Login blocked:', result.blockReasons);
|
|
97
|
+
console.log('Login blocked:', result.blockReasons.map(r => r.message).join(', '));
|
|
98
98
|
}
|
|
99
99
|
```
|
|
100
100
|
|
|
@@ -114,7 +114,7 @@ if (result.allowed) {
|
|
|
114
114
|
} else if (result.requiresApproval) {
|
|
115
115
|
// Queue for manual review
|
|
116
116
|
} else {
|
|
117
|
-
console.log('Transaction blocked:', result.blockReasons);
|
|
117
|
+
console.log('Transaction blocked:', result.blockReasons.map(r => r.message).join(', '));
|
|
118
118
|
}
|
|
119
119
|
```
|
|
120
120
|
|
|
@@ -226,7 +226,7 @@ function RegistrationForm() {
|
|
|
226
226
|
navigate('/dashboard');
|
|
227
227
|
},
|
|
228
228
|
onBlocked: (result) => {
|
|
229
|
-
alert(`Registration blocked: ${result.blockReasons.join(', ')}`);
|
|
229
|
+
alert(`Registration blocked: ${result.blockReasons.map(r => r.message).join(', ')}`);
|
|
230
230
|
},
|
|
231
231
|
});
|
|
232
232
|
|
|
@@ -0,0 +1,430 @@
|
|
|
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-Bvp-f05-.js';
|
|
2
|
+
import { RiskProfileClient } from './risk-profile/index.js';
|
|
3
|
+
import { V as VesantConfig, R as RequestOptions } from './client-BolQlL5e.js';
|
|
4
|
+
import { C as CustomerProfile } from './types-2utj53GK.js';
|
|
5
|
+
import { E as EntityType, B as BlockReason, P as PaginationParams } from './types-QUCWam16.js';
|
|
6
|
+
|
|
7
|
+
interface RegistrationVerificationRequest {
|
|
8
|
+
customerId: string;
|
|
9
|
+
fullName: string;
|
|
10
|
+
emailAddress: string;
|
|
11
|
+
phoneNumber?: string;
|
|
12
|
+
dateOfBirth?: string;
|
|
13
|
+
address?: string;
|
|
14
|
+
entityType?: EntityType;
|
|
15
|
+
ipAddress: string;
|
|
16
|
+
deviceFingerprint?: DeviceFingerprintRequest;
|
|
17
|
+
cipherText?: string;
|
|
18
|
+
metadata?: Record<string, unknown>;
|
|
19
|
+
}
|
|
20
|
+
interface RegistrationVerificationResponse {
|
|
21
|
+
allowed: boolean;
|
|
22
|
+
geolocation: LocationVerification;
|
|
23
|
+
profile: CustomerProfile | null;
|
|
24
|
+
requiresKYC: boolean;
|
|
25
|
+
requiresEDD: boolean;
|
|
26
|
+
blockReasons: BlockReason[];
|
|
27
|
+
processingTime: number;
|
|
28
|
+
cipherTextValidation?: ValidateCipherTextResponse;
|
|
29
|
+
}
|
|
30
|
+
interface LoginVerificationRequest {
|
|
31
|
+
customerId: string;
|
|
32
|
+
ipAddress: string;
|
|
33
|
+
deviceFingerprint?: DeviceFingerprintRequest;
|
|
34
|
+
cipherText?: string;
|
|
35
|
+
metadata?: Record<string, unknown>;
|
|
36
|
+
}
|
|
37
|
+
interface LoginVerificationResponse {
|
|
38
|
+
allowed: boolean;
|
|
39
|
+
geolocation: LocationVerification;
|
|
40
|
+
profile: CustomerProfile | null;
|
|
41
|
+
requiresStepUp: boolean;
|
|
42
|
+
blockReasons: BlockReason[];
|
|
43
|
+
processingTime: number;
|
|
44
|
+
cipherTextValidation?: ValidateCipherTextResponse;
|
|
45
|
+
}
|
|
46
|
+
interface TransactionVerificationRequest {
|
|
47
|
+
customerId: string;
|
|
48
|
+
ipAddress: string;
|
|
49
|
+
amount: number;
|
|
50
|
+
currency: string;
|
|
51
|
+
transactionType?: 'deposit' | 'withdrawal' | 'bet' | 'transfer' | 'payout';
|
|
52
|
+
deviceFingerprint?: DeviceFingerprintRequest;
|
|
53
|
+
cipherText?: string;
|
|
54
|
+
metadata?: Record<string, unknown>;
|
|
55
|
+
}
|
|
56
|
+
interface TransactionVerificationResponse {
|
|
57
|
+
allowed: boolean;
|
|
58
|
+
geolocation: LocationVerification;
|
|
59
|
+
profile: CustomerProfile | null;
|
|
60
|
+
transactionRisk: TransactionRiskResult;
|
|
61
|
+
requiresApproval: boolean;
|
|
62
|
+
blockReasons: BlockReason[];
|
|
63
|
+
processingTime: number;
|
|
64
|
+
cipherTextValidation?: ValidateCipherTextResponse;
|
|
65
|
+
}
|
|
66
|
+
interface TransactionRiskResult {
|
|
67
|
+
score: number;
|
|
68
|
+
level: 'low' | 'medium' | 'high' | 'critical';
|
|
69
|
+
factors: BlockReason[];
|
|
70
|
+
allowed: boolean;
|
|
71
|
+
requiresManualReview: boolean;
|
|
72
|
+
}
|
|
73
|
+
interface EventVerificationRequest {
|
|
74
|
+
customerId: string;
|
|
75
|
+
ipAddress: string;
|
|
76
|
+
eventType: string;
|
|
77
|
+
deviceFingerprint?: DeviceFingerprintRequest;
|
|
78
|
+
cipherText?: string;
|
|
79
|
+
metadata?: Record<string, unknown>;
|
|
80
|
+
}
|
|
81
|
+
interface EventVerificationResponse {
|
|
82
|
+
allowed: boolean;
|
|
83
|
+
geolocation: LocationVerification;
|
|
84
|
+
blockReasons: BlockReason[];
|
|
85
|
+
processingTime: number;
|
|
86
|
+
cipherTextValidation?: ValidateCipherTextResponse;
|
|
87
|
+
}
|
|
88
|
+
interface CurrencyRates {
|
|
89
|
+
[currency: string]: number;
|
|
90
|
+
}
|
|
91
|
+
declare const DEFAULT_CURRENCY_RATES: CurrencyRates;
|
|
92
|
+
|
|
93
|
+
interface ComplianceLocationRequestInput {
|
|
94
|
+
/** Customer user ID to request location from */
|
|
95
|
+
customerId: string;
|
|
96
|
+
/** Notification channel to use */
|
|
97
|
+
channel: 'sms' | 'email' | 'push';
|
|
98
|
+
/** Reason for requesting location (for compliance/audit) */
|
|
99
|
+
reason: string;
|
|
100
|
+
/** Customer email (required for email channel) */
|
|
101
|
+
email?: string;
|
|
102
|
+
/** Customer phone (required for SMS channel) */
|
|
103
|
+
phone?: string;
|
|
104
|
+
/** Custom expiry time in hours (default: 24) */
|
|
105
|
+
expiryHours?: number;
|
|
106
|
+
}
|
|
107
|
+
interface ComplianceLocationRequestResult {
|
|
108
|
+
/** The created location request */
|
|
109
|
+
request: LocationRequest;
|
|
110
|
+
/** Shareable link for the customer */
|
|
111
|
+
shareLink: string;
|
|
112
|
+
/** Token expiration time */
|
|
113
|
+
tokenExpiry: string;
|
|
114
|
+
/** Customer profile (if available) */
|
|
115
|
+
profile?: CustomerProfile;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* ComplianceClient - Unified Compliance Orchestration
|
|
120
|
+
*
|
|
121
|
+
* Main integration point for casino platforms. Orchestrates geolocation
|
|
122
|
+
* verification with customer risk profiling for complete compliance coverage.
|
|
123
|
+
*
|
|
124
|
+
* SDK is the primary data injection point for compliance verification.
|
|
125
|
+
*/
|
|
126
|
+
|
|
127
|
+
declare class ComplianceClient {
|
|
128
|
+
private geoClient;
|
|
129
|
+
private riskClient;
|
|
130
|
+
private config;
|
|
131
|
+
private logger;
|
|
132
|
+
private currencyRates;
|
|
133
|
+
private _currencyRatesCustomized;
|
|
134
|
+
private _currencyRatesWarned;
|
|
135
|
+
constructor(config: VesantConfig);
|
|
136
|
+
/** Get the underlying GeolocationClient for direct geolocation API access */
|
|
137
|
+
getGeolocationClient(): GeolocationClient;
|
|
138
|
+
/** Get the underlying RiskProfileClient for direct risk profile API access */
|
|
139
|
+
getRiskProfileClient(): RiskProfileClient;
|
|
140
|
+
/**
|
|
141
|
+
* Verify customer registration with automatic profile creation
|
|
142
|
+
*
|
|
143
|
+
* This is the primary integration point for new customer sign-ups.
|
|
144
|
+
* Combines geolocation verification with customer risk profile creation.
|
|
145
|
+
*
|
|
146
|
+
* Important: Profile is only created if geolocation verification passes.
|
|
147
|
+
* This prevents orphaned geolocation records when registration is blocked.
|
|
148
|
+
*
|
|
149
|
+
* @param request - Registration verification request
|
|
150
|
+
* @returns Verification response with profile and compliance status
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* ```typescript
|
|
154
|
+
* const result = await sdk.verifyAtRegistration({
|
|
155
|
+
* customerId: 'CUST-12345',
|
|
156
|
+
* fullName: 'John Doe',
|
|
157
|
+
* emailAddress: 'john@example.com',
|
|
158
|
+
* ipAddress: req.ip,
|
|
159
|
+
* deviceFingerprint: getDeviceFingerprint()
|
|
160
|
+
* });
|
|
161
|
+
*
|
|
162
|
+
* if (result.allowed) {
|
|
163
|
+
* // Create account
|
|
164
|
+
* console.log('Profile created:', result.profile);
|
|
165
|
+
* if (result.requiresKYC) {
|
|
166
|
+
* // Redirect to KYC flow
|
|
167
|
+
* }
|
|
168
|
+
* } else {
|
|
169
|
+
* // Block registration
|
|
170
|
+
* console.log('Blocked:', result.blockReasons);
|
|
171
|
+
* }
|
|
172
|
+
* ```
|
|
173
|
+
*/
|
|
174
|
+
verifyAtRegistration(request: RegistrationVerificationRequest, requestOptions?: RequestOptions): Promise<RegistrationVerificationResponse>;
|
|
175
|
+
/**
|
|
176
|
+
* Evaluate if registration should be blocked based on geolocation verification
|
|
177
|
+
*
|
|
178
|
+
* Checks:
|
|
179
|
+
* 1. General compliance status (is_compliant)
|
|
180
|
+
* 2. Explicit block flag (is_blocked)
|
|
181
|
+
* 3. Jurisdiction-specific registration allowance (allow_registration)
|
|
182
|
+
* 4. Risk level thresholds
|
|
183
|
+
*
|
|
184
|
+
* @param geoVerification - Geolocation verification result
|
|
185
|
+
* @returns Array of block reasons (empty if allowed)
|
|
186
|
+
*/
|
|
187
|
+
private evaluateRegistrationBlock;
|
|
188
|
+
/**
|
|
189
|
+
* Validate registration request has all required fields
|
|
190
|
+
*
|
|
191
|
+
* @param request - Registration request to validate
|
|
192
|
+
* @throws ValidationError if required fields are missing or invalid
|
|
193
|
+
*/
|
|
194
|
+
private validateRegistrationRequest;
|
|
195
|
+
/**
|
|
196
|
+
* Validate IP address format (IPv4 or IPv6)
|
|
197
|
+
*/
|
|
198
|
+
private isValidIP;
|
|
199
|
+
/**
|
|
200
|
+
* Validate email address format
|
|
201
|
+
*/
|
|
202
|
+
private isValidEmail;
|
|
203
|
+
private validateLoginRequest;
|
|
204
|
+
private validateTransactionRequest;
|
|
205
|
+
private validateEventRequest;
|
|
206
|
+
/**
|
|
207
|
+
* Verify customer login with profile activity update
|
|
208
|
+
*
|
|
209
|
+
* Verifies geolocation and updates customer profile with latest activity.
|
|
210
|
+
*
|
|
211
|
+
* @param request - Login verification request
|
|
212
|
+
* @returns Verification response with compliance status
|
|
213
|
+
*
|
|
214
|
+
* @example
|
|
215
|
+
* ```typescript
|
|
216
|
+
* const result = await sdk.verifyAtLogin({
|
|
217
|
+
* customerId: 'CUST-12345',
|
|
218
|
+
* ipAddress: req.ip,
|
|
219
|
+
* deviceFingerprint: getDeviceFingerprint()
|
|
220
|
+
* });
|
|
221
|
+
*
|
|
222
|
+
* if (result.allowed) {
|
|
223
|
+
* // Allow login
|
|
224
|
+
* if (result.requiresStepUp) {
|
|
225
|
+
* // Trigger MFA or additional verification
|
|
226
|
+
* }
|
|
227
|
+
* } else {
|
|
228
|
+
* // Block login
|
|
229
|
+
* console.log('Blocked:', result.blockReasons);
|
|
230
|
+
* }
|
|
231
|
+
* ```
|
|
232
|
+
*/
|
|
233
|
+
verifyAtLogin(request: LoginVerificationRequest, requestOptions?: RequestOptions): Promise<LoginVerificationResponse>;
|
|
234
|
+
/**
|
|
235
|
+
* Verify transaction with amount-based risk assessment
|
|
236
|
+
*
|
|
237
|
+
* Combines geolocation verification with transaction amount analysis
|
|
238
|
+
* and customer risk profile for comprehensive transaction screening.
|
|
239
|
+
*
|
|
240
|
+
* @param request - Transaction verification request
|
|
241
|
+
* @returns Verification response with transaction risk assessment
|
|
242
|
+
*
|
|
243
|
+
* @example
|
|
244
|
+
* ```typescript
|
|
245
|
+
* const result = await sdk.verifyAtTransaction({
|
|
246
|
+
* customerId: 'CUST-12345',
|
|
247
|
+
* ipAddress: req.ip,
|
|
248
|
+
* amount: 5000,
|
|
249
|
+
* currency: 'USD',
|
|
250
|
+
* transactionType: 'withdrawal',
|
|
251
|
+
* deviceFingerprint: getDeviceFingerprint()
|
|
252
|
+
* });
|
|
253
|
+
*
|
|
254
|
+
* if (result.allowed) {
|
|
255
|
+
* // Process transaction
|
|
256
|
+
* } else if (result.requiresApproval) {
|
|
257
|
+
* // Queue for manual review
|
|
258
|
+
* } else {
|
|
259
|
+
* // Block transaction
|
|
260
|
+
* console.log('Blocked:', result.blockReasons);
|
|
261
|
+
* }
|
|
262
|
+
* ```
|
|
263
|
+
*/
|
|
264
|
+
verifyAtTransaction(request: TransactionVerificationRequest, requestOptions?: RequestOptions): Promise<TransactionVerificationResponse>;
|
|
265
|
+
/**
|
|
266
|
+
* Generic event verification (for other touchpoints)
|
|
267
|
+
*
|
|
268
|
+
* @param request - Event verification request
|
|
269
|
+
* @returns Verification response
|
|
270
|
+
*/
|
|
271
|
+
verifyEvent(request: EventVerificationRequest, requestOptions?: RequestOptions): Promise<EventVerificationResponse>;
|
|
272
|
+
private shouldUpdateProfile;
|
|
273
|
+
private createProfileFromGeo;
|
|
274
|
+
/**
|
|
275
|
+
* Execute cipherText validation with graceful degradation.
|
|
276
|
+
* Returns undefined if cipherText is not provided or validation fails.
|
|
277
|
+
*/
|
|
278
|
+
private executeCipherTextValidation;
|
|
279
|
+
/**
|
|
280
|
+
* Build a LocationVerification from a ValidateCipherTextResponse.
|
|
281
|
+
* The validate-ciphertext endpoint now returns the full geo-verification data
|
|
282
|
+
* (is_compliant, jurisdiction, geofence_evaluation, record_id, gps_required),
|
|
283
|
+
* so a separate verifyIP call is unnecessary.
|
|
284
|
+
*/
|
|
285
|
+
private buildLocationFromCipherText;
|
|
286
|
+
private calculateTransactionRisk;
|
|
287
|
+
private checkJurisdictionLimits;
|
|
288
|
+
private normalizeToUSD;
|
|
289
|
+
private getRiskLevel;
|
|
290
|
+
private getBlockReasons;
|
|
291
|
+
private getTransactionBlockReasons;
|
|
292
|
+
/**
|
|
293
|
+
* Request live location from a customer
|
|
294
|
+
*
|
|
295
|
+
* Creates a location request and sends a notification to the customer
|
|
296
|
+
* via the specified channel (SMS, email, or push). The customer receives
|
|
297
|
+
* a link to share their location.
|
|
298
|
+
*
|
|
299
|
+
* @param input - Location request details
|
|
300
|
+
* @returns Location request result with share link
|
|
301
|
+
*
|
|
302
|
+
* @example
|
|
303
|
+
* ```typescript
|
|
304
|
+
* // Request location via SMS for transaction verification
|
|
305
|
+
* const result = await sdk.requestCustomerLocation({
|
|
306
|
+
* customerId: 'CUST-12345',
|
|
307
|
+
* channel: 'sms',
|
|
308
|
+
* phone: '+1234567890',
|
|
309
|
+
* reason: 'Verification required for high-value transaction'
|
|
310
|
+
* });
|
|
311
|
+
*
|
|
312
|
+
* console.log('Share link sent:', result.shareLink);
|
|
313
|
+
* console.log('Expires at:', result.tokenExpiry);
|
|
314
|
+
*
|
|
315
|
+
* // Request location via email
|
|
316
|
+
* const emailResult = await sdk.requestCustomerLocation({
|
|
317
|
+
* customerId: 'CUST-12345',
|
|
318
|
+
* channel: 'email',
|
|
319
|
+
* email: 'customer@example.com',
|
|
320
|
+
* reason: 'Account verification',
|
|
321
|
+
* expiryHours: 48
|
|
322
|
+
* });
|
|
323
|
+
* ```
|
|
324
|
+
*/
|
|
325
|
+
requestCustomerLocation(input: ComplianceLocationRequestInput, requestOptions?: RequestOptions): Promise<ComplianceLocationRequestResult>;
|
|
326
|
+
/**
|
|
327
|
+
* Get a specific location request by ID
|
|
328
|
+
*
|
|
329
|
+
* @param requestId - Location request ID
|
|
330
|
+
* @returns Location request details
|
|
331
|
+
*
|
|
332
|
+
* @example
|
|
333
|
+
* ```typescript
|
|
334
|
+
* const request = await sdk.getLocationRequest('req_abc123');
|
|
335
|
+
* console.log('Status:', request.status);
|
|
336
|
+
* if (request.latitude && request.longitude) {
|
|
337
|
+
* console.log('Location captured:', request.latitude, request.longitude);
|
|
338
|
+
* }
|
|
339
|
+
* ```
|
|
340
|
+
*/
|
|
341
|
+
getLocationRequest(requestId: string, requestOptions?: RequestOptions): Promise<LocationRequest>;
|
|
342
|
+
/**
|
|
343
|
+
* List location requests with filters and pagination
|
|
344
|
+
*
|
|
345
|
+
* @param filters - Optional filters
|
|
346
|
+
* @param pagination - Optional pagination
|
|
347
|
+
* @returns Paginated list of location requests
|
|
348
|
+
*
|
|
349
|
+
* @example
|
|
350
|
+
* ```typescript
|
|
351
|
+
* // Get pending requests for a customer
|
|
352
|
+
* const pending = await sdk.listLocationRequests(
|
|
353
|
+
* { status: 'pending', user_id: 'CUST-12345' },
|
|
354
|
+
* { page: 1, limit: 20 }
|
|
355
|
+
* );
|
|
356
|
+
*
|
|
357
|
+
* // Get all completed requests from last week
|
|
358
|
+
* const completed = await sdk.listLocationRequests({
|
|
359
|
+
* status: 'completed',
|
|
360
|
+
* date_from: new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString()
|
|
361
|
+
* });
|
|
362
|
+
* ```
|
|
363
|
+
*/
|
|
364
|
+
listLocationRequests(filters?: LocationRequestFilters, pagination?: PaginationParams, requestOptions?: RequestOptions): Promise<LocationRequestListResponse>;
|
|
365
|
+
/**
|
|
366
|
+
* Cancel a pending location request
|
|
367
|
+
*
|
|
368
|
+
* @param requestId - Location request ID
|
|
369
|
+
*
|
|
370
|
+
* @example
|
|
371
|
+
* ```typescript
|
|
372
|
+
* await sdk.cancelLocationRequest('req_abc123');
|
|
373
|
+
* ```
|
|
374
|
+
*/
|
|
375
|
+
cancelLocationRequest(requestId: string, requestOptions?: RequestOptions): Promise<void>;
|
|
376
|
+
/**
|
|
377
|
+
* Resend notification for a location request
|
|
378
|
+
*
|
|
379
|
+
* @param requestId - Location request ID
|
|
380
|
+
* @param contact - Contact details (email or phone)
|
|
381
|
+
*
|
|
382
|
+
* @example
|
|
383
|
+
* ```typescript
|
|
384
|
+
* // Resend to a different phone number
|
|
385
|
+
* await sdk.resendLocationRequest('req_abc123', { phone: '+0987654321' });
|
|
386
|
+
*
|
|
387
|
+
* // Resend to email
|
|
388
|
+
* await sdk.resendLocationRequest('req_abc123', { email: 'new@example.com' });
|
|
389
|
+
* ```
|
|
390
|
+
*/
|
|
391
|
+
resendLocationRequest(requestId: string, contact: {
|
|
392
|
+
email?: string;
|
|
393
|
+
phone?: string;
|
|
394
|
+
}, requestOptions?: RequestOptions): Promise<void>;
|
|
395
|
+
/**
|
|
396
|
+
* Validate location request input
|
|
397
|
+
*/
|
|
398
|
+
private validateLocationRequestInput;
|
|
399
|
+
/**
|
|
400
|
+
* Update currency exchange rates
|
|
401
|
+
*
|
|
402
|
+
* Use this to keep currency rates current for accurate transaction risk
|
|
403
|
+
* calculation. Rates should be updated regularly (e.g., daily).
|
|
404
|
+
*
|
|
405
|
+
* @param rates - Currency to USD exchange rates
|
|
406
|
+
*
|
|
407
|
+
* @example
|
|
408
|
+
* ```typescript
|
|
409
|
+
* // Update specific rates
|
|
410
|
+
* sdk.updateCurrencyRates({
|
|
411
|
+
* EUR: 1.08,
|
|
412
|
+
* GBP: 1.25,
|
|
413
|
+
* BTC: 42000, // For crypto support
|
|
414
|
+
* });
|
|
415
|
+
*
|
|
416
|
+
* // Or fetch from external service
|
|
417
|
+
* const rates = await fetchExchangeRates();
|
|
418
|
+
* sdk.updateCurrencyRates(rates);
|
|
419
|
+
* ```
|
|
420
|
+
*/
|
|
421
|
+
updateCurrencyRates(rates: CurrencyRates): void;
|
|
422
|
+
/**
|
|
423
|
+
* Get current currency rates
|
|
424
|
+
*
|
|
425
|
+
* @returns Current currency to USD exchange rates
|
|
426
|
+
*/
|
|
427
|
+
getCurrencyRates(): Readonly<CurrencyRates>;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
export { ComplianceClient as C, DEFAULT_CURRENCY_RATES as D, type EventVerificationRequest as E, type LoginVerificationRequest as L, type RegistrationVerificationRequest as R, type TransactionRiskResult as T, type ComplianceLocationRequestInput as a, type ComplianceLocationRequestResult as b, type CurrencyRates as c, type EventVerificationResponse as d, type LoginVerificationResponse as e, type RegistrationVerificationResponse as f, type TransactionVerificationRequest as g, type TransactionVerificationResponse as h };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { L as Logger, B as BaseClient, R as RequestOptions } from './client-BolQlL5e.js';
|
|
2
|
-
import { P as PaginationParams } from './types-
|
|
2
|
+
import { B as BlockReason, P as PaginationParams } from './types-QUCWam16.js';
|
|
3
3
|
|
|
4
4
|
interface DeviceFingerprintRequest {
|
|
5
5
|
device_id: string;
|
|
@@ -191,7 +191,7 @@ interface ValidateCipherTextResponse {
|
|
|
191
191
|
risk: {
|
|
192
192
|
score: number;
|
|
193
193
|
level: 'low' | 'medium' | 'high' | 'critical';
|
|
194
|
-
factors:
|
|
194
|
+
factors: BlockReason[];
|
|
195
195
|
is_vpn: boolean;
|
|
196
196
|
is_proxy: boolean;
|
|
197
197
|
is_tor: boolean;
|
|
@@ -199,7 +199,7 @@ interface ValidateCipherTextResponse {
|
|
|
199
199
|
/** Whether access is blocked based on tenant's geofence rules configuration */
|
|
200
200
|
is_blocked: boolean;
|
|
201
201
|
/** Reasons for blocking (only present if is_blocked is true) */
|
|
202
|
-
block_reasons?:
|
|
202
|
+
block_reasons?: BlockReason[];
|
|
203
203
|
/** GPS-vs-IP location mismatch detected (possible spoofing) */
|
|
204
204
|
location_mismatch?: boolean;
|
|
205
205
|
/** Distance in km between GPS and IP-derived location */
|
|
@@ -254,7 +254,7 @@ interface GeofenceEvaluation {
|
|
|
254
254
|
matched_rules: string[];
|
|
255
255
|
blocked: boolean;
|
|
256
256
|
should_alert: boolean;
|
|
257
|
-
reasons:
|
|
257
|
+
reasons: BlockReason[];
|
|
258
258
|
}
|
|
259
259
|
interface DeviceFingerprint {
|
|
260
260
|
id: string;
|
|
@@ -296,7 +296,7 @@ interface LocationVerification {
|
|
|
296
296
|
is_blocked: boolean;
|
|
297
297
|
risk_level: 'low' | 'medium' | 'high' | 'critical';
|
|
298
298
|
risk_score: number;
|
|
299
|
-
risk_reasons:
|
|
299
|
+
risk_reasons: BlockReason[];
|
|
300
300
|
jurisdiction?: JurisdictionConfig;
|
|
301
301
|
geofence_evaluation?: GeofenceEvaluation;
|
|
302
302
|
device_trust?: DeviceTrustResult;
|
|
@@ -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 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 WiFiNetwork as a2, 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,5 +1,5 @@
|
|
|
1
1
|
import { L as Logger, B as BaseClient, R as RequestOptions } from './client-BolQlL5e.mjs';
|
|
2
|
-
import { P as PaginationParams } from './types-
|
|
2
|
+
import { B as BlockReason, P as PaginationParams } from './types-QUCWam16.mjs';
|
|
3
3
|
|
|
4
4
|
interface DeviceFingerprintRequest {
|
|
5
5
|
device_id: string;
|
|
@@ -191,7 +191,7 @@ interface ValidateCipherTextResponse {
|
|
|
191
191
|
risk: {
|
|
192
192
|
score: number;
|
|
193
193
|
level: 'low' | 'medium' | 'high' | 'critical';
|
|
194
|
-
factors:
|
|
194
|
+
factors: BlockReason[];
|
|
195
195
|
is_vpn: boolean;
|
|
196
196
|
is_proxy: boolean;
|
|
197
197
|
is_tor: boolean;
|
|
@@ -199,7 +199,7 @@ interface ValidateCipherTextResponse {
|
|
|
199
199
|
/** Whether access is blocked based on tenant's geofence rules configuration */
|
|
200
200
|
is_blocked: boolean;
|
|
201
201
|
/** Reasons for blocking (only present if is_blocked is true) */
|
|
202
|
-
block_reasons?:
|
|
202
|
+
block_reasons?: BlockReason[];
|
|
203
203
|
/** GPS-vs-IP location mismatch detected (possible spoofing) */
|
|
204
204
|
location_mismatch?: boolean;
|
|
205
205
|
/** Distance in km between GPS and IP-derived location */
|
|
@@ -254,7 +254,7 @@ interface GeofenceEvaluation {
|
|
|
254
254
|
matched_rules: string[];
|
|
255
255
|
blocked: boolean;
|
|
256
256
|
should_alert: boolean;
|
|
257
|
-
reasons:
|
|
257
|
+
reasons: BlockReason[];
|
|
258
258
|
}
|
|
259
259
|
interface DeviceFingerprint {
|
|
260
260
|
id: string;
|
|
@@ -296,7 +296,7 @@ interface LocationVerification {
|
|
|
296
296
|
is_blocked: boolean;
|
|
297
297
|
risk_level: 'low' | 'medium' | 'high' | 'critical';
|
|
298
298
|
risk_score: number;
|
|
299
|
-
risk_reasons:
|
|
299
|
+
risk_reasons: BlockReason[];
|
|
300
300
|
jurisdiction?: JurisdictionConfig;
|
|
301
301
|
geofence_evaluation?: GeofenceEvaluation;
|
|
302
302
|
device_trust?: DeviceTrustResult;
|
|
@@ -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 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 WiFiNetwork as a2, 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 };
|