import type { Ref } from '#imports'; import type { FetchOptions, FetchResponse } from 'ofetch'; type OnBeforeSendArgs = { query: FetchOptions['query']; body: FetchOptions['body']; headers: FetchOptions['headers']; }; type OnResponseArgs = { response: FetchResponse; request: RequestInfo; }; type OnSuccessArgs, TParams = object> = { data: TData; meta: TMeta; headers: FetchOptions['headers']; params: TParams; }; type OnCompleteArgs = { response?: FetchResponse; request: RequestInfo; }; export interface RefOptions { data?: Ref; error?: Ref; loading?: Ref; meta?: Ref>; } export interface HooksOptions, TParams = object> { onBeforeSend?(args: OnBeforeSendArgs): Promise | unknown; onComplete?(args: OnCompleteArgs): Promise | unknown; onError?(reason: Error): Promise | unknown; onFatal?(reason: Error): Promise | unknown; onResponse?(args: OnResponseArgs): Promise | unknown; onSuccess?(args: OnSuccessArgs): Promise | unknown; } export interface ParamsOptions { body?: FetchOptions['body']; controller?: AbortController; default?: () => unknown; global?: boolean; headers?: FetchOptions['headers']; method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH'; query?: FetchOptions['query']; requiresTenant?: boolean; timeout?: FetchOptions['timeout']; } export type ApiOptions, TParams = object> = ParamsOptions & HooksOptions & RefOptions & { params?: TParams; }; declare const _default: import("nuxt/app").Plugin> & import("nuxt/app").ObjectPlugin>; export default _default;