import type { FetchError } from 'ofetch'; import type { ErrorResponse, SuccessResponse, FilterKeys, MediaType, ResponseObjectMap, OperationRequestBodyContent } from 'openapi-typescript-helpers'; export type PickFrom> = T extends Array ? T : T extends Record ? keyof T extends K[number] ? T : K[number] extends never ? T : Pick : T; export type KeysOf = Array; export type FetchResponseData = FilterKeys>, MediaType>; export type FetchResponseError = FetchError>, MediaType>>; export type MethodOption = 'get' extends keyof P ? { method?: M; } : { method: M; }; export type ParamsOption = T extends { parameters: infer P; } ? { [K in keyof P as K extends 'header' ? [P[K]] extends [undefined] ? never : 'headers' : K]: P[K]; } : { query?: Record; }; export type RequestBodyOption = OperationRequestBodyContent extends never ? { body?: never; } : undefined extends OperationRequestBodyContent ? { body?: OperationRequestBodyContent; } : { body: OperationRequestBodyContent; }; //# sourceMappingURL=utils.d.ts.map