TriggerSelector class

Select the trigger to execute in a given state.

Extends

Configurable

Methods

initialize(OnCondition[], boolean)

Initialize the selector with the set of rules.

select(ActionContext)

Select the best rule to execute.

Inherited Methods

configure(Record<string, unknown>)

Fluent method for configuring the object.

getConverter(string)

Method Details

initialize(OnCondition[], boolean)

Initialize the selector with the set of rules.

function initialize(conditionHandlers: OnCondition[], evaluate: boolean)

Parameters

conditionHandlers

OnCondition[]

Possible rules to match.

evaluate

boolean

True if rules should be evaluated on select.

select(ActionContext)

Select the best rule to execute.

function select(actionContext: ActionContext): Promise<OnCondition[]>

Parameters

actionContext
ActionContext

Dialog context for evaluation.

Returns

Promise<OnCondition[]>

Inherited Method Details

configure(Record<string, unknown>)

Fluent method for configuring the object.

function configure(config: Record<string, unknown>): this

Parameters

config

Record<string, unknown>

Configuration settings to apply.

Returns

this

The Configurable after the operation is complete.

Inherited From Configurable.configure

getConverter(string)

function getConverter(_property: string): Converter | ConverterFactory

Parameters

_property

string

The key of the conditional selector configuration.

Returns

Converter | ConverterFactory

The converter for the selector configuration.

Inherited From Configurable.getConverter