@moveris/shared 2.9.0 → 3.0.0
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 +147 -17
- package/dist/index.d.mts +36 -1
- package/dist/index.d.ts +36 -1
- package/dist/index.js +160 -42
- package/dist/index.mjs +159 -42
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -47,13 +47,14 @@ The main client for interacting with the Moveris Liveness API.
|
|
|
47
47
|
const client = new LivenessClient(config: LivenessClientConfig);
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
| Option
|
|
51
|
-
|
|
|
52
|
-
| `apiKey`
|
|
53
|
-
| `baseUrl`
|
|
54
|
-
| `
|
|
55
|
-
| `
|
|
56
|
-
| `
|
|
50
|
+
| Option | Type | Default | Description |
|
|
51
|
+
| -------------- | -------------- | --------------------------- | ------------------------------------------------------------------ |
|
|
52
|
+
| `apiKey` | `string` | **required** | Your Moveris API key |
|
|
53
|
+
| `baseUrl` | `string` | `'https://api.moveris.com'` | API base URL |
|
|
54
|
+
| `modelVersion` | `ModelVersion` | - | Model version alias for `X-Model-Version` header (e.g. `'latest'`) |
|
|
55
|
+
| `timeout` | `number` | `30000` | Request timeout in milliseconds |
|
|
56
|
+
| `enableRetry` | `boolean` | `true` | Enable automatic retry with exponential backoff |
|
|
57
|
+
| `customFetch` | `typeof fetch` | `fetch` | Custom fetch implementation (for React Native) |
|
|
57
58
|
|
|
58
59
|
#### Methods
|
|
59
60
|
|
|
@@ -71,11 +72,13 @@ const result = await client.fastCheck(frames, {
|
|
|
71
72
|
|
|
72
73
|
**Parameters:**
|
|
73
74
|
|
|
74
|
-
| Option
|
|
75
|
-
|
|
|
76
|
-
| `sessionId`
|
|
77
|
-
| `model`
|
|
78
|
-
| `
|
|
75
|
+
| Option | Type | Default | Description |
|
|
76
|
+
| -------------- | ---------------- | --------------- | ----------------------------------------------------------------- |
|
|
77
|
+
| `sessionId` | `string` | auto-generated | Unique session identifier (UUID) |
|
|
78
|
+
| `model` | `FastCheckModel` | `'mixed-10-v2'` | Model to use (see Models section) |
|
|
79
|
+
| `modelVersion` | `ModelVersion` | - | Version alias sent via `X-Model-Version` header (e.g. `'latest'`) |
|
|
80
|
+
| `frameCount` | `number` | - | Frame count for alias-based model resolution |
|
|
81
|
+
| `source` | `FrameSource` | `'live'` | Frame source: `'live'` (camera) or `'media'` (recorded video) |
|
|
79
82
|
|
|
80
83
|
**Returns:** `Promise<LivenessResult>`
|
|
81
84
|
|
|
@@ -208,11 +211,36 @@ Active models (recommended):
|
|
|
208
211
|
|
|
209
212
|
Legacy models (still supported):
|
|
210
213
|
|
|
211
|
-
| Value | Frames | Description
|
|
212
|
-
| ------- | ------ |
|
|
213
|
-
| `'10'` | 10 | Standard — fast
|
|
214
|
-
| `'50'` | 50 | Standard — balanced |
|
|
215
|
-
| `'250'` | 250 | Standard — highest accuracy |
|
|
214
|
+
| Value | Frames | Description |
|
|
215
|
+
| ------- | ------ | ------------------------------------------------ |
|
|
216
|
+
| `'10'` | 10 | Standard — fast (alias: `'fast'`) |
|
|
217
|
+
| `'50'` | 50 | Standard — balanced (alias: `'spatial'`) |
|
|
218
|
+
| `'250'` | 250 | Standard — highest accuracy (alias: `'spatial'`) |
|
|
219
|
+
|
|
220
|
+
Hybrid-v2 models (alias: `'hybrid'`):
|
|
221
|
+
|
|
222
|
+
| Value | Frames | Description |
|
|
223
|
+
| ----------------- | ------ | ---------------------------- |
|
|
224
|
+
| `'hybrid-v2-10'` | 10 | Hybrid v2 — fast |
|
|
225
|
+
| `'hybrid-v2-30'` | 30 | Hybrid v2 — balanced |
|
|
226
|
+
| `'hybrid-v2-60'` | 60 | Hybrid v2 — higher accuracy |
|
|
227
|
+
| `'hybrid-v2-90'` | 90 | Hybrid v2 — high accuracy |
|
|
228
|
+
| `'hybrid-v2-100'` | 100 | Hybrid v2 — high accuracy |
|
|
229
|
+
| `'hybrid-v2-120'` | 120 | Hybrid v2 — highest accuracy |
|
|
230
|
+
| `'hybrid-v2-125'` | 125 | Hybrid v2 — highest accuracy |
|
|
231
|
+
| `'hybrid-v2-250'` | 250 | Hybrid v2 — maximum accuracy |
|
|
232
|
+
|
|
233
|
+
Deprecated models (v1 — sunset 2026-09-01):
|
|
234
|
+
|
|
235
|
+
| Value | Frames | Replacement |
|
|
236
|
+
| ------------- | ------ | ---------------- |
|
|
237
|
+
| `'mixed-10'` | 10 | `'mixed-10-v2'` |
|
|
238
|
+
| `'mixed-30'` | 30 | `'mixed-30-v2'` |
|
|
239
|
+
| `'mixed-60'` | 60 | `'mixed-60-v2'` |
|
|
240
|
+
| `'mixed-90'` | 90 | `'mixed-90-v2'` |
|
|
241
|
+
| `'mixed-120'` | 120 | `'mixed-120-v2'` |
|
|
242
|
+
| `'mixed-150'` | 150 | — |
|
|
243
|
+
| `'mixed-250'` | 250 | — |
|
|
216
244
|
|
|
217
245
|
#### FrameSource
|
|
218
246
|
|
|
@@ -266,6 +294,7 @@ interface LivenessResult {
|
|
|
266
294
|
sessionId: string; // Session identifier
|
|
267
295
|
processingMs: number; // Server processing time
|
|
268
296
|
framesProcessed: number; // Number of frames analyzed
|
|
297
|
+
deprecation?: DeprecationInfo; // Present when X-Moveris-Model-Resolved header is returned
|
|
269
298
|
}
|
|
270
299
|
```
|
|
271
300
|
|
|
@@ -292,6 +321,80 @@ interface CropData {
|
|
|
292
321
|
}
|
|
293
322
|
```
|
|
294
323
|
|
|
324
|
+
#### ModelVersion
|
|
325
|
+
|
|
326
|
+
Version alias sent via the `X-Model-Version` request header for server-side model resolution.
|
|
327
|
+
|
|
328
|
+
```typescript
|
|
329
|
+
type ModelVersion = 'latest' | 'v2' | 'v1' | 'fast' | 'spatial' | 'hybrid' | (string & object);
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
| Value | Resolves to |
|
|
333
|
+
| ----------- | ----------------------------------- |
|
|
334
|
+
| `'latest'` | Current production mixed-v2 model |
|
|
335
|
+
| `'v2'` | Pinned mixed-v2 version |
|
|
336
|
+
| `'v1'` | Legacy mixed-v1 models (deprecated) |
|
|
337
|
+
| `'fast'` | Model `'10'` |
|
|
338
|
+
| `'spatial'` | Models `'50'` / `'250'` |
|
|
339
|
+
| `'hybrid'` | Hybrid-v2 models |
|
|
340
|
+
|
|
341
|
+
> When `X-Model-Version` is set, the API also requires `frame_count` in the request body. Pass it via the `frameCount` option.
|
|
342
|
+
|
|
343
|
+
#### DeprecationInfo
|
|
344
|
+
|
|
345
|
+
Parsed from API response headers when the server resolves a model.
|
|
346
|
+
|
|
347
|
+
```typescript
|
|
348
|
+
interface DeprecationInfo {
|
|
349
|
+
deprecated: boolean; // true when model is deprecated
|
|
350
|
+
resolvedModel: string; // Concrete model id (X-Moveris-Model-Resolved)
|
|
351
|
+
deprecatedModel?: string; // Deprecated model id (X-Moveris-Deprecated-Model)
|
|
352
|
+
sunsetDate?: string; // ISO date of removal (Sunset header)
|
|
353
|
+
suggestedModel?: string; // Replacement model (X-Moveris-Suggested-Model)
|
|
354
|
+
}
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
### Model Versioning & Deprecation
|
|
360
|
+
|
|
361
|
+
The client supports model alias resolution via the `X-Model-Version` header and automatically parses deprecation headers from API responses.
|
|
362
|
+
|
|
363
|
+
```typescript
|
|
364
|
+
// Use aliases for automatic server-side resolution
|
|
365
|
+
const client = new LivenessClient({
|
|
366
|
+
apiKey: 'mv_your_api_key',
|
|
367
|
+
modelVersion: 'latest', // sent as X-Model-Version header on every request
|
|
368
|
+
});
|
|
369
|
+
|
|
370
|
+
const result = await client.fastCheck(frames, {
|
|
371
|
+
model: 'mixed-30-v2',
|
|
372
|
+
frameCount: 30, // required when modelVersion is set
|
|
373
|
+
});
|
|
374
|
+
|
|
375
|
+
// Deprecation info is automatically parsed from response headers
|
|
376
|
+
if (result.deprecation?.deprecated) {
|
|
377
|
+
console.warn(`Model "${result.deprecation.resolvedModel}" is deprecated.`);
|
|
378
|
+
console.warn(`Migrate to "${result.deprecation.suggestedModel}".`);
|
|
379
|
+
console.warn(`Sunset date: ${result.deprecation.sunsetDate}`);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
// Per-call override (takes precedence over client-level modelVersion)
|
|
383
|
+
const result2 = await client.fastCheck(frames, {
|
|
384
|
+
modelVersion: 'v2',
|
|
385
|
+
frameCount: 10,
|
|
386
|
+
});
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
#### Valid Frame Counts
|
|
390
|
+
|
|
391
|
+
When using model version aliases, `frameCount` must be one of:
|
|
392
|
+
|
|
393
|
+
```typescript
|
|
394
|
+
import { VALID_FRAME_COUNTS } from '@moveris/shared';
|
|
395
|
+
// [10, 30, 60, 90, 120]
|
|
396
|
+
```
|
|
397
|
+
|
|
295
398
|
---
|
|
296
399
|
|
|
297
400
|
### Utilities
|
|
@@ -584,6 +687,30 @@ These constants control how face crops are generated for the `fast-check-crops`
|
|
|
584
687
|
|
|
585
688
|
---
|
|
586
689
|
|
|
690
|
+
### Model Configuration
|
|
691
|
+
|
|
692
|
+
```typescript
|
|
693
|
+
import { MODEL_CONFIGS, isDeprecatedModel, getActiveModels } from '@moveris/shared';
|
|
694
|
+
|
|
695
|
+
// Access model metadata
|
|
696
|
+
const config = MODEL_CONFIGS['mixed-10-v2'];
|
|
697
|
+
console.log(config.minFrames); // 10
|
|
698
|
+
console.log(config.deprecated); // false
|
|
699
|
+
console.log(config.aliases); // ['v2', 'latest']
|
|
700
|
+
|
|
701
|
+
// Check if a model is deprecated
|
|
702
|
+
if (isDeprecatedModel('mixed-10')) {
|
|
703
|
+
const mc = MODEL_CONFIGS['mixed-10'];
|
|
704
|
+
console.log(`Deprecated! Sunset: ${mc.sunsetDate}, replace with ${mc.replacement}`);
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
// Get only active (non-deprecated) models
|
|
708
|
+
const active = getActiveModels();
|
|
709
|
+
// ['mixed-10-v2', 'mixed-30-v2', ..., '10', '50', '250', 'hybrid-v2-10', ...]
|
|
710
|
+
```
|
|
711
|
+
|
|
712
|
+
---
|
|
713
|
+
|
|
587
714
|
## Configuration Constants
|
|
588
715
|
|
|
589
716
|
```typescript
|
|
@@ -607,6 +734,9 @@ import type {
|
|
|
607
734
|
LivenessState,
|
|
608
735
|
LivenessConfig,
|
|
609
736
|
FastCheckModel,
|
|
737
|
+
ModelVersion,
|
|
738
|
+
DeprecationInfo,
|
|
739
|
+
ModelConfig,
|
|
610
740
|
FrameSource,
|
|
611
741
|
Verdict,
|
|
612
742
|
CapturedFrame,
|
package/dist/index.d.mts
CHANGED
|
@@ -5,9 +5,18 @@ interface ModelEntry {
|
|
|
5
5
|
description: string;
|
|
6
6
|
min_frames: number;
|
|
7
7
|
deprecated: boolean;
|
|
8
|
+
aliases?: string[];
|
|
8
9
|
}
|
|
9
10
|
type ModelsResponse = ModelEntry[];
|
|
10
11
|
type FastCheckModel = '10' | '50' | '250' | 'hybrid-v2-10' | 'hybrid-v2-30' | 'hybrid-v2-50' | 'hybrid-v2-60' | 'hybrid-v2-90' | 'hybrid-v2-100' | 'hybrid-v2-125' | 'hybrid-v2-150' | 'hybrid-v2-250' | 'mixed-10' | 'mixed-30' | 'mixed-60' | 'mixed-90' | 'mixed-120' | 'mixed-150' | 'mixed-250' | 'mixed-10-v2' | 'mixed-30-v2' | 'mixed-60-v2' | 'mixed-90-v2' | 'mixed-120-v2' | (string & object);
|
|
12
|
+
type ModelVersion = 'latest' | 'v2' | 'v1' | 'fast' | 'spatial' | 'hybrid' | (string & object);
|
|
13
|
+
interface DeprecationInfo {
|
|
14
|
+
deprecated: boolean;
|
|
15
|
+
resolvedModel: string;
|
|
16
|
+
deprecatedModel?: string;
|
|
17
|
+
sunsetDate?: string;
|
|
18
|
+
suggestedModel?: string;
|
|
19
|
+
}
|
|
11
20
|
type StreamingStatus = 'buffering' | 'complete';
|
|
12
21
|
type FrameSource = 'media' | 'live';
|
|
13
22
|
type JobStatus = 'queued' | 'processing' | 'complete' | 'failed';
|
|
@@ -29,6 +38,7 @@ interface FastCheckRequest {
|
|
|
29
38
|
model?: FastCheckModel;
|
|
30
39
|
source?: FrameSource;
|
|
31
40
|
frames: FrameData[];
|
|
41
|
+
frame_count?: number;
|
|
32
42
|
warnings?: string[];
|
|
33
43
|
}
|
|
34
44
|
interface FastCheckCropsRequest {
|
|
@@ -36,6 +46,7 @@ interface FastCheckCropsRequest {
|
|
|
36
46
|
model?: FastCheckModel;
|
|
37
47
|
source?: FrameSource;
|
|
38
48
|
crops: CropData[];
|
|
49
|
+
frame_count?: number;
|
|
39
50
|
}
|
|
40
51
|
interface VerifyRequest {
|
|
41
52
|
session_id: string;
|
|
@@ -65,6 +76,7 @@ interface FastCheckStreamRequest {
|
|
|
65
76
|
model?: FastCheckModel;
|
|
66
77
|
source?: FrameSource;
|
|
67
78
|
frame: FrameData;
|
|
79
|
+
frame_count?: number;
|
|
68
80
|
warnings?: string[];
|
|
69
81
|
}
|
|
70
82
|
interface FastCheckResponse {
|
|
@@ -162,12 +174,14 @@ interface LivenessResult {
|
|
|
162
174
|
processingMs: number;
|
|
163
175
|
framesProcessed: number;
|
|
164
176
|
warnings?: string[];
|
|
177
|
+
deprecation?: DeprecationInfo;
|
|
165
178
|
}
|
|
166
179
|
type LivenessState = 'idle' | 'capturing' | 'uploading' | 'processing' | 'complete' | 'error';
|
|
167
180
|
interface LivenessConfig {
|
|
168
181
|
baseUrl: string;
|
|
169
182
|
apiKey: string;
|
|
170
183
|
model?: FastCheckModel;
|
|
184
|
+
modelVersion?: ModelVersion;
|
|
171
185
|
source?: FrameSource;
|
|
172
186
|
fps?: number;
|
|
173
187
|
frameCount?: number;
|
|
@@ -180,12 +194,16 @@ interface CapturedFrame {
|
|
|
180
194
|
}
|
|
181
195
|
|
|
182
196
|
type ModelType = FastCheckModel;
|
|
197
|
+
declare const VALID_FRAME_COUNTS: readonly [10, 30, 60, 90, 120];
|
|
183
198
|
interface ModelConfig {
|
|
184
199
|
type: FastCheckModel;
|
|
185
200
|
minFrames: number;
|
|
186
201
|
recommendedFrames: number;
|
|
187
202
|
description: string;
|
|
188
203
|
deprecated: boolean;
|
|
204
|
+
aliases?: string[];
|
|
205
|
+
sunsetDate?: string;
|
|
206
|
+
replacement?: string;
|
|
189
207
|
}
|
|
190
208
|
declare const MODEL_CONFIGS: Record<FastCheckModel, ModelConfig>;
|
|
191
209
|
interface HybridModelConfig {
|
|
@@ -454,6 +472,7 @@ declare const DEFAULT_STABILIZER_CONFIG: StabilizerConfig;
|
|
|
454
472
|
interface LivenessClientConfig {
|
|
455
473
|
baseUrl?: string;
|
|
456
474
|
apiKey: string;
|
|
475
|
+
modelVersion?: ModelVersion;
|
|
457
476
|
timeout?: number;
|
|
458
477
|
enableRetry?: boolean;
|
|
459
478
|
customFetch?: typeof fetch;
|
|
@@ -473,28 +492,37 @@ declare function generateSessionId(): string;
|
|
|
473
492
|
declare class LivenessClient {
|
|
474
493
|
private readonly baseUrl;
|
|
475
494
|
private readonly apiKey;
|
|
495
|
+
private readonly modelVersion;
|
|
476
496
|
private readonly timeout;
|
|
477
497
|
private readonly enableRetry;
|
|
478
498
|
private readonly fetchFn;
|
|
479
499
|
constructor(config: LivenessClientConfig);
|
|
480
500
|
private request;
|
|
501
|
+
private requestRaw;
|
|
481
502
|
private parseErrorResponse;
|
|
482
503
|
private static unwrapErrorCode;
|
|
483
504
|
private static unwrapErrorMessage;
|
|
484
505
|
private static extractCodeFromText;
|
|
506
|
+
private static parseDeprecationHeaders;
|
|
507
|
+
private buildModelVersionHeaders;
|
|
485
508
|
private requestWithRetry;
|
|
509
|
+
private requestWithRetryRaw;
|
|
486
510
|
health(): Promise<HealthResponse>;
|
|
487
511
|
getModels(): Promise<ModelEntry[]>;
|
|
488
512
|
queueStats(): Promise<QueueStatsResponse>;
|
|
489
513
|
fastCheck(frames: CapturedFrame[], options?: {
|
|
490
514
|
sessionId?: string;
|
|
491
515
|
model?: FastCheckModel;
|
|
516
|
+
modelVersion?: ModelVersion;
|
|
517
|
+
frameCount?: number;
|
|
492
518
|
source?: FrameSource;
|
|
493
519
|
warnings?: string[];
|
|
494
520
|
}): Promise<LivenessResult>;
|
|
495
521
|
fastCheckCrops(crops: CropData[], options?: {
|
|
496
522
|
sessionId?: string;
|
|
497
523
|
model?: FastCheckModel;
|
|
524
|
+
modelVersion?: ModelVersion;
|
|
525
|
+
frameCount?: number;
|
|
498
526
|
source?: FrameSource;
|
|
499
527
|
warnings?: string[];
|
|
500
528
|
bgSegmentation?: boolean;
|
|
@@ -502,6 +530,8 @@ declare class LivenessClient {
|
|
|
502
530
|
streamFrame(frame: CapturedFrame, options: {
|
|
503
531
|
sessionId: string;
|
|
504
532
|
model?: FastCheckModel;
|
|
533
|
+
modelVersion?: ModelVersion;
|
|
534
|
+
frameCount?: number;
|
|
505
535
|
source?: FrameSource;
|
|
506
536
|
warnings?: string[];
|
|
507
537
|
}): Promise<FastCheckStreamResponse>;
|
|
@@ -509,6 +539,8 @@ declare class LivenessClient {
|
|
|
509
539
|
fastCheckStream(frames: CapturedFrame[], options?: {
|
|
510
540
|
sessionId?: string;
|
|
511
541
|
model?: FastCheckModel;
|
|
542
|
+
modelVersion?: ModelVersion;
|
|
543
|
+
frameCount?: number;
|
|
512
544
|
source?: FrameSource;
|
|
513
545
|
warnings?: string[];
|
|
514
546
|
}, callbacks?: {
|
|
@@ -518,6 +550,8 @@ declare class LivenessClient {
|
|
|
518
550
|
fastCheckStreamSequential(frames: CapturedFrame[], options?: {
|
|
519
551
|
sessionId?: string;
|
|
520
552
|
model?: FastCheckModel;
|
|
553
|
+
modelVersion?: ModelVersion;
|
|
554
|
+
frameCount?: number;
|
|
521
555
|
source?: FrameSource;
|
|
522
556
|
warnings?: string[];
|
|
523
557
|
}, callbacks?: {
|
|
@@ -611,6 +645,7 @@ declare const FRAME_BUFFER_CONFIG: {
|
|
|
611
645
|
declare const AUTH_CONFIG: {
|
|
612
646
|
readonly timeout: 30000;
|
|
613
647
|
readonly apiKeyHeader: "X-API-Key";
|
|
648
|
+
readonly modelVersionHeader: "X-Model-Version";
|
|
614
649
|
};
|
|
615
650
|
declare const FRAME_CONFIG: {
|
|
616
651
|
readonly targetFPS: 30;
|
|
@@ -801,4 +836,4 @@ declare function analyzeEyeRegionContrast(pixels: Uint8Array | Uint8ClampedArray
|
|
|
801
836
|
declare function detectSpecularHighlights(pixels: Uint8Array | Uint8ClampedArray, relativeFactor?: number, meanBrightness?: number): number;
|
|
802
837
|
declare function checkEyeRegionQuality(pixels: Uint8Array | Uint8ClampedArray, thresholds?: EyeQualityThresholds): EyeRegionQuality;
|
|
803
838
|
|
|
804
|
-
export { ALIGNMENT_THRESHOLD_CAPTURE, ALIGNMENT_THRESHOLD_GOOD, ALIGNMENT_THRESHOLD_PERFECT, ALIGNMENT_THRESHOLD_POOR, API_ENDPOINTS, API_ERROR_CODES, API_PATHS, AUTH_CONFIG, type ApiErrorCode, BACKLIT_RATIO_THRESHOLD, BLUR_THRESHOLD_MOBILE, BaseFrameCollector, type BlurAnalysis, CAMERA_ANGLE_HIGH_RATIO, CAMERA_ANGLE_LOW_RATIO, type CameraAngleResult, type CaptureQualityState, type CapturedFrame, type CropData, DEFAULT_BLUR_THRESHOLD, DEFAULT_ENDPOINT, DEFAULT_FACE_DETECTION_TIERS, DEFAULT_GAZE_THRESHOLDS, DEFAULT_HAND_OCCLUSION_CONFIG, DEFAULT_LIVENESS_CONFIG, DEFAULT_LOCALE, DEFAULT_OVAL_REGION, DEFAULT_STABILIZER_CONFIG, DEFAULT_STATUS_MESSAGES, type DetectionResult, type DetectionSummary, type DetectorConfig, ERROR_MESSAGES, ERROR_MESSAGES_ES, ES_LOCALE, EYE_LANDMARK_INDICES, EYE_QUALITY_THRESHOLDS, type ErrorResponse, type EyeQualityThresholds, type EyeRegionBounds, type EyeRegionQuality, type EyeRegionsBounds, FACE_CENTER_VERTICAL_OFFSET, FACE_CROP_OUTPUT_SIZE, FEEDBACK_MESSAGES, FRAME_BUFFER_CONFIG, FRAME_CONFIG, type FaceAlignmentResult, type FaceBoundingBox, type FaceDetectionTiers, type FaceInOvalResult, type FaceLandmarkPoint, type FaceRollResult, type FaceVisibilityResult, type FastCheckCropsRequest, type FastCheckModel, type FastCheckRequest, type FastCheckResponse, type FastCheckStreamRequest, type FastCheckStreamResponse, type FeedbackLocale, type FeedbackMessageKey, type Frame, FrameBuffer, type FrameData, type FrameQualityResult, FrameQueue, type FrameSource, GOOD_ALIGNMENT, type GazeThresholds, HIGH_ALIGNMENT, HYBRID_MODEL_CONFIGS, type HandOcclusionConfig, type HeadPose, type HealthResponse, type Hybrid150CheckRequest, type Hybrid50CheckRequest, type HybridCheckRequest, type HybridCheckResponse, type HybridFrameData, type HybridModelConfig, IDEAL_CROP_MULTIPLIER, type JobStatus, type JobStatusResponse, LANDMARK_INDEX, LANDMARK_MAX_BOUND, LANDMARK_MIN_BOUND, LOW_LIGHT_THRESHOLD, type LandmarkValidationResult, type LightingAnalysis, LivenessApiError, type LivenessCallbacks, LivenessClient, type LivenessClientConfig, type LivenessConfig, type LivenessResult, type LivenessState, MAX_CROP_MULTIPLIER, MAX_FACE_PERCENTAGE_IN_CROP, MAX_FACE_RATIO, MAX_FACE_ROLL_DEGREES, MAX_IDEAL_FACE_RATIO, MIN_CAPTURE_ALIGNMENT, MIN_CROP_MULTIPLIER, MIN_FACE_BOTTOM_MARGIN, MIN_FACE_RATIO, MIN_FACE_SIDE_MARGIN, MIN_FACE_TOP_MARGIN, MIN_IDEAL_FACE_RATIO, MIN_LANDMARK_COUNT, MODEL_CONFIGS, type ModelConfig, type ModelEntry, type ModelType, type ModelsResponse, OVAL_GUIDE_COLORS, OVAL_GUIDE_STYLES, OVAL_REGION_DESKTOP, OVAL_REGION_MOBILE, type OnErrorCallback, type OnFrameCapturedCallback, type OnProgressCallback, type OnResultCallback, type OnStateChangeCallback, type OvalGuideState, type OvalRegion, type QueueStatsResponse, RETRY_CONFIG, type RetryOptions, type StabilizationProgress, type StabilizationResult, type StabilizerConfig, type StatusMessageKey, type StreamingStatus, TARGET_FACE_PERCENTAGE_IN_CROP, type Verdict, type VerifyRequest, type VerifyResponse, type VideoFrameMetadata, analyzeBlur, analyzeEyeRegionBrightness, analyzeEyeRegionContrast, analyzeLighting, calculateAdaptiveCropMultiplier, calculateBrightness, calculateFaceAlignment, calculateFaceCropRegion, canCaptureFrame, checkEyeRegionQuality, checkFrameQuality, decodeBase64, detectCameraAngle, detectFaceRoll, detectSpecularHighlights, encodeBase64, generateSessionId, getActiveModels, getApiErrorMessage, getCaptureQualityFeedback, getEyeRegionBounds, getFeedbackMessage, getMinFramesForModel, getOvalGuideState, getStatusMessage, hasEnoughFrames, isDeprecatedModel, isFaceCropFullyInFrame, isFaceFullyVisible, isFaceInOval, isRetryableError, retryWithBackoff, rgbaToGrayscale, sleep, toFrameData, toHybridFrameData, toLivenessResult, toLivenessResultFromStream, validateApiKey, validateFaceLandmarks, validateFrameCount, validateFrameData, validateFrameIndex, validateTimestamp, validateUUID, validateUrl };
|
|
839
|
+
export { ALIGNMENT_THRESHOLD_CAPTURE, ALIGNMENT_THRESHOLD_GOOD, ALIGNMENT_THRESHOLD_PERFECT, ALIGNMENT_THRESHOLD_POOR, API_ENDPOINTS, API_ERROR_CODES, API_PATHS, AUTH_CONFIG, type ApiErrorCode, BACKLIT_RATIO_THRESHOLD, BLUR_THRESHOLD_MOBILE, BaseFrameCollector, type BlurAnalysis, CAMERA_ANGLE_HIGH_RATIO, CAMERA_ANGLE_LOW_RATIO, type CameraAngleResult, type CaptureQualityState, type CapturedFrame, type CropData, DEFAULT_BLUR_THRESHOLD, DEFAULT_ENDPOINT, DEFAULT_FACE_DETECTION_TIERS, DEFAULT_GAZE_THRESHOLDS, DEFAULT_HAND_OCCLUSION_CONFIG, DEFAULT_LIVENESS_CONFIG, DEFAULT_LOCALE, DEFAULT_OVAL_REGION, DEFAULT_STABILIZER_CONFIG, DEFAULT_STATUS_MESSAGES, type DeprecationInfo, type DetectionResult, type DetectionSummary, type DetectorConfig, ERROR_MESSAGES, ERROR_MESSAGES_ES, ES_LOCALE, EYE_LANDMARK_INDICES, EYE_QUALITY_THRESHOLDS, type ErrorResponse, type EyeQualityThresholds, type EyeRegionBounds, type EyeRegionQuality, type EyeRegionsBounds, FACE_CENTER_VERTICAL_OFFSET, FACE_CROP_OUTPUT_SIZE, FEEDBACK_MESSAGES, FRAME_BUFFER_CONFIG, FRAME_CONFIG, type FaceAlignmentResult, type FaceBoundingBox, type FaceDetectionTiers, type FaceInOvalResult, type FaceLandmarkPoint, type FaceRollResult, type FaceVisibilityResult, type FastCheckCropsRequest, type FastCheckModel, type FastCheckRequest, type FastCheckResponse, type FastCheckStreamRequest, type FastCheckStreamResponse, type FeedbackLocale, type FeedbackMessageKey, type Frame, FrameBuffer, type FrameData, type FrameQualityResult, FrameQueue, type FrameSource, GOOD_ALIGNMENT, type GazeThresholds, HIGH_ALIGNMENT, HYBRID_MODEL_CONFIGS, type HandOcclusionConfig, type HeadPose, type HealthResponse, type Hybrid150CheckRequest, type Hybrid50CheckRequest, type HybridCheckRequest, type HybridCheckResponse, type HybridFrameData, type HybridModelConfig, IDEAL_CROP_MULTIPLIER, type JobStatus, type JobStatusResponse, LANDMARK_INDEX, LANDMARK_MAX_BOUND, LANDMARK_MIN_BOUND, LOW_LIGHT_THRESHOLD, type LandmarkValidationResult, type LightingAnalysis, LivenessApiError, type LivenessCallbacks, LivenessClient, type LivenessClientConfig, type LivenessConfig, type LivenessResult, type LivenessState, MAX_CROP_MULTIPLIER, MAX_FACE_PERCENTAGE_IN_CROP, MAX_FACE_RATIO, MAX_FACE_ROLL_DEGREES, MAX_IDEAL_FACE_RATIO, MIN_CAPTURE_ALIGNMENT, MIN_CROP_MULTIPLIER, MIN_FACE_BOTTOM_MARGIN, MIN_FACE_RATIO, MIN_FACE_SIDE_MARGIN, MIN_FACE_TOP_MARGIN, MIN_IDEAL_FACE_RATIO, MIN_LANDMARK_COUNT, MODEL_CONFIGS, type ModelConfig, type ModelEntry, type ModelType, type ModelVersion, type ModelsResponse, OVAL_GUIDE_COLORS, OVAL_GUIDE_STYLES, OVAL_REGION_DESKTOP, OVAL_REGION_MOBILE, type OnErrorCallback, type OnFrameCapturedCallback, type OnProgressCallback, type OnResultCallback, type OnStateChangeCallback, type OvalGuideState, type OvalRegion, type QueueStatsResponse, RETRY_CONFIG, type RetryOptions, type StabilizationProgress, type StabilizationResult, type StabilizerConfig, type StatusMessageKey, type StreamingStatus, TARGET_FACE_PERCENTAGE_IN_CROP, VALID_FRAME_COUNTS, type Verdict, type VerifyRequest, type VerifyResponse, type VideoFrameMetadata, analyzeBlur, analyzeEyeRegionBrightness, analyzeEyeRegionContrast, analyzeLighting, calculateAdaptiveCropMultiplier, calculateBrightness, calculateFaceAlignment, calculateFaceCropRegion, canCaptureFrame, checkEyeRegionQuality, checkFrameQuality, decodeBase64, detectCameraAngle, detectFaceRoll, detectSpecularHighlights, encodeBase64, generateSessionId, getActiveModels, getApiErrorMessage, getCaptureQualityFeedback, getEyeRegionBounds, getFeedbackMessage, getMinFramesForModel, getOvalGuideState, getStatusMessage, hasEnoughFrames, isDeprecatedModel, isFaceCropFullyInFrame, isFaceFullyVisible, isFaceInOval, isRetryableError, retryWithBackoff, rgbaToGrayscale, sleep, toFrameData, toHybridFrameData, toLivenessResult, toLivenessResultFromStream, validateApiKey, validateFaceLandmarks, validateFrameCount, validateFrameData, validateFrameIndex, validateTimestamp, validateUUID, validateUrl };
|
package/dist/index.d.ts
CHANGED
|
@@ -5,9 +5,18 @@ interface ModelEntry {
|
|
|
5
5
|
description: string;
|
|
6
6
|
min_frames: number;
|
|
7
7
|
deprecated: boolean;
|
|
8
|
+
aliases?: string[];
|
|
8
9
|
}
|
|
9
10
|
type ModelsResponse = ModelEntry[];
|
|
10
11
|
type FastCheckModel = '10' | '50' | '250' | 'hybrid-v2-10' | 'hybrid-v2-30' | 'hybrid-v2-50' | 'hybrid-v2-60' | 'hybrid-v2-90' | 'hybrid-v2-100' | 'hybrid-v2-125' | 'hybrid-v2-150' | 'hybrid-v2-250' | 'mixed-10' | 'mixed-30' | 'mixed-60' | 'mixed-90' | 'mixed-120' | 'mixed-150' | 'mixed-250' | 'mixed-10-v2' | 'mixed-30-v2' | 'mixed-60-v2' | 'mixed-90-v2' | 'mixed-120-v2' | (string & object);
|
|
12
|
+
type ModelVersion = 'latest' | 'v2' | 'v1' | 'fast' | 'spatial' | 'hybrid' | (string & object);
|
|
13
|
+
interface DeprecationInfo {
|
|
14
|
+
deprecated: boolean;
|
|
15
|
+
resolvedModel: string;
|
|
16
|
+
deprecatedModel?: string;
|
|
17
|
+
sunsetDate?: string;
|
|
18
|
+
suggestedModel?: string;
|
|
19
|
+
}
|
|
11
20
|
type StreamingStatus = 'buffering' | 'complete';
|
|
12
21
|
type FrameSource = 'media' | 'live';
|
|
13
22
|
type JobStatus = 'queued' | 'processing' | 'complete' | 'failed';
|
|
@@ -29,6 +38,7 @@ interface FastCheckRequest {
|
|
|
29
38
|
model?: FastCheckModel;
|
|
30
39
|
source?: FrameSource;
|
|
31
40
|
frames: FrameData[];
|
|
41
|
+
frame_count?: number;
|
|
32
42
|
warnings?: string[];
|
|
33
43
|
}
|
|
34
44
|
interface FastCheckCropsRequest {
|
|
@@ -36,6 +46,7 @@ interface FastCheckCropsRequest {
|
|
|
36
46
|
model?: FastCheckModel;
|
|
37
47
|
source?: FrameSource;
|
|
38
48
|
crops: CropData[];
|
|
49
|
+
frame_count?: number;
|
|
39
50
|
}
|
|
40
51
|
interface VerifyRequest {
|
|
41
52
|
session_id: string;
|
|
@@ -65,6 +76,7 @@ interface FastCheckStreamRequest {
|
|
|
65
76
|
model?: FastCheckModel;
|
|
66
77
|
source?: FrameSource;
|
|
67
78
|
frame: FrameData;
|
|
79
|
+
frame_count?: number;
|
|
68
80
|
warnings?: string[];
|
|
69
81
|
}
|
|
70
82
|
interface FastCheckResponse {
|
|
@@ -162,12 +174,14 @@ interface LivenessResult {
|
|
|
162
174
|
processingMs: number;
|
|
163
175
|
framesProcessed: number;
|
|
164
176
|
warnings?: string[];
|
|
177
|
+
deprecation?: DeprecationInfo;
|
|
165
178
|
}
|
|
166
179
|
type LivenessState = 'idle' | 'capturing' | 'uploading' | 'processing' | 'complete' | 'error';
|
|
167
180
|
interface LivenessConfig {
|
|
168
181
|
baseUrl: string;
|
|
169
182
|
apiKey: string;
|
|
170
183
|
model?: FastCheckModel;
|
|
184
|
+
modelVersion?: ModelVersion;
|
|
171
185
|
source?: FrameSource;
|
|
172
186
|
fps?: number;
|
|
173
187
|
frameCount?: number;
|
|
@@ -180,12 +194,16 @@ interface CapturedFrame {
|
|
|
180
194
|
}
|
|
181
195
|
|
|
182
196
|
type ModelType = FastCheckModel;
|
|
197
|
+
declare const VALID_FRAME_COUNTS: readonly [10, 30, 60, 90, 120];
|
|
183
198
|
interface ModelConfig {
|
|
184
199
|
type: FastCheckModel;
|
|
185
200
|
minFrames: number;
|
|
186
201
|
recommendedFrames: number;
|
|
187
202
|
description: string;
|
|
188
203
|
deprecated: boolean;
|
|
204
|
+
aliases?: string[];
|
|
205
|
+
sunsetDate?: string;
|
|
206
|
+
replacement?: string;
|
|
189
207
|
}
|
|
190
208
|
declare const MODEL_CONFIGS: Record<FastCheckModel, ModelConfig>;
|
|
191
209
|
interface HybridModelConfig {
|
|
@@ -454,6 +472,7 @@ declare const DEFAULT_STABILIZER_CONFIG: StabilizerConfig;
|
|
|
454
472
|
interface LivenessClientConfig {
|
|
455
473
|
baseUrl?: string;
|
|
456
474
|
apiKey: string;
|
|
475
|
+
modelVersion?: ModelVersion;
|
|
457
476
|
timeout?: number;
|
|
458
477
|
enableRetry?: boolean;
|
|
459
478
|
customFetch?: typeof fetch;
|
|
@@ -473,28 +492,37 @@ declare function generateSessionId(): string;
|
|
|
473
492
|
declare class LivenessClient {
|
|
474
493
|
private readonly baseUrl;
|
|
475
494
|
private readonly apiKey;
|
|
495
|
+
private readonly modelVersion;
|
|
476
496
|
private readonly timeout;
|
|
477
497
|
private readonly enableRetry;
|
|
478
498
|
private readonly fetchFn;
|
|
479
499
|
constructor(config: LivenessClientConfig);
|
|
480
500
|
private request;
|
|
501
|
+
private requestRaw;
|
|
481
502
|
private parseErrorResponse;
|
|
482
503
|
private static unwrapErrorCode;
|
|
483
504
|
private static unwrapErrorMessage;
|
|
484
505
|
private static extractCodeFromText;
|
|
506
|
+
private static parseDeprecationHeaders;
|
|
507
|
+
private buildModelVersionHeaders;
|
|
485
508
|
private requestWithRetry;
|
|
509
|
+
private requestWithRetryRaw;
|
|
486
510
|
health(): Promise<HealthResponse>;
|
|
487
511
|
getModels(): Promise<ModelEntry[]>;
|
|
488
512
|
queueStats(): Promise<QueueStatsResponse>;
|
|
489
513
|
fastCheck(frames: CapturedFrame[], options?: {
|
|
490
514
|
sessionId?: string;
|
|
491
515
|
model?: FastCheckModel;
|
|
516
|
+
modelVersion?: ModelVersion;
|
|
517
|
+
frameCount?: number;
|
|
492
518
|
source?: FrameSource;
|
|
493
519
|
warnings?: string[];
|
|
494
520
|
}): Promise<LivenessResult>;
|
|
495
521
|
fastCheckCrops(crops: CropData[], options?: {
|
|
496
522
|
sessionId?: string;
|
|
497
523
|
model?: FastCheckModel;
|
|
524
|
+
modelVersion?: ModelVersion;
|
|
525
|
+
frameCount?: number;
|
|
498
526
|
source?: FrameSource;
|
|
499
527
|
warnings?: string[];
|
|
500
528
|
bgSegmentation?: boolean;
|
|
@@ -502,6 +530,8 @@ declare class LivenessClient {
|
|
|
502
530
|
streamFrame(frame: CapturedFrame, options: {
|
|
503
531
|
sessionId: string;
|
|
504
532
|
model?: FastCheckModel;
|
|
533
|
+
modelVersion?: ModelVersion;
|
|
534
|
+
frameCount?: number;
|
|
505
535
|
source?: FrameSource;
|
|
506
536
|
warnings?: string[];
|
|
507
537
|
}): Promise<FastCheckStreamResponse>;
|
|
@@ -509,6 +539,8 @@ declare class LivenessClient {
|
|
|
509
539
|
fastCheckStream(frames: CapturedFrame[], options?: {
|
|
510
540
|
sessionId?: string;
|
|
511
541
|
model?: FastCheckModel;
|
|
542
|
+
modelVersion?: ModelVersion;
|
|
543
|
+
frameCount?: number;
|
|
512
544
|
source?: FrameSource;
|
|
513
545
|
warnings?: string[];
|
|
514
546
|
}, callbacks?: {
|
|
@@ -518,6 +550,8 @@ declare class LivenessClient {
|
|
|
518
550
|
fastCheckStreamSequential(frames: CapturedFrame[], options?: {
|
|
519
551
|
sessionId?: string;
|
|
520
552
|
model?: FastCheckModel;
|
|
553
|
+
modelVersion?: ModelVersion;
|
|
554
|
+
frameCount?: number;
|
|
521
555
|
source?: FrameSource;
|
|
522
556
|
warnings?: string[];
|
|
523
557
|
}, callbacks?: {
|
|
@@ -611,6 +645,7 @@ declare const FRAME_BUFFER_CONFIG: {
|
|
|
611
645
|
declare const AUTH_CONFIG: {
|
|
612
646
|
readonly timeout: 30000;
|
|
613
647
|
readonly apiKeyHeader: "X-API-Key";
|
|
648
|
+
readonly modelVersionHeader: "X-Model-Version";
|
|
614
649
|
};
|
|
615
650
|
declare const FRAME_CONFIG: {
|
|
616
651
|
readonly targetFPS: 30;
|
|
@@ -801,4 +836,4 @@ declare function analyzeEyeRegionContrast(pixels: Uint8Array | Uint8ClampedArray
|
|
|
801
836
|
declare function detectSpecularHighlights(pixels: Uint8Array | Uint8ClampedArray, relativeFactor?: number, meanBrightness?: number): number;
|
|
802
837
|
declare function checkEyeRegionQuality(pixels: Uint8Array | Uint8ClampedArray, thresholds?: EyeQualityThresholds): EyeRegionQuality;
|
|
803
838
|
|
|
804
|
-
export { ALIGNMENT_THRESHOLD_CAPTURE, ALIGNMENT_THRESHOLD_GOOD, ALIGNMENT_THRESHOLD_PERFECT, ALIGNMENT_THRESHOLD_POOR, API_ENDPOINTS, API_ERROR_CODES, API_PATHS, AUTH_CONFIG, type ApiErrorCode, BACKLIT_RATIO_THRESHOLD, BLUR_THRESHOLD_MOBILE, BaseFrameCollector, type BlurAnalysis, CAMERA_ANGLE_HIGH_RATIO, CAMERA_ANGLE_LOW_RATIO, type CameraAngleResult, type CaptureQualityState, type CapturedFrame, type CropData, DEFAULT_BLUR_THRESHOLD, DEFAULT_ENDPOINT, DEFAULT_FACE_DETECTION_TIERS, DEFAULT_GAZE_THRESHOLDS, DEFAULT_HAND_OCCLUSION_CONFIG, DEFAULT_LIVENESS_CONFIG, DEFAULT_LOCALE, DEFAULT_OVAL_REGION, DEFAULT_STABILIZER_CONFIG, DEFAULT_STATUS_MESSAGES, type DetectionResult, type DetectionSummary, type DetectorConfig, ERROR_MESSAGES, ERROR_MESSAGES_ES, ES_LOCALE, EYE_LANDMARK_INDICES, EYE_QUALITY_THRESHOLDS, type ErrorResponse, type EyeQualityThresholds, type EyeRegionBounds, type EyeRegionQuality, type EyeRegionsBounds, FACE_CENTER_VERTICAL_OFFSET, FACE_CROP_OUTPUT_SIZE, FEEDBACK_MESSAGES, FRAME_BUFFER_CONFIG, FRAME_CONFIG, type FaceAlignmentResult, type FaceBoundingBox, type FaceDetectionTiers, type FaceInOvalResult, type FaceLandmarkPoint, type FaceRollResult, type FaceVisibilityResult, type FastCheckCropsRequest, type FastCheckModel, type FastCheckRequest, type FastCheckResponse, type FastCheckStreamRequest, type FastCheckStreamResponse, type FeedbackLocale, type FeedbackMessageKey, type Frame, FrameBuffer, type FrameData, type FrameQualityResult, FrameQueue, type FrameSource, GOOD_ALIGNMENT, type GazeThresholds, HIGH_ALIGNMENT, HYBRID_MODEL_CONFIGS, type HandOcclusionConfig, type HeadPose, type HealthResponse, type Hybrid150CheckRequest, type Hybrid50CheckRequest, type HybridCheckRequest, type HybridCheckResponse, type HybridFrameData, type HybridModelConfig, IDEAL_CROP_MULTIPLIER, type JobStatus, type JobStatusResponse, LANDMARK_INDEX, LANDMARK_MAX_BOUND, LANDMARK_MIN_BOUND, LOW_LIGHT_THRESHOLD, type LandmarkValidationResult, type LightingAnalysis, LivenessApiError, type LivenessCallbacks, LivenessClient, type LivenessClientConfig, type LivenessConfig, type LivenessResult, type LivenessState, MAX_CROP_MULTIPLIER, MAX_FACE_PERCENTAGE_IN_CROP, MAX_FACE_RATIO, MAX_FACE_ROLL_DEGREES, MAX_IDEAL_FACE_RATIO, MIN_CAPTURE_ALIGNMENT, MIN_CROP_MULTIPLIER, MIN_FACE_BOTTOM_MARGIN, MIN_FACE_RATIO, MIN_FACE_SIDE_MARGIN, MIN_FACE_TOP_MARGIN, MIN_IDEAL_FACE_RATIO, MIN_LANDMARK_COUNT, MODEL_CONFIGS, type ModelConfig, type ModelEntry, type ModelType, type ModelsResponse, OVAL_GUIDE_COLORS, OVAL_GUIDE_STYLES, OVAL_REGION_DESKTOP, OVAL_REGION_MOBILE, type OnErrorCallback, type OnFrameCapturedCallback, type OnProgressCallback, type OnResultCallback, type OnStateChangeCallback, type OvalGuideState, type OvalRegion, type QueueStatsResponse, RETRY_CONFIG, type RetryOptions, type StabilizationProgress, type StabilizationResult, type StabilizerConfig, type StatusMessageKey, type StreamingStatus, TARGET_FACE_PERCENTAGE_IN_CROP, type Verdict, type VerifyRequest, type VerifyResponse, type VideoFrameMetadata, analyzeBlur, analyzeEyeRegionBrightness, analyzeEyeRegionContrast, analyzeLighting, calculateAdaptiveCropMultiplier, calculateBrightness, calculateFaceAlignment, calculateFaceCropRegion, canCaptureFrame, checkEyeRegionQuality, checkFrameQuality, decodeBase64, detectCameraAngle, detectFaceRoll, detectSpecularHighlights, encodeBase64, generateSessionId, getActiveModels, getApiErrorMessage, getCaptureQualityFeedback, getEyeRegionBounds, getFeedbackMessage, getMinFramesForModel, getOvalGuideState, getStatusMessage, hasEnoughFrames, isDeprecatedModel, isFaceCropFullyInFrame, isFaceFullyVisible, isFaceInOval, isRetryableError, retryWithBackoff, rgbaToGrayscale, sleep, toFrameData, toHybridFrameData, toLivenessResult, toLivenessResultFromStream, validateApiKey, validateFaceLandmarks, validateFrameCount, validateFrameData, validateFrameIndex, validateTimestamp, validateUUID, validateUrl };
|
|
839
|
+
export { ALIGNMENT_THRESHOLD_CAPTURE, ALIGNMENT_THRESHOLD_GOOD, ALIGNMENT_THRESHOLD_PERFECT, ALIGNMENT_THRESHOLD_POOR, API_ENDPOINTS, API_ERROR_CODES, API_PATHS, AUTH_CONFIG, type ApiErrorCode, BACKLIT_RATIO_THRESHOLD, BLUR_THRESHOLD_MOBILE, BaseFrameCollector, type BlurAnalysis, CAMERA_ANGLE_HIGH_RATIO, CAMERA_ANGLE_LOW_RATIO, type CameraAngleResult, type CaptureQualityState, type CapturedFrame, type CropData, DEFAULT_BLUR_THRESHOLD, DEFAULT_ENDPOINT, DEFAULT_FACE_DETECTION_TIERS, DEFAULT_GAZE_THRESHOLDS, DEFAULT_HAND_OCCLUSION_CONFIG, DEFAULT_LIVENESS_CONFIG, DEFAULT_LOCALE, DEFAULT_OVAL_REGION, DEFAULT_STABILIZER_CONFIG, DEFAULT_STATUS_MESSAGES, type DeprecationInfo, type DetectionResult, type DetectionSummary, type DetectorConfig, ERROR_MESSAGES, ERROR_MESSAGES_ES, ES_LOCALE, EYE_LANDMARK_INDICES, EYE_QUALITY_THRESHOLDS, type ErrorResponse, type EyeQualityThresholds, type EyeRegionBounds, type EyeRegionQuality, type EyeRegionsBounds, FACE_CENTER_VERTICAL_OFFSET, FACE_CROP_OUTPUT_SIZE, FEEDBACK_MESSAGES, FRAME_BUFFER_CONFIG, FRAME_CONFIG, type FaceAlignmentResult, type FaceBoundingBox, type FaceDetectionTiers, type FaceInOvalResult, type FaceLandmarkPoint, type FaceRollResult, type FaceVisibilityResult, type FastCheckCropsRequest, type FastCheckModel, type FastCheckRequest, type FastCheckResponse, type FastCheckStreamRequest, type FastCheckStreamResponse, type FeedbackLocale, type FeedbackMessageKey, type Frame, FrameBuffer, type FrameData, type FrameQualityResult, FrameQueue, type FrameSource, GOOD_ALIGNMENT, type GazeThresholds, HIGH_ALIGNMENT, HYBRID_MODEL_CONFIGS, type HandOcclusionConfig, type HeadPose, type HealthResponse, type Hybrid150CheckRequest, type Hybrid50CheckRequest, type HybridCheckRequest, type HybridCheckResponse, type HybridFrameData, type HybridModelConfig, IDEAL_CROP_MULTIPLIER, type JobStatus, type JobStatusResponse, LANDMARK_INDEX, LANDMARK_MAX_BOUND, LANDMARK_MIN_BOUND, LOW_LIGHT_THRESHOLD, type LandmarkValidationResult, type LightingAnalysis, LivenessApiError, type LivenessCallbacks, LivenessClient, type LivenessClientConfig, type LivenessConfig, type LivenessResult, type LivenessState, MAX_CROP_MULTIPLIER, MAX_FACE_PERCENTAGE_IN_CROP, MAX_FACE_RATIO, MAX_FACE_ROLL_DEGREES, MAX_IDEAL_FACE_RATIO, MIN_CAPTURE_ALIGNMENT, MIN_CROP_MULTIPLIER, MIN_FACE_BOTTOM_MARGIN, MIN_FACE_RATIO, MIN_FACE_SIDE_MARGIN, MIN_FACE_TOP_MARGIN, MIN_IDEAL_FACE_RATIO, MIN_LANDMARK_COUNT, MODEL_CONFIGS, type ModelConfig, type ModelEntry, type ModelType, type ModelVersion, type ModelsResponse, OVAL_GUIDE_COLORS, OVAL_GUIDE_STYLES, OVAL_REGION_DESKTOP, OVAL_REGION_MOBILE, type OnErrorCallback, type OnFrameCapturedCallback, type OnProgressCallback, type OnResultCallback, type OnStateChangeCallback, type OvalGuideState, type OvalRegion, type QueueStatsResponse, RETRY_CONFIG, type RetryOptions, type StabilizationProgress, type StabilizationResult, type StabilizerConfig, type StatusMessageKey, type StreamingStatus, TARGET_FACE_PERCENTAGE_IN_CROP, VALID_FRAME_COUNTS, type Verdict, type VerifyRequest, type VerifyResponse, type VideoFrameMetadata, analyzeBlur, analyzeEyeRegionBrightness, analyzeEyeRegionContrast, analyzeLighting, calculateAdaptiveCropMultiplier, calculateBrightness, calculateFaceAlignment, calculateFaceCropRegion, canCaptureFrame, checkEyeRegionQuality, checkFrameQuality, decodeBase64, detectCameraAngle, detectFaceRoll, detectSpecularHighlights, encodeBase64, generateSessionId, getActiveModels, getApiErrorMessage, getCaptureQualityFeedback, getEyeRegionBounds, getFeedbackMessage, getMinFramesForModel, getOvalGuideState, getStatusMessage, hasEnoughFrames, isDeprecatedModel, isFaceCropFullyInFrame, isFaceFullyVisible, isFaceInOval, isRetryableError, retryWithBackoff, rgbaToGrayscale, sleep, toFrameData, toHybridFrameData, toLivenessResult, toLivenessResultFromStream, validateApiKey, validateFaceLandmarks, validateFrameCount, validateFrameData, validateFrameIndex, validateTimestamp, validateUUID, validateUrl };
|