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

@google-cloud/recaptcha-enterprise

Package Overview
Dependencies
Maintainers
4
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@google-cloud/recaptcha-enterprise - npm Package Compare versions

Comparing version 2.2.1 to 2.3.0

8

build/src/v1/recaptcha_enterprise_service_client_config.json

@@ -57,2 +57,10 @@ {

"retry_params_name": "default"
},
"MigrateKey": {
"retry_codes_name": "non_idempotent",
"retry_params_name": "default"
},
"GetMetrics": {
"retry_codes_name": "non_idempotent",
"retry_params_name": "default"
}

@@ -59,0 +67,0 @@ }

@@ -122,2 +122,8 @@ /// <reference types="node" />

deleteKey(request: protos.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest | null | undefined, {} | null | undefined>): void;
migrateKey(request?: protos.google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest, options?: CallOptions): Promise<[protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest | undefined, {} | undefined]>;
migrateKey(request: protos.google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest, options: CallOptions, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest | null | undefined, {} | null | undefined>): void;
migrateKey(request: protos.google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest | null | undefined, {} | null | undefined>): void;
getMetrics(request?: protos.google.cloud.recaptchaenterprise.v1.IGetMetricsRequest, options?: CallOptions): Promise<[protos.google.cloud.recaptchaenterprise.v1.IMetrics, protos.google.cloud.recaptchaenterprise.v1.IGetMetricsRequest | undefined, {} | undefined]>;
getMetrics(request: protos.google.cloud.recaptchaenterprise.v1.IGetMetricsRequest, options: CallOptions, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IMetrics, protos.google.cloud.recaptchaenterprise.v1.IGetMetricsRequest | null | undefined, {} | null | undefined>): void;
getMetrics(request: protos.google.cloud.recaptchaenterprise.v1.IGetMetricsRequest, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IMetrics, protos.google.cloud.recaptchaenterprise.v1.IGetMetricsRequest | null | undefined, {} | null | undefined>): void;
listKeys(request?: protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, options?: CallOptions): Promise<[protos.google.cloud.recaptchaenterprise.v1.IKey[], protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest | null, protos.google.cloud.recaptchaenterprise.v1.IListKeysResponse]>;

@@ -233,2 +239,26 @@ listKeys(request: protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, protos.google.cloud.recaptchaenterprise.v1.IListKeysResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IKey>): void;

/**
* Return a fully-qualified metrics resource name string.
*
* @param {string} project
* @param {string} key
* @returns {string} Resource name string.
*/
metricsPath(project: string, key: string): string;
/**
* Parse the project from Metrics resource.
*
* @param {string} metricsName
* A fully-qualified path representing Metrics resource.
* @returns {string} A string representing the project.
*/
matchProjectFromMetricsName(metricsName: string): string | number;
/**
* Parse the key from Metrics resource.
*
* @param {string} metricsName
* A fully-qualified path representing Metrics resource.
* @returns {string} A string representing the key.
*/
matchKeyFromMetricsName(metricsName: string): string | number;
/**
* Return a fully-qualified project resource name string.

@@ -235,0 +265,0 @@ *

130

build/src/v1/recaptcha_enterprise_service_client.js

@@ -134,2 +134,3 @@ "use strict";

keyPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/keys/{key}'),
metricsPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/keys/{key}/metrics'),
projectPathTemplate: new this._gaxModule.PathTemplate('projects/{project}'),

@@ -185,2 +186,4 @@ };

'deleteKey',
'migrateKey',
'getMetrics',
];

@@ -286,3 +289,3 @@ for (const methodName of recaptchaEnterpriseServiceStubMethods) {

* Annotates a previously created Assessment to provide additional information
* on whether the event turned out to be authentic or fradulent.
* on whether the event turned out to be authentic or fraudulent.
*

@@ -294,4 +297,8 @@ * @param {Object} request

* "projects/{project}/assessments/{assessment}".
* @param {google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation} request.annotation
* Required. The annotation that will be assigned to the Event.
* @param {google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation} [request.annotation]
* Optional. The annotation that will be assigned to the Event. This field can be left
* empty to provide reasons that apply to an event without concluding whether
* the event is legitimate or fraudulent.
* @param {number[]} [request.reasons]
* Optional. Optional reasons for the annotation that will be assigned to the Event.
* @param {object} [options]

@@ -413,3 +420,3 @@ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.

* @param {google.protobuf.FieldMask} [request.updateMask]
* Optional. The mask to control which field of the key get updated. If the mask is not
* Optional. The mask to control which fields of the key get updated. If the mask is not
* present, all fields will be updated.

@@ -485,2 +492,84 @@ * @param {object} [options]

/**
* Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise.
* Once a key is migrated, it can be used from either product. SiteVerify
* requests are billed as CreateAssessment calls. You must be
* authenticated as one of the current owners of the reCAPTCHA Site Key, and
* your user must have the reCAPTCHA Enterprise Admin IAM role in the
* destination project.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The name of the key to be migrated, in the format
* "projects/{project}/keys/{key}".
* @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 [Key]{@link google.cloud.recaptchaenterprise.v1.Key}.
* 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.migrateKey(request);
*/
migrateKey(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
return this.innerApiCalls.migrateKey(request, options, callback);
}
/**
* Get some aggregated metrics for a Key. This data can be used to build
* dashboards.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The name of the requested metrics, in the format
* "projects/{project}/keys/{key}/metrics".
* @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 [Metrics]{@link google.cloud.recaptchaenterprise.v1.Metrics}.
* 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.getMetrics(request);
*/
getMetrics(request, optionsOrCallback, callback) {
request = request || {};
let options;
if (typeof optionsOrCallback === 'function' && callback === undefined) {
callback = optionsOrCallback;
options = {};
}
else {
options = optionsOrCallback;
}
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
return this.innerApiCalls.getMetrics(request, options, callback);
}
/**
* Returns the list of all keys that belong to a project.

@@ -687,2 +776,35 @@ *

/**
* Return a fully-qualified metrics resource name string.
*
* @param {string} project
* @param {string} key
* @returns {string} Resource name string.
*/
metricsPath(project, key) {
return this.pathTemplates.metricsPathTemplate.render({
project: project,
key: key,
});
}
/**
* Parse the project from Metrics resource.
*
* @param {string} metricsName
* A fully-qualified path representing Metrics resource.
* @returns {string} A string representing the project.
*/
matchProjectFromMetricsName(metricsName) {
return this.pathTemplates.metricsPathTemplate.match(metricsName).project;
}
/**
* Parse the key from Metrics resource.
*
* @param {string} metricsName
* A fully-qualified path representing Metrics resource.
* @returns {string} A string representing the key.
*/
matchKeyFromMetricsName(metricsName) {
return this.pathTemplates.metricsPathTemplate.match(metricsName).key;
}
/**
* Return a fully-qualified project resource name string.

@@ -689,0 +811,0 @@ *

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

## [2.3.0](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v2.2.1...v2.3.0) (2021-09-16)
### Features
* add GetMetrics and MigrateKey methods to reCAPTCHA enterprise API ([#318](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/318)) ([55b1adc](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/55b1adc261879db1b073f3ad9cd3453c09d1e8d8))
### [2.2.1](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v2.2.0...v2.2.1) (2021-09-09)

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

2

package.json
{
"repository": "googleapis/nodejs-recaptcha-enterprise",
"name": "@google-cloud/recaptcha-enterprise",
"version": "2.2.1",
"version": "2.3.0",
"author": "Google LLC",

@@ -6,0 +6,0 @@ "description": "reCAPTCHA Enterprise API client for Node.js",

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 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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc