rhythia-api 185.0.0 → 187.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/.prettierrc.json +6 -6
  2. package/api/addCollectionMap.ts +82 -82
  3. package/api/approveMap.ts +78 -78
  4. package/api/chartPublicStats.ts +32 -32
  5. package/api/createBeatmap.ts +168 -168
  6. package/api/createBeatmapPage.ts +64 -64
  7. package/api/createClan.ts +81 -81
  8. package/api/createCollection.ts +58 -58
  9. package/api/deleteBeatmapPage.ts +77 -77
  10. package/api/deleteCollection.ts +59 -59
  11. package/api/deleteCollectionMap.ts +71 -71
  12. package/api/editAboutMe.ts +91 -91
  13. package/api/editClan.ts +90 -90
  14. package/api/editCollection.ts +77 -77
  15. package/api/editProfile.ts +123 -123
  16. package/api/getAvatarUploadUrl.ts +85 -85
  17. package/api/getBadgedUsers.ts +56 -56
  18. package/api/getBeatmapComments.ts +57 -57
  19. package/api/getBeatmapPage.ts +106 -106
  20. package/api/getBeatmapPageById.ts +99 -99
  21. package/api/getBeatmapStarRating.ts +53 -53
  22. package/api/getBeatmaps.ts +159 -159
  23. package/api/getClan.ts +77 -77
  24. package/api/getCollection.ts +130 -130
  25. package/api/getCollections.ts +132 -130
  26. package/api/getLeaderboard.ts +136 -136
  27. package/api/getMapUploadUrl.ts +93 -93
  28. package/api/getPassToken.ts +55 -55
  29. package/api/getProfile.ts +146 -146
  30. package/api/getPublicStats.ts +180 -180
  31. package/api/getRawStarRating.ts +57 -57
  32. package/api/getScore.ts +85 -85
  33. package/api/getTimestamp.ts +23 -23
  34. package/api/getUserScores.ts +175 -175
  35. package/api/nominateMap.ts +82 -82
  36. package/api/postBeatmapComment.ts +59 -59
  37. package/api/rankMapsArchive.ts +64 -64
  38. package/api/searchUsers.ts +56 -56
  39. package/api/setPasskey.ts +59 -59
  40. package/api/submitScore.ts +433 -433
  41. package/api/updateBeatmapPage.ts +229 -229
  42. package/handleApi.ts +21 -20
  43. package/index.html +2 -2
  44. package/index.ts +867 -866
  45. package/package.json +1 -1
  46. package/types/database.ts +800 -798
  47. package/utils/getUserBySession.ts +48 -48
  48. package/utils/requestUtils.ts +87 -87
  49. package/utils/security.ts +20 -20
  50. package/utils/star-calc/index.ts +72 -72
  51. package/utils/star-calc/osuUtils.ts +53 -53
  52. package/utils/star-calc/sspmParser.ts +398 -398
  53. package/utils/star-calc/sspmv1Parser.ts +165 -165
  54. package/utils/supabase.ts +13 -13
  55. package/utils/test +4 -4
  56. package/utils/validateToken.ts +7 -7
  57. package/vercel.json +12 -12
package/index.ts CHANGED
@@ -1,459 +1,282 @@
1
1
  import { handleApi } from "./handleApi"
2
2
 
3
- // ./api/getPassToken.ts API
4
-
5
- /*
6
- export const Schema = {
7
- input: z.strictObject({
8
- data: z.object({
9
- email: z.string(),
10
- passkey: z.string(),
11
- computerName: z.string(),
12
- }),
13
- }),
14
- output: z.object({
15
- token: z.string().optional(),
16
- error: z.string().optional(),
17
- }),
18
- };*/
19
- import { Schema as GetPassToken } from "./api/getPassToken"
20
- export { Schema as SchemaGetPassToken } from "./api/getPassToken"
21
- export const getPassToken = handleApi({url:"/api/getPassToken",...GetPassToken})
22
-
23
- // ./api/getMapUploadUrl.ts API
24
-
25
- /*
26
- export const Schema = {
27
- input: z.strictObject({
28
- mapName: z.string().optional(),
29
- session: z.string(),
30
- contentLength: z.number(),
31
- contentType: z.string(),
32
- intrinsicToken: z.string(),
33
- }),
34
- output: z.strictObject({
35
- error: z.string().optional(),
36
- url: z.string().optional(),
37
- objectKey: z.string().optional(),
38
- }),
39
- };*/
40
- import { Schema as GetMapUploadUrl } from "./api/getMapUploadUrl"
41
- export { Schema as SchemaGetMapUploadUrl } from "./api/getMapUploadUrl"
42
- export const getMapUploadUrl = handleApi({url:"/api/getMapUploadUrl",...GetMapUploadUrl})
43
-
44
- // ./api/createCollection.ts API
45
-
46
- /*
47
- export const Schema = {
48
- input: z.strictObject({
49
- session: z.string(),
50
- title: z.string(),
51
- }),
52
- output: z.object({
53
- id: z.number(),
54
- error: z.string().optional(),
55
- }),
56
- };*/
57
- import { Schema as CreateCollection } from "./api/createCollection"
58
- export { Schema as SchemaCreateCollection } from "./api/createCollection"
59
- export const createCollection = handleApi({url:"/api/createCollection",...CreateCollection})
60
-
61
- // ./api/deleteCollectionMap.ts API
62
-
63
- /*
64
- export const Schema = {
65
- input: z.strictObject({
66
- session: z.string(),
67
- collection: z.number(),
68
- beatmapPage: z.number(),
69
- }),
70
- output: z.object({
71
- error: z.string().optional(),
72
- }),
73
- };*/
74
- import { Schema as DeleteCollectionMap } from "./api/deleteCollectionMap"
75
- export { Schema as SchemaDeleteCollectionMap } from "./api/deleteCollectionMap"
76
- export const deleteCollectionMap = handleApi({url:"/api/deleteCollectionMap",...DeleteCollectionMap})
77
-
78
- // ./api/getAvatarUploadUrl.ts API
3
+ // ./api/addCollectionMap.ts API
79
4
 
80
5
  /*
81
- export const Schema = {
82
- input: z.strictObject({
83
- session: z.string(),
84
- contentLength: z.number(),
85
- contentType: z.string(),
86
- intrinsicToken: z.string(),
87
- }),
88
- output: z.strictObject({
89
- error: z.string().optional(),
90
- url: z.string().optional(),
91
- objectKey: z.string().optional(),
92
- }),
6
+ export const Schema = {
7
+ input: z.strictObject({
8
+ session: z.string(),
9
+ collection: z.number(),
10
+ beatmapPage: z.number(),
11
+ }),
12
+ output: z.object({
13
+ error: z.string().optional(),
14
+ }),
93
15
  };*/
94
- import { Schema as GetAvatarUploadUrl } from "./api/getAvatarUploadUrl"
95
- export { Schema as SchemaGetAvatarUploadUrl } from "./api/getAvatarUploadUrl"
96
- export const getAvatarUploadUrl = handleApi({url:"/api/getAvatarUploadUrl",...GetAvatarUploadUrl})
16
+ import { Schema as AddCollectionMap } from "./api/addCollectionMap"
17
+ export { Schema as SchemaAddCollectionMap } from "./api/addCollectionMap"
18
+ export const addCollectionMap = handleApi({url:"/api/addCollectionMap",...AddCollectionMap})
97
19
 
98
20
  // ./api/approveMap.ts API
99
21
 
100
22
  /*
101
- export const Schema = {
102
- input: z.strictObject({
103
- session: z.string(),
104
- mapId: z.number(),
105
- }),
106
- output: z.object({
107
- error: z.string().optional(),
108
- }),
23
+ export const Schema = {
24
+ input: z.strictObject({
25
+ session: z.string(),
26
+ mapId: z.number(),
27
+ }),
28
+ output: z.object({
29
+ error: z.string().optional(),
30
+ }),
109
31
  };*/
110
32
  import { Schema as ApproveMap } from "./api/approveMap"
111
33
  export { Schema as SchemaApproveMap } from "./api/approveMap"
112
34
  export const approveMap = handleApi({url:"/api/approveMap",...ApproveMap})
113
35
 
114
- // ./api/nominateMap.ts API
36
+ // ./api/chartPublicStats.ts API
115
37
 
116
38
  /*
117
- export const Schema = {
118
- input: z.strictObject({
119
- session: z.string(),
120
- mapId: z.number(),
121
- }),
122
- output: z.object({
123
- error: z.string().optional(),
124
- }),
39
+ export const Schema = {
40
+ input: z.strictObject({}),
41
+ output: z.object({}),
125
42
  };*/
126
- import { Schema as NominateMap } from "./api/nominateMap"
127
- export { Schema as SchemaNominateMap } from "./api/nominateMap"
128
- export const nominateMap = handleApi({url:"/api/nominateMap",...NominateMap})
43
+ import { Schema as ChartPublicStats } from "./api/chartPublicStats"
44
+ export { Schema as SchemaChartPublicStats } from "./api/chartPublicStats"
45
+ export const chartPublicStats = handleApi({url:"/api/chartPublicStats",...ChartPublicStats})
46
+
47
+ // ./api/createBeatmap.ts API
48
+
49
+ /*
50
+ export const Schema = {
51
+ input: z.strictObject({
52
+ url: z.string(),
53
+ session: z.string(),
54
+ updateFlag: z.boolean().optional(),
55
+ }),
56
+ output: z.strictObject({
57
+ hash: z.string().optional(),
58
+ error: z.string().optional(),
59
+ }),
60
+ };*/
61
+ import { Schema as CreateBeatmap } from "./api/createBeatmap"
62
+ export { Schema as SchemaCreateBeatmap } from "./api/createBeatmap"
63
+ export const createBeatmap = handleApi({url:"/api/createBeatmap",...CreateBeatmap})
129
64
 
