• Public
  • Public/Protected
  • All

A class representing a single User


  • BoundEntity<User, UserEntity>
    • User



id: string

The ID of the user

userName: string

The users username

email: string

The users email

type: UserTypes

The type of user

__type: keyof EntityStateMetadata
pageNumber?: number

The page number that the user is currently viewer. Will only be set if the enableConnectedUsers parameter was set to true


  • get isSelf(): boolean
  • A boolean representing if the user is the currently signed in user

    Returns boolean


  • Gets all documents for the current user

    WARNING: This function can become slow if the user belongs to a lot of documents. It is recommended to use "getDocumentPaginator" instead

    Returns Promise<Document[]>

  • Creates a document entity in the database. The author of the document will be this user. Throws an error if called on a User instance that is not the currently signed in user.

    To display the resulting document in the viewer, call the Document.view function on the resulting [[Document]]


    Returns Promise<Document>

  • Gets an instance of Paginator class which can be used to retrieve all public documents (even ones the user does not belong to)


    Returns Paginator<GetPublicDocumentsFilteredVariables, GetPublicDocumentsFiltered_publicDocuments, Document>

  • Gets an instance of Paginator class which can be used to retrieve user documents


    Returns Paginator<GetDocumentsFilteredVariables, GetDocumentsFiltered_documents, Document>

  • getDocument(id: string): Promise<Document>
  • Gets a [[Document]] belonging to the user. Returns null if the document could not be found


    • id: string

      The ID of the document

    Returns Promise<Document>

  • logout(): Promise<void>
  • Logs out the current user.

    Returns Promise<void>

Generated using TypeDoc