@aws-sdk/client-chime-sdk-voice 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.
- package/dist-cjs/pagination/ListPhoneNumberOrdersPaginator.js +2 -24
- package/dist-cjs/pagination/ListPhoneNumbersPaginator.js +2 -24
- package/dist-cjs/pagination/ListProxySessionsPaginator.js +2 -24
- package/dist-cjs/pagination/ListSipMediaApplicationsPaginator.js +2 -24
- package/dist-cjs/pagination/ListSipRulesPaginator.js +2 -24
- package/dist-cjs/pagination/ListVoiceConnectorGroupsPaginator.js +2 -24
- package/dist-cjs/pagination/ListVoiceConnectorsPaginator.js +2 -24
- package/dist-cjs/pagination/ListVoiceProfileDomainsPaginator.js +2 -24
- package/dist-cjs/pagination/ListVoiceProfilesPaginator.js +2 -24
- package/dist-cjs/pagination/SearchAvailablePhoneNumbersPaginator.js +2 -24
- package/dist-cjs/protocols/Aws_restJson1.js +530 -1222
- package/dist-es/pagination/ListPhoneNumberOrdersPaginator.js +2 -23
- package/dist-es/pagination/ListPhoneNumbersPaginator.js +2 -23
- package/dist-es/pagination/ListProxySessionsPaginator.js +2 -23
- package/dist-es/pagination/ListSipMediaApplicationsPaginator.js +2 -23
- package/dist-es/pagination/ListSipRulesPaginator.js +2 -23
- package/dist-es/pagination/ListVoiceConnectorGroupsPaginator.js +2 -23
- package/dist-es/pagination/ListVoiceConnectorsPaginator.js +2 -23
- package/dist-es/pagination/ListVoiceProfileDomainsPaginator.js +2 -23
- package/dist-es/pagination/ListVoiceProfilesPaginator.js +2 -23
- package/dist-es/pagination/SearchAvailablePhoneNumbersPaginator.js +2 -23
- package/dist-es/protocols/Aws_restJson1.js +531 -1223
- package/dist-types/pagination/ListPhoneNumberOrdersPaginator.d.ts +1 -1
- package/dist-types/pagination/ListPhoneNumbersPaginator.d.ts +1 -1
- package/dist-types/pagination/ListProxySessionsPaginator.d.ts +1 -1
- package/dist-types/pagination/ListSipMediaApplicationsPaginator.d.ts +1 -1
- package/dist-types/pagination/ListSipRulesPaginator.d.ts +1 -1
- package/dist-types/pagination/ListVoiceConnectorGroupsPaginator.d.ts +1 -1
- package/dist-types/pagination/ListVoiceConnectorsPaginator.d.ts +1 -1
- package/dist-types/pagination/ListVoiceProfileDomainsPaginator.d.ts +1 -1
- package/dist-types/pagination/ListVoiceProfilesPaginator.d.ts +1 -1
- package/dist-types/pagination/SearchAvailablePhoneNumbersPaginator.d.ts +1 -1
- package/dist-types/ts3.4/pagination/ListPhoneNumberOrdersPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListPhoneNumbersPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListProxySessionsPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListSipMediaApplicationsPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListSipRulesPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListVoiceConnectorGroupsPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListVoiceConnectorsPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListVoiceProfileDomainsPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListVoiceProfilesPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/SearchAvailablePhoneNumbersPaginator.d.ts +3 -3
- package/package.json +7 -6
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.paginateListPhoneNumberOrders = void 0;
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
4
5
|
const ChimeSDKVoiceClient_1 = require("../ChimeSDKVoiceClient");
|
|
5
6
|
const ListPhoneNumberOrdersCommand_1 = require("../commands/ListPhoneNumberOrdersCommand");
|
|
6
|
-
|
|
7
|
-
return await client.send(new ListPhoneNumberOrdersCommand_1.ListPhoneNumberOrdersCommand(input), ...args);
|
|
8
|
-
};
|
|
9
|
-
async function* paginateListPhoneNumberOrders(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 ChimeSDKVoiceClient_1.ChimeSDKVoiceClient) {
|
|
17
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
throw new Error("Invalid client, expected ChimeSDKVoice | ChimeSDKVoiceClient");
|
|
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.paginateListPhoneNumberOrders = paginateListPhoneNumberOrders;
|
|
7
|
+
exports.paginateListPhoneNumberOrders = (0, core_1.createPaginator)(ChimeSDKVoiceClient_1.ChimeSDKVoiceClient, ListPhoneNumberOrdersCommand_1.ListPhoneNumberOrdersCommand, "NextToken", "NextToken", "MaxResults");
|
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.paginateListPhoneNumbers = void 0;
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
4
5
|
const ChimeSDKVoiceClient_1 = require("../ChimeSDKVoiceClient");
|
|
5
6
|
const ListPhoneNumbersCommand_1 = require("../commands/ListPhoneNumbersCommand");
|
|
6
|
-
|
|
7
|
-
return await client.send(new ListPhoneNumbersCommand_1.ListPhoneNumbersCommand(input), ...args);
|
|
8
|
-
};
|
|
9
|
-
async function* paginateListPhoneNumbers(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 ChimeSDKVoiceClient_1.ChimeSDKVoiceClient) {
|
|
17
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
throw new Error("Invalid client, expected ChimeSDKVoice | ChimeSDKVoiceClient");
|
|
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.paginateListPhoneNumbers = paginateListPhoneNumbers;
|
|
7
|
+
exports.paginateListPhoneNumbers = (0, core_1.createPaginator)(ChimeSDKVoiceClient_1.ChimeSDKVoiceClient, ListPhoneNumbersCommand_1.ListPhoneNumbersCommand, "NextToken", "NextToken", "MaxResults");
|
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.paginateListProxySessions = void 0;
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
4
5
|
const ChimeSDKVoiceClient_1 = require("../ChimeSDKVoiceClient");
|
|
5
6
|
const ListProxySessionsCommand_1 = require("../commands/ListProxySessionsCommand");
|
|
6
|
-
|
|
7
|
-
return await client.send(new ListProxySessionsCommand_1.ListProxySessionsCommand(input), ...args);
|
|
8
|
-
};
|
|
9
|
-
async function* paginateListProxySessions(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 ChimeSDKVoiceClient_1.ChimeSDKVoiceClient) {
|
|
17
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
throw new Error("Invalid client, expected ChimeSDKVoice | ChimeSDKVoiceClient");
|
|
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.paginateListProxySessions = paginateListProxySessions;
|
|
7
|
+
exports.paginateListProxySessions = (0, core_1.createPaginator)(ChimeSDKVoiceClient_1.ChimeSDKVoiceClient, ListProxySessionsCommand_1.ListProxySessionsCommand, "NextToken", "NextToken", "MaxResults");
|
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.paginateListSipMediaApplications = void 0;
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
4
5
|
const ChimeSDKVoiceClient_1 = require("../ChimeSDKVoiceClient");
|
|
5
6
|
const ListSipMediaApplicationsCommand_1 = require("../commands/ListSipMediaApplicationsCommand");
|
|
6
|
-
|
|
7
|
-
return await client.send(new ListSipMediaApplicationsCommand_1.ListSipMediaApplicationsCommand(input), ...args);
|
|
8
|
-
};
|
|
9
|
-
async function* paginateListSipMediaApplications(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 ChimeSDKVoiceClient_1.ChimeSDKVoiceClient) {
|
|
17
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
throw new Error("Invalid client, expected ChimeSDKVoice | ChimeSDKVoiceClient");
|
|
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.paginateListSipMediaApplications = paginateListSipMediaApplications;
|
|
7
|
+
exports.paginateListSipMediaApplications = (0, core_1.createPaginator)(ChimeSDKVoiceClient_1.ChimeSDKVoiceClient, ListSipMediaApplicationsCommand_1.ListSipMediaApplicationsCommand, "NextToken", "NextToken", "MaxResults");
|
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.paginateListSipRules = void 0;
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
4
5
|
const ChimeSDKVoiceClient_1 = require("../ChimeSDKVoiceClient");
|
|
5
6
|
const ListSipRulesCommand_1 = require("../commands/ListSipRulesCommand");
|
|
6
|
-
|
|
7
|
-
return await client.send(new ListSipRulesCommand_1.ListSipRulesCommand(input), ...args);
|
|
8
|
-
};
|
|
9
|
-
async function* paginateListSipRules(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 ChimeSDKVoiceClient_1.ChimeSDKVoiceClient) {
|
|
17
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
throw new Error("Invalid client, expected ChimeSDKVoice | ChimeSDKVoiceClient");
|
|
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.paginateListSipRules = paginateListSipRules;
|
|
7
|
+
exports.paginateListSipRules = (0, core_1.createPaginator)(ChimeSDKVoiceClient_1.ChimeSDKVoiceClient, ListSipRulesCommand_1.ListSipRulesCommand, "NextToken", "NextToken", "MaxResults");
|
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.paginateListVoiceConnectorGroups = void 0;
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
4
5
|
const ChimeSDKVoiceClient_1 = require("../ChimeSDKVoiceClient");
|
|
5
6
|
const ListVoiceConnectorGroupsCommand_1 = require("../commands/ListVoiceConnectorGroupsCommand");
|
|
6
|
-
|
|
7
|
-
return await client.send(new ListVoiceConnectorGroupsCommand_1.ListVoiceConnectorGroupsCommand(input), ...args);
|
|
8
|
-
};
|
|
9
|
-
async function* paginateListVoiceConnectorGroups(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 ChimeSDKVoiceClient_1.ChimeSDKVoiceClient) {
|
|
17
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
throw new Error("Invalid client, expected ChimeSDKVoice | ChimeSDKVoiceClient");
|
|
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.paginateListVoiceConnectorGroups = paginateListVoiceConnectorGroups;
|
|
7
|
+
exports.paginateListVoiceConnectorGroups = (0, core_1.createPaginator)(ChimeSDKVoiceClient_1.ChimeSDKVoiceClient, ListVoiceConnectorGroupsCommand_1.ListVoiceConnectorGroupsCommand, "NextToken", "NextToken", "MaxResults");
|
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.paginateListVoiceConnectors = void 0;
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
4
5
|
const ChimeSDKVoiceClient_1 = require("../ChimeSDKVoiceClient");
|
|
5
6
|
const ListVoiceConnectorsCommand_1 = require("../commands/ListVoiceConnectorsCommand");
|
|
6
|
-
|
|
7
|
-
return await client.send(new ListVoiceConnectorsCommand_1.ListVoiceConnectorsCommand(input), ...args);
|
|
8
|
-
};
|
|
9
|
-
async function* paginateListVoiceConnectors(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 ChimeSDKVoiceClient_1.ChimeSDKVoiceClient) {
|
|
17
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
throw new Error("Invalid client, expected ChimeSDKVoice | ChimeSDKVoiceClient");
|
|
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.paginateListVoiceConnectors = paginateListVoiceConnectors;
|
|
7
|
+
exports.paginateListVoiceConnectors = (0, core_1.createPaginator)(ChimeSDKVoiceClient_1.ChimeSDKVoiceClient, ListVoiceConnectorsCommand_1.ListVoiceConnectorsCommand, "NextToken", "NextToken", "MaxResults");
|
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.paginateListVoiceProfileDomains = void 0;
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
4
5
|
const ChimeSDKVoiceClient_1 = require("../ChimeSDKVoiceClient");
|
|
5
6
|
const ListVoiceProfileDomainsCommand_1 = require("../commands/ListVoiceProfileDomainsCommand");
|
|
6
|
-
|
|
7
|
-
return await client.send(new ListVoiceProfileDomainsCommand_1.ListVoiceProfileDomainsCommand(input), ...args);
|
|
8
|
-
};
|
|
9
|
-
async function* paginateListVoiceProfileDomains(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 ChimeSDKVoiceClient_1.ChimeSDKVoiceClient) {
|
|
17
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
throw new Error("Invalid client, expected ChimeSDKVoice | ChimeSDKVoiceClient");
|
|
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.paginateListVoiceProfileDomains = paginateListVoiceProfileDomains;
|
|
7
|
+
exports.paginateListVoiceProfileDomains = (0, core_1.createPaginator)(ChimeSDKVoiceClient_1.ChimeSDKVoiceClient, ListVoiceProfileDomainsCommand_1.ListVoiceProfileDomainsCommand, "NextToken", "NextToken", "MaxResults");
|
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.paginateListVoiceProfiles = void 0;
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
4
5
|
const ChimeSDKVoiceClient_1 = require("../ChimeSDKVoiceClient");
|
|
5
6
|
const ListVoiceProfilesCommand_1 = require("../commands/ListVoiceProfilesCommand");
|
|
6
|
-
|
|
7
|
-
return await client.send(new ListVoiceProfilesCommand_1.ListVoiceProfilesCommand(input), ...args);
|
|
8
|
-
};
|
|
9
|
-
async function* paginateListVoiceProfiles(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 ChimeSDKVoiceClient_1.ChimeSDKVoiceClient) {
|
|
17
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
throw new Error("Invalid client, expected ChimeSDKVoice | ChimeSDKVoiceClient");
|
|
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.paginateListVoiceProfiles = paginateListVoiceProfiles;
|
|
7
|
+
exports.paginateListVoiceProfiles = (0, core_1.createPaginator)(ChimeSDKVoiceClient_1.ChimeSDKVoiceClient, ListVoiceProfilesCommand_1.ListVoiceProfilesCommand, "NextToken", "NextToken", "MaxResults");
|
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.paginateSearchAvailablePhoneNumbers = void 0;
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
4
5
|
const ChimeSDKVoiceClient_1 = require("../ChimeSDKVoiceClient");
|
|
5
6
|
const SearchAvailablePhoneNumbersCommand_1 = require("../commands/SearchAvailablePhoneNumbersCommand");
|
|
6
|
-
|
|
7
|
-
return await client.send(new SearchAvailablePhoneNumbersCommand_1.SearchAvailablePhoneNumbersCommand(input), ...args);
|
|
8
|
-
};
|
|
9
|
-
async function* paginateSearchAvailablePhoneNumbers(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 ChimeSDKVoiceClient_1.ChimeSDKVoiceClient) {
|
|
17
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
throw new Error("Invalid client, expected ChimeSDKVoice | ChimeSDKVoiceClient");
|
|
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.paginateSearchAvailablePhoneNumbers = paginateSearchAvailablePhoneNumbers;
|
|
7
|
+
exports.paginateSearchAvailablePhoneNumbers = (0, core_1.createPaginator)(ChimeSDKVoiceClient_1.ChimeSDKVoiceClient, SearchAvailablePhoneNumbersCommand_1.SearchAvailablePhoneNumbersCommand, "NextToken", "NextToken", "MaxResults");
|