UNPKG

@wepublish/api

Version:
26 lines (25 loc) 1.04 kB
import { MailLogStatus, MailProvider, MailProviderTemplate, SendMailProps, WebhookForSendMailProps, WithExternalId } from './mail-provider.interface'; import { NextHandleFunction } from 'connect'; export interface MailProviderProps { id: string; name: string; fromAddress: string; incomingRequestHandler?: NextHandleFunction; } export interface MailProviderProps { id: string; name: string; fromAddress: string; incomingRequestHandler?: NextHandleFunction; } export declare abstract class BaseMailProvider implements MailProvider { readonly id: string; readonly name: string; readonly fromAddress: string; readonly incomingRequestHandler: NextHandleFunction; protected constructor(props: MailProviderProps); abstract webhookForSendMail(props: WebhookForSendMailProps): Promise<MailLogStatus[]>; abstract sendMail(props: SendMailProps): Promise<void>; abstract getTemplates(): Promise<MailProviderTemplate[]>; abstract getTemplateUrl(template: WithExternalId): string; }