@eleva-io/erp-sdk
Version:
SDK oficial para el ERP de Eleva
36 lines • 1.09 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.IAMAgentsAPI = void 0;
const utils_1 = require("../../../../utils");
class IAMAgentsAPI {
_httpClient;
_baseUrl;
_crud;
constructor(_httpClient, _baseUrl) {
this._httpClient = _httpClient;
this._baseUrl = _baseUrl;
this._crud = new utils_1.CRUD(this._httpClient, {
basePath: this._baseUrl,
});
}
async getSupervisors(id) {
return this._httpClient.get(`${this._baseUrl}/${id}/supervisors`);
}
async getSubordinates(id) {
return this._httpClient.get(`${this._baseUrl}/${id}/subordinates`);
}
async create(data) {
return this._crud.create(data);
}
async update(id, data) {
return this._crud.update(id, data);
}
async find(query) {
return this._crud.find(query);
}
async regeneratePassword(id) {
return this._httpClient.post(`${this._baseUrl}/${id}/regenerate-password`);
}
}
exports.IAMAgentsAPI = IAMAgentsAPI;
//# sourceMappingURL=agents.js.map