Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@google-cloud/assured-workloads

Package Overview
Dependencies
Maintainers
4
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@google-cloud/assured-workloads - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

1

build/src/index.d.ts
import * as v1beta1 from './v1beta1';
declare const AssuredWorkloadsServiceClient: typeof v1beta1.AssuredWorkloadsServiceClient;
declare type AssuredWorkloadsServiceClient = v1beta1.AssuredWorkloadsServiceClient;
export { v1beta1, AssuredWorkloadsServiceClient };

@@ -4,0 +5,0 @@ declare const _default: {

75

build/src/v1beta1/assured_workloads_service_client.d.ts

@@ -33,4 +33,6 @@ /// <reference types="node" />

*
* @param {object} [options] - The configuration object. See the subsequent
* parameters for more details.
* @param {object} [options] - The configuration object.
* 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).
* The common options are:
* @param {object} [options.credentials] - Credentials object.

@@ -55,2 +57,9 @@ * @param {string} [options.credentials.client_email]

* API remote host.
* @param {gax.ClientConfig} [options.clientConfig] - client configuration override.
* TODO(@alexander-fenster): link to gax documentation.
* @param {boolean} 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.
*/

@@ -74,2 +83,3 @@ constructor(opts?: ClientOptions);

* The DNS address for this API service.
* @returns {string} The DNS address for this service.
*/

@@ -80,2 +90,3 @@ static get servicePath(): string;

* exists for compatibility reasons.
* @returns {string} The DNS address for this service.
*/

@@ -85,2 +96,3 @@ static get apiEndpoint(): string;

* The port for this API service.
* @returns {number} The default port for this service.
*/

@@ -91,2 +103,3 @@ static get port(): number;

* in this service.
* @returns {string[]} List of default scopes.
*/

@@ -109,3 +122,3 @@ static get scopes(): string[];

/**
* Check the status of the long running operation returned by the createWorkload() method.
* Check the status of the long running operation returned by `createWorkload()`.
* @param {String} name

@@ -115,9 +128,10 @@ * The operation name that will be passed.

* The decoded operation object has result and metadata field to get information from.
*
* @example:
* const decodedOperation = await checkCreateWorkloadProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
*
* 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 checkCreateWorkloadProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
*/

@@ -129,14 +143,3 @@ checkCreateWorkloadProgress(name: string): Promise<LROperation<protos.google.cloud.assuredworkloads.v1beta1.Workload, protos.google.cloud.assuredworkloads.v1beta1.CreateWorkloadOperationMetadata>>;

/**
* Equivalent to {@link listWorkloads}, but returns a NodeJS Stream object.
*
* This fetches the paged responses for {@link listWorkloads} continuously
* and invokes the callback registered for 'data' event for each element in the
* responses.
*
* The returned object has 'end' method when no more elements are required.
*
* autoPaginate option will be ignored.
*
* @see {@link https://nodejs.org/api/stream.html}
*
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
* @param {Object} request

@@ -160,9 +163,15 @@ * The request object that will be sent.

* An object stream which emits an object representing [Workload]{@link google.cloud.assuredworkloads.v1beta1.Workload} on 'data' event.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed. Note that it can affect your quota.
* We recommend using `listWorkloadsAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
*/
listWorkloadsStream(request?: protos.google.cloud.assuredworkloads.v1beta1.IListWorkloadsRequest, options?: gax.CallOptions): Transform;
/**
* Equivalent to {@link listWorkloads}, but returns an iterable object.
* Equivalent to `listWorkloads`, but returns an iterable object.
*
* for-await-of syntax is used with the iterable to recursively get response element on-demand.
*
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
* @param {Object} request

@@ -185,3 +194,14 @@ * The request object that will be sent.

* @returns {Object}
* An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols.
* An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
* When you iterate the returned iterable, each element will be an object representing
* [Workload]{@link google.cloud.assuredworkloads.v1beta1.Workload}. The API will be called under the hood as needed, once per the page,
* so you can stop the iteration when you don't need more results.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
* @example
* const iterable = client.listWorkloadsAsync(request);
* for await (const response of iterable) {
* // process response
* }
*/

@@ -262,7 +282,8 @@ listWorkloadsAsync(request?: protos.google.cloud.assuredworkloads.v1beta1.IListWorkloadsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.cloud.assuredworkloads.v1beta1.IWorkload>;

/**
* Terminate the GRPC channel and close the client.
* Terminate the gRPC channel and close the client.
*
* The client will no longer be usable and all future behavior is undefined.
* @returns {Promise} A promise that resolves when the client is closed.
*/
close(): Promise<void>;
}

@@ -35,4 +35,6 @@ "use strict";

*
* @param {object} [options] - The configuration object. See the subsequent
* parameters for more details.
* @param {object} [options] - The configuration object.
* 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).
* The common options are:
* @param {object} [options.credentials] - Credentials object.

