export type MCPErrorLevel = 'validation' | 'auth' | 'rateLimit' | 'api' | 'system'; export interface MCPError { code: string; message: string; level: MCPErrorLevel; hint?: string; detail?: unknown; retryable?: boolean; retryAfter?: number; } export interface FieldPreset { minimal: string[]; basic: string[]; full?: string[]; } export interface APICallParams { api_name: string; params: Record; fields?: string[]; fields_preset?: 'minimal' | 'basic' | 'full'; paginate?: boolean; limit?: number; offset?: number; max_rows?: number; transform?: 'object' | 'raw'; } export interface APISchema { name: string; title: string; description?: string; inputs: Array<{ name: string; type: string; required: boolean; description?: string; example?: unknown; }>; outputs: Array<{ name: string; type: string; description?: string; }>; presets?: Record<'minimal' | 'basic', string[]>; } export interface APISearchResult { name: string; title: string; description?: string; score: number; commonFields?: string[]; } export interface BatchCallRequest { calls: Array<{ id: string; api_name: string; params: Record; fields?: string[]; fields_preset?: 'minimal' | 'basic' | 'full'; }>; max_concurrency?: number; } export interface BatchCallResponse { results: Array<{ id: string; success: boolean; data?: unknown[]; error?: MCPError; }>; } export interface MCPMetrics { requestCount: number; errorRate: number; avgResponseTime: number; cacheHitRate: number; topUsedAPIs: Array<{ api: string; count: number; }>; lastUpdated: Date; } export interface RateLimitState { windowStart: number; requestCount: number; nextResetTime: number; } export interface RetryConfig { maxRetries: number; baseDelayMs: number; maxDelayMs: number; backoffFactor: number; jitter: boolean; } export interface PaginationState { currentOffset: number; totalFetched: number; hasMore: boolean; maxRows?: number; } //# sourceMappingURL=types.d.ts.map