/** * Block-level document copy — BFS reproduction of source block tree. * * Preserves ALL block-level styles by working at the API block level. * Uses createBlockChildrenEx to get created block IDs directly, * avoiding expensive getBlocks() calls in the copy loop. */ import { type LarkCli } from "../cli.js"; export interface ImageData { bytes: Buffer; width: number; height: number; align: number; scale: number; } export type ImageCache = Map; export interface FailedImage { /** Source image file_token */ sourceToken: string; /** Target block ID that was supposed to receive the image */ targetBlockId: string; /** Human-readable reason for failure */ reason: string; } export interface CopyResult { created: number; skipped: number; /** Unsupported block types encountered: block_type → count */ unsupportedTypes: Map; /** Images that failed to upload after retries */ failedImages: FailedImage[]; } type Block = Record; /** Human-readable names for all known Feishu docx block types. */ export declare const BLOCK_TYPE_NAME: Record; type HeadingNumbers = Map; /** Walk source blocks in document order and assign hierarchical numbers. */ export declare function computeHeadingNumbers(sourceBlocks: Block[]): HeadingNumbers; export declare function copyDocBlocks(cli: LarkCli, sourceBlocks: Block[], targetDocId: string, imageCache: ImageCache, opts?: { verbose?: boolean; headingNumbers?: HeadingNumbers; }): CopyResult; export declare function cleanupEmptyTails(cli: LarkCli, docId: string, sourceBlocks: Block[]): number; /** * Delete all block children from a document, leaving it empty. * Returns true if successful (or already empty). */ export declare function clearDocContent(cli: LarkCli, docObjToken: string): boolean; export {}; //# sourceMappingURL=block-copy.d.ts.map