BetaOptionalanchor?: CommentAnchorOptionalcommentId?: stringReuse the id of a failed comment to retry it. Defaults to a new id.
Optionalcontext?: Record<string, unknown>Ambient information stored alongside the comment, for the writing app's own use. Deliberately loose: the comment API treats this as free-form, so no shape is worth promising.
OptionaldocumentRevisionId?: stringThe _rev of the document when the comment was written.
Not filled in automatically: the SDK's local document revision is replaced by a transaction id while an edit is in flight, so it can name a revision that never reached the server.
OptionalfieldPath?: string | PathWhich field the thread hangs off, for example title or
body[_key=="intro"].content.
Leave it out, or pass '' or [], to comment on the document as a whole.
Such a comment is written without a path and reads back with
fieldPath: ''. The Studio's field comments leave these out, so they don't
show in its comments inspector.
OptionalthreadId?: stringDefaults to a new id, which starts a new thread.
Anchors the comment to a run of text inside the field, by offset into the Portable Text blocks it spans. Leave it out for a field-level comment.
The API resolves it into the stored selection and content snapshot, so what comes back is Comment.selection rather than the anchor itself.