@aws-sdk/client-wellarchitected 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 (79) hide show
  1. package/dist-cjs/pagination/GetConsolidatedReportPaginator.js +2 -24
  2. package/dist-cjs/pagination/ListAnswersPaginator.js +2 -24
  3. package/dist-cjs/pagination/ListCheckDetailsPaginator.js +2 -24
  4. package/dist-cjs/pagination/ListCheckSummariesPaginator.js +2 -24
  5. package/dist-cjs/pagination/ListLensReviewImprovementsPaginator.js +2 -24
  6. package/dist-cjs/pagination/ListLensReviewsPaginator.js +2 -24
  7. package/dist-cjs/pagination/ListLensSharesPaginator.js +2 -24
  8. package/dist-cjs/pagination/ListLensesPaginator.js +2 -24
  9. package/dist-cjs/pagination/ListMilestonesPaginator.js +2 -24
  10. package/dist-cjs/pagination/ListNotificationsPaginator.js +2 -24
  11. package/dist-cjs/pagination/ListProfileNotificationsPaginator.js +2 -24
  12. package/dist-cjs/pagination/ListProfileSharesPaginator.js +2 -24
  13. package/dist-cjs/pagination/ListProfilesPaginator.js +2 -24
  14. package/dist-cjs/pagination/ListReviewTemplateAnswersPaginator.js +2 -24
  15. package/dist-cjs/pagination/ListReviewTemplatesPaginator.js +2 -24
  16. package/dist-cjs/pagination/ListShareInvitationsPaginator.js +2 -24
  17. package/dist-cjs/pagination/ListTemplateSharesPaginator.js +2 -24
  18. package/dist-cjs/pagination/ListWorkloadSharesPaginator.js +2 -24
  19. package/dist-cjs/pagination/ListWorkloadsPaginator.js +2 -24
  20. package/dist-cjs/protocols/Aws_restJson1.js +464 -980
  21. package/dist-es/pagination/GetConsolidatedReportPaginator.js +2 -23
  22. package/dist-es/pagination/ListAnswersPaginator.js +2 -23
  23. package/dist-es/pagination/ListCheckDetailsPaginator.js +2 -23
  24. package/dist-es/pagination/ListCheckSummariesPaginator.js +2 -23
  25. package/dist-es/pagination/ListLensReviewImprovementsPaginator.js +2 -23
  26. package/dist-es/pagination/ListLensReviewsPaginator.js +2 -23
  27. package/dist-es/pagination/ListLensSharesPaginator.js +2 -23
  28. package/dist-es/pagination/ListLensesPaginator.js +2 -23
  29. package/dist-es/pagination/ListMilestonesPaginator.js +2 -23
  30. package/dist-es/pagination/ListNotificationsPaginator.js +2 -23
  31. package/dist-es/pagination/ListProfileNotificationsPaginator.js +2 -23
  32. package/dist-es/pagination/ListProfileSharesPaginator.js +2 -23
  33. package/dist-es/pagination/ListProfilesPaginator.js +2 -23
  34. package/dist-es/pagination/ListReviewTemplateAnswersPaginator.js +2 -23
  35. package/dist-es/pagination/ListReviewTemplatesPaginator.js +2 -23
  36. package/dist-es/pagination/ListShareInvitationsPaginator.js +2 -23
  37. package/dist-es/pagination/ListTemplateSharesPaginator.js +2 -23
  38. package/dist-es/pagination/ListWorkloadSharesPaginator.js +2 -23
  39. package/dist-es/pagination/ListWorkloadsPaginator.js +2 -23
  40. package/dist-es/protocols/Aws_restJson1.js +465 -981
  41. package/dist-types/pagination/GetConsolidatedReportPaginator.d.ts +1 -1
  42. package/dist-types/pagination/ListAnswersPaginator.d.ts +1 -1
  43. package/dist-types/pagination/ListCheckDetailsPaginator.d.ts +1 -1
  44. package/dist-types/pagination/ListCheckSummariesPaginator.d.ts +1 -1
  45. package/dist-types/pagination/ListLensReviewImprovementsPaginator.d.ts +1 -1
  46. package/dist-types/pagination/ListLensReviewsPaginator.d.ts +1 -1
  47. package/dist-types/pagination/ListLensSharesPaginator.d.ts +1 -1
  48. package/dist-types/pagination/ListLensesPaginator.d.ts +1 -1
  49. package/dist-types/pagination/ListMilestonesPaginator.d.ts +1 -1
  50. package/dist-types/pagination/ListNotificationsPaginator.d.ts +1 -1
  51. package/dist-types/pagination/ListProfileNotificationsPaginator.d.ts +1 -1
  52. package/dist-types/pagination/ListProfileSharesPaginator.d.ts +1 -1
  53. package/dist-types/pagination/ListProfilesPaginator.d.ts +1 -1
  54. package/dist-types/pagination/ListReviewTemplateAnswersPaginator.d.ts +1 -1
  55. package/dist-types/pagination/ListReviewTemplatesPaginator.d.ts +1 -1
  56. package/dist-types/pagination/ListShareInvitationsPaginator.d.ts +1 -1
  57. package/dist-types/pagination/ListTemplateSharesPaginator.d.ts +1 -1
  58. package/dist-types/pagination/ListWorkloadSharesPaginator.d.ts +1 -1
  59. package/dist-types/pagination/ListWorkloadsPaginator.d.ts +1 -1
  60. package/dist-types/ts3.4/pagination/GetConsolidatedReportPaginator.d.ts +3 -3
  61. package/dist-types/ts3.4/pagination/ListAnswersPaginator.d.ts +3 -3
  62. package/dist-types/ts3.4/pagination/ListCheckDetailsPaginator.d.ts +3 -3
  63. package/dist-types/ts3.4/pagination/ListCheckSummariesPaginator.d.ts +3 -3
  64. package/dist-types/ts3.4/pagination/ListLensReviewImprovementsPaginator.d.ts +3 -3
  65. package/dist-types/ts3.4/pagination/ListLensReviewsPaginator.d.ts +3 -3
  66. package/dist-types/ts3.4/pagination/ListLensSharesPaginator.d.ts +3 -3
  67. package/dist-types/ts3.4/pagination/ListLensesPaginator.d.ts +3 -3
  68. package/dist-types/ts3.4/pagination/ListMilestonesPaginator.d.ts +3 -3
  69. package/dist-types/ts3.4/pagination/ListNotificationsPaginator.d.ts +3 -3
  70. package/dist-types/ts3.4/pagination/ListProfileNotificationsPaginator.d.ts +3 -3
  71. package/dist-types/ts3.4/pagination/ListProfileSharesPaginator.d.ts +3 -3
  72. package/dist-types/ts3.4/pagination/ListProfilesPaginator.d.ts +3 -3
  73. package/dist-types/ts3.4/pagination/ListReviewTemplateAnswersPaginator.d.ts +3 -3
  74. package/dist-types/ts3.4/pagination/ListReviewTemplatesPaginator.d.ts +3 -3
  75. package/dist-types/ts3.4/pagination/ListShareInvitationsPaginator.d.ts +3 -3
  76. package/dist-types/ts3.4/pagination/ListTemplateSharesPaginator.d.ts +3 -3
  77. package/dist-types/ts3.4/pagination/ListWorkloadSharesPaginator.d.ts +3 -3
  78. package/dist-types/ts3.4/pagination/ListWorkloadsPaginator.d.ts +3 -3
  79. package/package.json +7 -6
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { GetConsolidatedReportCommand, } from "../commands/GetConsolidatedReportCommand";
2
3
  import { WellArchitectedClient } from "../WellArchitectedClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new GetConsolidatedReportCommand(input), ...args);
