import type { Expectation, IExpectationSchemaForward } from '../../../expectations';
import { RequestContext, IRequestContextOutgoing, IRequestContextIncoming, IRequestContextForwarded } from '../context';
export * from './errors';
export interface IExecutorExecOptions {
    expectation?: Expectation<any>;
}
export declare abstract class Executor<TRequestContext extends RequestContext = RequestContext> {
    TRequestContext: TRequestContext;
    TContext: TRequestContext['TContext'];
    /** Uses to handle request forwarding */
    abstract forward(context: TRequestContext, incoming: IRequestContextIncoming, configuration: IExpectationSchemaForward): Promise<IRequestContextForwarded | null>;
    /** Uses to handle outgoing payload and reply */
    abstract reply(context: TRequestContext, outgoing: IRequestContextOutgoing): Promise<IRequestContextOutgoing | null>;
    /** Matches expectation */
    match(context: TRequestContext): Promise<Expectation<any> | null>;
    /** Prepares context right after expectation was manipulated */
    prepare(context: TRequestContext): Promise<unknown>;
    /** Uses to handle whole request */
    exec(context: TRequestContext, options?: IExecutorExecOptions): Promise<TRequestContext>;
    private handleForwarding;
    private handleReplying;
}
//# sourceMappingURL=index.d.ts.map