@aws-sdk/client-cloudfront 3.354.0 → 3.358.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.
@@ -2548,7 +2548,7 @@ const de_AssociateAliasCommand = async (output, context) => {
2548
2548
  const contents = (0, smithy_client_1.map)({
2549
2549
  $metadata: deserializeMetadata(output),
2550
2550
  });
2551
- await collectBody(output.body, context);
2551
+ await (0, smithy_client_1.collectBody)(output.body, context);
2552
2552
  return contents;
2553
2553
  };
2554
2554
  exports.de_AssociateAliasCommand = de_AssociateAliasCommand;
@@ -4057,7 +4057,7 @@ const de_DeleteCachePolicyCommand = async (output, context) => {
4057
4057
  const contents = (0, smithy_client_1.map)({
4058
4058
  $metadata: deserializeMetadata(output),
4059
4059
  });
4060
- await collectBody(output.body, context);
4060
+ await (0, smithy_client_1.collectBody)(output.body, context);
4061
4061
  return contents;
4062
4062
  };
4063
4063
  exports.de_DeleteCachePolicyCommand = de_DeleteCachePolicyCommand;
@@ -4102,7 +4102,7 @@ const de_DeleteCloudFrontOriginAccessIdentityCommand = async (output, context) =
4102
4102
  const contents = (0, smithy_client_1.map)({
4103
4103
  $metadata: deserializeMetadata(output),
4104
4104
  });
4105
- await collectBody(output.body, context);
4105
+ await (0, smithy_client_1.collectBody)(output.body, context);
4106
4106
  return contents;
4107
4107
  };
4108
4108
  exports.de_DeleteCloudFrontOriginAccessIdentityCommand = de_DeleteCloudFrontOriginAccessIdentityCommand;
@@ -4144,7 +4144,7 @@ const de_DeleteContinuousDeploymentPolicyCommand = async (output, context) => {
4144
4144
  const contents = (0, smithy_client_1.map)({
4145
4145
  $metadata: deserializeMetadata(output),
4146
4146
  });
4147
- await collectBody(output.body, context);
4147
+ await (0, smithy_client_1.collectBody)(output.body, context);
4148
4148
  return contents;
4149
4149
  };
4150
4150
  exports.de_DeleteContinuousDeploymentPolicyCommand = de_DeleteContinuousDeploymentPolicyCommand;
@@ -4189,7 +4189,7 @@ const de_DeleteDistributionCommand = async (output, context) => {
4189
4189
  const contents = (0, smithy_client_1.map)({
4190
4190
  $metadata: deserializeMetadata(output),
4191
4191
  });
4192
- await collectBody(output.body, context);
4192
+ await (0, smithy_client_1.collectBody)(output.body, context);
4193
4193
  return contents;
4194
4194
  };
4195
4195
  exports.de_DeleteDistributionCommand = de_DeleteDistributionCommand;
@@ -4231,7 +4231,7 @@ const de_DeleteFieldLevelEncryptionConfigCommand = async (output, context) => {
4231
4231
  const contents = (0, smithy_client_1.map)({
4232
4232
  $metadata: deserializeMetadata(output),
4233
4233
  });
4234
- await collectBody(output.body, context);
4234
+ await (0, smithy_client_1.collectBody)(output.body, context);
4235
4235
  return contents;
4236
4236
  };
4237
4237
  exports.de_DeleteFieldLevelEncryptionConfigCommand = de_DeleteFieldLevelEncryptionConfigCommand;
@@ -4273,7 +4273,7 @@ const de_DeleteFieldLevelEncryptionProfileCommand = async (output, context) => {
4273
4273
  const contents = (0, smithy_client_1.map)({
4274
4274
  $metadata: deserializeMetadata(output),
4275
4275
  });
4276
- await collectBody(output.body, context);
4276
+ await (0, smithy_client_1.collectBody)(output.body, context);
4277
4277
  return contents;
4278
4278
  };
4279
4279
  exports.de_DeleteFieldLevelEncryptionProfileCommand = de_DeleteFieldLevelEncryptionProfileCommand;
