@aws-amplify/storage 5.9.22 → 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/AwsClients/S3/abortMultipartUpload.d.ts +2 -3
- package/lib/AwsClients/S3/abortMultipartUpload.js +2 -2
- package/lib/AwsClients/S3/completeMultipartUpload.d.ts +2 -3
- package/lib/AwsClients/S3/completeMultipartUpload.js +2 -2
- package/lib/AwsClients/S3/copyObject.d.ts +2 -3
- package/lib/AwsClients/S3/copyObject.js +2 -2
- package/lib/AwsClients/S3/createMultipartUpload.d.ts +2 -3
- package/lib/AwsClients/S3/createMultipartUpload.js +2 -2
- package/lib/AwsClients/S3/deleteObject.d.ts +2 -3
- package/lib/AwsClients/S3/deleteObject.js +2 -2
- package/lib/AwsClients/S3/getObject.d.ts +2 -3
- package/lib/AwsClients/S3/getObject.js +2 -2
- package/lib/AwsClients/S3/headObject.d.ts +2 -3
- package/lib/AwsClients/S3/headObject.js +2 -2
- package/lib/AwsClients/S3/listObjectsV2.d.ts +2 -3
- package/lib/AwsClients/S3/listObjectsV2.js +2 -2
- package/lib/AwsClients/S3/listParts.d.ts +2 -3
- package/lib/AwsClients/S3/listParts.js +2 -2
- package/lib/AwsClients/S3/putObject.d.ts +2 -3
- package/lib/AwsClients/S3/putObject.js +2 -2
- package/lib/AwsClients/S3/runtime/base64/index.browser.js +2 -3
- package/lib/AwsClients/S3/runtime/base64/index.native.js +2 -3
- package/lib/AwsClients/S3/runtime/contentSha256middleware.js +2 -2
- package/lib/AwsClients/S3/runtime/xhrTransferHandler.d.ts +0 -1
- package/lib/AwsClients/S3/types.d.ts +0 -1
- package/lib/AwsClients/S3/uploadPart.d.ts +2 -3
- package/lib/AwsClients/S3/uploadPart.js +2 -2
- package/lib/AwsClients/S3/utils/deserializeHelpers.d.ts +2 -2
- package/lib/AwsClients/S3/utils/parsePayload.js +2 -2
- package/lib/AwsClients/S3/utils/serializeHelpers.js +2 -2
- package/lib/Storage.d.ts +8 -0
- package/lib/Storage.js +8 -0
- package/lib/common/MD5utils.js +2 -2
- package/lib/common/MD5utils.native.js +2 -2
- package/lib/common/S3ClientUtils.d.ts +0 -1
- package/lib/common/S3ClientUtils.js +2 -2
- package/lib/common/StorageErrorStrings.js +3 -3
- package/lib/providers/AWSS3Provider.d.ts +3 -0
- package/lib/providers/AWSS3Provider.js +39 -28
- package/lib/providers/AWSS3ProviderManagedUpload.d.ts +0 -1
- package/lib/providers/AWSS3ProviderManagedUpload.js +2 -2
- package/lib/providers/AWSS3UploadTask.d.ts +0 -1
- package/lib/providers/AWSS3UploadTask.js +14 -14
- 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/AwsClients/S3/abortMultipartUpload.d.ts +2 -3
- package/lib-esm/AwsClients/S3/abortMultipartUpload.js +2 -2
- package/lib-esm/AwsClients/S3/completeMultipartUpload.d.ts +2 -3
- package/lib-esm/AwsClients/S3/completeMultipartUpload.js +2 -2
- package/lib-esm/AwsClients/S3/copyObject.d.ts +2 -3
- package/lib-esm/AwsClients/S3/copyObject.js +2 -2
- package/lib-esm/AwsClients/S3/createMultipartUpload.d.ts +2 -3
- package/lib-esm/AwsClients/S3/createMultipartUpload.js +2 -2
- package/lib-esm/AwsClients/S3/deleteObject.d.ts +2 -3
- package/lib-esm/AwsClients/S3/deleteObject.js +2 -2
- package/lib-esm/AwsClients/S3/getObject.d.ts +2 -3
- package/lib-esm/AwsClients/S3/getObject.js +2 -2
- package/lib-esm/AwsClients/S3/headObject.d.ts +2 -3
- package/lib-esm/AwsClients/S3/headObject.js +2 -2
- package/lib-esm/AwsClients/S3/listObjectsV2.d.ts +2 -3
- package/lib-esm/AwsClients/S3/listObjectsV2.js +2 -2
- package/lib-esm/AwsClients/S3/listParts.d.ts +2 -3
- package/lib-esm/AwsClients/S3/listParts.js +2 -2
- package/lib-esm/AwsClients/S3/putObject.d.ts +2 -3
- package/lib-esm/AwsClients/S3/putObject.js +2 -2
- package/lib-esm/AwsClients/S3/runtime/contentSha256middleware.js +2 -2
- package/lib-esm/AwsClients/S3/runtime/xhrTransferHandler.d.ts +0 -1
- package/lib-esm/AwsClients/S3/types.d.ts +0 -1
- package/lib-esm/AwsClients/S3/uploadPart.d.ts +2 -3
- package/lib-esm/AwsClients/S3/uploadPart.js +2 -2
- package/lib-esm/AwsClients/S3/utils/deserializeHelpers.d.ts +2 -2
- package/lib-esm/AwsClients/S3/utils/parsePayload.js +2 -2
- package/lib-esm/AwsClients/S3/utils/serializeHelpers.js +2 -2
- package/lib-esm/Storage.d.ts +8 -0
- package/lib-esm/Storage.js +8 -0
- package/lib-esm/common/MD5utils.js +2 -2
- package/lib-esm/common/MD5utils.native.js +2 -2
- package/lib-esm/common/S3ClientUtils.d.ts +0 -1
- package/lib-esm/common/S3ClientUtils.js +2 -2
- package/lib-esm/providers/AWSS3Provider.d.ts +3 -0
- package/lib-esm/providers/AWSS3Provider.js +22 -21
- package/lib-esm/providers/AWSS3ProviderManagedUpload.d.ts +0 -1
- package/lib-esm/providers/AWSS3ProviderManagedUpload.js +2 -2
- package/lib-esm/providers/AWSS3UploadTask.d.ts +0 -1
- package/lib-esm/providers/AWSS3UploadTask.js +12 -12
- 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 +24 -14
- package/src/Storage.ts +8 -0
- package/src/providers/AWSS3Provider.ts +4 -1
- 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>;
|
package/lib/types/Provider.d.ts
CHANGED
|
@@ -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';
|
package/lib/types/Storage.d.ts
CHANGED
|
@@ -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;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { Endpoint, HttpResponse } from '@aws-amplify/core/internals/aws-client-utils';
|
|
3
2
|
import { MetadataBearer } from '@aws-sdk/types';
|
|
4
3
|
import type { AbortMultipartUploadCommandInput } from './types';
|
|
5
4
|
export type AbortMultipartUploadInput = Pick<AbortMultipartUploadCommandInput, 'Bucket' | 'Key' | 'UploadId'>;
|
|
6
5
|
export type AbortMultipartUploadOutput = MetadataBearer;
|
|
7
6
|
export declare const abortMultipartUpload: (config: Omit<import("@aws-amplify/core/internals/aws-client-utils").UserAgentOptions & import("@aws-amplify/core/internals/aws-client-utils").RetryOptions<HttpResponse> & import("@aws-amplify/core/internals/aws-client-utils").SigningOptions & import("./runtime/xhrTransferHandler").XhrTransferHandlerOptions & import("@aws-amplify/core/internals/aws-client-utils").ServiceClientOptions & Partial<import("@aws-amplify/core/internals/aws-client-utils").UserAgentOptions & import("@aws-amplify/core/internals/aws-client-utils").RetryOptions<HttpResponse> & import("@aws-amplify/core/internals/aws-client-utils").SigningOptions & import("./runtime/xhrTransferHandler").XhrTransferHandlerOptions & import("@aws-amplify/core/internals/aws-client-utils").ServiceClientOptions>, "emitter" | "responseType" | "abortSignal" | "computeDelay" | "region" | "endpointResolver" | "userAgentHeader" | "userAgentValue" | "retryDecider" | "maxAttempts" | "credentials" | "service" | "uriEscapePath"> & {
|
|
8
|
-
emitter?: import("events")
|
|
7
|
+
emitter?: import("events")<[never]>;
|
|
9
8
|
responseType?: "text" | "blob";
|
|
10
9
|
abortSignal?: AbortSignal;
|
|
11
10
|
computeDelay?: (attempt: number) => number;
|
|
@@ -15,7 +14,7 @@ export declare const abortMultipartUpload: (config: Omit<import("@aws-amplify/co
|
|
|
15
14
|
userAgentValue?: string;
|
|
16
15
|
retryDecider?: (response?: HttpResponse, error?: unknown) => Promise<boolean>;
|
|
17
16
|
maxAttempts?: number;
|
|
18
|
-
credentials?: import("@aws-
|
|
17
|
+
credentials?: import("@aws-amplify/core/internals/aws-client-utils").Credentials | (() => Promise<import("@aws-amplify/core/internals/aws-client-utils").Credentials>);
|
|
19
18
|
service?: string;
|
|
20
19
|
uriEscapePath?: boolean;
|
|
21
20
|
}, input: AbortMultipartUploadInput) => Promise<MetadataBearer>;
|
|
@@ -21,8 +21,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
24
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
25
|
-
return g =
|
|
24
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
25
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
26
26
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
27
27
|
function step(op) {
|
|
28
28
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { Endpoint, HttpResponse } from '@aws-amplify/core/internals/aws-client-utils';
|
|
3
2
|
import type { CompleteMultipartUploadCommandInput, CompleteMultipartUploadCommandOutput } from './types';
|
|
4
3
|
export type CompleteMultipartUploadInput = Pick<CompleteMultipartUploadCommandInput, 'Bucket' | 'Key' | 'UploadId' | 'MultipartUpload' | 'SSECustomerAlgorithm' | 'SSECustomerKey' | 'SSECustomerKeyMD5'>;
|
|
5
4
|
export type CompleteMultipartUploadOutput = Pick<CompleteMultipartUploadCommandOutput, '$metadata' | 'Key' | 'ETag' | 'Location'>;
|
|
6
5
|
export declare const completeMultipartUpload: (config: Omit<import("@aws-amplify/core/internals/aws-client-utils").UserAgentOptions & import("@aws-amplify/core/internals/aws-client-utils").RetryOptions<HttpResponse> & import("@aws-amplify/core/internals/aws-client-utils").SigningOptions & import("./runtime/xhrTransferHandler").XhrTransferHandlerOptions & import("@aws-amplify/core/internals/aws-client-utils").ServiceClientOptions & Partial<import("@aws-amplify/core/internals/aws-client-utils").UserAgentOptions & import("@aws-amplify/core/internals/aws-client-utils").RetryOptions<HttpResponse> & import("@aws-amplify/core/internals/aws-client-utils").SigningOptions & import("./runtime/xhrTransferHandler").XhrTransferHandlerOptions & import("@aws-amplify/core/internals/aws-client-utils").ServiceClientOptions>, "emitter" | "responseType" | "abortSignal" | "computeDelay" | "region" | "endpointResolver" | "userAgentHeader" | "userAgentValue" | "retryDecider" | "maxAttempts" | "credentials" | "service" | "uriEscapePath"> & {
|
|
7
|
-
emitter?: import("events")
|
|
6
|
+
emitter?: import("events")<[never]>;
|
|
8
7
|
responseType?: "text" | "blob";
|
|
9
8
|
abortSignal?: AbortSignal;
|
|
10
9
|
computeDelay?: (attempt: number) => number;
|
|
@@ -14,7 +13,7 @@ export declare const completeMultipartUpload: (config: Omit<import("@aws-amplify
|
|
|
14
13
|
userAgentValue?: string;
|
|
15
14
|
retryDecider?: (response?: HttpResponse, error?: unknown) => Promise<boolean>;
|
|
16
15
|
maxAttempts?: number;
|
|
17
|
-
credentials?: import("@aws-
|
|
16
|
+
credentials?: import("@aws-amplify/core/internals/aws-client-utils").Credentials | (() => Promise<import("@aws-amplify/core/internals/aws-client-utils").Credentials>);
|
|
18
17
|
service?: string;
|
|
19
18
|
uriEscapePath?: boolean;
|
|
20
19
|
}, input: CompleteMultipartUploadInput) => Promise<CompleteMultipartUploadOutput>;
|
|
@@ -21,8 +21,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
24
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
25
|
-
return g =
|
|
24
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
25
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
26
26
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
27
27
|
function step(op) {
|
|
28
28
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { Endpoint, HttpResponse } from '@aws-amplify/core/internals/aws-client-utils';
|
|
3
2
|
import { MetadataBearer } from '@aws-sdk/types';
|
|
4
3
|
import type { CopyObjectCommandInput } from './types';
|
|
@@ -8,7 +7,7 @@ import type { CopyObjectCommandInput } from './types';
|
|
|
8
7
|
export type CopyObjectInput = Pick<CopyObjectCommandInput, 'Bucket' | 'CopySource' | 'Key' | 'MetadataDirective' | 'CacheControl' | 'ContentType' | 'ContentDisposition' | 'ContentLanguage' | 'Expires' | 'ACL' | 'ServerSideEncryption' | 'SSECustomerAlgorithm' | 'SSECustomerKey' | 'SSECustomerKeyMD5' | 'SSEKMSKeyId' | 'Tagging' | 'Metadata'>;
|
|
9
8
|
export type CopyObjectOutput = MetadataBearer;
|
|
10
9
|
export declare const copyObject: (config: Omit<import("@aws-amplify/core/internals/aws-client-utils").UserAgentOptions & import("@aws-amplify/core/internals/aws-client-utils").RetryOptions<HttpResponse> & import("@aws-amplify/core/internals/aws-client-utils").SigningOptions & import("./runtime/xhrTransferHandler").XhrTransferHandlerOptions & import("@aws-amplify/core/internals/aws-client-utils").ServiceClientOptions & Partial<import("@aws-amplify/core/internals/aws-client-utils").UserAgentOptions & import("@aws-amplify/core/internals/aws-client-utils").RetryOptions<HttpResponse> & import("@aws-amplify/core/internals/aws-client-utils").SigningOptions & import("./runtime/xhrTransferHandler").XhrTransferHandlerOptions & import("@aws-amplify/core/internals/aws-client-utils").ServiceClientOptions>, "emitter" | "responseType" | "abortSignal" | "computeDelay" | "region" | "endpointResolver" | "userAgentHeader" | "userAgentValue" | "retryDecider" | "maxAttempts" | "credentials" | "service" | "uriEscapePath"> & {
|
|
11
|
-
emitter?: import("events")
|
|
10
|
+
emitter?: import("events")<[never]>;
|
|
12
11
|
responseType?: "text" | "blob";
|
|
13
12
|
abortSignal?: AbortSignal;
|
|
14
13
|
computeDelay?: (attempt: number) => number;
|
|
@@ -18,7 +17,7 @@ export declare const copyObject: (config: Omit<import("@aws-amplify/core/interna
|
|
|
18
17
|
userAgentValue?: string;
|
|
19
18
|
retryDecider?: (response?: HttpResponse, error?: unknown) => Promise<boolean>;
|
|
20
19
|
maxAttempts?: number;
|
|
21
|
-
credentials?: import("@aws-
|
|
20
|
+
credentials?: import("@aws-amplify/core/internals/aws-client-utils").Credentials | (() => Promise<import("@aws-amplify/core/internals/aws-client-utils").Credentials>);
|
|
22
21
|
service?: string;
|
|
23
22
|
uriEscapePath?: boolean;
|
|
24
23
|
}, input: CopyObjectInput) => Promise<MetadataBearer>;
|
|
@@ -21,8 +21,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
24
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
25
|
-
return g =
|
|
24
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
25
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
26
26
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
27
27
|
function step(op) {
|
|
28
28
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { Endpoint, HttpResponse } from '@aws-amplify/core/internals/aws-client-utils';
|
|
3
2
|
import type { CreateMultipartUploadCommandInput, CreateMultipartUploadCommandOutput } from './types';
|
|
4
3
|
import type { PutObjectInput } from './putObject';
|
|
5
4
|
export type CreateMultipartUploadInput = Extract<CreateMultipartUploadCommandInput, PutObjectInput>;
|
|
6
5
|
export type CreateMultipartUploadOutput = Pick<CreateMultipartUploadCommandOutput, 'UploadId' | '$metadata'>;
|
|
7
6
|
export declare const createMultipartUpload: (config: Omit<import("@aws-amplify/core/internals/aws-client-utils").UserAgentOptions & import("@aws-amplify/core/internals/aws-client-utils").RetryOptions<HttpResponse> & import("@aws-amplify/core/internals/aws-client-utils").SigningOptions & import("./runtime/xhrTransferHandler").XhrTransferHandlerOptions & import("@aws-amplify/core/internals/aws-client-utils").ServiceClientOptions & Partial<import("@aws-amplify/core/internals/aws-client-utils").UserAgentOptions & import("@aws-amplify/core/internals/aws-client-utils").RetryOptions<HttpResponse> & import("@aws-amplify/core/internals/aws-client-utils").SigningOptions & import("./runtime/xhrTransferHandler").XhrTransferHandlerOptions & import("@aws-amplify/core/internals/aws-client-utils").ServiceClientOptions>, "emitter" | "responseType" | "abortSignal" | "computeDelay" | "region" | "endpointResolver" | "userAgentHeader" | "userAgentValue" | "retryDecider" | "maxAttempts" | "credentials" | "service" | "uriEscapePath"> & {
|
|
8
|
-
emitter?: import("events")
|
|
7
|
+
emitter?: import("events")<[never]>;
|
|
9
8
|
responseType?: "text" | "blob";
|
|
10
9
|
abortSignal?: AbortSignal;
|
|
11
10
|
computeDelay?: (attempt: number) => number;
|
|
@@ -15,7 +14,7 @@ export declare const createMultipartUpload: (config: Omit<import("@aws-amplify/c
|
|
|
15
14
|
userAgentValue?: string;
|
|
16
15
|
retryDecider?: (response?: HttpResponse, error?: unknown) => Promise<boolean>;
|
|
17
16
|
maxAttempts?: number;
|
|
18
|
-
credentials?: import("@aws-
|
|
17
|
+
credentials?: import("@aws-amplify/core/internals/aws-client-utils").Credentials | (() => Promise<import("@aws-amplify/core/internals/aws-client-utils").Credentials>);
|
|
19
18
|
service?: string;
|
|
20
19
|
uriEscapePath?: boolean;
|
|
21
20
|
}, input: CreateMultipartUploadCommandInput) => Promise<CreateMultipartUploadOutput>;
|
|
@@ -21,8 +21,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
24
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
25
|
-
return g =
|
|
24
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
25
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
26
26
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
27
27
|
function step(op) {
|
|
28
28
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { Endpoint, HttpResponse } from '@aws-amplify/core/internals/aws-client-utils';
|
|
3
2
|
import type { DeleteObjectCommandInput, DeleteObjectCommandOutput } from './types';
|
|
4
3
|
export type DeleteObjectInput = Pick<DeleteObjectCommandInput, 'Bucket' | 'Key'>;
|
|
5
4
|
export type DeleteObjectOutput = DeleteObjectCommandOutput;
|
|
6
5
|
export declare const deleteObject: (config: Omit<import("@aws-amplify/core/internals/aws-client-utils").UserAgentOptions & import("@aws-amplify/core/internals/aws-client-utils").RetryOptions<HttpResponse> & import("@aws-amplify/core/internals/aws-client-utils").SigningOptions & import("./runtime/xhrTransferHandler").XhrTransferHandlerOptions & import("@aws-amplify/core/internals/aws-client-utils").ServiceClientOptions & Partial<import("@aws-amplify/core/internals/aws-client-utils").UserAgentOptions & import("@aws-amplify/core/internals/aws-client-utils").RetryOptions<HttpResponse> & import("@aws-amplify/core/internals/aws-client-utils").SigningOptions & import("./runtime/xhrTransferHandler").XhrTransferHandlerOptions & import("@aws-amplify/core/internals/aws-client-utils").ServiceClientOptions>, "emitter" | "responseType" | "abortSignal" | "computeDelay" | "region" | "endpointResolver" | "userAgentHeader" | "userAgentValue" | "retryDecider" | "maxAttempts" | "credentials" | "service" | "uriEscapePath"> & {
|
|
7
|
-
emitter?: import("events")
|
|
6
|
+
emitter?: import("events")<[never]>;
|
|
8
7
|
responseType?: "text" | "blob";
|
|
9
8
|
abortSignal?: AbortSignal;
|
|
10
9
|
computeDelay?: (attempt: number) => number;
|
|
@@ -14,7 +13,7 @@ export declare const deleteObject: (config: Omit<import("@aws-amplify/core/inter
|
|
|
14
13
|
userAgentValue?: string;
|
|
15
14
|
retryDecider?: (response?: HttpResponse, error?: unknown) => Promise<boolean>;
|
|
16
15
|
maxAttempts?: number;
|
|
17
|
-
credentials?: import("@aws-
|
|
16
|
+
credentials?: import("@aws-amplify/core/internals/aws-client-utils").Credentials | (() => Promise<import("@aws-amplify/core/internals/aws-client-utils").Credentials>);
|
|
18
17
|
service?: string;
|
|
19
18
|
uriEscapePath?: boolean;
|
|
20
19
|
}, input: DeleteObjectInput) => Promise<DeleteObjectCommandOutput>;
|
|
@@ -21,8 +21,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
24
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
25
|
-
return g =
|
|
24
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
25
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
26
26
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
27
27
|
function step(op) {
|
|
28
28
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { Endpoint, UserAgentOptions, PresignUrlOptions } from '@aws-amplify/core/internals/aws-client-utils';
|
|
3
2
|
import { S3EndpointResolverOptions } from './base';
|
|
4
3
|
import type { GetObjectCommandInput, GetObjectCommandOutput } from './types';
|
|
5
4
|
export type GetObjectInput = Pick<GetObjectCommandInput, 'Bucket' | 'Key' | 'ResponseCacheControl' | 'ResponseContentDisposition' | 'ResponseContentEncoding' | 'ResponseContentLanguage' | 'ResponseContentType' | 'SSECustomerAlgorithm' | 'SSECustomerKey' | 'SSECustomerKeyMD5'>;
|
|
6
5
|
export type GetObjectOutput = GetObjectCommandOutput;
|
|
7
6
|
export declare const getObject: (config: Omit<UserAgentOptions & import("@aws-amplify/core/internals/aws-client-utils").RetryOptions<import("@aws-amplify/core/internals/aws-client-utils").HttpResponse> & import("@aws-amplify/core/internals/aws-client-utils").SigningOptions & import("./runtime/xhrTransferHandler").XhrTransferHandlerOptions & import("@aws-amplify/core/internals/aws-client-utils").ServiceClientOptions & Partial<UserAgentOptions & import("@aws-amplify/core/internals/aws-client-utils").RetryOptions<import("@aws-amplify/core/internals/aws-client-utils").HttpResponse> & import("@aws-amplify/core/internals/aws-client-utils").SigningOptions & import("./runtime/xhrTransferHandler").XhrTransferHandlerOptions & import("@aws-amplify/core/internals/aws-client-utils").ServiceClientOptions>, "emitter" | "responseType" | "abortSignal" | "computeDelay" | "region" | "endpointResolver" | "userAgentHeader" | "userAgentValue" | "retryDecider" | "maxAttempts" | "credentials" | "service" | "uriEscapePath"> & {
|
|
8
|
-
emitter?: import("events")
|
|
7
|
+
emitter?: import("events")<[never]>;
|
|
9
8
|
responseType?: "text" | "blob";
|
|
10
9
|
abortSignal?: AbortSignal;
|
|
11
10
|
computeDelay?: (attempt: number) => number;
|
|
@@ -15,7 +14,7 @@ export declare const getObject: (config: Omit<UserAgentOptions & import("@aws-am
|
|
|
15
14
|
userAgentValue?: string;
|
|
16
15
|
retryDecider?: (response?: import("@aws-amplify/core/internals/aws-client-utils").HttpResponse, error?: unknown) => Promise<boolean>;
|
|
17
16
|
maxAttempts?: number;
|
|
18
|
-
credentials?: import("@aws-
|
|
17
|
+
credentials?: import("@aws-amplify/core/internals/aws-client-utils").Credentials | (() => Promise<import("@aws-amplify/core/internals/aws-client-utils").Credentials>);
|
|
19
18
|
service?: string;
|
|
20
19
|
uriEscapePath?: boolean;
|
|
21
20
|
}, input: GetObjectInput) => Promise<GetObjectCommandOutput>;
|
|
@@ -21,8 +21,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
24
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
25
|
-
return g =
|
|
24
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
25
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
26
26
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
27
27
|
function step(op) {
|
|
28
28
|
if (f) throw new TypeError("Generator is already executing.");
|