@spaik/mcp-server-roi
Version:
MCP server for AI ROI prediction and tracking with Monte Carlo simulations
63 lines • 1.93 kB
TypeScript
import { CircuitBreakerOptions } from '../utils/circuit-breaker.js';
/**
* Protected API client with circuit breaker and rate limiting
*/
export declare class ProtectedApiClient {
private serviceName;
private baseUrl;
private defaultHeaders;
private circuitBreakerOptions;
constructor(config: {
serviceName: string;
baseUrl: string;
apiKey?: string;
defaultHeaders?: Record<string, string>;
circuitBreakerOptions?: Partial<CircuitBreakerOptions>;
});
/**
* Make a protected API request
*/
request<T>(endpoint: string, options?: {
method?: 'GET' | 'POST' | 'PUT' | 'DELETE';
body?: any;
headers?: Record<string, string>;
correlationId?: string;
useFallback?: boolean;
}): Promise<T>;
/**
* Check if the service is available
*/
isAvailable(): boolean;
/**
* Get circuit breaker statistics
*/
getStats(): import("../utils/circuit-breaker.js").CircuitBreakerStats;
}
/**
* Create protected API clients for all external services
*/
export declare const protectedClients: {
perplexity: ProtectedApiClient;
financialModelingPrep: ProtectedApiClient;
dutchGovAPI: ProtectedApiClient;
};
/**
* Enhanced Sonar client with circuit breaker
*/
export declare class ProtectedSonarClient extends ProtectedApiClient {
constructor(apiKey: string);
chat(messages: any[], options?: any): Promise<unknown>;
}
/**
* Health check endpoint data
*/
export declare function getApiHealth(): {
services: {
perplexity: import("../utils/circuit-breaker.js").CircuitBreakerStats;
financialModelingPrep: import("../utils/circuit-breaker.js").CircuitBreakerStats;
dutchGovAPI: import("../utils/circuit-breaker.js").CircuitBreakerStats;
};
overallHealth: boolean;
timestamp: string;
};
//# sourceMappingURL=protected-api-client.d.ts.map