ts-mailcow-api
Version:
TypeScript wrapper for the mailcow API.
27 lines • 882 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.appPasswordEndpoints = appPasswordEndpoints;
const APP_PASSWORD_ENDPOINTS = {
ADD: 'add/app-passwd',
DELETE: 'delete/app-passwd',
GET: 'get/app-passwd/all/',
};
/**
* Binder function between the MailcowClient class and the AppPasswordEndpoints.
* @param bind - The MailcowClient instance to bind.
* @internal
*/
function appPasswordEndpoints(bind) {
return {
add(payload) {
return bind.requestFactory.post(APP_PASSWORD_ENDPOINTS.ADD, payload);
},
delete(payload) {
return bind.requestFactory.post(APP_PASSWORD_ENDPOINTS.DELETE, payload);
},
get(mailbox) {
return bind.requestFactory.get(`${APP_PASSWORD_ENDPOINTS.GET}${mailbox}`);
},
};
}
//# sourceMappingURL=app-password-endpoints.js.map