UNPKG

capacitor-plugin-scanbot-sdk

Version:

Scanbot Document and Barcode Scanner SDK for Capacitor

164 lines 7.81 kB
/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten. /// Generated from xplatforms/schemas/document_scanner/Document.yaml import { ScanbotDocumentImpl } from './impl'; /** * Entry point for all document features. */ export const ScanbotDocument = { /** * Creates a document from the provided images with the specified options. * @param {ImageInput[]} params.images - The images to be used for document creation. * @param {CreateDocumentOptions} params.options - The options to be used for document creation. * @returns {Promise<DocumentData>} - Created document. */ async createDocumentFromImages(params) { return ScanbotDocumentImpl.createDocumentFromImages(params); }, /** * Creates a document from the provided PDF file with the specified options. * @param {string} params.pdfFileUri - The PDF file uri to be used for document creation. * @param {CreateDocumentOptions} params.options - The options to be used for document creation. * @returns {Promise<DocumentData>} - Created document. */ async createDocumentFromPdf(params) { return ScanbotDocumentImpl.createDocumentFromPdf(params); }, /** * Creates a document from the provided legacy pages with the specified image size limit. * @param {Page[]} params.pages - The legacy pages to be used for document creation. Legacy filters that are set on the pages will be ignored. Please switch to ParametricFilters instead. * @param {number} params.documentImageSizeLimit - The maximum size of the longest edge of the document image. If the image exceeds this limit, it will be downscaled proportionally. Default is 0 * @returns {Promise<DocumentData>} - Created document. * @deprecated */ async createDocumentFromLegacyPages(params) { return ScanbotDocumentImpl.createDocumentFromLegacyPages(params); }, /** * Checks if a document with the specified Uuid exists. * @param {string} documentUuid - The Uuid of the document. * @returns {Promise<boolean>} - True if the document exists, false otherwise. */ async documentExists(documentUuid) { return ScanbotDocumentImpl.documentExists(documentUuid); }, /** * Loads the document with the specified Uuid. * @param {string} documentUuid - The Uuid of the document. * @returns {Promise<DocumentData>} - Loaded document. */ async loadDocument(documentUuid) { return ScanbotDocumentImpl.loadDocument(documentUuid); }, /** * Retrieves the Uuids of all stored documents. * @returns {Promise<string[]>} - List of stored document Uuids. */ async getStoredDocumentUuids() { return ScanbotDocumentImpl.getStoredDocumentUuids(); }, /** * Clones the document with the specified Uuid. * @param {string} documentUuid - The Uuid of the document to be cloned. * @returns {Promise<DocumentData>} - Cloned document. */ async cloneDocument(documentUuid) { return ScanbotDocumentImpl.cloneDocument(documentUuid); }, /** * Deletes the document with the specified Uuid. * @param {string} documentUuid - The Uuid of the document to be deleted. * @returns {Promise<void>} */ async deleteDocument(documentUuid) { return ScanbotDocumentImpl.deleteDocument(documentUuid); }, /** * Deletes all stored documents. * @returns {Promise<void>} */ async deleteAllDocuments() { return ScanbotDocumentImpl.deleteAllDocuments(); }, /** * Adds new pages from the provided images to the document with the specified Uuid. * @param {string} params.documentUuid - The Uuid of the document to which pages will be added. * @param {ImageInput[]} params.images - The images to be added as new pages. * @param {AddPageOptions} params.options - The options to be used when adding pages. * @returns {Promise<DocumentData>} - Updated document with added pages. */ async addPages(params) { return ScanbotDocumentImpl.addPages(params); }, /** * Moves a page within the document to a new position. * @param {string} params.documentUuid - The Uuid of the document containing the page to be moved. * @param {number} params.fromIndex - The index of the page to be moved. * @param {number} params.toIndex - The new index position for the page. * @returns {Promise<DocumentData>} - Updated document with the page moved to the new position. */ async movePage(params) { return ScanbotDocumentImpl.movePage(params); }, /** * Modifies a page within the document using the specified options. * @param {string} params.documentUuid - The Uuid of the document containing the page to be modified. * @param {string} params.pageUuid - The Uuid of the page to be modified. * @param {ModifyPageOptions} params.options - The options specifying the modifications to be made to the page. * @returns {Promise<DocumentData>} - Updated document with the modified page. */ async modifyPage(params) { return ScanbotDocumentImpl.modifyPage(params); }, /** * Removes pages with the specified Uuids from the document. * @param {string} params.documentUuid - The Uuid of the document from which pages will be removed. * @param {string[]} params.pageUuids - The Uuids of the pages to be removed. * @returns {Promise<DocumentData>} - Updated document with the specified pages removed. */ async removePages(params) { return ScanbotDocumentImpl.removePages(params); }, /** * Removes all pages from the document with the specified Uuid. * @param {string} documentUuid - The Uuid of the document from which all pages will be removed. * @returns {Promise<DocumentData>} - Updated document with all pages removed. */ async removeAllPages(documentUuid) { return ScanbotDocumentImpl.removeAllPages(documentUuid); }, /** * Opens the Ready-To-Use UI Document Scanner screen with the desired configuration. * @param {DocumentScanningFlow} configuration - The configuration to be used for the document scanner. * @returns {Promise<ResultWrapper<DocumentData>>} - Scanned document. */ async startScanner(configuration) { return ScanbotDocumentImpl.startScanner(configuration); }, /** * Opens the Ready-To-Use UI Cropping screen with the desired configuration. * @param {CroppingConfiguration} configuration - The configuration to be used for the cropping screen. * @returns {Promise<ResultWrapper<DocumentData>>} - Updated document after cropping. */ async startCroppingScreen(configuration) { return ScanbotDocumentImpl.startCroppingScreen(configuration); }, /** * Scans a document from the provided image. * @param {ImageInput} params.image - The image to be scanned. * @param {DocumentScannerConfiguration} params.configuration - The configuration to be used for scanning. * @returns {Promise<DocumentScanningResult>} - Result of the scanning process. */ async scanFromImage(params) { return ScanbotDocumentImpl.scanFromImage(params); }, /** * Analyzes the quality of the document on the provided image. * @param {ImageInput} params.image - The image to be analyzed. * @param {DocumentQualityAnalyzerConfiguration} params.configuration - The configuration to be used for analysis. * @returns {Promise<DocumentQualityAnalyzerResult>} - Result of the quality analysis. */ async analyzeQualityOnImage(params) { return ScanbotDocumentImpl.analyzeQualityOnImage(params); }, }; //# sourceMappingURL=Document.js.map