UNPKG

1.31 kBTypeScriptView Raw
1import { AtLeastOne } from '../types';
2/** @deprecated This may be removed in the next major version. */
3export type StorageAccessLevel = 'guest' | 'protected' | 'private';
4export interface S3ProviderConfig {
5 S3: {
6 bucket?: string;
7 region?: string;
8 /**
9 * Internal-only configuration for testing purpose. You should not use this.
10 *
11 * @internal
12 */
13 dangerouslyConnectToHttpEndpointForTesting?: string;
14 };
15}
16export type StorageConfig = AtLeastOne<S3ProviderConfig>;
17/** @deprecated This may be removed in the next major version. */
18type StoragePrefixResolver = (params: {
19 accessLevel: StorageAccessLevel;
20 targetIdentityId?: string;
21}) => Promise<string>;
22export interface LibraryStorageOptions {
23 S3: {
24 /**
25 * @deprecated This may be removed in the next major version.
26 * This is currently used for Storage API signature using key as input parameter.
27 * */
28 prefixResolver?: StoragePrefixResolver;
29 /**
30 * @deprecated This may be removed in the next major version.
31 * This is currently used for Storage API signature using key as input parameter.
32 * */
33 defaultAccessLevel?: StorageAccessLevel;
34 isObjectLockEnabled?: boolean;
35 };
36}
37export {};