import { ReactNode } from "react"; import { SWRResponse } from "swr"; import { FetchError } from "./FetchError"; import { ResponseTransform } from "./transformResponse"; import { EditorMode } from "./useMockedResponse"; export interface ApiProviderProps { method?: string; path: string; query?: Record; cacheKey?: any; enabled?: boolean; name?: string; editorMode?: EditorMode; previewData?: any; children: ReactNode; refetchIfStale?: boolean; refetchOnWindowFocus?: boolean; refetchOnReconnect?: boolean; retryOnError?: boolean; alertOnError?: boolean; useNodejsApi?: boolean; middleware?: string; suspense?: boolean; refreshInterval?: number; transformResponse?: ResponseTransform; onLoad?(data: any): void; onError?(error: FetchError): Promise; } export type ApiResponse = SWRResponse & { isLagging: boolean; }; export declare function ApiProvider(props: ApiProviderProps): import("react").JSX.Element; declare function fillProps(props: ApiProviderProps): { method: string; cacheKey: any; enabled: boolean; name: string; editorMode: EditorMode; refetchIfStale: boolean; refetchOnWindowFocus: boolean; refetchOnReconnect: boolean; retryOnError: boolean; alertOnError: boolean; suspense: boolean; transformResponse: ResponseTransform; path: string; query?: Record; previewData?: any; children: ReactNode; useNodejsApi?: boolean; middleware?: string; refreshInterval?: number; onLoad?(data: any): void; onError?(error: FetchError): Promise; }; export type ApiProviderFilledProps = ReturnType; export {};