export type CharacterSet = 'N' | 'X' | 'Y' | 'M'; export interface SpecComponent { set: CharacterSet; min: number; max: number; fixed: boolean; } export type InterpretationKind = 'date' | 'datetime' | 'dateRange' | 'decimal' | 'currencyDecimal' | 'count'; export interface AIDefinition { ai: string; title: string; description: string; spec: string; components: SpecComponent[]; predefinedLength: boolean; fixedLength?: number; checkDigitPosition?: number; kind?: InterpretationKind; } export interface GS1Date { year: number; month: number; day: number; iso: string; } export interface GS1DateTime extends GS1Date { hour: number; minute?: number; second?: number; } export type InterpretedValue = number | GS1Date | GS1DateTime | { start: GS1Date; end?: GS1Date; } | { currency: string; amount: number; }; export interface GS1Element { ai: string; value: string; definition: AIDefinition; interpreted?: InterpretedValue; } export type ElementInput = Array<{ ai: string; value: string; }> | Record; export declare class GS1Error extends Error { readonly ai?: string; constructor(message: string, ai?: string); }