import type { Method } from "axios"; import { APIException, NetworkConnectionException } from "../Exception"; export interface SSEConfig { actionPrefix: string; url: string; customHeaders?: Record; method?: Method; payload?: Request; logResponse?: boolean; } type Unsubscriber = () => void; type ConnectedListener = (connectedTimes: number) => void; type ErrorListener = (error: NetworkConnectionException | APIException) => void; export interface SSE> { connect: () => Promise; disconnect: () => void; onConnected: (listener: ConnectedListener) => Unsubscriber; onError: (listener: ErrorListener) => Unsubscriber; onResponse: (event: E, listener: (data: NonNullable) => void) => Unsubscriber; } export declare function sse>({ actionPrefix, url, method, customHeaders, payload, logResponse, }: SSEConfig): SSE; export {}; //# sourceMappingURL=sse.d.ts.map