@dxos/client
    Preparing search index...

    Interface Space

    interface Space {
        "[SPACE_TAG]": true;
        listen: (
            channel: string,
            callback: (message: GossipMessage) => void,
        ) => CleanupFn;
        postMessage: (channel: string, message: any) => Promise<void>;
        get db(): Database;
        get id(): SpaceId;
        get internal(): SpaceInternal;
        get invitations(): MulticastObservable<CancellableInvitationObservable[]>;
        get isOpen(): boolean;
        get key(): PublicKey;
        get members(): MulticastObservable<SpaceMember[]>;
        get membershipPolicy(): MembershipPolicy;
        get pipeline(): MulticastObservable<PipelineState>;
        get properties(): OfShape<
            {
                computeEnvironment?: "local"
                | "edge"
                | "disabled";
                description?: string;
                edgeReplication?: boolean;
                hue?: string;
                icon?: string;
                iconHue?: string;
                invocationTraceFeed?: Ref<
                    { kind?: string; name?: string; namespace?: "trace"
                    | "data" } & OfKind<Object> & Unknown,
                >;
                name?: string;
            } & OfKind<Object>,
        >;
        get queues(): QueueFactory;
        get state(): MulticastObservable<SpaceState>;
        get tags(): string[];
        admitContact(contact: Contact): Promise<void>;
        close(): Promise<void>;
        createSnapshot(): Promise<SpaceSnapshot>;
        delete(): Promise<void>;
        open(): Promise<void>;
        share(options?: Partial<Invitation>): CancellableInvitationObservable;
        updateMemberRole(
            request: Omit<UpdateMemberRoleRequest, "spaceKey">,
        ): Promise<void>;
        waitUntilReady(): Promise<Space>;
    }

    Hierarchy

    • Messenger
      • Space
    Index

    Properties

    "[SPACE_TAG]": true
    listen: (
        channel: string,
        callback: (message: GossipMessage) => void,
    ) => CleanupFn

    Register channel listener.

    postMessage: (channel: string, message: any) => Promise<void>

    Send message to channel.

    Accessors

    • get db(): Database

      Echo database.

      Returns Database

    • 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 membershipPolicy(): MembershipPolicy

      Immutable membership policy assigned at space creation time. Available on closed spaces.

      Returns MembershipPolicy

    • get pipeline(): MulticastObservable<PipelineState>

      Current state of space pipeline.

      Returns MulticastObservable<PipelineState>

    • get properties(): OfShape<
          {
              computeEnvironment?: "local"
              | "edge"
              | "disabled";
              description?: string;
              edgeReplication?: boolean;
              hue?: string;
              icon?: string;
              iconHue?: string;
              invocationTraceFeed?: Ref<
                  { kind?: string; name?: string; namespace?: "trace"
                  | "data" } & OfKind<Object> & Unknown,
              >;
              name?: string;
          } & OfKind<Object>,
      >

      Properties object.

      Returns OfShape<
          {
              computeEnvironment?: "local"
              | "edge"
              | "disabled";
              description?: string;
              edgeReplication?: boolean;
              hue?: string;
              icon?: string;
              iconHue?: string;
              invocationTraceFeed?: Ref<
                  { kind?: string; name?: string; namespace?: "trace"
                  | "data" } & OfKind<Object> & Unknown,
              >;
              name?: string;
          } & OfKind<Object>,
      >

    • 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>

    • get tags(): string[]

      Immutable tags assigned at space creation time. Available on closed spaces.

      Returns string[]

    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>

    • Tombstones (soft-deletes) the space and replicates the deletion to the user's other devices. Every device stops replicating and unloads the space. Underlying data is not removed until garbage collection (future work). This is terminal: the space cannot be re-opened via open.

      Returns Promise<void>

    • 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>