Skip to main content

ContextBuilder

Stentor API Reference


Stentor API Reference / stentor-context/src / ContextBuilder

Class: ContextBuilder\<S>

Defined in: packages/stentor-context/src/ContextBuilder.ts:7

Extends​

Type Parameters​

S​

S extends Storage = Storage

Constructors​

Constructor​

new ContextBuilder\<S>(): ContextBuilder\<S>

Defined in: packages/stentor-context/src/ContextBuilder.ts:10

Returns​

ContextBuilder\<S>

Overrides​

AbstractBuilder<Context<S>>.constructor

Methods​

withDevice()​

withDevice(device): ContextBuilder\<S>

Defined in: packages/stentor-context/src/ContextBuilder.ts:59

Add device information to the context.

Parameters​

device​

Device

Returns​

ContextBuilder\<S>

Deprecated​

  • Device will be removed from the context in the next major release. Use device on request.

withResponse()​

withResponse(response): ContextBuilder\<S>

Defined in: packages/stentor-context/src/ContextBuilder.ts:64

Parameters​

response​

ResponseBuilder

Returns​

ContextBuilder\<S>


withRequestUserData()​

withRequestUserData(userData): ContextBuilder\<S>

Defined in: packages/stentor-context/src/ContextBuilder.ts:69

Parameters​

userData​

UserData

Returns​

ContextBuilder\<S>


withStorage()​

withStorage(storage): ContextBuilder\<S>

Defined in: packages/stentor-context/src/ContextBuilder.ts:74

Parameters​

storage​

S

Returns​

ContextBuilder\<S>


withSessionData()​

withSessionData(data): ContextBuilder\<S>

Defined in: packages/stentor-context/src/ContextBuilder.ts:97

Set the session storage with the provided data.

Parameters​

data​

SessionStoreData

Returns​

ContextBuilder\<S>


playingAudio()​

playingAudio(): ContextBuilder\<S>

Defined in: packages/stentor-context/src/ContextBuilder.ts:106

Returns​

ContextBuilder\<S>


build()​

build(): Context\<S>

Defined in: packages/stentor-context/src/ContextBuilder.ts:118

Returns​

Context\<S>

Overrides​

AbstractBuilder.build