/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten. /// Generated from core/schemas/BarcodeConfigurationTypes.yaml import { BarcodeFormat, Gs1Handling, UpcEanExtensionBehavior } from '../barcode/BarcodeTypes'; import { DeepPartial, PartiallyConstructible } from '../utils/utils'; /** Base class for all barcode configurations. */ export type BarcodeFormatConfigurationBase = | BarcodeFormatCodabarConfiguration | BarcodeFormatCode11Configuration | BarcodeFormatCode39Configuration | BarcodeFormatCode93Configuration | BarcodeFormatCode128Configuration | BarcodeFormatCode2Of5Configuration | BarcodeFormatDataBarConfiguration | BarcodeFormatDataBarExpandedConfiguration | BarcodeFormatDataBarLimitedConfiguration | BarcodeFormatItfConfiguration | BarcodeFormatMsiPlesseyConfiguration | BarcodeFormatUpcEanConfiguration | BarcodeFormatPharmaCodeConfiguration | BarcodeFormatAztecConfiguration | BarcodeFormatQrCodeConfiguration | BarcodeFormatPdf417Configuration | BarcodeFormatMicroPdf417Configuration | BarcodeFormatDataMatrixConfiguration | BarcodeFormatMaxiCodeConfiguration | BarcodeFormatAustraliaPostConfiguration | BarcodeFormatJapanPostConfiguration | BarcodeFormatRoyalMailConfiguration | BarcodeFormatRoyalTntPostConfiguration | BarcodeFormatUspsIntelligentMailConfiguration | BarcodeFormatPharmaCodeTwoTrackConfiguration | BarcodeFormatGs1CompositeConfiguration | BarcodeFormatCommonOneDConfiguration | BarcodeFormatCommonTwoDConfiguration | BarcodeFormatCommonFourStateConfiguration | BarcodeFormatCommonConfiguration; /** @internal */ export namespace BarcodeFormatConfigurationBase { /** @internal */ export function From(source: { [key: string]: any }): BarcodeFormatConfigurationBase { const _type = source._type; switch (_type) { case 'BarcodeFormatCodabarConfiguration': return new BarcodeFormatCodabarConfiguration(source); case 'BarcodeFormatCode11Configuration': return new BarcodeFormatCode11Configuration(source); case 'BarcodeFormatCode39Configuration': return new BarcodeFormatCode39Configuration(source); case 'BarcodeFormatCode93Configuration': return new BarcodeFormatCode93Configuration(source); case 'BarcodeFormatCode128Configuration': return new BarcodeFormatCode128Configuration(source); case 'BarcodeFormatCode2Of5Configuration': return new BarcodeFormatCode2Of5Configuration(source); case 'BarcodeFormatDataBarConfiguration': return new BarcodeFormatDataBarConfiguration(source); case 'BarcodeFormatDataBarExpandedConfiguration': return new BarcodeFormatDataBarExpandedConfiguration(source); case 'BarcodeFormatDataBarLimitedConfiguration': return new BarcodeFormatDataBarLimitedConfiguration(source); case 'BarcodeFormatITFConfiguration': return new BarcodeFormatItfConfiguration(source); case 'BarcodeFormatMSIPlesseyConfiguration': return new BarcodeFormatMsiPlesseyConfiguration(source); case 'BarcodeFormatUpcEanConfiguration': return new BarcodeFormatUpcEanConfiguration(source); case 'BarcodeFormatPharmaCodeConfiguration': return new BarcodeFormatPharmaCodeConfiguration(source); case 'BarcodeFormatAztecConfiguration': return new BarcodeFormatAztecConfiguration(source); case 'BarcodeFormatQRCodeConfiguration': return new BarcodeFormatQrCodeConfiguration(source); case 'BarcodeFormatPDF417Configuration': return new BarcodeFormatPdf417Configuration(source); case 'BarcodeFormatMicroPDF417Configuration': return new BarcodeFormatMicroPdf417Configuration(source); case 'BarcodeFormatDataMatrixConfiguration': return new BarcodeFormatDataMatrixConfiguration(source); case 'BarcodeFormatMaxiCodeConfiguration': return new BarcodeFormatMaxiCodeConfiguration(source); case 'BarcodeFormatAustraliaPostConfiguration': return new BarcodeFormatAustraliaPostConfiguration(source); case 'BarcodeFormatJapanPostConfiguration': return new BarcodeFormatJapanPostConfiguration(source); case 'BarcodeFormatRoyalMailConfiguration': return new BarcodeFormatRoyalMailConfiguration(source); case 'BarcodeFormatRoyalTNTPostConfiguration': return new BarcodeFormatRoyalTntPostConfiguration(source); case 'BarcodeFormatUSPSIntelligentMailConfiguration': return new BarcodeFormatUspsIntelligentMailConfiguration(source); case 'BarcodeFormatPharmaCodeTwoTrackConfiguration': return new BarcodeFormatPharmaCodeTwoTrackConfiguration(source); case 'BarcodeFormatGS1CompositeConfiguration': return new BarcodeFormatGs1CompositeConfiguration(source); case 'BarcodeFormatCommonOneDConfiguration': return new BarcodeFormatCommonOneDConfiguration(source); case 'BarcodeFormatCommonTwoDConfiguration': return new BarcodeFormatCommonTwoDConfiguration(source); case 'BarcodeFormatCommonFourStateConfiguration': return new BarcodeFormatCommonFourStateConfiguration(source); case 'BarcodeFormatCommonConfiguration': return new BarcodeFormatCommonConfiguration(source); default: throw `Unknown child class name: ${_type}`; } } } /** Base class for all linear (1D) barcode configurations. */ export type BarcodeFormatOneDConfigurationBase = | BarcodeFormatCodabarConfiguration | BarcodeFormatCode11Configuration | BarcodeFormatCode39Configuration | BarcodeFormatCode93Configuration | BarcodeFormatCode128Configuration | BarcodeFormatCode2Of5Configuration | BarcodeFormatDataBarConfiguration | BarcodeFormatDataBarExpandedConfiguration | BarcodeFormatDataBarLimitedConfiguration | BarcodeFormatItfConfiguration | BarcodeFormatMsiPlesseyConfiguration | BarcodeFormatUpcEanConfiguration | BarcodeFormatPharmaCodeConfiguration; /** @internal */ export namespace BarcodeFormatOneDConfigurationBase { /** @internal */ export function From(source: { [key: string]: any }): BarcodeFormatOneDConfigurationBase { const _type = source._type; switch (_type) { case 'BarcodeFormatCodabarConfiguration': return new BarcodeFormatCodabarConfiguration(source); case 'BarcodeFormatCode11Configuration': return new BarcodeFormatCode11Configuration(source); case 'BarcodeFormatCode39Configuration': return new BarcodeFormatCode39Configuration(source); case 'BarcodeFormatCode93Configuration': return new BarcodeFormatCode93Configuration(source); case 'BarcodeFormatCode128Configuration': return new BarcodeFormatCode128Configuration(source); case 'BarcodeFormatCode2Of5Configuration': return new BarcodeFormatCode2Of5Configuration(source); case 'BarcodeFormatDataBarConfiguration': return new BarcodeFormatDataBarConfiguration(source); case 'BarcodeFormatDataBarExpandedConfiguration': return new BarcodeFormatDataBarExpandedConfiguration(source); case 'BarcodeFormatDataBarLimitedConfiguration': return new BarcodeFormatDataBarLimitedConfiguration(source); case 'BarcodeFormatITFConfiguration': return new BarcodeFormatItfConfiguration(source); case 'BarcodeFormatMSIPlesseyConfiguration': return new BarcodeFormatMsiPlesseyConfiguration(source); case 'BarcodeFormatUpcEanConfiguration': return new BarcodeFormatUpcEanConfiguration(source); case 'BarcodeFormatPharmaCodeConfiguration': return new BarcodeFormatPharmaCodeConfiguration(source); default: throw `Unknown child class name: ${_type}`; } } } /** Codabar barcode configuration. Add to scanner configuration to scan Codabar barcodes. */ export class BarcodeFormatCodabarConfiguration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatCodabarConfiguration' = 'BarcodeFormatCodabarConfiguration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** Minimum quiet zone size on the left and right sides of a 1D barcode, measured in number of modules. The quiet zone is only for 1D barcodes with weak start/stop patterns, i.e. Iata2Of5, Industrial2Of5, Code25, Itf, Codabar, MsiPlessey and Code11. Default is 6 */ public minimum1DQuietZoneSize: number = 6; /** Minimum number of frames on which a linear (1D) barcode has to be detected to be considered valid (live scanning only). Linear barcodes are more prone to false positives. Increasing the number of frames on which a barcode has to decode to the same content reduces the probability of a false positive. Default is 1 */ public minimumNumberOfRequiredFramesWithEqualRecognitionResult: number = 1; /** Minimum text length. Applied only to linear barcode formats that allow variable length. Default is 1 */ public minimumTextLength: number = 1; /** Maximum text length. 0 implies no maximum. Applied only to linear barcode formats that allow variable length. Default is 0 */ public maximumTextLength: number = 0; /** If true, return the start and end characters. Default is false */ public returnStartEnd: boolean = false; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } if (source.minimum1DQuietZoneSize !== undefined) { this.minimum1DQuietZoneSize = source.minimum1DQuietZoneSize; } if (source.minimumNumberOfRequiredFramesWithEqualRecognitionResult !== undefined) { this.minimumNumberOfRequiredFramesWithEqualRecognitionResult = source.minimumNumberOfRequiredFramesWithEqualRecognitionResult; } if (source.minimumTextLength !== undefined) { this.minimumTextLength = source.minimumTextLength; } if (source.maximumTextLength !== undefined) { this.maximumTextLength = source.maximumTextLength; } if (source.returnStartEnd !== undefined) { this.returnStartEnd = source.returnStartEnd; } } } /** Code 11 barcode configuration. Add to scanner configuration to scan Code 11 barcodes. */ export class BarcodeFormatCode11Configuration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatCode11Configuration' = 'BarcodeFormatCode11Configuration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** Minimum quiet zone size on the left and right sides of a 1D barcode, measured in number of modules. The quiet zone is only for 1D barcodes with weak start/stop patterns, i.e. Iata2Of5, Industrial2Of5, Code25, Itf, Codabar, MsiPlessey and Code11. Default is 6 */ public minimum1DQuietZoneSize: number = 6; /** Minimum number of frames on which a linear (1D) barcode has to be detected to be considered valid (live scanning only). Linear barcodes are more prone to false positives. Increasing the number of frames on which a barcode has to decode to the same content reduces the probability of a false positive. Default is 1 */ public minimumNumberOfRequiredFramesWithEqualRecognitionResult: number = 1; /** If true, the check digits are stripped from the result. Default is false */ public stripCheckDigits: boolean = false; /** Minimum text length. Applied only to linear barcode formats that allow variable length. Default is 1 */ public minimumTextLength: number = 1; /** Maximum text length. 0 implies no maximum. Applied only to linear barcode formats that allow variable length. Default is 0 */ public maximumTextLength: number = 0; /** If true, return CODE_11 barcodes only if they have a valid checksum. Default is true */ public checksum: boolean = true; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } if (source.minimum1DQuietZoneSize !== undefined) { this.minimum1DQuietZoneSize = source.minimum1DQuietZoneSize; } if (source.minimumNumberOfRequiredFramesWithEqualRecognitionResult !== undefined) { this.minimumNumberOfRequiredFramesWithEqualRecognitionResult = source.minimumNumberOfRequiredFramesWithEqualRecognitionResult; } if (source.stripCheckDigits !== undefined) { this.stripCheckDigits = source.stripCheckDigits; } if (source.minimumTextLength !== undefined) { this.minimumTextLength = source.minimumTextLength; } if (source.maximumTextLength !== undefined) { this.maximumTextLength = source.maximumTextLength; } if (source.checksum !== undefined) { this.checksum = source.checksum; } } } /** Code 39 barcode and derivatives configuration. Add to scanner configuration to scan Code 39, Code 32 (Italian Pharmacode), PZN7 and PZN8 (Pharmazentralnummer) barcodes. */ export class BarcodeFormatCode39Configuration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatCode39Configuration' = 'BarcodeFormatCode39Configuration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** Minimum quiet zone size on the left and right sides of a 1D barcode, measured in number of modules. The quiet zone is only for 1D barcodes with weak start/stop patterns, i.e. Iata2Of5, Industrial2Of5, Code25, Itf, Codabar, MsiPlessey and Code11. Default is 6 */ public minimum1DQuietZoneSize: number = 6; /** Minimum number of frames on which a linear (1D) barcode has to be detected to be considered valid (live scanning only). Linear barcodes are more prone to false positives. Increasing the number of frames on which a barcode has to decode to the same content reduces the probability of a false positive. Default is 1 */ public minimumNumberOfRequiredFramesWithEqualRecognitionResult: number = 1; /** If true, the check digits are stripped from the result. Default is false */ public stripCheckDigits: boolean = false; /** Minimum text length. Applied only to linear barcode formats that allow variable length. Default is 1 */ public minimumTextLength: number = 1; /** Maximum text length. 0 implies no maximum. Applied only to linear barcode formats that allow variable length. Default is 0 */ public maximumTextLength: number = 0; /** If true, scan and return valid CODE_32 (Italian Pharmacode) barcodes. If false, CODE_32 barcodes are not decoded and are returned as CODE_39 instead. Default is false */ public code32: boolean = false; /** If true, scan CODE_39 barcodes. Default is true */ public code39: boolean = true; /** If true, scan PZN7 (legacy Pharmazentralnummer) barcodes. If false, PZN7 barcodes are not decoded and are returned as CODE_39 instead. Default is true */ public pzn7: boolean = true; /** If true, scan PZN8 (Pharmazentralnummer) barcodes. If false, PZN8 barcodes are not decoded and are returned as CODE_39 instead. Default is true */ public pzn8: boolean = true; /** If true, try to scan CODE_39 in extended mode. Default is false */ public tryCode39ExtendedMode: boolean = false; /** If true, return CODE_39 barcodes only if they have a valid check digit. Default is false */ public useCode39CheckDigit: boolean = false; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } if (source.minimum1DQuietZoneSize !== undefined) { this.minimum1DQuietZoneSize = source.minimum1DQuietZoneSize; } if (source.minimumNumberOfRequiredFramesWithEqualRecognitionResult !== undefined) { this.minimumNumberOfRequiredFramesWithEqualRecognitionResult = source.minimumNumberOfRequiredFramesWithEqualRecognitionResult; } if (source.stripCheckDigits !== undefined) { this.stripCheckDigits = source.stripCheckDigits; } if (source.minimumTextLength !== undefined) { this.minimumTextLength = source.minimumTextLength; } if (source.maximumTextLength !== undefined) { this.maximumTextLength = source.maximumTextLength; } if (source.code32 !== undefined) { this.code32 = source.code32; } if (source.code39 !== undefined) { this.code39 = source.code39; } if (source.pzn7 !== undefined) { this.pzn7 = source.pzn7; } if (source.pzn8 !== undefined) { this.pzn8 = source.pzn8; } if (source.tryCode39ExtendedMode !== undefined) { this.tryCode39ExtendedMode = source.tryCode39ExtendedMode; } if (source.useCode39CheckDigit !== undefined) { this.useCode39CheckDigit = source.useCode39CheckDigit; } } } /** Code 93 barcode configuration. Add to scanner configuration to scan Code 93 barcodes. */ export class BarcodeFormatCode93Configuration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatCode93Configuration' = 'BarcodeFormatCode93Configuration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** Minimum quiet zone size on the left and right sides of a 1D barcode, measured in number of modules. The quiet zone is only for 1D barcodes with weak start/stop patterns, i.e. Iata2Of5, Industrial2Of5, Code25, Itf, Codabar, MsiPlessey and Code11. Default is 6 */ public minimum1DQuietZoneSize: number = 6; /** Minimum number of frames on which a linear (1D) barcode has to be detected to be considered valid (live scanning only). Linear barcodes are more prone to false positives. Increasing the number of frames on which a barcode has to decode to the same content reduces the probability of a false positive. Default is 1 */ public minimumNumberOfRequiredFramesWithEqualRecognitionResult: number = 1; /** If true, the check digits are stripped from the result. Default is false */ public stripCheckDigits: boolean = false; /** Minimum text length. Applied only to linear barcode formats that allow variable length. Default is 1 */ public minimumTextLength: number = 1; /** Maximum text length. 0 implies no maximum. Applied only to linear barcode formats that allow variable length. Default is 0 */ public maximumTextLength: number = 0; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } if (source.minimum1DQuietZoneSize !== undefined) { this.minimum1DQuietZoneSize = source.minimum1DQuietZoneSize; } if (source.minimumNumberOfRequiredFramesWithEqualRecognitionResult !== undefined) { this.minimumNumberOfRequiredFramesWithEqualRecognitionResult = source.minimumNumberOfRequiredFramesWithEqualRecognitionResult; } if (source.stripCheckDigits !== undefined) { this.stripCheckDigits = source.stripCheckDigits; } if (source.minimumTextLength !== undefined) { this.minimumTextLength = source.minimumTextLength; } if (source.maximumTextLength !== undefined) { this.maximumTextLength = source.maximumTextLength; } } } /** Code 128 barcode configuration. Add to scanner configuration to scan Code 128 barcodes. */ export class BarcodeFormatCode128Configuration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatCode128Configuration' = 'BarcodeFormatCode128Configuration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** Minimum quiet zone size on the left and right sides of a 1D barcode, measured in number of modules. The quiet zone is only for 1D barcodes with weak start/stop patterns, i.e. Iata2Of5, Industrial2Of5, Code25, Itf, Codabar, MsiPlessey and Code11. Default is 6 */ public minimum1DQuietZoneSize: number = 6; /** Minimum number of frames on which a linear (1D) barcode has to be detected to be considered valid (live scanning only). Linear barcodes are more prone to false positives. Increasing the number of frames on which a barcode has to decode to the same content reduces the probability of a false positive. Default is 1 */ public minimumNumberOfRequiredFramesWithEqualRecognitionResult: number = 1; /** GS1 message handling options. Default is PARSE */ public gs1Handling: Gs1Handling = 'PARSE'; /** Minimum text length. Applied only to linear barcode formats that allow variable length. Default is 1 */ public minimumTextLength: number = 1; /** Maximum text length. 0 implies no maximum. Applied only to linear barcode formats that allow variable length. Default is 0 */ public maximumTextLength: number = 0; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } if (source.minimum1DQuietZoneSize !== undefined) { this.minimum1DQuietZoneSize = source.minimum1DQuietZoneSize; } if (source.minimumNumberOfRequiredFramesWithEqualRecognitionResult !== undefined) { this.minimumNumberOfRequiredFramesWithEqualRecognitionResult = source.minimumNumberOfRequiredFramesWithEqualRecognitionResult; } if (source.gs1Handling !== undefined) { this.gs1Handling = source.gs1Handling; } if (source.minimumTextLength !== undefined) { this.minimumTextLength = source.minimumTextLength; } if (source.maximumTextLength !== undefined) { this.maximumTextLength = source.maximumTextLength; } } } /** Configuration for all 2-of-5 barcode types (except Interleaved 2-of-5, which is handled by ItfConfig). Add to scanner configuration to scan Code 25, IATA 2-of-5 and Industrial 2-of-5 barcodes. Industrial 2-of-5 barcodes are a subset of Code 25 barcodes. Any valid Industrial 2-of-5 barcode is also a valid Code 25 barcode. */ export class BarcodeFormatCode2Of5Configuration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatCode2Of5Configuration' = 'BarcodeFormatCode2Of5Configuration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** Minimum quiet zone size on the left and right sides of a 1D barcode, measured in number of modules. The quiet zone is only for 1D barcodes with weak start/stop patterns, i.e. Iata2Of5, Industrial2Of5, Code25, Itf, Codabar, MsiPlessey and Code11. Default is 6 */ public minimum1DQuietZoneSize: number = 6; /** Minimum number of frames on which a linear (1D) barcode has to be detected to be considered valid (live scanning only). Linear barcodes are more prone to false positives. Increasing the number of frames on which a barcode has to decode to the same content reduces the probability of a false positive. Default is 1 */ public minimumNumberOfRequiredFramesWithEqualRecognitionResult: number = 1; /** If true, the check digits are stripped from the result. Default is false */ public stripCheckDigits: boolean = false; /** Minimum text length. Applied only to linear barcode formats that allow variable length. Default is 1 */ public minimumTextLength: number = 1; /** Maximum text length. 0 implies no maximum. Applied only to linear barcode formats that allow variable length. Default is 0 */ public maximumTextLength: number = 0; /** If true, scan IATA 2-of-5 barcodes. If useIATA2OF5Checksum is true, only barcodes with a valid checksum are returned. Default is true */ public iata2of5: boolean = true; /** If true, scan and return Code 25 (Code 2-of-5) barcodes. If industrial2of5 is also true, then valid Industrial 2-of-5 barcodes will preferentially be returned as such, instead of Code 25. Default is false */ public code25: boolean = false; /** If true, scan and return valid Industrial 2-of-5 barcodes. If false, but code25 is true, Industrial 2-of-5 barcodes will be returned as Code 25 barcodes. Default is true */ public industrial2of5: boolean = true; /** If true, return IATA_2_OF_5 barcodes only if they have a valid check digit. Default is true */ public useIATA2OF5Checksum: boolean = true; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } if (source.minimum1DQuietZoneSize !== undefined) { this.minimum1DQuietZoneSize = source.minimum1DQuietZoneSize; } if (source.minimumNumberOfRequiredFramesWithEqualRecognitionResult !== undefined) { this.minimumNumberOfRequiredFramesWithEqualRecognitionResult = source.minimumNumberOfRequiredFramesWithEqualRecognitionResult; } if (source.stripCheckDigits !== undefined) { this.stripCheckDigits = source.stripCheckDigits; } if (source.minimumTextLength !== undefined) { this.minimumTextLength = source.minimumTextLength; } if (source.maximumTextLength !== undefined) { this.maximumTextLength = source.maximumTextLength; } if (source.iata2of5 !== undefined) { this.iata2of5 = source.iata2of5; } if (source.code25 !== undefined) { this.code25 = source.code25; } if (source.industrial2of5 !== undefined) { this.industrial2of5 = source.industrial2of5; } if (source.useIATA2OF5Checksum !== undefined) { this.useIATA2OF5Checksum = source.useIATA2OF5Checksum; } } } /** GS1 DataBar barcode configuration. Add to scanner configuration to scan GS1 DataBar-14, GS1 DataBar-14 Truncated, GS1 DataBar-14 Stacked and GS1 DataBar-14 Stacked Omnidirectional barcodes. */ export class BarcodeFormatDataBarConfiguration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatDataBarConfiguration' = 'BarcodeFormatDataBarConfiguration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** Minimum quiet zone size on the left and right sides of a 1D barcode, measured in number of modules. The quiet zone is only for 1D barcodes with weak start/stop patterns, i.e. Iata2Of5, Industrial2Of5, Code25, Itf, Codabar, MsiPlessey and Code11. Default is 6 */ public minimum1DQuietZoneSize: number = 6; /** Minimum number of frames on which a linear (1D) barcode has to be detected to be considered valid (live scanning only). Linear barcodes are more prone to false positives. Increasing the number of frames on which a barcode has to decode to the same content reduces the probability of a false positive. Default is 1 */ public minimumNumberOfRequiredFramesWithEqualRecognitionResult: number = 1; /** GS1 message handling options. Default is PARSE */ public gs1Handling: Gs1Handling = 'PARSE'; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } if (source.minimum1DQuietZoneSize !== undefined) { this.minimum1DQuietZoneSize = source.minimum1DQuietZoneSize; } if (source.minimumNumberOfRequiredFramesWithEqualRecognitionResult !== undefined) { this.minimumNumberOfRequiredFramesWithEqualRecognitionResult = source.minimumNumberOfRequiredFramesWithEqualRecognitionResult; } if (source.gs1Handling !== undefined) { this.gs1Handling = source.gs1Handling; } } } /** GS1 DataBar Expanded barcode configuration. Add to scanner configuration to scan GS1 DataBar Expanded and GS1 DataBar Expanded Stacked barcodes. */ export class BarcodeFormatDataBarExpandedConfiguration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatDataBarExpandedConfiguration' = 'BarcodeFormatDataBarExpandedConfiguration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** Minimum quiet zone size on the left and right sides of a 1D barcode, measured in number of modules. The quiet zone is only for 1D barcodes with weak start/stop patterns, i.e. Iata2Of5, Industrial2Of5, Code25, Itf, Codabar, MsiPlessey and Code11. Default is 6 */ public minimum1DQuietZoneSize: number = 6; /** Minimum number of frames on which a linear (1D) barcode has to be detected to be considered valid (live scanning only). Linear barcodes are more prone to false positives. Increasing the number of frames on which a barcode has to decode to the same content reduces the probability of a false positive. Default is 1 */ public minimumNumberOfRequiredFramesWithEqualRecognitionResult: number = 1; /** GS1 message handling options. Default is PARSE */ public gs1Handling: Gs1Handling = 'PARSE'; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } if (source.minimum1DQuietZoneSize !== undefined) { this.minimum1DQuietZoneSize = source.minimum1DQuietZoneSize; } if (source.minimumNumberOfRequiredFramesWithEqualRecognitionResult !== undefined) { this.minimumNumberOfRequiredFramesWithEqualRecognitionResult = source.minimumNumberOfRequiredFramesWithEqualRecognitionResult; } if (source.gs1Handling !== undefined) { this.gs1Handling = source.gs1Handling; } } } /** GS1 DataBar Limited barcode configuration. Add to scanner configuration to scan GS1 DataBar Limited barcodes. */ export class BarcodeFormatDataBarLimitedConfiguration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatDataBarLimitedConfiguration' = 'BarcodeFormatDataBarLimitedConfiguration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** Minimum quiet zone size on the left and right sides of a 1D barcode, measured in number of modules. The quiet zone is only for 1D barcodes with weak start/stop patterns, i.e. Iata2Of5, Industrial2Of5, Code25, Itf, Codabar, MsiPlessey and Code11. Default is 6 */ public minimum1DQuietZoneSize: number = 6; /** Minimum number of frames on which a linear (1D) barcode has to be detected to be considered valid (live scanning only). Linear barcodes are more prone to false positives. Increasing the number of frames on which a barcode has to decode to the same content reduces the probability of a false positive. Default is 1 */ public minimumNumberOfRequiredFramesWithEqualRecognitionResult: number = 1; /** GS1 message handling options. Default is PARSE */ public gs1Handling: Gs1Handling = 'PARSE'; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } if (source.minimum1DQuietZoneSize !== undefined) { this.minimum1DQuietZoneSize = source.minimum1DQuietZoneSize; } if (source.minimumNumberOfRequiredFramesWithEqualRecognitionResult !== undefined) { this.minimumNumberOfRequiredFramesWithEqualRecognitionResult = source.minimumNumberOfRequiredFramesWithEqualRecognitionResult; } if (source.gs1Handling !== undefined) { this.gs1Handling = source.gs1Handling; } } } /** ITF (Interleaved 2-of-5) barcode configuration. Add to scanner configuration to scan Interleaved 2-of-5 (ITF) barcodes. */ export class BarcodeFormatItfConfiguration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatITFConfiguration' = 'BarcodeFormatITFConfiguration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** Minimum quiet zone size on the left and right sides of a 1D barcode, measured in number of modules. The quiet zone is only for 1D barcodes with weak start/stop patterns, i.e. Iata2Of5, Industrial2Of5, Code25, Itf, Codabar, MsiPlessey and Code11. Default is 6 */ public minimum1DQuietZoneSize: number = 6; /** Minimum number of frames on which a linear (1D) barcode has to be detected to be considered valid (live scanning only). Linear barcodes are more prone to false positives. Increasing the number of frames on which a barcode has to decode to the same content reduces the probability of a false positive. Default is 1 */ public minimumNumberOfRequiredFramesWithEqualRecognitionResult: number = 1; /** Minimum text length. Applied only to linear barcode formats that allow variable length. Default is 1 */ public minimumTextLength: number = 1; /** Maximum text length. 0 implies no maximum. Applied only to linear barcode formats that allow variable length. Default is 0 */ public maximumTextLength: number = 0; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } if (source.minimum1DQuietZoneSize !== undefined) { this.minimum1DQuietZoneSize = source.minimum1DQuietZoneSize; } if (source.minimumNumberOfRequiredFramesWithEqualRecognitionResult !== undefined) { this.minimumNumberOfRequiredFramesWithEqualRecognitionResult = source.minimumNumberOfRequiredFramesWithEqualRecognitionResult; } if (source.minimumTextLength !== undefined) { this.minimumTextLength = source.minimumTextLength; } if (source.maximumTextLength !== undefined) { this.maximumTextLength = source.maximumTextLength; } } } /** Checksum algorithm for MSI_PLESSEY. - `MOD_10`: Modulo 10. - `MOD_11_IBM`: Modulo 11 IBM. - `MOD_11_NCR`: Modulo 11 NCR. - `MOD_10_10`: Modulo 1010. - `MOD_11_10_IBM`: Modulo 1110 IBM. - `MOD_11_10_NCR`: Modulo 1110 NCR. */ export type MsiPlesseyChecksumAlgorithm = | 'MOD_10' | 'MOD_11_IBM' | 'MOD_11_NCR' | 'MOD_10_10' | 'MOD_11_10_IBM' | 'MOD_11_10_NCR'; export const MsiPlesseyChecksumAlgorithmValues: MsiPlesseyChecksumAlgorithm[] = [ 'MOD_10', 'MOD_11_IBM', 'MOD_11_NCR', 'MOD_10_10', 'MOD_11_10_IBM', 'MOD_11_10_NCR', ]; /** MSI Plessey barcode configuration. Add to scanner configuration to scan MSI Plessey barcodes. */ export class BarcodeFormatMsiPlesseyConfiguration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatMSIPlesseyConfiguration' = 'BarcodeFormatMSIPlesseyConfiguration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** Minimum quiet zone size on the left and right sides of a 1D barcode, measured in number of modules. The quiet zone is only for 1D barcodes with weak start/stop patterns, i.e. Iata2Of5, Industrial2Of5, Code25, Itf, Codabar, MsiPlessey and Code11. Default is 6 */ public minimum1DQuietZoneSize: number = 6; /** Minimum number of frames on which a linear (1D) barcode has to be detected to be considered valid (live scanning only). Linear barcodes are more prone to false positives. Increasing the number of frames on which a barcode has to decode to the same content reduces the probability of a false positive. Default is 1 */ public minimumNumberOfRequiredFramesWithEqualRecognitionResult: number = 1; /** If true, the check digits are stripped from the result. Default is false */ public stripCheckDigits: boolean = false; /** Minimum text length. Applied only to linear barcode formats that allow variable length. Default is 1 */ public minimumTextLength: number = 1; /** Maximum text length. 0 implies no maximum. Applied only to linear barcode formats that allow variable length. Default is 0 */ public maximumTextLength: number = 0; /** List of MSI Plessey checksum algorithms to apply during scanning. A barcode is considered valid if it passes any of the checksum algorithms in the list. If the list is empty, no checksum validation is performed. */ public checksumAlgorithms: MsiPlesseyChecksumAlgorithm[] = ['MOD_10']; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } if (source.minimum1DQuietZoneSize !== undefined) { this.minimum1DQuietZoneSize = source.minimum1DQuietZoneSize; } if (source.minimumNumberOfRequiredFramesWithEqualRecognitionResult !== undefined) { this.minimumNumberOfRequiredFramesWithEqualRecognitionResult = source.minimumNumberOfRequiredFramesWithEqualRecognitionResult; } if (source.stripCheckDigits !== undefined) { this.stripCheckDigits = source.stripCheckDigits; } if (source.minimumTextLength !== undefined) { this.minimumTextLength = source.minimumTextLength; } if (source.maximumTextLength !== undefined) { this.maximumTextLength = source.maximumTextLength; } if (source.checksumAlgorithms !== undefined) { this.checksumAlgorithms = source.checksumAlgorithms.map((it: any) => { return it; }); } } } /** UPC/EAN barcode configuration. Add to scanner configuration to scan EAN-8, EAN-13, UPC-E and UPC-A barcodes. */ export class BarcodeFormatUpcEanConfiguration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatUpcEanConfiguration' = 'BarcodeFormatUpcEanConfiguration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** Minimum quiet zone size on the left and right sides of a 1D barcode, measured in number of modules. The quiet zone is only for 1D barcodes with weak start/stop patterns, i.e. Iata2Of5, Industrial2Of5, Code25, Itf, Codabar, MsiPlessey and Code11. Default is 6 */ public minimum1DQuietZoneSize: number = 6; /** Minimum number of frames on which a linear (1D) barcode has to be detected to be considered valid (live scanning only). Linear barcodes are more prone to false positives. Increasing the number of frames on which a barcode has to decode to the same content reduces the probability of a false positive. Default is 1 */ public minimumNumberOfRequiredFramesWithEqualRecognitionResult: number = 1; /** If true, the check digits are stripped from the result. Default is false */ public stripCheckDigits: boolean = false; /** If true, scan and return valid EAN-8 barcodes. Default is true */ public ean8: boolean = true; /** If true, scan and return valid EAN-13 barcodes. Default is true */ public ean13: boolean = true; /** If true, scan and return valid UPC-A barcodes. If false, but ean13 is true, then UPC-A barcodes will be returned as EAN-13 barcodes. Default is true */ public upca: boolean = true; /** If true, scan and return valid UPC-E barcodes. Default is true */ public upce: boolean = true; /** Behavior when scanning UPC/EAN barcodes with EAN-2 or EAN-5 extensions. Default is ALLOW_ANY */ public extensions: UpcEanExtensionBehavior = 'ALLOW_ANY'; /** In case that EAN/UPC barcodes both with and without extensions are allowed, we require this number of frames on which the standalone EAN or UPC (i.e. without extension) has to be detected to be considered as valid (live scanning only). EAN/UPC barcodes with extensions are more prone to slicing (incomplete decoding). Increasing the number of frames on which a barcode has to decode to the same content reduces the probability that an extension is accidentally missed. Default is 1 */ public minimumNumberOfRequiredFramesWithEqualRecognitionResultExtensionless: number = 1; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } if (source.minimum1DQuietZoneSize !== undefined) { this.minimum1DQuietZoneSize = source.minimum1DQuietZoneSize; } if (source.minimumNumberOfRequiredFramesWithEqualRecognitionResult !== undefined) { this.minimumNumberOfRequiredFramesWithEqualRecognitionResult = source.minimumNumberOfRequiredFramesWithEqualRecognitionResult; } if (source.stripCheckDigits !== undefined) { this.stripCheckDigits = source.stripCheckDigits; } if (source.ean8 !== undefined) { this.ean8 = source.ean8; } if (source.ean13 !== undefined) { this.ean13 = source.ean13; } if (source.upca !== undefined) { this.upca = source.upca; } if (source.upce !== undefined) { this.upce = source.upce; } if (source.extensions !== undefined) { this.extensions = source.extensions; } if (source.minimumNumberOfRequiredFramesWithEqualRecognitionResultExtensionless !== undefined) { this.minimumNumberOfRequiredFramesWithEqualRecognitionResultExtensionless = source.minimumNumberOfRequiredFramesWithEqualRecognitionResultExtensionless; } } } /** PharmaCode barcode configuration. Add to scanner configuration to scan linear (1D) Laetus Pharmacode barcodes. Two-track PharmaCode scanning is configured separately through the PharmaCodeTwoTrackConfig class. */ export class BarcodeFormatPharmaCodeConfiguration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatPharmaCodeConfiguration' = 'BarcodeFormatPharmaCodeConfiguration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** Minimum quiet zone size on the left and right sides of a 1D barcode, measured in number of modules. The quiet zone is only for 1D barcodes with weak start/stop patterns, i.e. Iata2Of5, Industrial2Of5, Code25, Itf, Codabar, MsiPlessey and Code11. Default is 6 */ public minimum1DQuietZoneSize: number = 6; /** Minimum number of frames on which a linear (1D) barcode has to be detected to be considered valid (live scanning only). Linear barcodes are more prone to false positives. Increasing the number of frames on which a barcode has to decode to the same content reduces the probability of a false positive. Default is 1 */ public minimumNumberOfRequiredFramesWithEqualRecognitionResult: number = 1; /** Minimum value for PharmaCode. Very low values are likely to produce more false positives. Default is 16 */ public minimumValue: number = 16; /** If true, a result consisting of only narrow bars is accepted as valid. The specification does not recommend such barcodes. Default is false. Default is false */ public allowNarrowBarsOnly: boolean = false; /** If true, a result consisting of only wide bars is accepted as valid. The specification does not recommend such barcodes. Default is false. Default is false */ public allowWideBarsOnly: boolean = false; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } if (source.minimum1DQuietZoneSize !== undefined) { this.minimum1DQuietZoneSize = source.minimum1DQuietZoneSize; } if (source.minimumNumberOfRequiredFramesWithEqualRecognitionResult !== undefined) { this.minimumNumberOfRequiredFramesWithEqualRecognitionResult = source.minimumNumberOfRequiredFramesWithEqualRecognitionResult; } if (source.minimumValue !== undefined) { this.minimumValue = source.minimumValue; } if (source.allowNarrowBarsOnly !== undefined) { this.allowNarrowBarsOnly = source.allowNarrowBarsOnly; } if (source.allowWideBarsOnly !== undefined) { this.allowWideBarsOnly = source.allowWideBarsOnly; } } } /** Base class for all 2D barcode configurations. */ export type BarcodeFormatTwoDConfigurationBase = | BarcodeFormatAztecConfiguration | BarcodeFormatQrCodeConfiguration | BarcodeFormatPdf417Configuration | BarcodeFormatMicroPdf417Configuration | BarcodeFormatDataMatrixConfiguration | BarcodeFormatMaxiCodeConfiguration; /** @internal */ export namespace BarcodeFormatTwoDConfigurationBase { /** @internal */ export function From(source: { [key: string]: any }): BarcodeFormatTwoDConfigurationBase { const _type = source._type; switch (_type) { case 'BarcodeFormatAztecConfiguration': return new BarcodeFormatAztecConfiguration(source); case 'BarcodeFormatQRCodeConfiguration': return new BarcodeFormatQrCodeConfiguration(source); case 'BarcodeFormatPDF417Configuration': return new BarcodeFormatPdf417Configuration(source); case 'BarcodeFormatMicroPDF417Configuration': return new BarcodeFormatMicroPdf417Configuration(source); case 'BarcodeFormatDataMatrixConfiguration': return new BarcodeFormatDataMatrixConfiguration(source); case 'BarcodeFormatMaxiCodeConfiguration': return new BarcodeFormatMaxiCodeConfiguration(source); default: throw `Unknown child class name: ${_type}`; } } } /** Aztec configuration. Add to scanner configuration to scan Aztec codes. */ export class BarcodeFormatAztecConfiguration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatAztecConfiguration' = 'BarcodeFormatAztecConfiguration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** GS1 message handling options. Default is PARSE */ public gs1Handling: Gs1Handling = 'PARSE'; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } if (source.gs1Handling !== undefined) { this.gs1Handling = source.gs1Handling; } } } /** QR Code configuration. Add to scanner configuration to scan QR codes, Micro QR codes and rectangular Micro QR (rMQR) codes. */ export class BarcodeFormatQrCodeConfiguration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatQRCodeConfiguration' = 'BarcodeFormatQRCodeConfiguration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** GS1 message handling options. Default is PARSE */ public gs1Handling: Gs1Handling = 'PARSE'; /** If true, the barcode scanner will only return barcodes that pass the strict validation checks according to standards to avoid false positives. Default is true */ public strictMode: boolean = true; /** If true, scan and return QR codes. Default is true */ public qr: boolean = true; /** If true, scan and return Micro QR codes. Default is false */ public microQr: boolean = false; /** If true, scan and return rectangular Micro QR (rMQR) codes. Default is false */ public rmqr: boolean = false; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } if (source.gs1Handling !== undefined) { this.gs1Handling = source.gs1Handling; } if (source.strictMode !== undefined) { this.strictMode = source.strictMode; } if (source.qr !== undefined) { this.qr = source.qr; } if (source.microQr !== undefined) { this.microQr = source.microQr; } if (source.rmqr !== undefined) { this.rmqr = source.rmqr; } } } /** PDF417 configuration. Add to scanner configuration to scan PDF417 codes. */ export class BarcodeFormatPdf417Configuration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatPDF417Configuration' = 'BarcodeFormatPDF417Configuration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** GS1 message handling options. Default is PARSE */ public gs1Handling: Gs1Handling = 'PARSE'; /** If true, the barcode scanner will only return barcodes that pass the strict validation checks according to standards to avoid false positives. Default is true */ public strictMode: boolean = true; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } if (source.gs1Handling !== undefined) { this.gs1Handling = source.gs1Handling; } if (source.strictMode !== undefined) { this.strictMode = source.strictMode; } } } /** MicroPDF417 configuration. Add to scanner configuration to scan MicroPDF417 codes. */ export class BarcodeFormatMicroPdf417Configuration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatMicroPDF417Configuration' = 'BarcodeFormatMicroPDF417Configuration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** GS1 message handling options. Default is PARSE */ public gs1Handling: Gs1Handling = 'PARSE'; /** If true, the barcode scanner will only return barcodes that pass the strict validation checks according to standards to avoid false positives. Default is true */ public strictMode: boolean = true; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } if (source.gs1Handling !== undefined) { this.gs1Handling = source.gs1Handling; } if (source.strictMode !== undefined) { this.strictMode = source.strictMode; } } } /** DataMatrix configuration. Add to scanner configuration to scan DataMatrix and DataMatrix rectangular extensions (DMRE) codes. */ export class BarcodeFormatDataMatrixConfiguration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatDataMatrixConfiguration' = 'BarcodeFormatDataMatrixConfiguration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** GS1 message handling options. Default is PARSE */ public gs1Handling: Gs1Handling = 'PARSE'; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } if (source.gs1Handling !== undefined) { this.gs1Handling = source.gs1Handling; } } } /** MaxiCode configuration. Add to scanner configuration to scan MaxiCode codes. */ export class BarcodeFormatMaxiCodeConfiguration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatMaxiCodeConfiguration' = 'BarcodeFormatMaxiCodeConfiguration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } } } /** Base class for all four-state barcode configurations. */ export type BarcodeFormatFourStateConfigurationBase = | BarcodeFormatAustraliaPostConfiguration | BarcodeFormatJapanPostConfiguration | BarcodeFormatRoyalMailConfiguration | BarcodeFormatRoyalTntPostConfiguration | BarcodeFormatUspsIntelligentMailConfiguration | BarcodeFormatPharmaCodeTwoTrackConfiguration; /** @internal */ export namespace BarcodeFormatFourStateConfigurationBase { /** @internal */ export function From(source: { [key: string]: any }): BarcodeFormatFourStateConfigurationBase { const _type = source._type; switch (_type) { case 'BarcodeFormatAustraliaPostConfiguration': return new BarcodeFormatAustraliaPostConfiguration(source); case 'BarcodeFormatJapanPostConfiguration': return new BarcodeFormatJapanPostConfiguration(source); case 'BarcodeFormatRoyalMailConfiguration': return new BarcodeFormatRoyalMailConfiguration(source); case 'BarcodeFormatRoyalTNTPostConfiguration': return new BarcodeFormatRoyalTntPostConfiguration(source); case 'BarcodeFormatUSPSIntelligentMailConfiguration': return new BarcodeFormatUspsIntelligentMailConfiguration(source); case 'BarcodeFormatPharmaCodeTwoTrackConfiguration': return new BarcodeFormatPharmaCodeTwoTrackConfiguration(source); default: throw `Unknown child class name: ${_type}`; } } } /** Can be either numeric or alphanumeric and is only relevant for Format Codes 59 and 62. - `NUMERIC`: Numeric. - `ALPHA_NUMERIC`: AlphaNumeric. */ export type AustraliaPostCustomerFormat = 'NUMERIC' | 'ALPHA_NUMERIC'; export const AustraliaPostCustomerFormatValues: AustraliaPostCustomerFormat[] = [ 'NUMERIC', 'ALPHA_NUMERIC', ]; /** Australia Post barcode configuration. Add to scanner configuration to scan Australia Post barcodes. */ export class BarcodeFormatAustraliaPostConfiguration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatAustraliaPostConfiguration' = 'BarcodeFormatAustraliaPostConfiguration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** Can be either numeric or alphanumeric and is only relevant for Format Codes 59 and 62. Default is ALPHA_NUMERIC */ public australiaPostCustomerFormat: AustraliaPostCustomerFormat = 'ALPHA_NUMERIC'; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } if (source.australiaPostCustomerFormat !== undefined) { this.australiaPostCustomerFormat = source.australiaPostCustomerFormat; } } } /** Japan Post barcode configuration. Add to scanner configuration to scan Japan Post barcodes. */ export class BarcodeFormatJapanPostConfiguration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatJapanPostConfiguration' = 'BarcodeFormatJapanPostConfiguration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } } } /** Royal Mail barcode configuration. Add to scanner configuration to scan Royal Mail (a.k.a. RM4SCC, CBC, BPO 4-State) barcodes. */ export class BarcodeFormatRoyalMailConfiguration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatRoyalMailConfiguration' = 'BarcodeFormatRoyalMailConfiguration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** If true, the check digits are stripped from the result. Default is false */ public stripCheckDigits: boolean = false; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } if (source.stripCheckDigits !== undefined) { this.stripCheckDigits = source.stripCheckDigits; } } } /** Royal TNT Post barcode configuration. Add to scanner configuration to scan Royal TNT Post (a.k.a. KIX, Klant IndeX) barcodes. */ export class BarcodeFormatRoyalTntPostConfiguration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatRoyalTNTPostConfiguration' = 'BarcodeFormatRoyalTNTPostConfiguration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } } } /** USPS Intelligent Mail barcode configuration. Add to scanner configuration to scan USPS Intelligent Mail (a.k.a. USPS OneCode, USPS-STD-11) barcodes. */ export class BarcodeFormatUspsIntelligentMailConfiguration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatUSPSIntelligentMailConfiguration' = 'BarcodeFormatUSPSIntelligentMailConfiguration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } } } /** PHARMA_CODE_TWO_TRACK barcode configuration. Add to scanner configuration to scan Laetus two-track PharmaCode barcodes. Linear (i.e. one-track) PharmaCode scanning is configured separately through the PharmaCodeConfig class. */ export class BarcodeFormatPharmaCodeTwoTrackConfiguration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatPharmaCodeTwoTrackConfiguration' = 'BarcodeFormatPharmaCodeTwoTrackConfiguration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** Minimum value for PHARMA_CODE_TWO_TRACK. Very low values are likely to produce more false positives. Default is 364 */ public minimumValue: number = 364; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } if (source.minimumValue !== undefined) { this.minimumValue = source.minimumValue; } } } /** GS1 Composite configuration. Add to scanner configuration to scan GS1 Composite barcodes. When not enabled, the individual parts of GS1 Composite barcodes will be returned as separate items, if the respective formats are enabled (UPC-A, Code 128, MicroPDF417, PDF417). Those barcode items will have their isGS1CompositePart field set to true. If GS1 Composite scanning is enabled, the individual parts are never returned, even if their respective formats are enabled, except when the linear component is a UPC or EAN barcode. In that case the linear component might still occasionally be returned as a separate result. If this situation needs to be avoided, remove the UPC and EAN formats from the enabled formats. If GS1 Composite scanning is disabled, but GS1 message validation is enabled, then the parts of the composite barcode may fail validation and be rejected. */ export class BarcodeFormatGs1CompositeConfiguration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatGS1CompositeConfiguration' = 'BarcodeFormatGS1CompositeConfiguration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** Minimum quiet zone size on the left and right sides of a 1D barcode, measured in number of modules. The quiet zone is only for 1D barcodes with weak start/stop patterns, i.e. Iata2Of5, Industrial2Of5, Code25, Itf, Codabar, MsiPlessey and Code11. Default is 6 */ public minimum1DQuietZoneSize: number = 6; /** GS1 message handling options. Default is PARSE */ public gs1Handling: Gs1Handling = 'PARSE'; /** If true, the barcode scanner will only return barcodes that pass the strict validation checks according to standards to avoid false positives. Default is true */ public strictMode: boolean = true; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } if (source.minimum1DQuietZoneSize !== undefined) { this.minimum1DQuietZoneSize = source.minimum1DQuietZoneSize; } if (source.gs1Handling !== undefined) { this.gs1Handling = source.gs1Handling; } if (source.strictMode !== undefined) { this.strictMode = source.strictMode; } } } /** Convenience configuration for enabling the scanning of multiple linear (1D) barcode formats with a common configuration. Add to scanner configuration to enable and configure the scanning of multiple linear (1D) barcode formats. The given configuration will be applied to all enabled barcode formats, if they support it. You can override the common configuration for individual barcode formats by additionally adding their specific configuration to the scanner's configuration. */ export class BarcodeFormatCommonOneDConfiguration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatCommonOneDConfiguration' = 'BarcodeFormatCommonOneDConfiguration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** Minimum quiet zone size on the left and right sides of a 1D barcode, measured in number of modules. The quiet zone is only for 1D barcodes with weak start/stop patterns, i.e. Iata2Of5, Industrial2Of5, Code25, Itf, Codabar, MsiPlessey and Code11. Default is 6 */ public minimum1DQuietZoneSize: number = 6; /** Minimum number of frames on which a linear (1D) barcode has to be detected to be considered valid (live scanning only). Linear barcodes are more prone to false positives. Increasing the number of frames on which a barcode has to decode to the same content reduces the probability of a false positive. Default is 1 */ public minimumNumberOfRequiredFramesWithEqualRecognitionResult: number = 1; /** If true, the check digits are stripped from the result. Default is false */ public stripCheckDigits: boolean = false; /** Minimum text length. Applied only to linear barcode formats that allow variable length. Default is 1 */ public minimumTextLength: number = 1; /** Maximum text length. 0 implies no maximum. Applied only to linear barcode formats that allow variable length. Default is 0 */ public maximumTextLength: number = 0; /** GS1 message handling options. Default is PARSE */ public gs1Handling: Gs1Handling = 'PARSE'; /** List of linear (1D) barcode formats to scan. */ public formats: BarcodeFormat[] = [ 'CODABAR', 'CODE_11', 'CODE_25', 'CODE_32', 'CODE_39', 'CODE_93', 'CODE_128', 'DATABAR', 'DATABAR_EXPANDED', 'DATABAR_LIMITED', 'EAN_8', 'EAN_13', 'IATA_2_OF_5', 'INDUSTRIAL_2_OF_5', 'ITF', 'MSI_PLESSEY', 'PHARMA_CODE', 'PZN_7', 'PZN_8', 'UPC_A', 'UPC_E', ]; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } if (source.minimum1DQuietZoneSize !== undefined) { this.minimum1DQuietZoneSize = source.minimum1DQuietZoneSize; } if (source.minimumNumberOfRequiredFramesWithEqualRecognitionResult !== undefined) { this.minimumNumberOfRequiredFramesWithEqualRecognitionResult = source.minimumNumberOfRequiredFramesWithEqualRecognitionResult; } if (source.stripCheckDigits !== undefined) { this.stripCheckDigits = source.stripCheckDigits; } if (source.minimumTextLength !== undefined) { this.minimumTextLength = source.minimumTextLength; } if (source.maximumTextLength !== undefined) { this.maximumTextLength = source.maximumTextLength; } if (source.gs1Handling !== undefined) { this.gs1Handling = source.gs1Handling; } if (source.formats !== undefined) { this.formats = source.formats.map((it: any) => { return it; }); } } } /** Convenience configuration for enabling the scanning of multiple 2D codes with a common configuration. Add to scanner configuration to enable and configure the scanning of multiple 2D codes. The given configuration will be applied to all enabled barcode formats, if they support it. You can override the common configuration for individual barcode formats by additionally adding their specific configuration to the scanner's configuration. */ export class BarcodeFormatCommonTwoDConfiguration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatCommonTwoDConfiguration' = 'BarcodeFormatCommonTwoDConfiguration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** GS1 message handling options. Default is PARSE */ public gs1Handling: Gs1Handling = 'PARSE'; /** If true, the barcode scanner will only return barcodes that pass the strict validation checks according to standards to avoid false positives. Default is true */ public strictMode: boolean = true; /** List of 2D codes to scan. */ public formats: BarcodeFormat[] = [ 'AZTEC', 'DATA_MATRIX', 'MAXI_CODE', 'MICRO_QR_CODE', 'MICRO_PDF_417', 'PDF_417', 'QR_CODE', 'RMQR_CODE', ]; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } if (source.gs1Handling !== undefined) { this.gs1Handling = source.gs1Handling; } if (source.strictMode !== undefined) { this.strictMode = source.strictMode; } if (source.formats !== undefined) { this.formats = source.formats.map((it: any) => { return it; }); } } } /** Convenience configuration for enabling the scanning of multiple four-state barcode formats with a common configuration. Add to scanner configuration to enable and configure the scanning of multiple four-state codes. The given configuration will be applied to all enabled barcode formats, if they support it. You can override the common configuration for individual barcode formats by additionally adding their specific configuration to the scanner's configuration. */ export class BarcodeFormatCommonFourStateConfiguration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatCommonFourStateConfiguration' = 'BarcodeFormatCommonFourStateConfiguration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** List of four-state barcode formats to scan. */ public formats: BarcodeFormat[] = [ 'AUSTRALIA_POST', 'JAPAN_POST', 'ROYAL_MAIL', 'ROYAL_TNT_POST', 'USPS_INTELLIGENT_MAIL', ]; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } if (source.formats !== undefined) { this.formats = source.formats.map((it: any) => { return it; }); } } } /** Convenience configuration for enabling the scanning of multiple barcode formats with a common configuration. Add to scanner configuration to enable and configure the scanning of multiple barcodes. The given configuration will be applied to all enabled barcode formats, if they support it. You can override the common configuration for individual barcode formats by additionally adding their specific configuration to the scanner's configuration. */ export class BarcodeFormatCommonConfiguration extends PartiallyConstructible { public readonly _type: 'BarcodeFormatCommonConfiguration' = 'BarcodeFormatCommonConfiguration'; /** Regular expression filter for barcode text. If the barcode text does not match the regular expression, it will not be scanned. The default is an empty string (setting is turned off). Default is "" */ public regexFilter: string = ''; /** Minimum acceptable value of a result BarcodeItem's sizeScore (between 0 and 1). Barcodes with a sizeScore less than this value will not be scanned. When set to 0, barcodes are returned no matter what their size is. Default is 0 */ public minimumSizeScore: number = 0.0; /** If true, we process the barcode scanning with an artificial quiet zone that we add to the input image. This flag should be used to scan sharp crops of a barcode in single-shot mode. Default is false */ public addAdditionalQuietZone: boolean = false; /** Minimum quiet zone size on the left and right sides of a 1D barcode, measured in number of modules. The quiet zone is only for 1D barcodes with weak start/stop patterns, i.e. Iata2Of5, Industrial2Of5, Code25, Itf, Codabar, MsiPlessey and Code11. Default is 6 */ public minimum1DQuietZoneSize: number = 6; /** Minimum number of frames on which a linear (1D) barcode has to be detected to be considered valid (live scanning only). Linear barcodes are more prone to false positives. Increasing the number of frames on which a barcode has to decode to the same content reduces the probability of a false positive. Default is 1 */ public minimumNumberOfRequiredFramesWithEqualRecognitionResult: number = 1; /** If true, the check digits are stripped from the result. Default is false */ public stripCheckDigits: boolean = false; /** Minimum text length. Applied only to linear barcode formats that allow variable length. Default is 1 */ public minimumTextLength: number = 1; /** Maximum text length. 0 implies no maximum. Applied only to linear barcode formats that allow variable length. Default is 0 */ public maximumTextLength: number = 0; /** GS1 message handling options. Default is PARSE */ public gs1Handling: Gs1Handling = 'PARSE'; /** If true, the barcode scanner will only return barcodes that pass the strict validation checks according to standards to avoid false positives. Default is true */ public strictMode: boolean = true; /** List of barcode formats to scan. By default, the most commonly used formats are enabled. */ public formats: BarcodeFormat[] = [ 'AZTEC', 'CODABAR', 'CODE_39', 'CODE_93', 'CODE_128', 'DATA_MATRIX', 'DATABAR', 'DATABAR_EXPANDED', 'DATABAR_LIMITED', 'EAN_13', 'EAN_8', 'ITF', 'MICRO_QR_CODE', 'PDF_417', 'QR_CODE', 'UPC_A', 'UPC_E', ]; /** @param source {@displayType `DeepPartial`} */ public constructor(source: DeepPartial = {}) { super(); if (source.regexFilter !== undefined) { this.regexFilter = source.regexFilter; } if (source.minimumSizeScore !== undefined) { this.minimumSizeScore = source.minimumSizeScore; } if (source.addAdditionalQuietZone !== undefined) { this.addAdditionalQuietZone = source.addAdditionalQuietZone; } if (source.minimum1DQuietZoneSize !== undefined) { this.minimum1DQuietZoneSize = source.minimum1DQuietZoneSize; } if (source.minimumNumberOfRequiredFramesWithEqualRecognitionResult !== undefined) { this.minimumNumberOfRequiredFramesWithEqualRecognitionResult = source.minimumNumberOfRequiredFramesWithEqualRecognitionResult; } if (source.stripCheckDigits !== undefined) { this.stripCheckDigits = source.stripCheckDigits; } if (source.minimumTextLength !== undefined) { this.minimumTextLength = source.minimumTextLength; } if (source.maximumTextLength !== undefined) { this.maximumTextLength = source.maximumTextLength; } if (source.gs1Handling !== undefined) { this.gs1Handling = source.gs1Handling; } if (source.strictMode !== undefined) { this.strictMode = source.strictMode; } if (source.formats !== undefined) { this.formats = source.formats.map((it: any) => { return it; }); } } }