@aws-sdk/client-inspector 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 (41) hide show
  1. package/dist-cjs/pagination/GetExclusionsPreviewPaginator.js +2 -24
  2. package/dist-cjs/pagination/ListAssessmentRunAgentsPaginator.js +2 -24
  3. package/dist-cjs/pagination/ListAssessmentRunsPaginator.js +2 -24
  4. package/dist-cjs/pagination/ListAssessmentTargetsPaginator.js +2 -24
  5. package/dist-cjs/pagination/ListAssessmentTemplatesPaginator.js +2 -24
  6. package/dist-cjs/pagination/ListEventSubscriptionsPaginator.js +2 -24
  7. package/dist-cjs/pagination/ListExclusionsPaginator.js +2 -24
  8. package/dist-cjs/pagination/ListFindingsPaginator.js +2 -24
  9. package/dist-cjs/pagination/ListRulesPackagesPaginator.js +2 -24
  10. package/dist-cjs/pagination/PreviewAgentsPaginator.js +2 -24
  11. package/dist-es/pagination/GetExclusionsPreviewPaginator.js +2 -23
  12. package/dist-es/pagination/ListAssessmentRunAgentsPaginator.js +2 -23
  13. package/dist-es/pagination/ListAssessmentRunsPaginator.js +2 -23
  14. package/dist-es/pagination/ListAssessmentTargetsPaginator.js +2 -23
  15. package/dist-es/pagination/ListAssessmentTemplatesPaginator.js +2 -23
  16. package/dist-es/pagination/ListEventSubscriptionsPaginator.js +2 -23
  17. package/dist-es/pagination/ListExclusionsPaginator.js +2 -23
  18. package/dist-es/pagination/ListFindingsPaginator.js +2 -23
  19. package/dist-es/pagination/ListRulesPackagesPaginator.js +2 -23
  20. package/dist-es/pagination/PreviewAgentsPaginator.js +2 -23
  21. package/dist-types/pagination/GetExclusionsPreviewPaginator.d.ts +1 -1
  22. package/dist-types/pagination/ListAssessmentRunAgentsPaginator.d.ts +1 -1
  23. package/dist-types/pagination/ListAssessmentRunsPaginator.d.ts +1 -1
  24. package/dist-types/pagination/ListAssessmentTargetsPaginator.d.ts +1 -1
  25. package/dist-types/pagination/ListAssessmentTemplatesPaginator.d.ts +1 -1
  26. package/dist-types/pagination/ListEventSubscriptionsPaginator.d.ts +1 -1
  27. package/dist-types/pagination/ListExclusionsPaginator.d.ts +1 -1
  28. package/dist-types/pagination/ListFindingsPaginator.d.ts +1 -1
  29. package/dist-types/pagination/ListRulesPackagesPaginator.d.ts +1 -1
  30. package/dist-types/pagination/PreviewAgentsPaginator.d.ts +1 -1
  31. package/dist-types/ts3.4/pagination/GetExclusionsPreviewPaginator.d.ts +3 -3
  32. package/dist-types/ts3.4/pagination/ListAssessmentRunAgentsPaginator.d.ts +3 -3
  33. package/dist-types/ts3.4/pagination/ListAssessmentRunsPaginator.d.ts +3 -3
  34. package/dist-types/ts3.4/pagination/ListAssessmentTargetsPaginator.d.ts +3 -3
  35. package/dist-types/ts3.4/pagination/ListAssessmentTemplatesPaginator.d.ts +3 -3
  36. package/dist-types/ts3.4/pagination/ListEventSubscriptionsPaginator.d.ts +3 -3
  37. package/dist-types/ts3.4/pagination/ListExclusionsPaginator.d.ts +3 -3
  38. package/dist-types/ts3.4/pagination/ListFindingsPaginator.d.ts +3 -3
  39. package/dist-types/ts3.4/pagination/ListRulesPackagesPaginator.d.ts +3 -3
  40. package/dist-types/ts3.4/pagination/PreviewAgentsPaginator.d.ts +3 -3
  41. package/package.json +6 -5
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateGetExclusionsPreview = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const GetExclusionsPreviewCommand_1 = require("../commands/GetExclusionsPreviewCommand");
5
6
  const InspectorClient_1 = require("../InspectorClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new GetExclusionsPreviewCommand_1.GetExclusionsPreviewCommand(input), ...args);
8
- };
9
- async function* paginateGetExclusionsPreview(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.nextToken = token;
15
- input["maxResults"] = config.pageSize;
16
- if (config.client instanceof InspectorClient_1.InspectorClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Inspector | InspectorClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.nextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateGetExclusionsPreview = paginateGetExclusionsPreview;
7
+ exports.paginateGetExclusionsPreview = (0, core_1.createPaginator)(InspectorClient_1.InspectorClient, GetExclusionsPreviewCommand_1.GetExclusionsPreviewCommand, "nextToken", "nextToken", "maxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListAssessmentRunAgents = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListAssessmentRunAgentsCommand_1 = require("../commands/ListAssessmentRunAgentsCommand");
5
6
  const InspectorClient_1 = require("../InspectorClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListAssessmentRunAgentsCommand_1.ListAssessmentRunAgentsCommand(input), ...args);
8
- };
9
- async function* paginateListAssessmentRunAgents(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.nextToken = token;
15
- input["maxResults"] = config.pageSize;
16
- if (config.client instanceof InspectorClient_1.InspectorClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Inspector | InspectorClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.nextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListAssessmentRunAgents = paginateListAssessmentRunAgents;
7
+ exports.paginateListAssessmentRunAgents = (0, core_1.createPaginator)(InspectorClient_1.InspectorClient, ListAssessmentRunAgentsCommand_1.ListAssessmentRunAgentsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListAssessmentRuns = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListAssessmentRunsCommand_1 = require("../commands/ListAssessmentRunsCommand");
5
6
  const InspectorClient_1 = require("../InspectorClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListAssessmentRunsCommand_1.ListAssessmentRunsCommand(input), ...args);
8
- };
9
- async function* paginateListAssessmentRuns(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.nextToken = token;
15
- input["maxResults"] = config.pageSize;
16
- if (config.client instanceof InspectorClient_1.InspectorClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Inspector | InspectorClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.nextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListAssessmentRuns = paginateListAssessmentRuns;
7
+ exports.paginateListAssessmentRuns = (0, core_1.createPaginator)(InspectorClient_1.InspectorClient, ListAssessmentRunsCommand_1.ListAssessmentRunsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListAssessmentTargets = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListAssessmentTargetsCommand_1 = require("../commands/ListAssessmentTargetsCommand");
5
6
  const InspectorClient_1 = require("../InspectorClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListAssessmentTargetsCommand_1.ListAssessmentTargetsCommand(input), ...args);
8
- };
9
- async function* paginateListAssessmentTargets(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.nextToken = token;
15
- input["maxResults"] = config.pageSize;
16
- if (config.client instanceof InspectorClient_1.InspectorClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Inspector | InspectorClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.nextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListAssessmentTargets = paginateListAssessmentTargets;
7
+ exports.paginateListAssessmentTargets = (0, core_1.createPaginator)(InspectorClient_1.InspectorClient, ListAssessmentTargetsCommand_1.ListAssessmentTargetsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListAssessmentTemplates = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListAssessmentTemplatesCommand_1 = require("../commands/ListAssessmentTemplatesCommand");
5
6
  const InspectorClient_1 = require("../InspectorClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListAssessmentTemplatesCommand_1.ListAssessmentTemplatesCommand(input), ...args);
8
- };
9
- async function* paginateListAssessmentTemplates(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.nextToken = token;
15
- input["maxResults"] = config.pageSize;
16
- if (config.client instanceof InspectorClient_1.InspectorClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Inspector | InspectorClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.nextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListAssessmentTemplates = paginateListAssessmentTemplates;
7
+ exports.paginateListAssessmentTemplates = (0, core_1.createPaginator)(InspectorClient_1.InspectorClient, ListAssessmentTemplatesCommand_1.ListAssessmentTemplatesCommand, "nextToken", "nextToken", "maxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListEventSubscriptions = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListEventSubscriptionsCommand_1 = require("../commands/ListEventSubscriptionsCommand");
5
6
  const InspectorClient_1 = require("../InspectorClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListEventSubscriptionsCommand_1.ListEventSubscriptionsCommand(input), ...args);
8
- };
9
- async function* paginateListEventSubscriptions(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.nextToken = token;
15
- input["maxResults"] = config.pageSize;
16
- if (config.client instanceof InspectorClient_1.InspectorClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Inspector | InspectorClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.nextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListEventSubscriptions = paginateListEventSubscriptions;
7
+ exports.paginateListEventSubscriptions = (0, core_1.createPaginator)(InspectorClient_1.InspectorClient, ListEventSubscriptionsCommand_1.ListEventSubscriptionsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListExclusions = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListExclusionsCommand_1 = require("../commands/ListExclusionsCommand");
5
6
  const InspectorClient_1 = require("../InspectorClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListExclusionsCommand_1.ListExclusionsCommand(input), ...args);
8
- };
9
- async function* paginateListExclusions(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.nextToken = token;
15
- input["maxResults"] = config.pageSize;
16
- if (config.client instanceof InspectorClient_1.InspectorClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Inspector | InspectorClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.nextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListExclusions = paginateListExclusions;
7
+ exports.paginateListExclusions = (0, core_1.createPaginator)(InspectorClient_1.InspectorClient, ListExclusionsCommand_1.ListExclusionsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListFindings = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListFindingsCommand_1 = require("../commands/ListFindingsCommand");
5
6
  const InspectorClient_1 = require("../InspectorClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListFindingsCommand_1.ListFindingsCommand(input), ...args);
8
- };
9
- async function* paginateListFindings(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.nextToken = token;
15
- input["maxResults"] = config.pageSize;
16
- if (config.client instanceof InspectorClient_1.InspectorClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Inspector | InspectorClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.nextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListFindings = paginateListFindings;
7
+ exports.paginateListFindings = (0, core_1.createPaginator)(InspectorClient_1.InspectorClient, ListFindingsCommand_1.ListFindingsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListRulesPackages = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListRulesPackagesCommand_1 = require("../commands/ListRulesPackagesCommand");
5
6
  const InspectorClient_1 = require("../InspectorClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListRulesPackagesCommand_1.ListRulesPackagesCommand(input), ...args);
8
- };
9
- async function* paginateListRulesPackages(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.nextToken = token;
15
- input["maxResults"] = config.pageSize;
16
- if (config.client instanceof InspectorClient_1.InspectorClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Inspector | InspectorClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.nextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListRulesPackages = paginateListRulesPackages;
7
+ exports.paginateListRulesPackages = (0, core_1.createPaginator)(InspectorClient_1.InspectorClient, ListRulesPackagesCommand_1.ListRulesPackagesCommand, "nextToken", "nextToken", "maxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginatePreviewAgents = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const PreviewAgentsCommand_1 = require("../commands/PreviewAgentsCommand");
5
6
  const InspectorClient_1 = require("../InspectorClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new PreviewAgentsCommand_1.PreviewAgentsCommand(input), ...args);
8
- };
9
- async function* paginatePreviewAgents(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.nextToken = token;
15
- input["maxResults"] = config.pageSize;
16
- if (config.client instanceof InspectorClient_1.InspectorClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected Inspector | InspectorClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.nextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginatePreviewAgents = paginatePreviewAgents;
7
+ exports.paginatePreviewAgents = (0, core_1.createPaginator)(InspectorClient_1.InspectorClient, PreviewAgentsCommand_1.PreviewAgentsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { GetExclusionsPreviewCommand, } from "../commands/GetExclusionsPreviewCommand";
2
3
  import { InspectorClient } from "../InspectorClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new GetExclusionsPreviewCommand(input), ...args);
5
- };
6
- export async function* paginateGetExclusionsPreview(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 InspectorClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Inspector | InspectorClient");
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 paginateGetExclusionsPreview = createPaginator(InspectorClient, GetExclusionsPreviewCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListAssessmentRunAgentsCommand, } from "../commands/ListAssessmentRunAgentsCommand";
2
3
  import { InspectorClient } from "../InspectorClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListAssessmentRunAgentsCommand(input), ...args);
5
- };
6
- export async function* paginateListAssessmentRunAgents(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 InspectorClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Inspector | InspectorClient");
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 paginateListAssessmentRunAgents = createPaginator(InspectorClient, ListAssessmentRunAgentsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListAssessmentRunsCommand, } from "../commands/ListAssessmentRunsCommand";
2
3
  import { InspectorClient } from "../InspectorClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListAssessmentRunsCommand(input), ...args);
5
- };
6
- export async function* paginateListAssessmentRuns(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 InspectorClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Inspector | InspectorClient");
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 paginateListAssessmentRuns = createPaginator(InspectorClient, ListAssessmentRunsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListAssessmentTargetsCommand, } from "../commands/ListAssessmentTargetsCommand";
2
3
  import { InspectorClient } from "../InspectorClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListAssessmentTargetsCommand(input), ...args);
5
- };
6
- export async function* paginateListAssessmentTargets(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 InspectorClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Inspector | InspectorClient");
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 paginateListAssessmentTargets = createPaginator(InspectorClient, ListAssessmentTargetsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListAssessmentTemplatesCommand, } from "../commands/ListAssessmentTemplatesCommand";
2
3
  import { InspectorClient } from "../InspectorClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListAssessmentTemplatesCommand(input), ...args);
5
- };
6
- export async function* paginateListAssessmentTemplates(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 InspectorClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Inspector | InspectorClient");
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 paginateListAssessmentTemplates = createPaginator(InspectorClient, ListAssessmentTemplatesCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListEventSubscriptionsCommand, } from "../commands/ListEventSubscriptionsCommand";
2
3
  import { InspectorClient } from "../InspectorClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListEventSubscriptionsCommand(input), ...args);
5
- };
6
- export async function* paginateListEventSubscriptions(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 InspectorClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Inspector | InspectorClient");
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 paginateListEventSubscriptions = createPaginator(InspectorClient, ListEventSubscriptionsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListExclusionsCommand, } from "../commands/ListExclusionsCommand";
2
3
  import { InspectorClient } from "../InspectorClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListExclusionsCommand(input), ...args);
5
- };
6
- export async function* paginateListExclusions(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 InspectorClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Inspector | InspectorClient");
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 paginateListExclusions = createPaginator(InspectorClient, ListExclusionsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListFindingsCommand, } from "../commands/ListFindingsCommand";
2
3
  import { InspectorClient } from "../InspectorClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListFindingsCommand(input), ...args);
5
- };
6
- export async function* paginateListFindings(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 InspectorClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Inspector | InspectorClient");
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 paginateListFindings = createPaginator(InspectorClient, ListFindingsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListRulesPackagesCommand, } from "../commands/ListRulesPackagesCommand";
2
3
  import { InspectorClient } from "../InspectorClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListRulesPackagesCommand(input), ...args);
5
- };
6
- export async function* paginateListRulesPackages(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 InspectorClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Inspector | InspectorClient");
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 paginateListRulesPackages = createPaginator(InspectorClient, ListRulesPackagesCommand, "nextToken", "nextToken", "maxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { PreviewAgentsCommand, } from "../commands/PreviewAgentsCommand";
2
3
  import { InspectorClient } from "../InspectorClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new PreviewAgentsCommand(input), ...args);
5
- };
6
- export async function* paginatePreviewAgents(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 InspectorClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Inspector | InspectorClient");
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 paginatePreviewAgents = createPaginator(InspectorClient, PreviewAgentsCommand, "nextToken", "nextToken", "maxResults");
@@ -4,4 +4,4 @@ import { InspectorPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateGetExclusionsPreview(config: InspectorPaginationConfiguration, input: GetExclusionsPreviewCommandInput, ...additionalArguments: any): Paginator<GetExclusionsPreviewCommandOutput>;
7
+ export declare const paginateGetExclusionsPreview: (config: InspectorPaginationConfiguration, input: GetExclusionsPreviewCommandInput, ...rest: any[]) => Paginator<GetExclusionsPreviewCommandOutput>;
@@ -4,4 +4,4 @@ import { InspectorPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListAssessmentRunAgents(config: InspectorPaginationConfiguration, input: ListAssessmentRunAgentsCommandInput, ...additionalArguments: any): Paginator<ListAssessmentRunAgentsCommandOutput>;
7
+ export declare const paginateListAssessmentRunAgents: (config: InspectorPaginationConfiguration, input: ListAssessmentRunAgentsCommandInput, ...rest: any[]) => Paginator<ListAssessmentRunAgentsCommandOutput>;
@@ -4,4 +4,4 @@ import { InspectorPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListAssessmentRuns(config: InspectorPaginationConfiguration, input: ListAssessmentRunsCommandInput, ...additionalArguments: any): Paginator<ListAssessmentRunsCommandOutput>;
7
+ export declare const paginateListAssessmentRuns: (config: InspectorPaginationConfiguration, input: ListAssessmentRunsCommandInput, ...rest: any[]) => Paginator<ListAssessmentRunsCommandOutput>;
@@ -4,4 +4,4 @@ import { InspectorPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListAssessmentTargets(config: InspectorPaginationConfiguration, input: ListAssessmentTargetsCommandInput, ...additionalArguments: any): Paginator<ListAssessmentTargetsCommandOutput>;
7
+ export declare const paginateListAssessmentTargets: (config: InspectorPaginationConfiguration, input: ListAssessmentTargetsCommandInput, ...rest: any[]) => Paginator<ListAssessmentTargetsCommandOutput>;
@@ -4,4 +4,4 @@ import { InspectorPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListAssessmentTemplates(config: InspectorPaginationConfiguration, input: ListAssessmentTemplatesCommandInput, ...additionalArguments: any): Paginator<ListAssessmentTemplatesCommandOutput>;
7
+ export declare const paginateListAssessmentTemplates: (config: InspectorPaginationConfiguration, input: ListAssessmentTemplatesCommandInput, ...rest: any[]) => Paginator<ListAssessmentTemplatesCommandOutput>;
@@ -4,4 +4,4 @@ import { InspectorPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListEventSubscriptions(config: InspectorPaginationConfiguration, input: ListEventSubscriptionsCommandInput, ...additionalArguments: any): Paginator<ListEventSubscriptionsCommandOutput>;
7
+ export declare const paginateListEventSubscriptions: (config: InspectorPaginationConfiguration, input: ListEventSubscriptionsCommandInput, ...rest: any[]) => Paginator<ListEventSubscriptionsCommandOutput>;
@@ -4,4 +4,4 @@ import { InspectorPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListExclusions(config: InspectorPaginationConfiguration, input: ListExclusionsCommandInput, ...additionalArguments: any): Paginator<ListExclusionsCommandOutput>;
7
+ export declare const paginateListExclusions: (config: InspectorPaginationConfiguration, input: ListExclusionsCommandInput, ...rest: any[]) => Paginator<ListExclusionsCommandOutput>;
@@ -4,4 +4,4 @@ import { InspectorPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListFindings(config: InspectorPaginationConfiguration, input: ListFindingsCommandInput, ...additionalArguments: any): Paginator<ListFindingsCommandOutput>;
7
+ export declare const paginateListFindings: (config: InspectorPaginationConfiguration, input: ListFindingsCommandInput, ...rest: any[]) => Paginator<ListFindingsCommandOutput>;
@@ -4,4 +4,4 @@ import { InspectorPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListRulesPackages(config: InspectorPaginationConfiguration, input: ListRulesPackagesCommandInput, ...additionalArguments: any): Paginator<ListRulesPackagesCommandOutput>;
7
+ export declare const paginateListRulesPackages: (config: InspectorPaginationConfiguration, input: ListRulesPackagesCommandInput, ...rest: any[]) => Paginator<ListRulesPackagesCommandOutput>;
@@ -4,4 +4,4 @@ import { InspectorPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginatePreviewAgents(config: InspectorPaginationConfiguration, input: PreviewAgentsCommandInput, ...additionalArguments: any): Paginator<PreviewAgentsCommandOutput>;
7
+ export declare const paginatePreviewAgents: (config: InspectorPaginationConfiguration, input: PreviewAgentsCommandInput, ...rest: any[]) => Paginator<PreviewAgentsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  GetExclusionsPreviewCommandOutput,
5
5
  } from "../commands/GetExclusionsPreviewCommand";
6
6
  import { InspectorPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateGetExclusionsPreview(
7
+ export declare const paginateGetExclusionsPreview: (
8
8
  config: InspectorPaginationConfiguration,
9
9
  input: GetExclusionsPreviewCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<GetExclusionsPreviewCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<GetExclusionsPreviewCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListAssessmentRunAgentsCommandOutput,
5
5
  } from "../commands/ListAssessmentRunAgentsCommand";
6
6
  import { InspectorPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListAssessmentRunAgents(
7
+ export declare const paginateListAssessmentRunAgents: (
8
8
  config: InspectorPaginationConfiguration,
9
9
  input: ListAssessmentRunAgentsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListAssessmentRunAgentsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListAssessmentRunAgentsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListAssessmentRunsCommandOutput,
5
5
  } from "../commands/ListAssessmentRunsCommand";
6
6
  import { InspectorPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListAssessmentRuns(
7
+ export declare const paginateListAssessmentRuns: (
8
8
  config: InspectorPaginationConfiguration,
9
9
  input: ListAssessmentRunsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListAssessmentRunsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListAssessmentRunsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListAssessmentTargetsCommandOutput,
5
5
  } from "../commands/ListAssessmentTargetsCommand";
6
6
  import { InspectorPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListAssessmentTargets(
7
+ export declare const paginateListAssessmentTargets: (
8
8
  config: InspectorPaginationConfiguration,
9
9
  input: ListAssessmentTargetsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListAssessmentTargetsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListAssessmentTargetsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListAssessmentTemplatesCommandOutput,
5
5
  } from "../commands/ListAssessmentTemplatesCommand";
6
6
  import { InspectorPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListAssessmentTemplates(
7
+ export declare const paginateListAssessmentTemplates: (
8
8
  config: InspectorPaginationConfiguration,
9
9
  input: ListAssessmentTemplatesCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListAssessmentTemplatesCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListAssessmentTemplatesCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListEventSubscriptionsCommandOutput,
5
5
  } from "../commands/ListEventSubscriptionsCommand";
6
6
  import { InspectorPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListEventSubscriptions(
7
+ export declare const paginateListEventSubscriptions: (
8
8
  config: InspectorPaginationConfiguration,
9
9
  input: ListEventSubscriptionsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListEventSubscriptionsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListEventSubscriptionsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListExclusionsCommandOutput,
5
5
  } from "../commands/ListExclusionsCommand";
6
6
  import { InspectorPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListExclusions(
7
+ export declare const paginateListExclusions: (
8
8
  config: InspectorPaginationConfiguration,
9
9
  input: ListExclusionsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListExclusionsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListExclusionsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListFindingsCommandOutput,
5
5
  } from "../commands/ListFindingsCommand";
6
6
  import { InspectorPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListFindings(
7
+ export declare const paginateListFindings: (
8
8
  config: InspectorPaginationConfiguration,
9
9
  input: ListFindingsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListFindingsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListFindingsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListRulesPackagesCommandOutput,
5
5
  } from "../commands/ListRulesPackagesCommand";
6
6
  import { InspectorPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListRulesPackages(
7
+ export declare const paginateListRulesPackages: (
8
8
  config: InspectorPaginationConfiguration,
9
9
  input: ListRulesPackagesCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListRulesPackagesCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListRulesPackagesCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  PreviewAgentsCommandOutput,
5
5
  } from "../commands/PreviewAgentsCommand";
6
6
  import { InspectorPaginationConfiguration } from "./Interfaces";
7
- export declare function paginatePreviewAgents(
7
+ export declare const paginatePreviewAgents: (
8
8
  config: InspectorPaginationConfiguration,
9
9
  input: PreviewAgentsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<PreviewAgentsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<PreviewAgentsCommandOutput>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-inspector",
3
3
  "description": "AWS SDK for JavaScript Inspector Client for Node.js, Browser and React Native",
4
- "version": "3.477.0",
4
+ "version": "3.478.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,20 +20,21 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.477.0",
23
+ "@aws-sdk/client-sts": "3.478.0",
24
24
  "@aws-sdk/core": "3.477.0",
25
- "@aws-sdk/credential-provider-node": "3.477.0",
25
+ "@aws-sdk/credential-provider-node": "3.478.0",
26
26
  "@aws-sdk/middleware-host-header": "3.468.0",
27
27
  "@aws-sdk/middleware-logger": "3.468.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.468.0",
29
29
  "@aws-sdk/middleware-signing": "3.468.0",
30
- "@aws-sdk/middleware-user-agent": "3.470.0",
30
+ "@aws-sdk/middleware-user-agent": "3.478.0",
31
31
  "@aws-sdk/region-config-resolver": "3.470.0",
32
32
  "@aws-sdk/types": "3.468.0",
33
- "@aws-sdk/util-endpoints": "3.470.0",
33
+ "@aws-sdk/util-endpoints": "3.478.0",
34
34
  "@aws-sdk/util-user-agent-browser": "3.468.0",
35
35
  "@aws-sdk/util-user-agent-node": "3.470.0",
36
36
  "@smithy/config-resolver": "^2.0.21",
37
+ "@smithy/core": "^1.2.0",
37
38
  "@smithy/fetch-http-handler": "^2.3.1",
38
39
  "@smithy/hash-node": "^2.0.17",
39
40
  "@smithy/invalid-dependency": "^2.0.15",