react-native-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS
68 lines (59 loc) • 2.53 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.DocumentScannerOutputSettings = exports.DocumentAnalysisModeValues = void 0;
var _ParametricFilters = require("../../image_filters/ParametricFilters");
var _utils = require("../../utils/utils");
/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten.
/// Generated from rtu-ui-v2/schemas/document/DocumentScannerOutputSettings.yaml
/**
Determines if the quality analysis for the acknowledgement mode will run on the filtered or the unfiltered image.
- `FILTERED_DOCUMENT`:
The quality analysis will run on the filtered document image.
- `UNFILTERED_DOCUMENT`:
The quality analysis will run on the unfiltered document image.
*/
const DocumentAnalysisModeValues = exports.DocumentAnalysisModeValues = ['FILTERED_DOCUMENT', 'UNFILTERED_DOCUMENT'];
/**
Configuration of the output settings.
*/
class DocumentScannerOutputSettings extends _utils.PartiallyConstructible {
/**
The limit of the number of pages that can be scanned. Default is 0 (no limit).
Default is 0
*/
pagesScanLimit = 0;
/**
The limit of the size of the cropped document images. If one of the dimensions of the cropped image is larger than the limit, the image is downscaled so that its longer dimension matches the limit. The default is 0 (no limit).
Default is 0
*/
documentImageSizeLimit = 0;
/**
Determines if the quality analysis for the acknowledgement mode will run on the filtered or the unfiltered image.
Default is UNFILTERED_DOCUMENT
*/
documentAnalysisMode = 'UNFILTERED_DOCUMENT';
/**
Determines the image filter to apply by default.
*/
defaultFilter = null;
/** @param source {@displayType `DeepPartial<DocumentScannerOutputSettings>`} */
constructor(source = {}) {
super();
if (source.pagesScanLimit !== undefined) {
this.pagesScanLimit = source.pagesScanLimit;
}
if (source.documentImageSizeLimit !== undefined) {
this.documentImageSizeLimit = source.documentImageSizeLimit;
}
if (source.documentAnalysisMode !== undefined) {
this.documentAnalysisMode = source.documentAnalysisMode;
}
if (source.defaultFilter !== undefined) {
this.defaultFilter = source.defaultFilter != null ? _ParametricFilters.ParametricFilter.From(source.defaultFilter) : null;
}
}
}
exports.DocumentScannerOutputSettings = DocumentScannerOutputSettings;
//# sourceMappingURL=DocumentScannerOutputSettings.js.map