UNPKG

ts-mailcow-api

Version:
26 lines 849 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.antiSpamEndpoints = antiSpamEndpoints; const ANTI_SPAM_ENDPOINTS = { CREATE: 'add/domain-policy', DELETE: 'delete/domain-policy', }; /** * Binder function between the MailcowClient class and the AntiSpamEndpoints * @param bind - The MailcowClient to bind. * @internal */ function antiSpamEndpoints(bind) { return { create(payload) { return bind.requestFactory.post(ANTI_SPAM_ENDPOINTS.CREATE, payload); }, delete(payload) { return bind.requestFactory.post(ANTI_SPAM_ENDPOINTS.DELETE, payload.prefid); }, get(payload) { return bind.requestFactory.get(`get/policy_${payload.type}_domain/${payload.domain}`); }, }; } //# sourceMappingURL=antispam-endpoints.js.map