UNPKG

disposable-guerrillamail

Version:

A simple wrapper on top of Guerrillamail REST API using TypeScript

40 lines (39 loc) 1.29 kB
interface IEmailMessage { mail_from: string; mail_timestamp: number; mail_read: number; mail_date: string; reply_to: string; mail_subject: string; mail_excerpt: string; mail_id: number; att: number; content_type: string; mail_recipient: string; source_id: number; source_mail_id: number; mail_body: string; size: number; } export declare class Email { private BASE_URL; private emailAddress; private token; /** * Initializes a new random email address and returns the address back. * The random address can be overriden if a custom email address is provided. * createEmailAccount() -> 'dbyziheu@guerrillamailblock.com' * createEmailAccount('Faisal') -> 'Faisal@guerrillamailblock.com' */ createEmailAccount(customEmailAddress?: string): Promise<string>; /** * Gets a maximum of 10 emails from the specified offset. * Offset of 0 will fetch a list of the first 10 emails, offset of 10 will fetch a list of the next 10, and so on. */ getLatestEmails(offset?: number): Promise<[IEmailMessage]>; /** * Gets a detailed information about a single email using the emailId. */ getEmailDetails(emailId?: string): Promise<IEmailMessage>; } export {};