import type { Optional } from "@johnqh/types"; import type { WildduckConfig, WildduckMessage, WildduckMessageResponse } from "@johnqh/types"; interface GetMessagesOptions { limit?: number; page?: number; order?: "asc" | "desc"; search?: string; thread?: string; } interface SendMessageParams { from?: string; to: Array<{ name?: string; address: string; }>; cc?: Array<{ name?: string; address: string; }>; bcc?: Array<{ name?: string; address: string; }>; subject: string; text?: string; html?: string; attachments?: Array<{ filename: string; content: string | Buffer; contentType?: string; }>; inReplyTo?: string; references?: string[]; } interface UpdateMessageParams { seen?: boolean; flagged?: boolean; deleted?: boolean; mailbox?: string; } interface UseWildduckMessagesReturn { messages: WildduckMessage[]; totalMessages: number; currentPage: number; isLoading: boolean; error: Optional; getMessages: (userId: string, mailboxId: string, options?: GetMessagesOptions) => Promise; getMessage: (userId: string, messageId: string) => Promise; searchMessages: (userId: string, query: string, options?: GetMessagesOptions) => Promise; refresh: () => Promise; sendMessage: (userId: string, params: SendMessageParams) => Promise<{ success: boolean; id: string; }>; isSending: boolean; sendError: Optional; updateMessage: (userId: string, messageId: string, params: UpdateMessageParams) => Promise<{ success: boolean; }>; isUpdating: boolean; updateError: Optional; deleteMessage: (userId: string, messageId: string) => Promise<{ success: boolean; }>; isDeleting: boolean; deleteError: Optional; moveMessage: (userId: string, messageId: string, targetMailbox: string) => Promise<{ success: boolean; }>; isMoving: boolean; moveError: Optional; clearError: () => void; } declare const useWildduckMessages: (config: WildduckConfig, _devMode?: boolean) => UseWildduckMessagesReturn; export { useWildduckMessages, type GetMessagesOptions, type SendMessageParams, type UpdateMessageParams, type UseWildduckMessagesReturn, }; //# sourceMappingURL=useWildduckMessages.d.ts.map