import type { FetchContext, FetchError, FetchOptions } from 'ofetch'; import type { ErrorResponse, MediaType, OperationRequestBodyContent, ResponseObjectMap, SuccessResponse } from 'openapi-typescript-helpers'; export type FetchResponseData> = SuccessResponse, MediaType>; export type FetchResponseError> = FetchError, MediaType>>; export type MethodOption = 'get' extends keyof P ? { method?: M; } : { method: M; }; export type ParamsOption = T extends { parameters?: any; query?: any; } ? T['parameters'] : Record; export type RequestBodyOption = OperationRequestBodyContent extends never ? { body?: never; } : undefined extends OperationRequestBodyContent ? { body?: OperationRequestBodyContent; } : { body: OperationRequestBodyContent; }; export type FilterMethods = { [K in keyof Omit as T[K] extends never | undefined ? never : K]: T[K]; }; type OpenFetchOptions = MethodOption & ParamsOption & RequestBodyOption & Omit; export type OpenFetchClient = , Methods extends FilterMethods, Method extends Extract | Uppercase>, LowercasedMethod extends Lowercase extends keyof Methods ? Lowercase : never, DefaultMethod extends 'get' extends LowercasedMethod ? 'get' : LowercasedMethod, ResT = Methods[DefaultMethod] extends Record ? FetchResponseData : never>(url: ReqT, options?: OpenFetchOptions) => Promise; export declare function openFetchRequestInterceptor(ctx: FetchContext): void; export declare function createOpenFetch(options: FetchOptions | ((options: FetchOptions) => FetchOptions), localFetch?: typeof globalThis.$fetch): OpenFetchClient; export declare function fillPath(path: string, params?: Record): string; export {};