ts-mailcow-api
Version:
TypeScript wrapper for the mailcow API.
29 lines • 884 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.queueManagerEndpoints = queueManagerEndpoints;
const QUEUE_MANAGER_ENDPOINTS = {
DELETE: 'delete/mailq',
GET: 'get/mailq/all',
FLUSH: 'edit/mailq',
};
/**
* Binder function between the MailcowClient class and the QueueManagerEndpoints.
* @param bind - The MailcowClient to bind.
* @internal
*/
function queueManagerEndpoints(bind) {
return {
delete(action) {
return bind.requestFactory.post(QUEUE_MANAGER_ENDPOINTS.DELETE, {
action,
});
},
get() {
return bind.requestFactory.get(QUEUE_MANAGER_ENDPOINTS.GET);
},
flush(action) {
return bind.requestFactory.post(QUEUE_MANAGER_ENDPOINTS.FLUSH, { action });
},
};
}
//# sourceMappingURL=queue-manager-endpoints.js.map