UNPKG

defect-inspection-tools-mcp-server

Version:

Defect inspection tools server handling defect detection, analysis, and reporting with AI/ML capabilities for quality control

63 lines (62 loc) 1.74 kB
import { ExternalApiService } from '../services/external-api-service.js'; export interface DocumentParseResult { content: string; metadata: { title?: string; author?: string; pages?: number; language?: string; fileSize?: number; mimeType?: string; extractedAt: Date; }; sections?: { heading: string; content: string; level: number; }[]; tables?: { headers: string[]; rows: string[][]; }[]; links?: { url: string; text: string; }[]; } export interface DocumentParseOptions { maxContentLength?: number; extractTables?: boolean; extractLinks?: boolean; extractSections?: boolean; allowedMimeTypes?: string[]; timeout?: number; } export declare class DocumentParser { private static readonly DEFAULT_OPTIONS; private externalApiService; constructor(externalApiService: ExternalApiService); parseDocumentFromUrl(url: string, options?: DocumentParseOptions): Promise<DocumentParseResult>; private parsePdf; private parseHtml; private parseMarkdown; private parseText; private isValidUrl; private isAllowedMimeType; private extractTextFromPdf; private stripHtmlTags; private extractHtmlTitle; private extractHtmlSections; private extractHtmlTables; private extractHtmlLinks; private stripMarkdownFormatting; private extractMarkdownTitle; private extractMarkdownSections; private extractMarkdownTables; private extractMarkdownLinks; private extractSections; private extractTablesFromText; private extractLinksFromText; private extractTableHeaders; private extractTableRows; }