@aws-sdk/client-s3 3.374.0 → 3.378.0

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.
@@ -1,6 +1,6 @@
1
1
  import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
2
2
  import { Command as $Command } from "@smithy/smithy-client";
3
- import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack, WithSdkStreamMixin as __WithSdkStreamMixin } from "@smithy/types";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack, StreamingBlobPayloadOutputTypes } from "@smithy/types";
4
4
  import { GetObjectOutput, GetObjectRequest } from "../models/models_0";
5
5
  import { S3ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3Client";
6
6
  /**
@@ -19,7 +19,8 @@ export interface GetObjectCommandInput extends GetObjectRequest {
19
19
  *
20
20
  * The output of {@link GetObjectCommand}.
21
21
  */
22
- export interface GetObjectCommandOutput extends __WithSdkStreamMixin<GetObjectOutput, "Body">, __MetadataBearer {
22
+ export interface GetObjectCommandOutput extends Omit<GetObjectOutput, "Body">, __MetadataBearer {
23
+ Body?: StreamingBlobPayloadOutputTypes;
23
24
  }
24
25
  /**
25
26
  * @public
@@ -1,6 +1,6 @@
1
1
  import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
2
2
  import { Command as $Command } from "@smithy/smithy-client";
3
- import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack, WithSdkStreamMixin as __WithSdkStreamMixin } from "@smithy/types";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack, StreamingBlobPayloadOutputTypes } from "@smithy/types";
4
4
  import { GetObjectTorrentOutput, GetObjectTorrentRequest } from "../models/models_0";
5
5
  import { S3ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3Client";
6
6
  /**
@@ -19,7 +19,8 @@ export interface GetObjectTorrentCommandInput extends GetObjectTorrentRequest {
19
19
  *
20
20
  * The output of {@link GetObjectTorrentCommand}.
21
21
  */
22
- export interface GetObjectTorrentCommandOutput extends __WithSdkStreamMixin<GetObjectTorrentOutput, "Body">, __MetadataBearer {
22
+ export interface GetObjectTorrentCommandOutput extends Omit<GetObjectTorrentOutput, "Body">, __MetadataBearer {
23
+ Body?: StreamingBlobPayloadOutputTypes;
23
24
  }
24
25
  /**
25
26
  * @public
@@ -1,25 +1,19 @@
1
- /// <reference types="node" />
2
1
  import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
3
2
  import { Command as $Command } from "@smithy/smithy-client";
4
- import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack, StreamingBlobPayloadInputTypes } from "@smithy/types";
5
4
  import { PutObjectOutput, PutObjectRequest } from "../models/models_0";
6
5
  import { S3ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3Client";
7
6
  /**
8
7
  * @public
9
8
  */
10
9
  export { __MetadataBearer, $Command };
11
- export type PutObjectCommandInputType = Omit<PutObjectRequest, "Body"> & {
12
- /**
13
- * For *`PutObjectRequest["Body"]`*, see {@link PutObjectRequest.Body}.
14
- */
15
- Body?: PutObjectRequest["Body"] | string | Uint8Array | Buffer;
16
- };
17
10
  /**
18
11
  * @public
19
12
  *
20
13
  * The input for {@link PutObjectCommand}.
21
14
  */
22
- export interface PutObjectCommandInput extends PutObjectCommandInputType {
15
+ export interface PutObjectCommandInput extends Omit<PutObjectRequest, "Body"> {
16
+ Body?: StreamingBlobPayloadInputTypes;
23
17
  }
24
18
  /**
25
19
  * @public
@@ -198,23 +192,23 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare
198
192
  * @throws {@link S3ServiceException}
199
193
  * <p>Base exception class for all service exceptions from S3 service.</p>
200
194
  *
201
- * @example To create an object.
195
+ * @example To upload an object
202
196
  * ```javascript
203
- * // The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.
197
+ * // The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file syntax. S3 returns VersionId of the newly created object.
204
198
  * const input = {
205
- * "Body": "filetoupload",
199
+ * "Body": "HappyFace.jpg",
206
200
  * "Bucket": "examplebucket",
207
- * "Key": "objectkey"
201
+ * "Key": "HappyFace.jpg"
208
202
  * };
209
203
  * const command = new PutObjectCommand(input);
210
204
  * const response = await client.send(command);
211
205
  * /* response ==
212
206
  * {
213
207
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
214
- * "VersionId": "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ"
208
+ * "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk"
215
209
  * }
216
210
  * *\/
217
- * // example id: to-create-an-object-1483147613675
211
+ * // example id: to-upload-an-object-1481760101010
218
212
  * ```
219
213
  *
220
214
  * @example To upload object and specify user-defined metadata
@@ -240,54 +234,56 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare
240
234
  * // example id: to-upload-object-and-specify-user-defined-metadata-1483396974757
241
235
  * ```
242
236
  *
243
- * @example To upload an object
237
+ * @example To upload an object (specify optional headers)
244
238
  * ```javascript
245
- * // The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file syntax. S3 returns VersionId of the newly created object.
239
+ * // The following example uploads an object. The request specifies optional request headers to directs S3 to use specific storage class and use server-side encryption.
246
240
  * const input = {
247
241
  * "Body": "HappyFace.jpg",
248
242
  * "Bucket": "examplebucket",
249
- * "Key": "HappyFace.jpg"
243
+ * "Key": "HappyFace.jpg",
244
+ * "ServerSideEncryption": "AES256",
245
+ * "StorageClass": "STANDARD_IA"
250
246
  * };
251
247
  * const command = new PutObjectCommand(input);
252
248
  * const response = await client.send(command);
253
249
  * /* response ==
254
250
  * {
255
251
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
256
- * "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk"
252
+ * "ServerSideEncryption": "AES256",
253
+ * "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp"
257
254
  * }
258
255
  * *\/
259
- * // example id: to-upload-an-object-1481760101010
256
+ * // example id: to-upload-an-object-(specify-optional-headers)
260
257
  * ```
261
258
  *
262
- * @example To upload an object and specify canned ACL.
259
+ * @example To create an object.
263
260
  * ```javascript
264
- * // The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.
261
+ * // The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.
265
262
  * const input = {
266
- * "ACL": "authenticated-read",
267
263
  * "Body": "filetoupload",
268
264
  * "Bucket": "examplebucket",
269
- * "Key": "exampleobject"
265
+ * "Key": "objectkey"
270
266
  * };
271
267
  * const command = new PutObjectCommand(input);
272
268
  * const response = await client.send(command);
273
269
  * /* response ==
274
270
  * {
275
271
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
276
- * "VersionId": "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr"
272
+ * "VersionId": "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ"
277
273
  * }
278
274
  * *\/
279
- * // example id: to-upload-an-object-and-specify-canned-acl-1483397779571
275
+ * // example id: to-create-an-object-1483147613675
280
276
  * ```
281
277
  *
282
- * @example To upload an object (specify optional headers)
278
+ * @example To upload an object and specify server-side encryption and object tags
283
279
  * ```javascript
284
- * // The following example uploads an object. The request specifies optional request headers to directs S3 to use specific storage class and use server-side encryption.
280
+ * // The following example uploads an object. The request specifies the optional server-side encryption option. The request also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.
285
281
  * const input = {
286
- * "Body": "HappyFace.jpg",
282
+ * "Body": "filetoupload",
287
283
  * "Bucket": "examplebucket",
288
- * "Key": "HappyFace.jpg",
284
+ * "Key": "exampleobject",
289
285
  * "ServerSideEncryption": "AES256",
290
- * "StorageClass": "STANDARD_IA"
286
+ * "Tagging": "key1=value1&key2=value2"
291
287
  * };
292
288
  * const command = new PutObjectCommand(input);
293
289
  * const response = await client.send(command);
@@ -295,10 +291,10 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare
295
291
  * {
296
292
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
297
293
  * "ServerSideEncryption": "AES256",
298
- * "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp"
294
+ * "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt"
299
295
  * }
300
296
  * *\/
301
- * // example id: to-upload-an-object-(specify-optional-headers)
297
+ * // example id: to-upload-an-object-and-specify-server-side-encryption-and-object-tags-1483398331831
302
298
  * ```
303
299
  *
304
300
  * @example To upload an object and specify optional tags
@@ -321,26 +317,24 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare
321
317
  * // example id: to-upload-an-object-and-specify-optional-tags-1481762310955
322
318
  * ```
323
319
  *
324
- * @example To upload an object and specify server-side encryption and object tags
320
+ * @example To upload an object and specify canned ACL.
325
321
  * ```javascript
326
- * // The following example uploads an object. The request specifies the optional server-side encryption option. The request also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.
322
+ * // The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.
327
323
  * const input = {
324
+ * "ACL": "authenticated-read",
328
325
  * "Body": "filetoupload",
329
326
  * "Bucket": "examplebucket",
330
- * "Key": "exampleobject",
331
- * "ServerSideEncryption": "AES256",
332
- * "Tagging": "key1=value1&key2=value2"
327
+ * "Key": "exampleobject"
333
328
  * };
334
329
  * const command = new PutObjectCommand(input);
335
330
  * const response = await client.send(command);
336
331
  * /* response ==
337
332
  * {
338
333
  * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"",
339
- * "ServerSideEncryption": "AES256",
340
- * "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt"
334
+ * "VersionId": "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr"
341
335
  * }
342
336
  * *\/
343
- * // example id: to-upload-an-object-and-specify-server-side-encryption-and-object-tags-1483398331831
337
+ * // example id: to-upload-an-object-and-specify-canned-acl-1483397779571
344
338
  * ```
345
339
  *
346
340
  */
@@ -1,25 +1,19 @@
1
- /// <reference types="node" />
2
1
  import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
3
2
  import { Command as $Command } from "@smithy/smithy-client";
4
- import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack, StreamingBlobPayloadInputTypes } from "@smithy/types";
5
4
  import { UploadPartOutput, UploadPartRequest } from "../models/models_1";
6
5
  import { S3ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3Client";
7
6
  /**
8
7
  * @public
9
8
  */
10
9
  export { __MetadataBearer, $Command };
11
- export type UploadPartCommandInputType = Omit<UploadPartRequest, "Body"> & {
12
- /**
13
- * For *`UploadPartRequest["Body"]`*, see {@link UploadPartRequest.Body}.
14
- */
15
- Body?: UploadPartRequest["Body"] | string | Uint8Array | Buffer;
16
- };
17
10
  /**
18
11
  * @public
19
12
  *
20
13
  * The input for {@link UploadPartCommand}.
21
14
  */
22
- export interface UploadPartCommandInput extends UploadPartCommandInputType {
15
+ export interface UploadPartCommandInput extends Omit<UploadPartRequest, "Body"> {
16
+ Body?: StreamingBlobPayloadInputTypes;
23
17
  }
24
18
  /**
25
19
  * @public
@@ -1,25 +1,19 @@
1
- /// <reference types="node" />
2
1
  import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
3
2
  import { Command as $Command } from "@smithy/smithy-client";
4
- import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack, StreamingBlobPayloadInputTypes } from "@smithy/types";
5
4
  import { WriteGetObjectResponseRequest } from "../models/models_1";
6
5
  import { S3ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3Client";
7
6
  /**
8
7
  * @public
9
8
  */
10
9
  export { __MetadataBearer, $Command };
11
- export type WriteGetObjectResponseCommandInputType = Omit<WriteGetObjectResponseRequest, "Body"> & {
12
- /**
13
- * For *`WriteGetObjectResponseRequest["Body"]`*, see {@link WriteGetObjectResponseRequest.Body}.
14
- */
15
- Body?: WriteGetObjectResponseRequest["Body"] | string | Uint8Array | Buffer;
16
- };
17
10
  /**
18
11
  * @public
19
12
  *
20
13
  * The input for {@link WriteGetObjectResponseCommand}.
21
14
  */
22
- export interface WriteGetObjectResponseCommandInput extends WriteGetObjectResponseCommandInputType {
15
+ export interface WriteGetObjectResponseCommandInput extends Omit<WriteGetObjectResponseRequest, "Body"> {
16
+ Body?: StreamingBlobPayloadInputTypes;
23
17
  }
24
18
  /**
25
19
  * @public
@@ -1,6 +1,5 @@
1
- /// <reference types="node" />
2
1
  import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
3
- import { Readable } from "stream";
2
+ import { StreamingBlobTypes } from "@smithy/types";
4
3
  import { S3ServiceException as __BaseException } from "./S3ServiceException";
5
4
  /**
6
5
  * @public
@@ -6354,7 +6353,7 @@ export interface GetObjectOutput {
6354
6353
  /**
6355
6354
  * <p>Object data.</p>
6356
6355
  */
6357
- Body?: Readable | ReadableStream | Blob;
6356
+ Body?: StreamingBlobTypes;
6358
6357
  /**
6359
6358
  * <p>Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. If
6360
6359
  * false, this response header does not appear in the response.</p>
@@ -7245,7 +7244,7 @@ export interface GetObjectTorrentOutput {
7245
7244
  /**
7246
7245
  * <p>A Bencoded dictionary as defined by the BitTorrent specification</p>
7247
7246
  */
7248
- Body?: Readable | ReadableStream | Blob;
7247
+ Body?: StreamingBlobTypes;
7249
7248
  /**
7250
7249
  * <p>If present, indicates that the requester was successfully charged for the
7251
7250
  * request.</p>
@@ -9851,7 +9850,7 @@ export interface PutObjectRequest {
9851
9850
  /**
9852
9851
  * <p>Object data.</p>
9853
9852
  */
9854
- Body?: Readable | ReadableStream | Blob;
9853
+ Body?: StreamingBlobTypes;
9855
9854
  /**
9856
9855
  * <p>The bucket name to which the PUT action was initiated. </p>
9857
9856
  * <p>When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p>
@@ -1,6 +1,5 @@
1
- /// <reference types="node" />
2
1
  import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
3
- import { Readable } from "stream";
2
+ import { StreamingBlobTypes } from "@smithy/types";
4
3
  import { ChecksumAlgorithm, Grant, ObjectCannedACL, ObjectLockConfiguration, ObjectLockLegalHoldStatus, ObjectLockMode, ObjectLockRetention, PublicAccessBlockConfiguration, ReplicationStatus, RequestCharged, RequestPayer, ServerSideEncryption, StorageClass, Tagging } from "./models_0";
5
4
  import { S3ServiceException as __BaseException } from "./S3ServiceException";
6
5
  /**
@@ -1089,7 +1088,7 @@ export interface UploadPartRequest {
1089
1088
  /**
1090
1089
  * <p>Object data.</p>
1091
1090
  */
1092
- Body?: Readable | ReadableStream | Blob;
1091
+ Body?: StreamingBlobTypes;
1093
1092
  /**
1094
1093
  * <p>The name of the bucket to which the multipart upload was initiated.</p>
1095
1094
  * <p>When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using access points</a> in the <i>Amazon S3 User Guide</i>.</p>
@@ -1424,7 +1423,7 @@ export interface WriteGetObjectResponseRequest {
1424
1423
  /**
1425
1424
  * <p>The object data.</p>
1426
1425
  */
1427
- Body?: Readable | ReadableStream | Blob;
1426
+ Body?: StreamingBlobTypes;
1428
1427
  /**
1429
1428
  * <p>The integer status code for an HTTP response of a corresponding <code>GetObject</code>
1430
1429
  * request. The following is a list of status codes.</p>
@@ -5,7 +5,7 @@ import {
5
5
  HttpHandlerOptions as __HttpHandlerOptions,
6
6
  MetadataBearer as __MetadataBearer,
7
7
  MiddlewareStack,
8
- WithSdkStreamMixin as __WithSdkStreamMixin,
8
+ StreamingBlobPayloadOutputTypes,
9
9
  } from "@smithy/types";
10
10
  import { GetObjectOutput, GetObjectRequest } from "../models/models_0";
11
11
  import {
@@ -16,8 +16,10 @@ import {
16
16
  export { __MetadataBearer, $Command };
17
17
  export interface GetObjectCommandInput extends GetObjectRequest {}
18
18
  export interface GetObjectCommandOutput
19
- extends __WithSdkStreamMixin<GetObjectOutput, "Body">,
20
- __MetadataBearer {}
19
+ extends Pick<GetObjectOutput, Exclude<keyof GetObjectOutput, "Body">>,
20
+ __MetadataBearer {
21
+ Body?: StreamingBlobPayloadOutputTypes;
22
+ }
21
23
  export declare class GetObjectCommand extends $Command<
22
24
  GetObjectCommandInput,
23
25
  GetObjectCommandOutput,
@@ -5,7 +5,7 @@ import {
5
5
  HttpHandlerOptions as __HttpHandlerOptions,
6
6
  MetadataBearer as __MetadataBearer,
7
7
  MiddlewareStack,
8
- WithSdkStreamMixin as __WithSdkStreamMixin,
8
+ StreamingBlobPayloadOutputTypes,
9
9
  } from "@smithy/types";
10
10
  import {
11
11
  GetObjectTorrentOutput,
@@ -19,8 +19,13 @@ import {
19
19
  export { __MetadataBearer, $Command };
20
20
  export interface GetObjectTorrentCommandInput extends GetObjectTorrentRequest {}
21
21
  export interface GetObjectTorrentCommandOutput
22
- extends __WithSdkStreamMixin<GetObjectTorrentOutput, "Body">,
23
- __MetadataBearer {}
22
+ extends Pick<
23
+ GetObjectTorrentOutput,
24
+ Exclude<keyof GetObjectTorrentOutput, "Body">
25
+ >,
26
+ __MetadataBearer {
27
+ Body?: StreamingBlobPayloadOutputTypes;
28
+ }
24
29
  export declare class GetObjectTorrentCommand extends $Command<
25
30
  GetObjectTorrentCommandInput,
26
31
  GetObjectTorrentCommandOutput,
@@ -5,6 +5,7 @@ import {
5
5
  HttpHandlerOptions as __HttpHandlerOptions,
6
6
  MetadataBearer as __MetadataBearer,
7
7
  MiddlewareStack,
8
+ StreamingBlobPayloadInputTypes,
8
9
  } from "@smithy/types";
9
10
  import { PutObjectOutput, PutObjectRequest } from "../models/models_0";
10
11
  import {
@@ -13,13 +14,10 @@ import {
13
14
  ServiceOutputTypes,
14
15
  } from "../S3Client";
15
16
  export { __MetadataBearer, $Command };
16
- export type PutObjectCommandInputType = Pick<
17
- PutObjectRequest,
18
- Exclude<keyof PutObjectRequest, "Body">
19
- > & {
20
- Body?: PutObjectRequest["Body"] | string | Uint8Array | Buffer;
21
- };
22
- export interface PutObjectCommandInput extends PutObjectCommandInputType {}
17
+ export interface PutObjectCommandInput
18
+ extends Pick<PutObjectRequest, Exclude<keyof PutObjectRequest, "Body">> {
19
+ Body?: StreamingBlobPayloadInputTypes;
20
+ }
23
21
  export interface PutObjectCommandOutput
24
22
  extends PutObjectOutput,
25
23
  __MetadataBearer {}
@@ -5,6 +5,7 @@ import {
5
5
  HttpHandlerOptions as __HttpHandlerOptions,
6
6
  MetadataBearer as __MetadataBearer,
7
7
  MiddlewareStack,
8
+ StreamingBlobPayloadInputTypes,
8
9
  } from "@smithy/types";
9
10
  import { UploadPartOutput, UploadPartRequest } from "../models/models_1";
10
11
  import {
@@ -13,13 +14,10 @@ import {
13
14
  ServiceOutputTypes,
14
15
  } from "../S3Client";
15
16
  export { __MetadataBearer, $Command };
16
- export type UploadPartCommandInputType = Pick<
17
- UploadPartRequest,
18
- Exclude<keyof UploadPartRequest, "Body">
19
- > & {
20
- Body?: UploadPartRequest["Body"] | string | Uint8Array | Buffer;
21
- };
22
- export interface UploadPartCommandInput extends UploadPartCommandInputType {}
17
+ export interface UploadPartCommandInput
18
+ extends Pick<UploadPartRequest, Exclude<keyof UploadPartRequest, "Body">> {
19
+ Body?: StreamingBlobPayloadInputTypes;
20
+ }
23
21
  export interface UploadPartCommandOutput
24
22
  extends UploadPartOutput,
25
23
  __MetadataBearer {}
@@ -5,6 +5,7 @@ import {
5
5
  HttpHandlerOptions as __HttpHandlerOptions,
6
6
  MetadataBearer as __MetadataBearer,
7
7
  MiddlewareStack,
8
+ StreamingBlobPayloadInputTypes,
8
9
  } from "@smithy/types";
9
10
  import { WriteGetObjectResponseRequest } from "../models/models_1";
10
11
  import {
@@ -13,14 +14,13 @@ import {
13
14
  ServiceOutputTypes,
14
15
  } from "../S3Client";
15
16
  export { __MetadataBearer, $Command };
16
- export type WriteGetObjectResponseCommandInputType = Pick<
17
- WriteGetObjectResponseRequest,
18
- Exclude<keyof WriteGetObjectResponseRequest, "Body">
19
- > & {
20
- Body?: WriteGetObjectResponseRequest["Body"] | string | Uint8Array | Buffer;
21
- };
22
17
  export interface WriteGetObjectResponseCommandInput
23
- extends WriteGetObjectResponseCommandInputType {}
18
+ extends Pick<
19
+ WriteGetObjectResponseRequest,
20
+ Exclude<keyof WriteGetObjectResponseRequest, "Body">
21
+ > {
22
+ Body?: StreamingBlobPayloadInputTypes;
23
+ }
24
24
  export interface WriteGetObjectResponseCommandOutput extends __MetadataBearer {}
25
25
  export declare class WriteGetObjectResponseCommand extends $Command<
26
26
  WriteGetObjectResponseCommandInput,
@@ -1,5 +1,5 @@
1
1
  import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
2
- import { Readable } from "stream";
2
+ import { StreamingBlobTypes } from "@smithy/types";
3
3
  import { S3ServiceException as __BaseException } from "./S3ServiceException";
4
4
  export interface AbortIncompleteMultipartUpload {
5
5
  DaysAfterInitiation?: number;
@@ -1307,7 +1307,7 @@ export declare const ReplicationStatus: {
1307
1307
  export type ReplicationStatus =
1308
1308
  (typeof ReplicationStatus)[keyof typeof ReplicationStatus];
1309
1309
  export interface GetObjectOutput {
1310
- Body?: Readable | ReadableStream | Blob;
1310
+ Body?: StreamingBlobTypes;
1311
1311
  DeleteMarker?: boolean;
1312
1312
  AcceptRanges?: string;
1313
1313
  Expiration?: string;
@@ -1519,7 +1519,7 @@ export interface GetObjectTaggingRequest {
1519
1519
  RequestPayer?: RequestPayer | string;
1520
1520
  }
1521
1521
  export interface GetObjectTorrentOutput {
1522
- Body?: Readable | ReadableStream | Blob;
1522
+ Body?: StreamingBlobTypes;
1523
1523
  RequestCharged?: RequestCharged | string;
1524
1524
  }
1525
1525
  export interface GetObjectTorrentRequest {
@@ -2062,7 +2062,7 @@ export interface PutObjectOutput {
2062
2062
  }
2063
2063
  export interface PutObjectRequest {
2064
2064
  ACL?: ObjectCannedACL | string;
2065
- Body?: Readable | ReadableStream | Blob;
2065
+ Body?: StreamingBlobTypes;
2066
2066
  Bucket: string | undefined;
2067
2067
  CacheControl?: string;
2068
2068
  ContentDisposition?: string;
@@ -1,5 +1,5 @@
1
1
  import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
2
- import { Readable } from "stream";
2
+ import { StreamingBlobTypes } from "@smithy/types";
3
3
  import {
4
4
  ChecksumAlgorithm,
5
5
  Grant,
@@ -324,7 +324,7 @@ export interface UploadPartOutput {
324
324
  RequestCharged?: RequestCharged | string;
325
325
  }
326
326
  export interface UploadPartRequest {
327
- Body?: Readable | ReadableStream | Blob;
327
+ Body?: StreamingBlobTypes;
328
328
  Bucket: string | undefined;
329
329
  ContentLength?: number;
330
330
  ContentMD5?: string;
@@ -384,7 +384,7 @@ export interface UploadPartCopyRequest {
384
384
  export interface WriteGetObjectResponseRequest {
385
385
  RequestRoute: string | undefined;
386
386
  RequestToken: string | undefined;
387
- Body?: Readable | ReadableStream | Blob;
387
+ Body?: StreamingBlobTypes;
388
388
  StatusCode?: number;
389
389
  ErrorCode?: string;
390
390
  ErrorMessage?: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-s3",
3
3
  "description": "AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native",
4
- "version": "3.374.0",
4
+ "version": "3.378.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -25,60 +25,60 @@
25
25
  "@aws-crypto/sha1-browser": "3.0.0",
26
26
  "@aws-crypto/sha256-browser": "3.0.0",
27
27
  "@aws-crypto/sha256-js": "3.0.0",
28
- "@aws-sdk/client-sts": "3.370.0",
29
- "@aws-sdk/credential-provider-node": "3.370.0",
30
- "@aws-sdk/hash-stream-node": "3.374.0",
31
- "@aws-sdk/middleware-bucket-endpoint": "3.370.0",
32
- "@aws-sdk/middleware-expect-continue": "3.370.0",
33
- "@aws-sdk/middleware-flexible-checksums": "3.374.0",
34
- "@aws-sdk/middleware-host-header": "3.370.0",
35
- "@aws-sdk/middleware-location-constraint": "3.370.0",
36
- "@aws-sdk/middleware-logger": "3.370.0",
37
- "@aws-sdk/middleware-recursion-detection": "3.370.0",
38
- "@aws-sdk/middleware-sdk-s3": "3.370.0",
39
- "@aws-sdk/middleware-signing": "3.370.0",
40
- "@aws-sdk/middleware-ssec": "3.370.0",
41
- "@aws-sdk/middleware-user-agent": "3.370.0",
42
- "@aws-sdk/signature-v4-multi-region": "3.370.0",
43
- "@aws-sdk/types": "3.370.0",
44
- "@aws-sdk/util-endpoints": "3.370.0",
45
- "@aws-sdk/util-user-agent-browser": "3.370.0",
46
- "@aws-sdk/util-user-agent-node": "3.370.0",
28
+ "@aws-sdk/client-sts": "3.378.0",
29
+ "@aws-sdk/credential-provider-node": "3.378.0",
30
+ "@aws-sdk/middleware-bucket-endpoint": "3.378.0",
31
+ "@aws-sdk/middleware-expect-continue": "3.378.0",
32
+ "@aws-sdk/middleware-flexible-checksums": "3.378.0",
33
+ "@aws-sdk/middleware-host-header": "3.378.0",
34
+ "@aws-sdk/middleware-location-constraint": "3.378.0",
35
+ "@aws-sdk/middleware-logger": "3.378.0",
36
+ "@aws-sdk/middleware-recursion-detection": "3.378.0",
37
+ "@aws-sdk/middleware-sdk-s3": "3.378.0",
38
+ "@aws-sdk/middleware-signing": "3.378.0",
39
+ "@aws-sdk/middleware-ssec": "3.378.0",
40
+ "@aws-sdk/middleware-user-agent": "3.378.0",
41
+ "@aws-sdk/signature-v4-multi-region": "3.378.0",
42
+ "@aws-sdk/types": "3.378.0",
43
+ "@aws-sdk/util-endpoints": "3.378.0",
44
+ "@aws-sdk/util-user-agent-browser": "3.378.0",
45
+ "@aws-sdk/util-user-agent-node": "3.378.0",
47
46
  "@aws-sdk/xml-builder": "3.310.0",
48
- "@smithy/config-resolver": "^1.0.1",
49
- "@smithy/eventstream-serde-browser": "^1.0.1",
50
- "@smithy/eventstream-serde-config-resolver": "^1.0.1",
51
- "@smithy/eventstream-serde-node": "^1.0.1",
52
- "@smithy/fetch-http-handler": "^1.0.1",
53
- "@smithy/hash-blob-browser": "^1.0.1",
54
- "@smithy/hash-node": "^1.0.1",
55
- "@smithy/invalid-dependency": "^1.0.1",
56
- "@smithy/md5-js": "^1.0.1",
57
- "@smithy/middleware-content-length": "^1.0.1",
58
- "@smithy/middleware-endpoint": "^1.0.2",
59
- "@smithy/middleware-retry": "^1.0.3",
60
- "@smithy/middleware-serde": "^1.0.1",
61
- "@smithy/middleware-stack": "^1.0.1",
62
- "@smithy/node-config-provider": "^1.0.1",
63
- "@smithy/node-http-handler": "^1.0.2",
64
- "@smithy/protocol-http": "^1.1.0",
65
- "@smithy/smithy-client": "^1.0.3",
66
- "@smithy/types": "^1.1.0",
67
- "@smithy/url-parser": "^1.0.1",
68
- "@smithy/util-base64": "^1.0.1",
69
- "@smithy/util-body-length-browser": "^1.0.1",
70
- "@smithy/util-body-length-node": "^1.0.1",
71
- "@smithy/util-defaults-mode-browser": "^1.0.1",
72
- "@smithy/util-defaults-mode-node": "^1.0.1",
73
- "@smithy/util-retry": "^1.0.3",
74
- "@smithy/util-stream": "^1.0.1",
75
- "@smithy/util-utf8": "^1.0.1",
76
- "@smithy/util-waiter": "^1.0.1",
47
+ "@smithy/config-resolver": "^2.0.1",
48
+ "@smithy/eventstream-serde-browser": "^2.0.1",
49
+ "@smithy/eventstream-serde-config-resolver": "^2.0.1",
50
+ "@smithy/eventstream-serde-node": "^2.0.1",
51
+ "@smithy/fetch-http-handler": "^2.0.1",
52
+ "@smithy/hash-blob-browser": "^2.0.1",
53
+ "@smithy/hash-node": "^2.0.1",
54
+ "@smithy/hash-stream-node": "^2.0.1",
55
+ "@smithy/invalid-dependency": "^2.0.1",
56
+ "@smithy/md5-js": "^2.0.1",
57
+ "@smithy/middleware-content-length": "^2.0.1",
58
+ "@smithy/middleware-endpoint": "^2.0.1",
59
+ "@smithy/middleware-retry": "^2.0.1",
60
+ "@smithy/middleware-serde": "^2.0.1",
61
+ "@smithy/middleware-stack": "^2.0.0",
62
+ "@smithy/node-config-provider": "^2.0.1",
63
+ "@smithy/node-http-handler": "^2.0.1",
64
+ "@smithy/protocol-http": "^2.0.1",
65
+ "@smithy/smithy-client": "^2.0.1",
66
+ "@smithy/types": "^2.0.2",
67
+ "@smithy/url-parser": "^2.0.1",
68
+ "@smithy/util-base64": "^2.0.0",
69
+ "@smithy/util-body-length-browser": "^2.0.0",
70
+ "@smithy/util-body-length-node": "^2.0.0",
71
+ "@smithy/util-defaults-mode-browser": "^2.0.1",
72
+ "@smithy/util-defaults-mode-node": "^2.0.1",
73
+ "@smithy/util-retry": "^2.0.0",
74
+ "@smithy/util-stream": "^2.0.1",
75
+ "@smithy/util-utf8": "^2.0.0",
76
+ "@smithy/util-waiter": "^2.0.1",
77
77
  "fast-xml-parser": "4.2.5",
78
78
  "tslib": "^2.5.0"
79
79
  },
80
80
  "devDependencies": {
81
- "@smithy/service-client-documentation-generator": "^1.0.1",
81
+ "@smithy/service-client-documentation-generator": "^2.0.0",
82
82
  "@tsconfig/node14": "1.0.3",
83
83
  "@types/chai": "^4.2.11",
84
84
  "@types/mocha": "^8.0.4",