/*! * @license * Copyright Squiz Australia Pty Ltd. All Rights Reserved. */ import { HeadObjectCommandOutput, PutObjectCommandInput, S3Client } from '@aws-sdk/client-s3'; import 'reflect-metadata'; /** * Repository class for interacting with S3. * @export * @class S3RepositoryBase */ export declare class S3RepositoryBase { protected s3Client: S3Client; protected bucketName: string; constructor(s3Client: S3Client, bucketName: string); /** * Validates S3 key to prevent malicious input * @param {string} key The S3 object key to validate * @private */ private validateS3Key; /** * Save object into S3. * @param {string} key The S3 object key. * @param {PutObjectCommandInputType['Body']} body The body of the S3 object. * @return {Promise} * @memberof S3RepositoryBase */ put(key: string, body: PutObjectCommandInput['Body']): Promise; /** * Delete object from S3. * * @param {string} key The S3 object key. * @memberof S3RepositoryBase */ delete(key: string): Promise; /** * Retrieve object from S3. * @param {string} key The S3 object key. * @return {Promise} The S3 object. * @memberof S3RepositoryBase */ get(key: string): Promise; /** * Check if the S3 object key exists. * @param {string} key The S3 object key. * @return {Promise} * @memberof S3RepositoryBase */ check(key: string): Promise; getS3SignedUrl(key: string): Promise; }