import { get } from './apiClient'; import type { DashboardStats, HourlyTrend, ServiceRatio, ErrorTrend, TopApi, TenantRatio } from '../types/dashboard'; import type { RequestLog } from '../types/monitoring'; import type { HeartbeatStatus } from '../types/service'; export const getSummary = () => get('/dashboard/summary'); export const getHourlyTrend = () => get('/dashboard/hourly-trend'); export const getServiceRatio = () => get('/dashboard/service-ratio'); export const getErrorTrend = () => get('/dashboard/error-trend'); export const getTopApis = (limit = 10) => get(`/dashboard/top-apis?limit=${limit}`); export const getTenantRequestRatio = () => get('/dashboard/tenant-request-ratio'); export const getTenantUserRatio = () => get('/dashboard/tenant-user-ratio'); export const getRecentLogs = () => get('/dashboard/recent-logs'); export const getHeartbeat = () => get('/dashboard/heartbeat');