/**
 * Offline Queue
 *
 * Buffers outbound messages when a channel is disconnected.
 * Messages can be drained and sent when the channel reconnects.
 *
 * Features:
 * - FIFO message buffering
 * - Configurable maximum queue size
 * - Oldest messages dropped when queue is full
 * - Drain returns all queued messages in order
 */
/**
 * A queued message waiting to be delivered
 */
export interface QueuedMessage {
    /** Target channel/conversation ID */
    channelId: string;
    /** Message content */
    content: string;
    /** Optional metadata */
    metadata?: Record<string, unknown>;
    /** Timestamp when the message was queued */
    queuedAt: Date;
}
/**
 * Buffers messages for later delivery when a channel is offline.
 *
 * Usage:
 * ```typescript
 * const queue = new OfflineQueue(50);
 *
 * // When disconnected, queue outgoing messages
 * queue.enqueue({ channelId: '123', content: 'Hello' });
 *
 * // When reconnected, drain and send
 * const messages = queue.drain();
 * for (const msg of messages) {
 *   await channel.send(msg);
 * }
 * ```
 */
export declare class OfflineQueue {
    private readonly maxSize;
    private queue;
    /**
     * @param maxSize - Maximum number of messages to buffer (default: 100).
     *                  When exceeded, oldest messages are dropped.
     */
    constructor(maxSize?: number);
    /**
     * Queue a message for later delivery.
     *
     * @param message - The message to enqueue (channelId, content, optional metadata)
     * @returns true if the message was queued, false if it replaced an older message
     */
    enqueue(message: {
        channelId: string;
        content: string;
        metadata?: Record<string, unknown>;
    }): boolean;
    /**
     * Drain all queued messages.
     *
     * Returns all queued messages in FIFO order and clears the queue.
     */
    drain(): QueuedMessage[];
    /**
     * Get the current queue size.
     */
    size(): number;
    /**
     * Clear all queued messages without returning them.
     */
    clear(): void;
    /**
     * Peek at the next message without removing it.
     */
    peek(): QueuedMessage | undefined;
    /**
     * Check if the queue is empty.
     */
    isEmpty(): boolean;
    /**
     * Check if the queue is full.
     */
    isFull(): boolean;
    /**
     * Get the maximum queue size.
     */
    getMaxSize(): number;
}
