ts-mailcow-api
Version:
TypeScript wrapper for the mailcow API.
26 lines • 849 B
JavaScript
;
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