IWithVersioningBehavior

Interface

Composable behavior that adds versioning to an entity

Methods

Method Returns Notes
Promise<IVersion>

Creates a new version of the entity

Promise<{
success:
boolean
}>

Deletes the specified version of the entity

Promise<IVersion>

Gets the specified version of the entity

Promise<IVersionMetadata[]>

Gets all the versions of the entity

Promise<IVersion>

Updates the specified version of the entity

Promise<IVersionMetadata>

Updates the specified entity version's metadata

createVersion

Interface Method

Creates a new version of the entity

Parameters

Parameter Type Default Notes
options Optional ICreateVersionOptions

Returns

Promise<IVersion>

deleteVersion

Interface Method

Deletes the specified version of the entity

  • deleteVersion(versionId: string) : Promise<{
    success:
    boolean
    }>

Parameters

Parameter Type Default Notes
versionId Required string

Returns

Promise<{
success:
boolean
}>

getVersion

Interface Method

Gets the specified version of the entity

  • getVersion(versionId: string) : Promise<IVersion>

Parameters

Parameter Type Default Notes
versionId Required string

Returns

Promise<IVersion>

searchVersions

Interface Method

Gets all the versions of the entity

Returns

Promise<IVersionMetadata[]>

updateVersion

Interface Method

Updates the specified version of the entity

Parameters

Parameter Type Default Notes
version Required IVersion

Returns

Promise<IVersion>

updateVersionMetadata

Interface Method

Updates the specified entity version's metadata

Parameters

Parameter Type Default Notes
version Required IVersionMetadata

Returns

Promise<IVersionMetadata>

Interface defined in common/src/core/behaviors/IWithVersioningBehavior.ts:10