import EmailAddress from "./EmailAddress.js"; import type EmailRecipient from "./EmailRecipient.js"; import type EmailTag from "./EmailTag.js"; import DateTime from "@entity-access/entity-access/dist/types/DateTime.js"; import AppFile from "./AppFile.js"; import type MailboxContact from "./MailboxContact.js"; import MailboxContactEmail from "./MailboxContactEmail.js"; import type ChannelEmail from "./ChannelEmail.js"; import { User } from "./User.js"; import type SubscriberActivity from "./SubscriberActivity.js"; import type EmailEngagement from "./EmailEngagement.js"; import type MailboxContactEvent from "./MailboxContactEvent.js"; import type ThreadParticipant from "./ThreadParticipant.js"; import type EmailText from "./EmailText.js"; import type { ExternalAttachment } from "./ExternalAttachment.js"; declare const emailStatuses: readonly ["note", "queued", "received", "draft", "published", "pending-approval", "approved", "scheduled", "sent", "sent-failed", "deleted", "closed"]; export type emailStatusType = typeof emailStatuses[number]; export declare class Email { emailID: number; subject: string; summary: string; textBody: string; htmlBody: string; senderName: string; senderID: number; userID: number; received: boolean; /** Once set to true,this email cannot be sent as an email to anyone */ isNote: boolean; headers: string; hasUnsubscribe: boolean; headerMessageID: string; inReplyTo: string; externalEmailID: string; /** * This will be set by syncing to reduce * email duplication and checking direction of the email */ syncedMailboxID: number; dateReceived: DateTime; dateCreated: DateTime; dateSent?: DateTime; dateUpdated?: DateTime; status: emailStatusType; forwardCount: number; replyCount: number; viewCount: number; engagementCount: number; mimeFileID: number; sentMessageID: string; htmlBodyID: number; emailSize: number; /** * This is important as email size will never be * in gigabytes, calculating size of mailbox * will be cheaper in terms of memory and cpu. */ originalFileSize: number; /** * Workflow ID to process the email. */ workflowID: string; parentID: number; threadID: number; forwardedID: number; lastReplyID: number; /** * Caching this field here will improve the caching. * As query engine can avoid joining Email table. */ engagement: string; tags: string; stateReferencesUpdated: boolean; statePostReceiveInvoked: boolean; doNotTrack: boolean; doNotSendDR: boolean; priority: number; sendAttachmentsAsLinks: boolean; searchIndexed: boolean; postID: string; sanitizedHtml: string; tempID: any; mimeFile: EmailLog; htmlBodyFile: EmailLog; senderUser: User; senderEmail: EmailAddress; recipients: EmailRecipient[]; lastReply: Email; lastRepliedThreads: Email[]; attachments: AppFile[]; lastEmailThreads: MailboxContact[]; threadContacts: MailboxContactEmail[]; emailTags: EmailTag[]; parent: Email; thread: Email; forwarded: Email; forwards: Email[]; children: Email[]; threadChildren: Email[]; logs: EmailLog[]; subscriberActivities: SubscriberActivity[]; silent?: boolean; markAsRead?: boolean; engagements: EmailEngagement[]; mailboxContactEvents: MailboxContactEvent[]; threadParticipants: ThreadParticipant[]; channelEmails: ChannelEmail[]; emailText: EmailText; externalAttachments: ExternalAttachment[]; } export declare class EmailLog { logID: number; emailID: number; fileName: string; fileSize: number; compression: string; dateCreated: DateTime; cloudPath: string; email: Email; mimeFileEmails: Email[]; htmlBodyFileEmails: Email[]; get url(): string; set url(v: string); } export {}; //# sourceMappingURL=Email.d.ts.map