@kya-os/mcp-i
Version:
COMING SOON:Production-ready MCP Identity with automatic registration, key rotation, and optimized performance
36 lines (35 loc) • 1.34 kB
TypeScript
export interface TransportOptions {
timeout?: number;
headers?: Record<string, string>;
}
export interface TransportResponse<T = any> {
data: T;
status: number;
headers: Record<string, string>;
}
export interface Transport {
post<T = any>(url: string, data: any, options?: TransportOptions): Promise<TransportResponse<T>>;
get<T = any>(url: string, options?: TransportOptions): Promise<TransportResponse<T>>;
}
export declare class FetchTransport implements Transport {
post<T = any>(url: string, data: any, options?: TransportOptions): Promise<TransportResponse<T>>;
get<T = any>(url: string, options?: TransportOptions): Promise<TransportResponse<T>>;
}
export declare class AxiosTransport implements Transport {
private axiosInstance;
post<T = any>(url: string, data: any, options?: TransportOptions): Promise<TransportResponse<T>>;
get<T = any>(url: string, options?: TransportOptions): Promise<TransportResponse<T>>;
private getAxios;
}
export declare class RuntimeDetector {
static isEdgeRuntime(): boolean;
static isNodeRuntime(): boolean;
static isNextJs(): boolean;
static hasFetch(): boolean;
static isLambda(): boolean;
}
export declare class TransportFactory {
static create(options?: {
transport?: 'axios' | 'fetch' | 'auto';
}): Transport;
}