Add types for Moderator commands (#5084)

* Add types for Moderator commands

* Support User Priv Level & userLevel
This commit is contained in:
Zach H 2024-07-29 01:16:29 +00:00 committed by GitHub
parent 9f515fc804
commit c5bb38e907
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 51 additions and 34 deletions

View file

@ -15,3 +15,4 @@ export * from './languages';
export * from './logs';
export * from './session';
export * from './deckList';
export * from './moderator';

View file

@ -0,0 +1,21 @@
export interface BanHistoryItem {
adminId: string;
adminName: string;
banTime: string;
banLength: string;
banReason: string;
visibleReason: string;
}
export interface WarnHistoryItem {
userName: string;
adminName: string;
reason: string;
timeOf: string;
}
export interface WarnListItem {
warning: string;
userName: string;
userClientid: string;
}

View file

@ -109,7 +109,7 @@ export const KnownHosts = {
[KnownHost.TETRARCH]: { port: 443, host: 'mtg.tetrarch.co/servatrice' },
}
export interface Log {
export interface LogItem {
message: string;
senderId: string;
senderIp: string;
@ -121,7 +121,7 @@ export interface Log {
}
export interface LogGroups {
room: Log[];
game: Log[];
chat: Log[];
room: LogItem[];
game: LogItem[];
chat: LogItem[];
}

View file

@ -1,22 +1,17 @@
export interface User {
accountageSecs: number;
name: string;
privlevel: UserAccessLevel;
userLevel: UserPrivLevel;
privlevel: UserPrivLevel;
userLevel: number;
realName?: string;
country?: string;
avatarBmp?: Uint8Array;
}
export enum UserAccessLevel {
'NONE'
}
export enum UserPrivLevel {
'unknown 1',
'unknown 2',
'unknown 3',
'unknown 4'
NONE = 0,
VIP = 1,
DONOR = 2
}
export enum UserSortField {