@aws-sdk/client-voice-id 3.35.0 → 3.36.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/CHANGELOG.md +13 -0
- package/dist-cjs/VoiceID.js +0 -1
- package/dist-cjs/VoiceIDClient.js +0 -1
- package/dist-cjs/commands/CreateDomainCommand.js +0 -1
- package/dist-cjs/commands/DeleteDomainCommand.js +0 -1
- package/dist-cjs/commands/DeleteFraudsterCommand.js +0 -1
- package/dist-cjs/commands/DeleteSpeakerCommand.js +0 -1
- package/dist-cjs/commands/DescribeDomainCommand.js +0 -1
- package/dist-cjs/commands/DescribeFraudsterCommand.js +0 -1
- package/dist-cjs/commands/DescribeFraudsterRegistrationJobCommand.js +0 -1
- package/dist-cjs/commands/DescribeSpeakerCommand.js +0 -1
- package/dist-cjs/commands/DescribeSpeakerEnrollmentJobCommand.js +0 -1
- package/dist-cjs/commands/EvaluateSessionCommand.js +0 -1
- package/dist-cjs/commands/ListDomainsCommand.js +0 -1
- package/dist-cjs/commands/ListFraudsterRegistrationJobsCommand.js +0 -1
- package/dist-cjs/commands/ListSpeakerEnrollmentJobsCommand.js +0 -1
- package/dist-cjs/commands/ListSpeakersCommand.js +0 -1
- package/dist-cjs/commands/ListTagsForResourceCommand.js +0 -1
- package/dist-cjs/commands/OptOutSpeakerCommand.js +0 -1
- package/dist-cjs/commands/StartFraudsterRegistrationJobCommand.js +0 -1
- package/dist-cjs/commands/StartSpeakerEnrollmentJobCommand.js +0 -1
- package/dist-cjs/commands/TagResourceCommand.js +0 -1
- package/dist-cjs/commands/UntagResourceCommand.js +0 -1
- package/dist-cjs/commands/UpdateDomainCommand.js +0 -1
- package/dist-cjs/endpoints.js +0 -1
- package/dist-cjs/index.js +0 -1
- package/dist-cjs/models/index.js +0 -1
- package/dist-cjs/models/models_0.js +0 -1
- package/dist-cjs/pagination/Interfaces.js +0 -1
- package/dist-cjs/pagination/ListDomainsPaginator.js +0 -1
- package/dist-cjs/pagination/ListFraudsterRegistrationJobsPaginator.js +0 -1
- package/dist-cjs/pagination/ListSpeakerEnrollmentJobsPaginator.js +0 -1
- package/dist-cjs/pagination/ListSpeakersPaginator.js +0 -1
- package/dist-cjs/protocols/Aws_json1_0.js +0 -1
- package/dist-cjs/runtimeConfig.browser.js +2 -3
- package/dist-cjs/runtimeConfig.js +3 -4
- package/dist-cjs/runtimeConfig.native.js +0 -1
- package/dist-cjs/runtimeConfig.shared.js +0 -1
- package/dist-es/VoiceID.js +0 -1
- package/dist-es/VoiceIDClient.js +0 -1
- package/dist-es/commands/CreateDomainCommand.js +0 -1
- package/dist-es/commands/DeleteDomainCommand.js +0 -1
- package/dist-es/commands/DeleteFraudsterCommand.js +0 -1
- package/dist-es/commands/DeleteSpeakerCommand.js +0 -1
- package/dist-es/commands/DescribeDomainCommand.js +0 -1
- package/dist-es/commands/DescribeFraudsterCommand.js +0 -1
- package/dist-es/commands/DescribeFraudsterRegistrationJobCommand.js +0 -1
- package/dist-es/commands/DescribeSpeakerCommand.js +0 -1
- package/dist-es/commands/DescribeSpeakerEnrollmentJobCommand.js +0 -1
- package/dist-es/commands/EvaluateSessionCommand.js +0 -1
- package/dist-es/commands/ListDomainsCommand.js +0 -1
- package/dist-es/commands/ListFraudsterRegistrationJobsCommand.js +0 -1
- package/dist-es/commands/ListSpeakerEnrollmentJobsCommand.js +0 -1
- package/dist-es/commands/ListSpeakersCommand.js +0 -1
- package/dist-es/commands/ListTagsForResourceCommand.js +0 -1
- package/dist-es/commands/OptOutSpeakerCommand.js +0 -1
- package/dist-es/commands/StartFraudsterRegistrationJobCommand.js +0 -1
- package/dist-es/commands/StartSpeakerEnrollmentJobCommand.js +0 -1
- package/dist-es/commands/TagResourceCommand.js +0 -1
- package/dist-es/commands/UntagResourceCommand.js +0 -1
- package/dist-es/commands/UpdateDomainCommand.js +0 -1
- package/dist-es/endpoints.js +0 -1
- package/dist-es/index.js +0 -1
- package/dist-es/models/index.js +0 -1
- package/dist-es/models/models_0.js +0 -1
- package/dist-es/pagination/Interfaces.js +0 -1
- package/dist-es/pagination/ListDomainsPaginator.js +0 -1
- package/dist-es/pagination/ListFraudsterRegistrationJobsPaginator.js +0 -1
- package/dist-es/pagination/ListSpeakerEnrollmentJobsPaginator.js +0 -1
- package/dist-es/pagination/ListSpeakersPaginator.js +0 -1
- package/dist-es/protocols/Aws_json1_0.js +0 -1
- package/dist-es/runtimeConfig.browser.js +1 -2
- package/dist-es/runtimeConfig.js +2 -3
- package/dist-es/runtimeConfig.native.js +0 -1
- package/dist-es/runtimeConfig.shared.js +0 -1
- package/package.json +33 -30
- package/dist-cjs/VoiceID.js.map +0 -1
- package/dist-cjs/VoiceIDClient.js.map +0 -1
- package/dist-cjs/commands/CreateDomainCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteDomainCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteFraudsterCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteSpeakerCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeDomainCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeFraudsterCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeFraudsterRegistrationJobCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeSpeakerCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeSpeakerEnrollmentJobCommand.js.map +0 -1
- package/dist-cjs/commands/EvaluateSessionCommand.js.map +0 -1
- package/dist-cjs/commands/ListDomainsCommand.js.map +0 -1
- package/dist-cjs/commands/ListFraudsterRegistrationJobsCommand.js.map +0 -1
- package/dist-cjs/commands/ListSpeakerEnrollmentJobsCommand.js.map +0 -1
- package/dist-cjs/commands/ListSpeakersCommand.js.map +0 -1
- package/dist-cjs/commands/ListTagsForResourceCommand.js.map +0 -1
- package/dist-cjs/commands/OptOutSpeakerCommand.js.map +0 -1
- package/dist-cjs/commands/StartFraudsterRegistrationJobCommand.js.map +0 -1
- package/dist-cjs/commands/StartSpeakerEnrollmentJobCommand.js.map +0 -1
- package/dist-cjs/commands/TagResourceCommand.js.map +0 -1
- package/dist-cjs/commands/UntagResourceCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateDomainCommand.js.map +0 -1
- package/dist-cjs/endpoints.js.map +0 -1
- package/dist-cjs/index.js.map +0 -1
- package/dist-cjs/models/index.js.map +0 -1
- package/dist-cjs/models/models_0.js.map +0 -1
- package/dist-cjs/pagination/Interfaces.js.map +0 -1
- package/dist-cjs/pagination/ListDomainsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListFraudsterRegistrationJobsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListSpeakerEnrollmentJobsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListSpeakersPaginator.js.map +0 -1
- package/dist-cjs/protocols/Aws_json1_0.js.map +0 -1
- package/dist-cjs/runtimeConfig.browser.js.map +0 -1
- package/dist-cjs/runtimeConfig.js.map +0 -1
- package/dist-cjs/runtimeConfig.native.js.map +0 -1
- package/dist-cjs/runtimeConfig.shared.js.map +0 -1
- package/dist-es/VoiceID.js.map +0 -1
- package/dist-es/VoiceIDClient.js.map +0 -1
- package/dist-es/commands/CreateDomainCommand.js.map +0 -1
- package/dist-es/commands/DeleteDomainCommand.js.map +0 -1
- package/dist-es/commands/DeleteFraudsterCommand.js.map +0 -1
- package/dist-es/commands/DeleteSpeakerCommand.js.map +0 -1
- package/dist-es/commands/DescribeDomainCommand.js.map +0 -1
- package/dist-es/commands/DescribeFraudsterCommand.js.map +0 -1
- package/dist-es/commands/DescribeFraudsterRegistrationJobCommand.js.map +0 -1
- package/dist-es/commands/DescribeSpeakerCommand.js.map +0 -1
- package/dist-es/commands/DescribeSpeakerEnrollmentJobCommand.js.map +0 -1
- package/dist-es/commands/EvaluateSessionCommand.js.map +0 -1
- package/dist-es/commands/ListDomainsCommand.js.map +0 -1
- package/dist-es/commands/ListFraudsterRegistrationJobsCommand.js.map +0 -1
- package/dist-es/commands/ListSpeakerEnrollmentJobsCommand.js.map +0 -1
- package/dist-es/commands/ListSpeakersCommand.js.map +0 -1
- package/dist-es/commands/ListTagsForResourceCommand.js.map +0 -1
- package/dist-es/commands/OptOutSpeakerCommand.js.map +0 -1
- package/dist-es/commands/StartFraudsterRegistrationJobCommand.js.map +0 -1
- package/dist-es/commands/StartSpeakerEnrollmentJobCommand.js.map +0 -1
- package/dist-es/commands/TagResourceCommand.js.map +0 -1
- package/dist-es/commands/UntagResourceCommand.js.map +0 -1
- package/dist-es/commands/UpdateDomainCommand.js.map +0 -1
- package/dist-es/endpoints.js.map +0 -1
- package/dist-es/index.js.map +0 -1
- package/dist-es/models/index.js.map +0 -1
- package/dist-es/models/models_0.js.map +0 -1
- package/dist-es/pagination/Interfaces.js.map +0 -1
- package/dist-es/pagination/ListDomainsPaginator.js.map +0 -1
- package/dist-es/pagination/ListFraudsterRegistrationJobsPaginator.js.map +0 -1
- package/dist-es/pagination/ListSpeakerEnrollmentJobsPaginator.js.map +0 -1
- package/dist-es/pagination/ListSpeakersPaginator.js.map +0 -1
- package/dist-es/protocols/Aws_json1_0.js.map +0 -1
- package/dist-es/runtimeConfig.browser.js.map +0 -1
- package/dist-es/runtimeConfig.js.map +0 -1
- package/dist-es/runtimeConfig.native.js.map +0 -1
- package/dist-es/runtimeConfig.shared.js.map +0 -1
- package/jest.config.js +0 -4
- package/src/VoiceID.ts +0 -769
- package/src/VoiceIDClient.ts +0 -322
- package/src/commands/CreateDomainCommand.ts +0 -97
- package/src/commands/DeleteDomainCommand.ts +0 -95
- package/src/commands/DeleteFraudsterCommand.ts +0 -95
- package/src/commands/DeleteSpeakerCommand.ts +0 -95
- package/src/commands/DescribeDomainCommand.ts +0 -95
- package/src/commands/DescribeFraudsterCommand.ts +0 -95
- package/src/commands/DescribeFraudsterRegistrationJobCommand.ts +0 -103
- package/src/commands/DescribeSpeakerCommand.ts +0 -95
- package/src/commands/DescribeSpeakerEnrollmentJobCommand.ts +0 -100
- package/src/commands/EvaluateSessionCommand.ts +0 -96
- package/src/commands/ListDomainsCommand.ts +0 -96
- package/src/commands/ListFraudsterRegistrationJobsCommand.ts +0 -103
- package/src/commands/ListSpeakerEnrollmentJobsCommand.ts +0 -100
- package/src/commands/ListSpeakersCommand.ts +0 -95
- package/src/commands/ListTagsForResourceCommand.ts +0 -95
- package/src/commands/OptOutSpeakerCommand.ts +0 -99
- package/src/commands/StartFraudsterRegistrationJobCommand.ts +0 -100
- package/src/commands/StartSpeakerEnrollmentJobCommand.ts +0 -98
- package/src/commands/TagResourceCommand.ts +0 -95
- package/src/commands/UntagResourceCommand.ts +0 -95
- package/src/commands/UpdateDomainCommand.ts +0 -96
- package/src/endpoints.ts +0 -57
- package/src/index.ts +0 -29
- package/src/models/index.ts +0 -1
- package/src/models/models_0.ts +0 -2153
- package/src/pagination/Interfaces.ts +0 -8
- package/src/pagination/ListDomainsPaginator.ts +0 -55
- package/src/pagination/ListFraudsterRegistrationJobsPaginator.ts +0 -59
- package/src/pagination/ListSpeakerEnrollmentJobsPaginator.ts +0 -59
- package/src/pagination/ListSpeakersPaginator.ts +0 -59
- package/src/protocols/Aws_json1_0.ts +0 -3488
- package/src/runtimeConfig.browser.ts +0 -41
- package/src/runtimeConfig.native.ts +0 -17
- package/src/runtimeConfig.shared.ts +0 -17
- package/src/runtimeConfig.ts +0 -46
- package/tsconfig.es.json +0 -10
- package/tsconfig.json +0 -33
- package/tsconfig.types.json +0 -9
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PaginationConfiguration } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import { VoiceID } from "../VoiceID";
|
|
4
|
-
import { VoiceIDClient } from "../VoiceIDClient";
|
|
5
|
-
|
|
6
|
-
export interface VoiceIDPaginationConfiguration extends PaginationConfiguration {
|
|
7
|
-
client: VoiceID | VoiceIDClient;
|
|
8
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Paginator } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import { ListDomainsCommand, ListDomainsCommandInput, ListDomainsCommandOutput } from "../commands/ListDomainsCommand";
|
|
4
|
-
import { VoiceID } from "../VoiceID";
|
|
5
|
-
import { VoiceIDClient } from "../VoiceIDClient";
|
|
6
|
-
import { VoiceIDPaginationConfiguration } from "./Interfaces";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @private
|
|
10
|
-
*/
|
|
11
|
-
const makePagedClientRequest = async (
|
|
12
|
-
client: VoiceIDClient,
|
|
13
|
-
input: ListDomainsCommandInput,
|
|
14
|
-
...args: any
|
|
15
|
-
): Promise<ListDomainsCommandOutput> => {
|
|
16
|
-
// @ts-ignore
|
|
17
|
-
return await client.send(new ListDomainsCommand(input), ...args);
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* @private
|
|
21
|
-
*/
|
|
22
|
-
const makePagedRequest = async (
|
|
23
|
-
client: VoiceID,
|
|
24
|
-
input: ListDomainsCommandInput,
|
|
25
|
-
...args: any
|
|
26
|
-
): Promise<ListDomainsCommandOutput> => {
|
|
27
|
-
// @ts-ignore
|
|
28
|
-
return await client.listDomains(input, ...args);
|
|
29
|
-
};
|
|
30
|
-
export async function* paginateListDomains(
|
|
31
|
-
config: VoiceIDPaginationConfiguration,
|
|
32
|
-
input: ListDomainsCommandInput,
|
|
33
|
-
...additionalArguments: any
|
|
34
|
-
): Paginator<ListDomainsCommandOutput> {
|
|
35
|
-
// ToDo: replace with actual type instead of typeof input.NextToken
|
|
36
|
-
let token: typeof input.NextToken | undefined = config.startingToken || undefined;
|
|
37
|
-
let hasNext = true;
|
|
38
|
-
let page: ListDomainsCommandOutput;
|
|
39
|
-
while (hasNext) {
|
|
40
|
-
input.NextToken = token;
|
|
41
|
-
input["MaxResults"] = config.pageSize;
|
|
42
|
-
if (config.client instanceof VoiceID) {
|
|
43
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
44
|
-
} else if (config.client instanceof VoiceIDClient) {
|
|
45
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
46
|
-
} else {
|
|
47
|
-
throw new Error("Invalid client, expected VoiceID | VoiceIDClient");
|
|
48
|
-
}
|
|
49
|
-
yield page;
|
|
50
|
-
token = page.NextToken;
|
|
51
|
-
hasNext = !!token;
|
|
52
|
-
}
|
|
53
|
-
// @ts-ignore
|
|
54
|
-
return undefined;
|
|
55
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Paginator } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
ListFraudsterRegistrationJobsCommand,
|
|
5
|
-
ListFraudsterRegistrationJobsCommandInput,
|
|
6
|
-
ListFraudsterRegistrationJobsCommandOutput,
|
|
7
|
-
} from "../commands/ListFraudsterRegistrationJobsCommand";
|
|
8
|
-
import { VoiceID } from "../VoiceID";
|
|
9
|
-
import { VoiceIDClient } from "../VoiceIDClient";
|
|
10
|
-
import { VoiceIDPaginationConfiguration } from "./Interfaces";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
const makePagedClientRequest = async (
|
|
16
|
-
client: VoiceIDClient,
|
|
17
|
-
input: ListFraudsterRegistrationJobsCommandInput,
|
|
18
|
-
...args: any
|
|
19
|
-
): Promise<ListFraudsterRegistrationJobsCommandOutput> => {
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
return await client.send(new ListFraudsterRegistrationJobsCommand(input), ...args);
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @private
|
|
25
|
-
*/
|
|
26
|
-
const makePagedRequest = async (
|
|
27
|
-
client: VoiceID,
|
|
28
|
-
input: ListFraudsterRegistrationJobsCommandInput,
|
|
29
|
-
...args: any
|
|
30
|
-
): Promise<ListFraudsterRegistrationJobsCommandOutput> => {
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
return await client.listFraudsterRegistrationJobs(input, ...args);
|
|
33
|
-
};
|
|
34
|
-
export async function* paginateListFraudsterRegistrationJobs(
|
|
35
|
-
config: VoiceIDPaginationConfiguration,
|
|
36
|
-
input: ListFraudsterRegistrationJobsCommandInput,
|
|
37
|
-
...additionalArguments: any
|
|
38
|
-
): Paginator<ListFraudsterRegistrationJobsCommandOutput> {
|
|
39
|
-
// ToDo: replace with actual type instead of typeof input.NextToken
|
|
40
|
-
let token: typeof input.NextToken | undefined = config.startingToken || undefined;
|
|
41
|
-
let hasNext = true;
|
|
42
|
-
let page: ListFraudsterRegistrationJobsCommandOutput;
|
|
43
|
-
while (hasNext) {
|
|
44
|
-
input.NextToken = token;
|
|
45
|
-
input["MaxResults"] = config.pageSize;
|
|
46
|
-
if (config.client instanceof VoiceID) {
|
|
47
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
48
|
-
} else if (config.client instanceof VoiceIDClient) {
|
|
49
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
50
|
-
} else {
|
|
51
|
-
throw new Error("Invalid client, expected VoiceID | VoiceIDClient");
|
|
52
|
-
}
|
|
53
|
-
yield page;
|
|
54
|
-
token = page.NextToken;
|
|
55
|
-
hasNext = !!token;
|
|
56
|
-
}
|
|
57
|
-
// @ts-ignore
|
|
58
|
-
return undefined;
|
|
59
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Paginator } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
ListSpeakerEnrollmentJobsCommand,
|
|
5
|
-
ListSpeakerEnrollmentJobsCommandInput,
|
|
6
|
-
ListSpeakerEnrollmentJobsCommandOutput,
|
|
7
|
-
} from "../commands/ListSpeakerEnrollmentJobsCommand";
|
|
8
|
-
import { VoiceID } from "../VoiceID";
|
|
9
|
-
import { VoiceIDClient } from "../VoiceIDClient";
|
|
10
|
-
import { VoiceIDPaginationConfiguration } from "./Interfaces";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
const makePagedClientRequest = async (
|
|
16
|
-
client: VoiceIDClient,
|
|
17
|
-
input: ListSpeakerEnrollmentJobsCommandInput,
|
|
18
|
-
...args: any
|
|
19
|
-
): Promise<ListSpeakerEnrollmentJobsCommandOutput> => {
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
return await client.send(new ListSpeakerEnrollmentJobsCommand(input), ...args);
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @private
|
|
25
|
-
*/
|
|
26
|
-
const makePagedRequest = async (
|
|
27
|
-
client: VoiceID,
|
|
28
|
-
input: ListSpeakerEnrollmentJobsCommandInput,
|
|
29
|
-
...args: any
|
|
30
|
-
): Promise<ListSpeakerEnrollmentJobsCommandOutput> => {
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
return await client.listSpeakerEnrollmentJobs(input, ...args);
|
|
33
|
-
};
|
|
34
|
-
export async function* paginateListSpeakerEnrollmentJobs(
|
|
35
|
-
config: VoiceIDPaginationConfiguration,
|
|
36
|
-
input: ListSpeakerEnrollmentJobsCommandInput,
|
|
37
|
-
...additionalArguments: any
|
|
38
|
-
): Paginator<ListSpeakerEnrollmentJobsCommandOutput> {
|
|
39
|
-
// ToDo: replace with actual type instead of typeof input.NextToken
|
|
40
|
-
let token: typeof input.NextToken | undefined = config.startingToken || undefined;
|
|
41
|
-
let hasNext = true;
|
|
42
|
-
let page: ListSpeakerEnrollmentJobsCommandOutput;
|
|
43
|
-
while (hasNext) {
|
|
44
|
-
input.NextToken = token;
|
|
45
|
-
input["MaxResults"] = config.pageSize;
|
|
46
|
-
if (config.client instanceof VoiceID) {
|
|
47
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
48
|
-
} else if (config.client instanceof VoiceIDClient) {
|
|
49
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
50
|
-
} else {
|
|
51
|
-
throw new Error("Invalid client, expected VoiceID | VoiceIDClient");
|
|
52
|
-
}
|
|
53
|
-
yield page;
|
|
54
|
-
token = page.NextToken;
|
|
55
|
-
hasNext = !!token;
|
|
56
|
-
}
|
|
57
|
-
// @ts-ignore
|
|
58
|
-
return undefined;
|
|
59
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Paginator } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
ListSpeakersCommand,
|
|
5
|
-
ListSpeakersCommandInput,
|
|
6
|
-
ListSpeakersCommandOutput,
|
|
7
|
-
} from "../commands/ListSpeakersCommand";
|
|
8
|
-
import { VoiceID } from "../VoiceID";
|
|
9
|
-
import { VoiceIDClient } from "../VoiceIDClient";
|
|
10
|
-
import { VoiceIDPaginationConfiguration } from "./Interfaces";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
const makePagedClientRequest = async (
|
|
16
|
-
client: VoiceIDClient,
|
|
17
|
-
input: ListSpeakersCommandInput,
|
|
18
|
-
...args: any
|
|
19
|
-
): Promise<ListSpeakersCommandOutput> => {
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
return await client.send(new ListSpeakersCommand(input), ...args);
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @private
|
|
25
|
-
*/
|
|
26
|
-
const makePagedRequest = async (
|
|
27
|
-
client: VoiceID,
|
|
28
|
-
input: ListSpeakersCommandInput,
|
|
29
|
-
...args: any
|
|
30
|
-
): Promise<ListSpeakersCommandOutput> => {
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
return await client.listSpeakers(input, ...args);
|
|
33
|
-
};
|
|
34
|
-
export async function* paginateListSpeakers(
|
|
35
|
-
config: VoiceIDPaginationConfiguration,
|
|
36
|
-
input: ListSpeakersCommandInput,
|
|
37
|
-
...additionalArguments: any
|
|
38
|
-
): Paginator<ListSpeakersCommandOutput> {
|
|
39
|
-
// ToDo: replace with actual type instead of typeof input.NextToken
|
|
40
|
-
let token: typeof input.NextToken | undefined = config.startingToken || undefined;
|
|
41
|
-
let hasNext = true;
|
|
42
|
-
let page: ListSpeakersCommandOutput;
|
|
43
|
-
while (hasNext) {
|
|
44
|
-
input.NextToken = token;
|
|
45
|
-
input["MaxResults"] = config.pageSize;
|
|
46
|
-
if (config.client instanceof VoiceID) {
|
|
47
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
48
|
-
} else if (config.client instanceof VoiceIDClient) {
|
|
49
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
50
|
-
} else {
|
|
51
|
-
throw new Error("Invalid client, expected VoiceID | VoiceIDClient");
|
|
52
|
-
}
|
|
53
|
-
yield page;
|
|
54
|
-
token = page.NextToken;
|
|
55
|
-
hasNext = !!token;
|
|
56
|
-
}
|
|
57
|
-
// @ts-ignore
|
|
58
|
-
return undefined;
|
|
59
|
-
}
|