@aws-sdk/client-marketplace-entitlement-service 3.183.0 → 3.186.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,25 @@
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.186.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.185.0...v3.186.0) (2022-10-06)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-marketplace-entitlement-service
9
+
10
+
11
+
12
+
13
+
14
+ # [3.185.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.184.0...v3.185.0) (2022-10-05)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **codegen:** add deser check for x-amz-request-id ([#4015](https://github.com/aws/aws-sdk-js-v3/issues/4015)) ([6ff07bd](https://github.com/aws/aws-sdk-js-v3/commit/6ff07bd7e72bd56725f318013ac1d6d0fbbcdd9a))
20
+
21
+
22
+
23
+
24
+
6
25
  # [3.183.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.182.0...v3.183.0) (2022-10-03)
7
26
 
8
27
  **Note:** Version bump only for package @aws-sdk/client-marketplace-entitlement-service
@@ -167,10 +167,10 @@ const deserializeAws_json1_1ThrottlingException = (output, context) => {
167
167
  };
168
168
  };
169
169
  const deserializeMetadata = (output) => {
170
- var _a;
170
+ var _a, _b;
171
171
  return ({
172
172
  httpStatusCode: output.statusCode,
173
- requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"],
173
+ 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"],
174
174
  extendedRequestId: output.headers["x-amz-id-2"],
175
175
  cfId: output.headers["x-amz-cf-id"],
176
176
  });
@@ -1,18 +1,25 @@
1
+ import { __extends } from "tslib";
1
2
  import { GetEntitlementsCommand, } from "./commands/GetEntitlementsCommand";
2
3
  import { MarketplaceEntitlementServiceClient } from "./MarketplaceEntitlementServiceClient";
3
- export class MarketplaceEntitlementService extends MarketplaceEntitlementServiceClient {
4
- getEntitlements(args, optionsOrCb, cb) {
5
- const command = new GetEntitlementsCommand(args);
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);
6
11
  if (typeof optionsOrCb === "function") {
7
12
  this.send(command, optionsOrCb);
8
13
  }
9
14
  else if (typeof cb === "function") {
10
15
  if (typeof optionsOrCb !== "object")
11
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
16
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
12
17
  this.send(command, optionsOrCb || {}, cb);
13
18
  }
14
19
  else {
15
20
  return this.send(command, optionsOrCb);
16
21
  }
17
- }
18
- }
22
+ };
23
+ return MarketplaceEntitlementService;
24
+ }(MarketplaceEntitlementServiceClient));
25
+ export { MarketplaceEntitlementService };
@@ -1,3 +1,4 @@
1
+ import { __extends } from "tslib";
1
2
  import { resolveEndpointsConfig, resolveRegionConfig, } from "@aws-sdk/config-resolver";
2
3
  import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
3
4
  import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
@@ -8,26 +9,31 @@ import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-sig
8
9
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
9
10
  import { Client as __Client, } from "@aws-sdk/smithy-client";
10
11
  import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
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));
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;
29
33
  }
30
- destroy() {
31
- super.destroy();
32
- }
33
- }
34
+ MarketplaceEntitlementServiceClient.prototype.destroy = function () {
35
+ _super.prototype.destroy.call(this);
36
+ };
37
+ return MarketplaceEntitlementServiceClient;
38
+ }(__Client));
39
+ export { MarketplaceEntitlementServiceClient };
@@ -1,32 +1,39 @@
1
+ import { __extends } from "tslib";
1
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
3
4
  import { GetEntitlementsRequestFilterSensitiveLog, GetEntitlementsResultFilterSensitiveLog, } from "../models/models_0";
4
5
  import { deserializeAws_json1_1GetEntitlementsCommand, serializeAws_json1_1GetEntitlementsCommand, } from "../protocols/Aws_json1_1";
5
- export class GetEntitlementsCommand extends $Command {
6
- constructor(input) {
7
- super();
8
- this.input = input;
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;
9
12
  }
10
- resolveMiddleware(clientStack, configuration, options) {
13
+ GetEntitlementsCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
11
14
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
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,
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,
20
23
  inputFilterSensitiveLog: GetEntitlementsRequestFilterSensitiveLog,
21
24
  outputFilterSensitiveLog: GetEntitlementsResultFilterSensitiveLog,
22
25
  };
23
- const { requestHandler } = configuration;
24
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
- }
26
- serialize(input, context) {
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) {
27
32
  return serializeAws_json1_1GetEntitlementsCommand(input, context);
28
- }
29
- deserialize(output, context) {
33
+ };
34
+ GetEntitlementsCommand.prototype.deserialize = function (output, context) {
30
35
  return deserializeAws_json1_1GetEntitlementsCommand(output, context);
31
- }
32
- }
36
+ };
37
+ return GetEntitlementsCommand;
38
+ }($Command));
39
+ export { GetEntitlementsCommand };
@@ -1,6 +1,7 @@
1
+ import { __assign, __awaiter, __generator } from "tslib";
1
2
  import { getRegionInfo } from "@aws-sdk/config-resolver";
