@aws-sdk/client-marketplace-commerce-analytics 3.186.0 → 3.190.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.190.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.189.0...v3.190.0) (2022-10-17)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-marketplace-commerce-analytics
9
+
10
+
11
+
12
+
13
+
14
+ # [3.188.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.187.0...v3.188.0) (2022-10-13)
15
+
16
+ **Note:** Version bump only for package @aws-sdk/client-marketplace-commerce-analytics
17
+
18
+
19
+
20
+
21
+
6
22
  # [3.186.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.185.0...v3.186.0) (2022-10-06)
7
23
 
8
24
  **Note:** Version bump only for package @aws-sdk/client-marketplace-commerce-analytics
@@ -1,40 +1,33 @@
1
- import { __extends } from "tslib";
2
1
  import { GenerateDataSetCommand, } from "./commands/GenerateDataSetCommand";
3
2
  import { StartSupportDataExportCommand, } from "./commands/StartSupportDataExportCommand";
4
3
  import { MarketplaceCommerceAnalyticsClient } from "./MarketplaceCommerceAnalyticsClient";
5
- var MarketplaceCommerceAnalytics = (function (_super) {
6
- __extends(MarketplaceCommerceAnalytics, _super);
7
- function MarketplaceCommerceAnalytics() {
8
- return _super !== null && _super.apply(this, arguments) || this;
9
- }
10
- MarketplaceCommerceAnalytics.prototype.generateDataSet = function (args, optionsOrCb, cb) {
11
- var command = new GenerateDataSetCommand(args);
4
+ export class MarketplaceCommerceAnalytics extends MarketplaceCommerceAnalyticsClient {
5
+ generateDataSet(args, optionsOrCb, cb) {
6
+ const command = new GenerateDataSetCommand(args);
12
7
  if (typeof optionsOrCb === "function") {
13
8
  this.send(command, optionsOrCb);
14
9
  }
15
10
  else if (typeof cb === "function") {
16
11
  if (typeof optionsOrCb !== "object")
17
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
12
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
18
13
  this.send(command, optionsOrCb || {}, cb);
19
14
  }
20
15
  else {
21
16
  return this.send(command, optionsOrCb);
22
17
  }
23
- };
24
- MarketplaceCommerceAnalytics.prototype.startSupportDataExport = function (args, optionsOrCb, cb) {
25
- var command = new StartSupportDataExportCommand(args);
18
+ }
19
+ startSupportDataExport(args, optionsOrCb, cb) {
20
+ const command = new StartSupportDataExportCommand(args);
26
21
  if (typeof optionsOrCb === "function") {
27
22
  this.send(command, optionsOrCb);
28
23
  }
29
24
  else if (typeof cb === "function") {
30
25
  if (typeof optionsOrCb !== "object")
31
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
26
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
32
27
  this.send(command, optionsOrCb || {}, cb);
33
28
  }
34
29
  else {
35
30
  return this.send(command, optionsOrCb);
36
31
  }
37
- };
38
- return MarketplaceCommerceAnalytics;
39
- }(MarketplaceCommerceAnalyticsClient));
40
- export { MarketplaceCommerceAnalytics };
32
+ }
33
+ }
@@ -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 MarketplaceCommerceAnalyticsClient = (function (_super) {
13
- __extends(MarketplaceCommerceAnalyticsClient, _super);
14
- function MarketplaceCommerceAnalyticsClient(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 MarketplaceCommerceAnalyticsClient 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
- MarketplaceCommerceAnalyticsClient.prototype.destroy = function () {
35
- _super.prototype.destroy.call(this);
36
- };
37
- return MarketplaceCommerceAnalyticsClient;
38
- }(__Client));
39
- export { MarketplaceCommerceAnalyticsClient };
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 { GenerateDataSetRequestFilterSensitiveLog, GenerateDataSetResultFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_json1_1GenerateDataSetCommand, serializeAws_json1_1GenerateDataSetCommand, } from "../protocols/Aws_json1_1";
6
- var GenerateDataSetCommand = (function (_super) {
7
- __extends(GenerateDataSetCommand, _super);
8
- function GenerateDataSetCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class GenerateDataSetCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- GenerateDataSetCommand.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 = "MarketplaceCommerceAnalyticsClient";
18
- var commandName = "GenerateDataSetCommand";
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 = "MarketplaceCommerceAnalyticsClient";
15
+ const commandName = "GenerateDataSetCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: GenerateDataSetRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: GenerateDataSetResultFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- GenerateDataSetCommand.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_1GenerateDataSetCommand(input, context);
33
- };
34
- GenerateDataSetCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_json1_1GenerateDataSetCommand(output, context);
36
- };
37
- return GenerateDataSetCommand;
38
- }($Command));
39
- export { GenerateDataSetCommand };
31
+ }
32
+ }
@@ -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 { StartSupportDataExportRequestFilterSensitiveLog, StartSupportDataExportResultFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_json1_1StartSupportDataExportCommand, serializeAws_json1_1StartSupportDataExportCommand, } from "../protocols/Aws_json1_1";
6
- var StartSupportDataExportCommand = (function (_super) {
7
- __extends(StartSupportDataExportCommand, _super);
8
- function StartSupportDataExportCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class StartSupportDataExportCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- StartSupportDataExportCommand.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 = "MarketplaceCommerceAnalyticsClient";
18
- var commandName = "StartSupportDataExportCommand";
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 = "MarketplaceCommerceAnalyticsClient";
15
+ const commandName = "StartSupportDataExportCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: StartSupportDataExportRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: StartSupportDataExportResultFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- StartSupportDataExportCommand.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_1StartSupportDataExportCommand(input, context);
33
- };
34
- StartSupportDataExportCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_json1_1StartSupportDataExportCommand(output, context);
36
- };
37
- return StartSupportDataExportCommand;
38
- }($Command));
39
- export { StartSupportDataExportCommand };
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: "marketplacecommerceanalytics", regionHash: regionHash, partitionHash: partitionHash }))];
127
- });
128
- }); };
123
+ export const defaultRegionInfoProvider = async (region, options) => getRegionInfo(region, {
124
+ ...options,
125
+ signingService: "marketplacecommerceanalytics",
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 MarketplaceCommerceAnalyticsServiceException = (function (_super) {
4
- __extends(MarketplaceCommerceAnalyticsServiceException, _super);
5
- function MarketplaceCommerceAnalyticsServiceException(options) {
6
- var _this = _super.call(this, options) || this;
7
- Object.setPrototypeOf(_this, MarketplaceCommerceAnalyticsServiceException.prototype);
8
- return _this;
2
+ export class MarketplaceCommerceAnalyticsServiceException extends __ServiceException {
3
+ constructor(options) {
4
+ super(options);
5
+ Object.setPrototypeOf(this, MarketplaceCommerceAnalyticsServiceException.prototype);
9
6
  }
10
- return MarketplaceCommerceAnalyticsServiceException;
11
- }(__ServiceException));
12
- export { MarketplaceCommerceAnalyticsServiceException };
7
+ }
@@ -1,4 +1,3 @@
1
- import { __assign, __extends } from "tslib";
2
1
  import { MarketplaceCommerceAnalyticsServiceException as __BaseException } from "./MarketplaceCommerceAnalyticsServiceException";
3
2
  export var DataSetType;
4
3
  (function (DataSetType) {
@@ -28,19 +27,27 @@ export var DataSetType;
28
27
  DataSetType["SALES_COMPENSATION_BILLED_REVENUE"] = "sales_compensation_billed_revenue";
29
28
  DataSetType["US_SALES_AND_USE_TAX_RECORDS"] = "us_sales_and_use_tax_records";
30
29
  })(DataSetType || (DataSetType = {}));
31
- var MarketplaceCommerceAnalyticsException = (function (_super) {
32
- __extends(MarketplaceCommerceAnalyticsException, _super);
33
- function MarketplaceCommerceAnalyticsException(opts) {
34
- var _this = _super.call(this, __assign({ name: "MarketplaceCommerceAnalyticsException", $fault: "server" }, opts)) || this;
35
- _this.name = "MarketplaceCommerceAnalyticsException";
36
- _this.$fault = "server";
37
- Object.setPrototypeOf(_this, MarketplaceCommerceAnalyticsException.prototype);
38
- return _this;
30
+ export class MarketplaceCommerceAnalyticsException extends __BaseException {
31
+ constructor(opts) {
32
+ super({
33
+ name: "MarketplaceCommerceAnalyticsException",
34
+ $fault: "server",
35
+ ...opts,
36
+ });
37
+ this.name = "MarketplaceCommerceAnalyticsException";
38
+ this.$fault = "server";
39
+ Object.setPrototypeOf(this, MarketplaceCommerceAnalyticsException.prototype);
39
40
  }
40
- return MarketplaceCommerceAnalyticsException;
41
- }(__BaseException));
42
- export { MarketplaceCommerceAnalyticsException };
43
- export var GenerateDataSetRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
44
- export var GenerateDataSetResultFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
45
- export var StartSupportDataExportRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
46
- export var StartSupportDataExportResultFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
41
+ }
42
+ export const GenerateDataSetRequestFilterSensitiveLog = (obj) => ({
43
+ ...obj,
44
+ });
45
+ export const GenerateDataSetResultFilterSensitiveLog = (obj) => ({
46
+ ...obj,
47
+ });
48
+ export const StartSupportDataExportRequestFilterSensitiveLog = (obj) => ({
49
+ ...obj,
50
+ });
51
+ export const StartSupportDataExportResultFilterSensitiveLog = (obj) => ({
52
+ ...obj,
53
+ });
@@ -1,247 +1,200 @@
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, expectString as __expectString, throwDefaultError, } from "@aws-sdk/smithy-client";
4
3
  import { MarketplaceCommerceAnalyticsServiceException as __BaseException } from "../models/MarketplaceCommerceAnalyticsServiceException";
5
4
  import { MarketplaceCommerceAnalyticsException, } from "../models/models_0";
6
- export var serializeAws_json1_1GenerateDataSetCommand = 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": "MarketplaceCommerceAnalytics20150701.GenerateDataSet",
12
- };
13
- body = JSON.stringify(serializeAws_json1_1GenerateDataSetRequest(input, context));
14
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
15
- });
16
- }); };
17
- export var serializeAws_json1_1StartSupportDataExportCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
18
- var headers, body;
19
- return __generator(this, function (_a) {
20
- headers = {
21
- "content-type": "application/x-amz-json-1.1",
22
- "x-amz-target": "MarketplaceCommerceAnalytics20150701.StartSupportDataExport",
23
- };
24
- body = JSON.stringify(serializeAws_json1_1StartSupportDataExportRequest(input, context));
25
- return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
26
- });
27
- }); };
28
- export var deserializeAws_json1_1GenerateDataSetCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
29
- var data, contents, response;
30
- return __generator(this, function (_a) {
31
- switch (_a.label) {
32
- case 0:
33
- if (output.statusCode >= 300) {
34
- return [2, deserializeAws_json1_1GenerateDataSetCommandError(output, context)];
35
- }
36
- return [4, parseBody(output.body, context)];
37
- case 1:
38
- data = _a.sent();
39
- contents = {};
40
- contents = deserializeAws_json1_1GenerateDataSetResult(data, context);
41
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
42
- return [2, Promise.resolve(response)];
43
- }
44
- });
45
- }); };
46
- var deserializeAws_json1_1GenerateDataSetCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
47
- var parsedOutput, _a, errorCode, _b, parsedBody;
48
- var _c;
49
- return __generator(this, function (_d) {
50
- switch (_d.label) {
51
- case 0:
52
- _a = [__assign({}, output)];
53
- _c = {};
54
- return [4, parseErrorBody(output.body, context)];
55
- case 1:
56
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
57
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
58
- _b = errorCode;
59
- switch (_b) {
60
- case "MarketplaceCommerceAnalyticsException": return [3, 2];
61
- case "com.amazonaws.marketplacecommerceanalytics#MarketplaceCommerceAnalyticsException": return [3, 2];
62
- }
63
- return [3, 4];
64
- case 2: return [4, deserializeAws_json1_1MarketplaceCommerceAnalyticsExceptionResponse(parsedOutput, context)];
65
- case 3: throw _d.sent();
66
- case 4:
67
- parsedBody = parsedOutput.body;
68
- throwDefaultError({
69
- output: output,
70
- parsedBody: parsedBody,
71
- exceptionCtor: __BaseException,
72
- errorCode: errorCode,
73
- });
74
- _d.label = 5;
75
- case 5: return [2];
76
- }
77
- });
78
- }); };
79
- export var deserializeAws_json1_1StartSupportDataExportCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
80
- var data, contents, response;
81
- return __generator(this, function (_a) {
82
- switch (_a.label) {
83
- case 0:
84
- if (output.statusCode >= 300) {
85
- return [2, deserializeAws_json1_1StartSupportDataExportCommandError(output, context)];
86
- }
87
- return [4, parseBody(output.body, context)];
88
- case 1:
89
- data = _a.sent();
90
- contents = {};
91
- contents = deserializeAws_json1_1StartSupportDataExportResult(data, context);
92
- response = __assign({ $metadata: deserializeMetadata(output) }, contents);
93
- return [2, Promise.resolve(response)];
94
- }
95
- });
96
- }); };
97
- var deserializeAws_json1_1StartSupportDataExportCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
98
- var parsedOutput, _a, errorCode, _b, parsedBody;
99
- var _c;
100
- return __generator(this, function (_d) {
101
- switch (_d.label) {
102
- case 0:
103
- _a = [__assign({}, output)];
104
- _c = {};
105
- return [4, parseErrorBody(output.body, context)];
106
- case 1:
107
- parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
108
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
109
- _b = errorCode;
110
- switch (_b) {
111
- case "MarketplaceCommerceAnalyticsException": return [3, 2];
112
- case "com.amazonaws.marketplacecommerceanalytics#MarketplaceCommerceAnalyticsException": return [3, 2];
113
- }
114
- return [3, 4];
115
- case 2: return [4, deserializeAws_json1_1MarketplaceCommerceAnalyticsExceptionResponse(parsedOutput, context)];
116
- case 3: throw _d.sent();
117
- case 4:
118
- parsedBody = parsedOutput.body;
119
- throwDefaultError({
120
- output: output,
121
- parsedBody: parsedBody,
122
- exceptionCtor: __BaseException,
123
- errorCode: errorCode,
124
- });
125
- _d.label = 5;
126
- case 5: return [2];
127
- }
128
- });
129
- }); };
130
- var deserializeAws_json1_1MarketplaceCommerceAnalyticsExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
131
- var body, deserialized, exception;
132
- return __generator(this, function (_a) {
133
- body = parsedOutput.body;
134
- deserialized = deserializeAws_json1_1MarketplaceCommerceAnalyticsException(body, context);
135
- exception = new MarketplaceCommerceAnalyticsException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
136
- return [2, __decorateServiceException(exception, body)];
5
+ export const serializeAws_json1_1GenerateDataSetCommand = async (input, context) => {
6
+ const headers = {
7
+ "content-type": "application/x-amz-json-1.1",
8
+ "x-amz-target": "MarketplaceCommerceAnalytics20150701.GenerateDataSet",
9
+ };
10
+ let body;
11
+ body = JSON.stringify(serializeAws_json1_1GenerateDataSetRequest(input, context));
12
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
+ };
14
+ export const serializeAws_json1_1StartSupportDataExportCommand = async (input, context) => {
15
+ const headers = {
16
+ "content-type": "application/x-amz-json-1.1",
17
+ "x-amz-target": "MarketplaceCommerceAnalytics20150701.StartSupportDataExport",
18
+ };
19
+ let body;
20
+ body = JSON.stringify(serializeAws_json1_1StartSupportDataExportRequest(input, context));
21
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
+ };
23
+ export const deserializeAws_json1_1GenerateDataSetCommand = async (output, context) => {
24
+ if (output.statusCode >= 300) {
25
+ return deserializeAws_json1_1GenerateDataSetCommandError(output, context);
26
+ }
27
+ const data = await parseBody(output.body, context);
28
+ let contents = {};
29
+ contents = deserializeAws_json1_1GenerateDataSetResult(data, context);
30
+ const response = {
31
+ $metadata: deserializeMetadata(output),
32
+ ...contents,
33
+ };
34
+ return Promise.resolve(response);
35
+ };
36
+ const deserializeAws_json1_1GenerateDataSetCommandError = async (output, context) => {
37
+ const parsedOutput = {
38
+ ...output,
39
+ body: await parseErrorBody(output.body, context),
40
+ };
41
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
42
+ switch (errorCode) {
43
+ case "MarketplaceCommerceAnalyticsException":
44
+ case "com.amazonaws.marketplacecommerceanalytics#MarketplaceCommerceAnalyticsException":
45
+ throw await deserializeAws_json1_1MarketplaceCommerceAnalyticsExceptionResponse(parsedOutput, context);
46
+ default:
47
+ const parsedBody = parsedOutput.body;
48
+ throwDefaultError({
49
+ output,
50
+ parsedBody,
51
+ exceptionCtor: __BaseException,
52
+ errorCode,
53
+ });
54
+ }
55
+ };
56
+ export const deserializeAws_json1_1StartSupportDataExportCommand = async (output, context) => {
57
+ if (output.statusCode >= 300) {
58
+ return deserializeAws_json1_1StartSupportDataExportCommandError(output, context);
59
+ }
60
+ const data = await parseBody(output.body, context);
61
+ let contents = {};
62
+ contents = deserializeAws_json1_1StartSupportDataExportResult(data, context);
63
+ const response = {
64
+ $metadata: deserializeMetadata(output),
65
+ ...contents,
66
+ };
67
+ return Promise.resolve(response);
68
+ };
69
+ const deserializeAws_json1_1StartSupportDataExportCommandError = async (output, context) => {
70
+ const parsedOutput = {
71
+ ...output,
72
+ body: await parseErrorBody(output.body, context),
73
+ };
74
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
75
+ switch (errorCode) {
76
+ case "MarketplaceCommerceAnalyticsException":
77
+ case "com.amazonaws.marketplacecommerceanalytics#MarketplaceCommerceAnalyticsException":
78
+ throw await deserializeAws_json1_1MarketplaceCommerceAnalyticsExceptionResponse(parsedOutput, context);
79
+ default:
80
+ const parsedBody = parsedOutput.body;
81
+ throwDefaultError({
82
+ output,
83
+ parsedBody,
84
+ exceptionCtor: __BaseException,
85
+ errorCode,
86
+ });
87
+ }
88
+ };
89
+ const deserializeAws_json1_1MarketplaceCommerceAnalyticsExceptionResponse = async (parsedOutput, context) => {
90
+ const body = parsedOutput.body;
91
+ const deserialized = deserializeAws_json1_1MarketplaceCommerceAnalyticsException(body, context);
92
+ const exception = new MarketplaceCommerceAnalyticsException({
93
+ $metadata: deserializeMetadata(parsedOutput),
94
+ ...deserialized,
137
95
  });
138
- }); };
139
- var serializeAws_json1_1CustomerDefinedValues = function (input, context) {
140
- return Object.entries(input).reduce(function (acc, _a) {
141
- var _b;
142
- var _c = __read(_a, 2), key = _c[0], value = _c[1];
96
+ return __decorateServiceException(exception, body);
97
+ };
98
+ const serializeAws_json1_1CustomerDefinedValues = (input, context) => {
99
+ return Object.entries(input).reduce((acc, [key, value]) => {
143
100
  if (value === null) {
144
101
  return acc;
145
102
  }
146
- return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
103
+ return {
104
+ ...acc,
105
+ [key]: value,
106
+ };
147
107
  }, {});
148
108
  };
149
- var serializeAws_json1_1GenerateDataSetRequest = function (input, context) {
150
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.customerDefinedValues != null && {
151
- customerDefinedValues: serializeAws_json1_1CustomerDefinedValues(input.customerDefinedValues, context),
152
- })), (input.dataSetPublicationDate != null && {
153
- dataSetPublicationDate: Math.round(input.dataSetPublicationDate.getTime() / 1000),
154
- })), (input.dataSetType != null && { dataSetType: input.dataSetType })), (input.destinationS3BucketName != null && { destinationS3BucketName: input.destinationS3BucketName })), (input.destinationS3Prefix != null && { destinationS3Prefix: input.destinationS3Prefix })), (input.roleNameArn != null && { roleNameArn: input.roleNameArn })), (input.snsTopicArn != null && { snsTopicArn: input.snsTopicArn }));
109
+ const serializeAws_json1_1GenerateDataSetRequest = (input, context) => {
110
+ return {
111
+ ...(input.customerDefinedValues != null && {
112
+ customerDefinedValues: serializeAws_json1_1CustomerDefinedValues(input.customerDefinedValues, context),
113
+ }),
114
+ ...(input.dataSetPublicationDate != null && {
115
+ dataSetPublicationDate: Math.round(input.dataSetPublicationDate.getTime() / 1000),
116
+ }),
117
+ ...(input.dataSetType != null && { dataSetType: input.dataSetType }),
118
+ ...(input.destinationS3BucketName != null && { destinationS3BucketName: input.destinationS3BucketName }),
119
+ ...(input.destinationS3Prefix != null && { destinationS3Prefix: input.destinationS3Prefix }),
120
+ ...(input.roleNameArn != null && { roleNameArn: input.roleNameArn }),
121
+ ...(input.snsTopicArn != null && { snsTopicArn: input.snsTopicArn }),
122
+ };
155
123
  };
