@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 +16 -0
- package/dist-es/MarketplaceCommerceAnalytics.js +10 -17
- package/dist-es/MarketplaceCommerceAnalyticsClient.js +22 -28
- package/dist-es/commands/GenerateDataSetCommand.js +21 -28
- package/dist-es/commands/StartSupportDataExportCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/MarketplaceCommerceAnalyticsServiceException.js +5 -10
- package/dist-es/models/models_0.js +23 -16
- package/dist-es/protocols/Aws_json1_1.js +167 -214
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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(
|
|
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
|
-
|
|
25
|
-
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
10
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
14
11
|
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
logger
|
|
21
|
-
clientName
|
|
22
|
-
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
|
-
|
|
27
|
-
return stack.resolve(
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
28
|
+
}
|
|
29
|
+
deserialize(output, context) {
|
|
35
30
|
return deserializeAws_json1_1GenerateDataSetCommand(output, context);
|
|
36
|
-
}
|
|
37
|
-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
10
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
14
11
|
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
logger
|
|
21
|
-
clientName
|
|
22
|
-
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
|
-
|
|
27
|
-
return stack.resolve(
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
28
|
+
}
|
|
29
|
+
deserialize(output, context) {
|
|
35
30
|
return deserializeAws_json1_1StartSupportDataExportCommand(output, context);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
}($Command));
|
|
39
|
-
export { StartSupportDataExportCommand };
|
|
31
|
+
}
|
|
32
|
+
}
|
package/dist-es/endpoints.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import { getRegionInfo } from "@aws-sdk/config-resolver";
|
|
3
|
-
|
|
4
|
-
|
|
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
|
|
125
|
-
|
|
126
|
-
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
export
|
|
45
|
-
|
|
46
|
-
|
|
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
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
|
-
|
|
140
|
-
|
|
141
|
-
|
|
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
|
|
103
|
+
return {
|
|
104
|
+
...acc,
|
|
105
|
+
[key]: value,
|
|
106
|
+
};
|
|
147
107
|
}, {});
|
|
148
108
|
};
|
|
149
|
-
|
|
150
|
-
return
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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
|
-
|
|
157
|
-
return
|
|
158
|
-
|
|
159
|
-
|
|
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
|
-
|
|
137
|
+
const deserializeAws_json1_1GenerateDataSetResult = (output, context) => {
|
|
162
138
|
return {
|
|
163
139
|
dataSetRequestId: __expectString(output.dataSetRequestId),
|
|
164
140
|
};
|
|
165
141
|
};
|
|
166
|
-
|
|
142
|
+
const deserializeAws_json1_1MarketplaceCommerceAnalyticsException = (output, context) => {
|
|
167
143
|
return {
|
|
168
144
|
message: __expectString(output.message),
|
|
169
145
|
};
|
|
170
146
|
};
|
|
171
|
-
|
|
147
|
+
const deserializeAws_json1_1StartSupportDataExportResult = (output, context) => {
|
|
172
148
|
return {
|
|
173
149
|
dataSetRequestId: __expectString(output.dataSetRequestId),
|
|
174
150
|
};
|
|
175
151
|
};
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
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
|
-
|
|
193
|
-
|
|
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
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
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
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
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
|
-
|
|
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
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
};
|
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -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
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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.
|
|
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.
|
|
23
|
-
"@aws-sdk/config-resolver": "3.
|
|
24
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
25
|
-
"@aws-sdk/fetch-http-handler": "3.
|
|
26
|
-
"@aws-sdk/hash-node": "3.
|
|
27
|
-
"@aws-sdk/invalid-dependency": "3.
|
|
28
|
-
"@aws-sdk/middleware-content-length": "3.
|
|
29
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
30
|
-
"@aws-sdk/middleware-logger": "3.
|
|
31
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
32
|
-
"@aws-sdk/middleware-retry": "3.
|
|
33
|
-
"@aws-sdk/middleware-serde": "3.
|
|
34
|
-
"@aws-sdk/middleware-signing": "3.
|
|
35
|
-
"@aws-sdk/middleware-stack": "3.
|
|
36
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
37
|
-
"@aws-sdk/node-config-provider": "3.
|
|
38
|
-
"@aws-sdk/node-http-handler": "3.
|
|
39
|
-
"@aws-sdk/protocol-http": "3.
|
|
40
|
-
"@aws-sdk/smithy-client": "3.
|
|
41
|
-
"@aws-sdk/types": "3.
|
|
42
|
-
"@aws-sdk/url-parser": "3.
|
|
43
|
-
"@aws-sdk/util-base64-browser": "3.
|
|
44
|
-
"@aws-sdk/util-base64-node": "3.
|
|
45
|
-
"@aws-sdk/util-body-length-browser": "3.
|
|
46
|
-
"@aws-sdk/util-body-length-node": "3.
|
|
47
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
48
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
49
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
50
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
51
|
-
"@aws-sdk/util-utf8-browser": "3.
|
|
52
|
-
"@aws-sdk/util-utf8-node": "3.
|
|
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.
|
|
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",
|