import type { ResponseType } from 'axios';
import { Route } from '../Services/Route';
import { SessionBasedService } from '../Services/SessionBasedService';
import { BringgException, StringProducer } from './BringgException';
export declare const defaultExtractor: (response: any) => any;
/**
 * Creates an "unsuccessful result" BringgException with a manually initialized stack trace.
 * @param exception The error message.
 * @param stackConstructor Optionally provide the error factory function, so it will be omitted from the stack if possible.
 */
export declare function createServiceError(exception: string | StringProducer, stackConstructor?: (...args: any[]) => any): BringgException<any>;
export interface CommonOptions {
    signal?: AbortSignal;
}
export declare class Request {
    private service;
    private route;
    private extractor;
    private exception?;
    private payload?;
    private routeParams?;
    private queryString?;
    private headers?;
    private responseType?;
    private signal?;
    constructor(service: SessionBasedService, route: Route);
    withRouteParams(routeParams: any): this;
    withQueryString(queryString: any): this;
    withExtractor(extractor: (response: any) => any): this;
    withPayload(payload: any): this;
    withHeaders(headers: {}): this;
    withResponseType(responseType: ResponseType): this;
    withCommonOptions(commonOptions?: CommonOptions): this;
    setException(exception: string | StringProducer): this;
    invoke<ResponseFormat, ReturnType>(): Promise<ReturnType>;
}
export default class RouteGenerator {
    private service;
    constructor(service: SessionBasedService);
    get(routeName?: string): Request;
    post(routeName?: string): Request;
    put(routeName?: string): Request;
    patch(routeName?: string): Request;
    delete(routeName?: string): Request;
}
