Docker / build (push) Has been cancelled
Добавлены syncLog в snapshot, API статистики дашборда и маппинг цен тарифов; переработаны shell, главная страница, empty states и новые экраны журнала синка и проектов. Co-authored-by: Cursor <cursoragent@cursor.com>
27 lines
639 B
TypeScript
27 lines
639 B
TypeScript
import { api } from '@/lib/api-client'
|
|
|
|
export interface DashboardStats {
|
|
activeVpsCount: number
|
|
totalVpsCount: number
|
|
providerCount: number
|
|
accountCount: number
|
|
monthlyBurnEstimate: number
|
|
totalBalanceApi: number
|
|
minRunwayDays: number | null
|
|
expiringWithin7Days: number
|
|
issuesCount: number
|
|
lastGlobalSyncAt: string | null
|
|
staleSyncAccountCount: number
|
|
lowBalanceAccountCount: number
|
|
}
|
|
|
|
export const dashboardKeys = {
|
|
stats: ['dashboard', 'stats'] as const,
|
|
}
|
|
|
|
export const dashboardStatsQueryOptions = () => ({
|
|
queryKey: dashboardKeys.stats,
|
|
queryFn: () => api.fetchDashboardStats(),
|
|
staleTime: 30_000,
|
|
})
|