UNPKG

tryaii-mcp-server

Version:

TryAII MCP Server - 15+ AI models with comparison, cost tracking, and collective intelligence

47 lines 1.33 kB
export interface AuthenticatedApiKey { keyId: string; userId: string; keyPrefix: string; permissions: string[]; isActive: boolean; userName?: string; userEmail?: string; keyDocument?: any; } export interface UsageStatsUpdate { totalRequests?: number; totalCost?: number; lastUsed?: Date; } export declare class CrossDatabaseService { /** * Validate API key and return authenticated user information */ validateApiKey(apiKey: string): Promise<AuthenticatedApiKey | null>; /** * Update usage statistics for an API key */ updateUsageStats(keyId: string, updates: UsageStatsUpdate): Promise<boolean>; /** * Create or update session in MCP database with real user data */ createOrUpdateSession(sessionData: { userId: string; apiKeyId: string; sessionType: string; metadata?: any; }): Promise<string | null>; /** * Get session by ID from MCP database */ getSession(sessionId: string, sessionType: string): Promise<any | null>; /** * Test connections to both databases */ testConnections(): Promise<{ main: boolean; mcp: boolean; }>; } export declare const crossDatabaseService: CrossDatabaseService; //# sourceMappingURL=CrossDatabaseService.d.ts.map