@privateid/small-age-sdk-alpha
Version:
54 lines (53 loc) • 5 kB
TypeScript
import { Base64, ImageType, LOGTYPE } from './types';
export declare const isLoad: (simd: boolean, debug_type: string) => Promise<string>, multiframeLivenessAndAgePredict: (data: Uint8ClampedArray, width: number, height: number, config: string, cb: any) => Promise<any>, prividDocumentMugshotFaceCompare: (imageInputA: ImageData, imageInputB: ImageData, simd: boolean, debug_type: string, cb: any, config?: string) => Promise<{
result: number;
}>, scanDocument: (imageInput: ImageData, simd: boolean, cb: any, doPredict: boolean, config: string, debug_type?: string, scanDocumentData?: any) => Promise<{
result: number;
croppedDocument: Uint8ClampedArray;
croppedMugshot: Uint8ClampedArray;
}>, isValidBarCode: (imageInput: ImageData, simd: boolean, cb: any, config: string, debug_type: string) => Promise<{
result: number;
croppedDocument: Uint8ClampedArray;
croppedBarcode: Uint8ClampedArray;
}>, frontDocumentOcr: (imageInput: ImageData, simd: boolean, cb: any, doPredict: boolean, config: string, debug_type?: string, scanDocumentData?: any) => Promise<{
result: number;
croppedDocument: Uint8ClampedArray;
croppedMugshot: Uint8ClampedArray;
}>;
export declare function iOS(): boolean;
export declare function isMobileFunc(): boolean;
export declare const getIsSIMD: () => Promise<boolean>;
export declare const getUrlParameter: (sParam: string, defaultValue: string) => string;
export declare const getDebugType: () => string;
/**
* This function does the printing in the console based on the type and will only print based on @param debugType
* Please make sure to use this so that logs on the module would only print depending on the debug level
* @param title title of the printing. sample console.log(tiltle, message)
* @param message message of the printing. sample console.log(tiltle, message) if this is not needed just throw an empy string. sample: printLogs(title, '', debugType)
* @param debugType this variable will determine the type of printing in the console
* @param type this variable will determing the type of printing in the console, "LOG", "WARNING" or "ERROR" by default it is "LOG"
*/
export declare const printLogs: (title: string, message: any, debugType: string, type?: LOGTYPE) => void;
export declare const getPortraitBase64: (content: ImageData) => Promise<Base64>;
export declare const createImages: (images: Array<ImageData>, title: ImageType, action: boolean) => Promise<void>;
export declare const wait: (timeout: number) => Promise<unknown>;
export declare const arrayToTextDownload: (data: Array<string>, filename: string) => void;
export declare function setDefaultCameraDeviceId(deviceId: string): void;
export declare function getDefaultCameraDeviceId(): string;
export declare const convertCroppedImage: (croppedBarcode: any, cropImageWidth: number, cropImageHeight: number) => Promise<string>;
export declare const getRawStatusMessage: (result: number) => "" | "Invalid Image" | "No Face Detected" | "Valid Biometric" | "Image Spoof" | "Video Spoof" | "Too close" | "Too far away" | "Too far to right" | "Too far to left" | "Too far up" | "Too far down" | "Too blurry" | "Remove Glasses" | "Mask on" | "Chin too far left" | "Chin too far right" | "Lift phone up level to face" | "Lower phone level to face" | "Too Dark. Please increase light." | "Too Bright. Please decreace light." | "Tilt camera down level to face" | "Tilt camera up level to face";
export declare const checkPackageSupport: () => Promise<{
support: boolean;
message?: string;
}>;
type ScreenOrientation = 'landscape' | 'portrait';
export declare function getScreenOrientation(): ScreenOrientation;
export declare const isMobileDevice: () => boolean;
export declare enum MessageType {
faceValidation = "Face Validation",
antispoofStatus = "Antispoof Status"
}
export declare const getBackDocumentStatusMessage: (result: number) => "" | "Success" | "Move closer to barcode" | "Please move closer to barcode" | "Move just a little closer" | "Please show barcode in the box" | "Too blurry, please hold still" | "SYSTEM ERROR. Please try again later." | "Please show ID at the center of the screen";
export declare const getStatusMessage: (result: number, type?: MessageType) => "" | "Lower phone level to face" | "Processing hold still" | "Please move back" | "Please move closer" | "Move face into circle" | "Please hold still" | "Remove glasses" | "Remove mask " | "Please look at camera" | "Raise phone level to face" | "Look down a little" | "Look up a little" | "Too dim - increase lighting" | "Too bright - lower lighting" | "Please close mouth" | "Please straighten head" | "Looking for face";
export declare const getFrontDocumentStatusMessage: (result: number) => "" | "Success" | "Move just a little closer" | "Too blurry, please hold still" | "SYSTEM ERROR. Please try again later." | "Please show ID at the center of the screen" | "Please hold still" | "Move Closer" | "Please show front of the ID";
export {};