capacitor-plugin-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK for Capacitor
25 lines (24 loc) • 716 B
TypeScript
import type { ImageRef } from '../core';
export type ResultWrapper<T> = {
status: 'CANCELED';
} | {
status: 'OK';
data: T;
};
export type ImageInput = string | ImageRef;
export type OcrConfiguration = OcrScanbotEngineConfiguration | OcrTesseractConfiguration;
/**
* @hidden
*/
export type SerializedImageInput = {
imageFileUri: string;
} | Awaited<ReturnType<ImageRef['serialize']>>;
/** Slow but powerful OCR engine. Supports non-Latin languages. */
export type OcrTesseractConfiguration = {
engineMode: 'TESSERACT';
languages: string[];
};
/** Fast and accurate OCR engine. Supports only Latin languages. */
export type OcrScanbotEngineConfiguration = {
engineMode: 'SCANBOT_OCR';
};