@regulaforensics/vp-frontend-document-components 2.1.0 → 2.2.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.
Files changed (47) hide show
  1. package/README.md +129 -35
  2. package/dist/main.js +1 -1
  3. package/esm/main.js +1 -1
  4. package/lib/common/Message.d.ts +2 -1
  5. package/lib/common/NoGlareIconLivenessDetection.d.ts +5 -0
  6. package/lib/common/NoSmilingIconLivenessDetection.d.ts +5 -0
  7. package/lib/common/PortraitOrientationOnlyIcon.d.ts +6 -0
  8. package/lib/common/RegulaLogoLivenessDetection.d.ts +5 -0
  9. package/lib/components/ButtonFaceLiveness.d.ts +7 -0
  10. package/lib/components/DocumentReaderLayout.d.ts +4 -6
  11. package/lib/components/FaceCapture.d.ts +15 -6
  12. package/lib/components/FaceFullScreenOverlay.d.ts +2 -3
  13. package/lib/components/FaceHintAnimaition.d.ts +16 -0
  14. package/lib/components/FaceLayout.d.ts +10 -5
  15. package/lib/components/InfoScreenFaceLiveness.d.ts +11 -0
  16. package/lib/components/InstructionVideoScreen.d.ts +9 -0
  17. package/lib/components/ProcessScreenFaceLiveness.d.ts +6 -0
  18. package/lib/components/RetryScreenFaceLiveness.d.ts +7 -0
  19. package/lib/components/SectorAnimationSvg.d.ts +11 -0
  20. package/lib/constants.d.ts +86 -10
  21. package/lib/contexts/DocumentAttributesContext.d.ts +4 -2
  22. package/lib/contexts/DocumentSDKContext.d.ts +3 -1
  23. package/lib/contexts/FaceAttributesContext.d.ts +6 -3
  24. package/lib/hoc/withLocalize.d.ts +5 -4
  25. package/lib/hooks/useDocumentReaderSeries.d.ts +2 -5
  26. package/lib/hooks/useFaceLiveness.d.ts +13 -3
  27. package/lib/hooks/useStateCallback.d.ts +1 -0
  28. package/lib/i18n/dictionaries/_dictionaries.d.ts +2212 -2052
  29. package/lib/index-document.d.ts +3 -4
  30. package/lib/media-resources/resourcesBase64.d.ts +7 -0
  31. package/lib/services/DebugService.d.ts +4 -0
  32. package/lib/services/DocumentReaderProcessor.d.ts +3 -2
  33. package/lib/services/FaceLivenessService.d.ts +70 -16
  34. package/lib/services/FaceService.d.ts +18 -5
  35. package/lib/types.d.ts +92 -75
  36. package/lib/web-components/CameraSnapshot.d.ts +6 -3
  37. package/lib/web-components/DocumentReader.d.ts +6 -3
  38. package/lib/web-components/FaceDetection.d.ts +2 -3
  39. package/lib/web-components/FaceLiveness.d.ts +6 -4
  40. package/lib/web-components/FullScreenContainer.d.ts +1 -1
  41. package/package.json +6 -4
  42. package/lib/common/InstructionIconFaceDetection.d.ts +0 -5
  43. package/lib/common/InstructionIconFaceLiveness.d.ts +0 -5
  44. package/lib/common/NoGlareIcon.d.ts +0 -5
  45. package/lib/common/NoSmilingIcon.d.ts +0 -5
  46. package/lib/components/InstructionScreen.d.ts +0 -9
  47. package/lib/components/RetryScreen.d.ts +0 -7
