@aws-sdk/client-forecastquery 3.312.0 → 3.316.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.
@@ -1,37 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Forecastquery = void 0;
4
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
4
5
  const QueryForecastCommand_1 = require("./commands/QueryForecastCommand");
5
6
  const QueryWhatIfForecastCommand_1 = require("./commands/QueryWhatIfForecastCommand");
6
7
  const ForecastqueryClient_1 = require("./ForecastqueryClient");
8
+ const commands = {
9
+ QueryForecastCommand: QueryForecastCommand_1.QueryForecastCommand,
10
+ QueryWhatIfForecastCommand: QueryWhatIfForecastCommand_1.QueryWhatIfForecastCommand,
11
+ };
7
12
  class Forecastquery extends ForecastqueryClient_1.ForecastqueryClient {
8
- queryForecast(args, optionsOrCb, cb) {
9
- const command = new QueryForecastCommand_1.QueryForecastCommand(args);
10
- if (typeof optionsOrCb === "function") {
11
- this.send(command, optionsOrCb);
12
- }
13
- else if (typeof cb === "function") {
14
- if (typeof optionsOrCb !== "object")
15
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
16
- this.send(command, optionsOrCb || {}, cb);
17
- }
18
- else {
19
- return this.send(command, optionsOrCb);
20
- }
21
- }
22
- queryWhatIfForecast(args, optionsOrCb, cb) {
23
- const command = new QueryWhatIfForecastCommand_1.QueryWhatIfForecastCommand(args);
24
- if (typeof optionsOrCb === "function") {
25
- this.send(command, optionsOrCb);
26
- }
27
- else if (typeof cb === "function") {
28
- if (typeof optionsOrCb !== "object")
29
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
30
- this.send(command, optionsOrCb || {}, cb);
31
- }
32
- else {
33
- return this.send(command, optionsOrCb);
34
- }
35
- }
36
13
  }
37
14
  exports.Forecastquery = Forecastquery;
15
+ (0, smithy_client_1.createAggregatedClient)(commands, Forecastquery);
@@ -8,14 +8,14 @@ const models_0_1 = require("../models/models_0");
8
8
  const se_QueryForecastCommand = async (input, context) => {
9
9
  const headers = sharedHeaders("QueryForecast");
10
10
  let body;
11
- body = JSON.stringify(se_QueryForecastRequest(input, context));
11
+ body = JSON.stringify((0, smithy_client_1._json)(input));
12
12
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
13
13
  };
14
14
  exports.se_QueryForecastCommand = se_QueryForecastCommand;
15
15
  const se_QueryWhatIfForecastCommand = async (input, context) => {
16
16
  const headers = sharedHeaders("QueryWhatIfForecast");
17
17
  let body;
18
- body = JSON.stringify(se_QueryWhatIfForecastRequest(input, context));
18
+ body = JSON.stringify((0, smithy_client_1._json)(input));
19
19
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
20
20
  };
21
21
  exports.se_QueryWhatIfForecastCommand = se_QueryWhatIfForecastCommand;
@@ -30,7 +30,7 @@ const de_QueryForecastCommand = async (output, context) => {
30
30
  $metadata: deserializeMetadata(output),
31
31
  ...contents,
32
32
  };
33
- return Promise.resolve(response);
33
+ return response;
34
34
  };
35
35
  exports.de_QueryForecastCommand = de_QueryForecastCommand;
