Classes

Classes

Client
Expr
BadRequest
ClientClosed
FaunaError
FaunaHTTPError
InternalError
InvalidArity
InvalidValue
MethodNotAllowed
NotFound
PermissionDenied
StreamError
StreamErrorEvent
StreamsNotSupported
TooManyRequests
Unauthorized
UnavailableError
Subscription
Bytes
FaunaDate
FaunaTime
Query
Ref
SetRef
Value
PageHelper
RequestResult

Events


error

An error event is fired both for client and server errors that may occur as a result of a subscription.

Type: object
Properties:
Name Type Argument Default Description
type string 'error'

The event type.

txn number <nullable>

The event's transaction timestamp.

event Error

The underlying error.


history_rewrite

A history rewrite event occurs upon any modifications to the history of the subscribed document.

Type: object
Properties:
Name Type Default Description
type string 'history_rewrite'

The event type.

txn number

The event's transaction timestamp.

event object

The event's data.


snapshot

A snapshot event. A snapshot event is fired once the document stream helper finishes loading the subscribed document's snapshot data. See Client#stream for more details on the document stream helper.

Type: object
Properties:
Name Type Default Description
type string 'snapshot'

The event type.

txn number

The event's transaction timestamp.

event object

The event's data.


start

Stream's start event. A stream subscription always begins with a start event. Upcoming events are guaranteed to have transaction timestamps equal to or greater than the stream's start timestamp.

Type: object
Properties:
Name Type Default Description
type string 'start'

The event type.

txn number

The event's transaction timestamp.

event module:number

The stream start timestamp.


version

A version event occurs upon any modifications to the current state of the subscribed document.

Type: object
Properties:
Name Type Default Description
type string 'version'

The event type.

txn number

The event's transaction timestamp.

event object

The event's data.