From 08de52f5f6fa775021ccd9cf95836a4159c64a8f Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Mon, 28 Oct 2024 19:48:34 +0100 Subject: [PATCH] Add typescript types --- frontend/src/types.ts | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 frontend/src/types.ts diff --git a/frontend/src/types.ts b/frontend/src/types.ts new file mode 100644 index 0000000..787701c --- /dev/null +++ b/frontend/src/types.ts @@ -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 = { + success: boolean; + message: string; + data: T; +} \ No newline at end of file