UNPKG

openapi-directory-mcp

Version:

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

113 lines 3.63 kB
import { ICacheManager } from "../cache/types.js"; import { ApiGuruAPI, ApiGuruMetrics, ApiGuruServices } from "../types/api.js"; /** * Secondary API client for the enhanced OpenAPI directory * Provides same interface as primary ApiClient for seamless merging */ export declare class SecondaryApiClient { private http; private cache; constructor(baseURL: string, cacheManager: ICacheManager); private fetchWithCache; /** * List all providers in the secondary directory */ getProviders(): Promise<{ data: string[]; }>; /** * List all APIs for a particular provider */ getProvider(provider: string): Promise<Record<string, ApiGuruAPI>>; /** * List all serviceNames for a particular provider */ getServices(provider: string): Promise<ApiGuruServices>; /** * Retrieve one version of a particular API (without service) */ getAPI(provider: string, api: string): Promise<ApiGuruAPI>; /** * Retrieve one version of a particular API with a serviceName */ getServiceAPI(provider: string, service: string, api: string): Promise<ApiGuruAPI>; /** * List all APIs in the secondary directory */ listAPIs(): Promise<Record<string, ApiGuruAPI>>; /** * Get basic metrics for the secondary directory */ getMetrics(): Promise<ApiGuruMetrics>; /** * Get OpenAPI specification for a specific API version */ getOpenAPISpec(url: string): Promise<any>; /** * Fetch with cache but without rate limiting (for internal calls) */ private fetchWithCacheNoRateLimit; /** * Check if the secondary API has data for a specific provider */ hasProvider(provider: string): Promise<boolean>; /** * Check if the secondary API has a specific API */ hasAPI(apiId: string): Promise<boolean>; /** * Get provider statistics for secondary source */ getProviderStats(provider: string): Promise<any>; /** * Get API summary by ID for secondary source */ getAPISummaryById(apiId: string): Promise<any>; /** * Search APIs in secondary source */ searchAPIs(query: string, limit?: number, page?: number): Promise<any>; /** * Get popular APIs from secondary source */ getPopularAPIs(limit?: number): Promise<any>; /** * Get recently updated APIs from secondary source */ getRecentlyUpdatedAPIs(limit?: number): Promise<any>; /** * Get endpoint details for secondary source */ getEndpointDetails(apiId: string, method: string, path: string): Promise<any>; /** * Get endpoint schema for secondary source */ getEndpointSchema(apiId: string, method: string, path: string): Promise<any>; /** * Get endpoint examples for secondary source */ getEndpointExamples(apiId: string, method: string, path: string): Promise<any>; /** * Get endpoints for a specific API from secondary source */ getAPIEndpoints(apiId: string, page?: number, limit?: number, tag?: string): Promise<{ results: Array<{ method: string; path: string; summary?: string; operationId?: string; tags: string[]; deprecated?: boolean; }>; pagination: { page: number; limit: number; total_results: number; total_pages: number; has_next: boolean; has_previous: boolean; }; available_tags: string[]; }>; } //# sourceMappingURL=secondary-client.d.ts.map