@regulaforensics/vp-frontend-face-components 1.3.0 → 2.0.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 +317 -29
- package/dist/main.js +1 -1
- package/dist/main.js.LICENSE.txt +41 -0
- package/lib/common/BackCameraIcon.d.ts +6 -0
- package/lib/common/Button.d.ts +7 -0
- package/lib/common/CameraChangeIcon.d.ts +6 -0
- package/lib/common/CameraIcon.d.ts +6 -0
- package/lib/common/CheckIcon.d.ts +6 -0
- package/lib/common/CrossIcon.d.ts +6 -0
- package/lib/common/DocReaderCameraDisabled.d.ts +5 -0
- package/lib/common/DocReaderCameraPreparing.d.ts +5 -0
- package/lib/common/DocReaderFlip.d.ts +5 -0
- package/lib/common/DocReaderProcessing.d.ts +5 -0
- package/lib/common/DocReaderProcessingError.d.ts +5 -0
- package/lib/common/DocReaderProcessingFinished.d.ts +6 -0
- package/lib/common/DocReaderSearch.d.ts +5 -0
- package/lib/common/ErrorIcon.d.ts +6 -0
- package/lib/common/FromCameraIcon.d.ts +5 -0
- package/lib/common/FromGalleryIcon.d.ts +5 -0
- package/lib/common/FrontCameraIcon.d.ts +6 -0
- package/lib/common/FullscreenExitIcon.d.ts +6 -0
- package/lib/common/FullscreenIcon.d.ts +6 -0
- package/lib/common/Icon.d.ts +64 -0
- package/lib/common/Message.d.ts +8 -0
- 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/RegulaLogo.d.ts +6 -0
- package/lib/common/RegulaLogoLivenessDetection.d.ts +5 -0
- package/lib/common/SnapshotIcon.d.ts +6 -0
- package/lib/common/Spinner.d.ts +3 -0
- package/lib/common/SquareIcon.d.ts +6 -0
- package/lib/common/StopIcon.d.ts +6 -0
- package/lib/common/VerifiedIcon.d.ts +6 -0
- package/lib/components/ButtonFaceLiveness.d.ts +7 -0
- package/lib/components/CameraCapture.d.ts +9 -0
- package/lib/components/CameraSnapshot.d.ts +2 -0
- package/lib/components/CameraSnapshotFileCapture.d.ts +10 -0
- package/lib/components/DocumentCapture.d.ts +11 -0
- package/lib/components/DocumentContainer.d.ts +11 -0
- package/lib/components/DocumentReader.d.ts +2 -0
- package/lib/components/DocumentReaderFileCapture.d.ts +12 -0
- package/lib/components/DocumentReaderLayout.d.ts +22 -0
- package/lib/components/DocumentReaderStartScreen.d.ts +10 -0
- package/lib/components/ErrorBoundary.d.ts +18 -0
- package/lib/components/FaceCapture.d.ts +25 -0
- package/lib/components/FaceDetection.d.ts +2 -0
- package/lib/components/FaceFullScreenOverlay.d.ts +10 -0
- package/lib/components/FaceHintAnimaition.d.ts +16 -0
- package/lib/components/FaceLayout.d.ts +23 -0
- package/lib/components/FaceLiveness.d.ts +2 -0
- package/lib/components/InfoScreen.d.ts +11 -0
- package/lib/components/InfoScreenFaceLiveness.d.ts +12 -0
- package/lib/components/InstructionVideoScreen.d.ts +9 -0
- package/lib/components/ProcessScreen.d.ts +6 -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/components/WebCamera.d.ts +19 -0
- package/lib/constants.d.ts +686 -0
- package/lib/contexts/DocumentAttributesContext.d.ts +25 -0
- package/lib/contexts/DocumentSDKContext.d.ts +8 -0
- package/lib/contexts/FaceAttributesContext.d.ts +25 -0
- package/lib/hoc/withDocumentAttributesContext.d.ts +4 -0
- package/lib/hoc/withDocumentSDKContext.d.ts +3 -0
- package/lib/hoc/withFaceAttributesContext.d.ts +4 -0
- package/lib/hoc/withLocalize.d.ts +8 -0
- package/lib/hooks/useDocumentReaderSeries.d.ts +20 -0
- package/lib/hooks/useDocumentReaderSingle.d.ts +15 -0
- package/lib/hooks/useFaceLiveness.d.ts +41 -0
- package/lib/hooks/useImageInputParam.d.ts +7 -0
- package/lib/hooks/useOrientationChange.d.ts +10 -0
- package/lib/hooks/useStateCallback.d.ts +1 -0
- package/lib/hooks/useStream.d.ts +10 -0
- package/lib/hooks/useUserAgent.d.ts +3 -0
- package/lib/hooks/useWindowBlur.d.ts +2 -0
- package/lib/i18n/dictionaries/_dictionaries.d.ts +2275 -0
- package/lib/index-document.d.ts +4 -0
- package/lib/index-face.d.ts +1 -0
- package/lib/media-resources/resourcesBase64.d.ts +7 -0
- package/lib/models/CameraModel.d.ts +9 -0
- package/lib/models/CustomError.d.ts +7 -0
- package/lib/models/DocReaderWebclient/ext/authenticity/authenticity.d.ts +32 -0
- package/lib/models/DocReaderWebclient/ext/authenticity/fiber.d.ts +7 -0
- package/lib/models/DocReaderWebclient/ext/authenticity/ident.d.ts +8 -0
- package/lib/models/DocReaderWebclient/ext/authenticity/image-ident.d.ts +7 -0
- package/lib/models/DocReaderWebclient/ext/authenticity/index.d.ts +5 -0
- package/lib/models/DocReaderWebclient/ext/authenticity/ocr-security-text.d.ts +7 -0
- package/lib/models/DocReaderWebclient/ext/authenticity/security-feature.d.ts +8 -0
- package/lib/models/DocReaderWebclient/ext/images.d.ts +16 -0
- package/lib/models/DocReaderWebclient/ext/index.d.ts +6 -0
- package/lib/models/DocReaderWebclient/ext/process-request-image.d.ts +5 -0
- package/lib/models/DocReaderWebclient/ext/process-request.d.ts +38 -0
- package/lib/models/DocReaderWebclient/ext/process-response.d.ts +36 -0
- package/lib/models/DocReaderWebclient/ext/text-field.d.ts +40 -0
- package/lib/models/DocReaderWebclient/ext/text.d.ts +14 -0
- package/lib/models/DocReaderWebclient/models/area-array.d.ts +32 -0
- package/lib/models/DocReaderWebclient/models/area-container.d.ts +38 -0
- package/lib/models/DocReaderWebclient/models/authenticity-check-list.d.ts +31 -0
- package/lib/models/DocReaderWebclient/models/authenticity-check-result-item.d.ts +38 -0
- package/lib/models/DocReaderWebclient/models/authenticity-check-result.d.ts +43 -0
- package/lib/models/DocReaderWebclient/models/authenticity-result-all-of.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/authenticity-result-type.d.ts +33 -0
- package/lib/models/DocReaderWebclient/models/authenticity-result.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/bc-pdf417-info.d.ts +54 -0
- package/lib/models/DocReaderWebclient/models/bc-roidetect.d.ts +42 -0
- package/lib/models/DocReaderWebclient/models/check-diagnose.d.ts +98 -0
- package/lib/models/DocReaderWebclient/models/check-result.d.ts +30 -0
- package/lib/models/DocReaderWebclient/models/chosen-document-type-result-all-of.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/chosen-document-type-result.d.ts +19 -0
- package/lib/models/DocReaderWebclient/models/chosen-document-type.d.ts +74 -0
- package/lib/models/DocReaderWebclient/models/container-list.d.ts +45 -0
- package/lib/models/DocReaderWebclient/models/critical.d.ts +26 -0
- package/lib/models/DocReaderWebclient/models/cross-source-value-comparison.d.ts +38 -0
- package/lib/models/DocReaderWebclient/models/data-module.d.ts +48 -0
- package/lib/models/DocReaderWebclient/models/details-optical.d.ts +67 -0
- package/lib/models/DocReaderWebclient/models/details-rfid.d.ts +61 -0
- package/lib/models/DocReaderWebclient/models/device-info.d.ts +54 -0
- package/lib/models/DocReaderWebclient/models/doc-bar-code-info-all-of.d.ts +31 -0
- package/lib/models/DocReaderWebclient/models/doc-bar-code-info.d.ts +19 -0
- package/lib/models/DocReaderWebclient/models/doc-visual-extended-field.d.ts +70 -0
- package/lib/models/DocReaderWebclient/models/doc-visual-extended-info.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/document-format.d.ts +70 -0
- package/lib/models/DocReaderWebclient/models/document-image-result-all-of.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/document-image-result.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/document-image.d.ts +24 -0
- package/lib/models/DocReaderWebclient/models/document-position-result-all-of.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/document-position-result.d.ts +19 -0
- package/lib/models/DocReaderWebclient/models/document-position.d.ts +80 -0
- package/lib/models/DocReaderWebclient/models/document-type-recognition-result.d.ts +30 -0
- package/lib/models/DocReaderWebclient/models/document-type.d.ts +246 -0
- package/lib/models/DocReaderWebclient/models/document-types-candidates-list.d.ts +32 -0
- package/lib/models/DocReaderWebclient/models/document-types-candidates-result-all-of.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/document-types-candidates-result.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/document-types-candidates.d.ts +32 -0
- package/lib/models/DocReaderWebclient/models/encrypted-rclresult-all-of.d.ts +24 -0
- package/lib/models/DocReaderWebclient/models/encrypted-rclresult.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/fdsidlist.d.ts +80 -0
- package/lib/models/DocReaderWebclient/models/fiber-result-all-of.d.ts +74 -0
- package/lib/models/DocReaderWebclient/models/fiber-result.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/graphic-field-type.d.ts +118 -0
- package/lib/models/DocReaderWebclient/models/graphic-field.d.ts +63 -0
- package/lib/models/DocReaderWebclient/models/graphic-fields-list.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/graphics-result-all-of.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/graphics-result.d.ts +19 -0
- package/lib/models/DocReaderWebclient/models/ident-result-all-of.d.ts +65 -0
- package/lib/models/DocReaderWebclient/models/ident-result.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/image-data.d.ts +24 -0
- package/lib/models/DocReaderWebclient/models/image-qa.d.ts +54 -0
- package/lib/models/DocReaderWebclient/models/image-quality-check-list.d.ts +32 -0
- package/lib/models/DocReaderWebclient/models/image-quality-check-type.d.ts +50 -0
- package/lib/models/DocReaderWebclient/models/image-quality-check.d.ts +64 -0
- package/lib/models/DocReaderWebclient/models/image-quality-result-all-of.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/image-quality-result.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/images-available-source.d.ts +31 -0
- package/lib/models/DocReaderWebclient/models/images-field-value.d.ts +70 -0
- package/lib/models/DocReaderWebclient/models/images-field.d.ts +38 -0
- package/lib/models/DocReaderWebclient/models/images-result-all-of.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/images-result.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/images.d.ts +32 -0
- package/lib/models/DocReaderWebclient/models/index.d.ts +123 -0
- package/lib/models/DocReaderWebclient/models/lcid.d.ts +582 -0
- package/lib/models/DocReaderWebclient/models/lexical-analysis-result-all-of.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/lexical-analysis-result.d.ts +19 -0
- package/lib/models/DocReaderWebclient/models/license-result-all-of.d.ts +24 -0
- package/lib/models/DocReaderWebclient/models/license-result.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/light.d.ts +34 -0
- package/lib/models/DocReaderWebclient/models/list-verified-fields.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/log-level.d.ts +23 -0
- package/lib/models/DocReaderWebclient/models/measure-system.d.ts +26 -0
- package/lib/models/DocReaderWebclient/models/mrzformat.d.ts +24 -0
- package/lib/models/DocReaderWebclient/models/ocrsecurity-text-result-all-of.d.ts +81 -0
- package/lib/models/DocReaderWebclient/models/ocrsecurity-text-result.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/one-candidate.d.ts +74 -0
- package/lib/models/DocReaderWebclient/models/original-symbol.d.ts +37 -0
- package/lib/models/DocReaderWebclient/models/parray-field.d.ts +81 -0
- package/lib/models/DocReaderWebclient/models/per-document-config.d.ts +30 -0
- package/lib/models/DocReaderWebclient/models/photo-ident-result-all-of.d.ts +76 -0
- package/lib/models/DocReaderWebclient/models/photo-ident-result.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/point-array.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/point.d.ts +30 -0
- package/lib/models/DocReaderWebclient/models/points-container.d.ts +31 -0
- package/lib/models/DocReaderWebclient/models/process-params.d.ts +254 -0
- package/lib/models/DocReaderWebclient/models/process-request-image.d.ts +38 -0
- package/lib/models/DocReaderWebclient/models/process-request.d.ts +60 -0
- package/lib/models/DocReaderWebclient/models/process-response.d.ts +66 -0
- package/lib/models/DocReaderWebclient/models/process-system-info.d.ts +30 -0
- package/lib/models/DocReaderWebclient/models/processing-status.d.ts +30 -0
- package/lib/models/DocReaderWebclient/models/raw-image-container-list.d.ts +31 -0
- package/lib/models/DocReaderWebclient/models/rectangle-coordinates.d.ts +42 -0
- package/lib/models/DocReaderWebclient/models/result-item.d.ts +48 -0
- package/lib/models/DocReaderWebclient/models/result.d.ts +98 -0
- package/lib/models/DocReaderWebclient/models/rfid-location.d.ts +30 -0
- package/lib/models/DocReaderWebclient/models/rfid-origin.d.ts +42 -0
- package/lib/models/DocReaderWebclient/models/scenario.d.ts +36 -0
- package/lib/models/DocReaderWebclient/models/security-feature-result-all-of.d.ts +59 -0
- package/lib/models/DocReaderWebclient/models/security-feature-result.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/security-feature-type.d.ts +49 -0
- package/lib/models/DocReaderWebclient/models/source-validity.d.ts +32 -0
- package/lib/models/DocReaderWebclient/models/source.d.ts +23 -0
- package/lib/models/DocReaderWebclient/models/status-result-all-of.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/status-result.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/status.d.ts +63 -0
- package/lib/models/DocReaderWebclient/models/string-recognition-result.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/symbol-candidate.d.ts +30 -0
- package/lib/models/DocReaderWebclient/models/symbol-recognition-result.d.ts +32 -0
- package/lib/models/DocReaderWebclient/models/text-available-source.d.ts +38 -0
- package/lib/models/DocReaderWebclient/models/text-data-result-all-of.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/text-data-result.d.ts +19 -0
- package/lib/models/DocReaderWebclient/models/text-field-type.d.ts +2386 -0
- package/lib/models/DocReaderWebclient/models/text-field-value.d.ts +70 -0
- package/lib/models/DocReaderWebclient/models/text-field.d.ts +84 -0
- package/lib/models/DocReaderWebclient/models/text-post-processing.d.ts +22 -0
- package/lib/models/DocReaderWebclient/models/text-result-all-of.d.ts +25 -0
- package/lib/models/DocReaderWebclient/models/text-result.d.ts +18 -0
- package/lib/models/DocReaderWebclient/models/text.d.ts +51 -0
- package/lib/models/DocReaderWebclient/models/transaction-info.d.ts +42 -0
- package/lib/models/DocReaderWebclient/models/verification-result.d.ts +38 -0
- package/lib/models/DocReaderWebclient/models/verified-field-map.d.ts +63 -0
- package/lib/models/DocReaderWebclient/models/visibility.d.ts +23 -0
- package/lib/models/ImageModel.d.ts +7 -0
- package/lib/services/DebugService.d.ts +17 -0
- package/lib/services/DocumentReaderProcessor.d.ts +50 -0
- package/lib/services/DocumentReaderService.d.ts +57 -0
- package/lib/services/EventEmitter.d.ts +9 -0
- package/lib/services/FaceLivenessService.d.ts +62 -0
- package/lib/services/FaceService.d.ts +39 -0
- package/lib/services/StreamRecorderService.d.ts +24 -0
- package/lib/types.d.ts +361 -0
- package/lib/utils.d.ts +30 -0
- package/lib/web-components/CameraSnapshot.d.ts +14 -0
- package/lib/web-components/DocumentReader.d.ts +14 -0
- package/lib/web-components/FaceDetection.d.ts +11 -0
- package/lib/web-components/FaceLiveness.d.ts +17 -0
- package/lib/web-components/FullScreenContainer.d.ts +4 -0
- package/package.json +64 -72
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CameraSnapshotResponseType, DocumentDictionaries, DocumentReaderResponseType, Locales } from '../types';
|
|
3
|
+
import { DocumentEventActions, InternalScenarios, ErrorTypes } from '../constants';
|
|
4
|
+
declare type DocumentCallbackArgTypes = DocumentReaderResponseType | CameraSnapshotResponseType;
|
|
5
|
+
export declare type DocumentAttributesContextType = {
|
|
6
|
+
onAction: ({ manual, action }: {
|
|
7
|
+
manual: boolean;
|
|
8
|
+
action: DocumentEventActions;
|
|
9
|
+
}) => void;
|
|
10
|
+
onResponse: (response: DocumentCallbackArgTypes) => void;
|
|
11
|
+
onFail: (reason: ErrorTypes) => void;
|
|
12
|
+
locale?: Locales;
|
|
13
|
+
internalScenario?: InternalScenarios;
|
|
14
|
+
multipageProcessing?: boolean;
|
|
15
|
+
startScreen?: boolean;
|
|
16
|
+
multiple?: boolean;
|
|
17
|
+
license?: string;
|
|
18
|
+
copyright?: boolean;
|
|
19
|
+
cameraId?: string;
|
|
20
|
+
changeCamera?: boolean;
|
|
21
|
+
translations?: DocumentDictionaries;
|
|
22
|
+
};
|
|
23
|
+
export declare const DocumentAttributesContext: React.Context<DocumentAttributesContextType>;
|
|
24
|
+
export declare const useDocumentContext: () => DocumentAttributesContextType;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import DocumentReaderService from '../services/DocumentReaderService';
|
|
3
|
+
declare type DocumentSDKContextType = {
|
|
4
|
+
service: DocumentReaderService | null;
|
|
5
|
+
};
|
|
6
|
+
export declare const DocumentSDKContext: React.Context<DocumentSDKContextType>;
|
|
7
|
+
export declare const useDocumentSDKContext: () => DocumentSDKContextType;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FaceDetectionResponseType, Locales, FaceLivenessResponseType } from '../types';
|
|
3
|
+
import { FaceEventActions, ErrorTypes } from '../constants';
|
|
4
|
+
declare type FaceCallbackArgTypes = FaceDetectionResponseType | FaceLivenessResponseType;
|
|
5
|
+
export declare type FaceAttributesContextType = {
|
|
6
|
+
onAction: ({ manual, action }: {
|
|
7
|
+
manual: boolean;
|
|
8
|
+
action: FaceEventActions;
|
|
9
|
+
}) => void;
|
|
10
|
+
onResponse: (response: FaceCallbackArgTypes) => void;
|
|
11
|
+
onFail: (reason: ErrorTypes) => void;
|
|
12
|
+
locale?: Locales;
|
|
13
|
+
url?: string;
|
|
14
|
+
debug?: boolean;
|
|
15
|
+
headers?: Record<string, string>;
|
|
16
|
+
sessionId?: string;
|
|
17
|
+
copyright?: boolean;
|
|
18
|
+
cameraId?: string;
|
|
19
|
+
changeCamera?: boolean;
|
|
20
|
+
startScreen?: boolean;
|
|
21
|
+
videoRecording?: boolean;
|
|
22
|
+
};
|
|
23
|
+
export declare const FaceAttributesContext: React.Context<FaceAttributesContextType>;
|
|
24
|
+
export declare const useFaceContext: () => FaceAttributesContextType;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DocumentAttributesContextType } from '../contexts/DocumentAttributesContext';
|
|
3
|
+
declare function withDocumentAttributesContext<T extends DocumentAttributesContextType>(Component: React.ComponentType<T>): React.ComponentType<T>;
|
|
4
|
+
export default withDocumentAttributesContext;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { FaceAttributesContextType } from '../contexts/FaceAttributesContext';
|
|
3
|
+
declare function withFaceAttributesContext<T extends FaceAttributesContextType>(Component: React.ComponentType<T>): React.ComponentType<T>;
|
|
4
|
+
export default withFaceAttributesContext;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DocumentDictionaries, Locales } from '../types';
|
|
3
|
+
interface LocalizedProps {
|
|
4
|
+
locale?: Locales;
|
|
5
|
+
translations?: DocumentDictionaries;
|
|
6
|
+
}
|
|
7
|
+
declare function withLocalize<T>(Component: React.ComponentType<T>): React.ComponentType<T & LocalizedProps>;
|
|
8
|
+
export default withLocalize;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Response } from '../models/DocReaderWebclient/ext';
|
|
2
|
+
import { DocumentCaptureStatus, InternalScenarios, StreamStatus } from '../constants';
|
|
3
|
+
import { ImageInputParamType, VideoParamsType } from '../types';
|
|
4
|
+
import CustomError from '../models/CustomError';
|
|
5
|
+
declare type ResponseType = {
|
|
6
|
+
status: DocumentCaptureStatus;
|
|
7
|
+
initialized: boolean;
|
|
8
|
+
error: CustomError | null;
|
|
9
|
+
response: Response | null;
|
|
10
|
+
};
|
|
11
|
+
interface IUseDocumentReaderSeries extends ResponseType {
|
|
12
|
+
frameParams: ImageInputParamType;
|
|
13
|
+
}
|
|
14
|
+
declare type TUseDocumentReaderSeriesOptions = {
|
|
15
|
+
scenario?: InternalScenarios;
|
|
16
|
+
multipageProcessing?: boolean;
|
|
17
|
+
license?: string;
|
|
18
|
+
};
|
|
19
|
+
declare function useDocumentReaderSeries(videoElementParams: VideoParamsType, videoStatus: StreamStatus, options: TUseDocumentReaderSeriesOptions): IUseDocumentReaderSeries;
|
|
20
|
+
export default useDocumentReaderSeries;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DocumentCaptureStatus, InternalScenarios } from '../constants';
|
|
2
|
+
import { Response } from '../models/DocReaderWebclient/ext';
|
|
3
|
+
import CustomError from '../models/CustomError';
|
|
4
|
+
declare type ResponseType = {
|
|
5
|
+
status: DocumentCaptureStatus;
|
|
6
|
+
error: CustomError | null;
|
|
7
|
+
response: Response | null;
|
|
8
|
+
initialized: boolean;
|
|
9
|
+
prepared: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare function useDocumentReaderSingle(imageDataArray: Array<ImageData>, options: {
|
|
12
|
+
scenario?: InternalScenarios;
|
|
13
|
+
license?: string;
|
|
14
|
+
}): ResponseType;
|
|
15
|
+
export default useDocumentReaderSingle;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { FaceMessage, FaceProcessingStage, FaceStatus, FaceEventActions, StreamStatus } from '../constants';
|
|
2
|
+
import { CameraTypes, FaceDebugOutput, FacePositionLivenessDetection, Oval, VideoParamsType } from '../types';
|
|
3
|
+
import CustomError from '../models/CustomError';
|
|
4
|
+
declare type ResponseType = {
|
|
5
|
+
message: FaceMessage;
|
|
6
|
+
processingStage: FaceProcessingStage;
|
|
7
|
+
status: FaceStatus;
|
|
8
|
+
request: Uint8Array | null;
|
|
9
|
+
requestSize: number | null;
|
|
10
|
+
initialized: boolean;
|
|
11
|
+
debugOutput: FaceDebugOutput | null;
|
|
12
|
+
prepared: boolean;
|
|
13
|
+
images: Array<string>;
|
|
14
|
+
ovals: Array<Oval>;
|
|
15
|
+
step: number;
|
|
16
|
+
currSector: number;
|
|
17
|
+
numSectors: number;
|
|
18
|
+
targetSector: number | undefined;
|
|
19
|
+
readiness: number;
|
|
20
|
+
publicKey: string | null;
|
|
21
|
+
error: CustomError | null;
|
|
22
|
+
facePosition: FacePositionLivenessDetection;
|
|
23
|
+
};
|
|
24
|
+
declare function useFaceLiveness(options: {
|
|
25
|
+
videoStatus: StreamStatus;
|
|
26
|
+
videoElementParams: VideoParamsType;
|
|
27
|
+
cameraInfo: CameraTypes;
|
|
28
|
+
setSessionId?: (id: string) => void;
|
|
29
|
+
setTransactionId?: (id: string) => void;
|
|
30
|
+
sessionId?: string;
|
|
31
|
+
url?: string;
|
|
32
|
+
debug?: boolean;
|
|
33
|
+
faceSnapshot?: boolean;
|
|
34
|
+
backendUrl?: string;
|
|
35
|
+
abortProcess?: boolean;
|
|
36
|
+
videoRecording?: boolean;
|
|
37
|
+
}, onAction: ({ manual, action }: {
|
|
38
|
+
manual: boolean;
|
|
39
|
+
action: FaceEventActions;
|
|
40
|
+
}) => void): ResponseType;
|
|
41
|
+
export default useFaceLiveness;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ImageInputParamType, WidthAndHeight } from '../types';
|
|
2
|
+
declare type UseImageInputParamPropsType = {
|
|
3
|
+
videoSize: WidthAndHeight;
|
|
4
|
+
scenario: string;
|
|
5
|
+
};
|
|
6
|
+
declare function useImageInputParam({ videoSize, scenario }: UseImageInputParamPropsType): ImageInputParamType;
|
|
7
|
+
export default useImageInputParam;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useStateCallback<T>(initialState: T): [T, (state: T, cb?: (state: T) => void) => void];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CameraFacingMode } from '../constants';
|
|
2
|
+
import { StreamDataType } from '../types';
|
|
3
|
+
interface UseStreamReturnType extends StreamDataType {
|
|
4
|
+
onPlay: () => void;
|
|
5
|
+
}
|
|
6
|
+
declare function useStream(mode?: CameraFacingMode, resolution?: {
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
}, preferredCameraId?: string): UseStreamReturnType;
|
|
10
|
+
export default useStream;
|