@aws-sdk/client-cognito-identity-provider 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 (37) hide show
  1. package/dist-cjs/pagination/AdminListGroupsForUserPaginator.js +2 -24
  2. package/dist-cjs/pagination/AdminListUserAuthEventsPaginator.js +2 -24
  3. package/dist-cjs/pagination/ListGroupsPaginator.js +2 -24
  4. package/dist-cjs/pagination/ListIdentityProvidersPaginator.js +2 -24
  5. package/dist-cjs/pagination/ListResourceServersPaginator.js +2 -24
  6. package/dist-cjs/pagination/ListUserPoolClientsPaginator.js +2 -24
  7. package/dist-cjs/pagination/ListUserPoolsPaginator.js +2 -24
  8. package/dist-cjs/pagination/ListUsersInGroupPaginator.js +2 -24
  9. package/dist-cjs/pagination/ListUsersPaginator.js +2 -24
  10. package/dist-es/pagination/AdminListGroupsForUserPaginator.js +2 -23
  11. package/dist-es/pagination/AdminListUserAuthEventsPaginator.js +2 -23
  12. package/dist-es/pagination/ListGroupsPaginator.js +2 -23
  13. package/dist-es/pagination/ListIdentityProvidersPaginator.js +2 -23
  14. package/dist-es/pagination/ListResourceServersPaginator.js +2 -23
  15. package/dist-es/pagination/ListUserPoolClientsPaginator.js +2 -23
  16. package/dist-es/pagination/ListUserPoolsPaginator.js +2 -23
  17. package/dist-es/pagination/ListUsersInGroupPaginator.js +2 -23
  18. package/dist-es/pagination/ListUsersPaginator.js +2 -23
  19. package/dist-types/pagination/AdminListGroupsForUserPaginator.d.ts +1 -1
  20. package/dist-types/pagination/AdminListUserAuthEventsPaginator.d.ts +1 -1
  21. package/dist-types/pagination/ListGroupsPaginator.d.ts +1 -1
  22. package/dist-types/pagination/ListIdentityProvidersPaginator.d.ts +1 -1
  23. package/dist-types/pagination/ListResourceServersPaginator.d.ts +1 -1
  24. package/dist-types/pagination/ListUserPoolClientsPaginator.d.ts +1 -1
  25. package/dist-types/pagination/ListUserPoolsPaginator.d.ts +1 -1
  26. package/dist-types/pagination/ListUsersInGroupPaginator.d.ts +1 -1
  27. package/dist-types/pagination/ListUsersPaginator.d.ts +1 -1
  28. package/dist-types/ts3.4/pagination/AdminListGroupsForUserPaginator.d.ts +3 -3
  29. package/dist-types/ts3.4/pagination/AdminListUserAuthEventsPaginator.d.ts +3 -3
  30. package/dist-types/ts3.4/pagination/ListGroupsPaginator.d.ts +3 -3
  31. package/dist-types/ts3.4/pagination/ListIdentityProvidersPaginator.d.ts +3 -3
  32. package/dist-types/ts3.4/pagination/ListResourceServersPaginator.d.ts +3 -3
  33. package/dist-types/ts3.4/pagination/ListUserPoolClientsPaginator.d.ts +3 -3
  34. package/dist-types/ts3.4/pagination/ListUserPoolsPaginator.d.ts +3 -3
  35. package/dist-types/ts3.4/pagination/ListUsersInGroupPaginator.d.ts +3 -3
  36. package/dist-types/ts3.4/pagination/ListUsersPaginator.d.ts +3 -3
  37. package/package.json +6 -5
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateAdminListGroupsForUser = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const CognitoIdentityProviderClient_1 = require("../CognitoIdentityProviderClient");
5
6
  const AdminListGroupsForUserCommand_1 = require("../commands/AdminListGroupsForUserCommand");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new AdminListGroupsForUserCommand_1.AdminListGroupsForUserCommand(input), ...args);
