/** * Gmail API Service for Browser Use * Handles Gmail API authentication, email reading, and 2FA code extraction. * This service provides a clean interface for agents to interact with Gmail. */ import type { gmail_v1 } from 'googleapis'; export interface EmailData { id: string; threadId: string; subject: string; from: string; to: string; date: string; timestamp: number; body: string; rawMessage: gmail_v1.Schema$Message; } export declare class GmailService { /** * Gmail API scopes for reading emails */ private static readonly SCOPES; private credentialsFile; private tokenFile; private configDir; private accessToken?; private service?; private oauth2Client?; private authenticated; constructor(options?: { credentialsFile?: string; tokenFile?: string; configDir?: string; accessToken?: string; }); /** * Check if Gmail service is authenticated */ isAuthenticated(): boolean; /** * Handle OAuth authentication and token management */ authenticate(): Promise; /** * Get recent emails with optional query filter */ getRecentEmails(options?: { maxResults?: number; query?: string; timeFilter?: string; }): Promise; /** * Parse Gmail message into readable format */ private parseEmail; /** * Extract email body from payload */ private extractBody; } //# sourceMappingURL=service.d.ts.map