import type {CapturedResultItem, Quadrilateral, EnumCapturedResultItemType} from "../core"; import type {EnumBarcodeFormat} from "./EnumBarcodeFormat"; import type {AztecDetails, DataMatrixDetails, OneDCodeDetails, PDF417Details, QRCodeDetails} from "./BarcodeDetails"; import type { ECISegment } from "./ECISegment"; /** * Interface BarcodeResultItem extends {@link CapturedResultItem}, represents a barcode result item decoded by barcode reader engine. * @see {@link DecodedBarcodesResult} * @see {@link EnumCapturedResultItemType.CRIT_BARCODE} * */ export interface BarcodeResultItem extends CapturedResultItem{ /** * The format of the barcode. It specifies the type of barcode that was recognized. * @see {@link EnumBarcodeFormat} * */ format: EnumBarcodeFormat | bigint; /**@internal*/ _formatNumberString: string; /**A string that describes the format of the barcode in human-readable form. It provides a textual representation of the barcode format.*/ formatString: string; /**The textual data decoded from the barcode. It represents the content of the barcode.*/ text: string; /** * base64-encoded string representing the raw byte data of the barcode. It is a way to encode binary data as a string, making it easier to transmit or store. */ bytes: string; /** * The location of the barcode in the form of a {@link Quadrilateral} (a set of coordinates defining the four corners of the detected barcode). * It describes where the barcode was found within an image. * @see {@link Quadrilateral} * */ location: Quadrilateral; /**The confidence score or reliability of the barcode detection.*/ confidence: number; /**The angle or orientation of the barcode, indicating if the barcode was detected at an angle or rotated.*/ angle: number; /**The size of the individual modules or elements within the barcode.*/ moduleSize: number; /**Whether the barcode is mirrored or reversed from its normal orientation.*/ isMirrored: boolean; /**Indicates whether the barcode is a Direct Part Marking (DPM) barcode.*/ isDPM: boolean; qrCodeDetails?: QRCodeDetails; oneDCodeDetails?: OneDCodeDetails; dataMatrixDetails?: DataMatrixDetails; pdf417Details?: PDF417Details; aztecDetails?: AztecDetails; /**Extended Channel Interpretation (ECI) segments within the barcode. It provides information about the character encoding used for different parts of the barcode data.*/ eciSegments?: ECISegment[]; }