Sanity Library Reference Docs
    Preparing search index...

    Type Alias DiscardAction

    Delete the draft version of a document. It is an error if it does not exist. If the purge flag is set, the document history is also deleted.

    Use DiscardVersionAction instead

    type DiscardAction = {
        actionType: "sanity.action.document.discard";
        draftId: string;
        purge?: boolean;
    }
    Index

    Properties

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

    Draft document ID to delete

    purge?: boolean

    Delete document history