130
65
  // ./api/createBeatmapPage.ts API
131
66
 
132
67
  /*
133
- export const Schema = {
134
- input: z.strictObject({
135
- session: z.string(),
136
- }),
137
- output: z.strictObject({
138
- error: z.string().optional(),
139
- id: z.number().optional(),
140
- }),
68
+ export const Schema = {
69
+ input: z.strictObject({
70
+ session: z.string(),
71
+ }),
72
+ output: z.strictObject({
73
+ error: z.string().optional(),
74
+ id: z.number().optional(),
75
+ }),
141
76
  };*/
142
77
  import { Schema as CreateBeatmapPage } from "./api/createBeatmapPage"
143
78
  export { Schema as SchemaCreateBeatmapPage } from "./api/createBeatmapPage"
144
79
  export const createBeatmapPage = handleApi({url:"/api/createBeatmapPage",...CreateBeatmapPage})
145
80
 
146
- // ./api/editAboutMe.ts API
81
+ // ./api/createClan.ts API
147
82
 
148
83
  /*
149
- export const Schema = {
150
- input: z.strictObject({
151
- session: z.string(),
152
- data: z.object({
153
- about_me: z.string().optional(),
154
- }),
155
- }),
156
- output: z.object({
157
- error: z.string().optional(),
158
- }),
84
+ export const Schema = {
85
+ input: z.strictObject({
86
+ session: z.string(),
87
+ name: z.string(),
88
+ acronym: z.string(),
89
+ }),
90
+ output: z.object({
91
+ error: z.string().optional(),
92
+ }),
159
93
  };*/
160
- import { Schema as EditAboutMe } from "./api/editAboutMe"
161
- export { Schema as SchemaEditAboutMe } from "./api/editAboutMe"
162
- export const editAboutMe = handleApi({url:"/api/editAboutMe",...EditAboutMe})
94
+ import { Schema as CreateClan } from "./api/createClan"
95
+ export { Schema as SchemaCreateClan } from "./api/createClan"
96
+ export const createClan = handleApi({url:"/api/createClan",...CreateClan})
163
97
 
164
- // ./api/chartPublicStats.ts API
98
+ // ./api/createCollection.ts API
165
99
 
166
100
  /*
167
- export const Schema = {
168
- input: z.strictObject({}),
169
- output: z.object({}),
101
+ export const Schema = {
102
+ input: z.strictObject({
103
+ session: z.string(),
104
+ title: z.string(),
105
+ }),
106
+ output: z.object({
107
+ id: z.number(),
108
+ error: z.string().optional(),
109
+ }),
170
110
  };*/
171
- import { Schema as ChartPublicStats } from "./api/chartPublicStats"
172
- export { Schema as SchemaChartPublicStats } from "./api/chartPublicStats"
173
- export const chartPublicStats = handleApi({url:"/api/chartPublicStats",...ChartPublicStats})
111
+ import { Schema as CreateCollection } from "./api/createCollection"
112
+ export { Schema as SchemaCreateCollection } from "./api/createCollection"
113
+ export const createCollection = handleApi({url:"/api/createCollection",...CreateCollection})
174
114
 
175
- // ./api/rankMapsArchive.ts API
115
+ // ./api/deleteBeatmapPage.ts API
176
116
 
177
117
  /*
178
- export const Schema = {
179
- input: z.strictObject({
180
- session: z.string(),
181
- mapId: z.number(),
182
- }),
183
- output: z.object({
184
- error: z.string().optional(),
185
- }),
118
+ export const Schema = {
119
+ input: z.strictObject({
120
+ session: z.string(),
121
+ id: z.number(),
122
+ }),
123
+ output: z.strictObject({
124
+ error: z.string().optional(),
125
+ }),
186
126
  };*/
187
- import { Schema as RankMapsArchive } from "./api/rankMapsArchive"
188
- export { Schema as SchemaRankMapsArchive } from "./api/rankMapsArchive"
189
- export const rankMapsArchive = handleApi({url:"/api/rankMapsArchive",...RankMapsArchive})
127
+ import { Schema as DeleteBeatmapPage } from "./api/deleteBeatmapPage"
128
+ export { Schema as SchemaDeleteBeatmapPage } from "./api/deleteBeatmapPage"
129
+ export const deleteBeatmapPage = handleApi({url:"/api/deleteBeatmapPage",...DeleteBeatmapPage})
190
130
 
191
- // ./api/getRawStarRating.ts API
131
+ // ./api/deleteCollection.ts API
192
132
 
193
133
  /*
194
- export const Schema = {
195
- input: z.strictObject({
196
- session: z.string(),
197
- rawMap: z.string(),
198
- }),
199
- output: z.object({
200
- error: z.string().optional(),
201
- beatmap: z
202
- .object({
203
- starRating: z.number().nullable().optional(),
204
- })
205
- .optional(),
206
- }),
134
+ export const Schema = {
135
+ input: z.strictObject({
136
+ session: z.string(),
137
+ collection: z.number(),
138
+ }),
139
+ output: z.object({
140
+ error: z.string().optional(),
141
+ }),
207
142
  };*/
208
- import { Schema as GetRawStarRating } from "./api/getRawStarRating"
209
- export { Schema as SchemaGetRawStarRating } from "./api/getRawStarRating"
210
- export const getRawStarRating = handleApi({url:"/api/getRawStarRating",...GetRawStarRating})
143
+ import { Schema as DeleteCollection } from "./api/deleteCollection"
144
+ export { Schema as SchemaDeleteCollection } from "./api/deleteCollection"
145
+ export const deleteCollection = handleApi({url:"/api/deleteCollection",...DeleteCollection})
211
146
 
212
- // ./api/createClan.ts API
147
+ // ./api/deleteCollectionMap.ts API
213
148
 
214
149
  /*
215
- export const Schema = {
216
- input: z.strictObject({
217
- session: z.string(),
218
- name: z.string(),
219
- acronym: z.string(),
220
- }),
221
- output: z.object({
222
- error: z.string().optional(),
223
- }),
150
+ export const Schema = {
151
+ input: z.strictObject({
152
+ session: z.string(),
153
+ collection: z.number(),
154
+ beatmapPage: z.number(),
155
+ }),
156
+ output: z.object({
157
+ error: z.string().optional(),
158
+ }),
224
159
  };*/
225
- import { Schema as CreateClan } from "./api/createClan"
226
- export { Schema as SchemaCreateClan } from "./api/createClan"
227
- export const createClan = handleApi({url:"/api/createClan",...CreateClan})
160
+ import { Schema as DeleteCollectionMap } from "./api/deleteCollectionMap"
161
+ export { Schema as SchemaDeleteCollectionMap } from "./api/deleteCollectionMap"
162
+ export const deleteCollectionMap = handleApi({url:"/api/deleteCollectionMap",...DeleteCollectionMap})
228
163
 
229
- // ./api/setPasskey.ts API
164
+ // ./api/editAboutMe.ts API
230
165
 
231
166
  /*
232
- export const Schema = {
233
- input: z.strictObject({
234
- session: z.string(),
235
- data: z.object({
236
- passkey: z.string(),
237
- }),
238
- }),
239
- output: z.object({
240
- error: z.string().optional(),
241
- }),
167
+ export const Schema = {
168
+ input: z.strictObject({
169
+ session: z.string(),
170
+ data: z.object({
171
+ about_me: z.string().optional(),
172
+ }),
173
+ }),
174
+ output: z.object({
175
+ error: z.string().optional(),
176
+ }),
242
177
  };*/
243
- import { Schema as SetPasskey } from "./api/setPasskey"
244
- export { Schema as SchemaSetPasskey } from "./api/setPasskey"
245
- export const setPasskey = handleApi({url:"/api/setPasskey",...SetPasskey})
178
+ import { Schema as EditAboutMe } from "./api/editAboutMe"
179
+ export { Schema as SchemaEditAboutMe } from "./api/editAboutMe"
180
+ export const editAboutMe = handleApi({url:"/api/editAboutMe",...EditAboutMe})
246
181
 
247
- // ./api/getPublicStats.ts API
182
+ // ./api/editClan.ts API
248
183
 
