Sanity Library Reference Docs
    Preparing search index...

    Interface ReportPresenceOptions

    What an app reports about where the current user is.

    Omit path for document-level presence, or pass one for field-level presence.

    interface ReportPresenceOptions {
        documentId: string;
        liveEdit?: boolean;
        path?: Path;
        perspective?: ReleasePerspective | ClientPerspective;
        selection?: PresenceSelection;
    }

    Hierarchy (View Summary)

    Index

    Properties

    documentId: string

    The document the user is in.

    Pass the plain document id; the perspective decides which specific document that resolves to. An already-specific id is accepted and re-resolved, so passing drafts.abc while the perspective is published reports the published document.

    liveEdit?: boolean

    Live-edit documents have no draft, so presence resolves to the published id.

    path?: Path

    The focused field path. Supports keyed and numeric segments, so array items and Portable Text spans can be addressed.

    selection?: PresenceSelection

    A Portable Text caret, when the focused field is a Portable Text field.