import { StoreDefinition, PiniaCustomStateProperties } from 'pinia'; export const useChatStore: StoreDefinition<"chat", { enabled: boolean; loaded: boolean; hasCredentials: boolean; connectionState: string; lastError: any; rooms: any[]; currentRoomId: any; messagesByRoom: {}; unreadCounts: {}; typingByRoom: {}; currentUser: any; _webSocket: any; }, { /** * Returns the current room object */ currentRoom: (state: { enabled: boolean; loaded: boolean; hasCredentials: boolean; connectionState: string; lastError: any; rooms: any[]; currentRoomId: any; messagesByRoom: {}; unreadCounts: {}; typingByRoom: {}; currentUser: any; _webSocket: any; } & PiniaCustomStateProperties<{ enabled: boolean; loaded: boolean; hasCredentials: boolean; connectionState: string; lastError: any; rooms: any[]; currentRoomId: any; messagesByRoom: {}; unreadCounts: {}; typingByRoom: {}; currentUser: any; _webSocket: any; }>) => any; /** * Returns messages for the current room */ currentMessages: (state: { enabled: boolean; loaded: boolean; hasCredentials: boolean; connectionState: string; lastError: any; rooms: any[]; currentRoomId: any; messagesByRoom: {}; unreadCounts: {}; typingByRoom: {}; currentUser: any; _webSocket: any; } & PiniaCustomStateProperties<{ enabled: boolean; loaded: boolean; hasCredentials: boolean; connectionState: string; lastError: any; rooms: any[]; currentRoomId: any; messagesByRoom: {}; unreadCounts: {}; typingByRoom: {}; currentUser: any; _webSocket: any; }>) => any; /** * Returns typing users for the current room */ currentTypingUsers: (state: { enabled: boolean; loaded: boolean; hasCredentials: boolean; connectionState: string; lastError: any; rooms: any[]; currentRoomId: any; messagesByRoom: {}; unreadCounts: {}; typingByRoom: {}; currentUser: any; _webSocket: any; } & PiniaCustomStateProperties<{ enabled: boolean; loaded: boolean; hasCredentials: boolean; connectionState: string; lastError: any; rooms: any[]; currentRoomId: any; messagesByRoom: {}; unreadCounts: {}; typingByRoom: {}; currentUser: any; _webSocket: any; }>) => any; /** * Returns the total unread count across all rooms */ totalUnreadCount: (state: { enabled: boolean; loaded: boolean; hasCredentials: boolean; connectionState: string; lastError: any; rooms: any[]; currentRoomId: any; messagesByRoom: {}; unreadCounts: {}; typingByRoom: {}; currentUser: any; _webSocket: any; } & PiniaCustomStateProperties<{ enabled: boolean; loaded: boolean; hasCredentials: boolean; connectionState: string; lastError: any; rooms: any[]; currentRoomId: any; messagesByRoom: {}; unreadCounts: {}; typingByRoom: {}; currentUser: any; _webSocket: any; }>) => any; /** * Returns true if chat is available and connected */ isReady: (state: { enabled: boolean; loaded: boolean; hasCredentials: boolean; connectionState: string; lastError: any; rooms: any[]; currentRoomId: any; messagesByRoom: {}; unreadCounts: {}; typingByRoom: {}; currentUser: any; _webSocket: any; } & PiniaCustomStateProperties<{ enabled: boolean; loaded: boolean; hasCredentials: boolean; connectionState: string; lastError: any; rooms: any[]; currentRoomId: any; messagesByRoom: {}; unreadCounts: {}; typingByRoom: {}; currentUser: any; _webSocket: any; }>) => boolean; /** * Returns true if currently connecting */ isConnecting: (state: { enabled: boolean; loaded: boolean; hasCredentials: boolean; connectionState: string; lastError: any; rooms: any[]; currentRoomId: any; messagesByRoom: {}; unreadCounts: {}; typingByRoom: {}; currentUser: any; _webSocket: any; } & PiniaCustomStateProperties<{ enabled: boolean; loaded: boolean; hasCredentials: boolean; connectionState: string; lastError: any; rooms: any[]; currentRoomId: any; messagesByRoom: {}; unreadCounts: {}; typingByRoom: {}; currentUser: any; _webSocket: any; }>) => boolean; /** * Returns true if reconnecting */ isReconnecting: (state: { enabled: boolean; loaded: boolean; hasCredentials: boolean; connectionState: string; lastError: any; rooms: any[]; currentRoomId: any; messagesByRoom: {}; unreadCounts: {}; typingByRoom: {}; currentUser: any; _webSocket: any; } & PiniaCustomStateProperties<{ enabled: boolean; loaded: boolean; hasCredentials: boolean; connectionState: string; lastError: any; rooms: any[]; currentRoomId: any; messagesByRoom: {}; unreadCounts: {}; typingByRoom: {}; currentUser: any; _webSocket: any; }>) => boolean; /** * Returns true if chat feature is available for use */ isAvailable: (state: { enabled: boolean; loaded: boolean; hasCredentials: boolean; connectionState: string; lastError: any; rooms: any[]; currentRoomId: any; messagesByRoom: {}; unreadCounts: {}; typingByRoom: {}; currentUser: any; _webSocket: any; } & PiniaCustomStateProperties<{ enabled: boolean; loaded: boolean; hasCredentials: boolean; connectionState: string; lastError: any; rooms: any[]; currentRoomId: any; messagesByRoom: {}; unreadCounts: {}; typingByRoom: {}; currentUser: any; _webSocket: any; }>) => boolean; }, { /** * Initializes the chat store. * Checks if the feature is enabled and credentials are available. */ init(): Promise; /** * Connects to the Rocket.Chat WebSocket server. */ connect(): Promise; /** * Disconnects from the WebSocket server. */ disconnect(): void; /** * Loads the user's subscribed rooms. */ loadRooms(): Promise; /** * Selects a room and loads its messages. * * @param {string} roomId - The room ID to select */ selectRoom(roomId: string): Promise; /** * Loads messages for a room. * * @param {string} roomId - The room ID * @param {Object} options - Load options */ loadMessages(roomId: string, options?: any): Promise; /** * Sends a message to the current room. * * @param {string} text - The message text */ sendMessage(text: string): Promise; /** * Marks a room as read. * * @param {string} roomId - The room ID */ markAsRead(roomId: string): Promise; /** * Handles a new incoming message. * * @param {Object} message - The message object */ handleNewMessage(message: any): void; /** * Handles typing indicator updates. * * @param {string} username - The username * @param {boolean} isTyping - Whether the user is typing */ handleTypingIndicator(username: string, isTyping: boolean): void; /** * Sends typing indicator. * * @param {boolean} isTyping - Whether the user is typing */ sendTypingIndicator(isTyping: boolean): void; /** * Gets or creates a room for a workspace. * * @param {string} siteId - The Alfresco site ID * @returns {Promise} Room info or null */ getOrCreateWorkspaceRoom(siteId: string): Promise; /** * Uploads a file to the current room. * * @param {File} file - The file to upload * @param {string} description - Optional description */ uploadFile(file: File, description?: string): Promise; /** * Clears all chat data. */ clear(): void; }>; //# sourceMappingURL=chat.d.ts.map