@@ -57,4 +59,12 @@ * @param {string} [options.credentials.client_email]

* API remote host.
* @param {gax.ClientConfig} [options.clientConfig] - client configuration override.
* TODO(@alexander-fenster): link to gax documentation.
* @param {boolean} 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.
*/
constructor(opts) {
var _a, _b;
this._terminated = false;

@@ -67,32 +77,17 @@ this.descriptors = {

};
// Ensure that options include the service address and port.
// Ensure that options include all the required fields.
const staticMembers = this
.constructor;
const servicePath = opts && opts.servicePath
? opts.servicePath
: opts && opts.apiEndpoint
? opts.apiEndpoint
: staticMembers.servicePath;
const port = opts && opts.port ? opts.port : staticMembers.port;
if (!opts) {
opts = { servicePath, port };
const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || staticMembers.servicePath;
const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
const clientConfig = (_a = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _a !== void 0 ? _a : {};
const fallback = (_b = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _b !== void 0 ? _b : typeof window !== 'undefined';
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
// If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) {
opts['scopes'] = staticMembers.scopes;
}
opts.servicePath = opts.servicePath || servicePath;
opts.port = opts.port || port;
// users can override the config from client side, like retry codes name.
// The detailed structure of the clientConfig can be found here: https://github.com/googleapis/gax-nodejs/blob/master/src/gax.ts#L546
// The way to override client config for Showcase API:
//
// const customConfig = {"interfaces": {"google.showcase.v1beta1.Echo": {"methods": {"Echo": {"retry_codes_name": "idempotent", "retry_params_name": "default"}}}}}
// const showcaseClient = new showcaseClient({ projectId, customConfig });
opts.clientConfig = opts.clientConfig || {};
// If we're running in browser, it's OK to omit `fallback` since
// google-gax has `browser` field in its `package.json`.
// For Electron (which does not respect `browser` field),
// pass `{fallback: true}` to the AssuredWorkloadsServiceClient constructor.
// Choose either gRPC or proto-over-HTTP implementation of google-gax.
this._gaxModule = opts.fallback ? gax.fallback : gax;
// Create a `gaxGrpc` object, with any grpc-specific options
// sent to the client.
opts.scopes = this
.constructor.scopes;
// Create a `gaxGrpc` object, with any grpc-specific options sent to the client.
this._gaxGrpc = new this._gaxModule.GrpcClient(opts);

@@ -103,2 +98,6 @@ // Save options to use in initialize() method.

this.auth = this._gaxGrpc.auth;
// Set the default scopes in auth client if needed.
if (servicePath === staticMembers.servicePath) {
this.auth.defaultScopes = staticMembers.scopes;
}
// Determine the client header string.

@@ -218,2 +217,3 @@ const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];

* The DNS address for this API service.
* @returns {string} The DNS address for this service.
*/

@@ -226,2 +226,3 @@ static get servicePath() {

* exists for compatibility reasons.
* @returns {string} The DNS address for this service.
*/

@@ -233,2 +234,3 @@ static get apiEndpoint() {

* The port for this API service.
* @returns {number} The default port for this service.
*/

@@ -241,2 +243,3 @@ static get port() {

* in this service.
* @returns {string[]} List of default scopes.
*/

@@ -248,4 +251,3 @@ static get scopes() {

* Return the project ID used by this class.
* @param {function(Error, string)} callback - the callback to
* be called with the current project Id.
* @returns {Promise} A promise that resolves to string containing the project ID.
*/

@@ -278,3 +280,7 @@ getProjectId(callback) {

* The first element of the array is an object representing [Workload]{@link google.cloud.assuredworkloads.v1beta1.Workload}.
* The promise has a method named "cancel" which cancels the ongoing API call.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
* @example
* const [response] = await client.updateWorkload(request);
*/

@@ -318,3 +324,7 @@ updateWorkload(request, optionsOrCallback, callback) {

* The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}.
* The promise has a method named "cancel" which cancels the ongoing API call.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
* @example
* const [response] = await client.deleteWorkload(request);
*/

@@ -355,3 +365,7 @@ deleteWorkload(request, optionsOrCallback, callback) {

* The first element of the array is an object representing [Workload]{@link google.cloud.assuredworkloads.v1beta1.Workload}.
* The promise has a method named "cancel" which cancels the ongoing API call.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
* for more details and examples.
* @example
* const [response] = await client.getWorkload(request);
*/

@@ -395,4 +409,11 @@ getWorkload(request, optionsOrCallback, callback) {

* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing [Operation]{@link google.longrunning.Operation}.
* The promise has a method named "cancel" which cancels the ongoing API call.
* The first element of the array is an object representing
* a long running operation. Its `promise()` method returns a promise
* you can `await` for.
* 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 [operation] = await client.createWorkload(request);
* const [response] = await operation.promise();
*/

@@ -419,3 +440,3 @@ createWorkload(request, optionsOrCallback, callback) {

/**
* Check the status of the long running operation returned by the createWorkload() method.
* Check the status of the long running operation returned by `createWorkload()`.
* @param {String} name

@@ -425,9 +446,10 @@ * The operation name that will be passed.

* The decoded operation object has result and metadata field to get information from.
*
* @example:
* const decodedOperation = await checkCreateWorkloadProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
*
* 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 checkCreateWorkloadProgress(name);
* console.log(decodedOperation.result);
* console.log(decodedOperation.done);
* console.log(decodedOperation.metadata);
*/

@@ -461,15 +483,10 @@ async checkCreateWorkloadProgress(name) {

* The first element of the array is Array of [Workload]{@link google.cloud.assuredworkloads.v1beta1.Workload}.
* The client library support auto-pagination by default: it will call the API as many
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed and will merge results from all the pages into this array.
*
* When autoPaginate: false is specified through options, the array has three elements.
* The first element is Array of [Workload]{@link google.cloud.assuredworkloads.v1beta1.Workload} that corresponds to
* the one page received from the API server.
* If the second element is not null it contains the request object of type [ListWorkloadsRequest]{@link google.cloud.assuredworkloads.v1beta1.ListWorkloadsRequest}
* that can be used to obtain the next page of the results.
* If it is null, the next page does not exist.
* The third element contains the raw response received from the API server. Its type is
* [ListWorkloadsResponse]{@link google.cloud.assuredworkloads.v1beta1.ListWorkloadsResponse}.
*
* The promise has a method named "cancel" which cancels the ongoing API call.
* Note that it can affect your quota.
* We recommend using `listWorkloadsAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
*/

@@ -496,14 +513,3 @@ listWorkloads(request, optionsOrCallback, callback) {

/**
* Equivalent to {@link listWorkloads}, but returns a NodeJS Stream object.
*
* This fetches the paged responses for {@link listWorkloads} continuously
* and invokes the callback registered for 'data' event for each element in the
* responses.
*
* The returned object has 'end' method when no more elements are required.
*
* autoPaginate option will be ignored.
*
* @see {@link https://nodejs.org/api/stream.html}
*
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
* @param {Object} request

@@ -527,2 +533,9 @@ * The request object that will be sent.

* An object stream which emits an object representing [Workload]{@link google.cloud.assuredworkloads.v1beta1.Workload} on 'data' event.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed. Note that it can affect your quota.
* We recommend using `listWorkloadsAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
*/

@@ -542,6 +555,5 @@ listWorkloadsStream(request, options) {

/**
* Equivalent to {@link listWorkloads}, but returns an iterable object.
* Equivalent to `listWorkloads`, but returns an iterable object.
*
* for-await-of syntax is used with the iterable to recursively get response element on-demand.
*
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
* @param {Object} request

@@ -564,3 +576,14 @@ * The request object that will be sent.

* @returns {Object}
* An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols.
* An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
* When you iterate the returned iterable, each element will be an object representing
* [Workload]{@link google.cloud.assuredworkloads.v1beta1.Workload}. The API will be called under the hood as needed, once per the page,
* so you can stop the iteration when you don't need more results.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
* @example
* const iterable = client.listWorkloadsAsync(request);
* for await (const response of iterable) {
* // process response
* }
*/

@@ -686,5 +709,6 @@ listWorkloadsAsync(request, options) {

/**
* Terminate the GRPC channel and close the client.
* Terminate the gRPC channel and close the client.
*
* The client will no longer be usable and all future behavior is undefined.
* @returns {Promise} A promise that resolves when the client is closed.
*/

@@ -691,0 +715,0 @@ close() {

# Changelog
### [1.0.1](https://www.github.com/googleapis/nodejs-assured-workloads/compare/v1.0.0...v1.0.1) (2020-11-06)
### Bug Fixes
* do not modify options object, use defaultScopes ([#12](https://www.github.com/googleapis/nodejs-assured-workloads/issues/12)) ([ed671aa](https://www.github.com/googleapis/nodejs-assured-workloads/commit/ed671aadda0be838465172ea0fbdc64ab04ce754))
## 1.0.0 (2020-09-16)

@@ -4,0 +11,0 @@

{
"name": "@google-cloud/assured-workloads",
"version": "1.0.0",
"version": "1.0.1",
"description": "Assured Workloads client for Node.js",

@@ -42,3 +42,3 @@ "repository": "googleapis/nodejs-assured-workloads",

"dependencies": {
"google-gax": "^2.7.0"
"google-gax": "^2.9.2"
},

@@ -61,4 +61,4 @@ "devDependencies": {

"typescript": "^3.9.7",
"webpack": "^4.44.1",
"webpack-cli": "^3.3.12"
"webpack": "^5.0.0",
"webpack-cli": "^4.0.0"
},

@@ -65,0 +65,0 @@ "engines": {

Sorry, the diff of this file is not supported yet

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