first commit
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
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" | "plugins" | "users" | "aiProviders" | "maintenance" | "profileSettings";
|
||||
|
||||
export interface PageParams {
|
||||
serverId?: string;
|
||||
}
|
||||
|
||||
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<void>;
|
||||
onProfileSave: (request: UserProfileUpdateRequest) => Promise<CurrentUserView>;
|
||||
onThemePreferenceSave: (request: UserThemePreferenceRequest) => Promise<UserThemePreferenceResponse>;
|
||||
}
|
||||
|
||||
export type PageComponent = ComponentType<PageComponentProps>;
|
||||
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user