Add typescript types

This commit is contained in:
2024-10-28 19:48:34 +01:00
parent 6b38c706b4
commit 08de52f5f6

29
frontend/src/types.ts Normal file
View File

@@ -0,0 +1,29 @@
export type Player = {
id: number;
name: string;
guild: {
id: number;
name: string;
};
associations: Association[];
notes: Note[];
};
export type Association = {
id: number;
name: string;
note: string;
};
export type Note = {
id: number;
content: string;
timestamp: string;
player: Player;
};
export type APIResponse<T> = {
success: boolean;
message: string;
data: T;
}