qus-node-aws-clients
Version:
client api for aws tools
31 lines • 962 B
TypeScript
import { S3Client } from '@aws-sdk/client-s3';
export declare class S3Service {
protected readonly s3Client: S3Client;
protected region: string;
constructor(s3Client: S3Client, region: string);
/**
* Uploads a file to S3.
*
* @param bucketName
* @param filePath
* @param data
* @param mimeType
*/
uploadToS3(bucketName: string, filePath: string, data: any, mimeType: string): Promise<any>;
/**
* Retrieves an item from S3.
*
* @param bucketName
* @param filePath
*/
getFromS3(bucketName: string, filePath: string): Promise<string>;
getFromS3AsBinary(bucketName: string, filePath: string): Promise<Buffer>;
/**
* Retrieves the most recent file from S3 based on a prefix.
*
* @param bucketName
* @param prefix
*/
getMostRecentFile(bucketName: string, prefix: string): Promise<string | undefined>;
}
//# sourceMappingURL=s3.service.d.ts.map