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