@aws-sdk/client-detective 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 (23) hide show
  1. package/dist-cjs/pagination/ListDatasourcePackagesPaginator.js +2 -24
  2. package/dist-cjs/pagination/ListGraphsPaginator.js +2 -24
  3. package/dist-cjs/pagination/ListInvitationsPaginator.js +2 -24
  4. package/dist-cjs/pagination/ListMembersPaginator.js +2 -24
  5. package/dist-cjs/pagination/ListOrganizationAdminAccountsPaginator.js +2 -24
  6. package/dist-cjs/protocols/Aws_restJson1.js +124 -326
  7. package/dist-es/pagination/ListDatasourcePackagesPaginator.js +2 -23
  8. package/dist-es/pagination/ListGraphsPaginator.js +2 -23
  9. package/dist-es/pagination/ListInvitationsPaginator.js +2 -23
  10. package/dist-es/pagination/ListMembersPaginator.js +2 -23
  11. package/dist-es/pagination/ListOrganizationAdminAccountsPaginator.js +2 -23
  12. package/dist-es/protocols/Aws_restJson1.js +125 -327
  13. package/dist-types/pagination/ListDatasourcePackagesPaginator.d.ts +1 -1
  14. package/dist-types/pagination/ListGraphsPaginator.d.ts +1 -1
  15. package/dist-types/pagination/ListInvitationsPaginator.d.ts +1 -1
  16. package/dist-types/pagination/ListMembersPaginator.d.ts +1 -1
  17. package/dist-types/pagination/ListOrganizationAdminAccountsPaginator.d.ts +1 -1
  18. package/dist-types/ts3.4/pagination/ListDatasourcePackagesPaginator.d.ts +3 -3
  19. package/dist-types/ts3.4/pagination/ListGraphsPaginator.d.ts +3 -3
  20. package/dist-types/ts3.4/pagination/ListInvitationsPaginator.d.ts +3 -3
  21. package/dist-types/ts3.4/pagination/ListMembersPaginator.d.ts +3 -3
  22. package/dist-types/ts3.4/pagination/ListOrganizationAdminAccountsPaginator.d.ts +3 -3
  23. package/package.json +7 -6
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListDatasourcePackagesCommand, } from "../commands/ListDatasourcePackagesCommand";
2
3
  import { DetectiveClient } from "../DetectiveClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListDatasourcePackagesCommand(input), ...args);
5
- };
6
- export async function* paginateListDatasourcePackages(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 DetectiveClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Detective | DetectiveClient");
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 paginateListDatasourcePackages = createPaginator(DetectiveClient, ListDatasourcePackagesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListGraphsCommand } from "../commands/ListGraphsCommand";
2
3
  import { DetectiveClient } from "../DetectiveClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListGraphsCommand(input), ...args);
5
- };
6
- export async function* paginateListGraphs(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 DetectiveClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Detective | DetectiveClient");
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 paginateListGraphs = createPaginator(DetectiveClient, ListGraphsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListInvitationsCommand, } from "../commands/ListInvitationsCommand";
2
3
  import { DetectiveClient } from "../DetectiveClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListInvitationsCommand(input), ...args);
5
- };
6
- export async function* paginateListInvitations(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 DetectiveClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Detective | DetectiveClient");
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 paginateListInvitations = createPaginator(DetectiveClient, ListInvitationsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListMembersCommand } from "../commands/ListMembersCommand";
2
3
  import { DetectiveClient } from "../DetectiveClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListMembersCommand(input), ...args);
5
- };
6
- export async function* paginateListMembers(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 DetectiveClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Detective | DetectiveClient");
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 paginateListMembers = createPaginator(DetectiveClient, ListMembersCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListOrganizationAdminAccountsCommand, } from "../commands/ListOrganizationAdminAccountsCommand";
2
3
  import { DetectiveClient } from "../DetectiveClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListOrganizationAdminAccountsCommand(input), ...args);
5
- };
6
- export async function* paginateListOrganizationAdminAccounts(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 DetectiveClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Detective | DetectiveClient");
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 paginateListOrganizationAdminAccounts = createPaginator(DetectiveClient, ListOrganizationAdminAccountsCommand, "NextToken", "NextToken", "MaxResults");