Files
common_agent/frontend/src/api/studioDashboard.ts

45 lines
1.0 KiB
TypeScript

import { get } from './request';
export interface StudioDashboardLifecycleStep {
name: string;
description?: string | null;
status?: string | null;
}
export interface StudioDashboardChecklistItem {
label: string;
done: boolean;
}
export interface StudioDashboardMetrics {
todayRunCount: number;
successRate: number;
p50Latency?: string | null;
estimatedCost?: string | null;
}
export interface StudioDashboardRecentRun {
id: string;
name?: string | null;
type?: string | null;
status?: string | null;
latency?: string | null;
cost?: string | null;
}
export interface StudioDashboard {
projectName?: string | null;
environment?: string | null;
publishStatus?: string | null;
lifecycleSteps: StudioDashboardLifecycleStep[];
readinessChecklist: StudioDashboardChecklistItem[];
metrics: StudioDashboardMetrics;
recentRuns: StudioDashboardRecentRun[];
warningTitle?: string | null;
warningMessage?: string | null;
}
export function getStudioDashboard() {
return get<StudioDashboard>('/studio/dashboard');
}