UNPKG

mailersend

Version:

Node.js helper module for MailerSend API

114 lines (113 loc) 3.86 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EmailParams = void 0; class EmailParams { constructor(config) { this.from = config === null || config === void 0 ? void 0 : config.from; this.to = config === null || config === void 0 ? void 0 : config.to; this.cc = config === null || config === void 0 ? void 0 : config.cc; this.bcc = config === null || config === void 0 ? void 0 : config.bcc; this.rcpt_to = config === null || config === void 0 ? void 0 : config.rcptTo; this.reply_to = config === null || config === void 0 ? void 0 : config.replyTo; this.in_reply_to = config === null || config === void 0 ? void 0 : config.inReplyTo; this.subject = config === null || config === void 0 ? void 0 : config.subject; this.text = config === null || config === void 0 ? void 0 : config.text; this.html = config === null || config === void 0 ? void 0 : config.html; this.send_at = config === null || config === void 0 ? void 0 : config.sendAt; this.attachments = config === null || config === void 0 ? void 0 : config.attachments; this.template_id = config === null || config === void 0 ? void 0 : config.templateId; this.language = config === null || config === void 0 ? void 0 : config.language; this.tags = config === null || config === void 0 ? void 0 : config.tags; this.personalization = config === null || config === void 0 ? void 0 : config.personalization; this.references = config === null || config === void 0 ? void 0 : config.references; this.headers = config === null || config === void 0 ? void 0 : config.headers; this.settings = config === null || config === void 0 ? void 0 : config.settings; this.precedence_bulk = config === null || config === void 0 ? void 0 : config.precedenceBulk; this.list_unsubscribe = config === null || config === void 0 ? void 0 : config.listUnsubscribe; } setFrom(from) { this.from = from; return this; } setTo(to) { this.to = to; return this; } setCc(cc) { this.cc = cc; return this; } setBcc(bcc) { this.bcc = bcc; return this; } setRcptTo(rcptTo) { this.rcpt_to = rcptTo; return this; } setReplyTo(replyTo) { this.reply_to = replyTo; return this; } setInReplyTo(inReplyTo) { this.in_reply_to = inReplyTo; return this; } setSubject(subject) { this.subject = subject; return this; } setText(text) { this.text = text; return this; } setHtml(html) { this.html = html; return this; } setSendAt(sendAt) { this.send_at = sendAt; return this; } setAttachments(attachments) { this.attachments = attachments; return this; } setTemplateId(id) { this.template_id = id; return this; } setLanguage(language) { this.language = language; return this; } setTags(tags) { this.tags = tags; return this; } setPersonalization(personalization) { this.personalization = personalization; return this; } setPrecedenceBulk(precedenceBulk) { this.precedence_bulk = precedenceBulk; return this; } setSettings(settings) { this.settings = settings; return this; } setReferences(references) { this.references = references; return this; } setHeaders(headers) { this.headers = headers; return this; } setListUnsubscribe(listUnsubscribe) { this.list_unsubscribe = listUnsubscribe; return this; } } exports.EmailParams = EmailParams;