export declare const enum CLIENT_ACTION { CALL = 0, CLOSE = 1, CREATE = 2, NOTIFY = 3 } export declare const enum REMOTE_ACTION { RESPONSE_OK = 0, CLOSE = 1, STATE = 2, RESPONSE_ERROR = 3, EVENT = 4 } export type ClientMessageInitialize = [ channelId: number | string ]; export type ChannelMessageCall = [ channelId: number | string, action: CLIENT_ACTION.CALL, responseKey: any, path: string[], arguments: any[] ]; export type ClientMessageNotify = [ channelId: number | string, action: CLIENT_ACTION.NOTIFY, path: string[], arguments: any[] ]; export type ClientMessageClose = [ channelId: number | string, action: CLIENT_ACTION.CLOSE, reason: any ]; export type ClientMessageCreate = [ channelId: number | string, action: CLIENT_ACTION.CREATE, newChannelId: number, path: string[], arguments: any[] ]; export type ClientMessage = ClientMessageInitialize | ChannelMessageCall | ClientMessageClose | ClientMessageCreate | ClientMessageNotify; export type RemoteMessageCallResult = [ channelId: (number | string)[], action: REMOTE_ACTION.RESPONSE_OK | REMOTE_ACTION.RESPONSE_ERROR, responseKey: any, result: any ]; export type RemoteMessageChannelClosed = [ channelId: (number | string)[], action: REMOTE_ACTION.CLOSE, closeReason: any ]; export type RemoteMessageChannelState = [ channelId: (number | string)[], action: REMOTE_ACTION.STATE, state: any ]; export type RemoteMessageChannelEvent = [ channelId: (number | string)[], action: REMOTE_ACTION.EVENT, eventPath: (number | string)[], eventData: any[] ]; export type RemoteMessage = RemoteMessageCallResult | RemoteMessageChannelClosed | RemoteMessageChannelState | RemoteMessageChannelEvent;