mailersend
Version:
Node.js helper module for MailerSend API
109 lines (108 loc) • 3.59 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ComparerType = exports.InboundFilterType = exports.InboundUpdateParams = exports.Inbound = void 0;
class Inbound {
constructor(name, domainEnabled, domainId, inboundDomain, inboundPriority, forwards, matchFilter, catchFilter) {
this.name = name;
this.domain_enabled = domainEnabled;
this.domain_id = domainId;
this.inbound_domain = inboundDomain;
this.inbound_priority = inboundPriority;
this.forwards = forwards;
this.match_filter = matchFilter;
this.catch_filter = catchFilter;
}
setDomainId(domainId) {
this.domain_id = domainId;
return this;
}
setName(name) {
this.name = name;
return this;
}
setDomainEnabled(domainEnabled) {
this.domain_enabled = domainEnabled;
return this;
}
setInboundDomain(inboundDomain) {
this.inbound_domain = inboundDomain;
return this;
}
setInboundPriority(inboundPriority) {
this.inbound_priority = inboundPriority;
return this;
}
setForwards(forwards) {
this.forwards = forwards;
return this;
}
setMatchFilter(matchFilter) {
this.match_filter = matchFilter;
return this;
}
setCatchFilter(catchFilter) {
this.catch_filter = catchFilter;
return this;
}
}
exports.Inbound = Inbound;
class InboundUpdateParams {
constructor(name, domainEnabled, inboundDomain, inboundPriority, forwards, matchFilter, catchFilter) {
this.name = name;
this.domain_enabled = domainEnabled;
this.inbound_domain = inboundDomain;
this.inbound_priority = inboundPriority;
this.forwards = forwards;
this.match_filter = matchFilter;
this.catch_filter = catchFilter;
}
setName(name) {
this.name = name;
return this;
}
setDomainEnabled(domainEnabled) {
this.domain_enabled = domainEnabled;
return this;
}
setInboundDomain(inboundDomain) {
this.inbound_domain = inboundDomain;
return this;
}
setInboundPriority(inboundPriority) {
this.inbound_priority = inboundPriority;
return this;
}
setForwards(forwards) {
this.forwards = forwards;
return this;
}
setMatchFilter(matchFilter) {
this.match_filter = matchFilter;
return this;
}
setCatchFilter(catchFilter) {
this.catch_filter = catchFilter;
return this;
}
}
exports.InboundUpdateParams = InboundUpdateParams;
var InboundFilterType;
(function (InboundFilterType) {
InboundFilterType["CATCH_ALL"] = "catch_all";
InboundFilterType["CATCH_RECIPIENT"] = "catch_recipient";
InboundFilterType["MATCH_ALL"] = "match_all";
InboundFilterType["MATCH_SENDER"] = "match_sender";
InboundFilterType["MATCH_DOMAIN"] = "match_domain";
InboundFilterType["MATCH_HEADER"] = "match_header";
})(InboundFilterType || (exports.InboundFilterType = InboundFilterType = {}));
var ComparerType;
(function (ComparerType) {
ComparerType["EQUAL"] = "equal";
ComparerType["NOT_EQUAL"] = "not-equal";
ComparerType["CONTAINS"] = "contains";
ComparerType["NOT_CONTAINS"] = "not-contains";
ComparerType["STARTS_WITH"] = "starts-with";
ComparerType["ENDS_WITH"] = "ends-with";
ComparerType["NOT_STARTS_WITH"] = "not-starts-with";
ComparerType["NOT_ENDS_WITH"] = "not-ends-with";
})(ComparerType || (exports.ComparerType = ComparerType = {}));