@@ -4315,7 +4315,7 @@ const de_DeleteFunctionCommand = async (output, context) => {
4315
4315
  const contents = (0, smithy_client_1.map)({
4316
4316
  $metadata: deserializeMetadata(output),
4317
4317
  });
4318
- await collectBody(output.body, context);
4318
+ await (0, smithy_client_1.collectBody)(output.body, context);
4319
4319
  return contents;
4320
4320
  };
4321
4321
  exports.de_DeleteFunctionCommand = de_DeleteFunctionCommand;
@@ -4357,7 +4357,7 @@ const de_DeleteKeyGroupCommand = async (output, context) => {
4357
4357
  const contents = (0, smithy_client_1.map)({
4358
4358
  $metadata: deserializeMetadata(output),
4359
4359
  });
4360
- await collectBody(output.body, context);
4360
+ await (0, smithy_client_1.collectBody)(output.body, context);
4361
4361
  return contents;
4362
4362
  };
4363
4363
  exports.de_DeleteKeyGroupCommand = de_DeleteKeyGroupCommand;
@@ -4396,7 +4396,7 @@ const de_DeleteMonitoringSubscriptionCommand = async (output, context) => {
4396
4396
  const contents = (0, smithy_client_1.map)({
4397
4397
  $metadata: deserializeMetadata(output),
4398
4398
  });
4399
- await collectBody(output.body, context);
4399
+ await (0, smithy_client_1.collectBody)(output.body, context);
4400
4400
  return contents;
4401
4401
  };
4402
4402
  exports.de_DeleteMonitoringSubscriptionCommand = de_DeleteMonitoringSubscriptionCommand;
@@ -4435,7 +4435,7 @@ const de_DeleteOriginAccessControlCommand = async (output, context) => {
4435
4435
  const contents = (0, smithy_client_1.map)({
4436
4436
  $metadata: deserializeMetadata(output),
4437
4437
  });
4438
- await collectBody(output.body, context);
4438
+ await (0, smithy_client_1.collectBody)(output.body, context);
4439
4439
  return contents;
4440
4440
  };
4441
4441
  exports.de_DeleteOriginAccessControlCommand = de_DeleteOriginAccessControlCommand;
@@ -4477,7 +4477,7 @@ const de_DeleteOriginRequestPolicyCommand = async (output, context) => {
4477
4477
  const contents = (0, smithy_client_1.map)({
4478
4478
  $metadata: deserializeMetadata(output),
4479
4479
  });
4480
- await collectBody(output.body, context);
4480
+ await (0, smithy_client_1.collectBody)(output.body, context);
4481
4481
  return contents;
4482
4482
  };
4483
4483
  exports.de_DeleteOriginRequestPolicyCommand = de_DeleteOriginRequestPolicyCommand;
@@ -4522,7 +4522,7 @@ const de_DeletePublicKeyCommand = async (output, context) => {
4522
4522
  const contents = (0, smithy_client_1.map)({
4523
4523
  $metadata: deserializeMetadata(output),
4524
4524
  });
4525
- await collectBody(output.body, context);
4525
+ await (0, smithy_client_1.collectBody)(output.body, context);
4526
4526
  return contents;
4527
4527
  };
4528
4528
  exports.de_DeletePublicKeyCommand = de_DeletePublicKeyCommand;
@@ -4564,7 +4564,7 @@ const de_DeleteRealtimeLogConfigCommand = async (output, context) => {
4564
4564
  const contents = (0, smithy_client_1.map)({
4565
4565
  $metadata: deserializeMetadata(output),
4566
4566
  });
4567
- await collectBody(output.body, context);
4567
+ await (0, smithy_client_1.collectBody)(output.body, context);
4568
4568
  return contents;
4569
4569
  };
4570
4570
  exports.de_DeleteRealtimeLogConfigCommand = de_DeleteRealtimeLogConfigCommand;
