@aws-sdk/client-m2 3.477.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 (37) hide show
  1. package/dist-cjs/pagination/ListApplicationVersionsPaginator.js +2 -24
  2. package/dist-cjs/pagination/ListApplicationsPaginator.js +2 -24
  3. package/dist-cjs/pagination/ListBatchJobDefinitionsPaginator.js +2 -24
  4. package/dist-cjs/pagination/ListBatchJobExecutionsPaginator.js +2 -24
  5. package/dist-cjs/pagination/ListDataSetImportHistoryPaginator.js +2 -24
  6. package/dist-cjs/pagination/ListDataSetsPaginator.js +2 -24
  7. package/dist-cjs/pagination/ListDeploymentsPaginator.js +2 -24
  8. package/dist-cjs/pagination/ListEngineVersionsPaginator.js +2 -24
  9. package/dist-cjs/pagination/ListEnvironmentsPaginator.js +2 -24
  10. package/dist-es/pagination/ListApplicationVersionsPaginator.js +2 -23
  11. package/dist-es/pagination/ListApplicationsPaginator.js +2 -23
  12. package/dist-es/pagination/ListBatchJobDefinitionsPaginator.js +2 -23
  13. package/dist-es/pagination/ListBatchJobExecutionsPaginator.js +2 -23
  14. package/dist-es/pagination/ListDataSetImportHistoryPaginator.js +2 -23
  15. package/dist-es/pagination/ListDataSetsPaginator.js +2 -23
  16. package/dist-es/pagination/ListDeploymentsPaginator.js +2 -23
  17. package/dist-es/pagination/ListEngineVersionsPaginator.js +2 -23
  18. package/dist-es/pagination/ListEnvironmentsPaginator.js +2 -23
  19. package/dist-types/pagination/ListApplicationVersionsPaginator.d.ts +1 -1
  20. package/dist-types/pagination/ListApplicationsPaginator.d.ts +1 -1
  21. package/dist-types/pagination/ListBatchJobDefinitionsPaginator.d.ts +1 -1
  22. package/dist-types/pagination/ListBatchJobExecutionsPaginator.d.ts +1 -1
  23. package/dist-types/pagination/ListDataSetImportHistoryPaginator.d.ts +1 -1
  24. package/dist-types/pagination/ListDataSetsPaginator.d.ts +1 -1
  25. package/dist-types/pagination/ListDeploymentsPaginator.d.ts +1 -1
  26. package/dist-types/pagination/ListEngineVersionsPaginator.d.ts +1 -1
  27. package/dist-types/pagination/ListEnvironmentsPaginator.d.ts +1 -1
  28. package/dist-types/ts3.4/pagination/ListApplicationVersionsPaginator.d.ts +3 -3
  29. package/dist-types/ts3.4/pagination/ListApplicationsPaginator.d.ts +3 -3
  30. package/dist-types/ts3.4/pagination/ListBatchJobDefinitionsPaginator.d.ts +3 -3
  31. package/dist-types/ts3.4/pagination/ListBatchJobExecutionsPaginator.d.ts +3 -3
  32. package/dist-types/ts3.4/pagination/ListDataSetImportHistoryPaginator.d.ts +3 -3
  33. package/dist-types/ts3.4/pagination/ListDataSetsPaginator.d.ts +3 -3
  34. package/dist-types/ts3.4/pagination/ListDeploymentsPaginator.d.ts +3 -3
  35. package/dist-types/ts3.4/pagination/ListEngineVersionsPaginator.d.ts +3 -3
  36. package/dist-types/ts3.4/pagination/ListEnvironmentsPaginator.d.ts +3 -3
  37. package/package.json +5 -5
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListApplicationVersions = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListApplicationVersionsCommand_1 = require("../commands/ListApplicationVersionsCommand");
5
6
  const M2Client_1 = require("../M2Client");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListApplicationVersionsCommand_1.ListApplicationVersionsCommand(input), ...args);
8
- };
9
- async function* paginateListApplicationVersions(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 M2Client_1.M2Client) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected M2 | M2Client");
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.paginateListApplicationVersions = paginateListApplicationVersions;
7
+ exports.paginateListApplicationVersions = (0, core_1.createPaginator)(M2Client_1.M2Client, ListApplicationVersionsCommand_1.ListApplicationVersionsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListApplications = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListApplicationsCommand_1 = require("../commands/ListApplicationsCommand");
5
6
  const M2Client_1 = require("../M2Client");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListApplicationsCommand_1.ListApplicationsCommand(input), ...args);
