import { ConfigService } from '@nestjs/config';
import { Repository } from 'typeorm';
import { Session } from './entities/session.entity';
import { Message } from '../message/entities/message.entity';
import { EngineRegistry } from '../../engine/engine-registry.service';
import { SessionLidResolver } from './session-lid-resolver.service';
import { StatusStoreService } from '../status-store/status-store.service';
import { ChatMediaArchiveService } from '../chat-media/chat-media-archive.service';
import { AutomationRulesService } from '../automation/automation-rules.service';
import { IWhatsAppEngine, DeliveryStatus, IncomingMessage, ReactionEvent, EditedMessage, RevokedMessage } from '../../engine/interfaces/whatsapp-engine.interface';
import { EventsGateway } from '../events/events.gateway';
import { WebhookService } from '../webhook/webhook.service';
import { HookManager } from '../../core/hooks';
export declare const ACK_RECONCILE_DELAY_MS = 750;
export declare class MessageProjector {
    private readonly messageRepository;
    private readonly sessionRepository;
    private readonly engines;
    private readonly eventsGateway;
    private readonly webhookService;
    private readonly hookManager;
    private readonly statusStore;
    private readonly lidResolver;
    private readonly configService?;
    private readonly chatMediaArchive?;
    private readonly automationRules?;
    private readonly logger;
    private readonly messageMutations;
    private readonly mutationProjector;
    constructor(messageRepository: Repository<Message>, sessionRepository: Repository<Session>, engines: EngineRegistry, eventsGateway: EventsGateway, webhookService: WebhookService, hookManager: HookManager, statusStore: StatusStoreService, lidResolver: SessionLidResolver, configService?: ConfigService | undefined, chatMediaArchive?: ChatMediaArchiveService | undefined, automationRules?: AutomationRulesService | undefined);
    handleInboundMessage(id: string, engine: IWhatsAppEngine, message: IncomingMessage): void;
    private ingestInboundStatus;
    private shouldSkipEphemeralMessage;
    private projectInboundMessage;
    private persistInboundMessage;
    private dispatchInboundMessage;
    handleOwnSendEcho(id: string, engine: IWhatsAppEngine, message: IncomingMessage): void;
    handleMessageAck(id: string, engine: IWhatsAppEngine, messageId: string, status: DeliveryStatus): void;
    handleMessageRevoked(id: string, engine: IWhatsAppEngine, message: RevokedMessage): void;
    persistHistoryMessages(id: string, messages: IncomingMessage[]): Promise<void>;
    applyReactionQueued(id: string, event: ReactionEvent): void;
    applyMessageEditQueued(id: string, message: EditedMessage): void;
    enqueueMessageMutation(id: string, messageId: string, work: () => Promise<void>): void;
    recordOutboundMessageEdit(sessionId: string, messageId: string, body: string): Promise<void>;
    private dispatchStatusReceived;
}
