IFClite TypeScript API
    Preparing search index...

    Interface FederationSession

    interface FederationSession {
        federationDoc: Doc;
        federationRoomId: string;
        models: ReadonlyMap<string, CollabSession>;
        presence: Presence;
        projectId: string;
        user: UserIdentity;
        addModel(modelId: string): Promise<CollabSession>;
        dispose(): Promise<void>;
        getRecord(recordId: string): FederationRecord | undefined;
        listRecords(): FederationRecord[];
        modelIds(): string[];
        observeRecords(listener: (records: FederationRecord[]) => void): () => void;
        removeModel(modelId: string): Promise<void>;
        removeRecord(recordId: string): boolean;
        upsertRecord(record: FederationRecord): void;
        whenSynced(): Promise<void>;
    }
    Index
    federationDoc: Doc
    federationRoomId: string
    models: ReadonlyMap<string, CollabSession>

    Per-model sessions keyed by modelId.

    presence: Presence
    projectId: string
    • Add a model to the session. Idempotent.

      Parameters

      • modelId: string

      Returns Promise<CollabSession>

    • Returns Promise<void>

    • All loaded model IDs.

      Returns string[]

    • Remove a model from the session and dispose its resources.

      Parameters

      • modelId: string

      Returns Promise<void>

    • Parameters

      • recordId: string

      Returns boolean

    • Resolves once every loaded session has finished its initial sync.

      Returns Promise<void>