UNPKG

projectmanager-sdk

Version:

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

61 lines (60 loc) 2.31 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 */ import { ProjectManagerClient } from "../index.js"; import { AstroResult } from "../index.js"; import { DiscussionCommentDto } from "../index.js"; import { DiscussionCommentCreateResponseDto } from "../index.js"; import { DiscussionCommentCreateDto } from "../index.js"; export declare class DiscussionClient { private readonly client; /** * Internal constructor for this client library */ constructor(client: ProjectManagerClient); /** * Retrieve all comments written about a task * * @param taskId The unique ID number of the task to retrieve comments */ retrieveTaskComments(taskId: string): Promise<AstroResult<DiscussionCommentDto[]>>; /** * Adds a Markdown-formatted comment to a task. * * Tasks can have discussions attached to them. These discussions can include text with simple * formatting. Discussion comments are formatted using [Markdown](https://www.markdownguide.org/) * and users should be aware that HTML embedding is not permitted due to the risk of cross-site * attacks and other embedding challenges. * * @param taskId The unique ID number of the task being commented upon * @param body The Markdown-formatted text of the comment */ createTaskComment(taskId: string, body: DiscussionCommentCreateDto): Promise<AstroResult<DiscussionCommentCreateResponseDto>>; /** * Puts a thumbsup on a comment * * @param commentId the id of the comment */ likeComment(commentId: string): Promise<AstroResult<object>>; /** * Unlike a comment that was previously liked * * @param commentId the id of the comment */ unlikeComment(commentId: string): Promise<AstroResult<object>>; /** * Removes a comment by it's id * * @param commentId Remove a comment */ removeComment(commentId: string): Promise<AstroResult<object>>; }