Sanity Library Reference Docs
    Preparing search index...

    Type Alias CreateVersionAction

    CreateVersionAction: {
        actionType: "sanity.action.document.version.create";
        publishedId: string;
    } & (
        | { document: IdentifiedSanityDocumentStub }
        | { baseId: string; ifBaseRevisionId?: string; versionId: string }
    )

    Creates a new version of an existing document.

    If the document is provided, the version is created from the document attached to the release as given by document._id

    If the baseId and versionId are provided, the version is created from the base document and the version is attached to the release as given by publishedId and versionId