import type { CDNMedia, ImageItem, VoiceItem, FileItem, VideoItem } from './ilink-types.js';
import type { ILinkClient } from './ilink-client.js';
export declare const MEDIA_ROOT: string;
export declare const MAX_BYTES: number;
export interface WechatDownloadResult {
    path: string;
    bytes: number;
}
/**
 * Download a CDN media blob via the iLink client and write it to
 * `MEDIA_ROOT/wechat/<subdir>/<filename>`. Returns the absolute path.
 * The AES key is read from `cdnMedia.aes_key` (base64 of an ASCII hex string).
 */
export declare function downloadWechatMedia(client: ILinkClient, cdnMedia: CDNMedia, subdir: string, filename: string): Promise<WechatDownloadResult>;
/**
 * Pick a file extension based on the media item contents. Falls back to a
 * generic extension when nothing more specific can be inferred.
 */
export declare function pickExtensionForImage(item: ImageItem): string;
export declare function pickExtensionForVoice(item: VoiceItem): string;
export declare function pickExtensionForFile(item: FileItem): string;
export declare function pickExtensionForVideo(_item: VideoItem): string;
/**
 * Resolve the CDNMedia reference from a media item. Returns null when the
 * item lacks the signed CDN URL or its AES key. The bot fetches
 * `media.full_url` directly and decrypts with `media.aes_key` (no iLink-side
 * download endpoint exists).
 */
export declare function extractCdnMedia(item: {
    media?: CDNMedia;
}): CDNMedia | null;
//# sourceMappingURL=media-download.d.ts.map