UNPKG

projectmanager-sdk

Version:

Software development kit for the ProjectManager.com API. for TypeScript

64 lines 2.56 kB
/** * ProjectManager API for TypeScript * * (c) ProjectManager.com, Inc. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @author ProjectManager.com <support@projectmanager.com> * @copyright ProjectManager.com, Inc. * @link https://github.com/projectmgr/projectmanager-sdk-typescript */ export class TaskTagClient { client; /** * Internal constructor for this client library */ constructor(client) { this.client = client; } /** * Replaces the existing TaskTags on a Task with a newly provided list of TaskTags. * * A TaskTag is a connection between a Task and a Tag. Each Task can have zero, one or many * TaskTags associated with it. TaskTags can be assigned and removed from the Task to help you * classify your Tasks and prioritize work. * * @param taskId The unique identifier of the Task for which we will replace TaskTags * @param body The replacement list of TaskTags for this Task */ replaceTaskTags(taskId, body) { const url = `/api/data/tasks/${taskId}/tags`; return this.client.request("post", url, null, body); } /** * Add one or more new TaskTags to a Task. * * A TaskTag is a connection between a Task and a Tag. Each Task can have zero, one or many * TaskTags associated with it. TaskTags can be assigned and removed from the Task to help you * classify your Tasks and prioritize work. * * @param taskId The unique identifier of the Task for which we will add TaskTags * @param body The new TaskTags to add to this Task */ addTaskTagtoTask(taskId, body) { const url = `/api/data/tasks/${taskId}/tags`; return this.client.request("put", url, null, body); } /** * Removes one or more existing TaskTags from a Task. * * A TaskTag is a connection between a Task and a Tag. Each Task can have zero, one or many * TaskTags associated with it. TaskTags can be assigned and removed from the Task to help you * classify your Tasks and prioritize work. * * @param taskId The unique identifier of the Task for which we will remove existing TaskTags * @param body The TaskTags to remove from this Task */ removeTaskTagfromTask(taskId, body) { const url = `/api/data/tasks/${taskId}/tags`; return this.client.request("delete", url, null, body); } } //# sourceMappingURL=TaskTagClient.js.map