Sanity Library Reference Docs
    Preparing search index...

    Type Alias EditAction

    Modifies an existing draft document. It applies the given patch to the document referenced by draftId. If there is no such document then one is created using the current state of the published version and then that is updated accordingly.

    type EditAction = {
        actionType: "sanity.action.document.edit";
        draftId: string;
        patch: PatchOperations;
        publishedId: string;
    }
    Index

    Properties

    actionType: "sanity.action.document.edit"
    draftId: string

    Draft document ID to edit

    patch: PatchOperations

    Patch operations to apply

    publishedId: string

    Published document ID to create draft from, if draft does not exist