nodemailer-sequelize-queue
Version:
Queue for mails with nodemailer and cron scheduler
37 lines (36 loc) • 1.17 kB
TypeScript
import { Sequelize, ModelStatic, Model, Optional } from 'sequelize';
import { Attachment } from './Mailer';
export declare class NsqMailQueue extends Model implements IQueueModel {
id: number;
email_from: string;
email_to: string;
subject: string;
html: string;
attachments?: any;
attempts?: number;
last_error?: string;
}
declare const _default: (sequelize: Sequelize) => IQueueModelStatic;
export default _default;
export declare type AddQueueModelAttributes = {
email_from: string;
email_to: string;
subject: string;
html: string;
attachments?: Attachment[];
};
export declare type QueueModelAttributes = {
id: number;
email_from: string;
email_to: string;
subject: string;
html: string;
worker_uuid: string | null;
attachments?: any;
attempts?: number;
last_error?: string;
};
export declare type IQueueModel = Model<QueueModelAttributes, QueueModelCreationAttributes>;
export declare type IQueueModelStatic = ModelStatic<IQueueModel>;
export declare type QueueModelCreationAttributes = Optional<QueueModelAttributes, 'id'>;
export declare type INsqMailQueue = typeof NsqMailQueue;