@@ -4603,7 +4603,7 @@ const de_DeleteResponseHeadersPolicyCommand = async (output, context) => {
4603
4603
  const contents = (0, smithy_client_1.map)({
4604
4604
  $metadata: deserializeMetadata(output),
4605
4605
  });
4606
- await collectBody(output.body, context);
4606
+ await (0, smithy_client_1.collectBody)(output.body, context);
4607
4607
  return contents;
4608
4608
  };
4609
4609
  exports.de_DeleteResponseHeadersPolicyCommand = de_DeleteResponseHeadersPolicyCommand;
@@ -4648,7 +4648,7 @@ const de_DeleteStreamingDistributionCommand = async (output, context) => {
4648
4648
  const contents = (0, smithy_client_1.map)({
4649
4649
  $metadata: deserializeMetadata(output),
4650
4650
  });
4651
- await collectBody(output.body, context);
4651
+ await (0, smithy_client_1.collectBody)(output.body, context);
4652
4652
  return contents;
4653
4653
  };
4654
4654
  exports.de_DeleteStreamingDistributionCommand = de_DeleteStreamingDistributionCommand;
@@ -5147,7 +5147,7 @@ const de_GetFunctionCommand = async (output, context) => {
5147
5147
  ETag: [, output.headers["etag"]],
5148
5148
  ContentType: [, output.headers["content-type"]],
5149
5149
  });
5150
- const data = await collectBody(output.body, context);
5150
+ const data = await (0, smithy_client_1.collectBody)(output.body, context);
5151
5151
  contents.FunctionCode = data;
5152
5152
  return contents;
5153
5153
  };
@@ -6542,7 +6542,7 @@ const de_TagResourceCommand = async (output, context) => {
6542
6542
  const contents = (0, smithy_client_1.map)({
6543
6543
  $metadata: deserializeMetadata(output),
6544
6544
  });
6545
- await collectBody(output.body, context);
6545
+ await (0, smithy_client_1.collectBody)(output.body, context);
6546
6546
  return contents;
6547
6547
  };
6548
6548
  exports.de_TagResourceCommand = de_TagResourceCommand;
@@ -6624,7 +6624,7 @@ const de_UntagResourceCommand = async (output, context) => {
6624
6624
  const contents = (0, smithy_client_1.map)({
6625
6625
  $metadata: deserializeMetadata(output),
6626
6626
  });
6627
- await collectBody(output.body, context);
6627
+ await (0, smithy_client_1.collectBody)(output.body, context);
6628
6628
  return contents;
6629
6629
  };
6630
6630
  exports.de_UntagResourceCommand = de_UntagResourceCommand;
@@ -14535,13 +14535,7 @@ const deserializeMetadata = (output) => ({
14535
14535
  extendedRequestId: output.headers["x-amz-id-2"],
14536
14536
  cfId: output.headers["x-amz-cf-id"],
14537
14537
  });
14538
- const collectBody = (streamBody = new Uint8Array(), context) => {
14539
- if (streamBody instanceof Uint8Array) {
14540
- return Promise.resolve(streamBody);
14541
- }
14542
- return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
14543
- };
14544
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
14538
+ const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
14545
14539
  const isSerializableHeaderValue = (value) => value !== undefined &&
14546
14540
  value !== null &&
14547
14541
  value !== "" &&
@@ -1,4 +1,4 @@
1
- import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, getArrayIfSingleItem as __getArrayIfSingleItem, getValueFromTextNode as __getValueFromTextNode, map, parseBoolean as __parseBoolean, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, strictParseFloat as __strictParseFloat, strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, withBaseException, } from "@aws-sdk/smithy-client";
1
+ import { collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, getArrayIfSingleItem as __getArrayIfSingleItem, getValueFromTextNode as __getValueFromTextNode, map, parseBoolean as __parseBoolean, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, strictParseFloat as __strictParseFloat, strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, withBaseException, } from "@aws-sdk/smithy-client";
2
2
  import { XmlNode as __XmlNode } from "@aws-sdk/xml-builder";
3
3
  import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
4
4
  import { XMLParser } from "fast-xml-parser";
@@ -14316,12 +14316,6 @@ const deserializeMetadata = (output) => ({
14316
14316
  extendedRequestId: output.headers["x-amz-id-2"],
14317
14317
  cfId: output.headers["x-amz-cf-id"],
14318
14318
  });
