Matthias Nott
2026-03-07 af1543135d42adc2e97dc5243aeef7418cd3b00d
types/index.ts
....@@ -16,9 +16,11 @@
1616 export interface ServerConfig {
1717 host: string;
1818 port: number;
19
+ localHost?: string;
20
+ macAddress?: string;
1921 }
2022
21
-export type ConnectionStatus = "disconnected" | "connecting" | "connected";
23
+export type ConnectionStatus = "disconnected" | "connecting" | "connected" | "compacting";
2224
2325 // --- WebSocket protocol ---
2426
....@@ -34,13 +36,20 @@
3436 content: string;
3537 }
3638
39
+export interface WsImageMessage {
40
+ type: "image";
41
+ imageBase64: string;
42
+ caption: string;
43
+ mimeType: string;
44
+}
45
+
3746 export interface WsCommandMessage {
3847 type: "command";
3948 command: string;
4049 args?: Record<string, unknown>;
4150 }
4251
43
-export type WsOutgoing = WsTextMessage | WsVoiceMessage | WsCommandMessage;
52
+export type WsOutgoing = WsTextMessage | WsVoiceMessage | WsImageMessage | WsCommandMessage;
4453
4554 /** Incoming from watcher to app */
4655 export interface WsIncomingText {
....@@ -91,6 +100,11 @@
91100 message: string;
92101 }
93102
103
+export interface WsIncomingStatus {
104
+ type: "status";
105
+ status: string;
106
+}
107
+
94108 export type WsIncoming =
95109 | WsIncomingText
96110 | WsIncomingVoice
....@@ -98,4 +112,5 @@
98112 | WsIncomingSessions
99113 | WsIncomingSessionSwitched
100114 | WsIncomingSessionRenamed
101
- | WsIncomingError;
115
+ | WsIncomingError
116
+ | WsIncomingStatus;