servatrice/webclient/src/store/server/server.interfaces.ts
Jeremy Letto 6928a2bd98
Webatrice: show loading screen until protobuf initializes (#4559)
* show loading screen until protobuf initializes

* cleanup

Co-authored-by: Jeremy Letto <jeremy.letto@datasite.com>
2022-02-04 17:03:39 -05:00

72 lines
1.3 KiB
TypeScript

import { Log, SortBy, User, UserSortField } from 'types';
export interface ServerConnectParams {
host: string;
port: string;
userName: string;
password: string;
}
export interface ServerRegisterParams {
host: string;
port: string;
userName: string;
password: string;
email: string;
country: string;
realName: string;
}
export interface RequestPasswordSaltParams {
userName: string;
}
export interface ForgotPasswordParams {
userName: string;
}
export interface ForgotPasswordChallengeParams extends ForgotPasswordParams {
email: string;
}
export interface ForgotPasswordResetParams extends ForgotPasswordParams {
token: string;
newPassword: string;
}
export interface AccountActivationParams extends ServerRegisterParams {
token: string;
}
export interface ServerState {
initialized: boolean;
buddyList: User[];
ignoreList: User[];
info: ServerStateInfo;
status: ServerStateStatus;
logs: ServerStateLogs;
user: User;
users: User[];
sortUsersBy: ServerStateSortUsersBy;
}
export interface ServerStateStatus {
description: string;
state: number;
}
export interface ServerStateInfo {
message: string;
name: string;
version: string;
}
export interface ServerStateLogs {
room: Log[];
game: Log[];
chat: Log[];
}
export interface ServerStateSortUsersBy extends SortBy {
field: UserSortField
}