Sanity Library Reference Docs
    Preparing search index...

    Interface DocumentPresenceBeta

    One participant at one location within a single document, flattened so it can be rendered directly against a field.

    Unlike PresenceLocation.path, path here is typed as a full Path, so keyed and numeric segments are described rather than cast away.

    interface DocumentPresence {
        documentId: string;
        lastActiveAt: string;
        path: Path;
        selection?: PresenceSelection;
        sessionId: string;
        user: SanityUser;
    }
    Index

    Properties

    documentId: string

    The specific document id this participant is in: a draft, published, or version id, depending on which perspective they are editing.

    lastActiveAt: string

    When they said they were last active, on their clock. Fine for display, unreliable for liveness. See PresenceLocation.lastActiveAt.

    path: Path

    The focused field path. Empty when they are in the document but no field.

    selection?: PresenceSelection

    The Portable Text caret, when they are focused in a Portable Text field.

    sessionId: string

    Identifies one tab, so the same person in two tabs appears twice.