@aws-sdk/client-sso
Advanced tools
Comparing version 3.477.0 to 3.478.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.paginateListAccountRoles = void 0; | ||
const core_1 = require("@smithy/core"); | ||
const ListAccountRolesCommand_1 = require("../commands/ListAccountRolesCommand"); | ||
const SSOClient_1 = require("../SSOClient"); | ||
const makePagedClientRequest = async (client, input, ...args) => { | ||
return await client.send(new ListAccountRolesCommand_1.ListAccountRolesCommand(input), ...args); | ||
}; | ||
async function* paginateListAccountRoles(config, input, ...additionalArguments) { | ||
let token = config.startingToken || undefined; | ||
let hasNext = true; | ||
let page; | ||
while (hasNext) { | ||
input.nextToken = token; | ||
input["maxResults"] = config.pageSize; | ||
if (config.client instanceof SSOClient_1.SSOClient) { | ||
page = await makePagedClientRequest(config.client, input, ...additionalArguments); | ||
} | ||
else { | ||
throw new Error("Invalid client, expected SSO | SSOClient"); | ||
} | ||
yield page; | ||
const prevToken = token; | ||
token = page.nextToken; | ||
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); | ||
} | ||
return undefined; | ||
} | ||
exports.paginateListAccountRoles = paginateListAccountRoles; | ||
exports.paginateListAccountRoles = (0, core_1.createPaginator)(SSOClient_1.SSOClient, ListAccountRolesCommand_1.ListAccountRolesCommand, "nextToken", "nextToken", "maxResults"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.paginateListAccounts = void 0; | ||
const core_1 = require("@smithy/core"); | ||
const ListAccountsCommand_1 = require("../commands/ListAccountsCommand"); | ||
const SSOClient_1 = require("../SSOClient"); | ||
const makePagedClientRequest = async (client, input, ...args) => { | ||
return await client.send(new ListAccountsCommand_1.ListAccountsCommand(input), ...args); | ||
}; | ||
async function* paginateListAccounts(config, input, ...additionalArguments) { | ||
let token = config.startingToken || undefined; | ||
let hasNext = true; | ||
let page; | ||
while (hasNext) { | ||
input.nextToken = token; | ||
input["maxResults"] = config.pageSize; | ||
if (config.client instanceof SSOClient_1.SSOClient) { | ||
page = await makePagedClientRequest(config.client, input, ...additionalArguments); | ||
} | ||
else { | ||
throw new Error("Invalid client, expected SSO | SSOClient"); | ||
} | ||
yield page; | ||
const prevToken = token; | ||
token = page.nextToken; | ||
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); | ||
} | ||
return undefined; | ||
} | ||
exports.paginateListAccounts = paginateListAccounts; | ||
exports.paginateListAccounts = (0, core_1.createPaginator)(SSOClient_1.SSOClient, ListAccountsCommand_1.ListAccountsCommand, "nextToken", "nextToken", "maxResults"); |
@@ -0,25 +1,4 @@ | ||
import { createPaginator } from "@smithy/core"; | ||
import { ListAccountRolesCommand, } from "../commands/ListAccountRolesCommand"; | ||
import { SSOClient } from "../SSOClient"; | ||
const makePagedClientRequest = async (client, input, ...args) => { | ||
return await client.send(new ListAccountRolesCommand(input), ...args); | ||
}; | ||
export async function* paginateListAccountRoles(config, input, ...additionalArguments) { | ||
let token = config.startingToken || undefined; | ||
let hasNext = true; | ||
let page; | ||
while (hasNext) { | ||
input.nextToken = token; | ||
input["maxResults"] = config.pageSize; | ||
if (config.client instanceof SSOClient) { | ||
page = await makePagedClientRequest(config.client, input, ...additionalArguments); | ||
} | ||
else { | ||
throw new Error("Invalid client, expected SSO | SSOClient"); | ||
} | ||
yield page; | ||
const prevToken = token; | ||
token = page.nextToken; | ||
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); | ||
} | ||
return undefined; | ||
} | ||
export const paginateListAccountRoles = createPaginator(SSOClient, ListAccountRolesCommand, "nextToken", "nextToken", "maxResults"); |
@@ -0,25 +1,4 @@ | ||
import { createPaginator } from "@smithy/core"; | ||
import { ListAccountsCommand, } from "../commands/ListAccountsCommand"; | ||
import { SSOClient } from "../SSOClient"; | ||
const makePagedClientRequest = async (client, input, ...args) => { | ||
return await client.send(new ListAccountsCommand(input), ...args); | ||
}; | ||
export async function* paginateListAccounts(config, input, ...additionalArguments) { | ||
let token = config.startingToken || undefined; | ||
let hasNext = true; | ||
let page; | ||
while (hasNext) { | ||
input.nextToken = token; | ||
input["maxResults"] = config.pageSize; | ||
if (config.client instanceof SSOClient) { | ||
page = await makePagedClientRequest(config.client, input, ...additionalArguments); | ||
} | ||
else { | ||
throw new Error("Invalid client, expected SSO | SSOClient"); | ||
} | ||
yield page; | ||
const prevToken = token; | ||
token = page.nextToken; | ||
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); | ||
} | ||
return undefined; | ||
} | ||
export const paginateListAccounts = createPaginator(SSOClient, ListAccountsCommand, "nextToken", "nextToken", "maxResults"); |
@@ -7,2 +7,2 @@ import { Paginator } from "@smithy/types"; | ||
*/ | ||
export declare function paginateListAccountRoles(config: SSOPaginationConfiguration, input: ListAccountRolesCommandInput, ...additionalArguments: any): Paginator<ListAccountRolesCommandOutput>; | ||
export declare const paginateListAccountRoles: (config: SSOPaginationConfiguration, input: ListAccountRolesCommandInput, ...rest: any[]) => Paginator<ListAccountRolesCommandOutput>; |
@@ -7,2 +7,2 @@ import { Paginator } from "@smithy/types"; | ||
*/ | ||
export declare function paginateListAccounts(config: SSOPaginationConfiguration, input: ListAccountsCommandInput, ...additionalArguments: any): Paginator<ListAccountsCommandOutput>; | ||
export declare const paginateListAccounts: (config: SSOPaginationConfiguration, input: ListAccountsCommandInput, ...rest: any[]) => Paginator<ListAccountsCommandOutput>; |
@@ -7,6 +7,6 @@ import { Paginator } from "@smithy/types"; | ||
import { SSOPaginationConfiguration } from "./Interfaces"; | ||
export declare function paginateListAccountRoles( | ||
export declare const paginateListAccountRoles: ( | ||
config: SSOPaginationConfiguration, | ||
input: ListAccountRolesCommandInput, | ||
...additionalArguments: any | ||
): Paginator<ListAccountRolesCommandOutput>; | ||
...rest: any[] | ||
) => Paginator<ListAccountRolesCommandOutput>; |
@@ -7,6 +7,6 @@ import { Paginator } from "@smithy/types"; | ||
import { SSOPaginationConfiguration } from "./Interfaces"; | ||
export declare function paginateListAccounts( | ||
export declare const paginateListAccounts: ( | ||
config: SSOPaginationConfiguration, | ||
input: ListAccountsCommandInput, | ||
...additionalArguments: any | ||
): Paginator<ListAccountsCommandOutput>; | ||
...rest: any[] | ||
) => Paginator<ListAccountsCommandOutput>; |
{ | ||
"name": "@aws-sdk/client-sso", | ||
"description": "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native", | ||
"version": "3.477.0", | ||
"version": "3.478.0", | ||
"scripts": { | ||
@@ -27,6 +27,6 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'", | ||
"@aws-sdk/middleware-recursion-detection": "3.468.0", | ||
"@aws-sdk/middleware-user-agent": "3.470.0", | ||
"@aws-sdk/middleware-user-agent": "3.478.0", | ||
"@aws-sdk/region-config-resolver": "3.470.0", | ||
"@aws-sdk/types": "3.468.0", | ||
"@aws-sdk/util-endpoints": "3.470.0", | ||
"@aws-sdk/util-endpoints": "3.478.0", | ||
"@aws-sdk/util-user-agent-browser": "3.468.0", | ||
@@ -33,0 +33,0 @@ "@aws-sdk/util-user-agent-node": "3.470.0", |
193276
3816
+ Added@aws-sdk/middleware-user-agent@3.478.0(transitive)
+ Added@aws-sdk/util-endpoints@3.478.0(transitive)
- Removed@aws-sdk/middleware-user-agent@3.470.0(transitive)
- Removed@aws-sdk/util-endpoints@3.470.0(transitive)