5
- };
6
- export async function* paginateGetConsolidatedReport(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 WellArchitectedClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected WellArchitected | WellArchitectedClient");
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 paginateGetConsolidatedReport = createPaginator(WellArchitectedClient, GetConsolidatedReportCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListAnswersCommand } from "../commands/ListAnswersCommand";
2
3
  import { WellArchitectedClient } from "../WellArchitectedClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListAnswersCommand(input), ...args);
5
- };
6
- export async function* paginateListAnswers(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 WellArchitectedClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected WellArchitected | WellArchitectedClient");
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 paginateListAnswers = createPaginator(WellArchitectedClient, ListAnswersCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListCheckDetailsCommand, } from "../commands/ListCheckDetailsCommand";
2
3
  import { WellArchitectedClient } from "../WellArchitectedClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListCheckDetailsCommand(input), ...args);
5
- };
6
- export async function* paginateListCheckDetails(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 WellArchitectedClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected WellArchitected | WellArchitectedClient");
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 paginateListCheckDetails = createPaginator(WellArchitectedClient, ListCheckDetailsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListCheckSummariesCommand, } from "../commands/ListCheckSummariesCommand";
2
3
  import { WellArchitectedClient } from "../WellArchitectedClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListCheckSummariesCommand(input), ...args);
5
- };
6
- export async function* paginateListCheckSummaries(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 WellArchitectedClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected WellArchitected | WellArchitectedClient");
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 paginateListCheckSummaries = createPaginator(WellArchitectedClient, ListCheckSummariesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListLensReviewImprovementsCommand, } from "../commands/ListLensReviewImprovementsCommand";
2
3
  import { WellArchitectedClient } from "../WellArchitectedClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListLensReviewImprovementsCommand(input), ...args);
5
- };
6
- export async function* paginateListLensReviewImprovements(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 WellArchitectedClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected WellArchitected | WellArchitectedClient");
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 paginateListLensReviewImprovements = createPaginator(WellArchitectedClient, ListLensReviewImprovementsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListLensReviewsCommand, } from "../commands/ListLensReviewsCommand";
2
3
  import { WellArchitectedClient } from "../WellArchitectedClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListLensReviewsCommand(input), ...args);
5
- };
6
- export async function* paginateListLensReviews(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 WellArchitectedClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected WellArchitected | WellArchitectedClient");
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 paginateListLensReviews = createPaginator(WellArchitectedClient, ListLensReviewsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListLensSharesCommand, } from "../commands/ListLensSharesCommand";
2
3
  import { WellArchitectedClient } from "../WellArchitectedClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListLensSharesCommand(input), ...args);
5
- };
6
- export async function* paginateListLensShares(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 WellArchitectedClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected WellArchitected | WellArchitectedClient");
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 paginateListLensShares = createPaginator(WellArchitectedClient, ListLensSharesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListLensesCommand } from "../commands/ListLensesCommand";
2
3
  import { WellArchitectedClient } from "../WellArchitectedClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListLensesCommand(input), ...args);
5
- };
6
- export async function* paginateListLenses(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 WellArchitectedClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected WellArchitected | WellArchitectedClient");
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 paginateListLenses = createPaginator(WellArchitectedClient, ListLensesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListMilestonesCommand, } from "../commands/ListMilestonesCommand";
2
3
  import { WellArchitectedClient } from "../WellArchitectedClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListMilestonesCommand(input), ...args);
5
- };
6
- export async function* paginateListMilestones(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 WellArchitectedClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected WellArchitected | WellArchitectedClient");
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 paginateListMilestones = createPaginator(WellArchitectedClient, ListMilestonesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListNotificationsCommand, } from "../commands/ListNotificationsCommand";
2
3
  import { WellArchitectedClient } from "../WellArchitectedClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListNotificationsCommand(input), ...args);
5
- };
6
- export async function* paginateListNotifications(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 WellArchitectedClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected WellArchitected | WellArchitectedClient");
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 paginateListNotifications = createPaginator(WellArchitectedClient, ListNotificationsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListProfileNotificationsCommand, } from "../commands/ListProfileNotificationsCommand";
2
3
  import { WellArchitectedClient } from "../WellArchitectedClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListProfileNotificationsCommand(input), ...args);
5
- };
6
- export async function* paginateListProfileNotifications(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 WellArchitectedClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected WellArchitected | WellArchitectedClient");
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 paginateListProfileNotifications = createPaginator(WellArchitectedClient, ListProfileNotificationsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListProfileSharesCommand, } from "../commands/ListProfileSharesCommand";
2
3
  import { WellArchitectedClient } from "../WellArchitectedClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListProfileSharesCommand(input), ...args);
5
- };
6
- export async function* paginateListProfileShares(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 WellArchitectedClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected WellArchitected | WellArchitectedClient");
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 paginateListProfileShares = createPaginator(WellArchitectedClient, ListProfileSharesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListProfilesCommand, } from "../commands/ListProfilesCommand";
2
3
  import { WellArchitectedClient } from "../WellArchitectedClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListProfilesCommand(input), ...args);
5
- };
6
- export async function* paginateListProfiles(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 WellArchitectedClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected WellArchitected | WellArchitectedClient");
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 paginateListProfiles = createPaginator(WellArchitectedClient, ListProfilesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListReviewTemplateAnswersCommand, } from "../commands/ListReviewTemplateAnswersCommand";
2
3
  import { WellArchitectedClient } from "../WellArchitectedClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListReviewTemplateAnswersCommand(input), ...args);
5
- };
6
- export async function* paginateListReviewTemplateAnswers(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 WellArchitectedClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected WellArchitected | WellArchitectedClient");
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 paginateListReviewTemplateAnswers = createPaginator(WellArchitectedClient, ListReviewTemplateAnswersCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListReviewTemplatesCommand, } from "../commands/ListReviewTemplatesCommand";
2
3
  import { WellArchitectedClient } from "../WellArchitectedClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListReviewTemplatesCommand(input), ...args);
5
- };
6
- export async function* paginateListReviewTemplates(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 WellArchitectedClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected WellArchitected | WellArchitectedClient");
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 paginateListReviewTemplates = createPaginator(WellArchitectedClient, ListReviewTemplatesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListShareInvitationsCommand, } from "../commands/ListShareInvitationsCommand";
2
3
  import { WellArchitectedClient } from "../WellArchitectedClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListShareInvitationsCommand(input), ...args);
5
- };
6
- export async function* paginateListShareInvitations(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 WellArchitectedClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected WellArchitected | WellArchitectedClient");
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 paginateListShareInvitations = createPaginator(WellArchitectedClient, ListShareInvitationsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListTemplateSharesCommand, } from "../commands/ListTemplateSharesCommand";
2
3
  import { WellArchitectedClient } from "../WellArchitectedClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListTemplateSharesCommand(input), ...args);
5
- };
6
- export async function* paginateListTemplateShares(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 WellArchitectedClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected WellArchitected | WellArchitectedClient");
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 paginateListTemplateShares = createPaginator(WellArchitectedClient, ListTemplateSharesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListWorkloadSharesCommand, } from "../commands/ListWorkloadSharesCommand";
2
3
  import { WellArchitectedClient } from "../WellArchitectedClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListWorkloadSharesCommand(input), ...args);
5
- };
6
- export async function* paginateListWorkloadShares(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 WellArchitectedClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected WellArchitected | WellArchitectedClient");
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 paginateListWorkloadShares = createPaginator(WellArchitectedClient, ListWorkloadSharesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListWorkloadsCommand, } from "../commands/ListWorkloadsCommand";
2
3
  import { WellArchitectedClient } from "../WellArchitectedClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListWorkloadsCommand(input), ...args);
5
- };
6
- export async function* paginateListWorkloads(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 WellArchitectedClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected WellArchitected | WellArchitectedClient");
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 paginateListWorkloads = createPaginator(WellArchitectedClient, ListWorkloadsCommand, "NextToken", "NextToken", "MaxResults");