Skip to main content

apps/web/lib/operator-workbench-data.ts

Metadata

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[];