@aws-sdk/client-wellarchitected 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 (77) 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-es/pagination/GetConsolidatedReportPaginator.js +2 -23
  21. package/dist-es/pagination/ListAnswersPaginator.js +2 -23
  22. package/dist-es/pagination/ListCheckDetailsPaginator.js +2 -23
  23. package/dist-es/pagination/ListCheckSummariesPaginator.js +2 -23
  24. package/dist-es/pagination/ListLensReviewImprovementsPaginator.js +2 -23
  25. package/dist-es/pagination/ListLensReviewsPaginator.js +2 -23
  26. package/dist-es/pagination/ListLensSharesPaginator.js +2 -23
  27. package/dist-es/pagination/ListLensesPaginator.js +2 -23
  28. package/dist-es/pagination/ListMilestonesPaginator.js +2 -23
  29. package/dist-es/pagination/ListNotificationsPaginator.js +2 -23
  30. package/dist-es/pagination/ListProfileNotificationsPaginator.js +2 -23
  31. package/dist-es/pagination/ListProfileSharesPaginator.js +2 -23
  32. package/dist-es/pagination/ListProfilesPaginator.js +2 -23
  33. package/dist-es/pagination/ListReviewTemplateAnswersPaginator.js +2 -23
  34. package/dist-es/pagination/ListReviewTemplatesPaginator.js +2 -23
  35. package/dist-es/pagination/ListShareInvitationsPaginator.js +2 -23
  36. package/dist-es/pagination/ListTemplateSharesPaginator.js +2 -23
  37. package/dist-es/pagination/ListWorkloadSharesPaginator.js +2 -23
  38. package/dist-es/pagination/ListWorkloadsPaginator.js +2 -23
  39. package/dist-types/pagination/GetConsolidatedReportPaginator.d.ts +1 -1
  40. package/dist-types/pagination/ListAnswersPaginator.d.ts +1 -1
  41. package/dist-types/pagination/ListCheckDetailsPaginator.d.ts +1 -1
  42. package/dist-types/pagination/ListCheckSummariesPaginator.d.ts +1 -1
  43. package/dist-types/pagination/ListLensReviewImprovementsPaginator.d.ts +1 -1
  44. package/dist-types/pagination/ListLensReviewsPaginator.d.ts +1 -1
  45. package/dist-types/pagination/ListLensSharesPaginator.d.ts +1 -1
  46. package/dist-types/pagination/ListLensesPaginator.d.ts +1 -1
  47. package/dist-types/pagination/ListMilestonesPaginator.d.ts +1 -1
  48. package/dist-types/pagination/ListNotificationsPaginator.d.ts +1 -1
  49. package/dist-types/pagination/ListProfileNotificationsPaginator.d.ts +1 -1
  50. package/dist-types/pagination/ListProfileSharesPaginator.d.ts +1 -1
  51. package/dist-types/pagination/ListProfilesPaginator.d.ts +1 -1
  52. package/dist-types/pagination/ListReviewTemplateAnswersPaginator.d.ts +1 -1
  53. package/dist-types/pagination/ListReviewTemplatesPaginator.d.ts +1 -1
  54. package/dist-types/pagination/ListShareInvitationsPaginator.d.ts +1 -1
  55. package/dist-types/pagination/ListTemplateSharesPaginator.d.ts +1 -1
  56. package/dist-types/pagination/ListWorkloadSharesPaginator.d.ts +1 -1
  57. package/dist-types/pagination/ListWorkloadsPaginator.d.ts +1 -1
  58. package/dist-types/ts3.4/pagination/GetConsolidatedReportPaginator.d.ts +3 -3
  59. package/dist-types/ts3.4/pagination/ListAnswersPaginator.d.ts +3 -3
  60. package/dist-types/ts3.4/pagination/ListCheckDetailsPaginator.d.ts +3 -3
  61. package/dist-types/ts3.4/pagination/ListCheckSummariesPaginator.d.ts +3 -3
  62. package/dist-types/ts3.4/pagination/ListLensReviewImprovementsPaginator.d.ts +3 -3
  63. package/dist-types/ts3.4/pagination/ListLensReviewsPaginator.d.ts +3 -3
  64. package/dist-types/ts3.4/pagination/ListLensSharesPaginator.d.ts +3 -3
  65. package/dist-types/ts3.4/pagination/ListLensesPaginator.d.ts +3 -3
  66. package/dist-types/ts3.4/pagination/ListMilestonesPaginator.d.ts +3 -3
  67. package/dist-types/ts3.4/pagination/ListNotificationsPaginator.d.ts +3 -3
  68. package/dist-types/ts3.4/pagination/ListProfileNotificationsPaginator.d.ts +3 -3
  69. package/dist-types/ts3.4/pagination/ListProfileSharesPaginator.d.ts +3 -3
  70. package/dist-types/ts3.4/pagination/ListProfilesPaginator.d.ts +3 -3
  71. package/dist-types/ts3.4/pagination/ListReviewTemplateAnswersPaginator.d.ts +3 -3
  72. package/dist-types/ts3.4/pagination/ListReviewTemplatesPaginator.d.ts +3 -3
  73. package/dist-types/ts3.4/pagination/ListShareInvitationsPaginator.d.ts +3 -3
  74. package/dist-types/ts3.4/pagination/ListTemplateSharesPaginator.d.ts +3 -3
  75. package/dist-types/ts3.4/pagination/ListWorkloadSharesPaginator.d.ts +3 -3
  76. package/dist-types/ts3.4/pagination/ListWorkloadsPaginator.d.ts +3 -3
  77. package/package.json +5 -5
