import { type Database } from "./database.js"; /** Immutable bot message intent saved by one scheduled run for its task's fixed channel. */ export type ScheduledSlackBotMessage = { id: string; scheduledTaskId: string; connectionId: string; connectionVersion: number; channelId: string; threadTimestamp: string | null; text: string; }; type ScheduledSlackBotMessageScope = { accountId: string; workspaceId: string; sessionId: string; }; /** * The database refused to save or read a message: the session is not this * task's scheduler run, the task no longer names this bot and channel, or the * bot connection changed. The message is the database's short reason. */ export declare class ScheduledSlackBotMessageRefusedError extends Error { readonly name = "ScheduledSlackBotMessageRefusedError"; } /** * Save one message for a scheduled run. Call only after authorizing this exact * session and resolving its live bot connection. The database re-proves that * the session is the scheduler-created run of `scheduledTaskId`, that the task * still names this bot and channel, and that the connection is the same active * version, then returns the server-owned id that also becomes the Slack post * operation id. */ export declare function prepareScheduledSlackBotMessage(db: Database, input: ScheduledSlackBotMessageScope & Omit): Promise; /** Read one prepared message, only from the session that prepared it. */ export declare function readScheduledSlackBotMessage(db: Database, input: ScheduledSlackBotMessageScope & { id: string; }): Promise; export {};