@aws-sdk/client-translate 3.35.0 → 3.38.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 +47 -0
- package/dist-cjs/Translate.js +0 -5
- package/dist-cjs/TranslateClient.js +0 -10
- package/dist-cjs/commands/CreateParallelDataCommand.js +0 -28
- package/dist-cjs/commands/DeleteParallelDataCommand.js +0 -25
- package/dist-cjs/commands/DeleteTerminologyCommand.js +0 -25
- package/dist-cjs/commands/DescribeTextTranslationJobCommand.js +0 -26
- package/dist-cjs/commands/GetParallelDataCommand.js +0 -25
- package/dist-cjs/commands/GetTerminologyCommand.js +0 -25
- package/dist-cjs/commands/ImportTerminologyCommand.js +0 -32
- package/dist-cjs/commands/ListParallelDataCommand.js +0 -25
- package/dist-cjs/commands/ListTerminologiesCommand.js +0 -25
- package/dist-cjs/commands/ListTextTranslationJobsCommand.js +0 -25
- package/dist-cjs/commands/StartTextTranslationJobCommand.js +0 -32
- package/dist-cjs/commands/StopTextTranslationJobCommand.js +0 -31
- package/dist-cjs/commands/TranslateTextCommand.js +0 -26
- package/dist-cjs/commands/UpdateParallelDataCommand.js +0 -26
- package/dist-cjs/commands/index.js +17 -0
- package/dist-cjs/endpoints.js +1 -2
- package/dist-cjs/index.js +4 -21
- package/dist-cjs/models/index.js +0 -1
- package/dist-cjs/models/models_0.js +0 -163
- package/dist-cjs/pagination/Interfaces.js +0 -1
- package/dist-cjs/pagination/ListParallelDataPaginator.js +0 -11
- package/dist-cjs/pagination/ListTerminologiesPaginator.js +0 -11
- package/dist-cjs/pagination/ListTextTranslationJobsPaginator.js +0 -11
- package/dist-cjs/pagination/index.js +7 -0
- package/dist-cjs/protocols/Aws_json1_1.js +0 -6
- package/dist-cjs/runtimeConfig.browser.js +1 -6
- package/dist-cjs/runtimeConfig.js +2 -7
- package/dist-cjs/runtimeConfig.native.js +0 -4
- package/dist-cjs/runtimeConfig.shared.js +0 -4
- package/dist-es/Translate.js +0 -1
- package/dist-es/TranslateClient.js +0 -1
- package/dist-es/commands/CreateParallelDataCommand.js +0 -1
- package/dist-es/commands/DeleteParallelDataCommand.js +0 -1
- package/dist-es/commands/DeleteTerminologyCommand.js +0 -1
- package/dist-es/commands/DescribeTextTranslationJobCommand.js +0 -1
- package/dist-es/commands/GetParallelDataCommand.js +0 -1
- package/dist-es/commands/GetTerminologyCommand.js +0 -1
- package/dist-es/commands/ImportTerminologyCommand.js +0 -1
- package/dist-es/commands/ListParallelDataCommand.js +0 -1
- package/dist-es/commands/ListTerminologiesCommand.js +0 -1
- package/dist-es/commands/ListTextTranslationJobsCommand.js +0 -1
- package/dist-es/commands/StartTextTranslationJobCommand.js +0 -1
- package/dist-es/commands/StopTextTranslationJobCommand.js +0 -1
- package/dist-es/commands/TranslateTextCommand.js +0 -1
- package/dist-es/commands/UpdateParallelDataCommand.js +0 -1
- package/dist-es/commands/index.js +14 -0
- package/dist-es/endpoints.js +1 -2
- package/dist-es/index.js +4 -21
- 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/ListParallelDataPaginator.js +0 -1
- package/dist-es/pagination/ListTerminologiesPaginator.js +0 -1
- package/dist-es/pagination/ListTextTranslationJobsPaginator.js +0 -1
- package/dist-es/pagination/index.js +4 -0
- package/dist-es/protocols/Aws_json1_1.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/dist-types/commands/index.d.ts +14 -0
- package/dist-types/index.d.ts +4 -20
- package/dist-types/pagination/index.d.ts +4 -0
- package/dist-types/ts3.4/Translate.d.ts +15 -72
- package/dist-types/ts3.4/TranslateClient.d.ts +24 -90
- package/dist-types/ts3.4/commands/CreateParallelDataCommand.d.ts +2 -23
- package/dist-types/ts3.4/commands/DeleteParallelDataCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/DeleteTerminologyCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/DescribeTextTranslationJobCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/GetParallelDataCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/GetTerminologyCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ImportTerminologyCommand.d.ts +2 -27
- package/dist-types/ts3.4/commands/ListParallelDataCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ListTerminologiesCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/ListTextTranslationJobsCommand.d.ts +2 -20
- package/dist-types/ts3.4/commands/StartTextTranslationJobCommand.d.ts +2 -27
- package/dist-types/ts3.4/commands/StopTextTranslationJobCommand.d.ts +2 -26
- package/dist-types/ts3.4/commands/TranslateTextCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/UpdateParallelDataCommand.d.ts +2 -21
- package/dist-types/ts3.4/commands/index.d.ts +14 -0
- package/dist-types/ts3.4/index.d.ts +4 -20
- package/dist-types/ts3.4/models/models_0.d.ts +220 -824
- package/dist-types/ts3.4/pagination/index.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
- package/package.json +33 -30
- package/dist-cjs/Translate.js.map +0 -1
- package/dist-cjs/TranslateClient.js.map +0 -1
- package/dist-cjs/commands/CreateParallelDataCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteParallelDataCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteTerminologyCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeTextTranslationJobCommand.js.map +0 -1
- package/dist-cjs/commands/GetParallelDataCommand.js.map +0 -1
- package/dist-cjs/commands/GetTerminologyCommand.js.map +0 -1
- package/dist-cjs/commands/ImportTerminologyCommand.js.map +0 -1
- package/dist-cjs/commands/ListParallelDataCommand.js.map +0 -1
- package/dist-cjs/commands/ListTerminologiesCommand.js.map +0 -1
- package/dist-cjs/commands/ListTextTranslationJobsCommand.js.map +0 -1
- package/dist-cjs/commands/StartTextTranslationJobCommand.js.map +0 -1
- package/dist-cjs/commands/StopTextTranslationJobCommand.js.map +0 -1
- package/dist-cjs/commands/TranslateTextCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateParallelDataCommand.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/ListParallelDataPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListTerminologiesPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListTextTranslationJobsPaginator.js.map +0 -1
- package/dist-cjs/protocols/Aws_json1_1.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/Translate.js.map +0 -1
- package/dist-es/TranslateClient.js.map +0 -1
- package/dist-es/commands/CreateParallelDataCommand.js.map +0 -1
- package/dist-es/commands/DeleteParallelDataCommand.js.map +0 -1
- package/dist-es/commands/DeleteTerminologyCommand.js.map +0 -1
- package/dist-es/commands/DescribeTextTranslationJobCommand.js.map +0 -1
- package/dist-es/commands/GetParallelDataCommand.js.map +0 -1
- package/dist-es/commands/GetTerminologyCommand.js.map +0 -1
- package/dist-es/commands/ImportTerminologyCommand.js.map +0 -1
- package/dist-es/commands/ListParallelDataCommand.js.map +0 -1
- package/dist-es/commands/ListTerminologiesCommand.js.map +0 -1
- package/dist-es/commands/ListTextTranslationJobsCommand.js.map +0 -1
- package/dist-es/commands/StartTextTranslationJobCommand.js.map +0 -1
- package/dist-es/commands/StopTextTranslationJobCommand.js.map +0 -1
- package/dist-es/commands/TranslateTextCommand.js.map +0 -1
- package/dist-es/commands/UpdateParallelDataCommand.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/ListParallelDataPaginator.js.map +0 -1
- package/dist-es/pagination/ListTerminologiesPaginator.js.map +0 -1
- package/dist-es/pagination/ListTextTranslationJobsPaginator.js.map +0 -1
- package/dist-es/protocols/Aws_json1_1.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/Translate.ts +0 -553
- package/src/TranslateClient.ts +0 -291
- package/src/commands/CreateParallelDataCommand.ts +0 -98
- package/src/commands/DeleteParallelDataCommand.ts +0 -95
- package/src/commands/DeleteTerminologyCommand.ts +0 -95
- package/src/commands/DescribeTextTranslationJobCommand.ts +0 -99
- package/src/commands/GetParallelDataCommand.ts +0 -95
- package/src/commands/GetTerminologyCommand.ts +0 -95
- package/src/commands/ImportTerminologyCommand.ts +0 -102
- package/src/commands/ListParallelDataCommand.ts +0 -95
- package/src/commands/ListTerminologiesCommand.ts +0 -95
- package/src/commands/ListTextTranslationJobsCommand.ts +0 -95
- package/src/commands/StartTextTranslationJobCommand.ts +0 -102
- package/src/commands/StopTextTranslationJobCommand.ts +0 -101
- package/src/commands/TranslateTextCommand.ts +0 -96
- package/src/commands/UpdateParallelDataCommand.ts +0 -96
- package/src/endpoints.ts +0 -77
- package/src/index.ts +0 -21
- package/src/models/index.ts +0 -1
- package/src/models/models_0.ts +0 -1625
- package/src/pagination/Interfaces.ts +0 -8
- package/src/pagination/ListParallelDataPaginator.ts +0 -59
- package/src/pagination/ListTerminologiesPaginator.ts +0 -59
- package/src/pagination/ListTextTranslationJobsPaginator.ts +0 -59
- package/src/protocols/Aws_json1_1.ts +0 -2523
- 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 { Translate } from "../Translate";
|
|
4
|
-
import { TranslateClient } from "../TranslateClient";
|
|
5
|
-
|
|
6
|
-
export interface TranslatePaginationConfiguration extends PaginationConfiguration {
|
|
7
|
-
client: Translate | TranslateClient;
|
|
8
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Paginator } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
ListParallelDataCommand,
|
|
5
|
-
ListParallelDataCommandInput,
|
|
6
|
-
ListParallelDataCommandOutput,
|
|
7
|
-
} from "../commands/ListParallelDataCommand";
|
|
8
|
-
import { Translate } from "../Translate";
|
|
9
|
-
import { TranslateClient } from "../TranslateClient";
|
|
10
|
-
import { TranslatePaginationConfiguration } from "./Interfaces";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
const makePagedClientRequest = async (
|
|
16
|
-
client: TranslateClient,
|
|
17
|
-
input: ListParallelDataCommandInput,
|
|
18
|
-
...args: any
|
|
19
|
-
): Promise<ListParallelDataCommandOutput> => {
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
return await client.send(new ListParallelDataCommand(input), ...args);
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @private
|
|
25
|
-
*/
|
|
26
|
-
const makePagedRequest = async (
|
|
27
|
-
client: Translate,
|
|
28
|
-
input: ListParallelDataCommandInput,
|
|
29
|
-
...args: any
|
|
30
|
-
): Promise<ListParallelDataCommandOutput> => {
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
return await client.listParallelData(input, ...args);
|
|
33
|
-
};
|
|
34
|
-
export async function* paginateListParallelData(
|
|
35
|
-
config: TranslatePaginationConfiguration,
|
|
36
|
-
input: ListParallelDataCommandInput,
|
|
37
|
-
...additionalArguments: any
|
|
38
|
-
): Paginator<ListParallelDataCommandOutput> {
|
|
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: ListParallelDataCommandOutput;
|
|
43
|
-
while (hasNext) {
|
|
44
|
-
input.NextToken = token;
|
|
45
|
-
input["MaxResults"] = config.pageSize;
|
|
46
|
-
if (config.client instanceof Translate) {
|
|
47
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
48
|
-
} else if (config.client instanceof TranslateClient) {
|
|
49
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
50
|
-
} else {
|
|
51
|
-
throw new Error("Invalid client, expected Translate | TranslateClient");
|
|
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
|
-
ListTerminologiesCommand,
|
|
5
|
-
ListTerminologiesCommandInput,
|
|
6
|
-
ListTerminologiesCommandOutput,
|
|
7
|
-
} from "../commands/ListTerminologiesCommand";
|
|
8
|
-
import { Translate } from "../Translate";
|
|
9
|
-
import { TranslateClient } from "../TranslateClient";
|
|
10
|
-
import { TranslatePaginationConfiguration } from "./Interfaces";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
const makePagedClientRequest = async (
|
|
16
|
-
client: TranslateClient,
|
|
17
|
-
input: ListTerminologiesCommandInput,
|
|
18
|
-
...args: any
|
|
19
|
-
): Promise<ListTerminologiesCommandOutput> => {
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
return await client.send(new ListTerminologiesCommand(input), ...args);
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @private
|
|
25
|
-
*/
|
|
26
|
-
const makePagedRequest = async (
|
|
27
|
-
client: Translate,
|
|
28
|
-
input: ListTerminologiesCommandInput,
|
|
29
|
-
...args: any
|
|
30
|
-
): Promise<ListTerminologiesCommandOutput> => {
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
return await client.listTerminologies(input, ...args);
|
|
33
|
-
};
|
|
34
|
-
export async function* paginateListTerminologies(
|
|
35
|
-
config: TranslatePaginationConfiguration,
|
|
36
|
-
input: ListTerminologiesCommandInput,
|
|
37
|
-
...additionalArguments: any
|
|
38
|
-
): Paginator<ListTerminologiesCommandOutput> {
|
|
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: ListTerminologiesCommandOutput;
|
|
43
|
-
while (hasNext) {
|
|
44
|
-
input.NextToken = token;
|
|
45
|
-
input["MaxResults"] = config.pageSize;
|
|
46
|
-
if (config.client instanceof Translate) {
|
|
47
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
48
|
-
} else if (config.client instanceof TranslateClient) {
|
|
49
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
50
|
-
} else {
|
|
51
|
-
throw new Error("Invalid client, expected Translate | TranslateClient");
|
|
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
|
-
ListTextTranslationJobsCommand,
|
|
5
|
-
ListTextTranslationJobsCommandInput,
|
|
6
|
-
ListTextTranslationJobsCommandOutput,
|
|
7
|
-
} from "../commands/ListTextTranslationJobsCommand";
|
|
8
|
-
import { Translate } from "../Translate";
|
|
9
|
-
import { TranslateClient } from "../TranslateClient";
|
|
10
|
-
import { TranslatePaginationConfiguration } from "./Interfaces";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
const makePagedClientRequest = async (
|
|
16
|
-
client: TranslateClient,
|
|
17
|
-
input: ListTextTranslationJobsCommandInput,
|
|
18
|
-
...args: any
|
|
19
|
-
): Promise<ListTextTranslationJobsCommandOutput> => {
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
return await client.send(new ListTextTranslationJobsCommand(input), ...args);
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @private
|
|
25
|
-
*/
|
|
26
|
-
const makePagedRequest = async (
|
|
27
|
-
client: Translate,
|
|
28
|
-
input: ListTextTranslationJobsCommandInput,
|
|
29
|
-
...args: any
|
|
30
|
-
): Promise<ListTextTranslationJobsCommandOutput> => {
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
return await client.listTextTranslationJobs(input, ...args);
|
|
33
|
-
};
|
|
34
|
-
export async function* paginateListTextTranslationJobs(
|
|
35
|
-
config: TranslatePaginationConfiguration,
|
|
36
|
-
input: ListTextTranslationJobsCommandInput,
|
|
37
|
-
...additionalArguments: any
|
|
38
|
-
): Paginator<ListTextTranslationJobsCommandOutput> {
|
|
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: ListTextTranslationJobsCommandOutput;
|
|
43
|
-
while (hasNext) {
|
|
44
|
-
input.NextToken = token;
|
|
45
|
-
input["MaxResults"] = config.pageSize;
|
|
46
|
-
if (config.client instanceof Translate) {
|
|
47
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
48
|
-
} else if (config.client instanceof TranslateClient) {
|
|
49
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
50
|
-
} else {
|
|
51
|
-
throw new Error("Invalid client, expected Translate | TranslateClient");
|
|
52
|
-
}
|
|
53
|
-
yield page;
|
|
54
|
-
token = page.NextToken;
|
|
55
|
-
hasNext = !!token;
|
|
56
|
-
}
|
|
57
|
-
// @ts-ignore
|
|
58
|
-
return undefined;
|
|
59
|
-
}
|