UNPKG

openapi-directory-mcp

Version:

Model Context Protocol server for accessing enhanced triple-source OpenAPI directory (APIs.guru + additional APIs + custom imports)

121 lines 2.95 kB
/** * Manifest manager for custom OpenAPI specifications * Handles indexing, storage paths, and metadata management */ import { CustomSpecEntry, CustomSpecPaths } from "./types.js"; export declare class ManifestManager { private paths; private manifest; constructor(); /** * Initialize storage paths with validation */ private initializePaths; /** * Ensure directories exist */ private ensureDirectories; /** * Load manifest from disk with validation */ private loadManifest; /** * Create empty manifest */ private createEmptyManifest; /** * Save manifest to disk with validation */ private saveManifest; /** * Add a spec to the manifest */ addSpec(entry: CustomSpecEntry): void; /** * Remove a spec from the manifest */ removeSpec(id: string): boolean; /** * Update a spec in the manifest */ updateSpec(id: string, updates: Partial<CustomSpecEntry>): boolean; /** * Get a spec from the manifest */ getSpec(id: string): CustomSpecEntry | undefined; /** * List all specs in the manifest */ listSpecs(): CustomSpecEntry[]; /** * Check if a spec exists */ hasSpec(id: string): boolean; /** * Check if a name/version combination exists */ hasNameVersion(name: string, version: string): boolean; /** * Get storage paths */ getPaths(): CustomSpecPaths; /** * Store spec file on disk with validation */ storeSpecFile(name: string, version: string, content: string): string; /** * Read spec file from disk with validation */ readSpecFile(name: string, version: string): string; /** * Delete spec file from disk with validation */ deleteSpecFile(name: string, version: string): boolean; /** * Get file size of a spec with validation */ getSpecFileSize(name: string, version: string): number; /** * Generate unique spec ID */ generateSpecId(name: string, version: string): string; /** * Parse spec ID into components */ parseSpecId(id: string): { provider: string; name: string; version: string; } | null; /** * Get manifest statistics */ getStats(): { totalSpecs: number; totalSize: number; byFormat: { yaml: number; json: number; }; bySource: { file: number; url: number; }; lastUpdated: string; }; /** * Validate manifest integrity with path validation */ validateIntegrity(): { valid: boolean; issues: string[]; }; /** * Repair manifest integrity issues */ repairIntegrity(): { repaired: string[]; failed: string[]; }; } //# sourceMappingURL=manifest-manager.d.ts.map