The ID of the document
The name of the document
Whether or not the document is public
The total number of unread annotations on the document
The author of the document
Gets a list of users currently connected to the document. Throws an error if "enableConnectedUsers" is not set
Determines if the current user is a member of the document
Returns all the mentions of the current user for this document
Marks all annotations for this document as read for the current user
Determines if the current user can join the document. The criteria for joining a document are:
Leaves the current document Returns a boolean representing if the operation was successful
Adds the current user to the document. Returns true on success, or false if not allowed.
Invites a list of users to a document
Creates a scroll sync session for the current document
Gets a list of all members of the document
An array of User classes
Create a snapshot of document The snapshot can be used to revert a document back to an older version.
Throws if the user does not have permissions to create a snapshot.
The name of the snapshot
Gets a list of all annotations for the document.
Throws if the user does not have permission to view annotations.
Copies all annotations from this document to another document.
Throws if the documentId provided does not exist, or the user does not have permissions to perform this action.
The ID of the document to copy to
Fetches all snapshots for the document.
Warning: This function can become slow if a lot of snapshots belong to the document. It is recommended to use "getSnapshotPaginator" instead to help prevent over fetching.
Throws if user does not have permissions to read snapshots.
Returns a Paginator that can be used to fetch document snapshots
Parameters to set for the paginator
Syncs annotations from the provided document to the the database. The following operations will take place:
Returns an object indicating the annotations that were added and edited
Loads this document in the viewer
Edits a document.
Throws if the user does not have permission to edit the document.
Properties to edit. At least one key is required
The new name for the document
Toggle if the document is public or not
Fired when anything about this document changes
Returns a function that can be called to unsubscribe from the event
Fired when the document is deleted
Returns a function that can be called to unsubscribe from the event
Fired when a snapshot of the document is created
Returns a function that can be called to unsubscribe from the event
Fired when a user connects, disconnects, or changes the page they are viewing. Only triggered if the "enableConnectedUsers" feature is enabled
Returns a function that can be called to unsubscribe from the event
A boolean representing if the current user is the author of the document
Generated using TypeDoc
A class representing a Document
Warning: Should not be instantiated directly. Please retrieve Document instances from functions on the [[User]] class