UNPKG

@drptbl/mailsac

Version:
98 lines (97 loc) 2.12 kB
import { IAttachment } from "./Attachment"; export interface IRecipient { address: string; name: string; } export interface IMessage { _id: string; from: IRecipient[]; to: IRecipient[]; cc: IRecipient[]; bcc: IRecipient[]; subject: string; savedBy: string; originalInbox: string; inbox: string; domain: string; received: string; size: number; attachments: string[]; ip: string; via: string; folder: string; labels: string[]; read: boolean; rtls: boolean; links: string[]; } export interface IInboxResponse { limit: number; skip: number; unread: number; since: Date; messages: IMessage[]; } export interface IInboxOptions { limit?: number; skip?: number; unread?: number; since?: Date; } export interface ISearchResponse { query: string; messages: IMessage[]; } export interface ILabelsResponse { _id: string; labels: string[]; } export declare enum FolderTypes { INBOX = "inbox", ALL = "all", SENT = "sent", SPAM = "spam", TRASH = "trash", DRAFTS = "drafts" } export interface IReadResponse { _id: string; read: boolean; } export interface IFolderResponse { _id: string; folder: string; } export interface IHeadersResponse { "dkim-signature": string; "received": string | string[]; "x-facebook": string; "date": string; "to": string; "subject": string; "x-priority": string; "x-mailer": string; "return-path": string; "from": string; "reply-to": string; "errors-to": string; "x-facebook-notify": string; "list-unsubscribe": string; "x-facebook-priority": string; "x-auto-response-suppress": string; "require-recipient-valid-since": string; "message-id": string; "mime-version": string; "content-type": string; "x-mailsac-whitelist": string; } export interface ISendMessageOptions { to: string; from: string; subject: string; text?: string; html?: string; attachments?: IAttachment[]; received?: string[]; raw?: string; }