@aws-sdk/client-forecastquery 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/Forecastquery.js +17 -10
- package/dist-es/ForecastqueryClient.js +28 -22
- package/dist-es/commands/QueryForecastCommand.js +28 -21
- package/dist-es/commands/QueryWhatIfForecastCommand.js +28 -21
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/ForecastqueryServiceException.js +10 -5
- package/dist-es/models/models_0.js +67 -78
- package/dist-es/protocols/Aws_json1_1.js +287 -229
- 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-forecastquery
|
|
@@ -260,10 +260,10 @@ const deserializeAws_json1_1TimeSeries = (output, context) => {
|
|
|
260
260
|
return retVal;
|
|
261
261
|
};
|
|
262
262
|
const deserializeMetadata = (output) => {
|
|
263
|
-
var _a;
|
|
263
|
+
var _a, _b;
|
|
264
264
|
return ({
|
|
265
265
|
httpStatusCode: output.statusCode,
|
|
266
|
-
requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"],
|
|
266
|
+
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"],
|
|
267
267
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
268
268
|
cfId: output.headers["x-amz-cf-id"],
|
|
269
269
|
});
|
package/dist-es/Forecastquery.js
CHANGED
|
@@ -1,33 +1,40 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
1
2
|
import { QueryForecastCommand, } from "./commands/QueryForecastCommand";
|
|
2
3
|
import { QueryWhatIfForecastCommand, } from "./commands/QueryWhatIfForecastCommand";
|
|
3
4
|
import { ForecastqueryClient } from "./ForecastqueryClient";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
var Forecastquery = (function (_super) {
|
|
6
|
+
__extends(Forecastquery, _super);
|
|
7
|
+
function Forecastquery() {
|
|
8
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
9
|
+
}
|
|
10
|
+
Forecastquery.prototype.queryForecast = function (args, optionsOrCb, cb) {
|
|
11
|
+
var command = new QueryForecastCommand(args);
|
|
7
12
|
if (typeof optionsOrCb === "function") {
|
|
8
13
|
this.send(command, optionsOrCb);
|
|
9
14
|
}
|
|
10
15
|
else if (typeof cb === "function") {
|
|
11
16
|
if (typeof optionsOrCb !== "object")
|
|
12
|
-
throw new Error(
|
|
17
|
+
throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
|
|
13
18
|
this.send(command, optionsOrCb || {}, cb);
|
|
14
19
|
}
|
|
15
20
|
else {
|
|
16
21
|
return this.send(command, optionsOrCb);
|
|
17
22
|
}
|
|
18
|
-
}
|
|
19
|
-
queryWhatIfForecast(args, optionsOrCb, cb) {
|
|
20
|
-
|
|
23
|
+
};
|
|
24
|
+
Forecastquery.prototype.queryWhatIfForecast = function (args, optionsOrCb, cb) {
|
|
25
|
+
var command = new QueryWhatIfForecastCommand(args);
|
|
21
26
|
if (typeof optionsOrCb === "function") {
|
|
22
27
|
this.send(command, optionsOrCb);
|
|
23
28
|
}
|
|
24
29
|
else if (typeof cb === "function") {
|
|
25
30
|
if (typeof optionsOrCb !== "object")
|
|
26
|
-
throw new Error(
|
|
31
|
+
throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
|
|
27
32
|
this.send(command, optionsOrCb || {}, cb);
|
|
28
33
|
}
|
|
29
34
|
else {
|
|
30
35
|
return this.send(command, optionsOrCb);
|
|
31
36
|
}
|
|
32
|
-
}
|
|
33
|
-
|
|
37
|
+
};
|
|
38
|
+
return Forecastquery;
|
|
39
|
+
}(ForecastqueryClient));
|
|
40
|
+
export { Forecastquery };
|
|
@@ -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 ForecastqueryClient = (function (_super) {
|
|
13
|
+
__extends(ForecastqueryClient, _super);
|
|
14
|
+
function ForecastqueryClient(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
|
+
ForecastqueryClient.prototype.destroy = function () {
|
|
35
|
+
_super.prototype.destroy.call(this);
|
|
36
|
+
};
|
|
37
|
+
return ForecastqueryClient;
|
|
38
|
+
}(__Client));
|
|
39
|
+
export { ForecastqueryClient };
|
|
@@ -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 { QueryForecastRequestFilterSensitiveLog, QueryForecastResponseFilterSensitiveLog, } from "../models/models_0";
|
|
4
5
|
import { deserializeAws_json1_1QueryForecastCommand, serializeAws_json1_1QueryForecastCommand, } from "../protocols/Aws_json1_1";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
var QueryForecastCommand = (function (_super) {
|
|
7
|
+
__extends(QueryForecastCommand, _super);
|
|
8
|
+
function QueryForecastCommand(input) {
|
|
9
|
+
var _this = _super.call(this) || this;
|
|
10
|
+
_this.input = input;
|
|
11
|
+
return _this;
|
|
9
12
|
}
|
|
10
|
-
resolveMiddleware(clientStack, configuration, options) {
|
|
13
|
+
QueryForecastCommand.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 = "ForecastqueryClient";
|
|
18
|
+
var commandName = "QueryForecastCommand";
|
|
19
|
+
var handlerExecutionContext = {
|
|
20
|
+
logger: logger,
|
|
21
|
+
clientName: clientName,
|
|
22
|
+
commandName: commandName,
|
|
20
23
|
inputFilterSensitiveLog: QueryForecastRequestFilterSensitiveLog,
|
|
21
24
|
outputFilterSensitiveLog: QueryForecastResponseFilterSensitiveLog,
|
|
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
|
+
QueryForecastCommand.prototype.serialize = function (input, context) {
|
|
27
32
|
return serializeAws_json1_1QueryForecastCommand(input, context);
|
|
28
|
-
}
|
|
29
|
-
deserialize(output, context) {
|
|
33
|
+
};
|
|
34
|
+
QueryForecastCommand.prototype.deserialize = function (output, context) {
|
|
30
35
|
return deserializeAws_json1_1QueryForecastCommand(output, context);
|
|
31
|
-
}
|
|
32
|
-
|
|
36
|
+
};
|
|
37
|
+
return QueryForecastCommand;
|
|
38
|
+
}($Command));
|
|
39
|
+
export { QueryForecastCommand };
|
|
@@ -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 { QueryWhatIfForecastRequestFilterSensitiveLog, QueryWhatIfForecastResponseFilterSensitiveLog, } from "../models/models_0";
|
|
4
5
|
import { deserializeAws_json1_1QueryWhatIfForecastCommand, serializeAws_json1_1QueryWhatIfForecastCommand, } from "../protocols/Aws_json1_1";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
var QueryWhatIfForecastCommand = (function (_super) {
|
|
7
|
+
__extends(QueryWhatIfForecastCommand, _super);
|
|
8
|
+
function QueryWhatIfForecastCommand(input) {
|
|
9
|
+
var _this = _super.call(this) || this;
|
|
10
|
+
_this.input = input;
|
|
11
|
+
return _this;
|
|
9
12
|
}
|
|
10
|
-
resolveMiddleware(clientStack, configuration, options) {
|
|
13
|
+
QueryWhatIfForecastCommand.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 = "ForecastqueryClient";
|
|
18
|
+
var commandName = "QueryWhatIfForecastCommand";
|
|
19
|
+
var handlerExecutionContext = {
|
|
20
|
+
logger: logger,
|
|
21
|
+
clientName: clientName,
|
|
22
|
+
commandName: commandName,
|
|
20
23
|
inputFilterSensitiveLog: QueryWhatIfForecastRequestFilterSensitiveLog,
|
|
21
24
|
outputFilterSensitiveLog: QueryWhatIfForecastResponseFilterSensitiveLog,
|
|
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
|
+
QueryWhatIfForecastCommand.prototype.serialize = function (input, context) {
|
|
27
32
|
return serializeAws_json1_1QueryWhatIfForecastCommand(input, context);
|
|
28
|
-
}
|
|
29
|
-
deserialize(output, context) {
|
|
33
|
+
};
|
|
34
|
+
QueryWhatIfForecastCommand.prototype.deserialize = function (output, context) {
|
|
30
35
|
return deserializeAws_json1_1QueryWhatIfForecastCommand(output, context);
|
|
31
|
-
}
|
|
32
|
-
|
|
36
|
+
};
|
|
37
|
+
return QueryWhatIfForecastCommand;
|
|
38
|
+
}($Command));
|
|
39
|
+
export { QueryWhatIfForecastCommand };
|
package/dist-es/endpoints.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { __assign, __awaiter, __generator } from "tslib";
|
|
1
2
|
import { getRegionInfo } from "@aws-sdk/config-resolver";
|
|
2
|
-
|
|
3
|
+
var regionHash = {
|
|
3
4
|
"us-east-1": {
|
|
4
5
|
variants: [
|
|
5
6
|
{
|
|
@@ -25,7 +26,7 @@ const regionHash = {
|
|
|
25
26
|
],
|
|
26
27
|
},
|
|
27
28
|
};
|
|
28
|
-
|
|
29
|
+
var partitionHash = {
|
|
29
30
|
aws: {
|
|
30
31
|
regions: [
|
|
31
32
|
"af-south-1",
|
|
@@ -148,9 +149,8 @@ const partitionHash = {
|
|
|
148
149
|
],
|
|
149
150
|
},
|
|
150
151
|
};
|
|
151
|
-
export
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
});
|
|
152
|
+
export var defaultRegionInfoProvider = function (region, options) { return __awaiter(void 0, void 0, void 0, function () {
|
|
153
|
+
return __generator(this, function (_a) {
|
|
154
|
+
return [2, getRegionInfo(region, __assign(__assign({}, options), { signingService: "forecast", regionHash: regionHash, partitionHash: partitionHash }))];
|
|
155
|
+
});
|
|
156
|
+
}); };
|
|
@@ -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 ForecastqueryServiceException = (function (_super) {
|
|
4
|
+
__extends(ForecastqueryServiceException, _super);
|
|
5
|
+
function ForecastqueryServiceException(options) {
|
|
6
|
+
var _this = _super.call(this, options) || this;
|
|
7
|
+
Object.setPrototypeOf(_this, ForecastqueryServiceException.prototype);
|
|
8
|
+
return _this;
|
|
6
9
|
}
|
|
7
|
-
|
|
10
|
+
return ForecastqueryServiceException;
|
|
11
|
+
}(__ServiceException));
|
|
12
|
+
export { ForecastqueryServiceException };
|
|
@@ -1,84 +1,73 @@
|
|
|
1
|
+
import { __assign, __extends } from "tslib";
|
|
1
2
|
import { ForecastqueryServiceException as __BaseException } from "./ForecastqueryServiceException";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Object.setPrototypeOf(this, InvalidInputException.prototype);
|
|
12
|
-
this.Message = opts.Message;
|
|
3
|
+
var InvalidInputException = (function (_super) {
|
|
4
|
+
__extends(InvalidInputException, _super);
|
|
5
|
+
function InvalidInputException(opts) {
|
|
6
|
+
var _this = _super.call(this, __assign({ name: "InvalidInputException", $fault: "client" }, opts)) || this;
|
|
7
|
+
_this.name = "InvalidInputException";
|
|
8
|
+
_this.$fault = "client";
|
|
9
|
+
Object.setPrototypeOf(_this, InvalidInputException.prototype);
|
|
10
|
+
_this.Message = opts.Message;
|
|
11
|
+
return _this;
|
|
13
12
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
return InvalidInputException;
|
|
14
|
+
}(__BaseException));
|
|
15
|
+
export { InvalidInputException };
|
|
16
|
+
var InvalidNextTokenException = (function (_super) {
|
|
17
|
+
__extends(InvalidNextTokenException, _super);
|
|
18
|
+
function InvalidNextTokenException(opts) {
|
|
19
|
+
var _this = _super.call(this, __assign({ name: "InvalidNextTokenException", $fault: "client" }, opts)) || this;
|
|
20
|
+
_this.name = "InvalidNextTokenException";
|
|
21
|
+
_this.$fault = "client";
|
|
22
|
+
Object.setPrototypeOf(_this, InvalidNextTokenException.prototype);
|
|
23
|
+
_this.Message = opts.Message;
|
|
24
|
+
return _this;
|
|
26
25
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
26
|
+
return InvalidNextTokenException;
|
|
27
|
+
}(__BaseException));
|
|
28
|
+
export { InvalidNextTokenException };
|
|
29
|
+
var LimitExceededException = (function (_super) {
|
|
30
|
+
__extends(LimitExceededException, _super);
|
|
31
|
+
function LimitExceededException(opts) {
|
|
32
|
+
var _this = _super.call(this, __assign({ name: "LimitExceededException", $fault: "client" }, opts)) || this;
|
|
33
|
+
_this.name = "LimitExceededException";
|
|
34
|
+
_this.$fault = "client";
|
|
35
|
+
Object.setPrototypeOf(_this, LimitExceededException.prototype);
|
|
36
|
+
_this.Message = opts.Message;
|
|
37
|
+
return _this;
|
|
39
38
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
39
|
+
return LimitExceededException;
|
|
40
|
+
}(__BaseException));
|
|
41
|
+
export { LimitExceededException };
|
|
42
|
+
var ResourceInUseException = (function (_super) {
|
|
43
|
+
__extends(ResourceInUseException, _super);
|
|
44
|
+
function ResourceInUseException(opts) {
|
|
45
|
+
var _this = _super.call(this, __assign({ name: "ResourceInUseException", $fault: "client" }, opts)) || this;
|
|
46
|
+
_this.name = "ResourceInUseException";
|
|
47
|
+
_this.$fault = "client";
|
|
48
|
+
Object.setPrototypeOf(_this, ResourceInUseException.prototype);
|
|
49
|
+
_this.Message = opts.Message;
|
|
50
|
+
return _this;
|
|
52
51
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
52
|
+
return ResourceInUseException;
|
|
53
|
+
}(__BaseException));
|
|
54
|
+
export { ResourceInUseException };
|
|
55
|
+
var ResourceNotFoundException = (function (_super) {
|
|
56
|
+
__extends(ResourceNotFoundException, _super);
|
|
57
|
+
function ResourceNotFoundException(opts) {
|
|
58
|
+
var _this = _super.call(this, __assign({ name: "ResourceNotFoundException", $fault: "client" }, opts)) || this;
|
|
59
|
+
_this.name = "ResourceNotFoundException";
|
|
60
|
+
_this.$fault = "client";
|
|
61
|
+
Object.setPrototypeOf(_this, ResourceNotFoundException.prototype);
|
|
62
|
+
_this.Message = opts.Message;
|
|
63
|
+
return _this;
|
|
65
64
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
});
|
|
70
|
-
export
|
|
71
|
-
|
|
72
|
-
});
|
|
73
|
-
export
|
|
74
|
-
|
|
75
|
-
});
|
|
76
|
-
export const QueryForecastResponseFilterSensitiveLog = (obj) => ({
|
|
77
|
-
...obj,
|
|
78
|
-
});
|
|
79
|
-
export const QueryWhatIfForecastRequestFilterSensitiveLog = (obj) => ({
|
|
80
|
-
...obj,
|
|
81
|
-
});
|
|
82
|
-
export const QueryWhatIfForecastResponseFilterSensitiveLog = (obj) => ({
|
|
83
|
-
...obj,
|
|
84
|
-
});
|
|
65
|
+
return ResourceNotFoundException;
|
|
66
|
+
}(__BaseException));
|
|
67
|
+
export { ResourceNotFoundException };
|
|
68
|
+
export var QueryForecastRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
69
|
+
export var DataPointFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
70
|
+
export var ForecastFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
71
|
+
export var QueryForecastResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
72
|
+
export var QueryWhatIfForecastRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
73
|
+
export var QueryWhatIfForecastResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -1,250 +1,285 @@
|
|
|
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, expectString as __expectString, limitedParseDouble as __limitedParseDouble, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
3
4
|
import { ForecastqueryServiceException as __BaseException } from "../models/ForecastqueryServiceException";
|
|
4
5
|
import { InvalidInputException, InvalidNextTokenException, LimitExceededException, ResourceInUseException, ResourceNotFoundException, } from "../models/models_0";
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export const serializeAws_json1_1QueryWhatIfForecastCommand = async (input, context) => {
|
|
15
|
-
const headers = {
|
|
16
|
-
"content-type": "application/x-amz-json-1.1",
|
|
17
|
-
"x-amz-target": "AmazonForecastRuntime.QueryWhatIfForecast",
|
|
18
|
-
};
|
|
19
|
-
let body;
|
|
20
|
-
body = JSON.stringify(serializeAws_json1_1QueryWhatIfForecastRequest(input, context));
|
|
21
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
22
|
-
};
|
|
23
|
-
export const deserializeAws_json1_1QueryForecastCommand = async (output, context) => {
|
|
24
|
-
if (output.statusCode >= 300) {
|
|
25
|
-
return deserializeAws_json1_1QueryForecastCommandError(output, context);
|
|
26
|
-
}
|
|
27
|
-
const data = await parseBody(output.body, context);
|
|
28
|
-
let contents = {};
|
|
29
|
-
contents = deserializeAws_json1_1QueryForecastResponse(data, context);
|
|
30
|
-
const response = {
|
|
31
|
-
$metadata: deserializeMetadata(output),
|
|
32
|
-
...contents,
|
|
33
|
-
};
|
|
34
|
-
return Promise.resolve(response);
|
|
35
|
-
};
|
|
36
|
-
const deserializeAws_json1_1QueryForecastCommandError = 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 "InvalidInputException":
|
|
44
|
-
case "com.amazonaws.forecastquery#InvalidInputException":
|
|
45
|
-
throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
|
|
46
|
-
case "InvalidNextTokenException":
|
|
47
|
-
case "com.amazonaws.forecastquery#InvalidNextTokenException":
|
|
48
|
-
throw await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context);
|
|
49
|
-
case "LimitExceededException":
|
|
50
|
-
case "com.amazonaws.forecastquery#LimitExceededException":
|
|
51
|
-
throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
|
|
52
|
-
case "ResourceInUseException":
|
|
53
|
-
case "com.amazonaws.forecastquery#ResourceInUseException":
|
|
54
|
-
throw await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context);
|
|
55
|
-
case "ResourceNotFoundException":
|
|
56
|
-
case "com.amazonaws.forecastquery#ResourceNotFoundException":
|
|
57
|
-
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
58
|
-
default:
|
|
59
|
-
const parsedBody = parsedOutput.body;
|
|
60
|
-
throwDefaultError({
|
|
61
|
-
output,
|
|
62
|
-
parsedBody,
|
|
63
|
-
exceptionCtor: __BaseException,
|
|
64
|
-
errorCode,
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
export const deserializeAws_json1_1QueryWhatIfForecastCommand = async (output, context) => {
|
|
69
|
-
if (output.statusCode >= 300) {
|
|
70
|
-
return deserializeAws_json1_1QueryWhatIfForecastCommandError(output, context);
|
|
71
|
-
}
|
|
72
|
-
const data = await parseBody(output.body, context);
|
|
73
|
-
let contents = {};
|
|
74
|
-
contents = deserializeAws_json1_1QueryWhatIfForecastResponse(data, context);
|
|
75
|
-
const response = {
|
|
76
|
-
$metadata: deserializeMetadata(output),
|
|
77
|
-
...contents,
|
|
78
|
-
};
|
|
79
|
-
return Promise.resolve(response);
|
|
80
|
-
};
|
|
81
|
-
const deserializeAws_json1_1QueryWhatIfForecastCommandError = async (output, context) => {
|
|
82
|
-
const parsedOutput = {
|
|
83
|
-
...output,
|
|
84
|
-
body: await parseErrorBody(output.body, context),
|
|
85
|
-
};
|
|
86
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
87
|
-
switch (errorCode) {
|
|
88
|
-
case "InvalidInputException":
|
|
89
|
-
case "com.amazonaws.forecastquery#InvalidInputException":
|
|
90
|
-
throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
|
|
91
|
-
case "InvalidNextTokenException":
|
|
92
|
-
case "com.amazonaws.forecastquery#InvalidNextTokenException":
|
|
93
|
-
throw await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context);
|
|
94
|
-
case "LimitExceededException":
|
|
95
|
-
case "com.amazonaws.forecastquery#LimitExceededException":
|
|
96
|
-
throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
|
|
97
|
-
case "ResourceInUseException":
|
|
98
|
-
case "com.amazonaws.forecastquery#ResourceInUseException":
|
|
99
|
-
throw await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context);
|
|
100
|
-
case "ResourceNotFoundException":
|
|
101
|
-
case "com.amazonaws.forecastquery#ResourceNotFoundException":
|
|
102
|
-
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
103
|
-
default:
|
|
104
|
-
const parsedBody = parsedOutput.body;
|
|
105
|
-
throwDefaultError({
|
|
106
|
-
output,
|
|
107
|
-
parsedBody,
|
|
108
|
-
exceptionCtor: __BaseException,
|
|
109
|
-
errorCode,
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
const deserializeAws_json1_1InvalidInputExceptionResponse = async (parsedOutput, context) => {
|
|
114
|
-
const body = parsedOutput.body;
|
|
115
|
-
const deserialized = deserializeAws_json1_1InvalidInputException(body, context);
|
|
116
|
-
const exception = new InvalidInputException({
|
|
117
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
118
|
-
...deserialized,
|
|
6
|
+
export var serializeAws_json1_1QueryForecastCommand = 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": "AmazonForecastRuntime.QueryForecast",
|
|
12
|
+
};
|
|
13
|
+
body = JSON.stringify(serializeAws_json1_1QueryForecastRequest(input, context));
|
|
14
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
119
15
|
});
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
16
|
+
}); };
|
|
17
|
+
export var serializeAws_json1_1QueryWhatIfForecastCommand = 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": "AmazonForecastRuntime.QueryWhatIfForecast",
|
|
23
|
+
};
|
|
24
|
+
body = JSON.stringify(serializeAws_json1_1QueryWhatIfForecastRequest(input, context));
|
|
25
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
128
26
|
});
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
27
|
+
}); };
|
|
28
|
+
export var deserializeAws_json1_1QueryForecastCommand = 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_1QueryForecastCommandError(output, context)];
|
|
35
|
+
}
|
|
36
|
+
return [4, parseBody(output.body, context)];
|
|
37
|
+
case 1:
|
|
38
|
+
data = _a.sent();
|
|
39
|
+
contents = {};
|
|
40
|
+
contents = deserializeAws_json1_1QueryForecastResponse(data, context);
|
|
41
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
42
|
+
return [2, Promise.resolve(response)];
|
|
43
|
+
}
|
|
137
44
|
});
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
45
|
+
}); };
|
|
46
|
+
var deserializeAws_json1_1QueryForecastCommandError = 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 "InvalidInputException": return [3, 2];
|
|
61
|
+
case "com.amazonaws.forecastquery#InvalidInputException": return [3, 2];
|
|
62
|
+
case "InvalidNextTokenException": return [3, 4];
|
|
63
|
+
case "com.amazonaws.forecastquery#InvalidNextTokenException": return [3, 4];
|
|
64
|
+
case "LimitExceededException": return [3, 6];
|
|
65
|
+
case "com.amazonaws.forecastquery#LimitExceededException": return [3, 6];
|
|
66
|
+
case "ResourceInUseException": return [3, 8];
|
|
67
|
+
case "com.amazonaws.forecastquery#ResourceInUseException": return [3, 8];
|
|
68
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
69
|
+
case "com.amazonaws.forecastquery#ResourceNotFoundException": return [3, 10];
|
|
70
|
+
}
|
|
71
|
+
return [3, 12];
|
|
72
|
+
case 2: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
|
|
73
|
+
case 3: throw _d.sent();
|
|
74
|
+
case 4: return [4, deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)];
|
|
75
|
+
case 5: throw _d.sent();
|
|
76
|
+
case 6: return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
77
|
+
case 7: throw _d.sent();
|
|
78
|
+
case 8: return [4, deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)];
|
|
79
|
+
case 9: throw _d.sent();
|
|
80
|
+
case 10: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
81
|
+
case 11: throw _d.sent();
|
|
82
|
+
case 12:
|
|
83
|
+
parsedBody = parsedOutput.body;
|
|
84
|
+
throwDefaultError({
|
|
85
|
+
output: output,
|
|
86
|
+
parsedBody: parsedBody,
|
|
87
|
+
exceptionCtor: __BaseException,
|
|
88
|
+
errorCode: errorCode,
|
|
89
|
+
});
|
|
90
|
+
_d.label = 13;
|
|
91
|
+
case 13: return [2];
|
|
92
|
+
}
|
|
146
93
|
});
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
94
|
+
}); };
|
|
95
|
+
export var deserializeAws_json1_1QueryWhatIfForecastCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
96
|
+
var data, contents, response;
|
|
97
|
+
return __generator(this, function (_a) {
|
|
98
|
+
switch (_a.label) {
|
|
99
|
+
case 0:
|
|
100
|
+
if (output.statusCode >= 300) {
|
|
101
|
+
return [2, deserializeAws_json1_1QueryWhatIfForecastCommandError(output, context)];
|
|
102
|
+
}
|
|
103
|
+
return [4, parseBody(output.body, context)];
|
|
104
|
+
case 1:
|
|
105
|
+
data = _a.sent();
|
|
106
|
+
contents = {};
|
|
107
|
+
contents = deserializeAws_json1_1QueryWhatIfForecastResponse(data, context);
|
|
108
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
109
|
+
return [2, Promise.resolve(response)];
|
|
110
|
+
}
|
|
155
111
|
});
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
112
|
+
}); };
|
|
113
|
+
var deserializeAws_json1_1QueryWhatIfForecastCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
114
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
115
|
+
var _c;
|
|
116
|
+
return __generator(this, function (_d) {
|
|
117
|
+
switch (_d.label) {
|
|
118
|
+
case 0:
|
|
119
|
+
_a = [__assign({}, output)];
|
|
120
|
+
_c = {};
|
|
121
|
+
return [4, parseErrorBody(output.body, context)];
|
|
122
|
+
case 1:
|
|
123
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
124
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
125
|
+
_b = errorCode;
|
|
126
|
+
switch (_b) {
|
|
127
|
+
case "InvalidInputException": return [3, 2];
|
|
128
|
+
case "com.amazonaws.forecastquery#InvalidInputException": return [3, 2];
|
|
129
|
+
case "InvalidNextTokenException": return [3, 4];
|
|
130
|
+
case "com.amazonaws.forecastquery#InvalidNextTokenException": return [3, 4];
|
|
131
|
+
case "LimitExceededException": return [3, 6];
|
|
132
|
+
case "com.amazonaws.forecastquery#LimitExceededException": return [3, 6];
|
|
133
|
+
case "ResourceInUseException": return [3, 8];
|
|
134
|
+
case "com.amazonaws.forecastquery#ResourceInUseException": return [3, 8];
|
|
135
|
+
case "ResourceNotFoundException": return [3, 10];
|
|
136
|
+
case "com.amazonaws.forecastquery#ResourceNotFoundException": return [3, 10];
|
|
137
|
+
}
|
|
138
|
+
return [3, 12];
|
|
139
|
+
case 2: return [4, deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)];
|
|
140
|
+
case 3: throw _d.sent();
|
|
141
|
+
case 4: return [4, deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)];
|
|
142
|
+
case 5: throw _d.sent();
|
|
143
|
+
case 6: return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
144
|
+
case 7: throw _d.sent();
|
|
145
|
+
case 8: return [4, deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)];
|
|
146
|
+
case 9: throw _d.sent();
|
|
147
|
+
case 10: return [4, deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
148
|
+
case 11: throw _d.sent();
|
|
149
|
+
case 12:
|
|
150
|
+
parsedBody = parsedOutput.body;
|
|
151
|
+
throwDefaultError({
|
|
152
|
+
output: output,
|
|
153
|
+
parsedBody: parsedBody,
|
|
154
|
+
exceptionCtor: __BaseException,
|
|
155
|
+
errorCode: errorCode,
|
|
156
|
+
});
|
|
157
|
+
_d.label = 13;
|
|
158
|
+
case 13: return [2];
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
}); };
|
|
162
|
+
var deserializeAws_json1_1InvalidInputExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
163
|
+
var body, deserialized, exception;
|
|
164
|
+
return __generator(this, function (_a) {
|
|
165
|
+
body = parsedOutput.body;
|
|
166
|
+
deserialized = deserializeAws_json1_1InvalidInputException(body, context);
|
|
167
|
+
exception = new InvalidInputException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
168
|
+
return [2, __decorateServiceException(exception, body)];
|
|
169
|
+
});
|
|
170
|
+
}); };
|
|
171
|
+
var deserializeAws_json1_1InvalidNextTokenExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
172
|
+
var body, deserialized, exception;
|
|
173
|
+
return __generator(this, function (_a) {
|
|
174
|
+
body = parsedOutput.body;
|
|
175
|
+
deserialized = deserializeAws_json1_1InvalidNextTokenException(body, context);
|
|
176
|
+
exception = new InvalidNextTokenException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
177
|
+
return [2, __decorateServiceException(exception, body)];
|
|
178
|
+
});
|
|
179
|
+
}); };
|
|
180
|
+
var deserializeAws_json1_1LimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
181
|
+
var body, deserialized, exception;
|
|
182
|
+
return __generator(this, function (_a) {
|
|
183
|
+
body = parsedOutput.body;
|
|
184
|
+
deserialized = deserializeAws_json1_1LimitExceededException(body, context);
|
|
185
|
+
exception = new LimitExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
186
|
+
return [2, __decorateServiceException(exception, body)];
|
|
187
|
+
});
|
|
188
|
+
}); };
|
|
189
|
+
var deserializeAws_json1_1ResourceInUseExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
190
|
+
var body, deserialized, exception;
|
|
191
|
+
return __generator(this, function (_a) {
|
|
192
|
+
body = parsedOutput.body;
|
|
193
|
+
deserialized = deserializeAws_json1_1ResourceInUseException(body, context);
|
|
194
|
+
exception = new ResourceInUseException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
195
|
+
return [2, __decorateServiceException(exception, body)];
|
|
196
|
+
});
|
|
197
|
+
}); };
|
|
198
|
+
var deserializeAws_json1_1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
199
|
+
var body, deserialized, exception;
|
|
200
|
+
return __generator(this, function (_a) {
|
|
201
|
+
body = parsedOutput.body;
|
|
202
|
+
deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
|
|
203
|
+
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
204
|
+
return [2, __decorateServiceException(exception, body)];
|
|
205
|
+
});
|
|
206
|
+
}); };
|
|
207
|
+
var serializeAws_json1_1Filters = function (input, context) {
|
|
208
|
+
return Object.entries(input).reduce(function (acc, _a) {
|
|
209
|
+
var _b;
|
|
210
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
160
211
|
if (value === null) {
|
|
161
212
|
return acc;
|
|
162
213
|
}
|
|
163
|
-
return {
|
|
164
|
-
...acc,
|
|
165
|
-
[key]: value,
|
|
166
|
-
};
|
|
214
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = value, _b));
|
|
167
215
|
}, {});
|
|
168
216
|
};
|
|
169
|
-
|
|
170
|
-
return {
|
|
171
|
-
...(input.EndDate != null && { EndDate: input.EndDate }),
|
|
172
|
-
...(input.Filters != null && { Filters: serializeAws_json1_1Filters(input.Filters, context) }),
|
|
173
|
-
...(input.ForecastArn != null && { ForecastArn: input.ForecastArn }),
|
|
174
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
175
|
-
...(input.StartDate != null && { StartDate: input.StartDate }),
|
|
176
|
-
};
|
|
217
|
+
var serializeAws_json1_1QueryForecastRequest = function (input, context) {
|
|
218
|
+
return __assign(__assign(__assign(__assign(__assign({}, (input.EndDate != null && { EndDate: input.EndDate })), (input.Filters != null && { Filters: serializeAws_json1_1Filters(input.Filters, context) })), (input.ForecastArn != null && { ForecastArn: input.ForecastArn })), (input.NextToken != null && { NextToken: input.NextToken })), (input.StartDate != null && { StartDate: input.StartDate }));
|
|
177
219
|
};
|
|
178
|
-
|
|
179
|
-
return {
|
|
180
|
-
...(input.EndDate != null && { EndDate: input.EndDate }),
|
|
181
|
-
...(input.Filters != null && { Filters: serializeAws_json1_1Filters(input.Filters, context) }),
|
|
182
|
-
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
183
|
-
...(input.StartDate != null && { StartDate: input.StartDate }),
|
|
184
|
-
...(input.WhatIfForecastArn != null && { WhatIfForecastArn: input.WhatIfForecastArn }),
|
|
185
|
-
};
|
|
220
|
+
var serializeAws_json1_1QueryWhatIfForecastRequest = function (input, context) {
|
|
221
|
+
return __assign(__assign(__assign(__assign(__assign({}, (input.EndDate != null && { EndDate: input.EndDate })), (input.Filters != null && { Filters: serializeAws_json1_1Filters(input.Filters, context) })), (input.NextToken != null && { NextToken: input.NextToken })), (input.StartDate != null && { StartDate: input.StartDate })), (input.WhatIfForecastArn != null && { WhatIfForecastArn: input.WhatIfForecastArn }));
|
|
186
222
|
};
|
|
187
|
-
|
|
223
|
+
var deserializeAws_json1_1DataPoint = function (output, context) {
|
|
188
224
|
return {
|
|
189
225
|
Timestamp: __expectString(output.Timestamp),
|
|
190
226
|
Value: __limitedParseDouble(output.Value),
|
|
191
227
|
};
|
|
192
228
|
};
|
|
193
|
-
|
|
229
|
+
var deserializeAws_json1_1Forecast = function (output, context) {
|
|
194
230
|
return {
|
|
195
231
|
Predictions: output.Predictions != null ? deserializeAws_json1_1Predictions(output.Predictions, context) : undefined,
|
|
196
232
|
};
|
|
197
233
|
};
|
|
198
|
-
|
|
234
|
+
var deserializeAws_json1_1InvalidInputException = function (output, context) {
|
|
199
235
|
return {
|
|
200
236
|
Message: __expectString(output.Message),
|
|
201
237
|
};
|
|
202
238
|
};
|
|
203
|
-
|
|
239
|
+
var deserializeAws_json1_1InvalidNextTokenException = function (output, context) {
|
|
204
240
|
return {
|
|
205
241
|
Message: __expectString(output.Message),
|
|
206
242
|
};
|
|
207
243
|
};
|
|
208
|
-
|
|
244
|
+
var deserializeAws_json1_1LimitExceededException = function (output, context) {
|
|
209
245
|
return {
|
|
210
246
|
Message: __expectString(output.Message),
|
|
211
247
|
};
|
|
212
248
|
};
|
|
213
|
-
|
|
214
|
-
return Object.entries(output).reduce((acc,
|
|
249
|
+
var deserializeAws_json1_1Predictions = function (output, context) {
|
|
250
|
+
return Object.entries(output).reduce(function (acc, _a) {
|
|
251
|
+
var _b;
|
|
252
|
+
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
215
253
|
if (value === null) {
|
|
216
254
|
return acc;
|
|
217
255
|
}
|
|
218
|
-
return {
|
|
219
|
-
...acc,
|
|
220
|
-
[key]: deserializeAws_json1_1TimeSeries(value, context),
|
|
221
|
-
};
|
|
256
|
+
return __assign(__assign({}, acc), (_b = {}, _b[key] = deserializeAws_json1_1TimeSeries(value, context), _b));
|
|
222
257
|
}, {});
|
|
223
258
|
};
|
|
224
|
-
|
|
259
|
+
var deserializeAws_json1_1QueryForecastResponse = function (output, context) {
|
|
225
260
|
return {
|
|
226
261
|
Forecast: output.Forecast != null ? deserializeAws_json1_1Forecast(output.Forecast, context) : undefined,
|
|
227
262
|
};
|
|
228
263
|
};
|
|
229
|
-
|
|
264
|
+
var deserializeAws_json1_1QueryWhatIfForecastResponse = function (output, context) {
|
|
230
265
|
return {
|
|
231
266
|
Forecast: output.Forecast != null ? deserializeAws_json1_1Forecast(output.Forecast, context) : undefined,
|
|
232
267
|
};
|
|
233
268
|
};
|
|
234
|
-
|
|
269
|
+
var deserializeAws_json1_1ResourceInUseException = function (output, context) {
|
|
235
270
|
return {
|
|
236
271
|
Message: __expectString(output.Message),
|
|
237
272
|
};
|
|
238
273
|
};
|
|
239
|
-
|
|
274
|
+
var deserializeAws_json1_1ResourceNotFoundException = function (output, context) {
|
|
240
275
|
return {
|
|
241
276
|
Message: __expectString(output.Message),
|
|
242
277
|
};
|
|
243
278
|
};
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
.filter((e)
|
|
247
|
-
.map((entry)
|
|
279
|
+
var deserializeAws_json1_1TimeSeries = function (output, context) {
|
|
280
|
+
var retVal = (output || [])
|
|
281
|
+
.filter(function (e) { return e != null; })
|
|
282
|
+
.map(function (entry) {
|
|
248
283
|
if (entry === null) {
|
|
249
284
|
return null;
|
|
250
285
|
}
|
|
@@ -252,52 +287,75 @@ const deserializeAws_json1_1TimeSeries = (output, context) => {
|
|
|
252
287
|
});
|
|
253
288
|
return retVal;
|
|
254
289
|
};
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
290
|
+
var deserializeMetadata = function (output) {
|
|
291
|
+
var _a, _b;
|
|
292
|
+
return ({
|
|
293
|
+
httpStatusCode: output.statusCode,
|
|
294
|
+
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"],
|
|
295
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
296
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
297
|
+
});
|
|
298
|
+
};
|
|
299
|
+
var collectBody = function (streamBody, context) {
|
|
300
|
+
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
262
301
|
if (streamBody instanceof Uint8Array) {
|
|
263
302
|
return Promise.resolve(streamBody);
|
|
264
303
|
}
|
|
265
304
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
266
305
|
};
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
270
|
-
const contents = {
|
|
271
|
-
protocol,
|
|
272
|
-
hostname,
|
|
273
|
-
port,
|
|
274
|
-
method: "POST",
|
|
275
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
276
|
-
headers,
|
|
277
|
-
};
|
|
278
|
-
if (resolvedHostname !== undefined) {
|
|
279
|
-
contents.hostname = resolvedHostname;
|
|
280
|
-
}
|
|
281
|
-
if (body !== undefined) {
|
|
282
|
-
contents.body = body;
|
|
283
|
-
}
|
|
284
|
-
return new __HttpRequest(contents);
|
|
306
|
+
var collectBodyString = function (streamBody, context) {
|
|
307
|
+
return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
|
|
285
308
|
};
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
309
|
+
var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, body) { return __awaiter(void 0, void 0, void 0, function () {
|
|
310
|
+
var _a, hostname, _b, protocol, port, basePath, contents;
|
|
311
|
+
return __generator(this, function (_c) {
|
|
312
|
+
switch (_c.label) {
|
|
313
|
+
case 0: return [4, context.endpoint()];
|
|
314
|
+
case 1:
|
|
315
|
+
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
316
|
+
contents = {
|
|
317
|
+
protocol: protocol,
|
|
318
|
+
hostname: hostname,
|
|
319
|
+
port: port,
|
|
320
|
+
method: "POST",
|
|
321
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
322
|
+
headers: headers,
|
|
323
|
+
};
|
|
324
|
+
if (resolvedHostname !== undefined) {
|
|
325
|
+
contents.hostname = resolvedHostname;
|
|
326
|
+
}
|
|
327
|
+
if (body !== undefined) {
|
|
328
|
+
contents.body = body;
|
|
329
|
+
}
|
|
330
|
+
return [2, new __HttpRequest(contents)];
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
}); };
|
|
334
|
+
var parseBody = function (streamBody, context) {
|
|
335
|
+
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
336
|
+
if (encoded.length) {
|
|
337
|
+
return JSON.parse(encoded);
|
|
338
|
+
}
|
|
339
|
+
return {};
|
|
340
|
+
});
|
|
296
341
|
};
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
342
|
+
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
343
|
+
var value;
|
|
344
|
+
var _a;
|
|
345
|
+
return __generator(this, function (_b) {
|
|
346
|
+
switch (_b.label) {
|
|
347
|
+
case 0: return [4, parseBody(errorBody, context)];
|
|
348
|
+
case 1:
|
|
349
|
+
value = _b.sent();
|
|
350
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
351
|
+
return [2, value];
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
}); };
|
|
355
|
+
var loadRestJsonErrorCode = function (output, data) {
|
|
356
|
+
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
357
|
+
var sanitizeErrorCode = function (rawValue) {
|
|
358
|
+
var cleanValue = rawValue;
|
|
301
359
|
if (typeof cleanValue === "number") {
|
|
302
360
|
cleanValue = cleanValue.toString();
|
|
303
361
|
}
|
|
@@ -312,7 +370,7 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
312
370
|
}
|
|
313
371
|
return cleanValue;
|
|
314
372
|
};
|
|
315
|
-
|
|
373
|
+
var headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
316
374
|
if (headerKey !== undefined) {
|
|
317
375
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
318
376
|
}
|
|
@@ -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: "2018-06-26",
|
|
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 : "forecastquery",
|
|
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-forecastquery",
|
|
3
3
|
"description": "AWS SDK for JavaScript Forecastquery 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",
|