Options
All
  • Public
  • Public/Protected
  • All
Menu

A class representing a single User

Hierarchy

  • BoundEntity<User, UserEntity>
    • User

Index

Properties

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

Accessors

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

    Returns boolean

Methods

  • 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]]

    Parameters

    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)

    Parameters

    Returns Paginator<GetPublicDocumentsFilteredVariables, GetPublicDocumentsFiltered_publicDocuments, Document>

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

    Parameters

    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

    Parameters

    • id: string

      The ID of the document

    Returns Promise<Document>

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

    Returns Promise<void>

Generated using TypeDoc