249
184
  /*
250
- export const Schema = {
251
- input: z.strictObject({}),
252
- output: z.object({
253
- profiles: z.number(),
254
- beatmaps: z.number(),
255
- scores: z.number(),
256
- onlineUsers: z.number(),
257
- countChart: z.array(
258
- z.object({
259
- type: z.string(),
260
- value: z.number(),
261
- })
262
- ),
263
- lastBeatmaps: z.array(
264
- z.object({
265
- id: z.number().nullable().optional(),
266
- nominations: z.array(z.number()).nullable().optional(),
267
- playcount: z.number().nullable().optional(),
268
- created_at: z.string().nullable().optional(),
269
- difficulty: z.number().nullable().optional(),
270
- noteCount: z.number().nullable().optional(),
271
- length: z.number().nullable().optional(),
272
- title: z.string().nullable().optional(),
273
- ranked: z.boolean().nullable().optional(),
274
- beatmapFile: z.string().nullable().optional(),
275
- image: z.string().nullable().optional(),
276
- starRating: z.number().nullable().optional(),
277
- owner: z.number().nullable().optional(),
278
- ownerUsername: z.string().nullable().optional(),
279
- ownerAvatar: z.string().nullable().optional(),
280
- status: z.string().nullable().optional(),
281
- })
282
- ),
283
- topUsers: z.array(
284
- z.object({
285
- username: z.string(),
286
- id: z.number(),
287
- avatar_url: z.string(),
288
- skill_points: z.number(),
289
- })
290
- ),
291
- lastComments: z.array(
292
- z.object({
293
- owner: z.number(),
294
- content: z.string(),
295
- username: z.string(),
296
- beatmapTitle: z.string(),
297
- beatmapPage: z.number(),
298
- })
299
- ),
300
- }),
185
+ export const Schema = {
186
+ input: z.strictObject({
187
+ session: z.string(),
188
+ id: z.number(),
189
+ name: z.string(),
190
+ avatar_url: z.string(),
191
+ description: z.string(),
192
+ acronym: z.string(),
193
+ }),
194
+ output: z.object({
195
+ error: z.string().optional(),
196
+ }),
301
197
  };*/
302
- import { Schema as GetPublicStats } from "./api/getPublicStats"
303
- export { Schema as SchemaGetPublicStats } from "./api/getPublicStats"
304
- export const getPublicStats = handleApi({url:"/api/getPublicStats",...GetPublicStats})
198
+ import { Schema as EditClan } from "./api/editClan"
199
+ export { Schema as SchemaEditClan } from "./api/editClan"
200
+ export const editClan = handleApi({url:"/api/editClan",...EditClan})
305
201
 
306
- // ./api/getUserScores.ts API
202
+ // ./api/editCollection.ts API
307
203
 
308
204
  /*
309
- export const Schema = {
310
- input: z.strictObject({
311
- session: z.string(),
312
- id: z.number(),
313
- limit: z.number().default(10),
314
- }),
315
- output: z.object({
316
- error: z.string().optional(),
317
- lastDay: z
318
- .array(
319
- z.object({
320
- awarded_sp: z.number().nullable(),
321
- beatmapHash: z.string().nullable(),
322
- created_at: z.string(),
323
- id: z.number(),
324
- misses: z.number().nullable(),
325
- passed: z.boolean().nullable(),
326
- songId: z.string().nullable(),
327
- userId: z.number().nullable(),
328
- beatmapDifficulty: z.number().optional().nullable(),
329
- beatmapNotes: z.number().optional().nullable(),
330
- beatmapTitle: z.string().optional().nullable(),
331
- speed: z.number().optional().nullable(),
332
- spin: z.boolean().optional().nullable(),
333
- })
334
- )
335
- .optional(),
336
- top: z
337
- .array(
338
- z.object({
339
- awarded_sp: z.number().nullable(),
340
- beatmapHash: z.string().nullable(),
341
- created_at: z.string(),
342
- id: z.number(),
343
- misses: z.number().nullable(),
344
- passed: z.boolean().nullable(),
345
- rank: z.string().nullable(),
346
- songId: z.string().nullable(),
347
- userId: z.number().nullable(),
348
- beatmapDifficulty: z.number().optional().nullable(),
349
- beatmapNotes: z.number().optional().nullable(),
350
- beatmapTitle: z.string().optional().nullable(),
351
- speed: z.number().optional().nullable(),
352
- spin: z.boolean().optional().nullable(),
353
- })
354
- )
355
- .optional(),
356
- stats: z
357
- .object({
358
- totalScores: z.number(),
359
- spinScores: z.number(),
360
- })
361
- .optional(),
362
- }),
205
+ export const Schema = {
206
+ input: z.strictObject({
207
+ session: z.string(),
208
+ collection: z.number(),
209
+ title: z.string(),
210
+ description: z.string(),
211
+ isList: z.boolean(),
212
+ }),
213
+ output: z.object({
214
+ error: z.string().optional(),
215
+ }),
363
216
  };*/
364
- import { Schema as GetUserScores } from "./api/getUserScores"
365
- export { Schema as SchemaGetUserScores } from "./api/getUserScores"
366
- export const getUserScores = handleApi({url:"/api/getUserScores",...GetUserScores})
217
+ import { Schema as EditCollection } from "./api/editCollection"
218
+ export { Schema as SchemaEditCollection } from "./api/editCollection"
219
+ export const editCollection = handleApi({url:"/api/editCollection",...EditCollection})
367
220
 
368
221
  // ./api/editProfile.ts API
369
222
 
370
223
  /*
371
- export const Schema = {
372
- input: z.strictObject({
373
- session: z.string(),
374
- data: z.object({
375
- avatar_url: z.string().optional(),
376
- profile_image: z.string().optional(),
377
- username: z.string().optional(),
378
- }),
379
- }),
380
- output: z.object({
381
- error: z.string().optional(),
382
- }),
224
+ export const Schema = {
225
+ input: z.strictObject({
226
+ session: z.string(),
227
+ data: z.object({
228
+ avatar_url: z.string().optional(),
229
+ profile_image: z.string().optional(),
230
+ username: z.string().optional(),
231
+ }),
232
+ }),
233
+ output: z.object({
234
+ error: z.string().optional(),
235
+ }),
383
236
  };*/
384
237
  import { Schema as EditProfile } from "./api/editProfile"
385
238
  export { Schema as SchemaEditProfile } from "./api/editProfile"
386
239
  export const editProfile = handleApi({url:"/api/editProfile",...EditProfile})
387
240
 
388
- // ./api/getScore.ts API
389
-
390
- /*
391
- export const Schema = {
392
- input: z.strictObject({
393
- session: z.string(),
394
- id: z.number(),
395
- }),
396
- output: z.object({
397
- error: z.string().optional(),
398
- score: z
399
- .object({
400
- awarded_sp: z.number().nullable(),
401
- beatmapHash: z.string().nullable(),
402
- created_at: z.string(),
403
- id: z.number(),
404
- misses: z.number().nullable(),
405
- passed: z.boolean().nullable(),
406
- songId: z.string().nullable(),
407
- userId: z.number().nullable(),
408
- beatmapDifficulty: z.number().optional().nullable(),
409
- beatmapNotes: z.number().optional().nullable(),
410
- beatmapTitle: z.string().optional().nullable(),
411
- username: z.string().optional().nullable(),
412
- speed: z.number().optional().nullable(),
413
- spin: z.boolean().optional().nullable(),
414
- })
415
- .optional(),
416
- }),
417
- };*/
418
- import { Schema as GetScore } from "./api/getScore"
419
- export { Schema as SchemaGetScore } from "./api/getScore"
420
- export const getScore = handleApi({url:"/api/getScore",...GetScore})
421
-
422
- // ./api/deleteBeatmapPage.ts API
241
+ // ./api/getAvatarUploadUrl.ts API
423
242
 
424
243
  /*
425
- export const Schema = {
426
- input: z.strictObject({
427
- session: z.string(),
428
- id: z.number(),
429
- }),
430
- output: z.strictObject({
431
- error: z.string().optional(),
432
- }),
244
+ export const Schema = {
245
+ input: z.strictObject({
246
+ session: z.string(),
247
+ contentLength: z.number(),
248
+ contentType: z.string(),
249
+ intrinsicToken: z.string(),
250
+ }),
251
+ output: z.strictObject({
252
+ error: z.string().optional(),
253
+ url: z.string().optional(),
254
+ objectKey: z.string().optional(),
255
+ }),
433
256
  };*/
434
- import { Schema as DeleteBeatmapPage } from "./api/deleteBeatmapPage"
435
- export { Schema as SchemaDeleteBeatmapPage } from "./api/deleteBeatmapPage"
436
- export const deleteBeatmapPage = handleApi({url:"/api/deleteBeatmapPage",...DeleteBeatmapPage})
257
+ import { Schema as GetAvatarUploadUrl } from "./api/getAvatarUploadUrl"
258
+ export { Schema as SchemaGetAvatarUploadUrl } from "./api/getAvatarUploadUrl"
259
+ export const getAvatarUploadUrl = handleApi({url:"/api/getAvatarUploadUrl",...GetAvatarUploadUrl})
437
260
 
438
261
  // ./api/getBadgedUsers.ts API
439
262
 
440
263
  /*
441
- export const Schema = {
442
- input: z.strictObject({
443
- badge: z.string(),
444
- }),
445
- output: z.object({
446
- error: z.string().optional(),
447
- leaderboard: z
448
- .array(
449
- z.object({
450
- flag: z.string().nullable(),
451
- id: z.number(),
452
- username: z.string().nullable(),
453
- })
454
- )
455
- .optional(),
456
- }),
264
+ export const Schema = {
265
+ input: z.strictObject({
266
+ badge: z.string(),
267
+ }),
268
+ output: z.object({
269
+ error: z.string().optional(),
270
+ leaderboard: z
271
+ .array(
272
+ z.object({
273
+ flag: z.string().nullable(),
274
+ id: z.number(),
275
+ username: z.string().nullable(),
276
+ })
277
+ )
278
+ .optional(),
279
+ }),
457
280
  };*/
458
281
  import { Schema as GetBadgedUsers } from "./api/getBadgedUsers"
459
282
  export { Schema as SchemaGetBadgedUsers } from "./api/getBadgedUsers"