2
- const regionHash = {};
3
- const partitionHash = {
3
+ var regionHash = {};
4
+ var partitionHash = {
4
5
  aws: {
5
6
  regions: [
6
7
  "af-south-1",
@@ -120,9 +121,8 @@ const partitionHash = {
120
121
  ],
121
122
  },
122
123
  };
123
- export const defaultRegionInfoProvider = async (region, options) => getRegionInfo(region, {
124
- ...options,
125
- signingService: "aws-marketplace",
126
- regionHash,
127
- partitionHash,
128
- });
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
+ }); };
@@ -1,7 +1,12 @@
1
+ import { __extends } from "tslib";
1
2
  import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
2
- export class MarketplaceEntitlementServiceServiceException extends __ServiceException {
3
- constructor(options) {
4
- super(options);
5
- Object.setPrototypeOf(this, MarketplaceEntitlementServiceServiceException.prototype);
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;
6
9
  }
7
- }
10
+ return MarketplaceEntitlementServiceServiceException;
11
+ }(__ServiceException));
12
+ export { MarketplaceEntitlementServiceServiceException };
@@ -1,3 +1,4 @@
1
+ import { __assign, __extends } from "tslib";
1
2
  import { MarketplaceEntitlementServiceServiceException as __BaseException } from "./MarketplaceEntitlementServiceServiceException";
2
3
  export var GetEntitlementFilterName;
3
4
  (function (GetEntitlementFilterName) {
@@ -6,7 +7,7 @@ export var GetEntitlementFilterName;
6
7
  })(GetEntitlementFilterName || (GetEntitlementFilterName = {}));
7
8
  export var EntitlementValue;
8
9
  (function (EntitlementValue) {
9
- EntitlementValue.visit = (value, visitor) => {
10
+ EntitlementValue.visit = function (value, visitor) {
10
11
  if (value.IntegerValue !== undefined)
11
12
  return visitor.IntegerValue(value.IntegerValue);
12
13
  if (value.DoubleValue !== undefined)
@@ -18,46 +19,45 @@ export var EntitlementValue;
18
19
  return visitor._(value.$unknown[0], value.$unknown[1]);
19
20
  };
20
21
  })(EntitlementValue || (EntitlementValue = {}));
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);
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;
31
30
  }
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);
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;
43
42
  }
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);
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;
55
54
  }
56
- }
57
- export const GetEntitlementsRequestFilterSensitiveLog = (obj) => ({
58
- ...obj,
59
- });
60
- export const EntitlementValueFilterSensitiveLog = (obj) => {
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;
61
61
  if (obj.IntegerValue !== undefined)
62
62
  return { IntegerValue: obj.IntegerValue };
63
63
  if (obj.DoubleValue !== undefined)
@@ -67,13 +67,7 @@ export const EntitlementValueFilterSensitiveLog = (obj) => {
67
67
  if (obj.StringValue !== undefined)
68
68
  return { StringValue: obj.StringValue };
69
69
  if (obj.$unknown !== undefined)
70
- return { [obj.$unknown[0]]: "UNKNOWN" };
70
+ return _a = {}, _a[obj.$unknown[0]] = "UNKNOWN", _a;
71
71
  };
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
- });
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); }) }))); };
@@ -1,109 +1,126 @@
1
+ import { __assign, __awaiter, __generator, __read } from "tslib";
1
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
3
  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";
3
4
  import { MarketplaceEntitlementServiceServiceException as __BaseException } from "../models/MarketplaceEntitlementServiceServiceException";
4
5
  import { InternalServiceErrorException, InvalidParameterException, ThrottlingException, } from "../models/models_0";
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,
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)];
59
15
  });
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,
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
+ }
68
33
  });
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,
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
+ }
77
74
  });
