import AWS from "@aws-sdk/client-s3"; //#region src/tus/stores/s3/fileOperations.d.ts type CalculateOptimalPartSizeArgs = { size?: number; }; type CalculateOffsetFromPartsArgs = { parts?: Array; }; type CalculatePartNumberArgs = { parts: Array; }; type GenerateUniqueTmpFileNameArgs = { template: string; }; type CalculateOffsetFromPartsExportArgs = { parts?: Array<{ Size?: number; }>; }; declare class S3FileOperations { private maxMultipartParts; private maxUploadSize; private minPartSize; private preferredPartSize; constructor(maxMultipartParts: number, maxUploadSize: number, minPartSize: number, preferredPartSize: number); /** * Calculates the optimal part size for S3 multipart upload * @param args - The function arguments * @param args.size - The upload size in bytes (optional) * @returns The optimal part size in bytes */ calculateOptimalPartSize(args: CalculateOptimalPartSizeArgs): number; /** * Calculates the offset based on uploaded parts * @param args - The function arguments * @param args.parts - Array of uploaded parts (optional) * @returns The total offset in bytes */ calculateOffsetFromParts(args: CalculateOffsetFromPartsArgs): number; /** * Calculates the next part number based on existing parts * @param args - The function arguments * @param args.parts - Array of uploaded parts * @returns The next part number to use */ calculatePartNumber(args: CalculatePartNumberArgs): number; /** * Generates a unique temporary file name * @param args - The function arguments * @param args.template - The template string for the file name * @returns Promise that resolves to the unique file path * @throws Error if unable to find unique name after max tries */ generateUniqueTmpFileName(args: GenerateUniqueTmpFileNameArgs): Promise; } /** * Calculates the total offset from uploaded parts * @param args - The function arguments * @param args.parts - Array of parts with size information (optional) * @returns The total offset in bytes */ declare function calculateOffsetFromParts(args: CalculateOffsetFromPartsExportArgs): number; //#endregion export { S3FileOperations, calculateOffsetFromParts }; //# sourceMappingURL=fileOperations.d.mts.map