Retrieves a list of comments for a file.
This operation is performed by calling function getFileComments.
See the endpoint docs at API Reference.
await client.comments.getFileComments(fileId);
string
https://*.app.box.com/files/123 the file_id is 123. Example: “12345”GetFileCommentsOptionalsInputThis function returns a value of type Comments.
Returns a collection of comment objects. If there are no comments on this file an empty collection will be returned.
Retrieves the message and metadata for a specific comment, as well as information on the user who created the comment.
This operation is performed by calling function getCommentById.
See the endpoint docs at API Reference.
await client.comments.getCommentById(newComment.id!);
string
GetCommentByIdOptionalsInputThis function returns a value of type CommentFull.
Returns a full comment object.
Update the message of a comment.
This operation is performed by calling function updateCommentById.
See the endpoint docs at API Reference.
await client.comments.updateCommentById(newReplyComment.id!, {
requestBody: { message: newMessage } satisfies UpdateCommentByIdRequestBody,
} satisfies UpdateCommentByIdOptionalsInput);
string
UpdateCommentByIdOptionalsInputThis function returns a value of type CommentFull.
Returns the updated comment object.
Permanently deletes a comment.
This operation is performed by calling function deleteCommentById.
See the endpoint docs at API Reference.
await client.comments.deleteCommentById(newComment.id!);
string
DeleteCommentByIdOptionalsInputThis function returns a value of type undefined.
Returns an empty response when the comment has been deleted.
Adds a comment by the user to a specific file, or as a reply to an other comment.
This operation is performed by calling function createComment.
See the endpoint docs at API Reference.
await client.comments.createComment({
message: message,
item: {
id: fileId,
type: 'file' as CreateCommentRequestBodyItemTypeField,
} satisfies CreateCommentRequestBodyItemField,
} satisfies CreateCommentRequestBody);
CreateCommentRequestBody
CreateCommentOptionalsInputThis function returns a value of type CommentFull.
Returns the newly created comment object.
Not all available fields are returned by default. Use the fields query parameter to explicitly request any specific fields.