Updates
This commit is contained in:
+39
-4
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user