@@ -462,573 +285,751 @@ export const getBadgedUsers = handleApi({url:"/api/getBadgedUsers",...GetBadgedU
462
285
  // ./api/getBeatmapComments.ts API
463
286
 
464
287
  /*
465
- export const Schema = {
466
- input: z.strictObject({
467
- page: z.number(),
468
- }),
469
- output: z.strictObject({
470
- error: z.string().optional(),
471
- comments: z.array(
472
- z.object({
473
- beatmapPage: z.number(),
474
- content: z.string().nullable(),
475
- owner: z.number(),
476
- created_at: z.string(),
477
- profiles: z.object({
478
- avatar_url: z.string().nullable(),
479
- username: z.string().nullable(),
480
- badges: z.any().nullable(),
481
- }),
482
- })
483
- ),
484
- }),
288
+ export const Schema = {
289
+ input: z.strictObject({
290
+ page: z.number(),
291
+ }),
292
+ output: z.strictObject({
293
+ error: z.string().optional(),
294
+ comments: z.array(
295
+ z.object({
296
+ beatmapPage: z.number(),
297
+ content: z.string().nullable(),
298
+ owner: z.number(),
299
+ created_at: z.string(),
300
+ profiles: z.object({
301
+ avatar_url: z.string().nullable(),
302
+ username: z.string().nullable(),
303
+ badges: z.any().nullable(),
304
+ }),
305
+ })
306
+ ),
307
+ }),
485
308
  };*/
486
309
  import { Schema as GetBeatmapComments } from "./api/getBeatmapComments"
487
310
  export { Schema as SchemaGetBeatmapComments } from "./api/getBeatmapComments"
488
311
  export const getBeatmapComments = handleApi({url:"/api/getBeatmapComments",...GetBeatmapComments})
489
312
 
490
- // ./api/getCollections.ts API
313
+ // ./api/getBeatmapPage.ts API
491
314
 
492
315
  /*
493
- export const Schema = {
494
- input: z.strictObject({
495
- session: z.string(),
496
- page: z.number().optional().default(1),
497
- itemsPerPage: z.number().optional().default(10),
498
- owner: z.number().optional(), // Added owner field
499
- search: z.string().optional(), // Added string field
500
- }),
501
- output: z.object({
502
- collections: z.array(
503
- z.object({
504
- id: z.number(),
505
- title: z.string(),
506
- description: z.string(),
507
- owner: z.number(),
508
- ownerUsername: z.string(),
509
- ownerAvatarUrl: z.string(),
510
- beatmapCount: z.number(),
511
- starRatingDistribution: z.array(
512
- z.object({
513
- stars: z.number(),
514
- count: z.number(),
515
- })
516
- ),
517
- createdAt: z.string(),
518
- })
519
- ),
520
- totalPages: z.number(),
521
- error: z.string().optional(),
522
- }),
316
+ export const Schema = {
317
+ input: z.strictObject({
318
+ session: z.string(),
319
+ id: z.number(),
320
+ }),
321
+ output: z.object({
322
+ error: z.string().optional(),
323
+ beatmap: z
324
+ .object({
325
+ id: z.number().nullable().optional(),
326
+ nominations: z.array(z.number()).nullable().optional(),
327
+ playcount: z.number().nullable().optional(),
328
+ created_at: z.string().nullable().optional(),
329
+ updated_at: z.number().nullable().optional(),
330
+ difficulty: z.number().nullable().optional(),
331
+ noteCount: z.number().nullable().optional(),
332
+ length: z.number().nullable().optional(),
333
+ title: z.string().nullable().optional(),
334
+ ranked: z.boolean().nullable().optional(),
335
+ beatmapFile: z.string().nullable().optional(),
336
+ image: z.string().nullable().optional(),
337
+ imageLarge: z.string().nullable().optional(),
338
+ starRating: z.number().nullable().optional(),
339
+ owner: z.number().nullable().optional(),
340
+ ownerUsername: z.string().nullable().optional(),
341
+ ownerAvatar: z.string().nullable().optional(),
342
+ status: z.string().nullable().optional(),
343
+ description: z.string().nullable().optional(),
344
+ tags: z.string().nullable().optional(),
345
+ })
346
+ .optional(),
347
+ }),
523
348
  };*/
524
- import { Schema as GetCollections } from "./api/getCollections"
525
- export { Schema as SchemaGetCollections } from "./api/getCollections"
526
- export const getCollections = handleApi({url:"/api/getCollections",...GetCollections})
349
+ import { Schema as GetBeatmapPage } from "./api/getBeatmapPage"
350
+ export { Schema as SchemaGetBeatmapPage } from "./api/getBeatmapPage"
351
+ export const getBeatmapPage = handleApi({url:"/api/getBeatmapPage",...GetBeatmapPage})
527
352
 
528
- // ./api/getTimestamp.ts API
353
+ // ./api/getBeatmapPageById.ts API
529
354
 
530
355
  /*
531
- export const Schema = {
532
- input: z.strictObject({}),
533
- output: z.object({
534
- time: z.number(),
535
- }),
356
+ export const Schema = {
357
+ input: z.strictObject({
358
+ session: z.string(),
359
+ mapId: z.string(),
360
+ }),
361
+ output: z.object({
362
+ error: z.string().optional(),
363
+ beatmap: z
364
+ .object({
365
+ id: z.number().nullable().optional(),
366
+ nominations: z.array(z.number()).nullable().optional(),
367
+ playcount: z.number().nullable().optional(),
368
+ created_at: z.string().nullable().optional(),
369
+ updated_at: z.number().nullable().optional(),
370
+ difficulty: z.number().nullable().optional(),
371
+ noteCount: z.number().nullable().optional(),
372
+ length: z.number().nullable().optional(),
373
+ title: z.string().nullable().optional(),
374
+ ranked: z.boolean().nullable().optional(),
375
+ beatmapFile: z.string().nullable().optional(),
376
+ image: z.string().nullable().optional(),
377
+ starRating: z.number().nullable().optional(),
378
+ owner: z.number().nullable().optional(),
379
+ ownerUsername: z.string().nullable().optional(),
380
+ ownerAvatar: z.string().nullable().optional(),
381
+ status: z.string().nullable().optional(),
382
+ })
383
+ .optional(),
384
+ }),
536
385
  };*/
537
- import { Schema as GetTimestamp } from "./api/getTimestamp"
538
- export { Schema as SchemaGetTimestamp } from "./api/getTimestamp"
539
- export const getTimestamp = handleApi({url:"/api/getTimestamp",...GetTimestamp})
386
+ import { Schema as GetBeatmapPageById } from "./api/getBeatmapPageById"
387
+ export { Schema as SchemaGetBeatmapPageById } from "./api/getBeatmapPageById"
388
+ export const getBeatmapPageById = handleApi({url:"/api/getBeatmapPageById",...GetBeatmapPageById})
540
389
 
541
- // ./api/deleteCollection.ts API
390
+ // ./api/getBeatmaps.ts API
542
391
 
543
392
  /*
544
- export const Schema = {
545
- input: z.strictObject({
546
- session: z.string(),
547
- collection: z.number(),
548
- }),
549
- output: z.object({
550
- error: z.string().optional(),
551
- }),
393
+ export const Schema = {
394
+ input: z.strictObject({
395
+ session: z.string(),
396
+ textFilter: z.string().optional(),
397
+ authorFilter: z.string().optional(),
398
+ tagsFilter: z.string().optional(),
399
+ page: z.number().default(1),
400
+ maxStars: z.number().optional(),
401
+ minLength: z.number().optional(),
402
+ maxLength: z.number().optional(),
403
+ minStars: z.number().optional(),
404
+ creator: z.number().optional(),
405
+ status: z.string().optional(),
406
+ }),
407
+ output: z.object({
408
+ error: z.string().optional(),
409
+ total: z.number(),
410
+ viewPerPage: z.number(),
411
+ currentPage: z.number(),
412
+ beatmaps: z
413
+ .array(
414
+ z.object({
415
+ id: z.number(),
416
+ playcount: z.number().nullable().optional(),
417
+ created_at: z.string().nullable().optional(),
418
+ difficulty: z.number().nullable().optional(),
419
+ noteCount: z.number().nullable().optional(),
420
+ length: z.number().nullable().optional(),
421
+ title: z.string().nullable().optional(),
422
+ ranked: z.boolean().nullable().optional(),
423
+ beatmapFile: z.string().nullable().optional(),
424
+ image: z.string().nullable().optional(),
425
+ starRating: z.number().nullable().optional(),
426
+ owner: z.number().nullable().optional(),
427
+ ownerUsername: z.string().nullable().optional(),
428
+ ownerAvatar: z.string().nullable().optional(),
429
+ status: z.string().nullable().optional(),
430
+ tags: z.string().nullable().optional(),
431
+ })
432
+ )
433
+ .optional(),
434
+ }),
552
435
  };*/
553
- import { Schema as DeleteCollection } from "./api/deleteCollection"
554
- export { Schema as SchemaDeleteCollection } from "./api/deleteCollection"
555
- export const deleteCollection = handleApi({url:"/api/deleteCollection",...DeleteCollection})
436
+ import { Schema as GetBeatmaps } from "./api/getBeatmaps"
437
+ export { Schema as SchemaGetBeatmaps } from "./api/getBeatmaps"
438
+ export const getBeatmaps = handleApi({url:"/api/getBeatmaps",...GetBeatmaps})
556
439
 
557
- // ./api/editCollection.ts API
440
+ // ./api/getBeatmapStarRating.ts API
558
441
 
559
442
  /*
560
- export const Schema = {
561
- input: z.strictObject({
562
- session: z.string(),
563
- collection: z.number(),
564
- title: z.string(),
565
- description: z.string(),
566
- isList: z.boolean(),
567
- }),
568
- output: z.object({
569
- error: z.string().optional(),
570
- }),
443
+ export const Schema = {
444
+ input: z.strictObject({
445
+ session: z.string(),
446
+ mapId: z.string(),
447
+ }),
448
+ output: z.object({
449
+ error: z.string().optional(),
450
+ beatmap: z
451
+ .object({
452
+ starRating: z.number().nullable().optional(),
453
+ })
454
+ .optional(),
455
+ }),
571
456
  };*/
572
- import { Schema as EditCollection } from "./api/editCollection"
573
- export { Schema as SchemaEditCollection } from "./api/editCollection"
574
- export const editCollection = handleApi({url:"/api/editCollection",...EditCollection})
457
+ import { Schema as GetBeatmapStarRating } from "./api/getBeatmapStarRating"
458
+ export { Schema as SchemaGetBeatmapStarRating } from "./api/getBeatmapStarRating"
459
+ export const getBeatmapStarRating = handleApi({url:"/api/getBeatmapStarRating",...GetBeatmapStarRating})
575
460
 
576
- // ./api/getBeatmaps.ts API
461
+ // ./api/getClan.ts API
577
462
 
578
463
  /*
579
- export const Schema = {
580
- input: z.strictObject({
581
- session: z.string(),
582
- textFilter: z.string().optional(),
583
- authorFilter: z.string().optional(),
584
- tagsFilter: z.string().optional(),
585
- page: z.number().default(1),
586
- maxStars: z.number().optional(),
587
- minLength: z.number().optional(),
588
- maxLength: z.number().optional(),
589
- minStars: z.number().optional(),
590
- creator: z.number().optional(),
591
- status: z.string().optional(),
592
- }),
593
- output: z.object({
594
- error: z.string().optional(),
595
- total: z.number(),
596
- viewPerPage: z.number(),
597
- currentPage: z.number(),
598
- beatmaps: z
599
- .array(
600
- z.object({
601
- id: z.number(),
602
- playcount: z.number().nullable().optional(),
603
- created_at: z.string().nullable().optional(),
604
- difficulty: z.number().nullable().optional(),
605
- noteCount: z.number().nullable().optional(),
606
- length: z.number().nullable().optional(),
607
- title: z.string().nullable().optional(),
608
- ranked: z.boolean().nullable().optional(),
609
- beatmapFile: z.string().nullable().optional(),
610
- image: z.string().nullable().optional(),
611
- starRating: z.number().nullable().optional(),
612
- owner: z.number().nullable().optional(),
613
- ownerUsername: z.string().nullable().optional(),
614
- ownerAvatar: z.string().nullable().optional(),
615
- status: z.string().nullable().optional(),
616
- tags: z.string().nullable().optional(),
617
- })
618
- )
619
- .optional(),
620
- }),
464
+ export const Schema = {
465
+ input: z.strictObject({
466
+ session: z.string(),
467
+ id: z.number(),
468
+ }),
469
+ output: z.object({
470
+ error: z.string().optional(),
471
+ acronym: z.string(),
472
+ avatar_url: z.string(),
473
+ created_at: z.number(),
474
+ description: z.string(),
475
+ id: z.number(),
476
+ name: z.string(),
477
+ owner: z.number(),
478
+ users: z.array(
479
+ z.object({
480
+ about_me: z.string().nullable(),
481
+ avatar_url: z.string().nullable(),
482
+ profile_image: z.string().nullable(),
483
+ badges: z.any().nullable(),
484
+ created_at: z.number().nullable(),
485
+ flag: z.string().nullable(),
486
+ id: z.number(),
487
+ uid: z.string().nullable(),
488
+ ban: z.string().nullable(),
489
+ username: z.string().nullable(),
490
+ verified: z.boolean().nullable(),
491
+ play_count: z.number().nullable(),
492
+ skill_points: z.number().nullable(),
493
+ squares_hit: z.number().nullable(),
494
+ total_score: z.number().nullable(),
495
+ })
496
+ ),
497
+ }),
621
498
  };*/
622
- import { Schema as GetBeatmaps } from "./api/getBeatmaps"
623
- export { Schema as SchemaGetBeatmaps } from "./api/getBeatmaps"
624
- export const getBeatmaps = handleApi({url:"/api/getBeatmaps",...GetBeatmaps})
499
+ import { Schema as GetClan } from "./api/getClan"
500
+ export { Schema as SchemaGetClan } from "./api/getClan"
501
+ export const getClan = handleApi({url:"/api/getClan",...GetClan})
625
502
 
626
- // ./api/postBeatmapComment.ts API
503
+ // ./api/getCollection.ts API
627
504
 
628
505
  /*
629
- export const Schema = {
630
- input: z.strictObject({
631
- session: z.string(),
632
- page: z.number(),
633
- content: z.string(),
634
- }),
635
- output: z.strictObject({
636
- error: z.string().optional(),
637
- }),
506
+ export const Schema = {
507
+ input: z.strictObject({
508
+ session: z.string(),
509
+ collection: z.number(),
510
+ }),
511
+ output: z.object({
512
+ collection: z.object({
513
+ title: z.string(),
514
+ description: z.string(),
515
+ owner: z.object({
516
+ id: z.number(),
517
+ username: z.string(),
518
+ }),
519
+ isList: z.boolean(),
520
+ beatmaps: z.array(
521
+ z.object({
522
+ id: z.number(),
523
+ playcount: z.number().nullable().optional(),
524
+ created_at: z.string().nullable().optional(),
525
+ difficulty: z.number().nullable().optional(),
526
+ length: z.number().nullable().optional(),
527
+ title: z.string().nullable().optional(),
528
+ ranked: z.boolean().nullable().optional(),
529
+ beatmapFile: z.string().nullable().optional(),
530
+ image: z.string().nullable().optional(),
531
+ starRating: z.number().nullable().optional(),
532
+ owner: z.number().nullable().optional(),
533
+ ownerUsername: z.string().nullable().optional(),
534
+ status: z.string().nullable().optional(),
535
+ tags: z.string().nullable().optional(),
536
+ })
537
+ ),
538
+ }),
539
+ error: z.string().optional(),
540
+ }),
638
541
  };*/
639
- import { Schema as PostBeatmapComment } from "./api/postBeatmapComment"
640
- export { Schema as SchemaPostBeatmapComment } from "./api/postBeatmapComment"
641
- export const postBeatmapComment = handleApi({url:"/api/postBeatmapComment",...PostBeatmapComment})
542
+ import { Schema as GetCollection } from "./api/getCollection"
543
+ export { Schema as SchemaGetCollection } from "./api/getCollection"
544
+ export const getCollection = handleApi({url:"/api/getCollection",...GetCollection})
545
+
546
+ // ./api/getCollections.ts API
547
+
548
+ /*
549
+ export const Schema = {
550
+ input: z.strictObject({
551
+ session: z.string(),
552
+ page: z.number().optional().default(1),
553
+ itemsPerPage: z.number().optional().default(10),
554
+ owner: z.number().optional(), // Added owner field
555
+ search: z.string().optional(), // Added string field
556
+ minBeatmaps: z.number().optional(), // Added string field
557
+ }),
558
+ output: z.object({
559
+ collections: z.array(
560
+ z.object({
561
+ id: z.number(),
562
+ title: z.string(),
563
+ description: z.string(),
564
+ owner: z.number(),
565
+ ownerUsername: z.string(),
566
+ ownerAvatarUrl: z.string(),
567
+ beatmapCount: z.number(),
568
+ starRatingDistribution: z.array(
569
+ z.object({
570
+ stars: z.number(),
571
+ count: z.number(),
572
+ })
573
+ ),
574
+ createdAt: z.string(),
575
+ })
576
+ ),
577
+ totalPages: z.number(),
578
+ error: z.string().optional(),
579
+ }),
580
+ };*/
581
+ import { Schema as GetCollections } from "./api/getCollections"
582
+ export { Schema as SchemaGetCollections } from "./api/getCollections"
583
+ export const getCollections = handleApi({url:"/api/getCollections",...GetCollections})
584
+
585
+ // ./api/getLeaderboard.ts API
586
+
587
+ /*
588
+ export const Schema = {
589
+ input: z.strictObject({
590
+ session: z.string(),
591
+ page: z.number().default(1),
592
+ flag: z.string().optional(),
593
+ spin: z.boolean().default(false),
594
+ }),
595
+ output: z.object({
596
+ error: z.string().optional(),
597
+ total: z.number(),
598
+ viewPerPage: z.number(),
599
+ currentPage: z.number(),
600
+ userPosition: z.number(),
601
+ leaderboard: z
602
+ .array(
603
+ z.object({
604
+ flag: z.string().nullable(),
605
+ id: z.number(),
606
+ username: z.string().nullable(),
607
+ play_count: z.number().nullable(),
608
+ skill_points: z.number().nullable(),
609
+ spin_skill_points: z.number().nullable(),
610
+ total_score: z.number().nullable(),
611
+ clans: z
612
+ .object({
613
+ id: z.number(),
614
+ acronym: z.string(),
615
+ })
616
+ .optional()
617
+ .nullable(),
618
+ })
619
+ )
620
+ .optional(),
621
+ }),
622
+ };*/
623
+ import { Schema as GetLeaderboard } from "./api/getLeaderboard"
624
+ export { Schema as SchemaGetLeaderboard } from "./api/getLeaderboard"
625
+ export const getLeaderboard = handleApi({url:"/api/getLeaderboard",...GetLeaderboard})
626
+
627
+ // ./api/getMapUploadUrl.ts API
628
+
629
+ /*
630
+ export const Schema = {
631
+ input: z.strictObject({
632
+ mapName: z.string().optional(),
633
+ session: z.string(),
634
+ contentLength: z.number(),
635
+ contentType: z.string(),
636
+ intrinsicToken: z.string(),
637
+ }),
638
+ output: z.strictObject({
639
+ error: z.string().optional(),
640
+ url: z.string().optional(),
641
+ objectKey: z.string().optional(),
642
+ }),
643
+ };*/
644
+ import { Schema as GetMapUploadUrl } from "./api/getMapUploadUrl"
645
+ export { Schema as SchemaGetMapUploadUrl } from "./api/getMapUploadUrl"
646
+ export const getMapUploadUrl = handleApi({url:"/api/getMapUploadUrl",...GetMapUploadUrl})
647
+
648
+ // ./api/getPassToken.ts API
649
+
650
+ /*
651
+ export const Schema = {
652
+ input: z.strictObject({
653
+ data: z.object({
654
+ email: z.string(),
655
+ passkey: z.string(),
656
+ computerName: z.string(),
657
+ }),
658
+ }),
659
+ output: z.object({
660
+ token: z.string().optional(),
661
+ error: z.string().optional(),
662
+ }),
663
+ };*/
664
+ import { Schema as GetPassToken } from "./api/getPassToken"
665
+ export { Schema as SchemaGetPassToken } from "./api/getPassToken"
666
+ export const getPassToken = handleApi({url:"/api/getPassToken",...GetPassToken})
642
667
 
643
668
  // ./api/getProfile.ts API
644
669
 
645
670
  /*
646
- export const Schema = {
647
- input: z.strictObject({
648
- session: z.string(),
649
- id: z.number().nullable().optional(),
650
- }),
651
- output: z.object({
652
- error: z.string().optional(),
653
- user: z
654
- .object({
655
- about_me: z.string().nullable(),
656
- avatar_url: z.string().nullable(),
657
- profile_image: z.string().nullable(),
658
- badges: z.any().nullable(),
659
- created_at: z.number().nullable(),
660
- flag: z.string().nullable(),
661
- id: z.number(),
662
- uid: z.string().nullable(),
663
- ban: z.string().nullable(),
664
- username: z.string().nullable(),
665
- verified: z.boolean().nullable(),
666
- play_count: z.number().nullable(),
667
- skill_points: z.number().nullable(),
668
- squares_hit: z.number().nullable(),
669
- total_score: z.number().nullable(),
670
- position: z.number().nullable(),
671
- is_online: z.boolean(),
672
- clans: z
673
- .object({
674
- id: z.number(),
675
- acronym: z.string(),
676
- })
677
- .optional()
678
- .nullable(),
679
- })
680
- .optional(),
681
- }),
671
+ export const Schema = {
672
+ input: z.strictObject({
673
+ session: z.string(),
674
+ id: z.number().nullable().optional(),
675
+ }),
676
+ output: z.object({
677
+ error: z.string().optional(),
678
+ user: z
679
+ .object({
680
+ about_me: z.string().nullable(),
681
+ avatar_url: z.string().nullable(),
682
+ profile_image: z.string().nullable(),
683
+ badges: z.any().nullable(),
684
+ created_at: z.number().nullable(),
685
+ flag: z.string().nullable(),
686
+ id: z.number(),
687
+ uid: z.string().nullable(),
688
+ ban: z.string().nullable(),
689
+ username: z.string().nullable(),
690
+ verified: z.boolean().nullable(),
691
+ play_count: z.number().nullable(),
692
+ skill_points: z.number().nullable(),
693
+ squares_hit: z.number().nullable(),
694
+ total_score: z.number().nullable(),
695
+ position: z.number().nullable(),
696
+ is_online: z.boolean(),
697
+ clans: z
698
+ .object({
699
+ id: z.number(),
700
+ acronym: z.string(),
701
+ })
702
+ .optional()
703
+ .nullable(),
704
+ })
705
+ .optional(),
706
+ }),
682
707
  };*/
683
708
  import { Schema as GetProfile } from "./api/getProfile"
684
709
  export { Schema as SchemaGetProfile } from "./api/getProfile"
685
710
  export const getProfile = handleApi({url:"/api/getProfile",...GetProfile})
686
711
 
687
- // ./api/editClan.ts API
712
+ // ./api/getPublicStats.ts API
688
713
 
689
714
  /*
690
- export const Schema = {
691
- input: z.strictObject({
692
- session: z.string(),
693
- id: z.number(),
694
- name: z.string(),
695
- avatar_url: z.string(),
696
- description: z.string(),
697
- acronym: z.string(),
698
- }),
699
- output: z.object({
700
- error: z.string().optional(),
701
- }),
715
+ export const Schema = {
716
+ input: z.strictObject({}),
717
+ output: z.object({
718
+ profiles: z.number(),
719
+ beatmaps: z.number(),
720
+ scores: z.number(),
721
+ onlineUsers: z.number(),
722
+ countChart: z.array(
723
+ z.object({
724
+ type: z.string(),
725
+ value: z.number(),
726
+ })
727
+ ),
728
+ lastBeatmaps: z.array(
729
+ z.object({
730
+ id: z.number().nullable().optional(),
731
+ nominations: z.array(z.number()).nullable().optional(),
732
+ playcount: z.number().nullable().optional(),
733
+ created_at: z.string().nullable().optional(),
734
+ difficulty: z.number().nullable().optional(),
735
+ noteCount: z.number().nullable().optional(),
736
+ length: z.number().nullable().optional(),
737
+ title: z.string().nullable().optional(),
738
+ ranked: z.boolean().nullable().optional(),
739
+ beatmapFile: z.string().nullable().optional(),
740
+ image: z.string().nullable().optional(),
741
+ starRating: z.number().nullable().optional(),
742
+ owner: z.number().nullable().optional(),
743
+ ownerUsername: z.string().nullable().optional(),
744
+ ownerAvatar: z.string().nullable().optional(),
745
+ status: z.string().nullable().optional(),
746
+ })
747
+ ),
748
+ topUsers: z.array(
749
+ z.object({
750
+ username: z.string(),
751
+ id: z.number(),
752
+ avatar_url: z.string(),
753
+ skill_points: z.number(),
754
+ })
755
+ ),
756
+ lastComments: z.array(
757
+ z.object({
758
+ owner: z.number(),
759
+ content: z.string(),
760
+ username: z.string(),
761
+ beatmapTitle: z.string(),
762
+ beatmapPage: z.number(),
763
+ })
764
+ ),
765
+ }),
702
766
  };*/
703
- import { Schema as EditClan } from "./api/editClan"
704
- export { Schema as SchemaEditClan } from "./api/editClan"
705
- export const editClan = handleApi({url:"/api/editClan",...EditClan})
767
+ import { Schema as GetPublicStats } from "./api/getPublicStats"
768
+ export { Schema as SchemaGetPublicStats } from "./api/getPublicStats"
769
+ export const getPublicStats = handleApi({url:"/api/getPublicStats",...GetPublicStats})
706
770
 
707
- // ./api/getClan.ts API
771
+ // ./api/getRawStarRating.ts API
708
772
 
709
773
  /*
710
- export const Schema = {
711
- input: z.strictObject({
712
- session: z.string(),
713
- id: z.number(),
714
- }),
715
- output: z.object({
716
- error: z.string().optional(),
717
- acronym: z.string(),
718
- avatar_url: z.string(),
719
- created_at: z.number(),
720
- description: z.string(),
721
- id: z.number(),
722
- name: z.string(),
723
- owner: z.number(),
724
- users: z.array(
725
- z.object({
726
- about_me: z.string().nullable(),
727
- avatar_url: z.string().nullable(),
728
- profile_image: z.string().nullable(),
729
- badges: z.any().nullable(),
730
- created_at: z.number().nullable(),
731
- flag: z.string().nullable(),
732
- id: z.number(),
733
- uid: z.string().nullable(),
734
- ban: z.string().nullable(),
735
- username: z.string().nullable(),
736
- verified: z.boolean().nullable(),
737
- play_count: z.number().nullable(),
738
- skill_points: z.number().nullable(),
739
- squares_hit: z.number().nullable(),
740
- total_score: z.number().nullable(),
741
- })
742
- ),
743
- }),
774
+ export const Schema = {
775
+ input: z.strictObject({
776
+ session: z.string(),
777
+ rawMap: z.string(),
778
+ }),
779
+ output: z.object({
780
+ error: z.string().optional(),
781
+ beatmap: z
782
+ .object({
783
+ starRating: z.number().nullable().optional(),
784
+ })
785
+ .optional(),
786
+ }),
744
787
  };*/
745
- import { Schema as GetClan } from "./api/getClan"
746
- export { Schema as SchemaGetClan } from "./api/getClan"
747
- export const getClan = handleApi({url:"/api/getClan",...GetClan})
788
+ import { Schema as GetRawStarRating } from "./api/getRawStarRating"
789
+ export { Schema as SchemaGetRawStarRating } from "./api/getRawStarRating"
790
+ export const getRawStarRating = handleApi({url:"/api/getRawStarRating",...GetRawStarRating})
748
791
 
749
- // ./api/getBeatmapPageById.ts API
792
+ // ./api/getScore.ts API
750
793
 
751
794
  /*
752
- export const Schema = {
753
- input: z.strictObject({
754
- session: z.string(),
755
- mapId: z.string(),
756
- }),
757
- output: z.object({
758
- error: z.string().optional(),
759
- beatmap: z
760
- .object({
761
- id: z.number().nullable().optional(),
762
- nominations: z.array(z.number()).nullable().optional(),
763
- playcount: z.number().nullable().optional(),
764
- created_at: z.string().nullable().optional(),
765
- updated_at: z.number().nullable().optional(),
766
- difficulty: z.number().nullable().optional(),
767
- noteCount: z.number().nullable().optional(),
768
- length: z.number().nullable().optional(),
769
- title: z.string().nullable().optional(),
770
- ranked: z.boolean().nullable().optional(),
771
- beatmapFile: z.string().nullable().optional(),
772
- image: z.string().nullable().optional(),
773
- starRating: z.number().nullable().optional(),
774
- owner: z.number().nullable().optional(),
775
- ownerUsername: z.string().nullable().optional(),
776
- ownerAvatar: z.string().nullable().optional(),
777
- status: z.string().nullable().optional(),
778
- })
779
- .optional(),
780
- }),
795
+ export const Schema = {
796
+ input: z.strictObject({
797
+ session: z.string(),
798
+ id: z.number(),
799
+ }),
800
+ output: z.object({
801
+ error: z.string().optional(),
802
+ score: z
803
+ .object({
804
+ awarded_sp: z.number().nullable(),
805
+ beatmapHash: z.string().nullable(),
806
+ created_at: z.string(),
807
+ id: z.number(),
808
+ misses: z.number().nullable(),
809
+ passed: z.boolean().nullable(),
810
+ songId: z.string().nullable(),
811
+ userId: z.number().nullable(),
812
+ beatmapDifficulty: z.number().optional().nullable(),
813
+ beatmapNotes: z.number().optional().nullable(),
814
+ beatmapTitle: z.string().optional().nullable(),
815
+ username: z.string().optional().nullable(),
816
+ speed: z.number().optional().nullable(),
817
+ spin: z.boolean().optional().nullable(),
818
+ })
819
+ .optional(),
820
+ }),
781
821
  };*/
782
- import { Schema as GetBeatmapPageById } from "./api/getBeatmapPageById"
783
- export { Schema as SchemaGetBeatmapPageById } from "./api/getBeatmapPageById"
784
- export const getBeatmapPageById = handleApi({url:"/api/getBeatmapPageById",...GetBeatmapPageById})
822
+ import { Schema as GetScore } from "./api/getScore"
823
+ export { Schema as SchemaGetScore } from "./api/getScore"
824
+ export const getScore = handleApi({url:"/api/getScore",...GetScore})
785
825
 
786
- // ./api/getBeatmapPage.ts API
826
+ // ./api/getTimestamp.ts API
787
827
 
788
828
  /*
789
- export const Schema = {
790
- input: z.strictObject({
791
- session: z.string(),
792
- id: z.number(),
793
- }),
794
- output: z.object({
795
- error: z.string().optional(),
796
- beatmap: z
797
- .object({
798
- id: z.number().nullable().optional(),
799
- nominations: z.array(z.number()).nullable().optional(),
800
- playcount: z.number().nullable().optional(),
801
- created_at: z.string().nullable().optional(),
802
- updated_at: z.number().nullable().optional(),
803
- difficulty: z.number().nullable().optional(),
804
- noteCount: z.number().nullable().optional(),
805
- length: z.number().nullable().optional(),
806
- title: z.string().nullable().optional(),
807
- ranked: z.boolean().nullable().optional(),
808
- beatmapFile: z.string().nullable().optional(),
809
- image: z.string().nullable().optional(),
810
- imageLarge: z.string().nullable().optional(),
811
- starRating: z.number().nullable().optional(),
812
- owner: z.number().nullable().optional(),
813
- ownerUsername: z.string().nullable().optional(),
814
- ownerAvatar: z.string().nullable().optional(),
815
- status: z.string().nullable().optional(),
816
- description: z.string().nullable().optional(),
817
- tags: z.string().nullable().optional(),
818
- })
819
- .optional(),
820
- }),
829
+ export const Schema = {
830
+ input: z.strictObject({}),
831
+ output: z.object({
832
+ time: z.number(),
833
+ }),
821
834
  };*/
822
- import { Schema as GetBeatmapPage } from "./api/getBeatmapPage"
823
- export { Schema as SchemaGetBeatmapPage } from "./api/getBeatmapPage"
824
- export const getBeatmapPage = handleApi({url:"/api/getBeatmapPage",...GetBeatmapPage})
835
+ import { Schema as GetTimestamp } from "./api/getTimestamp"
836
+ export { Schema as SchemaGetTimestamp } from "./api/getTimestamp"
837
+ export const getTimestamp = handleApi({url:"/api/getTimestamp",...GetTimestamp})
825
838
 
826
- // ./api/createBeatmap.ts API
839
+ // ./api/getUserScores.ts API
827
840
 
828
841
  /*
829
- export const Schema = {
830
- input: z.strictObject({
831
- url: z.string(),
832
- session: z.string(),
833
- updateFlag: z.boolean().optional(),
834
- }),
835
- output: z.strictObject({
836
- hash: z.string().optional(),
837
- error: z.string().optional(),
838
- }),
842
+ export const Schema = {
843
+ input: z.strictObject({
844
+ session: z.string(),
845
+ id: z.number(),
846
+ limit: z.number().default(10),
847
+ }),
848
+ output: z.object({
849
+ error: z.string().optional(),
850
+ lastDay: z
851
+ .array(
852
+ z.object({
853
+ awarded_sp: z.number().nullable(),
854
+ beatmapHash: z.string().nullable(),
855
+ created_at: z.string(),
856
+ id: z.number(),
857
+ misses: z.number().nullable(),
858
+ passed: z.boolean().nullable(),
859
+ songId: z.string().nullable(),
860
+ userId: z.number().nullable(),
861
+ beatmapDifficulty: z.number().optional().nullable(),
862
+ beatmapNotes: z.number().optional().nullable(),
863
+ beatmapTitle: z.string().optional().nullable(),
864
+ speed: z.number().optional().nullable(),
865
+ spin: z.boolean().optional().nullable(),
866
+ })
867
+ )
868
+ .optional(),
869
+ top: z
870
+ .array(
871
+ z.object({
872
+ awarded_sp: z.number().nullable(),
873
+ beatmapHash: z.string().nullable(),
874
+ created_at: z.string(),
875
+ id: z.number(),
876
+ misses: z.number().nullable(),
877
+ passed: z.boolean().nullable(),
878
+ rank: z.string().nullable(),
879
+ songId: z.string().nullable(),
880
+ userId: z.number().nullable(),
881
+ beatmapDifficulty: z.number().optional().nullable(),
882
+ beatmapNotes: z.number().optional().nullable(),
883
+ beatmapTitle: z.string().optional().nullable(),
884
+ speed: z.number().optional().nullable(),
885
+ spin: z.boolean().optional().nullable(),
886
+ })
887
+ )
888
+ .optional(),
889
+ stats: z
890
+ .object({
891
+ totalScores: z.number(),
892
+ spinScores: z.number(),
893
+ })
894
+ .optional(),
895
+ }),
839
896
  };*/
840
- import { Schema as CreateBeatmap } from "./api/createBeatmap"
841
- export { Schema as SchemaCreateBeatmap } from "./api/createBeatmap"
842
- export const createBeatmap = handleApi({url:"/api/createBeatmap",...CreateBeatmap})
897
+ import { Schema as GetUserScores } from "./api/getUserScores"
898
+ export { Schema as SchemaGetUserScores } from "./api/getUserScores"
899
+ export const getUserScores = handleApi({url:"/api/getUserScores",...GetUserScores})
843
900
 
844
- // ./api/getLeaderboard.ts API
901
+ // ./api/nominateMap.ts API
845
902
 
846
903
  /*
847
- export const Schema = {
848
- input: z.strictObject({
849
- session: z.string(),
850
- page: z.number().default(1),
851
- flag: z.string().optional(),
852
- spin: z.boolean().default(false),
853
- }),
854
- output: z.object({
855
- error: z.string().optional(),
856
- total: z.number(),
857
- viewPerPage: z.number(),
858
- currentPage: z.number(),
859
- userPosition: z.number(),
860
- leaderboard: z
861
- .array(
862
- z.object({
863
- flag: z.string().nullable(),
864
- id: z.number(),
865
- username: z.string().nullable(),
866
- play_count: z.number().nullable(),
867
- skill_points: z.number().nullable(),
868
- spin_skill_points: z.number().nullable(),
869
- total_score: z.number().nullable(),
870
- clans: z
871
- .object({
872
- id: z.number(),
873
- acronym: z.string(),
874
- })
875
- .optional()
876
- .nullable(),
877
- })
878
- )
879
- .optional(),
880
- }),
904
+ export const Schema = {
905
+ input: z.strictObject({
906
+ session: z.string(),
907
+ mapId: z.number(),
908
+ }),
909
+ output: z.object({
910
+ error: z.string().optional(),
911
+ }),
881
912
  };*/
882
- import { Schema as GetLeaderboard } from "./api/getLeaderboard"
883
- export { Schema as SchemaGetLeaderboard } from "./api/getLeaderboard"
884
- export const getLeaderboard = handleApi({url:"/api/getLeaderboard",...GetLeaderboard})
913
+ import { Schema as NominateMap } from "./api/nominateMap"
914
+ export { Schema as SchemaNominateMap } from "./api/nominateMap"
915
+ export const nominateMap = handleApi({url:"/api/nominateMap",...NominateMap})
885
916
 
886
- // ./api/getBeatmapStarRating.ts API
917
+ // ./api/postBeatmapComment.ts API
887
918
 
888
919
  /*
889
- export const Schema = {
890
- input: z.strictObject({
891
- session: z.string(),
892
- mapId: z.string(),
893
- }),
894
- output: z.object({
895
- error: z.string().optional(),
896
- beatmap: z
897
- .object({
898
- starRating: z.number().nullable().optional(),
899
- })
900
- .optional(),
901
- }),
920
+ export const Schema = {
921
+ input: z.strictObject({
922
+ session: z.string(),
923
+ page: z.number(),
924
+ content: z.string(),
925
+ }),
926
+ output: z.strictObject({
927
+ error: z.string().optional(),
928
+ }),
902
929
  };*/
903
- import { Schema as GetBeatmapStarRating } from "./api/getBeatmapStarRating"
904
- export { Schema as SchemaGetBeatmapStarRating } from "./api/getBeatmapStarRating"
905
- export const getBeatmapStarRating = handleApi({url:"/api/getBeatmapStarRating",...GetBeatmapStarRating})
930
+ import { Schema as PostBeatmapComment } from "./api/postBeatmapComment"
931
+ export { Schema as SchemaPostBeatmapComment } from "./api/postBeatmapComment"
932
+ export const postBeatmapComment = handleApi({url:"/api/postBeatmapComment",...PostBeatmapComment})
906
933
 
907
- // ./api/searchUsers.ts API
934
+ // ./api/rankMapsArchive.ts API
908
935
 
909
936
  /*
910
- export const Schema = {
911
- input: z.strictObject({
912
- text: z.string(),
913
- }),
914
- output: z.object({
915
- error: z.string().optional(),
916
- results: z
917
- .array(
918
- z.object({
919
- id: z.number(),
920
- username: z.string().nullable(),
921
- })
922
- )
923
- .optional(),
924
- }),
937
+ export const Schema = {
938
+ input: z.strictObject({
939
+ session: z.string(),
940
+ mapId: z.number(),
941
+ }),
942
+ output: z.object({
943
+ error: z.string().optional(),
944
+ }),
925
945
  };*/
926
- import { Schema as SearchUsers } from "./api/searchUsers"
927
- export { Schema as SchemaSearchUsers } from "./api/searchUsers"
928
- export const searchUsers = handleApi({url:"/api/searchUsers",...SearchUsers})
946
+ import { Schema as RankMapsArchive } from "./api/rankMapsArchive"
947
+ export { Schema as SchemaRankMapsArchive } from "./api/rankMapsArchive"
948
+ export const rankMapsArchive = handleApi({url:"/api/rankMapsArchive",...RankMapsArchive})
929
949
 
930
- // ./api/submitScore.ts API
950
+ // ./api/searchUsers.ts API
931
951
 
932
952
  /*
933
- export const Schema = {
934
- input: z.strictObject({
935
- session: z.string(),
936
- data: z.strictObject({
937
- token: z.string(),
938
- relayHwid: z.string(),
939
- songId: z.string(),
940
- misses: z.number(),
941
- hits: z.number(),
942
- mapHash: z.string(),
943
- speed: z.number(),
944
- mods: z.array(z.string()),
945
- additionalData: z.any(),
946
- spin: z.boolean(),
947
- virtualStars: z.number(),
948
- }),
949
- }),
950
- output: z.object({
951
- error: z.string().optional(),
952
- }),
953
+ export const Schema = {
954
+ input: z.strictObject({
955
+ text: z.string(),
956
+ }),
957
+ output: z.object({
958
+ error: z.string().optional(),
959
+ results: z
960
+ .array(
961
+ z.object({
962
+ id: z.number(),
963
+ username: z.string().nullable(),
964
+ })
965
+ )
966
+ .optional(),
967
+ }),
953
968
  };*/
954
- import { Schema as SubmitScore } from "./api/submitScore"
955
- export { Schema as SchemaSubmitScore } from "./api/submitScore"
956
- export const submitScore = handleApi({url:"/api/submitScore",...SubmitScore})
969
+ import { Schema as SearchUsers } from "./api/searchUsers"
970
+ export { Schema as SchemaSearchUsers } from "./api/searchUsers"
971
+ export const searchUsers = handleApi({url:"/api/searchUsers",...SearchUsers})
957
972
 
958
- // ./api/addCollectionMap.ts API
973
+ // ./api/setPasskey.ts API
959
974
 
960
975
  /*
961
- export const Schema = {
962
- input: z.strictObject({
963
- session: z.string(),
964
- collection: z.number(),
965
- beatmapPage: z.number(),
966
- }),
967
- output: z.object({
968
- error: z.string().optional(),
969
- }),
976
+ export const Schema = {
977
+ input: z.strictObject({
978
+ session: z.string(),
979
+ data: z.object({
980
+ passkey: z.string(),
981
+ }),
982
+ }),
983
+ output: z.object({
984
+ error: z.string().optional(),
985
+ }),
970
986
  };*/
971
- import { Schema as AddCollectionMap } from "./api/addCollectionMap"
972
- export { Schema as SchemaAddCollectionMap } from "./api/addCollectionMap"
973
- export const addCollectionMap = handleApi({url:"/api/addCollectionMap",...AddCollectionMap})
987
+ import { Schema as SetPasskey } from "./api/setPasskey"
988
+ export { Schema as SchemaSetPasskey } from "./api/setPasskey"
989
+ export const setPasskey = handleApi({url:"/api/setPasskey",...SetPasskey})
974
990
 
975
- // ./api/getCollection.ts API
991
+ // ./api/submitScore.ts API
976
992
 
977
993
  /*
978
- export const Schema = {
979
- input: z.strictObject({
980
- session: z.string(),
981
- collection: z.number(),
982
- }),
983
- output: z.object({
984
- collection: z.object({
985
- title: z.string(),
986
- description: z.string(),
987
- owner: z.object({
988
- id: z.number(),
989
- username: z.string(),
990
- }),
991
- isList: z.boolean(),
992
- beatmaps: z.array(
993
- z.object({
994
- id: z.number(),
995
- playcount: z.number().nullable().optional(),
996
- created_at: z.string().nullable().optional(),
997
- difficulty: z.number().nullable().optional(),
998
- length: z.number().nullable().optional(),
999
- title: z.string().nullable().optional(),
1000
- ranked: z.boolean().nullable().optional(),
1001
- beatmapFile: z.string().nullable().optional(),
1002
- image: z.string().nullable().optional(),
1003
- starRating: z.number().nullable().optional(),
1004
- owner: z.number().nullable().optional(),
1005
- ownerUsername: z.string().nullable().optional(),
1006
- status: z.string().nullable().optional(),
1007
- tags: z.string().nullable().optional(),
1008
- })
1009
- ),
1010
- }),
1011
- error: z.string().optional(),
1012
- }),
994
+ export const Schema = {
995
+ input: z.strictObject({
996
+ session: z.string(),
997
+ data: z.strictObject({
998
+ token: z.string(),
999
+ relayHwid: z.string(),
1000
+ songId: z.string(),
1001
+ misses: z.number(),
1002
+ hits: z.number(),
1003
+ mapHash: z.string(),
1004
+ speed: z.number(),
1005
+ mods: z.array(z.string()),
1006
+ additionalData: z.any(),
1007
+ spin: z.boolean(),
1008
+ virtualStars: z.number(),
1009
+ }),
1010
+ }),
1011
+ output: z.object({
1012
+ error: z.string().optional(),
1013
+ }),
1013
1014
  };*/
1014
- import { Schema as GetCollection } from "./api/getCollection"
1015
- export { Schema as SchemaGetCollection } from "./api/getCollection"
1016
- export const getCollection = handleApi({url:"/api/getCollection",...GetCollection})
1015
+ import { Schema as SubmitScore } from "./api/submitScore"
1016
+ export { Schema as SchemaSubmitScore } from "./api/submitScore"
1017
+ export const submitScore = handleApi({url:"/api/submitScore",...SubmitScore})
1017
1018
 
1018
1019
  // ./api/updateBeatmapPage.ts API
1019
1020
 
1020
1021
  /*
1021
- export const Schema = {
1022
- input: z.strictObject({
1023
- session: z.string(),
1024
- id: z.number(),
1025
- beatmapHash: z.string().optional(),
1026
- tags: z.string().optional(),
1027
- description: z.string().optional(),
1028
- }),
1029
- output: z.strictObject({
1030
- error: z.string().optional(),
1031
- }),
1022
+ export const Schema = {
1023
+ input: z.strictObject({
1024
+ session: z.string(),
1025
+ id: z.number(),
1026
+ beatmapHash: z.string().optional(),
1027
+ tags: z.string().optional(),
1028
+ description: z.string().optional(),
1029
+ }),
1030
+ output: z.strictObject({
1031
+ error: z.string().optional(),
1032
+ }),
1032
1033
  };*/
1033
1034
  import { Schema as UpdateBeatmapPage } from "./api/updateBeatmapPage"
1034
1035
  export { Schema as SchemaUpdateBeatmapPage } from "./api/updateBeatmapPage"