Socket
Socket
Sign inDemoInstall

@google-cloud/kms

Package Overview
Dependencies
141
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.1 to 3.1.0

67

build/src/v1/ekm_service_client.d.ts
/// <reference types="node" />
import * as gax from 'google-gax';
import { Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, IamClient, IamProtos } from 'google-gax';
import type * as gax from 'google-gax';
import type { Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, IamClient, IamProtos, LocationsClient, LocationProtos } from 'google-gax';
import { Transform } from 'stream';

@@ -30,2 +30,3 @@ import * as protos from '../../protos/protos';

iamClient: IamClient;
locationsClient: LocationsClient;
pathTemplates: {

@@ -69,4 +70,11 @@ [name: string]: gax.PathTemplate;

* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
* need to avoid loading the default gRPC version and want to use the fallback
* HTTP implementation. Load only fallback version and pass it to the constructor:
* ```
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
* const client = new EkmServiceClient({fallback: 'rest'}, gax);
* ```
*/
constructor(opts?: ClientOptions);
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
/**

@@ -423,2 +431,55 @@ * Initialize the client.

/**
* Gets information about a location.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Resource name for the location.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing [Location]{@link google.cloud.location.Location}.
* 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.getLocation(request);
* ```
*/
getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;
/**
* Lists information about the supported locations for this service. Returns an iterable object.
*
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* The resource that owns the locations collection, if applicable.
* @param {string} request.filter
* The standard list filter.
* @param {number} request.pageSize
* The standard list page size.
* @param {string} request.pageToken
* The standard list page token.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Object}
* 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
* [Location]{@link google.cloud.location.Location}. 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.listLocationsAsync(request);
* for await (const response of iterable) {
* // process response
* }
* ```
*/
listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
/**
* Return a fully-qualified cryptoKey resource name string.

@@ -425,0 +486,0 @@ *

@@ -21,5 +21,2 @@ "use strict";

exports.EkmServiceClient = void 0;
/* global window */
const gax = require("google-gax");
const google_gax_1 = require("google-gax");
const jsonProtos = require("../../protos/protos.json");

@@ -75,4 +72,11 @@ /**

* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
* need to avoid loading the default gRPC version and want to use the fallback
* HTTP implementation. Load only fallback version and pass it to the constructor:
* ```
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
* const client = new EkmServiceClient({fallback: 'rest'}, gax);
* ```
*/
constructor(opts) {
constructor(opts, gaxInstance) {
var _a, _b;

@@ -98,4 +102,8 @@ this._terminated = false;

}
// Load google-gax module synchronously if needed
if (!gaxInstance) {
gaxInstance = require('google-gax');
}
// Choose either gRPC or proto-over-HTTP implementation of google-gax.
this._gaxModule = opts.fallback ? gax.fallback : gax;
this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance;
// Create a `gaxGrpc` object, with any grpc-specific options sent to the client.

@@ -115,3 +123,4 @@ this._gaxGrpc = new this._gaxModule.GrpcClient(opts);

}
this.iamClient = new google_gax_1.IamClient(this._gaxGrpc, opts);
this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts);
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
// Determine the client header string.

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

// Add a warn function to the client constructor so it can be easily tested.
this.warn = gax.warn;
this.warn = this._gaxModule.warn;
}

@@ -205,3 +214,3 @@ /**

const descriptor = this.descriptors.page[methodName] || undefined;
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor);
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
this.innerApiCalls[methodName] = apiCall;

@@ -256,2 +265,3 @@ }

getEkmConnection(request, optionsOrCallback, callback) {
var _a;
request = request || {};

@@ -270,4 +280,4 @@ let options;

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
name: request.name || '',
this._gaxModule.routingHeader.fromParams({
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
});

@@ -278,2 +288,3 @@ this.initialize();

createEkmConnection(request, optionsOrCallback, callback) {
var _a;
request = request || {};

@@ -292,4 +303,4 @@ let options;

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
parent: request.parent || '',
this._gaxModule.routingHeader.fromParams({
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
});

@@ -300,2 +311,3 @@ this.initialize();

updateEkmConnection(request, optionsOrCallback, callback) {
var _a;
request = request || {};

@@ -314,4 +326,4 @@ let options;

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
'ekm_connection.name': request.ekmConnection.name || '',
this._gaxModule.routingHeader.fromParams({
'ekm_connection.name': (_a = request.ekmConnection.name) !== null && _a !== void 0 ? _a : '',
});

@@ -322,2 +334,3 @@ this.initialize();

listEkmConnections(request, optionsOrCallback, callback) {
var _a;
request = request || {};

@@ -336,4 +349,4 @@ let options;

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
parent: request.parent || '',
this._gaxModule.routingHeader.fromParams({
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
});

@@ -385,2 +398,3 @@ this.initialize();

listEkmConnectionsStream(request, options) {
var _a;
request = request || {};

@@ -391,4 +405,4 @@ options = options || {};

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
parent: request.parent || '',
this._gaxModule.routingHeader.fromParams({
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
});

@@ -445,2 +459,3 @@ const defaultCallSettings = this._defaults['listEkmConnections'];

listEkmConnectionsAsync(request, options) {
var _a;
request = request || {};

@@ -451,4 +466,4 @@ options = options || {};

options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
parent: request.parent || '',
this._gaxModule.routingHeader.fromParams({
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
});

@@ -555,2 +570,59 @@ const defaultCallSettings = this._defaults['listEkmConnections'];

}
/**
* Gets information about a location.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Resource name for the location.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing [Location]{@link google.cloud.location.Location}.
* 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.getLocation(request);
* ```
*/
getLocation(request, options, callback) {
return this.locationsClient.getLocation(request, options, callback);
}
/**
* Lists information about the supported locations for this service. Returns an iterable object.
*
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* The resource that owns the locations collection, if applicable.
* @param {string} request.filter
* The standard list filter.
* @param {number} request.pageSize
* The standard list page size.
* @param {string} request.pageToken
* The standard list page token.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Object}
* 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
* [Location]{@link google.cloud.location.Location}. 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.listLocationsAsync(request);
* for await (const response of iterable) {
* // process response
* }
* ```
*/
listLocationsAsync(request, options) {
return this.locationsClient.listLocationsAsync(request, options);
}
// --------------------