8
- };
9
- async function* paginateListApplications(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 M2Client_1.M2Client) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected M2 | M2Client");
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.paginateListApplications = paginateListApplications;
7
+ exports.paginateListApplications = (0, core_1.createPaginator)(M2Client_1.M2Client, ListApplicationsCommand_1.ListApplicationsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListBatchJobDefinitions = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListBatchJobDefinitionsCommand_1 = require("../commands/ListBatchJobDefinitionsCommand");
5
6
  const M2Client_1 = require("../M2Client");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListBatchJobDefinitionsCommand_1.ListBatchJobDefinitionsCommand(input), ...args);
8
- };
9
- async function* paginateListBatchJobDefinitions(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 M2Client_1.M2Client) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected M2 | M2Client");
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.paginateListBatchJobDefinitions = paginateListBatchJobDefinitions;
7
+ exports.paginateListBatchJobDefinitions = (0, core_1.createPaginator)(M2Client_1.M2Client, ListBatchJobDefinitionsCommand_1.ListBatchJobDefinitionsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListBatchJobExecutions = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListBatchJobExecutionsCommand_1 = require("../commands/ListBatchJobExecutionsCommand");
5
6
  const M2Client_1 = require("../M2Client");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListBatchJobExecutionsCommand_1.ListBatchJobExecutionsCommand(input), ...args);
8
- };
9
- async function* paginateListBatchJobExecutions(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 M2Client_1.M2Client) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected M2 | M2Client");
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.paginateListBatchJobExecutions = paginateListBatchJobExecutions;
7
+ exports.paginateListBatchJobExecutions = (0, core_1.createPaginator)(M2Client_1.M2Client, ListBatchJobExecutionsCommand_1.ListBatchJobExecutionsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListDataSetImportHistory = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListDataSetImportHistoryCommand_1 = require("../commands/ListDataSetImportHistoryCommand");
5
6
  const M2Client_1 = require("../M2Client");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListDataSetImportHistoryCommand_1.ListDataSetImportHistoryCommand(input), ...args);
8
- };
9
- async function* paginateListDataSetImportHistory(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 M2Client_1.M2Client) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected M2 | M2Client");
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.paginateListDataSetImportHistory = paginateListDataSetImportHistory;
7
+ exports.paginateListDataSetImportHistory = (0, core_1.createPaginator)(M2Client_1.M2Client, ListDataSetImportHistoryCommand_1.ListDataSetImportHistoryCommand, "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 M2Client_1 = require("../M2Client");
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 M2Client_1.M2Client) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected M2 | M2Client");
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)(M2Client_1.M2Client, 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.paginateListDeployments = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListDeploymentsCommand_1 = require("../commands/ListDeploymentsCommand");
5
6
  const M2Client_1 = require("../M2Client");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListDeploymentsCommand_1.ListDeploymentsCommand(input), ...args);
8
- };
9
- async function* paginateListDeployments(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 M2Client_1.M2Client) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected M2 | M2Client");
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.paginateListDeployments = paginateListDeployments;
7
+ exports.paginateListDeployments = (0, core_1.createPaginator)(M2Client_1.M2Client, ListDeploymentsCommand_1.ListDeploymentsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListEngineVersions = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListEngineVersionsCommand_1 = require("../commands/ListEngineVersionsCommand");
5
6
  const M2Client_1 = require("../M2Client");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListEngineVersionsCommand_1.ListEngineVersionsCommand(input), ...args);
8
- };
9
- async function* paginateListEngineVersions(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 M2Client_1.M2Client) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected M2 | M2Client");
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.paginateListEngineVersions = paginateListEngineVersions;
7
+ exports.paginateListEngineVersions = (0, core_1.createPaginator)(M2Client_1.M2Client, ListEngineVersionsCommand_1.ListEngineVersionsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListEnvironments = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListEnvironmentsCommand_1 = require("../commands/ListEnvironmentsCommand");
5
6
  const M2Client_1 = require("../M2Client");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListEnvironmentsCommand_1.ListEnvironmentsCommand(input), ...args);
