import type { ReplyPayload } from "../../auto-reply/types.js";
import type { SymiConfig } from "../../config/config.js";
import type { sendMessageSlack } from "../../slack/send.js";
import type { OutboundIdentity } from "./identity.js";
import type { NormalizedOutboundPayload } from "./payloads.js";
import type { OutboundChannel } from "./targets.js";
export type { NormalizedOutboundPayload } from "./payloads.js";
export { normalizeOutboundPayloads } from "./payloads.js";
type SendMatrixMessage = (to: string, text: string, opts?: {
    mediaUrl?: string;
    replyToId?: string;
    threadId?: string;
    timeoutMs?: number;
}) => Promise<{
    messageId: string;
    roomId: string;
}>;
export type OutboundSendDeps = {
    sendSlack?: typeof sendMessageSlack;
    sendMatrix?: SendMatrixMessage;
    sendMSTeams?: (to: string, text: string, opts?: {
        mediaUrl?: string;
    }) => Promise<{
        messageId: string;
        conversationId: string;
    }>;
};
export type OutboundDeliveryResult = {
    channel: Exclude<OutboundChannel, "none">;
    messageId: string;
    chatId?: string;
    channelId?: string;
    roomId?: string;
    conversationId?: string;
    timestamp?: number;
    toJid?: string;
    pollId?: string;
    meta?: Record<string, unknown>;
};
type DeliverOutboundPayloadsCoreParams = {
    cfg: SymiConfig;
    channel: Exclude<OutboundChannel, "none">;
    to: string;
    accountId?: string;
    payloads: ReplyPayload[];
    replyToId?: string | null;
    threadId?: string | number | null;
    identity?: OutboundIdentity;
    deps?: OutboundSendDeps;
    gifPlayback?: boolean;
    abortSignal?: AbortSignal;
    bestEffort?: boolean;
    onError?: (err: unknown, payload: NormalizedOutboundPayload) => void;
    onPayload?: (payload: NormalizedOutboundPayload) => void;
    /** Active agent id for media local-root scoping. */
    agentId?: string;
    mirror?: {
        sessionKey: string;
        agentId?: string;
        text?: string;
        mediaUrls?: string[];
    };
    silent?: boolean;
};
type DeliverOutboundPayloadsParams = DeliverOutboundPayloadsCoreParams & {
    /** @internal Skip write-ahead queue (used by crash-recovery to avoid re-enqueueing). */
    skipQueue?: boolean;
};
export declare function deliverOutboundPayloads(params: DeliverOutboundPayloadsParams): Promise<OutboundDeliveryResult[]>;
