RuntimeContext
Stentor API Reference / stentor-models/src / RuntimeContext
Interface: RuntimeContext
Defined in: packages/stentor-models/src/Runtime/RuntimeContext.ts:5
Propertiesβ
ovai?β
optionalovai:StudioContext
Defined in: packages/stentor-models/src/Runtime/RuntimeContext.ts:11
Context specific to One Voice AI
Deprecatedβ
Deprecated in favor of studio key.
studio?β
optionalstudio:StudioContext
Defined in: packages/stentor-models/src/Runtime/RuntimeContext.ts:15
Context specific to the setup within OC Studio
appData?β
optionalappData:AppRuntimeData
Defined in: packages/stentor-models/src/Runtime/RuntimeContext.ts:19
App data used at runtime.
headers?β
optionalheaders:any
Defined in: packages/stentor-models/src/Runtime/RuntimeContext.ts:23
The headers for the request
environment?β
optionalenvironment:string
Defined in: packages/stentor-models/src/Runtime/RuntimeContext.ts:33
Current environment
rawBody?β
optionalrawBody:string
Defined in: packages/stentor-models/src/Runtime/RuntimeContext.ts:41
The request body as a string.
This is extremely important when verifying the payload comes from Alexa. It must be exactly how it comes in. It cannot be JSON.parsed then JSON.stringified as the order is important for certification.
Methodsβ
getRemainingTimeInMillis()?β
optionalgetRemainingTimeInMillis():number
Defined in: packages/stentor-models/src/Runtime/RuntimeContext.ts:29
Optional, for functions as a service, it gets the remaining execution time.
Returnsβ
number
The remaining execution time of the function
buildResponse()?β
optionalbuildResponse(code,result):object
Defined in: packages/stentor-models/src/Runtime/RuntimeContext.ts:48
Builds the response for the specific platform
Parametersβ
codeβ
number
resultβ
object
Returnsβ
object