@maxim_mazurok/gapi.client.translate-v3beta1 0.0.20221111 → 0.0.20230106
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/index.d.ts +9 -2
- package/package.json +1 -1
- package/tests.ts +3 -1
package/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
10
10
|
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
11
11
|
// Generated from: https://translation.googleapis.com/$discovery/rest?version=v3beta1
|
|
12
|
-
// Revision:
|
|
12
|
+
// Revision: 20230106
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
@@ -52,6 +52,11 @@ declare namespace gapi.client {
|
|
|
52
52
|
gcsDestination?: GcsDestination;
|
|
53
53
|
}
|
|
54
54
|
interface BatchTranslateDocumentRequest {
|
|
55
|
+
/**
|
|
56
|
+
* Optional. This flag is to support user customized attribution. If not provided, the default is `Machine Translated by Google`. Customized attribution should follow rules in
|
|
57
|
+
* https://cloud.google.com/translate/attribution#attribution_and_logos
|
|
58
|
+
*/
|
|
59
|
+
customizedAttribution?: string;
|
|
55
60
|
/** Optional. */
|
|
56
61
|
formatConversions?: { [P in string]: string };
|
|
57
62
|
/** Optional. Glossaries to be applied. It's keyed by target language code. */
|
|
@@ -311,7 +316,7 @@ declare namespace gapi.client {
|
|
|
311
316
|
* have no content to output. Once a row is present in index.csv, the input/output matching never changes. Callers should also expect all the content in input_file are processed and
|
|
312
317
|
* ready to be consumed (that is, no partial output file is written). Since index.csv will be keeping updated during the process, please make sure there is no custom retention policy
|
|
313
318
|
* applied on the output bucket that may avoid file updating. (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) The format of translations_file (for target language
|
|
314
|
-
* code 'trg') is: gs://translation_test/a_b_c_'trg'_translations.[extension] If the input file extension is tsv, the output has the following columns: Column 1: ID of the request
|
|
319
|
+
* code 'trg') is: `gs://translation_test/a_b_c_'trg'_translations.[extension]` If the input file extension is tsv, the output has the following columns: Column 1: ID of the request
|
|
315
320
|
* provided in the input, if it's not provided in the input, then the input row number is used (0-based). Column 2: source sentence. Column 3: translation without applying a glossary.
|
|
316
321
|
* Empty string if there is an error. Column 4 (only present if a glossary is provided in the request): translation after applying the glossary. Empty string if there is an error
|
|
317
322
|
* applying the glossary. Could be same string as column 3 if there is no glossary applied. If input file extension is a txt or html, the translation is directly written to the output
|
|
@@ -364,6 +369,8 @@ declare namespace gapi.client {
|
|
|
364
369
|
* be returned through a byte-stream and its output mime type will be the same as the input file's mime type.
|
|
365
370
|
*/
|
|
366
371
|
documentOutputConfig?: DocumentOutputConfig;
|
|
372
|
+
/** Optional. If true, use the text removal server to remove the shadow text on background image for native pdf translation. */
|
|
373
|
+
enableShadowRemovalNativePdf?: boolean;
|
|
367
374
|
/** Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned. */
|
|
368
375
|
glossaryConfig?: TranslateTextGlossaryConfig;
|
|
369
376
|
/** Optional. is_translate_native_pdf_only field for external customers. If true, the page limit of online native pdf translation is 300 and only native pdf pages will be translated. */
|
package/package.json
CHANGED
package/tests.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
4
4
|
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
5
5
|
|
|
6
|
-
// Revision:
|
|
6
|
+
// Revision: 20230106
|
|
7
7
|
|
|
8
8
|
gapi.load('client', async () => {
|
|
9
9
|
/** now we can use gapi.client */
|
|
@@ -75,6 +75,7 @@ gapi.load('client', async () => {
|
|
|
75
75
|
await gapi.client.translate.projects.locations.batchTranslateDocument({
|
|
76
76
|
parent: "Test string",
|
|
77
77
|
}, {
|
|
78
|
+
customizedAttribution: "Test string",
|
|
78
79
|
formatConversions: {
|
|
79
80
|
A: "Test string"
|
|
80
81
|
},
|
|
@@ -188,6 +189,7 @@ gapi.load('client', async () => {
|
|
|
188
189
|
},
|
|
189
190
|
mimeType: "Test string",
|
|
190
191
|
},
|
|
192
|
+
enableShadowRemovalNativePdf: true,
|
|
191
193
|
glossaryConfig: {
|
|
192
194
|
glossary: "Test string",
|
|
193
195
|
ignoreCase: true,
|