import { type docs_v1, type drive_v3, type sheets_v4, type gmail_v1, type calendar_v3, type slides_v1, type forms_v1 } from 'googleapis'; import { type OAuth2Client } from 'google-auth-library'; export interface AccountConfig { name: string; email?: string; tokenPath: string; credentialsPath?: string; addedAt: string; } export interface AccountsConfig { accounts: Record; credentialsPath: string; } export interface AccountClients { authClient: OAuth2Client; docs: docs_v1.Docs; drive: drive_v3.Drive; sheets: sheets_v4.Sheets; gmail: gmail_v1.Gmail; calendar: calendar_v3.Calendar; slides: slides_v1.Slides; forms: forms_v1.Forms; } /** * Initialize the accounts system - validates config and tokens exist */ export declare function initializeAccounts(): Promise; /** * Get the API clients for a specific account */ export declare function getAccountClients(accountName: string): Promise; /** * List all configured accounts */ export declare function listAccounts(): Promise; /** * Check if any accounts are configured */ export declare function hasAccounts(): Promise; /** * Get token info including scopes for an account */ export declare function getTokenInfo(accountName: string): Promise<{ email?: string; scopes?: string[]; expiry_date?: number; access_token_preview?: string; }>; /** * Add a new account via OAuth flow * Returns the auth URL that user needs to visit * @param accountName - Name for the account * @param credentialsPath - Optional path to a credentials.json file for this account */ export declare function startAddAccount(accountName: string, credentialsPath?: string): Promise<{ authUrl: string; port: number; credentialsPath?: string; }>; /** * Complete the OAuth flow by listening for the callback * @param accountName - Name for the account * @param port - Port number for the OAuth callback server * @param credentialsPath - Optional path to a credentials.json file for this account * @param onAuthUrl - Optional callback to receive the auth URL */ export declare function completeAddAccount(accountName: string, port: number, credentialsPath?: string, onAuthUrl?: (url: string) => void): Promise; /** * Remove an account */ export declare function removeAccount(accountName: string): Promise; /** * Get the config directory path (for display purposes) */ export declare function getConfigDir(): string; /** * Get credentials path (for setup instructions) */ export declare function getCredentialsPath(): string; /** * Get the email address associated with an account * Returns the stored email if available, otherwise returns the account name as fallback */ export declare function getAccountEmail(accountName: string): Promise; //# sourceMappingURL=accounts.d.ts.map