mailinator-client
Version:
Mailinator REST API client for JavaScript applications.
22 lines (21 loc) • 879 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PrivateInboxWebhookRequest = void 0;
const MailinatorRestClient_1 = __importDefault(require("../MailinatorRestClient"));
const _resolveTemplateUrl = (whToken, inbox) => {
return `https://api.mailinator.com/api/v2/domains/private/webhook/${inbox}/?whtoken=${whToken}`;
};
class PrivateInboxWebhookRequest {
constructor(whToken, inbox, webhook) {
this.whToken = whToken;
this.inbox = inbox;
this.webhook = webhook;
}
execute() {
return MailinatorRestClient_1.default.create(_resolveTemplateUrl(this.whToken, this.inbox), this.webhook);
}
}
exports.PrivateInboxWebhookRequest = PrivateInboxWebhookRequest;