1 | import { StorageCopySource, StorageCopyDestination } from './Storage';
|
2 | export interface StorageProvider {
|
3 | cancel?(request: Promise<any>): void;
|
4 | copy?(src: StorageCopySource, dest: StorageCopyDestination, config?: any): Promise<any>;
|
5 | configure(config: object): object;
|
6 | get(key: string, options?: any): Promise<string | Object>;
|
7 | put(key: string, object: any, options?: any): Promise<Object> | UploadTask;
|
8 | remove(key: string, options?: any): Promise<any>;
|
9 | list(path: any, options?: any): Promise<any>;
|
10 | getCategory(): string;
|
11 | getProviderName(): string;
|
12 | }
|
13 | export interface UploadTask {
|
14 | resume(): any;
|
15 | pause(): any;
|
16 | percent: number;
|
17 | isInProgress: boolean;
|
18 | }
|
19 | export interface StorageProviderWithCopy extends StorageProvider {
|
20 | copy(src: StorageCopySource, dest: StorageCopyDestination, config?: any): Promise<any>;
|
21 | }
|
22 | export declare type StorageProviderApi = 'copy' | 'get' | 'put' | 'remove' | 'list';
|