8
- };
9
- async function* paginateListEnvironments(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 M2Client_1.M2Client) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected M2 | M2Client");
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.paginateListEnvironments = paginateListEnvironments;
7
+ exports.paginateListEnvironments = (0, core_1.createPaginator)(M2Client_1.M2Client, ListEnvironmentsCommand_1.ListEnvironmentsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListApplicationVersionsCommand, } from "../commands/ListApplicationVersionsCommand";
2
3
  import { M2Client } from "../M2Client";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListApplicationVersionsCommand(input), ...args);
5
- };
6
- export async function* paginateListApplicationVersions(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 M2Client) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected M2 | M2Client");
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 paginateListApplicationVersions = createPaginator(M2Client, ListApplicationVersionsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListApplicationsCommand, } from "../commands/ListApplicationsCommand";
2
3
  import { M2Client } from "../M2Client";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListApplicationsCommand(input), ...args);
5
- };
6
- export async function* paginateListApplications(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 M2Client) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected M2 | M2Client");
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 paginateListApplications = createPaginator(M2Client, ListApplicationsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListBatchJobDefinitionsCommand, } from "../commands/ListBatchJobDefinitionsCommand";
2
3
  import { M2Client } from "../M2Client";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListBatchJobDefinitionsCommand(input), ...args);
5
- };
6
- export async function* paginateListBatchJobDefinitions(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 M2Client) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected M2 | M2Client");
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 paginateListBatchJobDefinitions = createPaginator(M2Client, ListBatchJobDefinitionsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListBatchJobExecutionsCommand, } from "../commands/ListBatchJobExecutionsCommand";
2
3
  import { M2Client } from "../M2Client";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListBatchJobExecutionsCommand(input), ...args);
5
- };
6
- export async function* paginateListBatchJobExecutions(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 M2Client) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected M2 | M2Client");
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 paginateListBatchJobExecutions = createPaginator(M2Client, ListBatchJobExecutionsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListDataSetImportHistoryCommand, } from "../commands/ListDataSetImportHistoryCommand";
2
3
  import { M2Client } from "../M2Client";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListDataSetImportHistoryCommand(input), ...args);
5
- };
6
- export async function* paginateListDataSetImportHistory(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 M2Client) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected M2 | M2Client");
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 paginateListDataSetImportHistory = createPaginator(M2Client, ListDataSetImportHistoryCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListDataSetsCommand, } from "../commands/ListDataSetsCommand";
2
3
  import { M2Client } from "../M2Client";
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 M2Client) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected M2 | M2Client");
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(M2Client, ListDataSetsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListDeploymentsCommand, } from "../commands/ListDeploymentsCommand";
2
3
  import { M2Client } from "../M2Client";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListDeploymentsCommand(input), ...args);
5
- };
6
- export async function* paginateListDeployments(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 M2Client) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected M2 | M2Client");
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 paginateListDeployments = createPaginator(M2Client, ListDeploymentsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListEngineVersionsCommand, } from "../commands/ListEngineVersionsCommand";
2
3
  import { M2Client } from "../M2Client";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListEngineVersionsCommand(input), ...args);
5
- };
6
- export async function* paginateListEngineVersions(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 M2Client) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected M2 | M2Client");
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 paginateListEngineVersions = createPaginator(M2Client, ListEngineVersionsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListEnvironmentsCommand, } from "../commands/ListEnvironmentsCommand";
2
3
  import { M2Client } from "../M2Client";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListEnvironmentsCommand(input), ...args);
