Options
All
  • Public
  • Public/Protected
  • All
Menu

A ResourceStore of which all operations are atomic.

Hierarchy

Implemented by

Index

Properties

addResource

addResource: (container: ResourceIdentifier, representation: Representation, conditions?: Conditions) => Promise<ResourceIdentifier>

Create a resource.

param

Container in which to create a resource.

param

Representation of the new resource

param

Optional conditions.

returns

A promise containing the new identifier.

Type declaration

deleteResource

deleteResource: (identifier: ResourceIdentifier, conditions?: Conditions) => Promise<void>

Delete a resource.

param

Identifier of resource to delete.

param

Optional conditions.

returns

A promise resolving when the delete is finished.

Type declaration

getRepresentation

getRepresentation: (identifier: ResourceIdentifier, preferences: RepresentationPreferences, conditions?: Conditions) => Promise<Representation>

Read a resource.

param

Identifier of the resource to read.

param

Representation preferences.

param

Optional conditions.

returns

A promise containing the representation.

Type declaration

modifyResource

modifyResource: (identifier: ResourceIdentifier, patch: Patch, conditions?: Conditions) => Promise<void>

Partially update a resource.

param

Identifier of resource to update.

param

Description of which parts to update.

param

Optional conditions.

returns

A promise resolving when the update is finished.

Type declaration

setRepresentation

setRepresentation: (identifier: ResourceIdentifier, representation: Representation, conditions?: Conditions) => Promise<void>

Fully update a resource.

param

Identifier of resource to update.

param

New representation of the resource.

param

Optional conditions.

returns

A promise resolving when the update is finished.

Type declaration