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 1.8.0 to 2.0.0

6

build/src/index.d.ts

@@ -0,10 +1,8 @@

import * as v1 from './v1';
import * as v1beta1 from './v1beta1';
import * as v1 from './v1';
declare const RecaptchaEnterpriseServiceV1Beta1Client: typeof v1beta1.RecaptchaEnterpriseServiceV1Beta1Client;
declare const RecaptchaEnterpriseServiceClient: typeof v1.RecaptchaEnterpriseServiceClient;
export { v1, v1beta1, RecaptchaEnterpriseServiceV1Beta1Client, RecaptchaEnterpriseServiceClient, };
export { v1, v1beta1, RecaptchaEnterpriseServiceClient };
declare const _default: {
v1: typeof v1;
v1beta1: typeof v1beta1;
RecaptchaEnterpriseServiceV1Beta1Client: typeof v1beta1.RecaptchaEnterpriseServiceV1Beta1Client;
RecaptchaEnterpriseServiceClient: typeof v1.RecaptchaEnterpriseServiceClient;

@@ -11,0 +9,0 @@ };

"use strict";
// Copyright 2019 Google LLC
// Copyright 2020 Google LLC
//

@@ -16,24 +16,16 @@ // Licensed under the Apache License, Version 2.0 (the "License");

//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** This file is automatically generated by synthtool. **
// ** https://github.com/googleapis/synthtool **
// ** All changes to this file may be overwritten. **
Object.defineProperty(exports, "__esModule", { value: true });
exports.protos = exports.RecaptchaEnterpriseServiceClient = exports.v1beta1 = exports.v1 = void 0;
const v1 = require("./v1");
exports.v1 = v1;
const v1beta1 = require("./v1beta1");
exports.v1beta1 = v1beta1;
const v1 = require("./v1");
exports.v1 = v1;
const RecaptchaEnterpriseServiceV1Beta1Client = v1beta1.RecaptchaEnterpriseServiceV1Beta1Client;
exports.RecaptchaEnterpriseServiceV1Beta1Client = RecaptchaEnterpriseServiceV1Beta1Client;
const RecaptchaEnterpriseServiceClient = v1.RecaptchaEnterpriseServiceClient;
exports.RecaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient;
// For compatibility with JavaScript libraries we need to provide this default export:
// tslint:disable-next-line no-default-export
exports.default = {
v1,
v1beta1,
RecaptchaEnterpriseServiceV1Beta1Client,
RecaptchaEnterpriseServiceClient,
};
exports.default = { v1, v1beta1, RecaptchaEnterpriseServiceClient };
const protos = require("../protos/protos");
exports.protos = protos;
//# sourceMappingURL=index.js.map

@@ -21,3 +21,3 @@ "use strict";

