idmission-web-sdk 2.1.40 → 2.1.41
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 +6 -2
- package/dist/components/face_liveness/FaceLivenessCapture.d.ts +8 -2
- package/dist/components/face_liveness/FaceLivenessFailure.d.ts +2 -1
- package/dist/components/face_liveness/FaceLivenessWizard.d.ts +6 -2
- package/dist/components/id_capture/FlipIdPrompt.d.ts +12 -17
- package/dist/components/id_capture/IdCaptureFitGuide.d.ts +10 -6
- package/dist/components/id_capture/IdCaptureGuideOverlay.d.ts +48 -32
- package/dist/components/id_capture/IdCaptureGuides.d.ts +14 -7
- package/dist/components/id_capture/IdCaptureStateProvider.d.ts +0 -2
- package/dist/components/id_capture/IdCaptureWizard.d.ts +4 -4
- package/dist/components/selfie_capture/SelfieCapture.d.ts +8 -3
- package/dist/components/selfie_capture/SelfieCaptureLoadingGraphic.d.ts +14 -1
- package/dist/components/selfie_capture/SelfieGuidanceModelsProvider.d.ts +2 -2
- package/dist/components/video_id/IdVideoCaptureFlipIdPrompt.d.ts +25 -6
- package/dist/components/video_id/IdVideoCaptureGuides.d.ts +12 -3
- package/dist/components/video_id/IdVideoCaptureGuidesCommon.d.ts +23 -0
- package/dist/lib/locales/es/translation.d.ts +2 -1
- package/dist/lib/locales/index.d.ts +2 -1
- package/dist/lib/models/DocumentDetection.d.ts +3 -7
- package/dist/lib/models/Focus.d.ts +0 -4
- package/dist/sdk2.cjs.development.js +2543 -1861
- 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 +2543 -1861
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +2544 -1862
- 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 +5 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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' | 'outline';
|
|
3
3
|
export type LoaderButtonColors = {
|
|
4
4
|
backgroundColor?: string;
|
|
5
5
|
textColor?: string;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
1
|
+
import React, { 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;
|
|
3
4
|
export type FaceCaptureGuideOverlayClassNames = {
|
|
4
5
|
container?: string;
|
|
5
6
|
oval?: string;
|
|
6
7
|
};
|
|
8
|
+
export type FaceGuideStatus = 'ready' | 'processing' | 'success' | 'failure';
|
|
7
9
|
export type FaceCaptureGuideOverlayProps = {
|
|
8
10
|
classNames?: FaceCaptureGuideOverlayClassNames;
|
|
9
11
|
variant?: FaceCaptureGuideOverlayVariant;
|
|
12
|
+
status?: FaceGuideStatus;
|
|
10
13
|
borderWidth?: number;
|
|
11
14
|
borderColor?: string;
|
|
15
|
+
borderOpacity?: number;
|
|
12
16
|
};
|
|
13
|
-
export declare const FaceCaptureGuideOverlay: ({ classNames,
|
|
17
|
+
export declare const FaceCaptureGuideOverlay: ({ classNames, status, borderWidth, borderColor, borderOpacity, }: FaceCaptureGuideOverlayProps) => ReactElement;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
1
|
+
import { ComponentType, 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';
|
|
5
6
|
export type FaceLivenessCaptureClassNames = SelfieCaptureClassNames & {
|
|
6
7
|
imagePreview?: SelfieProgressPreviewClassNames;
|
|
7
8
|
};
|
|
@@ -11,6 +12,8 @@ export type FaceLivenessCaptureVerbiage = SelfieCaptureVerbiage & {
|
|
|
11
12
|
guidanceRemoveHeadCoveringsText?: CustomerSuppliedVerbiage;
|
|
12
13
|
guidanceRemoveMaskText?: CustomerSuppliedVerbiage;
|
|
13
14
|
progressPreviewText?: CustomerSuppliedVerbiage;
|
|
15
|
+
guidanceLivenessCheckFailedText?: CustomerSuppliedVerbiage;
|
|
16
|
+
guidanceLivenessCheckErrorText?: CustomerSuppliedVerbiage;
|
|
14
17
|
};
|
|
15
18
|
export type FaceLivenessCaptureProps = {
|
|
16
19
|
onCapture?: () => void;
|
|
@@ -19,9 +22,12 @@ export type FaceLivenessCaptureProps = {
|
|
|
19
22
|
onExit?: () => void;
|
|
20
23
|
timeoutDurationMs?: number;
|
|
21
24
|
silentFallback?: boolean;
|
|
25
|
+
guidesComponent?: ComponentType<FaceCaptureGuideOverlayProps>;
|
|
26
|
+
disableCapturePreview?: boolean;
|
|
27
|
+
requireVerticalFaceCentering?: boolean;
|
|
22
28
|
classNames?: FaceLivenessCaptureClassNames;
|
|
23
29
|
colors?: FaceLivenessCaptureColors;
|
|
24
30
|
verbiage?: FaceLivenessCaptureVerbiage;
|
|
25
31
|
debugMode?: boolean;
|
|
26
32
|
};
|
|
27
|
-
export declare const FaceLivenessCapture: ({ onCapture, onSuccess, onTimeout, onExit, timeoutDurationMs, silentFallback, classNames, colors, verbiage: rawVerbiage, debugMode, }: FaceLivenessCaptureProps) => ReactElement;
|
|
33
|
+
export declare const FaceLivenessCapture: ({ onCapture, onSuccess, onTimeout, onExit, timeoutDurationMs, silentFallback, guidesComponent, disableCapturePreview, requireVerticalFaceCentering, classNames, colors, verbiage: rawVerbiage, debugMode, }: FaceLivenessCaptureProps) => ReactElement;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
1
|
+
import React, { ReactElement } from 'react';
|
|
2
2
|
import { LoaderButtonColors } from '../common/LoaderButton';
|
|
3
3
|
import { CustomerSuppliedVerbiage } from '../../lib/locales';
|
|
4
4
|
export type FaceLivenessFailureAssets = {
|
|
@@ -33,3 +33,4 @@ 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,9 +1,10 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
1
|
+
import { ComponentType, 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';
|
|
7
8
|
export type FaceLivenessAssets = {
|
|
8
9
|
loadingOverlay?: SelfieCaptureLoadingOverlayAssets;
|
|
9
10
|
failure?: FaceLivenessFailureAssets;
|
|
@@ -40,10 +41,13 @@ export type FaceLivenessWizardProps = {
|
|
|
40
41
|
renderCameraFeed?: boolean;
|
|
41
42
|
releaseCameraAccessOnExit?: boolean;
|
|
42
43
|
silentFallback?: boolean;
|
|
44
|
+
guidesComponent?: ComponentType<FaceCaptureGuideOverlayProps>;
|
|
45
|
+
disableCapturePreview?: boolean;
|
|
46
|
+
requireVerticalFaceCentering?: boolean;
|
|
43
47
|
assets?: FaceLivenessAssets;
|
|
44
48
|
classNames?: FaceLivenessClassNames;
|
|
45
49
|
colors?: FaceLivenessColors;
|
|
46
50
|
verbiage?: FaceLivenessVerbiage;
|
|
47
51
|
debugMode?: boolean;
|
|
48
52
|
};
|
|
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;
|
|
53
|
+
export declare const FaceLivenessWizard: ({ onComplete, onSuccess, onTimeout, onExitCapture, onExitAfterFailure, onUserCancel, loadingOverlayMode, timeoutDurationMs, maxRetries, skipSuccessScreen, renderCameraFeed, releaseCameraAccessOnExit, silentFallback, guidesComponent, disableCapturePreview, requireVerticalFaceCentering, assets, classNames, colors, verbiage, debugMode, }: FaceLivenessWizardProps) => ReactElement;
|
|
@@ -1,23 +1,16 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { CustomerSuppliedVerbiage } from '../../lib/locales';
|
|
3
3
|
export type FlipIdPromptAssets = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
idCardFrontPortraitImageUrl?: string;
|
|
5
|
+
idCardFrontLandscapeImageUrl?: string;
|
|
6
|
+
idCardBackPortraitImageUrl?: string;
|
|
7
|
+
idCardBackLandscapeImageUrl?: string;
|
|
8
8
|
};
|
|
9
9
|
export type FlipIdPromptClassNames = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
dimmingRegionLeft?: string;
|
|
15
|
-
dimmingRegionRight?: string;
|
|
16
|
-
dimmingRegionBottom?: string;
|
|
17
|
-
centerRow?: string;
|
|
18
|
-
centerRegion?: string;
|
|
19
|
-
image?: string;
|
|
20
|
-
guideText?: string;
|
|
10
|
+
frontImageContainer?: string;
|
|
11
|
+
backImageContainer?: string;
|
|
12
|
+
frontImage?: string;
|
|
13
|
+
backImage?: string;
|
|
21
14
|
};
|
|
22
15
|
export type FlipIdPromptVerbiage = {
|
|
23
16
|
instructionText?: CustomerSuppliedVerbiage;
|
|
@@ -27,9 +20,11 @@ export type FlipIdPromptProps = {
|
|
|
27
20
|
imagePadding?: number;
|
|
28
21
|
borderWidth?: number;
|
|
29
22
|
borderColor?: string;
|
|
30
|
-
|
|
23
|
+
borderRadius?: number;
|
|
24
|
+
isMirrored?: boolean;
|
|
25
|
+
portraitGuidesOnMobile?: boolean;
|
|
31
26
|
assets?: FlipIdPromptAssets;
|
|
32
27
|
classNames?: FlipIdPromptClassNames;
|
|
33
28
|
verbiage?: FlipIdPromptVerbiage;
|
|
34
29
|
};
|
|
35
|
-
export declare const FlipIdPrompt: ({
|
|
30
|
+
export declare const FlipIdPrompt: ({ borderWidth, borderColor, borderRadius, isMirrored, portraitGuidesOnMobile, assets, classNames, }: FlipIdPromptProps) => ReactElement;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { IdCaptureGuideOverlayClassNames } from './IdCaptureGuideOverlay';
|
|
2
|
+
import { IdCaptureGuideAction, IdCaptureGuideOverlayAssets, IdCaptureGuideOverlayClassNames } from './IdCaptureGuideOverlay';
|
|
3
|
+
import { IdCardGuideStatus } from '../video_id/IdVideoCaptureGuidesCommon';
|
|
4
|
+
export type IdCaptureFitGuideAssets = IdCaptureGuideOverlayAssets;
|
|
3
5
|
export type IdCaptureFitGuideClassNames = IdCaptureGuideOverlayClassNames & {
|
|
4
6
|
canvasWrapper?: string;
|
|
5
7
|
canvas?: string;
|
|
@@ -11,13 +13,15 @@ export type IdCaptureFitGuideProps = {
|
|
|
11
13
|
borderColor?: string;
|
|
12
14
|
borderWidth?: number;
|
|
13
15
|
padding?: number;
|
|
14
|
-
imageUrl?: string;
|
|
15
16
|
imageVisible?: boolean;
|
|
16
|
-
frontImageUrl?: string;
|
|
17
|
-
backImageUrl?: string;
|
|
18
17
|
isMirrored?: boolean;
|
|
18
|
+
isBackToFront?: boolean;
|
|
19
|
+
portraitGuidesOnMobile?: boolean;
|
|
19
20
|
instruction?: string;
|
|
20
|
-
|
|
21
|
+
requestedAction?: IdCaptureGuideAction;
|
|
22
|
+
status?: IdCardGuideStatus;
|
|
23
|
+
progress?: number;
|
|
24
|
+
assets?: IdCaptureFitGuideAssets;
|
|
21
25
|
classNames?: IdCaptureFitGuideClassNames;
|
|
22
26
|
};
|
|
23
|
-
export declare const IdCaptureFitGuide: ({ aspectRatio, maskColor, borderRadius, borderColor, borderWidth, padding,
|
|
27
|
+
export declare const IdCaptureFitGuide: ({ aspectRatio, maskColor, borderRadius, borderColor, borderWidth, padding, imageVisible, isMirrored, isBackToFront, portraitGuidesOnMobile, instruction, requestedAction, status, progress, assets, classNames, }: IdCaptureFitGuideProps) => React.JSX.Element;
|
|
@@ -1,33 +1,15 @@
|
|
|
1
1
|
import React, { ReactElement } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}, "ref"> & {
|
|
14
|
-
ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
15
|
-
}, never>> & string;
|
|
16
|
-
export declare const GuideCenterRegion: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
17
|
-
$minWidth?: number;
|
|
18
|
-
$isMirrored?: boolean;
|
|
19
|
-
}>> & string;
|
|
20
|
-
export declare const GuideCenterBorder: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
21
|
-
$borderWidth: number;
|
|
22
|
-
$borderColor?: string;
|
|
23
|
-
}>> & string;
|
|
24
|
-
export declare const GuideText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
25
|
-
export declare const GuideImage: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {
|
|
26
|
-
$width?: number;
|
|
27
|
-
$height?: number;
|
|
28
|
-
$padding: number;
|
|
29
|
-
$visible?: boolean;
|
|
30
|
-
}>> & string;
|
|
2
|
+
import { IdCardGuideStatus } from '../video_id/IdVideoCaptureGuidesCommon';
|
|
3
|
+
import { FlipIdPromptAssets, FlipIdPromptClassNames } from './FlipIdPrompt';
|
|
4
|
+
export type IdCaptureGuideOverlayAssets = {
|
|
5
|
+
idCardFrontPortraitImageUrl?: string;
|
|
6
|
+
idCardFrontLandscapeImageUrl?: string;
|
|
7
|
+
idCardBackPortraitImageUrl?: string;
|
|
8
|
+
idCardBackLandscapeImageUrl?: string;
|
|
9
|
+
passportPortraitImageUrl?: string;
|
|
10
|
+
passportLandscapeImageUrl?: string;
|
|
11
|
+
flipIdPrompt?: FlipIdPromptAssets;
|
|
12
|
+
};
|
|
31
13
|
export type IdCaptureGuideOverlayClassNames = {
|
|
32
14
|
container?: string;
|
|
33
15
|
inner?: string;
|
|
@@ -38,11 +20,14 @@ export type IdCaptureGuideOverlayClassNames = {
|
|
|
38
20
|
dimmingRegionBottom?: string;
|
|
39
21
|
centerRow?: string;
|
|
40
22
|
centerRegion?: string;
|
|
23
|
+
centerRegionBorder?: string;
|
|
41
24
|
centerRegionInner?: string;
|
|
42
25
|
image?: string;
|
|
43
26
|
guideText?: string;
|
|
27
|
+
flipIdPrompt?: FlipIdPromptClassNames;
|
|
44
28
|
};
|
|
45
29
|
export type IdCaptureGuideOverlayProps = {
|
|
30
|
+
assets?: IdCaptureGuideOverlayAssets;
|
|
46
31
|
classNames?: IdCaptureGuideOverlayClassNames;
|
|
47
32
|
width?: number;
|
|
48
33
|
height?: number;
|
|
@@ -51,11 +36,42 @@ export type IdCaptureGuideOverlayProps = {
|
|
|
51
36
|
imageVisible?: boolean;
|
|
52
37
|
borderWidth?: number;
|
|
53
38
|
borderColor?: string;
|
|
39
|
+
idCardBorderWidth?: number;
|
|
40
|
+
idCardBorderColor?: string;
|
|
54
41
|
maskColor?: string;
|
|
55
42
|
isMirrored?: boolean;
|
|
43
|
+
isBackToFront?: boolean;
|
|
44
|
+
portraitGuidesOnMobile?: boolean;
|
|
56
45
|
instruction?: string;
|
|
57
|
-
|
|
58
|
-
|
|
46
|
+
requestedAction?: IdCaptureGuideAction;
|
|
47
|
+
status?: IdCardGuideStatus;
|
|
48
|
+
progress?: number;
|
|
59
49
|
onClick?: () => void;
|
|
60
50
|
};
|
|
61
|
-
export
|
|
51
|
+
export type IdCaptureGuideAction = 'SHOW_ID_FRONT' | 'FLIP_ID' | 'SHOW_ID_BACK' | 'SHOW_PASSPORT';
|
|
52
|
+
export declare const IdCaptureGuideOverlay: ({ assets, classNames, width, height, padding: userSuppliedPadding, imagePadding: userSuppliedImagePadding, imageVisible, borderWidth, borderColor, idCardBorderWidth, idCardBorderColor, maskColor, isMirrored, isBackToFront, portraitGuidesOnMobile, instruction, requestedAction, progress, status, onClick, }: IdCaptureGuideOverlayProps) => ReactElement;
|
|
53
|
+
export declare const GuidesContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
54
|
+
export declare const GuideCenterRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
55
|
+
export declare const GuideRegion: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
56
|
+
$minWidth?: number;
|
|
57
|
+
$minHeight?: number;
|
|
58
|
+
$maskColor?: string;
|
|
59
|
+
}>> & string;
|
|
60
|
+
export declare const Spacer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$minWidth" | "$minHeight" | "$maskColor"> & {
|
|
61
|
+
$minWidth?: number;
|
|
62
|
+
$minHeight?: number;
|
|
63
|
+
$maskColor?: string;
|
|
64
|
+
}, "ref"> & {
|
|
65
|
+
ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
66
|
+
}, never>> & string;
|
|
67
|
+
export declare const GuideCenterRegion: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
68
|
+
$minWidth?: number;
|
|
69
|
+
$isMirrored?: boolean;
|
|
70
|
+
}>> & string;
|
|
71
|
+
export declare const GuideCenterBorder: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
72
|
+
$borderWidth: number;
|
|
73
|
+
$borderColor?: string;
|
|
74
|
+
$padding?: number;
|
|
75
|
+
}>> & string;
|
|
76
|
+
export declare const GuideText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
77
|
+
export declare const GuideCenterInner: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -1,16 +1,23 @@
|
|
|
1
|
-
import { IdCaptureFitGuideClassNames } from './IdCaptureFitGuide';
|
|
1
|
+
import { IdCaptureFitGuideAssets, IdCaptureFitGuideClassNames } from './IdCaptureFitGuide';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { IdCaptureGuideAction } from './IdCaptureGuideOverlay';
|
|
4
|
+
import { IdCaptureColors, IdCaptureVerbiage } from './IdCapture';
|
|
4
5
|
import { FlipIdPromptAssets } from './FlipIdPrompt';
|
|
6
|
+
import { IdCardGuideStatus } from '../video_id/IdVideoCaptureGuidesCommon';
|
|
7
|
+
export type IdCaptureGuidesAssets = IdCaptureFitGuideAssets;
|
|
8
|
+
export type IdCaptureGuidesClassNames = IdCaptureFitGuideClassNames;
|
|
5
9
|
export type IdCaptureGuideType = 'fit' | 'overlay';
|
|
6
|
-
export
|
|
10
|
+
export type IdCaptureGuidesProps = {
|
|
7
11
|
guideType?: IdCaptureGuideType;
|
|
12
|
+
status?: IdCardGuideStatus;
|
|
13
|
+
progress?: number;
|
|
8
14
|
portraitGuidesOnMobile?: boolean;
|
|
9
|
-
|
|
15
|
+
requestedAction?: IdCaptureGuideAction;
|
|
10
16
|
isBackToFront?: boolean;
|
|
11
17
|
flipIdPromptAssets?: FlipIdPromptAssets;
|
|
12
|
-
|
|
13
|
-
|
|
18
|
+
assets?: IdCaptureGuidesAssets;
|
|
19
|
+
classNames?: IdCaptureGuidesClassNames;
|
|
14
20
|
colors?: IdCaptureColors;
|
|
15
21
|
verbiage?: IdCaptureVerbiage;
|
|
16
|
-
}
|
|
22
|
+
};
|
|
23
|
+
export declare function IdCaptureGuides({ guideType, status, progress, portraitGuidesOnMobile, requestedAction, isBackToFront, assets, classNames, colors, verbiage: rawVerbiage, }: IdCaptureGuidesProps): React.JSX.Element;
|
|
@@ -38,8 +38,6 @@ export type IdCaptureState = {
|
|
|
38
38
|
idCardBackDetectionThresholdMet: boolean;
|
|
39
39
|
passportDetectionScore: number;
|
|
40
40
|
passportDetectionThresholdMet: boolean;
|
|
41
|
-
singlePageDetectionScore: number;
|
|
42
|
-
singlePageDetectionThresholdMet: boolean;
|
|
43
41
|
focusScore: number;
|
|
44
42
|
focusThresholdMet: boolean;
|
|
45
43
|
isGoodFrame: boolean;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { IdCaptureAssets, IdCaptureClassNames, IdCaptureColors, IdCaptureVerbiage } from './IdCapture';
|
|
3
3
|
import { IdCaptureLoadingOverlayAssets, IdCaptureLoadingOverlayClassNames, IdCaptureLoadingOverlayColors, IdCaptureLoadingOverlayMode, IdCaptureLoadingOverlayVerbiage } from './IdCaptureLoadingOverlay';
|
|
4
|
-
import {
|
|
4
|
+
import { FlipIdPromptVerbiage } from './FlipIdPrompt';
|
|
5
5
|
import { CapturedDocuments } from './CapturedDocuments';
|
|
6
6
|
import { IdCaptureSuccessClassNames, IdCaptureSuccessColors, IdCaptureSuccessVerbiage } from './IdCaptureSuccess';
|
|
7
7
|
import { IdCaptureThresholds } from './IdCaptureModelsProvider';
|
|
8
8
|
import { IdCaptureRequirementOption } from './IdCaptureRequirementOption';
|
|
9
|
-
import { IdCaptureGuideType } from './IdCaptureGuides';
|
|
9
|
+
import { IdCaptureGuidesAssets, IdCaptureGuidesClassNames, IdCaptureGuideType } from './IdCaptureGuides';
|
|
10
10
|
import { IdCaptureFallbackClassNames, IdCaptureFallbackColors, IdCaptureFallbackVerbiage } from '../fallback_flows/IdCapture';
|
|
11
11
|
export type IdCaptureWizardAssets = {
|
|
12
12
|
documentDetectionModelUrl?: string;
|
|
13
13
|
focusModelUrl?: string;
|
|
14
14
|
loadingOverlay?: IdCaptureLoadingOverlayAssets;
|
|
15
|
+
guides?: IdCaptureGuidesAssets;
|
|
15
16
|
idCardFront?: IdCaptureAssets;
|
|
16
17
|
idCardBack?: IdCaptureAssets;
|
|
17
18
|
passport?: IdCaptureAssets;
|
|
18
|
-
flipIdPrompt?: FlipIdPromptAssets;
|
|
19
19
|
};
|
|
20
20
|
export type IdCaptureWizardClassNames = {
|
|
21
21
|
container?: string;
|
|
22
22
|
cameraFeed?: string;
|
|
23
23
|
loadingOverlay?: IdCaptureLoadingOverlayClassNames;
|
|
24
24
|
capture?: IdCaptureClassNames;
|
|
25
|
-
|
|
25
|
+
guides?: IdCaptureGuidesClassNames;
|
|
26
26
|
success?: IdCaptureSuccessClassNames;
|
|
27
27
|
fallback?: IdCaptureFallbackClassNames;
|
|
28
28
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
|
-
import { FaceCaptureGuideOverlayClassNames } from '../face_liveness/FaceCaptureGuideOverlay';
|
|
1
|
+
import { ComponentType, ReactElement } from 'react';
|
|
2
|
+
import { FaceCaptureGuideOverlayClassNames, FaceCaptureGuideOverlayProps } 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,19 +26,24 @@ export type SelfieCaptureVerbiage = {
|
|
|
26
26
|
guidanceMoveBackText?: CustomerSuppliedVerbiage;
|
|
27
27
|
guidanceMoveForwardText?: CustomerSuppliedVerbiage;
|
|
28
28
|
guidanceMoveToCenterText?: CustomerSuppliedVerbiage;
|
|
29
|
+
guidanceNoFaceDetectedText?: CustomerSuppliedVerbiage;
|
|
29
30
|
};
|
|
30
31
|
export type SelfieCaptureProps = {
|
|
31
32
|
onGuidanceSatisfied?: () => void;
|
|
32
33
|
onGuidanceNotSatisfied?: () => void;
|
|
34
|
+
onSelfieCaptureStarted?: () => void;
|
|
33
35
|
onSelfieCaptured?: (frame: ImageData, face: Face) => void;
|
|
34
36
|
onTimeout?: () => void;
|
|
35
37
|
onExit?: () => void;
|
|
36
38
|
timeoutDurationMs?: number;
|
|
37
39
|
guidanceMessage?: string;
|
|
38
40
|
guidanceSatisfied?: boolean;
|
|
41
|
+
guidesComponent?: ComponentType<FaceCaptureGuideOverlayProps>;
|
|
42
|
+
requireVerticalFaceCentering?: boolean;
|
|
43
|
+
shouldCapture?: boolean;
|
|
39
44
|
classNames?: SelfieCaptureClassNames;
|
|
40
45
|
colors?: SelfieCaptureColors;
|
|
41
46
|
verbiage?: SelfieCaptureVerbiage;
|
|
42
47
|
debugMode?: boolean;
|
|
43
48
|
};
|
|
44
|
-
export declare const SelfieCapture: ({ onGuidanceSatisfied, onGuidanceNotSatisfied, onSelfieCaptured, onTimeout, onExit, timeoutDurationMs, guidanceMessage, guidanceSatisfied, classNames, colors, verbiage: rawVerbiage, debugMode, }: SelfieCaptureProps) => ReactElement;
|
|
49
|
+
export declare const SelfieCapture: ({ onGuidanceSatisfied, onGuidanceNotSatisfied, onSelfieCaptureStarted, onSelfieCaptured, onTimeout, onExit, timeoutDurationMs, guidanceMessage, guidanceSatisfied, guidesComponent, requireVerticalFaceCentering, shouldCapture, classNames, colors, verbiage: rawVerbiage, debugMode, }: SelfieCaptureProps) => ReactElement;
|
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { SVGProps } from 'react';
|
|
2
|
+
import { FaceGuideStatus } from '../face_liveness/FaceCaptureGuideOverlay';
|
|
2
3
|
export declare function SelfieCaptureLoadingGraphic({ width, height, className, }: {
|
|
3
4
|
width?: number;
|
|
4
5
|
height?: number;
|
|
5
6
|
className?: string;
|
|
6
7
|
}): React.JSX.Element;
|
|
8
|
+
export type SelfieCaptureAnimatedMaskProps = SVGProps<SVGSVGElement> & {
|
|
9
|
+
frame?: number;
|
|
10
|
+
borderWidth?: number;
|
|
11
|
+
borderColor?: string;
|
|
12
|
+
borderOpacity?: number;
|
|
13
|
+
verticalAlign?: 'center' | '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
|
-
type
|
|
4
|
+
export type SelfieGuidancePredictionHandler = (prediction: Face[]) => Promise<void> | void;
|
|
5
5
|
type SelfieGuidanceModelsState = {
|
|
6
6
|
start: () => void;
|
|
7
7
|
stop: () => void;
|
|
8
|
-
onPredictionMade: (handler:
|
|
8
|
+
onPredictionMade: (handler: SelfieGuidancePredictionHandler) => void;
|
|
9
9
|
canvasRef: MutableRefObject<HTMLCanvasElement | null>;
|
|
10
10
|
ready: boolean;
|
|
11
11
|
error: Error | null;
|
|
@@ -1,13 +1,32 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
1
|
+
import React, { CSSProperties, ReactElement } from 'react';
|
|
2
2
|
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
|
+
};
|
|
6
12
|
export type IdVideoCaptureFlipIdPromptProps = {
|
|
7
|
-
|
|
8
|
-
imageWidth?: number;
|
|
9
|
-
imageHeight?: number;
|
|
10
|
-
borderWidth?: number;
|
|
13
|
+
classNames?: IdVideoCaptureFlipIdPromptClassNames;
|
|
11
14
|
assets?: IdVideoCaptureFlipIdPromptAssets;
|
|
15
|
+
borderWidth?: number;
|
|
16
|
+
borderColor?: string;
|
|
17
|
+
borderRadius?: number;
|
|
18
|
+
imageStyle?: CSSProperties;
|
|
12
19
|
};
|
|
13
|
-
export declare const IdVideoCaptureFlipIdPrompt: ({
|
|
20
|
+
export declare const IdVideoCaptureFlipIdPrompt: ({ assets, classNames, borderWidth, borderColor, borderRadius, imageStyle, }: IdVideoCaptureFlipIdPromptProps) => ReactElement;
|
|
21
|
+
export declare const FlipImageContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<React.HTMLAttributes<HTMLDivElement> & {
|
|
22
|
+
status?: import("./IdVideoCaptureGuidesCommon").IdCardGuideStatus;
|
|
23
|
+
borderWidth?: number;
|
|
24
|
+
borderRadius?: number;
|
|
25
|
+
borderColor?: string;
|
|
26
|
+
progress?: number;
|
|
27
|
+
}, "$isVisible"> & {
|
|
28
|
+
$isVisible?: boolean;
|
|
29
|
+
}, {
|
|
30
|
+
$transforms: string;
|
|
31
|
+
$transitionTime: number;
|
|
32
|
+
}>> & string;
|
|
@@ -1,37 +1,46 @@
|
|
|
1
1
|
import React, { ReactElement } from 'react';
|
|
2
|
+
import { IdVideoCaptureFlipIdPromptClassNames } from './IdVideoCaptureFlipIdPrompt';
|
|
2
3
|
import { CustomerSuppliedVerbiage } from '../../lib/locales';
|
|
3
|
-
|
|
4
|
+
import { IdCardGuideStatus } from './IdVideoCaptureGuidesCommon';
|
|
5
|
+
import { FaceGuideStatus } from '../face_liveness/FaceCaptureGuideOverlay';
|
|
6
|
+
export type Action = 'SHOW_ID_FRONT' | 'FLIP_ID' | 'SHOW_ID_BACK' | 'VERIFY_LIVENESS';
|
|
4
7
|
export type IdVideoCaptureGuidesAssets = {
|
|
5
8
|
frontImageUrl?: string;
|
|
6
9
|
backImageUrl?: string;
|
|
7
10
|
};
|
|
8
11
|
export type IdVideoCaptureGuidesClassNames = {
|
|
9
12
|
container?: string;
|
|
13
|
+
faceGuideContainer?: string;
|
|
10
14
|
faceGuide?: string;
|
|
11
15
|
idCardGuideContainer?: string;
|
|
16
|
+
idCardGuideInner?: string;
|
|
12
17
|
idCardGuideInstructionsContainer?: string;
|
|
13
18
|
idCardGuideInstructions?: string;
|
|
14
19
|
idCardGuideImageContainer?: string;
|
|
15
20
|
idCardGuideImage?: string;
|
|
16
|
-
|
|
21
|
+
flipIdPrompt?: IdVideoCaptureFlipIdPromptClassNames;
|
|
17
22
|
};
|
|
18
23
|
export type IdVideoCaptureGuidesVerbiage = {
|
|
19
24
|
idFrontInstructionText?: CustomerSuppliedVerbiage;
|
|
20
25
|
idBackInstructionText?: CustomerSuppliedVerbiage;
|
|
21
26
|
flipIdInstructionText?: CustomerSuppliedVerbiage;
|
|
27
|
+
verifyLivenessInstructionText?: CustomerSuppliedVerbiage;
|
|
22
28
|
};
|
|
23
29
|
export type IdVideoCaptureGuidesProps = {
|
|
24
30
|
requestedAction?: Action;
|
|
25
31
|
satisfied?: boolean;
|
|
32
|
+
faceGuideStatus?: FaceGuideStatus;
|
|
26
33
|
faceGuideBorderWidth?: number;
|
|
27
34
|
faceGuideBorderColor?: string;
|
|
35
|
+
idCardGuideStatus?: IdCardGuideStatus;
|
|
28
36
|
idCardGuideBorderWidth?: number;
|
|
29
37
|
idCardGuideBorderColor?: string;
|
|
38
|
+
idCardCaptureProgress?: number;
|
|
30
39
|
assets?: IdVideoCaptureGuidesAssets;
|
|
31
40
|
classNames?: IdVideoCaptureGuidesClassNames;
|
|
32
41
|
verbiage?: IdVideoCaptureGuidesVerbiage;
|
|
33
42
|
};
|
|
34
|
-
export declare const IdVideoCaptureGuides: ({ requestedAction, satisfied, faceGuideBorderWidth, faceGuideBorderColor, idCardGuideBorderWidth, idCardGuideBorderColor, assets, classNames, verbiage: rawVerbiage, }: IdVideoCaptureGuidesProps) => ReactElement;
|
|
43
|
+
export declare const IdVideoCaptureGuides: ({ requestedAction, satisfied, faceGuideStatus, faceGuideBorderWidth, faceGuideBorderColor, idCardGuideStatus, idCardGuideBorderWidth, idCardGuideBorderColor, idCardCaptureProgress, assets, classNames, verbiage: rawVerbiage, }: IdVideoCaptureGuidesProps) => ReactElement;
|
|
35
44
|
export declare const IdCardGuideInstructionsContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
36
45
|
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"> & {
|
|
37
46
|
$background?: string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const IdCardGuideImageContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
status?: IdCardGuideStatus;
|
|
4
|
+
borderWidth?: number;
|
|
5
|
+
borderRadius?: number;
|
|
6
|
+
borderColor?: string;
|
|
7
|
+
progress?: number;
|
|
8
|
+
}, {
|
|
9
|
+
$isVisible?: boolean;
|
|
10
|
+
}>> & string & Omit<typeof IdCardBorder, keyof React.Component<any, {}, any>>;
|
|
11
|
+
export declare const IdCardGuideImage: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {
|
|
12
|
+
$isMirrored?: boolean;
|
|
13
|
+
$isInvisible?: boolean;
|
|
14
|
+
}>> & string;
|
|
15
|
+
export type IdCardGuideStatus = 'disabled' | 'ready' | 'capturing';
|
|
16
|
+
declare function IdCardBorder({ children, status, borderWidth, borderRadius, borderColor, progress, ...props }: React.HTMLAttributes<HTMLDivElement> & {
|
|
17
|
+
status?: IdCardGuideStatus;
|
|
18
|
+
borderWidth?: number;
|
|
19
|
+
borderRadius?: number;
|
|
20
|
+
borderColor?: string;
|
|
21
|
+
progress?: number;
|
|
22
|
+
}): React.JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -30,7 +30,6 @@ declare const _default: {
|
|
|
30
30
|
'ID card front detected, hold still...': string;
|
|
31
31
|
'ID card back detected, hold still...': string;
|
|
32
32
|
'Passport detected, hold still...': string;
|
|
33
|
-
'Single page ID document detected, hold still...': string;
|
|
34
33
|
'Capturing...': string;
|
|
35
34
|
'Capture failed!': string;
|
|
36
35
|
'Please flip your ID card...': string;
|
|
@@ -55,6 +54,8 @@ declare const _default: {
|
|
|
55
54
|
Exit: string;
|
|
56
55
|
'Face liveness has been verified!': string;
|
|
57
56
|
Done: string;
|
|
57
|
+
'Could not verify your face.': string;
|
|
58
|
+
'An error occurred while verifying your face.': string;
|
|
58
59
|
'Customer has been identified!': string;
|
|
59
60
|
'Customer not found': string;
|
|
60
61
|
'Additional document capture': string;
|
|
@@ -38,7 +38,6 @@ export declare const resources: {
|
|
|
38
38
|
'ID card front detected, hold still...': string;
|
|
39
39
|
'ID card back detected, hold still...': string;
|
|
40
40
|
'Passport detected, hold still...': string;
|
|
41
|
-
'Single page ID document detected, hold still...': string;
|
|
42
41
|
'Capturing...': string;
|
|
43
42
|
'Capture failed!': string;
|
|
44
43
|
'Please flip your ID card...': string;
|
|
@@ -63,6 +62,8 @@ export declare const resources: {
|
|
|
63
62
|
Exit: string;
|
|
64
63
|
'Face liveness has been verified!': string;
|
|
65
64
|
Done: string;
|
|
65
|
+
'Could not verify your face.': string;
|
|
66
|
+
'An error occurred while verifying your face.': string;
|
|
66
67
|
'Customer has been identified!': string;
|
|
67
68
|
'Customer not found': string;
|
|
68
69
|
'Additional document capture': string;
|
|
@@ -1,17 +1,16 @@
|
|
|
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/docdetectmp20240825/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';
|
|
7
7
|
export declare const documentTypeDisplayNames: {
|
|
8
8
|
idCardFront: string;
|
|
9
9
|
idCardBack: string;
|
|
10
10
|
passport: string;
|
|
11
|
-
singlePage: string;
|
|
12
11
|
none: string;
|
|
13
12
|
};
|
|
14
|
-
export type Label = 'Document' | 'Document back' | 'MRZ' | 'PDF417' | 'Primary face' | 'Secondary face' | 'Glare' | 'Punch Hole' | 'Passport page'
|
|
13
|
+
export type Label = 'Document' | 'Document back' | 'MRZ' | 'PDF417' | 'Primary face' | 'Secondary face' | 'Glare' | 'Punch Hole' | 'Passport page';
|
|
15
14
|
export type DetectedObjectBox = {
|
|
16
15
|
xMin: number;
|
|
17
16
|
xMax: number;
|
|
@@ -29,7 +28,6 @@ export type DocumentDetectionThresholds = {
|
|
|
29
28
|
idCardFront?: number;
|
|
30
29
|
idCardBack?: number;
|
|
31
30
|
passport?: number;
|
|
32
|
-
singlePage?: number;
|
|
33
31
|
};
|
|
34
32
|
export declare function loadDocumentDetector(modelAssetPath?: string, scoreThreshold?: number): Promise<ObjectDetector>;
|
|
35
33
|
export declare function useLoadDocumentDetector({ modelPath, modelLoadTimeoutMs, scoreThreshold, onModelError, }: {
|
|
@@ -56,8 +54,6 @@ export type DocumentDetectionPrediction = {
|
|
|
56
54
|
idCardBackDetectionThresholdMet: boolean;
|
|
57
55
|
passportDetectionScore: number;
|
|
58
56
|
passportDetectionThresholdMet: boolean;
|
|
59
|
-
singlePageDetectionScore: number;
|
|
60
|
-
singlePageDetectionThresholdMet: boolean;
|
|
61
57
|
bestDocument: DetectedObject | undefined;
|
|
62
58
|
documentInBounds: boolean;
|
|
63
59
|
documentTooClose: boolean;
|