/** * Media handling — download Slack attachments to disk for pi @file processing. * * The gateway acts as a pure relay: download to disk, pass path to pi via @file, * let pi decide how to handle each file type natively. * Periodic cleanup removes stale media files. */ import { type AttachmentMeta } from '../types.js'; /** A successfully downloaded file */ export interface DownloadedFile { filePath: string; originalName: string; size: number; contentType: string; } /** * Download all attachments to a per-message directory under the channel session. * Returns the list of successfully downloaded files. * * Slack serves attachments from `url_private`, which requires the bot token as * a Bearer header. When no explicit `headers` are passed, an Authorization * header is injected automatically for Slack-hosted URLs (config bot token). */ export declare function downloadAttachments(attachments: AttachmentMeta[], channelFolder: string, messageId: string, signal?: AbortSignal, headers?: Record): Promise; /** Start the periodic media cleanup timer */ export declare function startMediaCleanup(): () => void;