Socket
Socket
Sign inDemoInstall

@google-cloud/translate

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@google-cloud/translate - npm Package Compare versions

Comparing version 6.2.7 to 6.3.0

10

build/src/v3/translation_service_client_config.json

@@ -38,2 +38,7 @@ {

},
"TranslateDocument": {
"timeout_millis": 600000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default"
},
"BatchTranslateText": {

@@ -44,2 +49,7 @@ "timeout_millis": 600000,

},
"BatchTranslateDocument": {
"timeout_millis": 600000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default"
},
"CreateGlossary": {

@@ -46,0 +56,0 @@ "timeout_millis": 600000,

52

build/src/v3/translation_service_client.d.ts

@@ -114,2 +114,5 @@ /// <reference types="node" />

getSupportedLanguages(request: protos.google.cloud.translation.v3.IGetSupportedLanguagesRequest, callback: Callback<protos.google.cloud.translation.v3.ISupportedLanguages, protos.google.cloud.translation.v3.IGetSupportedLanguagesRequest | null | undefined, {} | null | undefined>): void;
translateDocument(request?: protos.google.cloud.translation.v3.ITranslateDocumentRequest, options?: CallOptions): Promise<[protos.google.cloud.translation.v3.ITranslateDocumentResponse, protos.google.cloud.translation.v3.ITranslateDocumentRequest | undefined, {} | undefined]>;
translateDocument(request: protos.google.cloud.translation.v3.ITranslateDocumentRequest, options: CallOptions, callback: Callback<protos.google.cloud.translation.v3.ITranslateDocumentResponse, protos.google.cloud.translation.v3.ITranslateDocumentRequest | null | undefined, {} | null | undefined>): void;
translateDocument(request: protos.google.cloud.translation.v3.ITranslateDocumentRequest, callback: Callback<protos.google.cloud.translation.v3.ITranslateDocumentResponse, protos.google.cloud.translation.v3.ITranslateDocumentRequest | null | undefined, {} | null | undefined>): void;
getGlossary(request?: protos.google.cloud.translation.v3.IGetGlossaryRequest, options?: CallOptions): Promise<[protos.google.cloud.translation.v3.IGlossary, protos.google.cloud.translation.v3.IGetGlossaryRequest | undefined, {} | undefined]>;

@@ -137,2 +140,21 @@ getGlossary(request: protos.google.cloud.translation.v3.IGetGlossaryRequest, options: CallOptions, callback: Callback<protos.google.cloud.translation.v3.IGlossary, protos.google.cloud.translation.v3.IGetGlossaryRequest | null | undefined, {} | null | undefined>): void;

checkBatchTranslateTextProgress(name: string): Promise<LROperation<protos.google.cloud.translation.v3.BatchTranslateResponse, protos.google.cloud.translation.v3.BatchTranslateMetadata>>;
batchTranslateDocument(request?: protos.google.cloud.translation.v3.IBatchTranslateDocumentRequest, options?: CallOptions): Promise<[LROperation<protos.google.cloud.translation.v3.IBatchTranslateDocumentResponse, protos.google.cloud.translation.v3.IBatchTranslateDocumentMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;
batchTranslateDocument(request: protos.google.cloud.translation.v3.IBatchTranslateDocumentRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.translation.v3.IBatchTranslateDocumentResponse, protos.google.cloud.translation.v3.IBatchTranslateDocumentMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
batchTranslateDocument(request: protos.google.cloud.translation.v3.IBatchTranslateDocumentRequest, callback: Callback<LROperation<protos.google.cloud.translation.v3.IBatchTranslateDocumentResponse, protos.google.cloud.translation.v3.IBatchTranslateDocumentMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
/**
* Check the status of the long running operation returned by `batchTranslateDocument()`.
* @param {String} name
* The operation name that will be passed.
* @returns {Promise} - The promise which resolves to an object.
* The decoded operation object has result and metadata field to get information from.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
* for more details and examples.
* @example
* const decodedOperation = await checkBatchTranslateDocumentProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
*/
checkBatchTranslateDocumentProgress(name: string): Promise<LROperation<protos.google.cloud.translation.v3.BatchTranslateDocumentResponse, protos.google.cloud.translation.v3.BatchTranslateDocumentMetadata>>;
createGlossary(request?: protos.google.cloud.translation.v3.ICreateGlossaryRequest, options?: CallOptions): Promise<[LROperation<protos.google.cloud.translation.v3.IGlossary, protos.google.cloud.translation.v3.ICreateGlossaryMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>;

@@ -195,3 +217,16 @@ createGlossary(request: protos.google.cloud.translation.v3.ICreateGlossaryRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.translation.v3.IGlossary, protos.google.cloud.translation.v3.ICreateGlossaryMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;

* Optional. Filter specifying constraints of a list operation.
* Filtering is not supported yet, and the parameter currently has no effect.
* Specify the constraint by the format of "key=value", where key must be
* "src" or "tgt", and the value must be a valid language code.
* For multiple restrictions, concatenate them by "AND" (uppercase only),
* such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used
* here, which means using 'en-US' and 'en' can lead to different results,
* which depends on the language code you used when you create the glossary.
* For the unidirectional glossaries, the "src" and "tgt" add restrictions
* on the source and target language code separately.
* For the equivalent term set glossaries, the "src" and/or "tgt" add
* restrictions on the term set.
* For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional
* glossaries which exactly match the source language code as "en-US" and the
* target language code "zh-CN", but all equivalent term set glossaries which
* contain "en-US" and "zh-CN" in their language set will be picked.
* If missing, no filtering is performed.

@@ -229,3 +264,16 @@ * @param {object} [options]

* Optional. Filter specifying constraints of a list operation.
* Filtering is not supported yet, and the parameter currently has no effect.
* Specify the constraint by the format of "key=value", where key must be
* "src" or "tgt", and the value must be a valid language code.
* For multiple restrictions, concatenate them by "AND" (uppercase only),
* such as: "src=en-US AND tgt=zh-CN". Notice that the exact match is used
* here, which means using 'en-US' and 'en' can lead to different results,
* which depends on the language code you used when you create the glossary.
* For the unidirectional glossaries, the "src" and "tgt" add restrictions
* on the source and target language code separately.
* For the equivalent term set glossaries, the "src" and/or "tgt" add
* restrictions on the term set.
* For example: "src=en-US AND tgt=zh-CN" will only pick the unidirectional
* glossaries which exactly match the source language code as "en-US" and the
* target language code "zh-CN", but all equivalent term set glossaries which
* contain "en-US" and "zh-CN" in their language set will be picked.
* If missing, no filtering is performed.

@@ -232,0 +280,0 @@ * @param {object} [options]

@@ -7,2 +7,17 @@ # Changelog

## [6.3.0](https://www.github.com/googleapis/nodejs-translate/compare/v6.2.7...v6.3.0) (2021-09-13)
### Features
* added v3 proto for online/batch document translation and updated v3beta1 proto for format conversion ([#719](https://www.github.com/googleapis/nodejs-translate/issues/719)) ([76c9a13](https://www.github.com/googleapis/nodejs-translate/commit/76c9a13a0bb8b9dadc9f671e649af82f58c943f6))
* turns on self-signed JWT feature flag ([#713](https://www.github.com/googleapis/nodejs-translate/issues/713)) ([41062a6](https://www.github.com/googleapis/nodejs-translate/commit/41062a675ae8bb19d921b5612ae325383d219725))
### Bug Fixes
* add missing annotation for batch document translation ([#715](https://www.github.com/googleapis/nodejs-translate/issues/715)) ([b893e3d](https://www.github.com/googleapis/nodejs-translate/commit/b893e3dcc532813d29d96950fc90962215ad6e51))
* **build:** set default branch to main ([#722](https://www.github.com/googleapis/nodejs-translate/issues/722)) ([26b9ba7](https://www.github.com/googleapis/nodejs-translate/commit/26b9ba7850d25234e1bfb8035dd5ef7a1108b31c))
* remove unnecessary assertion ([#721](https://www.github.com/googleapis/nodejs-translate/issues/721)) ([a5a1f82](https://www.github.com/googleapis/nodejs-translate/commit/a5a1f82b9b78f465ef6bbbfba55dda8937d90dfa))
### [6.2.7](https://www.github.com/googleapis/nodejs-translate/compare/v6.2.6...v6.2.7) (2021-08-17)

@@ -9,0 +24,0 @@

2

package.json
{
"name": "@google-cloud/translate",
"description": "Cloud Translation API Client Library for Node.js",
"version": "6.2.7",
"version": "6.3.0",
"license": "Apache-2.0",

@@ -6,0 +6,0 @@ "author": "Google Inc.",

@@ -9,3 +9,3 @@ [//]: # "This README.md file is auto-generated, all changes to this file will be lost."

[![npm version](https://img.shields.io/npm/v/@google-cloud/translate.svg)](https://www.npmjs.org/package/@google-cloud/translate)
[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-translate/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-translate)
[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-translate/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-translate)

@@ -23,3 +23,3 @@

A comprehensive list of changes in each version may be found in
[the CHANGELOG](https://github.com/googleapis/nodejs-translate/blob/master/CHANGELOG.md).
[the CHANGELOG](https://github.com/googleapis/nodejs-translate/blob/main/CHANGELOG.md).

@@ -99,9 +99,9 @@ * [Cloud Translation Node.js Client API Reference][client-docs]

Samples are in the [`samples/`](https://github.com/googleapis/nodejs-translate/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample.
Samples are in the [`samples/`](https://github.com/googleapis/nodejs-translate/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample.
| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
| Hybrid Glossaries | [source code](https://github.com/googleapis/nodejs-translate/blob/master/samples/hybridGlossaries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-translate&page=editor&open_in_editor=samples/hybridGlossaries.js,samples/README.md) |
| Quickstart | [source code](https://github.com/googleapis/nodejs-translate/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-translate&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
| Translate | [source code](https://github.com/googleapis/nodejs-translate/blob/master/samples/translate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-translate&page=editor&open_in_editor=samples/translate.js,samples/README.md) |
| Hybrid Glossaries | [source code](https://github.com/googleapis/nodejs-translate/blob/main/samples/hybridGlossaries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-translate&page=editor&open_in_editor=samples/hybridGlossaries.js,samples/README.md) |
| Quickstart | [source code](https://github.com/googleapis/nodejs-translate/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-translate&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
| Translate | [source code](https://github.com/googleapis/nodejs-translate/blob/main/samples/translate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-translate&page=editor&open_in_editor=samples/translate.js,samples/README.md) |

@@ -155,3 +155,3 @@

Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-translate/blob/master/CONTRIBUTING.md).
Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-translate/blob/main/CONTRIBUTING.md).

@@ -161,4 +161,4 @@ Please note that this `README.md`, the `samples/README.md`,

are generated from a central template. To edit one of these files, make an edit
to its template in this
[directory](https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/node_library).
to its templates in
[directory](https://github.com/googleapis/synthtool).

@@ -169,3 +169,3 @@ ## License

See [LICENSE](https://github.com/googleapis/nodejs-translate/blob/master/LICENSE)
See [LICENSE](https://github.com/googleapis/nodejs-translate/blob/main/LICENSE)

@@ -172,0 +172,0 @@ [client-docs]: https://cloud.google.com/nodejs/docs/reference/translate/latest

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc