Skip to content
On this page

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 extends object

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

Source

rest/commands/utils/versions.ts:39