An attachment fetch event used when the attachment's download has completed.
An attachment fetch event used when the attachment is deleted.
An attachment fetch event used when the attachment's download progressed but is not yet complete.
The types of attachment fetch events that can be delivered to an attachment
fetcher's callback
.
Provides info about the authentication status.
Returns true
if authenticated, otherwise returns false
.
If authenticated, returns the userID
if one was provided by the
authentication service. Otherwise returns null
.
The source for a transport condition.
Closure that Logger.setCustomLogCallback can be set as a custom log callback on Logger.
Represents a unique identifier for a Document.
This is used whenever you can access the document content properties directly via the document.
A document value is a JavaScript object containing values for keys that can be serialized via CBOR.
The various identity configurations that you can use when initializing a
Ditto
instance.
Available options for init().
You can explicitly pass the WebAssembly module or its location via the
webAssemblyModule
option. By default, Ditto tries to load the WebAssembly
module from the same path where this JavaScript is served.
Represents events delivered by a LiveQuery, which can be initial (fired immediately upon registration) or an update (all subsequent events).
The log levels supported by Ditto.
This is used whenever you can access and update the document content properties directly via the document.
Types of connections that can be established between two peers.
Represents a dictionary of values to be incorporated into a query keyed by the placeholder used within that query. See method find() of Collection for more info.
The closure that is called whenever the documents covered by a live query change.
A peer object with information about an observed peer.
The closure that is called whenever a single documunent covered by a live query changes.
Describes the direction when sorting a query.
Types of connections that can be established between two peers.
The types of an UpdateResult.
Various options to pass the web assembly module to Ditto.
Defines the various strategies available when inserting a document into a collection.
merge
: the existing document will be merged with the document being
inserted, if there is a pre-existing document.
overwrite
: an existing document will be overwritten. This can be thought
of as first removing the existing document completely and then inserting
the new document in its place, if there is a pre-existing document.
insertIfAbsent
: insert the document only if there is not already a
document with the same ID in the store. If there is already a document in
the store with the same ID then this will be a no-op.
insertDefaultIfAbsent
: insert the document, with its contents treated as
default data, only if there is not already a document with the same ID in
the store. If there is already a document in the store with the same ID
then this will be a no-op. Use this strategy if you want to insert default
data for a given document ID, which you want to treat as common initial
data amongst all peers and that you expect to be mutated or overwritten in
due course.
The list of identity types that require activation through an offlineLicenseToken
Initializes the whole Ditto module. Needs to be called and complete before any of the Ditto API is used.
Dictionary with global initialization options.
A representation of the events that can occur in relation to an attachment fetch.
There are three different attachment fetch events:
Completed
,Progress
, orDeleted
.There will be at most one
Completed
orDeleted
event per attachment fetch. There can be manyProgress
events delivered for each attachment fetch.Updates relating to an attachment fetch are delivered by registering an AttachmentFetcher through a call to fetchAttachment() on a Collection instance.