HandlerService
Stentor API Reference / stentor-models/src / HandlerService
Interface: HandlerService
Defined in: packages/stentor-models/src/Services/HandlerService.ts:10
The HandlerService provides the assistant application's dialog management with logic and content in the form of a Handler.
Methodsβ
get()β
get(
id):Promise<Handler<Content,Data,Forward,Redirect>> |Promise<undefined>
Defined in: packages/stentor-models/src/Services/HandlerService.ts:17
Returns the handler for the provided ID or undefined if not found.
Parametersβ
idβ
string | { intentId: string; }
Either the ID as a string or an object that has the ID under intentId
Returnsβ
Promise<Handler<Content, Data, Forward, Redirect>> | Promise<undefined>
getMany()?β
optionalgetMany(ids):Promise<Handler<Content,Data,Forward,Redirect>[]>
Defined in: packages/stentor-models/src/Services/HandlerService.ts:28
Returns the handlers for the provided IDs in a single call. Handlers that cannot be found are omitted from the result rather than causing the whole call to fail.
Optional so that existing HandlerService implementations remain valid; implementations that do not override this can be batched by callers falling back to multiple get calls.
Parametersβ
idsβ
(string | { intentId: string; })[]
Array of IDs, each either a string or an object that has the ID under intentId