import type { ComponentType } from "react"; import type { UserProfileUpdateRequest, UserThemePreferenceRequest, UserThemePreferenceResponse } from "../api/types"; import type { CurrentUserView, WorkspaceCapability } from "./workspace"; import type { OperationTracker } from "../stores/operations"; export type PageId = "home" | "servers" | "serverDetail" | "pluginPage" | "plugins" | "users" | "aiProviders" | "maintenance" | "profileSettings"; export interface PageParams { serverId?: string; pluginId?: string; routeKey?: string; pageQuery?: Record; } export interface PageRoute { id: PageId; label: string; path: string; hash: string; description: string; requiredCapability: WorkspaceCapability; showInNav: boolean; } export interface PageComponentProps { session: CurrentUserView; params: PageParams; operations: OperationTracker; onNavigate: (pageId: PageId, params?: PageParams) => void; onLogout: () => Promise; onProfileSave: (request: UserProfileUpdateRequest) => Promise; onThemePreferenceSave: (request: UserThemePreferenceRequest) => Promise; } export type PageComponent = ComponentType; export interface PageMetric { label: string; value: string; tone: "neutral" | "success" | "warning"; } export interface ShellSummaryItem { label: string; value: string; detail: string; tone: PageMetric["tone"]; } export interface ServerInstanceView { id: string; name: string; plugin: string; runEndpoint: string; state: "draft" | "installing" | "ready" | "running" | "stopped" | "failed" | "deleted"; pendingJobs: number; latestLog: string; } export interface PluginCatalogItem { id: string; name: string; version: string; serverType: string; status: "installed" | "disabled" | "invalid" | "updating"; permissions: string[]; bridgeActions: string[]; validation: string; } export interface UserAccessView { id: string; displayName: string; status: "active" | "disabled" | "pending"; roles: string[]; review: string; }