import type { GatewaySessionSource } from "../session.ts";
import type { AttachmentInput, ChatLogRecord, InboundMessageInput, ResolvedConversation, StoredAttachment } from "./types.ts";
export declare function ensureConversationDirs(conversation: ResolvedConversation): Promise<void>;
export declare function readConversationLog(conversation: ResolvedConversation): Promise<ChatLogRecord[]>;
export declare function appendConversationRecord(conversation: ResolvedConversation, record: ChatLogRecord): Promise<void>;
export declare function acquireConversationLock(conversation: ResolvedConversation, owner: string): Promise<void>;
export declare function releaseConversationLock(conversation: ResolvedConversation): Promise<void>;
export declare function materializeAttachments(conversation: ResolvedConversation, messageId: string, attachments: AttachmentInput[] | undefined): Promise<StoredAttachment[]>;
export declare function buildBaseRecordFields(conversation: ResolvedConversation, recordId: number, session?: {
    sessionKey?: string;
    sessionSource?: GatewaySessionSource;
}): {
    recordId: number;
    timestamp: string;
    service: import("./types.ts").ChatService;
    accountId: string;
    channelKey: string;
    channelId: string;
    scope: "channel";
    sessionKey?: string | undefined;
    sessionSource?: GatewaySessionSource | undefined;
};
export declare function nextMessageId(service: string): string;
export declare function normalizeInboundMessage(input: InboundMessageInput, botName: string): InboundMessageInput;
//# sourceMappingURL=log.d.ts.map