cordova-plugin-scanbot-barcode-scanner
Version:
Cordova Plugin for the Scanbot Barcode Scanner SDK
104 lines (78 loc) • 3.29 kB
text/typescript
/*
Scanbot Barcode Scanner SDK Cordova Plugin
Copyright (c) 2023 doo GmbH. All rights reserved.
*/
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'