import { createImgNumberer, type MessageResource } from './message-parser.js';
import { type ForwardedNode } from './forwarded-renderer.js';
import type { LarkMessage } from '../../types.js';
/**
 * Extract a useful one-liner from an AxiosError / generic error.
 * Lark's SDK rethrows AxiosError whose default toString just says
 * "Request failed with status code 400" — hiding the actual server reason.
 */
export declare function describeAxiosErr(err: any): string;
/**
 * Build a tree of ForwardedNode + collect attachment resources from a
 * merge_forward message. Lark's im.v1.message.get returns ALL descendants
 * in one shot via the `items` array, each with `upper_message_id` pointing
 * to its parent — so we make exactly one API call per top-level expand and
 * walk the tree purely in memory. Recursing per nested merge_forward via
 * separate API calls fails (Lark 230002 "Bot/User can NOT be out of the chat")
 * because the bot may be in the outer chat but not in the original chat the
 * nested merge_forward came from. The single-call design sidesteps that.
 */
export declare function buildForwardedTree(larkAppId: string, rootMessageId: string, numberer: ReturnType<typeof createImgNumberer>, maxDepth: number): Promise<{
    nodes: ForwardedNode[];
    extraResources: MessageResource[];
}>;
/**
 * Expand a merge_forward message by fetching sub-messages via Lark API.
 * Replaces parsed.content with an XML-rendered forward tree (deduplicated
 * participants, alias-referenced messages) and collects additional resources.
 */
export declare function expandMergeForward(larkAppId: string, messageId: string, parsed: LarkMessage, numberer?: import("./message-parser.js").ImgNumberer): Promise<{
    extraResources: MessageResource[];
}>;
//# sourceMappingURL=merge-forward.d.ts.map