Skip to main content

apps/web/lib/dashboard-data.ts

Metadata

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?: {