/**
 * @license
 * Copyright 2025 OElite Platform
 * SPDX-License-Identifier: Apache-2.0
 */
import { OAuth2Client } from 'google-auth-library';
import { EventEmitter } from 'node:events';
import type { Config } from '../config/config.js';
export declare const geminiOAuth2Events: EventEmitter<[never]>;
export declare enum GeminiOAuth2Event {
    AuthUri = "authUri",
    AuthProgress = "authProgress",
    AuthCancel = "authCancel",
    AuthSuccess = "authSuccess",
    AuthError = "authError"
}
export interface GeminiOAuthWebLogin {
    authUrl: string;
    loginCompletePromise: Promise<void>;
}
export interface GeminiCredentials {
    refresh_token?: string;
    access_token?: string;
    token_type?: string;
    expiry_date?: number;
}
export interface GeminiAuthResponse {
    verification_uri: string;
    verification_uri_complete: string;
    user_code?: string;
    expires_in: number;
}
/**
 * Clear cached Gemini OAuth credentials
 */
export declare function clearGeminiCredentials(): Promise<void>;
/**
 * Initiate browser-based OAuth flow for Gemini
 */
export declare function authWithGeminiWeb(client: OAuth2Client): Promise<GeminiOAuthWebLogin>;
/**
 * Initialize and return a Gemini OAuth2 client
 * Automatically triggers OAuth flow if no cached credentials exist
 */
export declare function getGeminiOAuthClient(config: Config): Promise<OAuth2Client>;
