import { Observable, FetchResult } from 'apollo-link'; import { SubscriptionClient } from 'subscriptions-transport-ws'; import { ListenerFn } from 'eventemitter3'; export default class GraphQLSubscriptions { private clients; private consumers; constructor(); subscribe(options: { uri: string; subscription: string; queryVars: Record; onEvent: ListenerFn; onError: ListenerFn; onConnected: ListenerFn; onDisconnected: ListenerFn; onReconnected: ListenerFn; }): void; getWsClient(options: { wsurl: string; onConnected: ListenerFn; onDisconnected: ListenerFn; onReconnected: ListenerFn; }): SubscriptionClient; createSubscriptionObservable(options: { wsurl: string; query: string; variables: Record; onConnected: ListenerFn; onDisconnected: ListenerFn; onReconnected: ListenerFn; }): Observable, Record>>; }