@dxos/client
    Preparing search index...

    Interface Space

    interface Space {
        listen: (
            channel: string,
            callback: (message: GossipMessage) => void,
        ) => CleanupFn;
        postMessage: (channel: string, message: any) => Promise<void>;
        get crud(): CoreDatabase;
        get db(): EchoDatabase;
        get id(): SpaceId;
        get internal(): SpaceInternal;
        get invitations(): MulticastObservable<CancellableInvitationObservable[]>;
        get isOpen(): boolean;
        get key(): PublicKey;
        get members(): MulticastObservable<SpaceMember[]>;
        get pipeline(): MulticastObservable<PipelineState>;
        get properties(): any;
        get queues(): QueueFactory;
        get state(): MulticastObservable<SpaceState>;
        admitContact(contact: Contact): Promise<void>;
        close(): Promise<void>;
        createSnapshot(): Promise<SpaceSnapshot>;
        open(): Promise<void>;
        share(options?: Partial<Invitation>): CancellableInvitationObservable;
        updateMemberRole(
            request: Omit<UpdateMemberRoleRequest, "spaceKey">,
        ): Promise<void>;
        waitUntilReady(): Promise<Space>;
    }
    Index

    Properties

    listen: (
        channel: string,
        callback: (message: GossipMessage) => void,
    ) => CleanupFn
    postMessage: (channel: string, message: any) => Promise<void>

    Accessors

    • get crud(): CoreDatabase

      Echo database CRUD API.

      Returns CoreDatabase

      Use the database api with the plain format.

    • get db(): EchoDatabase

      Echo database.

      Returns EchoDatabase

    • get id(): SpaceId

      Unique space identifier.

      Returns SpaceId

    • get internal(): SpaceInternal

      Returns SpaceInternal

    • get isOpen(): boolean

      Returns boolean

    • get key(): PublicKey

      Returns PublicKey

      Use id.

    • get members(): MulticastObservable<SpaceMember[]>

      Returns MulticastObservable<SpaceMember[]>

    • get pipeline(): MulticastObservable<PipelineState>

      Current state of space pipeline.

      Returns MulticastObservable<PipelineState>

    • get properties(): any

      Properties object.

      Returns any

    • get queues(): QueueFactory

      Access to queues.

      Returns QueueFactory

    • get state(): MulticastObservable<SpaceState>

      Current state of the space. The database is ready to be used in SpaceState.SPACE_READY state. Presence is available in SpaceState.SPACE_CONTROL_ONLY state.

      Returns MulticastObservable<SpaceState>

    Methods

    • Parameters

      Returns Promise<void>

    • Deactivates the space stopping replication with other peers. The space will not auto-open on the next app launch. The setting is persisted on the local device.

      Returns Promise<void>

    • Returns Promise<SpaceSnapshot>

    • Activates the space enabling the use of the database and starts replication with peers. The setting is persisted on the local device.

      Returns Promise<void>

    • Parameters

      • request: Omit<UpdateMemberRoleRequest, "spaceKey">

      Returns Promise<void>

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

      Returns Promise<Space>