import { DocumentNode, ExecutionResult } from 'graphql'; declare const CLIENT_EVENT_TYPES: { GQL_OP: string; }; declare const SERVER_EVENT_TYPES: { GQL_CONNECTED: string; GQL_ERROR: string; GQL_OP_RESULT: string; GQL_SUBSCRIBED: string; }; export { CLIENT_EVENT_TYPES, SERVER_EVENT_TYPES }; export declare namespace GQLClientEvents { interface GQLOperation { id: string; payload: { [key: string]: any; extensions?: { [key: string]: any; }; operationName?: string; query: string | DocumentNode; variables?: { [key: string]: any; }; }; type: typeof CLIENT_EVENT_TYPES['GQL_OP']; } } export declare namespace GQLServerEvents { interface GQLConnectedEvent { id: string; payload: { [key: string]: any; }; type: typeof SERVER_EVENT_TYPES['GQL_CONNECTED']; } interface GQLErrorEvent { id: string; payload: { message: string; }; type: typeof SERVER_EVENT_TYPES['GQL_ERROR']; } interface GQLOperationResult { /** * Same ID as the ID of an operation that we are returning a result for */ id: string; payload: ExecutionResult; type: typeof SERVER_EVENT_TYPES['GQL_OP_RESULT']; } interface GQLSubscribed { /** * Same ID as the ID of an operation (subscription) that's been used to subscribe */ id: string; payload: { [key: string]: any; }; type: typeof SERVER_EVENT_TYPES['GQL_SUBSCRIBED']; } } export declare type GQLClientAllEvents = GQLClientEvents.GQLOperation; export declare type GQLServerAllEvents = GQLServerEvents.GQLConnectedEvent | GQLServerEvents.GQLErrorEvent | GQLServerEvents.GQLOperationResult | GQLServerEvents.GQLSubscribed;