This commit is contained in:
2026-03-09 16:49:49 +00:00
parent 8491c52639
commit 76bf623116
27 changed files with 460 additions and 46 deletions
+39 -4
View File
@@ -1,4 +1,6 @@
import { ToastStyles } from "@/twui/components/elements/Toast";
import { DATASQUIREL_LoggedInUser } from "@moduletrace/datasquirel/dist/package-shared/types";
import useAppInit from "../hooks/use-app-init";
export type User = DATASQUIREL_LoggedInUser & {};
@@ -169,13 +171,18 @@ export type ServiceScriptObject = {
work_dir?: string;
};
export type URLQueryType = {};
export type URLQueryType = {
service_name?: string | null;
};
export type PagePropsType = {
config?: TCIGlobalConfig | null;
deployment?: TCIGlobalConfig | null;
query?: URLQueryType | null;
user: User;
pageUrl?: string | null;
deployment_id?: string | null;
service?: ParsedDeploymentServiceConfig | null;
children_services?: ParsedDeploymentServiceConfig[] | null;
};
export type APIReqObject = {
@@ -208,6 +215,34 @@ export type TurboCISignupFormObject = {
confirmed_password?: string;
};
export type TurboCIAdminAppContextType = {
pageProps: PagePropsType;
export type TurboCIAdminAppContextType = ReturnType<typeof useAppInit>;
export const WebSocketEvents = [
"client:ping",
"server:ping",
"server:error",
"server:message",
"server:ready",
"server:success",
"server:update",
] as const;
export type WebSocketDataType = {
event: (typeof WebSocketEvents)[number];
message?: string;
};
export type WebSocketType = {
socket?: WebSocket;
data?: WebSocketDataType | null;
message?: string;
sendData?: (data: WebSocketDataType) => void;
};
export type ToastType = {
toastStyle?: (typeof ToastStyles)[number];
toastMessage?: string;
toastOpen: boolean;
closeDelay?: number;
};