@maxim_mazurok/gapi.client.translate-v3 0.0.20230222 → 0.0.20230303

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.
Files changed (3) hide show
  1. package/index.d.ts +21 -21
  2. package/package.json +1 -1
  3. package/tests.ts +3 -7
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=v3
12
- // Revision: 20230222
12
+ // Revision: 20230303
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -57,6 +57,11 @@ declare namespace gapi.client {
57
57
  * https://cloud.google.com/translate/attribution#attribution_and_logos
58
58
  */
59
59
  customizedAttribution?: string;
60
+ /**
61
+ * Optional. If true, use the text removal server to remove the shadow text on background image for native pdf translation. Shadow removal feature can only be enabled when
62
+ * is_translate_native_pdf_only: false && pdf_native_only: false
63
+ */
64
+ enableShadowRemovalNativePdf?: boolean;
60
65
  /** Optional. */
61
66
  formatConversions?: { [P in string]: string };
62
67
  /** Optional. Glossaries to be applied. It's keyed by target language code. */
@@ -76,11 +81,11 @@ declare namespace gapi.client {
76
81
  /** Required. Output configuration. If 2 input configs match to the same file (that is, same input path), we don't generate output for duplicate inputs. */
77
82
  outputConfig?: BatchDocumentOutputConfig;
78
83
  /**
79
- * Required. The BCP-47 language code of the input document if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in [Language
84
+ * Required. The ISO-639 language code of the input document if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in [Language
80
85
  * Support](https://cloud.google.com/translate/docs/languages).
81
86
  */
82
87
  sourceLanguageCode?: string;
83
- /** Required. The BCP-47 language code to use for translation of the input document. Specify up to 10 language codes here. */
88
+ /** Required. The ISO-639 language code to use for translation of the input document. Specify up to 10 language codes here. */
84
89
  targetLanguageCodes?: string[];
85
90
  }
86
91
  interface BatchTranslateTextRequest {
@@ -147,7 +152,7 @@ declare namespace gapi.client {
147
152
  interface DetectedLanguage {
148
153
  /** The confidence of the detection result for this language. */
149
154
  confidence?: number;
150
- /** The BCP-47 language code of the source content in the request, detected automatically. */
155
+ /** The ISO-639 language code of the source content in the request, detected automatically. */
151
156
  languageCode?: string;
152
157
  }
153
158
  interface DetectLanguageRequest {
@@ -336,14 +341,14 @@ declare namespace gapi.client {
336
341
  usage?: string;
337
342
  }
338
343
  interface LanguageCodePair {
339
- /** Required. The BCP-47 language code of the input text, for example, "en-US". Expected to be an exact match for GlossaryTerm.language_code. */
344
+ /** Required. The ISO-639 language code of the input text, for example, "en-US". Expected to be an exact match for GlossaryTerm.language_code. */
340
345
  sourceLanguageCode?: string;
341
- /** Required. The BCP-47 language code for translation output, for example, "zh-CN". Expected to be an exact match for GlossaryTerm.language_code. */
346
+ /** Required. The ISO-639 language code for translation output, for example, "zh-CN". Expected to be an exact match for GlossaryTerm.language_code. */
342
347
  targetLanguageCode?: string;
343
348
  }
344
349
  interface LanguageCodesSet {
345
350
  /**
346
- * The BCP-47 language code(s) for terms defined in the glossary. All entries are unique. The list contains at least two entries. Expected to be an exact match for
351
+ * The ISO-639 language code(s) for terms defined in the glossary. All entries are unique. The list contains at least two entries. Expected to be an exact match for
347
352
  * GlossaryTerm.language_code.
348
353
  */
349
354
  languageCodes?: string[];
@@ -493,7 +498,7 @@ declare namespace gapi.client {
493
498
  /** Human-readable name of the language localized in the display language specified in the request. */
494
499
  displayName?: string;
495
500
  /**
496
- * Supported language code, generally consisting of its ISO 639-1 identifier, for example, 'en', 'ja'. In certain cases, BCP-47 codes including language and region identifiers are
501
+ * Supported language code, generally consisting of its ISO 639-1 identifier, for example, 'en', 'ja'. In certain cases, ISO-639 codes including language and region identifiers are
497
502
  * returned (for example, 'zh-TW' and 'zh-CN').
498
503
  */
499
504
  languageCode?: string;
@@ -541,12 +546,12 @@ declare namespace gapi.client {
541
546
  */
542
547
  model?: string;
543
548
  /**
544
- * Optional. The BCP-47 language code of the input document if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in Language Support. If the source language
545
- * isn't specified, the API attempts to identify the source language automatically and returns the source language within the response. Source language must be specified if the request
546
- * contains a glossary or a custom model.
549
+ * Optional. The ISO-639 language code of the input document if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in Language Support. If the source
550
+ * language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response. Source language must be specified if
551
+ * the request contains a glossary or a custom model.
547
552
  */
548
553
  sourceLanguageCode?: string;
549
- /** Required. The BCP-47 language code to use for translation of the input document, set to one of the language codes listed in Language Support. */
554
+ /** Required. The ISO-639 language code to use for translation of the input document, set to one of the language codes listed in Language Support. */
550
555
  targetLanguageCode?: string;
551
556
  }
552
557
  interface TranslateDocumentResponse {
@@ -595,11 +600,11 @@ declare namespace gapi.client {
595
600
  */
596
601
  model?: string;
597
602
  /**
598
- * Optional. The BCP-47 language code of the input text if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in Language Support. If the source language
603
+ * Optional. The ISO-639 language code of the input text if known, for example, "en-US" or "sr-Latn". Supported language codes are listed in Language Support. If the source language
599
604
  * isn't specified, the API attempts to identify the source language automatically and returns the source language within the response.
600
605
  */
601
606
  sourceLanguageCode?: string;
602
- /** Required. The BCP-47 language code to use for translation of the input text, set to one of the language codes listed in Language Support. */
607
+ /** Required. The ISO-639 language code to use for translation of the input text, set to one of the language codes listed in Language Support. */
603
608
  targetLanguageCode?: string;
604
609
  }
605
610
  interface TranslateTextResponse {
@@ -610,7 +615,7 @@ declare namespace gapi.client {
610
615
  }
611
616
  interface Translation {
612
617
  /**
613
- * The BCP-47 language code of source text in the initial request, detected automatically, if no source language was passed within the initial request. If the source language was
618
+ * The ISO-639 language code of source text in the initial request, detected automatically, if no source language was passed within the initial request. If the source language was
614
619
  * passed, auto-detection of the language does not occur and this field is empty.
615
620
  */
616
621
  detectedLanguageCode?: string;
@@ -1604,12 +1609,7 @@ declare namespace gapi.client {
1604
1609
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1605
1610
  uploadType?: string;
1606
1611
  }): Request<Operation>;
1607
- /**
1608
- * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services
1609
- * to override the binding to use different resource name schemes, such as `users/*‍/operations`. To override the binding, API services can add a binding such as
1610
- * `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
1611
- * ensure the name binding is the parent resource, without the operations collection id.
1612
- */
1612
+ /** Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. */
1613
1613
  list(request?: {
1614
1614
  /** V1 error format. */
1615
1615
  "$.xgafv"?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.translate-v3",
3
- "version": "0.0.20230222",
3
+ "version": "0.0.20230303",
4
4
  "description": "TypeScript typings for Cloud Translation API v3",
5
5
  "license": "MIT",
6
6
  "author": {
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: 20230222
6
+ // Revision: 20230303
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -76,6 +76,7 @@ gapi.load('client', async () => {
76
76
  parent: "Test string",
77
77
  }, {
78
78
  customizedAttribution: "Test string",
79
+ enableShadowRemovalNativePdf: true,
79
80
  formatConversions: {
80
81
  A: "Test string"
81
82
  },
@@ -462,12 +463,7 @@ gapi.load('client', async () => {
462
463
  await gapi.client.translate.projects.locations.operations.get({
463
464
  name: "Test string",
464
465
  });
465
- /**
466
- * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
467
- * override the binding to use different resource name schemes, such as `users/*‍/operations`. To override the binding, API services can add a binding such as
468
- * `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
469
- * ensure the name binding is the parent resource, without the operations collection id.
470
- */
466
+ /** Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. */
471
467
  await gapi.client.translate.projects.locations.operations.list({
472
468
  filter: "Test string",
473
469
  name: "Test string",