@aws-sdk/client-marketplace-entitlement-service 3.185.0 → 3.188.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.188.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.187.0...v3.188.0) (2022-10-13)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-marketplace-entitlement-service
9
+
10
+
11
+
12
+
13
+
14
+ # [3.186.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.185.0...v3.186.0) (2022-10-06)
15
+
16
+ **Note:** Version bump only for package @aws-sdk/client-marketplace-entitlement-service
17
+
18
+
19
+
20
+
21
+
6
22
  # [3.185.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.184.0...v3.185.0) (2022-10-05)
7
23
 
8
24
 
@@ -1,25 +1,18 @@
1
- import { __extends } from "tslib";
2
1
  import { GetEntitlementsCommand, } from "./commands/GetEntitlementsCommand";
3
2
  import { MarketplaceEntitlementServiceClient } from "./MarketplaceEntitlementServiceClient";
4
- var MarketplaceEntitlementService = (function (_super) {
5
- __extends(MarketplaceEntitlementService, _super);
6
- function MarketplaceEntitlementService() {
7
- return _super !== null && _super.apply(this, arguments) || this;
8
- }
9
- MarketplaceEntitlementService.prototype.getEntitlements = function (args, optionsOrCb, cb) {
10
- var command = new GetEntitlementsCommand(args);
3
+ export class MarketplaceEntitlementService extends MarketplaceEntitlementServiceClient {
4
+ getEntitlements(args, optionsOrCb, cb) {
5
+ const command = new GetEntitlementsCommand(args);
11
6
  if (typeof optionsOrCb === "function") {
12
7
  this.send(command, optionsOrCb);
13
8
  }
14
9
  else if (typeof cb === "function") {
15
10
  if (typeof optionsOrCb !== "object")
16
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
11
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
17
12
  this.send(command, optionsOrCb || {}, cb);
18
13
  }
19
14
  else {
20
15
  return this.send(command, optionsOrCb);
21
16
  }
22
- };
23
- return MarketplaceEntitlementService;
24
- }(MarketplaceEntitlementServiceClient));
25
- export { MarketplaceEntitlementService };
17
+ }
18
+ }
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { resolveEndpointsConfig, resolveRegionConfig, } from "@aws-sdk/config-resolver";
3
2
  import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
4
3
  import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
@@ -9,31 +8,26 @@ import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-sig
9
8
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
10
9
  import { Client as __Client, } from "@aws-sdk/smithy-client";
11
10
  import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
12
- var MarketplaceEntitlementServiceClient = (function (_super) {
13
- __extends(MarketplaceEntitlementServiceClient, _super);
14
- function MarketplaceEntitlementServiceClient(configuration) {
15
- var _this = this;
16
- var _config_0 = __getRuntimeConfig(configuration);
17
- var _config_1 = resolveRegionConfig(_config_0);
18
- var _config_2 = resolveEndpointsConfig(_config_1);
19
- var _config_3 = resolveRetryConfig(_config_2);
20
- var _config_4 = resolveHostHeaderConfig(_config_3);
21
- var _config_5 = resolveAwsAuthConfig(_config_4);
22
- var _config_6 = resolveUserAgentConfig(_config_5);
23
- _this = _super.call(this, _config_6) || this;
24
- _this.config = _config_6;
25
- _this.middlewareStack.use(getRetryPlugin(_this.config));
26
- _this.middlewareStack.use(getContentLengthPlugin(_this.config));
27
- _this.middlewareStack.use(getHostHeaderPlugin(_this.config));
28
- _this.middlewareStack.use(getLoggerPlugin(_this.config));
29
- _this.middlewareStack.use(getRecursionDetectionPlugin(_this.config));
30
- _this.middlewareStack.use(getAwsAuthPlugin(_this.config));
31
- _this.middlewareStack.use(getUserAgentPlugin(_this.config));
32
- return _this;
11
+ export class MarketplaceEntitlementServiceClient extends __Client {
12
+ constructor(configuration) {
13
+ const _config_0 = __getRuntimeConfig(configuration);
14
+ const _config_1 = resolveRegionConfig(_config_0);
15
+ const _config_2 = resolveEndpointsConfig(_config_1);
16
+ const _config_3 = resolveRetryConfig(_config_2);
17
+ const _config_4 = resolveHostHeaderConfig(_config_3);
18
+ const _config_5 = resolveAwsAuthConfig(_config_4);
19
+ const _config_6 = resolveUserAgentConfig(_config_5);
20
+ super(_config_6);
21
+ this.config = _config_6;
22
+ this.middlewareStack.use(getRetryPlugin(this.config));
23
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
24
+ this.middlewareStack.use(getHostHeaderPlugin(this.config));
25
+ this.middlewareStack.use(getLoggerPlugin(this.config));
26
+ this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
27
+ this.middlewareStack.use(getAwsAuthPlugin(this.config));
28
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
33
29
  }
34
- MarketplaceEntitlementServiceClient.prototype.destroy = function () {
35
- _super.prototype.destroy.call(this);
36
- };
37
- return MarketplaceEntitlementServiceClient;
38
- }(__Client));
39
- export { MarketplaceEntitlementServiceClient };
30
+ destroy() {
31
+ super.destroy();
32
+ }
33
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { GetEntitlementsRequestFilterSensitiveLog, GetEntitlementsResultFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_json1_1GetEntitlementsCommand, serializeAws_json1_1GetEntitlementsCommand, } from "../protocols/Aws_json1_1";
6
- var GetEntitlementsCommand = (function (_super) {
7
- __extends(GetEntitlementsCommand, _super);
8
- function GetEntitlementsCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class GetEntitlementsCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- GetEntitlementsCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "MarketplaceEntitlementServiceClient";
18
- var commandName = "GetEntitlementsCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "MarketplaceEntitlementServiceClient";
15
+ const commandName = "GetEntitlementsCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: GetEntitlementsRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: GetEntitlementsResultFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- GetEntitlementsCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_json1_1GetEntitlementsCommand(input, context);
33
- };
34
- GetEntitlementsCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_json1_1GetEntitlementsCommand(output, context);
36
- };
37
- return GetEntitlementsCommand;
38
- }($Command));
39
- export { GetEntitlementsCommand };
31
+ }
32
+ }
@@ -1,7 +1,6 @@
1
- import { __assign, __awaiter, __generator } from "tslib";
2
1
  import { getRegionInfo } from "@aws-sdk/config-resolver";
