ts-mailcow-api
Version:
TypeScript wrapper for the mailcow API.
22 lines • 684 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.resourceEndpoints = resourceEndpoints;
const RESOURCE_ENDPOINTS = {
CREATE: 'add/resource',
DELETE: 'delete/resource',
GET: 'get/resource/all',
};
function resourceEndpoints(bind) {
return {
create(payload) {
return bind.requestFactory.post(RESOURCE_ENDPOINTS.CREATE, payload);
},
delete(payload) {
return bind.requestFactory.post(RESOURCE_ENDPOINTS.DELETE, payload.names);
},
get() {
return bind.requestFactory.get(RESOURCE_ENDPOINTS.GET);
},
};
}
//# sourceMappingURL=resource-endpoints.js.map