@regulaforensics/vp-frontend-document-components 2.1.0 → 2.3.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 +213 -36
- package/dist/main.js +1 -1
- package/esm/main.js +1 -1
- package/lib/common/Message.d.ts +2 -1
- package/lib/common/NoGlareIconLivenessDetection.d.ts +5 -0
- package/lib/common/NoSmilingIconLivenessDetection.d.ts +5 -0
- package/lib/common/PortraitOrientationOnlyIcon.d.ts +6 -0
- package/lib/common/RegulaLogoLivenessDetection.d.ts +5 -0
- package/lib/components/ButtonFaceLiveness.d.ts +7 -0
- package/lib/components/DocumentReaderLayout.d.ts +4 -6
- package/lib/components/FaceCapture.d.ts +15 -6
- package/lib/components/FaceFullScreenOverlay.d.ts +2 -3
- package/lib/components/FaceHintAnimaition.d.ts +16 -0
- package/lib/components/FaceLayout.d.ts +10 -5
- package/lib/components/InfoScreenFaceLiveness.d.ts +11 -0
- package/lib/components/InstructionVideoScreen.d.ts +9 -0
- package/lib/components/ProcessScreenFaceLiveness.d.ts +6 -0
- package/lib/components/RetryScreenFaceLiveness.d.ts +7 -0
- package/lib/components/SectorAnimationSvg.d.ts +11 -0
- package/lib/constants.d.ts +88 -11
- package/lib/contexts/DocumentAttributesContext.d.ts +5 -2
- package/lib/contexts/DocumentSDKContext.d.ts +3 -1
- package/lib/contexts/FaceAttributesContext.d.ts +6 -3
- package/lib/hoc/withLocalize.d.ts +5 -4
- package/lib/hooks/useDocumentReaderSeries.d.ts +2 -5
- package/lib/hooks/useFaceLiveness.d.ts +13 -3
- package/lib/hooks/useStateCallback.d.ts +1 -0
- package/lib/i18n/dictionaries/_dictionaries.d.ts +2212 -2052
- package/lib/index-document.d.ts +3 -4
- package/lib/media-resources/resourcesBase64.d.ts +7 -0
- package/lib/services/DebugService.d.ts +4 -0
- package/lib/services/DocumentReaderProcessor.d.ts +4 -3
- package/lib/services/DocumentReaderService.d.ts +2 -2
- package/lib/services/FaceLivenessService.d.ts +35 -16
- package/lib/services/FaceService.d.ts +31 -6
- package/lib/types.d.ts +132 -75
- package/lib/web-components/CameraSnapshot.d.ts +6 -3
- package/lib/web-components/DocumentReader.d.ts +6 -3
- package/lib/web-components/FaceDetection.d.ts +2 -3
- package/lib/web-components/FaceLiveness.d.ts +6 -4
- package/lib/web-components/FullScreenContainer.d.ts +1 -1
- package/package.json +6 -4
- package/lib/common/InstructionIconFaceDetection.d.ts +0 -5
- package/lib/common/InstructionIconFaceLiveness.d.ts +0 -5
- package/lib/common/NoGlareIcon.d.ts +0 -5
- package/lib/common/NoSmilingIcon.d.ts +0 -5
- package/lib/components/InstructionScreen.d.ts +0 -9
- package/lib/components/RetryScreen.d.ts +0 -7
package/lib/common/Message.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
declare type MessageProps = {
|
|
3
3
|
children: string;
|
|
4
|
+
isLivenessDetection?: boolean;
|
|
4
5
|
};
|
|
5
|
-
declare function Message({ children }: MessageProps): JSX.Element;
|
|
6
|
+
declare function Message({ children, isLivenessDetection }: MessageProps): JSX.Element;
|
|
6
7
|
declare const _default: React.MemoExoticComponent<typeof Message>;
|
|
7
8
|
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare type ButtonLivenessDetectionProps = {
|
|
3
|
+
children: React.ReactNode | string;
|
|
4
|
+
onClick: () => void;
|
|
5
|
+
};
|
|
6
|
+
declare function ButtonFaceLiveness({ children, onClick, ...rest }: ButtonLivenessDetectionProps): JSX.Element;
|
|
7
|
+
export default ButtonFaceLiveness;
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { DocumentCaptureStatus
|
|
3
|
-
import { FrameParamsType, VideoParamsType } from '../types';
|
|
2
|
+
import { DocumentCaptureStatus } from '../constants';
|
|
3
|
+
import { FrameParamsType, VideoParamsType, VideoStatusParamsType } from '../types';
|
|
4
4
|
declare type DocumentReaderLayoutProps = {
|
|
5
5
|
status: DocumentCaptureStatus;
|
|
6
|
-
videoStatus: StreamStatus;
|
|
7
6
|
isServiceInitialized: boolean;
|
|
8
7
|
children: JSX.Element | null;
|
|
9
8
|
mirroring: boolean;
|
|
10
9
|
onChangeMirroring: () => void;
|
|
11
10
|
onChangeCamera: () => void;
|
|
12
|
-
|
|
13
|
-
facingMode?: string;
|
|
11
|
+
videoStatusParams: VideoStatusParamsType;
|
|
14
12
|
onCameraSnapshot?: () => void;
|
|
15
13
|
onSkip?: () => void;
|
|
16
14
|
frameParams?: FrameParamsType;
|
|
17
15
|
videoElementParams?: VideoParamsType;
|
|
18
16
|
showChangeCameraButton?: boolean;
|
|
19
17
|
};
|
|
20
|
-
declare function DocumentReaderLayout({ status,
|
|
18
|
+
declare function DocumentReaderLayout({ status, isServiceInitialized, children, mirroring, onChangeMirroring, onChangeCamera, videoStatusParams, onCameraSnapshot, onSkip, frameParams, videoElementParams, showChangeCameraButton, }: DocumentReaderLayoutProps): JSX.Element;
|
|
21
19
|
declare const _default: React.MemoExoticComponent<typeof DocumentReaderLayout>;
|
|
22
20
|
export default _default;
|
|
@@ -1,15 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
import { FaceCompletionStatus } from '../constants';
|
|
3
|
-
declare type
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { FaceAbortSessionStatus, FaceCompletionStatus } from '../constants';
|
|
3
|
+
declare type FaceCapturePropsLivenessDetection = {
|
|
4
4
|
onStatusChange: (completionStatus: FaceCompletionStatus) => void;
|
|
5
5
|
onImagesCapture: (images: Array<string>) => void;
|
|
6
6
|
onReset: () => void;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
sessionId?: string;
|
|
8
|
+
setSessionId?: (id: string) => void;
|
|
9
|
+
setTransactionId?: (id: string) => void;
|
|
10
|
+
setPublicKey?: (id: string) => void;
|
|
9
11
|
onRequestChange?: (request: Uint8Array | null) => void;
|
|
10
12
|
faceSnapshot?: boolean;
|
|
11
13
|
debug?: boolean;
|
|
12
14
|
showChangeCameraButton?: boolean;
|
|
15
|
+
backendUrl?: string;
|
|
16
|
+
userCameraId?: string;
|
|
17
|
+
setUserCameraId: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
18
|
+
onRestart: (forceCapture?: boolean) => void;
|
|
19
|
+
abortProcess?: boolean;
|
|
20
|
+
setAbortProcess?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
21
|
+
setAbortSessionStatus?: React.Dispatch<React.SetStateAction<FaceAbortSessionStatus | null>>;
|
|
13
22
|
};
|
|
14
|
-
declare function FaceCapture({ onStatusChange, onImagesCapture, onReset,
|
|
23
|
+
declare function FaceCapture({ onStatusChange, onImagesCapture, onReset, sessionId, setSessionId, onRequestChange, faceSnapshot, debug, showChangeCameraButton, setTransactionId, setPublicKey, backendUrl, userCameraId, setUserCameraId, onRestart, abortProcess, setAbortProcess, setAbortSessionStatus, }: FaceCapturePropsLivenessDetection): JSX.Element;
|
|
15
24
|
export default FaceCapture;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { DirectionType
|
|
2
|
+
import { DirectionType } from '../constants';
|
|
3
3
|
declare type FaceFullScreenOverlayProps = {
|
|
4
4
|
onClose: () => void;
|
|
5
5
|
children: JSX.Element;
|
|
6
|
-
completionStatus: FaceCompletionStatus;
|
|
7
6
|
copyright?: boolean;
|
|
8
7
|
direction: DirectionType;
|
|
9
8
|
};
|
|
10
|
-
declare function FaceFullScreenOverlay({ onClose, children,
|
|
9
|
+
declare function FaceFullScreenOverlay({ onClose, children, copyright, direction }: FaceFullScreenOverlayProps): JSX.Element;
|
|
11
10
|
export default FaceFullScreenOverlay;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { FacePositionLivenessDetection } from '../types';
|
|
3
|
+
declare type FaceHintAnimaitionProps = {
|
|
4
|
+
targetSector: number;
|
|
5
|
+
roundRadiusX?: number;
|
|
6
|
+
roundRadiusY: number;
|
|
7
|
+
isFaceAnimation: boolean;
|
|
8
|
+
setCameraBlur: (toggle: boolean) => void;
|
|
9
|
+
isSectorMode: boolean;
|
|
10
|
+
message: number;
|
|
11
|
+
facePosition: FacePositionLivenessDetection;
|
|
12
|
+
centerX: number;
|
|
13
|
+
centerY: number;
|
|
14
|
+
};
|
|
15
|
+
export declare const FaceHintAnimaition: React.FC<FaceHintAnimaitionProps>;
|
|
16
|
+
export {};
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { FaceMessage
|
|
3
|
-
import { FrameObject } from '../types';
|
|
2
|
+
import { FaceMessage } from '../constants';
|
|
3
|
+
import { FacePositionLivenessDetection, FrameObject, VideoStatusParamsType } from '../types';
|
|
4
4
|
declare type FaceLayoutProps = {
|
|
5
5
|
children: JSX.Element | null;
|
|
6
6
|
captureFrame: FrameObject;
|
|
7
|
-
|
|
7
|
+
videoStatusParams: VideoStatusParamsType;
|
|
8
8
|
message: FaceMessage;
|
|
9
9
|
prepared: boolean;
|
|
10
10
|
onChangeCamera: () => void;
|
|
11
|
-
isChangeCameraAvailable: boolean;
|
|
12
11
|
readiness: number;
|
|
12
|
+
step: number;
|
|
13
|
+
numSectors: number;
|
|
14
|
+
currSector: number;
|
|
15
|
+
targetSector: number | undefined;
|
|
13
16
|
breakpoint?: string;
|
|
14
17
|
showChangeCameraButton?: boolean;
|
|
18
|
+
facePosition: FacePositionLivenessDetection;
|
|
19
|
+
faceSnapshot: boolean | undefined;
|
|
15
20
|
};
|
|
16
|
-
declare function FaceLayout({ children,
|
|
21
|
+
declare function FaceLayout({ children, captureFrame, videoStatusParams, message, prepared, onChangeCamera, readiness, numSectors, currSector, targetSector, step, showChangeCameraButton, facePosition, faceSnapshot, }: FaceLayoutProps): JSX.Element;
|
|
17
22
|
declare const _default: React.MemoExoticComponent<typeof FaceLayout>;
|
|
18
23
|
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type InfoScreenFaceLivenessProps = {
|
|
3
|
+
title: string;
|
|
4
|
+
type: string;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
onReset?: () => void;
|
|
7
|
+
size?: number;
|
|
8
|
+
iconColor?: string;
|
|
9
|
+
};
|
|
10
|
+
declare function InfoScreenFaceLiveness({ title, type, subtitle, onReset, size, iconColor, }: InfoScreenFaceLivenessProps): JSX.Element;
|
|
11
|
+
export default InfoScreenFaceLiveness;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type InstructionVideoScreenProps = {
|
|
3
|
+
onStart: () => void;
|
|
4
|
+
title: string;
|
|
5
|
+
subtitle: string;
|
|
6
|
+
videoSrc: string;
|
|
7
|
+
};
|
|
8
|
+
declare function InstructionVideoScreen({ onStart, title, subtitle, videoSrc }: InstructionVideoScreenProps): JSX.Element;
|
|
9
|
+
export default InstructionVideoScreen;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type RetryScreenFaceLivenessProps = {
|
|
3
|
+
errorCode: number;
|
|
4
|
+
onReset: () => void;
|
|
5
|
+
};
|
|
6
|
+
declare function RetryScreenFaceLiveness({ errorCode, onReset }: RetryScreenFaceLivenessProps): JSX.Element;
|
|
7
|
+
export default RetryScreenFaceLiveness;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface SectorAnimationSvgProps {
|
|
3
|
+
numSectors: number;
|
|
4
|
+
targetSector: number;
|
|
5
|
+
currSector: number;
|
|
6
|
+
centerX: number;
|
|
7
|
+
centerY: number;
|
|
8
|
+
sectorRadius: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const SectorAnimationSvg: React.FC<SectorAnimationSvgProps>;
|
|
11
|
+
export {};
|
package/lib/constants.d.ts
CHANGED
|
@@ -5,21 +5,19 @@ export declare enum FaceMessage {
|
|
|
5
5
|
MoveCloser = 3,
|
|
6
6
|
MoveAway = 4,
|
|
7
7
|
HoldStill = 5,
|
|
8
|
-
ShowOnlyOneFace = 6
|
|
8
|
+
ShowOnlyOneFace = 6,
|
|
9
|
+
TurnHead = 7
|
|
9
10
|
}
|
|
10
11
|
export declare enum FaceProcessingStage {
|
|
11
12
|
Far = 0,
|
|
12
13
|
Near = 1
|
|
13
14
|
}
|
|
14
|
-
export declare enum FaceMessageStyle {
|
|
15
|
-
Normal = 0,
|
|
16
|
-
Alarm = 1
|
|
17
|
-
}
|
|
18
15
|
export declare enum FaceStatus {
|
|
19
16
|
Finished = 0,
|
|
20
17
|
InProcess = 1,
|
|
21
18
|
Timeout = 2,
|
|
22
|
-
Failed = 3
|
|
19
|
+
Failed = 3,
|
|
20
|
+
Stop_Session = 4
|
|
23
21
|
}
|
|
24
22
|
export declare enum ImageOutputType {
|
|
25
23
|
UINT = "UINT",
|
|
@@ -41,6 +39,8 @@ export declare enum DocumentEventActions {
|
|
|
41
39
|
PRESS_RETRY_BUTTON = "PRESS_RETRY_BUTTON",
|
|
42
40
|
PRESS_SKIP_BUTTON = "PRESS_SKIP_BUTTON",
|
|
43
41
|
CLOSE = "CLOSE",
|
|
42
|
+
CAMERA_PROCESS_STARTED = "CAMERA_PROCESS_STARTED",
|
|
43
|
+
FILE_PROCESS_STARTED = "FILE_PROCESS_STARTED",
|
|
44
44
|
PROCESS_FINISHED = "PROCESS_FINISHED",
|
|
45
45
|
SERVICE_INITIALIZED = "SERVICE_INITIALIZED"
|
|
46
46
|
}
|
|
@@ -72,7 +72,8 @@ export declare enum ImageQualityCheckType {
|
|
|
72
72
|
export declare enum ResponseCode {
|
|
73
73
|
EMPTY = -1,
|
|
74
74
|
ERROR = 0,
|
|
75
|
-
OK = 1
|
|
75
|
+
OK = 1,
|
|
76
|
+
TIMEOUT = 2
|
|
76
77
|
}
|
|
77
78
|
export declare enum CheckResult {
|
|
78
79
|
ERROR = 0,
|
|
@@ -89,7 +90,16 @@ export declare enum StreamStatus {
|
|
|
89
90
|
NO_CAMERA = "StreamStatus.NO_CAMERA",
|
|
90
91
|
INCORRECT_CAMERA_ID = "StreamStatus.INCORRECT_CAMERA_ID"
|
|
91
92
|
}
|
|
93
|
+
export declare enum FaceAbortSessionStatus {
|
|
94
|
+
CHANGE_CAMERA = "FaceAbortSessionStatus.CHANGE_CAMERA",
|
|
95
|
+
DEVICE_ROTATE = "FaceAbortSessionStatus.DEVICE_ROTATE",
|
|
96
|
+
SESSION_TIMEOUT = "FaceAbortSessionStatus.TIMEOUT",
|
|
97
|
+
CLOSE_BUTTON = "FaceAbortSessionStatus.CLOSE_BUTTON",
|
|
98
|
+
UNKNOWN = "FaceAbortSessionStatus.UNKNOWN"
|
|
99
|
+
}
|
|
92
100
|
export declare enum FaceCompletionStatus {
|
|
101
|
+
RESTART = "FaceCompletionStatus.RESTART",
|
|
102
|
+
ABORT_PROCESSING = "FaceCompletionStatus.ABORT_PROCESSING",
|
|
93
103
|
INSTRUCTION = "FaceCompletionStatus.INSTRUCTION",
|
|
94
104
|
SUCCESS = "FaceCompletionStatus.SUCCESS",
|
|
95
105
|
FAILED = "FaceCompletionStatus.FAILED",
|
|
@@ -214,7 +224,7 @@ export declare const DOCUMENT_READER_EVENT = "document-reader";
|
|
|
214
224
|
export declare const CAMERA_SNAPSHOT_EVENT = "camera-snapshot";
|
|
215
225
|
export declare const PERCENT_FRAME_OFFSET = 10;
|
|
216
226
|
export declare const FLIP_TIMEOUT = 3000;
|
|
217
|
-
export declare const
|
|
227
|
+
export declare const FRAME_STROKE_WIDTH_LIVENESS_DETECTION = 3;
|
|
218
228
|
export declare const RESULT_TIMEOUT_MS = 2000;
|
|
219
229
|
export declare const NEW_INDEX = 1;
|
|
220
230
|
export declare const MAX_FILES_SIZE = 25000000;
|
|
@@ -226,6 +236,8 @@ export declare const DEFAULT_COMPONENT_LANGUAGE = "en";
|
|
|
226
236
|
export declare const RTL_LANGUAGES: string[];
|
|
227
237
|
export declare const DEFAULT_CAMERA_ID = 0;
|
|
228
238
|
export declare const OVAL_TRANSITION_TIME = 200;
|
|
239
|
+
export declare const CAMERAS_COUNT = 1;
|
|
240
|
+
export declare const FIREFOX_SWITCH_CAMERA_DELAY = 500;
|
|
229
241
|
export declare const CameraResolution: {
|
|
230
242
|
VGA: {
|
|
231
243
|
width: number;
|
|
@@ -246,15 +258,39 @@ export declare const CameraResolution: {
|
|
|
246
258
|
};
|
|
247
259
|
export declare const BackCameraKeywords: string[];
|
|
248
260
|
export declare const FaceErrorCodes: {
|
|
249
|
-
|
|
261
|
+
199: {
|
|
250
262
|
name: string;
|
|
251
263
|
type: number;
|
|
252
264
|
};
|
|
253
|
-
|
|
265
|
+
200: {
|
|
254
266
|
name: string;
|
|
255
267
|
type: number;
|
|
256
268
|
};
|
|
257
|
-
|
|
269
|
+
201: {
|
|
270
|
+
name: string;
|
|
271
|
+
type: number;
|
|
272
|
+
};
|
|
273
|
+
202: {
|
|
274
|
+
name: string;
|
|
275
|
+
type: number;
|
|
276
|
+
};
|
|
277
|
+
203: {
|
|
278
|
+
name: string;
|
|
279
|
+
type: number;
|
|
280
|
+
};
|
|
281
|
+
224: {
|
|
282
|
+
name: string;
|
|
283
|
+
type: number;
|
|
284
|
+
};
|
|
285
|
+
227: {
|
|
286
|
+
name: string;
|
|
287
|
+
type: number;
|
|
288
|
+
};
|
|
289
|
+
228: {
|
|
290
|
+
name: string;
|
|
291
|
+
type: number;
|
|
292
|
+
};
|
|
293
|
+
229: {
|
|
258
294
|
name: string;
|
|
259
295
|
type: number;
|
|
260
296
|
};
|
|
@@ -262,6 +298,14 @@ export declare const FaceErrorCodes: {
|
|
|
262
298
|
name: string;
|
|
263
299
|
type: number;
|
|
264
300
|
};
|
|
301
|
+
231: {
|
|
302
|
+
name: string;
|
|
303
|
+
type: number;
|
|
304
|
+
};
|
|
305
|
+
232: {
|
|
306
|
+
name: string;
|
|
307
|
+
type: number;
|
|
308
|
+
};
|
|
265
309
|
233: {
|
|
266
310
|
name: string;
|
|
267
311
|
type: number;
|
|
@@ -278,6 +322,14 @@ export declare const FaceErrorCodes: {
|
|
|
278
322
|
name: string;
|
|
279
323
|
type: number;
|
|
280
324
|
};
|
|
325
|
+
237: {
|
|
326
|
+
name: string;
|
|
327
|
+
type: number;
|
|
328
|
+
};
|
|
329
|
+
238: {
|
|
330
|
+
name: string;
|
|
331
|
+
type: number;
|
|
332
|
+
};
|
|
281
333
|
239: {
|
|
282
334
|
name: string;
|
|
283
335
|
type: number;
|
|
@@ -298,6 +350,26 @@ export declare const FaceErrorCodes: {
|
|
|
298
350
|
name: string;
|
|
299
351
|
type: number;
|
|
300
352
|
};
|
|
353
|
+
245: {
|
|
354
|
+
name: string;
|
|
355
|
+
type: number;
|
|
356
|
+
};
|
|
357
|
+
246: {
|
|
358
|
+
name: string;
|
|
359
|
+
type: number;
|
|
360
|
+
};
|
|
361
|
+
247: {
|
|
362
|
+
name: string;
|
|
363
|
+
type: number;
|
|
364
|
+
};
|
|
365
|
+
248: {
|
|
366
|
+
name: string;
|
|
367
|
+
type: number;
|
|
368
|
+
};
|
|
369
|
+
249: {
|
|
370
|
+
name: string;
|
|
371
|
+
type: number;
|
|
372
|
+
};
|
|
301
373
|
};
|
|
302
374
|
export declare const WebComponentErrorByStreamStatus: {
|
|
303
375
|
"StreamStatus.UNKNOWN_ERROR": ErrorTypes;
|
|
@@ -566,6 +638,11 @@ export declare const DocumentScenarioFrameParams: {
|
|
|
566
638
|
manualCrop?: undefined;
|
|
567
639
|
})[];
|
|
568
640
|
};
|
|
641
|
+
export declare const CIRCLE_ROTATE_SHIFT = 22.5;
|
|
642
|
+
export declare const MIRROR_ANIMATION_TARGETS: number[];
|
|
643
|
+
export declare const ANIMATION_TIMEOUT = 1000;
|
|
644
|
+
export declare const ANIMATION_MESSAGE: FaceMessage[];
|
|
645
|
+
export declare const STATIC_ANIMATION_MESSAGE: FaceMessage[];
|
|
569
646
|
export declare const DocumentReaderRecognizerDefaultRequest: {
|
|
570
647
|
processParam: {
|
|
571
648
|
scenario: InternalScenarios;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { CameraSnapshotResponseType, DocumentReaderResponseType } from '../types';
|
|
2
|
+
import { CameraSnapshotResponseType, DocumentDictionaries, DocumentReaderResponseType, Locales } from '../types';
|
|
3
3
|
import { DocumentEventActions, InternalScenarios, ObjectFit, ErrorTypes } from '../constants';
|
|
4
4
|
declare type DocumentCallbackArgTypes = DocumentReaderResponseType | CameraSnapshotResponseType;
|
|
5
5
|
export declare type DocumentAttributesContextType = {
|
|
@@ -8,8 +8,9 @@ export declare type DocumentAttributesContextType = {
|
|
|
8
8
|
action: DocumentEventActions;
|
|
9
9
|
}) => void;
|
|
10
10
|
onResponse: (response: DocumentCallbackArgTypes) => void;
|
|
11
|
+
onTimeout: (response: DocumentCallbackArgTypes) => void;
|
|
11
12
|
onFail: (reason: ErrorTypes) => void;
|
|
12
|
-
locale?:
|
|
13
|
+
locale?: Locales;
|
|
13
14
|
internalScenario?: InternalScenarios;
|
|
14
15
|
multipageProcessing?: boolean;
|
|
15
16
|
startScreen?: boolean;
|
|
@@ -19,6 +20,8 @@ export declare type DocumentAttributesContextType = {
|
|
|
19
20
|
cameraId?: string;
|
|
20
21
|
objectFit?: ObjectFit;
|
|
21
22
|
changeCamera?: boolean;
|
|
23
|
+
translations?: DocumentDictionaries;
|
|
22
24
|
};
|
|
23
25
|
export declare const DocumentAttributesContext: React.Context<DocumentAttributesContextType>;
|
|
26
|
+
export declare const useDocumentContext: () => DocumentAttributesContextType;
|
|
24
27
|
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import DocumentReaderService from '../services/DocumentReaderService';
|
|
3
|
-
|
|
3
|
+
declare type DocumentSDKContextType = {
|
|
4
4
|
service: DocumentReaderService | null;
|
|
5
5
|
};
|
|
6
6
|
export declare const DocumentSDKContext: React.Context<DocumentSDKContextType>;
|
|
7
|
+
export declare const useDocumentSDKContext: () => DocumentSDKContextType;
|
|
8
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FaceDetectionResponseType, FaceLivenessResponseType } from '../types';
|
|
2
|
+
import { FaceDetectionResponseType, Locales, FaceLivenessResponseType } from '../types';
|
|
3
3
|
import { FaceEventActions, ErrorTypes } from '../constants';
|
|
4
|
-
declare type FaceCallbackArgTypes =
|
|
4
|
+
declare type FaceCallbackArgTypes = FaceDetectionResponseType | FaceLivenessResponseType;
|
|
5
5
|
export declare type FaceAttributesContextType = {
|
|
6
6
|
onAction: ({ manual, action }: {
|
|
7
7
|
manual: boolean;
|
|
@@ -9,13 +9,16 @@ export declare type FaceAttributesContextType = {
|
|
|
9
9
|
}) => void;
|
|
10
10
|
onResponse: (response: FaceCallbackArgTypes) => void;
|
|
11
11
|
onFail: (reason: ErrorTypes) => void;
|
|
12
|
-
locale?:
|
|
12
|
+
locale?: Locales;
|
|
13
13
|
url?: string;
|
|
14
14
|
debug?: boolean;
|
|
15
15
|
headers?: Record<string, string>;
|
|
16
|
+
sessionId?: string;
|
|
16
17
|
copyright?: boolean;
|
|
17
18
|
cameraId?: string;
|
|
18
19
|
changeCamera?: boolean;
|
|
20
|
+
startScreen?: boolean;
|
|
19
21
|
};
|
|
20
22
|
export declare const FaceAttributesContext: React.Context<FaceAttributesContextType>;
|
|
23
|
+
export declare const useFaceContext: () => FaceAttributesContextType;
|
|
21
24
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
interface
|
|
4
|
-
locale
|
|
2
|
+
import { DocumentDictionaries, Locales } from '../types';
|
|
3
|
+
interface LocalizedProps {
|
|
4
|
+
locale?: Locales;
|
|
5
|
+
translations?: DocumentDictionaries;
|
|
5
6
|
}
|
|
6
|
-
declare function withLocalize<T>(Component: React.ComponentType<T>): React.ComponentType<T &
|
|
7
|
+
declare function withLocalize<T>(Component: React.ComponentType<T>): React.ComponentType<T & LocalizedProps>;
|
|
7
8
|
export default withLocalize;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Response } from '../models/DocReaderWebclient/ext';
|
|
2
|
-
import { DocumentCaptureStatus,
|
|
2
|
+
import { DocumentCaptureStatus, InternalScenarios, ObjectFit, StreamStatus } from '../constants';
|
|
3
3
|
import { FrameParamsType, VideoParamsType } from '../types';
|
|
4
4
|
import CustomError from '../models/CustomError';
|
|
5
5
|
declare type ResponseType = {
|
|
@@ -18,8 +18,5 @@ declare function useDocumentReaderSeries(options: {
|
|
|
18
18
|
multipageProcessing?: boolean;
|
|
19
19
|
license?: string;
|
|
20
20
|
objectFit?: ObjectFit;
|
|
21
|
-
}
|
|
22
|
-
manual: boolean;
|
|
23
|
-
action: DocumentEventActions;
|
|
24
|
-
}) => void): useDocumentReaderSeriesInterface;
|
|
21
|
+
}): useDocumentReaderSeriesInterface;
|
|
25
22
|
export default useDocumentReaderSeries;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FaceMessage, FaceProcessingStage, FaceStatus, FaceEventActions, StreamStatus } from '../constants';
|
|
2
|
-
import { CameraTypes, FaceDebugOutput, Oval, VideoParamsType } from '../types';
|
|
2
|
+
import { CameraTypes, FaceDebugOutput, FacePositionLivenessDetection, Oval, VideoParamsType } from '../types';
|
|
3
3
|
import CustomError from '../models/CustomError';
|
|
4
4
|
declare type ResponseType = {
|
|
5
5
|
message: FaceMessage;
|
|
@@ -12,17 +12,27 @@ declare type ResponseType = {
|
|
|
12
12
|
prepared: boolean;
|
|
13
13
|
images: Array<string>;
|
|
14
14
|
ovals: Array<Oval>;
|
|
15
|
+
step: number;
|
|
16
|
+
currSector: number;
|
|
17
|
+
numSectors: number;
|
|
18
|
+
targetSector: number | undefined;
|
|
15
19
|
readiness: number;
|
|
20
|
+
publicKey: string | null;
|
|
16
21
|
error: CustomError | null;
|
|
22
|
+
facePosition: FacePositionLivenessDetection;
|
|
17
23
|
};
|
|
18
24
|
declare function useFaceLiveness(options: {
|
|
19
25
|
videoStatus: StreamStatus;
|
|
20
26
|
videoElementParams: VideoParamsType;
|
|
21
27
|
cameraInfo: CameraTypes;
|
|
22
|
-
|
|
28
|
+
setSessionId?: (id: string) => void;
|
|
29
|
+
setTransactionId?: (id: string) => void;
|
|
30
|
+
sessionId?: string;
|
|
23
31
|
url?: string;
|
|
24
|
-
tryCount?: number;
|
|
25
32
|
debug?: boolean;
|
|
33
|
+
faceSnapshot?: boolean;
|
|
34
|
+
backendUrl?: string;
|
|
35
|
+
abortProcess?: boolean;
|
|
26
36
|
}, onAction: ({ manual, action }: {
|
|
27
37
|
manual: boolean;
|
|
28
38
|
action: FaceEventActions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useStateCallback<T>(initialState: T): [T, (state: T, cb?: (state: T) => void) => void];
|