Skip to content
Document Authoring DA  API Docs v1.20.0
npmGitHub

DocAuthDocumentEventsNEW

DocAuthDocumentEvents:

Events emitted by a DocAuthDocument.

Lifecycle events are emitted after a transaction commits and are batched by event kind, with at most one emission of each kind per transaction. A revision that disappears without an explicit accept, reject, or withdraw intent does not emit a revision lifecycle event.

revision.created: RevisionEventPayload

Fired when one or more tracked-change revisions are created.


revision.edited: RevisionEventPayload

Fired when one or more existing tracked-change revisions are edited.


revision.accepted: RevisionEventPayload

Fired when one or more tracked-change revisions are accepted.


revision.rejected: RevisionEventPayload

Fired when one or more tracked-change revisions are rejected.


revision.withdrawn: RevisionEventPayload

Fired when one or more tracked-change revisions are withdrawn.


comment.threadAdded: CommentEventPayload

Fired when one or more comment threads are added.


comment.replied: CommentEventPayload

Fired when one or more replies are added to comment threads.


comment.edited: CommentEventPayload

Fired when the text of one or more comments or replies is edited.


comment.resolved: CommentEventPayload

Fired when one or more comment threads are resolved.


comment.unresolved: CommentEventPayload

Fired when one or more comment threads are marked unresolved.


comment.removed: CommentEventPayload & object

Fired when one or more comments are removed.

reason is removed for an explicit removal and anchor-deleted when the comment disappears because its document anchor was deleted. Removing a thread also treats its removed replies as explicit removals. If one transaction mixes explicit removals and anchor-deleted comments, the event fires once per reason, each carrying its own ids.

reason: "removed" | "anchor-deleted"


content.change: void

Fired after every committed transaction following document initialization.