import { OAuth2Client, type Credentials, type OAuth2ClientOptions } from "google-auth-library"; export type GoogleOAuthTokens = { access_token: string; refresh_token?: string; expires_at?: number; token_type?: string; scope?: string; }; type OAuthEndpoints = NonNullable; export type GoogleOAuthFlowOptions = { clientId?: string; clientSecret?: string; endpoints?: OAuthEndpoints; openBrowser?: (url: string) => Promise; timeoutMs?: number; callbackServer?: CallbackServer; exchangeCode?: (params: { client: OAuth2Client; code: string; codeVerifier: string; redirectUri: string; }) => Promise; }; export declare const GOOGLE_OAUTH_CLIENT_ID = "677504568055-6vlq85ca3lulc17vmc9mlk1q4818e2d4.apps.googleusercontent.com"; export declare const GOOGLE_OAUTH_CLIENT_SECRET = "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"; export declare function runGoogleOAuthFlow(options?: GoogleOAuthFlowOptions): Promise; export declare function loadGoogleOAuthTokens(): GoogleOAuthTokens | null; export declare function hasGoogleOAuthTokens(): boolean; export declare function saveGoogleOAuthTokens(tokens: GoogleOAuthTokens): void; export declare function createGoogleOAuthClient(tokens: GoogleOAuthTokens, onTokens?: (tokens: GoogleOAuthTokens) => void): OAuth2Client; export declare function refreshGoogleOAuthCredentials(client: OAuth2Client, onTokens?: (tokens: GoogleOAuthTokens) => void): Promise; export declare class GoogleOAuthReauthRequiredError extends Error { readonly status = 401; constructor(message: string); } export type CallbackServer = { redirectUri: string; waitForCode: (expectedState: string) => Promise<{ code: string; }>; close: () => Promise; }; export {}; //# sourceMappingURL=google-oauth.d.ts.map