@moveris/shared 1.0.2 → 2.1.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/dist/index.d.mts +248 -106
- package/dist/index.d.ts +248 -106
- package/dist/index.js +340 -11
- package/dist/index.mjs +330 -11
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
type Verdict = 'live' | 'fake';
|
|
2
|
-
type FastCheckModel = '10' | '50' | '250';
|
|
2
|
+
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';
|
|
3
|
+
type StreamingStatus = 'buffering' | 'complete';
|
|
3
4
|
type FrameSource = 'media' | 'live';
|
|
4
5
|
type JobStatus = 'queued' | 'processing' | 'complete' | 'failed';
|
|
5
6
|
interface FrameData {
|
|
@@ -50,6 +51,12 @@ interface Hybrid150CheckRequest {
|
|
|
50
51
|
fps?: number;
|
|
51
52
|
frames: HybridFrameData[];
|
|
52
53
|
}
|
|
54
|
+
interface FastCheckStreamRequest {
|
|
55
|
+
session_id: string;
|
|
56
|
+
model?: FastCheckModel;
|
|
57
|
+
source?: FrameSource;
|
|
58
|
+
frame: FrameData;
|
|
59
|
+
}
|
|
53
60
|
interface FastCheckResponse {
|
|
54
61
|
verdict: Verdict | null;
|
|
55
62
|
confidence: number | null;
|
|
@@ -63,6 +70,23 @@ interface FastCheckResponse {
|
|
|
63
70
|
warning: string | null;
|
|
64
71
|
error: string | null;
|
|
65
72
|
}
|
|
73
|
+
interface FastCheckStreamResponse {
|
|
74
|
+
status: StreamingStatus;
|
|
75
|
+
session_id: string;
|
|
76
|
+
frames_received: number;
|
|
77
|
+
frames_required: number;
|
|
78
|
+
ttl_seconds: number;
|
|
79
|
+
verdict: Verdict | null;
|
|
80
|
+
confidence: number | null;
|
|
81
|
+
real_score: number | null;
|
|
82
|
+
score: number | null;
|
|
83
|
+
model: string | null;
|
|
84
|
+
processing_ms: number | null;
|
|
85
|
+
frames_processed: number | null;
|
|
86
|
+
available: boolean;
|
|
87
|
+
warning: string | null;
|
|
88
|
+
error: string | null;
|
|
89
|
+
}
|
|
66
90
|
interface VerifyResponse {
|
|
67
91
|
verdict: Verdict;
|
|
68
92
|
confidence: number;
|
|
@@ -180,6 +204,204 @@ interface LivenessCallbacks {
|
|
|
180
204
|
onStateChange?: OnStateChangeCallback;
|
|
181
205
|
}
|
|
182
206
|
|
|
207
|
+
interface FaceBoundingBox {
|
|
208
|
+
originX: number;
|
|
209
|
+
originY: number;
|
|
210
|
+
width: number;
|
|
211
|
+
height: number;
|
|
212
|
+
}
|
|
213
|
+
interface BlurAnalysis {
|
|
214
|
+
variance: number;
|
|
215
|
+
isBlurry: boolean;
|
|
216
|
+
threshold: number;
|
|
217
|
+
}
|
|
218
|
+
interface LightingAnalysis {
|
|
219
|
+
faceBrightness: number;
|
|
220
|
+
backgroundBrightness: number;
|
|
221
|
+
ratio: number;
|
|
222
|
+
status: 'good' | 'backlit' | 'low_light';
|
|
223
|
+
warning?: string;
|
|
224
|
+
}
|
|
225
|
+
interface FaceVisibilityResult {
|
|
226
|
+
visible: boolean;
|
|
227
|
+
reason?: string;
|
|
228
|
+
}
|
|
229
|
+
interface FaceAlignmentResult {
|
|
230
|
+
score: number;
|
|
231
|
+
tooClose: boolean;
|
|
232
|
+
tooFar: boolean;
|
|
233
|
+
}
|
|
234
|
+
interface OvalRegion {
|
|
235
|
+
centerX: number;
|
|
236
|
+
centerY: number;
|
|
237
|
+
width: number;
|
|
238
|
+
height: number;
|
|
239
|
+
}
|
|
240
|
+
interface FaceInOvalResult {
|
|
241
|
+
isInside: boolean;
|
|
242
|
+
centerInOval: boolean;
|
|
243
|
+
sizeMatch: boolean;
|
|
244
|
+
feedback?: string;
|
|
245
|
+
}
|
|
246
|
+
interface FrameQualityResult {
|
|
247
|
+
passed: boolean;
|
|
248
|
+
blur?: BlurAnalysis;
|
|
249
|
+
lighting?: LightingAnalysis;
|
|
250
|
+
visibility?: FaceVisibilityResult;
|
|
251
|
+
alignment?: FaceAlignmentResult;
|
|
252
|
+
rejectionReason?: 'blur' | 'backlit' | 'low_light' | 'partial_face' | 'no_face' | 'too_close' | 'too_far' | 'misaligned';
|
|
253
|
+
}
|
|
254
|
+
declare const DEFAULT_BLUR_THRESHOLD = 100;
|
|
255
|
+
declare const BLUR_THRESHOLD_MOBILE = 150;
|
|
256
|
+
declare const BACKLIT_RATIO_THRESHOLD = 0.6;
|
|
257
|
+
declare const LOW_LIGHT_THRESHOLD = 50;
|
|
258
|
+
declare const MIN_FACE_TOP_MARGIN = 0.1;
|
|
259
|
+
declare const MIN_FACE_BOTTOM_MARGIN = 0.08;
|
|
260
|
+
declare const MIN_FACE_SIDE_MARGIN = 0.05;
|
|
261
|
+
declare const MIN_CAPTURE_ALIGNMENT = 0.6;
|
|
262
|
+
declare const HIGH_ALIGNMENT = 0.85;
|
|
263
|
+
declare const GOOD_ALIGNMENT = 0.5;
|
|
264
|
+
declare const IDEAL_CROP_MULTIPLIER = 2;
|
|
265
|
+
declare const MIN_CROP_MULTIPLIER = 1.8;
|
|
266
|
+
declare const MAX_CROP_MULTIPLIER = 2.5;
|
|
267
|
+
declare const FACE_CENTER_VERTICAL_OFFSET = 0.05;
|
|
268
|
+
declare const MIN_FACE_RATIO = 0.036;
|
|
269
|
+
declare const MAX_FACE_RATIO = 0.7;
|
|
270
|
+
declare const FACE_CROP_OUTPUT_SIZE = 224;
|
|
271
|
+
declare const MAX_FACE_PERCENTAGE_IN_CROP = 0.6;
|
|
272
|
+
declare const TARGET_FACE_PERCENTAGE_IN_CROP = 0.5;
|
|
273
|
+
declare function analyzeBlur(grayscalePixels: number[], width: number, height: number, threshold?: number): BlurAnalysis;
|
|
274
|
+
declare function rgbaToGrayscale(rgbaPixels: Uint8ClampedArray | number[]): number[];
|
|
275
|
+
declare function calculateBrightness(rgbaPixels: Uint8ClampedArray | number[]): number;
|
|
276
|
+
declare function analyzeLighting(faceBrightness: number, backgroundBrightness: number): LightingAnalysis;
|
|
277
|
+
declare function isFaceFullyVisible(boundingBox: FaceBoundingBox, frameWidth: number, frameHeight: number): FaceVisibilityResult;
|
|
278
|
+
declare const DEFAULT_OVAL_REGION: OvalRegion;
|
|
279
|
+
declare function isFaceInOval(faceBox: FaceBoundingBox, frameWidth: number, frameHeight: number, oval?: OvalRegion, tolerance?: number): FaceInOvalResult;
|
|
280
|
+
declare function calculateFaceAlignment(boundingBox: FaceBoundingBox, frameWidth: number, frameHeight: number): FaceAlignmentResult;
|
|
281
|
+
declare function calculateAdaptiveCropMultiplier(faceBox: FaceBoundingBox, frameWidth: number, frameHeight: number): number;
|
|
282
|
+
declare function isFaceCropFullyInFrame(faceBox: FaceBoundingBox, frameWidth: number, frameHeight: number): boolean;
|
|
283
|
+
declare function calculateFaceCropRegion(faceBox: FaceBoundingBox, frameWidth: number, frameHeight: number): {
|
|
284
|
+
x: number;
|
|
285
|
+
y: number;
|
|
286
|
+
size: number;
|
|
287
|
+
};
|
|
288
|
+
declare function checkFrameQuality(options: {
|
|
289
|
+
faceBox?: FaceBoundingBox;
|
|
290
|
+
frameWidth: number;
|
|
291
|
+
frameHeight: number;
|
|
292
|
+
blurAnalysis?: BlurAnalysis;
|
|
293
|
+
lightingAnalysis?: LightingAnalysis;
|
|
294
|
+
minAlignment?: number;
|
|
295
|
+
}): FrameQualityResult;
|
|
296
|
+
declare class BaseFrameCollector {
|
|
297
|
+
protected frames: CapturedFrame[];
|
|
298
|
+
protected maxFrames: number;
|
|
299
|
+
protected startTime: number;
|
|
300
|
+
constructor(maxFrames?: number);
|
|
301
|
+
setMaxFrames(max: number): void;
|
|
302
|
+
addFrame(frame: CapturedFrame): void;
|
|
303
|
+
getFrames(): CapturedFrame[];
|
|
304
|
+
getCount(): number;
|
|
305
|
+
isComplete(): boolean;
|
|
306
|
+
reset(): void;
|
|
307
|
+
getStartTime(): number;
|
|
308
|
+
getNextIndex(): number;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
interface FaceLandmarkPoint {
|
|
312
|
+
x: number;
|
|
313
|
+
y: number;
|
|
314
|
+
z: number;
|
|
315
|
+
}
|
|
316
|
+
interface LandmarkValidationResult {
|
|
317
|
+
valid: boolean;
|
|
318
|
+
message?: string;
|
|
319
|
+
}
|
|
320
|
+
declare const LANDMARK_INDEX: {
|
|
321
|
+
readonly NOSE_TIP: 1;
|
|
322
|
+
readonly UPPER_LIP: 13;
|
|
323
|
+
readonly LOWER_LIP: 14;
|
|
324
|
+
};
|
|
325
|
+
declare const LANDMARK_MIN_BOUND = 0.1;
|
|
326
|
+
declare const LANDMARK_MAX_BOUND = 0.9;
|
|
327
|
+
declare const MIN_LANDMARK_COUNT = 15;
|
|
328
|
+
declare function validateFaceLandmarks(landmarks: FaceLandmarkPoint[] | undefined): LandmarkValidationResult;
|
|
329
|
+
|
|
330
|
+
interface DetectionResult {
|
|
331
|
+
type: string;
|
|
332
|
+
passed: boolean;
|
|
333
|
+
confidence: number;
|
|
334
|
+
message?: string;
|
|
335
|
+
metadata?: Record<string, unknown>;
|
|
336
|
+
}
|
|
337
|
+
interface DetectorConfig {
|
|
338
|
+
enabled: boolean;
|
|
339
|
+
minConfidence?: number;
|
|
340
|
+
}
|
|
341
|
+
interface DetectionSummary {
|
|
342
|
+
allPassed: boolean;
|
|
343
|
+
results: Map<string, DetectionResult>;
|
|
344
|
+
faceBox?: FaceBoundingBox;
|
|
345
|
+
faceLandmarks?: FaceLandmarkPoint[];
|
|
346
|
+
warnings: string[];
|
|
347
|
+
}
|
|
348
|
+
interface HeadPose {
|
|
349
|
+
yawDeg: number;
|
|
350
|
+
pitchDeg: number;
|
|
351
|
+
rollDeg: number;
|
|
352
|
+
}
|
|
353
|
+
interface GazeThresholds {
|
|
354
|
+
maxYaw: number;
|
|
355
|
+
maxPitch: number;
|
|
356
|
+
}
|
|
357
|
+
declare const DEFAULT_GAZE_THRESHOLDS: GazeThresholds;
|
|
358
|
+
interface HandOcclusionConfig {
|
|
359
|
+
faceExpansionFactor: number;
|
|
360
|
+
minLandmarksForOcclusion: number;
|
|
361
|
+
faceBoxExpiryMs: number;
|
|
362
|
+
centerRegion: number;
|
|
363
|
+
}
|
|
364
|
+
declare const DEFAULT_HAND_OCCLUSION_CONFIG: HandOcclusionConfig;
|
|
365
|
+
interface FaceDetectionTiers {
|
|
366
|
+
primaryConfidence: number;
|
|
367
|
+
secondaryConfidence: number;
|
|
368
|
+
}
|
|
369
|
+
declare const DEFAULT_FACE_DETECTION_TIERS: FaceDetectionTiers;
|
|
370
|
+
interface VideoFrameMetadata {
|
|
371
|
+
presentationTime: number;
|
|
372
|
+
expectedDisplayTime: number;
|
|
373
|
+
width: number;
|
|
374
|
+
height: number;
|
|
375
|
+
mediaTime: number;
|
|
376
|
+
presentedFrames: number;
|
|
377
|
+
processingDuration?: number;
|
|
378
|
+
}
|
|
379
|
+
interface StabilizationProgress {
|
|
380
|
+
elapsed: number;
|
|
381
|
+
stableFrameCount: number;
|
|
382
|
+
requiredFrames: number;
|
|
383
|
+
greenMean: number;
|
|
384
|
+
greenDelta: number | null;
|
|
385
|
+
threshold: number;
|
|
386
|
+
isStable: boolean;
|
|
387
|
+
progress: number;
|
|
388
|
+
}
|
|
389
|
+
interface StabilizationResult {
|
|
390
|
+
success: boolean;
|
|
391
|
+
elapsed: number;
|
|
392
|
+
finalGreenMean: number;
|
|
393
|
+
stableFrameCount: number;
|
|
394
|
+
message: string;
|
|
395
|
+
}
|
|
396
|
+
interface StabilizerConfig {
|
|
397
|
+
stabilityThreshold: number;
|
|
398
|
+
requiredStableFrames: number;
|
|
399
|
+
maxWaitMs: number;
|
|
400
|
+
checkIntervalMs: number;
|
|
401
|
+
sampleSize: number;
|
|
402
|
+
}
|
|
403
|
+
declare const DEFAULT_STABILIZER_CONFIG: StabilizerConfig;
|
|
404
|
+
|
|
183
405
|
interface LivenessClientConfig {
|
|
184
406
|
baseUrl?: string;
|
|
185
407
|
apiKey: string;
|
|
@@ -197,6 +419,7 @@ declare class LivenessApiError extends Error {
|
|
|
197
419
|
declare function toFrameData(frames: CapturedFrame[]): FrameData[];
|
|
198
420
|
declare function toHybridFrameData(frames: CapturedFrame[]): HybridFrameData[];
|
|
199
421
|
declare function toLivenessResult(response: FastCheckResponse | VerifyResponse | HybridCheckResponse): LivenessResult;
|
|
422
|
+
declare function toLivenessResultFromStream(response: FastCheckStreamResponse): LivenessResult;
|
|
200
423
|
declare function generateSessionId(): string;
|
|
201
424
|
declare class LivenessClient {
|
|
202
425
|
private readonly baseUrl;
|
|
@@ -219,6 +442,28 @@ declare class LivenessClient {
|
|
|
219
442
|
model?: FastCheckModel;
|
|
220
443
|
source?: FrameSource;
|
|
221
444
|
}): Promise<LivenessResult>;
|
|
445
|
+
streamFrame(frame: CapturedFrame, options: {
|
|
446
|
+
sessionId: string;
|
|
447
|
+
model?: FastCheckModel;
|
|
448
|
+
source?: FrameSource;
|
|
449
|
+
}): Promise<FastCheckStreamResponse>;
|
|
450
|
+
private sendStreamFrameInternal;
|
|
451
|
+
fastCheckStream(frames: CapturedFrame[], options?: {
|
|
452
|
+
sessionId?: string;
|
|
453
|
+
model?: FastCheckModel;
|
|
454
|
+
source?: FrameSource;
|
|
455
|
+
}, callbacks?: {
|
|
456
|
+
onFrameSent?: (index: number, total: number) => void;
|
|
457
|
+
onFrameBuffered?: (framesReceived: number, framesRequired: number) => void;
|
|
458
|
+
}): Promise<LivenessResult>;
|
|
459
|
+
fastCheckStreamSequential(frames: CapturedFrame[], options?: {
|
|
460
|
+
sessionId?: string;
|
|
461
|
+
model?: FastCheckModel;
|
|
462
|
+
source?: FrameSource;
|
|
463
|
+
}, callbacks?: {
|
|
464
|
+
onFrameSent?: (index: number, total: number) => void;
|
|
465
|
+
onFrameBuffered?: (framesReceived: number, framesRequired: number) => void;
|
|
466
|
+
}): Promise<LivenessResult>;
|
|
222
467
|
verify(frames: CapturedFrame[], options?: {
|
|
223
468
|
sessionId?: string;
|
|
224
469
|
captureStartMs?: number;
|
|
@@ -284,6 +529,7 @@ declare const API_PATHS: {
|
|
|
284
529
|
readonly health: "/health";
|
|
285
530
|
readonly fastCheck: "/api/v1/fast-check";
|
|
286
531
|
readonly fastCheckCrops: "/api/v1/fast-check-crops";
|
|
532
|
+
readonly fastCheckStream: "/api/v1/fast-check-stream";
|
|
287
533
|
readonly verify: "/api/v1/verify";
|
|
288
534
|
readonly hybridCheck: "/api/v1/hybrid-check";
|
|
289
535
|
readonly hybrid50: "/api/v1/hybrid-50";
|
|
@@ -437,108 +683,4 @@ interface RetryOptions {
|
|
|
437
683
|
declare function retryWithBackoff<T>(fn: () => Promise<T>, options?: RetryOptions): Promise<T>;
|
|
438
684
|
declare function sleep(ms: number): Promise<void>;
|
|
439
685
|
|
|
440
|
-
|
|
441
|
-
originX: number;
|
|
442
|
-
originY: number;
|
|
443
|
-
width: number;
|
|
444
|
-
height: number;
|
|
445
|
-
}
|
|
446
|
-
interface BlurAnalysis {
|
|
447
|
-
variance: number;
|
|
448
|
-
isBlurry: boolean;
|
|
449
|
-
threshold: number;
|
|
450
|
-
}
|
|
451
|
-
interface LightingAnalysis {
|
|
452
|
-
faceBrightness: number;
|
|
453
|
-
backgroundBrightness: number;
|
|
454
|
-
ratio: number;
|
|
455
|
-
status: 'good' | 'backlit' | 'low_light';
|
|
456
|
-
warning?: string;
|
|
457
|
-
}
|
|
458
|
-
interface FaceVisibilityResult {
|
|
459
|
-
visible: boolean;
|
|
460
|
-
reason?: string;
|
|
461
|
-
}
|
|
462
|
-
interface FaceAlignmentResult {
|
|
463
|
-
score: number;
|
|
464
|
-
tooClose: boolean;
|
|
465
|
-
tooFar: boolean;
|
|
466
|
-
}
|
|
467
|
-
interface OvalRegion {
|
|
468
|
-
centerX: number;
|
|
469
|
-
centerY: number;
|
|
470
|
-
width: number;
|
|
471
|
-
height: number;
|
|
472
|
-
}
|
|
473
|
-
interface FaceInOvalResult {
|
|
474
|
-
isInside: boolean;
|
|
475
|
-
centerInOval: boolean;
|
|
476
|
-
sizeMatch: boolean;
|
|
477
|
-
feedback?: string;
|
|
478
|
-
}
|
|
479
|
-
interface FrameQualityResult {
|
|
480
|
-
passed: boolean;
|
|
481
|
-
blur?: BlurAnalysis;
|
|
482
|
-
lighting?: LightingAnalysis;
|
|
483
|
-
visibility?: FaceVisibilityResult;
|
|
484
|
-
alignment?: FaceAlignmentResult;
|
|
485
|
-
rejectionReason?: 'blur' | 'backlit' | 'low_light' | 'partial_face' | 'no_face' | 'too_close' | 'too_far' | 'misaligned';
|
|
486
|
-
}
|
|
487
|
-
declare const DEFAULT_BLUR_THRESHOLD = 100;
|
|
488
|
-
declare const BLUR_THRESHOLD_MOBILE = 150;
|
|
489
|
-
declare const BACKLIT_RATIO_THRESHOLD = 0.6;
|
|
490
|
-
declare const LOW_LIGHT_THRESHOLD = 50;
|
|
491
|
-
declare const MIN_FACE_TOP_MARGIN = 0.1;
|
|
492
|
-
declare const MIN_FACE_BOTTOM_MARGIN = 0.08;
|
|
493
|
-
declare const MIN_FACE_SIDE_MARGIN = 0.05;
|
|
494
|
-
declare const MIN_CAPTURE_ALIGNMENT = 0.6;
|
|
495
|
-
declare const HIGH_ALIGNMENT = 0.85;
|
|
496
|
-
declare const GOOD_ALIGNMENT = 0.5;
|
|
497
|
-
declare const IDEAL_CROP_MULTIPLIER = 3.33;
|
|
498
|
-
declare const MIN_CROP_MULTIPLIER = 1.5;
|
|
499
|
-
declare const MAX_CROP_MULTIPLIER = 4;
|
|
500
|
-
declare const FACE_CENTER_VERTICAL_OFFSET = 0.15;
|
|
501
|
-
declare const MIN_FACE_RATIO = 0.03;
|
|
502
|
-
declare const MAX_FACE_RATIO = 0.7;
|
|
503
|
-
declare const FACE_CROP_OUTPUT_SIZE = 224;
|
|
504
|
-
declare const MAX_FACE_PERCENTAGE_IN_CROP = 0.5;
|
|
505
|
-
declare const TARGET_FACE_PERCENTAGE_IN_CROP = 0.3;
|
|
506
|
-
declare function analyzeBlur(grayscalePixels: number[], width: number, height: number, threshold?: number): BlurAnalysis;
|
|
507
|
-
declare function rgbaToGrayscale(rgbaPixels: Uint8ClampedArray | number[]): number[];
|
|
508
|
-
declare function calculateBrightness(rgbaPixels: Uint8ClampedArray | number[]): number;
|
|
509
|
-
declare function analyzeLighting(faceBrightness: number, backgroundBrightness: number): LightingAnalysis;
|
|
510
|
-
declare function isFaceFullyVisible(boundingBox: FaceBoundingBox, frameWidth: number, frameHeight: number): FaceVisibilityResult;
|
|
511
|
-
declare const DEFAULT_OVAL_REGION: OvalRegion;
|
|
512
|
-
declare function isFaceInOval(faceBox: FaceBoundingBox, frameWidth: number, frameHeight: number, oval?: OvalRegion, tolerance?: number): FaceInOvalResult;
|
|
513
|
-
declare function calculateFaceAlignment(boundingBox: FaceBoundingBox, frameWidth: number, frameHeight: number): FaceAlignmentResult;
|
|
514
|
-
declare function calculateAdaptiveCropMultiplier(faceBox: FaceBoundingBox, frameWidth: number, frameHeight: number): number;
|
|
515
|
-
declare function isFaceCropFullyInFrame(faceBox: FaceBoundingBox, frameWidth: number, frameHeight: number): boolean;
|
|
516
|
-
declare function calculateFaceCropRegion(faceBox: FaceBoundingBox, frameWidth: number, frameHeight: number): {
|
|
517
|
-
x: number;
|
|
518
|
-
y: number;
|
|
519
|
-
size: number;
|
|
520
|
-
};
|
|
521
|
-
declare function checkFrameQuality(options: {
|
|
522
|
-
faceBox?: FaceBoundingBox;
|
|
523
|
-
frameWidth: number;
|
|
524
|
-
frameHeight: number;
|
|
525
|
-
blurAnalysis?: BlurAnalysis;
|
|
526
|
-
lightingAnalysis?: LightingAnalysis;
|
|
527
|
-
minAlignment?: number;
|
|
528
|
-
}): FrameQualityResult;
|
|
529
|
-
declare class BaseFrameCollector {
|
|
530
|
-
protected frames: CapturedFrame[];
|
|
531
|
-
protected maxFrames: number;
|
|
532
|
-
protected startTime: number;
|
|
533
|
-
constructor(maxFrames?: number);
|
|
534
|
-
setMaxFrames(max: number): void;
|
|
535
|
-
addFrame(frame: CapturedFrame): void;
|
|
536
|
-
getFrames(): CapturedFrame[];
|
|
537
|
-
getCount(): number;
|
|
538
|
-
isComplete(): boolean;
|
|
539
|
-
reset(): void;
|
|
540
|
-
getStartTime(): number;
|
|
541
|
-
getNextIndex(): number;
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
export { ALIGNMENT_THRESHOLD_CAPTURE, ALIGNMENT_THRESHOLD_GOOD, ALIGNMENT_THRESHOLD_PERFECT, ALIGNMENT_THRESHOLD_POOR, API_ENDPOINTS, API_PATHS, AUTH_CONFIG, BACKLIT_RATIO_THRESHOLD, BLUR_THRESHOLD_MOBILE, BaseFrameCollector, type BlurAnalysis, type CaptureQualityState, type CapturedFrame, type CropData, DEFAULT_BLUR_THRESHOLD, DEFAULT_ENDPOINT, DEFAULT_LIVENESS_CONFIG, DEFAULT_LOCALE, DEFAULT_OVAL_REGION, DEFAULT_STATUS_MESSAGES, ES_LOCALE, type ErrorResponse, FACE_CENTER_VERTICAL_OFFSET, FACE_CROP_OUTPUT_SIZE, FEEDBACK_MESSAGES, FRAME_BUFFER_CONFIG, FRAME_CONFIG, type FaceAlignmentResult, type FaceBoundingBox, type FaceInOvalResult, type FaceVisibilityResult, type FastCheckCropsRequest, type FastCheckModel, type FastCheckRequest, type FastCheckResponse, type FeedbackLocale, type FeedbackMessageKey, type Frame, FrameBuffer, type FrameData, type FrameQualityResult, FrameQueue, type FrameSource, GOOD_ALIGNMENT, HIGH_ALIGNMENT, HYBRID_MODEL_CONFIGS, type HealthResponse, type Hybrid150CheckRequest, type Hybrid50CheckRequest, type HybridCheckRequest, type HybridCheckResponse, type HybridFrameData, type HybridModelConfig, IDEAL_CROP_MULTIPLIER, type JobStatus, type JobStatusResponse, LOW_LIGHT_THRESHOLD, 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, MIN_CAPTURE_ALIGNMENT, MIN_CROP_MULTIPLIER, MIN_FACE_BOTTOM_MARGIN, MIN_FACE_RATIO, MIN_FACE_SIDE_MARGIN, MIN_FACE_TOP_MARGIN, MODEL_CONFIGS, type ModelConfig, type ModelType, OVAL_GUIDE_COLORS, OVAL_GUIDE_STYLES, type OnErrorCallback, type OnFrameCapturedCallback, type OnProgressCallback, type OnResultCallback, type OnStateChangeCallback, type OvalGuideState, type OvalRegion, type QueueStatsResponse, RETRY_CONFIG, type RetryOptions, type StatusMessageKey, TARGET_FACE_PERCENTAGE_IN_CROP, type Verdict, type VerifyRequest, type VerifyResponse, analyzeBlur, analyzeLighting, calculateAdaptiveCropMultiplier, calculateBrightness, calculateFaceAlignment, calculateFaceCropRegion, canCaptureFrame, checkFrameQuality, decodeBase64, encodeBase64, generateSessionId, getCaptureQualityFeedback, getFeedbackMessage, getMinFramesForModel, getOvalGuideState, getStatusMessage, hasEnoughFrames, isFaceCropFullyInFrame, isFaceFullyVisible, isFaceInOval, retryWithBackoff, rgbaToGrayscale, sleep, toFrameData, toHybridFrameData, toLivenessResult, validateApiKey, validateFrameCount, validateFrameData, validateFrameIndex, validateTimestamp, validateUUID, validateUrl };
|
|
686
|
+
export { ALIGNMENT_THRESHOLD_CAPTURE, ALIGNMENT_THRESHOLD_GOOD, ALIGNMENT_THRESHOLD_PERFECT, ALIGNMENT_THRESHOLD_POOR, API_ENDPOINTS, API_PATHS, AUTH_CONFIG, BACKLIT_RATIO_THRESHOLD, BLUR_THRESHOLD_MOBILE, BaseFrameCollector, type BlurAnalysis, 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, ES_LOCALE, type ErrorResponse, 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 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, MIN_CAPTURE_ALIGNMENT, MIN_CROP_MULTIPLIER, MIN_FACE_BOTTOM_MARGIN, MIN_FACE_RATIO, MIN_FACE_SIDE_MARGIN, MIN_FACE_TOP_MARGIN, MIN_LANDMARK_COUNT, MODEL_CONFIGS, type ModelConfig, type ModelType, OVAL_GUIDE_COLORS, OVAL_GUIDE_STYLES, 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, analyzeLighting, calculateAdaptiveCropMultiplier, calculateBrightness, calculateFaceAlignment, calculateFaceCropRegion, canCaptureFrame, checkFrameQuality, decodeBase64, encodeBase64, generateSessionId, getCaptureQualityFeedback, getFeedbackMessage, getMinFramesForModel, getOvalGuideState, getStatusMessage, hasEnoughFrames, isFaceCropFullyInFrame, isFaceFullyVisible, isFaceInOval, retryWithBackoff, rgbaToGrayscale, sleep, toFrameData, toHybridFrameData, toLivenessResult, toLivenessResultFromStream, validateApiKey, validateFaceLandmarks, validateFrameCount, validateFrameData, validateFrameIndex, validateTimestamp, validateUUID, validateUrl };
|