import type { AxiosResponse, Method } from 'axios'; import type Config from "./config"; import { AxiosRequestConfig } from "axios"; export type ParamsMapper = (params: Record) => T; export declare enum ParamsMappingType { HEADER = "HEADER", PARAM = "PARAM", BODY = "BODY", PATH_VARIABLE = "PATH_VARIABLE" } export interface ParamsMapping { key: string; value: T | ParamsMapper; required?: boolean; } export type AxiosConfigMapper = (params: Record) => AxiosRequestConfig; export default class RequestBuilder { private _configs; private readonly _mapping; private readonly _pathVariablesMapping; private _addMapping; private _addPathVariablesMapping; private _clearMapping; param(key: string, required?: boolean): this; param(mapping: ParamsMapping): this; header(key: string, required?: boolean): this; header(mapping: ParamsMapping): this; body(keyOrMapping: string | ParamsMapping): this; pathVariable(keyOrMapping: string | ParamsMapping): this; config(cfg: AxiosRequestConfig | AxiosConfigMapper): this; build(config: Config, path: string, method: Method, source?: Record): AxiosRequestConfig; buildWith(config: Config, path: string, method: Method, source?: Record): Promise>; }