This commit is contained in:
Reto Brunner 2024-02-24 14:03:05 +01:00
commit 12a0b0b6f9
3 changed files with 46 additions and 11 deletions

37
shared/types/network.ts Normal file
View file

@ -0,0 +1,37 @@
import {SharedChan} from "./chan";
export type SharedPrefixObject = {
symbol: string;
mode: string;
};
export type SharedNetworkChan = SharedChan & {
users: []; // TODO: this thing appears useless
totalMessages: number;
};
export type SharedPrefix = {
prefix: SharedPrefixObject[];
modeToSymbol: {[mode: string]: string};
symbols: string[];
};
export type SharedServerOptions = {
CHANTYPES: string[];
PREFIX: SharedPrefix;
NETWORK: string;
};
export type SharedNetworkStatus = {
connected: boolean;
secure: boolean;
};
export type SharedNetwork = {
uuid: string;
name: string;
nick: string;
serverOptions: SharedServerOptions;
status: SharedNetworkStatus;
channels: SharedNetworkChan[];
};