@google-cloud/recaptcha-enterprise
Version:
reCAPTCHA Enterprise API client for Node.js
829 lines (697 loc) • 991 kB
TypeScript
// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
import type {protobuf as $protobuf} from "google-gax";
import Long = require("long");
/** Namespace google. */
export namespace google {
/** Namespace cloud. */
namespace cloud {
/** Namespace recaptchaenterprise. */
namespace recaptchaenterprise {
/** Namespace v1. */
namespace v1 {
/** Represents a RecaptchaEnterpriseService */
class RecaptchaEnterpriseService extends $protobuf.rpc.Service {
/**
* Constructs a new RecaptchaEnterpriseService service.
* @param rpcImpl RPC implementation
* @param [requestDelimited=false] Whether requests are length-delimited
* @param [responseDelimited=false] Whether responses are length-delimited
*/
constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);
/**
* Creates new RecaptchaEnterpriseService service using the specified rpc implementation.
* @param rpcImpl RPC implementation
* @param [requestDelimited=false] Whether requests are length-delimited
* @param [responseDelimited=false] Whether responses are length-delimited
* @returns RPC service. Useful where requests and/or responses are streamed.
*/
public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): RecaptchaEnterpriseService;
/**
* Calls CreateAssessment.
* @param request CreateAssessmentRequest message or plain object
* @param callback Node-style callback called with the error, if any, and Assessment
*/
public createAssessment(request: google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.CreateAssessmentCallback): void;
/**
* Calls CreateAssessment.
* @param request CreateAssessmentRequest message or plain object
* @returns Promise
*/
public createAssessment(request: google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest): Promise<google.cloud.recaptchaenterprise.v1.Assessment>;
/**
* Calls AnnotateAssessment.
* @param request AnnotateAssessmentRequest message or plain object
* @param callback Node-style callback called with the error, if any, and AnnotateAssessmentResponse
*/
public annotateAssessment(request: google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.AnnotateAssessmentCallback): void;
/**
* Calls AnnotateAssessment.
* @param request AnnotateAssessmentRequest message or plain object
* @returns Promise
*/
public annotateAssessment(request: google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest): Promise<google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse>;
/**
* Calls CreateKey.
* @param request CreateKeyRequest message or plain object
* @param callback Node-style callback called with the error, if any, and Key
*/
public createKey(request: google.cloud.recaptchaenterprise.v1.ICreateKeyRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.CreateKeyCallback): void;
/**
* Calls CreateKey.
* @param request CreateKeyRequest message or plain object
* @returns Promise
*/
public createKey(request: google.cloud.recaptchaenterprise.v1.ICreateKeyRequest): Promise<google.cloud.recaptchaenterprise.v1.Key>;
/**
* Calls ListKeys.
* @param request ListKeysRequest message or plain object
* @param callback Node-style callback called with the error, if any, and ListKeysResponse
*/
public listKeys(request: google.cloud.recaptchaenterprise.v1.IListKeysRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListKeysCallback): void;
/**
* Calls ListKeys.
* @param request ListKeysRequest message or plain object
* @returns Promise
*/
public listKeys(request: google.cloud.recaptchaenterprise.v1.IListKeysRequest): Promise<google.cloud.recaptchaenterprise.v1.ListKeysResponse>;
/**
* Calls RetrieveLegacySecretKey.
* @param request RetrieveLegacySecretKeyRequest message or plain object
* @param callback Node-style callback called with the error, if any, and RetrieveLegacySecretKeyResponse
*/
public retrieveLegacySecretKey(request: google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.RetrieveLegacySecretKeyCallback): void;
/**
* Calls RetrieveLegacySecretKey.
* @param request RetrieveLegacySecretKeyRequest message or plain object
* @returns Promise
*/
public retrieveLegacySecretKey(request: google.cloud.recaptchaenterprise.v1.IRetrieveLegacySecretKeyRequest): Promise<google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse>;
/**
* Calls GetKey.
* @param request GetKeyRequest message or plain object
* @param callback Node-style callback called with the error, if any, and Key
*/
public getKey(request: google.cloud.recaptchaenterprise.v1.IGetKeyRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.GetKeyCallback): void;
/**
* Calls GetKey.
* @param request GetKeyRequest message or plain object
* @returns Promise
*/
public getKey(request: google.cloud.recaptchaenterprise.v1.IGetKeyRequest): Promise<google.cloud.recaptchaenterprise.v1.Key>;
/**
* Calls UpdateKey.
* @param request UpdateKeyRequest message or plain object
* @param callback Node-style callback called with the error, if any, and Key
*/
public updateKey(request: google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.UpdateKeyCallback): void;
/**
* Calls UpdateKey.
* @param request UpdateKeyRequest message or plain object
* @returns Promise
*/
public updateKey(request: google.cloud.recaptchaenterprise.v1.IUpdateKeyRequest): Promise<google.cloud.recaptchaenterprise.v1.Key>;
/**
* Calls DeleteKey.
* @param request DeleteKeyRequest message or plain object
* @param callback Node-style callback called with the error, if any, and Empty
*/
public deleteKey(request: google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.DeleteKeyCallback): void;
/**
* Calls DeleteKey.
* @param request DeleteKeyRequest message or plain object
* @returns Promise
*/
public deleteKey(request: google.cloud.recaptchaenterprise.v1.IDeleteKeyRequest): Promise<google.protobuf.Empty>;
/**
* Calls MigrateKey.
* @param request MigrateKeyRequest message or plain object
* @param callback Node-style callback called with the error, if any, and Key
*/
public migrateKey(request: google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.MigrateKeyCallback): void;
/**
* Calls MigrateKey.
* @param request MigrateKeyRequest message or plain object
* @returns Promise
*/
public migrateKey(request: google.cloud.recaptchaenterprise.v1.IMigrateKeyRequest): Promise<google.cloud.recaptchaenterprise.v1.Key>;
/**
* Calls AddIpOverride.
* @param request AddIpOverrideRequest message or plain object
* @param callback Node-style callback called with the error, if any, and AddIpOverrideResponse
*/
public addIpOverride(request: google.cloud.recaptchaenterprise.v1.IAddIpOverrideRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.AddIpOverrideCallback): void;
/**
* Calls AddIpOverride.
* @param request AddIpOverrideRequest message or plain object
* @returns Promise
*/
public addIpOverride(request: google.cloud.recaptchaenterprise.v1.IAddIpOverrideRequest): Promise<google.cloud.recaptchaenterprise.v1.AddIpOverrideResponse>;
/**
* Calls RemoveIpOverride.
* @param request RemoveIpOverrideRequest message or plain object
* @param callback Node-style callback called with the error, if any, and RemoveIpOverrideResponse
*/
public removeIpOverride(request: google.cloud.recaptchaenterprise.v1.IRemoveIpOverrideRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.RemoveIpOverrideCallback): void;
/**
* Calls RemoveIpOverride.
* @param request RemoveIpOverrideRequest message or plain object
* @returns Promise
*/
public removeIpOverride(request: google.cloud.recaptchaenterprise.v1.IRemoveIpOverrideRequest): Promise<google.cloud.recaptchaenterprise.v1.RemoveIpOverrideResponse>;
/**
* Calls ListIpOverrides.
* @param request ListIpOverridesRequest message or plain object
* @param callback Node-style callback called with the error, if any, and ListIpOverridesResponse
*/
public listIpOverrides(request: google.cloud.recaptchaenterprise.v1.IListIpOverridesRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListIpOverridesCallback): void;
/**
* Calls ListIpOverrides.
* @param request ListIpOverridesRequest message or plain object
* @returns Promise
*/
public listIpOverrides(request: google.cloud.recaptchaenterprise.v1.IListIpOverridesRequest): Promise<google.cloud.recaptchaenterprise.v1.ListIpOverridesResponse>;
/**
* Calls GetMetrics.
* @param request GetMetricsRequest message or plain object
* @param callback Node-style callback called with the error, if any, and Metrics
*/
public getMetrics(request: google.cloud.recaptchaenterprise.v1.IGetMetricsRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.GetMetricsCallback): void;
/**
* Calls GetMetrics.
* @param request GetMetricsRequest message or plain object
* @returns Promise
*/
public getMetrics(request: google.cloud.recaptchaenterprise.v1.IGetMetricsRequest): Promise<google.cloud.recaptchaenterprise.v1.Metrics>;
/**
* Calls CreateFirewallPolicy.
* @param request CreateFirewallPolicyRequest message or plain object
* @param callback Node-style callback called with the error, if any, and FirewallPolicy
*/
public createFirewallPolicy(request: google.cloud.recaptchaenterprise.v1.ICreateFirewallPolicyRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.CreateFirewallPolicyCallback): void;
/**
* Calls CreateFirewallPolicy.
* @param request CreateFirewallPolicyRequest message or plain object
* @returns Promise
*/
public createFirewallPolicy(request: google.cloud.recaptchaenterprise.v1.ICreateFirewallPolicyRequest): Promise<google.cloud.recaptchaenterprise.v1.FirewallPolicy>;
/**
* Calls ListFirewallPolicies.
* @param request ListFirewallPoliciesRequest message or plain object
* @param callback Node-style callback called with the error, if any, and ListFirewallPoliciesResponse
*/
public listFirewallPolicies(request: google.cloud.recaptchaenterprise.v1.IListFirewallPoliciesRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListFirewallPoliciesCallback): void;
/**
* Calls ListFirewallPolicies.
* @param request ListFirewallPoliciesRequest message or plain object
* @returns Promise
*/
public listFirewallPolicies(request: google.cloud.recaptchaenterprise.v1.IListFirewallPoliciesRequest): Promise<google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesResponse>;
/**
* Calls GetFirewallPolicy.
* @param request GetFirewallPolicyRequest message or plain object
* @param callback Node-style callback called with the error, if any, and FirewallPolicy
*/
public getFirewallPolicy(request: google.cloud.recaptchaenterprise.v1.IGetFirewallPolicyRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.GetFirewallPolicyCallback): void;
/**
* Calls GetFirewallPolicy.
* @param request GetFirewallPolicyRequest message or plain object
* @returns Promise
*/
public getFirewallPolicy(request: google.cloud.recaptchaenterprise.v1.IGetFirewallPolicyRequest): Promise<google.cloud.recaptchaenterprise.v1.FirewallPolicy>;
/**
* Calls UpdateFirewallPolicy.
* @param request UpdateFirewallPolicyRequest message or plain object
* @param callback Node-style callback called with the error, if any, and FirewallPolicy
*/
public updateFirewallPolicy(request: google.cloud.recaptchaenterprise.v1.IUpdateFirewallPolicyRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.UpdateFirewallPolicyCallback): void;
/**
* Calls UpdateFirewallPolicy.
* @param request UpdateFirewallPolicyRequest message or plain object
* @returns Promise
*/
public updateFirewallPolicy(request: google.cloud.recaptchaenterprise.v1.IUpdateFirewallPolicyRequest): Promise<google.cloud.recaptchaenterprise.v1.FirewallPolicy>;
/**
* Calls DeleteFirewallPolicy.
* @param request DeleteFirewallPolicyRequest message or plain object
* @param callback Node-style callback called with the error, if any, and Empty
*/
public deleteFirewallPolicy(request: google.cloud.recaptchaenterprise.v1.IDeleteFirewallPolicyRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.DeleteFirewallPolicyCallback): void;
/**
* Calls DeleteFirewallPolicy.
* @param request DeleteFirewallPolicyRequest message or plain object
* @returns Promise
*/
public deleteFirewallPolicy(request: google.cloud.recaptchaenterprise.v1.IDeleteFirewallPolicyRequest): Promise<google.protobuf.Empty>;
/**
* Calls ReorderFirewallPolicies.
* @param request ReorderFirewallPoliciesRequest message or plain object
* @param callback Node-style callback called with the error, if any, and ReorderFirewallPoliciesResponse
*/
public reorderFirewallPolicies(request: google.cloud.recaptchaenterprise.v1.IReorderFirewallPoliciesRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ReorderFirewallPoliciesCallback): void;
/**
* Calls ReorderFirewallPolicies.
* @param request ReorderFirewallPoliciesRequest message or plain object
* @returns Promise
*/
public reorderFirewallPolicies(request: google.cloud.recaptchaenterprise.v1.IReorderFirewallPoliciesRequest): Promise<google.cloud.recaptchaenterprise.v1.ReorderFirewallPoliciesResponse>;
/**
* Calls ListRelatedAccountGroups.
* @param request ListRelatedAccountGroupsRequest message or plain object
* @param callback Node-style callback called with the error, if any, and ListRelatedAccountGroupsResponse
*/
public listRelatedAccountGroups(request: google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListRelatedAccountGroupsCallback): void;
/**
* Calls ListRelatedAccountGroups.
* @param request ListRelatedAccountGroupsRequest message or plain object
* @returns Promise
*/
public listRelatedAccountGroups(request: google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupsRequest): Promise<google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse>;
/**
* Calls ListRelatedAccountGroupMemberships.
* @param request ListRelatedAccountGroupMembershipsRequest message or plain object
* @param callback Node-style callback called with the error, if any, and ListRelatedAccountGroupMembershipsResponse
*/
public listRelatedAccountGroupMemberships(request: google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.ListRelatedAccountGroupMembershipsCallback): void;
/**
* Calls ListRelatedAccountGroupMemberships.
* @param request ListRelatedAccountGroupMembershipsRequest message or plain object
* @returns Promise
*/
public listRelatedAccountGroupMemberships(request: google.cloud.recaptchaenterprise.v1.IListRelatedAccountGroupMembershipsRequest): Promise<google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse>;
/**
* Calls SearchRelatedAccountGroupMemberships.
* @param request SearchRelatedAccountGroupMembershipsRequest message or plain object
* @param callback Node-style callback called with the error, if any, and SearchRelatedAccountGroupMembershipsResponse
*/
public searchRelatedAccountGroupMemberships(request: google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest, callback: google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService.SearchRelatedAccountGroupMembershipsCallback): void;
/**
* Calls SearchRelatedAccountGroupMemberships.
* @param request SearchRelatedAccountGroupMembershipsRequest message or plain object
* @returns Promise
*/
public searchRelatedAccountGroupMemberships(request: google.cloud.recaptchaenterprise.v1.ISearchRelatedAccountGroupMembershipsRequest): Promise<google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse>;
}
namespace RecaptchaEnterpriseService {
/**
* Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|createAssessment}.
* @param error Error, if any
* @param [response] Assessment
*/
type CreateAssessmentCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.Assessment) => void;
/**
* Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|annotateAssessment}.
* @param error Error, if any
* @param [response] AnnotateAssessmentResponse
*/
type AnnotateAssessmentCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.AnnotateAssessmentResponse) => void;
/**
* Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|createKey}.
* @param error Error, if any
* @param [response] Key
*/
type CreateKeyCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.Key) => void;
/**
* Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|listKeys}.
* @param error Error, if any
* @param [response] ListKeysResponse
*/
type ListKeysCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.ListKeysResponse) => void;
/**
* Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|retrieveLegacySecretKey}.
* @param error Error, if any
* @param [response] RetrieveLegacySecretKeyResponse
*/
type RetrieveLegacySecretKeyCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.RetrieveLegacySecretKeyResponse) => void;
/**
* Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|getKey}.
* @param error Error, if any
* @param [response] Key
*/
type GetKeyCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.Key) => void;
/**
* Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|updateKey}.
* @param error Error, if any
* @param [response] Key
*/
type UpdateKeyCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.Key) => void;
/**
* Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|deleteKey}.
* @param error Error, if any
* @param [response] Empty
*/
type DeleteKeyCallback = (error: (Error|null), response?: google.protobuf.Empty) => void;
/**
* Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|migrateKey}.
* @param error Error, if any
* @param [response] Key
*/
type MigrateKeyCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.Key) => void;
/**
* Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|addIpOverride}.
* @param error Error, if any
* @param [response] AddIpOverrideResponse
*/
type AddIpOverrideCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.AddIpOverrideResponse) => void;
/**
* Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|removeIpOverride}.
* @param error Error, if any
* @param [response] RemoveIpOverrideResponse
*/
type RemoveIpOverrideCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.RemoveIpOverrideResponse) => void;
/**
* Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|listIpOverrides}.
* @param error Error, if any
* @param [response] ListIpOverridesResponse
*/
type ListIpOverridesCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.ListIpOverridesResponse) => void;
/**
* Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|getMetrics}.
* @param error Error, if any
* @param [response] Metrics
*/
type GetMetricsCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.Metrics) => void;
/**
* Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|createFirewallPolicy}.
* @param error Error, if any
* @param [response] FirewallPolicy
*/
type CreateFirewallPolicyCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.FirewallPolicy) => void;
/**
* Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|listFirewallPolicies}.
* @param error Error, if any
* @param [response] ListFirewallPoliciesResponse
*/
type ListFirewallPoliciesCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesResponse) => void;
/**
* Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|getFirewallPolicy}.
* @param error Error, if any
* @param [response] FirewallPolicy
*/
type GetFirewallPolicyCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.FirewallPolicy) => void;
/**
* Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|updateFirewallPolicy}.
* @param error Error, if any
* @param [response] FirewallPolicy
*/
type UpdateFirewallPolicyCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.FirewallPolicy) => void;
/**
* Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|deleteFirewallPolicy}.
* @param error Error, if any
* @param [response] Empty
*/
type DeleteFirewallPolicyCallback = (error: (Error|null), response?: google.protobuf.Empty) => void;
/**
* Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|reorderFirewallPolicies}.
* @param error Error, if any
* @param [response] ReorderFirewallPoliciesResponse
*/
type ReorderFirewallPoliciesCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.ReorderFirewallPoliciesResponse) => void;
/**
* Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|listRelatedAccountGroups}.
* @param error Error, if any
* @param [response] ListRelatedAccountGroupsResponse
*/
type ListRelatedAccountGroupsCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupsResponse) => void;
/**
* Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|listRelatedAccountGroupMemberships}.
* @param error Error, if any
* @param [response] ListRelatedAccountGroupMembershipsResponse
*/
type ListRelatedAccountGroupMembershipsCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.ListRelatedAccountGroupMembershipsResponse) => void;
/**
* Callback as used by {@link google.cloud.recaptchaenterprise.v1.RecaptchaEnterpriseService|searchRelatedAccountGroupMemberships}.
* @param error Error, if any
* @param [response] SearchRelatedAccountGroupMembershipsResponse
*/
type SearchRelatedAccountGroupMembershipsCallback = (error: (Error|null), response?: google.cloud.recaptchaenterprise.v1.SearchRelatedAccountGroupMembershipsResponse) => void;
}
/** Properties of a CreateAssessmentRequest. */
interface ICreateAssessmentRequest {
/** CreateAssessmentRequest parent */
parent?: (string|null);
/** CreateAssessmentRequest assessment */
assessment?: (google.cloud.recaptchaenterprise.v1.IAssessment|null);
}
/** Represents a CreateAssessmentRequest. */
class CreateAssessmentRequest implements ICreateAssessmentRequest {
/**
* Constructs a new CreateAssessmentRequest.
* @param [properties] Properties to set
*/
constructor(properties?: google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest);
/** CreateAssessmentRequest parent. */
public parent: string;
/** CreateAssessmentRequest assessment. */
public assessment?: (google.cloud.recaptchaenterprise.v1.IAssessment|null);
/**
* Creates a new CreateAssessmentRequest instance using the specified properties.
* @param [properties] Properties to set
* @returns CreateAssessmentRequest instance
*/
public static create(properties?: google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest): google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest;
/**
* Encodes the specified CreateAssessmentRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest.verify|verify} messages.
* @param message CreateAssessmentRequest message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified CreateAssessmentRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest.verify|verify} messages.
* @param message CreateAssessmentRequest message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.ICreateAssessmentRequest, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a CreateAssessmentRequest message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns CreateAssessmentRequest
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest;
/**
* Decodes a CreateAssessmentRequest message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns CreateAssessmentRequest
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest;
/**
* Verifies a CreateAssessmentRequest message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a CreateAssessmentRequest message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns CreateAssessmentRequest
*/
public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest;
/**
* Creates a plain object from a CreateAssessmentRequest message. Also converts values to other types if specified.
* @param message CreateAssessmentRequest
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.cloud.recaptchaenterprise.v1.CreateAssessmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this CreateAssessmentRequest to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for CreateAssessmentRequest
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
/** Properties of a TransactionEvent. */
interface ITransactionEvent {
/** TransactionEvent eventType */
eventType?: (google.cloud.recaptchaenterprise.v1.TransactionEvent.TransactionEventType|keyof typeof google.cloud.recaptchaenterprise.v1.TransactionEvent.TransactionEventType|null);
/** TransactionEvent reason */
reason?: (string|null);
/** TransactionEvent value */
value?: (number|null);
/** TransactionEvent eventTime */
eventTime?: (google.protobuf.ITimestamp|null);
}
/** Represents a TransactionEvent. */
class TransactionEvent implements ITransactionEvent {
/**
* Constructs a new TransactionEvent.
* @param [properties] Properties to set
*/
constructor(properties?: google.cloud.recaptchaenterprise.v1.ITransactionEvent);
/** TransactionEvent eventType. */
public eventType: (google.cloud.recaptchaenterprise.v1.TransactionEvent.TransactionEventType|keyof typeof google.cloud.recaptchaenterprise.v1.TransactionEvent.TransactionEventType);
/** TransactionEvent reason. */
public reason: string;
/** TransactionEvent value. */
public value: number;
/** TransactionEvent eventTime. */
public eventTime?: (google.protobuf.ITimestamp|null);
/**
* Creates a new TransactionEvent instance using the specified properties.
* @param [properties] Properties to set
* @returns TransactionEvent instance
*/
public static create(properties?: google.cloud.recaptchaenterprise.v1.ITransactionEvent): google.cloud.recaptchaenterprise.v1.TransactionEvent;
/**
* Encodes the specified TransactionEvent message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.TransactionEvent.verify|verify} messages.
* @param message TransactionEvent message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.cloud.recaptchaenterprise.v1.ITransactionEvent, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified TransactionEvent message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.TransactionEvent.verify|verify} messages.
* @param message TransactionEvent message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.ITransactionEvent, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a TransactionEvent message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns TransactionEvent
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recaptchaenterprise.v1.TransactionEvent;
/**
* Decodes a TransactionEvent message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns TransactionEvent
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recaptchaenterprise.v1.TransactionEvent;
/**
* Verifies a TransactionEvent message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
public static verify(message: { [k: string]: any }): (string|null);
/**
* Creates a TransactionEvent message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns TransactionEvent
*/
public static fromObject(object: { [k: string]: any }): google.cloud.recaptchaenterprise.v1.TransactionEvent;
/**
* Creates a plain object from a TransactionEvent message. Also converts values to other types if specified.
* @param message TransactionEvent
* @param [options] Conversion options
* @returns Plain object
*/
public static toObject(message: google.cloud.recaptchaenterprise.v1.TransactionEvent, options?: $protobuf.IConversionOptions): { [k: string]: any };
/**
* Converts this TransactionEvent to JSON.
* @returns JSON object
*/
public toJSON(): { [k: string]: any };
/**
* Gets the default type url for TransactionEvent
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns The default type url
*/
public static getTypeUrl(typeUrlPrefix?: string): string;
}
namespace TransactionEvent {
/** TransactionEventType enum. */
enum TransactionEventType {
TRANSACTION_EVENT_TYPE_UNSPECIFIED = 0,
MERCHANT_APPROVE = 1,
MERCHANT_DENY = 2,
MANUAL_REVIEW = 3,
AUTHORIZATION = 4,
AUTHORIZATION_DECLINE = 5,
PAYMENT_CAPTURE = 6,
PAYMENT_CAPTURE_DECLINE = 7,
CANCEL = 8,
CHARGEBACK_INQUIRY = 9,
CHARGEBACK_ALERT = 10,
FRAUD_NOTIFICATION = 11,
CHARGEBACK = 12,
CHARGEBACK_REPRESENTMENT = 13,
CHARGEBACK_REVERSE = 14,
REFUND_REQUEST = 15,
REFUND_DECLINE = 16,
REFUND = 17,
REFUND_REVERSE = 18
}
}
/** Properties of an AnnotateAssessmentRequest. */
interface IAnnotateAssessmentRequest {
/** AnnotateAssessmentRequest name */
name?: (string|null);
/** AnnotateAssessmentRequest annotation */
annotation?: (google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation|keyof typeof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation|null);
/** AnnotateAssessmentRequest reasons */
reasons?: (google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason[]|null);
/** AnnotateAssessmentRequest accountId */
accountId?: (string|null);
/** AnnotateAssessmentRequest hashedAccountId */
hashedAccountId?: (Uint8Array|string|null);
/** AnnotateAssessmentRequest transactionEvent */
transactionEvent?: (google.cloud.recaptchaenterprise.v1.ITransactionEvent|null);
}
/** Represents an AnnotateAssessmentRequest. */
class AnnotateAssessmentRequest implements IAnnotateAssessmentRequest {
/**
* Constructs a new AnnotateAssessmentRequest.
* @param [properties] Properties to set
*/
constructor(properties?: google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest);
/** AnnotateAssessmentRequest name. */
public name: string;
/** AnnotateAssessmentRequest annotation. */
public annotation: (google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation|keyof typeof google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation);
/** AnnotateAssessmentRequest reasons. */
public reasons: google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason[];
/** AnnotateAssessmentRequest accountId. */
public accountId: string;
/** AnnotateAssessmentRequest hashedAccountId. */
public hashedAccountId: (Uint8Array|string);
/** AnnotateAssessmentRequest transactionEvent. */
public transactionEvent?: (google.cloud.recaptchaenterprise.v1.ITransactionEvent|null);
/**
* Creates a new AnnotateAssessmentRequest instance using the specified properties.
* @param [properties] Properties to set
* @returns AnnotateAssessmentRequest instance
*/
public static create(properties?: google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest): google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest;
/**
* Encodes the specified AnnotateAssessmentRequest message. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.verify|verify} messages.
* @param message AnnotateAssessmentRequest message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encode(message: google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified AnnotateAssessmentRequest message, length delimited. Does not implicitly {@link google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.verify|verify} messages.
* @param message AnnotateAssessmentRequest message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
public static encodeDelimited(message: google.cloud.recaptchaenterprise.v1.IAnnotateAssessmentRequest, writer?: $protobuf.Writer): $pro