UNPKG

react-native-scanbot-sdk

Version:

Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS

104 lines (85 loc) 2.63 kB
import { DocumentDetectionStatus } from '../document_scanner'; import { LicenseStatus, OCRPage, Page, PolygonPoint } from './types'; export interface ApplyImageFiltersResult { /** The URI of the filtered image */ imageFileUri: string; } export interface CreatePDFResult { /** The URI of the generated PDF file */ pdfFileUri: string; } export interface CreateTIFFResult { /** The URI of the output TIFF file */ tiffFileUri: string; } export interface CroppingResult { /** The cropped page */ page: Page; } export interface DetectDocumentResult { /** The URI of the document image file, if something is detected */ documentImageFileUri: string; /** The array of detected polygon points, if something is detected */ polygon: PolygonPoint[]; /** The status of the detection */ detectionResult: DocumentDetectionStatus; } export interface DocumentExistsResult { /** true if the scanned document exists, false otherwise. */ exists: boolean; } export interface DocumentScannerResult { /** The array of scanned pages */ pages: Page[]; } export interface ExtractImagesFromPdfResult { /** The URIs of the extracted images */ imageFilesUrls: string[]; } export interface ExtractPagesFromPdfResult { /** The extracted pages */ pages: Page[]; } export interface FinderDocumentScannerResult extends DocumentScannerResult {} export interface ImageDataResult { /** The Base 64 encoded representation of the image data */ base64ImageData: string; } export interface LicenseInfoResult { /** True if the license is valid, false otherwise */ isLicenseValid: boolean; /** The license status */ licenseStatus: LicenseStatus; /** Detailed license status message for development and debug purposes */ licenseStatusMessage?: string; /** The license expiration date in milliseconds */ licenseExpirationDate?: number; } export interface OCRConfigsResult { /** The OCR languages data path */ languageDataPath: string; /** The installed OCR languages */ installedLanguages: string[]; } export interface PerformOCRResult { /** The OCR result as plain text */ plainText: string; /** The array of recognized OCR pages */ pages: OCRPage[]; } export interface RefreshImageUrisResult { /** The refreshed pages */ pages: Page[]; } export interface RotateImageResult { /** The URI of the rotated image */ imageFileUri: string; } export interface StoredDocumentIDsResult { /** The document identifiers of all stored documents. */ documentIDs: string[]; } export interface WriteTIFFResult { /** The URI of the output TIFF file */ tiffFileUri: string; }