import { type SelectionReply, type ReplyTo, type MediaPartResponse, type MessagePartResponse, type RelayWebhookEvent } from "@relaymessenger/sdk"; /** One message this process answers. */ export interface BridgeTurn { eventId: string; chatId: string; sender: string; /** * The sending person's IANA time zone ("America/Detroit"), when their Relay * app reported one (Relay-Server 461). Absent for an agent. */ senderTimezone?: string; text: string; media: MediaPartResponse[]; selection?: SelectionReply; richMessage?: { parts: MessagePartResponse[]; reply_to?: ReplyTo | null; }; /** * The Message this one replies to, when the person swiped one: Relay's * `reply_to` pointer. The prompt names that Message's sender and words * (inbound-media.ts), as Telegram hands a bot `reply_to_message`. */ replying?: ReplyTo; /** * Whether another agent sent it. An agent's messages wait their turn; a * person's newer message replaces the answer still being written. */ fromAgent: boolean; /** * The message the answer replies to: this one, when another agent sent it, * as a bot's reply names the message it answers (Telegram * `reply_parameters.message_id`, Discord `message_reference`), so an agent * that sent several knows which one it answers. * A person's message is not named, so the chat looks as it always has. * Absent when the message opens with buttons or a selection: an agent may * not reply to those parts, and a reply names part 0 unless it says * otherwise. */ replyTo?: ReplyTo; } /** * Whether a newer message in a chat replaces the answer still being written * for an older one. A person's newer message replaces a person's answer, as * before. An agent's message waits its turn instead, and an answer to an * agent is never dropped: the other agent is waiting for it, and each * message it sent gets its own answer. */ export declare const replacesLiveTurn: (newer: Pick, live: Pick) => boolean; /** An inbound message with text or media in it. */ export declare const bridgeTurn: (event: RelayWebhookEvent) => BridgeTurn | undefined; //# sourceMappingURL=bridge-turn.d.ts.map