capacitor-plugin-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK for Capacitor
148 lines (147 loc) • 3.86 kB
TypeScript
import type { ParametricFilter } from '../image_filters/ParametricFilters';
import type { PdfConfiguration } from '../ocr_renderer/PdfConfigurationTypes';
import type { TiffGeneratorParameters } from '../tiff_wrapper/TiffTypes';
import type { Point } from '../utils';
import type { OCRConfiguration } from './arguments';
import type { PageRotation } from './customTypes';
import type { Page } from './types';
export interface CreateDocumentParams {
/**
* Image URIs that will be used to create the document. If empty or undefined, empty document will be created.
*/
imageFileUris?: string[];
/**
* The maximum size of the document image.
* Default is 0, no limit.
*/
documentImageSizeLimit?: number;
/**
* The list of filters applied to the page.
*/
filters?: ParametricFilter[];
/**
* Recognizes documents on created document.
* Default is true.
*/
documentDetection?: boolean;
}
export interface DocumentFromLegacyPagesParams {
/**
* Legacy pages.
*/
pages: Page[];
/**
* The maximum size of the document image.
* Default is 0, no limit.
*/
documentImageSizeLimit?: number;
}
export interface PDFFromDocumentParams {
/**
* The ID of the document for which the PDF file will be created.
*/
documentID: string;
/**
* Set PDF configuration for the file that is created.
*/
pdfConfiguration: PdfConfiguration;
/**
* Set OCR configuration for the file that is created.
*/
ocrConfiguration?: OCRConfiguration;
}
export interface TIFFFromDocumentParams {
/**
* The ID of the document for which the TIFF file will be created.
*/
documentID: string;
/**
* Configure TIFF file that is created.
*/
configuration: TiffGeneratorParameters;
}
export interface AddPageParams {
/**
* Document ID to which this page will be added.
*/
documentID: string;
/**
* Image URI that will be used to create a page.
*/
imageFileUri: string;
/**
* The list of filters applied to the page.
*/
filters?: ParametricFilter[];
/**
* Set preferred index at which new page should be added.
*/
index?: number;
/**
* Recognizes documents on created document.
* Default is true.
*/
documentDetection?: boolean;
}
export interface MovePageParams {
/**
* Document ID in which this page exists.
*/
documentID: string;
/**
* Current index of the page.
*/
fromIndex: number;
/**
* Destination index.
*/
toIndex: number;
}
export interface ModifyPageParams {
/**
* Document ID in which this page exists.
*/
documentID: string;
/**
* Page by its ID that will be modified.
*/
pageID: string;
/**
* The type of rotation to apply. If not specified, no rotation is applied.
*/
rotation?: PageRotation;
/**
* The array of recognition polygon points to apply.
*/
polygon?: Point[];
/**
* The list of filters to apply.
*/
filters?: ParametricFilter[];
}
export interface RemovePageParams {
/**
* The ID of the document from which this page is to be removed.
*/
documentID: string;
/**
* Page by its ID to be removed.
*/
pageID: string;
}
export interface MockCameraParams {
/**
* The URI of the image file to be used as a mock camera preview image.
*/
imageFileUri: string;
/**
* The URI of the image file to be used as a mock camera capture image.
* If not provided, the imageFileUri will be used.
*/
captureFileUri?: string;
/**
* If enabled, the mock camera will refresh the preview image on each frame.
* Default is false.
*/
refreshOnEachFrame?: boolean;
}