import type * as Airtop from '../api'; import { Files as FilesClass, type Files as FilesNamespace } from '../api/resources/files/client/Client'; export declare class AirtopFiles extends FilesClass { readonly _options: FilesNamespace.Options; constructor(_options: FilesNamespace.Options); /** * Uploads a file to Airtop by first creating a file entry and then uploading the contents * If @options is not provided, the fileName will be calculated from the filePath. * @options.fileType defaults to `customer_upload` * * @param filePath - Path to the local file to upload * @param options - Optional API request configuration * @returns The created file entry response * * @example * const result = await client.files.upload("/path/to/file.pdf") */ upload(filePath: string, options?: Airtop.CreateFileRestInputV1): Promise; /** * Downloads a file from Airtop to a local path * * @param fileId - The ID of the file to download * @param destinationPath - Local path where the file should be saved * @param options - Optional API request configuration * @param onProgress - Optional callback to monitor download progress * * @example * await client.files.download( * "123e4567-e89b-12d3-a456-426614174000", * "/path/to/save/file.pdf", * (downloaded, total) => { * const percent = Math.round((downloaded / total) * 100); * console.log(`Downloaded: ${downloaded} / ${total} bytes (${percent}%)`); * } * ) */ download(fileId: string, destinationPath: string, onProgress?: (downloadedBytes: number, totalBytes: number) => void, options?: FilesNamespace.RequestOptions): Promise; /** * Waits for a file to become available for download. * * @param fileId - The ID of the file to wait for * @param options - Optional request configuration including timeout * @returns The file entry once it becomes available * @throws Error if the file doesn't become available within the timeout period * * @example * const fileEntry = await client.files.waitForDownloadAvailable("123e4567-e89b-12d3-a456-426614174000") */ waitForDownloadAvailable(fileId: string, options?: FilesNamespace.RequestOptions): Promise; }