/** * Tool-CLI route (under `/api/tool_cli`) that streams one GenTeam attachment * to a gsk-token caller — the same membership-gated lane the web and mobile * clients download through. `gsk genteam download` fetches it straight into * a local file instead of asking the server for a URL (#61834). */ export declare const GENTEAM_ATTACHMENT_ENDPOINT = "/genteam/attachment"; export declare function genteamAttachmentEndpoint(channelId: string, attachmentRef: string): string; /** * File name carried by a Content-Disposition header. The RFC 6266 * `filename*=UTF-8''` form holds the full Unicode name and wins * over the ASCII `filename="…"` fallback the server writes beside it. Only a * basename ever comes back: the header is server data, not a path the caller * chose, so it must not steer the write outside the destination directory. */ export declare function fileNameFromContentDisposition(header: string | null | undefined): string | undefined; /** * Destination of `gsk genteam download`: `--local_file`, else the first bare * operand, else `./`. A destination naming an * existing directory receives the server's file name inside it. */ export declare function resolveGenteamDownloadDestination(operands: readonly string[], localFile: string | undefined, serverFileName: string | undefined): string; export interface SavedAttachment { local_path: string; size_bytes: number; sha256: string; } /** * Stream a response body to `destPath`, hashing it on the way. Nothing is * buffered: GenTeam attachments reach GiB scale, and the sha256 lets the * caller compare against the value `gsk genteam read` already reports. */ export declare function saveBodyToFile(body: NonNullable, destPath: string): Promise; //# sourceMappingURL=genteam-download.d.ts.map