/** * ApiProvider - React Query Provider for @plyaz/api * * Provides React Query context for all API hooks in the package. * Optionally initializes the default API client with provided configuration. * * @module api/providers/ApiProvider */ import { type ReactElement } from 'react'; import { QueryClient } from '@tanstack/react-query'; import type { ApiProviderProps } from '@plyaz/types/api'; /** * Get or create the shared QueryClient instance. * Ensures a single QueryClient is used across the application. * * @returns The shared QueryClient instance * * @example * ```typescript * import { getQueryClient } from '@plyaz/api'; * * // Access query client for manual cache operations * const queryClient = getQueryClient(); * queryClient.invalidateQueries({ queryKey: ['users'] }); * ``` */ export declare function getQueryClient(): QueryClient; /** * Reset the QueryClient instance. * Useful for testing or when you need a fresh client. */ export declare function resetQueryClient(): void; export declare function ApiProvider({ children, queryClient, globalConfig, apiConfig, loading, error: errorComponent, onReady, onError, }: ApiProviderProps): ReactElement; //# sourceMappingURL=ApiProvider.d.ts.map