import { default as React } from 'react'; import { INexusMessage, NexusSystemMessage } from '../model/message'; import { MessageProps, QuickReplyItemProps, ToolbarItemProps } from '@chatui/core'; export type WaitingMessageClass = new (...args: any[]) => T; export interface HistoryResult { list: MessageProps[]; noMore: boolean; } export declare class Context { context: T; constructor(value: any); set: (callback: (props: any) => any) => void; get: () => {} & T; clear: () => any; } export type TPlatform = "mobile" | "pc"; export type TClient = "workbench" | "neural"; export type TSend = (msg: MessageProps) => object | Promise | Promise | Promise; export default interface Adaptor { wideBreakpoint?: string; bot: any; components: { [key: string]: React.FC; }; context: Context; botAvatar: string; userAvatar: string; placeholder: string; instanceId?: string; env: string; platform?: TPlatform; client?: TClient; title: string; appEntry?: string; showHistory?: boolean; getWelcomeMessage: () => Promise | MessageProps[] | MessageProps; getQuickStartMessage?: () => Promise | MessageProps[] | MessageProps; getInitActions: () => Promise | QuickReplyItemProps[]; getToolbars: () => Promise | ToolbarItemProps[]; send: TSend; getHistory?: () => object | Promise | Promise; getWaitingMessage?: () => WaitingMessageClass; }