fix: NCWF-4 Token Issues (#8)
Co-authored-by: Lala, Shahd <Shahd.Lala@sybit.de> Co-authored-by: shahdlala66 <shahd.lala66@gmail.com> Reviewed-on: #8
This commit was merged in pull request #8.
This commit is contained in:
@@ -17,7 +17,8 @@ export interface RegisterResponse {
|
||||
}
|
||||
|
||||
export interface LoginResponse {
|
||||
token: string;
|
||||
accessToken: string;
|
||||
refreshToken: string;
|
||||
}
|
||||
|
||||
export interface CurrentUser {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
export interface Bot {
|
||||
id: string;
|
||||
name: string;
|
||||
rating: number;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export interface BotWithToken extends Bot {
|
||||
token: string;
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
export interface TournamentClock {
|
||||
limit: number;
|
||||
increment: number;
|
||||
}
|
||||
|
||||
export interface TournamentVariant {
|
||||
key: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface TournamentBotRef {
|
||||
id: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface TournamentResult {
|
||||
rank: number;
|
||||
points: number;
|
||||
tieBreak: number;
|
||||
bot: TournamentBotRef;
|
||||
nbGames: number;
|
||||
wins: number;
|
||||
draws: number;
|
||||
losses: number;
|
||||
}
|
||||
|
||||
export interface TournamentStanding {
|
||||
page: number;
|
||||
players: TournamentResult[];
|
||||
}
|
||||
|
||||
export interface Tournament {
|
||||
id: string;
|
||||
fullName: string;
|
||||
clock: TournamentClock;
|
||||
variant: TournamentVariant;
|
||||
rated: boolean;
|
||||
nbPlayers: number;
|
||||
nbRounds: number;
|
||||
createdBy: string;
|
||||
startsAt: string | null;
|
||||
status: 'created' | 'started' | 'finished';
|
||||
round: number;
|
||||
standing: TournamentStanding;
|
||||
winner: TournamentBotRef | null;
|
||||
}
|
||||
|
||||
export interface TournamentList {
|
||||
created: Tournament[];
|
||||
started: Tournament[];
|
||||
finished: Tournament[];
|
||||
}
|
||||
|
||||
export interface TournamentPairing {
|
||||
id: string;
|
||||
round: number;
|
||||
white: TournamentBotRef | null;
|
||||
black: TournamentBotRef;
|
||||
gameId: string | null;
|
||||
winner: 'white' | 'black' | 'draw' | null;
|
||||
}
|
||||
|
||||
export interface RoundPairings {
|
||||
round: number;
|
||||
pairings: TournamentPairing[];
|
||||
}
|
||||
Reference in New Issue
Block a user