UNPKG

@botonic/react

Version:

Build Chatbots using React

42 lines (41 loc) 1.86 kB
/// <reference types="react" /> import { Input, Session } from '@botonic/core'; import { ThemeProps, Webview } from '../../components/index-types'; import { WebchatMessage } from '../../index-types'; import { WebchatAction } from '../actions'; import { DevSettings, ErrorMessage, WebchatState } from '../index-types'; export declare const webchatInitialState: WebchatState; export declare function useWebchat(): { addMessage: (message: WebchatMessage) => void; addMessageComponent: (message: { props: WebchatMessage; }) => void; clearMessages: () => void; doRenderCustomComponent: (toggle: boolean) => void; resetUnreadMessages: () => void; setCurrentAttachment: (attachment: File) => void; setError: (error: ErrorMessage) => void; setLastMessageVisible: (isLastMessageVisible: boolean) => void; setOnline: (online: boolean) => void; toggleCoverComponent: (toggle: boolean) => void; toggleEmojiPicker: (toggle: boolean) => void; togglePersistentMenu: (toggle: boolean) => void; toggleWebchat: (toggle: boolean) => void; updateDevSettings: (settings: DevSettings) => void; updateHandoff: (handoff: boolean) => void; updateJwt: (jwt: string) => void; updateLastMessageDate: (date: string) => void; updateLastRoutePath: (path: string) => void; updateLatestInput: (input: Input) => void; updateMessage: (message: WebchatMessage) => void; updateReplies: (replies: any) => void; updateSession: (session: Session) => void; updateTheme: (theme: ThemeProps, themeUpdates?: ThemeProps) => void; updateTyping: (typing: boolean) => void; updateWebview: (webview: Webview, params: Record<string, string>) => void; webchatDispatch: import("react").Dispatch<{ type: WebchatAction; payload?: any; }>; webchatState: WebchatState; };