diff options
Diffstat (limited to 'frontend/src/types/Map.ts')
| -rw-r--r-- | frontend/src/types/Map.ts | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/frontend/src/types/Map.ts b/frontend/src/types/Map.ts new file mode 100644 index 0000000..89c66d5 --- /dev/null +++ b/frontend/src/types/Map.ts | |||
| @@ -0,0 +1,108 @@ | |||
| 1 | import type { Category, GameCategoryPortals } from '@customTypes/Game'; | ||
| 2 | import type { Pagination } from '@customTypes/Pagination'; | ||
| 3 | import type { UserShort } from '@customTypes/Profile'; | ||
| 4 | |||
| 5 | export interface Map { | ||
| 6 | id: number; | ||
| 7 | name: string; | ||
| 8 | image: string; | ||
| 9 | is_disabled: boolean; | ||
| 10 | difficulty: number; | ||
| 11 | category_portals: GameCategoryPortals[]; | ||
| 12 | }; | ||
| 13 | |||
| 14 | export interface MapDiscussion { | ||
| 15 | discussion: MapDiscussionsDetail; | ||
| 16 | }; | ||
| 17 | |||
| 18 | export interface MapDiscussions { | ||
| 19 | discussions: MapDiscussionsDetail[]; | ||
| 20 | }; | ||
| 21 | |||
| 22 | export interface MapDiscussionsDetail { | ||
| 23 | id: number; | ||
| 24 | title: string; | ||
| 25 | content: string; | ||
| 26 | creator: UserShort; | ||
| 27 | comments: MapDiscussionDetailComment[]; | ||
| 28 | created_at: string; | ||
| 29 | updated_at: string; | ||
| 30 | }; | ||
| 31 | |||
| 32 | interface MapDiscussionDetailComment { | ||
| 33 | comment: string; | ||
| 34 | date: string; | ||
| 35 | user: UserShort; | ||
| 36 | }; | ||
| 37 | |||
| 38 | export interface MapLeaderboard { | ||
| 39 | map: MapSummaryMap; | ||
| 40 | records: MapLeaderboardRecordSingleplayer[] | MapLeaderboardRecordMultiplayer[]; | ||
| 41 | pagination: Pagination; | ||
| 42 | }; | ||
| 43 | |||
| 44 | export interface MapLeaderboardRecordSingleplayer { | ||
| 45 | kind: "singleplayer"; | ||
| 46 | placement: number; | ||
| 47 | record_id: number; | ||
| 48 | score_count: number; | ||
| 49 | score_time: number; | ||
| 50 | user: UserShort; | ||
| 51 | demo_id: string; | ||
| 52 | record_date: string; | ||
| 53 | }; | ||
| 54 | |||
| 55 | export interface MapLeaderboardRecordMultiplayer { | ||
| 56 | kind: "multiplayer"; | ||
| 57 | placement: number; | ||
| 58 | record_id: number; | ||
| 59 | score_count: number; | ||
| 60 | score_time: number; | ||
| 61 | host: UserShort; | ||
| 62 | partner: UserShort; | ||
| 63 | host_demo_id: string; | ||
| 64 | partner_demo_id: string; | ||
| 65 | record_date: string; | ||
| 66 | }; | ||
| 67 | |||
| 68 | |||
| 69 | export interface MapSummary { | ||
| 70 | map: MapSummaryMap; | ||
| 71 | summary: MapSummaryDetails; | ||
| 72 | }; | ||
| 73 | |||
| 74 | interface MapSummaryMap { | ||
| 75 | id: number; | ||
| 76 | image: string; | ||
| 77 | chapter_name: string; | ||
| 78 | game_name: string; | ||
| 79 | map_name: string; | ||
| 80 | is_coop: boolean; | ||
| 81 | is_disabled: boolean; | ||
| 82 | }; | ||
| 83 | |||
| 84 | interface MapSummaryDetails { | ||
| 85 | routes: MapSummaryDetailsRoute[]; | ||
| 86 | }; | ||
| 87 | |||
| 88 | interface MapSummaryDetailsRoute { | ||
| 89 | route_id: number; | ||
| 90 | category: Category; | ||
| 91 | history: MapSummaryDetailsRouteHistory; | ||
| 92 | rating: number; | ||
| 93 | completion_count: number; | ||
| 94 | description: string; | ||
| 95 | showcase: string; | ||
| 96 | }; | ||
| 97 | |||
| 98 | interface MapSummaryDetailsRouteHistory { | ||
| 99 | runner_name: string; | ||
| 100 | score_count: number; | ||
| 101 | date: string; | ||
| 102 | }; | ||
| 103 | |||
| 104 | export interface MapDeleteEndpoint { | ||
| 105 | map_id: number; | ||
| 106 | record_id: number; | ||
| 107 | } | ||
| 108 | |||