var recaptcha_enterprise_service_client_1 = require("./recaptcha_enterprise_service_client");
exports.RecaptchaEnterpriseServiceClient = recaptcha_enterprise_service_client_1.RecaptchaEnterpriseServiceClient;
Object.defineProperty(exports, "RecaptchaEnterpriseServiceClient", { enumerable: true, get: function () { return recaptcha_enterprise_service_client_1.RecaptchaEnterpriseServiceClient; } });
//# sourceMappingURL=index.js.map
/// <reference types="node" />
import * as gax from 'google-gax';
import { Callback, ClientOptions } from 'google-gax';
import { Callback, Descriptors, ClientOptions, PaginationCallback } from 'google-gax';
import { Transform } from 'stream';
import * as protosTypes from '../../protos/protos';
import * as protos from '../../protos/protos';
/**

@@ -12,5 +12,2 @@ * Service to determine the likelihood an event is legitimate.

export declare class RecaptchaEnterpriseServiceClient {
private _descriptors;
private _innerApiCalls;
private _pathTemplates;
private _terminated;

@@ -23,2 +20,9 @@ private _opts;

auth: gax.GoogleAuth;
descriptors: Descriptors;
innerApiCalls: {
[name: string]: Function;
};
pathTemplates: {
[name: string]: gax.PathTemplate;
};
recaptchaEnterpriseServiceStub?: Promise<{

@@ -87,16 +91,23 @@ [name: string]: Function;

getProjectId(callback: Callback<string, undefined, undefined>): void;
createAssessment(request: protosTypes.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.recaptchaenterprise.v1.IAssessment, (protosTypes.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest | undefined), {} | undefined]>;
createAssessment(request: protosTypes.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.recaptchaenterprise.v1.IAssessment, protosTypes.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest | undefined, {} | undefined>): void;
annotateAssessment(request: protosTypes.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentResponse, (protosTypes.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest | undefined), {} | undefined]>;
annotateAssessment(request: protosTypes.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentResponse, protosTypes.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest | undefined, {} | undefined>): void;
createKey(request: protosTypes.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.recaptchaenterprise.v1.IKey, (protosTypes.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest | undefined), {} | undefined]>;
createKey(request: protosTypes.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.recaptchaenterprise.v1.IKey, protosTypes.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest | undefined, {} | undefined>): void;
getKey(request: protosTypes.google.cloud.recaptchaenterprise.v1.IGetKeyRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.recaptchaenterprise.v1.IKey, (protosTypes.google.cloud.recaptchaenterprise.v1.IGetKeyRequest | undefined), {} | undefined]>;
getKey(request: protosTypes.google.cloud.recaptchaenterprise.v1.IGetKeyRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.recaptchaenterprise.v1.IKey, protosTypes.google.cloud.recaptchaenterprise.v1.IGetKeyRequest | undefined, {} | undefined>): void;
updateKey(request: protosTypes.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.recaptchaenterprise.v1.IKey, (protosTypes.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest | undefined), {} | undefined]>;
updateKey(request: protosTypes.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.recaptchaenterprise.v1.IKey, protosTypes.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest | undefined, {} | undefined>): void;
deleteKey(request: protosTypes.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest, options?: gax.CallOptions): Promise<[protosTypes.google.protobuf.IEmpty, (protosTypes.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest | undefined), {} | undefined]>;
deleteKey(request: protosTypes.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.protobuf.IEmpty, protosTypes.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest | undefined, {} | undefined>): void;
listKeys(request: protosTypes.google.cloud.recaptchaenterprise.v1.IListKeysRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.recaptchaenterprise.v1.IKey[], protosTypes.google.cloud.recaptchaenterprise.v1.IListKeysRequest | null, protosTypes.google.cloud.recaptchaenterprise.v1.IListKeysResponse]>;
listKeys(request: protosTypes.google.cloud.recaptchaenterprise.v1.IListKeysRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.recaptchaenterprise.v1.IKey[], protosTypes.google.cloud.recaptchaenterprise.v1.IListKeysRequest | null, protosTypes.google.cloud.recaptchaenterprise.v1.IListKeysResponse>): void;
createAssessment(request: protos.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.recaptchaenterprise.v1.IAssessment, (protos.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest | undefined), {} | undefined]>;
createAssessment(request: protos.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IAssessment, protos.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest | null | undefined, {} | null | undefined>): void;
createAssessment(request: protos.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IAssessment, protos.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest | null | undefined, {} | null | undefined>): void;
annotateAssessment(request: protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentResponse, (protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest | undefined), {} | undefined]>;
annotateAssessment(request: protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentResponse, protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest | null | undefined, {} | null | undefined>): void;
annotateAssessment(request: protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentResponse, protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest | null | undefined, {} | null | undefined>): void;
createKey(request: protos.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest | undefined, {} | undefined]>;
createKey(request: protos.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest | null | undefined, {} | null | undefined>): void;
createKey(request: protos.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest | null | undefined, {} | null | undefined>): void;
getKey(request: protos.google.cloud.recaptchaenterprise.v1.IGetKeyRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IGetKeyRequest | undefined, {} | undefined]>;
getKey(request: protos.google.cloud.recaptchaenterprise.v1.IGetKeyRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IGetKeyRequest | null | undefined, {} | null | undefined>): void;
getKey(request: protos.google.cloud.recaptchaenterprise.v1.IGetKeyRequest, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IGetKeyRequest | null | undefined, {} | null | undefined>): void;
updateKey(request: protos.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest | undefined, {} | undefined]>;
updateKey(request: protos.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest | null | undefined, {} | null | undefined>): void;
updateKey(request: protos.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest, callback: Callback<protos.google.cloud.recaptchaenterprise.v1.IKey, protos.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest | null | undefined, {} | null | undefined>): void;
deleteKey(request: protos.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest, options?: gax.CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest | undefined, {} | undefined]>;
deleteKey(request: protos.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest, options: gax.CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest | null | undefined, {} | null | undefined>): void;
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;
listKeys(request: protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.recaptchaenterprise.v1.IKey[], protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest | null, protos.google.cloud.recaptchaenterprise.v1.IListKeysResponse]>;
listKeys(request: protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, options: gax.CallOptions, callback: PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, protos.google.cloud.recaptchaenterprise.v1.IListKeysResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IKey>): void;
listKeys(request: protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, callback: PaginationCallback<protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, protos.google.cloud.recaptchaenterprise.v1.IListKeysResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1.IKey>): void;
/**

@@ -131,4 +142,26 @@ * Equivalent to {@link listKeys}, but returns a NodeJS Stream object.

*/
listKeysStream(request?: protosTypes.google.cloud.recaptchaenterprise.v1.IListKeysRequest, options?: gax.CallOptions): Transform;
listKeysStream(request?: protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, options?: gax.CallOptions): Transform;
/**
* Equivalent to {@link listKeys}, but returns an iterable object.
*
* for-await-of syntax is used with the iterable to recursively get response element on-demand.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The name of the project that contains the keys that will be
* listed, in the format "projects/{project}".
* @param {number} [request.pageSize]
* Optional. The maximum number of keys to return. Default is 10. Max limit is
* 1000.
* @param {string} [request.pageToken]
* Optional. The next_page_token value returned from a previous.
* ListKeysRequest, if any.
* @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 conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols.
*/
listKeysAsync(request?: protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, options?: gax.CallOptions): AsyncIterable<protos.google.cloud.recaptchaenterprise.v1.IKey>;
/**
* Return a fully-qualified assessment resource name string.

@@ -148,3 +181,3 @@ *

*/
matchProjectFromAssessmentName(assessmentName: string): string;
matchProjectFromAssessmentName(assessmentName: string): string | number;
/**

@@ -157,3 +190,3 @@ * Parse the assessment from Assessment resource.

*/
matchAssessmentFromAssessmentName(assessmentName: string): string;
matchAssessmentFromAssessmentName(assessmentName: string): string | number;
/**

@@ -174,3 +207,3 @@ * Return a fully-qualified key resource name string.

*/
matchProjectFromKeyName(keyName: string): string;
matchProjectFromKeyName(keyName: string): string | number;
/**

@@ -183,3 +216,3 @@ * Parse the key from Key resource.

*/
matchKeyFromKeyName(keyName: string): string;
matchKeyFromKeyName(keyName: string): string | number;
/**

@@ -199,3 +232,3 @@ * Return a fully-qualified project resource name string.

*/
matchProjectFromProjectName(projectName: string): string;
matchProjectFromProjectName(projectName: string): string | number;
/**

@@ -202,0 +235,0 @@ * Terminate the GRPC channel and close the client.

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.RecaptchaEnterpriseServiceClient = void 0;
const gax = require("google-gax");

@@ -57,3 +58,4 @@ const path = require("path");

constructor(opts) {
this._descriptors = {
this._terminated = false;
this.descriptors = {
page: {},

@@ -64,3 +66,2 @@ stream: {},

};
this._terminated = false;
// Ensure that options include the service address and port.

@@ -116,7 +117,10 @@ const staticMembers = this

const nodejsProtoPath = path.join(__dirname, '..', '..', 'protos', 'protos.json');
this._protos = this._gaxGrpc.loadProto(opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath);
this._protos = this._gaxGrpc.loadProto(opts.fallback
? // eslint-disable-next-line @typescript-eslint/no-var-requires
require('../../protos/protos.json')
: nodejsProtoPath);
// This API contains "path templates"; forward-slash-separated
// identifiers to uniquely identify resources within the API.
// Create useful helper objects for these.
this._pathTemplates = {
this.pathTemplates = {
assessmentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/assessments/{assessment}'),

@@ -129,3 +133,3 @@ keyPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/keys/{key}'),

// pages). Denote the keys used for pagination and results.
this._descriptors.page = {
this.descriptors.page = {
listKeys: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'keys'),

@@ -138,3 +142,3 @@ };

// merely providing the destination and request information.
this._innerApiCalls = {};
this.innerApiCalls = {};
}

@@ -161,3 +165,3 @@ /**

? this._protos.lookupService('google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService')
: // tslint:disable-next-line no-any
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
this._protos.google.cloud.recaptchaenterprise.v1

@@ -177,3 +181,3 @@ .RecaptchaEnterpriseService, this._opts);

for (const methodName of recaptchaEnterpriseServiceStubMethods) {
const innerCallPromise = this.recaptchaEnterpriseServiceStub.then(stub => (...args) => {
const callPromise = this.recaptchaEnterpriseServiceStub.then(stub => (...args) => {
if (this._terminated) {

@@ -187,8 +191,6 @@ return Promise.reject('The client has already been closed.');

});
const apiCall = this._gaxModule.createApiCall(innerCallPromise, this._defaults[methodName], this._descriptors.page[methodName] ||
this._descriptors.stream[methodName] ||
this._descriptors.longrunning[methodName]);
this._innerApiCalls[methodName] = (argument, callOptions, callback) => {
return apiCall(argument, callOptions, callback);
};
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], this.descriptors.page[methodName] ||
this.descriptors.stream[methodName] ||
this.descriptors.longrunning[methodName]);
this.innerApiCalls[methodName] = apiCall;
}

@@ -268,3 +270,3 @@ return this.recaptchaEnterpriseServiceStub;

this.initialize();
return this._innerApiCalls.createAssessment(request, options, callback);
return this.innerApiCalls.createAssessment(request, options, callback);
}

@@ -305,3 +307,3 @@ /**

this.initialize();
return this._innerApiCalls.annotateAssessment(request, options, callback);
return this.innerApiCalls.annotateAssessment(request, options, callback);
}

@@ -341,3 +343,3 @@ /**

this.initialize();
return this._innerApiCalls.createKey(request, options, callback);
return this.innerApiCalls.createKey(request, options, callback);
}

@@ -375,3 +377,3 @@ /**

this.initialize();
return this._innerApiCalls.getKey(request, options, callback);
return this.innerApiCalls.getKey(request, options, callback);
}

@@ -411,3 +413,3 @@ /**

this.initialize();
return this._innerApiCalls.updateKey(request, options, callback);
return this.innerApiCalls.updateKey(request, options, callback);
}

@@ -445,3 +447,3 @@ /**

this.initialize();
return this._innerApiCalls.deleteKey(request, options, callback);
return this.innerApiCalls.deleteKey(request, options, callback);
}

@@ -497,3 +499,3 @@ /**

this.initialize();
return this._innerApiCalls.listKeys(request, options, callback);
return this.innerApiCalls.listKeys(request, options, callback);
}

@@ -539,4 +541,38 @@ /**

this.initialize();
return this._descriptors.page.listKeys.createStream(this._innerApiCalls.listKeys, request, callSettings);
return this.descriptors.page.listKeys.createStream(this.innerApiCalls.listKeys, request, callSettings);
}
/**
* Equivalent to {@link listKeys}, but returns an iterable object.
*
* for-await-of syntax is used with the iterable to recursively get response element on-demand.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The name of the project that contains the keys that will be
* listed, in the format "projects/{project}".
* @param {number} [request.pageSize]
* Optional. The maximum number of keys to return. Default is 10. Max limit is
* 1000.
* @param {string} [request.pageToken]
* Optional. The next_page_token value returned from a previous.
* ListKeysRequest, if any.
* @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 conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols.
*/
listKeysAsync(request, options) {
request = request || {};
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({
parent: request.parent || '',
});
options = options || {};
const callSettings = new gax.CallSettings(options);
this.initialize();
return this.descriptors.page.listKeys.asyncIterate(this.innerApiCalls['listKeys'], request, callSettings);
}
// --------------------

