AnnotationsApi.reply()
Writes a reply to the comment with that id. Edit a reply with
update(…, { contents }), remove it with delete(). Needs the annotations feature.methodCommentssince 1.0.0
Signature
reply(id: string, reply: NewReply, options?: SignedDocumentOptions): Promise<string>
Parameters
| Parameter | Type | Description |
|---|---|---|
| id | string | The comment's id. |
| reply | NewReply | { contents, author? }; author omitted is ''. |
| options? | SignedDocumentOptions | { invalidateSignatures? }. |
Returns
Promise<string> The reply's id.
Throws
INVALID_ARGUMENT— an id no annotation has, the annotation is not a comment (a link, a form field, a pop-up, a status entry), orcontentsis empty.PAGE_ERROR— the reply could not be written.FEATURE_NOT_LICENSED— the license lacksannotations.DOCUMENT_CLOSED— the document has been closed.INVALID_STATE— a certified document whose certification forbids it, unlessoptions.invalidateSignatures; or a progressive document still downloading.
Example
TypeScript
const replyId = await doc.annotations.reply(id, { contents: 'Agreed', author: 'Ann' });