@@ -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,5 @@
1
+ /// <reference types="react" />
2
+ declare function NoGlareIconLivenessDetection({ size }: {
3
+ size?: number;
4
+ }): JSX.Element;
5
+ export default NoGlareIconLivenessDetection;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ declare function NoSmilingIconLivenessDetection({ size }: {
3
+ size?: number;
4
+ }): JSX.Element;
5
+ export default NoSmilingIconLivenessDetection;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ declare function PortraitOrientationOnlyIcon({ size, color }: {
3
+ size?: number;
4
+ color?: string;
5
+ }): JSX.Element;
6
+ export default PortraitOrientationOnlyIcon;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ declare function RegulaLogoLivenessDetection({ color }: {
3
+ color?: string;
4
+ }): JSX.Element;
5
+ export default RegulaLogoLivenessDetection;
@@ -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, StreamStatus } from '../constants';
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
- isChangeCameraAvailable: boolean;
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, videoStatus, isServiceInitialized, children, mirroring, onChangeMirroring, onChangeCamera, isChangeCameraAvailable, facingMode, onCameraSnapshot, onSkip, frameParams, videoElementParams, showChangeCameraButton, }: DocumentReaderLayoutProps): JSX.Element;
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
- /// <reference types="react" />
2
- import { FaceCompletionStatus } from '../constants';
3
- declare type FaceCaptureProps = {
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
- uuid?: string;
8
- tryCount?: number;
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, tryCount, uuid, onRequestChange, faceSnapshot, debug, showChangeCameraButton, }: FaceCaptureProps): JSX.Element;
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, FaceCompletionStatus } from '../constants';
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, completionStatus, copyright, direction, }: FaceFullScreenOverlayProps): JSX.Element;
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, StreamStatus } from '../constants';
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
- videoStatus: StreamStatus;
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, videoStatus, captureFrame, message, prepared, onChangeCamera, isChangeCameraAvailable, readiness, showChangeCameraButton, }: FaceLayoutProps): JSX.Element;
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,6 @@
1
+ /// <reference types="react" />
2
+ declare type ProcessScreenFaceLivenessProps = {
3
+ title: string;
4
+ };
5
+ declare function ProcessScreenFaceLiveness({ title }: ProcessScreenFaceLivenessProps): JSX.Element;
6
+ export default ProcessScreenFaceLiveness;
@@ -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 {};
@@ -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
  }
@@ -89,7 +89,16 @@ export declare enum StreamStatus {
89
89
  NO_CAMERA = "StreamStatus.NO_CAMERA",
90
90
  INCORRECT_CAMERA_ID = "StreamStatus.INCORRECT_CAMERA_ID"
91
91
  }
