apps/web/lib/dashboard-data.ts
Metadata
- Purpose: Frontend data/service utility module.
- Domain:
applications - Language:
ts - Bytes: 2011
- Lines: 66
- Content hash (short):
d88a43b5 - Source (start): apps/web/lib/dashboard-data.ts:1
- Source (end): apps/web/lib/dashboard-data.ts:66
Indexed Symbols
requestHeaders(line 34, function) - Implements request headers for module behavior.getDashboardData(line 42, function) - Implements get dashboard data for module behavior.
Markdown Headings (if applicable)
No markdown headings detected.
Source Preview
import type { WorkflowExecution } from "@anchor/contracts";
import { resolveOperatorAuthToken } from "./operator-session";
export type KpiTile = {
label: string;
value: string;
trend: string;
tone: "neutral" | "good" | "warning" | "critical";
};
export type EventRow = {
topic: string;
summary: string;
status: string;
createdAt: string;
};
export type DashboardData = {
kpiTiles: KpiTile[];
activeExecutions: WorkflowExecution[];
recentEvents: EventRow[];
};
type DashboardSummaryResponse = {
data?: {