client.commentsOperation methods
Parameter declarations below are taken from the pinned TypeScript source. Request fields and responses are summarized from the matching OpenAPI operation; follow the API link for every field, constraint, example, and error description.
/commentscomments.list
Returns strict comment DTOs for one tenant-owned task, project, or contact after target-domain scope and plan authorization.
client.comments.list(options: CommentListOptions)- Return form
Promise- Operation ID
listComments- Required scopes
comments:read- Conditional scopes
contacts:readprojects:readtasks:read- SDK parameters
options: CommentListOptions- Query request fields
cursor?: stringlimit?: integerarchived?: booleantargetType: stringtargetId: string- Success
200 Array<Comment> envelope
/commentscomments.create
Creates plain-text product comments with canonical active-member mentions. Attachments and rich internal payloads are not accepted.
client.comments.create(data: CommentCreate, options: MutationOptions = {})- Return form
Promise- Operation ID
createComment- Required scopes
comments:write- Conditional scopes
contacts:readprojects:readtasks:read- SDK parameters
data: CommentCreateoptions: MutationOptions- Header request fields
Idempotency-Key: string- Request body
CommentCreateapplication/json- Success
201 Comment envelope
/comments/{id}comments.get
Use this operation to get a comment. It returns the resource only when it belongs to the authenticated workspace and is visible to the credential. Required scopes, product permissions, sharing rules, workspace locks, and regional cell ownership are enforced for every request.
client.comments.get(id: string, options?: RequestOptions)- Return form
Promise- Operation ID
getComment- Required scopes
comments:read- Conditional scopes
contacts:readprojects:readtasks:read- SDK parameters
id: stringoptions: RequestOptions- Path request fields
id: string- Success
200 Comment envelope
/comments/{id}comments.archive
Requires the latest strong resource ETag. The cell-local App re-authenticates and atomically applies the tenant-bound revision before returning a fresh ETag.
client.comments.archive(id: string, options: CommentMutationOptions)- Return form
Promise- Operation ID
archiveComment- Required scopes
comments:write- Conditional scopes
contacts:readprojects:readtasks:read- SDK parameters
id: stringoptions: CommentMutationOptions- Path request fields
id: string- Header request fields
If-Match: string- Success
200 Comment envelope
/comments/{id}/restorecomments.restore
Requires the latest strong resource ETag. The cell-local App re-authenticates and atomically applies the tenant-bound revision before returning a fresh ETag.
client.comments.restore(id: string, options: CommentMutationOptions)- Return form
Promise- Operation ID
restoreComment- Required scopes
comments:write- Conditional scopes
contacts:readprojects:readtasks:read- SDK parameters
id: stringoptions: CommentMutationOptions- Path request fields
id: string- Header request fields
If-Match: string- Success
200 Comment envelope
Convenience helpers
These typed helpers compose mapped operations. They do not grant scopes or bypass API limits.
comments.pages
Iterate cursor pages with a bounded PaginationOptions policy.
client.comments.pages(options: CommentListOptions, pagination?: PaginationOptions)Returns AsyncGeneratorErrors and transport metadata
HTTP failures reject with TeamGridApiError, including the status, stable error documents, request ID, optional retry delay, and transport metadata. Local validation, routing, timeout, response-size, and pagination failures reject withTeamGridClientError and a stable client error code. Successful envelopes expose non-enumerable transport metadata.
See pagination and errors andclient configuration for handling guidance.