import { E as ExtractorConfig, a as ExtractFromImageInput, b as ExtractionResult, I as ImageInput } from './types-D-Xd_fw6.js'; export { c as ExtractionOptions, F as FieldConfidence, d as FormAdapter, L as LLMProvider } from './types-D-Xd_fw6.js'; import 'zod'; /** * Creates a configured extractor instance. * * @example * ```typescript * const extractor = createExtractor({ * provider: openai('gpt-4o'), * adapter: 'surveyjs', * }); * const result = await extractor.extractFromImage({ image, formDefinition }); * ``` */ declare function createExtractor(config: ExtractorConfig): { extractFromImage(input: ExtractFromImageInput): Promise; }; /** * QR code and unique ID detection from form images. */ /** Result of unique ID detection */ interface UniqueIdResult { id: string | null; source: 'qr' | 'barcode' | 'text' | null; confidence: number; } /** * Detect a unique ID from a scanned form image. * Tries QR code detection first, then falls back to regex text patterns. */ declare function detectUniqueId(image: ImageInput): Promise; /** * Merge online responses with paper form extractions. * Deduplicates by unique ID. */ interface MergeOptions { /** Strategy when same field exists in both sources */ conflictResolution?: 'prefer-online' | 'prefer-paper' | 'highest-confidence'; } interface MergedRecord { [key: string]: unknown; _source: 'merged' | 'online' | 'paper'; _uniqueId: string | null; _mergeDetails?: Record; } /** * Merge online and paper-extracted responses. * Matches records by unique ID and combines fields. */ declare function mergeResponses(onlineData: Record[], paperExtractions: ExtractionResult[], options?: MergeOptions): MergedRecord[]; export { ExtractionResult, ExtractorConfig, type MergeOptions, type MergedRecord, createExtractor, detectUniqueId, mergeResponses };