import type { DownloadOptions, ManagedDownloadResult, SteamCmdOptions } from "./types.js"; /** * Wrapper for SteamCMD CLI automation. */ export declare class SteamCmdWrapper { private binPath; private username; private password; private useDocker; private useTempDir; private dockerImage; private steamCacheDir; constructor(options?: SteamCmdOptions); /** * Downloads a workshop item for a specific App ID and Item ID. * Programmatically parses SteamCMD stdout to find the downloaded folder path. * * In sandbox mode (`useDocker`/`useTempDir`) the returned path points into a temp * directory that is NOT auto-removed, so the path stays valid. Copy the files out * yourself, or use `SteamWorkshopClient.downloadItemCached` which copies and cleans up. * * @param appId - the game's App ID * @param itemId - the workshop item ID * @param options - timeout, progress, Steam Guard callback, and per-run sandbox mode * @returns the absolute path to the downloaded folder * @throws if SteamCMD fails, times out, or reports no successful download */ downloadItem(appId: number, itemId: number, options?: DownloadOptions): Promise; /** * Downloads multiple workshop items in a single SteamCMD session. * Efficiently batches requests to avoid multiple login/startup overheads. * * In sandbox mode the returned paths point into a temp directory that is NOT * auto-removed (see {@link downloadItem}). Prefer {@link downloadItemsManaged} * when you need the temp dirs cleaned after copying the files out. * * @param appId - the game's App ID * @param itemIds - the workshop item IDs to download * @param options - timeout, progress, Steam Guard callback, and per-run sandbox mode * @returns a map of Item ID to its absolute download path * @throws if SteamCMD fails, times out, or reports no successful download */ downloadItems(appId: number, itemIds: number[], options?: DownloadOptions): Promise<{ [itemId: number]: string; }>; /** * Like {@link downloadItems}, but returns a `cleanup()` callback alongside the paths. * The paths may point into a sandbox temp directory (Docker mount or temporary * SteamCMD install); call `cleanup()` after copying the files out to remove it. * On failure the sandbox is removed automatically before the error is thrown. * * @param appId - the game's App ID * @param itemIds - the workshop item IDs to download * @param options - timeout, progress, Steam Guard callback, and per-run sandbox mode * @returns the download paths plus a `cleanup()` to remove the sandbox temp dir * @throws if SteamCMD fails, times out, or reports no successful download */ downloadItemsManaged(appId: number, itemIds: number[], options?: DownloadOptions): Promise; private getDiagnostics; /** * Downloads, extracts, and installs SteamCMD to a target directory. * Updates the wrapper's `binPath` to point to the installed executable. * * @param targetDir - directory where SteamCMD should be installed * @returns the absolute path to the installed SteamCMD executable * @throws if the download, extraction, or permission step fails */ autoInstall(targetDir: string): Promise; }