UNPKG

@snehal96/unimail

Version:

Unified email fetching & document extraction layer for modern web apps

28 lines (27 loc) 976 B
import { IOAuthProvider, OAuthOptions, OAuthFlowState, TokenData } from '../interfaces.js'; /** * Google-specific OAuth implementation */ export declare class GoogleOAuthProvider implements IOAuthProvider { /** * Initialize the Google OAuth flow and generate an authorization URL */ initializeOAuthFlow(options: OAuthOptions): Promise<OAuthFlowState>; /** * Handle the OAuth callback and exchange the code for tokens */ handleCallback(code: string, options: OAuthOptions): Promise<TokenData>; /** * Refresh an access token using a refresh token */ refreshToken(refreshToken: string, options: OAuthOptions): Promise<TokenData>; /** * Revoke a token (can be either an access token or a refresh token) */ revokeToken(token: string, options: OAuthOptions): Promise<boolean>; /** * Create an OAuth2Client instance with the provided options * @private */ private createOAuth2Client; }