14319
- const collectBody = (streamBody = new Uint8Array(), context) => {
14320
- if (streamBody instanceof Uint8Array) {
14321
- return Promise.resolve(streamBody);
14322
- }
14323
- return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
14324
- };
14325
14319
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
14326
14320
  const isSerializableHeaderValue = (value) => value !== undefined &&
14327
14321
  value !== null &&
@@ -179,7 +179,7 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
179
179
  */
180
180
  runtime?: string;
181
181
  /**
182
- * Disable dyanamically changing the endpoint of the client based on the hostPrefix
182
+ * Disable dynamically changing the endpoint of the client based on the hostPrefix
183
183
  * trait of an operation.
184
184
  */
185
185
  disableHostPrefix?: boolean;
@@ -1,6 +1,7 @@
1
1
  import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
3
3
  import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
+ import { Uint8ArrayBlobAdapter } from "@aws-sdk/util-stream";
4
5
  import { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient";
5
6
  import { GetFunctionRequest, GetFunctionResult } from "../models/models_1";
6
7
  /**
@@ -14,12 +15,18 @@ export { __MetadataBearer, $Command };
14
15
  */
15
16
  export interface GetFunctionCommandInput extends GetFunctionRequest {
16
17
  }
18
+ /**
19
+ * @public
20
+ */
21
+ export type GetFunctionCommandOutputType = Omit<GetFunctionResult, "FunctionCode"> & {
22
+ FunctionCode?: Uint8ArrayBlobAdapter;
23
+ };
17
24
  /**
18
25
  * @public
19
26
  *
20
27
  * The output of {@link GetFunctionCommand}.
21
28
  */
22
- export interface GetFunctionCommandOutput extends GetFunctionResult, __MetadataBearer {
29
+ export interface GetFunctionCommandOutput extends GetFunctionCommandOutputType, __MetadataBearer {
23
30
  }
24
31
  /**
25
32
  * @public
@@ -6,6 +6,7 @@ import {
6
6
  MetadataBearer as __MetadataBearer,
7
7
  MiddlewareStack,
8
8
  } from "@aws-sdk/types";
9
+ import { Uint8ArrayBlobAdapter } from "@aws-sdk/util-stream";
9
10
  import {
10
11
  CloudFrontClientResolvedConfig,
11
12
  ServiceInputTypes,
@@ -14,8 +15,14 @@ import {
14
15
  import { GetFunctionRequest, GetFunctionResult } from "../models/models_1";
15
16
  export { __MetadataBearer, $Command };
16
17
  export interface GetFunctionCommandInput extends GetFunctionRequest {}
18
+ export type GetFunctionCommandOutputType = Pick<
19
+ GetFunctionResult,
20
+ Exclude<keyof GetFunctionResult, "FunctionCode">
21
+ > & {
22
+ FunctionCode?: Uint8ArrayBlobAdapter;
23
+ };
17
24
  export interface GetFunctionCommandOutput
18
- extends GetFunctionResult,
25
+ extends GetFunctionCommandOutputType,
19
26
  __MetadataBearer {}
20
27
  export declare class GetFunctionCommand extends $Command<
21
28
  GetFunctionCommandInput,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-cloudfront",
3
3
  "description": "AWS SDK for JavaScript Cloudfront Client for Node.js, Browser and React Native",
4
- "version": "3.354.0",
4
+ "version": "3.358.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",
@@ -21,38 +21,39 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "3.0.0",
23
23
  "@aws-crypto/sha256-js": "3.0.0",
24
- "@aws-sdk/client-sts": "3.354.0",
25
- "@aws-sdk/config-resolver": "3.354.0",
26
- "@aws-sdk/credential-provider-node": "3.354.0",
27
- "@aws-sdk/fetch-http-handler": "3.353.0",
28
- "@aws-sdk/hash-node": "3.347.0",
29
- "@aws-sdk/invalid-dependency": "3.347.0",
30
- "@aws-sdk/middleware-content-length": "3.347.0",
31
- "@aws-sdk/middleware-endpoint": "3.347.0",
32
- "@aws-sdk/middleware-host-header": "3.347.0",
33
- "@aws-sdk/middleware-logger": "3.347.0",
34
- "@aws-sdk/middleware-recursion-detection": "3.347.0",
35
- "@aws-sdk/middleware-retry": "3.354.0",
36
- "@aws-sdk/middleware-serde": "3.347.0",
37
- "@aws-sdk/middleware-signing": "3.354.0",
38
- "@aws-sdk/middleware-stack": "3.347.0",
39
- "@aws-sdk/middleware-user-agent": "3.352.0",
40
- "@aws-sdk/node-config-provider": "3.354.0",
41
- "@aws-sdk/node-http-handler": "3.350.0",
42
- "@aws-sdk/smithy-client": "3.347.0",
43
- "@aws-sdk/types": "3.347.0",
44
- "@aws-sdk/url-parser": "3.347.0",
24
+ "@aws-sdk/client-sts": "3.358.0",
25
+ "@aws-sdk/config-resolver": "3.357.0",
26
+ "@aws-sdk/credential-provider-node": "3.358.0",
27
+ "@aws-sdk/fetch-http-handler": "3.357.0",
28
+ "@aws-sdk/hash-node": "3.357.0",
29
+ "@aws-sdk/invalid-dependency": "3.357.0",
30
+ "@aws-sdk/middleware-content-length": "3.357.0",
31
+ "@aws-sdk/middleware-endpoint": "3.357.0",
32
+ "@aws-sdk/middleware-host-header": "3.357.0",
33
+ "@aws-sdk/middleware-logger": "3.357.0",
34
+ "@aws-sdk/middleware-recursion-detection": "3.357.0",
35
+ "@aws-sdk/middleware-retry": "3.357.0",
36
+ "@aws-sdk/middleware-serde": "3.357.0",
37
+ "@aws-sdk/middleware-signing": "3.357.0",
38
+ "@aws-sdk/middleware-stack": "3.357.0",
39
+ "@aws-sdk/middleware-user-agent": "3.357.0",
40
+ "@aws-sdk/node-config-provider": "3.357.0",
41
+ "@aws-sdk/node-http-handler": "3.357.0",
42
+ "@aws-sdk/smithy-client": "3.358.0",
43
+ "@aws-sdk/types": "3.357.0",
44
+ "@aws-sdk/url-parser": "3.357.0",
45
45
  "@aws-sdk/util-base64": "3.310.0",
46
46
  "@aws-sdk/util-body-length-browser": "3.310.0",
47
47
  "@aws-sdk/util-body-length-node": "3.310.0",
48
- "@aws-sdk/util-defaults-mode-browser": "3.353.0",
49
- "@aws-sdk/util-defaults-mode-node": "3.354.0",
50
- "@aws-sdk/util-endpoints": "3.352.0",
51
- "@aws-sdk/util-retry": "3.347.0",
52
- "@aws-sdk/util-user-agent-browser": "3.347.0",
53
- "@aws-sdk/util-user-agent-node": "3.354.0",
48
+ "@aws-sdk/util-defaults-mode-browser": "3.358.0",
49
+ "@aws-sdk/util-defaults-mode-node": "3.358.0",
50
+ "@aws-sdk/util-endpoints": "3.357.0",
51
+ "@aws-sdk/util-retry": "3.357.0",
52
+ "@aws-sdk/util-stream": "3.358.0",
53
+ "@aws-sdk/util-user-agent-browser": "3.357.0",
54
+ "@aws-sdk/util-user-agent-node": "3.357.0",
54
55
  "@aws-sdk/util-utf8": "3.310.0",
55
- "@aws-sdk/util-waiter": "3.347.0",
56
+ "@aws-sdk/util-waiter": "3.357.0",
56
57
  "@aws-sdk/xml-builder": "3.310.0",
57
58
  "@smithy/protocol-http": "^1.0.1",
58
59
  "@smithy/types": "^1.0.0",