Implemented invitation logic. Implemented play list method. Mild refactoring.

This commit is contained in:
jd
2026-02-20 23:51:16 +00:00
parent 5742214115
commit 335f1821cd
24 changed files with 1118 additions and 166 deletions

View File

@@ -1,7 +1,7 @@
import { hashIds } from './guard';
export interface LoginRequest {
username: string;
email: string;
password: string;
}
export interface ChangePasswordRequest {
@@ -9,7 +9,7 @@ export interface ChangePasswordRequest {
newPassword: string;
}
export interface CreateUserRequest {
username: string;
email: string;
password: string;
playerId: string;
}
@@ -17,13 +17,21 @@ export interface UpdateUserRequest {
isActive?: boolean;
isAdmin?: boolean;
}
export interface InviteUserRequest {
email: string;
playerId: string;
}
export interface AcceptInviteRequest {
inviteCode: string;
password: string;
}
export interface CreatePlayerRequest {
name: string;
}
export interface UpdatePlayerRequest {
name?: string;
isRatingLocked?:boolean;
canBeMultiple?:boolean;
isRatingLocked?: boolean;
canBeMultiple?: boolean;
}
export interface CreateGameRequest {
name: string;
@@ -65,6 +73,10 @@ export class SecureId {
return this.#hashedValue;
}
valueOf(): string | undefined {
return this.#secureValue;
}
public static fromHash(hash: string) {
return new SecureId({ public: hash });
}