5
- };
6
- export async function* paginateListEnvironments(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 M2Client) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected M2 | M2Client");
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 paginateListEnvironments = createPaginator(M2Client, ListEnvironmentsCommand, "nextToken", "nextToken", "maxResults");
@@ -4,4 +4,4 @@ import { M2PaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListApplicationVersions(config: M2PaginationConfiguration, input: ListApplicationVersionsCommandInput, ...additionalArguments: any): Paginator<ListApplicationVersionsCommandOutput>;
7
+ export declare const paginateListApplicationVersions: (config: M2PaginationConfiguration, input: ListApplicationVersionsCommandInput, ...rest: any[]) => Paginator<ListApplicationVersionsCommandOutput>;
@@ -4,4 +4,4 @@ import { M2PaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListApplications(config: M2PaginationConfiguration, input: ListApplicationsCommandInput, ...additionalArguments: any): Paginator<ListApplicationsCommandOutput>;
7
+ export declare const paginateListApplications: (config: M2PaginationConfiguration, input: ListApplicationsCommandInput, ...rest: any[]) => Paginator<ListApplicationsCommandOutput>;
@@ -4,4 +4,4 @@ import { M2PaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListBatchJobDefinitions(config: M2PaginationConfiguration, input: ListBatchJobDefinitionsCommandInput, ...additionalArguments: any): Paginator<ListBatchJobDefinitionsCommandOutput>;
7
+ export declare const paginateListBatchJobDefinitions: (config: M2PaginationConfiguration, input: ListBatchJobDefinitionsCommandInput, ...rest: any[]) => Paginator<ListBatchJobDefinitionsCommandOutput>;
@@ -4,4 +4,4 @@ import { M2PaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListBatchJobExecutions(config: M2PaginationConfiguration, input: ListBatchJobExecutionsCommandInput, ...additionalArguments: any): Paginator<ListBatchJobExecutionsCommandOutput>;
7
+ export declare const paginateListBatchJobExecutions: (config: M2PaginationConfiguration, input: ListBatchJobExecutionsCommandInput, ...rest: any[]) => Paginator<ListBatchJobExecutionsCommandOutput>;
@@ -4,4 +4,4 @@ import { M2PaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListDataSetImportHistory(config: M2PaginationConfiguration, input: ListDataSetImportHistoryCommandInput, ...additionalArguments: any): Paginator<ListDataSetImportHistoryCommandOutput>;
7
+ export declare const paginateListDataSetImportHistory: (config: M2PaginationConfiguration, input: ListDataSetImportHistoryCommandInput, ...rest: any[]) => Paginator<ListDataSetImportHistoryCommandOutput>;
@@ -4,4 +4,4 @@ import { M2PaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListDataSets(config: M2PaginationConfiguration, input: ListDataSetsCommandInput, ...additionalArguments: any): Paginator<ListDataSetsCommandOutput>;
7
+ export declare const paginateListDataSets: (config: M2PaginationConfiguration, input: ListDataSetsCommandInput, ...rest: any[]) => Paginator<ListDataSetsCommandOutput>;
@@ -4,4 +4,4 @@ import { M2PaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListDeployments(config: M2PaginationConfiguration, input: ListDeploymentsCommandInput, ...additionalArguments: any): Paginator<ListDeploymentsCommandOutput>;
7
+ export declare const paginateListDeployments: (config: M2PaginationConfiguration, input: ListDeploymentsCommandInput, ...rest: any[]) => Paginator<ListDeploymentsCommandOutput>;
@@ -4,4 +4,4 @@ import { M2PaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListEngineVersions(config: M2PaginationConfiguration, input: ListEngineVersionsCommandInput, ...additionalArguments: any): Paginator<ListEngineVersionsCommandOutput>;
7
+ export declare const paginateListEngineVersions: (config: M2PaginationConfiguration, input: ListEngineVersionsCommandInput, ...rest: any[]) => Paginator<ListEngineVersionsCommandOutput>;
@@ -4,4 +4,4 @@ import { M2PaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListEnvironments(config: M2PaginationConfiguration, input: ListEnvironmentsCommandInput, ...additionalArguments: any): Paginator<ListEnvironmentsCommandOutput>;
7
+ export declare const paginateListEnvironments: (config: M2PaginationConfiguration, input: ListEnvironmentsCommandInput, ...rest: any[]) => Paginator<ListEnvironmentsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListApplicationVersionsCommandOutput,
5
5
  } from "../commands/ListApplicationVersionsCommand";
6
6
  import { M2PaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListApplicationVersions(
7
+ export declare const paginateListApplicationVersions: (
8
8
  config: M2PaginationConfiguration,
9
9
  input: ListApplicationVersionsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListApplicationVersionsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListApplicationVersionsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListApplicationsCommandOutput,
5
5
  } from "../commands/ListApplicationsCommand";
6
6
  import { M2PaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListApplications(
7
+ export declare const paginateListApplications: (
8
8
  config: M2PaginationConfiguration,
9
9
  input: ListApplicationsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListApplicationsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListApplicationsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListBatchJobDefinitionsCommandOutput,
5
5
  } from "../commands/ListBatchJobDefinitionsCommand";
6
6
  import { M2PaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListBatchJobDefinitions(
7
+ export declare const paginateListBatchJobDefinitions: (
8
8
  config: M2PaginationConfiguration,
9
9
  input: ListBatchJobDefinitionsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListBatchJobDefinitionsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListBatchJobDefinitionsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListBatchJobExecutionsCommandOutput,
5
5
  } from "../commands/ListBatchJobExecutionsCommand";
6
6
  import { M2PaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListBatchJobExecutions(
7
+ export declare const paginateListBatchJobExecutions: (
8
8
  config: M2PaginationConfiguration,
9
9
  input: ListBatchJobExecutionsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListBatchJobExecutionsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListBatchJobExecutionsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListDataSetImportHistoryCommandOutput,
5
5
  } from "../commands/ListDataSetImportHistoryCommand";
6
6
  import { M2PaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListDataSetImportHistory(
7
+ export declare const paginateListDataSetImportHistory: (
8
8
  config: M2PaginationConfiguration,
9
9
  input: ListDataSetImportHistoryCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListDataSetImportHistoryCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListDataSetImportHistoryCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListDataSetsCommandOutput,
5
5
  } from "../commands/ListDataSetsCommand";
6
6
  import { M2PaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListDataSets(
7
+ export declare const paginateListDataSets: (
8
8
  config: M2PaginationConfiguration,
9
9
  input: ListDataSetsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListDataSetsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListDataSetsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListDeploymentsCommandOutput,
5
5
  } from "../commands/ListDeploymentsCommand";
6
6
  import { M2PaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListDeployments(
7
+ export declare const paginateListDeployments: (
8
8
  config: M2PaginationConfiguration,
9
9
  input: ListDeploymentsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListDeploymentsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListDeploymentsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListEngineVersionsCommandOutput,
5
5
  } from "../commands/ListEngineVersionsCommand";
6
6
  import { M2PaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListEngineVersions(
7
+ export declare const paginateListEngineVersions: (
8
8
  config: M2PaginationConfiguration,
9
9
  input: ListEngineVersionsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListEngineVersionsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListEngineVersionsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListEnvironmentsCommandOutput,
5
5
  } from "../commands/ListEnvironmentsCommand";
6
6
  import { M2PaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListEnvironments(
7
+ export declare const paginateListEnvironments: (
8
8
  config: M2PaginationConfiguration,
9
9
  input: ListEnvironmentsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListEnvironmentsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListEnvironmentsCommandOutput>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-m2",
3
3
  "description": "AWS SDK for JavaScript M2 Client for Node.js, Browser and React Native",
4
- "version": "3.477.0",
4
+ "version": "3.478.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",
@@ -20,17 +20,17 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.477.0",
23
+ "@aws-sdk/client-sts": "3.478.0",
24
24
  "@aws-sdk/core": "3.477.0",
25
- "@aws-sdk/credential-provider-node": "3.477.0",
25
+ "@aws-sdk/credential-provider-node": "3.478.0",
26
26
  "@aws-sdk/middleware-host-header": "3.468.0",
27
27
  "@aws-sdk/middleware-logger": "3.468.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.468.0",
29
29
  "@aws-sdk/middleware-signing": "3.468.0",
30
- "@aws-sdk/middleware-user-agent": "3.470.0",
30
+ "@aws-sdk/middleware-user-agent": "3.478.0",
31
31
  "@aws-sdk/region-config-resolver": "3.470.0",
32
32
  "@aws-sdk/types": "3.468.0",
33
- "@aws-sdk/util-endpoints": "3.470.0",
33
+ "@aws-sdk/util-endpoints": "3.478.0",
34
34
  "@aws-sdk/util-user-agent-browser": "3.468.0",
35
35
  "@aws-sdk/util-user-agent-node": "3.470.0",
36
36
  "@smithy/config-resolver": "^2.0.21",