UNPKG

@rocket.chat/apps-engine

Version:

The engine code for the Rocket.Chat Apps which manages, runs, translates, coordinates and all of that.

19 lines (18 loc) 675 B
import type { IEmailDescriptor, IPreEmailSentContext } from '.'; import type { IHttp, IModify, IPersistence, IRead } from '../accessors'; import { AppMethod } from '../metadata'; /** * Event interface that allows apps to * register as a handler of of the `IPreEmailSent` * event. * * This event is trigger before the mailer sends * an email. * * To prevent the email from being sent, you can * throw an error with a message specifying the * reason for rejection. */ export interface IPreEmailSent { [AppMethod.EXECUTE_PRE_EMAIL_SENT](context: IPreEmailSentContext, read: IRead, http: IHttp, persis: IPersistence, modify: IModify): Promise<IEmailDescriptor>; }