export interface ApiMetrics { /** Total API call count */ callCount: number; /** Total time spent on API calls (ms) */ totalTime: number; /** Average API call duration (ms) */ averageTime: number; /** Slowest API call (ms) */ slowestCall?: number; /** Failed API calls */ failedCalls: number; } export interface UseApiMetricsOptions { /** Enable tracking (default: true) */ enabled?: boolean; /** URL patterns to match API calls (default: ['/api/', 'graphql']) */ patterns?: string[]; /** Refresh interval in ms (default: 5000) */ refreshInterval?: number; /** Callback when metrics update */ onUpdate?: (metrics: ApiMetrics) => void; } /** * Hook to track API call metrics * * @example * ```tsx * const { metrics } = useApiMetrics({ * patterns: ['/api/', 'graphql'] * }); * console.log('API Calls:', metrics.callCount); * ``` */ export declare const useApiMetrics: (options?: UseApiMetricsOptions) => { metrics: ApiMetrics; refresh: () => void; }; //# sourceMappingURL=useApiMetrics.d.ts.map