@@ -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");
@@ -4,4 +4,4 @@ import { WellArchitectedPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateGetConsolidatedReport(config: WellArchitectedPaginationConfiguration, input: GetConsolidatedReportCommandInput, ...additionalArguments: any): Paginator<GetConsolidatedReportCommandOutput>;
7
+ export declare const paginateGetConsolidatedReport: (config: WellArchitectedPaginationConfiguration, input: GetConsolidatedReportCommandInput, ...rest: any[]) => Paginator<GetConsolidatedReportCommandOutput>;
@@ -4,4 +4,4 @@ import { WellArchitectedPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListAnswers(config: WellArchitectedPaginationConfiguration, input: ListAnswersCommandInput, ...additionalArguments: any): Paginator<ListAnswersCommandOutput>;
7
+ export declare const paginateListAnswers: (config: WellArchitectedPaginationConfiguration, input: ListAnswersCommandInput, ...rest: any[]) => Paginator<ListAnswersCommandOutput>;
@@ -4,4 +4,4 @@ import { WellArchitectedPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListCheckDetails(config: WellArchitectedPaginationConfiguration, input: ListCheckDetailsCommandInput, ...additionalArguments: any): Paginator<ListCheckDetailsCommandOutput>;
7
+ export declare const paginateListCheckDetails: (config: WellArchitectedPaginationConfiguration, input: ListCheckDetailsCommandInput, ...rest: any[]) => Paginator<ListCheckDetailsCommandOutput>;
@@ -4,4 +4,4 @@ import { WellArchitectedPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListCheckSummaries(config: WellArchitectedPaginationConfiguration, input: ListCheckSummariesCommandInput, ...additionalArguments: any): Paginator<ListCheckSummariesCommandOutput>;
7
+ export declare const paginateListCheckSummaries: (config: WellArchitectedPaginationConfiguration, input: ListCheckSummariesCommandInput, ...rest: any[]) => Paginator<ListCheckSummariesCommandOutput>;
@@ -4,4 +4,4 @@ import { WellArchitectedPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListLensReviewImprovements(config: WellArchitectedPaginationConfiguration, input: ListLensReviewImprovementsCommandInput, ...additionalArguments: any): Paginator<ListLensReviewImprovementsCommandOutput>;
7
+ export declare const paginateListLensReviewImprovements: (config: WellArchitectedPaginationConfiguration, input: ListLensReviewImprovementsCommandInput, ...rest: any[]) => Paginator<ListLensReviewImprovementsCommandOutput>;
@@ -4,4 +4,4 @@ import { WellArchitectedPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListLensReviews(config: WellArchitectedPaginationConfiguration, input: ListLensReviewsCommandInput, ...additionalArguments: any): Paginator<ListLensReviewsCommandOutput>;
7
+ export declare const paginateListLensReviews: (config: WellArchitectedPaginationConfiguration, input: ListLensReviewsCommandInput, ...rest: any[]) => Paginator<ListLensReviewsCommandOutput>;
@@ -4,4 +4,4 @@ import { WellArchitectedPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListLensShares(config: WellArchitectedPaginationConfiguration, input: ListLensSharesCommandInput, ...additionalArguments: any): Paginator<ListLensSharesCommandOutput>;
7
+ export declare const paginateListLensShares: (config: WellArchitectedPaginationConfiguration, input: ListLensSharesCommandInput, ...rest: any[]) => Paginator<ListLensSharesCommandOutput>;
@@ -4,4 +4,4 @@ import { WellArchitectedPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListLenses(config: WellArchitectedPaginationConfiguration, input: ListLensesCommandInput, ...additionalArguments: any): Paginator<ListLensesCommandOutput>;
7
+ export declare const paginateListLenses: (config: WellArchitectedPaginationConfiguration, input: ListLensesCommandInput, ...rest: any[]) => Paginator<ListLensesCommandOutput>;
@@ -4,4 +4,4 @@ import { WellArchitectedPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListMilestones(config: WellArchitectedPaginationConfiguration, input: ListMilestonesCommandInput, ...additionalArguments: any): Paginator<ListMilestonesCommandOutput>;
7
+ export declare const paginateListMilestones: (config: WellArchitectedPaginationConfiguration, input: ListMilestonesCommandInput, ...rest: any[]) => Paginator<ListMilestonesCommandOutput>;
@@ -4,4 +4,4 @@ import { WellArchitectedPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListNotifications(config: WellArchitectedPaginationConfiguration, input: ListNotificationsCommandInput, ...additionalArguments: any): Paginator<ListNotificationsCommandOutput>;
7
+ export declare const paginateListNotifications: (config: WellArchitectedPaginationConfiguration, input: ListNotificationsCommandInput, ...rest: any[]) => Paginator<ListNotificationsCommandOutput>;
@@ -4,4 +4,4 @@ import { WellArchitectedPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListProfileNotifications(config: WellArchitectedPaginationConfiguration, input: ListProfileNotificationsCommandInput, ...additionalArguments: any): Paginator<ListProfileNotificationsCommandOutput>;
7
+ export declare const paginateListProfileNotifications: (config: WellArchitectedPaginationConfiguration, input: ListProfileNotificationsCommandInput, ...rest: any[]) => Paginator<ListProfileNotificationsCommandOutput>;
@@ -4,4 +4,4 @@ import { WellArchitectedPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListProfileShares(config: WellArchitectedPaginationConfiguration, input: ListProfileSharesCommandInput, ...additionalArguments: any): Paginator<ListProfileSharesCommandOutput>;
7
+ export declare const paginateListProfileShares: (config: WellArchitectedPaginationConfiguration, input: ListProfileSharesCommandInput, ...rest: any[]) => Paginator<ListProfileSharesCommandOutput>;