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