This model implements the possibility of adding a document into a journal and keeping track of the list of the documents.

Hierarchy (view full)

Constructors

Properties

channelManager: default
onUpdated: OEvent<((timeOfEarliestChange: Date) => void)> = ...
state: StateMachine<"Uninitialised" | "Initialised", "shutdown" | "init">
channelId: "document" = 'document'

Methods

  • Create a new reference to a document.

    Parameters

    • document: ArrayBuffer

      The document.

    • mimeType: string
    • documentName: string
    • channelId: string = DocumentModel.channelId

      The default is DocumentModel.channelId

    • OptionalchannelOwner: null | SHA256IdHash<Person>

    Returns Promise<void>

  • Convert from one representation to model representation.

    Parameters

    Returns Promise<ArrayBuffer>

    The corresponding model object

  • Initialize this instance

    This must be done after the one instance was initialized.

    Returns Promise<void>