UNPKG

@nestlab/google-recaptcha

Version:
27 lines (26 loc) 986 B
import { ErrorCode } from '../enums/error-code'; import { VerifyResponseEnterpriseRiskAnalysis } from '../interfaces/verify-response-enterprise'; import { LiteralObject } from '../interfaces/literal-object'; export interface RecaptchaVerificationResultOptions<Res> { success: boolean; nativeResponse: Res; hostname: string; action?: string; score?: number; remoteIp?: string; errors: ErrorCode[]; } export declare class RecaptchaVerificationResult<Res = LiteralObject> { private readonly options; readonly success: boolean; readonly hostname: string; readonly remoteIp: string | undefined; readonly action: string | undefined; readonly score: number | undefined; readonly nativeResponse: Res; readonly errors: ErrorCode[]; constructor(options: RecaptchaVerificationResultOptions<Res>); toObject(): LiteralObject; getResponse(): Res; getEnterpriseRiskAnalytics(): VerifyResponseEnterpriseRiskAnalysis | null; }