@koloseum/types 0.2.3 → 0.2.5

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.
@@ -2,6 +2,1732 @@ export type Json = string | number | boolean | null | {
2
2
  [key: string]: Json | undefined;
3
3
  } | Json[];
4
4
  export type Database = {
5
+ competitions: {
6
+ Tables: {
7
+ base_matches: {
8
+ Row: {
9
+ created_at: string | null;
10
+ id: string;
11
+ metadata: Json | null;
12
+ set_id: string;
13
+ };
14
+ Insert: {
15
+ created_at?: string | null;
16
+ id?: string;
17
+ metadata?: Json | null;
18
+ set_id: string;
19
+ };
20
+ Update: {
21
+ created_at?: string | null;
22
+ id?: string;
23
+ metadata?: Json | null;
24
+ set_id?: string;
25
+ };
26
+ Relationships: [
27
+ {
28
+ foreignKeyName: "base_matches_set_id_fkey";
29
+ columns: ["set_id"];
30
+ isOneToOne: false;
31
+ referencedRelation: "sets";
32
+ referencedColumns: ["id"];
33
+ }
34
+ ];
35
+ };
36
+ challenges: {
37
+ Row: {
38
+ created_at: string | null;
39
+ created_by: string;
40
+ description: string | null;
41
+ id: string;
42
+ metadata: Json | null;
43
+ name: string;
44
+ participant_type: Database["competitions"]["Enums"]["event_participant_type"];
45
+ };
46
+ Insert: {
47
+ created_at?: string | null;
48
+ created_by: string;
49
+ description?: string | null;
50
+ id?: string;
51
+ metadata?: Json | null;
52
+ name: string;
53
+ participant_type: Database["competitions"]["Enums"]["event_participant_type"];
54
+ };
55
+ Update: {
56
+ created_at?: string | null;
57
+ created_by?: string;
58
+ description?: string | null;
59
+ id?: string;
60
+ metadata?: Json | null;
61
+ name?: string;
62
+ participant_type?: Database["competitions"]["Enums"]["event_participant_type"];
63
+ };
64
+ Relationships: [];
65
+ };
66
+ challenges_divisions: {
67
+ Row: {
68
+ created_at: string | null;
69
+ description: string | null;
70
+ discontinued_at: string | null;
71
+ id: string;
72
+ metadata: Json | null;
73
+ name: string;
74
+ tier_id: string;
75
+ };
76
+ Insert: {
77
+ created_at?: string | null;
78
+ description?: string | null;
79
+ discontinued_at?: string | null;
80
+ id?: string;
81
+ metadata?: Json | null;
82
+ name: string;
83
+ tier_id: string;
84
+ };
85
+ Update: {
86
+ created_at?: string | null;
87
+ description?: string | null;
88
+ discontinued_at?: string | null;
89
+ id?: string;
90
+ metadata?: Json | null;
91
+ name?: string;
92
+ tier_id?: string;
93
+ };
94
+ Relationships: [
95
+ {
96
+ foreignKeyName: "challenges_divisions_tier_id_fkey";
97
+ columns: ["tier_id"];
98
+ isOneToOne: false;
99
+ referencedRelation: "challenges_tiers";
100
+ referencedColumns: ["id"];
101
+ }
102
+ ];
103
+ };
104
+ challenges_edition_participants: {
105
+ Row: {
106
+ created_at: string | null;
107
+ disqualification_reason: string | null;
108
+ disqualified_at: string | null;
109
+ edition_id: string;
110
+ id: string;
111
+ metadata: Json | null;
112
+ player_id: string | null;
113
+ team_id: string | null;
114
+ };
115
+ Insert: {
116
+ created_at?: string | null;
117
+ disqualification_reason?: string | null;
118
+ disqualified_at?: string | null;
119
+ edition_id: string;
120
+ id?: string;
121
+ metadata?: Json | null;
122
+ player_id?: string | null;
123
+ team_id?: string | null;
124
+ };
125
+ Update: {
126
+ created_at?: string | null;
127
+ disqualification_reason?: string | null;
128
+ disqualified_at?: string | null;
129
+ edition_id?: string;
130
+ id?: string;
131
+ metadata?: Json | null;
132
+ player_id?: string | null;
133
+ team_id?: string | null;
134
+ };
135
+ Relationships: [
136
+ {
137
+ foreignKeyName: "challenges_edition_participants_edition_id_fkey";
138
+ columns: ["edition_id"];
139
+ isOneToOne: false;
140
+ referencedRelation: "challenges_editions";
141
+ referencedColumns: ["id"];
142
+ }
143
+ ];
144
+ };
145
+ challenges_editions: {
146
+ Row: {
147
+ created_at: string | null;
148
+ description: string | null;
149
+ division_id: string;
150
+ edition_order: number;
151
+ end_time: string | null;
152
+ id: string;
153
+ metadata: Json | null;
154
+ name: string;
155
+ start_time: string;
156
+ venue: Json;
157
+ };
158
+ Insert: {
159
+ created_at?: string | null;
160
+ description?: string | null;
161
+ division_id: string;
162
+ edition_order: number;
163
+ end_time?: string | null;
164
+ id?: string;
165
+ metadata?: Json | null;
166
+ name: string;
167
+ start_time: string;
168
+ venue: Json;
169
+ };
170
+ Update: {
171
+ created_at?: string | null;
172
+ description?: string | null;
173
+ division_id?: string;
174
+ edition_order?: number;
175
+ end_time?: string | null;
176
+ id?: string;
177
+ metadata?: Json | null;
178
+ name?: string;
179
+ start_time?: string;
180
+ venue?: Json;
181
+ };
182
+ Relationships: [
183
+ {
184
+ foreignKeyName: "challenges_editions_division_id_fkey";
185
+ columns: ["division_id"];
186
+ isOneToOne: false;
187
+ referencedRelation: "challenges_divisions";
188
+ referencedColumns: ["id"];
189
+ }
190
+ ];
191
+ };
192
+ challenges_organisers: {
193
+ Row: {
194
+ challenges_id: string;
195
+ created_at: string;
196
+ organiser_id: string;
197
+ };
198
+ Insert: {
199
+ challenges_id: string;
200
+ created_at?: string;
201
+ organiser_id: string;
202
+ };
203
+ Update: {
204
+ challenges_id?: string;
205
+ created_at?: string;
206
+ organiser_id?: string;
207
+ };
208
+ Relationships: [
209
+ {
210
+ foreignKeyName: "challenges_organisers_challenges_id_fkey";
211
+ columns: ["challenges_id"];
212
+ isOneToOne: false;
213
+ referencedRelation: "challenges";
214
+ referencedColumns: ["id"];
215
+ }
216
+ ];
217
+ };
218
+ challenges_organisers_staff: {
219
+ Row: {
220
+ challenges_id: string;
221
+ created_at: string;
222
+ organiser_id: string;
223
+ permission: string;
224
+ user_id: string;
225
+ };
226
+ Insert: {
227
+ challenges_id: string;
228
+ created_at?: string;
229
+ organiser_id: string;
230
+ permission: string;
231
+ user_id: string;
232
+ };
233
+ Update: {
234
+ challenges_id?: string;
235
+ created_at?: string;
236
+ organiser_id?: string;
237
+ permission?: string;
238
+ user_id?: string;
239
+ };
240
+ Relationships: [
241
+ {
242
+ foreignKeyName: "challenges_organisers_staff_challenges_id_fkey";
243
+ columns: ["challenges_id"];
244
+ isOneToOne: false;
245
+ referencedRelation: "challenges";
246
+ referencedColumns: ["id"];
247
+ }
248
+ ];
249
+ };
250
+ challenges_phases: {
251
+ Row: {
252
+ created_at: string | null;
253
+ edition_id: string;
254
+ end_time: string | null;
255
+ event_id: string;
256
+ id: string;
257
+ metadata: Json | null;
258
+ name: string;
259
+ phase_order: number | null;
260
+ start_time: string | null;
261
+ };
262
+ Insert: {
263
+ created_at?: string | null;
264
+ edition_id: string;
265
+ end_time?: string | null;
266
+ event_id: string;
267
+ id?: string;
268
+ metadata?: Json | null;
269
+ name: string;
270
+ phase_order?: number | null;
271
+ start_time?: string | null;
272
+ };
273
+ Update: {
274
+ created_at?: string | null;
275
+ edition_id?: string;
276
+ end_time?: string | null;
277
+ event_id?: string;
278
+ id?: string;
279
+ metadata?: Json | null;
280
+ name?: string;
281
+ phase_order?: number | null;
282
+ start_time?: string | null;
283
+ };
284
+ Relationships: [
285
+ {
286
+ foreignKeyName: "challenges_phases_edition_id_fkey";
287
+ columns: ["edition_id"];
288
+ isOneToOne: false;
289
+ referencedRelation: "challenges_editions";
290
+ referencedColumns: ["id"];
291
+ },
292
+ {
293
+ foreignKeyName: "challenges_phases_event_id_fkey";
294
+ columns: ["event_id"];
295
+ isOneToOne: false;
296
+ referencedRelation: "events";
297
+ referencedColumns: ["id"];
298
+ }
299
+ ];
300
+ };
301
+ challenges_rankings: {
302
+ Row: {
303
+ challenges_id: string;
304
+ edition_id: string;
305
+ event_id: string;
306
+ event_participant_id: string;
307
+ ranking: number;
308
+ };
309
+ Insert: {
310
+ challenges_id: string;
311
+ edition_id: string;
312
+ event_id: string;
313
+ event_participant_id: string;
314
+ ranking: number;
315
+ };
316
+ Update: {
317
+ challenges_id?: string;
318
+ edition_id?: string;
319
+ event_id?: string;
320
+ event_participant_id?: string;
321
+ ranking?: number;
322
+ };
323
+ Relationships: [
324
+ {
325
+ foreignKeyName: "challenges_rankings_challenges_id_fkey";
326
+ columns: ["challenges_id"];
327
+ isOneToOne: false;
328
+ referencedRelation: "challenges";
329
+ referencedColumns: ["id"];
330
+ },
331
+ {
332
+ foreignKeyName: "challenges_rankings_edition_id_fkey";
333
+ columns: ["edition_id"];
334
+ isOneToOne: false;
335
+ referencedRelation: "challenges_editions";
336
+ referencedColumns: ["id"];
337
+ },
338
+ {
339
+ foreignKeyName: "challenges_rankings_event_id_fkey";
340
+ columns: ["event_id"];
341
+ isOneToOne: false;
342
+ referencedRelation: "events";
343
+ referencedColumns: ["id"];
344
+ },
345
+ {
346
+ foreignKeyName: "challenges_rankings_event_participant_id_fkey";
347
+ columns: ["event_participant_id"];
348
+ isOneToOne: false;
349
+ referencedRelation: "event_participants";
350
+ referencedColumns: ["id"];
351
+ }
352
+ ];
353
+ };
354
+ challenges_tiers: {
355
+ Row: {
356
+ challenges_id: string;
357
+ created_at: string | null;
358
+ description: string | null;
359
+ folded_at: string | null;
360
+ id: string;
361
+ metadata: Json | null;
362
+ name: string;
363
+ tier_order: number;
364
+ };
365
+ Insert: {
366
+ challenges_id: string;
367
+ created_at?: string | null;
368
+ description?: string | null;
369
+ folded_at?: string | null;
370
+ id?: string;
371
+ metadata?: Json | null;
372
+ name: string;
373
+ tier_order: number;
374
+ };
375
+ Update: {
376
+ challenges_id?: string;
377
+ created_at?: string | null;
378
+ description?: string | null;
379
+ folded_at?: string | null;
380
+ id?: string;
381
+ metadata?: Json | null;
382
+ name?: string;
383
+ tier_order?: number;
384
+ };
385
+ Relationships: [
386
+ {
387
+ foreignKeyName: "challenges_tiers_challenges_id_fkey";
388
+ columns: ["challenges_id"];
389
+ isOneToOne: false;
390
+ referencedRelation: "challenges";
391
+ referencedColumns: ["id"];
392
+ }
393
+ ];
394
+ };
395
+ competition_penalties: {
396
+ Row: {
397
+ applied_at: string;
398
+ applied_by: string;
399
+ challenges_id: string | null;
400
+ created_at: string;
401
+ event_id: string | null;
402
+ event_participant_id: string | null;
403
+ expires_at: string | null;
404
+ id: string;
405
+ league_id: string | null;
406
+ locals_tournament_id: string | null;
407
+ metadata: Json | null;
408
+ penalty_amount: number | null;
409
+ penalty_type: string;
410
+ player_id: string | null;
411
+ reason: string;
412
+ team_id: string | null;
413
+ };
414
+ Insert: {
415
+ applied_at?: string;
416
+ applied_by: string;
417
+ challenges_id?: string | null;
418
+ created_at?: string;
419
+ event_id?: string | null;
420
+ event_participant_id?: string | null;
421
+ expires_at?: string | null;
422
+ id?: string;
423
+ league_id?: string | null;
424
+ locals_tournament_id?: string | null;
425
+ metadata?: Json | null;
426
+ penalty_amount?: number | null;
427
+ penalty_type: string;
428
+ player_id?: string | null;
429
+ reason: string;
430
+ team_id?: string | null;
431
+ };
432
+ Update: {
433
+ applied_at?: string;
434
+ applied_by?: string;
435
+ challenges_id?: string | null;
436
+ created_at?: string;
437
+ event_id?: string | null;
438
+ event_participant_id?: string | null;
439
+ expires_at?: string | null;
440
+ id?: string;
441
+ league_id?: string | null;
442
+ locals_tournament_id?: string | null;
443
+ metadata?: Json | null;
444
+ penalty_amount?: number | null;
445
+ penalty_type?: string;
446
+ player_id?: string | null;
447
+ reason?: string;
448
+ team_id?: string | null;
449
+ };
450
+ Relationships: [
451
+ {
452
+ foreignKeyName: "competition_penalties_challenges_id_fkey";
453
+ columns: ["challenges_id"];
454
+ isOneToOne: false;
455
+ referencedRelation: "challenges";
456
+ referencedColumns: ["id"];
457
+ },
458
+ {
459
+ foreignKeyName: "competition_penalties_event_id_fkey";
460
+ columns: ["event_id"];
461
+ isOneToOne: false;
462
+ referencedRelation: "events";
463
+ referencedColumns: ["id"];
464
+ },
465
+ {
466
+ foreignKeyName: "competition_penalties_event_participant_id_fkey";
467
+ columns: ["event_participant_id"];
468
+ isOneToOne: false;
469
+ referencedRelation: "event_participants";
470
+ referencedColumns: ["id"];
471
+ },
472
+ {
473
+ foreignKeyName: "competition_penalties_league_id_fkey";
474
+ columns: ["league_id"];
475
+ isOneToOne: false;
476
+ referencedRelation: "leagues";
477
+ referencedColumns: ["id"];
478
+ },
479
+ {
480
+ foreignKeyName: "competition_penalties_locals_tournament_id_fkey";
481
+ columns: ["locals_tournament_id"];
482
+ isOneToOne: false;
483
+ referencedRelation: "locals_tournaments";
484
+ referencedColumns: ["id"];
485
+ }
486
+ ];
487
+ };
488
+ event_participants: {
489
+ Row: {
490
+ checked_in_at: string | null;
491
+ created_at: string | null;
492
+ disqualification_reason: string | null;
493
+ disqualified_at: string | null;
494
+ event_id: string;
495
+ id: string;
496
+ metadata: Json | null;
497
+ participant_type: Database["competitions"]["Enums"]["event_participant_type"];
498
+ player_id: string | null;
499
+ team_id: string | null;
500
+ };
501
+ Insert: {
502
+ checked_in_at?: string | null;
503
+ created_at?: string | null;
504
+ disqualification_reason?: string | null;
505
+ disqualified_at?: string | null;
506
+ event_id: string;
507
+ id?: string;
508
+ metadata?: Json | null;
509
+ participant_type: Database["competitions"]["Enums"]["event_participant_type"];
510
+ player_id?: string | null;
511
+ team_id?: string | null;
512
+ };
513
+ Update: {
514
+ checked_in_at?: string | null;
515
+ created_at?: string | null;
516
+ disqualification_reason?: string | null;
517
+ disqualified_at?: string | null;
518
+ event_id?: string;
519
+ id?: string;
520
+ metadata?: Json | null;
521
+ participant_type?: Database["competitions"]["Enums"]["event_participant_type"];
522
+ player_id?: string | null;
523
+ team_id?: string | null;
524
+ };
525
+ Relationships: [
526
+ {
527
+ foreignKeyName: "event_participants_event_id_fkey";
528
+ columns: ["event_id"];
529
+ isOneToOne: false;
530
+ referencedRelation: "events";
531
+ referencedColumns: ["id"];
532
+ }
533
+ ];
534
+ };
535
+ events: {
536
+ Row: {
537
+ challenges_edition_id: string | null;
538
+ check_in_buffer: unknown | null;
539
+ check_in_duration: unknown | null;
540
+ console_id: string | null;
541
+ created_at: string | null;
542
+ description: string | null;
543
+ end_time: string | null;
544
+ game_id: string | null;
545
+ game_title: string | null;
546
+ id: string;
547
+ is_online: boolean | null;
548
+ league_tournament_id: string | null;
549
+ locals_tournament_id: string | null;
550
+ lounge_branch_id: string | null;
551
+ metadata: Json | null;
552
+ name: string;
553
+ participant_type: Database["competitions"]["Enums"]["event_participant_type"];
554
+ start_time: string | null;
555
+ status: Database["competitions"]["Enums"]["event_status"] | null;
556
+ venue: Json | null;
557
+ };
558
+ Insert: {
559
+ challenges_edition_id?: string | null;
560
+ check_in_buffer?: unknown | null;
561
+ check_in_duration?: unknown | null;
562
+ console_id?: string | null;
563
+ created_at?: string | null;
564
+ description?: string | null;
565
+ end_time?: string | null;
566
+ game_id?: string | null;
567
+ game_title?: string | null;
568
+ id?: string;
569
+ is_online?: boolean | null;
570
+ league_tournament_id?: string | null;
571
+ locals_tournament_id?: string | null;
572
+ lounge_branch_id?: string | null;
573
+ metadata?: Json | null;
574
+ name: string;
575
+ participant_type: Database["competitions"]["Enums"]["event_participant_type"];
576
+ start_time?: string | null;
577
+ status?: Database["competitions"]["Enums"]["event_status"] | null;
578
+ venue?: Json | null;
579
+ };
580
+ Update: {
581
+ challenges_edition_id?: string | null;
582
+ check_in_buffer?: unknown | null;
583
+ check_in_duration?: unknown | null;
584
+ console_id?: string | null;
585
+ created_at?: string | null;
586
+ description?: string | null;
587
+ end_time?: string | null;
588
+ game_id?: string | null;
589
+ game_title?: string | null;
590
+ id?: string;
591
+ is_online?: boolean | null;
592
+ league_tournament_id?: string | null;
593
+ locals_tournament_id?: string | null;
594
+ lounge_branch_id?: string | null;
595
+ metadata?: Json | null;
596
+ name?: string;
597
+ participant_type?: Database["competitions"]["Enums"]["event_participant_type"];
598
+ start_time?: string | null;
599
+ status?: Database["competitions"]["Enums"]["event_status"] | null;
600
+ venue?: Json | null;
601
+ };
602
+ Relationships: [
603
+ {
604
+ foreignKeyName: "events_challenges_edition_id_fkey";
605
+ columns: ["challenges_edition_id"];
606
+ isOneToOne: false;
607
+ referencedRelation: "challenges_editions";
608
+ referencedColumns: ["id"];
609
+ },
610
+ {
611
+ foreignKeyName: "events_league_tournament_id_fkey";
612
+ columns: ["league_tournament_id"];
613
+ isOneToOne: false;
614
+ referencedRelation: "league_tournaments";
615
+ referencedColumns: ["id"];
616
+ },
617
+ {
618
+ foreignKeyName: "events_locals_tournament_id_fkey";
619
+ columns: ["locals_tournament_id"];
620
+ isOneToOne: false;
621
+ referencedRelation: "locals_tournaments";
622
+ referencedColumns: ["id"];
623
+ }
624
+ ];
625
+ };
626
+ external_providers: {
627
+ Row: {
628
+ created_at: string | null;
629
+ metadata: Json | null;
630
+ provider: string;
631
+ provider_id: string;
632
+ user_id: string;
633
+ };
634
+ Insert: {
635
+ created_at?: string | null;
636
+ metadata?: Json | null;
637
+ provider: string;
638
+ provider_id: string;
639
+ user_id: string;
640
+ };
641
+ Update: {
642
+ created_at?: string | null;
643
+ metadata?: Json | null;
644
+ provider?: string;
645
+ provider_id?: string;
646
+ user_id?: string;
647
+ };
648
+ Relationships: [];
649
+ };
650
+ fighting_game_match_rounds: {
651
+ Row: {
652
+ created_at: string | null;
653
+ duration: unknown | null;
654
+ fighting_game_match_id: string;
655
+ metadata: Json | null;
656
+ round_number: number;
657
+ winner_id: string | null;
658
+ };
659
+ Insert: {
660
+ created_at?: string | null;
661
+ duration?: unknown | null;
662
+ fighting_game_match_id: string;
663
+ metadata?: Json | null;
664
+ round_number: number;
665
+ winner_id?: string | null;
666
+ };
667
+ Update: {
668
+ created_at?: string | null;
669
+ duration?: unknown | null;
670
+ fighting_game_match_id?: string;
671
+ metadata?: Json | null;
672
+ round_number?: number;
673
+ winner_id?: string | null;
674
+ };
675
+ Relationships: [
676
+ {
677
+ foreignKeyName: "fighting_game_match_rounds_fighting_game_match_id_fkey";
678
+ columns: ["fighting_game_match_id"];
679
+ isOneToOne: false;
680
+ referencedRelation: "fighting_game_matches";
681
+ referencedColumns: ["id"];
682
+ },
683
+ {
684
+ foreignKeyName: "fighting_game_match_rounds_winner_id_fkey";
685
+ columns: ["winner_id"];
686
+ isOneToOne: false;
687
+ referencedRelation: "event_participants";
688
+ referencedColumns: ["id"];
689
+ }
690
+ ];
691
+ };
692
+ fighting_game_matches: {
693
+ Row: {
694
+ characters1_ids: string[];
695
+ characters2_ids: string[];
696
+ created_at: string | null;
697
+ generic_match_id: string;
698
+ id: string;
699
+ };
700
+ Insert: {
701
+ characters1_ids: string[];
702
+ characters2_ids: string[];
703
+ created_at?: string | null;
704
+ generic_match_id: string;
705
+ id?: string;
706
+ };
707
+ Update: {
708
+ characters1_ids?: string[];
709
+ characters2_ids?: string[];
710
+ created_at?: string | null;
711
+ generic_match_id?: string;
712
+ id?: string;
713
+ };
714
+ Relationships: [
715
+ {
716
+ foreignKeyName: "fighting_game_matches_generic_match_id_fkey";
717
+ columns: ["generic_match_id"];
718
+ isOneToOne: false;
719
+ referencedRelation: "generic_matches";
720
+ referencedColumns: ["id"];
721
+ }
722
+ ];
723
+ };
724
+ football_match_goals: {
725
+ Row: {
726
+ created_at: string | null;
727
+ generic_match_id: string;
728
+ goal_number: number;
729
+ scorer_id: string;
730
+ time_scored: unknown;
731
+ };
732
+ Insert: {
733
+ created_at?: string | null;
734
+ generic_match_id: string;
735
+ goal_number: number;
736
+ scorer_id: string;
737
+ time_scored: unknown;
738
+ };
739
+ Update: {
740
+ created_at?: string | null;
741
+ generic_match_id?: string;
742
+ goal_number?: number;
743
+ scorer_id?: string;
744
+ time_scored?: unknown;
745
+ };
746
+ Relationships: [
747
+ {
748
+ foreignKeyName: "football_match_goals_generic_match_id_fkey";
749
+ columns: ["generic_match_id"];
750
+ isOneToOne: false;
751
+ referencedRelation: "generic_matches";
752
+ referencedColumns: ["id"];
753
+ },
754
+ {
755
+ foreignKeyName: "football_match_goals_scorer_id_fkey";
756
+ columns: ["scorer_id"];
757
+ isOneToOne: false;
758
+ referencedRelation: "event_participants";
759
+ referencedColumns: ["id"];
760
+ }
761
+ ];
762
+ };
763
+ generic_matches: {
764
+ Row: {
765
+ base_match_id: string;
766
+ created_at: string | null;
767
+ id: string;
768
+ participant1_id: string;
769
+ participant2_id: string;
770
+ score1: number;
771
+ score2: number;
772
+ winner_id: string | null;
773
+ };
774
+ Insert: {
775
+ base_match_id: string;
776
+ created_at?: string | null;
777
+ id?: string;
778
+ participant1_id: string;
779
+ participant2_id: string;
780
+ score1: number;
781
+ score2: number;
782
+ winner_id?: string | null;
783
+ };
784
+ Update: {
785
+ base_match_id?: string;
786
+ created_at?: string | null;
787
+ id?: string;
788
+ participant1_id?: string;
789
+ participant2_id?: string;
790
+ score1?: number;
791
+ score2?: number;
792
+ winner_id?: string | null;
793
+ };
794
+ Relationships: [
795
+ {
796
+ foreignKeyName: "generic_matches_base_match_id_fkey";
797
+ columns: ["base_match_id"];
798
+ isOneToOne: false;
799
+ referencedRelation: "base_matches";
800
+ referencedColumns: ["id"];
801
+ },
802
+ {
803
+ foreignKeyName: "generic_matches_participant1_id_fkey";
804
+ columns: ["participant1_id"];
805
+ isOneToOne: false;
806
+ referencedRelation: "event_participants";
807
+ referencedColumns: ["id"];
808
+ },
809
+ {
810
+ foreignKeyName: "generic_matches_participant2_id_fkey";
811
+ columns: ["participant2_id"];
812
+ isOneToOne: false;
813
+ referencedRelation: "event_participants";
814
+ referencedColumns: ["id"];
815
+ },
816
+ {
817
+ foreignKeyName: "generic_matches_winner_id_fkey";
818
+ columns: ["winner_id"];
819
+ isOneToOne: false;
820
+ referencedRelation: "event_participants";
821
+ referencedColumns: ["id"];
822
+ }
823
+ ];
824
+ };
825
+ league_divisions: {
826
+ Row: {
827
+ created_at: string;
828
+ description: string | null;
829
+ discontinued_at: string | null;
830
+ id: string;
831
+ metadata: Json | null;
832
+ name: string;
833
+ tier_id: string;
834
+ };
835
+ Insert: {
836
+ created_at?: string;
837
+ description?: string | null;
838
+ discontinued_at?: string | null;
839
+ id?: string;
840
+ metadata?: Json | null;
841
+ name: string;
842
+ tier_id: string;
843
+ };
844
+ Update: {
845
+ created_at?: string;
846
+ description?: string | null;
847
+ discontinued_at?: string | null;
848
+ id?: string;
849
+ metadata?: Json | null;
850
+ name?: string;
851
+ tier_id?: string;
852
+ };
853
+ Relationships: [
854
+ {
855
+ foreignKeyName: "league_divisions_tier_id_fkey";
856
+ columns: ["tier_id"];
857
+ isOneToOne: false;
858
+ referencedRelation: "league_tiers";
859
+ referencedColumns: ["id"];
860
+ }
861
+ ];
862
+ };
863
+ league_promotion_relegation_rules: {
864
+ Row: {
865
+ conditions: Json | null;
866
+ created_at: string;
867
+ description: string | null;
868
+ id: string;
869
+ league_id: string;
870
+ promotion_count: number | null;
871
+ relegation_count: number | null;
872
+ };
873
+ Insert: {
874
+ conditions?: Json | null;
875
+ created_at?: string;
876
+ description?: string | null;
877
+ id?: string;
878
+ league_id: string;
879
+ promotion_count?: number | null;
880
+ relegation_count?: number | null;
881
+ };
882
+ Update: {
883
+ conditions?: Json | null;
884
+ created_at?: string;
885
+ description?: string | null;
886
+ id?: string;
887
+ league_id?: string;
888
+ promotion_count?: number | null;
889
+ relegation_count?: number | null;
890
+ };
891
+ Relationships: [
892
+ {
893
+ foreignKeyName: "league_promotion_relegation_rules_league_id_fkey";
894
+ columns: ["league_id"];
895
+ isOneToOne: false;
896
+ referencedRelation: "leagues";
897
+ referencedColumns: ["id"];
898
+ }
899
+ ];
900
+ };
901
+ league_rankings: {
902
+ Row: {
903
+ event_id: string;
904
+ event_participant_id: string;
905
+ league_id: string;
906
+ points: number;
907
+ season_id: string;
908
+ };
909
+ Insert: {
910
+ event_id: string;
911
+ event_participant_id: string;
912
+ league_id: string;
913
+ points?: number;
914
+ season_id: string;
915
+ };
916
+ Update: {
917
+ event_id?: string;
918
+ event_participant_id?: string;
919
+ league_id?: string;
920
+ points?: number;
921
+ season_id?: string;
922
+ };
923
+ Relationships: [
924
+ {
925
+ foreignKeyName: "league_rankings_event_id_fkey";
926
+ columns: ["event_id"];
927
+ isOneToOne: false;
928
+ referencedRelation: "events";
929
+ referencedColumns: ["id"];
930
+ },
931
+ {
932
+ foreignKeyName: "league_rankings_event_participant_id_fkey";
933
+ columns: ["event_participant_id"];
934
+ isOneToOne: false;
935
+ referencedRelation: "event_participants";
936
+ referencedColumns: ["id"];
937
+ },
938
+ {
939
+ foreignKeyName: "league_rankings_league_id_fkey";
940
+ columns: ["league_id"];
941
+ isOneToOne: false;
942
+ referencedRelation: "leagues";
943
+ referencedColumns: ["id"];
944
+ },
945
+ {
946
+ foreignKeyName: "league_rankings_season_id_fkey";
947
+ columns: ["season_id"];
948
+ isOneToOne: false;
949
+ referencedRelation: "league_seasons";
950
+ referencedColumns: ["id"];
951
+ }
952
+ ];
953
+ };
954
+ league_season_participants: {
955
+ Row: {
956
+ created_at: string | null;
957
+ disqualification_reason: string | null;
958
+ disqualified_at: string | null;
959
+ id: string;
960
+ metadata: Json | null;
961
+ player_id: string | null;
962
+ season_id: string;
963
+ team_id: string | null;
964
+ };
965
+ Insert: {
966
+ created_at?: string | null;
967
+ disqualification_reason?: string | null;
968
+ disqualified_at?: string | null;
969
+ id?: string;
970
+ metadata?: Json | null;
971
+ player_id?: string | null;
972
+ season_id: string;
973
+ team_id?: string | null;
974
+ };
975
+ Update: {
976
+ created_at?: string | null;
977
+ disqualification_reason?: string | null;
978
+ disqualified_at?: string | null;
979
+ id?: string;
980
+ metadata?: Json | null;
981
+ player_id?: string | null;
982
+ season_id?: string;
983
+ team_id?: string | null;
984
+ };
985
+ Relationships: [
986
+ {
987
+ foreignKeyName: "league_season_participants_season_id_fkey";
988
+ columns: ["season_id"];
989
+ isOneToOne: false;
990
+ referencedRelation: "league_seasons";
991
+ referencedColumns: ["id"];
992
+ }
993
+ ];
994
+ };
995
+ league_seasons: {
996
+ Row: {
997
+ cancelled_at: string | null;
998
+ created_at: string;
999
+ description: string | null;
1000
+ division_id: string;
1001
+ end_date: string | null;
1002
+ id: string;
1003
+ metadata: Json | null;
1004
+ name: string;
1005
+ season_order: number;
1006
+ start_date: string | null;
1007
+ status: Database["competitions"]["Enums"]["event_status"] | null;
1008
+ suspended_at: string | null;
1009
+ };
1010
+ Insert: {
1011
+ cancelled_at?: string | null;
1012
+ created_at?: string;
1013
+ description?: string | null;
1014
+ division_id: string;
1015
+ end_date?: string | null;
1016
+ id?: string;
1017
+ metadata?: Json | null;
1018
+ name: string;
1019
+ season_order: number;
1020
+ start_date?: string | null;
1021
+ status?: Database["competitions"]["Enums"]["event_status"] | null;
1022
+ suspended_at?: string | null;
1023
+ };
1024
+ Update: {
1025
+ cancelled_at?: string | null;
1026
+ created_at?: string;
1027
+ description?: string | null;
1028
+ division_id?: string;
1029
+ end_date?: string | null;
1030
+ id?: string;
1031
+ metadata?: Json | null;
1032
+ name?: string;
1033
+ season_order?: number;
1034
+ start_date?: string | null;
1035
+ status?: Database["competitions"]["Enums"]["event_status"] | null;
1036
+ suspended_at?: string | null;
1037
+ };
1038
+ Relationships: [
1039
+ {
1040
+ foreignKeyName: "league_seasons_division_id_fkey";
1041
+ columns: ["division_id"];
1042
+ isOneToOne: false;
1043
+ referencedRelation: "league_divisions";
1044
+ referencedColumns: ["id"];
1045
+ }
1046
+ ];
1047
+ };
1048
+ league_tiers: {
1049
+ Row: {
1050
+ created_at: string;
1051
+ description: string | null;
1052
+ discontinued_at: string | null;
1053
+ id: string;
1054
+ league_id: string;
1055
+ metadata: Json | null;
1056
+ name: string;
1057
+ tier_order: number;
1058
+ };
1059
+ Insert: {
1060
+ created_at?: string;
1061
+ description?: string | null;
1062
+ discontinued_at?: string | null;
1063
+ id?: string;
1064
+ league_id: string;
1065
+ metadata?: Json | null;
1066
+ name: string;
1067
+ tier_order: number;
1068
+ };
1069
+ Update: {
1070
+ created_at?: string;
1071
+ description?: string | null;
1072
+ discontinued_at?: string | null;
1073
+ id?: string;
1074
+ league_id?: string;
1075
+ metadata?: Json | null;
1076
+ name?: string;
1077
+ tier_order?: number;
1078
+ };
1079
+ Relationships: [
1080
+ {
1081
+ foreignKeyName: "league_tiers_league_id_fkey";
1082
+ columns: ["league_id"];
1083
+ isOneToOne: false;
1084
+ referencedRelation: "leagues";
1085
+ referencedColumns: ["id"];
1086
+ }
1087
+ ];
1088
+ };
1089
+ league_tournaments: {
1090
+ Row: {
1091
+ created_at: string;
1092
+ description: string | null;
1093
+ end_time: string | null;
1094
+ id: string;
1095
+ metadata: Json | null;
1096
+ name: string;
1097
+ season_id: string;
1098
+ start_time: string;
1099
+ venue: Json;
1100
+ };
1101
+ Insert: {
1102
+ created_at?: string;
1103
+ description?: string | null;
1104
+ end_time?: string | null;
1105
+ id?: string;
1106
+ metadata?: Json | null;
1107
+ name: string;
1108
+ season_id: string;
1109
+ start_time: string;
1110
+ venue: Json;
1111
+ };
1112
+ Update: {
1113
+ created_at?: string;
1114
+ description?: string | null;
1115
+ end_time?: string | null;
1116
+ id?: string;
1117
+ metadata?: Json | null;
1118
+ name?: string;
1119
+ season_id?: string;
1120
+ start_time?: string;
1121
+ venue?: Json;
1122
+ };
1123
+ Relationships: [
1124
+ {
1125
+ foreignKeyName: "league_tournaments_season_id_fkey";
1126
+ columns: ["season_id"];
1127
+ isOneToOne: false;
1128
+ referencedRelation: "league_seasons";
1129
+ referencedColumns: ["id"];
1130
+ }
1131
+ ];
1132
+ };
1133
+ leagues: {
1134
+ Row: {
1135
+ created_at: string;
1136
+ created_by: string;
1137
+ description: string | null;
1138
+ id: string;
1139
+ metadata: Json | null;
1140
+ name: string;
1141
+ participant_type: Database["competitions"]["Enums"]["event_participant_type"];
1142
+ };
1143
+ Insert: {
1144
+ created_at?: string;
1145
+ created_by: string;
1146
+ description?: string | null;
1147
+ id?: string;
1148
+ metadata?: Json | null;
1149
+ name: string;
1150
+ participant_type: Database["competitions"]["Enums"]["event_participant_type"];
1151
+ };
1152
+ Update: {
1153
+ created_at?: string;
1154
+ created_by?: string;
1155
+ description?: string | null;
1156
+ id?: string;
1157
+ metadata?: Json | null;
1158
+ name?: string;
1159
+ participant_type?: Database["competitions"]["Enums"]["event_participant_type"];
1160
+ };
1161
+ Relationships: [];
1162
+ };
1163
+ leagues_organisers: {
1164
+ Row: {
1165
+ created_at: string;
1166
+ league_id: string;
1167
+ organiser_id: string;
1168
+ };
1169
+ Insert: {
1170
+ created_at?: string;
1171
+ league_id: string;
1172
+ organiser_id: string;
1173
+ };
1174
+ Update: {
1175
+ created_at?: string;
1176
+ league_id?: string;
1177
+ organiser_id?: string;
1178
+ };
1179
+ Relationships: [
1180
+ {
1181
+ foreignKeyName: "leagues_organisers_league_id_fkey";
1182
+ columns: ["league_id"];
1183
+ isOneToOne: false;
1184
+ referencedRelation: "leagues";
1185
+ referencedColumns: ["id"];
1186
+ }
1187
+ ];
1188
+ };
1189
+ leagues_organisers_staff: {
1190
+ Row: {
1191
+ created_at: string;
1192
+ league_id: string;
1193
+ organiser_id: string;
1194
+ permission: string;
1195
+ user_id: string;
1196
+ };
1197
+ Insert: {
1198
+ created_at?: string;
1199
+ league_id: string;
1200
+ organiser_id: string;
1201
+ permission: string;
1202
+ user_id: string;
1203
+ };
1204
+ Update: {
1205
+ created_at?: string;
1206
+ league_id?: string;
1207
+ organiser_id?: string;
1208
+ permission?: string;
1209
+ user_id?: string;
1210
+ };
1211
+ Relationships: [
1212
+ {
1213
+ foreignKeyName: "leagues_organisers_staff_league_id_fkey";
1214
+ columns: ["league_id"];
1215
+ isOneToOne: false;
1216
+ referencedRelation: "leagues";
1217
+ referencedColumns: ["id"];
1218
+ }
1219
+ ];
1220
+ };
1221
+ locals_organisers: {
1222
+ Row: {
1223
+ created_at: string;
1224
+ locals_tournament_id: string;
1225
+ organiser_id: string;
1226
+ };
1227
+ Insert: {
1228
+ created_at?: string;
1229
+ locals_tournament_id: string;
1230
+ organiser_id: string;
1231
+ };
1232
+ Update: {
1233
+ created_at?: string;
1234
+ locals_tournament_id?: string;
1235
+ organiser_id?: string;
1236
+ };
1237
+ Relationships: [
1238
+ {
1239
+ foreignKeyName: "locals_organisers_locals_tournament_id_fkey";
1240
+ columns: ["locals_tournament_id"];
1241
+ isOneToOne: false;
1242
+ referencedRelation: "locals_tournaments";
1243
+ referencedColumns: ["id"];
1244
+ }
1245
+ ];
1246
+ };
1247
+ locals_organisers_staff: {
1248
+ Row: {
1249
+ created_at: string;
1250
+ locals_tournament_id: string;
1251
+ organiser_id: string;
1252
+ permission: string;
1253
+ user_id: string;
1254
+ };
1255
+ Insert: {
1256
+ created_at?: string;
1257
+ locals_tournament_id: string;
1258
+ organiser_id: string;
1259
+ permission: string;
1260
+ user_id: string;
1261
+ };
1262
+ Update: {
1263
+ created_at?: string;
1264
+ locals_tournament_id?: string;
1265
+ organiser_id?: string;
1266
+ permission?: string;
1267
+ user_id?: string;
1268
+ };
1269
+ Relationships: [];
1270
+ };
1271
+ locals_tournaments: {
1272
+ Row: {
1273
+ created_at: string;
1274
+ created_by: string;
1275
+ description: string | null;
1276
+ end_time: string | null;
1277
+ id: string;
1278
+ lounge_branch_id: string;
1279
+ metadata: Json | null;
1280
+ name: string;
1281
+ participant_type: Database["competitions"]["Enums"]["event_participant_type"];
1282
+ start_time: string;
1283
+ };
1284
+ Insert: {
1285
+ created_at?: string;
1286
+ created_by: string;
1287
+ description?: string | null;
1288
+ end_time?: string | null;
1289
+ id?: string;
1290
+ lounge_branch_id: string;
1291
+ metadata?: Json | null;
1292
+ name: string;
1293
+ participant_type: Database["competitions"]["Enums"]["event_participant_type"];
1294
+ start_time: string;
1295
+ };
1296
+ Update: {
1297
+ created_at?: string;
1298
+ created_by?: string;
1299
+ description?: string | null;
1300
+ end_time?: string | null;
1301
+ id?: string;
1302
+ lounge_branch_id?: string;
1303
+ metadata?: Json | null;
1304
+ name?: string;
1305
+ participant_type?: Database["competitions"]["Enums"]["event_participant_type"];
1306
+ start_time?: string;
1307
+ };
1308
+ Relationships: [];
1309
+ };
1310
+ phase_entrants: {
1311
+ Row: {
1312
+ created_at: string | null;
1313
+ event_participant_id: string;
1314
+ phase_id: string;
1315
+ registration_status: Database["competitions"]["Enums"]["phase_registration_status"];
1316
+ };
1317
+ Insert: {
1318
+ created_at?: string | null;
1319
+ event_participant_id: string;
1320
+ phase_id: string;
1321
+ registration_status?: Database["competitions"]["Enums"]["phase_registration_status"];
1322
+ };
1323
+ Update: {
1324
+ created_at?: string | null;
1325
+ event_participant_id?: string;
1326
+ phase_id?: string;
1327
+ registration_status?: Database["competitions"]["Enums"]["phase_registration_status"];
1328
+ };
1329
+ Relationships: [
1330
+ {
1331
+ foreignKeyName: "phase_entrants_event_participant_id_fkey";
1332
+ columns: ["event_participant_id"];
1333
+ isOneToOne: false;
1334
+ referencedRelation: "event_participants";
1335
+ referencedColumns: ["id"];
1336
+ },
1337
+ {
1338
+ foreignKeyName: "phase_entrants_phase_id_fkey";
1339
+ columns: ["phase_id"];
1340
+ isOneToOne: false;
1341
+ referencedRelation: "phases";
1342
+ referencedColumns: ["id"];
1343
+ }
1344
+ ];
1345
+ };
1346
+ phase_groups: {
1347
+ Row: {
1348
+ created_at: string | null;
1349
+ display_order: number | null;
1350
+ id: string;
1351
+ name: string;
1352
+ phase_id: string;
1353
+ };
1354
+ Insert: {
1355
+ created_at?: string | null;
1356
+ display_order?: number | null;
1357
+ id?: string;
1358
+ name: string;
1359
+ phase_id: string;
1360
+ };
1361
+ Update: {
1362
+ created_at?: string | null;
1363
+ display_order?: number | null;
1364
+ id?: string;
1365
+ name?: string;
1366
+ phase_id?: string;
1367
+ };
1368
+ Relationships: [
1369
+ {
1370
+ foreignKeyName: "phase_groups_phase_id_fkey";
1371
+ columns: ["phase_id"];
1372
+ isOneToOne: false;
1373
+ referencedRelation: "phases";
1374
+ referencedColumns: ["id"];
1375
+ }
1376
+ ];
1377
+ };
1378
+ phase_seeding_configurations: {
1379
+ Row: {
1380
+ allocation_method: string;
1381
+ configuration: Json | null;
1382
+ created_at: string | null;
1383
+ event_id: string;
1384
+ id: string;
1385
+ number_of_pots: number;
1386
+ participant_type: Database["competitions"]["Enums"]["event_participant_type"];
1387
+ phase_id: string;
1388
+ players_per_pot: number;
1389
+ source_phase_id: string | null;
1390
+ };
1391
+ Insert: {
1392
+ allocation_method: string;
1393
+ configuration?: Json | null;
1394
+ created_at?: string | null;
1395
+ event_id: string;
1396
+ id?: string;
1397
+ number_of_pots: number;
1398
+ participant_type: Database["competitions"]["Enums"]["event_participant_type"];
1399
+ phase_id: string;
1400
+ players_per_pot: number;
1401
+ source_phase_id?: string | null;
1402
+ };
1403
+ Update: {
1404
+ allocation_method?: string;
1405
+ configuration?: Json | null;
1406
+ created_at?: string | null;
1407
+ event_id?: string;
1408
+ id?: string;
1409
+ number_of_pots?: number;
1410
+ participant_type?: Database["competitions"]["Enums"]["event_participant_type"];
1411
+ phase_id?: string;
1412
+ players_per_pot?: number;
1413
+ source_phase_id?: string | null;
1414
+ };
1415
+ Relationships: [
1416
+ {
1417
+ foreignKeyName: "phase_seeding_configurations_event_id_fkey";
1418
+ columns: ["event_id"];
1419
+ isOneToOne: false;
1420
+ referencedRelation: "events";
1421
+ referencedColumns: ["id"];
1422
+ },
1423
+ {
1424
+ foreignKeyName: "phase_seeding_configurations_phase_id_fkey";
1425
+ columns: ["phase_id"];
1426
+ isOneToOne: false;
1427
+ referencedRelation: "phases";
1428
+ referencedColumns: ["id"];
1429
+ },
1430
+ {
1431
+ foreignKeyName: "phase_seeding_configurations_source_phase_id_fkey";
1432
+ columns: ["source_phase_id"];
1433
+ isOneToOne: false;
1434
+ referencedRelation: "phases";
1435
+ referencedColumns: ["id"];
1436
+ }
1437
+ ];
1438
+ };
1439
+ phase_seeds: {
1440
+ Row: {
1441
+ created_at: string | null;
1442
+ event_participant_id: string;
1443
+ id: string;
1444
+ phase_group_id: string;
1445
+ pot_number: number;
1446
+ seed_number: number;
1447
+ };
1448
+ Insert: {
1449
+ created_at?: string | null;
1450
+ event_participant_id: string;
1451
+ id?: string;
1452
+ phase_group_id: string;
1453
+ pot_number: number;
1454
+ seed_number: number;
1455
+ };
1456
+ Update: {
1457
+ created_at?: string | null;
1458
+ event_participant_id?: string;
1459
+ id?: string;
1460
+ phase_group_id?: string;
1461
+ pot_number?: number;
1462
+ seed_number?: number;
1463
+ };
1464
+ Relationships: [
1465
+ {
1466
+ foreignKeyName: "phase_seeds_event_participant_id_fkey";
1467
+ columns: ["event_participant_id"];
1468
+ isOneToOne: false;
1469
+ referencedRelation: "event_participants";
1470
+ referencedColumns: ["id"];
1471
+ },
1472
+ {
1473
+ foreignKeyName: "phase_seeds_phase_group_id_fkey";
1474
+ columns: ["phase_group_id"];
1475
+ isOneToOne: false;
1476
+ referencedRelation: "phase_groups";
1477
+ referencedColumns: ["id"];
1478
+ }
1479
+ ];
1480
+ };
1481
+ phases: {
1482
+ Row: {
1483
+ created_at: string | null;
1484
+ end_time: string | null;
1485
+ event_id: string;
1486
+ id: string;
1487
+ metadata: Json | null;
1488
+ name: string;
1489
+ phase_order: number | null;
1490
+ phase_type: Database["competitions"]["Enums"]["phase_type"];
1491
+ start_time: string | null;
1492
+ };
1493
+ Insert: {
1494
+ created_at?: string | null;
1495
+ end_time?: string | null;
1496
+ event_id: string;
1497
+ id?: string;
1498
+ metadata?: Json | null;
1499
+ name: string;
1500
+ phase_order?: number | null;
1501
+ phase_type: Database["competitions"]["Enums"]["phase_type"];
1502
+ start_time?: string | null;
1503
+ };
1504
+ Update: {
1505
+ created_at?: string | null;
1506
+ end_time?: string | null;
1507
+ event_id?: string;
1508
+ id?: string;
1509
+ metadata?: Json | null;
1510
+ name?: string;
1511
+ phase_order?: number | null;
1512
+ phase_type?: Database["competitions"]["Enums"]["phase_type"];
1513
+ start_time?: string | null;
1514
+ };
1515
+ Relationships: [
1516
+ {
1517
+ foreignKeyName: "phases_event_id_fkey";
1518
+ columns: ["event_id"];
1519
+ isOneToOne: false;
1520
+ referencedRelation: "events";
1521
+ referencedColumns: ["id"];
1522
+ }
1523
+ ];
1524
+ };
1525
+ sets: {
1526
+ Row: {
1527
+ challenges_phase_id: string | null;
1528
+ created_at: string | null;
1529
+ id: string;
1530
+ length: number;
1531
+ length_type: Database["competitions"]["Enums"]["set_length_type"];
1532
+ metadata: Json | null;
1533
+ phase_group_id: string | null;
1534
+ scoring_type: Database["competitions"]["Enums"]["set_scoring_type"];
1535
+ };
1536
+ Insert: {
1537
+ challenges_phase_id?: string | null;
1538
+ created_at?: string | null;
1539
+ id?: string;
1540
+ length: number;
1541
+ length_type?: Database["competitions"]["Enums"]["set_length_type"];
1542
+ metadata?: Json | null;
1543
+ phase_group_id?: string | null;
1544
+ scoring_type?: Database["competitions"]["Enums"]["set_scoring_type"];
1545
+ };
1546
+ Update: {
1547
+ challenges_phase_id?: string | null;
1548
+ created_at?: string | null;
1549
+ id?: string;
1550
+ length?: number;
1551
+ length_type?: Database["competitions"]["Enums"]["set_length_type"];
1552
+ metadata?: Json | null;
1553
+ phase_group_id?: string | null;
1554
+ scoring_type?: Database["competitions"]["Enums"]["set_scoring_type"];
1555
+ };
1556
+ Relationships: [
1557
+ {
1558
+ foreignKeyName: "sets_challenges_phase_id_fkey";
1559
+ columns: ["challenges_phase_id"];
1560
+ isOneToOne: false;
1561
+ referencedRelation: "challenges_phases";
1562
+ referencedColumns: ["id"];
1563
+ },
1564
+ {
1565
+ foreignKeyName: "sets_phase_group_id_fkey";
1566
+ columns: ["phase_group_id"];
1567
+ isOneToOne: false;
1568
+ referencedRelation: "phase_groups";
1569
+ referencedColumns: ["id"];
1570
+ }
1571
+ ];
1572
+ };
1573
+ tournament_phase_progressions: {
1574
+ Row: {
1575
+ configuration: Json | null;
1576
+ created_at: string | null;
1577
+ destination_phase_id: string;
1578
+ id: string;
1579
+ players_progressing: number;
1580
+ source_phase_id: string;
1581
+ };
1582
+ Insert: {
1583
+ configuration?: Json | null;
1584
+ created_at?: string | null;
1585
+ destination_phase_id: string;
1586
+ id?: string;
1587
+ players_progressing: number;
1588
+ source_phase_id: string;
1589
+ };
1590
+ Update: {
1591
+ configuration?: Json | null;
1592
+ created_at?: string | null;
1593
+ destination_phase_id?: string;
1594
+ id?: string;
1595
+ players_progressing?: number;
1596
+ source_phase_id?: string;
1597
+ };
1598
+ Relationships: [
1599
+ {
1600
+ foreignKeyName: "tournament_phase_progressions_destination_phase_id_fkey";
1601
+ columns: ["destination_phase_id"];
1602
+ isOneToOne: false;
1603
+ referencedRelation: "phases";
1604
+ referencedColumns: ["id"];
1605
+ },
1606
+ {
1607
+ foreignKeyName: "tournament_phase_progressions_source_phase_id_fkey";
1608
+ columns: ["source_phase_id"];
1609
+ isOneToOne: false;
1610
+ referencedRelation: "phases";
1611
+ referencedColumns: ["id"];
1612
+ }
1613
+ ];
1614
+ };
1615
+ };
1616
+ Views: {
1617
+ [_ in never]: never;
1618
+ };
1619
+ Functions: {
1620
+ authorise_competition: {
1621
+ Args: {
1622
+ p_challenges_id?: string;
1623
+ p_league_id?: string;
1624
+ p_locals_tournament_id?: string;
1625
+ p_permission: string;
1626
+ };
1627
+ Returns: boolean;
1628
+ };
1629
+ get_challenges_id: {
1630
+ Args: {
1631
+ search: string;
1632
+ source_level?: string;
1633
+ };
1634
+ Returns: string;
1635
+ };
1636
+ get_league_id: {
1637
+ Args: {
1638
+ search: string;
1639
+ source_level?: string;
1640
+ };
1641
+ Returns: string;
1642
+ };
1643
+ get_locals_tournament_id: {
1644
+ Args: {
1645
+ search: string;
1646
+ source_level?: string;
1647
+ };
1648
+ Returns: string;
1649
+ };
1650
+ has_competition_access: {
1651
+ Args: {
1652
+ p_challenges_id?: string;
1653
+ p_league_id?: string;
1654
+ p_locals_tournament_id?: string;
1655
+ p_user_id?: string;
1656
+ };
1657
+ Returns: boolean;
1658
+ };
1659
+ is_challenges_organiser: {
1660
+ Args: {
1661
+ p_challenges_id: string;
1662
+ p_user_id?: string;
1663
+ };
1664
+ Returns: boolean;
1665
+ };
1666
+ is_challenges_staff: {
1667
+ Args: {
1668
+ p_challenges_id: string;
1669
+ p_permission: string;
1670
+ p_user_id?: string;
1671
+ };
1672
+ Returns: boolean;
1673
+ };
1674
+ is_league_organiser: {
1675
+ Args: {
1676
+ p_league_id: string;
1677
+ p_user_id?: string;
1678
+ };
1679
+ Returns: boolean;
1680
+ };
1681
+ is_league_staff: {
1682
+ Args: {
1683
+ p_league_id: string;
1684
+ p_permission: string;
1685
+ p_user_id?: string;
1686
+ };
1687
+ Returns: boolean;
1688
+ };
1689
+ is_locals_organiser: {
1690
+ Args: {
1691
+ p_locals_tournament_id: string;
1692
+ p_user_id?: string;
1693
+ };
1694
+ Returns: boolean;
1695
+ };
1696
+ is_locals_staff: {
1697
+ Args: {
1698
+ p_locals_tournament_id: string;
1699
+ p_permission: string;
1700
+ p_user_id?: string;
1701
+ };
1702
+ Returns: boolean;
1703
+ };
1704
+ is_penalty_active: {
1705
+ Args: {
1706
+ p_applied_at: string;
1707
+ p_expires_at?: string;
1708
+ };
1709
+ Returns: boolean;
1710
+ };
1711
+ perform_phase_seeding: {
1712
+ Args: {
1713
+ p_config_id: string;
1714
+ p_participant_type: Database["competitions"]["Enums"]["event_participant_type"];
1715
+ };
1716
+ Returns: undefined;
1717
+ };
1718
+ };
1719
+ Enums: {
1720
+ event_participant_type: "player" | "team";
1721
+ event_status: "scheduled" | "active" | "completed" | "suspended" | "cancelled";
1722
+ phase_registration_status: "pending" | "active" | "withdrawn" | "disqualified";
1723
+ phase_type: "progression" | "playoff";
1724
+ set_length_type: "first_to" | "best_of" | "fixed";
1725
+ set_scoring_type: "aggregate_score" | "match_wins";
1726
+ };
1727
+ CompositeTypes: {
1728
+ [_ in never]: never;
1729
+ };
1730
+ };
5
1731
  compliance: {
6
1732
  Tables: {
7
1733
  active_registrations: {
@@ -41,7 +1767,22 @@ export type Database = {
41
1767
  permission?: string;
42
1768
  role?: string;
43
1769
  };
44
- Relationships: [];
1770
+ Relationships: [
1771
+ {
1772
+ foreignKeyName: "compliance_app_role_permissions_permission_fkey";
1773
+ columns: ["permission"];
1774
+ isOneToOne: false;
1775
+ referencedRelation: "apps";
1776
+ referencedColumns: ["app"];
1777
+ },
1778
+ {
1779
+ foreignKeyName: "compliance_app_role_permissions_role_fkey";
1780
+ columns: ["role"];
1781
+ isOneToOne: false;
1782
+ referencedRelation: "app_roles";
1783
+ referencedColumns: ["role"];
1784
+ }
1785
+ ];
45
1786
  };
46
1787
  app_roles: {
47
1788
  Row: {
@@ -61,11 +1802,93 @@ export type Database = {
61
1802
  };
62
1803
  Relationships: [];
63
1804
  };
1805
+ apps: {
1806
+ Row: {
1807
+ app: string;
1808
+ };
1809
+ Insert: {
1810
+ app: string;
1811
+ };
1812
+ Update: {
1813
+ app?: string;
1814
+ };
1815
+ Relationships: [];
1816
+ };
1817
+ competition_organisers: {
1818
+ Row: {
1819
+ created_at: string;
1820
+ description: string | null;
1821
+ email: string | null;
1822
+ id: string;
1823
+ name: string;
1824
+ phone: string;
1825
+ user_id: string;
1826
+ website: string | null;
1827
+ };
1828
+ Insert: {
1829
+ created_at?: string;
1830
+ description?: string | null;
1831
+ email?: string | null;
1832
+ id?: string;
1833
+ name: string;
1834
+ phone?: string;
1835
+ user_id?: string;
1836
+ website?: string | null;
1837
+ };
1838
+ Update: {
1839
+ created_at?: string;
1840
+ description?: string | null;
1841
+ email?: string | null;
1842
+ id?: string;
1843
+ name?: string;
1844
+ phone?: string;
1845
+ user_id?: string;
1846
+ website?: string | null;
1847
+ };
1848
+ Relationships: [];
1849
+ };
1850
+ competition_organisers_staff: {
1851
+ Row: {
1852
+ created_at: string;
1853
+ organiser_id: string;
1854
+ player_id: string;
1855
+ user_id: string;
1856
+ };
1857
+ Insert: {
1858
+ created_at?: string;
1859
+ organiser_id: string;
1860
+ player_id: string;
1861
+ user_id: string;
1862
+ };
1863
+ Update: {
1864
+ created_at?: string;
1865
+ organiser_id?: string;
1866
+ player_id?: string;
1867
+ user_id?: string;
1868
+ };
1869
+ Relationships: [
1870
+ {
1871
+ foreignKeyName: "competition_organisers_staff_organiser_id_fkey";
1872
+ columns: ["organiser_id"];
1873
+ isOneToOne: false;
1874
+ referencedRelation: "competition_organisers";
1875
+ referencedColumns: ["id"];
1876
+ },
1877
+ {
1878
+ foreignKeyName: "competition_organisers_staff_player_id_fkey";
1879
+ columns: ["player_id"];
1880
+ isOneToOne: false;
1881
+ referencedRelation: "players";
1882
+ referencedColumns: ["id"];
1883
+ }
1884
+ ];
1885
+ };
64
1886
  data_update_requests: {
65
1887
  Row: {
66
1888
  account_type: Database["compliance"]["Enums"]["account_type"];
67
1889
  created_at: string;
68
1890
  id: string;
1891
+ rejected_by: string | null;
69
1892
  rejection_reason: string | null;
70
1893
  status: Database["compliance"]["Enums"]["data_update_request_status"];
71
1894
  updated_at: string | null;
@@ -76,6 +1899,7 @@ export type Database = {
76
1899
  account_type: Database["compliance"]["Enums"]["account_type"];
77
1900
  created_at?: string;
78
1901
  id?: string;
1902
+ rejected_by?: string | null;
79
1903
  rejection_reason?: string | null;
80
1904
  status?: Database["compliance"]["Enums"]["data_update_request_status"];
81
1905
  updated_at?: string | null;
@@ -86,6 +1910,7 @@ export type Database = {
86
1910
  account_type?: Database["compliance"]["Enums"]["account_type"];
87
1911
  created_at?: string;
88
1912
  id?: string;
1913
+ rejected_by?: string | null;
89
1914
  rejection_reason?: string | null;
90
1915
  status?: Database["compliance"]["Enums"]["data_update_request_status"];
91
1916
  updated_at?: string | null;
@@ -134,8 +1959,8 @@ export type Database = {
134
1959
  branch_id: string;
135
1960
  created_at: string;
136
1961
  end_time: string | null;
137
- external_metadata: Json | null;
138
1962
  id: string;
1963
+ metadata: Json | null;
139
1964
  reason: string;
140
1965
  start_time: string;
141
1966
  user_id: string | null;
@@ -144,8 +1969,8 @@ export type Database = {
144
1969
  branch_id: string;
145
1970
  created_at?: string;
146
1971
  end_time?: string | null;
147
- external_metadata?: Json | null;
148
1972
  id?: string;
1973
+ metadata?: Json | null;
149
1974
  reason: string;
150
1975
  start_time?: string;
151
1976
  user_id?: string | null;
@@ -154,8 +1979,8 @@ export type Database = {
154
1979
  branch_id?: string;
155
1980
  created_at?: string;
156
1981
  end_time?: string | null;
157
- external_metadata?: Json | null;
158
1982
  id?: string;
1983
+ metadata?: Json | null;
159
1984
  reason?: string;
160
1985
  start_time?: string;
161
1986
  user_id?: string | null;
@@ -236,54 +2061,35 @@ export type Database = {
236
2061
  lounge_credits_transactions: {
237
2062
  Row: {
238
2063
  amount: number;
239
- branch_id: string | null;
240
2064
  created_at: string;
241
2065
  description: string;
242
- external_metadata: Json | null;
243
- feature: string | null;
244
2066
  id: string;
245
2067
  lounge_id: string | null;
246
- microservice: string | null;
247
- microservice_group: string | null;
248
- staff_id: string | null;
2068
+ metadata: Json | null;
2069
+ source_event_id: string | null;
249
2070
  user_id: string | null;
250
2071
  };
251
2072
  Insert: {
252
2073
  amount: number;
253
- branch_id?: string | null;
254
2074
  created_at?: string;
255
2075
  description: string;
256
- external_metadata?: Json | null;
257
- feature?: string | null;
258
2076
  id?: string;
259
2077
  lounge_id?: string | null;
260
- microservice?: string | null;
261
- microservice_group?: string | null;
262
- staff_id?: string | null;
2078
+ metadata?: Json | null;
2079
+ source_event_id?: string | null;
263
2080
  user_id?: string | null;
264
2081
  };
265
2082
  Update: {
266
2083
  amount?: number;
267
- branch_id?: string | null;
268
2084
  created_at?: string;
269
2085
  description?: string;
270
- external_metadata?: Json | null;
271
- feature?: string | null;
272
2086
  id?: string;
273
2087
  lounge_id?: string | null;
274
- microservice?: string | null;
275
- microservice_group?: string | null;
276
- staff_id?: string | null;
2088
+ metadata?: Json | null;
2089
+ source_event_id?: string | null;
277
2090
  user_id?: string | null;
278
2091
  };
279
2092
  Relationships: [
280
- {
281
- foreignKeyName: "lounge_credits_transactions_branch_id_fkey";
282
- columns: ["branch_id"];
283
- isOneToOne: false;
284
- referencedRelation: "lounge_branches";
285
- referencedColumns: ["id"];
286
- },
287
2093
  {
288
2094
  foreignKeyName: "lounge_credits_transactions_lounge_id_fkey";
289
2095
  columns: ["lounge_id"];
@@ -292,10 +2098,10 @@ export type Database = {
292
2098
  referencedColumns: ["id"];
293
2099
  },
294
2100
  {
295
- foreignKeyName: "lounge_credits_transactions_staff_id_fkey";
296
- columns: ["staff_id"];
2101
+ foreignKeyName: "lounge_credits_transactions_source_event_id_fkey";
2102
+ columns: ["source_event_id"];
297
2103
  isOneToOne: false;
298
- referencedRelation: "players";
2104
+ referencedRelation: "system_events";
299
2105
  referencedColumns: ["id"];
300
2106
  }
301
2107
  ];
@@ -304,9 +2110,9 @@ export type Database = {
304
2110
  Row: {
305
2111
  created_at: string;
306
2112
  end_time: string | null;
307
- external_metadata: Json | null;
308
2113
  id: string;
309
2114
  lounge_id: string;
2115
+ metadata: Json | null;
310
2116
  reason: string;
311
2117
  start_time: string;
312
2118
  user_id: string | null;
@@ -314,9 +2120,9 @@ export type Database = {
314
2120
  Insert: {
315
2121
  created_at?: string;
316
2122
  end_time?: string | null;
317
- external_metadata?: Json | null;
318
2123
  id?: string;
319
2124
  lounge_id: string;
2125
+ metadata?: Json | null;
320
2126
  reason: string;
321
2127
  start_time?: string;
322
2128
  user_id?: string | null;
@@ -324,9 +2130,9 @@ export type Database = {
324
2130
  Update: {
325
2131
  created_at?: string;
326
2132
  end_time?: string | null;
327
- external_metadata?: Json | null;
328
2133
  id?: string;
329
2134
  lounge_id?: string;
2135
+ metadata?: Json | null;
330
2136
  reason?: string;
331
2137
  start_time?: string;
332
2138
  user_id?: string | null;
@@ -546,36 +2352,30 @@ export type Database = {
546
2352
  amount: number;
547
2353
  created_at: string;
548
2354
  description: string;
549
- external_metadata: Json | null;
550
- feature: string | null;
551
2355
  id: string;
552
- microservice: string | null;
553
- microservice_group: string | null;
2356
+ metadata: Json | null;
554
2357
  player_id: string;
2358
+ source_event_id: string | null;
555
2359
  user_id: string | null;
556
2360
  };
557
2361
  Insert: {
558
2362
  amount: number;
559
2363
  created_at?: string;
560
2364
  description: string;
561
- external_metadata?: Json | null;
562
- feature?: string | null;
563
2365
  id?: string;
564
- microservice?: string | null;
565
- microservice_group?: string | null;
2366
+ metadata?: Json | null;
566
2367
  player_id?: string;
2368
+ source_event_id?: string | null;
567
2369
  user_id?: string | null;
568
2370
  };
569
2371
  Update: {
570
2372
  amount?: number;
571
2373
  created_at?: string;
572
2374
  description?: string;
573
- external_metadata?: Json | null;
574
- feature?: string | null;
575
2375
  id?: string;
576
- microservice?: string | null;
577
- microservice_group?: string | null;
2376
+ metadata?: Json | null;
578
2377
  player_id?: string;
2378
+ source_event_id?: string | null;
579
2379
  user_id?: string | null;
580
2380
  };
581
2381
  Relationships: [
@@ -585,6 +2385,13 @@ export type Database = {
585
2385
  isOneToOne: false;
586
2386
  referencedRelation: "players";
587
2387
  referencedColumns: ["id"];
2388
+ },
2389
+ {
2390
+ foreignKeyName: "player_credits_transactions_source_event_id_fkey";
2391
+ columns: ["source_event_id"];
2392
+ isOneToOne: false;
2393
+ referencedRelation: "system_events";
2394
+ referencedColumns: ["id"];
588
2395
  }
589
2396
  ];
590
2397
  };
@@ -835,8 +2642,8 @@ export type Database = {
835
2642
  Row: {
836
2643
  created_at: string;
837
2644
  end_time: string | null;
838
- external_metadata: Json | null;
839
2645
  id: string;
2646
+ metadata: Json | null;
840
2647
  player_id: string;
841
2648
  reason: string;
842
2649
  start_time: string;
@@ -845,8 +2652,8 @@ export type Database = {
845
2652
  Insert: {
846
2653
  created_at?: string;
847
2654
  end_time?: string | null;
848
- external_metadata?: Json | null;
849
2655
  id?: string;
2656
+ metadata?: Json | null;
850
2657
  player_id: string;
851
2658
  reason: string;
852
2659
  start_time?: string;
@@ -855,8 +2662,8 @@ export type Database = {
855
2662
  Update: {
856
2663
  created_at?: string;
857
2664
  end_time?: string | null;
858
- external_metadata?: Json | null;
859
2665
  id?: string;
2666
+ metadata?: Json | null;
860
2667
  player_id?: string;
861
2668
  reason?: string;
862
2669
  start_time?: string;
@@ -975,36 +2782,30 @@ export type Database = {
975
2782
  amount: number;
976
2783
  created_at: string;
977
2784
  description: string;
978
- external_metadata: Json | null;
979
- feature: string | null;
980
2785
  id: string;
981
- microservice: string | null;
982
- microservice_group: string | null;
2786
+ metadata: Json | null;
983
2787
  player_id: string;
2788
+ source_event_id: string | null;
984
2789
  user_id: string | null;
985
2790
  };
986
2791
  Insert: {
987
2792
  amount: number;
988
2793
  created_at?: string;
989
2794
  description: string;
990
- external_metadata?: Json | null;
991
- feature?: string | null;
992
2795
  id?: string;
993
- microservice?: string | null;
994
- microservice_group?: string | null;
2796
+ metadata?: Json | null;
995
2797
  player_id?: string;
2798
+ source_event_id?: string | null;
996
2799
  user_id?: string | null;
997
2800
  };
998
2801
  Update: {
999
2802
  amount?: number;
1000
2803
  created_at?: string;
1001
2804
  description?: string;
1002
- external_metadata?: Json | null;
1003
- feature?: string | null;
1004
2805
  id?: string;
1005
- microservice?: string | null;
1006
- microservice_group?: string | null;
2806
+ metadata?: Json | null;
1007
2807
  player_id?: string;
2808
+ source_event_id?: string | null;
1008
2809
  user_id?: string | null;
1009
2810
  };
1010
2811
  Relationships: [
@@ -1014,6 +2815,13 @@ export type Database = {
1014
2815
  isOneToOne: false;
1015
2816
  referencedRelation: "players";
1016
2817
  referencedColumns: ["id"];
2818
+ },
2819
+ {
2820
+ foreignKeyName: "player_xp_transactions_source_event_id_fkey";
2821
+ columns: ["source_event_id"];
2822
+ isOneToOne: false;
2823
+ referencedRelation: "system_events";
2824
+ referencedColumns: ["id"];
1017
2825
  }
1018
2826
  ];
1019
2827
  };
@@ -1077,6 +2885,193 @@ export type Database = {
1077
2885
  };
1078
2886
  Relationships: [];
1079
2887
  };
2888
+ system_event_types: {
2889
+ Row: {
2890
+ description: string;
2891
+ event_type: string;
2892
+ };
2893
+ Insert: {
2894
+ description: string;
2895
+ event_type: string;
2896
+ };
2897
+ Update: {
2898
+ description?: string;
2899
+ event_type?: string;
2900
+ };
2901
+ Relationships: [];
2902
+ };
2903
+ system_events: {
2904
+ Row: {
2905
+ created_at: string;
2906
+ event_name: string | null;
2907
+ event_payload: Json | null;
2908
+ id: string;
2909
+ invalidated_at: string | null;
2910
+ invalidated_by: string | null;
2911
+ invalidation_reason: string | null;
2912
+ player_id: string;
2913
+ source_app: string;
2914
+ source_identifier: string;
2915
+ source_type: string;
2916
+ user_id: string;
2917
+ };
2918
+ Insert: {
2919
+ created_at?: string;
2920
+ event_name?: string | null;
2921
+ event_payload?: Json | null;
2922
+ id?: string;
2923
+ invalidated_at?: string | null;
2924
+ invalidated_by?: string | null;
2925
+ invalidation_reason?: string | null;
2926
+ player_id?: string;
2927
+ source_app: string;
2928
+ source_identifier: string;
2929
+ source_type: string;
2930
+ user_id?: string;
2931
+ };
2932
+ Update: {
2933
+ created_at?: string;
2934
+ event_name?: string | null;
2935
+ event_payload?: Json | null;
2936
+ id?: string;
2937
+ invalidated_at?: string | null;
2938
+ invalidated_by?: string | null;
2939
+ invalidation_reason?: string | null;
2940
+ player_id?: string;
2941
+ source_app?: string;
2942
+ source_identifier?: string;
2943
+ source_type?: string;
2944
+ user_id?: string;
2945
+ };
2946
+ Relationships: [
2947
+ {
2948
+ foreignKeyName: "system_events_player_id_fkey";
2949
+ columns: ["player_id"];
2950
+ isOneToOne: false;
2951
+ referencedRelation: "players";
2952
+ referencedColumns: ["id"];
2953
+ },
2954
+ {
2955
+ foreignKeyName: "system_events_source_app_fkey";
2956
+ columns: ["source_app"];
2957
+ isOneToOne: false;
2958
+ referencedRelation: "apps";
2959
+ referencedColumns: ["app"];
2960
+ },
2961
+ {
2962
+ foreignKeyName: "system_events_source_type_fkey";
2963
+ columns: ["source_type"];
2964
+ isOneToOne: false;
2965
+ referencedRelation: "system_event_types";
2966
+ referencedColumns: ["event_type"];
2967
+ }
2968
+ ];
2969
+ };
2970
+ teams: {
2971
+ Row: {
2972
+ abbreviation: string;
2973
+ created_at: string;
2974
+ email: string | null;
2975
+ id: string;
2976
+ name: string;
2977
+ phone: string;
2978
+ user_id: string | null;
2979
+ website: string | null;
2980
+ };
2981
+ Insert: {
2982
+ abbreviation: string;
2983
+ created_at?: string;
2984
+ email?: string | null;
2985
+ id?: string;
2986
+ name: string;
2987
+ phone?: string;
2988
+ user_id?: string | null;
2989
+ website?: string | null;
2990
+ };
2991
+ Update: {
2992
+ abbreviation?: string;
2993
+ created_at?: string;
2994
+ email?: string | null;
2995
+ id?: string;
2996
+ name?: string;
2997
+ phone?: string;
2998
+ user_id?: string | null;
2999
+ website?: string | null;
3000
+ };
3001
+ Relationships: [];
3002
+ };
3003
+ teams_lounges: {
3004
+ Row: {
3005
+ created_at: string;
3006
+ lounge_id: string;
3007
+ team_id: string;
3008
+ terminated_at: string | null;
3009
+ };
3010
+ Insert: {
3011
+ created_at?: string;
3012
+ lounge_id: string;
3013
+ team_id: string;
3014
+ terminated_at?: string | null;
3015
+ };
3016
+ Update: {
3017
+ created_at?: string;
3018
+ lounge_id?: string;
3019
+ team_id?: string;
3020
+ terminated_at?: string | null;
3021
+ };
3022
+ Relationships: [
3023
+ {
3024
+ foreignKeyName: "teams_lounges_lounge_id_fkey";
3025
+ columns: ["lounge_id"];
3026
+ isOneToOne: false;
3027
+ referencedRelation: "lounges";
3028
+ referencedColumns: ["id"];
3029
+ },
3030
+ {
3031
+ foreignKeyName: "teams_lounges_team_id_fkey";
3032
+ columns: ["team_id"];
3033
+ isOneToOne: false;
3034
+ referencedRelation: "teams";
3035
+ referencedColumns: ["id"];
3036
+ }
3037
+ ];
3038
+ };
3039
+ teams_players: {
3040
+ Row: {
3041
+ created_at: string;
3042
+ player_id: string;
3043
+ team_id: string;
3044
+ terminated_at: string | null;
3045
+ };
3046
+ Insert: {
3047
+ created_at?: string;
3048
+ player_id: string;
3049
+ team_id: string;
3050
+ terminated_at?: string | null;
3051
+ };
3052
+ Update: {
3053
+ created_at?: string;
3054
+ player_id?: string;
3055
+ team_id?: string;
3056
+ terminated_at?: string | null;
3057
+ };
3058
+ Relationships: [
3059
+ {
3060
+ foreignKeyName: "teams_players_player_id_fkey";
3061
+ columns: ["player_id"];
3062
+ isOneToOne: false;
3063
+ referencedRelation: "players";
3064
+ referencedColumns: ["id"];
3065
+ },
3066
+ {
3067
+ foreignKeyName: "teams_players_team_id_fkey";
3068
+ columns: ["team_id"];
3069
+ isOneToOne: false;
3070
+ referencedRelation: "teams";
3071
+ referencedColumns: ["id"];
3072
+ }
3073
+ ];
3074
+ };
1080
3075
  temporary_player_xp_transactions: {
1081
3076
  Row: {
1082
3077
  amount: number;
@@ -1084,6 +3079,7 @@ export type Database = {
1084
3079
  description: string;
1085
3080
  id: string;
1086
3081
  player_id: string | null;
3082
+ source_event_id: string | null;
1087
3083
  user_id: string | null;
1088
3084
  };
1089
3085
  Insert: {
@@ -1092,6 +3088,7 @@ export type Database = {
1092
3088
  description: string;
1093
3089
  id?: string;
1094
3090
  player_id?: string | null;
3091
+ source_event_id?: string | null;
1095
3092
  user_id?: string | null;
1096
3093
  };
1097
3094
  Update: {
@@ -1100,6 +3097,7 @@ export type Database = {
1100
3097
  description?: string;
1101
3098
  id?: string;
1102
3099
  player_id?: string | null;
3100
+ source_event_id?: string | null;
1103
3101
  user_id?: string | null;
1104
3102
  };
1105
3103
  Relationships: [
@@ -1110,6 +3108,13 @@ export type Database = {
1110
3108
  referencedRelation: "temporary_players";
1111
3109
  referencedColumns: ["id"];
1112
3110
  },
3111
+ {
3112
+ foreignKeyName: "temporary_player_xp_transactions_source_event_id_fkey";
3113
+ columns: ["source_event_id"];
3114
+ isOneToOne: false;
3115
+ referencedRelation: "system_events";
3116
+ referencedColumns: ["id"];
3117
+ },
1113
3118
  {
1114
3119
  foreignKeyName: "temporary_player_xp_transactions_user_id_fkey";
1115
3120
  columns: ["user_id"];
@@ -1185,8 +3190,8 @@ export type Database = {
1185
3190
  };
1186
3191
  check_annual_update_limit: {
1187
3192
  Args: {
1188
- p_field: string;
1189
3193
  p_account_type: Database["compliance"]["Enums"]["account_type"];
3194
+ p_field: string;
1190
3195
  p_user_id: string;
1191
3196
  };
1192
3197
  Returns: boolean;
@@ -1197,54 +3202,54 @@ export type Database = {
1197
3202
  };
1198
3203
  create_lounge: {
1199
3204
  Args: {
3205
+ p_company_name: string;
1200
3206
  p_email?: string;
1201
3207
  p_phone?: string;
1202
- p_website?: string;
1203
- p_trade_name?: string;
1204
3208
  p_registration_date: string;
1205
- p_company_name: string;
3209
+ p_trade_name?: string;
3210
+ p_website?: string;
1206
3211
  };
1207
3212
  Returns: string;
1208
3213
  };
1209
3214
  create_player: {
1210
3215
  Args: {
1211
- p_nationality: string;
3216
+ p_birth_date: string;
3217
+ p_first_name: string;
3218
+ p_gender_identity?: Database["compliance"]["Enums"]["gender_identity"];
3219
+ p_last_name: string;
1212
3220
  p_middle_names?: string;
1213
- p_show_pronouns?: boolean;
3221
+ p_nationality: string;
1214
3222
  p_pronouns?: Database["compliance"]["Enums"]["pronouns"][];
1215
- p_gender_identity?: Database["compliance"]["Enums"]["gender_identity"];
1216
- p_show_birth_date?: boolean;
1217
3223
  p_pseudonym?: string;
1218
- p_first_name: string;
1219
- p_last_name: string;
1220
- p_birth_date: string;
1221
3224
  p_sex: Database["compliance"]["Enums"]["sex"];
3225
+ p_show_birth_date?: boolean;
3226
+ p_show_pronouns?: boolean;
1222
3227
  };
1223
3228
  Returns: string;
1224
3229
  };
1225
3230
  create_player_minor_rep: {
1226
3231
  Args: {
3232
+ p_birth_date: string;
3233
+ p_first_name: string;
1227
3234
  p_gender_identity?: Database["compliance"]["Enums"]["gender_identity"];
1228
- p_other_relation?: string;
1229
- p_nationality: string;
1230
- p_sex: Database["compliance"]["Enums"]["sex"];
1231
- p_relation: Database["compliance"]["Enums"]["minor_relation"];
3235
+ p_last_name: string;
1232
3236
  p_middle_names?: string;
1233
- p_pronouns?: Database["compliance"]["Enums"]["pronouns"][];
3237
+ p_nationality: string;
3238
+ p_other_relation?: string;
1234
3239
  p_phone: string;
1235
- p_first_name: string;
1236
- p_last_name: string;
1237
- p_birth_date: string;
3240
+ p_pronouns?: Database["compliance"]["Enums"]["pronouns"][];
3241
+ p_relation: Database["compliance"]["Enums"]["minor_relation"];
3242
+ p_sex: Database["compliance"]["Enums"]["sex"];
1238
3243
  };
1239
3244
  Returns: string;
1240
3245
  };
1241
3246
  create_varsity_stint: {
1242
3247
  Args: {
1243
- p_institution_code: string;
1244
3248
  p_enrollment_year: number;
1245
3249
  p_exit_year: number;
1246
- p_institution_name_issue?: Database["compliance"]["Enums"]["institution_name_issue"];
1247
3250
  p_formatted_institution_name?: string;
3251
+ p_institution_code: string;
3252
+ p_institution_name_issue?: Database["compliance"]["Enums"]["institution_name_issue"];
1248
3253
  };
1249
3254
  Returns: string;
1250
3255
  };
@@ -1259,16 +3264,16 @@ export type Database = {
1259
3264
  input_string: string;
1260
3265
  };
1261
3266
  Returns: {
1262
- middle_names: string;
1263
3267
  first_name: string;
1264
3268
  last_name: string;
3269
+ middle_names: string;
1265
3270
  }[];
1266
3271
  };
1267
3272
  generate_platform_id: {
1268
3273
  Args: {
1269
- is_for_staff?: boolean;
1270
3274
  account_type: Database["compliance"]["Enums"]["account_type"];
1271
3275
  is_for_branch?: boolean;
3276
+ is_for_staff?: boolean;
1272
3277
  };
1273
3278
  Returns: string;
1274
3279
  };
@@ -1276,25 +3281,32 @@ export type Database = {
1276
3281
  Args: Record<PropertyKey, never>;
1277
3282
  Returns: Json;
1278
3283
  };
1279
- get_data_update_requests: {
3284
+ get_competition_organiser_ids: {
1280
3285
  Args: {
3286
+ include_staff?: boolean;
1281
3287
  search?: string;
3288
+ };
3289
+ Returns: Json;
3290
+ };
3291
+ get_data_update_requests: {
3292
+ Args: {
1282
3293
  is_for_minor_rep?: boolean;
3294
+ search?: string;
1283
3295
  };
1284
3296
  Returns: {
1285
3297
  account_type: Database["compliance"]["Enums"]["account_type"];
1286
- status: Database["compliance"]["Enums"]["data_update_request_status"];
1287
- updates: Json;
1288
- rejection_reason: string;
1289
3298
  created_at: string;
1290
- updated_at: string;
1291
3299
  id: string;
3300
+ rejection_reason: string;
3301
+ status: Database["compliance"]["Enums"]["data_update_request_status"];
3302
+ updated_at: string;
3303
+ updates: Json;
1292
3304
  }[];
1293
3305
  };
1294
3306
  get_data_updates: {
1295
3307
  Args: {
1296
- search?: string;
1297
3308
  is_for_minor_rep?: boolean;
3309
+ search?: string;
1298
3310
  };
1299
3311
  Returns: {
1300
3312
  account_type: Database["compliance"]["Enums"]["account_type"];
@@ -1345,8 +3357,8 @@ export type Database = {
1345
3357
  };
1346
3358
  Returns: {
1347
3359
  enrollment_year: number;
1348
- graduated: boolean;
1349
3360
  exit_year: number;
3361
+ graduated: boolean;
1350
3362
  institution_code: string;
1351
3363
  institution_name: string;
1352
3364
  }[];
@@ -1359,30 +3371,42 @@ export type Database = {
1359
3371
  };
1360
3372
  is_current_user_permanent: {
1361
3373
  Args: {
1362
- user_is_anonymous?: boolean;
1363
3374
  user_id: string;
3375
+ user_is_anonymous?: boolean;
1364
3376
  };
1365
3377
  Returns: boolean;
1366
3378
  };
1367
3379
  link_existing_minor_rep: {
1368
3380
  Args: {
1369
3381
  p_minor_relation: Database["compliance"]["Enums"]["minor_relation"];
1370
- p_user_id: string;
1371
3382
  p_other_relation: string;
3383
+ p_user_id: string;
1372
3384
  };
1373
3385
  Returns: undefined;
1374
3386
  };
1375
3387
  log_phone_verification: {
1376
3388
  Args: {
1377
- p_updated_at: string;
1378
- p_send_code_attempts?: Json;
1379
3389
  p_created_at?: string;
1380
- p_twilio_sid: string;
1381
- p_status: Database["compliance"]["Enums"]["twilio_verification_status"];
1382
3390
  p_phone?: string;
3391
+ p_send_code_attempts?: Json;
3392
+ p_status: Database["compliance"]["Enums"]["twilio_verification_status"];
3393
+ p_twilio_sid: string;
3394
+ p_updated_at: string;
1383
3395
  };
1384
3396
  Returns: undefined;
1385
3397
  };
3398
+ log_system_event: {
3399
+ Args: {
3400
+ p_event_name?: string;
3401
+ p_event_payload?: Json;
3402
+ p_player_id: string;
3403
+ p_source_app: string;
3404
+ p_source_identifier: string;
3405
+ p_source_type: string;
3406
+ p_user_id: string;
3407
+ };
3408
+ Returns: string;
3409
+ };
1386
3410
  search_lounges: {
1387
3411
  Args: {
1388
3412
  search_term: string;
@@ -1390,49 +3414,49 @@ export type Database = {
1390
3414
  };
1391
3415
  Returns: {
1392
3416
  company_name: string;
3417
+ created_at: string;
1393
3418
  id: string;
1394
- user_id: string;
1395
3419
  registration_date: string;
1396
3420
  trade_name: string;
3421
+ user_id: string;
1397
3422
  website: string;
1398
- created_at: string;
1399
3423
  }[];
1400
3424
  };
1401
3425
  search_players: {
1402
3426
  Args: {
3427
+ enforce_preferences?: boolean;
1403
3428
  search_term: string;
1404
3429
  search_type?: string;
1405
- enforce_preferences?: boolean;
1406
3430
  };
1407
3431
  Returns: {
3432
+ birth_date: string;
1408
3433
  created_at: string;
3434
+ first_name: string;
3435
+ id: string;
3436
+ last_name: string;
3437
+ middle_names: string;
1409
3438
  nationality: string;
1410
- pseudonym: string;
1411
3439
  pronouns: Database["compliance"]["Enums"]["pronouns"][];
1412
- id: string;
3440
+ pseudonym: string;
1413
3441
  user_id: string;
1414
- first_name: string;
1415
- middle_names: string;
1416
- last_name: string;
1417
- birth_date: string;
1418
3442
  }[];
1419
3443
  };
1420
3444
  submit_gaming_and_socials_data: {
1421
3445
  Args: {
1422
- p_socials: Json[];
1423
3446
  p_consoles: Json[];
1424
3447
  p_primary_platform: Json;
3448
+ p_socials: Json[];
1425
3449
  };
1426
3450
  Returns: undefined;
1427
3451
  };
1428
3452
  validate_data_update_log_fields: {
1429
3453
  Args: {
1430
- p_new_record?: Record<string, unknown>;
1431
3454
  p_account_type: Database["compliance"]["Enums"]["account_type"];
1432
- p_is_for_minor_rep: boolean;
1433
3455
  p_is_for_branch: boolean;
1434
- p_user_id?: string;
3456
+ p_is_for_minor_rep: boolean;
3457
+ p_new_record?: Record<string, unknown>;
1435
3458
  p_old_record?: Record<string, unknown>;
3459
+ p_user_id?: string;
1436
3460
  };
1437
3461
  Returns: undefined;
1438
3462
  };
@@ -1470,10 +3494,10 @@ export type Database = {
1470
3494
  Functions: {
1471
3495
  graphql: {
1472
3496
  Args: {
1473
- variables?: Json;
1474
- operationName?: string;
1475
3497
  extensions?: Json;
3498
+ operationName?: string;
1476
3499
  query?: string;
3500
+ variables?: Json;
1477
3501
  };
1478
3502
  Returns: Json;
1479
3503
  };
@@ -1487,7 +3511,85 @@ export type Database = {
1487
3511
  };
1488
3512
  public: {
1489
3513
  Tables: {
1490
- consoles: {
3514
+ countries: {
3515
+ Row: {
3516
+ code: string;
3517
+ name: string;
3518
+ };
3519
+ Insert: {
3520
+ code: string;
3521
+ name: string;
3522
+ };
3523
+ Update: {
3524
+ code?: string;
3525
+ name?: string;
3526
+ };
3527
+ Relationships: [];
3528
+ };
3529
+ game_character_games: {
3530
+ Row: {
3531
+ character_id: string;
3532
+ created_at: string | null;
3533
+ game_id: string;
3534
+ };
3535
+ Insert: {
3536
+ character_id: string;
3537
+ created_at?: string | null;
3538
+ game_id: string;
3539
+ };
3540
+ Update: {
3541
+ character_id?: string;
3542
+ created_at?: string | null;
3543
+ game_id?: string;
3544
+ };
3545
+ Relationships: [
3546
+ {
3547
+ foreignKeyName: "public_game_character_games_character_id_fkey";
3548
+ columns: ["character_id"];
3549
+ isOneToOne: false;
3550
+ referencedRelation: "game_characters";
3551
+ referencedColumns: ["id"];
3552
+ },
3553
+ {
3554
+ foreignKeyName: "public_game_character_games_game_id_fkey";
3555
+ columns: ["game_id"];
3556
+ isOneToOne: false;
3557
+ referencedRelation: "games";
3558
+ referencedColumns: ["id"];
3559
+ }
3560
+ ];
3561
+ };
3562
+ game_characters: {
3563
+ Row: {
3564
+ created_at: string | null;
3565
+ display_name: string | null;
3566
+ first_name: string;
3567
+ id: string;
3568
+ last_name: string | null;
3569
+ middle_names: string | null;
3570
+ slug: string;
3571
+ };
3572
+ Insert: {
3573
+ created_at?: string | null;
3574
+ display_name?: string | null;
3575
+ first_name: string;
3576
+ id?: string;
3577
+ last_name?: string | null;
3578
+ middle_names?: string | null;
3579
+ slug: string;
3580
+ };
3581
+ Update: {
3582
+ created_at?: string | null;
3583
+ display_name?: string | null;
3584
+ first_name?: string;
3585
+ id?: string;
3586
+ last_name?: string | null;
3587
+ middle_names?: string | null;
3588
+ slug?: string;
3589
+ };
3590
+ Relationships: [];
3591
+ };
3592
+ game_consoles: {
1491
3593
  Row: {
1492
3594
  abbreviation: string | null;
1493
3595
  generation: number;
@@ -1514,50 +3616,53 @@ export type Database = {
1514
3616
  };
1515
3617
  Relationships: [
1516
3618
  {
1517
- foreignKeyName: "public_consoles_platform_shorthand_fkey";
3619
+ foreignKeyName: "public_game_consoles_platform_shorthand_fkey";
1518
3620
  columns: ["platform_shorthand"];
1519
3621
  isOneToOne: false;
1520
- referencedRelation: "platforms";
3622
+ referencedRelation: "game_platforms";
1521
3623
  referencedColumns: ["shorthand"];
1522
3624
  }
1523
3625
  ];
1524
3626
  };
1525
- countries: {
3627
+ game_platforms: {
1526
3628
  Row: {
1527
- code: string;
1528
3629
  name: string;
3630
+ online_name: string | null;
3631
+ shorthand: string;
1529
3632
  };
1530
3633
  Insert: {
1531
- code: string;
1532
3634
  name: string;
3635
+ online_name?: string | null;
3636
+ shorthand: string;
1533
3637
  };
1534
3638
  Update: {
1535
- code?: string;
1536
3639
  name?: string;
3640
+ online_name?: string | null;
3641
+ shorthand?: string;
1537
3642
  };
1538
3643
  Relationships: [];
1539
3644
  };
1540
3645
  games: {
1541
3646
  Row: {
3647
+ cover_url: string | null;
1542
3648
  genres: string[];
1543
3649
  id: string;
3650
+ initial_release_date: string;
1544
3651
  name: string;
1545
- release_date: string;
1546
- supported: boolean;
1547
3652
  };
1548
3653
  Insert: {
3654
+ cover_url?: string | null;
1549
3655
  genres: string[];
1550
3656
  id?: string;
3657
+ initial_release_date: string;
1551
3658
  name: string;
1552
- release_date: string;
1553
- supported: boolean;
1554
3659
  };
1555
3660
  Update: {
3661
+ cover_url?: string | null;
1556
3662
  genres?: string[];
1557
3663
  id?: string;
3664
+ initial_release_date?: string;
1558
3665
  name?: string;
1559
- release_date?: string;
1560
- supported?: boolean;
1561
3666
  };
1562
3667
  Relationships: [];
1563
3668
  };
@@ -1579,7 +3684,7 @@ export type Database = {
1579
3684
  foreignKeyName: "public_games_consoles_console_id_fkey";
1580
3685
  columns: ["console_id"];
1581
3686
  isOneToOne: false;
1582
- referencedRelation: "consoles";
3687
+ referencedRelation: "game_consoles";
1583
3688
  referencedColumns: ["id"];
1584
3689
  },
1585
3690
  {
@@ -1606,24 +3711,6 @@ export type Database = {
1606
3711
  };
1607
3712
  Relationships: [];
1608
3713
  };
1609
- platforms: {
1610
- Row: {
1611
- name: string;
1612
- online_name: string | null;
1613
- shorthand: string;
1614
- };
1615
- Insert: {
1616
- name: string;
1617
- online_name?: string | null;
1618
- shorthand: string;
1619
- };
1620
- Update: {
1621
- name?: string;
1622
- online_name?: string | null;
1623
- shorthand?: string;
1624
- };
1625
- Relationships: [];
1626
- };
1627
3714
  varsity_institutions: {
1628
3715
  Row: {
1629
3716
  code: string;
@@ -1704,14 +3791,14 @@ export type Database = {
1704
3791
  };
1705
3792
  Returns: {
1706
3793
  birth_date: string;
1707
- pseudonym: string;
1708
3794
  created_at: string;
1709
- id: string;
1710
3795
  first_name: string;
1711
- pronouns: Database["compliance"]["Enums"]["pronouns"][];
1712
- nationality: string;
1713
- middle_names: string;
3796
+ id: string;
1714
3797
  last_name: string;
3798
+ middle_names: string;
3799
+ nationality: string;
3800
+ pronouns: Database["compliance"]["Enums"]["pronouns"][];
3801
+ pseudonym: string;
1715
3802
  }[];
1716
3803
  };
1717
3804
  };
@@ -1943,9 +4030,9 @@ export type Database = {
1943
4030
  can_insert_object: {
1944
4031
  Args: {
1945
4032
  bucketid: string;
4033
+ metadata: Json;
1946
4034
  name: string;
1947
4035
  owner: string;
1948
- metadata: Json;
1949
4036
  };
1950
4037
  Returns: undefined;
1951
4038
  };
@@ -1970,38 +4057,38 @@ export type Database = {
1970
4057
  get_size_by_bucket: {
1971
4058
  Args: Record<PropertyKey, never>;
1972
4059
  Returns: {
1973
- size: number;
1974
4060
  bucket_id: string;
4061
+ size: number;
1975
4062
  }[];
1976
4063
  };
1977
4064
  list_multipart_uploads_with_delimiter: {
1978
4065
  Args: {
1979
4066
  bucket_id: string;
1980
- prefix_param: string;
1981
4067
  delimiter_param: string;
1982
4068
  max_keys?: number;
1983
4069
  next_key_token?: string;
1984
4070
  next_upload_token?: string;
4071
+ prefix_param: string;
1985
4072
  };
1986
4073
  Returns: {
4074
+ created_at: string;
1987
4075
  id: string;
1988
4076
  key: string;
1989
- created_at: string;
1990
4077
  }[];
1991
4078
  };
1992
4079
  list_objects_with_delimiter: {
1993
4080
  Args: {
1994
4081
  bucket_id: string;
1995
- prefix_param: string;
1996
4082
  delimiter_param: string;
1997
4083
  max_keys?: number;
1998
- start_after?: string;
1999
4084
  next_token?: string;
4085
+ prefix_param: string;
4086
+ start_after?: string;
2000
4087
  };
2001
4088
  Returns: {
2002
- name: string;
2003
4089
  id: string;
2004
4090
  metadata: Json;
4091
+ name: string;
2005
4092
  updated_at: string;
2006
4093
  }[];
2007
4094
  };
@@ -2011,22 +4098,22 @@ export type Database = {
2011
4098
  };
2012
4099
  search: {
2013
4100
  Args: {
2014
- sortorder?: string;
2015
- prefix: string;
2016
- sortcolumn?: string;
2017
- search?: string;
2018
- offsets?: number;
4101
+ bucketname: string;
2019
4102
  levels?: number;
2020
4103
  limits?: number;
2021
- bucketname: string;
4104
+ offsets?: number;
4105
+ prefix: string;
4106
+ search?: string;
4107
+ sortcolumn?: string;
4108
+ sortorder?: string;
2022
4109
  };
2023
4110
  Returns: {
2024
4111
  created_at: string;
2025
- updated_at: string;
2026
4112
  id: string;
2027
- name: string;
2028
- metadata: Json;
2029
4113
  last_accessed_at: string;
4114
+ metadata: Json;
4115
+ name: string;
4116
+ updated_at: string;
2030
4117
  }[];
2031
4118
  };
2032
4119
  };
@@ -2038,55 +4125,66 @@ export type Database = {
2038
4125
  };
2039
4126
  };
2040
4127
  };
2041
- type DefaultSchema = Database[Extract<keyof Database, "public">];
4128
+ type DatabaseWithoutInternals = Omit<Database, "__InternalSupabase">;
4129
+ type DefaultSchema = DatabaseWithoutInternals[Extract<keyof Database, "public">];
2042
4130
  export type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) | {
2043
- schema: keyof Database;
4131
+ schema: keyof DatabaseWithoutInternals;
2044
4132
  }, TableName extends DefaultSchemaTableNameOrOptions extends {
2045
- schema: keyof Database;
2046
- } ? keyof (Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & Database[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) : never = never> = DefaultSchemaTableNameOrOptions extends {
2047
- schema: keyof Database;
2048
- } ? (Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & Database[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
4133
+ schema: keyof DatabaseWithoutInternals;
4134
+ } ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) : never = never> = DefaultSchemaTableNameOrOptions extends {
4135
+ schema: keyof DatabaseWithoutInternals;
4136
+ } ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
2049
4137
  Row: infer R;
2050
4138
  } ? R : never : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) ? (DefaultSchema["Tables"] & DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
2051
4139
  Row: infer R;
2052
4140
  } ? R : never : never;
2053
4141
  export type TablesInsert<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
2054
- schema: keyof Database;
4142
+ schema: keyof DatabaseWithoutInternals;
2055
4143
  }, TableName extends DefaultSchemaTableNameOrOptions extends {
2056
- schema: keyof Database;
2057
- } ? keyof Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
2058
- schema: keyof Database;
2059
- } ? Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
4144
+ schema: keyof DatabaseWithoutInternals;
4145
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
4146
+ schema: keyof DatabaseWithoutInternals;
4147
+ } ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
2060
4148
  Insert: infer I;
2061
4149
  } ? I : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
2062
4150
  Insert: infer I;
2063
4151
  } ? I : never : never;
2064
4152
  export type TablesUpdate<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
2065
- schema: keyof Database;
4153
+ schema: keyof DatabaseWithoutInternals;
2066
4154
  }, TableName extends DefaultSchemaTableNameOrOptions extends {
2067
- schema: keyof Database;
2068
- } ? keyof Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
2069
- schema: keyof Database;
2070
- } ? Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
4155
+ schema: keyof DatabaseWithoutInternals;
4156
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
4157
+ schema: keyof DatabaseWithoutInternals;
4158
+ } ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
2071
4159
  Update: infer U;
2072
4160
  } ? U : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
2073
4161
  Update: infer U;
2074
4162
  } ? U : never : never;
2075
4163
  export type Enums<DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] | {
2076
- schema: keyof Database;
4164
+ schema: keyof DatabaseWithoutInternals;
2077
4165
  }, EnumName extends DefaultSchemaEnumNameOrOptions extends {
2078
- schema: keyof Database;
2079
- } ? keyof Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"] : never = never> = DefaultSchemaEnumNameOrOptions extends {
2080
- schema: keyof Database;
2081
- } ? Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName] : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions] : never;
4166
+ schema: keyof DatabaseWithoutInternals;
4167
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"] : never = never> = DefaultSchemaEnumNameOrOptions extends {
4168
+ schema: keyof DatabaseWithoutInternals;
4169
+ } ? DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName] : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions] : never;
2082
4170
  export type CompositeTypes<PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] | {
2083
- schema: keyof Database;
4171
+ schema: keyof DatabaseWithoutInternals;
2084
4172
  }, CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
2085
- schema: keyof Database;
2086
- } ? keyof Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"] : never = never> = PublicCompositeTypeNameOrOptions extends {
2087
- schema: keyof Database;
2088
- } ? Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName] : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions] : never;
4173
+ schema: keyof DatabaseWithoutInternals;
4174
+ } ? keyof DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"] : never = never> = PublicCompositeTypeNameOrOptions extends {
4175
+ schema: keyof DatabaseWithoutInternals;
4176
+ } ? DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName] : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions] : never;
2089
4177
  export declare const Constants: {
4178
+ readonly competitions: {
4179
+ readonly Enums: {
4180
+ readonly event_participant_type: readonly ["player", "team"];
4181
+ readonly event_status: readonly ["scheduled", "active", "completed", "suspended", "cancelled"];
4182
+ readonly phase_registration_status: readonly ["pending", "active", "withdrawn", "disqualified"];
4183
+ readonly phase_type: readonly ["progression", "playoff"];
4184
+ readonly set_length_type: readonly ["first_to", "best_of", "fixed"];
4185
+ readonly set_scoring_type: readonly ["aggregate_score", "match_wins"];
4186
+ };
4187
+ };
2090
4188
  readonly compliance: {
2091
4189
  readonly Enums: {
2092
4190
  readonly account_type: readonly ["player", "lounge"];