@@ -553,5 +589,5 @@ // -- Path templates --

assessmentPath(project, assessment) {
return this._pathTemplates.assessmentPathTemplate.render({
project,
assessment,
return this.pathTemplates.assessmentPathTemplate.render({
project: project,
assessment: assessment,
});

@@ -567,3 +603,3 @@ }

matchProjectFromAssessmentName(assessmentName) {
return this._pathTemplates.assessmentPathTemplate.match(assessmentName)
return this.pathTemplates.assessmentPathTemplate.match(assessmentName)
.project;

@@ -579,3 +615,3 @@ }

matchAssessmentFromAssessmentName(assessmentName) {
return this._pathTemplates.assessmentPathTemplate.match(assessmentName)
return this.pathTemplates.assessmentPathTemplate.match(assessmentName)
.assessment;

@@ -591,5 +627,5 @@ }

keyPath(project, key) {
return this._pathTemplates.keyPathTemplate.render({
project,
key,
return this.pathTemplates.keyPathTemplate.render({
project: project,
key: key,
});

@@ -605,3 +641,3 @@ }

matchProjectFromKeyName(keyName) {
return this._pathTemplates.keyPathTemplate.match(keyName).project;
return this.pathTemplates.keyPathTemplate.match(keyName).project;
}

@@ -616,3 +652,3 @@ /**

matchKeyFromKeyName(keyName) {
return this._pathTemplates.keyPathTemplate.match(keyName).key;
return this.pathTemplates.keyPathTemplate.match(keyName).key;
}

@@ -626,4 +662,4 @@ /**

projectPath(project) {
return this._pathTemplates.projectPathTemplate.render({
project,
return this.pathTemplates.projectPathTemplate.render({
project: project,
});

@@ -639,3 +675,3 @@ }

matchProjectFromProjectName(projectName) {
return this._pathTemplates.projectPathTemplate.match(projectName).project;
return this.pathTemplates.projectPathTemplate.match(projectName).project;
}

@@ -642,0 +678,0 @@ /**

@@ -21,3 +21,3 @@ "use strict";

var recaptcha_enterprise_service_v1_beta1_client_1 = require("./recaptcha_enterprise_service_v1_beta1_client");
exports.RecaptchaEnterpriseServiceV1Beta1Client = recaptcha_enterprise_service_v1_beta1_client_1.RecaptchaEnterpriseServiceV1Beta1Client;
Object.defineProperty(exports, "RecaptchaEnterpriseServiceV1Beta1Client", { enumerable: true, get: function () { return recaptcha_enterprise_service_v1_beta1_client_1.RecaptchaEnterpriseServiceV1Beta1Client; } });
//# sourceMappingURL=index.js.map
/// <reference types="node" />
import * as gax from 'google-gax';
import { Callback, ClientOptions } from 'google-gax';
import { Callback, Descriptors, ClientOptions, PaginationCallback } from 'google-gax';
import { Transform } from 'stream';
import * as protosTypes from '../../protos/protos';
import * as protos from '../../protos/protos';
/**

@@ -12,5 +12,2 @@ * Service to determine the likelihood an event is legitimate.

export declare class RecaptchaEnterpriseServiceV1Beta1Client {
private _descriptors;
private _innerApiCalls;
private _pathTemplates;
private _terminated;

@@ -23,2 +20,9 @@ private _opts;

auth: gax.GoogleAuth;
descriptors: Descriptors;
innerApiCalls: {
[name: string]: Function;
};
pathTemplates: {
[name: string]: gax.PathTemplate;
};
recaptchaEnterpriseServiceV1Beta1Stub?: Promise<{

@@ -87,16 +91,23 @@ [name: string]: Function;

getProjectId(callback: Callback<string, undefined, undefined>): void;
createAssessment(request: protosTypes.google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.recaptchaenterprise.v1beta1.IAssessment, (protosTypes.google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest | undefined), {} | undefined]>;
createAssessment(request: protosTypes.google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.recaptchaenterprise.v1beta1.IAssessment, protosTypes.google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest | undefined, {} | undefined>): void;
annotateAssessment(request: protosTypes.google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentResponse, (protosTypes.google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest | undefined), {} | undefined]>;
annotateAssessment(request: protosTypes.google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentResponse, protosTypes.google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest | undefined, {} | undefined>): void;
createKey(request: protosTypes.google.cloud.recaptchaenterprise.v1beta1.ICreateKeyRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.recaptchaenterprise.v1beta1.IKey, (protosTypes.google.cloud.recaptchaenterprise.v1beta1.ICreateKeyRequest | undefined), {} | undefined]>;
createKey(request: protosTypes.google.cloud.recaptchaenterprise.v1beta1.ICreateKeyRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.recaptchaenterprise.v1beta1.IKey, protosTypes.google.cloud.recaptchaenterprise.v1beta1.ICreateKeyRequest | undefined, {} | undefined>): void;
getKey(request: protosTypes.google.cloud.recaptchaenterprise.v1beta1.IGetKeyRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.recaptchaenterprise.v1beta1.IKey, (protosTypes.google.cloud.recaptchaenterprise.v1beta1.IGetKeyRequest | undefined), {} | undefined]>;
getKey(request: protosTypes.google.cloud.recaptchaenterprise.v1beta1.IGetKeyRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.recaptchaenterprise.v1beta1.IKey, protosTypes.google.cloud.recaptchaenterprise.v1beta1.IGetKeyRequest | undefined, {} | undefined>): void;
updateKey(request: protosTypes.google.cloud.recaptchaenterprise.v1beta1.IUpdateKeyRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.recaptchaenterprise.v1beta1.IKey, (protosTypes.google.cloud.recaptchaenterprise.v1beta1.IUpdateKeyRequest | undefined), {} | undefined]>;
updateKey(request: protosTypes.google.cloud.recaptchaenterprise.v1beta1.IUpdateKeyRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.recaptchaenterprise.v1beta1.IKey, protosTypes.google.cloud.recaptchaenterprise.v1beta1.IUpdateKeyRequest | undefined, {} | undefined>): void;
deleteKey(request: protosTypes.google.cloud.recaptchaenterprise.v1beta1.IDeleteKeyRequest, options?: gax.CallOptions): Promise<[protosTypes.google.protobuf.IEmpty, (protosTypes.google.cloud.recaptchaenterprise.v1beta1.IDeleteKeyRequest | undefined), {} | undefined]>;
deleteKey(request: protosTypes.google.cloud.recaptchaenterprise.v1beta1.IDeleteKeyRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.protobuf.IEmpty, protosTypes.google.cloud.recaptchaenterprise.v1beta1.IDeleteKeyRequest | undefined, {} | undefined>): void;
listKeys(request: protosTypes.google.cloud.recaptchaenterprise.v1beta1.IListKeysRequest, options?: gax.CallOptions): Promise<[protosTypes.google.cloud.recaptchaenterprise.v1beta1.IKey[], protosTypes.google.cloud.recaptchaenterprise.v1beta1.IListKeysRequest | null, protosTypes.google.cloud.recaptchaenterprise.v1beta1.IListKeysResponse]>;
listKeys(request: protosTypes.google.cloud.recaptchaenterprise.v1beta1.IListKeysRequest, options: gax.CallOptions, callback: Callback<protosTypes.google.cloud.recaptchaenterprise.v1beta1.IKey[], protosTypes.google.cloud.recaptchaenterprise.v1beta1.IListKeysRequest | null, protosTypes.google.cloud.recaptchaenterprise.v1beta1.IListKeysResponse>): void;
createAssessment(request: protos.google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.recaptchaenterprise.v1beta1.IAssessment, (protos.google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest | undefined), {} | undefined]>;
createAssessment(request: protos.google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.recaptchaenterprise.v1beta1.IAssessment, protos.google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest | null | undefined, {} | null | undefined>): void;
createAssessment(request: protos.google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest, callback: Callback<protos.google.cloud.recaptchaenterprise.v1beta1.IAssessment, protos.google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest | null | undefined, {} | null | undefined>): void;
annotateAssessment(request: protos.google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentResponse, (protos.google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest | undefined), {} | undefined]>;
annotateAssessment(request: protos.google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentResponse, protos.google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest | null | undefined, {} | null | undefined>): void;
annotateAssessment(request: protos.google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest, callback: Callback<protos.google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentResponse, protos.google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest | null | undefined, {} | null | undefined>): void;
createKey(request: protos.google.cloud.recaptchaenterprise.v1beta1.ICreateKeyRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.recaptchaenterprise.v1beta1.IKey, (protos.google.cloud.recaptchaenterprise.v1beta1.ICreateKeyRequest | undefined), {} | undefined]>;
createKey(request: protos.google.cloud.recaptchaenterprise.v1beta1.ICreateKeyRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.recaptchaenterprise.v1beta1.IKey, protos.google.cloud.recaptchaenterprise.v1beta1.ICreateKeyRequest | null | undefined, {} | null | undefined>): void;
createKey(request: protos.google.cloud.recaptchaenterprise.v1beta1.ICreateKeyRequest, callback: Callback<protos.google.cloud.recaptchaenterprise.v1beta1.IKey, protos.google.cloud.recaptchaenterprise.v1beta1.ICreateKeyRequest | null | undefined, {} | null | undefined>): void;
getKey(request: protos.google.cloud.recaptchaenterprise.v1beta1.IGetKeyRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.recaptchaenterprise.v1beta1.IKey, (protos.google.cloud.recaptchaenterprise.v1beta1.IGetKeyRequest | undefined), {} | undefined]>;
getKey(request: protos.google.cloud.recaptchaenterprise.v1beta1.IGetKeyRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.recaptchaenterprise.v1beta1.IKey, protos.google.cloud.recaptchaenterprise.v1beta1.IGetKeyRequest | null | undefined, {} | null | undefined>): void;
getKey(request: protos.google.cloud.recaptchaenterprise.v1beta1.IGetKeyRequest, callback: Callback<protos.google.cloud.recaptchaenterprise.v1beta1.IKey, protos.google.cloud.recaptchaenterprise.v1beta1.IGetKeyRequest | null | undefined, {} | null | undefined>): void;
updateKey(request: protos.google.cloud.recaptchaenterprise.v1beta1.IUpdateKeyRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.recaptchaenterprise.v1beta1.IKey, (protos.google.cloud.recaptchaenterprise.v1beta1.IUpdateKeyRequest | undefined), {} | undefined]>;
updateKey(request: protos.google.cloud.recaptchaenterprise.v1beta1.IUpdateKeyRequest, options: gax.CallOptions, callback: Callback<protos.google.cloud.recaptchaenterprise.v1beta1.IKey, protos.google.cloud.recaptchaenterprise.v1beta1.IUpdateKeyRequest | null | undefined, {} | null | undefined>): void;
updateKey(request: protos.google.cloud.recaptchaenterprise.v1beta1.IUpdateKeyRequest, callback: Callback<protos.google.cloud.recaptchaenterprise.v1beta1.IKey, protos.google.cloud.recaptchaenterprise.v1beta1.IUpdateKeyRequest | null | undefined, {} | null | undefined>): void;
deleteKey(request: protos.google.cloud.recaptchaenterprise.v1beta1.IDeleteKeyRequest, options?: gax.CallOptions): Promise<[protos.google.protobuf.IEmpty, (protos.google.cloud.recaptchaenterprise.v1beta1.IDeleteKeyRequest | undefined), {} | undefined]>;
deleteKey(request: protos.google.cloud.recaptchaenterprise.v1beta1.IDeleteKeyRequest, options: gax.CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.recaptchaenterprise.v1beta1.IDeleteKeyRequest | null | undefined, {} | null | undefined>): void;
deleteKey(request: protos.google.cloud.recaptchaenterprise.v1beta1.IDeleteKeyRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.recaptchaenterprise.v1beta1.IDeleteKeyRequest | null | undefined, {} | null | undefined>): void;
listKeys(request: protos.google.cloud.recaptchaenterprise.v1beta1.IListKeysRequest, options?: gax.CallOptions): Promise<[protos.google.cloud.recaptchaenterprise.v1beta1.IKey[], protos.google.cloud.recaptchaenterprise.v1beta1.IListKeysRequest | null, protos.google.cloud.recaptchaenterprise.v1beta1.IListKeysResponse]>;
listKeys(request: protos.google.cloud.recaptchaenterprise.v1beta1.IListKeysRequest, options: gax.CallOptions, callback: PaginationCallback<protos.google.cloud.recaptchaenterprise.v1beta1.IListKeysRequest, protos.google.cloud.recaptchaenterprise.v1beta1.IListKeysResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1beta1.IKey>): void;
listKeys(request: protos.google.cloud.recaptchaenterprise.v1beta1.IListKeysRequest, callback: PaginationCallback<protos.google.cloud.recaptchaenterprise.v1beta1.IListKeysRequest, protos.google.cloud.recaptchaenterprise.v1beta1.IListKeysResponse | null | undefined, protos.google.cloud.recaptchaenterprise.v1beta1.IKey>): void;
/**

@@ -131,4 +142,26 @@ * Equivalent to {@link listKeys}, but returns a NodeJS Stream object.

*/
listKeysStream(request?: protosTypes.google.cloud.recaptchaenterprise.v1beta1.IListKeysRequest, options?: gax.CallOptions): Transform;
listKeysStream(request?: protos.google.cloud.recaptchaenterprise.v1beta1.IListKeysRequest, options?: gax.CallOptions): Transform;
/**
* Equivalent to {@link listKeys}, but returns an iterable object.
*
* for-await-of syntax is used with the iterable to recursively get response element on-demand.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The name of the project that contains the keys that will be
* listed, in the format "projects/{project_number}".
* @param {number} [request.pageSize]
* Optional. The maximum number of keys to return. Default is 10. Max limit is
* 1000.
* @param {string} [request.pageToken]
* Optional. The next_page_token value returned from a previous.
* ListKeysRequest, if any.
* @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 conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols.
*/
listKeysAsync(request?: protos.google.cloud.recaptchaenterprise.v1beta1.IListKeysRequest, options?: gax.CallOptions): AsyncIterable<protos.google.cloud.recaptchaenterprise.v1beta1.IKey>;
/**
* Return a fully-qualified assessment resource name string.

@@ -148,3 +181,3 @@ *

*/
matchProjectFromAssessmentName(assessmentName: string): string;
matchProjectFromAssessmentName(assessmentName: string): string | number;
/**

@@ -157,3 +190,3 @@ * Parse the assessment from Assessment resource.

*/
matchAssessmentFromAssessmentName(assessmentName: string): string;
matchAssessmentFromAssessmentName(assessmentName: string): string | number;
/**

@@ -174,3 +207,3 @@ * Return a fully-qualified key resource name string.

*/
matchProjectFromKeyName(keyName: string): string;
matchProjectFromKeyName(keyName: string): string | number;
/**

@@ -183,3 +216,3 @@ * Parse the key from Key resource.

*/
matchKeyFromKeyName(keyName: string): string;
matchKeyFromKeyName(keyName: string): string | number;
/**

@@ -199,3 +232,3 @@ * Return a fully-qualified project resource name string.

*/
matchProjectFromProjectName(projectName: string): string;
matchProjectFromProjectName(projectName: string): string | number;
/**

@@ -202,0 +235,0 @@ * Terminate the GRPC channel and close the client.

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.RecaptchaEnterpriseServiceV1Beta1Client = void 0;
const gax = require("google-gax");

@@ -57,3 +58,4 @@ const path = require("path");

constructor(opts) {
this._descriptors = {
this._terminated = false;
this.descriptors = {
page: {},

@@ -64,3 +66,2 @@ stream: {},

};
this._terminated = false;
// Ensure that options include the service address and port.

@@ -116,7 +117,10 @@ const staticMembers = this

const nodejsProtoPath = path.join(__dirname, '..', '..', 'protos', 'protos.json');
this._protos = this._gaxGrpc.loadProto(opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath);
this._protos = this._gaxGrpc.loadProto(opts.fallback
? // eslint-disable-next-line @typescript-eslint/no-var-requires
require('../../protos/protos.json')
: nodejsProtoPath);
// This API contains "path templates"; forward-slash-separated
// identifiers to uniquely identify resources within the API.
// Create useful helper objects for these.
this._pathTemplates = {
this.pathTemplates = {
assessmentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/assessments/{assessment}'),

@@ -129,3 +133,3 @@ keyPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/keys/{key}'),

// pages). Denote the keys used for pagination and results.
this._descriptors.page = {
this.descriptors.page = {
listKeys: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'keys'),

@@ -138,3 +142,3 @@ };

// merely providing the destination and request information.
this._innerApiCalls = {};
this.innerApiCalls = {};
}

@@ -161,3 +165,3 @@ /**

? this._protos.lookupService('google.cloud.recaptchaenterprise.v1beta1.RecaptchaEnterpriseServiceV1Beta1')
: // tslint:disable-next-line no-any
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
this._protos.google.cloud.recaptchaenterprise.v1beta1

@@ -177,3 +181,3 @@ .RecaptchaEnterpriseServiceV1Beta1, this._opts);

for (const methodName of recaptchaEnterpriseServiceV1Beta1StubMethods) {
const innerCallPromise = this.recaptchaEnterpriseServiceV1Beta1Stub.then(stub => (...args) => {
const callPromise = this.recaptchaEnterpriseServiceV1Beta1Stub.then(stub => (...args) => {
if (this._terminated) {

@@ -187,8 +191,6 @@ return Promise.reject('The client has already been closed.');

});
const apiCall = this._gaxModule.createApiCall(innerCallPromise, this._defaults[methodName], this._descriptors.page[methodName] ||
this._descriptors.stream[methodName] ||
this._descriptors.longrunning[methodName]);
this._innerApiCalls[methodName] = (argument, callOptions, callback) => {
return apiCall(argument, callOptions, callback);
};
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], this.descriptors.page[methodName] ||
this.descriptors.stream[methodName] ||
this.descriptors.longrunning[methodName]);
this.innerApiCalls[methodName] = apiCall;
}

@@ -268,3 +270,3 @@ return this.recaptchaEnterpriseServiceV1Beta1Stub;

this.initialize();
return this._innerApiCalls.createAssessment(request, options, callback);
return this.innerApiCalls.createAssessment(request, options, callback);
}

@@ -305,3 +307,3 @@ /**

this.initialize();
return this._innerApiCalls.annotateAssessment(request, options, callback);
return this.innerApiCalls.annotateAssessment(request, options, callback);
}

@@ -341,3 +343,3 @@ /**

this.initialize();
return this._innerApiCalls.createKey(request, options, callback);
return this.innerApiCalls.createKey(request, options, callback);
}

@@ -375,3 +377,3 @@ /**

this.initialize();
return this._innerApiCalls.getKey(request, options, callback);
return this.innerApiCalls.getKey(request, options, callback);
}

@@ -411,3 +413,3 @@ /**

this.initialize();
return this._innerApiCalls.updateKey(request, options, callback);
return this.innerApiCalls.updateKey(request, options, callback);
}

@@ -445,3 +447,3 @@ /**

this.initialize();
return this._innerApiCalls.deleteKey(request, options, callback);
return this.innerApiCalls.deleteKey(request, options, callback);
}

@@ -497,3 +499,3 @@ /**

this.initialize();
return this._innerApiCalls.listKeys(request, options, callback);
return this.innerApiCalls.listKeys(request, options, callback);
}

@@ -539,4 +541,38 @@ /**

this.initialize();
return this._descriptors.page.listKeys.createStream(this._innerApiCalls.listKeys, request, callSettings);
return this.descriptors.page.listKeys.createStream(this.innerApiCalls.listKeys, request, callSettings);
}
/**
* Equivalent to {@link listKeys}, but returns an iterable object.
*
* for-await-of syntax is used with the iterable to recursively get response element on-demand.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The name of the project that contains the keys that will be
* listed, in the format "projects/{project_number}".
* @param {number} [request.pageSize]
* Optional. The maximum number of keys to return. Default is 10. Max limit is
* 1000.
* @param {string} [request.pageToken]
* Optional. The next_page_token value returned from a previous.
* ListKeysRequest, if any.
* @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 conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols.
*/
listKeysAsync(request, options) {
request = request || {};
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({
parent: request.parent || '',
});
options = options || {};
const callSettings = new gax.CallSettings(options);
this.initialize();
return this.descriptors.page.listKeys.asyncIterate(this.innerApiCalls['listKeys'], request, callSettings);
}
// --------------------

@@ -553,5 +589,5 @@ // -- Path templates --

assessmentPath(project, assessment) {
return this._pathTemplates.assessmentPathTemplate.render({
project,
assessment,
return this.pathTemplates.assessmentPathTemplate.render({
project: project,
assessment: assessment,
});

@@ -567,3 +603,3 @@ }

matchProjectFromAssessmentName(assessmentName) {
return this._pathTemplates.assessmentPathTemplate.match(assessmentName)
return this.pathTemplates.assessmentPathTemplate.match(assessmentName)
.project;

@@ -579,3 +615,3 @@ }

matchAssessmentFromAssessmentName(assessmentName) {
return this._pathTemplates.assessmentPathTemplate.match(assessmentName)
return this.pathTemplates.assessmentPathTemplate.match(assessmentName)
.assessment;

@@ -591,5 +627,5 @@ }

keyPath(project, key) {
return this._pathTemplates.keyPathTemplate.render({
project,
key,
return this.pathTemplates.keyPathTemplate.render({
project: project,
key: key,
});

@@ -605,3 +641,3 @@ }

matchProjectFromKeyName(keyName) {
return this._pathTemplates.keyPathTemplate.match(keyName).project;
return this.pathTemplates.keyPathTemplate.match(keyName).project;
}

@@ -616,3 +652,3 @@ /**

matchKeyFromKeyName(keyName) {
return this._pathTemplates.keyPathTemplate.match(keyName).key;
return this.pathTemplates.keyPathTemplate.match(keyName).key;
}

@@ -626,4 +662,4 @@ /**

projectPath(project) {
return this._pathTemplates.projectPathTemplate.render({
project,
return this.pathTemplates.projectPathTemplate.render({
project: project,
});

@@ -639,3 +675,3 @@ }

matchProjectFromProjectName(projectName) {
return this._pathTemplates.projectPathTemplate.match(projectName).project;
return this.pathTemplates.projectPathTemplate.match(projectName).project;
}

@@ -642,0 +678,0 @@ /**

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

## [2.0.0](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v1.8.0...v2.0.0) (2020-05-12)
### ⚠ BREAKING CHANGES
* Remove RecaptchaEnterpriseServiceV1Beta1Client.
* The library now supports Node.js v10+. The last version to support Node.js v8 is tagged legacy-8 on NPM.
### Features
* drop node8 support, support for async iterators ([#145](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/145)) ([cc4cc51](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/cc4cc51ec7b1ff8d5078b8524a9e7240639d72c3))
### Bug Fixes
* export explicit version from protos.js ([#150](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/150)) ([0bfb3c7](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/0bfb3c74a6eaaa906ee34224675ea8dad2e5a055))
* regen protos and tests, formatting ([#169](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/169)) ([731fe3b](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/731fe3b8236478772a7cc311d0c26ee804080184))
* remove eslint, update gax, fix generated protos, run the generator ([#155](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/155)) ([21b09f5](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/21b09f555632c6f36d1a487ccac3567064077a49))
* synth.py clean up for multiple version ([#172](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/issues/172)) ([ee1c250](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/commit/ee1c2509b43b340a731aa98674ebceeab5ccdb2a))
## [1.8.0](https://www.github.com/googleapis/nodejs-recaptcha-enterprise/compare/v1.7.0...v1.8.0) (2020-03-25)

@@ -9,0 +29,0 @@

{
"repository": "googleapis/nodejs-recaptcha-enterprise",
"name": "@google-cloud/recaptcha-enterprise",
"version": "1.8.0",
"version": "2.0.0",
"author": "Google LLC",

@@ -28,3 +28,3 @@ "description": "reCAPTCHA Enterprise API client for Node.js",

"dependencies": {
"google-gax": "^1.9.0"
"google-gax": "^2.1.0"
},

@@ -34,8 +34,5 @@ "devDependencies": {

"@types/node": "^12.0.0",
"@types/sinon": "^9.0.0",
"c8": "^7.0.0",
"eslint": "^6.0.0",
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^3.0.0",
"gts": "^1.0.0",
"gts": "^2.0.0",
"jsdoc": "^3.6.2",

@@ -46,7 +43,7 @@ "jsdoc-fresh": "^1.0.1",

"mocha": "^7.0.0",
"null-loader": "^3.0.0",
"null-loader": "^4.0.0",
"pack-n-play": "^1.0.0-2",
"prettier": "^1.17.1",
"ts-loader": "^6.2.1",
"typescript": "^3.7.0",
"sinon": "^9.0.1",
"ts-loader": "^7.0.0",
"typescript": "^3.8.3",
"webpack": "^4.41.2",

@@ -56,3 +53,3 @@ "webpack-cli": "^3.3.10"

"scripts": {
"lint": "gts fix && eslint --fix samples/*.js",
"lint": "gts check",
"fix": "gts fix",

@@ -69,8 +66,9 @@ "samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../",

"prepare": "npm run compile",
"prelint": "cd samples; npm link ../; npm i"
"prelint": "cd samples; npm link ../; npm install",
"precompile": "gts clean"
},
"license": "Apache-2.0",
"engines": {
"node": ">=8.10.0"
"node": ">=10"
}
}

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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