UNPKG

@eleva-io/erp-sdk

Version:

SDK oficial para el ERP de Eleva

51 lines 1.99 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TicketingTasksAPI = void 0; const crud_1 = require("../../../../utils/crud"); const followers_1 = require("./followers"); const conversations_1 = require("./conversations"); const activity_logs_1 = require("./activity_logs"); const attachments_1 = require("./attachments"); const resources_1 = require("./resources"); class TicketingTasksAPI extends crud_1.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 followers_1.TicketingTaskFollowersAPI(this._httpClient, `${this._config.basePath}/${this._taskId}/followers`); } conversations() { if (!this._taskId) { throw new Error('Task ID is required'); } return new conversations_1.TicketingTaskConversationsAPI(this._httpClient, `${this._config.basePath}/${this._taskId}/conversations`); } activityLogs() { if (!this._taskId) { throw new Error('Task ID is required'); } return new activity_logs_1.TicketingTaskActivityLogsAPI(this._httpClient, `${this._config.basePath}/${this._taskId}/activity-logs`); } attachments() { if (!this._taskId) { throw new Error('Task ID is required'); } return new attachments_1.TicketingTaskAttachmentsAPI(this._httpClient, `${this._config.basePath}/${this._taskId}/attachments`); } resources() { if (!this._taskId) { throw new Error('Task ID is required'); } return new resources_1.TicketingTaskResourcesAPI(this._httpClient, `${this._config.basePath}/${this._taskId}/resources`); } } exports.TicketingTasksAPI = TicketingTasksAPI; //# sourceMappingURL=tasks.js.map