@cumulus/aws-client 11.0.0 → 11.1.1
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/DynamoDb.d.ts +27 -24
- package/DynamoDb.js +31 -19
- package/DynamoDbSearchQueue.js +10 -5
- package/README.md +168 -159
- package/S3.d.ts +86 -94
- package/S3.js +176 -135
- package/S3ListObjectsV2Queue.d.ts +4 -3
- package/S3ListObjectsV2Queue.js +1 -1
- package/S3ObjectStore.d.ts +12 -9
- package/S3ObjectStore.js +43 -44
- package/client.d.ts +2 -2
- package/client.js +13 -14
- package/lib/S3MultipartUploads.d.ts +5 -4
- package/lib/S3MultipartUploads.js +4 -4
- package/package.json +20 -7
- package/services.d.ts +25 -21
- package/services.js +30 -22
- package/test-utils.d.ts +26 -4
- package/test-utils.js +24 -17
- package/types.d.ts +6 -0
- package/types.js +3 -0
- package/utils.d.ts +1 -0
- package/utils.js +3 -1
package/S3.d.ts
CHANGED
|
@@ -4,17 +4,10 @@
|
|
|
4
4
|
/// <reference types="node" />
|
|
5
5
|
import pRetry from 'p-retry';
|
|
6
6
|
import { Readable, TransformOptions } from 'stream';
|
|
7
|
+
import { CopyObjectCommandInput, DeleteObjectRequest, GetObjectCommandInput, GetObjectOutput, HeadObjectOutput, ListObjectsV2Output, ListObjectsV2Request, ObjectCannedACL, PutObjectCommandInput, PutObjectRequest, S3, Tagging } from '@aws-sdk/client-s3';
|
|
8
|
+
import { Options as UploadOptions } from '@aws-sdk/lib-storage';
|
|
7
9
|
import { s3 } from './services';
|
|
8
|
-
export declare type
|
|
9
|
-
createReadStream: () => Readable;
|
|
10
|
-
};
|
|
11
|
-
export declare type GetObjectPromiseMethod = (params: AWS.S3.GetObjectRequest) => {
|
|
12
|
-
promise: () => Promise<AWS.S3.GetObjectOutput>;
|
|
13
|
-
};
|
|
14
|
-
export declare type Object = Required<AWS.S3.Object>;
|
|
15
|
-
export interface ListObjectsV2Output extends AWS.S3.ListObjectsV2Output {
|
|
16
|
-
Contents: Object[];
|
|
17
|
-
}
|
|
10
|
+
export declare type GetObjectMethod = (params: GetObjectCommandInput) => Promise<GetObjectOutput>;
|
|
18
11
|
/**
|
|
19
12
|
* Join strings into an S3 key without a leading slash
|
|
20
13
|
*
|
|
@@ -47,15 +40,20 @@ export declare const buildS3Uri: (bucket: string, key: string) => string;
|
|
|
47
40
|
* @param {Array<Object>} tagset - S3 TagSet array
|
|
48
41
|
* @returns {string} tags query string
|
|
49
42
|
*/
|
|
50
|
-
export declare const s3TagSetToQueryString: (tagset:
|
|
43
|
+
export declare const s3TagSetToQueryString: (tagset: Tagging['TagSet']) => string | undefined;
|
|
51
44
|
/**
|
|
52
45
|
* Delete an object from S3
|
|
53
46
|
*
|
|
54
47
|
* @param {string} bucket - bucket where the object exists
|
|
55
48
|
* @param {string} key - key of the object to be deleted
|
|
56
|
-
* promise of the object being deleted
|
|
49
|
+
* @returns {Promise} promise of the object being deleted
|
|
57
50
|
*/
|
|
58
|
-
export declare const deleteS3Object: (bucket: string, key: string) => Promise<import("aws-sdk/
|
|
51
|
+
export declare const deleteS3Object: (bucket: string, key: string) => Promise<import("@aws-sdk/client-s3").DeleteObjectCommandOutput>;
|
|
52
|
+
export declare const deleteS3Objects: (params: {
|
|
53
|
+
client: S3;
|
|
54
|
+
bucket: string;
|
|
55
|
+
keys: string[];
|
|
56
|
+
}) => Promise<import("@aws-sdk/client-s3").DeleteObjectsCommandOutput>;
|
|
59
57
|
/**
|
|
60
58
|
* Get an object header from S3
|
|
61
59
|
*
|
|
@@ -66,7 +64,7 @@ export declare const deleteS3Object: (bucket: string, key: string) => Promise<im
|
|
|
66
64
|
* By default, retries will not be performed
|
|
67
65
|
* @returns {Promise} returns response from `S3.headObject` as a promise
|
|
68
66
|
**/
|
|
69
|
-
export declare const headObject: (Bucket: string, Key: string, retryOptions?: pRetry.Options
|
|
67
|
+
export declare const headObject: (Bucket: string, Key: string, retryOptions?: pRetry.Options) => Promise<import("@aws-sdk/client-s3").HeadObjectCommandOutput>;
|
|
70
68
|
/**
|
|
71
69
|
* Test if an object exists in S3
|
|
72
70
|
*
|
|
@@ -99,8 +97,9 @@ export declare const waitForObjectToExist: (params: {
|
|
|
99
97
|
*
|
|
100
98
|
* @param {Object} params - same params as https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#putObject-property
|
|
101
99
|
* promise of the object being put
|
|
100
|
+
* @returns {Promise}
|
|
102
101
|
**/
|
|
103
|
-
export declare const s3PutObject: (params:
|
|
102
|
+
export declare const s3PutObject: (params: PutObjectCommandInput) => Promise<import("@aws-sdk/client-s3").PutObjectCommandOutput>;
|
|
104
103
|
/**
|
|
105
104
|
* Upload a file to S3
|
|
106
105
|
*
|
|
@@ -109,35 +108,50 @@ export declare const s3PutObject: (params: import("aws-sdk/clients/s3").PutObjec
|
|
|
109
108
|
* @param {filename} filename - the local file to be uploaded
|
|
110
109
|
* @returns {Promise}
|
|
111
110
|
*/
|
|
112
|
-
export declare const putFile: (bucket: string, key: string, filename: string) => Promise<import("aws-sdk/
|
|
111
|
+
export declare const putFile: (bucket: string, key: string, filename: string) => Promise<import("@aws-sdk/client-s3").PutObjectCommandOutput>;
|
|
113
112
|
/**
|
|
114
113
|
* Copy an object from one location on S3 to another
|
|
115
114
|
*
|
|
116
115
|
* @param {Object} params - same params as https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#putObject-property
|
|
117
116
|
* @returns {Promise} promise of the object being copied
|
|
118
117
|
**/
|
|
119
|
-
export declare const s3CopyObject: (params:
|
|
118
|
+
export declare const s3CopyObject: (params: CopyObjectCommandInput) => Promise<import("@aws-sdk/client-s3").CopyObjectCommandOutput>;
|
|
120
119
|
/**
|
|
121
120
|
* Upload data to S3
|
|
122
121
|
*
|
|
123
|
-
*
|
|
122
|
+
* see https://github.com/aws/aws-sdk-js-v3/tree/main/lib/lib-storage
|
|
124
123
|
*
|
|
125
|
-
* @param {
|
|
126
|
-
* @returns {Promise}
|
|
124
|
+
* @param {UploadOptions} params
|
|
125
|
+
* @returns {Promise}
|
|
127
126
|
*/
|
|
128
|
-
export declare const promiseS3Upload: (params:
|
|
127
|
+
export declare const promiseS3Upload: (params: Omit<UploadOptions, 'client'>) => Promise<{
|
|
128
|
+
[key: string]: any;
|
|
129
|
+
ETag?: string | undefined;
|
|
130
|
+
}>;
|
|
129
131
|
/**
|
|
130
132
|
* Upload data to S3 using a stream
|
|
131
133
|
*
|
|
132
|
-
* We are not using `s3.upload().promise()` due to errors observed in testing
|
|
133
|
-
* with uncaught exceptions. By creating our own promise, we can ensure any
|
|
134
|
-
* errors from the streams or upload cause this promise to reject.
|
|
135
|
-
*
|
|
136
134
|
* @param {Readable} uploadStream - Stream of data to upload
|
|
137
|
-
* @param {Object} uploadParams
|
|
135
|
+
* @param {Object} uploadParams
|
|
138
136
|
* @returns {Promise}
|
|
139
137
|
*/
|
|
140
|
-
export declare const streamS3Upload: (uploadStream: Readable, uploadParams:
|
|
138
|
+
export declare const streamS3Upload: (uploadStream: Readable, uploadParams: UploadOptions) => Promise<import("@aws-sdk/client-s3").ServiceOutputTypes>;
|
|
139
|
+
/**
|
|
140
|
+
* Get a readable stream for an S3 object
|
|
141
|
+
*
|
|
142
|
+
* @param {Object} params
|
|
143
|
+
* @param {S3} params.s3 - an S3 instance
|
|
144
|
+
* @param {string} params.bucket - the bucket of the requested object
|
|
145
|
+
* @param {string} params.key - the key of the requested object
|
|
146
|
+
* @returns {Promise<Readable>}
|
|
147
|
+
*/
|
|
148
|
+
export declare const getObjectReadStream: (params: {
|
|
149
|
+
s3: {
|
|
150
|
+
getObject: GetObjectMethod;
|
|
151
|
+
};
|
|
152
|
+
bucket: string;
|
|
153
|
+
key: string;
|
|
154
|
+
}) => Promise<Readable>;
|
|
141
155
|
/**
|
|
142
156
|
* Downloads the given s3Obj to the given filename in a streaming manner
|
|
143
157
|
*
|
|
@@ -145,27 +159,18 @@ export declare const streamS3Upload: (uploadStream: Readable, uploadParams: AWS.
|
|
|
145
159
|
* @param {string} filepath - The filepath of the file that is downloaded
|
|
146
160
|
* @returns {Promise<string>} returns filename if successful
|
|
147
161
|
*/
|
|
148
|
-
export declare const downloadS3File: (s3Obj:
|
|
162
|
+
export declare const downloadS3File: (s3Obj: GetObjectCommandInput, filepath: string) => Promise<string>;
|
|
149
163
|
/**
|
|
150
164
|
* Get the size of an S3 object
|
|
151
165
|
*
|
|
152
166
|
* @param {Object} params
|
|
153
167
|
* @param {string} params.bucket
|
|
154
168
|
* @param {string} params.key
|
|
155
|
-
* @param {
|
|
169
|
+
* @param {S3} params.s3 - an S3 client instance
|
|
156
170
|
* @returns {Promise<number|undefined>} object size, in bytes
|
|
157
171
|
*/
|
|
158
172
|
export declare const getObjectSize: (params: {
|
|
159
|
-
s3:
|
|
160
|
-
headObject: (params: {
|
|
161
|
-
Bucket: string;
|
|
162
|
-
Key: string;
|
|
163
|
-
}) => {
|
|
164
|
-
promise: () => Promise<{
|
|
165
|
-
ContentLength?: number;
|
|
166
|
-
}>;
|
|
167
|
-
};
|
|
168
|
-
};
|
|
173
|
+
s3: S3;
|
|
169
174
|
bucket: string;
|
|
170
175
|
key: string;
|
|
171
176
|
}) => Promise<number | undefined>;
|
|
@@ -174,46 +179,42 @@ export declare const getObjectSize: (params: {
|
|
|
174
179
|
*
|
|
175
180
|
* @param {string} bucket - name of bucket
|
|
176
181
|
* @param {string} key - key for object (filepath + filename)
|
|
177
|
-
* @returns {Promise<
|
|
182
|
+
* @returns {Promise<GetObjectTaggingOutput>} the promised response from `S3.getObjectTagging`
|
|
178
183
|
**/
|
|
179
|
-
export declare const s3GetObjectTagging: (bucket: string, key: string) => Promise<import("aws-sdk/
|
|
184
|
+
export declare const s3GetObjectTagging: (bucket: string, key: string) => Promise<import("@aws-sdk/client-s3").GetObjectTaggingCommandOutput>;
|
|
180
185
|
/**
|
|
181
186
|
* Puts object Tagging in S3
|
|
182
187
|
* https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#putObjectTagging-property
|
|
183
188
|
*
|
|
184
189
|
* @param {string} Bucket - name of bucket
|
|
185
190
|
* @param {string} Key - key for object (filepath + filename)
|
|
186
|
-
* @param {Object}
|
|
191
|
+
* @param {Object} ObjectTagging - tagging object
|
|
187
192
|
* @returns {Promise} returns response from `S3.getObjectTagging` as a promise
|
|
188
193
|
**/
|
|
189
|
-
export declare const s3PutObjectTagging: (Bucket: string, Key: string,
|
|
194
|
+
export declare const s3PutObjectTagging: (Bucket: string, Key: string, ObjectTagging: Tagging) => Promise<import("@aws-sdk/client-s3").PutObjectTaggingCommandOutput>;
|
|
190
195
|
/**
|
|
191
196
|
* Gets an object from S3.
|
|
192
197
|
*
|
|
193
198
|
* @example
|
|
194
199
|
* const obj = await getObject(s3(), { Bucket: 'b', Key: 'k' })
|
|
195
200
|
*
|
|
196
|
-
* @param {
|
|
197
|
-
* @param {
|
|
198
|
-
* to `
|
|
199
|
-
* @returns {Promise<
|
|
201
|
+
* @param {S3} s3Client - an `S3` instance
|
|
202
|
+
* @param {GetObjectCommandInput} params - parameters object to pass through
|
|
203
|
+
* to `S3.getObject()`
|
|
204
|
+
* @returns {Promise<GetObjectOutput>} response from `S3.getObject()`
|
|
200
205
|
* as a Promise
|
|
201
206
|
*/
|
|
202
|
-
export declare const getObject: (s3Client:
|
|
203
|
-
getObject: GetObjectPromiseMethod;
|
|
204
|
-
}, params: AWS.S3.GetObjectRequest) => Promise<AWS.S3.GetObjectOutput>;
|
|
207
|
+
export declare const getObject: (s3Client: S3, params: GetObjectCommandInput) => Promise<GetObjectOutput>;
|
|
205
208
|
/**
|
|
206
209
|
* Get an object from S3, waiting for it to exist and, if specified, have the
|
|
207
210
|
* correct ETag.
|
|
208
211
|
*
|
|
209
|
-
* @param {
|
|
210
|
-
* @param {
|
|
212
|
+
* @param {S3} s3Client
|
|
213
|
+
* @param {GetObjectCommandInput} params
|
|
211
214
|
* @param {pRetry.Options} [retryOptions={}]
|
|
212
|
-
* @returns {Promise<
|
|
215
|
+
* @returns {Promise<GetObjectOutput>}
|
|
213
216
|
*/
|
|
214
|
-
export declare const waitForObject: (s3Client:
|
|
215
|
-
getObject: GetObjectPromiseMethod;
|
|
216
|
-
}, params: AWS.S3.GetObjectRequest, retryOptions?: pRetry.Options) => Promise<AWS.S3.GetObjectOutput>;
|
|
217
|
+
export declare const waitForObject: (s3Client: S3, params: GetObjectCommandInput, retryOptions?: pRetry.Options) => Promise<GetObjectOutput>;
|
|
217
218
|
/**
|
|
218
219
|
* Gets an object from S3.
|
|
219
220
|
*
|
|
@@ -226,7 +227,15 @@ export declare const waitForObject: (s3Client: {
|
|
|
226
227
|
*
|
|
227
228
|
* @deprecated
|
|
228
229
|
*/
|
|
229
|
-
export declare const getS3Object: (Bucket: string, Key: string, retryOptions?: pRetry.Options
|
|
230
|
+
export declare const getS3Object: (Bucket: string, Key: string, retryOptions?: pRetry.Options) => Promise<GetObjectOutput>;
|
|
231
|
+
export declare const getObjectStreamBuffers: (objectReadStream: Readable) => Promise<Buffer[]>;
|
|
232
|
+
/**
|
|
233
|
+
* Transform streaming response from S3 object to text content
|
|
234
|
+
*
|
|
235
|
+
* @param {Readable} objectReadStream - Readable stream of S3 object
|
|
236
|
+
* @returns {Promise<string>} the contents of the S3 object
|
|
237
|
+
*/
|
|
238
|
+
export declare const getObjectStreamContents: (objectReadStream: Readable) => Promise<string>;
|
|
230
239
|
/**
|
|
231
240
|
* Fetch the contents of an S3 object
|
|
232
241
|
*
|
|
@@ -234,7 +243,7 @@ export declare const getS3Object: (Bucket: string, Key: string, retryOptions?: p
|
|
|
234
243
|
* @param {string} key - the S3 object's key
|
|
235
244
|
* @returns {Promise<string>} the contents of the S3 object
|
|
236
245
|
*/
|
|
237
|
-
export declare const getTextObject: (bucket: string, key: string) => Promise<string
|
|
246
|
+
export declare const getTextObject: (bucket: string, key: string) => Promise<string>;
|
|
238
247
|
/**
|
|
239
248
|
* Fetch JSON stored in an S3 object
|
|
240
249
|
* @param {string} bucket - the S3 object's bucket
|
|
@@ -242,23 +251,7 @@ export declare const getTextObject: (bucket: string, key: string) => Promise<str
|
|
|
242
251
|
* @returns {Promise<*>} the contents of the S3 object, parsed as JSON
|
|
243
252
|
*/
|
|
244
253
|
export declare const getJsonS3Object: (bucket: string, key: string) => Promise<any>;
|
|
245
|
-
export declare const putJsonS3Object: (bucket: string, key: string, data: any) => Promise<import("aws-sdk/
|
|
246
|
-
/**
|
|
247
|
-
* Get a readable stream for an S3 object
|
|
248
|
-
*
|
|
249
|
-
* @param {Object} params
|
|
250
|
-
* @param {AWS.S3} params.s3 - an AWS.S3 instance
|
|
251
|
-
* @param {string} params.bucket - the bucket of the requested object
|
|
252
|
-
* @param {string} params.key - the key of the requested object
|
|
253
|
-
* @returns {Readable}
|
|
254
|
-
*/
|
|
255
|
-
export declare const getObjectReadStream: (params: {
|
|
256
|
-
s3: {
|
|
257
|
-
getObject: GetObjectCreateReadStreamMethod;
|
|
258
|
-
};
|
|
259
|
-
bucket: string;
|
|
260
|
-
key: string;
|
|
261
|
-
}) => Readable;
|
|
254
|
+
export declare const putJsonS3Object: (bucket: string, key: string, data: any) => Promise<import("@aws-sdk/client-s3").PutObjectCommandOutput>;
|
|
262
255
|
/**
|
|
263
256
|
* Check if a file exists in an S3 object
|
|
264
257
|
*
|
|
@@ -266,8 +259,7 @@ export declare const getObjectReadStream: (params: {
|
|
|
266
259
|
* @param {string} key - key of the file in the S3 bucket
|
|
267
260
|
* @returns {Promise} returns the response from `S3.headObject` as a promise
|
|
268
261
|
**/
|
|
269
|
-
export declare const fileExists: (bucket: string, key: string) => Promise<false | import("aws-sdk/
|
|
270
|
-
export declare const downloadS3Files: (s3Objs: AWS.S3.GetObjectRequest[], dir: string, s3opts?: Partial<AWS.S3.GetObjectRequest>) => Promise<unknown[]>;
|
|
262
|
+
export declare const fileExists: (bucket: string, key: string) => Promise<false | import("@aws-sdk/client-s3").HeadObjectCommandOutput>;
|
|
271
263
|
/**
|
|
272
264
|
* Delete files from S3
|
|
273
265
|
*
|
|
@@ -275,16 +267,14 @@ export declare const downloadS3Files: (s3Objs: AWS.S3.GetObjectRequest[], dir: s
|
|
|
275
267
|
* @returns {Promise} A promise that resolves to an Array of the data returned
|
|
276
268
|
* from the deletion operations
|
|
277
269
|
*/
|
|
278
|
-
export declare const deleteS3Files: (s3Objs:
|
|
270
|
+
export declare const deleteS3Files: (s3Objs: DeleteObjectRequest[]) => Promise<import("@aws-sdk/client-s3").DeleteObjectCommandOutput[]>;
|
|
279
271
|
/**
|
|
280
272
|
* Delete a bucket and all of its objects from S3
|
|
281
273
|
*
|
|
282
274
|
* @param {string} bucket - name of the bucket
|
|
283
275
|
* @returns {Promise} the promised result of `S3.deleteBucket`
|
|
284
276
|
**/
|
|
285
|
-
export declare const recursivelyDeleteS3Bucket: (bucket: string) => Promise<
|
|
286
|
-
$response: import("aws-sdk").Response<{}, import("aws-sdk").AWSError>;
|
|
287
|
-
}>;
|
|
277
|
+
export declare const recursivelyDeleteS3Bucket: (bucket: string) => Promise<import("@aws-sdk/client-s3").DeleteBucketCommandOutput>;
|
|
288
278
|
/**
|
|
289
279
|
* Delete a list of buckets and all of their objects from S3
|
|
290
280
|
*
|
|
@@ -297,7 +287,7 @@ declare type FileInfo = {
|
|
|
297
287
|
key: string;
|
|
298
288
|
bucket: string;
|
|
299
289
|
};
|
|
300
|
-
export declare const uploadS3Files: (files: Array<string | FileInfo>, defaultBucket: string, keyPath: string | ((x: string) => string), s3opts?: Partial<
|
|
290
|
+
export declare const uploadS3Files: (files: Array<string | FileInfo>, defaultBucket: string, keyPath: string | ((x: string) => string), s3opts?: Partial<PutObjectRequest>) => Promise<{
|
|
301
291
|
key: string;
|
|
302
292
|
bucket: string;
|
|
303
293
|
}[]>;
|
|
@@ -310,7 +300,10 @@ export declare const uploadS3Files: (files: Array<string | FileInfo>, defaultBuc
|
|
|
310
300
|
* @param {Object} s3opts - Options to pass to the AWS sdk call (defaults to `{}`)
|
|
311
301
|
* @returns {Promise} A promise
|
|
312
302
|
*/
|
|
313
|
-
export declare const uploadS3FileStream: (fileStream: Readable, bucket: string, key: string, s3opts?: Partial<
|
|
303
|
+
export declare const uploadS3FileStream: (fileStream: Readable, bucket: string, key: string, s3opts?: Partial<PutObjectRequest>) => Promise<{
|
|
304
|
+
[key: string]: any;
|
|
305
|
+
ETag?: string | undefined;
|
|
306
|
+
}>;
|
|
314
307
|
/**
|
|
315
308
|
* List the objects in an S3 bucket
|
|
316
309
|
*
|
|
@@ -323,8 +316,7 @@ export declare const uploadS3FileStream: (fileStream: Readable, bucket: string,
|
|
|
323
316
|
* object is represented as a JS object with the following attributes: `Key`,
|
|
324
317
|
* `ETag`, `LastModified`, `Owner`, `Size`, `StorageClass`.
|
|
325
318
|
*/
|
|
326
|
-
export declare const listS3Objects: (bucket: string, prefix?: string | undefined, skipFolders?: boolean) => Promise<import("aws-sdk/
|
|
327
|
-
export declare type ListS3ObjectsV2Result = Promise<Object[]>;
|
|
319
|
+
export declare const listS3Objects: (bucket: string, prefix?: string | undefined, skipFolders?: boolean) => Promise<import("@aws-sdk/client-s3")._Object[]>;
|
|
328
320
|
/**
|
|
329
321
|
* Fetch complete list of S3 objects
|
|
330
322
|
*
|
|
@@ -341,12 +333,12 @@ export declare type ListS3ObjectsV2Result = Promise<Object[]>;
|
|
|
341
333
|
*
|
|
342
334
|
* @static
|
|
343
335
|
*/
|
|
344
|
-
export declare const listS3ObjectsV2: (params:
|
|
336
|
+
export declare const listS3ObjectsV2: (params: ListObjectsV2Request) => Promise<ListObjectsV2Output['Contents']>;
|
|
345
337
|
/**
|
|
346
338
|
* Calculate the cryptographic hash of an S3 object
|
|
347
339
|
*
|
|
348
340
|
* @param {Object} params
|
|
349
|
-
* @param {
|
|
341
|
+
* @param {S3} params.s3 - an S3 instance
|
|
350
342
|
* @param {string} params.algorithm - `cksum`, or an algorithm listed in
|
|
351
343
|
* `openssl list -digest-algorithms`
|
|
352
344
|
* @param {string} params.bucket
|
|
@@ -354,7 +346,7 @@ export declare const listS3ObjectsV2: (params: AWS.S3.ListObjectsV2Request) => L
|
|
|
354
346
|
*/
|
|
355
347
|
export declare const calculateObjectHash: (params: {
|
|
356
348
|
s3: {
|
|
357
|
-
getObject:
|
|
349
|
+
getObject: GetObjectMethod;
|
|
358
350
|
};
|
|
359
351
|
algorithm: string;
|
|
360
352
|
bucket: string;
|
|
@@ -394,7 +386,7 @@ export declare const getFileBucketAndKey: (pathParams: string) => [string, strin
|
|
|
394
386
|
* @param {string} Bucket - the name of the S3 bucket to create
|
|
395
387
|
* @returns {Promise}
|
|
396
388
|
*/
|
|
397
|
-
export declare const createBucket: (Bucket: string) => Promise<import("aws-sdk/
|
|
389
|
+
export declare const createBucket: (Bucket: string) => Promise<import("@aws-sdk/client-s3").CreateBucketCommandOutput>;
|
|
398
390
|
/**
|
|
399
391
|
* Create multiple S3 buckets
|
|
400
392
|
*
|
|
@@ -410,7 +402,7 @@ export declare const createS3Buckets: (buckets: Array<string>) => Promise<any>;
|
|
|
410
402
|
* @param {string} params.sourceKey
|
|
411
403
|
* @param {string} params.destinationBucket
|
|
412
404
|
* @param {string} params.destinationKey
|
|
413
|
-
* @param {
|
|
405
|
+
* @param {S3.HeadObjectOutput} [params.sourceObject]
|
|
414
406
|
* Output from https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#headObject-property
|
|
415
407
|
* @param {string} [params.ACL] - an [S3 Canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl)
|
|
416
408
|
* @param {boolean} [params.copyTags=false]
|
|
@@ -423,8 +415,8 @@ export declare const multipartCopyObject: (params: {
|
|
|
423
415
|
sourceKey: string;
|
|
424
416
|
destinationBucket: string;
|
|
425
417
|
destinationKey: string;
|
|
426
|
-
sourceObject?:
|
|
427
|
-
ACL?:
|
|
418
|
+
sourceObject?: HeadObjectOutput;
|
|
419
|
+
ACL?: ObjectCannedACL;
|
|
428
420
|
copyTags?: boolean;
|
|
429
421
|
chunkSize?: number;
|
|
430
422
|
}) => Promise<{
|
|
@@ -448,9 +440,9 @@ export declare const moveObject: (params: {
|
|
|
448
440
|
sourceKey: string;
|
|
449
441
|
destinationBucket: string;
|
|
450
442
|
destinationKey: string;
|
|
451
|
-
ACL?:
|
|
443
|
+
ACL?: string;
|
|
452
444
|
copyTags?: boolean;
|
|
453
445
|
chunkSize?: number;
|
|
454
|
-
}) => Promise<import("aws-sdk/
|
|
446
|
+
}) => Promise<import("@aws-sdk/client-s3").DeleteObjectCommandOutput>;
|
|
455
447
|
export {};
|
|
456
448
|
//# sourceMappingURL=S3.d.ts.map
|