/** * Structured Parser - Parse documents with Zod schema validation */ import { ZodType } from 'zod'; import { VisionParser } from '../vision-parser'; import { StructuredParseOptions, StructuredParseResult, ValidationResult } from './zod-interfaces'; export declare class StructuredParser { private parser; constructor(parser: VisionParser); /** * Parse a document (PDF or Image) with structured output and Zod validation * Automatically detects file type based on extension */ parse(filePath: string, options: StructuredParseOptions): Promise>>; /** * Parse a PDF with structured output and Zod validation */ parsePDFWithSchema(pdfPath: string, options: StructuredParseOptions): Promise>>; /** * Parse an image with structured output and Zod validation */ parseImageWithSchema(imagePath: string, options: StructuredParseOptions): Promise>>; /** * Validate extracted data against schema */ validate(data: unknown, schema: T): ValidationResult>; /** * Generate schema-guided prompt */ private generateSchemaPrompt; /** * Generate retry prompt with error feedback */ private generateRetryPrompt; /** * Extract JSON from vision parser result */ private extractJsonFromResult; /** * Clean up JSON text (remove markdown code blocks, etc.) */ private cleanJsonText; /** * Attempt to fix common JSON issues */ private attemptJsonFix; } //# sourceMappingURL=structured-parser.d.ts.map