rhythia-api 147.0.0 → 149.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.
- package/api/getBeatmapPage.ts +4 -0
- package/api/getLeaderboard.ts +1 -0
- package/index.ts +26 -24
- package/package.json +1 -1
package/api/getBeatmapPage.ts
CHANGED
|
@@ -28,6 +28,8 @@ export const Schema = {
|
|
|
28
28
|
ownerUsername: z.string().nullable().optional(),
|
|
29
29
|
ownerAvatar: z.string().nullable().optional(),
|
|
30
30
|
status: z.string().nullable().optional(),
|
|
31
|
+
description: z.string().nullable().optional(),
|
|
32
|
+
tags: z.string().nullable().optional(),
|
|
31
33
|
})
|
|
32
34
|
.optional(),
|
|
33
35
|
}),
|
|
@@ -92,6 +94,8 @@ export async function handler(
|
|
|
92
94
|
id: beatmapPage.id,
|
|
93
95
|
status: beatmapPage.status,
|
|
94
96
|
nominations: beatmapPage.nominations as number[],
|
|
97
|
+
description: beatmapPage.description,
|
|
98
|
+
tags: beatmapPage.tags,
|
|
95
99
|
},
|
|
96
100
|
});
|
|
97
101
|
}
|
package/api/getLeaderboard.ts
CHANGED
|
@@ -63,6 +63,7 @@ export async function getLeaderboard(page = 1, session: string) {
|
|
|
63
63
|
const { count: playersWithMorePoints, error: rankError } = await supabase
|
|
64
64
|
.from("profiles")
|
|
65
65
|
.select("*", { count: "exact", head: true })
|
|
66
|
+
.neq("ban", "excluded")
|
|
66
67
|
.gt("skill_points", queryData.skill_points);
|
|
67
68
|
|
|
68
69
|
leaderPosition = (playersWithMorePoints || 0) + 1;
|
package/index.ts
CHANGED
|
@@ -11,7 +11,7 @@ export const Schema = {
|
|
|
11
11
|
output: z.object({
|
|
12
12
|
error: z.string().optional(),
|
|
13
13
|
}),
|
|
14
|
-
|
|
14
|
+
};*/
|
|
15
15
|
import { Schema as ApproveMap } from "./api/approveMap"
|
|
16
16
|
export { Schema as SchemaApproveMap } from "./api/approveMap"
|
|
17
17
|
export const approveMap = handleApi({url:"/api/approveMap",...ApproveMap})
|
|
@@ -29,7 +29,7 @@ export const Schema = {
|
|
|
29
29
|
hash: z.string().optional(),
|
|
30
30
|
error: z.string().optional(),
|
|
31
31
|
}),
|
|
32
|
-
|
|
32
|
+
};*/
|
|
33
33
|
import { Schema as CreateBeatmap } from "./api/createBeatmap"
|
|
34
34
|
export { Schema as SchemaCreateBeatmap } from "./api/createBeatmap"
|
|
35
35
|
export const createBeatmap = handleApi({url:"/api/createBeatmap",...CreateBeatmap})
|
|
@@ -45,7 +45,7 @@ export const Schema = {
|
|
|
45
45
|
error: z.string().optional(),
|
|
46
46
|
id: z.number().optional(),
|
|
47
47
|
}),
|
|
48
|
-
|
|
48
|
+
};*/
|
|
49
49
|
import { Schema as CreateBeatmapPage } from "./api/createBeatmapPage"
|
|
50
50
|
export { Schema as SchemaCreateBeatmapPage } from "./api/createBeatmapPage"
|
|
51
51
|
export const createBeatmapPage = handleApi({url:"/api/createBeatmapPage",...CreateBeatmapPage})
|
|
@@ -61,7 +61,7 @@ export const Schema = {
|
|
|
61
61
|
output: z.strictObject({
|
|
62
62
|
error: z.string().optional(),
|
|
63
63
|
}),
|
|
64
|
-
|
|
64
|
+
};*/
|
|
65
65
|
import { Schema as DeleteBeatmapPage } from "./api/deleteBeatmapPage"
|
|
66
66
|
export { Schema as SchemaDeleteBeatmapPage } from "./api/deleteBeatmapPage"
|
|
67
67
|
export const deleteBeatmapPage = handleApi({url:"/api/deleteBeatmapPage",...DeleteBeatmapPage})
|
|
@@ -79,7 +79,7 @@ export const Schema = {
|
|
|
79
79
|
output: z.object({
|
|
80
80
|
error: z.string().optional(),
|
|
81
81
|
}),
|
|
82
|
-
|
|
82
|
+
};*/
|
|
83
83
|
import { Schema as EditAboutMe } from "./api/editAboutMe"
|
|
84
84
|
export { Schema as SchemaEditAboutMe } from "./api/editAboutMe"
|
|
85
85
|
export const editAboutMe = handleApi({url:"/api/editAboutMe",...EditAboutMe})
|
|
@@ -98,7 +98,7 @@ export const Schema = {
|
|
|
98
98
|
output: z.object({
|
|
99
99
|
error: z.string().optional(),
|
|
100
100
|
}),
|
|
101
|
-
|
|
101
|
+
};*/
|
|
102
102
|
import { Schema as EditProfile } from "./api/editProfile"
|
|
103
103
|
export { Schema as SchemaEditProfile } from "./api/editProfile"
|
|
104
104
|
export const editProfile = handleApi({url:"/api/editProfile",...EditProfile})
|
|
@@ -118,7 +118,7 @@ export const Schema = {
|
|
|
118
118
|
url: z.string().optional(),
|
|
119
119
|
objectKey: z.string().optional(),
|
|
120
120
|
}),
|
|
121
|
-
|
|
121
|
+
};*/
|
|
122
122
|
import { Schema as GetAvatarUploadUrl } from "./api/getAvatarUploadUrl"
|
|
123
123
|
export { Schema as SchemaGetAvatarUploadUrl } from "./api/getAvatarUploadUrl"
|
|
124
124
|
export const getAvatarUploadUrl = handleApi({url:"/api/getAvatarUploadUrl",...GetAvatarUploadUrl})
|
|
@@ -142,7 +142,7 @@ export const Schema = {
|
|
|
142
142
|
)
|
|
143
143
|
.optional(),
|
|
144
144
|
}),
|
|
145
|
-
|
|
145
|
+
};*/
|
|
146
146
|
import { Schema as GetBadgedUsers } from "./api/getBadgedUsers"
|
|
147
147
|
export { Schema as SchemaGetBadgedUsers } from "./api/getBadgedUsers"
|
|
148
148
|
export const getBadgedUsers = handleApi({url:"/api/getBadgedUsers",...GetBadgedUsers})
|
|
@@ -170,7 +170,7 @@ export const Schema = {
|
|
|
170
170
|
})
|
|
171
171
|
),
|
|
172
172
|
}),
|
|
173
|
-
|
|
173
|
+
};*/
|
|
174
174
|
import { Schema as GetBeatmapComments } from "./api/getBeatmapComments"
|
|
175
175
|
export { Schema as SchemaGetBeatmapComments } from "./api/getBeatmapComments"
|
|
176
176
|
export const getBeatmapComments = handleApi({url:"/api/getBeatmapComments",...GetBeatmapComments})
|
|
@@ -203,10 +203,12 @@ export const Schema = {
|
|
|
203
203
|
ownerUsername: z.string().nullable().optional(),
|
|
204
204
|
ownerAvatar: z.string().nullable().optional(),
|
|
205
205
|
status: z.string().nullable().optional(),
|
|
206
|
+
description: z.string().nullable().optional(),
|
|
207
|
+
tags: z.string().nullable().optional(),
|
|
206
208
|
})
|
|
207
209
|
.optional(),
|
|
208
210
|
}),
|
|
209
|
-
|
|
211
|
+
};*/
|
|
210
212
|
import { Schema as GetBeatmapPage } from "./api/getBeatmapPage"
|
|
211
213
|
export { Schema as SchemaGetBeatmapPage } from "./api/getBeatmapPage"
|
|
212
214
|
export const getBeatmapPage = handleApi({url:"/api/getBeatmapPage",...GetBeatmapPage})
|
|
@@ -242,7 +244,7 @@ export const Schema = {
|
|
|
242
244
|
})
|
|
243
245
|
.optional(),
|
|
244
246
|
}),
|
|
245
|
-
|
|
247
|
+
};*/
|
|
246
248
|
import { Schema as GetBeatmapPageById } from "./api/getBeatmapPageById"
|
|
247
249
|
export { Schema as SchemaGetBeatmapPageById } from "./api/getBeatmapPageById"
|
|
248
250
|
export const getBeatmapPageById = handleApi({url:"/api/getBeatmapPageById",...GetBeatmapPageById})
|
|
@@ -292,7 +294,7 @@ export const Schema = {
|
|
|
292
294
|
)
|
|
293
295
|
.optional(),
|
|
294
296
|
}),
|
|
295
|
-
|
|
297
|
+
};*/
|
|
296
298
|
import { Schema as GetBeatmaps } from "./api/getBeatmaps"
|
|
297
299
|
export { Schema as SchemaGetBeatmaps } from "./api/getBeatmaps"
|
|
298
300
|
export const getBeatmaps = handleApi({url:"/api/getBeatmaps",...GetBeatmaps})
|
|
@@ -324,7 +326,7 @@ export const Schema = {
|
|
|
324
326
|
)
|
|
325
327
|
.optional(),
|
|
326
328
|
}),
|
|
327
|
-
|
|
329
|
+
};*/
|
|
328
330
|
import { Schema as GetLeaderboard } from "./api/getLeaderboard"
|
|
329
331
|
export { Schema as SchemaGetLeaderboard } from "./api/getLeaderboard"
|
|
330
332
|
export const getLeaderboard = handleApi({url:"/api/getLeaderboard",...GetLeaderboard})
|
|
@@ -345,7 +347,7 @@ export const Schema = {
|
|
|
345
347
|
url: z.string().optional(),
|
|
346
348
|
objectKey: z.string().optional(),
|
|
347
349
|
}),
|
|
348
|
-
|
|
350
|
+
};*/
|
|
349
351
|
import { Schema as GetMapUploadUrl } from "./api/getMapUploadUrl"
|
|
350
352
|
export { Schema as SchemaGetMapUploadUrl } from "./api/getMapUploadUrl"
|
|
351
353
|
export const getMapUploadUrl = handleApi({url:"/api/getMapUploadUrl",...GetMapUploadUrl})
|
|
@@ -381,7 +383,7 @@ export const Schema = {
|
|
|
381
383
|
})
|
|
382
384
|
.optional(),
|
|
383
385
|
}),
|
|
384
|
-
|
|
386
|
+
};*/
|
|
385
387
|
import { Schema as GetProfile } from "./api/getProfile"
|
|
386
388
|
export { Schema as SchemaGetProfile } from "./api/getProfile"
|
|
387
389
|
export const getProfile = handleApi({url:"/api/getProfile",...GetProfile})
|
|
@@ -396,7 +398,7 @@ export const Schema = {
|
|
|
396
398
|
beatmaps: z.number(),
|
|
397
399
|
scores: z.number(),
|
|
398
400
|
}),
|
|
399
|
-
|
|
401
|
+
};*/
|
|
400
402
|
import { Schema as GetPublicStats } from "./api/getPublicStats"
|
|
401
403
|
export { Schema as SchemaGetPublicStats } from "./api/getPublicStats"
|
|
402
404
|
export const getPublicStats = handleApi({url:"/api/getPublicStats",...GetPublicStats})
|
|
@@ -429,7 +431,7 @@ export const Schema = {
|
|
|
429
431
|
})
|
|
430
432
|
.optional(),
|
|
431
433
|
}),
|
|
432
|
-
|
|
434
|
+
};*/
|
|
433
435
|
import { Schema as GetScore } from "./api/getScore"
|
|
434
436
|
export { Schema as SchemaGetScore } from "./api/getScore"
|
|
435
437
|
export const getScore = handleApi({url:"/api/getScore",...GetScore})
|
|
@@ -482,7 +484,7 @@ export const Schema = {
|
|
|
482
484
|
)
|
|
483
485
|
.optional(),
|
|
484
486
|
}),
|
|
485
|
-
|
|
487
|
+
};*/
|
|
486
488
|
import { Schema as GetUserScores } from "./api/getUserScores"
|
|
487
489
|
export { Schema as SchemaGetUserScores } from "./api/getUserScores"
|
|
488
490
|
export const getUserScores = handleApi({url:"/api/getUserScores",...GetUserScores})
|
|
@@ -498,7 +500,7 @@ export const Schema = {
|
|
|
498
500
|
output: z.object({
|
|
499
501
|
error: z.string().optional(),
|
|
500
502
|
}),
|
|
501
|
-
|
|
503
|
+
};*/
|
|
502
504
|
import { Schema as NominateMap } from "./api/nominateMap"
|
|
503
505
|
export { Schema as SchemaNominateMap } from "./api/nominateMap"
|
|
504
506
|
export const nominateMap = handleApi({url:"/api/nominateMap",...NominateMap})
|
|
@@ -515,7 +517,7 @@ export const Schema = {
|
|
|
515
517
|
output: z.strictObject({
|
|
516
518
|
error: z.string().optional(),
|
|
517
519
|
}),
|
|
518
|
-
|
|
520
|
+
};*/
|
|
519
521
|
import { Schema as PostBeatmapComment } from "./api/postBeatmapComment"
|
|
520
522
|
export { Schema as SchemaPostBeatmapComment } from "./api/postBeatmapComment"
|
|
521
523
|
export const postBeatmapComment = handleApi({url:"/api/postBeatmapComment",...PostBeatmapComment})
|
|
@@ -531,7 +533,7 @@ export const Schema = {
|
|
|
531
533
|
output: z.object({
|
|
532
534
|
error: z.string().optional(),
|
|
533
535
|
}),
|
|
534
|
-
|
|
536
|
+
};*/
|
|
535
537
|
import { Schema as RankMapsArchive } from "./api/rankMapsArchive"
|
|
536
538
|
export { Schema as SchemaRankMapsArchive } from "./api/rankMapsArchive"
|
|
537
539
|
export const rankMapsArchive = handleApi({url:"/api/rankMapsArchive",...RankMapsArchive})
|
|
@@ -554,7 +556,7 @@ export const Schema = {
|
|
|
554
556
|
)
|
|
555
557
|
.optional(),
|
|
556
558
|
}),
|
|
557
|
-
|
|
559
|
+
};*/
|
|
558
560
|
import { Schema as SearchUsers } from "./api/searchUsers"
|
|
559
561
|
export { Schema as SchemaSearchUsers } from "./api/searchUsers"
|
|
560
562
|
export const searchUsers = handleApi({url:"/api/searchUsers",...SearchUsers})
|
|
@@ -579,7 +581,7 @@ export const Schema = {
|
|
|
579
581
|
output: z.object({
|
|
580
582
|
error: z.string().optional(),
|
|
581
583
|
}),
|
|
582
|
-
|
|
584
|
+
};*/
|
|
583
585
|
import { Schema as SubmitScore } from "./api/submitScore"
|
|
584
586
|
export { Schema as SchemaSubmitScore } from "./api/submitScore"
|
|
585
587
|
export const submitScore = handleApi({url:"/api/submitScore",...SubmitScore})
|
|
@@ -598,7 +600,7 @@ export const Schema = {
|
|
|
598
600
|
output: z.strictObject({
|
|
599
601
|
error: z.string().optional(),
|
|
600
602
|
}),
|
|
601
|
-
|
|
603
|
+
};*/
|
|
602
604
|
import { Schema as UpdateBeatmapPage } from "./api/updateBeatmapPage"
|
|
603
605
|
export { Schema as SchemaUpdateBeatmapPage } from "./api/updateBeatmapPage"
|
|
604
606
|
export const updateBeatmapPage = handleApi({url:"/api/updateBeatmapPage",...UpdateBeatmapPage})
|