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 5.1.1 to 5.1.2

5

build/src/v3/translation_service_client.d.ts

@@ -13,3 +13,2 @@ /// <reference types="node" />

private _descriptors;
private _translationServiceStub;
private _innerApiCalls;

@@ -19,2 +18,6 @@ private _pathTemplates;

auth: gax.GoogleAuth;
operationsClient: gax.OperationsClient;
translationServiceStub: Promise<{
[name: string]: Function;
}>;
/**

@@ -21,0 +24,0 @@ * Construct an instance of TranslationServiceClient.

26

build/src/v3/translation_service_client.js

@@ -126,3 +126,3 @@ "use strict";

: gaxModule.protobuf.loadSync(nodejsProtoPath);
const operationsClient = gaxModule
this.operationsClient = gaxModule
.lro({

@@ -140,5 +140,5 @@ auth: this.auth,

this._descriptors.longrunning = {
batchTranslateText: new gaxModule.LongrunningDescriptor(operationsClient, batchTranslateTextResponse.decode.bind(batchTranslateTextResponse), batchTranslateTextMetadata.decode.bind(batchTranslateTextMetadata)),
createGlossary: new gaxModule.LongrunningDescriptor(operationsClient, createGlossaryResponse.decode.bind(createGlossaryResponse), createGlossaryMetadata.decode.bind(createGlossaryMetadata)),
deleteGlossary: new gaxModule.LongrunningDescriptor(operationsClient, deleteGlossaryResponse.decode.bind(deleteGlossaryResponse), deleteGlossaryMetadata.decode.bind(deleteGlossaryMetadata)),
batchTranslateText: new gaxModule.LongrunningDescriptor(this.operationsClient, batchTranslateTextResponse.decode.bind(batchTranslateTextResponse), batchTranslateTextMetadata.decode.bind(batchTranslateTextMetadata)),
createGlossary: new gaxModule.LongrunningDescriptor(this.operationsClient, createGlossaryResponse.decode.bind(createGlossaryResponse), createGlossaryMetadata.decode.bind(createGlossaryMetadata)),
deleteGlossary: new gaxModule.LongrunningDescriptor(this.operationsClient, deleteGlossaryResponse.decode.bind(deleteGlossaryResponse), deleteGlossaryMetadata.decode.bind(deleteGlossaryMetadata)),
};

@@ -153,3 +153,3 @@ // Put together the default options sent with requests.

// google.cloud.translation.v3.TranslationService.
this._translationServiceStub = gaxGrpc.createStub(opts.fallback
this.translationServiceStub = gaxGrpc.createStub(opts.fallback
? protos.lookupService('google.cloud.translation.v3.TranslationService')

@@ -171,3 +171,3 @@ : // tslint:disable-next-line no-any

for (const methodName of translationServiceStubMethods) {
const innerCallPromise = this._translationServiceStub.then(stub => (...args) => {
const innerCallPromise = this.translationServiceStub.then(stub => (...args) => {
return stub[methodName].apply(stub, args);

@@ -287,3 +287,3 @@ }, (err) => () => {

* an INVALID_ARGUMENT (400) error is returned.
* @param {number} [request.labels]
* @param {number[]} [request.labels]
* Optional. The labels with user-defined metadata for the request.

@@ -353,3 +353,3 @@ *

* "text/plain". If left blank, the MIME type defaults to "text/html".
* @param {number} [request.labels]
* @param {number[]} [request.labels]
* Optional. The labels with user-defined metadata for the request.

@@ -506,3 +506,3 @@ *

* Required. Specify up to 10 language codes here.
* @param {number} [request.models]
* @param {number[]} [request.models]
* Optional. The models to use for translation. Map's key is target language

@@ -524,3 +524,3 @@ * code. Map's value is model name. Value can be a built-in general model,

* not requested for a language pair, then default google model (nmt) is used.
* @param {number} request.inputConfigs
* @param {number[]} request.inputConfigs
* Required. Input configurations.

@@ -534,6 +534,6 @@ * The total number of files matched should be <= 1000.

* we don't generate output for duplicate inputs.
* @param {number} [request.glossaries]
* @param {number[]} [request.glossaries]
* Optional. Glossaries to be applied for translation.
* It's keyed by target language code.
* @param {number} [request.labels]
* @param {number[]} [request.labels]
* Optional. The labels with user-defined metadata for the request.

@@ -819,3 +819,3 @@ *

if (!this._terminated) {
return this._translationServiceStub.then(stub => {
return this.translationServiceStub.then(stub => {
this._terminated = true;

@@ -822,0 +822,0 @@ stub.close();

@@ -13,3 +13,2 @@ /// <reference types="node" />

private _descriptors;
private _translationServiceStub;
private _innerApiCalls;

@@ -19,2 +18,6 @@ private _pathTemplates;

auth: gax.GoogleAuth;
operationsClient: gax.OperationsClient;
translationServiceStub: Promise<{
[name: string]: Function;
}>;
/**

@@ -21,0 +24,0 @@ * Construct an instance of TranslationServiceClient.

@@ -126,3 +126,3 @@ "use strict";

: gaxModule.protobuf.loadSync(nodejsProtoPath);
const operationsClient = gaxModule
this.operationsClient = gaxModule
.lro({

@@ -140,5 +140,5 @@ auth: this.auth,

this._descriptors.longrunning = {
batchTranslateText: new gaxModule.LongrunningDescriptor(operationsClient, batchTranslateTextResponse.decode.bind(batchTranslateTextResponse), batchTranslateTextMetadata.decode.bind(batchTranslateTextMetadata)),
createGlossary: new gaxModule.LongrunningDescriptor(operationsClient, createGlossaryResponse.decode.bind(createGlossaryResponse), createGlossaryMetadata.decode.bind(createGlossaryMetadata)),
deleteGlossary: new gaxModule.LongrunningDescriptor(operationsClient, deleteGlossaryResponse.decode.bind(deleteGlossaryResponse), deleteGlossaryMetadata.decode.bind(deleteGlossaryMetadata)),
batchTranslateText: new gaxModule.LongrunningDescriptor(this.operationsClient, batchTranslateTextResponse.decode.bind(batchTranslateTextResponse), batchTranslateTextMetadata.decode.bind(batchTranslateTextMetadata)),
createGlossary: new gaxModule.LongrunningDescriptor(this.operationsClient, createGlossaryResponse.decode.bind(createGlossaryResponse), createGlossaryMetadata.decode.bind(createGlossaryMetadata)),
deleteGlossary: new gaxModule.LongrunningDescriptor(this.operationsClient, deleteGlossaryResponse.decode.bind(deleteGlossaryResponse), deleteGlossaryMetadata.decode.bind(deleteGlossaryMetadata)),
};

@@ -153,3 +153,3 @@ // Put together the default options sent with requests.

// google.cloud.translation.v3beta1.TranslationService.
this._translationServiceStub = gaxGrpc.createStub(opts.fallback
this.translationServiceStub = gaxGrpc.createStub(opts.fallback
? protos.lookupService('google.cloud.translation.v3beta1.TranslationService')

@@ -171,3 +171,3 @@ : // tslint:disable-next-line no-any

for (const methodName of translationServiceStubMethods) {
const innerCallPromise = this._translationServiceStub.then(stub => (...args) => {
const innerCallPromise = this.translationServiceStub.then(stub => (...args) => {
return stub[methodName].apply(stub, args);

@@ -287,3 +287,3 @@ }, (err) => () => {

* an INVALID_ARGUMENT (400) error is returned.
* @param {number} [request.labels]
* @param {number[]} [request.labels]
* Optional. The labels with user-defined metadata for the request.

@@ -353,3 +353,3 @@ *

* "text/plain". If left blank, the MIME type defaults to "text/html".
* @param {number} request.labels
* @param {number[]} request.labels
* Optional. The labels with user-defined metadata for the request.

@@ -506,3 +506,3 @@ *

* Required. Specify up to 10 language codes here.
* @param {number} [request.models]
* @param {number[]} [request.models]
* Optional. The models to use for translation. Map's key is target language

@@ -524,3 +524,3 @@ * code. Map's value is model name. Value can be a built-in general model,

* not requested for a language pair, then default google model (nmt) is used.
* @param {number} request.inputConfigs
* @param {number[]} request.inputConfigs
* Required. Input configurations.

@@ -534,6 +534,6 @@ * The total number of files matched should be <= 1000.

* we don't generate output for duplicate inputs.
* @param {number} [request.glossaries]
* @param {number[]} [request.glossaries]
* Optional. Glossaries to be applied for translation.
* It's keyed by target language code.
* @param {number} [request.labels]
* @param {number[]} [request.labels]
* Optional. The labels with user-defined metadata for the request.

@@ -819,3 +819,3 @@ *

if (!this._terminated) {
return this._translationServiceStub.then(stub => {
return this.translationServiceStub.then(stub => {
this._terminated = true;

@@ -822,0 +822,0 @@ stub.close();

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

### [5.1.2](https://www.github.com/googleapis/nodejs-translate/compare/v5.1.1...v5.1.2) (2019-12-11)
### Bug Fixes
* make operationsClient and service stub public ([7ac1252](https://www.github.com/googleapis/nodejs-translate/commit/7ac12522ef96d6a37c15ca7847e6e872316c8a9d))
### [5.1.1](https://www.github.com/googleapis/nodejs-translate/compare/v5.1.0...v5.1.1) (2019-12-05)

@@ -9,0 +16,0 @@

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

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

Sorry, the diff of this file is not supported yet

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