import { Method } from './endpoint'; export interface ClientConfig { readonly baseUrl: string; } export interface PrepareRequestProps { readonly url: string; readonly method: Method; readonly headers: Record; readonly variables: Record | FormData; } export interface RequestProps extends PrepareRequestProps { readonly transformResponseData?: (data: unknown) => R; readonly abortSignal: AbortSignal; } export interface ResponseWithError extends Pick { readonly error?: Error; readonly canceled?: boolean; } export interface ClientResponse> extends ResponseWithError { readonly data: Data; } export declare class Client { private readonly config; constructor(config: ClientConfig); prepareRequest(props: PrepareRequestProps): Request; request>({ transformResponseData, abortSignal, ...restProps }: RequestProps): Promise>; }