@bhavinkumarvegad/playwright-email-utils
Version:
Reusable utilities for handling emails in Playwright tests from Yopmail, Gmail and other providers.
24 lines (23 loc) • 789 B
TypeScript
export interface GmailMessage {
id?: string;
raw?: string;
headers?: Array<{
name: string;
value: string;
}>;
labelIds?: string[];
snippet?: string;
body?: string;
subject?: string;
from?: string;
to?: string;
}
export declare class GmailAPI {
private static GMAIL_REDIRECT_URI;
private constructor();
private static getOAuth2Client;
private static getGmail;
static getAccessToken(clientId: string, clientSecret: string, refreshToken: string): Promise<string>;
static listMessages(clientId: string, clientSecret: string, refreshToken: string, query: string): Promise<GmailMessage[]>;
static getMessage(clientId: string, clientSecret: string, refreshToken: string, msgId: string): Promise<GmailMessage>;
}