rhythia-api 187.0.0 → 188.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/types/database.ts CHANGED
@@ -1,800 +1,843 @@
1
- export type Json =
2
- | string
3
- | number
4
- | boolean
5
- | null
6
- | { [key: string]: Json | undefined }
7
- | Json[]
8
-
9
- export type Database = {
10
- public: {
11
- Tables: {
12
- beatmapCollections: {
13
- Row: {
14
- created_at: string
15
- description: string
16
- id: number
17
- is_list: boolean
18
- owner: number
19
- title: string
20
- }
21
- Insert: {
22
- created_at?: string
23
- description: string
24
- id?: number
25
- is_list?: boolean
26
- owner: number
27
- title: string
28
- }
29
- Update: {
30
- created_at?: string
31
- description?: string
32
- id?: number
33
- is_list?: boolean
34
- owner?: number
35
- title?: string
36
- }
37
- Relationships: [
38
- {
39
- foreignKeyName: "beatmapCollections_owner_fkey"
40
- columns: ["owner"]
41
- isOneToOne: false
42
- referencedRelation: "profiles"
43
- referencedColumns: ["id"]
44
- },
45
- ]
46
- }
47
- beatmapPageComments: {
48
- Row: {
49
- beatmapPage: number
50
- content: string | null
51
- created_at: string
52
- id: number
53
- owner: number
54
- }
55
- Insert: {
56
- beatmapPage: number
57
- content?: string | null
58
- created_at?: string
59
- id?: number
60
- owner: number
61
- }
62
- Update: {
63
- beatmapPage?: number
64
- content?: string | null
65
- created_at?: string
66
- id?: number
67
- owner?: number
68
- }
69
- Relationships: [
70
- {
71
- foreignKeyName: "beatmapPageComments_beatmapPage_fkey"
72
- columns: ["beatmapPage"]
73
- isOneToOne: false
74
- referencedRelation: "beatmapPages"
75
- referencedColumns: ["id"]
76
- },
77
- {
78
- foreignKeyName: "beatmapPageComments_owner_fkey"
79
- columns: ["owner"]
80
- isOneToOne: false
81
- referencedRelation: "profiles"
82
- referencedColumns: ["id"]
83
- },
84
- ]
85
- }
86
- beatmapPages: {
87
- Row: {
88
- created_at: string
89
- description: string
90
- genre: string | null
91
- id: number
92
- latestBeatmapHash: string | null
93
- nominations: Json | null
94
- owner: number | null
95
- ranked_at: number
96
- status: string | null
97
- tags: string
98
- title: string | null
99
- updated_at: number | null
100
- }
101
- Insert: {
102
- created_at?: string
103
- description?: string
104
- genre?: string | null
105
- id?: number
106
- latestBeatmapHash?: string | null
107
- nominations?: Json | null
108
- owner?: number | null
109
- ranked_at?: number
110
- status?: string | null
111
- tags?: string
112
- title?: string | null
113
- updated_at?: number | null
114
- }
115
- Update: {
116
- created_at?: string
117
- description?: string
118
- genre?: string | null
119
- id?: number
120
- latestBeatmapHash?: string | null
121
- nominations?: Json | null
122
- owner?: number | null
123
- ranked_at?: number
124
- status?: string | null
125
- tags?: string
126
- title?: string | null
127
- updated_at?: number | null
128
- }
129
- Relationships: [
130
- {
131
- foreignKeyName: "beatmapPages_latestBeatmapHash_fkey"
132
- columns: ["latestBeatmapHash"]
133
- isOneToOne: false
134
- referencedRelation: "beatmaps"
135
- referencedColumns: ["beatmapHash"]
136
- },
137
- {
138
- foreignKeyName: "beatmapPages_owner_fkey"
139
- columns: ["owner"]
140
- isOneToOne: false
141
- referencedRelation: "profiles"
142
- referencedColumns: ["id"]
143
- },
144
- ]
145
- }
146
- beatmaps: {
147
- Row: {
148
- beatmapFile: string | null
149
- beatmapHash: string
150
- created_at: string
151
- difficulty: number | null
152
- image: string | null
153
- imageLarge: string | null
154
- length: number | null
155
- noteCount: number | null
156
- playcount: number | null
157
- ranked: boolean | null
158
- starRating: number | null
159
- title: string | null
160
- }
161
- Insert: {
162
- beatmapFile?: string | null
163
- beatmapHash: string
164
- created_at?: string
165
- difficulty?: number | null
166
- image?: string | null
167
- imageLarge?: string | null
168
- length?: number | null
169
- noteCount?: number | null
170
- playcount?: number | null
171
- ranked?: boolean | null
172
- starRating?: number | null
173
- title?: string | null
174
- }
175
- Update: {
176
- beatmapFile?: string | null
177
- beatmapHash?: string
178
- created_at?: string
179
- difficulty?: number | null
180
- image?: string | null
181
- imageLarge?: string | null
182
- length?: number | null
183
- noteCount?: number | null
184
- playcount?: number | null
185
- ranked?: boolean | null
186
- starRating?: number | null
187
- title?: string | null
188
- }
189
- Relationships: []
190
- }
191
- chartedValues: {
192
- Row: {
193
- created_at: string
194
- id: number
195
- type: string | null
196
- value: number | null
197
- }
198
- Insert: {
199
- created_at?: string
200
- id?: number
201
- type?: string | null
202
- value?: number | null
203
- }
204
- Update: {
205
- created_at?: string
206
- id?: number
207
- type?: string | null
208
- value?: number | null
209
- }
210
- Relationships: []
211
- }
212
- clans: {
213
- Row: {
214
- acronym: string | null
215
- allowed_users: Json
216
- avatar_url: string | null
217
- created_at: string
218
- description: string | null
219
- id: number
220
- name: string
221
- owner: number | null
222
- }
223
- Insert: {
224
- acronym?: string | null
225
- allowed_users?: Json
226
- avatar_url?: string | null
227
- created_at?: string
228
- description?: string | null
229
- id?: number
230
- name?: string
231
- owner?: number | null
232
- }
233
- Update: {
234
- acronym?: string | null
235
- allowed_users?: Json
236
- avatar_url?: string | null
237
- created_at?: string
238
- description?: string | null
239
- id?: number
240
- name?: string
241
- owner?: number | null
242
- }
243
- Relationships: [
244
- {
245
- foreignKeyName: "clans_owner_fkey"
246
- columns: ["owner"]
247
- isOneToOne: false
248
- referencedRelation: "profiles"
249
- referencedColumns: ["id"]
250
- },
251
- ]
252
- }
253
- collectionRelations: {
254
- Row: {
255
- beatmapPage: number | null
256
- collection: number
257
- created_at: string
258
- id: number
259
- sort: number
260
- }
261
- Insert: {
262
- beatmapPage?: number | null
263
- collection: number
264
- created_at?: string
265
- id?: number
266
- sort?: number
267
- }
268
- Update: {
269
- beatmapPage?: number | null
270
- collection?: number
271
- created_at?: string
272
- id?: number
273
- sort?: number
274
- }
275
- Relationships: [
276
- {
277
- foreignKeyName: "collectionRelations_beatmapPage_fkey"
278
- columns: ["beatmapPage"]
279
- isOneToOne: false
280
- referencedRelation: "beatmapPages"
281
- referencedColumns: ["id"]
282
- },
283
- {
284
- foreignKeyName: "collectionRelations_collection_fkey"
285
- columns: ["collection"]
286
- isOneToOne: false
287
- referencedRelation: "beatmapCollections"
288
- referencedColumns: ["id"]
289
- },
290
- ]
291
- }
292
- discordWebhooks: {
293
- Row: {
294
- id: number
295
- type: Database["public"]["Enums"]["discordWebhookType"] | null
296
- webhook_link: string
297
- }
298
- Insert: {
299
- id?: number
300
- type?: Database["public"]["Enums"]["discordWebhookType"] | null
301
- webhook_link?: string
302
- }
303
- Update: {
304
- id?: number
305
- type?: Database["public"]["Enums"]["discordWebhookType"] | null
306
- webhook_link?: string
307
- }
308
- Relationships: []
309
- }
310
- levers: {
311
- Row: {
312
- disable_scores: boolean
313
- id: number
314
- }
315
- Insert: {
316
- disable_scores?: boolean
317
- id?: number
318
- }
319
- Update: {
320
- disable_scores?: boolean
321
- id?: number
322
- }
323
- Relationships: []
324
- }
325
- passkeys: {
326
- Row: {
327
- email: string
328
- id: number
329
- passkey: string
330
- }
331
- Insert: {
332
- email: string
333
- id: number
334
- passkey: string
335
- }
336
- Update: {
337
- email?: string
338
- id?: number
339
- passkey?: string
340
- }
341
- Relationships: [
342
- {
343
- foreignKeyName: "passkeys_id_fkey"
344
- columns: ["id"]
345
- isOneToOne: true
346
- referencedRelation: "profiles"
347
- referencedColumns: ["id"]
348
- },
349
- ]
350
- }
351
- profileActivities: {
352
- Row: {
353
- last_activity: number | null
354
- uid: string
355
- }
356
- Insert: {
357
- last_activity?: number | null
358
- uid: string
359
- }
360
- Update: {
361
- last_activity?: number | null
362
- uid?: string
363
- }
364
- Relationships: []
365
- }
366
- profiles: {
367
- Row: {
368
- about_me: string | null
369
- avatar_url: string | null
370
- badges: Json | null
371
- ban: Database["public"]["Enums"]["banTypes"] | null
372
- bannedAt: number | null
373
- clan: number | null
374
- computedUsername: string | null
375
- created_at: number | null
376
- flag: string | null
377
- id: number
378
- mu_rank: number
379
- play_count: number | null
380
- profile_image: string | null
381
- sigma_rank: number | null
382
- skill_points: number | null
383
- spin_skill_points: number
384
- squares_hit: number | null
385
- total_score: number | null
386
- uid: string | null
387
- username: string | null
388
- verified: boolean | null
389
- }
390
- Insert: {
391
- about_me?: string | null
392
- avatar_url?: string | null
393
- badges?: Json | null
394
- ban?: Database["public"]["Enums"]["banTypes"] | null
395
- bannedAt?: number | null
396
- clan?: number | null
397
- computedUsername?: string | null
398
- created_at?: number | null
399
- flag?: string | null
400
- id?: number
401
- mu_rank?: number
402
- play_count?: number | null
403
- profile_image?: string | null
404
- sigma_rank?: number | null
405
- skill_points?: number | null
406
- spin_skill_points?: number
407
- squares_hit?: number | null
408
- total_score?: number | null
409
- uid?: string | null
410
- username?: string | null
411
- verified?: boolean | null
412
- }
413
- Update: {
414
- about_me?: string | null
415
- avatar_url?: string | null
416
- badges?: Json | null
417
- ban?: Database["public"]["Enums"]["banTypes"] | null
418
- bannedAt?: number | null
419
- clan?: number | null
420
- computedUsername?: string | null
421
- created_at?: number | null
422
- flag?: string | null
423
- id?: number
424
- mu_rank?: number
425
- play_count?: number | null
426
- profile_image?: string | null
427
- sigma_rank?: number | null
428
- skill_points?: number | null
429
- spin_skill_points?: number
430
- squares_hit?: number | null
431
- total_score?: number | null
432
- uid?: string | null
433
- username?: string | null
434
- verified?: boolean | null
435
- }
436
- Relationships: [
437
- {
438
- foreignKeyName: "profiles_clan_fkey"
439
- columns: ["clan"]
440
- isOneToOne: false
441
- referencedRelation: "clans"
442
- referencedColumns: ["id"]
443
- },
444
- ]
445
- }
446
- scores: {
447
- Row: {
448
- additional_data: Json
449
- awarded_sp: number | null
450
- beatmapHash: string | null
451
- created_at: string
452
- id: number
453
- misses: number | null
454
- mods: Json
455
- passed: boolean | null
456
- replayHwid: string | null
457
- songId: string | null
458
- speed: number | null
459
- spin: boolean
460
- userId: number | null
461
- }
462
- Insert: {
463
- additional_data?: Json
464
- awarded_sp?: number | null
465
- beatmapHash?: string | null
466
- created_at?: string
467
- id?: number
468
- misses?: number | null
469
- mods?: Json
470
- passed?: boolean | null
471
- replayHwid?: string | null
472
- songId?: string | null
473
- speed?: number | null
474
- spin?: boolean
475
- userId?: number | null
476
- }
477
- Update: {
478
- additional_data?: Json
479
- awarded_sp?: number | null
480
- beatmapHash?: string | null
481
- created_at?: string
482
- id?: number
483
- misses?: number | null
484
- mods?: Json
485
- passed?: boolean | null
486
- replayHwid?: string | null
487
- songId?: string | null
488
- speed?: number | null
489
- spin?: boolean
490
- userId?: number | null
491
- }
492
- Relationships: [
493
- {
494
- foreignKeyName: "scores_beatmapHash_fkey"
495
- columns: ["beatmapHash"]
496
- isOneToOne: false
497
- referencedRelation: "beatmaps"
498
- referencedColumns: ["beatmapHash"]
499
- },
500
- {
501
- foreignKeyName: "scores_userId_fkey"
502
- columns: ["userId"]
503
- isOneToOne: false
504
- referencedRelation: "profiles"
505
- referencedColumns: ["id"]
506
- },
507
- ]
508
- }
509
- }
510
- Views: {
511
- [_ in never]: never
512
- }
513
- Functions: {
514
- get_collections_v1: {
515
- Args: {
516
- page_number?: number
517
- items_per_page?: number
518
- }
519
- Returns: {
520
- id: number
521
- title: string
522
- description: string
523
- created_at: string
524
- owner: number
525
- beatmap_count: number
526
- star1: number
527
- star2: number
528
- star3: number
529
- star4: number
530
- star5: number
531
- star6: number
532
- star7: number
533
- star8: number
534
- star9: number
535
- star10: number
536
- star11: number
537
- star12: number
538
- star13: number
539
- star14: number
540
- star15: number
541
- star16: number
542
- star17: number
543
- star18: number
544
- total_pages: number
545
- }[]
546
- }
547
- get_collections_v2:
548
- | {
549
- Args: {
550
- page_number?: number
551
- items_per_page?: number
552
- }
553
- Returns: {
554
- id: number
555
- title: string
556
- description: string
557
- created_at: string
558
- owner: number
559
- owner_username: string
560
- owner_avatar_url: string
561
- beatmap_count: number
562
- star1: number
563
- star2: number
564
- star3: number
565
- star4: number
566
- star5: number
567
- star6: number
568
- star7: number
569
- star8: number
570
- star9: number
571
- star10: number
572
- star11: number
573
- star12: number
574
- star13: number
575
- star14: number
576
- star15: number
577
- star16: number
578
- star17: number
579
- star18: number
580
- total_pages: number
581
- }[]
582
- }
583
- | {
584
- Args: {
585
- page_number?: number
586
- items_per_page?: number
587
- owner_filter?: number
588
- }
589
- Returns: {
590
- id: number
591
- title: string
592
- description: string
593
- created_at: string
594
- owner: number
595
- owner_username: string
596
- owner_avatar_url: string
597
- beatmap_count: number
598
- star1: number
599
- star2: number
600
- star3: number
601
- star4: number
602
- star5: number
603
- star6: number
604
- star7: number
605
- star8: number
606
- star9: number
607
- star10: number
608
- star11: number
609
- star12: number
610
- star13: number
611
- star14: number
612
- star15: number
613
- star16: number
614
- star17: number
615
- star18: number
616
- total_pages: number
617
- }[]
618
- }
619
- get_collections_v3: {
620
- Args: {
621
- page_number?: number
622
- items_per_page?: number
623
- owner_filter?: number
624
- }
625
- Returns: {
626
- id: number
627
- title: string
628
- description: string
629
- created_at: string
630
- owner: number
631
- owner_username: string
632
- owner_avatar_url: string
633
- beatmap_count: number
634
- star1: number
635
- star2: number
636
- star3: number
637
- star4: number
638
- star5: number
639
- star6: number
640
- star7: number
641
- star8: number
642
- star9: number
643
- star10: number
644
- star11: number
645
- star12: number
646
- star13: number
647
- star14: number
648
- star15: number
649
- star16: number
650
- star17: number
651
- star18: number
652
- total_pages: number
653
- }[]
654
- }
655
- get_collections_v4: {
656
- Args: {
657
- page_number?: number
658
- items_per_page?: number
659
- owner_filter?: number
660
- search_query?: string
661
- author_filter?: string
662
- min_beatmaps?: number
663
- }
664
- Returns: {
665
- id: number
666
- title: string
667
- description: string
668
- created_at: string
669
- owner: number
670
- owner_username: string
671
- owner_avatar_url: string
672
- beatmap_count: number
673
- star1: number
674
- star2: number
675
- star3: number
676
- star4: number
677
- star5: number
678
- star6: number
679
- star7: number
680
- star8: number
681
- star9: number
682
- star10: number
683
- star11: number
684
- star12: number
685
- star13: number
686
- star14: number
687
- star15: number
688
- star16: number
689
- star17: number
690
- star18: number
691
- total_pages: number
692
- }[]
693
- }
694
- }
695
- Enums: {
696
- banTypes: "cool" | "silenced" | "restricted" | "excluded"
697
- discordWebhookType: "maps" | "scores"
698
- }
699
- CompositeTypes: {
700
- [_ in never]: never
701
- }
702
- }
703
- }
704
-
705
- type PublicSchema = Database[Extract<keyof Database, "public">]
706
-
707
- export type Tables<
708
- PublicTableNameOrOptions extends
709
- | keyof (PublicSchema["Tables"] & PublicSchema["Views"])
710
- | { schema: keyof Database },
711
- TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
712
- ? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
713
- Database[PublicTableNameOrOptions["schema"]]["Views"])
714
- : never = never,
715
- > = PublicTableNameOrOptions extends { schema: keyof Database }
716
- ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
717
- Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
718
- Row: infer R
719
- }
720
- ? R
721
- : never
722
- : PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] &
723
- PublicSchema["Views"])
724
- ? (PublicSchema["Tables"] &
725
- PublicSchema["Views"])[PublicTableNameOrOptions] extends {
726
- Row: infer R
727
- }
728
- ? R
729
- : never
730
- : never
731
-
732
- export type TablesInsert<
733
- PublicTableNameOrOptions extends
734
- | keyof PublicSchema["Tables"]
735
- | { schema: keyof Database },
736
- TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
737
- ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
738
- : never = never,
739
- > = PublicTableNameOrOptions extends { schema: keyof Database }
740
- ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
741
- Insert: infer I
742
- }
743
- ? I
744
- : never
745
- : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
746
- ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
747
- Insert: infer I
748
- }
749
- ? I
750
- : never
751
- : never
752
-
753
- export type TablesUpdate<
754
- PublicTableNameOrOptions extends
755
- | keyof PublicSchema["Tables"]
756
- | { schema: keyof Database },
757
- TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
758
- ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
759
- : never = never,
760
- > = PublicTableNameOrOptions extends { schema: keyof Database }
761
- ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
762
- Update: infer U
763
- }
764
- ? U
765
- : never
766
- : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
767
- ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
768
- Update: infer U
769
- }
770
- ? U
771
- : never
772
- : never
773
-
774
- export type Enums<
775
- PublicEnumNameOrOptions extends
776
- | keyof PublicSchema["Enums"]
777
- | { schema: keyof Database },
778
- EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
779
- ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
780
- : never = never,
781
- > = PublicEnumNameOrOptions extends { schema: keyof Database }
782
- ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
783
- : PublicEnumNameOrOptions extends keyof PublicSchema["Enums"]
784
- ? PublicSchema["Enums"][PublicEnumNameOrOptions]
785
- : never
786
-
787
- export type CompositeTypes<
788
- PublicCompositeTypeNameOrOptions extends
789
- | keyof PublicSchema["CompositeTypes"]
790
- | { schema: keyof Database },
791
- CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
792
- schema: keyof Database
793
- }
794
- ? keyof Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"]
795
- : never = never,
796
- > = PublicCompositeTypeNameOrOptions extends { schema: keyof Database }
797
- ? Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName]
798
- : PublicCompositeTypeNameOrOptions extends keyof PublicSchema["CompositeTypes"]
799
- ? PublicSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions]
800
- : never
1
+ export type Json =
2
+ | string
3
+ | number
4
+ | boolean
5
+ | null
6
+ | { [key: string]: Json | undefined }
7
+ | Json[]
8
+
9
+ export type Database = {
10
+ public: {
11
+ Tables: {
12
+ beatmapCollections: {
13
+ Row: {
14
+ created_at: string
15
+ description: string
16
+ id: number
17
+ is_list: boolean
18
+ owner: number
19
+ title: string
20
+ }
21
+ Insert: {
22
+ created_at?: string
23
+ description: string
24
+ id?: number
25
+ is_list?: boolean
26
+ owner: number
27
+ title: string
28
+ }
29
+ Update: {
30
+ created_at?: string
31
+ description?: string
32
+ id?: number
33
+ is_list?: boolean
34
+ owner?: number
35
+ title?: string
36
+ }
37
+ Relationships: [
38
+ {
39
+ foreignKeyName: "beatmapCollections_owner_fkey"
40
+ columns: ["owner"]
41
+ isOneToOne: false
42
+ referencedRelation: "profiles"
43
+ referencedColumns: ["id"]
44
+ },
45
+ ]
46
+ }
47
+ beatmapPageComments: {
48
+ Row: {
49
+ beatmapPage: number
50
+ content: string | null
51
+ created_at: string
52
+ id: number
53
+ owner: number
54
+ }
55
+ Insert: {
56
+ beatmapPage: number
57
+ content?: string | null
58
+ created_at?: string
59
+ id?: number
60
+ owner: number
61
+ }
62
+ Update: {
63
+ beatmapPage?: number
64
+ content?: string | null
65
+ created_at?: string
66
+ id?: number
67
+ owner?: number
68
+ }
69
+ Relationships: [
70
+ {
71
+ foreignKeyName: "beatmapPageComments_beatmapPage_fkey"
72
+ columns: ["beatmapPage"]
73
+ isOneToOne: false
74
+ referencedRelation: "beatmapPages"
75
+ referencedColumns: ["id"]
76
+ },
77
+ {
78
+ foreignKeyName: "beatmapPageComments_owner_fkey"
79
+ columns: ["owner"]
80
+ isOneToOne: false
81
+ referencedRelation: "profiles"
82
+ referencedColumns: ["id"]
83
+ },
84
+ ]
85
+ }
86
+ beatmapPages: {
87
+ Row: {
88
+ created_at: string
89
+ description: string
90
+ genre: string | null
91
+ id: number
92
+ latestBeatmapHash: string | null
93
+ nominations: Json | null
94
+ owner: number | null
95
+ ranked_at: number
96
+ status: string | null
97
+ tags: string
98
+ title: string | null
99
+ updated_at: number | null
100
+ }
101
+ Insert: {
102
+ created_at?: string
103
+ description?: string
104
+ genre?: string | null
105
+ id?: number
106
+ latestBeatmapHash?: string | null
107
+ nominations?: Json | null
108
+ owner?: number | null
109
+ ranked_at?: number
110
+ status?: string | null
111
+ tags?: string
112
+ title?: string | null
113
+ updated_at?: number | null
114
+ }
115
+ Update: {
116
+ created_at?: string
117
+ description?: string
118
+ genre?: string | null
119
+ id?: number
120
+ latestBeatmapHash?: string | null
121
+ nominations?: Json | null
122
+ owner?: number | null
123
+ ranked_at?: number
124
+ status?: string | null
125
+ tags?: string
126
+ title?: string | null
127
+ updated_at?: number | null
128
+ }
129
+ Relationships: [
130
+ {
131
+ foreignKeyName: "beatmapPages_latestBeatmapHash_fkey"
132
+ columns: ["latestBeatmapHash"]
133
+ isOneToOne: false
134
+ referencedRelation: "beatmaps"
135
+ referencedColumns: ["beatmapHash"]
136
+ },
137
+ {
138
+ foreignKeyName: "beatmapPages_owner_fkey"
139
+ columns: ["owner"]
140
+ isOneToOne: false
141
+ referencedRelation: "profiles"
142
+ referencedColumns: ["id"]
143
+ },
144
+ ]
145
+ }
146
+ beatmaps: {
147
+ Row: {
148
+ beatmapFile: string | null
149
+ beatmapHash: string
150
+ created_at: string
151
+ difficulty: number | null
152
+ image: string | null
153
+ imageLarge: string | null
154
+ length: number | null
155
+ noteCount: number | null
156
+ playcount: number | null
157
+ ranked: boolean | null
158
+ starRating: number | null
159
+ title: string | null
160
+ }
161
+ Insert: {
162
+ beatmapFile?: string | null
163
+ beatmapHash: string
164
+ created_at?: string
165
+ difficulty?: number | null
166
+ image?: string | null
167
+ imageLarge?: string | null
168
+ length?: number | null
169
+ noteCount?: number | null
170
+ playcount?: number | null
171
+ ranked?: boolean | null
172
+ starRating?: number | null
173
+ title?: string | null
174
+ }
175
+ Update: {
176
+ beatmapFile?: string | null
177
+ beatmapHash?: string
178
+ created_at?: string
179
+ difficulty?: number | null
180
+ image?: string | null
181
+ imageLarge?: string | null
182
+ length?: number | null
183
+ noteCount?: number | null
184
+ playcount?: number | null
185
+ ranked?: boolean | null
186
+ starRating?: number | null
187
+ title?: string | null
188
+ }
189
+ Relationships: []
190
+ }
191
+ chartedValues: {
192
+ Row: {
193
+ created_at: string
194
+ id: number
195
+ type: string | null
196
+ value: number | null
197
+ }
198
+ Insert: {
199
+ created_at?: string
200
+ id?: number
201
+ type?: string | null
202
+ value?: number | null
203
+ }
204
+ Update: {
205
+ created_at?: string
206
+ id?: number
207
+ type?: string | null
208
+ value?: number | null
209
+ }
210
+ Relationships: []
211
+ }
212
+ clans: {
213
+ Row: {
214
+ acronym: string | null
215
+ allowed_users: Json
216
+ avatar_url: string | null
217
+ created_at: string
218
+ description: string | null
219
+ id: number
220
+ name: string
221
+ owner: number | null
222
+ }
223
+ Insert: {
224
+ acronym?: string | null
225
+ allowed_users?: Json
226
+ avatar_url?: string | null
227
+ created_at?: string
228
+ description?: string | null
229
+ id?: number
230
+ name?: string
231
+ owner?: number | null
232
+ }
233
+ Update: {
234
+ acronym?: string | null
235
+ allowed_users?: Json
236
+ avatar_url?: string | null
237
+ created_at?: string
238
+ description?: string | null
239
+ id?: number
240
+ name?: string
241
+ owner?: number | null
242
+ }
243
+ Relationships: [
244
+ {
245
+ foreignKeyName: "clans_owner_fkey"
246
+ columns: ["owner"]
247
+ isOneToOne: false
248
+ referencedRelation: "profiles"
249
+ referencedColumns: ["id"]
250
+ },
251
+ ]
252
+ }
253
+ collectionRelations: {
254
+ Row: {
255
+ beatmapPage: number | null
256
+ collection: number
257
+ created_at: string
258
+ id: number
259
+ sort: number
260
+ }
261
+ Insert: {
262
+ beatmapPage?: number | null
263
+ collection: number
264
+ created_at?: string
265
+ id?: number
266
+ sort?: number
267
+ }
268
+ Update: {
269
+ beatmapPage?: number | null
270
+ collection?: number
271
+ created_at?: string
272
+ id?: number
273
+ sort?: number
274
+ }
275
+ Relationships: [
276
+ {
277
+ foreignKeyName: "collectionRelations_beatmapPage_fkey"
278
+ columns: ["beatmapPage"]
279
+ isOneToOne: false
280
+ referencedRelation: "beatmapPages"
281
+ referencedColumns: ["id"]
282
+ },
283
+ {
284
+ foreignKeyName: "collectionRelations_collection_fkey"
285
+ columns: ["collection"]
286
+ isOneToOne: false
287
+ referencedRelation: "beatmapCollections"
288
+ referencedColumns: ["id"]
289
+ },
290
+ ]
291
+ }
292
+ discordWebhooks: {
293
+ Row: {
294
+ id: number
295
+ type: Database["public"]["Enums"]["discordWebhookType"] | null
296
+ webhook_link: string
297
+ }
298
+ Insert: {
299
+ id?: number
300
+ type?: Database["public"]["Enums"]["discordWebhookType"] | null
301
+ webhook_link?: string
302
+ }
303
+ Update: {
304
+ id?: number
305
+ type?: Database["public"]["Enums"]["discordWebhookType"] | null
306
+ webhook_link?: string
307
+ }
308
+ Relationships: []
309
+ }
310
+ invites: {
311
+ Row: {
312
+ code: string
313
+ created_at: string
314
+ id: number
315
+ resourceId: string
316
+ type: string
317
+ used: boolean
318
+ }
319
+ Insert: {
320
+ code: string
321
+ created_at?: string
322
+ id?: number
323
+ resourceId: string
324
+ type: string
325
+ used?: boolean
326
+ }
327
+ Update: {
328
+ code?: string
329
+ created_at?: string
330
+ id?: number
331
+ resourceId?: string
332
+ type?: string
333
+ used?: boolean
334
+ }
335
+ Relationships: []
336
+ }
337
+ levers: {
338
+ Row: {
339
+ disable_scores: boolean
340
+ id: number
341
+ }
342
+ Insert: {
343
+ disable_scores?: boolean
344
+ id?: number
345
+ }
346
+ Update: {
347
+ disable_scores?: boolean
348
+ id?: number
349
+ }
350
+ Relationships: []
351
+ }
352
+ passkeys: {
353
+ Row: {
354
+ email: string
355
+ id: number
356
+ passkey: string
357
+ }
358
+ Insert: {
359
+ email: string
360
+ id: number
361
+ passkey: string
362
+ }
363
+ Update: {
364
+ email?: string
365
+ id?: number
366
+ passkey?: string
367
+ }
368
+ Relationships: [
369
+ {
370
+ foreignKeyName: "passkeys_id_fkey"
371
+ columns: ["id"]
372
+ isOneToOne: true
373
+ referencedRelation: "profiles"
374
+ referencedColumns: ["id"]
375
+ },
376
+ ]
377
+ }
378
+ profileActivities: {
379
+ Row: {
380
+ last_activity: number | null
381
+ uid: string
382
+ }
383
+ Insert: {
384
+ last_activity?: number | null
385
+ uid: string
386
+ }
387
+ Update: {
388
+ last_activity?: number | null
389
+ uid?: string
390
+ }
391
+ Relationships: []
392
+ }
393
+ profiles: {
394
+ Row: {
395
+ about_me: string | null
396
+ avatar_url: string | null
397
+ badges: Json | null
398
+ ban: Database["public"]["Enums"]["banTypes"] | null
399
+ bannedAt: number | null
400
+ clan: number | null
401
+ computedUsername: string | null
402
+ created_at: number | null
403
+ flag: string | null
404
+ id: number
405
+ mu_rank: number
406
+ play_count: number | null
407
+ profile_image: string | null
408
+ sigma_rank: number | null
409
+ skill_points: number | null
410
+ spin_skill_points: number
411
+ squares_hit: number | null
412
+ total_score: number | null
413
+ uid: string | null
414
+ username: string | null
415
+ verified: boolean | null
416
+ }
417
+ Insert: {
418
+ about_me?: string | null
419
+ avatar_url?: string | null
420
+ badges?: Json | null
421
+ ban?: Database["public"]["Enums"]["banTypes"] | null
422
+ bannedAt?: number | null
423
+ clan?: number | null
424
+ computedUsername?: string | null
425
+ created_at?: number | null
426
+ flag?: string | null
427
+ id?: number
428
+ mu_rank?: number
429
+ play_count?: number | null
430
+ profile_image?: string | null
431
+ sigma_rank?: number | null
432
+ skill_points?: number | null
433
+ spin_skill_points?: number
434
+ squares_hit?: number | null
435
+ total_score?: number | null
436
+ uid?: string | null
437
+ username?: string | null
438
+ verified?: boolean | null
439
+ }
440
+ Update: {
441
+ about_me?: string | null
442
+ avatar_url?: string | null
443
+ badges?: Json | null
444
+ ban?: Database["public"]["Enums"]["banTypes"] | null
445
+ bannedAt?: number | null
446
+ clan?: number | null
447
+ computedUsername?: string | null
448
+ created_at?: number | null
449
+ flag?: string | null
450
+ id?: number
451
+ mu_rank?: number
452
+ play_count?: number | null
453
+ profile_image?: string | null
454
+ sigma_rank?: number | null
455
+ skill_points?: number | null
456
+ spin_skill_points?: number
457
+ squares_hit?: number | null
458
+ total_score?: number | null
459
+ uid?: string | null
460
+ username?: string | null
461
+ verified?: boolean | null
462
+ }
463
+ Relationships: [
464
+ {
465
+ foreignKeyName: "profiles_clan_fkey"
466
+ columns: ["clan"]
467
+ isOneToOne: false
468
+ referencedRelation: "clans"
469
+ referencedColumns: ["id"]
470
+ },
471
+ ]
472
+ }
473
+ scores: {
474
+ Row: {
475
+ additional_data: Json
476
+ awarded_sp: number | null
477
+ beatmapHash: string | null
478
+ created_at: string
479
+ id: number
480
+ misses: number | null
481
+ mods: Json
482
+ passed: boolean | null
483
+ replayHwid: string | null
484
+ songId: string | null
485
+ speed: number | null
486
+ spin: boolean
487
+ userId: number | null
488
+ }
489
+ Insert: {
490
+ additional_data?: Json
491
+ awarded_sp?: number | null
492
+ beatmapHash?: string | null
493
+ created_at?: string
494
+ id?: number
495
+ misses?: number | null
496
+ mods?: Json
497
+ passed?: boolean | null
498
+ replayHwid?: string | null
499
+ songId?: string | null
500
+ speed?: number | null
501
+ spin?: boolean
502
+ userId?: number | null
503
+ }
504
+ Update: {
505
+ additional_data?: Json
506
+ awarded_sp?: number | null
507
+ beatmapHash?: string | null
508
+ created_at?: string
509
+ id?: number
510
+ misses?: number | null
511
+ mods?: Json
512
+ passed?: boolean | null
513
+ replayHwid?: string | null
514
+ songId?: string | null
515
+ speed?: number | null
516
+ spin?: boolean
517
+ userId?: number | null
518
+ }
519
+ Relationships: [
520
+ {
521
+ foreignKeyName: "scores_beatmapHash_fkey"
522
+ columns: ["beatmapHash"]
523
+ isOneToOne: false
524
+ referencedRelation: "beatmaps"
525
+ referencedColumns: ["beatmapHash"]
526
+ },
527
+ {
528
+ foreignKeyName: "scores_userId_fkey"
529
+ columns: ["userId"]
530
+ isOneToOne: false
531
+ referencedRelation: "profiles"
532
+ referencedColumns: ["id"]
533
+ },
534
+ ]
535
+ }
536
+ }
537
+ Views: {
538
+ [_ in never]: never
539
+ }
540
+ Functions: {
541
+ get_clan_leaderboard: {
542
+ Args: {
543
+ page_number?: number
544
+ items_per_page?: number
545
+ }
546
+ Returns: {
547
+ id: number
548
+ name: string
549
+ acronym: string
550
+ avatar_url: string
551
+ description: string
552
+ member_count: number
553
+ total_skill_points: number
554
+ total_pages: number
555
+ }[]
556
+ }
557
+ get_collections_v1: {
558
+ Args: {
559
+ page_number?: number
560
+ items_per_page?: number
561
+ }
562
+ Returns: {
563
+ id: number
564
+ title: string
565
+ description: string
566
+ created_at: string
567
+ owner: number
568
+ beatmap_count: number
569
+ star1: number
570
+ star2: number
571
+ star3: number
572
+ star4: number
573
+ star5: number
574
+ star6: number
575
+ star7: number
576
+ star8: number
577
+ star9: number
578
+ star10: number
579
+ star11: number
580
+ star12: number
581
+ star13: number
582
+ star14: number
583
+ star15: number
584
+ star16: number
585
+ star17: number
586
+ star18: number
587
+ total_pages: number
588
+ }[]
589
+ }
590
+ get_collections_v2:
591
+ | {
592
+ Args: {
593
+ page_number?: number
594
+ items_per_page?: number
595
+ }
596
+ Returns: {
597
+ id: number
598
+ title: string
599
+ description: string
600
+ created_at: string
601
+ owner: number
602
+ owner_username: string
603
+ owner_avatar_url: string
604
+ beatmap_count: number
605
+ star1: number
606
+ star2: number
607
+ star3: number
608
+ star4: number
609
+ star5: number
610
+ star6: number
611
+ star7: number
612
+ star8: number
613
+ star9: number
614
+ star10: number
615
+ star11: number
616
+ star12: number
617
+ star13: number
618
+ star14: number
619
+ star15: number
620
+ star16: number
621
+ star17: number
622
+ star18: number
623
+ total_pages: number
624
+ }[]
625
+ }
626
+ | {
627
+ Args: {
628
+ page_number?: number
629
+ items_per_page?: number
630
+ owner_filter?: number
631
+ }
632
+ Returns: {
633
+ id: number
634
+ title: string
635
+ description: string
636
+ created_at: string
637
+ owner: number
638
+ owner_username: string
639
+ owner_avatar_url: string
640
+ beatmap_count: number
641
+ star1: number
642
+ star2: number
643
+ star3: number
644
+ star4: number
645
+ star5: number
646
+ star6: number
647
+ star7: number
648
+ star8: number
649
+ star9: number
650
+ star10: number
651
+ star11: number
652
+ star12: number
653
+ star13: number
654
+ star14: number
655
+ star15: number
656
+ star16: number
657
+ star17: number
658
+ star18: number
659
+ total_pages: number
660
+ }[]
661
+ }
662
+ get_collections_v3: {
663
+ Args: {
664
+ page_number?: number
665
+ items_per_page?: number
666
+ owner_filter?: number
667
+ }
668
+ Returns: {
669
+ id: number
670
+ title: string
671
+ description: string
672
+ created_at: string
673
+ owner: number
674
+ owner_username: string
675
+ owner_avatar_url: string
676
+ beatmap_count: number
677
+ star1: number
678
+ star2: number
679
+ star3: number
680
+ star4: number
681
+ star5: number
682
+ star6: number
683
+ star7: number
684
+ star8: number
685
+ star9: number
686
+ star10: number
687
+ star11: number
688
+ star12: number
689
+ star13: number
690
+ star14: number
691
+ star15: number
692
+ star16: number
693
+ star17: number
694
+ star18: number
695
+ total_pages: number
696
+ }[]
697
+ }
698
+ get_collections_v4: {
699
+ Args: {
700
+ page_number?: number
701
+ items_per_page?: number
702
+ owner_filter?: number
703
+ search_query?: string
704
+ author_filter?: string
705
+ min_beatmaps?: number
706
+ }
707
+ Returns: {
708
+ id: number
709
+ title: string
710
+ description: string
711
+ created_at: string
712
+ owner: number
713
+ owner_username: string
714
+ owner_avatar_url: string
715
+ beatmap_count: number
716
+ star1: number
717
+ star2: number
718
+ star3: number
719
+ star4: number
720
+ star5: number
721
+ star6: number
722
+ star7: number
723
+ star8: number
724
+ star9: number
725
+ star10: number
726
+ star11: number
727
+ star12: number
728
+ star13: number
729
+ star14: number
730
+ star15: number
731
+ star16: number
732
+ star17: number
733
+ star18: number
734
+ total_pages: number
735
+ }[]
736
+ }
737
+ }
738
+ Enums: {
739
+ banTypes: "cool" | "silenced" | "restricted" | "excluded"
740
+ discordWebhookType: "maps" | "scores"
741
+ }
742
+ CompositeTypes: {
743
+ [_ in never]: never
744
+ }
745
+ }
746
+ }
747
+
748
+ type PublicSchema = Database[Extract<keyof Database, "public">]
749
+
750
+ export type Tables<
751
+ PublicTableNameOrOptions extends
752
+ | keyof (PublicSchema["Tables"] & PublicSchema["Views"])
753
+ | { schema: keyof Database },
754
+ TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
755
+ ? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
756
+ Database[PublicTableNameOrOptions["schema"]]["Views"])
757
+ : never = never,
758
+ > = PublicTableNameOrOptions extends { schema: keyof Database }
759
+ ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
760
+ Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
761
+ Row: infer R
762
+ }
763
+ ? R
764
+ : never
765
+ : PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] &
766
+ PublicSchema["Views"])
767
+ ? (PublicSchema["Tables"] &
768
+ PublicSchema["Views"])[PublicTableNameOrOptions] extends {
769
+ Row: infer R
770
+ }
771
+ ? R
772
+ : never
773
+ : never
774
+
775
+ export type TablesInsert<
776
+ PublicTableNameOrOptions extends
777
+ | keyof PublicSchema["Tables"]
778
+ | { schema: keyof Database },
779
+ TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
780
+ ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
781
+ : never = never,
782
+ > = PublicTableNameOrOptions extends { schema: keyof Database }
783
+ ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
784
+ Insert: infer I
785
+ }
786
+ ? I
787
+ : never
788
+ : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
789
+ ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
790
+ Insert: infer I
791
+ }
792
+ ? I
793
+ : never
794
+ : never
795
+
796
+ export type TablesUpdate<
797
+ PublicTableNameOrOptions extends
798
+ | keyof PublicSchema["Tables"]
799
+ | { schema: keyof Database },
800
+ TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
801
+ ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
802
+ : never = never,
803
+ > = PublicTableNameOrOptions extends { schema: keyof Database }
804
+ ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
805
+ Update: infer U
806
+ }
807
+ ? U
808
+ : never
809
+ : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
810
+ ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
811
+ Update: infer U
812
+ }
813
+ ? U
814
+ : never
815
+ : never
816
+
817
+ export type Enums<
818
+ PublicEnumNameOrOptions extends
819
+ | keyof PublicSchema["Enums"]
820
+ | { schema: keyof Database },
821
+ EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
822
+ ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
823
+ : never = never,
824
+ > = PublicEnumNameOrOptions extends { schema: keyof Database }
825
+ ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
826
+ : PublicEnumNameOrOptions extends keyof PublicSchema["Enums"]
827
+ ? PublicSchema["Enums"][PublicEnumNameOrOptions]
828
+ : never
829
+
830
+ export type CompositeTypes<
831
+ PublicCompositeTypeNameOrOptions extends
832
+ | keyof PublicSchema["CompositeTypes"]
833
+ | { schema: keyof Database },
834
+ CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
835
+ schema: keyof Database
836
+ }
837
+ ? keyof Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"]
838
+ : never = never,
839
+ > = PublicCompositeTypeNameOrOptions extends { schema: keyof Database }
840
+ ? Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName]
841
+ : PublicCompositeTypeNameOrOptions extends keyof PublicSchema["CompositeTypes"]
842
+ ? PublicSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions]
843
+ : never