/** * Options for Word document text extraction */ export interface WordExtractOptions { /** * Preserve formatting (paragraphs, line breaks) * @default true */ preserveFormatting?: boolean; /** * Include style information * @default false */ includeStyleInfo?: boolean; } /** * Result of Word document text extraction */ export interface WordExtractResult { /** * Extracted text content */ text: string; /** * Metadata if available */ metadata?: { [key: string]: any; }; /** * Any warnings from the extraction process */ warnings?: string[]; } /** * Result of Word document metadata extraction */ export interface WordMetadataResult { fileName: string; filePath: string; fileSize: number; lastModified: Date; /** * Additional metadata from document properties */ properties?: { [key: string]: any; }; } /** * Parser for Word (docx) documents */ export declare class WordParser { /** * Extract text from a Word document * * @param filePath - Absolute path to the .docx file * @param options - Extraction options * @returns Extracted text and metadata * * @example * ```typescript * const parser = new WordParser(); * const result = await parser.extractText('document.docx'); * console.log(result.text); * ``` */ extractText(filePath: string, options?: WordExtractOptions): Promise; /** * Extract HTML from a Word document * * @param filePath - Absolute path to the .docx file * @returns HTML content */ extractHTML(filePath: string): Promise; /** * Get metadata from a Word document * * @param filePath - Absolute path to the .docx file * @returns Document metadata * * @example * ```typescript * const parser = new WordParser(); * const metadata = await parser.getMetadata('document.docx'); * console.log(metadata.fileSize); * ``` */ getMetadata(filePath: string): Promise; /** * Search for text in a Word document * * @param filePath - Absolute path to the .docx file * @param query - Search query * @param caseSensitive - Whether the search should be case-sensitive * @returns Array of match positions and context */ searchText(filePath: string, query: string, caseSensitive?: boolean): Promise>; } //# sourceMappingURL=WordParser.d.ts.map