@aws-sdk/client-pricing 3.310.0 → 3.312.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.
@@ -6,50 +6,35 @@ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const PricingServiceException_1 = require("../models/PricingServiceException");
8
8
  const se_DescribeServicesCommand = async (input, context) => {
9
- const headers = {
10
- "content-type": "application/x-amz-json-1.1",
11
- "x-amz-target": "AWSPriceListService.DescribeServices",
12
- };
9
+ const headers = sharedHeaders("DescribeServices");
13
10
  let body;
14
11
  body = JSON.stringify(se_DescribeServicesRequest(input, context));
15
12
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
16
13
  };
17
14
  exports.se_DescribeServicesCommand = se_DescribeServicesCommand;
18
15
  const se_GetAttributeValuesCommand = async (input, context) => {
19
- const headers = {
20
- "content-type": "application/x-amz-json-1.1",
21
- "x-amz-target": "AWSPriceListService.GetAttributeValues",
22
- };
16
+ const headers = sharedHeaders("GetAttributeValues");
23
17
  let body;
24
18
  body = JSON.stringify(se_GetAttributeValuesRequest(input, context));
25
19
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
26
20
  };
27
21
  exports.se_GetAttributeValuesCommand = se_GetAttributeValuesCommand;
28
22
  const se_GetPriceListFileUrlCommand = async (input, context) => {
29
- const headers = {
30
- "content-type": "application/x-amz-json-1.1",
31
- "x-amz-target": "AWSPriceListService.GetPriceListFileUrl",
32
- };
23
+ const headers = sharedHeaders("GetPriceListFileUrl");
33
24
  let body;
34
25
  body = JSON.stringify(se_GetPriceListFileUrlRequest(input, context));
35
26
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
36
27
  };
37
28
  exports.se_GetPriceListFileUrlCommand = se_GetPriceListFileUrlCommand;
38
29
  const se_GetProductsCommand = async (input, context) => {
39
- const headers = {
40
- "content-type": "application/x-amz-json-1.1",
41
- "x-amz-target": "AWSPriceListService.GetProducts",
42
- };
30
+ const headers = sharedHeaders("GetProducts");
43
31
  let body;
44
32
  body = JSON.stringify(se_GetProductsRequest(input, context));
45
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
46
34
  };
47
35
  exports.se_GetProductsCommand = se_GetProductsCommand;
48
36
  const se_ListPriceListsCommand = async (input, context) => {
49
- const headers = {
50
- "content-type": "application/x-amz-json-1.1",
51
- "x-amz-target": "AWSPriceListService.ListPriceLists",
52
- };
37
+ const headers = sharedHeaders("ListPriceLists");
53
38
  let body;
54
39
  body = JSON.stringify(se_ListPriceListsRequest(input, context));
55
40
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
@@ -571,6 +556,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
571
556
  }
572
557
  return new protocol_http_1.HttpRequest(contents);
573
558
  };
559
+ function sharedHeaders(operation) {
560
+ return {
561
+ "content-type": "application/x-amz-json-1.1",
562
+ "x-amz-target": `AWSPriceListService.${operation}`,
563
+ };
564
+ }
574
565
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
575
566
  if (encoded.length) {
576
567
  return JSON.parse(encoded);
@@ -3,46 +3,31 @@ import { decorateServiceException as __decorateServiceException, expectString as
3
3
  import { AccessDeniedException, ExpiredNextTokenException, InternalErrorException, InvalidNextTokenException, InvalidParameterException, NotFoundException, } from "../models/models_0";
4
4
  import { PricingServiceException as __BaseException } from "../models/PricingServiceException";
5
5
  export const se_DescribeServicesCommand = async (input, context) => {
6
- const headers = {
7
- "content-type": "application/x-amz-json-1.1",
8
- "x-amz-target": "AWSPriceListService.DescribeServices",
9
- };
6
+ const headers = sharedHeaders("DescribeServices");
10
7
  let body;
11
8
  body = JSON.stringify(se_DescribeServicesRequest(input, context));
12
9
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
10
  };
14
11
  export const se_GetAttributeValuesCommand = async (input, context) => {
15
- const headers = {
16
- "content-type": "application/x-amz-json-1.1",
17
- "x-amz-target": "AWSPriceListService.GetAttributeValues",
18
- };
12
+ const headers = sharedHeaders("GetAttributeValues");
19
13
  let body;
20
14
  body = JSON.stringify(se_GetAttributeValuesRequest(input, context));
21
15
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
16
  };
23
17
  export const se_GetPriceListFileUrlCommand = async (input, context) => {
24
- const headers = {
25
- "content-type": "application/x-amz-json-1.1",
26
- "x-amz-target": "AWSPriceListService.GetPriceListFileUrl",
27
- };
18
+ const headers = sharedHeaders("GetPriceListFileUrl");
28
19
  let body;
29
20
  body = JSON.stringify(se_GetPriceListFileUrlRequest(input, context));
30
21
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
31
22
  };
32
23
  export const se_GetProductsCommand = async (input, context) => {
33
- const headers = {
34
- "content-type": "application/x-amz-json-1.1",
35
- "x-amz-target": "AWSPriceListService.GetProducts",
36
- };
24
+ const headers = sharedHeaders("GetProducts");
37
25
  let body;
38
26
  body = JSON.stringify(se_GetProductsRequest(input, context));
39
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
28
  };
41
29
  export const se_ListPriceListsCommand = async (input, context) => {
42
- const headers = {
43
- "content-type": "application/x-amz-json-1.1",
44
- "x-amz-target": "AWSPriceListService.ListPriceLists",
45
- };
30
+ const headers = sharedHeaders("ListPriceLists");
46
31
  let body;
47
32
  body = JSON.stringify(se_ListPriceListsRequest(input, context));
48
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
@@ -558,6 +543,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
558
543
  }
559
544
  return new __HttpRequest(contents);
560
545
  };
546
+ function sharedHeaders(operation) {
547
+ return {
548
+ "content-type": "application/x-amz-json-1.1",
549
+ "x-amz-target": `AWSPriceListService.${operation}`,
550
+ };
551
+ }
561
552
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
562
553
  if (encoded.length) {
563
554
  return JSON.parse(encoded);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-pricing",
3
3
  "description": "AWS SDK for JavaScript Pricing Client for Node.js, Browser and React Native",
4
- "version": "3.310.0",
4
+ "version": "3.312.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,7 +21,7 @@
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.310.0",
24
+ "@aws-sdk/client-sts": "3.312.0",
25
25
  "@aws-sdk/config-resolver": "3.310.0",
26
26
  "@aws-sdk/credential-provider-node": "3.310.0",
27
27
  "@aws-sdk/fetch-http-handler": "3.310.0",