import type { OpenAPIPath } from '@redocly/openapi-docs/src/types'; import type { McpServer } from '@redocly/mcp-typescript-sdk/server/mcp.js'; import type { StreamableHTTPServerTransport } from '@redocly/mcp-typescript-sdk/server/streamableHttp.js'; import type { CallToolResult } from '@redocly/mcp-typescript-sdk/types.js'; import type { OpenAPIServer } from '@redocly/openapi-docs/lib/types/open-api.js'; import type { McpErrorCodes, McpServerType } from './constants'; import type { RbacConfig, PageStaticData } from '@redocly/config'; type ObjectValues = T[keyof T]; export type McpServerType = ObjectValues; export type McpErrorCodeTypes = ObjectValues; export type AccessInfo = { isAuthenticated: boolean; email?: string; teams?: string[]; rbac: RbacConfig; requiresLogin: boolean; }; export type ApiDescriptionInfo = { name: string; relativePath: string; description?: string; version?: string; servers?: OpenAPIServer[]; }; export type McpDocsStaticDataPropsConfig = { mcpDocsServerName: string; apiDescriptionsMap: Record; }; export type McpDocsStaticData = PageStaticData & { props: { config: McpDocsStaticDataPropsConfig; }; }; export type McpPath = { 'x-mcp'?: XMcpConfig; } & OpenAPIPath; export type XMcpConfig = { docs?: { hide?: boolean; }; }; export type McpEndpoint = { 'x-mcp'?: XMcpConfig; [key: string]: any; }; export type McpServerInstance = { readonly server: McpServer; readonly transport: StreamableHTTPServerTransport; cleanup(): Promise; }; export type McpPluginConfig = { readonly hide: boolean; readonly docs: { readonly hide: boolean; readonly name: string; readonly ignore: readonly string[]; }; }; export type DocsServerDependencies = { apiDescriptionsMap: Record; readonly name: string; }; export type McpUserInfo = { email?: string; name?: string; sub?: string; aud?: string | string[]; client_id?: string; scope?: string; iat?: number; exp?: number; [key: string]: any; }; export type ToolArgsMap = { 'list-apis': { filter?: string; page?: number; limit?: number; }; 'get-endpoints': { name: string; }; 'get-endpoint-info': { name: string; path: string; method: string; }; 'get-security-schemes': { name: string; }; 'get-full-api-description': { name: string; }; search: { query: string; product?: string; }; whoami: Record; }; export type McpToolWorkerParams = { [K in keyof ToolArgsMap]: { toolName: K; args: ToolArgsMap[K]; context: { apiDescriptionsMap: Record; outdir?: string; accessInfo?: AccessInfo; baseUrl?: string; headers?: Record; products?: string[]; }; }; }[keyof ToolArgsMap]; export type SemanticSearchResult = { title: string; url: string; content: string; }; export type McpToolWorkerResponse = CallToolResult; export {}; //# sourceMappingURL=types.d.ts.map