@aws-sdk/client-mediapackagev2 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.
- package/dist-cjs/pagination/ListChannelGroupsPaginator.js +2 -24
- package/dist-cjs/pagination/ListChannelsPaginator.js +2 -24
- package/dist-cjs/pagination/ListOriginEndpointsPaginator.js +2 -24
- package/dist-cjs/protocols/Aws_restJson1.js +158 -336
- package/dist-es/pagination/ListChannelGroupsPaginator.js +2 -23
- package/dist-es/pagination/ListChannelsPaginator.js +2 -23
- package/dist-es/pagination/ListOriginEndpointsPaginator.js +2 -23
- package/dist-es/protocols/Aws_restJson1.js +159 -337
- package/dist-types/pagination/ListChannelGroupsPaginator.d.ts +1 -1
- package/dist-types/pagination/ListChannelsPaginator.d.ts +1 -1
- package/dist-types/pagination/ListOriginEndpointsPaginator.d.ts +1 -1
- package/dist-types/ts3.4/pagination/ListChannelGroupsPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListChannelsPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListOriginEndpointsPaginator.d.ts +3 -3
- package/package.json +7 -6
|
@@ -1,25 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
1
2
|
import { ListChannelGroupsCommand, } from "../commands/ListChannelGroupsCommand";
|
|
2
3
|
import { MediaPackageV2Client } from "../MediaPackageV2Client";
|
|
3
|
-
const
|
|
4
|
-
return await client.send(new ListChannelGroupsCommand(input), ...args);
|
|
5
|
-
};
|
|
6
|
-
export async function* paginateListChannelGroups(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 MediaPackageV2Client) {
|
|
14
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
throw new Error("Invalid client, expected MediaPackageV2 | MediaPackageV2Client");
|
|
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 paginateListChannelGroups = createPaginator(MediaPackageV2Client, ListChannelGroupsCommand, "NextToken", "NextToken", "MaxResults");
|
|
@@ -1,25 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
1
2
|
import { ListChannelsCommand, } from "../commands/ListChannelsCommand";
|
|
2
3
|
import { MediaPackageV2Client } from "../MediaPackageV2Client";
|
|
3
|
-
const
|
|
4
|
-
return await client.send(new ListChannelsCommand(input), ...args);
|
|
5
|
-
};
|
|
6
|
-
export async function* paginateListChannels(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 MediaPackageV2Client) {
|
|
14
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
throw new Error("Invalid client, expected MediaPackageV2 | MediaPackageV2Client");
|
|
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 paginateListChannels = createPaginator(MediaPackageV2Client, ListChannelsCommand, "NextToken", "NextToken", "MaxResults");
|
|
@@ -1,25 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
1
2
|
import { ListOriginEndpointsCommand, } from "../commands/ListOriginEndpointsCommand";
|
|
2
3
|
import { MediaPackageV2Client } from "../MediaPackageV2Client";
|
|
3
|
-
const
|
|
4
|
-
return await client.send(new ListOriginEndpointsCommand(input), ...args);
|
|
5
|
-
};
|
|
6
|
-
export async function* paginateListOriginEndpoints(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 MediaPackageV2Client) {
|
|
14
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
throw new Error("Invalid client, expected MediaPackageV2 | MediaPackageV2Client");
|
|
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 paginateListOriginEndpoints = createPaginator(MediaPackageV2Client, ListOriginEndpointsCommand, "NextToken", "NextToken", "MaxResults");
|