@aws-amplify/storage 5.9.23 → 5.9.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Storage.d.ts +8 -0
- package/lib/Storage.js +8 -0
- package/lib/providers/AWSS3Provider.d.ts +3 -0
- package/lib/providers/AWSS3Provider.js +3 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/AWSS3Provider.d.ts +101 -0
- package/lib/types/Provider.d.ts +25 -0
- package/lib/types/Storage.d.ts +93 -0
- package/lib-esm/Storage.d.ts +8 -0
- package/lib-esm/Storage.js +8 -0
- package/lib-esm/providers/AWSS3Provider.d.ts +3 -0
- package/lib-esm/providers/AWSS3Provider.js +3 -0
- package/lib-esm/tsconfig.tsbuildinfo +1 -1
- package/lib-esm/types/AWSS3Provider.d.ts +101 -0
- package/lib-esm/types/Provider.d.ts +25 -0
- package/lib-esm/types/Storage.d.ts +93 -0
- package/package.json +3 -3
- package/src/Storage.ts +8 -0
- package/src/providers/AWSS3Provider.ts +3 -0
- package/src/types/AWSS3Provider.ts +101 -0
- package/src/types/Provider.ts +25 -0
- package/src/types/Storage.ts +93 -0
|
@@ -4,6 +4,11 @@ import { StorageOptions, StorageAccessLevel } from './Storage';
|
|
|
4
4
|
import { UploadTaskCompleteEvent, UploadTaskProgressEvent } from '../providers/AWSS3UploadTask';
|
|
5
5
|
import { UploadTask } from './Provider';
|
|
6
6
|
type ListObjectsCommandOutputContent = _Object;
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
9
|
+
* See the migration guide:
|
|
10
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
11
|
+
*/
|
|
7
12
|
export interface FileMetadata {
|
|
8
13
|
bucket: string;
|
|
9
14
|
fileName: string;
|
|
@@ -11,7 +16,17 @@ export interface FileMetadata {
|
|
|
11
16
|
lastTouched: number;
|
|
12
17
|
uploadId: string;
|
|
13
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
21
|
+
* See the migration guide:
|
|
22
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
23
|
+
*/
|
|
14
24
|
export type CommonStorageOptions = Omit<StorageOptions, 'credentials' | 'region' | 'bucket' | 'dangerouslyConnectToHttpEndpointForTesting'>;
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
27
|
+
* See the migration guide:
|
|
28
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
29
|
+
*/
|
|
15
30
|
export type S3ProviderGetConfig = CommonStorageOptions & {
|
|
16
31
|
download?: boolean;
|
|
17
32
|
track?: boolean;
|
|
@@ -29,11 +44,21 @@ export type S3ProviderGetConfig = CommonStorageOptions & {
|
|
|
29
44
|
SSECustomerKeyMD5?: GetObjectInput['SSECustomerKeyMD5'];
|
|
30
45
|
validateObjectExistence?: boolean;
|
|
31
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
49
|
+
* See the migration guide:
|
|
50
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
51
|
+
*/
|
|
32
52
|
export type S3ProviderGetPropertiesConfig = CommonStorageOptions & {
|
|
33
53
|
SSECustomerAlgorithm?: HeadObjectInput['SSECustomerAlgorithm'];
|
|
34
54
|
SSECustomerKey?: HeadObjectInput['SSECustomerKey'];
|
|
35
55
|
SSECustomerKeyMD5?: HeadObjectInput['SSECustomerKeyMD5'];
|
|
36
56
|
};
|
|
57
|
+
/**
|
|
58
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
59
|
+
* See the migration guide:
|
|
60
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
61
|
+
*/
|
|
37
62
|
export type S3ProviderGetOuput<T> = T extends {
|
|
38
63
|
download: true;
|
|
39
64
|
} ? GetObjectOutput : string;
|
|
@@ -58,6 +83,11 @@ type _S3ProviderPutConfig = {
|
|
|
58
83
|
useAccelerateEndpoint?: boolean;
|
|
59
84
|
resumable?: boolean;
|
|
60
85
|
};
|
|
86
|
+
/**
|
|
87
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
88
|
+
* See the migration guide:
|
|
89
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
90
|
+
*/
|
|
61
91
|
export type ResumableUploadConfig = {
|
|
62
92
|
resumable: true;
|
|
63
93
|
progressCallback?: (progress: UploadTaskProgressEvent) => any;
|
|
@@ -72,18 +102,41 @@ export type ResumableUploadConfig = {
|
|
|
72
102
|
* Usage of this parameter is not considered a recommended practice:
|
|
73
103
|
* {@link https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html}
|
|
74
104
|
*
|
|
105
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
106
|
+
* See the migration guide:
|
|
107
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
75
108
|
*/
|
|
76
109
|
export type S3ProviderPutConfig = CommonStorageOptions & (_S3ProviderPutConfig | (_S3ProviderPutConfig & ResumableUploadConfig));
|
|
110
|
+
/**
|
|
111
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
112
|
+
* See the migration guide:
|
|
113
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
114
|
+
*/
|
|
77
115
|
export type S3ProviderRemoveConfig = CommonStorageOptions & {
|
|
78
116
|
bucket?: string;
|
|
79
117
|
provider?: 'AWSS3';
|
|
80
118
|
};
|
|
119
|
+
/**
|
|
120
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
121
|
+
* See the migration guide:
|
|
122
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
123
|
+
*/
|
|
81
124
|
export type S3ProviderListOutput = {
|
|
82
125
|
results: S3ProviderListOutputItem[];
|
|
83
126
|
nextToken?: string;
|
|
84
127
|
hasNextToken: boolean;
|
|
85
128
|
};
|
|
129
|
+
/**
|
|
130
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
131
|
+
* See the migration guide:
|
|
132
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
133
|
+
*/
|
|
86
134
|
export type S3ProviderRemoveOutput = DeleteObjectOutput;
|
|
135
|
+
/**
|
|
136
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
137
|
+
* See the migration guide:
|
|
138
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
139
|
+
*/
|
|
87
140
|
export type S3ProviderListConfig = CommonStorageOptions & {
|
|
88
141
|
bucket?: string;
|
|
89
142
|
pageSize?: number | 'ALL';
|
|
@@ -91,21 +144,46 @@ export type S3ProviderListConfig = CommonStorageOptions & {
|
|
|
91
144
|
identityId?: string;
|
|
92
145
|
nextToken?: string;
|
|
93
146
|
};
|
|
147
|
+
/**
|
|
148
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
149
|
+
* See the migration guide:
|
|
150
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
151
|
+
*/
|
|
94
152
|
export type S3ClientOptions = StorageOptions & {
|
|
95
153
|
credentials: ICredentials;
|
|
96
154
|
} & S3ProviderListConfig;
|
|
155
|
+
/**
|
|
156
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
157
|
+
* See the migration guide:
|
|
158
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
159
|
+
*/
|
|
97
160
|
export interface S3ProviderListOutputItem {
|
|
98
161
|
key: ListObjectsCommandOutputContent['Key'];
|
|
99
162
|
eTag: ListObjectsCommandOutputContent['ETag'];
|
|
100
163
|
lastModified: ListObjectsCommandOutputContent['LastModified'];
|
|
101
164
|
size: ListObjectsCommandOutputContent['Size'];
|
|
102
165
|
}
|
|
166
|
+
/**
|
|
167
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
168
|
+
* See the migration guide:
|
|
169
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
170
|
+
*/
|
|
103
171
|
export interface S3CopyTarget {
|
|
104
172
|
key: string;
|
|
105
173
|
level?: StorageAccessLevel;
|
|
106
174
|
identityId?: string;
|
|
107
175
|
}
|
|
176
|
+
/**
|
|
177
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
178
|
+
* See the migration guide:
|
|
179
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
180
|
+
*/
|
|
108
181
|
export type S3CopySource = S3CopyTarget;
|
|
182
|
+
/**
|
|
183
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
184
|
+
* See the migration guide:
|
|
185
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
186
|
+
*/
|
|
109
187
|
export type S3CopyDestination = Omit<S3CopyTarget, 'identityId'>;
|
|
110
188
|
/**
|
|
111
189
|
* Configuration options for the S3 copy function.
|
|
@@ -115,6 +193,9 @@ export type S3CopyDestination = Omit<S3CopyTarget, 'identityId'>;
|
|
|
115
193
|
* Usage of this parameter is not considered a recommended practice:
|
|
116
194
|
* {@link https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html}
|
|
117
195
|
*
|
|
196
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
197
|
+
* See the migration guide:
|
|
198
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
118
199
|
*/
|
|
119
200
|
export type S3ProviderCopyConfig = Omit<CommonStorageOptions, 'level'> & {
|
|
120
201
|
provider?: 'AWSS3';
|
|
@@ -133,9 +214,19 @@ export type S3ProviderCopyConfig = Omit<CommonStorageOptions, 'level'> & {
|
|
|
133
214
|
SSECustomerKeyMD5?: CopyObjectInput['SSECustomerKeyMD5'];
|
|
134
215
|
SSEKMSKeyId?: CopyObjectInput['SSEKMSKeyId'];
|
|
135
216
|
};
|
|
217
|
+
/**
|
|
218
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
219
|
+
* See the migration guide:
|
|
220
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
221
|
+
*/
|
|
136
222
|
export type S3ProviderCopyOutput = {
|
|
137
223
|
key: string;
|
|
138
224
|
};
|
|
225
|
+
/**
|
|
226
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
227
|
+
* See the migration guide:
|
|
228
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
229
|
+
*/
|
|
139
230
|
export type S3ProviderGetPropertiesOutput = {
|
|
140
231
|
contentType: string;
|
|
141
232
|
contentLength: number;
|
|
@@ -143,9 +234,19 @@ export type S3ProviderGetPropertiesOutput = {
|
|
|
143
234
|
lastModified: Date;
|
|
144
235
|
metadata: Record<string, string>;
|
|
145
236
|
};
|
|
237
|
+
/**
|
|
238
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
239
|
+
* See the migration guide:
|
|
240
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
241
|
+
*/
|
|
146
242
|
export type PutResult = {
|
|
147
243
|
key: string;
|
|
148
244
|
};
|
|
245
|
+
/**
|
|
246
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
247
|
+
* See the migration guide:
|
|
248
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
249
|
+
*/
|
|
149
250
|
export type S3ProviderPutOutput<T> = T extends {
|
|
150
251
|
resumable: true;
|
|
151
252
|
} ? UploadTask : Promise<PutResult>;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { StorageCopySource, StorageCopyDestination } from './Storage';
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
4
|
+
* See the migration guide:
|
|
5
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
6
|
+
*/
|
|
2
7
|
export interface StorageProvider {
|
|
3
8
|
cancel?(request: Promise<any>): void;
|
|
4
9
|
copy?(src: StorageCopySource, dest: StorageCopyDestination, config?: any): Promise<any>;
|
|
@@ -11,16 +16,36 @@ export interface StorageProvider {
|
|
|
11
16
|
getCategory(): string;
|
|
12
17
|
getProviderName(): string;
|
|
13
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
21
|
+
* See the migration guide:
|
|
22
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
23
|
+
*/
|
|
14
24
|
export interface UploadTask {
|
|
15
25
|
resume(): any;
|
|
16
26
|
pause(): any;
|
|
17
27
|
percent: number;
|
|
18
28
|
isInProgress: boolean;
|
|
19
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
32
|
+
* See the migration guide:
|
|
33
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
34
|
+
*/
|
|
20
35
|
export interface StorageProviderWithCopy extends StorageProvider {
|
|
21
36
|
copy(src: StorageCopySource, dest: StorageCopyDestination, config?: any): Promise<any>;
|
|
22
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
40
|
+
* See the migration guide:
|
|
41
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
42
|
+
*/
|
|
23
43
|
export interface StorageProviderWithGetProperties extends StorageProvider {
|
|
24
44
|
getProperties(key: string, options?: any): Promise<Object>;
|
|
25
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
48
|
+
* See the migration guide:
|
|
49
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
50
|
+
*/
|
|
26
51
|
export type StorageProviderApi = 'copy' | 'get' | 'put' | 'remove' | 'list' | 'getProperties';
|
|
@@ -6,6 +6,11 @@ import { StorageProvider, StorageProviderApi, AWSS3Provider, StorageProviderWith
|
|
|
6
6
|
type Tail<T extends any[]> = ((...t: T) => void) extends (h: any, ...r: infer R) => void ? R : never;
|
|
7
7
|
type Last<T extends any[]> = T[Exclude<keyof T, keyof Tail<T>>];
|
|
8
8
|
type LastParameter<F extends (...args: any) => any> = Last<Parameters<F>>;
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
11
|
+
* See the migration guide:
|
|
12
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
13
|
+
*/
|
|
9
14
|
export interface StorageOptions {
|
|
10
15
|
credentials?: ICredentials;
|
|
11
16
|
region?: string;
|
|
@@ -24,16 +29,41 @@ export interface StorageOptions {
|
|
|
24
29
|
track?: boolean;
|
|
25
30
|
dangerouslyConnectToHttpEndpointForTesting?: boolean;
|
|
26
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
34
|
+
* See the migration guide:
|
|
35
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
36
|
+
*/
|
|
27
37
|
export type StorageAccessLevel = 'public' | 'protected' | 'private';
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
40
|
+
* See the migration guide:
|
|
41
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
42
|
+
*/
|
|
28
43
|
export type CustomPrefix = {
|
|
29
44
|
[key in StorageAccessLevel]?: string;
|
|
30
45
|
};
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
48
|
+
* See the migration guide:
|
|
49
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
50
|
+
*/
|
|
31
51
|
export type StorageCopyTarget = {
|
|
32
52
|
key: string;
|
|
33
53
|
level?: string;
|
|
34
54
|
identityId?: string;
|
|
35
55
|
};
|
|
56
|
+
/**
|
|
57
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
58
|
+
* See the migration guide:
|
|
59
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
60
|
+
*/
|
|
36
61
|
export type StorageCopySource = StorageCopyTarget;
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
64
|
+
* See the migration guide:
|
|
65
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
66
|
+
*/
|
|
37
67
|
export type StorageCopyDestination = Omit<StorageCopyTarget, 'identityId'>;
|
|
38
68
|
/**
|
|
39
69
|
* If provider is AWSS3, provider doesn't have to be specified since it's the default, else it has to be passed into
|
|
@@ -48,11 +78,41 @@ type StorageOperationConfig<T extends StorageProvider | StorageProviderWithCopy
|
|
|
48
78
|
} : LastParameter<T[Exclude<U, 'copy' | 'getProperties'>]> & {
|
|
49
79
|
provider: ReturnType<T['getProviderName']>;
|
|
50
80
|
};
|
|
81
|
+
/**
|
|
82
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
83
|
+
* See the migration guide:
|
|
84
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
85
|
+
*/
|
|
51
86
|
export type StorageGetConfig<T extends Record<string, any>> = T extends StorageProvider ? StorageOperationConfig<T, 'get'> : StorageOperationConfigMap<StorageOperationConfig<AWSS3Provider, 'get'>, T>;
|
|
87
|
+
/**
|
|
88
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
89
|
+
* See the migration guide:
|
|
90
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
91
|
+
*/
|
|
52
92
|
export type StorageGetPropertiesConfig<T extends Record<string, any>> = T extends StorageProviderWithGetProperties ? StorageOperationConfig<T, 'getProperties'> : StorageOperationConfigMap<StorageOperationConfig<AWSS3Provider, 'getProperties'>, T>;
|
|
93
|
+
/**
|
|
94
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
95
|
+
* See the migration guide:
|
|
96
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
97
|
+
*/
|
|
53
98
|
export type StoragePutConfig<T extends Record<string, any>> = T extends StorageProvider ? StorageOperationConfig<T, 'put'> : StorageOperationConfigMap<StorageOperationConfig<AWSS3Provider, 'put'>, T>;
|
|
99
|
+
/**
|
|
100
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
101
|
+
* See the migration guide:
|
|
102
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
103
|
+
*/
|
|
54
104
|
export type StorageRemoveConfig<T extends Record<string, any>> = T extends StorageProvider ? StorageOperationConfig<T, 'remove'> : StorageOperationConfigMap<StorageOperationConfig<AWSS3Provider, 'remove'>, T>;
|
|
105
|
+
/**
|
|
106
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
107
|
+
* See the migration guide:
|
|
108
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
109
|
+
*/
|
|
55
110
|
export type StorageListConfig<T extends Record<string, any>> = T extends StorageProvider ? StorageOperationConfig<T, 'list'> : StorageOperationConfigMap<StorageOperationConfig<AWSS3Provider, 'list'>, T>;
|
|
111
|
+
/**
|
|
112
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
113
|
+
* See the migration guide:
|
|
114
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
115
|
+
*/
|
|
56
116
|
export type StorageCopyConfig<T extends Record<string, any>> = T extends StorageProviderWithCopy ? StorageOperationConfig<T, 'copy'> : StorageOperationConfigMap<StorageOperationConfig<AWSS3Provider, 'copy'>, T>;
|
|
57
117
|
/**
|
|
58
118
|
* Utility type for checking if the generic type is a provider or a Record that has the key 'provider'.
|
|
@@ -65,15 +125,48 @@ type PickProviderOutput<DefaultOutput, T, api extends StorageProviderApi> = T ex
|
|
|
65
125
|
} ? T extends {
|
|
66
126
|
provider: 'AWSS3';
|
|
67
127
|
} ? DefaultOutput : Promise<any> : DefaultOutput;
|
|
128
|
+
/**
|
|
129
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
130
|
+
* See the migration guide:
|
|
131
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
132
|
+
*/
|
|
68
133
|
export type StorageGetOutput<T extends StorageProvider | Record<string, any>> = PickProviderOutput<Promise<S3ProviderGetOuput<T>>, T, 'get'>;
|
|
134
|
+
/**
|
|
135
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
136
|
+
* See the migration guide:
|
|
137
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
138
|
+
*/
|
|
69
139
|
export type StoragePutOutput<T> = PickProviderOutput<S3ProviderPutOutput<T>, T, 'put'>;
|
|
140
|
+
/**
|
|
141
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
142
|
+
* See the migration guide:
|
|
143
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
144
|
+
*/
|
|
70
145
|
export type StorageRemoveOutput<T> = PickProviderOutput<Promise<S3ProviderRemoveOutput>, T, 'remove'>;
|
|
146
|
+
/**
|
|
147
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
148
|
+
* See the migration guide:
|
|
149
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
150
|
+
*/
|
|
71
151
|
export type StorageListOutput<T> = PickProviderOutput<Promise<S3ProviderListOutput>, T, 'list'>;
|
|
152
|
+
/**
|
|
153
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
154
|
+
* See the migration guide:
|
|
155
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
156
|
+
*/
|
|
72
157
|
export type StorageCopyOutput<T> = PickProviderOutput<Promise<S3ProviderCopyOutput>, T, 'copy'>;
|
|
158
|
+
/**
|
|
159
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
160
|
+
* See the migration guide:
|
|
161
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
162
|
+
*/
|
|
73
163
|
export type StorageGetPropertiesOutput<T> = PickProviderOutput<Promise<S3ProviderGetPropertiesOutput>, T, 'getProperties'>;
|
|
74
164
|
/**
|
|
75
165
|
* Utility type to allow custom provider to use any config keys, if provider is set to AWSS3 then it should use
|
|
76
166
|
* AWSS3Provider's config.
|
|
167
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
168
|
+
* See the migration guide:
|
|
169
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
77
170
|
*/
|
|
78
171
|
export type StorageOperationConfigMap<Default, T extends Record<string, any>> = T extends {
|
|
79
172
|
provider: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/storage",
|
|
3
|
-
"version": "5.9.
|
|
3
|
+
"version": "5.9.24",
|
|
4
4
|
"description": "Storage category of aws-amplify",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib-esm/index.js",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"src"
|
|
53
53
|
],
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@aws-amplify/core": "5.8.
|
|
55
|
+
"@aws-amplify/core": "5.8.19",
|
|
56
56
|
"@aws-sdk/md5-js": "3.6.1",
|
|
57
57
|
"@aws-sdk/types": "3.6.1",
|
|
58
58
|
"buffer": "4.9.2",
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"@types/sinon": "^7.5.1",
|
|
128
128
|
"typescript": "5.8.3"
|
|
129
129
|
},
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "d0b923913b92145813d1470bfbdc9b4dfa915c20"
|
|
131
131
|
}
|
package/src/Storage.ts
CHANGED
|
@@ -36,6 +36,9 @@ const loggerStorageInstance = new Logger('Storage'); // Logging relating to Stor
|
|
|
36
36
|
const DEFAULT_PROVIDER = 'AWSS3';
|
|
37
37
|
/**
|
|
38
38
|
* Provide storage methods to use AWS S3
|
|
39
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
40
|
+
* See the migration guide:
|
|
41
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
39
42
|
*/
|
|
40
43
|
export class Storage {
|
|
41
44
|
/**
|
|
@@ -463,5 +466,10 @@ const getInstance = () => {
|
|
|
463
466
|
return _instance;
|
|
464
467
|
};
|
|
465
468
|
|
|
469
|
+
/**
|
|
470
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
471
|
+
* See the migration guide:
|
|
472
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
473
|
+
*/
|
|
466
474
|
export const StorageInstance: Storage = getInstance();
|
|
467
475
|
Amplify.register(StorageInstance);
|
|
@@ -81,6 +81,9 @@ interface AddTaskInput {
|
|
|
81
81
|
|
|
82
82
|
/**
|
|
83
83
|
* Provide storage methods to use AWS S3
|
|
84
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
85
|
+
* See the migration guide:
|
|
86
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
84
87
|
*/
|
|
85
88
|
export class AWSS3Provider implements StorageProvider {
|
|
86
89
|
static readonly CATEGORY = 'Storage';
|
|
@@ -19,6 +19,11 @@ import { UploadTask } from './Provider';
|
|
|
19
19
|
|
|
20
20
|
type ListObjectsCommandOutputContent = _Object;
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
24
|
+
* See the migration guide:
|
|
25
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
26
|
+
*/
|
|
22
27
|
export interface FileMetadata {
|
|
23
28
|
bucket: string;
|
|
24
29
|
fileName: string;
|
|
@@ -28,6 +33,11 @@ export interface FileMetadata {
|
|
|
28
33
|
uploadId: string;
|
|
29
34
|
}
|
|
30
35
|
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
38
|
+
* See the migration guide:
|
|
39
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
40
|
+
*/
|
|
31
41
|
export type CommonStorageOptions = Omit<
|
|
32
42
|
StorageOptions,
|
|
33
43
|
| 'credentials'
|
|
@@ -36,6 +46,11 @@ export type CommonStorageOptions = Omit<
|
|
|
36
46
|
| 'dangerouslyConnectToHttpEndpointForTesting'
|
|
37
47
|
>;
|
|
38
48
|
|
|
49
|
+
/**
|
|
50
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
51
|
+
* See the migration guide:
|
|
52
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
53
|
+
*/
|
|
39
54
|
export type S3ProviderGetConfig = CommonStorageOptions & {
|
|
40
55
|
download?: boolean;
|
|
41
56
|
track?: boolean;
|
|
@@ -55,6 +70,11 @@ export type S3ProviderGetConfig = CommonStorageOptions & {
|
|
|
55
70
|
validateObjectExistence?: boolean;
|
|
56
71
|
};
|
|
57
72
|
|
|
73
|
+
/**
|
|
74
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
75
|
+
* See the migration guide:
|
|
76
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
77
|
+
*/
|
|
58
78
|
export type S3ProviderGetPropertiesConfig = CommonStorageOptions & {
|
|
59
79
|
SSECustomerAlgorithm?: HeadObjectInput['SSECustomerAlgorithm'];
|
|
60
80
|
SSECustomerKey?: HeadObjectInput['SSECustomerKey'];
|
|
@@ -62,6 +82,11 @@ export type S3ProviderGetPropertiesConfig = CommonStorageOptions & {
|
|
|
62
82
|
SSECustomerKeyMD5?: HeadObjectInput['SSECustomerKeyMD5'];
|
|
63
83
|
};
|
|
64
84
|
|
|
85
|
+
/**
|
|
86
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
87
|
+
* See the migration guide:
|
|
88
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
89
|
+
*/
|
|
65
90
|
export type S3ProviderGetOuput<T> = T extends { download: true }
|
|
66
91
|
? GetObjectOutput
|
|
67
92
|
: string;
|
|
@@ -89,6 +114,11 @@ type _S3ProviderPutConfig = {
|
|
|
89
114
|
resumable?: boolean;
|
|
90
115
|
};
|
|
91
116
|
|
|
117
|
+
/**
|
|
118
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
119
|
+
* See the migration guide:
|
|
120
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
121
|
+
*/
|
|
92
122
|
export type ResumableUploadConfig = {
|
|
93
123
|
resumable: true;
|
|
94
124
|
progressCallback?: (progress: UploadTaskProgressEvent) => any;
|
|
@@ -104,6 +134,9 @@ export type ResumableUploadConfig = {
|
|
|
104
134
|
* Usage of this parameter is not considered a recommended practice:
|
|
105
135
|
* {@link https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html}
|
|
106
136
|
*
|
|
137
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
138
|
+
* See the migration guide:
|
|
139
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
107
140
|
*/
|
|
108
141
|
export type S3ProviderPutConfig = CommonStorageOptions &
|
|
109
142
|
(
|
|
@@ -112,19 +145,39 @@ export type S3ProviderPutConfig = CommonStorageOptions &
|
|
|
112
145
|
| (_S3ProviderPutConfig & ResumableUploadConfig)
|
|
113
146
|
);
|
|
114
147
|
|
|
148
|
+
/**
|
|
149
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
150
|
+
* See the migration guide:
|
|
151
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
152
|
+
*/
|
|
115
153
|
export type S3ProviderRemoveConfig = CommonStorageOptions & {
|
|
116
154
|
bucket?: string;
|
|
117
155
|
provider?: 'AWSS3';
|
|
118
156
|
};
|
|
119
157
|
|
|
158
|
+
/**
|
|
159
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
160
|
+
* See the migration guide:
|
|
161
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
162
|
+
*/
|
|
120
163
|
export type S3ProviderListOutput = {
|
|
121
164
|
results: S3ProviderListOutputItem[];
|
|
122
165
|
nextToken?: string;
|
|
123
166
|
hasNextToken: boolean;
|
|
124
167
|
};
|
|
125
168
|
|
|
169
|
+
/**
|
|
170
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
171
|
+
* See the migration guide:
|
|
172
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
173
|
+
*/
|
|
126
174
|
export type S3ProviderRemoveOutput = DeleteObjectOutput;
|
|
127
175
|
|
|
176
|
+
/**
|
|
177
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
178
|
+
* See the migration guide:
|
|
179
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
180
|
+
*/
|
|
128
181
|
export type S3ProviderListConfig = CommonStorageOptions & {
|
|
129
182
|
bucket?: string;
|
|
130
183
|
pageSize?: number | 'ALL';
|
|
@@ -133,10 +186,20 @@ export type S3ProviderListConfig = CommonStorageOptions & {
|
|
|
133
186
|
nextToken?: string;
|
|
134
187
|
};
|
|
135
188
|
|
|
189
|
+
/**
|
|
190
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
191
|
+
* See the migration guide:
|
|
192
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
193
|
+
*/
|
|
136
194
|
export type S3ClientOptions = StorageOptions & {
|
|
137
195
|
credentials: ICredentials;
|
|
138
196
|
} & S3ProviderListConfig;
|
|
139
197
|
|
|
198
|
+
/**
|
|
199
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
200
|
+
* See the migration guide:
|
|
201
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
202
|
+
*/
|
|
140
203
|
export interface S3ProviderListOutputItem {
|
|
141
204
|
key: ListObjectsCommandOutputContent['Key'];
|
|
142
205
|
eTag: ListObjectsCommandOutputContent['ETag'];
|
|
@@ -144,14 +207,29 @@ export interface S3ProviderListOutputItem {
|
|
|
144
207
|
size: ListObjectsCommandOutputContent['Size'];
|
|
145
208
|
}
|
|
146
209
|
|
|
210
|
+
/**
|
|
211
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
212
|
+
* See the migration guide:
|
|
213
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
214
|
+
*/
|
|
147
215
|
export interface S3CopyTarget {
|
|
148
216
|
key: string;
|
|
149
217
|
level?: StorageAccessLevel;
|
|
150
218
|
identityId?: string;
|
|
151
219
|
}
|
|
152
220
|
|
|
221
|
+
/**
|
|
222
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
223
|
+
* See the migration guide:
|
|
224
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
225
|
+
*/
|
|
153
226
|
export type S3CopySource = S3CopyTarget;
|
|
154
227
|
|
|
228
|
+
/**
|
|
229
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
230
|
+
* See the migration guide:
|
|
231
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
232
|
+
*/
|
|
155
233
|
export type S3CopyDestination = Omit<S3CopyTarget, 'identityId'>;
|
|
156
234
|
|
|
157
235
|
/**
|
|
@@ -162,6 +240,9 @@ export type S3CopyDestination = Omit<S3CopyTarget, 'identityId'>;
|
|
|
162
240
|
* Usage of this parameter is not considered a recommended practice:
|
|
163
241
|
* {@link https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html}
|
|
164
242
|
*
|
|
243
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
244
|
+
* See the migration guide:
|
|
245
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
165
246
|
*/
|
|
166
247
|
export type S3ProviderCopyConfig = Omit<CommonStorageOptions, 'level'> & {
|
|
167
248
|
provider?: 'AWSS3';
|
|
@@ -182,10 +263,20 @@ export type S3ProviderCopyConfig = Omit<CommonStorageOptions, 'level'> & {
|
|
|
182
263
|
SSEKMSKeyId?: CopyObjectInput['SSEKMSKeyId'];
|
|
183
264
|
};
|
|
184
265
|
|
|
266
|
+
/**
|
|
267
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
268
|
+
* See the migration guide:
|
|
269
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
270
|
+
*/
|
|
185
271
|
export type S3ProviderCopyOutput = {
|
|
186
272
|
key: string;
|
|
187
273
|
};
|
|
188
274
|
|
|
275
|
+
/**
|
|
276
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
277
|
+
* See the migration guide:
|
|
278
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
279
|
+
*/
|
|
189
280
|
export type S3ProviderGetPropertiesOutput = {
|
|
190
281
|
contentType: string;
|
|
191
282
|
contentLength: number;
|
|
@@ -194,10 +285,20 @@ export type S3ProviderGetPropertiesOutput = {
|
|
|
194
285
|
metadata: Record<string, string>;
|
|
195
286
|
};
|
|
196
287
|
|
|
288
|
+
/**
|
|
289
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
290
|
+
* See the migration guide:
|
|
291
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
292
|
+
*/
|
|
197
293
|
export type PutResult = {
|
|
198
294
|
key: string;
|
|
199
295
|
};
|
|
200
296
|
|
|
297
|
+
/**
|
|
298
|
+
* @deprecated Amplify JavaScript v5 is in maintenance mode. Upgrade to v6.
|
|
299
|
+
* See the migration guide:
|
|
300
|
+
* https://docs.amplify.aws/gen1/javascript/build-a-backend/troubleshooting/migrate-from-javascript-v5-to-v6/
|
|
301
|
+
*/
|
|
201
302
|
export type S3ProviderPutOutput<T> = T extends { resumable: true }
|
|
202
303
|
? UploadTask
|
|
203
304
|
: Promise<PutResult>;
|