import { ExecutionContext } from "@nestjs/common"; import { FileData } from "../classes/FileData"; import { IFileSaver, IS3FileSaverOptions, S3FileDataOptions } from "../interfaces/file.interface"; export declare class S3FileSaver implements IFileSaver { private readonly fileUploadOptions; private readonly s3Client; /** * Initializes a new instance of the S3FileSaver class. * Sets up the S3 client using the provided configuration options. * @param fileUploadOptions - configuration options for S3 file uploads. */ constructor(fileUploadOptions: IS3FileSaverOptions); /** * Uploads the provided file data to S3. * @param file - The file data to upload. * @param options - Optional S3-specific file data options. * @returns A promise that resolves to the URL of the uploaded file. * @throws InternalServerErrorException if the bucket is not provided. */ private uploadToS3; /** * Uploads the provided file data to S3. * @param fileData - The file data to upload. * @param context - The execution context, typically provided by NestJS. * @param options - Optional S3-specific file data options. * @returns A promise that resolves to the URL of the uploaded file. */ save(fileData: FileData, context: ExecutionContext, options?: S3FileDataOptions): Promise; /** * Uploads multiple files to S3. * This method is a wrapper around the map method of the array. * It takes an array of FileData and maps each file to its save method. * The result is an array of strings, where each string is the file path * where the respective file was saved. * @param files - The array of file data to save. * @param context - The execution context, typically provided by NestJS. * @param options - Optional S3-specific file data options. * @returns A promise that resolves to an array of file paths where the files were saved. * @throws InternalServerErrorException if any of the files failed to upload. */ saveMany(files: FileData[], context: ExecutionContext, options?: S3FileDataOptions): Promise; }