UNPKG

docusaurus-openai-search

Version:

AI-powered search plugin for Docusaurus - extends Algolia search with intelligent keyword generation and RAG-based answers

51 lines (50 loc) 1.48 kB
/** * Google reCAPTCHA v3 integration for frontend */ declare global { interface Window { grecaptcha: any; onRecaptchaLoad?: () => void; } } /** * P2-002: Cleanup reCAPTCHA resources and reset state */ export declare function cleanupRecaptcha(): void; /** * P2-002: Enhanced reCAPTCHA script loading with multiple initialization handling and error recovery */ export declare function loadRecaptcha(siteKey: string): Promise<void>; /** * P2-002: Enhanced reCAPTCHA token execution with better error recovery */ export declare function getRecaptchaToken(siteKey: string, action?: string): Promise<string | null>; /** * Add reCAPTCHA token to fetch headers */ export declare function addRecaptchaHeader(headers: HeadersInit, siteKey: string, action?: string): Promise<HeadersInit>; /** * P2-002: Additional utility functions for reCAPTCHA management */ /** * Check if reCAPTCHA is loaded and ready */ export declare function isRecaptchaReady(): boolean; /** * Get current reCAPTCHA state for debugging */ export declare function getRecaptchaState(): { loaded: boolean; siteKey: string | null; attempts: number; scriptPresent: boolean; grecaptchaAvailable: boolean; }; /** * Reset load attempts (useful for testing or manual recovery) */ export declare function resetLoadAttempts(): void; /** * Force reload reCAPTCHA (cleanup and reload) */ export declare function forceReloadRecaptcha(siteKey: string): Promise<void>;