react-native-scanbot-barcode-scanner-sdk
Version:
Scanbot Barcode Scanner SDK React Native Plugin for Android and iOS
54 lines (51 loc) • 2.2 kB
text/typescript
/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten.
/// Generated from xplatforms/schemas/barcode_scanner/Sdk.yaml
import { ScanbotBarcode } from './Barcode';
import { ScanbotImageProcessor } from './ImageProcessor';
import { ScanbotBarcodeSdkImpl } from './impl';
import { SdkConfiguration } from './types/base/SdkConfiguration';
import { LicenseInfo } from './types/core/licensing/LicensingTypes';
/**
* Entry point for all features that are part of Scanbot Barcode Scanner SDK.
*/
export const ScanbotBarcodeSdk = {
/**
* Used for barcode scanning features.
*/
Barcode: ScanbotBarcode,
/**
* Used for image processing features.
*/
ImageProcessor: ScanbotImageProcessor,
/**
* Mock camera preview by using static images as a frame source. This is useful for testing purposes.
* @param {string} params.imageFileUri - The file uri of the image to be used as a mock camera frame.
* @param {boolean} params.refreshOnEachFrame - If true, the mock camera will refresh the frame on each request, simulating a live camera feed. Default is false
* @returns {Promise<void>}
*/
async mockCamera(params: { imageFileUri: string; refreshOnEachFrame?: boolean }): Promise<void> {
return ScanbotBarcodeSdkImpl.mockCamera(params);
},
/**
* Initializes the Scanbot SDK with the preferred configuration.
* @param {SdkConfiguration} configuration - The SDK configuration to be used for initialization.
* @returns {Promise<LicenseInfo>} - Returns complete information about the license used for initialization.
*/
async initialize(configuration: SdkConfiguration): Promise<LicenseInfo> {
return ScanbotBarcodeSdkImpl.initialize(configuration);
},
/**
* Provides complete information about the current license.
* @returns {Promise<LicenseInfo>} - Returns complete information about the current license.
*/
async getLicenseInfo(): Promise<LicenseInfo> {
return ScanbotBarcodeSdkImpl.getLicenseInfo();
},
/**
* Cleans up the storage used by the Scanbot SDK.
* @returns {Promise<void>}
*/
async cleanupStorage(): Promise<void> {
return ScanbotBarcodeSdkImpl.cleanupStorage();
},
};