import _ from 'lodash';
import { ErrorLike } from '@httptoolkit/util';
import { HtkConfig } from '../config';
export interface Interceptor {
    id: string;
    version: string;
    getMetadata?(type: 'summary' | 'detailed'): Promise<any>;
    getSubMetadata?(subId: string): Promise<any>;
    isActivable(): Promise<boolean>;
    activableTimeout?: number;
    isActive(proxyPort: number): Promise<boolean> | boolean;
    activate(proxyPort: number, options?: any): Promise<void | {}>;
    deactivate(proxyPort: number, options?: any): Promise<void | {}>;
    deactivateAll(): Promise<void | {}>;
}
export interface ActivationError extends ErrorLike {
    /**
     * Activation errors can have an extra `metadata` field, to share data with the
     * client which attempted the activation, e.g. whether it can be retried.
     */
    metadata?: any;
    /**
     * Errors should be thrown with reportable set to `false` if they're a 'normal'
     * event that shouldn't be logged or exposed to the user. For example, if it's a
     * temporary failure that will lead to a confirmation flow or similar.
     *
     * This disables error logging and reporting of failure details from the API
     * (it assumes that the metadata will expose any info required, since this is a
     * recognized failure case).
     */
    reportable?: boolean;
}
export declare function buildInterceptors(config: HtkConfig): _.Dictionary<Interceptor>;
