Class SpaceProxy

About 1 min

Class SpaceProxy

Declared in packages/sdk/client/dist/types/src/packlets/proxies/space-proxy.d.ts:50

Constructors

constructor(_clientServices, _modelFactory, _data, databaseRouter)

Returns: SpaceProxy

Arguments:

_clientServices: ClientServicesProvider

_modelFactory: ModelFactory

_data: Space

databaseRouter: DatabaseRouter

Properties

db

Type: EchoDatabase

Echo database.

internal

Type: Internal

invitations

Type: MulticastObservable<CancellableInvitationObservable[]>

isOpen

Type: boolean

key

Type: PublicKey

members

Type: MulticastObservable<SpaceMember[]>

pipeline

Type: MulticastObservable<PipelineState>

Current state of space pipeline.

properties

Type: TypedObject<object>

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.INACTIVE state.

Methods

_setOpen(open)

Returns: Promise<never>

Arguments:

open: boolean

close()

TODO

Returns: Promise<void>

Arguments: none

createInvitation([options])

Creates an interactive invitation.

Returns: CancellableInvitationObservable

Arguments:

options: Partial<Invitation>

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

removeInvitation(id)

Remove invitation from space.

Returns: void

Arguments:

id: string

waitUntilReady()

Waits until the space is in the ready state, with database initialized.

Returns: Promise<SpaceProxy>

Arguments: none