import { Observable } from 'rxjs';
import { RpcExceptionsHandler } from '../exceptions/rpc-exceptions-handler.js';
/**
 * Handles what an exception filter threw, or rejected with, while it was
 * handling an error. No filter has handled that, so it is logged and
 * answered as an unknown error. An exception that returns itself from
 * `getError()` is a signal for the transport rather than an error, e.g.
 * `KafkaRetriableException` asking it to deliver the message again, so it
 * is passed on unchanged.
 */
export declare function handleExceptionFilterFailure(error: unknown): Observable<never>;
export declare class RpcProxy {
    create(targetCallback: (...args: unknown[]) => Promise<Observable<any>>, exceptionsHandler: RpcExceptionsHandler, reportUnhandledErrors?: boolean): (...args: unknown[]) => Promise<Observable<unknown>>;
    handleError<T>(exceptionsHandler: RpcExceptionsHandler, args: unknown[], error: T, reportUnhandledErrors?: boolean): Observable<unknown>;
    /**
     * Runs the filters for the error of a response stream. What a filter
     * throws, or rejects with, would otherwise become the error of the stream,
     * which the transport cannot tell from an error reply the filter returned.
     */
    private handleStreamError;
    private transformToObservable;
}