8
- };
9
- async function* paginateAdminListGroupsForUser(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["Limit"] = config.pageSize;
16
- if (config.client instanceof CognitoIdentityProviderClient_1.CognitoIdentityProviderClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient");
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.paginateAdminListGroupsForUser = paginateAdminListGroupsForUser;
7
+ exports.paginateAdminListGroupsForUser = (0, core_1.createPaginator)(CognitoIdentityProviderClient_1.CognitoIdentityProviderClient, AdminListGroupsForUserCommand_1.AdminListGroupsForUserCommand, "NextToken", "NextToken", "Limit");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateAdminListUserAuthEvents = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const CognitoIdentityProviderClient_1 = require("../CognitoIdentityProviderClient");
5
6
  const AdminListUserAuthEventsCommand_1 = require("../commands/AdminListUserAuthEventsCommand");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new AdminListUserAuthEventsCommand_1.AdminListUserAuthEventsCommand(input), ...args);
8
- };
9
- async function* paginateAdminListUserAuthEvents(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 CognitoIdentityProviderClient_1.CognitoIdentityProviderClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient");
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.paginateAdminListUserAuthEvents = paginateAdminListUserAuthEvents;
7
+ exports.paginateAdminListUserAuthEvents = (0, core_1.createPaginator)(CognitoIdentityProviderClient_1.CognitoIdentityProviderClient, AdminListUserAuthEventsCommand_1.AdminListUserAuthEventsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListGroups = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const CognitoIdentityProviderClient_1 = require("../CognitoIdentityProviderClient");
5
6
  const ListGroupsCommand_1 = require("../commands/ListGroupsCommand");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListGroupsCommand_1.ListGroupsCommand(input), ...args);
8
- };
9
- async function* paginateListGroups(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["Limit"] = config.pageSize;
16
- if (config.client instanceof CognitoIdentityProviderClient_1.CognitoIdentityProviderClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient");
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.paginateListGroups = paginateListGroups;
7
+ exports.paginateListGroups = (0, core_1.createPaginator)(CognitoIdentityProviderClient_1.CognitoIdentityProviderClient, ListGroupsCommand_1.ListGroupsCommand, "NextToken", "NextToken", "Limit");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListIdentityProviders = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const CognitoIdentityProviderClient_1 = require("../CognitoIdentityProviderClient");
5
6
  const ListIdentityProvidersCommand_1 = require("../commands/ListIdentityProvidersCommand");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListIdentityProvidersCommand_1.ListIdentityProvidersCommand(input), ...args);
8
- };
9
- async function* paginateListIdentityProviders(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 CognitoIdentityProviderClient_1.CognitoIdentityProviderClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient");
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.paginateListIdentityProviders = paginateListIdentityProviders;
7
+ exports.paginateListIdentityProviders = (0, core_1.createPaginator)(CognitoIdentityProviderClient_1.CognitoIdentityProviderClient, ListIdentityProvidersCommand_1.ListIdentityProvidersCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListResourceServers = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const CognitoIdentityProviderClient_1 = require("../CognitoIdentityProviderClient");
5
6
  const ListResourceServersCommand_1 = require("../commands/ListResourceServersCommand");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListResourceServersCommand_1.ListResourceServersCommand(input), ...args);
8
- };
9
- async function* paginateListResourceServers(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 CognitoIdentityProviderClient_1.CognitoIdentityProviderClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient");
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.paginateListResourceServers = paginateListResourceServers;
7
+ exports.paginateListResourceServers = (0, core_1.createPaginator)(CognitoIdentityProviderClient_1.CognitoIdentityProviderClient, ListResourceServersCommand_1.ListResourceServersCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListUserPoolClients = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const CognitoIdentityProviderClient_1 = require("../CognitoIdentityProviderClient");
5
6
  const ListUserPoolClientsCommand_1 = require("../commands/ListUserPoolClientsCommand");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListUserPoolClientsCommand_1.ListUserPoolClientsCommand(input), ...args);
8
- };
9
- async function* paginateListUserPoolClients(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 CognitoIdentityProviderClient_1.CognitoIdentityProviderClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient");
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.paginateListUserPoolClients = paginateListUserPoolClients;
7
+ exports.paginateListUserPoolClients = (0, core_1.createPaginator)(CognitoIdentityProviderClient_1.CognitoIdentityProviderClient, ListUserPoolClientsCommand_1.ListUserPoolClientsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListUserPools = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const CognitoIdentityProviderClient_1 = require("../CognitoIdentityProviderClient");
5
6
  const ListUserPoolsCommand_1 = require("../commands/ListUserPoolsCommand");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListUserPoolsCommand_1.ListUserPoolsCommand(input), ...args);
8
- };
9
- async function* paginateListUserPools(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 CognitoIdentityProviderClient_1.CognitoIdentityProviderClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient");
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.paginateListUserPools = paginateListUserPools;
7
+ exports.paginateListUserPools = (0, core_1.createPaginator)(CognitoIdentityProviderClient_1.CognitoIdentityProviderClient, ListUserPoolsCommand_1.ListUserPoolsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListUsersInGroup = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const CognitoIdentityProviderClient_1 = require("../CognitoIdentityProviderClient");
5
6
  const ListUsersInGroupCommand_1 = require("../commands/ListUsersInGroupCommand");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListUsersInGroupCommand_1.ListUsersInGroupCommand(input), ...args);
8
- };
9
- async function* paginateListUsersInGroup(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["Limit"] = config.pageSize;
16
- if (config.client instanceof CognitoIdentityProviderClient_1.CognitoIdentityProviderClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient");
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.paginateListUsersInGroup = paginateListUsersInGroup;
7
+ exports.paginateListUsersInGroup = (0, core_1.createPaginator)(CognitoIdentityProviderClient_1.CognitoIdentityProviderClient, ListUsersInGroupCommand_1.ListUsersInGroupCommand, "NextToken", "NextToken", "Limit");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListUsers = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const CognitoIdentityProviderClient_1 = require("../CognitoIdentityProviderClient");
5
6
  const ListUsersCommand_1 = require("../commands/ListUsersCommand");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListUsersCommand_1.ListUsersCommand(input), ...args);
8
- };
9
- async function* paginateListUsers(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.PaginationToken = token;
15
- input["Limit"] = config.pageSize;
16
- if (config.client instanceof CognitoIdentityProviderClient_1.CognitoIdentityProviderClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.PaginationToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListUsers = paginateListUsers;
7
+ exports.paginateListUsers = (0, core_1.createPaginator)(CognitoIdentityProviderClient_1.CognitoIdentityProviderClient, ListUsersCommand_1.ListUsersCommand, "PaginationToken", "PaginationToken", "Limit");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { CognitoIdentityProviderClient } from "../CognitoIdentityProviderClient";
2
3
  import { AdminListGroupsForUserCommand, } from "../commands/AdminListGroupsForUserCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new AdminListGroupsForUserCommand(input), ...args);
5
- };
6
- export async function* paginateAdminListGroupsForUser(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["Limit"] = config.pageSize;
13
- if (config.client instanceof CognitoIdentityProviderClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient");
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 paginateAdminListGroupsForUser = createPaginator(CognitoIdentityProviderClient, AdminListGroupsForUserCommand, "NextToken", "NextToken", "Limit");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { CognitoIdentityProviderClient } from "../CognitoIdentityProviderClient";
2
3
  import { AdminListUserAuthEventsCommand, } from "../commands/AdminListUserAuthEventsCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new AdminListUserAuthEventsCommand(input), ...args);
5
- };
6
- export async function* paginateAdminListUserAuthEvents(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 CognitoIdentityProviderClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient");
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 paginateAdminListUserAuthEvents = createPaginator(CognitoIdentityProviderClient, AdminListUserAuthEventsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { CognitoIdentityProviderClient } from "../CognitoIdentityProviderClient";
2
3
  import { ListGroupsCommand } from "../commands/ListGroupsCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListGroupsCommand(input), ...args);
5
- };
6
- export async function* paginateListGroups(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["Limit"] = config.pageSize;
13
- if (config.client instanceof CognitoIdentityProviderClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient");
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 paginateListGroups = createPaginator(CognitoIdentityProviderClient, ListGroupsCommand, "NextToken", "NextToken", "Limit");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { CognitoIdentityProviderClient } from "../CognitoIdentityProviderClient";
2
3
  import { ListIdentityProvidersCommand, } from "../commands/ListIdentityProvidersCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListIdentityProvidersCommand(input), ...args);
5
- };
6
- export async function* paginateListIdentityProviders(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 CognitoIdentityProviderClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient");
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 paginateListIdentityProviders = createPaginator(CognitoIdentityProviderClient, ListIdentityProvidersCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { CognitoIdentityProviderClient } from "../CognitoIdentityProviderClient";
2
3
  import { ListResourceServersCommand, } from "../commands/ListResourceServersCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListResourceServersCommand(input), ...args);
5
- };
6
- export async function* paginateListResourceServers(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 CognitoIdentityProviderClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient");
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 paginateListResourceServers = createPaginator(CognitoIdentityProviderClient, ListResourceServersCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { CognitoIdentityProviderClient } from "../CognitoIdentityProviderClient";
2
3
  import { ListUserPoolClientsCommand, } from "../commands/ListUserPoolClientsCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListUserPoolClientsCommand(input), ...args);
5
- };
6
- export async function* paginateListUserPoolClients(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 CognitoIdentityProviderClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient");
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 paginateListUserPoolClients = createPaginator(CognitoIdentityProviderClient, ListUserPoolClientsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { CognitoIdentityProviderClient } from "../CognitoIdentityProviderClient";
2
3
  import { ListUserPoolsCommand, } from "../commands/ListUserPoolsCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListUserPoolsCommand(input), ...args);
5
- };
6
- export async function* paginateListUserPools(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 CognitoIdentityProviderClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient");
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 paginateListUserPools = createPaginator(CognitoIdentityProviderClient, ListUserPoolsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { CognitoIdentityProviderClient } from "../CognitoIdentityProviderClient";
2
3
  import { ListUsersInGroupCommand, } from "../commands/ListUsersInGroupCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListUsersInGroupCommand(input), ...args);
5
- };
6
- export async function* paginateListUsersInGroup(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["Limit"] = config.pageSize;
13
- if (config.client instanceof CognitoIdentityProviderClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient");
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 paginateListUsersInGroup = createPaginator(CognitoIdentityProviderClient, ListUsersInGroupCommand, "NextToken", "NextToken", "Limit");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { CognitoIdentityProviderClient } from "../CognitoIdentityProviderClient";
2
3
  import { ListUsersCommand } from "../commands/ListUsersCommand";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListUsersCommand(input), ...args);
5
- };
6
- export async function* paginateListUsers(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.PaginationToken = token;
12
- input["Limit"] = config.pageSize;
13
- if (config.client instanceof CognitoIdentityProviderClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected CognitoIdentityProvider | CognitoIdentityProviderClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.PaginationToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListUsers = createPaginator(CognitoIdentityProviderClient, ListUsersCommand, "PaginationToken", "PaginationToken", "Limit");
@@ -4,4 +4,4 @@ import { CognitoIdentityProviderPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateAdminListGroupsForUser(config: CognitoIdentityProviderPaginationConfiguration, input: AdminListGroupsForUserCommandInput, ...additionalArguments: any): Paginator<AdminListGroupsForUserCommandOutput>;
7
+ export declare const paginateAdminListGroupsForUser: (config: CognitoIdentityProviderPaginationConfiguration, input: AdminListGroupsForUserCommandInput, ...rest: any[]) => Paginator<AdminListGroupsForUserCommandOutput>;
@@ -4,4 +4,4 @@ import { CognitoIdentityProviderPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateAdminListUserAuthEvents(config: CognitoIdentityProviderPaginationConfiguration, input: AdminListUserAuthEventsCommandInput, ...additionalArguments: any): Paginator<AdminListUserAuthEventsCommandOutput>;
7
+ export declare const paginateAdminListUserAuthEvents: (config: CognitoIdentityProviderPaginationConfiguration, input: AdminListUserAuthEventsCommandInput, ...rest: any[]) => Paginator<AdminListUserAuthEventsCommandOutput>;
@@ -4,4 +4,4 @@ import { CognitoIdentityProviderPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListGroups(config: CognitoIdentityProviderPaginationConfiguration, input: ListGroupsCommandInput, ...additionalArguments: any): Paginator<ListGroupsCommandOutput>;
7
+ export declare const paginateListGroups: (config: CognitoIdentityProviderPaginationConfiguration, input: ListGroupsCommandInput, ...rest: any[]) => Paginator<ListGroupsCommandOutput>;
@@ -4,4 +4,4 @@ import { CognitoIdentityProviderPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListIdentityProviders(config: CognitoIdentityProviderPaginationConfiguration, input: ListIdentityProvidersCommandInput, ...additionalArguments: any): Paginator<ListIdentityProvidersCommandOutput>;
7
+ export declare const paginateListIdentityProviders: (config: CognitoIdentityProviderPaginationConfiguration, input: ListIdentityProvidersCommandInput, ...rest: any[]) => Paginator<ListIdentityProvidersCommandOutput>;
@@ -4,4 +4,4 @@ import { CognitoIdentityProviderPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListResourceServers(config: CognitoIdentityProviderPaginationConfiguration, input: ListResourceServersCommandInput, ...additionalArguments: any): Paginator<ListResourceServersCommandOutput>;
7
+ export declare const paginateListResourceServers: (config: CognitoIdentityProviderPaginationConfiguration, input: ListResourceServersCommandInput, ...rest: any[]) => Paginator<ListResourceServersCommandOutput>;
@@ -4,4 +4,4 @@ import { CognitoIdentityProviderPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListUserPoolClients(config: CognitoIdentityProviderPaginationConfiguration, input: ListUserPoolClientsCommandInput, ...additionalArguments: any): Paginator<ListUserPoolClientsCommandOutput>;
7
+ export declare const paginateListUserPoolClients: (config: CognitoIdentityProviderPaginationConfiguration, input: ListUserPoolClientsCommandInput, ...rest: any[]) => Paginator<ListUserPoolClientsCommandOutput>;
@@ -4,4 +4,4 @@ import { CognitoIdentityProviderPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListUserPools(config: CognitoIdentityProviderPaginationConfiguration, input: ListUserPoolsCommandInput, ...additionalArguments: any): Paginator<ListUserPoolsCommandOutput>;
7
+ export declare const paginateListUserPools: (config: CognitoIdentityProviderPaginationConfiguration, input: ListUserPoolsCommandInput, ...rest: any[]) => Paginator<ListUserPoolsCommandOutput>;
@@ -4,4 +4,4 @@ import { CognitoIdentityProviderPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListUsersInGroup(config: CognitoIdentityProviderPaginationConfiguration, input: ListUsersInGroupCommandInput, ...additionalArguments: any): Paginator<ListUsersInGroupCommandOutput>;
7
+ export declare const paginateListUsersInGroup: (config: CognitoIdentityProviderPaginationConfiguration, input: ListUsersInGroupCommandInput, ...rest: any[]) => Paginator<ListUsersInGroupCommandOutput>;
@@ -4,4 +4,4 @@ import { CognitoIdentityProviderPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListUsers(config: CognitoIdentityProviderPaginationConfiguration, input: ListUsersCommandInput, ...additionalArguments: any): Paginator<ListUsersCommandOutput>;
7
+ export declare const paginateListUsers: (config: CognitoIdentityProviderPaginationConfiguration, input: ListUsersCommandInput, ...rest: any[]) => Paginator<ListUsersCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  AdminListGroupsForUserCommandOutput,
5
5
  } from "../commands/AdminListGroupsForUserCommand";
6
6
  import { CognitoIdentityProviderPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateAdminListGroupsForUser(
7
+ export declare const paginateAdminListGroupsForUser: (
8
8
  config: CognitoIdentityProviderPaginationConfiguration,
9
9
  input: AdminListGroupsForUserCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<AdminListGroupsForUserCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<AdminListGroupsForUserCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  AdminListUserAuthEventsCommandOutput,
5
5
  } from "../commands/AdminListUserAuthEventsCommand";
6
6
  import { CognitoIdentityProviderPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateAdminListUserAuthEvents(
7
+ export declare const paginateAdminListUserAuthEvents: (
8
8
  config: CognitoIdentityProviderPaginationConfiguration,
9
9
  input: AdminListUserAuthEventsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<AdminListUserAuthEventsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<AdminListUserAuthEventsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListGroupsCommandOutput,
5
5
  } from "../commands/ListGroupsCommand";
6
6
  import { CognitoIdentityProviderPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListGroups(
7
+ export declare const paginateListGroups: (
8
8
  config: CognitoIdentityProviderPaginationConfiguration,
9
9
  input: ListGroupsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListGroupsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListGroupsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListIdentityProvidersCommandOutput,
5
5
  } from "../commands/ListIdentityProvidersCommand";
6
6
  import { CognitoIdentityProviderPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListIdentityProviders(
7
+ export declare const paginateListIdentityProviders: (
8
8
  config: CognitoIdentityProviderPaginationConfiguration,
9
9
  input: ListIdentityProvidersCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListIdentityProvidersCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListIdentityProvidersCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListResourceServersCommandOutput,
5
5
  } from "../commands/ListResourceServersCommand";
6
6
  import { CognitoIdentityProviderPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListResourceServers(
7
+ export declare const paginateListResourceServers: (
8
8
  config: CognitoIdentityProviderPaginationConfiguration,
9
9
  input: ListResourceServersCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListResourceServersCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListResourceServersCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListUserPoolClientsCommandOutput,
5
5
  } from "../commands/ListUserPoolClientsCommand";
6
6
  import { CognitoIdentityProviderPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListUserPoolClients(
7
+ export declare const paginateListUserPoolClients: (
8
8
  config: CognitoIdentityProviderPaginationConfiguration,
9
9
  input: ListUserPoolClientsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListUserPoolClientsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListUserPoolClientsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListUserPoolsCommandOutput,
5
5
  } from "../commands/ListUserPoolsCommand";
6
6
  import { CognitoIdentityProviderPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListUserPools(
7
+ export declare const paginateListUserPools: (
8
8
  config: CognitoIdentityProviderPaginationConfiguration,
9
9
  input: ListUserPoolsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListUserPoolsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListUserPoolsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListUsersInGroupCommandOutput,
5
5
  } from "../commands/ListUsersInGroupCommand";
6
6
  import { CognitoIdentityProviderPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListUsersInGroup(
7
+ export declare const paginateListUsersInGroup: (
8
8
  config: CognitoIdentityProviderPaginationConfiguration,
9
9
  input: ListUsersInGroupCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListUsersInGroupCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListUsersInGroupCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListUsersCommandOutput,
5
5
  } from "../commands/ListUsersCommand";
6
6
  import { CognitoIdentityProviderPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListUsers(
7
+ export declare const paginateListUsers: (
8
8
  config: CognitoIdentityProviderPaginationConfiguration,
9
9
  input: ListUsersCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListUsersCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListUsersCommandOutput>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-cognito-identity-provider",
3
3
  "description": "AWS SDK for JavaScript Cognito Identity Provider 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",