cordova-plugin-scanbot-barcode-scanner
Version:
Cordova Plugin for the Scanbot Barcode Scanner SDK
39 lines (38 loc) • 3.08 kB
TypeScript
import { ScanbotBarcodeSdkConfiguration, BarcodeScannerConfiguration, BatchBarcodeScannerConfiguration } from './configurations';
import { DetectBarcodesOnImageArguments, ExtractImagesFromPdfArguments } from './cordova_configurations';
import { ErrorResult, ResultCallback, ResultWrapper } from './cordova_results';
import { BarcodeScannerResult, LicenseInfo } from './results';
export interface ScanbotBarcodeSDKPromisified {
initializeSdk(config: ScanbotBarcodeSdkConfiguration): Promise<ResultWrapper<string>>;
getLicenseInfo(): Promise<ResultWrapper<LicenseInfo>>;
startBarcodeScanner(config?: BarcodeScannerConfiguration): Promise<ResultWrapper<BarcodeScannerResult>>;
closeBarcodeScanner(): Promise<ResultWrapper<undefined>>;
startBatchBarcodeScanner(config?: BatchBarcodeScannerConfiguration): Promise<ResultWrapper<BarcodeScannerResult>>;
closeBatchBarcodeScanner(): Promise<ResultWrapper<undefined>>;
detectBarcodesOnImage(args: DetectBarcodesOnImageArguments): Promise<ResultWrapper<BarcodeScannerResult>>;
extractImagesFromPDF(args: ExtractImagesFromPdfArguments): Promise<ResultWrapper<string[]>>;
cleanup(): Promise<ResultWrapper<string>>;
}
export interface ScanbotBarcodeSDKCordova {
/**
* Returns a promisified version of the Scanbot Barcode SDK API
*/
promisify(): ScanbotBarcodeSDKPromisified;
initializeSdk(successCallback: ResultCallback<ResultWrapper<string>>, errorCallback: ResultCallback<ErrorResult>, config: ScanbotBarcodeSdkConfiguration): void;
getLicenseInfo(successCallback: ResultCallback<ResultWrapper<LicenseInfo>>, errorCallback: ResultCallback<ErrorResult>): void;
startBarcodeScanner(successCallback: ResultCallback<ResultWrapper<BarcodeScannerResult>>, errorCallback: ResultCallback<ErrorResult>, config?: BarcodeScannerConfiguration): void;
closeBarcodeScanner(successCallback: ResultCallback<ResultWrapper<undefined>>, errorCallback: ResultCallback<ErrorResult>): void;
startBatchBarcodeScanner(successCallback: ResultCallback<ResultWrapper<BarcodeScannerResult>>, errorCallback: ResultCallback<ErrorResult>, config?: BatchBarcodeScannerConfiguration): void;
closeBatchBarcodeScanner(successCallback: ResultCallback<ResultWrapper<undefined>>, errorCallback: ResultCallback<ErrorResult>): void;
detectBarcodesOnImage(successCallback: ResultCallback<ResultWrapper<BarcodeScannerResult>>, errorCallback: ResultCallback<ErrorResult>, args: DetectBarcodesOnImageArguments): void;
extractImagesFromPDF(successCallback: ResultCallback<ResultWrapper<string[]>>, errorCallback: ResultCallback<ErrorResult>, args: ExtractImagesFromPdfArguments): void;
cleanup(successCallback: ResultCallback<ResultWrapper<string>>, errorCallback: ResultCallback<ErrorResult>): void;
}
declare let ScanbotBarcodeSDK: ScanbotBarcodeSDKCordova;
export default ScanbotBarcodeSDK;
export * from './types';
export * from './cordova_types';
export * from './results';
export * from './cordova_results';
export * from './configurations';
export * from './cordova_configurations';