Skip to main content

Module versions

Module versions 

Source
Expand description

Content versioning service

Provides functionality for tracking content revisions, viewing history, comparing versions, and restoring previous versions.

Structs§

ContentVersion
A full snapshot of content at a point in time
DiffLine
A single line in a diff
VersionDiff
Diff between two versions
VersionSummary
Summary information for version history lists

Enums§

DiffLineType

Functions§

cleanup_old_versions
Clean up old versions, keeping only the most recent keep_count versions
count_versions
Count total versions for a content item
create_version
Create a version snapshot of the current content state. Call this BEFORE applying updates to preserve the previous state.
diff_versions
Generate a diff between two versions
get_latest_version_number
Get the latest version number for a content item
get_version
Get full version details by version ID
get_version_by_number
Get version by content ID and version number
list_versions
List versions for a content item, newest first
restore_version
Restore content to a previous version. Creates a backup version of current state first, then applies the old version.