UNPKG

@eleva-io/erp-sdk

Version:

SDK oficial para el ERP de Eleva

32 lines 938 B
import { CRUD } from '../../../../utils'; export class IAMAgentsAPI { _httpClient; _baseUrl; _crud; constructor(_httpClient, _baseUrl) { this._httpClient = _httpClient; this._baseUrl = _baseUrl; this._crud = new 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`); } } //# sourceMappingURL=agents.js.map