mailinator-client
Version:
Mailinator REST API client for JavaScript applications.
18 lines (17 loc) • 651 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PublicInboxWebhookRequest = void 0;
const MailinatorRestClient_1 = require("../MailinatorRestClient");
const _resolveTemplateUrl = (inbox) => {
return `https://api.mailinator.com/api/v2/domains/public/webhook/${inbox}`;
};
class PublicInboxWebhookRequest {
constructor(inbox, webhook) {
this.inbox = inbox;
this.webhook = webhook;
}
execute() {
return MailinatorRestClient_1.default.create(_resolveTemplateUrl(this.inbox), this.webhook);
}
}
exports.PublicInboxWebhookRequest = PublicInboxWebhookRequest;