Context
Stentor API Reference / stentor-models/src / Context
Interface: Context\<S>
Defined in: packages/stentor-models/src/Context.ts:48
Context object that is passed around while formulating the response.
It contains contextual information relevant to the user.
Type Parametersβ
Sβ
Propertiesβ
deviceβ
device:
Device
Defined in: packages/stentor-models/src/Context.ts:54
Information about the current device the user is on within the channel.
Deprecatedβ
- Will be removed in next major release. You can find the same information on the request. The information will continue to be in both places until removal.
storageβ
storage:
S
Defined in: packages/stentor-models/src/Context.ts:58
Long term storage for the user.
pii?β
optionalpii:Pii
Defined in: packages/stentor-models/src/Context.ts:62
The PII record
responseβ
response:
AbstractResponseBuilder
Defined in: packages/stentor-models/src/Context.ts:66
The response builder.
requestUserData?β
optionalrequestUserData:UserData
Defined in: packages/stentor-models/src/Context.ts:70
A method that serves user profile data (email, location, phone number, etc)
session?β
optionalsession:SessionStore
Defined in: packages/stentor-models/src/Context.ts:74
Session data. Gets deleted when session (id) changes)
servicesβ
services:
ContextServices
Defined in: packages/stentor-models/src/Context.ts:82
Services available for the handlers
Methodsβ
timeLeftInMillis()?β
optionaltimeLeftInMillis():number
Defined in: packages/stentor-models/src/Context.ts:78
Milliseconds left from the execution (NOTE: infinity if not executing in a lambda)
Returnsβ
number