@@ -962,2 +1034,3 @@ // -- Path templates --

this.iamClient.close();
this.locationsClient.close();
});

@@ -964,0 +1037,0 @@ }

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

## [3.1.0](https://github.com/googleapis/nodejs-kms/compare/v3.0.1...v3.1.0) (2022-11-11)
### Features
* **kms:** Enable generation of Locations mixin ([#578](https://github.com/googleapis/nodejs-kms/issues/578)) ([5205ddc](https://github.com/googleapis/nodejs-kms/commit/5205ddc20daa79b1d39b89e2c7ea7063a4f5d93e))
### Bug Fixes
* Allow passing gax instance to client constructor ([#570](https://github.com/googleapis/nodejs-kms/issues/570)) ([1072346](https://github.com/googleapis/nodejs-kms/commit/1072346f45496885a6cba33dbb5e72f500661656))
* Better support for fallback mode ([#565](https://github.com/googleapis/nodejs-kms/issues/565)) ([ebb7caf](https://github.com/googleapis/nodejs-kms/commit/ebb7caf95716814af6e1f3d0b423f68dba289593))
* Change import long to require ([#566](https://github.com/googleapis/nodejs-kms/issues/566)) ([ac44194](https://github.com/googleapis/nodejs-kms/commit/ac4419470711d19d30811e3ff88659e0484ce38d))
* **deps:** Use google-gax v3.5.2 ([#581](https://github.com/googleapis/nodejs-kms/issues/581)) ([54c26f3](https://github.com/googleapis/nodejs-kms/commit/54c26f3f97c1e65ee2cc3f85cfed9c8a4b974432))
* Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-kms/issues/1553)) ([#569](https://github.com/googleapis/nodejs-kms/issues/569)) ([c981d1a](https://github.com/googleapis/nodejs-kms/commit/c981d1a423c86a86b2b0ca47f09cedf26be1f28a))
* Preserve default values in x-goog-request-params header ([#573](https://github.com/googleapis/nodejs-kms/issues/573)) ([2ab539d](https://github.com/googleapis/nodejs-kms/commit/2ab539dd02674f010c10e6933da8d06da0e983b5))
* Remove pip install statements ([#1546](https://github.com/googleapis/nodejs-kms/issues/1546)) ([#568](https://github.com/googleapis/nodejs-kms/issues/568)) ([e704093](https://github.com/googleapis/nodejs-kms/commit/e704093f79aefe6706bae5b62e78525705366fe6))
* use google-gax v3.3.0 ([c981d1a](https://github.com/googleapis/nodejs-kms/commit/c981d1a423c86a86b2b0ca47f09cedf26be1f28a))
## [3.0.1](https://github.com/googleapis/nodejs-kms/compare/v3.0.0...v3.0.1) (2022-06-30)

@@ -9,0 +28,0 @@

10

package.json
{
"name": "@google-cloud/kms",
"description": "Google Cloud Key Management Service (KMS) API client for Node.js",
"version": "3.0.1",
"version": "3.1.0",
"license": "Apache-2.0",

@@ -46,14 +46,14 @@ "author": "Google LLC",

"dependencies": {
"google-gax": "^3.0.1"
"google-gax": "^3.5.2"
},
"devDependencies": {
"@types/mocha": "^9.0.0",
"@types/node": "^16.0.0",
"@types/node": "^18.0.0",
"@types/sinon": "^10.0.0",
"c8": "^7.1.0",
"gts": "^3.1.0",
"jsdoc": "^3.6.3",
"jsdoc": "^4.0.0",
"jsdoc-fresh": "^2.0.0",
"jsdoc-region-tag": "^2.0.0",
"linkinator": "^2.0.3",
"linkinator": "^4.0.0",
"mocha": "^9.2.2",

@@ -60,0 +60,0 @@ "null-loader": "^4.0.0",

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 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 not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc