import { StreamTransport } from '@refinitiv-data/common';
import { ExtendedParams } from '../../content/base-interfaces/extended-params';
import { StateEvents, StateManager } from '../../state';
declare const AuthenticationSuccess: 'authenticationSuccess';
declare const AuthenticationFailed: 'authenticationFailed';
export declare const StreamConnectionEvent: {
    AuthenticationFailed: "authenticationFailed";
    AuthenticationSuccess: "authenticationSuccess";
    Error: "error";
    StateChanged: "stateChanged";
};
export interface StreamConnection<Res> extends StateManager<StreamConnectionEvents<Res>> {
    request(streamRequest: StreamRequestParams): Promise<number>;
    closeRequest(ID: number): Promise<void>;
    modifyRequest(ID: number, params: StreamRequestParams): Promise<void>;
    refresh(): Promise<void>;
}
export interface StreamConnectionEvents<T> extends StateEvents {
    [AuthenticationSuccess]: (streamConnection: StreamConnection<T>) => void;
    [AuthenticationFailed]: (streamConnection: StreamConnection<T>, err: Error) => void;
    [prop: string]: (...args: any) => void;
}
export declare const STREAM_FIRST_REQUEST_ID = 1;
export interface StreamLoginParams {
    /**
     * PlatformSession access token
     */
    authenticationToken?: string;
    /**
     * PlatformSession field that is used to proceed with authentication using access token
     */
    nameType?: string;
    /**
     * PlatformSession userName
     */
    name?: string;
    /**
     * API Proxy allows passing appKey
     */
    appKey?: string;
    /**
     * API Proxy JWT token that contains auth information
     */
    authorization?: string;
    /**
     * IP address of the client
     */
    position?: string;
    /**
     * Application ID
     */
    applicationId?: string;
}
export interface StreamRequestParams extends ExtendedParams {
    filter?: number;
    service?: string;
    name?: string | object | any[];
    domain?: string;
    streaming?: boolean;
    view?: string[];
    parameters?: object;
}
export declare const StreamReconnectIntervals: {
    WEB: number[];
    NODEJS: number[];
};
export declare const PING_TIMEOUT = 30;
export declare type socketCreator = () => StreamTransport;
export {};
