/** * Supported barcode formats */ export type BarcodeFormat = 'CODE128' | 'CODE39' | 'EAN13' | 'EAN8' | 'UPC' | 'ITF14' | 'MSI' | 'pharmacode' | 'codabar'; /** * Options for barcode encoding */ export interface BarcodeEncodeOptions { [key: string]: unknown; } /** * Encoded barcode segment (used for EAN13, EAN8, UPC) */ export interface EncodedBarcodeSegment { /** Binary string representation where '1' = bar, '0' = space */ data: string; /** Optional text for this segment */ text?: string; /** Optional segment-specific options */ options?: { height?: number | null; [key: string]: unknown; }; } /** * Encoded barcode data structure * Can be a single object (CODE128, CODE39) or array of segments (EAN13, EAN8, UPC) */ export type EncodedBarcode = { /** The original text value */ text: string; /** Binary string representation where '1' = bar, '0' = space */ data: string; } | EncodedBarcodeSegment[]; /** * Barcode encoder class that wraps jsbarcode functionality */ declare class BarcodeEncoder { /** * Encodes text into a barcode binary pattern * * @param text - The text value to encode * @param format - The barcode format to use * @param options - Additional encoding options * @returns Encoded barcode data with text and binary pattern (or array of segments for EAN/UPC) * @throws Error if text is invalid, format is not supported, or encoding fails */ encode(text: string, format: BarcodeFormat, options?: BarcodeEncodeOptions): EncodedBarcode; /** * Gets list of available barcode formats */ getAvailableFormats(): string[]; } declare const _default: BarcodeEncoder; export default _default; //# sourceMappingURL=BarCodeEncoder.d.ts.map