UNPKG

youverify-passive-liveness-web

Version:

> Software Development Kit for [Youverify](https://youverify.co)'s Liveness Check

61 lines (50 loc) 1.3 kB
declare interface Branding { logo?: string; color?: string; } declare interface LivenessData { faceImage: string; passed: boolean; metadata?: Metadata; } declare interface LivenessWebSdkProps { publicKey: string; presentation?: Presentation; tasks?: Array<Task>; user?: User; branding?: Branding; allowAudio?: boolean; onClose?: () => void; onSuccess?: (data: LivenessData) => void; onFailure?: (data: LivenessData) => void; metadata?: Metadata; sandboxEnvironment?: boolean; forceDevMode?: boolean; } declare type Metadata = Record<string, any>; declare type PassiveTask = { id: TaskId; }; declare type Presentation = "modal" | "page"; declare type Task = PassiveTask; declare type TaskId = "passive"; declare interface User { firstName: string; lastName?: string; email?: string; } declare class WebSDK { private tasks; private container; private namespace; private props; private presentation; private loadedScripts; constructor(props: LivenessWebSdkProps); private validateOptions; private loadScripts; start(tasks?: Array<Task>): Promise<void>; close(): void; } export default WebSDK; export { }