@google-cloud/speech
Advanced tools
Comparing version 6.0.1 to 6.0.2
@@ -59,4 +59,3 @@ /// <reference types="node" /> | ||
* Follows the structure of {@link gapicConfig}. | ||
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. | ||
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC. | ||
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. | ||
* For more information, please check the | ||
@@ -69,3 +68,3 @@ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. | ||
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC | ||
* const client = new AdaptationClient({fallback: 'rest'}, gax); | ||
* const client = new AdaptationClient({fallback: true}, gax); | ||
* ``` | ||
@@ -72,0 +71,0 @@ */ |
@@ -63,4 +63,3 @@ "use strict"; | ||
* Follows the structure of {@link gapicConfig}. | ||
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. | ||
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC. | ||
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. | ||
* For more information, please check the | ||
@@ -73,3 +72,3 @@ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. | ||
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC | ||
* const client = new AdaptationClient({fallback: 'rest'}, gax); | ||
* const client = new AdaptationClient({fallback: true}, gax); | ||
* ``` | ||
@@ -131,3 +130,3 @@ */ | ||
} | ||
else if (opts.fallback === 'rest') { | ||
else { | ||
clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); | ||
@@ -134,0 +133,0 @@ } |
@@ -58,4 +58,3 @@ import type * as gax from 'google-gax'; | ||
* Follows the structure of {@link gapicConfig}. | ||
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. | ||
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC. | ||
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. | ||
* For more information, please check the | ||
@@ -68,3 +67,3 @@ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. | ||
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC | ||
* const client = new SpeechClient({fallback: 'rest'}, gax); | ||
* const client = new SpeechClient({fallback: true}, gax); | ||
* ``` | ||
@@ -71,0 +70,0 @@ */ |
@@ -64,4 +64,3 @@ "use strict"; | ||
* Follows the structure of {@link gapicConfig}. | ||
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. | ||
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC. | ||
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. | ||
* For more information, please check the | ||
@@ -74,3 +73,3 @@ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. | ||
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC | ||
* const client = new SpeechClient({fallback: 'rest'}, gax); | ||
* const client = new SpeechClient({fallback: true}, gax); | ||
* ``` | ||
@@ -132,3 +131,3 @@ */ | ||
} | ||
else if (opts.fallback === 'rest') { | ||
else { | ||
clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); | ||
@@ -151,3 +150,3 @@ } | ||
this.descriptors.stream = { | ||
streamingRecognize: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.BIDI_STREAMING, opts.fallback === 'rest'), | ||
streamingRecognize: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.BIDI_STREAMING, !!opts.fallback), | ||
}; | ||
@@ -162,3 +161,3 @@ const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); | ||
}; | ||
if (opts.fallback === 'rest') { | ||
if (opts.fallback) { | ||
lroOptions.protoJson = protoFilesRoot; | ||
@@ -165,0 +164,0 @@ lroOptions.httpRules = [ |
@@ -59,4 +59,3 @@ /// <reference types="node" /> | ||
* Follows the structure of {@link gapicConfig}. | ||
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. | ||
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC. | ||
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. | ||
* For more information, please check the | ||
@@ -69,3 +68,3 @@ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. | ||
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC | ||
* const client = new AdaptationClient({fallback: 'rest'}, gax); | ||
* const client = new AdaptationClient({fallback: true}, gax); | ||
* ``` | ||
@@ -72,0 +71,0 @@ */ |
@@ -63,4 +63,3 @@ "use strict"; | ||
* Follows the structure of {@link gapicConfig}. | ||
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. | ||
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC. | ||
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. | ||
* For more information, please check the | ||
@@ -73,3 +72,3 @@ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. | ||
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC | ||
* const client = new AdaptationClient({fallback: 'rest'}, gax); | ||
* const client = new AdaptationClient({fallback: true}, gax); | ||
* ``` | ||
@@ -131,3 +130,3 @@ */ | ||
} | ||
else if (opts.fallback === 'rest') { | ||
else { | ||
clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); | ||
@@ -134,0 +133,0 @@ } |
@@ -58,4 +58,3 @@ import type * as gax from 'google-gax'; | ||
* Follows the structure of {@link gapicConfig}. | ||
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. | ||
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC. | ||
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. | ||
* For more information, please check the | ||
@@ -68,3 +67,3 @@ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. | ||
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC | ||
* const client = new SpeechClient({fallback: 'rest'}, gax); | ||
* const client = new SpeechClient({fallback: true}, gax); | ||
* ``` | ||
@@ -71,0 +70,0 @@ */ |
@@ -64,4 +64,3 @@ "use strict"; | ||
* Follows the structure of {@link gapicConfig}. | ||
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. | ||
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC. | ||
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. | ||
* For more information, please check the | ||
@@ -74,3 +73,3 @@ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. | ||
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC | ||
* const client = new SpeechClient({fallback: 'rest'}, gax); | ||
* const client = new SpeechClient({fallback: true}, gax); | ||
* ``` | ||
@@ -132,3 +131,3 @@ */ | ||
} | ||
else if (opts.fallback === 'rest') { | ||
else { | ||
clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); | ||
@@ -151,3 +150,3 @@ } | ||
this.descriptors.stream = { | ||
streamingRecognize: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.BIDI_STREAMING, opts.fallback === 'rest'), | ||
streamingRecognize: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.BIDI_STREAMING, !!opts.fallback), | ||
}; | ||
@@ -162,3 +161,3 @@ const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); | ||
}; | ||
if (opts.fallback === 'rest') { | ||
if (opts.fallback) { | ||
lroOptions.protoJson = protoFilesRoot; | ||
@@ -165,0 +164,0 @@ lroOptions.httpRules = [ |
@@ -7,2 +7,10 @@ # Changelog | ||
## [6.0.2](https://github.com/googleapis/google-cloud-node/compare/speech-v6.0.1...speech-v6.0.2) (2023-09-06) | ||
### Bug Fixes | ||
* [Many APIs] simplify logic for HTTP/1.1 REST fallback option ([#4588](https://github.com/googleapis/google-cloud-node/issues/4588)) ([e5ad564](https://github.com/googleapis/google-cloud-node/commit/e5ad564f74dc7a36c0e8cd8de173428a99f1deae)) | ||
* **deps:** Update dependency google-proto-files to v4 ([#4548](https://github.com/googleapis/google-cloud-node/issues/4548)) ([892810a](https://github.com/googleapis/google-cloud-node/commit/892810a80bd84060c2446edc4fa284d92af1e2f2)) | ||
## [6.0.1](https://github.com/googleapis/google-cloud-node/compare/speech-v6.0.0...speech-v6.0.1) (2023-08-09) | ||
@@ -9,0 +17,0 @@ |
{ | ||
"name": "@google-cloud/speech", | ||
"description": "Cloud Speech Client Library for Node.js", | ||
"version": "6.0.1", | ||
"version": "6.0.2", | ||
"license": "Apache-2.0", | ||
@@ -53,3 +53,3 @@ "author": "Google Inc.", | ||
"dependencies": { | ||
"@google-cloud/common": "^4.0.0", | ||
"@google-cloud/common": "^5.0.0", | ||
"@types/pumpify": "^1.4.1", | ||
@@ -70,4 +70,4 @@ "google-gax": "^4.0.3", | ||
"jsdoc": "^4.0.0", | ||
"jsdoc-fresh": "^2.0.0", | ||
"jsdoc-region-tag": "^2.0.0", | ||
"jsdoc-fresh": "^3.0.0", | ||
"jsdoc-region-tag": "^3.0.0", | ||
"linkinator": "4.1.2", | ||
@@ -74,0 +74,0 @@ "long": "^5.2.3", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
6089225
94319
11
+ Added@google-cloud/common@5.0.2(transitive)
+ Added@google-cloud/projectify@4.0.0(transitive)
+ Added@google-cloud/promisify@4.0.0(transitive)
+ Addedagent-base@7.1.1(transitive)
+ Addedhtml-entities@2.5.2(transitive)
- Removed@google-cloud/common@4.0.3(transitive)
- Removed@google-cloud/projectify@3.0.0(transitive)
- Removed@google-cloud/promisify@3.0.1(transitive)
- Removedent@2.2.0(transitive)
- Removedfast-text-encoding@1.0.6(transitive)
- Removedgaxios@5.1.3(transitive)
- Removedgcp-metadata@5.3.0(transitive)
- Removedgoogle-auth-library@8.9.0(transitive)
- Removedgoogle-p12-pem@4.0.1(transitive)
- Removedgtoken@6.1.2(transitive)
- Removedlru-cache@6.0.0(transitive)
- Removednode-forge@1.3.1(transitive)
- Removedretry-request@5.0.2(transitive)
- Removedteeny-request@8.0.3(transitive)
- Removedyallist@4.0.0(transitive)
Updated@google-cloud/common@^5.0.0