36
36
  const de_QueryForecastCommandError = async (output, context) => {
@@ -57,10 +57,9 @@ const de_QueryForecastCommandError = async (output, context) => {
57
57
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
58
58
  default:
59
59
  const parsedBody = parsedOutput.body;
60
- (0, smithy_client_1.throwDefaultError)({
60
+ return throwDefaultError({
61
61
  output,
62
62
  parsedBody,
63
- exceptionCtor: ForecastqueryServiceException_1.ForecastqueryServiceException,
64
63
  errorCode,
65
64
  });
66
65
  }
@@ -76,7 +75,7 @@ const de_QueryWhatIfForecastCommand = async (output, context) => {
76
75
  $metadata: deserializeMetadata(output),
77
76
  ...contents,
78
77
  };
79
- return Promise.resolve(response);
78
+ return response;
80
79
  };
81
80
  exports.de_QueryWhatIfForecastCommand = de_QueryWhatIfForecastCommand;
82
81
  const de_QueryWhatIfForecastCommandError = async (output, context) => {
@@ -103,17 +102,16 @@ const de_QueryWhatIfForecastCommandError = async (output, context) => {
103
102
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
104
103
  default:
105
104
  const parsedBody = parsedOutput.body;
106
- (0, smithy_client_1.throwDefaultError)({
105
+ return throwDefaultError({
107
106
  output,
108
107
  parsedBody,
109
- exceptionCtor: ForecastqueryServiceException_1.ForecastqueryServiceException,
110
108
  errorCode,
111
109
  });
112
110
  }
113
111
  };
114
112
  const de_InvalidInputExceptionRes = async (parsedOutput, context) => {
115
113
  const body = parsedOutput.body;
116
- const deserialized = de_InvalidInputException(body, context);
114
+ const deserialized = (0, smithy_client_1._json)(body);
117
115
  const exception = new models_0_1.InvalidInputException({
118
116
  $metadata: deserializeMetadata(parsedOutput),
119
117
  ...deserialized,
@@ -122,7 +120,7 @@ const de_InvalidInputExceptionRes = async (parsedOutput, context) => {
122
120
  };
123
121
  const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
124
122
  const body = parsedOutput.body;
125
- const deserialized = de_InvalidNextTokenException(body, context);
123
+ const deserialized = (0, smithy_client_1._json)(body);
126
124
  const exception = new models_0_1.InvalidNextTokenException({
127
125
  $metadata: deserializeMetadata(parsedOutput),
128
126
  ...deserialized,
@@ -131,7 +129,7 @@ const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
131
129
  };
132
130
  const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
133
131
  const body = parsedOutput.body;
134
- const deserialized = de_LimitExceededException(body, context);
132
+ const deserialized = (0, smithy_client_1._json)(body);
135
133
  const exception = new models_0_1.LimitExceededException({
136
134
  $metadata: deserializeMetadata(parsedOutput),
137
135
  ...deserialized,
@@ -140,7 +138,7 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
140
138
  };
141
139
  const de_ResourceInUseExceptionRes = async (parsedOutput, context) => {
142
140
  const body = parsedOutput.body;
143
- const deserialized = de_ResourceInUseException(body, context);
141
+ const deserialized = (0, smithy_client_1._json)(body);
144
142
  const exception = new models_0_1.ResourceInUseException({
145
143
  $metadata: deserializeMetadata(parsedOutput),
146
144
  ...deserialized,
@@ -149,65 +147,23 @@ const de_ResourceInUseExceptionRes = async (parsedOutput, context) => {
149
147
  };
150
148
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
151
149
  const body = parsedOutput.body;
152
- const deserialized = de_ResourceNotFoundException(body, context);
150
+ const deserialized = (0, smithy_client_1._json)(body);
153
151
  const exception = new models_0_1.ResourceNotFoundException({
154
152
  $metadata: deserializeMetadata(parsedOutput),
155
153
  ...deserialized,
156
154
  });
157
155
  return (0, smithy_client_1.decorateServiceException)(exception, body);
158
156
  };
159
- const se_Filters = (input, context) => {
160
- return Object.entries(input).reduce((acc, [key, value]) => {
161
- if (value === null) {
162
- return acc;
163
- }
164
- acc[key] = value;
165
- return acc;
166
- }, {});
167
- };
168
- const se_QueryForecastRequest = (input, context) => {
169
- return {
170
- ...(input.EndDate != null && { EndDate: input.EndDate }),
171
- ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }),
172
- ...(input.ForecastArn != null && { ForecastArn: input.ForecastArn }),
173
- ...(input.NextToken != null && { NextToken: input.NextToken }),
174
- ...(input.StartDate != null && { StartDate: input.StartDate }),
175
- };
176
- };
177
- const se_QueryWhatIfForecastRequest = (input, context) => {
178
- return {
179
- ...(input.EndDate != null && { EndDate: input.EndDate }),
180
- ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }),
181
- ...(input.NextToken != null && { NextToken: input.NextToken }),
182
- ...(input.StartDate != null && { StartDate: input.StartDate }),
183
- ...(input.WhatIfForecastArn != null && { WhatIfForecastArn: input.WhatIfForecastArn }),
184
- };
185
- };
186
157
  const de_DataPoint = (output, context) => {
187
- return {
188
- Timestamp: (0, smithy_client_1.expectString)(output.Timestamp),
189
- Value: (0, smithy_client_1.limitedParseDouble)(output.Value),
190
- };
158
+ return (0, smithy_client_1.take)(output, {
159
+ Timestamp: smithy_client_1.expectString,
160
+ Value: smithy_client_1.limitedParseDouble,
161
+ });
191
162
  };
192
163
  const de_Forecast = (output, context) => {
193
- return {
194
- Predictions: output.Predictions != null ? de_Predictions(output.Predictions, context) : undefined,
195
- };
196
- };
197
- const de_InvalidInputException = (output, context) => {
198
- return {
199
- Message: (0, smithy_client_1.expectString)(output.Message),
200
- };
201
- };
202
- const de_InvalidNextTokenException = (output, context) => {
203
- return {
204
- Message: (0, smithy_client_1.expectString)(output.Message),
205
- };
206
- };
207
- const de_LimitExceededException = (output, context) => {
208
- return {
209
- Message: (0, smithy_client_1.expectString)(output.Message),
210
- };
164
+ return (0, smithy_client_1.take)(output, {
165
+ Predictions: (_) => de_Predictions(_, context),
166
+ });
211
167
  };
212
168
  const de_Predictions = (output, context) => {
213
169
  return Object.entries(output).reduce((acc, [key, value]) => {
@@ -219,32 +175,19 @@ const de_Predictions = (output, context) => {
219
175
  }, {});
220
176
  };
221
177
  const de_QueryForecastResponse = (output, context) => {
222
- return {
223
- Forecast: output.Forecast != null ? de_Forecast(output.Forecast, context) : undefined,
224
- };
178
+ return (0, smithy_client_1.take)(output, {
179
+ Forecast: (_) => de_Forecast(_, context),
180
+ });
225
181
  };
226
182
  const de_QueryWhatIfForecastResponse = (output, context) => {
227
- return {
228
- Forecast: output.Forecast != null ? de_Forecast(output.Forecast, context) : undefined,
229
- };
230
- };
231
- const de_ResourceInUseException = (output, context) => {
232
- return {
233
- Message: (0, smithy_client_1.expectString)(output.Message),
234
- };
235
- };
236
- const de_ResourceNotFoundException = (output, context) => {
237
- return {
238
- Message: (0, smithy_client_1.expectString)(output.Message),
239
- };
183
+ return (0, smithy_client_1.take)(output, {
184
+ Forecast: (_) => de_Forecast(_, context),
185
+ });
240
186
  };
241
187
  const de_TimeSeries = (output, context) => {
242
188
  const retVal = (output || [])
243
189
  .filter((e) => e != null)
244
190
  .map((entry) => {
245
- if (entry === null) {
246
- return null;
247
- }
248
191
  return de_DataPoint(entry, context);
249
192
  });
250
193
  return retVal;
@@ -262,6 +205,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
262
205
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
263
206
  };
264
207
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
208
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(ForecastqueryServiceException_1.ForecastqueryServiceException);
265
209
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
266
210
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
267
211
  const contents = {
@@ -1,33 +1,11 @@
1
+ import { createAggregatedClient } from "@aws-sdk/smithy-client";
1
2
  import { QueryForecastCommand, } from "./commands/QueryForecastCommand";
2
3
  import { QueryWhatIfForecastCommand, } from "./commands/QueryWhatIfForecastCommand";
3
4
  import { ForecastqueryClient } from "./ForecastqueryClient";
5
+ const commands = {
6
+ QueryForecastCommand,
7
+ QueryWhatIfForecastCommand,
8
+ };
4
9
  export class Forecastquery extends ForecastqueryClient {
5
- queryForecast(args, optionsOrCb, cb) {
6
- const command = new QueryForecastCommand(args);
7
- if (typeof optionsOrCb === "function") {
8
- this.send(command, optionsOrCb);
9
- }
10
- else if (typeof cb === "function") {
11
- if (typeof optionsOrCb !== "object")
12
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
13
- this.send(command, optionsOrCb || {}, cb);
14
- }
15
- else {
16
- return this.send(command, optionsOrCb);
17
- }
18
- }
19
- queryWhatIfForecast(args, optionsOrCb, cb) {
20
- const command = new QueryWhatIfForecastCommand(args);
21
- if (typeof optionsOrCb === "function") {
22
- this.send(command, optionsOrCb);
23
- }
24
- else if (typeof cb === "function") {
25
- if (typeof optionsOrCb !== "object")
26
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
27
- this.send(command, optionsOrCb || {}, cb);
28
- }
29
- else {
30
- return this.send(command, optionsOrCb);
31
- }
32
- }
33
10
  }
11
+ createAggregatedClient(commands, Forecastquery);
@@ -1,17 +1,17 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectString as __expectString, limitedParseDouble as __limitedParseDouble, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectString as __expectString, limitedParseDouble as __limitedParseDouble, take, withBaseException, } from "@aws-sdk/smithy-client";
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
6
  const headers = sharedHeaders("QueryForecast");
7
7
  let body;
8
- body = JSON.stringify(se_QueryForecastRequest(input, context));
8
+ body = JSON.stringify(_json(input));
9
9
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
10
10
  };
11
11
  export const se_QueryWhatIfForecastCommand = async (input, context) => {
12
12
  const headers = sharedHeaders("QueryWhatIfForecast");
13
13
  let body;
14
- body = JSON.stringify(se_QueryWhatIfForecastRequest(input, context));
14
+ body = JSON.stringify(_json(input));
15
15
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
16
16
  };
17
17
  export const de_QueryForecastCommand = async (output, context) => {
@@ -25,7 +25,7 @@ export const de_QueryForecastCommand = async (output, context) => {
25
25
  $metadata: deserializeMetadata(output),
26
26
  ...contents,
27
27
  };
28
- return Promise.resolve(response);
28
+ return response;
29
29
  };
30
30
  const de_QueryForecastCommandError = async (output, context) => {
31
31
  const parsedOutput = {
@@ -51,10 +51,9 @@ const de_QueryForecastCommandError = async (output, context) => {
51
51
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
52
52
  default:
53
53
  const parsedBody = parsedOutput.body;
54
- throwDefaultError({
54
+ return throwDefaultError({
55
55
  output,
56
56
  parsedBody,
57
- exceptionCtor: __BaseException,
58
57
  errorCode,
59
58
  });
60
59
  }
@@ -70,7 +69,7 @@ export const de_QueryWhatIfForecastCommand = async (output, context) => {
70
69
  $metadata: deserializeMetadata(output),
71
70
  ...contents,
72
71
  };
73
- return Promise.resolve(response);
72
+ return response;
74
73
  };
75
74
  const de_QueryWhatIfForecastCommandError = async (output, context) => {
76
75
  const parsedOutput = {
@@ -96,17 +95,16 @@ const de_QueryWhatIfForecastCommandError = async (output, context) => {
96
95
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
97
96
  default:
98
97
  const parsedBody = parsedOutput.body;
99
- throwDefaultError({
98
+ return throwDefaultError({
100
99
  output,
101
100
  parsedBody,
102
- exceptionCtor: __BaseException,
103
101
  errorCode,
104
102
  });
105
103
  }
106
104
  };
107
105
  const de_InvalidInputExceptionRes = async (parsedOutput, context) => {
108
106
  const body = parsedOutput.body;
109
- const deserialized = de_InvalidInputException(body, context);
107
+ const deserialized = _json(body);
110
108
  const exception = new InvalidInputException({
111
109
  $metadata: deserializeMetadata(parsedOutput),
112
110
  ...deserialized,
@@ -115,7 +113,7 @@ const de_InvalidInputExceptionRes = async (parsedOutput, context) => {
115
113
  };
116
114
  const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
117
115
  const body = parsedOutput.body;
118
- const deserialized = de_InvalidNextTokenException(body, context);
116
+ const deserialized = _json(body);
119
117
  const exception = new InvalidNextTokenException({
120
118
  $metadata: deserializeMetadata(parsedOutput),
121
119
  ...deserialized,
@@ -124,7 +122,7 @@ const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
124
122
  };
125
123
  const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
126
124
  const body = parsedOutput.body;
127
- const deserialized = de_LimitExceededException(body, context);
125
+ const deserialized = _json(body);
128
126
  const exception = new LimitExceededException({
129
127
  $metadata: deserializeMetadata(parsedOutput),
130
128
  ...deserialized,
@@ -133,7 +131,7 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
133
131
  };
134
132
  const de_ResourceInUseExceptionRes = async (parsedOutput, context) => {
135
133
  const body = parsedOutput.body;
136
- const deserialized = de_ResourceInUseException(body, context);
134
+ const deserialized = _json(body);
137
135
  const exception = new ResourceInUseException({
138
136
  $metadata: deserializeMetadata(parsedOutput),
139
137
  ...deserialized,
@@ -142,65 +140,23 @@ const de_ResourceInUseExceptionRes = async (parsedOutput, context) => {
142
140
  };
143
141
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
144
142
  const body = parsedOutput.body;
145
- const deserialized = de_ResourceNotFoundException(body, context);
143
+ const deserialized = _json(body);
146
144
  const exception = new ResourceNotFoundException({
147
145
  $metadata: deserializeMetadata(parsedOutput),
148
146
  ...deserialized,
149
147
  });
150
148
  return __decorateServiceException(exception, body);
151
149
  };
152
- const se_Filters = (input, context) => {
153
- return Object.entries(input).reduce((acc, [key, value]) => {
154
- if (value === null) {
155
- return acc;
156
- }
157
- acc[key] = value;
158
- return acc;
159
- }, {});
160
- };
161
- const se_QueryForecastRequest = (input, context) => {
162
- return {
163
- ...(input.EndDate != null && { EndDate: input.EndDate }),
164
- ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }),
165
- ...(input.ForecastArn != null && { ForecastArn: input.ForecastArn }),
166
- ...(input.NextToken != null && { NextToken: input.NextToken }),
167
- ...(input.StartDate != null && { StartDate: input.StartDate }),
168
- };
169
- };
170
- const se_QueryWhatIfForecastRequest = (input, context) => {
171
- return {
172
- ...(input.EndDate != null && { EndDate: input.EndDate }),
173
- ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }),
174
- ...(input.NextToken != null && { NextToken: input.NextToken }),
175
- ...(input.StartDate != null && { StartDate: input.StartDate }),
176
- ...(input.WhatIfForecastArn != null && { WhatIfForecastArn: input.WhatIfForecastArn }),
177
- };
178
- };
179
150
  const de_DataPoint = (output, context) => {
180
- return {
181
- Timestamp: __expectString(output.Timestamp),
182
- Value: __limitedParseDouble(output.Value),
183
- };
151
+ return take(output, {
152
+ Timestamp: __expectString,
153
+ Value: __limitedParseDouble,
154
+ });
184
155
  };
185
156
  const de_Forecast = (output, context) => {
186
- return {
187
- Predictions: output.Predictions != null ? de_Predictions(output.Predictions, context) : undefined,
188
- };
189
- };
190
- const de_InvalidInputException = (output, context) => {
191
- return {
192
- Message: __expectString(output.Message),
193
- };
194
- };
195
- const de_InvalidNextTokenException = (output, context) => {
196
- return {
197
- Message: __expectString(output.Message),
198
- };
199
- };
200
- const de_LimitExceededException = (output, context) => {
201
- return {
202
- Message: __expectString(output.Message),
203
- };
157
+ return take(output, {
158
+ Predictions: (_) => de_Predictions(_, context),
159
+ });
204
160
  };
205
161
  const de_Predictions = (output, context) => {
206
162
  return Object.entries(output).reduce((acc, [key, value]) => {
@@ -212,32 +168,19 @@ const de_Predictions = (output, context) => {
212
168
  }, {});
213
169
  };
214
170
  const de_QueryForecastResponse = (output, context) => {
215
- return {
216
- Forecast: output.Forecast != null ? de_Forecast(output.Forecast, context) : undefined,
217
- };
171
+ return take(output, {
172
+ Forecast: (_) => de_Forecast(_, context),
173
+ });
218
174
  };
219
175
  const de_QueryWhatIfForecastResponse = (output, context) => {
220
- return {
221
- Forecast: output.Forecast != null ? de_Forecast(output.Forecast, context) : undefined,
222
- };
223
- };
224
- const de_ResourceInUseException = (output, context) => {
225
- return {
226
- Message: __expectString(output.Message),
227
- };
228
- };
229
- const de_ResourceNotFoundException = (output, context) => {
230
- return {
231
- Message: __expectString(output.Message),
232
- };
176
+ return take(output, {
177
+ Forecast: (_) => de_Forecast(_, context),
178
+ });
233
179
  };
234
180
  const de_TimeSeries = (output, context) => {
235
181
  const retVal = (output || [])
236
182
  .filter((e) => e != null)
237
183
  .map((entry) => {
238
- if (entry === null) {
239
- return null;
240
- }
241
184
  return de_DataPoint(entry, context);
242
185
  });
243
186
  return retVal;
@@ -255,6 +198,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
255
198
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
256
199
  };
257
200
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
201
+ const throwDefaultError = withBaseException(__BaseException);
258
202
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
259
203
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
260
204
  const contents = {
@@ -2,34 +2,23 @@ import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
2
2
  import { QueryForecastCommandInput, QueryForecastCommandOutput } from "./commands/QueryForecastCommand";
3
3
  import { QueryWhatIfForecastCommandInput, QueryWhatIfForecastCommandOutput } from "./commands/QueryWhatIfForecastCommand";
4
4
  import { ForecastqueryClient } from "./ForecastqueryClient";
5
- /**
6
- * @public
7
- * <p>Provides APIs for creating and managing Amazon Forecast resources.</p>
8
- */
9
- export declare class Forecastquery extends ForecastqueryClient {
5
+ export interface Forecastquery {
10
6
  /**
11
- * @public
12
- * <p>Retrieves a forecast for a single item, filtered by the supplied criteria.</p>
13
- * <p>The criteria is a key-value pair. The key is either <code>item_id</code> (or the
14
- * equivalent non-timestamp, non-target field) from the <code>TARGET_TIME_SERIES</code> dataset,
15
- * or one of the forecast dimensions specified as part of the <code>FeaturizationConfig</code>
16
- * object.</p>
17
- * <p>By default, <code>QueryForecast</code> returns the complete date range for the filtered
18
- * forecast. You can request a specific date range.</p>
19
- * <p>To get the full forecast, use the <a href="https://docs.aws.amazon.com/en_us/forecast/latest/dg/API_CreateForecastExportJob.html">CreateForecastExportJob</a> operation.</p>
20
- * <note>
21
- * <p>The forecasts generated by Amazon Forecast are in the same timezone as the dataset that was
22
- * used to create the predictor.</p>
23
- * </note>
7
+ * @see {@link QueryForecastCommand}
24
8
  */
25
9
  queryForecast(args: QueryForecastCommandInput, options?: __HttpHandlerOptions): Promise<QueryForecastCommandOutput>;
26
10
  queryForecast(args: QueryForecastCommandInput, cb: (err: any, data?: QueryForecastCommandOutput) => void): void;
27
11
  queryForecast(args: QueryForecastCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: QueryForecastCommandOutput) => void): void;
28
12
  /**
29
- * @public
30
- * <p>Retrieves a what-if forecast.</p>
13
+ * @see {@link QueryWhatIfForecastCommand}
31
14
  */
32
15
  queryWhatIfForecast(args: QueryWhatIfForecastCommandInput, options?: __HttpHandlerOptions): Promise<QueryWhatIfForecastCommandOutput>;
33
16
  queryWhatIfForecast(args: QueryWhatIfForecastCommandInput, cb: (err: any, data?: QueryWhatIfForecastCommandOutput) => void): void;
34
17
  queryWhatIfForecast(args: QueryWhatIfForecastCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: QueryWhatIfForecastCommandOutput) => void): void;
35
18
  }
19
+ /**
20
+ * @public
21
+ * <p>Provides APIs for creating and managing Amazon Forecast resources.</p>
22
+ */
23
+ export declare class Forecastquery extends ForecastqueryClient implements Forecastquery {
24
+ }
@@ -8,7 +8,7 @@ import {
8
8
  QueryWhatIfForecastCommandOutput,
9
9
  } from "./commands/QueryWhatIfForecastCommand";
10
10
  import { ForecastqueryClient } from "./ForecastqueryClient";
11
- export declare class Forecastquery extends ForecastqueryClient {
11
+ export interface Forecastquery {
12
12
  queryForecast(
13
13
  args: QueryForecastCommandInput,
14
14
  options?: __HttpHandlerOptions
@@ -36,3 +36,6 @@ export declare class Forecastquery extends ForecastqueryClient {
36
36
  cb: (err: any, data?: QueryWhatIfForecastCommandOutput) => void
37
37
  ): void;
38
38
  }
39
+ export declare class Forecastquery
40
+ extends ForecastqueryClient
41
+ implements Forecastquery {}
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.312.0",
4
+ "version": "3.316.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,9 +21,9 @@
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.312.0",
24
+ "@aws-sdk/client-sts": "3.316.0",
25
25
  "@aws-sdk/config-resolver": "3.310.0",
26
- "@aws-sdk/credential-provider-node": "3.310.0",
26
+ "@aws-sdk/credential-provider-node": "3.316.0",
27
27
  "@aws-sdk/fetch-http-handler": "3.310.0",
28
28
  "@aws-sdk/hash-node": "3.310.0",
29
29
  "@aws-sdk/invalid-dependency": "3.310.0",
@@ -40,14 +40,14 @@
40
40
  "@aws-sdk/node-config-provider": "3.310.0",
41
41
  "@aws-sdk/node-http-handler": "3.310.0",
42
42
  "@aws-sdk/protocol-http": "3.310.0",
43
- "@aws-sdk/smithy-client": "3.310.0",
43
+ "@aws-sdk/smithy-client": "3.316.0",
44
44
  "@aws-sdk/types": "3.310.0",
45
45
  "@aws-sdk/url-parser": "3.310.0",
46
46
  "@aws-sdk/util-base64": "3.310.0",
47
47
  "@aws-sdk/util-body-length-browser": "3.310.0",
48
48
  "@aws-sdk/util-body-length-node": "3.310.0",
49
- "@aws-sdk/util-defaults-mode-browser": "3.310.0",
50
- "@aws-sdk/util-defaults-mode-node": "3.310.0",
49
+ "@aws-sdk/util-defaults-mode-browser": "3.316.0",
50
+ "@aws-sdk/util-defaults-mode-node": "3.316.0",
51
51
  "@aws-sdk/util-endpoints": "3.310.0",
52
52
  "@aws-sdk/util-retry": "3.310.0",
53
53
  "@aws-sdk/util-user-agent-browser": "3.310.0",