Class SpaceProxy

About 1 min

Class SpaceProxy

Declared in packages/sdk/client/src/packlets/proxies/space-proxy.ts:81open in new window

Constructors

constructor(_clientServices, _modelFactory, _data, databaseRouter)open in new window

Returns: SpaceProxy

Arguments:

_clientServices: ClientServicesProvider

_modelFactory: ModelFactory

_data: Space

databaseRouter: DatabaseRouter

Properties

dbopen in new window

Type: EchoDatabase

Echo database.

internalopen in new window

Type: Internal

invitationsopen in new window

Type: MulticastObservable<CancellableInvitationObservable[]>

isOpenopen in new window

Type: boolean

keyopen in new window

Type: PublicKey

membersopen in new window

Type: MulticastObservable<SpaceMember[]>

pipelineopen in new window

Type: MulticastObservable<PipelineState>

Current state of space pipeline.

propertiesopen in new window

Type: TypedObject<object>

Properties object.

stateopen in new window

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)open in new window

Returns: Promise<never>

Arguments:

open: boolean

close()open in new window

TODO

Returns: Promise<void>

Arguments: none

createInvitation([options])open in new window

Creates an interactive invitation.

Returns: CancellableInvitationObservable

Arguments:

options: Partial<Invitation>

createSnapshot()open in new window

Implementation method.

Returns: Promise<SpaceSnapshot>

Arguments: none

listen(channel, callback)open in new window

Listen for messages posted to the space.

Returns: function

Arguments:

channel: string

callback: function

open()open in new window

TODO

Returns: Promise<void>

Arguments: none

postMessage(channel, message)open in new window

Post a message to the space.

Returns: Promise<void>

Arguments:

channel: string

message: any

removeInvitation(id)open in new window

Remove invitation from space.

Returns: void

Arguments:

id: string

waitUntilReady()open in new window

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

Returns: Promise<SpaceProxy>

Arguments: none