import type { Quadrilateral, DetectedQuadResultItem } from "dynamsoft-capture-vision-bundle"; export interface DocumentNormalizerPlugin { initialize(): Promise; initLicense(options: { license: string; }): Promise; initRuntimeSettingsFromString(options: { template: string; }): Promise; /** * source: Android and iOS only support base64 string. * path: for Android and iOS. * template: pass a template name to specify the template */ detect(options: { path?: string; source?: string | HTMLImageElement | HTMLCanvasElement; template?: string; }): Promise<{ results: DetectedQuadResultItem[]; }>; /** * Android and iOS only method which directly reads camera frames from capacitor-plugin-camera. Pass a template name to specify the template. */ detectBitmap(options: { className?: string; methodName?: string; template?: string; }): Promise<{ results: DetectedQuadResultItem[]; }>; /** * source: Android and iOS only support base64 string. * path: for Android and iOS. * template: pass a template name to specify the template */ normalize(options: { path?: string; source?: string | HTMLImageElement | HTMLCanvasElement; quad: Quadrilateral; template?: string; saveToFile?: boolean; includeBase64?: boolean; }): Promise<{ result: NormalizedImageResult; }>; /** * source: Android and iOS only support base64 string. * path: for Android and iOS. * template: pass a template name to specify the template */ detectAndNormalize(options: { path?: string; source?: string | HTMLImageElement | HTMLCanvasElement; template?: string; saveToFile?: boolean; includeBase64?: boolean; }): Promise<{ result: NormalizedImageResult; }>; /** * Web Only */ setEngineResourcePaths(options: { paths: any; }): Promise; } export interface NormalizedImageResult { base64?: string; path?: string; }