92
+ export declare enum FaceAbortSessionStatus {
93
+ CHANGE_CAMERA = "FaceAbortSessionStatus.CHANGE_CAMERA",
94
+ DEVICE_ROTATE = "FaceAbortSessionStatus.DEVICE_ROTATE",
95
+ SESSION_TIMEOUT = "FaceAbortSessionStatus.TIMEOUT",
96
+ CLOSE_BUTTON = "FaceAbortSessionStatus.CLOSE_BUTTON",
97
+ UNKNOWN = "FaceAbortSessionStatus.UNKNOWN"
98
+ }
92
99
  export declare enum FaceCompletionStatus {
100
+ RESTART = "FaceCompletionStatus.RESTART",
101
+ ABORT_PROCESSING = "FaceCompletionStatus.ABORT_PROCESSING",
93
102
  INSTRUCTION = "FaceCompletionStatus.INSTRUCTION",
94
103
  SUCCESS = "FaceCompletionStatus.SUCCESS",
95
104
  FAILED = "FaceCompletionStatus.FAILED",
@@ -214,7 +223,7 @@ export declare const DOCUMENT_READER_EVENT = "document-reader";
214
223
  export declare const CAMERA_SNAPSHOT_EVENT = "camera-snapshot";
215
224
  export declare const PERCENT_FRAME_OFFSET = 10;
216
225
  export declare const FLIP_TIMEOUT = 3000;
217
- export declare const FRAME_STROKE_WIDTH = 3;
226
+ export declare const FRAME_STROKE_WIDTH_LIVENESS_DETECTION = 3;
218
227
  export declare const RESULT_TIMEOUT_MS = 2000;
219
228
  export declare const NEW_INDEX = 1;
220
229
  export declare const MAX_FILES_SIZE = 25000000;
@@ -226,6 +235,8 @@ export declare const DEFAULT_COMPONENT_LANGUAGE = "en";
226
235
  export declare const RTL_LANGUAGES: string[];
227
236
  export declare const DEFAULT_CAMERA_ID = 0;
228
237
  export declare const OVAL_TRANSITION_TIME = 200;
238
+ export declare const CAMERAS_COUNT = 1;
239
+ export declare const FIREFOX_SWITCH_CAMERA_DELAY = 500;
229
240
  export declare const CameraResolution: {
230
241
  VGA: {
231
242
  width: number;
@@ -246,15 +257,39 @@ export declare const CameraResolution: {
246
257
  };
247
258
  export declare const BackCameraKeywords: string[];
248
259
  export declare const FaceErrorCodes: {
249
- 231: {
260
+ 199: {
250
261
  name: string;
251
262
  type: number;
252
263
  };
253
- 232: {
264
+ 200: {
254
265
  name: string;
255
266
  type: number;
256
267
  };
257
- 245: {
268
+ 201: {
269
+ name: string;
270
+ type: number;
271
+ };
272
+ 202: {
273
+ name: string;
274
+ type: number;
275
+ };
276
+ 203: {
277
+ name: string;
278
+ type: number;
279
+ };
280
+ 224: {
281
+ name: string;
282
+ type: number;
283
+ };
284
+ 227: {
285
+ name: string;
286
+ type: number;
287
+ };
288
+ 228: {
289
+ name: string;
290
+ type: number;
291
+ };
292
+ 229: {
258
293
  name: string;
259
294
  type: number;
260
295
  };
@@ -262,6 +297,14 @@ export declare const FaceErrorCodes: {
262
297
  name: string;
263
298
  type: number;
264
299
  };
300
+ 231: {
301
+ name: string;
302
+ type: number;
303
+ };
304
+ 232: {
305
+ name: string;
306
+ type: number;
307
+ };
265
308
  233: {
266
309
  name: string;
267
310
  type: number;
@@ -278,6 +321,14 @@ export declare const FaceErrorCodes: {
278
321
  name: string;
279
322
  type: number;
280
323
  };
324
+ 237: {
325
+ name: string;
326
+ type: number;
327
+ };
328
+ 238: {
329
+ name: string;
330
+ type: number;
331
+ };
281
332
  239: {
282
333
  name: string;
283
334
  type: number;
@@ -298,6 +349,26 @@ export declare const FaceErrorCodes: {
298
349
  name: string;
299
350
  type: number;
300
351
  };
352
+ 245: {
353
+ name: string;
354
+ type: number;
355
+ };
356
+ 246: {
357
+ name: string;
358
+ type: number;
359
+ };
360
+ 247: {
361
+ name: string;
362
+ type: number;
363
+ };
364
+ 248: {
365
+ name: string;
366
+ type: number;
367
+ };
368
+ 249: {
369
+ name: string;
370
+ type: number;
371
+ };
301
372
  };
302
373
  export declare const WebComponentErrorByStreamStatus: {
303
374
  "StreamStatus.UNKNOWN_ERROR": ErrorTypes;
@@ -566,6 +637,11 @@ export declare const DocumentScenarioFrameParams: {
566
637
  manualCrop?: undefined;
567
638
  })[];
568
639
  };
640
+ export declare const CIRCLE_ROTATE_SHIFT = 22.5;
641
+ export declare const MIRROR_ANIMATION_TARGETS: number[];
642
+ export declare const ANIMATION_TIMEOUT = 1000;
643
+ export declare const ANIMATION_MESSAGE: FaceMessage[];
644
+ export declare const STATIC_ANIMATION_MESSAGE: FaceMessage[];
569
645
  export declare const DocumentReaderRecognizerDefaultRequest: {
570
646
  processParam: {
571
647
  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 = {
@@ -9,7 +9,7 @@ export declare type DocumentAttributesContextType = {
9
9
  }) => void;
10
10
  onResponse: (response: DocumentCallbackArgTypes) => void;
11
11
  onFail: (reason: ErrorTypes) => void;
12
- locale?: string;
12
+ locale?: Locales;
13
13
  internalScenario?: InternalScenarios;
14
14
  multipageProcessing?: boolean;
15
15
  startScreen?: boolean;
@@ -19,6 +19,8 @@ export declare type DocumentAttributesContextType = {
19
19
  cameraId?: string;
20
20
  objectFit?: ObjectFit;
21
21
  changeCamera?: boolean;
22
+ translations?: DocumentDictionaries;
22
23
  };
23
24
  export declare const DocumentAttributesContext: React.Context<DocumentAttributesContextType>;
25
+ export declare const useDocumentContext: () => DocumentAttributesContextType;
24
26
  export {};
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
2
  import DocumentReaderService from '../services/DocumentReaderService';
3
- export declare type DocumentSDKContextType = {
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 = FaceLivenessResponseType | FaceDetectionResponseType;
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?: string;
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 { DirectionType } from '../constants';
3
- interface Locale {
4
- locale: string | undefined;
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 & Locale & DirectionType>;
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, DocumentEventActions, InternalScenarios, ObjectFit, StreamStatus } from '../constants';
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
- }, onAction: ({ manual, action }: {
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
- uuid?: string;
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];