@aws-sdk/client-forecastquery 3.310.0 → 3.312.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.
|
@@ -6,20 +6,14 @@ const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
|
6
6
|
const ForecastqueryServiceException_1 = require("../models/ForecastqueryServiceException");
|
|
7
7
|
const models_0_1 = require("../models/models_0");
|
|
8
8
|
const se_QueryForecastCommand = async (input, context) => {
|
|
9
|
-
const headers =
|
|
10
|
-
"content-type": "application/x-amz-json-1.1",
|
|
11
|
-
"x-amz-target": "AmazonForecastRuntime.QueryForecast",
|
|
12
|
-
};
|
|
9
|
+
const headers = sharedHeaders("QueryForecast");
|
|
13
10
|
let body;
|
|
14
11
|
body = JSON.stringify(se_QueryForecastRequest(input, context));
|
|
15
12
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
16
13
|
};
|
|
17
14
|
exports.se_QueryForecastCommand = se_QueryForecastCommand;
|
|
18
15
|
const se_QueryWhatIfForecastCommand = async (input, context) => {
|
|
19
|
-
const headers =
|
|
20
|
-
"content-type": "application/x-amz-json-1.1",
|
|
21
|
-
"x-amz-target": "AmazonForecastRuntime.QueryWhatIfForecast",
|
|
22
|
-
};
|
|
16
|
+
const headers = sharedHeaders("QueryWhatIfForecast");
|
|
23
17
|
let body;
|
|
24
18
|
body = JSON.stringify(se_QueryWhatIfForecastRequest(input, context));
|
|
25
19
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
@@ -286,6 +280,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
|
|
|
286
280
|
}
|
|
287
281
|
return new protocol_http_1.HttpRequest(contents);
|
|
288
282
|
};
|
|
283
|
+
function sharedHeaders(operation) {
|
|
284
|
+
return {
|
|
285
|
+
"content-type": "application/x-amz-json-1.1",
|
|
286
|
+
"x-amz-target": `AmazonForecastRuntime.${operation}`,
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
289
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
290
290
|
if (encoded.length) {
|
|
291
291
|
return JSON.parse(encoded);
|
|
@@ -3,19 +3,13 @@ import { decorateServiceException as __decorateServiceException, expectString as
|
|
|
3
3
|
import { ForecastqueryServiceException as __BaseException } from "../models/ForecastqueryServiceException";
|
|
4
4
|
import { InvalidInputException, InvalidNextTokenException, LimitExceededException, ResourceInUseException, ResourceNotFoundException, } from "../models/models_0";
|
|
5
5
|
export const se_QueryForecastCommand = async (input, context) => {
|
|
6
|
-
const headers =
|
|
7
|
-
"content-type": "application/x-amz-json-1.1",
|
|
8
|
-
"x-amz-target": "AmazonForecastRuntime.QueryForecast",
|
|
9
|
-
};
|
|
6
|
+
const headers = sharedHeaders("QueryForecast");
|
|
10
7
|
let body;
|
|
11
8
|
body = JSON.stringify(se_QueryForecastRequest(input, context));
|
|
12
9
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
13
10
|
};
|
|
14
11
|
export const se_QueryWhatIfForecastCommand = async (input, context) => {
|
|
15
|
-
const headers =
|
|
16
|
-
"content-type": "application/x-amz-json-1.1",
|
|
17
|
-
"x-amz-target": "AmazonForecastRuntime.QueryWhatIfForecast",
|
|
18
|
-
};
|
|
12
|
+
const headers = sharedHeaders("QueryWhatIfForecast");
|
|
19
13
|
let body;
|
|
20
14
|
body = JSON.stringify(se_QueryWhatIfForecastRequest(input, context));
|
|
21
15
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
@@ -279,6 +273,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
|
|
|
279
273
|
}
|
|
280
274
|
return new __HttpRequest(contents);
|
|
281
275
|
};
|
|
276
|
+
function sharedHeaders(operation) {
|
|
277
|
+
return {
|
|
278
|
+
"content-type": "application/x-amz-json-1.1",
|
|
279
|
+
"x-amz-target": `AmazonForecastRuntime.${operation}`,
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
282
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
283
283
|
if (encoded.length) {
|
|
284
284
|
return JSON.parse(encoded);
|
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.312.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",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
+
"@aws-sdk/client-sts": "3.312.0",
|
|
25
25
|
"@aws-sdk/config-resolver": "3.310.0",
|
|
26
26
|
"@aws-sdk/credential-provider-node": "3.310.0",
|
|
27
27
|
"@aws-sdk/fetch-http-handler": "3.310.0",
|