import type { Trace } from './trace/trace.node.js'; export type Method = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'OPTIONS' | 'TRACE'; export type RequestAuth = { token?: string; username?: string; roles?: string; }; export type RequestOptions = object> = RequestInit & { params?: T; data?: any; }; export type Options = never> = RequestInit & { logger?: Trace; beforeEach?: >(method: Method, path: string, request: RequestOptions & Partial) => void; }; export interface RequestInit { /** A string indicating how the request will interact with the browser's cache to set request's cache. */ cache?: RequestCache; /** A string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials. */ credentials?: RequestCredentials; /** A Headers object, an object literal, or an array of two-item arrays to set request's headers. */ headers?: HeadersInit; /** A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */ integrity?: string; /** A boolean to set request's keepalive. */ keepalive?: boolean; /** A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode. */ mode?: RequestMode; /** A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect. */ redirect?: RequestRedirect; /** A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer. */ referrer?: string; /** A referrer policy to set request's referrerPolicy. */ referrerPolicy?: ReferrerPolicy; /** An AbortSignal to set request's signal. */ signal?: AbortSignal | null; /** Can only be null. Used to disassociate request from any Window. */ window?: null; } /** * Creates an HTTP client to make requests. * @template AdditionalOptions * @param {string} baseUrl - The base URL for requests. * @param {Options} [options={}] - Additional options for the client. * @returns {{ * options: Options, * execute(method: Method, path: string, request?: RequestOptions & Partial): Promise * }} The HTTP client. */ export declare function createClient = never>(baseUrl: string, options?: Options): { options: Options; execute(method: Method, path: string, request?: RequestOptions & Partial): Promise; };