156
- var serializeAws_json1_1StartSupportDataExportRequest = function (input, context) {
157
- return __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.customerDefinedValues != null && {
158
- customerDefinedValues: serializeAws_json1_1CustomerDefinedValues(input.customerDefinedValues, context),
159
- })), (input.dataSetType != null && { dataSetType: input.dataSetType })), (input.destinationS3BucketName != null && { destinationS3BucketName: input.destinationS3BucketName })), (input.destinationS3Prefix != null && { destinationS3Prefix: input.destinationS3Prefix })), (input.fromDate != null && { fromDate: Math.round(input.fromDate.getTime() / 1000) })), (input.roleNameArn != null && { roleNameArn: input.roleNameArn })), (input.snsTopicArn != null && { snsTopicArn: input.snsTopicArn }));
124
+ const serializeAws_json1_1StartSupportDataExportRequest = (input, context) => {
125
+ return {
126
+ ...(input.customerDefinedValues != null && {
127
+ customerDefinedValues: serializeAws_json1_1CustomerDefinedValues(input.customerDefinedValues, context),
128
+ }),
129
+ ...(input.dataSetType != null && { dataSetType: input.dataSetType }),
130
+ ...(input.destinationS3BucketName != null && { destinationS3BucketName: input.destinationS3BucketName }),
131
+ ...(input.destinationS3Prefix != null && { destinationS3Prefix: input.destinationS3Prefix }),
132
+ ...(input.fromDate != null && { fromDate: Math.round(input.fromDate.getTime() / 1000) }),
133
+ ...(input.roleNameArn != null && { roleNameArn: input.roleNameArn }),
134
+ ...(input.snsTopicArn != null && { snsTopicArn: input.snsTopicArn }),
135
+ };
160
136
  };
