This commit is contained in:
Benjamin Toby
2025-02-16 17:12:40 +01:00
parent e9761cc971
commit e95f4d1087
628 changed files with 3091 additions and 1073 deletions
+49
View File
@@ -1,3 +1,5 @@
import { DSQL_DATASQUIREL_PROCESS_QUEUE } from "@/package-shared/types/dsql";
export type APIResponseObject<
T extends { [k: string]: any } = { [k: string]: any }
> = {
@@ -6,3 +8,50 @@ export type APIResponseObject<
msg?: string;
err?: string;
};
export const WebSocketEvents = [
/**
* # Client Events
* @description Events sent from Client to Server
*/
"client:check-queue",
"client:dev:queue",
"client:delete-queue",
/**
* # Server Events
* @description Events sent from Server to Client
*/
"server:error",
"server:message",
"server:ready",
"server:success",
"server:update",
"server:queue",
"server:dev:queue",
"server:queue-deleted",
] as const;
export type WebSocketDataType = {
event: (typeof WebSocketEvents)[number];
data?: {
queue?: DSQL_DATASQUIREL_PROCESS_QUEUE;
};
error?: string;
message?: string;
};
export const DatasquirelWindowEvents = [
"queue-started",
"queue-complete",
"queue-running",
] as const;
export type DatasquirelWindowEventPayloadType = {
event: (typeof DatasquirelWindowEvents)[number];
data?: {
queue?: DSQL_DATASQUIREL_PROCESS_QUEUE;
};
error?: string;
message?: string;
};