UNPKG

1.04 kBTypeScriptView Raw
1/**
2 * Storage instance options
3 */
4import { ICredentials } from '@aws-amplify/core';
5export interface StorageOptions {
6 credentials?: ICredentials;
7 region?: string;
8 level?: StorageLevel;
9 bucket?: string;
10 /**
11 * Custom mapping of your prefixes.
12 * For example, customPrefix: { public: 'myPublicPrefix' } will make public level operations access 'myPublicPrefix/'
13 * instead of the default 'public/'.
14 */
15 customPrefix?: CustomPrefix;
16 /**
17 * if set to true, automatically sends Storage Events to Amazon Pinpoint
18 **/
19 track?: boolean;
20 dangerouslyConnectToHttpEndpointForTesting?: boolean;
21}
22export declare type StorageLevel = 'public' | 'protected' | 'private';
23export declare type CustomPrefix = {
24 [key in StorageLevel]?: string;
25};
26export declare type StorageCopyTarget = {
27 key: string;
28 level?: string;
29 identityId?: string;
30};
31export declare type StorageCopySource = StorageCopyTarget;
32export declare type StorageCopyDestination = Omit<StorageCopyTarget, 'identityId'>;