Skip to content
On this page

Directus Cloud

Everything you need to start building. Provisioned in 90 seconds. Starting at $15/month.

Get Started

This is an auto-generated document to support extension builders understand the internal packages they can utilize. To find our written guides, tutorials, and API/SDK reference, check out our main docs .

Directus / @directus/sdk / rest / compareContentVersion

Function: compareContentVersion() ​

compareContentVersion<Schema, Collection, Item>(id): RestCommand<object, Schema>

Compare an existing Content Version with the main version of the item.

Type Parameters ​

• Schema

• Collection extends string | number | symbol

• Item = UnpackList<Schema[Collection]>

Parameters ​

• id: DirectusVersion<Schema>["id"]

Primary key of the Content Version.

Returns ​

RestCommand<object, Schema>

All fields with different values, along with the hash of the main version of the item and the information whether the Content Version is outdated (i.e. main version of the item has been updated since the creation of the Content Version)

current ​

current: Partial<Item>

main ​

main: Item

mainHash ​

mainHash: string

outdated ​

outdated: boolean

Defined in ​

rest/commands/utils/versions.ts:39