import type { IRestOptionsGlobals, IResponse, HttpMethod, IRestOptions } from "../interfaces"; export type CacheKey = (url: URL, method: HttpMethod | "*", customKey?: string) => string; export type CacheClear = () => void; export type CacheClearByKey = (cacheKey: string) => void; export type CacheSet = (response: IResponse, customKey?: string, expireIn?: number) => void; export type CacheGet = (url: URL, method: HttpMethod | "*", customKey?: string) => { response: IResponse; expireAt: Date | null; } | undefined; export type OptionsOverride = (overrides?: Partial>, base?: Partial>) => Partial>; export type RequestMethod = (path: string, overrides?: Partial>) => Promise>; export type RequestMethodFull = (method: HttpMethod, path: string, overrides?: Partial>) => Promise>; export default function createRestClient(options?: Partial>): () => { cacheKey: CacheKey; cacheClear: CacheClear; cacheClearByKey: CacheClearByKey; cacheSet: CacheSet; cacheGet: CacheGet; optionsOverride: OptionsOverride; getOption: import("../rest-client-builder").GetOption; setOption: import("../rest-client-builder").SetOption; cloneOptions: import("../rest-client-builder").CloneOptions; request: RequestMethodFull; get: RequestMethod; del: RequestMethod; post: RequestMethod; patch: RequestMethod; put: RequestMethod; };