3
- var regionHash = {};
4
- var partitionHash = {
2
+ const regionHash = {};
3
+ const partitionHash = {
5
4
  aws: {
6
5
  regions: [
7
6
  "af-south-1",
@@ -121,8 +120,9 @@ var partitionHash = {
121
120
  ],
122
121
  },
123
122
  };
124
- export var defaultRegionInfoProvider = function (region, options) { return __awaiter(void 0, void 0, void 0, function () {
125
- return __generator(this, function (_a) {
126
- return [2, getRegionInfo(region, __assign(__assign({}, options), { signingService: "aws-marketplace", regionHash: regionHash, partitionHash: partitionHash }))];
127
- });
128
- }); };
123
+ export const defaultRegionInfoProvider = async (region, options) => getRegionInfo(region, {
124
+ ...options,
125
+ signingService: "aws-marketplace",
126
+ regionHash,
127
+ partitionHash,
128
+ });
@@ -1,12 +1,7 @@
1
- import { __extends } from "tslib";
2
1
  import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
3
- var MarketplaceEntitlementServiceServiceException = (function (_super) {
4
- __extends(MarketplaceEntitlementServiceServiceException, _super);
5
- function MarketplaceEntitlementServiceServiceException(options) {
6
- var _this = _super.call(this, options) || this;
7
- Object.setPrototypeOf(_this, MarketplaceEntitlementServiceServiceException.prototype);
8
- return _this;
2
+ export class MarketplaceEntitlementServiceServiceException extends __ServiceException {
3
+ constructor(options) {
4
+ super(options);
5
+ Object.setPrototypeOf(this, MarketplaceEntitlementServiceServiceException.prototype);
9
6
  }
10
- return MarketplaceEntitlementServiceServiceException;
11
- }(__ServiceException));
12
- export { MarketplaceEntitlementServiceServiceException };
7
+ }
@@ -1,4 +1,3 @@
1
- import { __assign, __extends } from "tslib";
2
1
  import { MarketplaceEntitlementServiceServiceException as __BaseException } from "./MarketplaceEntitlementServiceServiceException";
3
2
  export var GetEntitlementFilterName;
4
3
  (function (GetEntitlementFilterName) {
@@ -7,7 +6,7 @@ export var GetEntitlementFilterName;
7
6
  })(GetEntitlementFilterName || (GetEntitlementFilterName = {}));
8
7
  export var EntitlementValue;
9
8
  (function (EntitlementValue) {
10
- EntitlementValue.visit = function (value, visitor) {
9
+ EntitlementValue.visit = (value, visitor) => {
11
10
  if (value.IntegerValue !== undefined)
12
11
  return visitor.IntegerValue(value.IntegerValue);
13
12
  if (value.DoubleValue !== undefined)
@@ -19,45 +18,46 @@ export var EntitlementValue;
19
18
  return visitor._(value.$unknown[0], value.$unknown[1]);
20
19
  };
21
20
  })(EntitlementValue || (EntitlementValue = {}));
22
- var InternalServiceErrorException = (function (_super) {
23
- __extends(InternalServiceErrorException, _super);
24
- function InternalServiceErrorException(opts) {
25
- var _this = _super.call(this, __assign({ name: "InternalServiceErrorException", $fault: "server" }, opts)) || this;
26
- _this.name = "InternalServiceErrorException";
27
- _this.$fault = "server";
28
- Object.setPrototypeOf(_this, InternalServiceErrorException.prototype);
29
- return _this;
21
+ export class InternalServiceErrorException extends __BaseException {
22
+ constructor(opts) {
23
+ super({
24
+ name: "InternalServiceErrorException",
25
+ $fault: "server",
26
+ ...opts,
27
+ });
28
+ this.name = "InternalServiceErrorException";
29
+ this.$fault = "server";
30
+ Object.setPrototypeOf(this, InternalServiceErrorException.prototype);
30
31
  }
31
- return InternalServiceErrorException;
32
- }(__BaseException));
33
- export { InternalServiceErrorException };
34
- var InvalidParameterException = (function (_super) {
35
- __extends(InvalidParameterException, _super);
36
- function InvalidParameterException(opts) {
37
- var _this = _super.call(this, __assign({ name: "InvalidParameterException", $fault: "client" }, opts)) || this;
38
- _this.name = "InvalidParameterException";
39
- _this.$fault = "client";
40
- Object.setPrototypeOf(_this, InvalidParameterException.prototype);
41
- return _this;
32
+ }
33
+ export class InvalidParameterException extends __BaseException {
34
+ constructor(opts) {
35
+ super({
36
+ name: "InvalidParameterException",
37
+ $fault: "client",
38
+ ...opts,
39
+ });
40
+ this.name = "InvalidParameterException";
41
+ this.$fault = "client";
42
+ Object.setPrototypeOf(this, InvalidParameterException.prototype);
42
43
  }
43
- return InvalidParameterException;
44
- }(__BaseException));
45
- export { InvalidParameterException };
46
- var ThrottlingException = (function (_super) {
47
- __extends(ThrottlingException, _super);
48
- function ThrottlingException(opts) {
49
- var _this = _super.call(this, __assign({ name: "ThrottlingException", $fault: "client" }, opts)) || this;
50
- _this.name = "ThrottlingException";
51
- _this.$fault = "client";
52
- Object.setPrototypeOf(_this, ThrottlingException.prototype);
53
- return _this;
44
+ }
45
+ export class ThrottlingException extends __BaseException {
46
+ constructor(opts) {
47
+ super({
48
+ name: "ThrottlingException",
49
+ $fault: "client",
50
+ ...opts,
51
+ });
52
+ this.name = "ThrottlingException";
53
+ this.$fault = "client";
54
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
54
55
  }
55
- return ThrottlingException;
56
- }(__BaseException));
57
- export { ThrottlingException };
58
- export var GetEntitlementsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
59
- export var EntitlementValueFilterSensitiveLog = function (obj) {
60
- var _a;
56
+ }
57
+ export const GetEntitlementsRequestFilterSensitiveLog = (obj) => ({
58
+ ...obj,
59
+ });
60
+ export const EntitlementValueFilterSensitiveLog = (obj) => {
61
61
  if (obj.IntegerValue !== undefined)
62
62
  return { IntegerValue: obj.IntegerValue };
63
63
  if (obj.DoubleValue !== undefined)
@@ -67,7 +67,13 @@ export var EntitlementValueFilterSensitiveLog = function (obj) {
67
67
  if (obj.StringValue !== undefined)
68
68
  return { StringValue: obj.StringValue };
69
69
  if (obj.$unknown !== undefined)
70
- return _a = {}, _a[obj.$unknown[0]] = "UNKNOWN", _a;
70
+ return { [obj.$unknown[0]]: "UNKNOWN" };
71
71
  };
72
- export var EntitlementFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.Value && { Value: EntitlementValueFilterSensitiveLog(obj.Value) }))); };
73
- export var GetEntitlementsResultFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.Entitlements && { Entitlements: obj.Entitlements.map(function (item) { return EntitlementFilterSensitiveLog(item); }) }))); };
72
+ export const EntitlementFilterSensitiveLog = (obj) => ({
73
+ ...obj,
74
+ ...(obj.Value && { Value: EntitlementValueFilterSensitiveLog(obj.Value) }),
75
+ });
76
+ export const GetEntitlementsResultFilterSensitiveLog = (obj) => ({
77
+ ...obj,
78
+ ...(obj.Entitlements && { Entitlements: obj.Entitlements.map((item) => EntitlementFilterSensitiveLog(item)) }),
79
+ });
@@ -1,126 +1,109 @@
1
- import { __assign, __awaiter, __generator, __read } from "tslib";
2
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
2
  import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, expectUnion as __expectUnion, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
4
3
  import { MarketplaceEntitlementServiceServiceException as __BaseException } from "../models/MarketplaceEntitlementServiceServiceException";
5
4
  import { InternalServiceErrorException, InvalidParameterException, ThrottlingException, } from "../models/models_0";
6
- export var serializeAws_json1_1GetEntitlementsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
7
- var headers, body;
8
- return __generator(this, function (_a) {
9
- headers = {
10
- "content-type": "application/x-amz-json-1.1",
11
- "x-amz-target": "AWSMPEntitlementService.GetEntitlements",
12
- };
13
- body = JSON.stringify(serializeAws_json1_1GetEntitlementsRequest(input, context));
14
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
15
- });
16
- }); };
17
- export var deserializeAws_json1_1GetEntitlementsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
18
- var data, contents, response;
19
- return __generator(this, function (_a) {
20
- switch (_a.label) {
21
- case 0:
22
- if (output.statusCode >= 300) {
23
- return [2, deserializeAws_json1_1GetEntitlementsCommandError(output, context)];
24
- }
25
- return [4, parseBody(output.body, context)];
26
- case 1:
27
- data = _a.sent();
28
- contents = {};
29
- contents = deserializeAws_json1_1GetEntitlementsResult(data, context);
30
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
31
- return [2, Promise.resolve(response)];
32
- }
33
- });
34
- }); };
35
- var deserializeAws_json1_1GetEntitlementsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
36
- var parsedOutput, _a, errorCode, _b, parsedBody;
37
- var _c;
38
- return __generator(this, function (_d) {
39
- switch (_d.label) {
40
- case 0:
41
- _a = [__assign({}, output)];
42
- _c = {};
43
- return [4, parseErrorBody(output.body, context)];
44
- case 1:
45
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
46
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
47
- _b = errorCode;
48
- switch (_b) {
49
- case "InternalServiceErrorException": return [3, 2];
50
- case "com.amazonaws.marketplaceentitlementservice#InternalServiceErrorException": return [3, 2];
51
- case "InvalidParameterException": return [3, 4];
52
- case "com.amazonaws.marketplaceentitlementservice#InvalidParameterException": return [3, 4];
53
- case "ThrottlingException": return [3, 6];
54
- case "com.amazonaws.marketplaceentitlementservice#ThrottlingException": return [3, 6];
55
- }
56
- return [3, 8];
57
- case 2: return [4, deserializeAws_json1_1InternalServiceErrorExceptionResponse(parsedOutput, context)];
58
- case 3: throw _d.sent();
59
- case 4: return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
60
- case 5: throw _d.sent();
61
- case 6: return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
62
- case 7: throw _d.sent();
63
- case 8:
64
- parsedBody = parsedOutput.body;
65
- throwDefaultError({
66
- output: output,
67
- parsedBody: parsedBody,
68
- exceptionCtor: __BaseException,
69
- errorCode: errorCode,
70
- });
71
- _d.label = 9;
72
- case 9: return [2];
73
- }
74
- });
75
- }); };
76
- var deserializeAws_json1_1InternalServiceErrorExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
77
- var body, deserialized, exception;
78
- return __generator(this, function (_a) {
79
- body = parsedOutput.body;
80
- deserialized = deserializeAws_json1_1InternalServiceErrorException(body, context);
81
- exception = new InternalServiceErrorException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
82
- return [2, __decorateServiceException(exception, body)];
5
+ export const serializeAws_json1_1GetEntitlementsCommand = async (input, context) => {
6
+ const headers = {
7
+ "content-type": "application/x-amz-json-1.1",
8
+ "x-amz-target": "AWSMPEntitlementService.GetEntitlements",
9
+ };
10
+ let body;
11
+ body = JSON.stringify(serializeAws_json1_1GetEntitlementsRequest(input, context));
12
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
+ };
14
+ export const deserializeAws_json1_1GetEntitlementsCommand = async (output, context) => {
15
+ if (output.statusCode >= 300) {
16
+ return deserializeAws_json1_1GetEntitlementsCommandError(output, context);
17
+ }
18
+ const data = await parseBody(output.body, context);
19
+ let contents = {};
20
+ contents = deserializeAws_json1_1GetEntitlementsResult(data, context);
21
+ const response = {
22
+ $metadata: deserializeMetadata(output),
23
+ ...contents,
24
+ };
25
+ return Promise.resolve(response);
26
+ };
27
+ const deserializeAws_json1_1GetEntitlementsCommandError = async (output, context) => {
28
+ const parsedOutput = {
29
+ ...output,
30
+ body: await parseErrorBody(output.body, context),
31
+ };
32
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
33
+ switch (errorCode) {
34
+ case "InternalServiceErrorException":
35
+ case "com.amazonaws.marketplaceentitlementservice#InternalServiceErrorException":
36
+ throw await deserializeAws_json1_1InternalServiceErrorExceptionResponse(parsedOutput, context);
37
+ case "InvalidParameterException":
38
+ case "com.amazonaws.marketplaceentitlementservice#InvalidParameterException":
39
+ throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
40
+ case "ThrottlingException":
41
+ case "com.amazonaws.marketplaceentitlementservice#ThrottlingException":
42
+ throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
43
+ default:
44
+ const parsedBody = parsedOutput.body;
45
+ throwDefaultError({
46
+ output,
47
+ parsedBody,
48
+ exceptionCtor: __BaseException,
49
+ errorCode,
50
+ });
51
+ }
52
+ };
53
+ const deserializeAws_json1_1InternalServiceErrorExceptionResponse = async (parsedOutput, context) => {
54
+ const body = parsedOutput.body;
55
+ const deserialized = deserializeAws_json1_1InternalServiceErrorException(body, context);
56
+ const exception = new InternalServiceErrorException({
57
+ $metadata: deserializeMetadata(parsedOutput),
58
+ ...deserialized,
83
59
  });
84
- }); };
85
- var deserializeAws_json1_1InvalidParameterExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
86
- var body, deserialized, exception;
87
- return __generator(this, function (_a) {
88
- body = parsedOutput.body;
89
- deserialized = deserializeAws_json1_1InvalidParameterException(body, context);
90
- exception = new InvalidParameterException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
91
- return [2, __decorateServiceException(exception, body)];
60
+ return __decorateServiceException(exception, body);
61
+ };
62
+ const deserializeAws_json1_1InvalidParameterExceptionResponse = async (parsedOutput, context) => {
63
+ const body = parsedOutput.body;
64
+ const deserialized = deserializeAws_json1_1InvalidParameterException(body, context);
65
+ const exception = new InvalidParameterException({
66
+ $metadata: deserializeMetadata(parsedOutput),
67
+ ...deserialized,
92
68
  });
93
- }); };
94
- var deserializeAws_json1_1ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
95
- var body, deserialized, exception;
96
- return __generator(this, function (_a) {
97
- body = parsedOutput.body;
98
- deserialized = deserializeAws_json1_1ThrottlingException(body, context);
99
- exception = new ThrottlingException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
100
- return [2, __decorateServiceException(exception, body)];
69
+ return __decorateServiceException(exception, body);
70
+ };
71
+ const deserializeAws_json1_1ThrottlingExceptionResponse = async (parsedOutput, context) => {
72
+ const body = parsedOutput.body;
73
+ const deserialized = deserializeAws_json1_1ThrottlingException(body, context);
74
+ const exception = new ThrottlingException({
75
+ $metadata: deserializeMetadata(parsedOutput),
76
+ ...deserialized,
101
77
  });
102
- }); };
103
- var serializeAws_json1_1FilterValueList = function (input, context) {
78
+ return __decorateServiceException(exception, body);
79
+ };
80
+ const serializeAws_json1_1FilterValueList = (input, context) => {
104
81
  return input
105
- .filter(function (e) { return e != null; })
106
- .map(function (entry) {
82
+ .filter((e) => e != null)
83
+ .map((entry) => {
107
84
  return entry;
108
85
  });
109
86
  };
110
- var serializeAws_json1_1GetEntitlementFilters = function (input, context) {
111
- return Object.entries(input).reduce(function (acc, _a) {
112
- var _b;
113
- var _c = __read(_a, 2), key = _c[0], value = _c[1];
87
+ const serializeAws_json1_1GetEntitlementFilters = (input, context) => {
88
+ return Object.entries(input).reduce((acc, [key, value]) => {
114
89
  if (value === null) {
115
90
  return acc;
116
91
  }
117
- return __assign(__assign({}, acc), (_b = {}, _b[key] = serializeAws_json1_1FilterValueList(value, context), _b));
92
+ return {
93
+ ...acc,
94
+ [key]: serializeAws_json1_1FilterValueList(value, context),
95
+ };
118
96
  }, {});
119
97
  };
120
- var serializeAws_json1_1GetEntitlementsRequest = function (input, context) {
121
- return __assign(__assign(__assign(__assign({}, (input.Filter != null && { Filter: serializeAws_json1_1GetEntitlementFilters(input.Filter, context) })), (input.MaxResults != null && { MaxResults: input.MaxResults })), (input.NextToken != null && { NextToken: input.NextToken })), (input.ProductCode != null && { ProductCode: input.ProductCode }));
98
+ const serializeAws_json1_1GetEntitlementsRequest = (input, context) => {
99
+ return {
100
+ ...(input.Filter != null && { Filter: serializeAws_json1_1GetEntitlementFilters(input.Filter, context) }),
101
+ ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
102
+ ...(input.NextToken != null && { NextToken: input.NextToken }),
103
+ ...(input.ProductCode != null && { ProductCode: input.ProductCode }),
104
+ };
122
105
  };
123
- var deserializeAws_json1_1Entitlement = function (output, context) {
106
+ const deserializeAws_json1_1Entitlement = (output, context) => {
124
107
  return {
125
108
  CustomerIdentifier: __expectString(output.CustomerIdentifier),
126
109
  Dimension: __expectString(output.Dimension),
@@ -131,10 +114,10 @@ var deserializeAws_json1_1Entitlement = function (output, context) {
131
114
  Value: output.Value != null ? deserializeAws_json1_1EntitlementValue(__expectUnion(output.Value), context) : undefined,
132
115
  };
133
116
  };
134
- var deserializeAws_json1_1EntitlementList = function (output, context) {
135
- var retVal = (output || [])
136
- .filter(function (e) { return e != null; })
137
- .map(function (entry) {
117
+ const deserializeAws_json1_1EntitlementList = (output, context) => {
118
+ const retVal = (output || [])
119
+ .filter((e) => e != null)
120
+ .map((entry) => {
138
121
  if (entry === null) {
139
122
  return null;
140
123
  }
@@ -142,7 +125,7 @@ var deserializeAws_json1_1EntitlementList = function (output, context) {
142
125
  });
143
126
  return retVal;
144
127
  };
145
- var deserializeAws_json1_1EntitlementValue = function (output, context) {
128
+ const deserializeAws_json1_1EntitlementValue = (output, context) => {
146
129
  if (__expectBoolean(output.BooleanValue) !== undefined) {
147
130
  return { BooleanValue: __expectBoolean(output.BooleanValue) };
148
131
  }
@@ -157,96 +140,73 @@ var deserializeAws_json1_1EntitlementValue = function (output, context) {
157
140
  }
158
141
  return { $unknown: Object.entries(output)[0] };
159
142
  };
160
- var deserializeAws_json1_1GetEntitlementsResult = function (output, context) {
143
+ const deserializeAws_json1_1GetEntitlementsResult = (output, context) => {
161
144
  return {
162
145
  Entitlements: output.Entitlements != null ? deserializeAws_json1_1EntitlementList(output.Entitlements, context) : undefined,
163
146
  NextToken: __expectString(output.NextToken),
164
147
  };
165
148
  };
166
- var deserializeAws_json1_1InternalServiceErrorException = function (output, context) {
149
+ const deserializeAws_json1_1InternalServiceErrorException = (output, context) => {
167
150
  return {
168
151
  message: __expectString(output.message),
169
152
  };
170
153
  };
171
- var deserializeAws_json1_1InvalidParameterException = function (output, context) {
154
+ const deserializeAws_json1_1InvalidParameterException = (output, context) => {
172
155
  return {
173
156
  message: __expectString(output.message),
174
157
  };
175
158
  };
176
- var deserializeAws_json1_1ThrottlingException = function (output, context) {
159
+ const deserializeAws_json1_1ThrottlingException = (output, context) => {
177
160
  return {
178
161
  message: __expectString(output.message),
179
162
  };
180
163
  };
181
- var deserializeMetadata = function (output) {
182
- var _a, _b;
183
- return ({
184
- httpStatusCode: output.statusCode,
185
- requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
186
- extendedRequestId: output.headers["x-amz-id-2"],
187
- cfId: output.headers["x-amz-cf-id"],
188
- });
189
- };
190
- var collectBody = function (streamBody, context) {
191
- if (streamBody === void 0) { streamBody = new Uint8Array(); }
164
+ const deserializeMetadata = (output) => ({
165
+ httpStatusCode: output.statusCode,
166
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
167
+ extendedRequestId: output.headers["x-amz-id-2"],
168
+ cfId: output.headers["x-amz-cf-id"],
169
+ });
170
+ const collectBody = (streamBody = new Uint8Array(), context) => {
192
171
  if (streamBody instanceof Uint8Array) {
193
172
  return Promise.resolve(streamBody);
194
173
  }
195
174
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
196
175
  };
197
- var collectBodyString = function (streamBody, context) {
198
- return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
176
+ const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
177
+ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
178
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
179
+ const contents = {
180
+ protocol,
181
+ hostname,
182
+ port,
183
+ method: "POST",
184
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
185
+ headers,
186
+ };
187
+ if (resolvedHostname !== undefined) {
188
+ contents.hostname = resolvedHostname;
189
+ }
190
+ if (body !== undefined) {
191
+ contents.body = body;
192
+ }
193
+ return new __HttpRequest(contents);
199
194
  };
200
- var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, body) { return __awaiter(void 0, void 0, void 0, function () {
201
- var _a, hostname, _b, protocol, port, basePath, contents;
202
- return __generator(this, function (_c) {
203
- switch (_c.label) {
204
- case 0: return [4, context.endpoint()];
205
- case 1:
206
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
207
- contents = {
208
- protocol: protocol,
209
- hostname: hostname,
210
- port: port,
211
- method: "POST",
212
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
213
- headers: headers,
214
- };
215
- if (resolvedHostname !== undefined) {
216
- contents.hostname = resolvedHostname;
217
- }
218
- if (body !== undefined) {
219
- contents.body = body;
220
- }
221
- return [2, new __HttpRequest(contents)];
222
- }
223
- });
224
- }); };
225
- var parseBody = function (streamBody, context) {
226
- return collectBodyString(streamBody, context).then(function (encoded) {
227
- if (encoded.length) {
228
- return JSON.parse(encoded);
229
- }
230
- return {};
231
- });
195
+ const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
196
+ if (encoded.length) {
197
+ return JSON.parse(encoded);
198
+ }
199
+ return {};
200
+ });
201
+ const parseErrorBody = async (errorBody, context) => {
202
+ const value = await parseBody(errorBody, context);
203
+ value.message = value.message ?? value.Message;
204
+ return value;
232
205
  };
233
- var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
234
- var value;
235
- var _a;
236
- return __generator(this, function (_b) {
237
- switch (_b.label) {
238
- case 0: return [4, parseBody(errorBody, context)];
239
- case 1:
240
- value = _b.sent();
241
- value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
242
- return [2, value];
243
- }
244
- });
245
- }); };
246
- var loadRestJsonErrorCode = function (output, data) {
247
- var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
248
- var sanitizeErrorCode = function (rawValue) {
249
- var cleanValue = rawValue;
206
+ const loadRestJsonErrorCode = (output, data) => {
207
+ const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
208
+ const sanitizeErrorCode = (rawValue) => {
209
+ let cleanValue = rawValue;
250
210
  if (typeof cleanValue === "number") {
251
211
  cleanValue = cleanValue.toString();
252
212
  }
@@ -261,7 +221,7 @@ var loadRestJsonErrorCode = function (output, data) {
261
221
  }
262
222
  return cleanValue;
263
223
  };
264
- var headerKey = findKey(output.headers, "x-amzn-errortype");
224
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
265
225
  if (headerKey !== undefined) {
266
226
  return sanitizeErrorCode(output.headers[headerKey]);
267
227
  }
@@ -1,4 +1,3 @@
1
- import { __assign, __awaiter, __generator } from "tslib";
2
1
  import packageInfo from "../package.json";
3
2
  import { Sha256 } from "@aws-crypto/sha256-browser";
4
3
  import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
@@ -12,15 +11,30 @@ import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
12
11
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
13
12
  import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
14
13
  import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
15
- export var getRuntimeConfig = function (config) {
16
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
17
- var defaultsMode = resolveDefaultsModeConfig(config);
18
- var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
19
- var clientSharedValues = getSharedRuntimeConfig(config);
20
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
21
- switch (_a.label) {
22
- case 0: return [4, defaultConfigProvider()];
23
- case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
24
- }
25
- }); }); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
14
+ export const getRuntimeConfig = (config) => {
15
+ const defaultsMode = resolveDefaultsModeConfig(config);
16
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
17
+ const clientSharedValues = getSharedRuntimeConfig(config);
18
+ return {
19
+ ...clientSharedValues,
20
+ ...config,
21
+ runtime: "browser",
22
+ defaultsMode,
23
+ base64Decoder: config?.base64Decoder ?? fromBase64,
24
+ base64Encoder: config?.base64Encoder ?? toBase64,
25
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
26
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
27
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
28
+ defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
29
+ maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
30
+ region: config?.region ?? invalidProvider("Region is missing"),
31
+ requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
32
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
33
+ sha256: config?.sha256 ?? Sha256,
34
+ streamCollector: config?.streamCollector ?? streamCollector,
35
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
36
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
37
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
38
+ utf8Encoder: config?.utf8Encoder ?? toUtf8,
39
+ };
26
40
  };
@@ -1,4 +1,3 @@
1
- import { __assign, __awaiter, __generator } from "tslib";
2
1
  import packageInfo from "../package.json";
3
2
  import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
4
3
  import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
@@ -15,16 +14,35 @@ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shar
15
14
  import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
16
15
  import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
17
16
  import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
18
- export var getRuntimeConfig = function (config) {
19
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
17
+ export const getRuntimeConfig = (config) => {
20
18
  emitWarningIfUnsupportedVersion(process.version);
21
- var defaultsMode = resolveDefaultsModeConfig(config);
22
- var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
23
- var clientSharedValues = getSharedRuntimeConfig(config);
24
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(__assign(__assign({}, NODE_RETRY_MODE_CONFIG_OPTIONS), { default: function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
25
- switch (_a.label) {
26
- case 0: return [4, defaultConfigProvider()];
27
- case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
28
- }
29
- }); }); } })), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
19
+ const defaultsMode = resolveDefaultsModeConfig(config);
20
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
21
+ const clientSharedValues = getSharedRuntimeConfig(config);
22
+ return {
23
+ ...clientSharedValues,
24
+ ...config,
25
+ runtime: "node",
26
+ defaultsMode,
27
+ base64Decoder: config?.base64Decoder ?? fromBase64,
28
+ base64Encoder: config?.base64Encoder ?? toBase64,
29
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
30
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider),
31
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
32
+ defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
33
+ maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
34
+ region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
35
+ requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
36
+ retryMode: config?.retryMode ??
37
+ loadNodeConfig({
38
+ ...NODE_RETRY_MODE_CONFIG_OPTIONS,
39
+ default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
40
+ }),
41
+ sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
42
+ streamCollector: config?.streamCollector ?? streamCollector,
43
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
44
+ useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
45
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
46
+ utf8Encoder: config?.utf8Encoder ?? toUtf8,
47
+ };
30
48
  };
@@ -1,8 +1,11 @@
1
- import { __assign } from "tslib";
2
1
  import { Sha256 } from "@aws-crypto/sha256-js";
3
2
  import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
4
- export var getRuntimeConfig = function (config) {
5
- var _a;
6
- var browserDefaults = getBrowserRuntimeConfig(config);
7
- return __assign(__assign(__assign({}, browserDefaults), config), { runtime: "react-native", sha256: (_a = config === null || config === void 0 ? void 0 : config.sha256) !== null && _a !== void 0 ? _a : Sha256 });
3
+ export const getRuntimeConfig = (config) => {
4
+ const browserDefaults = getBrowserRuntimeConfig(config);
5
+ return {
6
+ ...browserDefaults,
7
+ ...config,
8
+ runtime: "react-native",
9
+ sha256: config?.sha256 ?? Sha256,
10
+ };
8
11
  };
@@ -1,13 +1,10 @@
1
1
  import { parseUrl } from "@aws-sdk/url-parser";
2
2
  import { defaultRegionInfoProvider } from "./endpoints";
3
- export var getRuntimeConfig = function (config) {
4
- var _a, _b, _c, _d, _e;
5
- return ({
6
- apiVersion: "2017-01-11",
7
- disableHostPrefix: (_a = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _a !== void 0 ? _a : false,
8
- logger: (_b = config === null || config === void 0 ? void 0 : config.logger) !== null && _b !== void 0 ? _b : {},
9
- regionInfoProvider: (_c = config === null || config === void 0 ? void 0 : config.regionInfoProvider) !== null && _c !== void 0 ? _c : defaultRegionInfoProvider,
10
- serviceId: (_d = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _d !== void 0 ? _d : "Marketplace Entitlement Service",
11
- urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : parseUrl,
12
- });
13
- };
3
+ export const getRuntimeConfig = (config) => ({
4
+ apiVersion: "2017-01-11",
5
+ disableHostPrefix: config?.disableHostPrefix ?? false,
6
+ logger: config?.logger ?? {},
7
+ regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider,
8
+ serviceId: config?.serviceId ?? "Marketplace Entitlement Service",
9
+ urlParser: config?.urlParser ?? parseUrl,
10
+ });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-marketplace-entitlement-service",
3
3
  "description": "AWS SDK for JavaScript Marketplace Entitlement Service Client for Node.js, Browser and React Native",
4
- "version": "3.185.0",
4
+ "version": "3.188.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",
@@ -19,41 +19,41 @@
19
19
  "dependencies": {
20
20
  "@aws-crypto/sha256-browser": "2.0.0",
21
21
  "@aws-crypto/sha256-js": "2.0.0",
22
- "@aws-sdk/client-sts": "3.185.0",
23
- "@aws-sdk/config-resolver": "3.183.0",
24
- "@aws-sdk/credential-provider-node": "3.185.0",
25
- "@aws-sdk/fetch-http-handler": "3.183.0",
26
- "@aws-sdk/hash-node": "3.183.0",
27
- "@aws-sdk/invalid-dependency": "3.183.0",
28
- "@aws-sdk/middleware-content-length": "3.183.0",
29
- "@aws-sdk/middleware-host-header": "3.183.0",
30
- "@aws-sdk/middleware-logger": "3.183.0",
31
- "@aws-sdk/middleware-recursion-detection": "3.183.0",
32
- "@aws-sdk/middleware-retry": "3.185.0",
33
- "@aws-sdk/middleware-serde": "3.183.0",
34
- "@aws-sdk/middleware-signing": "3.183.0",
35
- "@aws-sdk/middleware-stack": "3.183.0",
36
- "@aws-sdk/middleware-user-agent": "3.183.0",
37
- "@aws-sdk/node-config-provider": "3.183.0",
38
- "@aws-sdk/node-http-handler": "3.185.0",
39
- "@aws-sdk/protocol-http": "3.183.0",
40
- "@aws-sdk/smithy-client": "3.183.0",
41
- "@aws-sdk/types": "3.183.0",
42
- "@aws-sdk/url-parser": "3.183.0",
43
- "@aws-sdk/util-base64-browser": "3.183.0",
44
- "@aws-sdk/util-base64-node": "3.183.0",
45
- "@aws-sdk/util-body-length-browser": "3.183.0",
46
- "@aws-sdk/util-body-length-node": "3.183.0",
47
- "@aws-sdk/util-defaults-mode-browser": "3.183.0",
48
- "@aws-sdk/util-defaults-mode-node": "3.183.0",
49
- "@aws-sdk/util-user-agent-browser": "3.183.0",
50
- "@aws-sdk/util-user-agent-node": "3.183.0",
51
- "@aws-sdk/util-utf8-browser": "3.183.0",
52
- "@aws-sdk/util-utf8-node": "3.183.0",
22
+ "@aws-sdk/client-sts": "3.188.0",
23
+ "@aws-sdk/config-resolver": "3.188.0",
24
+ "@aws-sdk/credential-provider-node": "3.188.0",
25
+ "@aws-sdk/fetch-http-handler": "3.188.0",
26
+ "@aws-sdk/hash-node": "3.188.0",
27
+ "@aws-sdk/invalid-dependency": "3.188.0",
28
+ "@aws-sdk/middleware-content-length": "3.188.0",
29
+ "@aws-sdk/middleware-host-header": "3.188.0",
30
+ "@aws-sdk/middleware-logger": "3.188.0",
31
+ "@aws-sdk/middleware-recursion-detection": "3.188.0",
32
+ "@aws-sdk/middleware-retry": "3.188.0",
33
+ "@aws-sdk/middleware-serde": "3.188.0",
34
+ "@aws-sdk/middleware-signing": "3.188.0",
35
+ "@aws-sdk/middleware-stack": "3.188.0",
36
+ "@aws-sdk/middleware-user-agent": "3.188.0",
37
+ "@aws-sdk/node-config-provider": "3.188.0",
38
+ "@aws-sdk/node-http-handler": "3.188.0",
39
+ "@aws-sdk/protocol-http": "3.188.0",
40
+ "@aws-sdk/smithy-client": "3.188.0",
41
+ "@aws-sdk/types": "3.188.0",
42
+ "@aws-sdk/url-parser": "3.188.0",
43
+ "@aws-sdk/util-base64-browser": "3.188.0",
44
+ "@aws-sdk/util-base64-node": "3.188.0",
45
+ "@aws-sdk/util-body-length-browser": "3.188.0",
46
+ "@aws-sdk/util-body-length-node": "3.188.0",
47
+ "@aws-sdk/util-defaults-mode-browser": "3.188.0",
48
+ "@aws-sdk/util-defaults-mode-node": "3.188.0",
49
+ "@aws-sdk/util-user-agent-browser": "3.188.0",
50
+ "@aws-sdk/util-user-agent-node": "3.188.0",
51
+ "@aws-sdk/util-utf8-browser": "3.188.0",
52
+ "@aws-sdk/util-utf8-node": "3.188.0",
53
53
  "tslib": "^2.3.1"
54
54
  },
55
55
  "devDependencies": {
56
- "@aws-sdk/service-client-documentation-generator": "3.183.0",
56
+ "@aws-sdk/service-client-documentation-generator": "3.188.0",
57
57
  "@tsconfig/recommended": "1.0.1",
58
58
  "@types/node": "^12.7.5",
59
59
  "concurrently": "7.0.0",