Class SpaceProxy
SpaceProxy
Class Declared in packages/sdk/client/src/echo/space-proxy.ts:43
Constructors
constructor(_clientServices, _data, graph, automergeContext, options)
Returns: SpaceProxy
Arguments:
_clientServices
: ClientServicesProvider
_data
: Space
graph
: Hypergraph
automergeContext
: AutomergeContext
options
: SpaceProxyOptions
Properties
db
Type: EchoDatabase
Echo database.
error
Type: undefined | Error
internal
Type: SpaceInternal
invitations
Type: MulticastObservable<CancellableInvitation[]>
isOpen
Type: boolean
key
Type: PublicKey
members
Type: MulticastObservable<SpaceMember[]>
pipeline
Type: MulticastObservable<PipelineState>
Current state of space pipeline.
properties
Type: TypedObject
Properties object.
state
Type: MulticastObservable<SpaceState>
Current state of the space. The database is ready to be used in SpaceState.READY
state. Presence is available in SpaceState.CONTROL_ONLY
state.
Methods
_setOpen(open)
Returns: Promise<never>
Arguments:
open
: boolean
close()
TODO
Returns: Promise<void>
Arguments: none
createSnapshot()
Implementation method.
Returns: Promise<SpaceSnapshot>
Arguments: none
listen(channel, callback)
Listen for messages posted to the space.
Returns: function
Arguments:
channel
: string
callback
: function
open()
TODO
Returns: Promise<void>
Arguments: none
postMessage(channel, message)
Post a message to the space.
Returns: Promise<void>
Arguments:
channel
: string
message
: any
share([options])
Creates an interactive invitation.
Returns: CancellableInvitation
Arguments:
options
: Partial<Invitation>
waitUntilReady()
Waits until the space is in the ready state, with database initialized.
Returns: Promise<SpaceProxy>
Arguments: none