multimind-sdk
Version:
This SDK gives JavaScript/TypeScript developers full access to advanced AI features like agent orchestration, RAG, and fine-tuning — without needing to manage backend code.
66 lines • 1.94 kB
TypeScript
export interface GatewayConfig {
host?: string;
port?: number;
enableMiddleware?: boolean;
corsEnabled?: boolean;
rateLimit?: number;
authentication?: boolean;
}
export interface APIRoute {
path: string;
method: 'GET' | 'POST' | 'PUT' | 'DELETE';
handler: string;
middleware?: string[];
}
export declare class MultiMindGateway {
private gateway;
private config;
constructor(config?: GatewayConfig);
initialize(): Promise<{
success: boolean;
message: string;
}>;
private setupDefaultRoutes;
addRoute(route: APIRoute): Promise<{
success: boolean;
message: string;
}>;
removeRoute(path: string, method: string): Promise<{
success: boolean;
message: string;
}>;
start(): Promise<{
success: boolean;
message: string;
url: string;
}>;
stop(): Promise<{
success: boolean;
message: string;
}>;
getStatus(): Promise<any>;
getRoutes(): Promise<any>;
addMiddleware(middleware: string, position?: 'before' | 'after'): Promise<{
success: boolean;
message: string;
}>;
removeMiddleware(middleware: string): Promise<{
success: boolean;
message: string;
}>;
updateConfig(updates: Partial<GatewayConfig>): Promise<{
success: boolean;
message: string;
}>;
}
export declare class RequestMiddleware {
static logRequest(request: any): Promise<void>;
static validateRequest(request: any, schema: any): Promise<any>;
static rateLimit(request: any, limit: number): Promise<any>;
}
export declare class ResponseMiddleware {
static logResponse(response: any): Promise<void>;
static formatResponse(response: any, format: 'json' | 'xml' | 'yaml'): Promise<any>;
static addHeaders(response: any, headers: Record<string, string>): Promise<any>;
}
//# sourceMappingURL=gateway.d.ts.map