From 8eb79dd2b9f1eb7d4848aef63bf3bf236928fc67 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 23 Nov 2020 13:31:28 -0800 Subject: [PATCH] fix(browser): check for fetch on window (#226) --- protos/protos.json | 146 ++++++++++++++++-- src/v1/recaptcha_enterprise_service_client.ts | 90 ++++++----- ...tcha_enterprise_service_v1_beta1_client.ts | 90 ++++++----- synth.metadata | 8 +- 4 files changed, 233 insertions(+), 101 deletions(-) diff --git a/protos/protos.json b/protos/protos.json index 199ef85..3c33b8d 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -31,7 +31,18 @@ "(google.api.http).post": "/v1/{parent=projects/*}/assessments", "(google.api.http).body": "assessment", "(google.api.method_signature)": "parent,assessment" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*}/assessments", + "body": "assessment" + } + }, + { + "(google.api.method_signature)": "parent,assessment" + } + ] }, "AnnotateAssessment": { "requestType": "AnnotateAssessmentRequest", @@ -40,7 +51,18 @@ "(google.api.http).post": "/v1/{name=projects/*/assessments/*}:annotate", "(google.api.http).body": "*", "(google.api.method_signature)": "name,annotation" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/assessments/*}:annotate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name,annotation" + } + ] }, "CreateKey": { "requestType": "CreateKeyRequest", @@ -48,21 +70,43 @@ "options": { "(google.api.http).post": "/v1/{parent=projects/*}/keys", "(google.api.http).body": "key" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*}/keys", + "body": "key" + } + } + ] }, "ListKeys": { "requestType": "ListKeysRequest", "responseType": "ListKeysResponse", "options": { "(google.api.http).get": "/v1/{parent=projects/*}/keys" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*}/keys" + } + } + ] }, "GetKey": { "requestType": "GetKeyRequest", "responseType": "Key", "options": { "(google.api.http).get": "/v1/{name=projects/*/keys/*}" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/keys/*}" + } + } + ] }, "UpdateKey": { "requestType": "UpdateKeyRequest", @@ -70,14 +114,29 @@ "options": { "(google.api.http).patch": "/v1/{key.name=projects/*/keys/*}", "(google.api.http).body": "key" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{key.name=projects/*/keys/*}", + "body": "key" + } + } + ] }, "DeleteKey": { "requestType": "DeleteKeyRequest", "responseType": "google.protobuf.Empty", "options": { "(google.api.http).delete": "/v1/{name=projects/*/keys/*}" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/keys/*}" + } + } + ] } } }, @@ -509,7 +568,18 @@ "(google.api.http).post": "/v1beta1/{parent=projects/*}/assessments", "(google.api.http).body": "assessment", "(google.api.method_signature)": "parent,assessment" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*}/assessments", + "body": "assessment" + } + }, + { + "(google.api.method_signature)": "parent,assessment" + } + ] }, "AnnotateAssessment": { "requestType": "AnnotateAssessmentRequest", @@ -518,7 +588,18 @@ "(google.api.http).post": "/v1beta1/{name=projects/*/assessments/*}:annotate", "(google.api.http).body": "*", "(google.api.method_signature)": "name,annotation" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/assessments/*}:annotate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name,annotation" + } + ] }, "CreateKey": { "requestType": "CreateKeyRequest", @@ -526,21 +607,43 @@ "options": { "(google.api.http).post": "/v1beta1/{parent=projects/*}/keys", "(google.api.http).body": "key" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*}/keys", + "body": "key" + } + } + ] }, "ListKeys": { "requestType": "ListKeysRequest", "responseType": "ListKeysResponse", "options": { "(google.api.http).get": "/v1beta1/{parent=projects/*}/keys" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*}/keys" + } + } + ] }, "GetKey": { "requestType": "GetKeyRequest", "responseType": "Key", "options": { "(google.api.http).get": "/v1beta1/{name=projects/*/keys/*}" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/keys/*}" + } + } + ] }, "UpdateKey": { "requestType": "UpdateKeyRequest", @@ -548,14 +651,29 @@ "options": { "(google.api.http).patch": "/v1beta1/{key.name=projects/*/keys/*}", "(google.api.http).body": "key" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta1/{key.name=projects/*/keys/*}", + "body": "key" + } + } + ] }, "DeleteKey": { "requestType": "DeleteKeyRequest", "responseType": "google.protobuf.Empty", "options": { "(google.api.http).delete": "/v1beta1/{name=projects/*/keys/*}" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/keys/*}" + } + } + ] } } }, diff --git a/src/v1/recaptcha_enterprise_service_client.ts b/src/v1/recaptcha_enterprise_service_client.ts index 7476f45..fac4270 100644 --- a/src/v1/recaptcha_enterprise_service_client.ts +++ b/src/v1/recaptcha_enterprise_service_client.ts @@ -16,6 +16,7 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** +/* global window */ import * as gax from 'google-gax'; import { Callback, @@ -30,6 +31,11 @@ import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; +/** + * Client JSON configuration object, loaded from + * `src/v1/recaptcha_enterprise_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './recaptcha_enterprise_service_client_config.json'; const version = require('../../../package.json').version; @@ -83,9 +89,9 @@ export class RecaptchaEnterpriseServiceClient { * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * 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. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. * In fallback mode, a special browser-compatible transport implementation is used * instead of gRPC transport. In browser context (if the `window` object is defined) * the fallback mode is enabled automatically; set `options.fallback` to `false` @@ -99,7 +105,9 @@ export class RecaptchaEnterpriseServiceClient { opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? typeof window !== 'undefined'; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); 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. @@ -318,7 +326,7 @@ export class RecaptchaEnterpriseServiceClient { // ------------------- createAssessment( request: protos.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.recaptchaenterprise.v1.IAssessment, @@ -331,7 +339,7 @@ export class RecaptchaEnterpriseServiceClient { >; createAssessment( request: protos.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.recaptchaenterprise.v1.IAssessment, | protos.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest @@ -373,7 +381,7 @@ export class RecaptchaEnterpriseServiceClient { createAssessment( request: protos.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.recaptchaenterprise.v1.IAssessment, | protos.google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest @@ -399,12 +407,12 @@ export class RecaptchaEnterpriseServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -419,7 +427,7 @@ export class RecaptchaEnterpriseServiceClient { } annotateAssessment( request: protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentResponse, @@ -432,7 +440,7 @@ export class RecaptchaEnterpriseServiceClient { >; annotateAssessment( request: protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentResponse, | protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest @@ -475,7 +483,7 @@ export class RecaptchaEnterpriseServiceClient { annotateAssessment( request: protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentResponse, | protos.google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest @@ -501,12 +509,12 @@ export class RecaptchaEnterpriseServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -521,7 +529,7 @@ export class RecaptchaEnterpriseServiceClient { } createKey( request: protos.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.recaptchaenterprise.v1.IKey, @@ -531,7 +539,7 @@ export class RecaptchaEnterpriseServiceClient { >; createKey( request: protos.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.recaptchaenterprise.v1.IKey, | protos.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest @@ -573,7 +581,7 @@ export class RecaptchaEnterpriseServiceClient { createKey( request: protos.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.recaptchaenterprise.v1.IKey, | protos.google.cloud.recaptchaenterprise.v1.ICreateKeyRequest @@ -596,12 +604,12 @@ export class RecaptchaEnterpriseServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -616,7 +624,7 @@ export class RecaptchaEnterpriseServiceClient { } getKey( request: protos.google.cloud.recaptchaenterprise.v1.IGetKeyRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.recaptchaenterprise.v1.IKey, @@ -626,7 +634,7 @@ export class RecaptchaEnterpriseServiceClient { >; getKey( request: protos.google.cloud.recaptchaenterprise.v1.IGetKeyRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.recaptchaenterprise.v1.IKey, | protos.google.cloud.recaptchaenterprise.v1.IGetKeyRequest @@ -666,7 +674,7 @@ export class RecaptchaEnterpriseServiceClient { getKey( request: protos.google.cloud.recaptchaenterprise.v1.IGetKeyRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.recaptchaenterprise.v1.IKey, | protos.google.cloud.recaptchaenterprise.v1.IGetKeyRequest @@ -689,12 +697,12 @@ export class RecaptchaEnterpriseServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -709,7 +717,7 @@ export class RecaptchaEnterpriseServiceClient { } updateKey( request: protos.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.recaptchaenterprise.v1.IKey, @@ -719,7 +727,7 @@ export class RecaptchaEnterpriseServiceClient { >; updateKey( request: protos.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.recaptchaenterprise.v1.IKey, | protos.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest @@ -761,7 +769,7 @@ export class RecaptchaEnterpriseServiceClient { updateKey( request: protos.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.recaptchaenterprise.v1.IKey, | protos.google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest @@ -784,12 +792,12 @@ export class RecaptchaEnterpriseServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -804,7 +812,7 @@ export class RecaptchaEnterpriseServiceClient { } deleteKey( request: protos.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -814,7 +822,7 @@ export class RecaptchaEnterpriseServiceClient { >; deleteKey( request: protos.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, | protos.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest @@ -854,7 +862,7 @@ export class RecaptchaEnterpriseServiceClient { deleteKey( request: protos.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, | protos.google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest @@ -877,12 +885,12 @@ export class RecaptchaEnterpriseServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -898,7 +906,7 @@ export class RecaptchaEnterpriseServiceClient { listKeys( request: protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.recaptchaenterprise.v1.IKey[], @@ -908,7 +916,7 @@ export class RecaptchaEnterpriseServiceClient { >; listKeys( request: protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, | protos.google.cloud.recaptchaenterprise.v1.IListKeysResponse @@ -957,7 +965,7 @@ export class RecaptchaEnterpriseServiceClient { listKeys( request: protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, | protos.google.cloud.recaptchaenterprise.v1.IListKeysResponse @@ -980,12 +988,12 @@ export class RecaptchaEnterpriseServiceClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1026,7 +1034,7 @@ export class RecaptchaEnterpriseServiceClient { */ listKeysStream( request?: protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1079,7 +1087,7 @@ export class RecaptchaEnterpriseServiceClient { */ listKeysAsync( request?: protos.google.cloud.recaptchaenterprise.v1.IListKeysRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; diff --git a/src/v1beta1/recaptcha_enterprise_service_v1_beta1_client.ts b/src/v1beta1/recaptcha_enterprise_service_v1_beta1_client.ts index c02a8bf..8e3b770 100644 --- a/src/v1beta1/recaptcha_enterprise_service_v1_beta1_client.ts +++ b/src/v1beta1/recaptcha_enterprise_service_v1_beta1_client.ts @@ -16,6 +16,7 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** +/* global window */ import * as gax from 'google-gax'; import { Callback, @@ -30,6 +31,11 @@ import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; +/** + * Client JSON configuration object, loaded from + * `src/v1beta1/recaptcha_enterprise_service_v1_beta1_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './recaptcha_enterprise_service_v1_beta1_client_config.json'; const version = require('../../../package.json').version; @@ -83,9 +89,9 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * 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. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. * In fallback mode, a special browser-compatible transport implementation is used * instead of gRPC transport. In browser context (if the `window` object is defined) * the fallback mode is enabled automatically; set `options.fallback` to `false` @@ -99,7 +105,9 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? typeof window !== 'undefined'; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); 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. @@ -318,7 +326,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { // ------------------- createAssessment( request: protos.google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.recaptchaenterprise.v1beta1.IAssessment, @@ -331,7 +339,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { >; createAssessment( request: protos.google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.recaptchaenterprise.v1beta1.IAssessment, | protos.google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest @@ -373,7 +381,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { createAssessment( request: protos.google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.recaptchaenterprise.v1beta1.IAssessment, | protos.google.cloud.recaptchaenterprise.v1beta1.ICreateAssessmentRequest @@ -399,12 +407,12 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -419,7 +427,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { } annotateAssessment( request: protos.google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentResponse, @@ -432,7 +440,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { >; annotateAssessment( request: protos.google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentResponse, | protos.google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest @@ -475,7 +483,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { annotateAssessment( request: protos.google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentResponse, | protos.google.cloud.recaptchaenterprise.v1beta1.IAnnotateAssessmentRequest @@ -501,12 +509,12 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -521,7 +529,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { } createKey( request: protos.google.cloud.recaptchaenterprise.v1beta1.ICreateKeyRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.recaptchaenterprise.v1beta1.IKey, @@ -534,7 +542,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { >; createKey( request: protos.google.cloud.recaptchaenterprise.v1beta1.ICreateKeyRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.recaptchaenterprise.v1beta1.IKey, | protos.google.cloud.recaptchaenterprise.v1beta1.ICreateKeyRequest @@ -576,7 +584,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { createKey( request: protos.google.cloud.recaptchaenterprise.v1beta1.ICreateKeyRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.recaptchaenterprise.v1beta1.IKey, | protos.google.cloud.recaptchaenterprise.v1beta1.ICreateKeyRequest @@ -602,12 +610,12 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -622,7 +630,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { } getKey( request: protos.google.cloud.recaptchaenterprise.v1beta1.IGetKeyRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.recaptchaenterprise.v1beta1.IKey, @@ -635,7 +643,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { >; getKey( request: protos.google.cloud.recaptchaenterprise.v1beta1.IGetKeyRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.recaptchaenterprise.v1beta1.IKey, | protos.google.cloud.recaptchaenterprise.v1beta1.IGetKeyRequest @@ -675,7 +683,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { getKey( request: protos.google.cloud.recaptchaenterprise.v1beta1.IGetKeyRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.recaptchaenterprise.v1beta1.IKey, | protos.google.cloud.recaptchaenterprise.v1beta1.IGetKeyRequest @@ -701,12 +709,12 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -721,7 +729,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { } updateKey( request: protos.google.cloud.recaptchaenterprise.v1beta1.IUpdateKeyRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.recaptchaenterprise.v1beta1.IKey, @@ -734,7 +742,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { >; updateKey( request: protos.google.cloud.recaptchaenterprise.v1beta1.IUpdateKeyRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.recaptchaenterprise.v1beta1.IKey, | protos.google.cloud.recaptchaenterprise.v1beta1.IUpdateKeyRequest @@ -776,7 +784,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { updateKey( request: protos.google.cloud.recaptchaenterprise.v1beta1.IUpdateKeyRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.recaptchaenterprise.v1beta1.IKey, | protos.google.cloud.recaptchaenterprise.v1beta1.IUpdateKeyRequest @@ -802,12 +810,12 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -822,7 +830,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { } deleteKey( request: protos.google.cloud.recaptchaenterprise.v1beta1.IDeleteKeyRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -835,7 +843,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { >; deleteKey( request: protos.google.cloud.recaptchaenterprise.v1beta1.IDeleteKeyRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, | protos.google.cloud.recaptchaenterprise.v1beta1.IDeleteKeyRequest @@ -875,7 +883,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { deleteKey( request: protos.google.cloud.recaptchaenterprise.v1beta1.IDeleteKeyRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, | protos.google.cloud.recaptchaenterprise.v1beta1.IDeleteKeyRequest @@ -901,12 +909,12 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -922,7 +930,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { listKeys( request: protos.google.cloud.recaptchaenterprise.v1beta1.IListKeysRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.recaptchaenterprise.v1beta1.IKey[], @@ -932,7 +940,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { >; listKeys( request: protos.google.cloud.recaptchaenterprise.v1beta1.IListKeysRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.cloud.recaptchaenterprise.v1beta1.IListKeysRequest, | protos.google.cloud.recaptchaenterprise.v1beta1.IListKeysResponse @@ -981,7 +989,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { listKeys( request: protos.google.cloud.recaptchaenterprise.v1beta1.IListKeysRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.cloud.recaptchaenterprise.v1beta1.IListKeysRequest, | protos.google.cloud.recaptchaenterprise.v1beta1.IListKeysResponse @@ -1004,12 +1012,12 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1050,7 +1058,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { */ listKeysStream( request?: protos.google.cloud.recaptchaenterprise.v1beta1.IListKeysRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1103,7 +1111,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { */ listKeysAsync( request?: protos.google.cloud.recaptchaenterprise.v1beta1.IListKeysRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; diff --git a/synth.metadata b/synth.metadata index 7164de1..5c370ce 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-recaptcha-enterprise.git", - "sha": "630d2aa2d0ac82055ce137c874bcf5998e3c4474" + "sha": "3c20aed6c6f2baf15cd6bbe3fdb1dfe2ba8141da" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "4c5071b615d96ef9dfd6a63d8429090f1f2872bb", - "internalRef": "327369997" + "sha": "5587028631d4d743fd906c4eb4e4e4649a7ee5ce", + "internalRef": "343187793" } }, { @@ -96,7 +96,6 @@ "README.md", "api-extractor.json", "linkinator.config.json", - "package-lock.json.41252956", "protos/google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto", "protos/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto", "protos/protos.d.ts", @@ -104,7 +103,6 @@ "protos/protos.json", "renovate.json", "samples/README.md", - "samples/package-lock.json.3671243477", "src/index.ts", "src/v1/index.ts", "src/v1/recaptcha_enterprise_service_client.ts",