import type { MachinatNode, MachinatBot, MachinatUser, InitScopeFn, DispatchWrapper } from '@machinat/core'; import Engine from '@machinat/core/engine'; import type { DispatchResponse } from '@machinat/core/engine'; import type { AnyServerAuthenticator } from '@machinat/auth'; import type { EventInput, WebSocketJob, WebSocketResult } from '@machinat/websocket'; import { WebviewSocketServer } from './interface'; import { WebviewConnection } from './channel'; import type { WebviewDispatchFrame, WebviewComponent, WebviewDispatchChannel } from './types'; declare type WebSocketDispatchResponse = DispatchResponse; declare type SendResult = { connections: WebviewConnection[]; }; /** * @category Provider */ export declare class WebviewBot implements MachinatBot { private _server; engine: Engine; platform: "webview"; constructor(server: WebviewSocketServer, initScope?: InitScopeFn, dispatchWrapper?: DispatchWrapper); start(): Promise; stop(): Promise; render(channel: WebviewDispatchChannel, message: MachinatNode): Promise; send(channel: WebviewConnection, content: EventInput | EventInput[]): Promise; sendUser(user: MachinatUser, content: EventInput | EventInput[]): Promise; sendTopic(topic: string, content: EventInput | EventInput[]): Promise; disconnect(connection: WebviewConnection, reason?: string): Promise; subscribeTopic(connection: WebviewConnection, topic: string): Promise; unsubscribeTopic(connection: WebviewConnection, topic: string): Promise; } export declare const BotP: import("@machinat/core/service").ServiceProvider, import("@machinat/core").ModuleUtilities | null, import("./types").WebviewPlatformUtilities | null]> & typeof WebviewBot; export declare type BotP = WebviewBot; export {};