Sanity Library Reference Docs
    Preparing search index...

    Type Alias ReplaceDraftAction

    Replaces an existing draft document. At least one of the draft or published versions of the document must exist.

    Use ReplaceVersionAction instead

    type ReplaceDraftAction = {
        actionType: "sanity.action.document.replaceDraft";
        attributes: IdentifiedSanityDocumentStub;
        publishedId: string;
    }
    Index

    Properties

    actionType: "sanity.action.document.replaceDraft"

    Document to create if it does not already exist. Requires _id and _type properties.

    publishedId: string

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