|
1 | 1 | export interface Mod {
|
2 |
| - id: string; |
3 |
| - filename: string; |
| 2 | + id: string |
| 3 | + filename: string |
4 | 4 | modrinth_ids: {
|
5 |
| - project_id: string; |
6 |
| - version_id: string; |
7 |
| - }; |
| 5 | + project_id: string |
| 6 | + version_id: string |
| 7 | + } |
8 | 8 | }
|
9 | 9 |
|
10 | 10 | interface License {
|
11 |
| - id: string; |
12 |
| - name: string; |
13 |
| - url: string; |
| 11 | + id: string |
| 12 | + name: string |
| 13 | + url: string |
14 | 14 | }
|
15 | 15 |
|
16 | 16 | interface DonationUrl {
|
17 |
| - id: string; |
18 |
| - platform: string; |
19 |
| - url: string; |
| 17 | + id: string |
| 18 | + platform: string |
| 19 | + url: string |
20 | 20 | }
|
21 | 21 |
|
22 | 22 | interface GalleryItem {
|
23 |
| - url: string; |
24 |
| - featured: boolean; |
25 |
| - title: string; |
26 |
| - description: string; |
27 |
| - created: string; |
28 |
| - ordering: number; |
| 23 | + url: string |
| 24 | + featured: boolean |
| 25 | + title: string |
| 26 | + description: string |
| 27 | + created: string |
| 28 | + ordering: number |
29 | 29 | }
|
30 | 30 |
|
31 | 31 | export interface Project {
|
32 |
| - slug: string; |
33 |
| - title: string; |
34 |
| - description: string; |
35 |
| - categories: string[]; |
36 |
| - client_side: "required" | "optional"; |
37 |
| - server_side: "required" | "optional"; |
38 |
| - body: string; |
39 |
| - status: "approved" | "pending" | "rejected"; |
40 |
| - requested_status: "approved" | "pending" | "rejected"; |
41 |
| - additional_categories: string[]; |
42 |
| - issues_url: string; |
43 |
| - source_url: string; |
44 |
| - wiki_url: string; |
45 |
| - discord_url: string; |
46 |
| - donation_urls: DonationUrl[]; |
47 |
| - project_type: "mod" | "resourcepack" | "map" | "plugin"; |
48 |
| - downloads: number; |
49 |
| - icon_url: string; |
50 |
| - color: number; |
51 |
| - thread_id: string; |
52 |
| - monetization_status: "monetized" | "non-monetized"; |
53 |
| - id: string; |
54 |
| - team: string; |
55 |
| - body_url: string | null; |
56 |
| - moderator_message: string | null; |
57 |
| - published: string; |
58 |
| - updated: string; |
59 |
| - approved: string; |
60 |
| - queued: string; |
61 |
| - followers: number; |
62 |
| - license: License; |
63 |
| - versions: string[]; |
64 |
| - game_versions: string[]; |
65 |
| - loaders: string[]; |
66 |
| - gallery: GalleryItem[]; |
| 32 | + slug: string |
| 33 | + title: string |
| 34 | + description: string |
| 35 | + categories: string[] |
| 36 | + client_side: 'required' | 'optional' |
| 37 | + server_side: 'required' | 'optional' |
| 38 | + body: string |
| 39 | + status: 'approved' | 'pending' | 'rejected' |
| 40 | + requested_status: 'approved' | 'pending' | 'rejected' |
| 41 | + additional_categories: string[] |
| 42 | + issues_url: string |
| 43 | + source_url: string |
| 44 | + wiki_url: string |
| 45 | + discord_url: string |
| 46 | + donation_urls: DonationUrl[] |
| 47 | + project_type: 'mod' | 'resourcepack' | 'map' | 'plugin' |
| 48 | + downloads: number |
| 49 | + icon_url: string |
| 50 | + color: number |
| 51 | + thread_id: string |
| 52 | + monetization_status: 'monetized' | 'non-monetized' |
| 53 | + id: string |
| 54 | + team: string |
| 55 | + body_url: string | null |
| 56 | + moderator_message: string | null |
| 57 | + published: string |
| 58 | + updated: string |
| 59 | + approved: string |
| 60 | + queued: string |
| 61 | + followers: number |
| 62 | + license: License |
| 63 | + versions: string[] |
| 64 | + game_versions: string[] |
| 65 | + loaders: string[] |
| 66 | + gallery: GalleryItem[] |
67 | 67 | }
|
68 | 68 |
|
69 | 69 | export interface Version extends Project {
|
70 |
| - project_id: string; |
| 70 | + project_id: string |
71 | 71 | }
|
72 | 72 |
|
73 | 73 | export interface ServerBackup {
|
74 |
| - id: string; |
75 |
| - name: string; |
76 |
| - created_at: string; |
| 74 | + id: string |
| 75 | + name: string |
| 76 | + created_at: string |
77 | 77 | }
|
78 | 78 |
|
79 | 79 | export interface Server {
|
80 |
| - server_id: string; |
81 |
| - name: string; |
82 |
| - state: string; |
| 80 | + server_id: string |
| 81 | + name: string |
| 82 | + state: string |
83 | 83 | net: {
|
84 |
| - ip: string; |
85 |
| - port: number; |
86 |
| - domain: string; |
87 |
| - }; |
88 |
| - modpack: string | null; |
89 |
| - modpack_id: string | null; |
90 |
| - project: Project | null; |
91 |
| - backups: ServerBackup[]; |
92 |
| - game: string; |
93 |
| - loader: string | null; |
94 |
| - loader_version: string | null; |
95 |
| - mc_version: string | null; |
96 |
| - mods: Mod[]; |
97 |
| - backup_quota: number; |
98 |
| - used_backup_quota: number; |
| 84 | + ip: string |
| 85 | + port: number |
| 86 | + domain: string |
| 87 | + } |
| 88 | + modpack: string | null |
| 89 | + modpack_id: string | null |
| 90 | + project: Project | null |
| 91 | + backups: ServerBackup[] |
| 92 | + game: string |
| 93 | + loader: string | null |
| 94 | + loader_version: string | null |
| 95 | + mc_version: string | null |
| 96 | + mods: Mod[] |
| 97 | + backup_quota: number |
| 98 | + used_backup_quota: number |
99 | 99 | }
|
100 | 100 |
|
101 | 101 | export interface WSAuth {
|
102 |
| - url: string; |
103 |
| - token: string; |
| 102 | + url: string |
| 103 | + token: string |
104 | 104 | }
|
105 | 105 |
|
106 |
| -export type ServerState = "running" | "stopped" | "crashed"; |
| 106 | +export type ServerState = 'running' | 'stopped' | 'crashed' |
107 | 107 | export type WebsocketEventType =
|
108 |
| - | "log" |
109 |
| - | "auth" |
110 |
| - | "stats" |
111 |
| - | "power-state" |
112 |
| - | "auth-expiring" |
113 |
| - | "auth-incorrect" |
114 |
| - | (string & {}); |
| 108 | + | 'log' |
| 109 | + | 'auth' |
| 110 | + | 'stats' |
| 111 | + | 'power-state' |
| 112 | + | 'auth-expiring' |
| 113 | + | 'auth-incorrect' |
| 114 | + | (string & {}) |
115 | 115 |
|
116 | 116 | export interface WSEvent {
|
117 |
| - event: WebsocketEventType; |
118 |
| - message: string; |
119 |
| - state: ServerState; |
| 117 | + event: WebsocketEventType |
| 118 | + message: string |
| 119 | + state: ServerState |
120 | 120 | }
|
121 | 121 |
|
122 | 122 | export interface Servers {
|
123 |
| - servers: Server[]; |
| 123 | + servers: Server[] |
124 | 124 | }
|
125 | 125 |
|
126 | 126 | export interface Stats {
|
127 | 127 | current: {
|
128 |
| - cpu_percent: number; |
129 |
| - ram_usage_bytes: number; |
130 |
| - ram_total_bytes: number; |
131 |
| - storage_usage_bytes: number; |
132 |
| - storage_total_bytes: number; |
133 |
| - }; |
| 128 | + cpu_percent: number |
| 129 | + ram_usage_bytes: number |
| 130 | + ram_total_bytes: number |
| 131 | + storage_usage_bytes: number |
| 132 | + storage_total_bytes: number |
| 133 | + } |
134 | 134 | past: {
|
135 |
| - cpu_percent: number; |
136 |
| - ram_usage_bytes: number; |
137 |
| - ram_total_bytes: number; |
138 |
| - storage_usage_bytes: number; |
139 |
| - storage_total_bytes: number; |
140 |
| - }; |
| 135 | + cpu_percent: number |
| 136 | + ram_usage_bytes: number |
| 137 | + ram_total_bytes: number |
| 138 | + storage_usage_bytes: number |
| 139 | + storage_total_bytes: number |
| 140 | + } |
141 | 141 | graph: {
|
142 |
| - cpu: number[]; |
143 |
| - ram: number[]; |
144 |
| - }; |
| 142 | + cpu: number[] |
| 143 | + ram: number[] |
| 144 | + } |
145 | 145 | }
|
0 commit comments