googleapis
Version:
Google APIs Client Library for Node.js
1,006 lines • 173 kB
TypeScript
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
import { Readable } from 'stream';
export declare namespace recaptchaenterprise_v1 {
export interface Options extends GlobalOptions {
version: 'v1';
}
interface StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth;
/**
* V1 error format.
*/
'$.xgafv'?: string;
/**
* OAuth access token.
*/
access_token?: string;
/**
* Data format for response.
*/
alt?: string;
/**
* JSONP
*/
callback?: string;
/**
* Selector specifying which fields to include in a partial response.
*/
fields?: string;
/**
* API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
*/
key?: string;
/**
* OAuth 2.0 token for the current user.
*/
oauth_token?: string;
/**
* Returns response with indentations and line breaks.
*/
prettyPrint?: boolean;
/**
* Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
*/
quotaUser?: string;
/**
* Legacy upload protocol for media (e.g. "media", "multipart").
*/
uploadType?: string;
/**
* Upload protocol for media (e.g. "raw", "multipart").
*/
upload_protocol?: string;
}
/**
* reCAPTCHA Enterprise API
*
* Help protect your website from fraudulent activity, spam, and abuse without creating friction.
*
* @example
* ```js
* const {google} = require('googleapis');
* const recaptchaenterprise = google.recaptchaenterprise('v1');
* ```
*/
export class Recaptchaenterprise {
context: APIRequestContext;
projects: Resource$Projects;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
}
/**
* Account defense risk assessment.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment {
/**
* Output only. Account takeover risk assessment for this request.
*/
accountTakeoverVerdict?: Schema$GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessmentAccountTakeoverVerdict;
/**
* Output only. Labels for this request.
*/
labels?: string[] | null;
}
/**
* Risk explainability reasons for Account defense.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessmentAccountRiskReason {
/**
* Output only. A risk reason associated with this request.
*/
reason?: string | null;
}
/**
* Account takeover risk assessment.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessmentAccountTakeoverVerdict {
/**
* Output only. Account takeover attempt probability. Values are from 0.0 (lowest risk) to 1.0 (highest risk).
*/
risk?: number | null;
/**
* Output only. Unordered list. Reasons why the request appears risky. Risk reasons can be returned even if the risk is low, as trustworthy requests can still have some risk signals.
*/
riskReasons?: Schema$GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessmentAccountRiskReason[];
/**
* Output only. Unordered list. Reasons why the request appears trustworthy. Trust reasons can be returned even if the risk is high, as risky requests can still have some trust signals.
*/
trustReasons?: Schema$GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessmentAccountTrustReason[];
}
/**
* Trust explainability reasons for Account defense.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessmentAccountTrustReason {
/**
* Output only. A trust reason associated with this request.
*/
reason?: string | null;
}
/**
* Information about account verification, used for identity verification.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo {
/**
* Optional. Endpoints that can be used for identity verification.
*/
endpoints?: Schema$GoogleCloudRecaptchaenterpriseV1EndpointVerificationInfo[];
/**
* Optional. Language code preference for the verification message, set as a IETF BCP 47 language code.
*/
languageCode?: string | null;
/**
* Output only. Result of the latest account verification challenge.
*/
latestVerificationResult?: string | null;
/**
* Username of the account that is being verified. Deprecated. Customers should now provide the `account_id` field in `event.user_info`.
*/
username?: string | null;
}
/**
* The AddIpOverride request message.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1AddIpOverrideRequest {
/**
* Required. IP override added to the key.
*/
ipOverrideData?: Schema$GoogleCloudRecaptchaenterpriseV1IpOverrideData;
}
/**
* Response for AddIpOverride.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1AddIpOverrideResponse {
}
/**
* Settings specific to keys that can be used by Android apps.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1AndroidKeySettings {
/**
* Optional. If set to true, allowed_package_names are not enforced.
*/
allowAllPackageNames?: boolean | null;
/**
* Optional. Android package names of apps allowed to use the key. Example: 'com.companyname.appname' Each key supports a maximum of 250 package names. To use a key on more apps, set `allow_all_package_names` to true. When this is set, you are responsible for validating the package name by checking the `token_properties.android_package_name` field in each assessment response against your list of allowed package names.
*/
allowedPackageNames?: string[] | null;
/**
* Optional. Set to true for keys that are used in an Android application that is available for download in app stores in addition to the Google Play Store.
*/
supportNonGoogleAppStoreDistribution?: boolean | null;
}
/**
* The request message to annotate an Assessment.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest {
/**
* Optional. A stable account identifier to apply to the assessment. This is an alternative to setting `account_id` in `CreateAssessment`, for example when a stable account identifier is not yet known in the initial request.
*/
accountId?: string | null;
/**
* Optional. The annotation that is assigned to the Event. This field can be left empty to provide reasons that apply to an event without concluding whether the event is legitimate or fraudulent.
*/
annotation?: string | null;
/**
* Optional. A stable hashed account identifier to apply to the assessment. This is an alternative to setting `hashed_account_id` in `CreateAssessment`, for example when a stable account identifier is not yet known in the initial request.
*/
hashedAccountId?: string | null;
/**
* Optional. If using an external multi-factor authentication provider, provide phone authentication details for fraud detection purposes.
*/
phoneAuthenticationEvent?: Schema$GoogleCloudRecaptchaenterpriseV1PhoneAuthenticationEvent;
/**
* Optional. Reasons for the annotation that are assigned to the event.
*/
reasons?: string[] | null;
/**
* Optional. If the assessment is part of a payment transaction, provide details on payment lifecycle events that occur in the transaction.
*/
transactionEvent?: Schema$GoogleCloudRecaptchaenterpriseV1TransactionEvent;
}
/**
* Empty response for AnnotateAssessment.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse {
}
/**
* Contains fields that are required to perform Apple-specific integrity checks.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1AppleDeveloperId {
/**
* Required. The Apple developer key ID (10-character string).
*/
keyId?: string | null;
/**
* Required. Input only. A private key (downloaded as a text file with a .p8 file extension) generated for your Apple Developer account. Ensure that Apple DeviceCheck is enabled for the private key.
*/
privateKey?: string | null;
/**
* Required. The Apple team ID (10-character string) owning the provisioning profile used to build your application.
*/
teamId?: string | null;
}
/**
* A reCAPTCHA Enterprise assessment resource.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1Assessment {
/**
* Output only. Assessment returned by Account defense when an account identifier is provided.
*/
accountDefenderAssessment?: Schema$GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment;
/**
* Optional. Account verification information for identity verification. The assessment event must include a token and site key to use this feature.
*/
accountVerification?: Schema$GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo;
/**
* Optional. The environment creating the assessment. This describes your environment (the system invoking CreateAssessment), NOT the environment of your user.
*/
assessmentEnvironment?: Schema$GoogleCloudRecaptchaenterpriseV1AssessmentEnvironment;
/**
* Optional. The event being assessed.
*/
event?: Schema$GoogleCloudRecaptchaenterpriseV1Event;
/**
* Output only. Assessment returned when firewall policies belonging to the project are evaluated using the field firewall_policy_evaluation.
*/
firewallPolicyAssessment?: Schema$GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment;
/**
* Output only. Assessment returned by Fraud Prevention when TransactionData is provided.
*/
fraudPreventionAssessment?: Schema$GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment;
/**
* Output only. Fraud Signals specific to the users involved in a payment transaction.
*/
fraudSignals?: Schema$GoogleCloudRecaptchaenterpriseV1FraudSignals;
/**
* Output only. Identifier. The resource name for the Assessment in the format `projects/{project\}/assessments/{assessment\}`.
*/
name?: string | null;
/**
* Output only. Assessment returned when a site key, a token, and a phone number as `user_id` are provided. SMS defense needs to be enabled.
*/
phoneFraudAssessment?: Schema$GoogleCloudRecaptchaenterpriseV1PhoneFraudAssessment;
/**
* Output only. Provides information about the policy evaluation for this assessment.
*/
policyEvaluation?: Schema$GoogleCloudRecaptchaenterpriseV1PolicyEvaluation;
/**
* Optional. The private password leak verification field contains the parameters that are used to to check for leaks privately without sharing user credentials.
*/
privatePasswordLeakVerification?: Schema$GoogleCloudRecaptchaenterpriseV1PrivatePasswordLeakVerification;
/**
* Output only. The risk analysis result for the event being assessed.
*/
riskAnalysis?: Schema$GoogleCloudRecaptchaenterpriseV1RiskAnalysis;
/**
* Output only. Properties of the provided event token.
*/
tokenProperties?: Schema$GoogleCloudRecaptchaenterpriseV1TokenProperties;
}
/**
* The environment creating the assessment. This describes your environment (the system invoking CreateAssessment), NOT the environment of your user.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1AssessmentEnvironment {
/**
* Optional. Identifies the client module initiating the CreateAssessment request. This can be the link to the client module's project. Examples include: - "github.com/GoogleCloudPlatform/recaptcha-enterprise-google-tag-manager" - "wordpress.org/plugins/recaptcha-something"
*/
client?: string | null;
/**
* Optional. The version of the client module. For example, "1.0.0".
*/
version?: string | null;
}
/**
* Bot information and metadata.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1Bot {
/**
* Optional. Enumerated field representing the type of bot.
*/
botType?: string | null;
/**
* Optional. Enumerated string value that indicates the identity of the bot, formatted in kebab-case. Current example values include the following: * google-agent - AI_AGENT * browser-base - AI_AGENT * chat-gpt - AI_AGENT * aws-bedrock - AI_AGENT * cybaa-bot - AI_AGENT * cloudflare - AI_AGENT * payhawk - AI_AGENT * duck-duck-go - SEARCH_INDEXER * mediaboard - CONTENT_SCRAPER * marker-io - AI_AGENT * broadcom - AI_AGENT * anchor-browser - AI_AGENT * shopify - AI_AGENT * stackscope - CONTENT_SCRAPER * manus - AI_AGENT * kernel-sh - AI_AGENT * zvelo - SEARCH_INDEXER Ensure that your applications can handle identifier values not explicitly listed here. Deprecated values might take some time to stop showing up in responses. New values can be pushed so this list should be taken as non exhaustive.
*/
name?: string | null;
}
/**
* Metrics related to challenges.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1ChallengeMetrics {
/**
* Count of submitted challenge solutions that were incorrect or otherwise deemed suspicious such that a subsequent challenge was triggered.
*/
failedCount?: string | null;
/**
* Count of nocaptchas (successful verification without a challenge) issued.
*/
nocaptchaCount?: string | null;
/**
* Count of reCAPTCHA checkboxes or badges rendered. This is mostly equivalent to a count of pageloads for pages that include reCAPTCHA.
*/
pageloadCount?: string | null;
/**
* Count of nocaptchas (successful verification without a challenge) plus submitted challenge solutions that were correct and resulted in verification.
*/
passedCount?: string | null;
}
/**
* A rule to configure the behavior of reCAPTCHA for conditionally presenting a challenge.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1ChallengeRule {
/**
* Present a challenge to the user.
*/
challenge?: Schema$GoogleCloudRecaptchaenterpriseV1ChallengeRuleChallengeOutcome;
/**
* Optional. A CEL condition that must be met for this rule to apply. If unspecified, the rule applies unconditionally. The following fields can be referenced in the condition: * `score` * `user_ip_address` * `user_asn` * `user_agent` * `verified_bots.name` * `verified_bots.bot_type` Examples: * `score < 0.5` * `user_ip_address == "123.45.67.89"` * `user_agent.contains("Chrome")` * `score < 0.5 && user_ip_address == "123.45.67.89"`
*/
condition?: string | null;
/**
* Do not present a challenge to the user.
*/
noChallenge?: Schema$GoogleCloudRecaptchaenterpriseV1ChallengeRuleNoChallengeOutcome;
}
/**
* An outcome that indicates that a challenge of a specified difficulty should be presented to the user.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1ChallengeRuleChallengeOutcome {
/**
* Optional. The difficulty of the challenge to present to the user. If unspecified, `BALANCE` is used.
*/
difficulty?: string | null;
}
/**
* Information about the evaluation of a `ChallengeRule`.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1ChallengeRuleEvaluation {
}
/**
* A collection of challenge rules that applies to one or more actions.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1ChallengeRuleGroup {
/**
* Required. Action name provided at token generation. The action name is not case-sensitive and can only contain alphanumeric characters, slashes, and underscores. If "*" is provided, the rule group applies to all actions. If multiple actions are provided, the rule group is applied to all of them. This field is required.
*/
actions?: string[] | null;
/**
* Required. A list of rules that configure when and how reCAPTCHA presents a challenge. reCAPTCHA evaluates these rules in order and applies the first one that matches.
*/
challengeRules?: Schema$GoogleCloudRecaptchaenterpriseV1ChallengeRule[];
}
/**
* An outcome that indicates that no challenge should be presented to the user.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1ChallengeRuleNoChallengeOutcome {
}
/**
* Configuration for clients to protect with reCAPTCHA.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1ClientSettings {
/**
* Optional. If set to true, it means allowed_domains are not enforced.
*/
allowAllDomains?: boolean | null;
/**
* Optional. Domains or subdomains of websites allowed to use the policy. All subdomains of an allowed domain are automatically allowed. A valid domain requires a host and must not include any path, port, query or fragment. Examples: 'example.com' or 'subdomain.example.com' Each policy supports a maximum of 250 domains. To use a policy on more domains, set `allow_all_domains` to true. When this is set, you are responsible for validating the hostname by checking the `token_properties.hostname` field in each assessment response against your list of allowed domains.
*/
allowedDomains?: string[] | null;
/**
* Optional. Configuration for all API endpoints to protect with reCAPTCHA. If this field is not set, reCAPTCHA will not automatically request tokens on any API endpoints.
*/
protectedEndpointGroup?: Schema$GoogleCloudRecaptchaenterpriseV1ProtectedEndpointGroup;
}
/**
* Information about a verification endpoint that can be used for 2FA.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1EndpointVerificationInfo {
/**
* Email address for which to trigger a verification request.
*/
emailAddress?: string | null;
/**
* Output only. Timestamp of the last successful verification for the endpoint, if any.
*/
lastVerificationTime?: string | null;
/**
* Phone number for which to trigger a verification request. Should be given in E.164 format.
*/
phoneNumber?: string | null;
/**
* Output only. Token to provide to the client to trigger endpoint verification. It must be used within 15 minutes.
*/
requestToken?: string | null;
}
/**
* The event being assessed.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1Event {
/**
* Optional. The expected action for this type of event. This should be the same action provided at token generation time on client-side platforms already integrated with recaptcha enterprise. Required for Universal keys.
*/
expectedAction?: string | null;
/**
* Optional. Flag for a reCAPTCHA express request for an assessment without a token. If enabled, `site_key` must reference an Express site key.
*/
express?: boolean | null;
/**
* Optional. Flag for enabling firewall policy config assessment. If this flag is enabled, the firewall policy is evaluated and a suggested firewall action is returned in the response.
*/
firewallPolicyEvaluation?: boolean | null;
/**
* Optional. The Fraud Prevention setting for this assessment.
*/
fraudPrevention?: string | null;
/**
* Optional. Deprecated: use `user_info.account_id` instead. Unique stable hashed user identifier for the request. The identifier must be hashed using hmac-sha256 with stable secret.
*/
hashedAccountId?: string | null;
/**
* Optional. HTTP header information about the request.
*/
headers?: string[] | null;
/**
* Optional. JA3 fingerprint for SSL clients. To learn how to compute this fingerprint, please refer to https://github.com/salesforce/ja3.
*/
ja3?: string | null;
/**
* Optional. JA4 fingerprint for SSL clients. To learn how to compute this fingerprint, please refer to https://github.com/FoxIO-LLC/ja4.
*/
ja4?: string | null;
/**
* Optional. The URI resource the user requested that triggered an assessment.
*/
requestedUri?: string | null;
/**
* Optional. The site key that was used to invoke reCAPTCHA Enterprise on your site and generate the token.
*/
siteKey?: string | null;
/**
* Optional. The user response token provided by the reCAPTCHA Enterprise client-side integration on your site.
*/
token?: string | null;
/**
* Optional. Data describing a payment transaction to be assessed. Sending this data enables reCAPTCHA Enterprise Fraud Prevention and the FraudPreventionAssessment component in the response.
*/
transactionData?: Schema$GoogleCloudRecaptchaenterpriseV1TransactionData;
/**
* Optional. The user agent present in the request from the user's device related to this event.
*/
userAgent?: string | null;
/**
* Optional. Information about the user that generates this event, when they can be identified. They are often identified through the use of an account for logged-in requests or login/registration requests, or by providing user identifiers for guest actions like checkout.
*/
userInfo?: Schema$GoogleCloudRecaptchaenterpriseV1UserInfo;
/**
* Optional. The IP address in the request from the user's device related to this event.
*/
userIpAddress?: string | null;
/**
* Optional. Flag for running Web Application Firewall (WAF) token assessment. If enabled, the token must be specified, and have been created by a WAF-enabled key.
*/
wafTokenAssessment?: boolean | null;
}
/**
* Settings specific to keys that can be used for reCAPTCHA Express.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1ExpressKeySettings {
}
/**
* An individual action. Each action represents what to do if a policy matches.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1FirewallAction {
/**
* The user request did not match any policy and should be allowed access to the requested resource.
*/
allow?: Schema$GoogleCloudRecaptchaenterpriseV1FirewallActionAllowAction;
/**
* This action denies access to a given page. The user gets an HTTP error code.
*/
block?: Schema$GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction;
/**
* This action injects reCAPTCHA JavaScript code into the HTML page returned by the site backend.
*/
includeRecaptchaScript?: Schema$GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction;
/**
* This action redirects the request to a reCAPTCHA interstitial to attach a token.
*/
redirect?: Schema$GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction;
/**
* This action sets a custom header but allow the request to continue to the customer backend.
*/
setHeader?: Schema$GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction;
/**
* This action transparently serves a different page to an offending user.
*/
substitute?: Schema$GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction;
}
/**
* An allow action continues processing a request unimpeded.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1FirewallActionAllowAction {
}
/**
* A block action serves an HTTP error code a prevents the request from hitting the backend.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction {
}
/**
* An include reCAPTCHA script action involves injecting reCAPTCHA JavaScript code into the HTML returned by the site backend. This reCAPTCHA script is tasked with collecting user signals on the requested web page, issuing tokens as a cookie within the site domain, and enabling their utilization in subsequent page requests.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction {
}
/**
* A redirect action returns a 307 (temporary redirect) response, pointing the user to a reCAPTCHA interstitial page to attach a token.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction {
}
/**
* A set header action sets a header and forwards the request to the backend. This can be used to trigger custom protection implemented on the backend.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction {
/**
* Optional. The header key to set in the request to the backend server.
*/
key?: string | null;
/**
* Optional. The header value to set in the request to the backend server.
*/
value?: string | null;
}
/**
* A substitute action transparently serves a different page than the one requested.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction {
/**
* Optional. The address to redirect to. The target is a relative path in the current host. Example: "/blog/404.html".
*/
path?: string | null;
}
/**
* A FirewallPolicy represents a single matching pattern and resulting actions to take.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1FirewallPolicy {
/**
* Optional. The actions that the caller should take regarding user access. There should be at most one terminal action. A terminal action is any action that forces a response, such as `AllowAction`, `BlockAction` or `SubstituteAction`. Zero or more non-terminal actions such as `SetHeader` might be specified. A single policy can contain up to 16 actions.
*/
actions?: Schema$GoogleCloudRecaptchaenterpriseV1FirewallAction[];
/**
* Optional. A CEL (Common Expression Language) conditional expression that specifies if this policy applies to an incoming user request. If this condition evaluates to true and the requested path matched the path pattern, the associated actions should be executed by the caller. The condition string is checked for CEL syntax correctness on creation. For more information, see the [CEL spec](https://github.com/google/cel-spec) and its [language definition](https://github.com/google/cel-spec/blob/master/doc/langdef.md). A condition has a max length of 500 characters.
*/
condition?: string | null;
/**
* Optional. A description of what this policy aims to achieve, for convenience purposes. The description can at most include 256 UTF-8 characters.
*/
description?: string | null;
/**
* Identifier. The resource name for the FirewallPolicy in the format `projects/{project\}/firewallpolicies/{firewallpolicy\}`.
*/
name?: string | null;
/**
* Optional. The path for which this policy applies, specified as a glob pattern. For more information on glob, see the [manual page](https://man7.org/linux/man-pages/man7/glob.7.html). A path has a max length of 200 characters.
*/
path?: string | null;
}
/**
* Policy config assessment.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment {
/**
* Output only. If the processing of a policy config fails, an error is populated and the firewall_policy is left empty.
*/
error?: Schema$GoogleRpcStatus;
/**
* Output only. The policy that matched the request. If more than one policy may match, this is the first match. If no policy matches the incoming request, the policy field is left empty.
*/
firewallPolicy?: Schema$GoogleCloudRecaptchaenterpriseV1FirewallPolicy;
}
/**
* Assessment for Fraud Prevention.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment {
/**
* Output only. Assessment of this transaction for behavioral trust.
*/
behavioralTrustVerdict?: Schema$GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentBehavioralTrustVerdict;
/**
* Output only. Assessment of this transaction for risk of being part of a card testing attack.
*/
cardTestingVerdict?: Schema$GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentCardTestingVerdict;
/**
* Output only. Reasons why the transaction is probably fraudulent and received a high transaction risk score.
*/
riskReasons?: Schema$GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentRiskReason[];
/**
* Output only. Assessment of this transaction for risk of a stolen instrument.
*/
stolenInstrumentVerdict?: Schema$GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentStolenInstrumentVerdict;
/**
* Output only. Probability of this transaction being fraudulent. Summarizes the combined risk of attack vectors below. Values are from 0.0 (lowest) to 1.0 (highest).
*/
transactionRisk?: number | null;
}
/**
* Information about behavioral trust of the transaction.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentBehavioralTrustVerdict {
/**
* Output only. Probability of this transaction attempt being executed in a behaviorally trustworthy way. Values are from 0.0 (lowest) to 1.0 (highest).
*/
trust?: number | null;
}
/**
* Information about card testing fraud, where an adversary is testing fraudulently obtained cards or brute forcing their details.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentCardTestingVerdict {
/**
* Output only. Probability of this transaction attempt being part of a card testing attack. Values are from 0.0 (lowest) to 1.0 (highest).
*/
risk?: number | null;
}
/**
* Risk reasons applicable to the Fraud Prevention assessment.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentRiskReason {
/**
* Output only. Risk reasons applicable to the Fraud Prevention assessment.
*/
reason?: string | null;
}
/**
* Information about stolen instrument fraud, where the user is not the legitimate owner of the instrument being used for the purchase.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentStolenInstrumentVerdict {
/**
* Output only. Probability of this transaction being executed with a stolen instrument. Values are from 0.0 (lowest) to 1.0 (highest).
*/
risk?: number | null;
}
/**
* Fraud signals describing users and cards involved in the transaction.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1FraudSignals {
/**
* Output only. Signals describing the payment card or cards used in this transaction.
*/
cardSignals?: Schema$GoogleCloudRecaptchaenterpriseV1FraudSignalsCardSignals;
/**
* Output only. Signals describing the end user in this transaction.
*/
userSignals?: Schema$GoogleCloudRecaptchaenterpriseV1FraudSignalsUserSignals;
}
/**
* Signals describing the payment card used in this transaction.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1FraudSignalsCardSignals {
/**
* Output only. The labels for the payment card in this transaction.
*/
cardLabels?: string[] | null;
}
/**
* Signals describing the user involved in this transaction.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1FraudSignalsUserSignals {
/**
* Output only. This user (based on email, phone, and other identifiers) has been seen on the internet for at least this number of days.
*/
activeDaysLowerBound?: number | null;
/**
* Output only. Likelihood (from 0.0 to 1.0) this user includes synthetic components in their identity, such as a randomly generated email address, temporary phone number, or fake shipping address.
*/
syntheticRisk?: number | null;
}
/**
* Settings specific to keys that can be used by iOS apps.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1IOSKeySettings {
/**
* Optional. If set to true, allowed_bundle_ids are not enforced.
*/
allowAllBundleIds?: boolean | null;
/**
* Optional. iOS bundle IDs of apps allowed to use the key. Example: 'com.companyname.productname.appname' Each key supports a maximum of 250 bundle IDs. To use a key on more apps, set `allow_all_bundle_ids` to true. When this is set, you are responsible for validating the bundle id by checking the `token_properties.ios_bundle_id` field in each assessment response against your list of allowed bundle IDs.
*/
allowedBundleIds?: string[] | null;
/**
* Optional. Apple Developer account details for the app that is protected by the reCAPTCHA Key. reCAPTCHA leverages platform-specific checks like Apple App Attest and Apple DeviceCheck to protect your app from abuse. Providing these fields allows reCAPTCHA to get a better assessment of the integrity of your app.
*/
appleDeveloperId?: Schema$GoogleCloudRecaptchaenterpriseV1AppleDeveloperId;
}
/**
* Information about the IP or IP range override.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1IpOverrideData {
/**
* Required. The IP address to override (can be IPv4, IPv6 or CIDR). The IP override must be a valid IPv4 or IPv6 address, or a CIDR range. The IP override must be a public IP address. Example of IPv4: 168.192.5.6 Example of IPv6: 2001:0000:130F:0000:0000:09C0:876A:130B Example of IPv4 with CIDR: 168.192.5.0/24 Example of IPv6 with CIDR: 2001:0DB8:1234::/48
*/
ip?: string | null;
/**
* Required. Describes the type of IP override.
*/
overrideType?: string | null;
}
/**
* A key used to identify and configure applications (web and/or mobile) that use reCAPTCHA Enterprise.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1Key {
/**
* Settings for keys that can be used by Android apps.
*/
androidSettings?: Schema$GoogleCloudRecaptchaenterpriseV1AndroidKeySettings;
/**
* Output only. The timestamp corresponding to the creation of this key.
*/
createTime?: string | null;
/**
* Required. Human-readable display name of this key. Modifiable by user.
*/
displayName?: string | null;
/**
* Settings for keys that can be used by reCAPTCHA Express.
*/
expressSettings?: Schema$GoogleCloudRecaptchaenterpriseV1ExpressKeySettings;
/**
* Settings for keys that can be used by iOS apps.
*/
iosSettings?: Schema$GoogleCloudRecaptchaenterpriseV1IOSKeySettings;
/**
* Optional. See [Creating and managing labels] (https://cloud.google.com/recaptcha/docs/labels).
*/
labels?: {
[key: string]: string;
} | null;
/**
* Identifier. The resource name for the Key in the format `projects/{project\}/keys/{key\}`.
*/
name?: string | null;
/**
* Optional. Options for user acceptance testing.
*/
testingOptions?: Schema$GoogleCloudRecaptchaenterpriseV1TestingOptions;
/**
* Settings for keys that are configured through their Policy.
*/
universalSettings?: Schema$GoogleCloudRecaptchaenterpriseV1UniversalKeySettings;
/**
* Optional. Settings for Web Application Firewall (WAF).
*/
wafSettings?: Schema$GoogleCloudRecaptchaenterpriseV1WafSettings;
/**
* Settings for keys that can be used by websites.
*/
webSettings?: Schema$GoogleCloudRecaptchaenterpriseV1WebKeySettings;
}
/**
* Response to request to list firewall policies belonging to a project.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1ListFirewallPoliciesResponse {
/**
* Policy details.
*/
firewallPolicies?: Schema$GoogleCloudRecaptchaenterpriseV1FirewallPolicy[];
/**
* Token to retrieve the next page of results. It is set to empty if no policies remain in results.
*/
nextPageToken?: string | null;
}
/**
* Response for ListIpOverrides.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1ListIpOverridesResponse {
/**
* IP Overrides details.
*/
ipOverrides?: Schema$GoogleCloudRecaptchaenterpriseV1IpOverrideData[];
/**
* Token to retrieve the next page of results. If this field is empty, no keys remain in the results.
*/
nextPageToken?: string | null;
}
/**
* Response to request to list keys in a project.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1ListKeysResponse {
/**
* Key details.
*/
keys?: Schema$GoogleCloudRecaptchaenterpriseV1Key[];
/**
* Token to retrieve the next page of results. It is set to empty if no keys remain in results.
*/
nextPageToken?: string | null;
}
/**
* The response to a `ListRelatedAccountGroupMemberships` call.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupMembershipsResponse {
/**
* A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
*/
nextPageToken?: string | null;
/**
* The memberships listed by the query.
*/
relatedAccountGroupMemberships?: Schema$GoogleCloudRecaptchaenterpriseV1RelatedAccountGroupMembership[];
}
/**
* The response to a `ListRelatedAccountGroups` call.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupsResponse {
/**
* A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
*/
nextPageToken?: string | null;
/**
* The groups of related accounts listed by the query.
*/
relatedAccountGroups?: Schema$GoogleCloudRecaptchaenterpriseV1RelatedAccountGroup[];
}
/**
* Metrics for a single Key.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1Metrics {
/**
* Metrics are continuous and in order by dates, and in the granularity of day. Only challenge-based keys (CHECKBOX, INVISIBLE) have challenge-based data.
*/
challengeMetrics?: Schema$GoogleCloudRecaptchaenterpriseV1ChallengeMetrics[];
/**
* Output only. Identifier. The name of the metrics, in the format `projects/{project\}/keys/{key\}/metrics`.
*/
name?: string | null;
/**
* Metrics are continuous and in order by dates, and in the granularity of day. All Key types should have score-based data.
*/
scoreMetrics?: Schema$GoogleCloudRecaptchaenterpriseV1ScoreMetrics[];
/**
* Inclusive start time aligned to a day in the America/Los_Angeles (Pacific) timezone.
*/
startTime?: string | null;
}
/**
* The migrate key request message.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest {
/**
* Optional. If true, skips the billing check. A reCAPTCHA Enterprise key or migrated key behaves differently than a reCAPTCHA (non-Enterprise version) key when you reach a quota limit (see https://docs.cloud.google.com/recaptcha/quotas#quota_limit). To avoid any disruption of your usage, we check that a billing account is present. If your usage of reCAPTCHA is under the free quota, you can safely skip the billing check and proceed with the migration. See https://cloud.google.com/recaptcha/docs/billing-information.
*/
skipBillingCheck?: boolean | null;
}
/**
* Details on a phone authentication event
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1PhoneAuthenticationEvent {
/**
* Optional. The time at which the multi-factor authentication event (challenge or verification) occurred.
*/
eventTime?: string | null;
/**
* Required. Phone number in E.164 format for which a multi-factor authentication challenge was initiated, succeeded, or failed.
*/
phoneNumber?: string | null;
}
/**
* Assessment for Phone Fraud
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1PhoneFraudAssessment {
/**
* Output only. Assessment of this phone event for risk of SMS toll fraud.
*/
smsTollFraudVerdict?: Schema$GoogleCloudRecaptchaenterpriseV1SmsTollFraudVerdict;
}
/**
* A complete configuration set containing multiple grouped rules defining the behavior of reCAPTCHA for fraud detection and prevention.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1Policy {
/**
* Optional. Rules to configure the behavior of reCAPTCHA for showing a challenge. Rule groups are evaluated in order. Evaluation stops when the first matching rule group is found.
*/
challengeRuleGroups?: Schema$GoogleCloudRecaptchaenterpriseV1ChallengeRuleGroup[];
/**
* Required. Configuration for clients protected by this policy.
*/
clientSettings?: Schema$GoogleCloudRecaptchaenterpriseV1ClientSettings;
/**
* Identifier. Resource name for this policy. Format: "projects/{project\}/keys/{key\}/policy" for a policy under a key.
*/
name?: string | null;
}
/**
* Information about the policy evaluation.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1PolicyEvaluation {
/**
* Output only. Populated if one or more Challenge rules were matched. Its presence in the assessment indicates that at least one challenge rule was matched and determined whether a challenge was presented to the user.
*/
challengeRuleEvaluation?: Schema$GoogleCloudRecaptchaenterpriseV1ChallengeRuleEvaluation;
}
/**
* Private password leak verification info.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1PrivatePasswordLeakVerification {
/**
* Output only. List of prefixes of the encrypted potential password leaks that matched the given parameters. They must be compared with the client-side decryption prefix of `reencrypted_user_credentials_hash`
*/
encryptedLeakMatchPrefixes?: string[] | null;
/**
* Optional. Encrypted Scrypt hash of the canonicalized username+password. It is re-encrypted by the server and returned through `reencrypted_user_credentials_hash`.
*/
encryptedUserCredentialsHash?: string | null;
/**
* Required. Exactly 26-bit prefix of the SHA-256 hash of the canonicalized username. It is used to look up password leaks associated with that hash prefix.
*/
lookupHashPrefix?: string | null;
/**
* Output only. Corresponds to the re-encryption of the `encrypted_user_credentials_hash` field. It is used to match potential password leaks within `encrypted_leak_match_prefixes`.
*/
reencryptedUserCredentialsHash?: string | null;
}
/**
* Configuration for an API endpoint to protect with reCAPTCHA.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1ProtectedEndpoint {
/**
* Required. Action name to be used for token generation for this endpoint. The action name can only contain alphanumeric characters, slashes, and underscores.
*/
action?: string | null;
/**
* Required. URI path of the API endpoint to protect. Must start with '/'. Supports glob characters '*' to match a single path segment and '**' to match multiple path segments. Standalone root catch-alls ('/x' and '/x*') are invalid because it can negatively impact performance to trigger reCAPTCHA on every single request to your backend. Matching is evaluated against the URL path only (domain, scheme, and query parameters are ignored). Examples: - `/login` matches `/login`, `https://example.com/login`, and `/login?query=1`, but not `/login/step1`. - `/products/x` matches `/products/123`, but not `/products/123/456`. - `/content/x*` matches `/content/articles/2024/01/01`.
*/
path?: string | null;
}
/**
* Configuration for API endpoints to protect with reCAPTCHA.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1ProtectedEndpointGroup {
/**
* Optional. List of API endpoints to automatically protect with reCAPTCHA. If any of these endpoints is invoked from a page where a key bound to this policy is installed, a reCAPTCHA token is automatically generated and attached to the request. If multiple protected endpoints match a given API endpoint, the first one in the list is used.
*/
protectedEndpoints?: Schema$GoogleCloudRecaptchaenterpriseV1ProtectedEndpoint[];
}
/**
* A group of related accounts.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1RelatedAccountGroup {
/**
* Required. Identifier. The resource name for the related account group in the format `projects/{project\}/relatedaccountgroups/{related_account_group\}`.
*/
name?: string | null;
}
/**
* A membership in a group of related accounts.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1RelatedAccountGroupMembership {
/**
* The unique stable account identifier of the member. The identifier corresponds to an `account_id` provided in a previous `CreateAssessment` or `AnnotateAssessment` call.
*/
accountId?: string | null;
/**
* Deprecated: use `account_id` instead. The unique stable hashed account identifier of the member. The identifier corresponds to a `hashed_account_id` provided in a previous `CreateAssessment` or `AnnotateAssessment` call.
*/
hashedAccountId?: string | null;
/**
* Required. Identifier. The resource name for this membership in the format `projects/{project\}/relatedaccountgroups/{relatedaccountgroup\}/memberships/{membership\}`.
*/
name?: string | null;
}
/**
* The RemoveIpOverride request message.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1RemoveIpOverrideRequest {
/**
* Required. IP override to be removed from the key.
*/
ipOverrideData?: Schema$GoogleCloudRecaptchaenterpriseV1IpOverrideData;
}
/**
* Response for RemoveIpOverride.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1RemoveIpOverrideResponse {
}
/**
* The reorder firewall policies request message.
*/
export interface Schema$GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest {
/**
* Required. A list containing all policy names, in the new order. Each name is in the format `projects/{project\