Interface: Filter

Filter

Interface for classes that can handle can act as a filter
Source:

Methods

(static) getName() → {String}

Returns the name of the filter. If not set, SkillVC will attempt to determine one for you and add the function to your object
Source:
Returns:
The name of the filter
Type
String

executePost(event, context, svContext) → {Promise}

Called to execute any functionality that needs to occur after an intent executes. If the filter has any async operations a `Promise` should be returned to SkillVC so that it will wait until execution of the async operation has completed A filter should implement either executePre or executePost, it does not need to implement both
Parameters:
Name Type Description
event Object The event for the skill (from lambda)
context OBject The context for the skill (from lambda)
svContext SVContext The context of the execution
Source:
Returns:
The optional `Promise` that can be used to wait until this completes
Type
Promise

executePre(event, context, svContext) → {Promise}

Called to execute any functionality that needs to occur before an intent executes. If the filter has any async operations a `Promise` should be returned to SkillVC so that it will wait until execution of the async operation has completed A filter should implement either executePre or executePost, it does not need to implement both
Parameters:
Name Type Description
event Object The event for the skill (from lambda)
context OBject The context for the skill (from lambda)
svContext SVContext The context of the execution
Source:
Returns:
The optional `Promise` that can be used to wait until this completes
Type
Promise

getOrder() → {Number}

Returns the order location in which the filter should be called. If not defined, the order will be assumed to be the order in which it was loaded
Source:
Returns:
The place in execution order (index) of the filter.
Type
Number