@aws-sdk/client-appfabric 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.
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { AppFabricClient } from "../AppFabricClient";
2
3
  import { ListAppAuthorizationsCommand, } from "../commands/ListAppAuthorizationsCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListAppAuthorizationsCommand(input), ...args);
5
- };
6
- export async function* paginateListAppAuthorizations(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 AppFabricClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected AppFabric | AppFabricClient");
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 paginateListAppAuthorizations = createPaginator(AppFabricClient, ListAppAuthorizationsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { AppFabricClient } from "../AppFabricClient";
2
3
  import { ListAppBundlesCommand, } from "../commands/ListAppBundlesCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListAppBundlesCommand(input), ...args);
5
- };
6
- export async function* paginateListAppBundles(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 AppFabricClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected AppFabric | AppFabricClient");
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 paginateListAppBundles = createPaginator(AppFabricClient, ListAppBundlesCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { AppFabricClient } from "../AppFabricClient";
2
3
  import { ListIngestionDestinationsCommand, } from "../commands/ListIngestionDestinationsCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListIngestionDestinationsCommand(input), ...args);
5
- };
6
- export async function* paginateListIngestionDestinations(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 AppFabricClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected AppFabric | AppFabricClient");
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 paginateListIngestionDestinations = createPaginator(AppFabricClient, ListIngestionDestinationsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { AppFabricClient } from "../AppFabricClient";
2
3
  import { ListIngestionsCommand, } from "../commands/ListIngestionsCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListIngestionsCommand(input), ...args);
5
- };
6
- export async function* paginateListIngestions(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 AppFabricClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected AppFabric | AppFabricClient");
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 paginateListIngestions = createPaginator(AppFabricClient, ListIngestionsCommand, "nextToken", "nextToken", "maxResults");