/// <reference types="node" />
import { z } from 'zod';
export type BasicCredentials = {
    username: string;
    password: string;
};
export type RequestConfig = {
    auth?: BasicCredentials;
    baseUrl?: string;
    headers?: Record<string, string>;
    params?: Record<string, string>;
    withCredentials?: boolean;
};
export interface RequestOptions<T> extends RequestInit {
    responseSchema?: z.ZodSchema<T>;
    params?: Record<string, string>;
}
type Method = 'ALL' | 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD';
export type HttpMethods = {
    [K in Method]: Lowercase<K>;
}[Method];
export type HttpHeader = {
    name: string;
    value: string;
};
export interface HttpResponse<T> extends Response {
    data?: T;
}
export type RequestInterceptor = <T = any>(url: string, request: RequestOptions<T>) => Promise<RequestOptions<T>>;
export type ResponseInterceptor = <T = any>(response: HttpResponse<T>) => Promise<HttpResponse<T>>;
export {};
