/** * Copyright (c) 2026 ByteDance Ltd. and/or its affiliates * SPDX-License-Identifier: MIT * * Message fetching for the Feishu/Lark channel plugin. */ import type { ClawdbotConfig } from "openclaw/plugin-sdk"; /** * Normalised information about a Feishu message, returned by * {@link getMessageFeishu}. */ export type FeishuMessageInfo = { /** Unique Feishu message ID. */ messageId: string; /** Chat ID where the message lives. */ chatId: string; /** Chat type ("p2p" or "group"), when available in the API response. */ chatType?: string; /** Open ID of the sender (if available). */ senderId?: string; /** Display name of the sender (resolved from user-name cache). */ senderName?: string; /** Feishu sender type: "user" for human users, "app" for bots/apps. */ senderType?: string; /** The parsed text / content of the message. */ content: string; /** Feishu content type indicator (text, post, image, interactive, ...). */ contentType: string; /** Unix-millisecond timestamp of when the message was created. */ createTime?: number; /** Thread ID if the message belongs to a thread (omt_xxx format). */ threadId?: string; }; /** * Retrieve a single message by its ID from the Feishu IM API. * * Returns a normalised {@link FeishuMessageInfo} object, or `null` if the * message cannot be found or the API returns an error. * * @param params.cfg - Plugin configuration with Feishu credentials. * @param params.messageId - The message ID to fetch. * @param params.accountId - Optional account identifier for multi-account setups. */ export declare function getMessageFeishu(params: { cfg: ClawdbotConfig; messageId: string; accountId?: string; /** When true, merge_forward content is recursively expanded via API. */ expandForward?: boolean; }): Promise; /** * Determine the chat type (p2p or group) for a given chat ID. * * Delegates to the shared {@link getChatInfo} cache (account-scoped LRU with * 1-hour TTL) so that chat metadata is fetched at most once across all * call-sites (dispatch, reaction handler, etc.). * * Falls back to "p2p" if the API call fails. */ export declare function getChatTypeFeishu(params: { cfg: ClawdbotConfig; chatId: string; accountId?: string; }): Promise<"p2p" | "group">; //# sourceMappingURL=fetch.d.ts.map