UNPKG

@jss-rule-engine/chat

Version:

23 lines (22 loc) 797 B
import { JssRuleEngine } from "@jss-rule-engine/core"; import { WorkflowActionFactory } from "@jss-rule-engine/workflow"; import { Action, Metadata } from "../client/types"; export declare function handleChatMessage({ message, visitorId, workflowId, registerRuleEngine, registerActionFactory }: { message: string; visitorId: string; workflowId: string; registerRuleEngine?: (ruleEngine: JssRuleEngine) => void; registerActionFactory?: (actionFactory: WorkflowActionFactory) => void; }): Promise<{ success: boolean; errorCode: number; errorMessage: string; actions?: undefined; metadata?: undefined; } | { success: boolean; actions: Action[]; metadata: Metadata; errorCode?: undefined; errorMessage?: undefined; }>;