apps/web/lib/operator-workbench-data.ts
Metadata
- Purpose: Frontend data/service utility module.
- Domain:
applications - Language:
ts - Bytes: 8572
- Lines: 214
- Content hash (short):
b9189f55 - Source (start): apps/web/lib/operator-workbench-data.ts:1
- Source (end): apps/web/lib/operator-workbench-data.ts:214
Indexed Symbols
asRecord(line 9, function) - Implements as record for module behavior.getConsoleWorkbenchData(line 89, function) - Implements get console workbench data for module behavior.getOpsWorkbenchData(line 121, function) - Implements get ops workbench data for module behavior.getPortalWorkbenchData(line 169, function) - Implements get portal workbench data for module behavior.
Markdown Headings (if applicable)
No markdown headings detected.
Source Preview
import "server-only";
import type { WorkflowExecution } from "@anchor/contracts";
import { gatewayJson, listResource } from "./gateway-server";
import { resolvePortalAuthToken } from "./portal-session";
type RecordData = Record<string, unknown>;
function asRecord(input: unknown): RecordData {
return typeof input === "object" && input !== null ? (input as RecordData) : {};
}
export type ConsoleWorkbenchData = {
inventory: Array<{ path: string; label: string; group: string; records: RecordData[] }>;
clients: RecordData[];
contacts: RecordData[];
assets: RecordData[];
services: RecordData[];
tickets: RecordData[];
alerts: RecordData[];
projects: RecordData[];
tasks: RecordData[];
runbooks: RecordData[];
kb: RecordData[];
quotes: RecordData[];