/** * Recoder.xyz Unified SDK * Cross-platform SDK for all Recoder platforms */ import { EventEmitter } from 'events'; import { AuthClient } from './auth-client'; import { WebSocketClient } from './websocket-client'; import { SyncClient } from './sync-client'; import { AIClient } from './ai-client'; export interface RecoderSDKConfig { baseURL?: string; webSocketURL?: string; platform: 'cli' | 'web' | 'mobile' | 'extension' | 'desktop'; deviceName?: string; enableWebSocket?: boolean; enableAutoSync?: boolean; apiKey?: string; debug?: boolean; } export interface AIProvider { name: string; status: 'healthy' | 'degraded' | 'offline' | 'error'; responseTime?: number; errorRate?: number; uptime?: number; } export interface AIProviderRecommendation { taskType: string; recommended: { provider: string; name: string; reason: string; status: string; }; fallbacks: Array<{ provider: string; name: string; status: string; }>; } export interface AnalyticsData { eventType: 'api_call' | 'code_generation' | 'authentication' | 'sync' | 'ai_request'; provider?: string; tokens?: number; cost?: number; duration?: number; success?: boolean; metadata?: any; } export declare class RecoderSDK extends EventEmitter { private config; private api; auth: AuthClient; websocket?: WebSocketClient; sync?: SyncClient; ai: AIClient; constructor(config: RecoderSDKConfig); private setupAPIInterceptors; private initializeClients; private setupEventForwarding; private onAuthenticated; private onLogout; initialize(): Promise; connect(): Promise; disconnect(): void; getAIProviderStatus(): Promise; healthCheckAIProviders(): Promise<{ providers: any; overall: any; }>; getAIProviderRecommendation(taskType: 'coding' | 'blockchain' | 'security' | 'analysis' | 'chat' | 'generation', priority?: 'speed' | 'cost' | 'quality'): Promise; getAIProviderCosts(timeframe?: 'hour' | 'day' | 'week' | 'month'): Promise; trackAnalytics(data: AnalyticsData): Promise; getAnalyticsDashboard(timeframe?: 'hour' | 'day' | 'week' | 'month'): Promise; getPerformanceMetrics(): Promise; getRealTimeAnalytics(): Promise; sendNotification(type: 'info' | 'success' | 'warning' | 'error' | 'system', title: string, message: string, data?: any): Promise; broadcastNotification(channel: string, event: string, type: 'info' | 'success' | 'warning' | 'error' | 'system', title: string, message: string, data?: any): Promise; isReady(): boolean; getStatus(): any; switchToPlatform(targetPlatform: string, context?: any): Promise; startCollaboration(projectId: string): Promise; stopCollaboration(projectId: string): Promise; private getVersion; private getPlatformDetails; private handleError; } export declare function createWebSDK(config?: Partial): RecoderSDK; export declare function createCLISDK(config?: Partial): RecoderSDK; export declare function createMobileSDK(config?: Partial): RecoderSDK; export declare function createDesktopSDK(config?: Partial): RecoderSDK; export declare function createExtensionSDK(config?: Partial): RecoderSDK; export default RecoderSDK; //# sourceMappingURL=recoder-sdk.d.ts.map