import type { Ref } from 'vue'; import type { GetDataFromConvention, RequestOptions } from './utility-types/index.js'; export type ResponseInterceptor = (response: Response) => Response | Promise; export interface RequestContext { url: string; options: RequestInit; } export type Settings = { baseUrl: string; interceptors?: { request: (request: RequestContext) => RequestContext | Promise; response: ResponseInterceptor; }; }; declare global { interface Convention { } } export interface ComposableResponse { data: Ref | null>; isLoading: Ref; isCacheLoading: Ref; isFreshData: Ref; error: Ref; fetch: (data?: { options?: RequestOptions; useCache?: boolean; }) => Promise>; }