idmission-web-sdk 2.1.37 → 2.1.38
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/components/common/LoaderButton.d.ts +1 -1
- package/dist/components/face_liveness/FaceCaptureGuideOverlay.d.ts +2 -6
- package/dist/components/face_liveness/FaceLivenessCapture.d.ts +2 -8
- package/dist/components/face_liveness/FaceLivenessFailure.d.ts +1 -2
- package/dist/components/face_liveness/FaceLivenessWizard.d.ts +2 -6
- package/dist/components/id_capture/IdCaptureStateProvider.d.ts +2 -0
- package/dist/components/selfie_capture/SelfieCapture.d.ts +3 -8
- package/dist/components/selfie_capture/SelfieCaptureLoadingGraphic.d.ts +1 -14
- package/dist/components/selfie_capture/SelfieGuidanceModelsProvider.d.ts +2 -2
- package/dist/components/video_id/IdVideoCaptureFlipIdPrompt.d.ts +5 -10
- package/dist/components/video_id/IdVideoCaptureGuides.d.ts +3 -11
- package/dist/lib/locales/es/translation.d.ts +0 -2
- package/dist/lib/locales/index.d.ts +0 -2
- package/dist/lib/models/DocumentDetection.d.ts +7 -3
- package/dist/lib/models/Focus.d.ts +4 -0
- package/dist/sdk2.cjs.development.js +923 -1439
- package/dist/sdk2.cjs.development.js.map +1 -1
- package/dist/sdk2.cjs.production.js +1 -1
- package/dist/sdk2.cjs.production.js.map +1 -1
- package/dist/sdk2.esm.js +923 -1439
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +923 -1439
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/dist/themes/index.d.ts +0 -5
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/dist/components/video_id/IdVideoCaptureGuidesCommon.d.ts +0 -20
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
export type LoaderButtonVariant = 'primary' | 'secondary' | 'positive' | 'negative' | 'warning'
|
|
2
|
+
export type LoaderButtonVariant = 'primary' | 'secondary' | 'positive' | 'negative' | 'warning';
|
|
3
3
|
export type LoaderButtonColors = {
|
|
4
4
|
backgroundColor?: string;
|
|
5
5
|
textColor?: string;
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
2
|
export type FaceCaptureGuideOverlayVariant = 'satisfied' | 'unsatisfied';
|
|
3
|
-
export declare const FaceCaptureGuideContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
4
3
|
export type FaceCaptureGuideOverlayClassNames = {
|
|
5
4
|
container?: string;
|
|
6
5
|
oval?: string;
|
|
7
6
|
};
|
|
8
|
-
export type FaceGuideStatus = 'ready' | 'processing' | 'success' | 'failure';
|
|
9
7
|
export type FaceCaptureGuideOverlayProps = {
|
|
10
8
|
classNames?: FaceCaptureGuideOverlayClassNames;
|
|
11
9
|
variant?: FaceCaptureGuideOverlayVariant;
|
|
12
|
-
status?: FaceGuideStatus;
|
|
13
10
|
borderWidth?: number;
|
|
14
11
|
borderColor?: string;
|
|
15
|
-
borderOpacity?: number;
|
|
16
12
|
};
|
|
17
|
-
export declare const FaceCaptureGuideOverlay: ({ classNames,
|
|
13
|
+
export declare const FaceCaptureGuideOverlay: ({ classNames, variant, borderWidth, borderColor, }: FaceCaptureGuideOverlayProps) => ReactElement;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
2
|
import { SelfieCaptureClassNames, SelfieCaptureColors, SelfieCaptureVerbiage } from '../selfie_capture/SelfieCapture';
|
|
3
3
|
import { SelfieProgressPreviewClassNames } from '../common/SelfieProgressPreview';
|
|
4
4
|
import { CustomerSuppliedVerbiage } from '../../lib/locales';
|
|
5
|
-
import { FaceCaptureGuideOverlayProps } from './FaceCaptureGuideOverlay';
|
|
6
5
|
export type FaceLivenessCaptureClassNames = SelfieCaptureClassNames & {
|
|
7
6
|
imagePreview?: SelfieProgressPreviewClassNames;
|
|
8
7
|
};
|
|
@@ -12,8 +11,6 @@ export type FaceLivenessCaptureVerbiage = SelfieCaptureVerbiage & {
|
|
|
12
11
|
guidanceRemoveHeadCoveringsText?: CustomerSuppliedVerbiage;
|
|
13
12
|
guidanceRemoveMaskText?: CustomerSuppliedVerbiage;
|
|
14
13
|
progressPreviewText?: CustomerSuppliedVerbiage;
|
|
15
|
-
guidanceLivenessCheckFailedText?: CustomerSuppliedVerbiage;
|
|
16
|
-
guidanceLivenessCheckErrorText?: CustomerSuppliedVerbiage;
|
|
17
14
|
};
|
|
18
15
|
export type FaceLivenessCaptureProps = {
|
|
19
16
|
onCapture?: () => void;
|
|
@@ -22,12 +19,9 @@ export type FaceLivenessCaptureProps = {
|
|
|
22
19
|
onExit?: () => void;
|
|
23
20
|
timeoutDurationMs?: number;
|
|
24
21
|
silentFallback?: boolean;
|
|
25
|
-
guidesComponent?: ComponentType<FaceCaptureGuideOverlayProps>;
|
|
26
|
-
disableCapturePreview?: boolean;
|
|
27
|
-
requireVerticalFaceCentering?: boolean;
|
|
28
22
|
classNames?: FaceLivenessCaptureClassNames;
|
|
29
23
|
colors?: FaceLivenessCaptureColors;
|
|
30
24
|
verbiage?: FaceLivenessCaptureVerbiage;
|
|
31
25
|
debugMode?: boolean;
|
|
32
26
|
};
|
|
33
|
-
export declare const FaceLivenessCapture: ({ onCapture, onSuccess, onTimeout, onExit, timeoutDurationMs, silentFallback,
|
|
27
|
+
export declare const FaceLivenessCapture: ({ onCapture, onSuccess, onTimeout, onExit, timeoutDurationMs, silentFallback, classNames, colors, verbiage: rawVerbiage, debugMode, }: FaceLivenessCaptureProps) => ReactElement;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
2
|
import { LoaderButtonColors } from '../common/LoaderButton';
|
|
3
3
|
import { CustomerSuppliedVerbiage } from '../../lib/locales';
|
|
4
4
|
export type FaceLivenessFailureAssets = {
|
|
@@ -33,4 +33,3 @@ export type FaceLivenessFailureProps = {
|
|
|
33
33
|
verbiage?: FaceLivenessFailureVerbiage;
|
|
34
34
|
};
|
|
35
35
|
export declare const FaceLivenessFailure: ({ canRetry, onRetryClick, onExitClick, assets, classNames, colors, verbiage: rawVerbiage, }: FaceLivenessFailureProps) => ReactElement;
|
|
36
|
-
export declare const ButtonsRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
2
|
import { FaceLivenessCaptureClassNames, FaceLivenessCaptureColors, FaceLivenessCaptureVerbiage } from './FaceLivenessCapture';
|
|
3
3
|
import { FaceLivenessSuccessClassNames, FaceLivenessSuccessColors, FaceLivenessSuccessVerbiage } from './FaceLivenessSuccess';
|
|
4
4
|
import { FaceLivenessFailureAssets, FaceLivenessFailureClassNames, FaceLivenessFailureColors, FaceLivenessFailureVerbiage } from './FaceLivenessFailure';
|
|
5
5
|
import { LivenessCheckRequest, SubmissionResponse } from '../../contexts/SubmissionContext';
|
|
6
6
|
import { SelfieCaptureLoadingOverlayMode, SelfieCaptureLoadingOverlayAssets, SelfieCaptureLoadingOverlayClassNames, SelfieCaptureLoadingOverlayColors, SelfieCaptureLoadingOverlayVerbiage } from '../selfie_capture/SelfieCaptureLoadingOverlay';
|
|
7
|
-
import { FaceCaptureGuideOverlayProps } from './FaceCaptureGuideOverlay';
|
|
8
7
|
export type FaceLivenessAssets = {
|
|
9
8
|
loadingOverlay?: SelfieCaptureLoadingOverlayAssets;
|
|
10
9
|
failure?: FaceLivenessFailureAssets;
|
|
@@ -41,13 +40,10 @@ export type FaceLivenessWizardProps = {
|
|
|
41
40
|
renderCameraFeed?: boolean;
|
|
42
41
|
releaseCameraAccessOnExit?: boolean;
|
|
43
42
|
silentFallback?: boolean;
|
|
44
|
-
guidesComponent?: ComponentType<FaceCaptureGuideOverlayProps>;
|
|
45
|
-
disableCapturePreview?: boolean;
|
|
46
|
-
requireVerticalFaceCentering?: boolean;
|
|
47
43
|
assets?: FaceLivenessAssets;
|
|
48
44
|
classNames?: FaceLivenessClassNames;
|
|
49
45
|
colors?: FaceLivenessColors;
|
|
50
46
|
verbiage?: FaceLivenessVerbiage;
|
|
51
47
|
debugMode?: boolean;
|
|
52
48
|
};
|
|
53
|
-
export declare const FaceLivenessWizard: ({ onComplete, onSuccess, onTimeout, onExitCapture, onExitAfterFailure, onUserCancel, loadingOverlayMode, timeoutDurationMs, maxRetries, skipSuccessScreen, renderCameraFeed, releaseCameraAccessOnExit, silentFallback,
|
|
49
|
+
export declare const FaceLivenessWizard: ({ onComplete, onSuccess, onTimeout, onExitCapture, onExitAfterFailure, onUserCancel, loadingOverlayMode, timeoutDurationMs, maxRetries, skipSuccessScreen, renderCameraFeed, releaseCameraAccessOnExit, silentFallback, assets, classNames, colors, verbiage, debugMode, }: FaceLivenessWizardProps) => ReactElement;
|
|
@@ -38,6 +38,8 @@ export type IdCaptureState = {
|
|
|
38
38
|
idCardBackDetectionThresholdMet: boolean;
|
|
39
39
|
passportDetectionScore: number;
|
|
40
40
|
passportDetectionThresholdMet: boolean;
|
|
41
|
+
singlePageDetectionScore: number;
|
|
42
|
+
singlePageDetectionThresholdMet: boolean;
|
|
41
43
|
focusScore: number;
|
|
42
44
|
focusThresholdMet: boolean;
|
|
43
45
|
isGoodFrame: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FaceCaptureGuideOverlayClassNames
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { FaceCaptureGuideOverlayClassNames } from '../face_liveness/FaceCaptureGuideOverlay';
|
|
3
3
|
import { CustomerSuppliedVerbiage } from '../../lib/locales';
|
|
4
4
|
import { SelfieCaptureFallbackClassNames } from '../fallback_flows/SelfieCapture';
|
|
5
5
|
import { Face } from '../../lib/models/FaceDetection';
|
|
@@ -26,24 +26,19 @@ export type SelfieCaptureVerbiage = {
|
|
|
26
26
|
guidanceMoveBackText?: CustomerSuppliedVerbiage;
|
|
27
27
|
guidanceMoveForwardText?: CustomerSuppliedVerbiage;
|
|
28
28
|
guidanceMoveToCenterText?: CustomerSuppliedVerbiage;
|
|
29
|
-
guidanceNoFaceDetectedText?: CustomerSuppliedVerbiage;
|
|
30
29
|
};
|
|
31
30
|
export type SelfieCaptureProps = {
|
|
32
31
|
onGuidanceSatisfied?: () => void;
|
|
33
32
|
onGuidanceNotSatisfied?: () => void;
|
|
34
|
-
onSelfieCaptureStarted?: () => void;
|
|
35
33
|
onSelfieCaptured?: (frame: ImageData, face: Face) => void;
|
|
36
34
|
onTimeout?: () => void;
|
|
37
35
|
onExit?: () => void;
|
|
38
36
|
timeoutDurationMs?: number;
|
|
39
37
|
guidanceMessage?: string;
|
|
40
38
|
guidanceSatisfied?: boolean;
|
|
41
|
-
guidesComponent?: ComponentType<FaceCaptureGuideOverlayProps>;
|
|
42
|
-
requireVerticalFaceCentering?: boolean;
|
|
43
|
-
shouldCapture?: boolean;
|
|
44
39
|
classNames?: SelfieCaptureClassNames;
|
|
45
40
|
colors?: SelfieCaptureColors;
|
|
46
41
|
verbiage?: SelfieCaptureVerbiage;
|
|
47
42
|
debugMode?: boolean;
|
|
48
43
|
};
|
|
49
|
-
export declare const SelfieCapture: ({ onGuidanceSatisfied, onGuidanceNotSatisfied,
|
|
44
|
+
export declare const SelfieCapture: ({ onGuidanceSatisfied, onGuidanceNotSatisfied, onSelfieCaptured, onTimeout, onExit, timeoutDurationMs, guidanceMessage, guidanceSatisfied, classNames, colors, verbiage: rawVerbiage, debugMode, }: SelfieCaptureProps) => ReactElement;
|
|
@@ -1,19 +1,6 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { FaceGuideStatus } from '../face_liveness/FaceCaptureGuideOverlay';
|
|
1
|
+
import React from 'react';
|
|
3
2
|
export declare function SelfieCaptureLoadingGraphic({ width, height, className, }: {
|
|
4
3
|
width?: number;
|
|
5
4
|
height?: number;
|
|
6
5
|
className?: string;
|
|
7
6
|
}): React.JSX.Element;
|
|
8
|
-
export type SelfieCaptureAnimatedMaskProps = SVGProps<SVGSVGElement> & {
|
|
9
|
-
frame?: number;
|
|
10
|
-
borderWidth?: number;
|
|
11
|
-
borderColor?: string;
|
|
12
|
-
borderOpacity?: number;
|
|
13
|
-
verticalAlign?: 'center' | 'top' | 'bottom';
|
|
14
|
-
status?: FaceGuideStatus;
|
|
15
|
-
};
|
|
16
|
-
export declare function SelfieCaptureAnimatedMask({ frame, borderWidth, borderColor, borderOpacity, verticalAlign, status, ...props }: SelfieCaptureAnimatedMaskProps): React.JSX.Element;
|
|
17
|
-
export declare function SelfieCaptureAnimatedMaskWithStatus({ status, ...props }: SelfieCaptureAnimatedMaskProps & {
|
|
18
|
-
status?: FaceGuideStatus;
|
|
19
|
-
}): React.JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { MutableRefObject, ReactElement, ReactNode } from 'react';
|
|
3
3
|
import { Face } from '../../lib/models/FaceDetection';
|
|
4
|
-
|
|
4
|
+
type PredictionHandler = (prediction: Face[]) => void;
|
|
5
5
|
type SelfieGuidanceModelsState = {
|
|
6
6
|
start: () => void;
|
|
7
7
|
stop: () => void;
|
|
8
|
-
onPredictionMade: (handler:
|
|
8
|
+
onPredictionMade: (handler: PredictionHandler) => void;
|
|
9
9
|
canvasRef: MutableRefObject<HTMLCanvasElement | null>;
|
|
10
10
|
ready: boolean;
|
|
11
11
|
error: Error | null;
|
|
@@ -3,16 +3,11 @@ export type IdVideoCaptureFlipIdPromptAssets = {
|
|
|
3
3
|
frontImageUrl?: string;
|
|
4
4
|
backImageUrl?: string;
|
|
5
5
|
};
|
|
6
|
-
export type IdVideoCaptureFlipIdPromptClassNames = {
|
|
7
|
-
frontImageContainer?: string;
|
|
8
|
-
backImageContainer?: string;
|
|
9
|
-
frontImage?: string;
|
|
10
|
-
backImage?: string;
|
|
11
|
-
};
|
|
12
6
|
export type IdVideoCaptureFlipIdPromptProps = {
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
className?: string;
|
|
8
|
+
imageWidth?: number;
|
|
9
|
+
imageHeight?: number;
|
|
15
10
|
borderWidth?: number;
|
|
16
|
-
|
|
11
|
+
assets?: IdVideoCaptureFlipIdPromptAssets;
|
|
17
12
|
};
|
|
18
|
-
export declare const IdVideoCaptureFlipIdPrompt: ({
|
|
13
|
+
export declare const IdVideoCaptureFlipIdPrompt: ({ className, imageWidth, imageHeight, borderWidth, assets, }: IdVideoCaptureFlipIdPromptProps) => ReactElement;
|
|
@@ -1,45 +1,37 @@
|
|
|
1
1
|
import React, { ReactElement } from 'react';
|
|
2
|
-
import { IdVideoCaptureFlipIdPromptClassNames } from './IdVideoCaptureFlipIdPrompt';
|
|
3
2
|
import { CustomerSuppliedVerbiage } from '../../lib/locales';
|
|
4
|
-
|
|
5
|
-
import { FaceGuideStatus } from '../face_liveness/FaceCaptureGuideOverlay';
|
|
6
|
-
export type Action = 'SHOW_ID_FRONT' | 'FLIP_ID' | 'SHOW_ID_BACK' | 'VERIFY_LIVENESS';
|
|
3
|
+
export type Action = 'SHOW_ID_FRONT' | 'FLIP_ID' | 'SHOW_ID_BACK' | 'READ_TEXT';
|
|
7
4
|
export type IdVideoCaptureGuidesAssets = {
|
|
8
5
|
frontImageUrl?: string;
|
|
9
6
|
backImageUrl?: string;
|
|
10
7
|
};
|
|
11
8
|
export type IdVideoCaptureGuidesClassNames = {
|
|
12
9
|
container?: string;
|
|
13
|
-
faceGuideContainer?: string;
|
|
14
10
|
faceGuide?: string;
|
|
15
11
|
idCardGuideContainer?: string;
|
|
16
|
-
idCardGuideInner?: string;
|
|
17
12
|
idCardGuideInstructionsContainer?: string;
|
|
18
13
|
idCardGuideInstructions?: string;
|
|
19
14
|
idCardGuideImageContainer?: string;
|
|
20
15
|
idCardGuideImage?: string;
|
|
21
|
-
|
|
16
|
+
flipIdPromptImage?: string;
|
|
22
17
|
};
|
|
23
18
|
export type IdVideoCaptureGuidesVerbiage = {
|
|
24
19
|
idFrontInstructionText?: CustomerSuppliedVerbiage;
|
|
25
20
|
idBackInstructionText?: CustomerSuppliedVerbiage;
|
|
26
21
|
flipIdInstructionText?: CustomerSuppliedVerbiage;
|
|
27
|
-
verifyLivenessInstructionText?: CustomerSuppliedVerbiage;
|
|
28
22
|
};
|
|
29
23
|
export type IdVideoCaptureGuidesProps = {
|
|
30
24
|
requestedAction?: Action;
|
|
31
25
|
satisfied?: boolean;
|
|
32
|
-
faceGuideStatus?: FaceGuideStatus;
|
|
33
26
|
faceGuideBorderWidth?: number;
|
|
34
27
|
faceGuideBorderColor?: string;
|
|
35
|
-
idCardGuideStatus?: IdCardGuideStatus;
|
|
36
28
|
idCardGuideBorderWidth?: number;
|
|
37
29
|
idCardGuideBorderColor?: string;
|
|
38
30
|
assets?: IdVideoCaptureGuidesAssets;
|
|
39
31
|
classNames?: IdVideoCaptureGuidesClassNames;
|
|
40
32
|
verbiage?: IdVideoCaptureGuidesVerbiage;
|
|
41
33
|
};
|
|
42
|
-
export declare const IdVideoCaptureGuides: ({ requestedAction, satisfied,
|
|
34
|
+
export declare const IdVideoCaptureGuides: ({ requestedAction, satisfied, faceGuideBorderWidth, faceGuideBorderColor, idCardGuideBorderWidth, idCardGuideBorderColor, assets, classNames, verbiage: rawVerbiage, }: IdVideoCaptureGuidesProps) => ReactElement;
|
|
43
35
|
export declare const IdCardGuideInstructionsContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
44
36
|
export declare const IdCardGuideInstructions: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$textColor" | "$variant" | "$background"> & {
|
|
45
37
|
$background?: string;
|
|
@@ -54,8 +54,6 @@ declare const _default: {
|
|
|
54
54
|
Exit: string;
|
|
55
55
|
'Face liveness has been verified!': string;
|
|
56
56
|
Done: string;
|
|
57
|
-
'Could not verify your face.': string;
|
|
58
|
-
'An error occurred while verifying your face.': string;
|
|
59
57
|
'Customer has been identified!': string;
|
|
60
58
|
'Customer not found': string;
|
|
61
59
|
'Additional document capture': string;
|
|
@@ -62,8 +62,6 @@ export declare const resources: {
|
|
|
62
62
|
Exit: string;
|
|
63
63
|
'Face liveness has been verified!': string;
|
|
64
64
|
Done: string;
|
|
65
|
-
'Could not verify your face.': string;
|
|
66
|
-
'An error occurred while verifying your face.': string;
|
|
67
65
|
'Customer has been identified!': string;
|
|
68
66
|
'Customer not found': string;
|
|
69
67
|
'Additional document capture': string;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { ObjectDetector, ObjectDetectorResult } from '@mediapipe/tasks-vision';
|
|
2
|
-
export declare const defaultDocumentDetectorModelPath = "https://websdk-cdn-dev.idmission.com/assets/models/
|
|
2
|
+
export declare const defaultDocumentDetectorModelPath = "https://websdk-cdn-dev.idmission.com/assets/models/docdetectmp20240830/model_fp16.tflite";
|
|
3
3
|
export declare const defaultDocumentDetectionScoreThreshold = 0.1;
|
|
4
4
|
export declare const defaultDocumentDetectionModelLoadTimeoutMs = 45000;
|
|
5
5
|
export declare const defaultDocumentDetectionThresholds: DocumentDetectionThresholds;
|
|
6
|
-
export type DocumentType = 'none' | 'idCardFront' | 'idCardBack' | 'passport';
|
|
6
|
+
export type DocumentType = 'none' | 'idCardFront' | 'idCardBack' | 'passport' | 'singlePage';
|
|
7
7
|
export declare const documentTypeDisplayNames: {
|
|
8
8
|
idCardFront: string;
|
|
9
9
|
idCardBack: string;
|
|
10
10
|
passport: string;
|
|
11
|
+
singlePage: string;
|
|
11
12
|
none: string;
|
|
12
13
|
};
|
|
13
|
-
export type Label = 'Document' | 'Document back' | 'MRZ' | 'PDF417' | 'Primary face' | 'Secondary face' | 'Glare' | 'Punch Hole' | 'Passport page';
|
|
14
|
+
export type Label = 'Document' | 'Document back' | 'MRZ' | 'PDF417' | 'Primary face' | 'Secondary face' | 'Glare' | 'Punch Hole' | 'Passport page' | 'Single page';
|
|
14
15
|
export type DetectedObjectBox = {
|
|
15
16
|
xMin: number;
|
|
16
17
|
xMax: number;
|
|
@@ -28,6 +29,7 @@ export type DocumentDetectionThresholds = {
|
|
|
28
29
|
idCardFront?: number;
|
|
29
30
|
idCardBack?: number;
|
|
30
31
|
passport?: number;
|
|
32
|
+
singlePage?: number;
|
|
31
33
|
};
|
|
32
34
|
export declare function loadDocumentDetector(modelAssetPath?: string, scoreThreshold?: number): Promise<ObjectDetector>;
|
|
33
35
|
export declare function useLoadDocumentDetector({ modelPath, modelLoadTimeoutMs, scoreThreshold, onModelError, }: {
|
|
@@ -54,6 +56,8 @@ export type DocumentDetectionPrediction = {
|
|
|
54
56
|
idCardBackDetectionThresholdMet: boolean;
|
|
55
57
|
passportDetectionScore: number;
|
|
56
58
|
passportDetectionThresholdMet: boolean;
|
|
59
|
+
singlePageDetectionScore: number;
|
|
60
|
+
singlePageDetectionThresholdMet: boolean;
|
|
57
61
|
bestDocument: DetectedObject | undefined;
|
|
58
62
|
documentInBounds: boolean;
|
|
59
63
|
documentTooClose: boolean;
|
|
@@ -20,6 +20,10 @@ export type FocusThresholds = {
|
|
|
20
20
|
desktop?: number;
|
|
21
21
|
mobile?: number;
|
|
22
22
|
};
|
|
23
|
+
singlePage?: {
|
|
24
|
+
desktop?: number;
|
|
25
|
+
mobile?: number;
|
|
26
|
+
};
|
|
23
27
|
};
|
|
24
28
|
export declare const defaultFocusThresholds: FocusThresholds;
|
|
25
29
|
export declare function loadFocusModel(modelAssetPath: string): Promise<ImageClassifier>;
|