1 | import { StorageOptions, StorageProvider } from '../types';
|
2 | /**
|
3 | * Provide storage methods to use AWS S3
|
4 | */
|
5 | export declare class AWSS3Provider implements StorageProvider {
|
6 | static CATEGORY: string;
|
7 | static PROVIDER_NAME: string;
|
8 | /**
|
9 | * @private
|
10 | */
|
11 | private _config;
|
12 | /**
|
13 | * Initialize Storage with AWS configurations
|
14 | * @param {Object} config - Configuration object for storage
|
15 | */
|
16 | constructor(config?: StorageOptions);
|
17 | /**
|
18 | * get the category of the plugin
|
19 | */
|
20 | getCategory(): string;
|
21 | /**
|
22 | * get provider name of the plugin
|
23 | */
|
24 | getProviderName(): string;
|
25 | /**
|
26 | * Configure Storage part with aws configuration
|
27 | * @param {Object} config - Configuration of the Storage
|
28 | * Object} - Current configuration
{ |
29 | */
|
30 | configure(config?: any): object;
|
31 | /**
|
32 | * Get a presigned URL of the file or the object data when download:true
|
33 | *
|
34 | * @param {string} key - key of the object
|
35 | * @param {Object} [config] - { level : private|protected|public, download: true|false }
|
36 | * @return - A promise resolves to Amazon S3 presigned URL on success
|
37 | */
|
38 | get(key: string, config?: any): Promise<string | Object>;
|
39 | /**
|
40 | * Put a file in S3 bucket specified to configure method
|
41 | * @param {string} key - key of the object
|
42 | * @param {Object} object - File to be put in Amazon S3 bucket
|
43 | * @param {Object} [config] - { level : private|protected|public, contentType: MIME Types,
|
44 | * progressCallback: function }
|
45 | * @return - promise resolves to object on success
|
46 | */
|
47 | put(key: string, object: any, config?: any): Promise<Object>;
|
48 | /**
|
49 | * Remove the object for specified key
|
50 | * @param {string} key - key of the object
|
51 | * @param {Object} [config] - { level : private|protected|public }
|
52 | * @return - Promise resolves upon successful removal of the object
|
53 | */
|
54 | remove(key: string, config?: any): Promise<any>;
|
55 | /**
|
56 | * List bucket objects relative to the level and prefix specified
|
57 | * @param {string} path - the path that contains objects
|
58 | * @param {Object} [config] - { level : private|protected|public }
|
59 | * @return - Promise resolves to list of keys for all objects in path
|
60 | */
|
61 | list(path: any, config?: any): Promise<any>;
|
62 | /**
|
63 | * @private
|
64 | */
|
65 | _ensureCredentials(): any;
|
66 | /**
|
67 | * @private
|
68 | */
|
69 | private _prefix;
|
70 | /**
|
71 | * @private creates an S3 client with new V3 aws sdk
|
72 | */
|
73 | private _createNewS3Client;
|
74 | }
|
75 | /**
|
76 | * @deprecated use named import
|
77 | */
|
78 | export default AWSS3Provider;
|