/** * AuraGlass AI API Client * * Easy-to-use client for accessing production AI features from React components. * Handles authentication, error handling, and request/response formatting. */ export interface AIClientConfig { apiUrl?: string; wsUrl?: string; getAuthToken?: () => Promise; onError?: (error: Error) => void; } export declare class AIClientError extends Error { readonly status?: number; readonly code?: string; readonly provider?: string; readonly feature?: string; readonly docsUrl?: string; readonly details?: unknown; constructor(message: string, options?: { status?: number; code?: string; provider?: string; feature?: string; docsUrl?: string; details?: unknown; }); } export interface FormFieldSuggestion { fieldName: string; fieldType: "text" | "email" | "password" | "number" | "date" | "select" | "checkbox" | "radio" | "textarea" | "file"; label: string; placeholder?: string; required: boolean; validation?: { minLength?: number; maxLength?: number; pattern?: string; customMessage?: string; }; options?: Array<{ value: string; label: string; }>; } export interface SearchResult { id: string; content: string; metadata: Record; score: number; highlights?: string[]; } export interface ImageAnalysis { faces?: Array<{ boundingBox: { left: number; top: number; width: number; height: number; }; confidence: number; emotions: { joy: number; sorrow: number; anger: number; surprise: number; }; }>; objects?: Array<{ name: string; confidence: number; boundingBox: { left: number; top: number; width: number; height: number; }; }>; text?: { text: string; confidence: number; blocks: Array<{ text: string; confidence: number; boundingBox: any; }>; }; labels?: Array<{ description: string; score: number; }>; safeSearch?: { adult: string; violence: string; medical: string; }; colors?: Array<{ color: { red: number; green: number; blue: number; }; score: number; pixelFraction: number; }>; } declare class AIClient { private config; private authToken; constructor(config?: AIClientConfig); /** * Set authentication token for API requests */ setAuthToken(token: string | null): void; /** * Make authenticated API request */ private request; /** * Login with email and password */ login(email: string, password: string): Promise<{ token: string; refreshToken: string; user: { id: string; email: string; name?: string; role: string; permissions: string[]; }; }>; /** * Register new user */ register(email: string, password: string, name?: string): Promise; /** * Refresh authentication token */ refreshToken(refreshToken: string): Promise<{ token: string; }>; /** * Logout current user */ logout(): Promise; /** * Generate smart form fields based on context * * @example * const fields = await client.generateFormFields('user registration form'); */ generateFormFields(context: string, existingFields?: FormFieldSuggestion[]): Promise; /** * Perform semantic search with AI-enhanced query * * @example * const results = await client.search('how to add glassmorphism', { limit: 10 }); */ search(query: string, options?: { limit?: number; semanticWeight?: number; keywordWeight?: number; }): Promise<{ results: SearchResult[]; enhancedQuery: string; intent: string; totalResults: number; }>; /** * Index documents for semantic search * * @example * await client.indexDocuments([ * { id: '1', content: 'Document content...', title: 'Doc 1' } * ]); */ indexDocuments(documents: Array<{ id: string; content: string; title?: string; metadata?: Record; tags?: string[]; }>): Promise<{ success: boolean; indexed: number; }>; /** * Analyze image with Google Vision API * * @example * const analysis = await client.analyzeImage(base64Image, ['faces', 'objects']); */ analyzeImage(imageData: string, analysisTypes?: ("faces" | "objects" | "text" | "labels" | "all")[]): Promise; /** * Remove background from image * * @example * const processedImage = await client.removeBackground(base64Image); */ removeBackground(imageData: string): Promise; /** * Generate content summary * * @example * const summary = await client.summarize(longText, 200); */ summarize(content: string, maxLength?: number): Promise; /** * Check server health */ healthCheck(): Promise<{ status: string; timestamp: string; uptime: number; services: Record; features: Record; }>; } export declare const aiClient: AIClient; export default AIClient; //# sourceMappingURL=ai-client.d.ts.map