/** * AriaCore - Main entry point for the Aria SDK * * This class provides a simple, function-based API for initializing and controlling * the Aria AI assistant. All session management is handled internally. * * @example * ```typescript * import { Aria } from '@centive/aria-sdk'; * * // Initialize the SDK * Aria.init({ * websocketUrl: 'wss://your-server.com/ws', * userId: 'user_123', * theme: 'light', * onError: (err) => console.error(err), * }); * * // Programmatic control * Aria.open(); // Open the assistant * Aria.close(); // Close the assistant * Aria.destroy(); // Cleanup when done * ``` */ import type { AriaInitConfig } from '@/types'; export declare class AriaCore { /** * Initialize the Aria SDK with the given configuration. * This sets up the WebSocket connection, session management, and UI components. * * @param config - Configuration options for the SDK * @throws Error if already initialized (call destroy() first) * * @example * ```typescript * Aria.init({ * websocketUrl: 'wss://your-server.com/ws', * userId: 'user_123', * theme: 'dark', * triggerLabel: 'Help', * onError: (err) => console.error('Aria error:', err), * }); * ``` */ static init(config: AriaInitConfig): void; /** * Open the Aria assistant widget. * * @param mode - Optional trigger mode ('user' for bottom-right, 'websocket' for center) * * @example * ```typescript * Aria.open(); // Open in default position * Aria.open('websocket'); // Open in center (like incoming call) * ``` */ static open(mode?: 'user' | 'websocket'): void; /** * Close the Aria assistant widget. * * @example * ```typescript * Aria.close(); * ``` */ static close(): void; /** * Minimize the Aria assistant widget to a compact floating state. * * @example * ```typescript * Aria.minimize(); * ``` */ static minimize(): void; /** * Maximize the Aria assistant widget from minimized state. * * @example * ```typescript * Aria.maximize(); * ``` */ static maximize(): void; /** * Check if the Aria SDK is initialized. * * @returns true if initialized, false otherwise */ static isInitialized(): boolean; /** * Check if the assistant widget is currently open. * * @returns true if open, false otherwise */ static isOpen(): boolean; /** * Get the current session ID if available. * * @returns Session ID or null if no active session */ static getSessionId(): string | null; /** * Get the current connection status. * * @returns true if WebSocket is connected, false otherwise */ static isConnected(): boolean; /** * Manually refresh the session token. * Usually not needed as the SDK auto-refreshes before expiry. * * @example * ```typescript * await Aria.refreshSession(); * ``` */ static refreshSession(): Promise; /** * Destroy the Aria SDK instance and clean up all resources. * Call this when you want to completely remove Aria from your app. * * @example * ```typescript * Aria.destroy(); * ``` */ static destroy(): void; /** * Convert simplified AriaInitConfig to full AriaSDKConfig */ private static buildFullConfig; /** * Mount the Aria UI components to the DOM */ private static mountUI; /** * Render React UI components */ private static renderReactUI; /** * Unmount the Aria UI components from the DOM */ private static unmountUI; } export default AriaCore; //# sourceMappingURL=AriaCore.d.ts.map