import { z } from 'zod'; import { Axios, AxiosRequestConfig } from 'axios'; import { API, ZodBase } from '../def'; /** * Contains all the information needed to make a single API request. */ export interface RequestInfo { /** The API definition created by `defineAPI`. */ api: API; /** The input data for the request, matching the API's DTO schema. */ data: DTO extends ZodBase ? z.output : void; /** An optional Axios instance to use for the request. */ axios?: Axios; /** Optional Axios request configuration to customize the request. */ requestConfig?: AxiosRequestConfig; } /** * The core function for making a type-safe API call. * It handles DTO validation, making the HTTP request, and VO validation. * @param req The request information object. * @returns A Promise that resolves with the validated response data (VO) or void. */ export declare function callAPI(req: RequestInfo): Promise : void>; //# sourceMappingURL=request.d.ts.map