mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
30 lines
777 B
TypeScript
30 lines
777 B
TypeScript
import api from "./client";
|
|||
|
|
|
||
|
|
export interface CockpitSummary {
|
||
|
|
basis: string;
|
||
|
|
north_star: string;
|
||
|
|
objectives: Record<string, unknown>[];
|
||
|
|
delivery: {
|
||
|
|
task_counts: Record<string, number>;
|
||
|
|
in_flight: number;
|
||
|
|
blocked: number;
|
||
|
|
awaiting_ceo: number;
|
||
|
|
};
|
||
|
|
spend: {
|
||
|
|
spend_30d_usd: number;
|
||
|
|
projected_monthly_usd: number | null;
|
||
|
|
monthly_budget_cap_usd: number | null;
|
||
|
|
over_budget: boolean;
|
||
|
|
};
|
||
|
|
pending_pitches: number;
|
||
|
|
signals: { kind: string; summary: string; detail: string }[];
|
||
|
|
}
|
||
|
|
|
||
|
|
export const cockpitApi = {
|
||
|
|
// GET /api/cockpit/summary — read-only company snapshot (CEO / Board / PM).
|
||
|
|
summary: async (): Promise<CockpitSummary> => {
|
||
|
|
const { data } = await api.get<CockpitSummary>("/cockpit/summary");
|
||
|
|
return data;
|
||
|
|
},
|
||
|
|
};
|