mailbucket
Version:
An npm library that aggregates multiple APIs for creating and receiving temporary emails.
11 lines (10 loc) • 719 B
TypeScript
import type * as type from '../types';
export interface IEmailProvider {
readonly providerName: string;
createAccount(): Promise<type.IApiResponse<type.IEmailAccount>>;
getMessages(account: type.IEmailAccount): Promise<type.IApiResponse<type.IEmailMessageSummary[]>>;
getMessage(account: type.IEmailAccount, messageId: string): Promise<type.IApiResponse<type.IEmailMessage>>;
deleteMessage?(account: type.IEmailAccount, messageId: string): Promise<type.IApiResponse<void>>;
deleteAccount?(account: type.IEmailAccount): Promise<type.IApiResponse<void>>;
}
export declare function makeRequest<T>(url: string, options: type.IRequestOptions, expectedStatus?: number): Promise<type.IApiResponse<T>>;