@aws-sdk/client-forecast 3.476.0 → 3.478.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.
Files changed (57) hide show
  1. package/dist-cjs/pagination/ListDatasetGroupsPaginator.js +2 -24
  2. package/dist-cjs/pagination/ListDatasetImportJobsPaginator.js +2 -24
  3. package/dist-cjs/pagination/ListDatasetsPaginator.js +2 -24
  4. package/dist-cjs/pagination/ListExplainabilitiesPaginator.js +2 -24
  5. package/dist-cjs/pagination/ListExplainabilityExportsPaginator.js +2 -24
  6. package/dist-cjs/pagination/ListForecastExportJobsPaginator.js +2 -24
  7. package/dist-cjs/pagination/ListForecastsPaginator.js +2 -24
  8. package/dist-cjs/pagination/ListMonitorEvaluationsPaginator.js +2 -24
  9. package/dist-cjs/pagination/ListMonitorsPaginator.js +2 -24
  10. package/dist-cjs/pagination/ListPredictorBacktestExportJobsPaginator.js +2 -24
  11. package/dist-cjs/pagination/ListPredictorsPaginator.js +2 -24
  12. package/dist-cjs/pagination/ListWhatIfAnalysesPaginator.js +2 -24
  13. package/dist-cjs/pagination/ListWhatIfForecastExportsPaginator.js +2 -24
  14. package/dist-cjs/pagination/ListWhatIfForecastsPaginator.js +2 -24
  15. package/dist-es/pagination/ListDatasetGroupsPaginator.js +2 -23
  16. package/dist-es/pagination/ListDatasetImportJobsPaginator.js +2 -23
  17. package/dist-es/pagination/ListDatasetsPaginator.js +2 -23
  18. package/dist-es/pagination/ListExplainabilitiesPaginator.js +2 -23
  19. package/dist-es/pagination/ListExplainabilityExportsPaginator.js +2 -23
  20. package/dist-es/pagination/ListForecastExportJobsPaginator.js +2 -23
  21. package/dist-es/pagination/ListForecastsPaginator.js +2 -23
  22. package/dist-es/pagination/ListMonitorEvaluationsPaginator.js +2 -23
  23. package/dist-es/pagination/ListMonitorsPaginator.js +2 -23
  24. package/dist-es/pagination/ListPredictorBacktestExportJobsPaginator.js +2 -23
  25. package/dist-es/pagination/ListPredictorsPaginator.js +2 -23
  26. package/dist-es/pagination/ListWhatIfAnalysesPaginator.js +2 -23
  27. package/dist-es/pagination/ListWhatIfForecastExportsPaginator.js +2 -23
  28. package/dist-es/pagination/ListWhatIfForecastsPaginator.js +2 -23
  29. package/dist-types/pagination/ListDatasetGroupsPaginator.d.ts +1 -1
  30. package/dist-types/pagination/ListDatasetImportJobsPaginator.d.ts +1 -1
  31. package/dist-types/pagination/ListDatasetsPaginator.d.ts +1 -1
  32. package/dist-types/pagination/ListExplainabilitiesPaginator.d.ts +1 -1
  33. package/dist-types/pagination/ListExplainabilityExportsPaginator.d.ts +1 -1
  34. package/dist-types/pagination/ListForecastExportJobsPaginator.d.ts +1 -1
  35. package/dist-types/pagination/ListForecastsPaginator.d.ts +1 -1
  36. package/dist-types/pagination/ListMonitorEvaluationsPaginator.d.ts +1 -1
  37. package/dist-types/pagination/ListMonitorsPaginator.d.ts +1 -1
  38. package/dist-types/pagination/ListPredictorBacktestExportJobsPaginator.d.ts +1 -1
  39. package/dist-types/pagination/ListPredictorsPaginator.d.ts +1 -1
  40. package/dist-types/pagination/ListWhatIfAnalysesPaginator.d.ts +1 -1
  41. package/dist-types/pagination/ListWhatIfForecastExportsPaginator.d.ts +1 -1
  42. package/dist-types/pagination/ListWhatIfForecastsPaginator.d.ts +1 -1
  43. package/dist-types/ts3.4/pagination/ListDatasetGroupsPaginator.d.ts +3 -3
  44. package/dist-types/ts3.4/pagination/ListDatasetImportJobsPaginator.d.ts +3 -3
  45. package/dist-types/ts3.4/pagination/ListDatasetsPaginator.d.ts +3 -3
  46. package/dist-types/ts3.4/pagination/ListExplainabilitiesPaginator.d.ts +3 -3
  47. package/dist-types/ts3.4/pagination/ListExplainabilityExportsPaginator.d.ts +3 -3
  48. package/dist-types/ts3.4/pagination/ListForecastExportJobsPaginator.d.ts +3 -3
  49. package/dist-types/ts3.4/pagination/ListForecastsPaginator.d.ts +3 -3
  50. package/dist-types/ts3.4/pagination/ListMonitorEvaluationsPaginator.d.ts +3 -3
  51. package/dist-types/ts3.4/pagination/ListMonitorsPaginator.d.ts +3 -3
  52. package/dist-types/ts3.4/pagination/ListPredictorBacktestExportJobsPaginator.d.ts +3 -3
  53. package/dist-types/ts3.4/pagination/ListPredictorsPaginator.d.ts +3 -3
  54. package/dist-types/ts3.4/pagination/ListWhatIfAnalysesPaginator.d.ts +3 -3
  55. package/dist-types/ts3.4/pagination/ListWhatIfForecastExportsPaginator.d.ts +3 -3
  56. package/dist-types/ts3.4/pagination/ListWhatIfForecastsPaginator.d.ts +3 -3
  57. package/package.json +7 -6
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListDatasetGroups = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListDatasetGroupsCommand_1 = require("../commands/ListDatasetGroupsCommand");
5
6
  const ForecastClient_1 = require("../ForecastClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListDatasetGroupsCommand_1.ListDatasetGroupsCommand(input), ...args);
8
- };
9
- async function* paginateListDatasetGroups(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof ForecastClient_1.ForecastClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Forecast | ForecastClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListDatasetGroups = paginateListDatasetGroups;
7
+ exports.paginateListDatasetGroups = (0, core_1.createPaginator)(ForecastClient_1.ForecastClient, ListDatasetGroupsCommand_1.ListDatasetGroupsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListDatasetImportJobs = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListDatasetImportJobsCommand_1 = require("../commands/ListDatasetImportJobsCommand");
5
6
  const ForecastClient_1 = require("../ForecastClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListDatasetImportJobsCommand_1.ListDatasetImportJobsCommand(input), ...args);
8
- };
9
- async function* paginateListDatasetImportJobs(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof ForecastClient_1.ForecastClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Forecast | ForecastClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListDatasetImportJobs = paginateListDatasetImportJobs;
7
+ exports.paginateListDatasetImportJobs = (0, core_1.createPaginator)(ForecastClient_1.ForecastClient, ListDatasetImportJobsCommand_1.ListDatasetImportJobsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListDatasets = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListDatasetsCommand_1 = require("../commands/ListDatasetsCommand");
5
6
  const ForecastClient_1 = require("../ForecastClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListDatasetsCommand_1.ListDatasetsCommand(input), ...args);
8
- };
9
- async function* paginateListDatasets(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof ForecastClient_1.ForecastClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Forecast | ForecastClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListDatasets = paginateListDatasets;
7
+ exports.paginateListDatasets = (0, core_1.createPaginator)(ForecastClient_1.ForecastClient, ListDatasetsCommand_1.ListDatasetsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListExplainabilities = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListExplainabilitiesCommand_1 = require("../commands/ListExplainabilitiesCommand");
5
6
  const ForecastClient_1 = require("../ForecastClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListExplainabilitiesCommand_1.ListExplainabilitiesCommand(input), ...args);
8
- };
9
- async function* paginateListExplainabilities(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof ForecastClient_1.ForecastClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Forecast | ForecastClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListExplainabilities = paginateListExplainabilities;
7
+ exports.paginateListExplainabilities = (0, core_1.createPaginator)(ForecastClient_1.ForecastClient, ListExplainabilitiesCommand_1.ListExplainabilitiesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListExplainabilityExports = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListExplainabilityExportsCommand_1 = require("../commands/ListExplainabilityExportsCommand");
5
6
  const ForecastClient_1 = require("../ForecastClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListExplainabilityExportsCommand_1.ListExplainabilityExportsCommand(input), ...args);
8
- };
9
- async function* paginateListExplainabilityExports(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof ForecastClient_1.ForecastClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Forecast | ForecastClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListExplainabilityExports = paginateListExplainabilityExports;
7
+ exports.paginateListExplainabilityExports = (0, core_1.createPaginator)(ForecastClient_1.ForecastClient, ListExplainabilityExportsCommand_1.ListExplainabilityExportsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListForecastExportJobs = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListForecastExportJobsCommand_1 = require("../commands/ListForecastExportJobsCommand");
5
6
  const ForecastClient_1 = require("../ForecastClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListForecastExportJobsCommand_1.ListForecastExportJobsCommand(input), ...args);
8
- };
9
- async function* paginateListForecastExportJobs(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof ForecastClient_1.ForecastClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Forecast | ForecastClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListForecastExportJobs = paginateListForecastExportJobs;
7
+ exports.paginateListForecastExportJobs = (0, core_1.createPaginator)(ForecastClient_1.ForecastClient, ListForecastExportJobsCommand_1.ListForecastExportJobsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListForecasts = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListForecastsCommand_1 = require("../commands/ListForecastsCommand");
5
6
  const ForecastClient_1 = require("../ForecastClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListForecastsCommand_1.ListForecastsCommand(input), ...args);
8
- };
9
- async function* paginateListForecasts(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof ForecastClient_1.ForecastClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Forecast | ForecastClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListForecasts = paginateListForecasts;
7
+ exports.paginateListForecasts = (0, core_1.createPaginator)(ForecastClient_1.ForecastClient, ListForecastsCommand_1.ListForecastsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListMonitorEvaluations = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListMonitorEvaluationsCommand_1 = require("../commands/ListMonitorEvaluationsCommand");
5
6
  const ForecastClient_1 = require("../ForecastClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListMonitorEvaluationsCommand_1.ListMonitorEvaluationsCommand(input), ...args);
8
- };
9
- async function* paginateListMonitorEvaluations(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof ForecastClient_1.ForecastClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Forecast | ForecastClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListMonitorEvaluations = paginateListMonitorEvaluations;
7
+ exports.paginateListMonitorEvaluations = (0, core_1.createPaginator)(ForecastClient_1.ForecastClient, ListMonitorEvaluationsCommand_1.ListMonitorEvaluationsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListMonitors = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListMonitorsCommand_1 = require("../commands/ListMonitorsCommand");
5
6
  const ForecastClient_1 = require("../ForecastClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListMonitorsCommand_1.ListMonitorsCommand(input), ...args);
8
- };
9
- async function* paginateListMonitors(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof ForecastClient_1.ForecastClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Forecast | ForecastClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListMonitors = paginateListMonitors;
7
+ exports.paginateListMonitors = (0, core_1.createPaginator)(ForecastClient_1.ForecastClient, ListMonitorsCommand_1.ListMonitorsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListPredictorBacktestExportJobs = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListPredictorBacktestExportJobsCommand_1 = require("../commands/ListPredictorBacktestExportJobsCommand");
5
6
  const ForecastClient_1 = require("../ForecastClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListPredictorBacktestExportJobsCommand_1.ListPredictorBacktestExportJobsCommand(input), ...args);
8
- };
9
- async function* paginateListPredictorBacktestExportJobs(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof ForecastClient_1.ForecastClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Forecast | ForecastClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListPredictorBacktestExportJobs = paginateListPredictorBacktestExportJobs;
7
+ exports.paginateListPredictorBacktestExportJobs = (0, core_1.createPaginator)(ForecastClient_1.ForecastClient, ListPredictorBacktestExportJobsCommand_1.ListPredictorBacktestExportJobsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListPredictors = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListPredictorsCommand_1 = require("../commands/ListPredictorsCommand");
5
6
  const ForecastClient_1 = require("../ForecastClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListPredictorsCommand_1.ListPredictorsCommand(input), ...args);
8
- };
9
- async function* paginateListPredictors(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof ForecastClient_1.ForecastClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Forecast | ForecastClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListPredictors = paginateListPredictors;
7
+ exports.paginateListPredictors = (0, core_1.createPaginator)(ForecastClient_1.ForecastClient, ListPredictorsCommand_1.ListPredictorsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListWhatIfAnalyses = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListWhatIfAnalysesCommand_1 = require("../commands/ListWhatIfAnalysesCommand");
5
6
  const ForecastClient_1 = require("../ForecastClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListWhatIfAnalysesCommand_1.ListWhatIfAnalysesCommand(input), ...args);
8
- };
9
- async function* paginateListWhatIfAnalyses(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof ForecastClient_1.ForecastClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Forecast | ForecastClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListWhatIfAnalyses = paginateListWhatIfAnalyses;
7
+ exports.paginateListWhatIfAnalyses = (0, core_1.createPaginator)(ForecastClient_1.ForecastClient, ListWhatIfAnalysesCommand_1.ListWhatIfAnalysesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListWhatIfForecastExports = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListWhatIfForecastExportsCommand_1 = require("../commands/ListWhatIfForecastExportsCommand");
5
6
  const ForecastClient_1 = require("../ForecastClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListWhatIfForecastExportsCommand_1.ListWhatIfForecastExportsCommand(input), ...args);
8
- };
9
- async function* paginateListWhatIfForecastExports(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof ForecastClient_1.ForecastClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Forecast | ForecastClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListWhatIfForecastExports = paginateListWhatIfForecastExports;
7
+ exports.paginateListWhatIfForecastExports = (0, core_1.createPaginator)(ForecastClient_1.ForecastClient, ListWhatIfForecastExportsCommand_1.ListWhatIfForecastExportsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListWhatIfForecasts = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListWhatIfForecastsCommand_1 = require("../commands/ListWhatIfForecastsCommand");
5
6
  const ForecastClient_1 = require("../ForecastClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListWhatIfForecastsCommand_1.ListWhatIfForecastsCommand(input), ...args);
8
- };
9
- async function* paginateListWhatIfForecasts(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof ForecastClient_1.ForecastClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Forecast | ForecastClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListWhatIfForecasts = paginateListWhatIfForecasts;
7
+ exports.paginateListWhatIfForecasts = (0, core_1.createPaginator)(ForecastClient_1.ForecastClient, ListWhatIfForecastsCommand_1.ListWhatIfForecastsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListDatasetGroupsCommand, } from "../commands/ListDatasetGroupsCommand";
2
3
  import { ForecastClient } from "../ForecastClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListDatasetGroupsCommand(input), ...args);
5
- };
6
- export async function* paginateListDatasetGroups(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof ForecastClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Forecast | ForecastClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListDatasetGroups = createPaginator(ForecastClient, ListDatasetGroupsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListDatasetImportJobsCommand, } from "../commands/ListDatasetImportJobsCommand";
2
3
  import { ForecastClient } from "../ForecastClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListDatasetImportJobsCommand(input), ...args);
5
- };
6
- export async function* paginateListDatasetImportJobs(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof ForecastClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Forecast | ForecastClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListDatasetImportJobs = createPaginator(ForecastClient, ListDatasetImportJobsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListDatasetsCommand, } from "../commands/ListDatasetsCommand";
2
3
  import { ForecastClient } from "../ForecastClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListDatasetsCommand(input), ...args);
5
- };
6
- export async function* paginateListDatasets(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof ForecastClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Forecast | ForecastClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListDatasets = createPaginator(ForecastClient, ListDatasetsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListExplainabilitiesCommand, } from "../commands/ListExplainabilitiesCommand";
2
3
  import { ForecastClient } from "../ForecastClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListExplainabilitiesCommand(input), ...args);
5
- };
6
- export async function* paginateListExplainabilities(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof ForecastClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Forecast | ForecastClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListExplainabilities = createPaginator(ForecastClient, ListExplainabilitiesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListExplainabilityExportsCommand, } from "../commands/ListExplainabilityExportsCommand";
2
3
  import { ForecastClient } from "../ForecastClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListExplainabilityExportsCommand(input), ...args);
5
- };
6
- export async function* paginateListExplainabilityExports(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof ForecastClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Forecast | ForecastClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListExplainabilityExports = createPaginator(ForecastClient, ListExplainabilityExportsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListForecastExportJobsCommand, } from "../commands/ListForecastExportJobsCommand";
2
3
  import { ForecastClient } from "../ForecastClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListForecastExportJobsCommand(input), ...args);
5
- };
6
- export async function* paginateListForecastExportJobs(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof ForecastClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Forecast | ForecastClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListForecastExportJobs = createPaginator(ForecastClient, ListForecastExportJobsCommand, "NextToken", "NextToken", "MaxResults");