jovo-v4-community-plugin-jexl-output
Version:
A Jovo V4 framework plugin which adds Jexl support for output strings.
24 lines (23 loc) • 1.04 kB
TypeScript
import { Jovo, Plugin, PluginConfig, Extensible, MessageValue, QuickReplyValue } from "@jovotech/framework";
/**
* This plugin will search and process the output object for
* 'message' and 'reprompt' entries in case they contain
* 'Jexl' expressions (https://www.npmjs.com/package/jexl).
*/
export declare class JexlOutputPlugin extends Plugin {
mount(extensible: Extensible): void;
processJexlExpressionsInOutput(jovo: Jovo): void;
/**
*
* @param outputElementIncludingJexl may be a string or an object like {text: string, speech: string} but no Array
* @returns
*/
processOutputElementIncludingJexl(outputElementIncludingJexl: MessageValue, jexlContext: any): MessageValue;
/**
*
* @param quickReplyValueIncludingJexl may be a string or an object like {text: string, speech: string} but no Array
* @returns
*/
processQuickReplyValueIncludingJexl(quickReplyValueIncludingJexl: QuickReplyValue, jexlContext: any): QuickReplyValue;
getDefaultConfig(): PluginConfig;
}