Sanity Library Reference Docs
    Preparing search index...

    Interface EditStateForBeta

    interface EditStateFor {
        draft: SanityDocument;
        id: string;
        liveEdit: boolean;
        liveEditSchemaType: boolean;
        published: SanityDocument;
        ready: boolean;
        release: string;
        scopeId: string;
        transactionSyncLock: TransactionSyncLockState;
        type: string;
        version: SanityDocument;
    }

    Hierarchy (View Summary)

    Index

    Properties

    id: string
    liveEdit: boolean

    Whether live edit is enabled. This may be true for various reasons:

    • The schema type has live edit enabled.
    • A version of the document is checked out.
    liveEditSchemaType: boolean

    Whether the schema type has live edit enabled.

    published: SanityDocument
    ready: boolean
    release: string

    When editing a version, the short name of the release the document belongs to (or an agent / anonymous bundle name), matched by consumers against active release names. Never an opaque variant scope hash: documents carrying full _system metadata are classified from _system.release (normalized from the _.releases.<name> reference), so drafts- and published-scoped variants report undefined while release-scoped versions — variant or not — report their release. Until the first snapshot arrives, the bundle segment is reported as-is.

    scopeId: string

    When editing a version, the bundle segment of the version document id (versions.<scopeId>.<groupId>): a release id, an agent/anonymous bundle name, or an opaque variant scope hash. undefined when editing the base draft/published pair.

    transactionSyncLock: TransactionSyncLockState
    type: string