import type { Mention } from '../parse/mentions.js'; export interface FeishuMessageReadRequest { messageId: string; } /** Projection of one `im.v1.message.get` item: its content, and where it is. */ export interface FeishuMessageReadItem { messageId: string; messageType: string; content: string; mentions: Mention[]; deleted: boolean; malformed: boolean; /** The chat the message is in. Empty when the response omitted it. */ chatId: string; /** The topic it is in, present only for a message inside one. */ threadId?: string; } export interface FeishuMessageReadResponse { items: FeishuMessageReadItem[]; } export interface FeishuMessageReader { readMessage(request: FeishuMessageReadRequest): Promise; } export interface RawMessageReadItem { message_id?: string | undefined; root_id?: string | undefined; msg_type?: string | undefined; deleted?: boolean | undefined; chat_id?: string | undefined; thread_id?: string | undefined; body?: { content?: string | undefined; } | undefined; mentions?: Array<{ key?: string | undefined; id?: string | undefined; id_type?: string | undefined; name?: string | undefined; }> | undefined; } /** * The message a topic's replies hang under, read off the earliest message the * topic lists. * * A reply carries its topic's `root_id`; a message that names none is the root * itself, so its own id is the answer. The earliest message is therefore * enough — either it is the root or it points at it. */ export declare function threadRootOf(earliest: RawMessageReadItem | undefined): string | undefined; export declare function normalizeMessageReadItem(raw: RawMessageReadItem): FeishuMessageReadItem; //# sourceMappingURL=message-read.d.ts.map