ts-mailcow-api
Version:
TypeScript wrapper for the mailcow API.
35 lines • 1.22 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.domainAdminEndpoints = domainAdminEndpoints;
const DOMAIN_ADMIN_ENDPOINTS = {
CREATE: 'add/domain-admin',
ISSUE_SSO_TOKEN: 'add/sso/domain-admin',
EDIT: 'edit/domain-admin',
DELETE: 'delete/domain-admin',
GET_ALL: 'get/domain-admin/all',
};
/**
* Binder function between the MailcowClient class and the DomainAdminEndpoints.
* @param bind - The MailcowClient instance to bind.
* @internal
*/
function domainAdminEndpoints(bind) {
return {
create(payload) {
return bind.requestFactory.post(DOMAIN_ADMIN_ENDPOINTS.CREATE, payload);
},
issueSsoToken(payload) {
return bind.requestFactory.post(DOMAIN_ADMIN_ENDPOINTS.ISSUE_SSO_TOKEN, payload);
},
edit(payload) {
return bind.requestFactory.post(DOMAIN_ADMIN_ENDPOINTS.EDIT, payload);
},
delete(payload) {
return bind.requestFactory.post(DOMAIN_ADMIN_ENDPOINTS.DELETE, payload.items);
},
get() {
return bind.requestFactory.get(DOMAIN_ADMIN_ENDPOINTS.GET_ALL);
},
};
}
//# sourceMappingURL=domain-admin-endpoints.js.map