import { WhatsAppMessageQueue } from "../message-queue/redis-queue";
import { WhatsAppPubSubSystem } from "../pubsub/whatsapp-pubsub";
import { WhatsAppEventType } from "../../events/types/event-types";
import { WhatsAppEvent } from "../../events/types/event-interfaces";
export interface EventRoutingConfig {
    enablePubSubNotifications: boolean;
    criticalEventsBothSystems: boolean;
    pubSubRetryOnFailure: boolean;
}
/**
 * Router híbrido que decide si usar BullMQ, Pub/Sub o ambos
 * basado en la criticidad y tipo de evento
 */
export declare class HybridEventRouter {
    private bullMQ;
    private pubSub;
    private config;
    constructor(bullMQ: WhatsAppMessageQueue, pubSub: WhatsAppPubSubSystem, config?: Partial<EventRoutingConfig>);
    /**
     * Publica un evento usando el sistema apropiado
     */
    publishEvent(event: WhatsAppEvent): Promise<void>;
    /**
     * Publica múltiples eventos de forma optimizada
     */
    publishBatch(events: WhatsAppEvent[]): Promise<void>;
    /**
     * Publica un evento de sistema para monitoreo
     */
    publishSystemEvent(eventType: WhatsAppEventType, data: any): Promise<void>;
    /**
     * Obtiene estadísticas del router
     */
    getStats(): Promise<any>;
    /**
     * Actualiza la configuración del router
     */
    updateConfig(newConfig: Partial<EventRoutingConfig>): void;
    /**
     * Verifica si un evento es crítico
     */
    private isCriticalEvent;
    /**
     * Verifica si un evento es de tiempo real
     */
    private isRealtimeEvent;
    /**
     * Verifica si un evento necesita notificación
     */
    private isNotificationEvent;
    /**
     * Verifica si un evento crítico también necesita broadcast
     */
    private shouldBroadcast;
    /**
     * Obtiene la cola apropiada para un evento crítico
     */
    private getQueueForEvent;
    /**
     * Publica a Pub/Sub con manejo de errores
     */
    private publishToPubSub;
    /**
     * Verifica si un evento ya está en BullMQ (para fallback)
     */
    private isEventInBullMQ;
    /**
     * Obtiene tipos de eventos críticos
     */
    private getCriticalEventTypes;
    /**
     * Obtiene tipos de eventos de tiempo real
     */
    private getRealtimeEventTypes;
}
//# sourceMappingURL=hybrid-event-router.d.ts.map