UNPKG

@eleva-io/erp-sdk

Version:

SDK oficial para el ERP de Eleva

47 lines 1.82 kB
import { CRUD } from '../../../../utils/crud'; import { TicketingTaskFollowersAPI } from './followers'; import { TicketingTaskConversationsAPI } from './conversations'; import { TicketingTaskActivityLogsAPI } from './activity_logs'; import { TicketingTaskAttachmentsAPI } from './attachments'; import { TicketingTaskResourcesAPI } from './resources'; export class TicketingTasksAPI extends CRUD { _taskId; constructor(httpClient, baseUrl, _taskId) { super(httpClient, { basePath: baseUrl, id: _taskId, }); this._taskId = _taskId; } followers() { if (!this._taskId) { throw new Error('Task ID is required'); } return new TicketingTaskFollowersAPI(this._httpClient, `${this._config.basePath}/${this._taskId}/followers`); } conversations() { if (!this._taskId) { throw new Error('Task ID is required'); } return new TicketingTaskConversationsAPI(this._httpClient, `${this._config.basePath}/${this._taskId}/conversations`); } activityLogs() { if (!this._taskId) { throw new Error('Task ID is required'); } return new TicketingTaskActivityLogsAPI(this._httpClient, `${this._config.basePath}/${this._taskId}/activity-logs`); } attachments() { if (!this._taskId) { throw new Error('Task ID is required'); } return new TicketingTaskAttachmentsAPI(this._httpClient, `${this._config.basePath}/${this._taskId}/attachments`); } resources() { if (!this._taskId) { throw new Error('Task ID is required'); } return new TicketingTaskResourcesAPI(this._httpClient, `${this._config.basePath}/${this._taskId}/resources`); } } //# sourceMappingURL=tasks.js.map