idmission-web-sdk 0.0.19 → 0.0.21

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.
@@ -8,22 +8,31 @@ export type IdCapturePrediction = {
8
8
  detectionThresholdMet: boolean;
9
9
  passportDetectionScore: number;
10
10
  passportDetectionThresholdMet: boolean;
11
+ mrzDetectionScore: number;
12
+ mrzDetectionThresholdMet: boolean;
13
+ pdf417DetectionScore: number;
14
+ pdf417DetectionThresholdMet: boolean;
11
15
  bestDocumentOrPassport: DetectedObject | undefined;
16
+ bestMrz: DetectedObject | undefined;
17
+ bestPdf417: DetectedObject | undefined;
12
18
  focusScore: number;
13
19
  focusThresholdMet: boolean;
14
20
  focusPredictionTime: number;
15
21
  frameWidth: number;
16
22
  frameHeight: number;
17
23
  };
24
+ export type IdCaptureThresholds = {
25
+ document?: number;
26
+ passport?: number;
27
+ mrz?: number;
28
+ pdf417?: number;
29
+ focus?: number;
30
+ };
18
31
  export type IdCaptureModelsState = {
19
32
  ready: boolean;
20
33
  working: MutableRefObject<boolean>;
21
- documentDetectionThreshold: number;
22
- setDocumentDetectionThreshold: (value: number) => void;
23
- passportDetectionThreshold: number;
24
- setPassportDetectionThreshold: (value: number) => void;
25
- focusThreshold: number;
26
- setFocusThreshold: (value: number) => void;
34
+ thresholds: IdCaptureThresholds;
35
+ setThresholds: (value: IdCaptureThresholds) => void;
27
36
  makePrediction: (frame: Frame) => void;
28
37
  onPredictionMade: (handler: (prediction: IdCapturePrediction) => void) => void;
29
38
  detectionTime: number;
@@ -1,12 +1,13 @@
1
1
  import * as React from 'react';
2
2
  import { MutableRefObject, ReactElement, ReactNode } from 'react';
3
3
  import { FaceDetector } from '@mediapipe/tasks-vision';
4
+ export type FaceKeypoint = {
5
+ x: number;
6
+ y: number;
7
+ name: string;
8
+ };
4
9
  export type Face = {
5
- keypoints: {
6
- x: number;
7
- y: number;
8
- name: string;
9
- }[];
10
+ keypoints: FaceKeypoint[];
10
11
  box: {
11
12
  xMin: number;
12
13
  xMax: number;
@@ -15,4 +15,4 @@ export type SignatureCaptureProps = {
15
15
  background?: string;
16
16
  verbiage?: SignatureCaptureVerbiage;
17
17
  };
18
- export declare const SignatureCapture: ({ onAccept, background, verbiage, }: SignatureCaptureProps) => React.ReactElement;
18
+ export declare const SignatureCapture: ({ onAccept, verbiage, }: SignatureCaptureProps) => React.ReactElement;