tridion-sites-extensions-api-docs

Home > @tridion-sites/open-api-client > VersioningService

VersioningService class

Signature:

export declare class VersioningService

Methods

Method Modifiers Description
checkIn({ escapedVersionedItemId, requestModel, }) static Checks in a versioned item that was checked out for editing. The operation converts the editable version into a new latest version of the item and removes the lock from the item. This operation returns an instance of ‘VersionedItem’ type, as implemented by one of the following:<ul class="model-list"><li>Component</li><li>ComponentTemplate</li><li>ExternalComponent</li><li>Page</li><li>PageTemplate</li><li>Schema</li><li>TemplateBuildingBlock</li></ul>
checkOut({ escapedVersionedItemId, requestModel, }) static Checks out a versioned item to create a new, editable version of the item. The new version is locked for editing by the user who performed the checkout. No other user can edit the item while it is checked out. This operation returns an instance of ‘VersionedItem’ type, as implemented by one of the following:<ul class="model-list"><li>Component</li><li>ComponentTemplate</li><li>ExternalComponent</li><li>Page</li><li>PageTemplate</li><li>Schema</li><li>TemplateBuildingBlock</li></ul>
getHistory({ escapedVersionedItemId, }) static Gets all major versions of a specified versioned item. This operation returns an instance of ‘VersionedItem’ type, as implemented by one of the following:<ul class="model-list"><li>Component</li><li>ComponentTemplate</li><li>ExternalComponent</li><li>Page</li><li>PageTemplate</li><li>Schema</li><li>TemplateBuildingBlock</li></ul>
rollback({ escapedVersionedItemIdWithVersion, requestModel, }) static Rolls back all changes that have been made to an item since a specified version. This operation returns an instance of ‘VersionedItem’ type, as implemented by one of the following:<ul class="model-list"><li>Component</li><li>ComponentTemplate</li><li>ExternalComponent</li><li>Page</li><li>PageTemplate</li><li>Schema</li><li>TemplateBuildingBlock</li></ul>
undoCheckOut({ escapedVersionedItemId, requestModel, }) static Reverts the check-out of a versioned item. The operation removes the editable version without saving any changes and also removes the lock from the item. This operation returns an instance of ‘VersionedItem’ type, as implemented by one of the following:<ul class="model-list"><li>Component</li><li>ComponentTemplate</li><li>ExternalComponent</li><li>Page</li><li>PageTemplate</li><li>Schema</li><li>TemplateBuildingBlock</li></ul>