78
- return __decorateServiceException(exception, body);
79
- };
80
- const serializeAws_json1_1FilterValueList = (input, context) => {
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)];
83
+ });
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)];
92
+ });
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)];
101
+ });
102
+ }); };
103
+ var serializeAws_json1_1FilterValueList = function (input, context) {
81
104
  return input
82
- .filter((e) => e != null)
83
- .map((entry) => {
105
+ .filter(function (e) { return e != null; })
106
+ .map(function (entry) {
84
107
  return entry;
85
108
  });
86
109
  };
87
- const serializeAws_json1_1GetEntitlementFilters = (input, context) => {
88
- return Object.entries(input).reduce((acc, [key, value]) => {
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];
89
114
  if (value === null) {
90
115
  return acc;
91
116
  }
92
- return {
93
- ...acc,
94
- [key]: serializeAws_json1_1FilterValueList(value, context),
95
- };
117
+ return __assign(__assign({}, acc), (_b = {}, _b[key] = serializeAws_json1_1FilterValueList(value, context), _b));
96
118
  }, {});
97
119
  };
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
- };
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 }));
105
122
  };
106
- const deserializeAws_json1_1Entitlement = (output, context) => {
123
+ var deserializeAws_json1_1Entitlement = function (output, context) {
107
124
  return {
108
125
  CustomerIdentifier: __expectString(output.CustomerIdentifier),
109
126
  Dimension: __expectString(output.Dimension),
@@ -114,10 +131,10 @@ const deserializeAws_json1_1Entitlement = (output, context) => {
114
131
  Value: output.Value != null ? deserializeAws_json1_1EntitlementValue(__expectUnion(output.Value), context) : undefined,
115
132
  };
116
133
  };
117
- const deserializeAws_json1_1EntitlementList = (output, context) => {
118
- const retVal = (output || [])
119
- .filter((e) => e != null)
120
- .map((entry) => {
134
+ var deserializeAws_json1_1EntitlementList = function (output, context) {
135
+ var retVal = (output || [])
136
+ .filter(function (e) { return e != null; })
137
+ .map(function (entry) {
121
138
  if (entry === null) {
122
139
  return null;
123
140
  }
@@ -125,7 +142,7 @@ const deserializeAws_json1_1EntitlementList = (output, context) => {
125
142
  });
126
143
  return retVal;
127
144
  };
128
- const deserializeAws_json1_1EntitlementValue = (output, context) => {
145
+ var deserializeAws_json1_1EntitlementValue = function (output, context) {
129
146
  if (__expectBoolean(output.BooleanValue) !== undefined) {
130
147
  return { BooleanValue: __expectBoolean(output.BooleanValue) };
131
148
  }
@@ -140,73 +157,96 @@ const deserializeAws_json1_1EntitlementValue = (output, context) => {
140
157
  }
141
158
  return { $unknown: Object.entries(output)[0] };
142
159
  };
143
- const deserializeAws_json1_1GetEntitlementsResult = (output, context) => {
160
+ var deserializeAws_json1_1GetEntitlementsResult = function (output, context) {
144
161
  return {
145
162
  Entitlements: output.Entitlements != null ? deserializeAws_json1_1EntitlementList(output.Entitlements, context) : undefined,
146
163
  NextToken: __expectString(output.NextToken),
147
164
  };
148
165
  };
149
- const deserializeAws_json1_1InternalServiceErrorException = (output, context) => {
166
+ var deserializeAws_json1_1InternalServiceErrorException = function (output, context) {
150
167
  return {
151
168
  message: __expectString(output.message),
152
169
  };
153
170
  };
154
- const deserializeAws_json1_1InvalidParameterException = (output, context) => {
171
+ var deserializeAws_json1_1InvalidParameterException = function (output, context) {
155
172
  return {
156
173
  message: __expectString(output.message),
157
174
  };
158
175
  };
159
- const deserializeAws_json1_1ThrottlingException = (output, context) => {
176
+ var deserializeAws_json1_1ThrottlingException = function (output, context) {
160
177
  return {
161
178
  message: __expectString(output.message),
162
179
  };
163
180
  };
164
- const deserializeMetadata = (output) => ({
165
- httpStatusCode: output.statusCode,
166
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-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) => {
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(); }
171
192
  if (streamBody instanceof Uint8Array) {
172
193
  return Promise.resolve(streamBody);
173
194
  }
174
195
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
175
196
  };
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);
197
+ var collectBodyString = function (streamBody, context) {
198
+ return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
194
199
  };
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;
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
+ });
205
232
  };
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;
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;
210
250
  if (typeof cleanValue === "number") {
211
251
  cleanValue = cleanValue.toString();
212
252
  }
@@ -221,7 +261,7 @@ const loadRestJsonErrorCode = (output, data) => {
221
261
  }
222
262
  return cleanValue;
223
263
  };
224
- const headerKey = findKey(output.headers, "x-amzn-errortype");
264
+ var headerKey = findKey(output.headers, "x-amzn-errortype");
225
265
  if (headerKey !== undefined) {
226
266
  return sanitizeErrorCode(output.headers[headerKey]);
227
267
  }
@@ -1,3 +1,4 @@
1
+ import { __assign, __awaiter, __generator } from "tslib";
1
2
  import packageInfo from "../package.json";
2
3
  import { Sha256 } from "@aws-crypto/sha256-browser";
3
4
  import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
@@ -11,30 +12,15 @@ import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
11
12
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
12
13
  import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
13
14
  import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
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
- };
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 });
40
26
  };
@@ -1,3 +1,4 @@
1
+ import { __assign, __awaiter, __generator } from "tslib";
1
2
  import packageInfo from "../package.json";
2
3
  import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
3
4
  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";
@@ -14,35 +15,16 @@ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shar
14
15
  import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
15
16
  import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
16
17
  import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
17
- export const getRuntimeConfig = (config) => {
18
+ export var getRuntimeConfig = function (config) {
19
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
18
20
  emitWarningIfUnsupportedVersion(process.version);
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
- };
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 });
48
30
  };
