@google-cloud/assured-workloads
Advanced tools
Comparing version 3.1.0 to 3.2.0
@@ -37,3 +37,3 @@ /// <reference types="node" /> | ||
* The options accepted by the constructor are described in detail | ||
* in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). | ||
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). | ||
* The common options are: | ||
@@ -61,7 +61,6 @@ * @param {object} [options.credentials] - Credentials object. | ||
* Follows the structure of {@link gapicConfig}. | ||
* @param {boolean} [options.fallback] - Use HTTP fallback mode. | ||
* In fallback mode, a special browser-compatible transport implementation is used | ||
* instead of gRPC transport. In browser context (if the `window` object is defined) | ||
* the fallback mode is enabled automatically; set `options.fallback` to `false` | ||
* if you need to override this behavior. | ||
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. | ||
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC. | ||
* For more information, please check the | ||
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. | ||
*/ | ||
@@ -68,0 +67,0 @@ constructor(opts?: ClientOptions); |
@@ -43,3 +43,3 @@ "use strict"; | ||
* The options accepted by the constructor are described in detail | ||
* in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). | ||
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). | ||
* The common options are: | ||
@@ -67,7 +67,6 @@ * @param {object} [options.credentials] - Credentials object. | ||
* Follows the structure of {@link gapicConfig}. | ||
* @param {boolean} [options.fallback] - Use HTTP fallback mode. | ||
* In fallback mode, a special browser-compatible transport implementation is used | ||
* instead of gRPC transport. In browser context (if the `window` object is defined) | ||
* the fallback mode is enabled automatically; set `options.fallback` to `false` | ||
* if you need to override this behavior. | ||
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. | ||
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC. | ||
* For more information, please check the | ||
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. | ||
*/ | ||
@@ -149,7 +148,21 @@ constructor(opts) { | ||
// rather than holding a request open. | ||
this.operationsClient = this._gaxModule | ||
.lro({ | ||
const lroOptions = { | ||
auth: this.auth, | ||
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, | ||
}) | ||
}; | ||
if (opts.fallback === 'rest') { | ||
lroOptions.protoJson = protoFilesRoot; | ||
lroOptions.httpRules = [ | ||
{ | ||
selector: 'google.longrunning.Operations.GetOperation', | ||
get: '/v1/{name=organizations/*/locations/*/operations/*}', | ||
}, | ||
{ | ||
selector: 'google.longrunning.Operations.ListOperations', | ||
get: '/v1/{name=organizations/*/locations/*}/operations', | ||
}, | ||
]; | ||
} | ||
this.operationsClient = this._gaxModule | ||
.lro(lroOptions) | ||
.operationsClient(opts); | ||
@@ -156,0 +169,0 @@ const createWorkloadResponse = protoFilesRoot.lookup('.google.cloud.assuredworkloads.v1.Workload'); |
@@ -37,3 +37,3 @@ /// <reference types="node" /> | ||
* The options accepted by the constructor are described in detail | ||
* in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). | ||
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). | ||
* The common options are: | ||
@@ -61,7 +61,6 @@ * @param {object} [options.credentials] - Credentials object. | ||
* Follows the structure of {@link gapicConfig}. | ||
* @param {boolean} [options.fallback] - Use HTTP fallback mode. | ||
* In fallback mode, a special browser-compatible transport implementation is used | ||
* instead of gRPC transport. In browser context (if the `window` object is defined) | ||
* the fallback mode is enabled automatically; set `options.fallback` to `false` | ||
* if you need to override this behavior. | ||
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. | ||
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC. | ||
* For more information, please check the | ||
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. | ||
*/ | ||
@@ -68,0 +67,0 @@ constructor(opts?: ClientOptions); |
@@ -43,3 +43,3 @@ "use strict"; | ||
* The options accepted by the constructor are described in detail | ||
* in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). | ||
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). | ||
* The common options are: | ||
@@ -67,7 +67,6 @@ * @param {object} [options.credentials] - Credentials object. | ||
* Follows the structure of {@link gapicConfig}. | ||
* @param {boolean} [options.fallback] - Use HTTP fallback mode. | ||
* In fallback mode, a special browser-compatible transport implementation is used | ||
* instead of gRPC transport. In browser context (if the `window` object is defined) | ||
* the fallback mode is enabled automatically; set `options.fallback` to `false` | ||
* if you need to override this behavior. | ||
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. | ||
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC. | ||
* For more information, please check the | ||
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. | ||
*/ | ||
@@ -149,7 +148,21 @@ constructor(opts) { | ||
// rather than holding a request open. | ||
this.operationsClient = this._gaxModule | ||
.lro({ | ||
const lroOptions = { | ||
auth: this.auth, | ||
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, | ||
}) | ||
}; | ||
if (opts.fallback === 'rest') { | ||
lroOptions.protoJson = protoFilesRoot; | ||
lroOptions.httpRules = [ | ||
{ | ||
selector: 'google.longrunning.Operations.GetOperation', | ||
get: '/v1beta1/{name=organizations/*/locations/*/operations/*}', | ||
}, | ||
{ | ||
selector: 'google.longrunning.Operations.ListOperations', | ||
get: '/v1beta1/{name=organizations/*/locations/*}/operations', | ||
}, | ||
]; | ||
} | ||
this.operationsClient = this._gaxModule | ||
.lro(lroOptions) | ||
.operationsClient(opts); | ||
@@ -156,0 +169,0 @@ const createWorkloadResponse = protoFilesRoot.lookup('.google.cloud.assuredworkloads.v1beta1.Workload'); |
# Changelog | ||
## [3.2.0](https://github.com/googleapis/nodejs-assured-workloads/compare/v3.1.0...v3.2.0) (2022-06-29) | ||
### Features | ||
* support regapic LRO ([#172](https://github.com/googleapis/nodejs-assured-workloads/issues/172)) ([d0dcdef](https://github.com/googleapis/nodejs-assured-workloads/commit/d0dcdefe8846cf0629a0aeca19c013b8ce53fc90)) | ||
## [3.1.0](https://github.com/googleapis/nodejs-assured-workloads/compare/v3.0.0...v3.1.0) (2022-06-16) | ||
@@ -4,0 +11,0 @@ |
{ | ||
"name": "@google-cloud/assured-workloads", | ||
"version": "3.1.0", | ||
"version": "3.2.0", | ||
"description": "Assured Workloads client for Node.js", | ||
@@ -5,0 +5,0 @@ "repository": "googleapis/nodejs-assured-workloads", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2029153
32328