import { StreamingType } from '../../../config'; import { StreamLoginParams, StreamRequestParams } from '../stream-connection'; export declare enum ProtocolInitialMessageSummary { Success = "Success", Error = "Error", Pending = "Pending" } export interface ProtocolResponseSummary { isCompleteSnapshotMessage: boolean; isErrorMessage: boolean; isClosedStatusMessage: boolean; isOpenStatusMessage: boolean; responseId?: number; stateMessage?: string; errorMessage?: string; pingTimeout?: number; } export interface ProtocolPingPongConfig { getPongMessage(): Req; getPingMessage(): Req; isPingMessage(res: Res): boolean; isPongMessage(res: Res): boolean; } export interface Protocol { getProtocolName(): string; getProtocolType(): StreamingType; getPingPongConfig(): ProtocolPingPongConfig | undefined; getSummary(res: Res): Partial; getInitialMessageSummary(res: Res): ProtocolInitialMessageSummary; createRequest(id: number, params: StreamRequestParams): Req; createCloseRequest(id: number): Req; createModifyRequest?(id: number, params: StreamRequestParams): Partial; getLoginMessage(loginParams: StreamLoginParams): Req; getStreamingRecoverMessage(name: string, isCompleted?: boolean): Res; getStreamingErrorMessage(name: string, afterReconnect?: boolean): Res; }