@aws-sdk/client-mediatailor 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 (40) hide show
  1. package/dist-cjs/pagination/GetChannelSchedulePaginator.js +2 -24
  2. package/dist-cjs/pagination/ListAlertsPaginator.js +2 -24
  3. package/dist-cjs/pagination/ListChannelsPaginator.js +2 -24
  4. package/dist-cjs/pagination/ListLiveSourcesPaginator.js +2 -24
  5. package/dist-cjs/pagination/ListPlaybackConfigurationsPaginator.js +2 -24
  6. package/dist-cjs/pagination/ListPrefetchSchedulesPaginator.js +2 -24
  7. package/dist-cjs/pagination/ListSourceLocationsPaginator.js +2 -24
  8. package/dist-cjs/pagination/ListVodSourcesPaginator.js +2 -24
  9. package/dist-cjs/protocols/Aws_restJson1.js +262 -581
  10. package/dist-es/pagination/GetChannelSchedulePaginator.js +2 -23
  11. package/dist-es/pagination/ListAlertsPaginator.js +2 -23
  12. package/dist-es/pagination/ListChannelsPaginator.js +2 -23
  13. package/dist-es/pagination/ListLiveSourcesPaginator.js +2 -23
  14. package/dist-es/pagination/ListPlaybackConfigurationsPaginator.js +2 -23
  15. package/dist-es/pagination/ListPrefetchSchedulesPaginator.js +2 -23
  16. package/dist-es/pagination/ListSourceLocationsPaginator.js +2 -23
  17. package/dist-es/pagination/ListVodSourcesPaginator.js +2 -23
  18. package/dist-es/protocols/Aws_restJson1.js +263 -582
  19. package/dist-types/commands/CreateChannelCommand.d.ts +6 -0
  20. package/dist-types/commands/DescribeChannelCommand.d.ts +3 -0
  21. package/dist-types/commands/UpdateChannelCommand.d.ts +6 -0
  22. package/dist-types/models/models_0.d.ts +51 -0
  23. package/dist-types/pagination/GetChannelSchedulePaginator.d.ts +1 -1
  24. package/dist-types/pagination/ListAlertsPaginator.d.ts +1 -1
  25. package/dist-types/pagination/ListChannelsPaginator.d.ts +1 -1
  26. package/dist-types/pagination/ListLiveSourcesPaginator.d.ts +1 -1
  27. package/dist-types/pagination/ListPlaybackConfigurationsPaginator.d.ts +1 -1
  28. package/dist-types/pagination/ListPrefetchSchedulesPaginator.d.ts +1 -1
  29. package/dist-types/pagination/ListSourceLocationsPaginator.d.ts +1 -1
  30. package/dist-types/pagination/ListVodSourcesPaginator.d.ts +1 -1
  31. package/dist-types/ts3.4/models/models_0.d.ts +8 -0
  32. package/dist-types/ts3.4/pagination/GetChannelSchedulePaginator.d.ts +3 -3
  33. package/dist-types/ts3.4/pagination/ListAlertsPaginator.d.ts +3 -3
  34. package/dist-types/ts3.4/pagination/ListChannelsPaginator.d.ts +3 -3
  35. package/dist-types/ts3.4/pagination/ListLiveSourcesPaginator.d.ts +3 -3
  36. package/dist-types/ts3.4/pagination/ListPlaybackConfigurationsPaginator.d.ts +3 -3
  37. package/dist-types/ts3.4/pagination/ListPrefetchSchedulesPaginator.d.ts +3 -3
  38. package/dist-types/ts3.4/pagination/ListSourceLocationsPaginator.d.ts +3 -3
  39. package/dist-types/ts3.4/pagination/ListVodSourcesPaginator.d.ts +3 -3
  40. package/package.json +7 -6
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { GetChannelScheduleCommand, } from "../commands/GetChannelScheduleCommand";
2
3
  import { MediaTailorClient } from "../MediaTailorClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new GetChannelScheduleCommand(input), ...args);
5
- };
6
- export async function* paginateGetChannelSchedule(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 MediaTailorClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected MediaTailor | MediaTailorClient");
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 paginateGetChannelSchedule = createPaginator(MediaTailorClient, GetChannelScheduleCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListAlertsCommand } from "../commands/ListAlertsCommand";
2
3
  import { MediaTailorClient } from "../MediaTailorClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListAlertsCommand(input), ...args);
5
- };
6
- export async function* paginateListAlerts(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 MediaTailorClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected MediaTailor | MediaTailorClient");
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 paginateListAlerts = createPaginator(MediaTailorClient, ListAlertsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListChannelsCommand, } from "../commands/ListChannelsCommand";
2
3
  import { MediaTailorClient } from "../MediaTailorClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
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 MediaTailorClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected MediaTailor | MediaTailorClient");
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(MediaTailorClient, ListChannelsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListLiveSourcesCommand, } from "../commands/ListLiveSourcesCommand";
2
3
  import { MediaTailorClient } from "../MediaTailorClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListLiveSourcesCommand(input), ...args);
5
- };
6
- export async function* paginateListLiveSources(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 MediaTailorClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected MediaTailor | MediaTailorClient");
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 paginateListLiveSources = createPaginator(MediaTailorClient, ListLiveSourcesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListPlaybackConfigurationsCommand, } from "../commands/ListPlaybackConfigurationsCommand";
2
3
  import { MediaTailorClient } from "../MediaTailorClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListPlaybackConfigurationsCommand(input), ...args);
5
- };
6
- export async function* paginateListPlaybackConfigurations(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 MediaTailorClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected MediaTailor | MediaTailorClient");
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 paginateListPlaybackConfigurations = createPaginator(MediaTailorClient, ListPlaybackConfigurationsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListPrefetchSchedulesCommand, } from "../commands/ListPrefetchSchedulesCommand";
2
3
  import { MediaTailorClient } from "../MediaTailorClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListPrefetchSchedulesCommand(input), ...args);
5
- };
6
- export async function* paginateListPrefetchSchedules(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 MediaTailorClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected MediaTailor | MediaTailorClient");
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 paginateListPrefetchSchedules = createPaginator(MediaTailorClient, ListPrefetchSchedulesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListSourceLocationsCommand, } from "../commands/ListSourceLocationsCommand";
2
3
  import { MediaTailorClient } from "../MediaTailorClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListSourceLocationsCommand(input), ...args);
5
- };
6
- export async function* paginateListSourceLocations(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 MediaTailorClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected MediaTailor | MediaTailorClient");
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 paginateListSourceLocations = createPaginator(MediaTailorClient, ListSourceLocationsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListVodSourcesCommand, } from "../commands/ListVodSourcesCommand";
2
3
  import { MediaTailorClient } from "../MediaTailorClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListVodSourcesCommand(input), ...args);
5
- };
6
- export async function* paginateListVodSources(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 MediaTailorClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected MediaTailor | MediaTailorClient");
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 paginateListVodSources = createPaginator(MediaTailorClient, ListVodSourcesCommand, "NextToken", "NextToken", "MaxResults");