161
- var deserializeAws_json1_1GenerateDataSetResult = function (output, context) {
137
+ const deserializeAws_json1_1GenerateDataSetResult = (output, context) => {
162
138
  return {
163
139
  dataSetRequestId: __expectString(output.dataSetRequestId),
164
140
  };
165
141
  };
166
- var deserializeAws_json1_1MarketplaceCommerceAnalyticsException = function (output, context) {
142
+ const deserializeAws_json1_1MarketplaceCommerceAnalyticsException = (output, context) => {
167
143
  return {
168
144
  message: __expectString(output.message),
169
145
  };
170
146
  };
171
- var deserializeAws_json1_1StartSupportDataExportResult = function (output, context) {
147
+ const deserializeAws_json1_1StartSupportDataExportResult = (output, context) => {
172
148
  return {
173
149
  dataSetRequestId: __expectString(output.dataSetRequestId),
174
150
  };
175
151
  };
176
- var deserializeMetadata = function (output) {
177
- var _a, _b;
178
- return ({
179
- httpStatusCode: output.statusCode,
180
- 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"],
181
- extendedRequestId: output.headers["x-amz-id-2"],
182
- cfId: output.headers["x-amz-cf-id"],
183
- });
184
- };
185
- var collectBody = function (streamBody, context) {
186
- if (streamBody === void 0) { streamBody = new Uint8Array(); }
152
+ const deserializeMetadata = (output) => ({
153
+ httpStatusCode: output.statusCode,
154
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
155
+ extendedRequestId: output.headers["x-amz-id-2"],
156
+ cfId: output.headers["x-amz-cf-id"],
157
+ });
158
+ const collectBody = (streamBody = new Uint8Array(), context) => {
187
159
  if (streamBody instanceof Uint8Array) {
188
160
  return Promise.resolve(streamBody);
189
161
  }
190
162
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
191
163
  };
192
- var collectBodyString = function (streamBody, context) {
193
- return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
164
+ const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
165
+ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
166
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
167
+ const contents = {
168
+ protocol,
169
+ hostname,
170
+ port,
171
+ method: "POST",
172
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
173
+ headers,
174
+ };
175
+ if (resolvedHostname !== undefined) {
176
+ contents.hostname = resolvedHostname;
177
+ }
178
+ if (body !== undefined) {
179
+ contents.body = body;
180
+ }
181
+ return new __HttpRequest(contents);
194
182
  };
195
- var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, body) { return __awaiter(void 0, void 0, void 0, function () {
196
- var _a, hostname, _b, protocol, port, basePath, contents;
197
- return __generator(this, function (_c) {
198
- switch (_c.label) {
199
- case 0: return [4, context.endpoint()];
200
- case 1:
201
- _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
202
- contents = {
203
- protocol: protocol,
204
- hostname: hostname,
205
- port: port,
206
- method: "POST",
207
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
208
- headers: headers,
209
- };
210
- if (resolvedHostname !== undefined) {
211
- contents.hostname = resolvedHostname;
212
- }
213
- if (body !== undefined) {
214
- contents.body = body;
215
- }
216
- return [2, new __HttpRequest(contents)];
217
- }
218
- });
219
- }); };
220
- var parseBody = function (streamBody, context) {
221
- return collectBodyString(streamBody, context).then(function (encoded) {
222
- if (encoded.length) {
223
- return JSON.parse(encoded);
224
- }
225
- return {};
226
- });
183
+ const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
184
+ if (encoded.length) {
185
+ return JSON.parse(encoded);
186
+ }
187
+ return {};
188
+ });
189
+ const parseErrorBody = async (errorBody, context) => {
190
+ const value = await parseBody(errorBody, context);
191
+ value.message = value.message ?? value.Message;
192
+ return value;
227
193
  };
228
- var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
229
- var value;
230
- var _a;
231
- return __generator(this, function (_b) {
232
- switch (_b.label) {
233
- case 0: return [4, parseBody(errorBody, context)];
234
- case 1:
235
- value = _b.sent();
236
- value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
237
- return [2, value];
238
- }
239
- });
240
- }); };
241
- var loadRestJsonErrorCode = function (output, data) {
242
- var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
243
- var sanitizeErrorCode = function (rawValue) {
244
- var cleanValue = rawValue;
194
+ const loadRestJsonErrorCode = (output, data) => {
195
+ const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
196
+ const sanitizeErrorCode = (rawValue) => {
197
+ let cleanValue = rawValue;
245
198
  if (typeof cleanValue === "number") {
246
199
  cleanValue = cleanValue.toString();
247
200
  }
@@ -256,7 +209,7 @@ var loadRestJsonErrorCode = function (output, data) {
256
209
  }
257
210
  return cleanValue;
258
211
  };
259
- var headerKey = findKey(output.headers, "x-amzn-errortype");
212
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
260
213
  if (headerKey !== undefined) {
261
214
  return sanitizeErrorCode(output.headers[headerKey]);
262
215
  }
@@ -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: "2015-07-01",
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 Commerce Analytics",
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: "2015-07-01",
5
+ disableHostPrefix: config?.disableHostPrefix ?? false,
6
+ logger: config?.logger ?? {},
7
+ regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider,
8
+ serviceId: config?.serviceId ?? "Marketplace Commerce Analytics",
9
+ urlParser: config?.urlParser ?? parseUrl,
10
+ });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-marketplace-commerce-analytics",
3
3
  "description": "AWS SDK for JavaScript Marketplace Commerce Analytics Client for Node.js, Browser and React Native",
4
- "version": "3.186.0",
4
+ "version": "3.190.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.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",
22
+ "@aws-sdk/client-sts": "3.190.0",
23
+ "@aws-sdk/config-resolver": "3.190.0",
24
+ "@aws-sdk/credential-provider-node": "3.190.0",
25
+ "@aws-sdk/fetch-http-handler": "3.190.0",
26
+ "@aws-sdk/hash-node": "3.190.0",
27
+ "@aws-sdk/invalid-dependency": "3.190.0",
28
+ "@aws-sdk/middleware-content-length": "3.190.0",
29
+ "@aws-sdk/middleware-host-header": "3.190.0",
30
+ "@aws-sdk/middleware-logger": "3.190.0",
31
+ "@aws-sdk/middleware-recursion-detection": "3.190.0",
32
+ "@aws-sdk/middleware-retry": "3.190.0",
33
+ "@aws-sdk/middleware-serde": "3.190.0",
34
+ "@aws-sdk/middleware-signing": "3.190.0",
35
+ "@aws-sdk/middleware-stack": "3.190.0",
36
+ "@aws-sdk/middleware-user-agent": "3.190.0",
37
+ "@aws-sdk/node-config-provider": "3.190.0",
38
+ "@aws-sdk/node-http-handler": "3.190.0",
39
+ "@aws-sdk/protocol-http": "3.190.0",
40
+ "@aws-sdk/smithy-client": "3.190.0",
41
+ "@aws-sdk/types": "3.190.0",
42
+ "@aws-sdk/url-parser": "3.190.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.190.0",
48
+ "@aws-sdk/util-defaults-mode-node": "3.190.0",
49
+ "@aws-sdk/util-user-agent-browser": "3.190.0",
50
+ "@aws-sdk/util-user-agent-node": "3.190.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.186.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",