organization
as the account belonging to a company (e.g., Company A). This account may have several users
(Company A employees). A document
will be any file created within the organization (e.g., document, spreadsheet, slides, etc.). A location
will be any child section within the document (e.g., slide within a presentation).setDocuments
method.organizationId
or folderId
, with support for pagination.documentId
can see and interact with each other’s activity, like presence, cursors, comments etc.documents
: Document[]options?
: SetDocumentsRequestOptionsdata-velt-document-id
attribute to the container that contains the document
.organizationId
of the target document in the document metadata.DocumentMetadata
object.documentId
: The unique identifier for the document.metadata
: (optional) This is a key/value pair object where you can set metadata about the document such as documentName
. documentName is a special field that we use to display the document name in some Velt Components.id
(required): A unique identifier for the location that can be used to reference it laterlocationName
(recommended): A human-readable name displayed in Velt components like the VeltCommentsSideBar
locations
: Location[]options?
: SetLocationsRequestOptions
rootLocationId
: The id of the location that will be set as the root location. If you don’t specify this, the first location will be set as the root location.appendLocation
: If you want to append new locations to the existing locations, set this to true
.data-velt-location-id
attribute to the container that contains the location
.true
parameter.User
is anyone authenticated with the Velt SDK.@mentions
, and alongside their avatar in presence and cursor features.@mention
other users. By default, the contact list for the @mention
feature includes users from:
@here
: This is a special group that includes only the users explicitly added on the document. This doesn’t include organization users or organization user groups.userId
.user
: UserretryConfig
: AuthRetryConfiggenerateToken
: () => Promise<string>
identify
method with the user
object and a JWT token.identify
method again with the forceReset
option set to true
.Default: false
identify
method again.
This will ensure we clean up the current user session and start a new session with the new user.
Folder
and Document
resources.
public
: default
Any user who successfully initializes the given Velt resource can access the resource data whether or not they are part of the resource.organizationPrivate
: All users in the same organization as the resource can access the resource.restricted
: Only users explicitly added to the resource will have access.