import { CameraFaceMode, FaceStatuses } from './types'; declare let faceMode: CameraFaceMode; export declare const deleteUser: (uuid: string, callback: any) => void; /** * This function open camera, and returns the stream, current faceMode and the list of available media devices * @category Face * @param domElement id of the video tag * @param requireHD * @param deviceId * @param requestFaceMode * @param canvasResolution * @param isDocumentScan */ export declare const openCamera: (domElement: string, requireHD: boolean, deviceId?: string | null, requestFaceMode?: CameraFaceMode | null, canvasResolution?: { width: number; height: number; } | null, isDocumentScan?: boolean) => Promise<{ stream: MediaStream | null; devices: MediaDeviceInfo[] | null; faceMode: CameraFaceMode | null; settings: MediaTrackSettings | null; status: boolean; errorMessage?: string | null; capabilities: MediaTrackCapabilities | null; }>; /** * This function open camera, and returns the stream, current faceMode and the list of available media devices * @category Face * @param domElement id of the video tag */ export declare const closeCamera: (element: string | undefined) => Promise; /** * This function switch camera from front to back on mobile, and to another device on desktop * @category Face * @param selectedCamera Selected camera either front or back * @param device Selected camera ID * @param canvasResolution */ export declare const switchCamera: (selectedCamera: CameraFaceMode | null, device: string, canvasResolution?: { width: number; height: number; } | null) => Promise<{ capabilities: MediaTrackCapabilities | null; settings: MediaTrackSettings | null; } | null>; export declare const predictAge: (callback: any, config?: { input_image_format: string; }, element?: string, image?: ImageData) => Promise; export declare const predictImageAge: (image: ImageData, callback: any, config?: { input_image_format: string; }) => Promise; export declare const scanDocumentWithoutFace: (callback?: any, config?: { input_image_format: string; document_scan_barcode_only?: string; } | null, image?: ImageData, canvasSize?: { width: number; height: number; } | Record) => Promise<{ result: number; croppedDocument: Uint8ClampedArray; imageData: ImageData; } | { result: string; } | { result: number; croppedDocument: Uint8ClampedArray; } | { result: number; }>; interface frontScanInterface { callback: (returnData: any) => void; image?: ImageData; config?: any; } export declare const scanFrontDocument: ({ callback, image, config }: frontScanInterface) => Promise<{ result: number; croppedDocument: Uint8ClampedArray; croppedMugshot: Uint8ClampedArray; imageData: ImageData; } | { result: string; } | { result: number; croppedDocument: Uint8ClampedArray; croppedMugshot: Uint8ClampedArray; } | { result: number; }>; interface backScanInterface { callback: (returnData: any) => void; image?: ImageData; config?: any; zoomFactor?: number; } export declare const backScanDocument: ({ callback, image, config, zoomFactor }: backScanInterface) => Promise<{ result: number; croppedDocument: Uint8ClampedArray; croppedBarcode: Uint8ClampedArray; imageData: ImageData; } | { result: string; } | { result: number; croppedDocument: Uint8ClampedArray; croppedBarcode: Uint8ClampedArray; } | { result: number; }>; interface enrollProps { callback: (result: any) => void; config?: any; element?: string; } export declare function enroll({ callback, config, element }: enrollProps): Promise<{ result: number; imageData: Uint8ClampedArray; height: number; width: number; } | { result: string; }>; /** * This function performs faceLogin, the camera should already be open. the functions performs the identification and return the result. This function is more restrictive than predict1Fa. * @category Face * @param callback Callbacks triggered on the `predict` operation * @param config Configuration recommeded default: { input_image_format: "rgba" } * @param element Element id of video tag. (Optional) By default it uses the element id used when opening the camera using openCamera() */ interface FaceLoginProps { callback: (result: any) => void; config?: any; element?: string; returnPortrait?: boolean; } export declare const faceLogin: ({ callback, config, element, returnPortrait }: FaceLoginProps) => Promise; /** * This function performs predict, the camera should already be open. the functions performs the identification return the result then restart again. * @category Face * @param callback Callbacks triggered on the `predict` operation * @param config Configuration recommeded default: { input_image_format: "rgba" } * @param element Element id of video tag. (Optional) By default it uses the element id used when opening the camera using openCamera() * @param image ImageData, If there is an image passed, it will be predicting the image instead of the video feed. */ interface PredictProps { callback: (result: any) => void; image?: ImageData; config?: any; element?: string; returnPortrait?: boolean; } export declare const predict: ({ callback, image, config, element, returnPortrait }: PredictProps) => Promise; interface PredictWithStatusProps { callback: (result: any) => void; config?: any; element?: string; } export declare const predictWithStatus: ({ callback, config, element }: PredictWithStatusProps) => Promise<{ result: string; }>; export declare const setStopLoopContinuousAuthentication: (loop: boolean) => void; export declare function continuousAuthentication(callback: (input: { status: FaceStatuses; result?: number; returnValue?: any; progress?: number; age?: number; }) => void, config?: { input_image_format: string; }, element?: string): Promise<{ result: string; }>; export declare function continuousPredictWithoutRestrictions(callback: (input: any) => void, config?: { input_image_format: string; }, element?: string): Promise<{ result: string; }>; export declare const confirmUser: (callback: any, config?: { [key: string]: string | number | boolean; }, element?: string) => Promise<{ result: number; imageData: Uint8ClampedArray; height: number; width: number; } | { result: string; }>; export declare const faceCompareImage: (imageA: ImageData, imageB: ImageData, cb: any, config?: any) => Promise; export declare const pkiEncryptData: (payload: any) => Promise<{ encryptedKey: string; iv: string; gcmAad: string; gcmTag: string; encrptedMessage: string; }>; export {};