import Workflow from "@entity-access/entity-access/dist/workflows/Workflow.js"; import SocialMailContext from "../../model/SocialMailContext.js"; import EmailAddressService from "../../services/EmailAddressService.js"; import { AppWorkflowContext } from "../AppWorkflowContext.js"; /** * Broadcasting Email is done in following manner. * * 1. Status of Incoming Email is set to `published`. This workflow will not set it, it must be set via backend. * 2. Same email is forwarded to all the subscribers. * 3. Original Email Headers are stripped, from email address is removed. * 4. In Future - Any email address in the html and text body is also removed. * 5. Forwarding same email makes it easier to keep unique message id, and it will help in * creating the threads. */ export interface IBroadcastEmail { emailID: number; mailboxID: number; senderID: number; sendToModeratorsOnly?: boolean; } export default class BroadcastEmail extends Workflow { static taskGroup: string; static broadcast(context: AppWorkflowContext, be: IBroadcastEmail): Promise; private from; private threadID; run(): Promise; publish(db?: SocialMailContext, eas?: EmailAddressService): Promise<{ from: string; threadID: number; }>; getCount(_: any, db?: SocialMailContext): Promise; insert(_: number, db?: SocialMailContext, eas?: EmailAddressService): Promise; private getPending; } //# sourceMappingURL=BroadcastEmail.d.ts.map