@@ -1,11 +1,8 @@
1
+ import { __assign } from "tslib";
1
2
  import { Sha256 } from "@aws-crypto/sha256-js";
2
3
  import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
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
- };
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 });
11
8
  };
@@ -1,10 +1,13 @@
1
1
  import { parseUrl } from "@aws-sdk/url-parser";
2
2
  import { defaultRegionInfoProvider } from "./endpoints";
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
- });
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
+ };
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.183.0",
4
+ "version": "3.186.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.183.0",
23
- "@aws-sdk/config-resolver": "3.183.0",
24
- "@aws-sdk/credential-provider-node": "3.183.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.183.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.183.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.186.0",
23
+ "@aws-sdk/config-resolver": "3.186.0",
24
+ "@aws-sdk/credential-provider-node": "3.186.0",
25
+ "@aws-sdk/fetch-http-handler": "3.186.0",
26
+ "@aws-sdk/hash-node": "3.186.0",
27
+ "@aws-sdk/invalid-dependency": "3.186.0",
28
+ "@aws-sdk/middleware-content-length": "3.186.0",
29
+ "@aws-sdk/middleware-host-header": "3.186.0",
30
+ "@aws-sdk/middleware-logger": "3.186.0",
31
+ "@aws-sdk/middleware-recursion-detection": "3.186.0",
32
+ "@aws-sdk/middleware-retry": "3.186.0",
33
+ "@aws-sdk/middleware-serde": "3.186.0",
34
+ "@aws-sdk/middleware-signing": "3.186.0",
35
+ "@aws-sdk/middleware-stack": "3.186.0",
36
+ "@aws-sdk/middleware-user-agent": "3.186.0",
37
+ "@aws-sdk/node-config-provider": "3.186.0",
38
+ "@aws-sdk/node-http-handler": "3.186.0",
39
+ "@aws-sdk/protocol-http": "3.186.0",
40
+ "@aws-sdk/smithy-client": "3.186.0",
41
+ "@aws-sdk/types": "3.186.0",
42
+ "@aws-sdk/url-parser": "3.186.0",
43
+ "@aws-sdk/util-base64-browser": "3.186.0",
44
+ "@aws-sdk/util-base64-node": "3.186.0",
45
+ "@aws-sdk/util-body-length-browser": "3.186.0",
46
+ "@aws-sdk/util-body-length-node": "3.186.0",
47
+ "@aws-sdk/util-defaults-mode-browser": "3.186.0",
48
+ "@aws-sdk/util-defaults-mode-node": "3.186.0",
49
+ "@aws-sdk/util-user-agent-browser": "3.186.0",
50
+ "@aws-sdk/util-user-agent-node": "3.186.0",
51
+ "@aws-sdk/util-utf8-browser": "3.186.0",
52
+ "@aws-sdk/util-utf8-node": "3.186.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.186.0",
57
57
  "@tsconfig/recommended": "1.0.1",
58
58
  "@types/node": "^12.7.5",
59
59
  "concurrently": "7.0.0",