@maxim_mazurok/gapi.client.translate-v3 0.0.20250729 → 0.0.20260108

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 +94 -12
  2. package/package.json +1 -1
  3. package/readme.md +2 -0
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: 20250729
12
+ // Revision: 20260108
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -31,7 +31,7 @@ declare namespace gapi.client {
31
31
  displayName?: string;
32
32
  /** The number of examples in the dataset. */
33
33
  exampleCount?: number;
34
- /** Required. The resource name of the dataset, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_id}` */
34
+ /** Identifier. The resource name of the dataset, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_id}` */
35
35
  name?: string;
36
36
  /** The BCP-47 language code of the source language. */
37
37
  sourceLanguageCode?: string;
@@ -47,7 +47,7 @@ declare namespace gapi.client {
47
47
  displayName?: string;
48
48
  /** The number of entries that the file contains. */
49
49
  entryCount?: number;
50
- /** Required. The resource name of the file, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` */
50
+ /** Identifier. The resource name of the file, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` */
51
51
  name?: string;
52
52
  /** Output only. Timestamp when this file was last updated. */
53
53
  updateTime?: string;
@@ -55,7 +55,7 @@ declare namespace gapi.client {
55
55
  interface AdaptiveMtSentence {
56
56
  /** Output only. Timestamp when this sentence was created. */
57
57
  createTime?: string;
58
- /** Required. The resource name of the file, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}/adaptiveMtSentences/{sentence}` */
58
+ /** Identifier. The resource name of the file, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}/adaptiveMtSentences/{sentence}` */
59
59
  name?: string;
60
60
  /** Required. The source sentence. */
61
61
  sourceSentence?: string;
@@ -174,6 +174,8 @@ declare namespace gapi.client {
174
174
  interface DetectLanguageRequest {
175
175
  /** The content of the input stored as a string. */
176
176
  content?: string;
177
+ /** Optional. The document configuration of the input. */
178
+ documentInputConfig?: DocumentInputConfig;
177
179
  /** Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See https://cloud.google.com/translate/docs/advanced/labels for more information. */
178
180
  labels?: {[P in string]: string};
179
181
  /** Optional. The format of the source text, for example, "text/html", "text/plain". If left blank, the MIME type defaults to "text/html". */
@@ -259,7 +261,7 @@ declare namespace gapi.client {
259
261
  languageCodesSet?: LanguageCodesSet;
260
262
  /** Used with unidirectional glossaries. */
261
263
  languagePair?: LanguageCodePair;
262
- /** Required. The resource name of the glossary. Glossary names have the form `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. */
264
+ /** Identifier. The resource name of the glossary. Glossary names have the form `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. */
263
265
  name?: string;
264
266
  /** Output only. When CreateGlossary was called. */
265
267
  submitTime?: string;
@@ -335,7 +337,7 @@ declare namespace gapi.client {
335
337
  targetLanguageCode?: string;
336
338
  }
337
339
  interface LanguageCodesSet {
338
- /** 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 GlossaryTerm.language_code. */
340
+ /** Optional. 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 GlossaryTerm.language_code. */
339
341
  languageCodes?: string[];
340
342
  }
341
343
  interface ListAdaptiveMtDatasetsResponse {
@@ -397,6 +399,8 @@ declare namespace gapi.client {
397
399
  nextPageToken?: string;
398
400
  /** A list of operations that matches the specified filter in the request. */
399
401
  operations?: Operation[];
402
+ /** Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations. */
403
+ unreachable?: string[];
400
404
  }
401
405
  interface Location {
402
406
  /** The friendly name for this location, typically a nearby city name. For example, "Tokyo". */
@@ -413,7 +417,7 @@ declare namespace gapi.client {
413
417
  interface Model {
414
418
  /** Output only. Timestamp when the model resource was created, which is also when the training started. */
415
419
  createTime?: string;
416
- /** The dataset from which the model is trained, in form of `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}` */
420
+ /** Required. The dataset from which the model is trained, in form of `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}` */
417
421
  dataset?: string;
418
422
  /** The name of the model to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9. */
419
423
  displayName?: string;
@@ -466,6 +470,24 @@ declare namespace gapi.client {
466
470
  /** Reference sentence pairs. */
467
471
  referenceSentencePairs?: ReferenceSentencePair[];
468
472
  }
473
+ interface RefinementEntry {
474
+ /** Required. The original translation of the source text. */
475
+ originalTranslation?: string;
476
+ /** Required. The source text to be refined. */
477
+ sourceText?: string;
478
+ }
479
+ interface RefineTextRequest {
480
+ /** Required. The source texts and original translations in the source and target languages. */
481
+ refinementEntries?: RefinementEntry[];
482
+ /** Required. The BCP-47 language code of the source text in the request, for example, "en-US". */
483
+ sourceLanguageCode?: string;
484
+ /** Required. The BCP-47 language code for translation output, for example, "zh-CN". */
485
+ targetLanguageCode?: string;
486
+ }
487
+ interface RefineTextResponse {
488
+ /** The refined translations obtained from the original translations. */
489
+ refinedTranslations?: string[];
490
+ }
469
491
  interface Romanization {
470
492
  /** 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 passed, auto-detection of the language does not occur and this field is empty. */
471
493
  detectedLanguageCode?: string;
@@ -1607,7 +1629,7 @@ declare namespace gapi.client {
1607
1629
  fields?: string;
1608
1630
  /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1609
1631
  key?: string;
1610
- /** Required. The resource name of the glossary. Glossary names have the form `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. */
1632
+ /** Identifier. The resource name of the glossary. Glossary names have the form `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. */
1611
1633
  name: string;
1612
1634
  /** OAuth 2.0 token for the current user. */
1613
1635
  oauth_token?: string;
@@ -1615,7 +1637,7 @@ declare namespace gapi.client {
1615
1637
  prettyPrint?: boolean;
1616
1638
  /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1617
1639
  quotaUser?: string;
1618
- /** The list of fields to be updated. Currently only `display_name` and 'input_config' */
1640
+ /** The list of fields to be updated. Currently, only `display_name` and `input_config` are supported. */
1619
1641
  updateMask?: string;
1620
1642
  /** Upload protocol for media (e.g. "raw", "multipart"). */
1621
1643
  upload_protocol?: string;
@@ -1638,7 +1660,7 @@ declare namespace gapi.client {
1638
1660
  fields?: string;
1639
1661
  /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1640
1662
  key?: string;
1641
- /** Required. The resource name of the glossary. Glossary names have the form `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. */
1663
+ /** Identifier. The resource name of the glossary. Glossary names have the form `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`. */
1642
1664
  name: string;
1643
1665
  /** OAuth 2.0 token for the current user. */
1644
1666
  oauth_token?: string;
@@ -1646,7 +1668,7 @@ declare namespace gapi.client {
1646
1668
  prettyPrint?: boolean;
1647
1669
  /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1648
1670
  quotaUser?: string;
1649
- /** The list of fields to be updated. Currently only `display_name` and 'input_config' */
1671
+ /** The list of fields to be updated. Currently, only `display_name` and `input_config` are supported. */
1650
1672
  updateMask?: string;
1651
1673
  /** Upload protocol for media (e.g. "raw", "multipart"). */
1652
1674
  upload_protocol?: string;
@@ -1945,6 +1967,8 @@ declare namespace gapi.client {
1945
1967
  prettyPrint?: boolean;
1946
1968
  /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1947
1969
  quotaUser?: string;
1970
+ /** When set to `true`, operations that are reachable are returned as normal, and those that are unreachable are returned in the ListOperationsResponse.unreachable field. This can only be `true` when reading across collections. For example, when `parent` is set to `"projects/example/locations/-"`. This field is not supported by default and will result in an `UNIMPLEMENTED` error if set unless explicitly documented otherwise in service or product specific documentation. */
1971
+ returnPartialSuccess?: boolean;
1948
1972
  /** Upload protocol for media (e.g. "raw", "multipart"). */
1949
1973
  upload_protocol?: string;
1950
1974
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
@@ -2310,7 +2334,7 @@ declare namespace gapi.client {
2310
2334
  alt?: string;
2311
2335
  /** JSONP */
2312
2336
  callback?: string;
2313
- /** Optional. A list of extra location types that should be used as conditions for controlling the visibility of the locations. */
2337
+ /** Optional. Do not use this field. It is unsupported and is ignored unless explicitly documented otherwise. This is primarily for internal usage. */
2314
2338
  extraLocationTypes?: string | string[];
2315
2339
  /** Selector specifying which fields to include in a partial response. */
2316
2340
  fields?: string;
@@ -2335,6 +2359,64 @@ declare namespace gapi.client {
2335
2359
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2336
2360
  uploadType?: string;
2337
2361
  }): Request<ListLocationsResponse>;
2362
+ /** Refines the input translated text to improve the quality. */
2363
+ refineText(request: {
2364
+ /** V1 error format. */
2365
+ '$.xgafv'?: string;
2366
+ /** OAuth access token. */
2367
+ access_token?: string;
2368
+ /** Data format for response. */
2369
+ alt?: string;
2370
+ /** JSONP */
2371
+ callback?: string;
2372
+ /** Selector specifying which fields to include in a partial response. */
2373
+ fields?: string;
2374
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2375
+ key?: string;
2376
+ /** OAuth 2.0 token for the current user. */
2377
+ oauth_token?: string;
2378
+ /** Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. */
2379
+ parent: string;
2380
+ /** Returns response with indentations and line breaks. */
2381
+ prettyPrint?: boolean;
2382
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2383
+ quotaUser?: string;
2384
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2385
+ upload_protocol?: string;
2386
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2387
+ uploadType?: string;
2388
+ /** Request body */
2389
+ resource: RefineTextRequest;
2390
+ }): Request<RefineTextResponse>;
2391
+ refineText(
2392
+ request: {
2393
+ /** V1 error format. */
2394
+ '$.xgafv'?: string;
2395
+ /** OAuth access token. */
2396
+ access_token?: string;
2397
+ /** Data format for response. */
2398
+ alt?: string;
2399
+ /** JSONP */
2400
+ callback?: string;
2401
+ /** Selector specifying which fields to include in a partial response. */
2402
+ fields?: string;
2403
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2404
+ key?: string;
2405
+ /** OAuth 2.0 token for the current user. */
2406
+ oauth_token?: string;
2407
+ /** Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. */
2408
+ parent: string;
2409
+ /** Returns response with indentations and line breaks. */
2410
+ prettyPrint?: boolean;
2411
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2412
+ quotaUser?: string;
2413
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2414
+ upload_protocol?: string;
2415
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2416
+ uploadType?: string;
2417
+ },
2418
+ body: RefineTextRequest,
2419
+ ): Request<RefineTextResponse>;
2338
2420
  /** Romanize input text written in non-Latin scripts to Latin text. */
2339
2421
  romanizeText(request: {
2340
2422
  /** V1 error format. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.translate-v3",
3
- "version": "0.0.20250729",
3
+ "version": "0.0.20260108",
4
4
  "description": "TypeScript typings for Cloud Translation API v3",
5
5
  "repository": {
6
6
  "type": "git",
package/readme.md CHANGED
@@ -92,3 +92,5 @@ Translates input text and returns translated text.
92
92
  */
93
93
  await gapi.client.translate.projects.translateText({parent: 'parent'});
94
94
  ```
95
+
96
+ For provenance information see [Provenance section on NPM](https://www.npmjs.com/package/@maxim_mazurok/gapi.client.translate-v3#Provenance:~:text=none-,Provenance,-Built%20and%20signed)