1 | import { GetObjectRequest, GetObjectCommandOutput, PutObjectRequest, CopyObjectRequest, _Object, DeleteObjectCommandOutput } from '@aws-sdk/client-s3';
|
2 | import { StorageOptions, StorageLevel } from './Storage';
|
3 | import { CancelTokenSource } from 'axios';
|
4 | declare type ListObjectsCommandOutputContent = _Object;
|
5 | export interface S3ProviderGetConfig extends StorageOptions {
|
6 | download?: boolean;
|
7 | track?: boolean;
|
8 | expires?: number;
|
9 | provider?: string;
|
10 | progressCallback?: (progress: any) => any;
|
11 | cancelTokenSource?: CancelTokenSource;
|
12 | bucket?: GetObjectRequest['Bucket'];
|
13 | cacheControl?: GetObjectRequest['ResponseCacheControl'];
|
14 | contentDisposition?: GetObjectRequest['ResponseContentDisposition'];
|
15 | contentEncoding?: GetObjectRequest['ResponseContentEncoding'];
|
16 | contentLanguage?: GetObjectRequest['ResponseContentLanguage'];
|
17 | contentType?: GetObjectRequest['ResponseContentType'];
|
18 | SSECustomerAlgorithm?: GetObjectRequest['SSECustomerAlgorithm'];
|
19 | SSECustomerKey?: GetObjectRequest['SSECustomerKey'];
|
20 | SSECustomerKeyMD5?: GetObjectRequest['SSECustomerKeyMD5'];
|
21 | }
|
22 | export declare type S3ProviderGetOuput<T> = T extends {
|
23 | download: true;
|
24 | } ? GetObjectCommandOutput : string;
|
25 | export interface S3ProviderPutConfig extends StorageOptions {
|
26 | progressCallback?: (progress: any) => any;
|
27 | track?: boolean;
|
28 | cancelTokenSource?: CancelTokenSource;
|
29 | serverSideEncryption?: PutObjectRequest['ServerSideEncryption'];
|
30 | SSECustomerAlgorithm?: PutObjectRequest['SSECustomerAlgorithm'];
|
31 | SSECustomerKey?: PutObjectRequest['SSECustomerKey'];
|
32 | SSECustomerKeyMD5?: PutObjectRequest['SSECustomerKeyMD5'];
|
33 | SSEKMSKeyId?: PutObjectRequest['SSEKMSKeyId'];
|
34 | acl?: PutObjectRequest['ACL'];
|
35 | bucket?: PutObjectRequest['Bucket'];
|
36 | cacheControl?: PutObjectRequest['CacheControl'];
|
37 | contentDisposition?: PutObjectRequest['ContentDisposition'];
|
38 | contentEncoding?: PutObjectRequest['ContentEncoding'];
|
39 | contentType?: PutObjectRequest['ContentType'];
|
40 | expires?: PutObjectRequest['Expires'];
|
41 | metadata?: PutObjectRequest['Metadata'];
|
42 | tagging?: PutObjectRequest['Tagging'];
|
43 | useAccelerateEndpoint?: boolean;
|
44 | }
|
45 | export interface S3ProviderPutOutput {
|
46 | key: string;
|
47 | }
|
48 | export interface S3ProviderRemoveConfig extends StorageOptions {
|
49 | bucket?: string;
|
50 | }
|
51 | export declare type S3ProviderRemoveOutput = DeleteObjectCommandOutput;
|
52 | export interface S3ProviderListConfig extends StorageOptions {
|
53 | bucket?: string;
|
54 | maxKeys?: number;
|
55 | }
|
56 | export interface S3ProviderListOutputItem {
|
57 | key: ListObjectsCommandOutputContent['Key'];
|
58 | eTag: ListObjectsCommandOutputContent['ETag'];
|
59 | lastModified: ListObjectsCommandOutputContent['LastModified'];
|
60 | size: ListObjectsCommandOutputContent['Size'];
|
61 | }
|
62 | export declare type S3ProviderListOutput = S3ProviderListOutputItem[];
|
63 | export interface S3CopyTarget {
|
64 | key: string;
|
65 | level?: StorageLevel;
|
66 | identityId?: string;
|
67 | }
|
68 | export declare type S3CopySource = S3CopyTarget;
|
69 | export declare type S3CopyDestination = Omit<S3CopyTarget, 'identityId'>;
|
70 | export interface S3ProviderCopyConfig extends StorageOptions {
|
71 | cancelTokenSource?: CancelTokenSource;
|
72 | bucket?: CopyObjectRequest['Bucket'];
|
73 | cacheControl?: CopyObjectRequest['CacheControl'];
|
74 | contentDisposition?: CopyObjectRequest['ContentDisposition'];
|
75 | contentLanguage?: CopyObjectRequest['ContentLanguage'];
|
76 | contentType?: CopyObjectRequest['ContentType'];
|
77 | expires?: CopyObjectRequest['Expires'];
|
78 | tagging?: CopyObjectRequest['Tagging'];
|
79 | acl?: CopyObjectRequest['ACL'];
|
80 | metadata?: CopyObjectRequest['Metadata'];
|
81 | serverSideEncryption?: CopyObjectRequest['ServerSideEncryption'];
|
82 | SSECustomerAlgorithm?: CopyObjectRequest['SSECustomerAlgorithm'];
|
83 | SSECustomerKey?: CopyObjectRequest['SSECustomerKey'];
|
84 | SSECustomerKeyMD5?: CopyObjectRequest['SSECustomerKeyMD5'];
|
85 | SSEKMSKeyId?: CopyObjectRequest['SSEKMSKeyId'];
|
86 | }
|
87 | export declare type S3ProviderCopyOutput = {
|
88 | key: string;
|
89 | };
|
90 | export {};
|