@cubejs-client/ws-transport

WebSocket transport for Cube.js client

new WebSocketTransport(__namedParameters: object): WebSocketTransport

 apiUrl: string 

 heartBeatInterval: number 

 messageCounter: number 

 messageIdToSubscription: Record<number, Subscription> 

 messageQueue: Message[] 

 token: string | undefined 

 ws: any 

close(): Promise<void>

protected initSocket(): any

request(method: string, __namedParameters: object): ITransportResponse<WebSocketTransportResult>

protected sendMessage(message: any): void

new WebSocketTransportResult(__namedParameters: object): WebSocketTransportResult

 result: unknown 

 status: unknown 

json(): Promise<unknown>

NameType
messageIdnumber
methodstring
paramsRecord<string, unknown>
requestIdany

NameType
callback(result: WebSocketTransportResult) => void
messageMessage

NameType
apiUrlstring
authorization?string
hearBeatInterval?number
heartBeatInterval?number

Did you find this page useful?