UNPKG

ts-mailcow-api

Version:
27 lines 846 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.oauth2Endpoints = oauth2Endpoints; const OAUTH2_ENDPOINTS = { ADD: 'add/oauth2-client', DELETE: 'delete/oauth2-client', GET: 'get/oauth2-client/', }; /** * Binder function between the MailcowClient class and the OAuth2Endpoints. * @param bind - The MailcowClient instance to bind. * @internal */ function oauth2Endpoints(bind) { return { add(payload) { return bind.requestFactory.post(OAUTH2_ENDPOINTS.ADD, payload); }, delete(payload) { return bind.requestFactory.post(OAUTH2_ENDPOINTS.DELETE, payload.items); }, get(payload) { return bind.requestFactory.get(`${OAUTH2_ENDPOINTS.GET}${payload.id}`); }, }; } //# sourceMappingURL=oauth2-endpoints.js.map