@jargon/jovo-plugin
Version:
A Jovo Framework plugin for the Jargon SDK
43 lines (42 loc) • 1.9 kB
TypeScript
import { RenderItem, ResourceManager } from '@jargon/sdk-core';
import { Jovo } from 'jovo-core';
/**
* JovoJargon contains Jargon's additions to the core Jovo framework
* class.
*/
export interface JovoJargon {
/** The resource manager for the current request */
rm: ResourceManager;
/** Responds with the given text and ends session
* @param {RenderItem} speech The item to render for the speech content
*/
tell(speech: RenderItem): Promise<void>;
/**
* Says speech and waits for answer from user.
* Reprompt when user input fails.
* Keeps session open.
* @param {RenderItem} speech The item to render for the speech content
* @param {RenderItem} repromptSpeech The item to render for the reprompt content
*/
ask(speech: RenderItem, repromptSpeech?: RenderItem): Promise<void>;
/** Shows simple card to response
* @param {RenderItem} title The item to render for the card's title
* @param {RenderItem} content The item to render for the card's content
*/
showSimpleCard(title: RenderItem, content: RenderItem): Promise<void>;
/** Shows image card to response
* @param {RenderItem} title The item to render for the card's title
* @param {RenderItem} content The item to render for the card's content
* @param {string} imageUrl The URL for the image. Must be https
*/
showImageCard(title: RenderItem, content: RenderItem, imageUrl: string): Promise<void>;
}
export declare class JJ implements JovoJargon {
private jovo;
rm: ResourceManager;
constructor(jovo: Jovo, rm: ResourceManager);
tell(speech: RenderItem): Promise<void>;
ask(speech: RenderItem, repromptSpeech?: RenderItem): Promise<void>;
showSimpleCard(title: RenderItem, content: RenderItem): Promise<void>;
showImageCard(title: RenderItem, content: RenderItem, imageUrl: string): Promise<void>;
}