IWithLayoutStore

Interface

Defined layout related functions that a module working with IWithLayout objects must implement

Methods

Method Returns Notes
Promise<void>

Destroy the resource backing a version

Promise<string[]>

Return a list of all the versions by name

  • loadVersion(id: string, name: string, ro: IRequestOptions)
Promise<IHubLayout>

Fetch the layout from a specific version. Used when editing a specific version.

Promise<void>

Store a version as a resource, with the given name

Promise<void>

Given a version name, copy that into the item's /data making it the "active version"

destroyVersion

Interface Method

Destroy the resource backing a version

  • destroyVersion(id: string, name: string, ro: IUserRequestOptions) : Promise<void>

Parameters

Parameter Type Default Notes
id Required string
name Required string
ro Required IUserRequestOptions

Returns

Promise<void>

listVersions

Interface Method

Return a list of all the versions by name

  • listVersions(id: string, ro: IRequestOptions) : Promise<string[]>

Parameters

Parameter Type Default Notes
id Required string
ro Required IRequestOptions

Returns

Promise<string[]>

loadVersion

Interface Method

Fetch the layout from a specific version. Used when editing a specific version.

  • loadVersion(id: string, name: string, ro: IRequestOptions) : Promise<IHubLayout>

Parameters

Parameter Type Default Notes
id Required string
name Required string
ro Required IRequestOptions

Returns

Promise<IHubLayout>

saveVersion

Interface Method

Store a version as a resource, with the given name

  • saveVersion(id: string, name: string, layout: IHubLayout, ro: IUserRequestOptions) : Promise<void>

Parameters

Parameter Type Default Notes
id Required string
name Required string
layout Required IHubLayout
ro Required IUserRequestOptions

Returns

Promise<void>

setActiveVersion

Interface Method

Given a version name, copy that into the item's /data making it the "active version"

  • setActiveVersion(id: string, ro: IUserRequestOptions) : Promise<void>

Parameters

Parameter Type Default Notes
id Required string
ro Required IUserRequestOptions

Returns

Promise<void>

Interface defined in common/src/core/traits/IWithLayout.ts:18