Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Versioning

Class that contains shortcuts for versioning-related custom content actions

Hierarchy

  • Versioning

Index

Constructors

constructor

Properties

Private repository

repository: Repository

Methods

approve

  • Performs an approve operation on a content

    Type parameters

    Parameters

    • idOrPath: number | string

      The unique identifier or full path of the content to approve

    • Optional oDataOptions: ODataParams<T>

      Optional OData options

    Returns Promise<ODataResponse<T>>

    A promise that will be resolved when the operation finished

checkIn

  • checkIn<T>(idOrPath: number | string, checkInComments?: string, oDataOptions?: ODataParams<T>): Promise<ODataResponse<T>>
  • Checks in the content item

    Type parameters

    Parameters

    • idOrPath: number | string

      The unique identifier or full path of the content to check in

    • Default value checkInComments: string = ""

      Optional comments for the check in operation

    • Optional oDataOptions: ODataParams<T>

      Optional OData options

    Returns Promise<ODataResponse<T>>

    A promise that will be resolved with the new checked in version of the content item

checkOut

  • Checks out the content item to the current user

    Type parameters

    Parameters

    • idOrPath: number | string

      The unique identifier or full path of the content to check out

    • Optional oDataOptions: ODataParams<T>

      Optional OData options

    Returns Promise<ODataResponse<T>>

    A promise that will be resolved with the checked out version of the content item

forceUndoCheckOut

  • Performs a force undo check out operation on a content item

    Type parameters

    Parameters

    • idOrPath: number | string

      The unique identifier or full path of the content

    • Optional oDataOptions: ODataParams<T>

      Optional OData options

    Returns Promise<ODataResponse<T>>

    A promise that will be resolved with the previous checked in version of the content item

getVersions

  • Returns a collection of content versions

    Type parameters

    Parameters

    • idOrPath: number | string

      The unique identifier or full path of the original content

    • Optional oDataOptions: ODataParams<T>

      optional OData options

    Returns Promise<ODataCollectionResponse<T>>

    A promise that will be resolved with the versions

publish

  • Performs a Publish operation on a content

    Type parameters

    Parameters

    • idOrPath: number | string

      The unique identifier or full path of the content to publish

    • Optional oDataOptions: ODataParams<T>

      Optional OData options

    Returns Promise<ODataResponse<T>>

    A promise that will be resolved when the operation finished

reject

  • Performs a reject operation on a content

    Type parameters

    Parameters

    • idOrPath: number | string

      The unique identifier or full path of the content

    • Default value rejectReason: string = ""
    • Optional oDataOptions: ODataParams<T>

      Optional OData options

    Returns Promise<ODataResponse<T>>

    A promise that will be resolved when the operation finished

restoreVersion

  • restoreVersion<T>(idOrPath: number | string, version?: string, oDataOptions?: ODataParams<T>): Promise<ODataResponse<T>>
  • Performs a reject operation on a content

    Type parameters

    Parameters

    • idOrPath: number | string

      The unique identifier or full path of the content

    • Default value version: string = ""
    • Optional oDataOptions: ODataParams<T>

      Optional OData options

    Returns Promise<ODataResponse<T>>

    A promise that will be resolved when the operation finished

takeLockOver

  • takeLockOver(idOrPath: number | string, userIdOrPath?: number | string): Promise<void>
  • Lets administrators take over the lock of a checked out document from anotheruser. A new locker user can be provided using the 'user' parameter (user path or id as string). If left empty, the current user will take the lock.

    Parameters

    • idOrPath: number | string

      The locked content's identifier or full path

    • Optional userIdOrPath: number | string

      Path or id of the new locker user. Will be the current user, if not provided

    Returns Promise<void>

    A promise that will be resolved when the operation finished.

undoCheckOut

  • Performs an undo check out operation on a content item

    Type parameters

    Parameters

    • idOrPath: number | string

      The unique identifier or full path of the content

    • Optional oDataOptions: ODataParams<T>

      Optional OData options

    Returns Promise<ODataResponse<T>>

    A promise that will be resolved with the previous checked in version of the content item

Generated using TypeDoc