UNPKG

@seontechnologies/seon-id-verification

Version:

An advanced SDK featuring web components for natural person identification through document scanning, facial recognition, hand gesture, and face turning detection, designed for secure and efficient user verification.

63 lines (62 loc) 2.42 kB
/** * Legacy browser support for Web Components and CSS Custom Properties. * - Constructable Stylesheets polyfill for CSS Custom Properties. * - Custom Elements polyfill for Web Components. */ import 'construct-style-sheets-polyfill'; import '@webcomponents/custom-elements'; import './styles/variables.scss'; import { TFixErrorCodes, TOnVerificationFlowEvents } from './shared/types/core/sdk-events'; import { TBaseConfigOptions } from './shared/types/repository/seon-sdk-repository'; /** * @type {ISeonIdVerificationService} * @description Singleton instance of the SeonIdVerification class, typed as ISeonIdVerificationService. * @example * import { SeonIdVerificationService } from '@seontechnologies/seon-id-verification'; * * await SeonIdVerificationService.initialize(configOptions); * await SeonIdVerificationService.start(); */ export declare const SeonIdVerificationService: ISeonIdVerificationService; /** * @interface ISeonIdVerificationService * @description Interface for the SeonIdVerificationService which defines the methods available on the service. */ export interface ISeonIdVerificationService { /** * Initializes the SDK with the provided configuration options. * @async * @param {TBaseConfigOptions} configOptions - The configuration options for the SDK. * @example * await SeonIdVerificationService.initialize(configOptions); */ initialize: (configOptions: TBaseConfigOptions) => Promise<void>; /** * Starts the SDK verification flow. * @example * await SeonIdVerificationService.start(); */ start: () => void; /** * Registers an event listener for the specified event. * @param {TOnVerificationFlowEvents} event - The event to listen for. * @param {function} callback - The callback function to call when the event is triggered. * * @example * SeonIdVerificationService.on('error', (err) => { * console.error('Error code:', err); * }); * * SeonIdVerificationService.on('start', (data) => { * console.log('Verification started', data); * }); */ on: (event: TOnVerificationFlowEvents, callback: (data?: TFixErrorCodes | null, event?: TOnVerificationFlowEvents) => void) => void; [key: string]: any; } declare global { interface Window { closeErrorScreen: () => void; removeTransferCoordinatorWC: () => void; } }