///
import { PutObjectRequest } from "@aws-sdk/client-s3";
import { AwsFileInfo } from '@peacom/model';
export declare const getS3EndPoint: () => string;
export declare const getS3Url: (key: string | null | undefined) => string;
export declare const uploadLocalFileToS3: ({ filePath }: {
filePath?: string | undefined;
}, folder?: string) => Promise;
interface FileProp {
fileName: string;
contentType: string;
folder?: string;
maxSize?: number;
}
export declare const getPreSignedUrl: (key: string) => Promise;
export declare const createPreSignedUrl: ({ fileName, contentType, folder, maxSize }: FileProp) => Promise<{
urlUpload: import("@aws-sdk/s3-presigned-post").PresignedPost;
urlEndpoint: string;
}>;
export declare const getS3UrlKey: (url: string) => string;
export declare const getAwsUrlInfo: (str: string) => Promise;
export declare const getAwsKeyInfo: (key: string) => Promise;
interface UploadS3BufferProp extends FileProp {
data: PutObjectRequest["Body"] | string | Uint8Array | Buffer;
}
export declare const uploadS3Buffer: ({ fileName, contentType, data }: UploadS3BufferProp, folder?: string) => Promise;
export declare const uploadS3FromUrl: ({ url, mimeType, name }: {
url?: string | undefined;
mimeType?: string | undefined;
name?: string | undefined;
}, folder?: string) => Promise;
export declare const uploadMultipartS3FromUrl: ({ url, mimeType, name }: {
url?: string | undefined;
mimeType?: string | undefined;
name?: string | undefined;
}, folder?: string) => Promise;
interface GetObjectRangeProp {
bucket: string;
key: string;
start: number;
end: number;
}
interface DownloadLargeFileProps {
url: string;
outputFile: string;
chunkSize: number;
log?(message: string): void;
onError?(err: Error): void;
}
interface DownloadLargeFileKeyProps {
key: string;
outputFile: string;
chunkSize: number;
log?(message: string): void;
onError?(err: Error): void;
}
export declare const getObjectRange: ({ bucket, key, start, end }: GetObjectRangeProp) => Promise;
export declare const getRangeAndLength: (contentRange: string) => {
start: number;
end: number;
length: number;
};
export declare const downloadS3Url: ({ url, outputFile, onError, chunkSize, log }: DownloadLargeFileProps) => Promise;
export declare const downloadS3Key: ({ key, outputFile, onError, chunkSize, log }: DownloadLargeFileKeyProps) => Promise;
export declare function s3RemoveFile({ bucket, key }: {
bucket?: string | undefined;
key?: string | undefined;
}): Promise;
export declare function s3RemoveMultipleFile({ bucket, keys }: {
bucket?: string | undefined;
keys?: string[] | undefined;
}): Promise;
export declare const uploadS3Multipart: ({ fileName, contentType, data }: UploadS3BufferProp, folder?: string) => Promise;
export {};