import { ManagerOptions, Socket, SocketOptions } from 'socket.io-client'; import { Client } from './client'; export declare enum WebSocketChannel { System = "system", AppConfig = "appconfig", Dataset = "dataset/" } export interface WebSocketPublishMessage { channel: string; messageType?: string; payload: unknown; } export interface WebSocketSubscribeMessage { channel: string; } export interface WebSocketErrorResponse { status: 'error'; code: string; message: string; } export interface WebSocketOkResponse { status: 'ok'; } export type WebSocketResponse = WebSocketOkResponse | WebSocketErrorResponse; export type WebSocketManagerOptions = Partial; export type WebSocketSubscribeCallback = (err: Error | null, msg?: WebSocketPublishMessage) => void; export type WebSocketUnsubscribeCallback = (err: Error | null) => void; export type WebSocketUnsubscriber = (cb?: WebSocketUnsubscribeCallback) => void; export declare class WebSocketGateway { readonly client: Client; private readonly options?; private connected; private subscribedChannels; socket: Socket; get isConnected(): boolean; constructor(client: Client, options?: WebSocketManagerOptions | undefined); connect(): Promise; disconnect(): Promise; subscribe(channel: string, cb: WebSocketSubscribeCallback): WebSocketUnsubscriber; unsubscribe(channel: string, cb?: WebSocketUnsubscribeCallback): void; } //# sourceMappingURL=web-socket-gateway.d.ts.map