|
1 | 1 | /** |
2 | | - * (C) Copyright IBM Corp. 2018, 2022. |
| 2 | + * (C) Copyright IBM Corp. 2018, 2023. |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
|
15 | 15 | */ |
16 | 16 |
|
17 | 17 | /** |
18 | | - * IBM OpenAPI SDK Code Generator Version: 3.53.0-9710cac3-20220713-193508 |
| 18 | + * IBM OpenAPI SDK Code Generator Version: 3.64.1-cee95189-20230124-211647 |
19 | 19 | */ |
20 | 20 |
|
21 | 21 | import * as extend from 'extend'; |
@@ -606,8 +606,8 @@ class LanguageTranslatorV3 extends BaseService { |
606 | 606 | /** |
607 | 607 | * Get model details. |
608 | 608 | * |
609 | | - * Gets information about a translation model, including training status for custom models. Use this API call to poll |
610 | | - * the status of your customization request. A successfully completed training has a status of `available`. |
| 609 | + * Gets information about a translation model, including training status for custom models. Use this method to poll |
| 610 | + * the status of your customization request. A successfully completed training request has a status of `available`. |
611 | 611 | * |
612 | 612 | * @param {Object} params - The parameters to send to the service. |
613 | 613 | * @param {string} params.modelId - Model ID of the model to get. |
@@ -718,18 +718,42 @@ class LanguageTranslatorV3 extends BaseService { |
718 | 718 | /** |
719 | 719 | * Translate document. |
720 | 720 | * |
721 | | - * Submit a document for translation. You can submit the document contents in the `file` parameter, or you can |
722 | | - * reference a previously submitted document by document ID. The maximum file size for document translation is |
723 | | - * * 20 MB for service instances on the Standard, Advanced, and Premium plans |
724 | | - * * 2 MB for service instances on the Lite plan |
| 721 | + * Submit a document for translation. You can submit the document contents in the `file` parameter, or you can specify |
| 722 | + * a previously submitted document by document ID. The maximum file size for document translation is |
| 723 | + * * **2 MB** for service instances on the Lite plan |
| 724 | + * * **20 MB** for service instances on the Standard plan |
| 725 | + * * **50 MB** for service instances on the Advanced plan |
| 726 | + * * **150 MB** for service instances on the Premium plan |
| 727 | + * |
| 728 | + * You can specify the format of the file to be translated in one of two ways: |
| 729 | + * * By specifying the appropriate file extension for the format. |
| 730 | + * * By specifying the content type (MIME type) of the format as the `type` of the `file` parameter. |
| 731 | + * |
| 732 | + * In some cases, especially for subtitle file formats, you must use either the file extension or the content type. |
| 733 | + * For more information about all supported file formats, their file extensions and content types, and how and when to |
| 734 | + * specify the file extension or content type, see [Supported file |
| 735 | + * formats](https://cloud.ibm.com/docs/language-translator?topic=language-translator-document-translator-tutorial#supported-file-formats). |
| 736 | + * |
725 | 737 | * |
726 | 738 | * **Note:** When translating a previously submitted document, the target language must be different from the target |
727 | 739 | * language of the original request when the document was initially submitted. |
728 | 740 | * |
729 | 741 | * @param {Object} params - The parameters to send to the service. |
730 | 742 | * @param {NodeJS.ReadableStream | Buffer} params.file - The contents of the source file to translate. The maximum |
731 | | - * file size for document translation is 20 MB for service instances on the Standard, Advanced, and Premium plans, and |
732 | | - * 2 MB for service instances on the Lite plan. For more information, see [Supported file |
| 743 | + * file size for document translation is |
| 744 | + * * **2 MB** for service instances on the Lite plan |
| 745 | + * * **20 MB** for service instances on the Standard plan |
| 746 | + * * **50 MB** for service instances on the Advanced plan |
| 747 | + * * **150 MB** for service instances on the Premium plan |
| 748 | + * |
| 749 | + * You can specify the format of the file to be translated in one of two ways: |
| 750 | + * * By specifying the appropriate file extension for the format. |
| 751 | + * * By specifying the content type (MIME type) of the format as the `type` of the `file` parameter. |
| 752 | + * |
| 753 | + * In some cases, especially for subtitle file formats, you must use either the file extension or the content type. |
| 754 | + * |
| 755 | + * For more information about all supported file formats, their file extensions and content types, and how and when to |
| 756 | + * specify the file extension or content type, see [Supported file |
733 | 757 | * formats](https://cloud.ibm.com/docs/language-translator?topic=language-translator-document-translator-tutorial#supported-file-formats). |
734 | 758 | * @param {string} params.filename - The filename for file. |
735 | 759 | * @param {string} [params.fileContentType] - The content type of file. |
@@ -867,11 +891,11 @@ class LanguageTranslatorV3 extends BaseService { |
867 | 891 | * @param {Object} params - The parameters to send to the service. |
868 | 892 | * @param {string} params.documentId - Document ID of the document to delete. |
869 | 893 | * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers |
870 | | - * @returns {Promise<LanguageTranslatorV3.Response<LanguageTranslatorV3.Empty>>} |
| 894 | + * @returns {Promise<LanguageTranslatorV3.Response<LanguageTranslatorV3.EmptyObject>>} |
871 | 895 | */ |
872 | 896 | public deleteDocument( |
873 | 897 | params: LanguageTranslatorV3.DeleteDocumentParams |
874 | | - ): Promise<LanguageTranslatorV3.Response<LanguageTranslatorV3.Empty>> { |
| 898 | + ): Promise<LanguageTranslatorV3.Response<LanguageTranslatorV3.EmptyObject>> { |
875 | 899 | const _params = { ...params }; |
876 | 900 | const _requiredParams = ['documentId']; |
877 | 901 | const _validParams = ['documentId', 'headers']; |
@@ -1008,7 +1032,7 @@ namespace LanguageTranslatorV3 { |
1008 | 1032 | export type Callback<T> = (error: any, response?: Response<T>) => void; |
1009 | 1033 |
|
1010 | 1034 | /** The body of a service request that returns no response data. */ |
1011 | | - export interface Empty {} |
| 1035 | + export interface EmptyObject {} |
1012 | 1036 |
|
1013 | 1037 | /** A standard JS object, defined to avoid the limitations of `Object` and `object` */ |
1014 | 1038 | export interface JsonObject { |
@@ -1156,9 +1180,21 @@ namespace LanguageTranslatorV3 { |
1156 | 1180 |
|
1157 | 1181 | /** Parameters for the `translateDocument` operation. */ |
1158 | 1182 | export interface TranslateDocumentParams { |
1159 | | - /** The contents of the source file to translate. The maximum file size for document translation is 20 MB for |
1160 | | - * service instances on the Standard, Advanced, and Premium plans, and 2 MB for service instances on the Lite plan. |
1161 | | - * For more information, see [Supported file |
| 1183 | + /** The contents of the source file to translate. The maximum file size for document translation is |
| 1184 | + * * **2 MB** for service instances on the Lite plan |
| 1185 | + * * **20 MB** for service instances on the Standard plan |
| 1186 | + * * **50 MB** for service instances on the Advanced plan |
| 1187 | + * * **150 MB** for service instances on the Premium plan |
| 1188 | + * |
| 1189 | + * You can specify the format of the file to be translated in one of two ways: |
| 1190 | + * * By specifying the appropriate file extension for the format. |
| 1191 | + * * By specifying the content type (MIME type) of the format as the `type` of the `file` parameter. |
| 1192 | + * |
| 1193 | + * In some cases, especially for subtitle file formats, you must use either the file extension or the content type. |
| 1194 | + * |
| 1195 | + * |
| 1196 | + * For more information about all supported file formats, their file extensions and content types, and how and when |
| 1197 | + * to specify the file extension or content type, see [Supported file |
1162 | 1198 | * formats](https://cloud.ibm.com/docs/language-translator?topic=language-translator-document-translator-tutorial#supported-file-formats). |
1163 | 1199 | */ |
1164 | 1200 | file: NodeJS.ReadableStream | Buffer; |
@@ -1189,30 +1225,32 @@ namespace LanguageTranslatorV3 { |
1189 | 1225 | export namespace TranslateDocumentConstants { |
1190 | 1226 | /** The content type of file. */ |
1191 | 1227 | export enum FileContentType { |
1192 | | - APPLICATION_POWERPOINT = 'application/powerpoint', |
1193 | 1228 | APPLICATION_MSPOWERPOINT = 'application/mspowerpoint', |
1194 | | - APPLICATION_X_RTF = 'application/x-rtf', |
1195 | | - APPLICATION_JSON = 'application/json', |
1196 | | - APPLICATION_XML = 'application/xml', |
| 1229 | + APPLICATION_MSWORD = 'application/msword', |
| 1230 | + APPLICATION_OCTET_STREAM = 'application/octet-stream', |
| 1231 | + APPLICATION_PDF = 'application/pdf', |
| 1232 | + APPLICATION_POWERPOINT = 'application/powerpoint', |
| 1233 | + APPLICATION_RTF = 'application/rtf', |
| 1234 | + APPLICATION_TTAF_XML = 'application/ttaf+xml', |
| 1235 | + APPLICATION_TTML_XML = 'application/ttml+xml', |
| 1236 | + APPLICATION_VND_OASIS_OPENDOCUMENT_PRESENTATION = 'application/vnd.oasis.opendocument.presentation', |
| 1237 | + APPLICATION_VND_OASIS_OPENDOCUMENT_SPREADSHEET = 'application/vnd.oasis.opendocument.spreadsheet', |
| 1238 | + APPLICATION_VND_OASIS_OPENDOCUMENT_TEXT = 'application/vnd.oasis.opendocument.text', |
1197 | 1239 | APPLICATION_VND_MS_EXCEL = 'application/vnd.ms-excel', |
1198 | | - APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_SHEET = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', |
1199 | 1240 | APPLICATION_VND_MS_POWERPOINT = 'application/vnd.ms-powerpoint', |
1200 | 1241 | APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_PRESENTATIONML_PRESENTATION = 'application/vnd.openxmlformats-officedocument.presentationml.presentation', |
1201 | | - APPLICATION_MSWORD = 'application/msword', |
| 1242 | + APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_SPREADSHEETML_SHEET = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', |
1202 | 1243 | APPLICATION_VND_OPENXMLFORMATS_OFFICEDOCUMENT_WORDPROCESSINGML_DOCUMENT = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', |
1203 | | - APPLICATION_VND_OASIS_OPENDOCUMENT_SPREADSHEET = 'application/vnd.oasis.opendocument.spreadsheet', |
1204 | | - APPLICATION_VND_OASIS_OPENDOCUMENT_PRESENTATION = 'application/vnd.oasis.opendocument.presentation', |
1205 | | - APPLICATION_VND_OASIS_OPENDOCUMENT_TEXT = 'application/vnd.oasis.opendocument.text', |
1206 | | - APPLICATION_PDF = 'application/pdf', |
1207 | | - APPLICATION_RTF = 'application/rtf', |
| 1244 | + APPLICATION_X_RTF = 'application/x-rtf', |
| 1245 | + APPLICATION_XHTML_XML = 'application/xhtml+xml', |
| 1246 | + APPLICATION_XML = 'application/xml', |
1208 | 1247 | TEXT_HTML = 'text/html', |
1209 | 1248 | TEXT_JSON = 'text/json', |
1210 | 1249 | TEXT_PLAIN = 'text/plain', |
1211 | 1250 | TEXT_RICHTEXT = 'text/richtext', |
1212 | 1251 | TEXT_RTF = 'text/rtf', |
1213 | 1252 | TEXT_SBV = 'text/sbv', |
1214 | 1253 | TEXT_SRT = 'text/srt', |
1215 | | - TEXT_VTT = 'text/vtt', |
1216 | 1254 | TEXT_XML = 'text/xml', |
1217 | 1255 | } |
1218 | 1256 | } |
|
0 commit comments