@simonarcher/fika-types 1.0.93 → 1.1.1

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.
@@ -0,0 +1,4239 @@
1
+ export type Json = string | number | boolean | null | {
2
+ [key: string]: Json | undefined;
3
+ } | Json[];
4
+ export type Database = {
5
+ __InternalSupabase: {
6
+ PostgrestVersion: "14.1";
7
+ };
8
+ public: {
9
+ Tables: {
10
+ actions: {
11
+ Row: {
12
+ action: string;
13
+ created_at: string | null;
14
+ id: string;
15
+ metadata: Json | null;
16
+ shop_id: string | null;
17
+ user_id: string | null;
18
+ };
19
+ Insert: {
20
+ action: string;
21
+ created_at?: string | null;
22
+ id: string;
23
+ metadata?: Json | null;
24
+ shop_id?: string | null;
25
+ user_id?: string | null;
26
+ };
27
+ Update: {
28
+ action?: string;
29
+ created_at?: string | null;
30
+ id?: string;
31
+ metadata?: Json | null;
32
+ shop_id?: string | null;
33
+ user_id?: string | null;
34
+ };
35
+ Relationships: [
36
+ {
37
+ foreignKeyName: "actions_shop_id_fkey";
38
+ columns: ["shop_id"];
39
+ isOneToOne: false;
40
+ referencedRelation: "shop_stats";
41
+ referencedColumns: ["id"];
42
+ },
43
+ {
44
+ foreignKeyName: "actions_shop_id_fkey";
45
+ columns: ["shop_id"];
46
+ isOneToOne: false;
47
+ referencedRelation: "shops";
48
+ referencedColumns: ["id"];
49
+ },
50
+ {
51
+ foreignKeyName: "actions_user_id_fkey";
52
+ columns: ["user_id"];
53
+ isOneToOne: false;
54
+ referencedRelation: "leaderboard";
55
+ referencedColumns: ["id"];
56
+ },
57
+ {
58
+ foreignKeyName: "actions_user_id_fkey";
59
+ columns: ["user_id"];
60
+ isOneToOne: false;
61
+ referencedRelation: "user_activity_summary";
62
+ referencedColumns: ["id"];
63
+ },
64
+ {
65
+ foreignKeyName: "actions_user_id_fkey";
66
+ columns: ["user_id"];
67
+ isOneToOne: false;
68
+ referencedRelation: "users";
69
+ referencedColumns: ["id"];
70
+ }
71
+ ];
72
+ };
73
+ app_settings: {
74
+ Row: {
75
+ category: string | null;
76
+ created_at: string;
77
+ description: string | null;
78
+ id: string;
79
+ is_public: boolean | null;
80
+ settings: Json | null;
81
+ updated_at: string;
82
+ updated_by: string | null;
83
+ user_count: number | null;
84
+ value: Json;
85
+ };
86
+ Insert: {
87
+ category?: string | null;
88
+ created_at?: string;
89
+ description?: string | null;
90
+ id: string;
91
+ is_public?: boolean | null;
92
+ settings?: Json | null;
93
+ updated_at?: string;
94
+ updated_by?: string | null;
95
+ user_count?: number | null;
96
+ value: Json;
97
+ };
98
+ Update: {
99
+ category?: string | null;
100
+ created_at?: string;
101
+ description?: string | null;
102
+ id?: string;
103
+ is_public?: boolean | null;
104
+ settings?: Json | null;
105
+ updated_at?: string;
106
+ updated_by?: string | null;
107
+ user_count?: number | null;
108
+ value?: Json;
109
+ };
110
+ Relationships: [
111
+ {
112
+ foreignKeyName: "app_settings_updated_by_fkey";
113
+ columns: ["updated_by"];
114
+ isOneToOne: false;
115
+ referencedRelation: "leaderboard";
116
+ referencedColumns: ["id"];
117
+ },
118
+ {
119
+ foreignKeyName: "app_settings_updated_by_fkey";
120
+ columns: ["updated_by"];
121
+ isOneToOne: false;
122
+ referencedRelation: "user_activity_summary";
123
+ referencedColumns: ["id"];
124
+ },
125
+ {
126
+ foreignKeyName: "app_settings_updated_by_fkey";
127
+ columns: ["updated_by"];
128
+ isOneToOne: false;
129
+ referencedRelation: "users";
130
+ referencedColumns: ["id"];
131
+ }
132
+ ];
133
+ };
134
+ assertions: {
135
+ Row: {
136
+ assertion_type: string;
137
+ created_at: string | null;
138
+ display_name: string | null;
139
+ id: string;
140
+ last_updated_at: string | null;
141
+ shop_id: string | null;
142
+ status: string | null;
143
+ subject_id: string;
144
+ threshold: number | null;
145
+ unique_voters: number | null;
146
+ };
147
+ Insert: {
148
+ assertion_type: string;
149
+ created_at?: string | null;
150
+ display_name?: string | null;
151
+ id: string;
152
+ last_updated_at?: string | null;
153
+ shop_id?: string | null;
154
+ status?: string | null;
155
+ subject_id: string;
156
+ threshold?: number | null;
157
+ unique_voters?: number | null;
158
+ };
159
+ Update: {
160
+ assertion_type?: string;
161
+ created_at?: string | null;
162
+ display_name?: string | null;
163
+ id?: string;
164
+ last_updated_at?: string | null;
165
+ shop_id?: string | null;
166
+ status?: string | null;
167
+ subject_id?: string;
168
+ threshold?: number | null;
169
+ unique_voters?: number | null;
170
+ };
171
+ Relationships: [
172
+ {
173
+ foreignKeyName: "assertions_shop_id_fkey";
174
+ columns: ["shop_id"];
175
+ isOneToOne: false;
176
+ referencedRelation: "shop_stats";
177
+ referencedColumns: ["id"];
178
+ },
179
+ {
180
+ foreignKeyName: "assertions_shop_id_fkey";
181
+ columns: ["shop_id"];
182
+ isOneToOne: false;
183
+ referencedRelation: "shops";
184
+ referencedColumns: ["id"];
185
+ }
186
+ ];
187
+ };
188
+ audit_logs: {
189
+ Row: {
190
+ action: string;
191
+ admin_user_id: string | null;
192
+ created_at: string;
193
+ details: Json | null;
194
+ entity_id: string | null;
195
+ entity_type: string | null;
196
+ id: string;
197
+ ip_address: string | null;
198
+ new_value: Json | null;
199
+ old_value: Json | null;
200
+ role: string | null;
201
+ shop_id: string | null;
202
+ success: boolean | null;
203
+ target_email: string | null;
204
+ target_user_id: string | null;
205
+ timestamp: string | null;
206
+ user_agent: string | null;
207
+ user_id: string | null;
208
+ };
209
+ Insert: {
210
+ action: string;
211
+ admin_user_id?: string | null;
212
+ created_at?: string;
213
+ details?: Json | null;
214
+ entity_id?: string | null;
215
+ entity_type?: string | null;
216
+ id?: string;
217
+ ip_address?: string | null;
218
+ new_value?: Json | null;
219
+ old_value?: Json | null;
220
+ role?: string | null;
221
+ shop_id?: string | null;
222
+ success?: boolean | null;
223
+ target_email?: string | null;
224
+ target_user_id?: string | null;
225
+ timestamp?: string | null;
226
+ user_agent?: string | null;
227
+ user_id?: string | null;
228
+ };
229
+ Update: {
230
+ action?: string;
231
+ admin_user_id?: string | null;
232
+ created_at?: string;
233
+ details?: Json | null;
234
+ entity_id?: string | null;
235
+ entity_type?: string | null;
236
+ id?: string;
237
+ ip_address?: string | null;
238
+ new_value?: Json | null;
239
+ old_value?: Json | null;
240
+ role?: string | null;
241
+ shop_id?: string | null;
242
+ success?: boolean | null;
243
+ target_email?: string | null;
244
+ target_user_id?: string | null;
245
+ timestamp?: string | null;
246
+ user_agent?: string | null;
247
+ user_id?: string | null;
248
+ };
249
+ Relationships: [
250
+ {
251
+ foreignKeyName: "audit_logs_user_id_fkey";
252
+ columns: ["user_id"];
253
+ isOneToOne: false;
254
+ referencedRelation: "leaderboard";
255
+ referencedColumns: ["id"];
256
+ },
257
+ {
258
+ foreignKeyName: "audit_logs_user_id_fkey";
259
+ columns: ["user_id"];
260
+ isOneToOne: false;
261
+ referencedRelation: "user_activity_summary";
262
+ referencedColumns: ["id"];
263
+ },
264
+ {
265
+ foreignKeyName: "audit_logs_user_id_fkey";
266
+ columns: ["user_id"];
267
+ isOneToOne: false;
268
+ referencedRelation: "users";
269
+ referencedColumns: ["id"];
270
+ }
271
+ ];
272
+ };
273
+ coffee_bean_submissions: {
274
+ Row: {
275
+ active: boolean | null;
276
+ approved_bean_id: string | null;
277
+ bean_id: string | null;
278
+ bean_name: string | null;
279
+ country: string | null;
280
+ created_at: string;
281
+ decaf_method: string | null;
282
+ id: string;
283
+ image: string | null;
284
+ image_url: string | null;
285
+ is_decaf: boolean | null;
286
+ name: string | null;
287
+ origin: string | null;
288
+ process: string | null;
289
+ processing: string | null;
290
+ review_notes: string | null;
291
+ reviewed_at: string | null;
292
+ reviewed_by: string | null;
293
+ roast_level: string | null;
294
+ roaster_id: string | null;
295
+ shop_id: string | null;
296
+ status: string;
297
+ tasting_notes: string[] | null;
298
+ updated_at: string;
299
+ user_id: string | null;
300
+ };
301
+ Insert: {
302
+ active?: boolean | null;
303
+ approved_bean_id?: string | null;
304
+ bean_id?: string | null;
305
+ bean_name?: string | null;
306
+ country?: string | null;
307
+ created_at?: string;
308
+ decaf_method?: string | null;
309
+ id?: string;
310
+ image?: string | null;
311
+ image_url?: string | null;
312
+ is_decaf?: boolean | null;
313
+ name?: string | null;
314
+ origin?: string | null;
315
+ process?: string | null;
316
+ processing?: string | null;
317
+ review_notes?: string | null;
318
+ reviewed_at?: string | null;
319
+ reviewed_by?: string | null;
320
+ roast_level?: string | null;
321
+ roaster_id?: string | null;
322
+ shop_id?: string | null;
323
+ status?: string;
324
+ tasting_notes?: string[] | null;
325
+ updated_at?: string;
326
+ user_id?: string | null;
327
+ };
328
+ Update: {
329
+ active?: boolean | null;
330
+ approved_bean_id?: string | null;
331
+ bean_id?: string | null;
332
+ bean_name?: string | null;
333
+ country?: string | null;
334
+ created_at?: string;
335
+ decaf_method?: string | null;
336
+ id?: string;
337
+ image?: string | null;
338
+ image_url?: string | null;
339
+ is_decaf?: boolean | null;
340
+ name?: string | null;
341
+ origin?: string | null;
342
+ process?: string | null;
343
+ processing?: string | null;
344
+ review_notes?: string | null;
345
+ reviewed_at?: string | null;
346
+ reviewed_by?: string | null;
347
+ roast_level?: string | null;
348
+ roaster_id?: string | null;
349
+ shop_id?: string | null;
350
+ status?: string;
351
+ tasting_notes?: string[] | null;
352
+ updated_at?: string;
353
+ user_id?: string | null;
354
+ };
355
+ Relationships: [
356
+ {
357
+ foreignKeyName: "coffee_bean_submissions_approved_bean_id_fkey";
358
+ columns: ["approved_bean_id"];
359
+ isOneToOne: false;
360
+ referencedRelation: "coffee_beans";
361
+ referencedColumns: ["id"];
362
+ },
363
+ {
364
+ foreignKeyName: "coffee_bean_submissions_reviewed_by_fkey";
365
+ columns: ["reviewed_by"];
366
+ isOneToOne: false;
367
+ referencedRelation: "leaderboard";
368
+ referencedColumns: ["id"];
369
+ },
370
+ {
371
+ foreignKeyName: "coffee_bean_submissions_reviewed_by_fkey";
372
+ columns: ["reviewed_by"];
373
+ isOneToOne: false;
374
+ referencedRelation: "user_activity_summary";
375
+ referencedColumns: ["id"];
376
+ },
377
+ {
378
+ foreignKeyName: "coffee_bean_submissions_reviewed_by_fkey";
379
+ columns: ["reviewed_by"];
380
+ isOneToOne: false;
381
+ referencedRelation: "users";
382
+ referencedColumns: ["id"];
383
+ },
384
+ {
385
+ foreignKeyName: "coffee_bean_submissions_roaster_id_fkey";
386
+ columns: ["roaster_id"];
387
+ isOneToOne: false;
388
+ referencedRelation: "roasters";
389
+ referencedColumns: ["id"];
390
+ },
391
+ {
392
+ foreignKeyName: "coffee_bean_submissions_shop_id_fkey";
393
+ columns: ["shop_id"];
394
+ isOneToOne: false;
395
+ referencedRelation: "shop_stats";
396
+ referencedColumns: ["id"];
397
+ },
398
+ {
399
+ foreignKeyName: "coffee_bean_submissions_shop_id_fkey";
400
+ columns: ["shop_id"];
401
+ isOneToOne: false;
402
+ referencedRelation: "shops";
403
+ referencedColumns: ["id"];
404
+ },
405
+ {
406
+ foreignKeyName: "coffee_bean_submissions_user_id_fkey";
407
+ columns: ["user_id"];
408
+ isOneToOne: false;
409
+ referencedRelation: "leaderboard";
410
+ referencedColumns: ["id"];
411
+ },
412
+ {
413
+ foreignKeyName: "coffee_bean_submissions_user_id_fkey";
414
+ columns: ["user_id"];
415
+ isOneToOne: false;
416
+ referencedRelation: "user_activity_summary";
417
+ referencedColumns: ["id"];
418
+ },
419
+ {
420
+ foreignKeyName: "coffee_bean_submissions_user_id_fkey";
421
+ columns: ["user_id"];
422
+ isOneToOne: false;
423
+ referencedRelation: "users";
424
+ referencedColumns: ["id"];
425
+ }
426
+ ];
427
+ };
428
+ coffee_beans: {
429
+ Row: {
430
+ active: boolean | null;
431
+ country: string | null;
432
+ created_at: string | null;
433
+ decaf_method: string | null;
434
+ description: string | null;
435
+ elevation: number | null;
436
+ farm_id: string | null;
437
+ id: string;
438
+ image: string | null;
439
+ is_decaf: boolean | null;
440
+ limited_edition: boolean | null;
441
+ name: string | null;
442
+ origin: string | null;
443
+ origins: Json | null;
444
+ processing: string | null;
445
+ region: string | null;
446
+ roaster_id: string | null;
447
+ tasting_notes: string[] | null;
448
+ updated_at: string | null;
449
+ };
450
+ Insert: {
451
+ active?: boolean | null;
452
+ country?: string | null;
453
+ created_at?: string | null;
454
+ decaf_method?: string | null;
455
+ description?: string | null;
456
+ elevation?: number | null;
457
+ farm_id?: string | null;
458
+ id: string;
459
+ image?: string | null;
460
+ is_decaf?: boolean | null;
461
+ limited_edition?: boolean | null;
462
+ name?: string | null;
463
+ origin?: string | null;
464
+ origins?: Json | null;
465
+ processing?: string | null;
466
+ region?: string | null;
467
+ roaster_id?: string | null;
468
+ tasting_notes?: string[] | null;
469
+ updated_at?: string | null;
470
+ };
471
+ Update: {
472
+ active?: boolean | null;
473
+ country?: string | null;
474
+ created_at?: string | null;
475
+ decaf_method?: string | null;
476
+ description?: string | null;
477
+ elevation?: number | null;
478
+ farm_id?: string | null;
479
+ id?: string;
480
+ image?: string | null;
481
+ is_decaf?: boolean | null;
482
+ limited_edition?: boolean | null;
483
+ name?: string | null;
484
+ origin?: string | null;
485
+ origins?: Json | null;
486
+ processing?: string | null;
487
+ region?: string | null;
488
+ roaster_id?: string | null;
489
+ tasting_notes?: string[] | null;
490
+ updated_at?: string | null;
491
+ };
492
+ Relationships: [
493
+ {
494
+ foreignKeyName: "coffee_beans_farm_id_fkey";
495
+ columns: ["farm_id"];
496
+ isOneToOne: false;
497
+ referencedRelation: "farms";
498
+ referencedColumns: ["id"];
499
+ },
500
+ {
501
+ foreignKeyName: "coffee_beans_roaster_id_fkey";
502
+ columns: ["roaster_id"];
503
+ isOneToOne: false;
504
+ referencedRelation: "roasters";
505
+ referencedColumns: ["id"];
506
+ }
507
+ ];
508
+ };
509
+ event_attendees: {
510
+ Row: {
511
+ event_id: string;
512
+ registered_at: string | null;
513
+ status: string | null;
514
+ user_id: string;
515
+ };
516
+ Insert: {
517
+ event_id: string;
518
+ registered_at?: string | null;
519
+ status?: string | null;
520
+ user_id: string;
521
+ };
522
+ Update: {
523
+ event_id?: string;
524
+ registered_at?: string | null;
525
+ status?: string | null;
526
+ user_id?: string;
527
+ };
528
+ Relationships: [
529
+ {
530
+ foreignKeyName: "event_attendees_event_id_fkey";
531
+ columns: ["event_id"];
532
+ isOneToOne: false;
533
+ referencedRelation: "events";
534
+ referencedColumns: ["id"];
535
+ },
536
+ {
537
+ foreignKeyName: "event_attendees_user_id_fkey";
538
+ columns: ["user_id"];
539
+ isOneToOne: false;
540
+ referencedRelation: "leaderboard";
541
+ referencedColumns: ["id"];
542
+ },
543
+ {
544
+ foreignKeyName: "event_attendees_user_id_fkey";
545
+ columns: ["user_id"];
546
+ isOneToOne: false;
547
+ referencedRelation: "user_activity_summary";
548
+ referencedColumns: ["id"];
549
+ },
550
+ {
551
+ foreignKeyName: "event_attendees_user_id_fkey";
552
+ columns: ["user_id"];
553
+ isOneToOne: false;
554
+ referencedRelation: "users";
555
+ referencedColumns: ["id"];
556
+ }
557
+ ];
558
+ };
559
+ event_updates: {
560
+ Row: {
561
+ event_id: string | null;
562
+ id: string;
563
+ message: string | null;
564
+ notification_ids: string[] | null;
565
+ recipient_count: number | null;
566
+ sent_at: string | null;
567
+ sent_by: string | null;
568
+ shop_id: string | null;
569
+ title: string | null;
570
+ };
571
+ Insert: {
572
+ event_id?: string | null;
573
+ id: string;
574
+ message?: string | null;
575
+ notification_ids?: string[] | null;
576
+ recipient_count?: number | null;
577
+ sent_at?: string | null;
578
+ sent_by?: string | null;
579
+ shop_id?: string | null;
580
+ title?: string | null;
581
+ };
582
+ Update: {
583
+ event_id?: string | null;
584
+ id?: string;
585
+ message?: string | null;
586
+ notification_ids?: string[] | null;
587
+ recipient_count?: number | null;
588
+ sent_at?: string | null;
589
+ sent_by?: string | null;
590
+ shop_id?: string | null;
591
+ title?: string | null;
592
+ };
593
+ Relationships: [
594
+ {
595
+ foreignKeyName: "event_updates_event_id_fkey";
596
+ columns: ["event_id"];
597
+ isOneToOne: false;
598
+ referencedRelation: "events";
599
+ referencedColumns: ["id"];
600
+ },
601
+ {
602
+ foreignKeyName: "event_updates_shop_id_fkey";
603
+ columns: ["shop_id"];
604
+ isOneToOne: false;
605
+ referencedRelation: "shop_stats";
606
+ referencedColumns: ["id"];
607
+ },
608
+ {
609
+ foreignKeyName: "event_updates_shop_id_fkey";
610
+ columns: ["shop_id"];
611
+ isOneToOne: false;
612
+ referencedRelation: "shops";
613
+ referencedColumns: ["id"];
614
+ }
615
+ ];
616
+ };
617
+ events: {
618
+ Row: {
619
+ active: boolean | null;
620
+ city: string | null;
621
+ coordinates: Json | null;
622
+ country_code: string | null;
623
+ created_at: string | null;
624
+ cta: string | null;
625
+ date: string | null;
626
+ description: string | null;
627
+ event_url: string | null;
628
+ host_id: string | null;
629
+ id: string;
630
+ image_url: string | null;
631
+ latitude: number | null;
632
+ location_name: string | null;
633
+ longitude: number | null;
634
+ name: string | null;
635
+ spaces: number | null;
636
+ updated_at: string | null;
637
+ url: string | null;
638
+ };
639
+ Insert: {
640
+ active?: boolean | null;
641
+ city?: string | null;
642
+ coordinates?: Json | null;
643
+ country_code?: string | null;
644
+ created_at?: string | null;
645
+ cta?: string | null;
646
+ date?: string | null;
647
+ description?: string | null;
648
+ event_url?: string | null;
649
+ host_id?: string | null;
650
+ id: string;
651
+ image_url?: string | null;
652
+ latitude?: number | null;
653
+ location_name?: string | null;
654
+ longitude?: number | null;
655
+ name?: string | null;
656
+ spaces?: number | null;
657
+ updated_at?: string | null;
658
+ url?: string | null;
659
+ };
660
+ Update: {
661
+ active?: boolean | null;
662
+ city?: string | null;
663
+ coordinates?: Json | null;
664
+ country_code?: string | null;
665
+ created_at?: string | null;
666
+ cta?: string | null;
667
+ date?: string | null;
668
+ description?: string | null;
669
+ event_url?: string | null;
670
+ host_id?: string | null;
671
+ id?: string;
672
+ image_url?: string | null;
673
+ latitude?: number | null;
674
+ location_name?: string | null;
675
+ longitude?: number | null;
676
+ name?: string | null;
677
+ spaces?: number | null;
678
+ updated_at?: string | null;
679
+ url?: string | null;
680
+ };
681
+ Relationships: [
682
+ {
683
+ foreignKeyName: "events_host_id_fkey";
684
+ columns: ["host_id"];
685
+ isOneToOne: false;
686
+ referencedRelation: "shop_stats";
687
+ referencedColumns: ["id"];
688
+ },
689
+ {
690
+ foreignKeyName: "events_host_id_fkey";
691
+ columns: ["host_id"];
692
+ isOneToOne: false;
693
+ referencedRelation: "shops";
694
+ referencedColumns: ["id"];
695
+ }
696
+ ];
697
+ };
698
+ farms: {
699
+ Row: {
700
+ aliases: string[] | null;
701
+ altitude_max: number | null;
702
+ altitude_min: number | null;
703
+ certifications: string[] | null;
704
+ climate_notes: string | null;
705
+ coordinates: Json | null;
706
+ country: string | null;
707
+ created_at: string | null;
708
+ id: string;
709
+ known_for: string | null;
710
+ logo: string | null;
711
+ manager: string | null;
712
+ name: string;
713
+ notes: string | null;
714
+ owner: string | null;
715
+ photos: string[] | null;
716
+ processing_facilities: string[] | null;
717
+ processing_methods: string[] | null;
718
+ region: string | null;
719
+ social_media: Json | null;
720
+ soil_type: string | null;
721
+ subregion: string | null;
722
+ sustainability_practices: string[] | null;
723
+ updated_at: string | null;
724
+ varieties: string[] | null;
725
+ website: string | null;
726
+ };
727
+ Insert: {
728
+ aliases?: string[] | null;
729
+ altitude_max?: number | null;
730
+ altitude_min?: number | null;
731
+ certifications?: string[] | null;
732
+ climate_notes?: string | null;
733
+ coordinates?: Json | null;
734
+ country?: string | null;
735
+ created_at?: string | null;
736
+ id: string;
737
+ known_for?: string | null;
738
+ logo?: string | null;
739
+ manager?: string | null;
740
+ name: string;
741
+ notes?: string | null;
742
+ owner?: string | null;
743
+ photos?: string[] | null;
744
+ processing_facilities?: string[] | null;
745
+ processing_methods?: string[] | null;
746
+ region?: string | null;
747
+ social_media?: Json | null;
748
+ soil_type?: string | null;
749
+ subregion?: string | null;
750
+ sustainability_practices?: string[] | null;
751
+ updated_at?: string | null;
752
+ varieties?: string[] | null;
753
+ website?: string | null;
754
+ };
755
+ Update: {
756
+ aliases?: string[] | null;
757
+ altitude_max?: number | null;
758
+ altitude_min?: number | null;
759
+ certifications?: string[] | null;
760
+ climate_notes?: string | null;
761
+ coordinates?: Json | null;
762
+ country?: string | null;
763
+ created_at?: string | null;
764
+ id?: string;
765
+ known_for?: string | null;
766
+ logo?: string | null;
767
+ manager?: string | null;
768
+ name?: string;
769
+ notes?: string | null;
770
+ owner?: string | null;
771
+ photos?: string[] | null;
772
+ processing_facilities?: string[] | null;
773
+ processing_methods?: string[] | null;
774
+ region?: string | null;
775
+ social_media?: Json | null;
776
+ soil_type?: string | null;
777
+ subregion?: string | null;
778
+ sustainability_practices?: string[] | null;
779
+ updated_at?: string | null;
780
+ varieties?: string[] | null;
781
+ website?: string | null;
782
+ };
783
+ Relationships: [];
784
+ };
785
+ fcm_tokens: {
786
+ Row: {
787
+ created_at: string;
788
+ device_id: string | null;
789
+ device_type: string | null;
790
+ id: string;
791
+ is_active: boolean | null;
792
+ last_used_at: string | null;
793
+ token: string;
794
+ updated_at: string;
795
+ user_id: string;
796
+ };
797
+ Insert: {
798
+ created_at?: string;
799
+ device_id?: string | null;
800
+ device_type?: string | null;
801
+ id?: string;
802
+ is_active?: boolean | null;
803
+ last_used_at?: string | null;
804
+ token: string;
805
+ updated_at?: string;
806
+ user_id: string;
807
+ };
808
+ Update: {
809
+ created_at?: string;
810
+ device_id?: string | null;
811
+ device_type?: string | null;
812
+ id?: string;
813
+ is_active?: boolean | null;
814
+ last_used_at?: string | null;
815
+ token?: string;
816
+ updated_at?: string;
817
+ user_id?: string;
818
+ };
819
+ Relationships: [
820
+ {
821
+ foreignKeyName: "fcm_tokens_user_id_fkey";
822
+ columns: ["user_id"];
823
+ isOneToOne: false;
824
+ referencedRelation: "leaderboard";
825
+ referencedColumns: ["id"];
826
+ },
827
+ {
828
+ foreignKeyName: "fcm_tokens_user_id_fkey";
829
+ columns: ["user_id"];
830
+ isOneToOne: false;
831
+ referencedRelation: "user_activity_summary";
832
+ referencedColumns: ["id"];
833
+ },
834
+ {
835
+ foreignKeyName: "fcm_tokens_user_id_fkey";
836
+ columns: ["user_id"];
837
+ isOneToOne: false;
838
+ referencedRelation: "users";
839
+ referencedColumns: ["id"];
840
+ }
841
+ ];
842
+ };
843
+ franchise_roasters: {
844
+ Row: {
845
+ franchise_id: string;
846
+ roaster_id: string;
847
+ };
848
+ Insert: {
849
+ franchise_id: string;
850
+ roaster_id: string;
851
+ };
852
+ Update: {
853
+ franchise_id?: string;
854
+ roaster_id?: string;
855
+ };
856
+ Relationships: [
857
+ {
858
+ foreignKeyName: "franchise_roasters_franchise_id_fkey";
859
+ columns: ["franchise_id"];
860
+ isOneToOne: false;
861
+ referencedRelation: "franchises";
862
+ referencedColumns: ["id"];
863
+ },
864
+ {
865
+ foreignKeyName: "franchise_roasters_roaster_id_fkey";
866
+ columns: ["roaster_id"];
867
+ isOneToOne: false;
868
+ referencedRelation: "roasters";
869
+ referencedColumns: ["id"];
870
+ }
871
+ ];
872
+ };
873
+ franchises: {
874
+ Row: {
875
+ country_code: string | null;
876
+ cover_image: string | null;
877
+ created_at: string | null;
878
+ description: string | null;
879
+ id: string;
880
+ logo_image: string | null;
881
+ menu: Json | null;
882
+ name: string;
883
+ total_locations: number | null;
884
+ updated_at: string | null;
885
+ website: string | null;
886
+ };
887
+ Insert: {
888
+ country_code?: string | null;
889
+ cover_image?: string | null;
890
+ created_at?: string | null;
891
+ description?: string | null;
892
+ id: string;
893
+ logo_image?: string | null;
894
+ menu?: Json | null;
895
+ name: string;
896
+ total_locations?: number | null;
897
+ updated_at?: string | null;
898
+ website?: string | null;
899
+ };
900
+ Update: {
901
+ country_code?: string | null;
902
+ cover_image?: string | null;
903
+ created_at?: string | null;
904
+ description?: string | null;
905
+ id?: string;
906
+ logo_image?: string | null;
907
+ menu?: Json | null;
908
+ name?: string;
909
+ total_locations?: number | null;
910
+ updated_at?: string | null;
911
+ website?: string | null;
912
+ };
913
+ Relationships: [];
914
+ };
915
+ loyalty_audit_logs: {
916
+ Row: {
917
+ description: string | null;
918
+ event_details: Json | null;
919
+ event_type: string;
920
+ id: string;
921
+ outcome: string | null;
922
+ request_metadata: Json | null;
923
+ severity: string | null;
924
+ shop_id: string | null;
925
+ source: string | null;
926
+ staff_id: string | null;
927
+ timestamp: string | null;
928
+ };
929
+ Insert: {
930
+ description?: string | null;
931
+ event_details?: Json | null;
932
+ event_type: string;
933
+ id: string;
934
+ outcome?: string | null;
935
+ request_metadata?: Json | null;
936
+ severity?: string | null;
937
+ shop_id?: string | null;
938
+ source?: string | null;
939
+ staff_id?: string | null;
940
+ timestamp?: string | null;
941
+ };
942
+ Update: {
943
+ description?: string | null;
944
+ event_details?: Json | null;
945
+ event_type?: string;
946
+ id?: string;
947
+ outcome?: string | null;
948
+ request_metadata?: Json | null;
949
+ severity?: string | null;
950
+ shop_id?: string | null;
951
+ source?: string | null;
952
+ staff_id?: string | null;
953
+ timestamp?: string | null;
954
+ };
955
+ Relationships: [
956
+ {
957
+ foreignKeyName: "loyalty_audit_logs_shop_id_fkey";
958
+ columns: ["shop_id"];
959
+ isOneToOne: false;
960
+ referencedRelation: "shop_stats";
961
+ referencedColumns: ["id"];
962
+ },
963
+ {
964
+ foreignKeyName: "loyalty_audit_logs_shop_id_fkey";
965
+ columns: ["shop_id"];
966
+ isOneToOne: false;
967
+ referencedRelation: "shops";
968
+ referencedColumns: ["id"];
969
+ }
970
+ ];
971
+ };
972
+ loyalty_stamps: {
973
+ Row: {
974
+ created_at: string | null;
975
+ id: string;
976
+ issue_method: string | null;
977
+ issuer_id: string | null;
978
+ redeemed: boolean | null;
979
+ redeemed_at: string | null;
980
+ shop_id: string | null;
981
+ type: string | null;
982
+ updated_at: string | null;
983
+ user_id: string | null;
984
+ valid: boolean | null;
985
+ voucher_id: string | null;
986
+ };
987
+ Insert: {
988
+ created_at?: string | null;
989
+ id: string;
990
+ issue_method?: string | null;
991
+ issuer_id?: string | null;
992
+ redeemed?: boolean | null;
993
+ redeemed_at?: string | null;
994
+ shop_id?: string | null;
995
+ type?: string | null;
996
+ updated_at?: string | null;
997
+ user_id?: string | null;
998
+ valid?: boolean | null;
999
+ voucher_id?: string | null;
1000
+ };
1001
+ Update: {
1002
+ created_at?: string | null;
1003
+ id?: string;
1004
+ issue_method?: string | null;
1005
+ issuer_id?: string | null;
1006
+ redeemed?: boolean | null;
1007
+ redeemed_at?: string | null;
1008
+ shop_id?: string | null;
1009
+ type?: string | null;
1010
+ updated_at?: string | null;
1011
+ user_id?: string | null;
1012
+ valid?: boolean | null;
1013
+ voucher_id?: string | null;
1014
+ };
1015
+ Relationships: [
1016
+ {
1017
+ foreignKeyName: "loyalty_stamps_shop_id_fkey";
1018
+ columns: ["shop_id"];
1019
+ isOneToOne: false;
1020
+ referencedRelation: "shop_stats";
1021
+ referencedColumns: ["id"];
1022
+ },
1023
+ {
1024
+ foreignKeyName: "loyalty_stamps_shop_id_fkey";
1025
+ columns: ["shop_id"];
1026
+ isOneToOne: false;
1027
+ referencedRelation: "shops";
1028
+ referencedColumns: ["id"];
1029
+ },
1030
+ {
1031
+ foreignKeyName: "loyalty_stamps_user_id_fkey";
1032
+ columns: ["user_id"];
1033
+ isOneToOne: false;
1034
+ referencedRelation: "leaderboard";
1035
+ referencedColumns: ["id"];
1036
+ },
1037
+ {
1038
+ foreignKeyName: "loyalty_stamps_user_id_fkey";
1039
+ columns: ["user_id"];
1040
+ isOneToOne: false;
1041
+ referencedRelation: "user_activity_summary";
1042
+ referencedColumns: ["id"];
1043
+ },
1044
+ {
1045
+ foreignKeyName: "loyalty_stamps_user_id_fkey";
1046
+ columns: ["user_id"];
1047
+ isOneToOne: false;
1048
+ referencedRelation: "users";
1049
+ referencedColumns: ["id"];
1050
+ }
1051
+ ];
1052
+ };
1053
+ loyalty_vouchers: {
1054
+ Row: {
1055
+ claim_token: string | null;
1056
+ claim_token_expires_at: string | null;
1057
+ created_at: string | null;
1058
+ id: string;
1059
+ is_open_voucher: boolean | null;
1060
+ platform_reward: Json | null;
1061
+ redeemed: boolean | null;
1062
+ redeemed_at: string | null;
1063
+ redeemed_by: string | null;
1064
+ redemption_location: string | null;
1065
+ reward_description: string | null;
1066
+ reward_type: string | null;
1067
+ security_code: string | null;
1068
+ shop_id: string | null;
1069
+ source: Json | null;
1070
+ stamps: string[] | null;
1071
+ updated_at: string | null;
1072
+ user_id: string | null;
1073
+ valid: boolean | null;
1074
+ voucher_type: string | null;
1075
+ };
1076
+ Insert: {
1077
+ claim_token?: string | null;
1078
+ claim_token_expires_at?: string | null;
1079
+ created_at?: string | null;
1080
+ id: string;
1081
+ is_open_voucher?: boolean | null;
1082
+ platform_reward?: Json | null;
1083
+ redeemed?: boolean | null;
1084
+ redeemed_at?: string | null;
1085
+ redeemed_by?: string | null;
1086
+ redemption_location?: string | null;
1087
+ reward_description?: string | null;
1088
+ reward_type?: string | null;
1089
+ security_code?: string | null;
1090
+ shop_id?: string | null;
1091
+ source?: Json | null;
1092
+ stamps?: string[] | null;
1093
+ updated_at?: string | null;
1094
+ user_id?: string | null;
1095
+ valid?: boolean | null;
1096
+ voucher_type?: string | null;
1097
+ };
1098
+ Update: {
1099
+ claim_token?: string | null;
1100
+ claim_token_expires_at?: string | null;
1101
+ created_at?: string | null;
1102
+ id?: string;
1103
+ is_open_voucher?: boolean | null;
1104
+ platform_reward?: Json | null;
1105
+ redeemed?: boolean | null;
1106
+ redeemed_at?: string | null;
1107
+ redeemed_by?: string | null;
1108
+ redemption_location?: string | null;
1109
+ reward_description?: string | null;
1110
+ reward_type?: string | null;
1111
+ security_code?: string | null;
1112
+ shop_id?: string | null;
1113
+ source?: Json | null;
1114
+ stamps?: string[] | null;
1115
+ updated_at?: string | null;
1116
+ user_id?: string | null;
1117
+ valid?: boolean | null;
1118
+ voucher_type?: string | null;
1119
+ };
1120
+ Relationships: [
1121
+ {
1122
+ foreignKeyName: "loyalty_vouchers_shop_id_fkey";
1123
+ columns: ["shop_id"];
1124
+ isOneToOne: false;
1125
+ referencedRelation: "shop_stats";
1126
+ referencedColumns: ["id"];
1127
+ },
1128
+ {
1129
+ foreignKeyName: "loyalty_vouchers_shop_id_fkey";
1130
+ columns: ["shop_id"];
1131
+ isOneToOne: false;
1132
+ referencedRelation: "shops";
1133
+ referencedColumns: ["id"];
1134
+ },
1135
+ {
1136
+ foreignKeyName: "loyalty_vouchers_user_id_fkey";
1137
+ columns: ["user_id"];
1138
+ isOneToOne: false;
1139
+ referencedRelation: "leaderboard";
1140
+ referencedColumns: ["id"];
1141
+ },
1142
+ {
1143
+ foreignKeyName: "loyalty_vouchers_user_id_fkey";
1144
+ columns: ["user_id"];
1145
+ isOneToOne: false;
1146
+ referencedRelation: "user_activity_summary";
1147
+ referencedColumns: ["id"];
1148
+ },
1149
+ {
1150
+ foreignKeyName: "loyalty_vouchers_user_id_fkey";
1151
+ columns: ["user_id"];
1152
+ isOneToOne: false;
1153
+ referencedRelation: "users";
1154
+ referencedColumns: ["id"];
1155
+ }
1156
+ ];
1157
+ };
1158
+ memberships: {
1159
+ Row: {
1160
+ created_at: string | null;
1161
+ id: string;
1162
+ role: string | null;
1163
+ shop_id: string | null;
1164
+ status: string | null;
1165
+ updated_at: string | null;
1166
+ user_id: string | null;
1167
+ };
1168
+ Insert: {
1169
+ created_at?: string | null;
1170
+ id: string;
1171
+ role?: string | null;
1172
+ shop_id?: string | null;
1173
+ status?: string | null;
1174
+ updated_at?: string | null;
1175
+ user_id?: string | null;
1176
+ };
1177
+ Update: {
1178
+ created_at?: string | null;
1179
+ id?: string;
1180
+ role?: string | null;
1181
+ shop_id?: string | null;
1182
+ status?: string | null;
1183
+ updated_at?: string | null;
1184
+ user_id?: string | null;
1185
+ };
1186
+ Relationships: [
1187
+ {
1188
+ foreignKeyName: "memberships_shop_id_fkey";
1189
+ columns: ["shop_id"];
1190
+ isOneToOne: false;
1191
+ referencedRelation: "shop_stats";
1192
+ referencedColumns: ["id"];
1193
+ },
1194
+ {
1195
+ foreignKeyName: "memberships_shop_id_fkey";
1196
+ columns: ["shop_id"];
1197
+ isOneToOne: false;
1198
+ referencedRelation: "shops";
1199
+ referencedColumns: ["id"];
1200
+ },
1201
+ {
1202
+ foreignKeyName: "memberships_user_id_fkey";
1203
+ columns: ["user_id"];
1204
+ isOneToOne: false;
1205
+ referencedRelation: "leaderboard";
1206
+ referencedColumns: ["id"];
1207
+ },
1208
+ {
1209
+ foreignKeyName: "memberships_user_id_fkey";
1210
+ columns: ["user_id"];
1211
+ isOneToOne: false;
1212
+ referencedRelation: "user_activity_summary";
1213
+ referencedColumns: ["id"];
1214
+ },
1215
+ {
1216
+ foreignKeyName: "memberships_user_id_fkey";
1217
+ columns: ["user_id"];
1218
+ isOneToOne: false;
1219
+ referencedRelation: "users";
1220
+ referencedColumns: ["id"];
1221
+ }
1222
+ ];
1223
+ };
1224
+ news: {
1225
+ Row: {
1226
+ author_id: string | null;
1227
+ body: string | null;
1228
+ category: string | null;
1229
+ content: string | null;
1230
+ cover_image_url: string | null;
1231
+ created_at: string;
1232
+ featured: boolean | null;
1233
+ filter: string | null;
1234
+ id: string;
1235
+ image: string | null;
1236
+ is_published: boolean | null;
1237
+ metadata: Json | null;
1238
+ posted_by: string | null;
1239
+ published_at: string | null;
1240
+ shop_id: string | null;
1241
+ slug: string | null;
1242
+ summary: string | null;
1243
+ tags: string[] | null;
1244
+ title: string | null;
1245
+ type: string | null;
1246
+ updated_at: string;
1247
+ view_count: number | null;
1248
+ };
1249
+ Insert: {
1250
+ author_id?: string | null;
1251
+ body?: string | null;
1252
+ category?: string | null;
1253
+ content?: string | null;
1254
+ cover_image_url?: string | null;
1255
+ created_at?: string;
1256
+ featured?: boolean | null;
1257
+ filter?: string | null;
1258
+ id?: string;
1259
+ image?: string | null;
1260
+ is_published?: boolean | null;
1261
+ metadata?: Json | null;
1262
+ posted_by?: string | null;
1263
+ published_at?: string | null;
1264
+ shop_id?: string | null;
1265
+ slug?: string | null;
1266
+ summary?: string | null;
1267
+ tags?: string[] | null;
1268
+ title?: string | null;
1269
+ type?: string | null;
1270
+ updated_at?: string;
1271
+ view_count?: number | null;
1272
+ };
1273
+ Update: {
1274
+ author_id?: string | null;
1275
+ body?: string | null;
1276
+ category?: string | null;
1277
+ content?: string | null;
1278
+ cover_image_url?: string | null;
1279
+ created_at?: string;
1280
+ featured?: boolean | null;
1281
+ filter?: string | null;
1282
+ id?: string;
1283
+ image?: string | null;
1284
+ is_published?: boolean | null;
1285
+ metadata?: Json | null;
1286
+ posted_by?: string | null;
1287
+ published_at?: string | null;
1288
+ shop_id?: string | null;
1289
+ slug?: string | null;
1290
+ summary?: string | null;
1291
+ tags?: string[] | null;
1292
+ title?: string | null;
1293
+ type?: string | null;
1294
+ updated_at?: string;
1295
+ view_count?: number | null;
1296
+ };
1297
+ Relationships: [
1298
+ {
1299
+ foreignKeyName: "news_author_id_fkey";
1300
+ columns: ["author_id"];
1301
+ isOneToOne: false;
1302
+ referencedRelation: "leaderboard";
1303
+ referencedColumns: ["id"];
1304
+ },
1305
+ {
1306
+ foreignKeyName: "news_author_id_fkey";
1307
+ columns: ["author_id"];
1308
+ isOneToOne: false;
1309
+ referencedRelation: "user_activity_summary";
1310
+ referencedColumns: ["id"];
1311
+ },
1312
+ {
1313
+ foreignKeyName: "news_author_id_fkey";
1314
+ columns: ["author_id"];
1315
+ isOneToOne: false;
1316
+ referencedRelation: "users";
1317
+ referencedColumns: ["id"];
1318
+ }
1319
+ ];
1320
+ };
1321
+ notification_templates: {
1322
+ Row: {
1323
+ body_template: string | null;
1324
+ created_at: string;
1325
+ default_data: Json | null;
1326
+ default_link: string | null;
1327
+ icon: string | null;
1328
+ id: string;
1329
+ is_active: boolean | null;
1330
+ name: string | null;
1331
+ title_template: string | null;
1332
+ type: string | null;
1333
+ updated_at: string;
1334
+ };
1335
+ Insert: {
1336
+ body_template?: string | null;
1337
+ created_at?: string;
1338
+ default_data?: Json | null;
1339
+ default_link?: string | null;
1340
+ icon?: string | null;
1341
+ id: string;
1342
+ is_active?: boolean | null;
1343
+ name?: string | null;
1344
+ title_template?: string | null;
1345
+ type?: string | null;
1346
+ updated_at?: string;
1347
+ };
1348
+ Update: {
1349
+ body_template?: string | null;
1350
+ created_at?: string;
1351
+ default_data?: Json | null;
1352
+ default_link?: string | null;
1353
+ icon?: string | null;
1354
+ id?: string;
1355
+ is_active?: boolean | null;
1356
+ name?: string | null;
1357
+ title_template?: string | null;
1358
+ type?: string | null;
1359
+ updated_at?: string;
1360
+ };
1361
+ Relationships: [];
1362
+ };
1363
+ notifications: {
1364
+ Row: {
1365
+ action_url: string | null;
1366
+ body: string | null;
1367
+ created_at: string;
1368
+ data: Json | null;
1369
+ id: string;
1370
+ image_url: string | null;
1371
+ read: boolean | null;
1372
+ read_at: string | null;
1373
+ title: string;
1374
+ type: string;
1375
+ user_id: string;
1376
+ };
1377
+ Insert: {
1378
+ action_url?: string | null;
1379
+ body?: string | null;
1380
+ created_at?: string;
1381
+ data?: Json | null;
1382
+ id?: string;
1383
+ image_url?: string | null;
1384
+ read?: boolean | null;
1385
+ read_at?: string | null;
1386
+ title: string;
1387
+ type: string;
1388
+ user_id: string;
1389
+ };
1390
+ Update: {
1391
+ action_url?: string | null;
1392
+ body?: string | null;
1393
+ created_at?: string;
1394
+ data?: Json | null;
1395
+ id?: string;
1396
+ image_url?: string | null;
1397
+ read?: boolean | null;
1398
+ read_at?: string | null;
1399
+ title?: string;
1400
+ type?: string;
1401
+ user_id?: string;
1402
+ };
1403
+ Relationships: [
1404
+ {
1405
+ foreignKeyName: "notifications_user_id_fkey";
1406
+ columns: ["user_id"];
1407
+ isOneToOne: false;
1408
+ referencedRelation: "leaderboard";
1409
+ referencedColumns: ["id"];
1410
+ },
1411
+ {
1412
+ foreignKeyName: "notifications_user_id_fkey";
1413
+ columns: ["user_id"];
1414
+ isOneToOne: false;
1415
+ referencedRelation: "user_activity_summary";
1416
+ referencedColumns: ["id"];
1417
+ },
1418
+ {
1419
+ foreignKeyName: "notifications_user_id_fkey";
1420
+ columns: ["user_id"];
1421
+ isOneToOne: false;
1422
+ referencedRelation: "users";
1423
+ referencedColumns: ["id"];
1424
+ }
1425
+ ];
1426
+ };
1427
+ points: {
1428
+ Row: {
1429
+ action: string;
1430
+ created_at: string | null;
1431
+ id: string;
1432
+ metadata: Json | null;
1433
+ points: number;
1434
+ user_id: string | null;
1435
+ };
1436
+ Insert: {
1437
+ action: string;
1438
+ created_at?: string | null;
1439
+ id: string;
1440
+ metadata?: Json | null;
1441
+ points: number;
1442
+ user_id?: string | null;
1443
+ };
1444
+ Update: {
1445
+ action?: string;
1446
+ created_at?: string | null;
1447
+ id?: string;
1448
+ metadata?: Json | null;
1449
+ points?: number;
1450
+ user_id?: string | null;
1451
+ };
1452
+ Relationships: [
1453
+ {
1454
+ foreignKeyName: "points_user_id_fkey";
1455
+ columns: ["user_id"];
1456
+ isOneToOne: false;
1457
+ referencedRelation: "leaderboard";
1458
+ referencedColumns: ["id"];
1459
+ },
1460
+ {
1461
+ foreignKeyName: "points_user_id_fkey";
1462
+ columns: ["user_id"];
1463
+ isOneToOne: false;
1464
+ referencedRelation: "user_activity_summary";
1465
+ referencedColumns: ["id"];
1466
+ },
1467
+ {
1468
+ foreignKeyName: "points_user_id_fkey";
1469
+ columns: ["user_id"];
1470
+ isOneToOne: false;
1471
+ referencedRelation: "users";
1472
+ referencedColumns: ["id"];
1473
+ }
1474
+ ];
1475
+ };
1476
+ quest_participants: {
1477
+ Row: {
1478
+ completed: boolean | null;
1479
+ completed_at: string | null;
1480
+ joined_at: string | null;
1481
+ progress: Json | null;
1482
+ quest_id: string;
1483
+ user_id: string;
1484
+ };
1485
+ Insert: {
1486
+ completed?: boolean | null;
1487
+ completed_at?: string | null;
1488
+ joined_at?: string | null;
1489
+ progress?: Json | null;
1490
+ quest_id: string;
1491
+ user_id: string;
1492
+ };
1493
+ Update: {
1494
+ completed?: boolean | null;
1495
+ completed_at?: string | null;
1496
+ joined_at?: string | null;
1497
+ progress?: Json | null;
1498
+ quest_id?: string;
1499
+ user_id?: string;
1500
+ };
1501
+ Relationships: [
1502
+ {
1503
+ foreignKeyName: "quest_participants_quest_id_fkey";
1504
+ columns: ["quest_id"];
1505
+ isOneToOne: false;
1506
+ referencedRelation: "quests";
1507
+ referencedColumns: ["id"];
1508
+ },
1509
+ {
1510
+ foreignKeyName: "quest_participants_user_id_fkey";
1511
+ columns: ["user_id"];
1512
+ isOneToOne: false;
1513
+ referencedRelation: "leaderboard";
1514
+ referencedColumns: ["id"];
1515
+ },
1516
+ {
1517
+ foreignKeyName: "quest_participants_user_id_fkey";
1518
+ columns: ["user_id"];
1519
+ isOneToOne: false;
1520
+ referencedRelation: "user_activity_summary";
1521
+ referencedColumns: ["id"];
1522
+ },
1523
+ {
1524
+ foreignKeyName: "quest_participants_user_id_fkey";
1525
+ columns: ["user_id"];
1526
+ isOneToOne: false;
1527
+ referencedRelation: "users";
1528
+ referencedColumns: ["id"];
1529
+ }
1530
+ ];
1531
+ };
1532
+ quests: {
1533
+ Row: {
1534
+ city: string | null;
1535
+ completion_bonus_points: number | null;
1536
+ country_code: string | null;
1537
+ cover_image: string | null;
1538
+ created_at: string | null;
1539
+ created_by: string | null;
1540
+ description: string | null;
1541
+ difficulty: string | null;
1542
+ end_date: string | null;
1543
+ estimated_duration: number | null;
1544
+ geographic_scope: string | null;
1545
+ id: string;
1546
+ requirements: Json | null;
1547
+ rewards: Json | null;
1548
+ shop_actions: Json | null;
1549
+ start_date: string | null;
1550
+ status: string | null;
1551
+ tags: string[] | null;
1552
+ title: string | null;
1553
+ total_completions: number | null;
1554
+ total_participants: number | null;
1555
+ type: string | null;
1556
+ updated_at: string | null;
1557
+ };
1558
+ Insert: {
1559
+ city?: string | null;
1560
+ completion_bonus_points?: number | null;
1561
+ country_code?: string | null;
1562
+ cover_image?: string | null;
1563
+ created_at?: string | null;
1564
+ created_by?: string | null;
1565
+ description?: string | null;
1566
+ difficulty?: string | null;
1567
+ end_date?: string | null;
1568
+ estimated_duration?: number | null;
1569
+ geographic_scope?: string | null;
1570
+ id: string;
1571
+ requirements?: Json | null;
1572
+ rewards?: Json | null;
1573
+ shop_actions?: Json | null;
1574
+ start_date?: string | null;
1575
+ status?: string | null;
1576
+ tags?: string[] | null;
1577
+ title?: string | null;
1578
+ total_completions?: number | null;
1579
+ total_participants?: number | null;
1580
+ type?: string | null;
1581
+ updated_at?: string | null;
1582
+ };
1583
+ Update: {
1584
+ city?: string | null;
1585
+ completion_bonus_points?: number | null;
1586
+ country_code?: string | null;
1587
+ cover_image?: string | null;
1588
+ created_at?: string | null;
1589
+ created_by?: string | null;
1590
+ description?: string | null;
1591
+ difficulty?: string | null;
1592
+ end_date?: string | null;
1593
+ estimated_duration?: number | null;
1594
+ geographic_scope?: string | null;
1595
+ id?: string;
1596
+ requirements?: Json | null;
1597
+ rewards?: Json | null;
1598
+ shop_actions?: Json | null;
1599
+ start_date?: string | null;
1600
+ status?: string | null;
1601
+ tags?: string[] | null;
1602
+ title?: string | null;
1603
+ total_completions?: number | null;
1604
+ total_participants?: number | null;
1605
+ type?: string | null;
1606
+ updated_at?: string | null;
1607
+ };
1608
+ Relationships: [];
1609
+ };
1610
+ quiz_results: {
1611
+ Row: {
1612
+ answers: Json;
1613
+ completed_at: string;
1614
+ created_at: string;
1615
+ email: string | null;
1616
+ id: string;
1617
+ persona: Json | null;
1618
+ quiz_type: string | null;
1619
+ recommended_shop_id: string | null;
1620
+ recommended_shop_name: string | null;
1621
+ result: Json | null;
1622
+ score: number | null;
1623
+ updated_at: string | null;
1624
+ user_city: string | null;
1625
+ user_id: string;
1626
+ user_name: string | null;
1627
+ };
1628
+ Insert: {
1629
+ answers: Json;
1630
+ completed_at?: string;
1631
+ created_at?: string;
1632
+ email?: string | null;
1633
+ id?: string;
1634
+ persona?: Json | null;
1635
+ quiz_type?: string | null;
1636
+ recommended_shop_id?: string | null;
1637
+ recommended_shop_name?: string | null;
1638
+ result?: Json | null;
1639
+ score?: number | null;
1640
+ updated_at?: string | null;
1641
+ user_city?: string | null;
1642
+ user_id: string;
1643
+ user_name?: string | null;
1644
+ };
1645
+ Update: {
1646
+ answers?: Json;
1647
+ completed_at?: string;
1648
+ created_at?: string;
1649
+ email?: string | null;
1650
+ id?: string;
1651
+ persona?: Json | null;
1652
+ quiz_type?: string | null;
1653
+ recommended_shop_id?: string | null;
1654
+ recommended_shop_name?: string | null;
1655
+ result?: Json | null;
1656
+ score?: number | null;
1657
+ updated_at?: string | null;
1658
+ user_city?: string | null;
1659
+ user_id?: string;
1660
+ user_name?: string | null;
1661
+ };
1662
+ Relationships: [
1663
+ {
1664
+ foreignKeyName: "quiz_results_user_id_fkey";
1665
+ columns: ["user_id"];
1666
+ isOneToOne: false;
1667
+ referencedRelation: "leaderboard";
1668
+ referencedColumns: ["id"];
1669
+ },
1670
+ {
1671
+ foreignKeyName: "quiz_results_user_id_fkey";
1672
+ columns: ["user_id"];
1673
+ isOneToOne: false;
1674
+ referencedRelation: "user_activity_summary";
1675
+ referencedColumns: ["id"];
1676
+ },
1677
+ {
1678
+ foreignKeyName: "quiz_results_user_id_fkey";
1679
+ columns: ["user_id"];
1680
+ isOneToOne: false;
1681
+ referencedRelation: "users";
1682
+ referencedColumns: ["id"];
1683
+ }
1684
+ ];
1685
+ };
1686
+ report_actions: {
1687
+ Row: {
1688
+ action_by: string;
1689
+ action_type: string;
1690
+ case_id: string | null;
1691
+ created_at: string;
1692
+ id: string;
1693
+ notes: string | null;
1694
+ report_id: string | null;
1695
+ };
1696
+ Insert: {
1697
+ action_by: string;
1698
+ action_type: string;
1699
+ case_id?: string | null;
1700
+ created_at?: string;
1701
+ id?: string;
1702
+ notes?: string | null;
1703
+ report_id?: string | null;
1704
+ };
1705
+ Update: {
1706
+ action_by?: string;
1707
+ action_type?: string;
1708
+ case_id?: string | null;
1709
+ created_at?: string;
1710
+ id?: string;
1711
+ notes?: string | null;
1712
+ report_id?: string | null;
1713
+ };
1714
+ Relationships: [
1715
+ {
1716
+ foreignKeyName: "report_actions_action_by_fkey";
1717
+ columns: ["action_by"];
1718
+ isOneToOne: false;
1719
+ referencedRelation: "leaderboard";
1720
+ referencedColumns: ["id"];
1721
+ },
1722
+ {
1723
+ foreignKeyName: "report_actions_action_by_fkey";
1724
+ columns: ["action_by"];
1725
+ isOneToOne: false;
1726
+ referencedRelation: "user_activity_summary";
1727
+ referencedColumns: ["id"];
1728
+ },
1729
+ {
1730
+ foreignKeyName: "report_actions_action_by_fkey";
1731
+ columns: ["action_by"];
1732
+ isOneToOne: false;
1733
+ referencedRelation: "users";
1734
+ referencedColumns: ["id"];
1735
+ },
1736
+ {
1737
+ foreignKeyName: "report_actions_case_id_fkey";
1738
+ columns: ["case_id"];
1739
+ isOneToOne: false;
1740
+ referencedRelation: "report_cases";
1741
+ referencedColumns: ["id"];
1742
+ },
1743
+ {
1744
+ foreignKeyName: "report_actions_report_id_fkey";
1745
+ columns: ["report_id"];
1746
+ isOneToOne: false;
1747
+ referencedRelation: "reports";
1748
+ referencedColumns: ["id"];
1749
+ }
1750
+ ];
1751
+ };
1752
+ report_cases: {
1753
+ Row: {
1754
+ assigned_to: string | null;
1755
+ content_user_id: string | null;
1756
+ created_at: string;
1757
+ description: string | null;
1758
+ entity_id: string | null;
1759
+ entity_type: string | null;
1760
+ id: string;
1761
+ priority: string | null;
1762
+ report_count: number | null;
1763
+ reported_by: Json | null;
1764
+ reported_content: string | null;
1765
+ reported_item_id: string | null;
1766
+ resolution: string | null;
1767
+ resolved_at: string | null;
1768
+ resolved_by: string | null;
1769
+ status: string;
1770
+ title: string | null;
1771
+ updated_at: string;
1772
+ };
1773
+ Insert: {
1774
+ assigned_to?: string | null;
1775
+ content_user_id?: string | null;
1776
+ created_at?: string;
1777
+ description?: string | null;
1778
+ entity_id?: string | null;
1779
+ entity_type?: string | null;
1780
+ id?: string;
1781
+ priority?: string | null;
1782
+ report_count?: number | null;
1783
+ reported_by?: Json | null;
1784
+ reported_content?: string | null;
1785
+ reported_item_id?: string | null;
1786
+ resolution?: string | null;
1787
+ resolved_at?: string | null;
1788
+ resolved_by?: string | null;
1789
+ status?: string;
1790
+ title?: string | null;
1791
+ updated_at?: string;
1792
+ };
1793
+ Update: {
1794
+ assigned_to?: string | null;
1795
+ content_user_id?: string | null;
1796
+ created_at?: string;
1797
+ description?: string | null;
1798
+ entity_id?: string | null;
1799
+ entity_type?: string | null;
1800
+ id?: string;
1801
+ priority?: string | null;
1802
+ report_count?: number | null;
1803
+ reported_by?: Json | null;
1804
+ reported_content?: string | null;
1805
+ reported_item_id?: string | null;
1806
+ resolution?: string | null;
1807
+ resolved_at?: string | null;
1808
+ resolved_by?: string | null;
1809
+ status?: string;
1810
+ title?: string | null;
1811
+ updated_at?: string;
1812
+ };
1813
+ Relationships: [
1814
+ {
1815
+ foreignKeyName: "report_cases_assigned_to_fkey";
1816
+ columns: ["assigned_to"];
1817
+ isOneToOne: false;
1818
+ referencedRelation: "leaderboard";
1819
+ referencedColumns: ["id"];
1820
+ },
1821
+ {
1822
+ foreignKeyName: "report_cases_assigned_to_fkey";
1823
+ columns: ["assigned_to"];
1824
+ isOneToOne: false;
1825
+ referencedRelation: "user_activity_summary";
1826
+ referencedColumns: ["id"];
1827
+ },
1828
+ {
1829
+ foreignKeyName: "report_cases_assigned_to_fkey";
1830
+ columns: ["assigned_to"];
1831
+ isOneToOne: false;
1832
+ referencedRelation: "users";
1833
+ referencedColumns: ["id"];
1834
+ },
1835
+ {
1836
+ foreignKeyName: "report_cases_resolved_by_fkey";
1837
+ columns: ["resolved_by"];
1838
+ isOneToOne: false;
1839
+ referencedRelation: "leaderboard";
1840
+ referencedColumns: ["id"];
1841
+ },
1842
+ {
1843
+ foreignKeyName: "report_cases_resolved_by_fkey";
1844
+ columns: ["resolved_by"];
1845
+ isOneToOne: false;
1846
+ referencedRelation: "user_activity_summary";
1847
+ referencedColumns: ["id"];
1848
+ },
1849
+ {
1850
+ foreignKeyName: "report_cases_resolved_by_fkey";
1851
+ columns: ["resolved_by"];
1852
+ isOneToOne: false;
1853
+ referencedRelation: "users";
1854
+ referencedColumns: ["id"];
1855
+ }
1856
+ ];
1857
+ };
1858
+ reports: {
1859
+ Row: {
1860
+ assigned_to: string | null;
1861
+ case_id: string | null;
1862
+ created_at: string;
1863
+ description: string | null;
1864
+ entity_id: string | null;
1865
+ entity_type: string | null;
1866
+ evidence_urls: string[] | null;
1867
+ id: string;
1868
+ priority: string | null;
1869
+ reason: string | null;
1870
+ reported_by_user_id: string | null;
1871
+ reported_content: string | null;
1872
+ reported_item_id: string | null;
1873
+ reporter_id: string | null;
1874
+ status: string;
1875
+ updated_at: string;
1876
+ };
1877
+ Insert: {
1878
+ assigned_to?: string | null;
1879
+ case_id?: string | null;
1880
+ created_at?: string;
1881
+ description?: string | null;
1882
+ entity_id?: string | null;
1883
+ entity_type?: string | null;
1884
+ evidence_urls?: string[] | null;
1885
+ id?: string;
1886
+ priority?: string | null;
1887
+ reason?: string | null;
1888
+ reported_by_user_id?: string | null;
1889
+ reported_content?: string | null;
1890
+ reported_item_id?: string | null;
1891
+ reporter_id?: string | null;
1892
+ status?: string;
1893
+ updated_at?: string;
1894
+ };
1895
+ Update: {
1896
+ assigned_to?: string | null;
1897
+ case_id?: string | null;
1898
+ created_at?: string;
1899
+ description?: string | null;
1900
+ entity_id?: string | null;
1901
+ entity_type?: string | null;
1902
+ evidence_urls?: string[] | null;
1903
+ id?: string;
1904
+ priority?: string | null;
1905
+ reason?: string | null;
1906
+ reported_by_user_id?: string | null;
1907
+ reported_content?: string | null;
1908
+ reported_item_id?: string | null;
1909
+ reporter_id?: string | null;
1910
+ status?: string;
1911
+ updated_at?: string;
1912
+ };
1913
+ Relationships: [
1914
+ {
1915
+ foreignKeyName: "reports_assigned_to_fkey";
1916
+ columns: ["assigned_to"];
1917
+ isOneToOne: false;
1918
+ referencedRelation: "leaderboard";
1919
+ referencedColumns: ["id"];
1920
+ },
1921
+ {
1922
+ foreignKeyName: "reports_assigned_to_fkey";
1923
+ columns: ["assigned_to"];
1924
+ isOneToOne: false;
1925
+ referencedRelation: "user_activity_summary";
1926
+ referencedColumns: ["id"];
1927
+ },
1928
+ {
1929
+ foreignKeyName: "reports_assigned_to_fkey";
1930
+ columns: ["assigned_to"];
1931
+ isOneToOne: false;
1932
+ referencedRelation: "users";
1933
+ referencedColumns: ["id"];
1934
+ },
1935
+ {
1936
+ foreignKeyName: "reports_case_id_fkey";
1937
+ columns: ["case_id"];
1938
+ isOneToOne: false;
1939
+ referencedRelation: "report_cases";
1940
+ referencedColumns: ["id"];
1941
+ },
1942
+ {
1943
+ foreignKeyName: "reports_reporter_id_fkey";
1944
+ columns: ["reporter_id"];
1945
+ isOneToOne: false;
1946
+ referencedRelation: "leaderboard";
1947
+ referencedColumns: ["id"];
1948
+ },
1949
+ {
1950
+ foreignKeyName: "reports_reporter_id_fkey";
1951
+ columns: ["reporter_id"];
1952
+ isOneToOne: false;
1953
+ referencedRelation: "user_activity_summary";
1954
+ referencedColumns: ["id"];
1955
+ },
1956
+ {
1957
+ foreignKeyName: "reports_reporter_id_fkey";
1958
+ columns: ["reporter_id"];
1959
+ isOneToOne: false;
1960
+ referencedRelation: "users";
1961
+ referencedColumns: ["id"];
1962
+ }
1963
+ ];
1964
+ };
1965
+ reviews: {
1966
+ Row: {
1967
+ brew_sightings: string[] | null;
1968
+ craft_perception: number | null;
1969
+ craft_rating: number | null;
1970
+ created_at: string | null;
1971
+ evidence: Json | null;
1972
+ id: string;
1973
+ image_url: string | null;
1974
+ ratings: Json | null;
1975
+ reported: boolean | null;
1976
+ reported_by: string | null;
1977
+ review_text: string | null;
1978
+ roaster_sightings: string[] | null;
1979
+ shop_id: string | null;
1980
+ user_id: string | null;
1981
+ };
1982
+ Insert: {
1983
+ brew_sightings?: string[] | null;
1984
+ craft_perception?: number | null;
1985
+ craft_rating?: number | null;
1986
+ created_at?: string | null;
1987
+ evidence?: Json | null;
1988
+ id: string;
1989
+ image_url?: string | null;
1990
+ ratings?: Json | null;
1991
+ reported?: boolean | null;
1992
+ reported_by?: string | null;
1993
+ review_text?: string | null;
1994
+ roaster_sightings?: string[] | null;
1995
+ shop_id?: string | null;
1996
+ user_id?: string | null;
1997
+ };
1998
+ Update: {
1999
+ brew_sightings?: string[] | null;
2000
+ craft_perception?: number | null;
2001
+ craft_rating?: number | null;
2002
+ created_at?: string | null;
2003
+ evidence?: Json | null;
2004
+ id?: string;
2005
+ image_url?: string | null;
2006
+ ratings?: Json | null;
2007
+ reported?: boolean | null;
2008
+ reported_by?: string | null;
2009
+ review_text?: string | null;
2010
+ roaster_sightings?: string[] | null;
2011
+ shop_id?: string | null;
2012
+ user_id?: string | null;
2013
+ };
2014
+ Relationships: [
2015
+ {
2016
+ foreignKeyName: "reviews_shop_id_fkey";
2017
+ columns: ["shop_id"];
2018
+ isOneToOne: false;
2019
+ referencedRelation: "shop_stats";
2020
+ referencedColumns: ["id"];
2021
+ },
2022
+ {
2023
+ foreignKeyName: "reviews_shop_id_fkey";
2024
+ columns: ["shop_id"];
2025
+ isOneToOne: false;
2026
+ referencedRelation: "shops";
2027
+ referencedColumns: ["id"];
2028
+ },
2029
+ {
2030
+ foreignKeyName: "reviews_user_id_fkey";
2031
+ columns: ["user_id"];
2032
+ isOneToOne: false;
2033
+ referencedRelation: "leaderboard";
2034
+ referencedColumns: ["id"];
2035
+ },
2036
+ {
2037
+ foreignKeyName: "reviews_user_id_fkey";
2038
+ columns: ["user_id"];
2039
+ isOneToOne: false;
2040
+ referencedRelation: "user_activity_summary";
2041
+ referencedColumns: ["id"];
2042
+ },
2043
+ {
2044
+ foreignKeyName: "reviews_user_id_fkey";
2045
+ columns: ["user_id"];
2046
+ isOneToOne: false;
2047
+ referencedRelation: "users";
2048
+ referencedColumns: ["id"];
2049
+ }
2050
+ ];
2051
+ };
2052
+ rewards: {
2053
+ Row: {
2054
+ created_at: string | null;
2055
+ id: string;
2056
+ metadata: Json | null;
2057
+ reward_action: string;
2058
+ reward_category: string | null;
2059
+ user_id: string | null;
2060
+ };
2061
+ Insert: {
2062
+ created_at?: string | null;
2063
+ id: string;
2064
+ metadata?: Json | null;
2065
+ reward_action: string;
2066
+ reward_category?: string | null;
2067
+ user_id?: string | null;
2068
+ };
2069
+ Update: {
2070
+ created_at?: string | null;
2071
+ id?: string;
2072
+ metadata?: Json | null;
2073
+ reward_action?: string;
2074
+ reward_category?: string | null;
2075
+ user_id?: string | null;
2076
+ };
2077
+ Relationships: [
2078
+ {
2079
+ foreignKeyName: "rewards_user_id_fkey";
2080
+ columns: ["user_id"];
2081
+ isOneToOne: false;
2082
+ referencedRelation: "leaderboard";
2083
+ referencedColumns: ["id"];
2084
+ },
2085
+ {
2086
+ foreignKeyName: "rewards_user_id_fkey";
2087
+ columns: ["user_id"];
2088
+ isOneToOne: false;
2089
+ referencedRelation: "user_activity_summary";
2090
+ referencedColumns: ["id"];
2091
+ },
2092
+ {
2093
+ foreignKeyName: "rewards_user_id_fkey";
2094
+ columns: ["user_id"];
2095
+ isOneToOne: false;
2096
+ referencedRelation: "users";
2097
+ referencedColumns: ["id"];
2098
+ }
2099
+ ];
2100
+ };
2101
+ roaster_farms: {
2102
+ Row: {
2103
+ farm_id: string;
2104
+ roaster_id: string;
2105
+ };
2106
+ Insert: {
2107
+ farm_id: string;
2108
+ roaster_id: string;
2109
+ };
2110
+ Update: {
2111
+ farm_id?: string;
2112
+ roaster_id?: string;
2113
+ };
2114
+ Relationships: [
2115
+ {
2116
+ foreignKeyName: "roaster_farms_farm_id_fkey";
2117
+ columns: ["farm_id"];
2118
+ isOneToOne: false;
2119
+ referencedRelation: "farms";
2120
+ referencedColumns: ["id"];
2121
+ },
2122
+ {
2123
+ foreignKeyName: "roaster_farms_roaster_id_fkey";
2124
+ columns: ["roaster_id"];
2125
+ isOneToOne: false;
2126
+ referencedRelation: "roasters";
2127
+ referencedColumns: ["id"];
2128
+ }
2129
+ ];
2130
+ };
2131
+ roaster_submissions: {
2132
+ Row: {
2133
+ about: string | null;
2134
+ active: boolean | null;
2135
+ approved_roaster_id: string | null;
2136
+ city: string | null;
2137
+ contact_details: Json | null;
2138
+ country: string | null;
2139
+ country_code: string | null;
2140
+ created_at: string;
2141
+ description: string | null;
2142
+ evidence_urls: string[] | null;
2143
+ id: string;
2144
+ image_url: string | null;
2145
+ instagram: string | null;
2146
+ location: Json | null;
2147
+ logo_image: string | null;
2148
+ name: string;
2149
+ notes_for_curator: string | null;
2150
+ review_notes: string | null;
2151
+ reviewed_at: string | null;
2152
+ reviewed_by: string | null;
2153
+ roaster_id: string | null;
2154
+ status: string;
2155
+ suggested_tier: number | null;
2156
+ updated_at: string;
2157
+ user_id: string | null;
2158
+ website: string | null;
2159
+ };
2160
+ Insert: {
2161
+ about?: string | null;
2162
+ active?: boolean | null;
2163
+ approved_roaster_id?: string | null;
2164
+ city?: string | null;
2165
+ contact_details?: Json | null;
2166
+ country?: string | null;
2167
+ country_code?: string | null;
2168
+ created_at?: string;
2169
+ description?: string | null;
2170
+ evidence_urls?: string[] | null;
2171
+ id?: string;
2172
+ image_url?: string | null;
2173
+ instagram?: string | null;
2174
+ location?: Json | null;
2175
+ logo_image?: string | null;
2176
+ name: string;
2177
+ notes_for_curator?: string | null;
2178
+ review_notes?: string | null;
2179
+ reviewed_at?: string | null;
2180
+ reviewed_by?: string | null;
2181
+ roaster_id?: string | null;
2182
+ status?: string;
2183
+ suggested_tier?: number | null;
2184
+ updated_at?: string;
2185
+ user_id?: string | null;
2186
+ website?: string | null;
2187
+ };
2188
+ Update: {
2189
+ about?: string | null;
2190
+ active?: boolean | null;
2191
+ approved_roaster_id?: string | null;
2192
+ city?: string | null;
2193
+ contact_details?: Json | null;
2194
+ country?: string | null;
2195
+ country_code?: string | null;
2196
+ created_at?: string;
2197
+ description?: string | null;
2198
+ evidence_urls?: string[] | null;
2199
+ id?: string;
2200
+ image_url?: string | null;
2201
+ instagram?: string | null;
2202
+ location?: Json | null;
2203
+ logo_image?: string | null;
2204
+ name?: string;
2205
+ notes_for_curator?: string | null;
2206
+ review_notes?: string | null;
2207
+ reviewed_at?: string | null;
2208
+ reviewed_by?: string | null;
2209
+ roaster_id?: string | null;
2210
+ status?: string;
2211
+ suggested_tier?: number | null;
2212
+ updated_at?: string;
2213
+ user_id?: string | null;
2214
+ website?: string | null;
2215
+ };
2216
+ Relationships: [
2217
+ {
2218
+ foreignKeyName: "roaster_submissions_approved_roaster_id_fkey";
2219
+ columns: ["approved_roaster_id"];
2220
+ isOneToOne: false;
2221
+ referencedRelation: "roasters";
2222
+ referencedColumns: ["id"];
2223
+ },
2224
+ {
2225
+ foreignKeyName: "roaster_submissions_reviewed_by_fkey";
2226
+ columns: ["reviewed_by"];
2227
+ isOneToOne: false;
2228
+ referencedRelation: "leaderboard";
2229
+ referencedColumns: ["id"];
2230
+ },
2231
+ {
2232
+ foreignKeyName: "roaster_submissions_reviewed_by_fkey";
2233
+ columns: ["reviewed_by"];
2234
+ isOneToOne: false;
2235
+ referencedRelation: "user_activity_summary";
2236
+ referencedColumns: ["id"];
2237
+ },
2238
+ {
2239
+ foreignKeyName: "roaster_submissions_reviewed_by_fkey";
2240
+ columns: ["reviewed_by"];
2241
+ isOneToOne: false;
2242
+ referencedRelation: "users";
2243
+ referencedColumns: ["id"];
2244
+ },
2245
+ {
2246
+ foreignKeyName: "roaster_submissions_user_id_fkey";
2247
+ columns: ["user_id"];
2248
+ isOneToOne: false;
2249
+ referencedRelation: "leaderboard";
2250
+ referencedColumns: ["id"];
2251
+ },
2252
+ {
2253
+ foreignKeyName: "roaster_submissions_user_id_fkey";
2254
+ columns: ["user_id"];
2255
+ isOneToOne: false;
2256
+ referencedRelation: "user_activity_summary";
2257
+ referencedColumns: ["id"];
2258
+ },
2259
+ {
2260
+ foreignKeyName: "roaster_submissions_user_id_fkey";
2261
+ columns: ["user_id"];
2262
+ isOneToOne: false;
2263
+ referencedRelation: "users";
2264
+ referencedColumns: ["id"];
2265
+ }
2266
+ ];
2267
+ };
2268
+ roasters: {
2269
+ Row: {
2270
+ about: string | null;
2271
+ active: boolean | null;
2272
+ city: string | null;
2273
+ contact_details: Json | null;
2274
+ country: string | null;
2275
+ country_code: string | null;
2276
+ created_at: string | null;
2277
+ geo_point: Json | null;
2278
+ id: string;
2279
+ logo_image: string | null;
2280
+ name: string;
2281
+ sourcing: Json | null;
2282
+ specialty: Json | null;
2283
+ status: string | null;
2284
+ updated_at: string | null;
2285
+ user_id: string | null;
2286
+ };
2287
+ Insert: {
2288
+ about?: string | null;
2289
+ active?: boolean | null;
2290
+ city?: string | null;
2291
+ contact_details?: Json | null;
2292
+ country?: string | null;
2293
+ country_code?: string | null;
2294
+ created_at?: string | null;
2295
+ geo_point?: Json | null;
2296
+ id: string;
2297
+ logo_image?: string | null;
2298
+ name: string;
2299
+ sourcing?: Json | null;
2300
+ specialty?: Json | null;
2301
+ status?: string | null;
2302
+ updated_at?: string | null;
2303
+ user_id?: string | null;
2304
+ };
2305
+ Update: {
2306
+ about?: string | null;
2307
+ active?: boolean | null;
2308
+ city?: string | null;
2309
+ contact_details?: Json | null;
2310
+ country?: string | null;
2311
+ country_code?: string | null;
2312
+ created_at?: string | null;
2313
+ geo_point?: Json | null;
2314
+ id?: string;
2315
+ logo_image?: string | null;
2316
+ name?: string;
2317
+ sourcing?: Json | null;
2318
+ specialty?: Json | null;
2319
+ status?: string | null;
2320
+ updated_at?: string | null;
2321
+ user_id?: string | null;
2322
+ };
2323
+ Relationships: [];
2324
+ };
2325
+ shop_beans: {
2326
+ Row: {
2327
+ bean_id: string;
2328
+ shop_id: string;
2329
+ };
2330
+ Insert: {
2331
+ bean_id: string;
2332
+ shop_id: string;
2333
+ };
2334
+ Update: {
2335
+ bean_id?: string;
2336
+ shop_id?: string;
2337
+ };
2338
+ Relationships: [
2339
+ {
2340
+ foreignKeyName: "shop_beans_bean_id_fkey";
2341
+ columns: ["bean_id"];
2342
+ isOneToOne: false;
2343
+ referencedRelation: "coffee_beans";
2344
+ referencedColumns: ["id"];
2345
+ },
2346
+ {
2347
+ foreignKeyName: "shop_beans_shop_id_fkey";
2348
+ columns: ["shop_id"];
2349
+ isOneToOne: false;
2350
+ referencedRelation: "shop_stats";
2351
+ referencedColumns: ["id"];
2352
+ },
2353
+ {
2354
+ foreignKeyName: "shop_beans_shop_id_fkey";
2355
+ columns: ["shop_id"];
2356
+ isOneToOne: false;
2357
+ referencedRelation: "shops";
2358
+ referencedColumns: ["id"];
2359
+ }
2360
+ ];
2361
+ };
2362
+ shop_favourites: {
2363
+ Row: {
2364
+ created_at: string | null;
2365
+ shop_id: string;
2366
+ user_id: string;
2367
+ };
2368
+ Insert: {
2369
+ created_at?: string | null;
2370
+ shop_id: string;
2371
+ user_id: string;
2372
+ };
2373
+ Update: {
2374
+ created_at?: string | null;
2375
+ shop_id?: string;
2376
+ user_id?: string;
2377
+ };
2378
+ Relationships: [
2379
+ {
2380
+ foreignKeyName: "shop_favourites_shop_id_fkey";
2381
+ columns: ["shop_id"];
2382
+ isOneToOne: false;
2383
+ referencedRelation: "shop_stats";
2384
+ referencedColumns: ["id"];
2385
+ },
2386
+ {
2387
+ foreignKeyName: "shop_favourites_shop_id_fkey";
2388
+ columns: ["shop_id"];
2389
+ isOneToOne: false;
2390
+ referencedRelation: "shops";
2391
+ referencedColumns: ["id"];
2392
+ },
2393
+ {
2394
+ foreignKeyName: "shop_favourites_user_id_fkey";
2395
+ columns: ["user_id"];
2396
+ isOneToOne: false;
2397
+ referencedRelation: "leaderboard";
2398
+ referencedColumns: ["id"];
2399
+ },
2400
+ {
2401
+ foreignKeyName: "shop_favourites_user_id_fkey";
2402
+ columns: ["user_id"];
2403
+ isOneToOne: false;
2404
+ referencedRelation: "user_activity_summary";
2405
+ referencedColumns: ["id"];
2406
+ },
2407
+ {
2408
+ foreignKeyName: "shop_favourites_user_id_fkey";
2409
+ columns: ["user_id"];
2410
+ isOneToOne: false;
2411
+ referencedRelation: "users";
2412
+ referencedColumns: ["id"];
2413
+ }
2414
+ ];
2415
+ };
2416
+ shop_followers: {
2417
+ Row: {
2418
+ created_at: string | null;
2419
+ shop_id: string;
2420
+ user_id: string;
2421
+ };
2422
+ Insert: {
2423
+ created_at?: string | null;
2424
+ shop_id: string;
2425
+ user_id: string;
2426
+ };
2427
+ Update: {
2428
+ created_at?: string | null;
2429
+ shop_id?: string;
2430
+ user_id?: string;
2431
+ };
2432
+ Relationships: [
2433
+ {
2434
+ foreignKeyName: "shop_followers_shop_id_fkey";
2435
+ columns: ["shop_id"];
2436
+ isOneToOne: false;
2437
+ referencedRelation: "shop_stats";
2438
+ referencedColumns: ["id"];
2439
+ },
2440
+ {
2441
+ foreignKeyName: "shop_followers_shop_id_fkey";
2442
+ columns: ["shop_id"];
2443
+ isOneToOne: false;
2444
+ referencedRelation: "shops";
2445
+ referencedColumns: ["id"];
2446
+ },
2447
+ {
2448
+ foreignKeyName: "shop_followers_user_id_fkey";
2449
+ columns: ["user_id"];
2450
+ isOneToOne: false;
2451
+ referencedRelation: "leaderboard";
2452
+ referencedColumns: ["id"];
2453
+ },
2454
+ {
2455
+ foreignKeyName: "shop_followers_user_id_fkey";
2456
+ columns: ["user_id"];
2457
+ isOneToOne: false;
2458
+ referencedRelation: "user_activity_summary";
2459
+ referencedColumns: ["id"];
2460
+ },
2461
+ {
2462
+ foreignKeyName: "shop_followers_user_id_fkey";
2463
+ columns: ["user_id"];
2464
+ isOneToOne: false;
2465
+ referencedRelation: "users";
2466
+ referencedColumns: ["id"];
2467
+ }
2468
+ ];
2469
+ };
2470
+ shop_list_members: {
2471
+ Row: {
2472
+ id: string;
2473
+ invited_by: string | null;
2474
+ joined_at: string;
2475
+ list_id: string;
2476
+ role: string;
2477
+ user_id: string;
2478
+ };
2479
+ Insert: {
2480
+ id?: string;
2481
+ invited_by?: string | null;
2482
+ joined_at?: string;
2483
+ list_id: string;
2484
+ role?: string;
2485
+ user_id: string;
2486
+ };
2487
+ Update: {
2488
+ id?: string;
2489
+ invited_by?: string | null;
2490
+ joined_at?: string;
2491
+ list_id?: string;
2492
+ role?: string;
2493
+ user_id?: string;
2494
+ };
2495
+ Relationships: [
2496
+ {
2497
+ foreignKeyName: "shop_list_members_invited_by_fkey";
2498
+ columns: ["invited_by"];
2499
+ isOneToOne: false;
2500
+ referencedRelation: "leaderboard";
2501
+ referencedColumns: ["id"];
2502
+ },
2503
+ {
2504
+ foreignKeyName: "shop_list_members_invited_by_fkey";
2505
+ columns: ["invited_by"];
2506
+ isOneToOne: false;
2507
+ referencedRelation: "user_activity_summary";
2508
+ referencedColumns: ["id"];
2509
+ },
2510
+ {
2511
+ foreignKeyName: "shop_list_members_invited_by_fkey";
2512
+ columns: ["invited_by"];
2513
+ isOneToOne: false;
2514
+ referencedRelation: "users";
2515
+ referencedColumns: ["id"];
2516
+ },
2517
+ {
2518
+ foreignKeyName: "shop_list_members_list_id_fkey";
2519
+ columns: ["list_id"];
2520
+ isOneToOne: false;
2521
+ referencedRelation: "user_lists";
2522
+ referencedColumns: ["id"];
2523
+ },
2524
+ {
2525
+ foreignKeyName: "shop_list_members_user_id_fkey";
2526
+ columns: ["user_id"];
2527
+ isOneToOne: false;
2528
+ referencedRelation: "leaderboard";
2529
+ referencedColumns: ["id"];
2530
+ },
2531
+ {
2532
+ foreignKeyName: "shop_list_members_user_id_fkey";
2533
+ columns: ["user_id"];
2534
+ isOneToOne: false;
2535
+ referencedRelation: "user_activity_summary";
2536
+ referencedColumns: ["id"];
2537
+ },
2538
+ {
2539
+ foreignKeyName: "shop_list_members_user_id_fkey";
2540
+ columns: ["user_id"];
2541
+ isOneToOne: false;
2542
+ referencedRelation: "users";
2543
+ referencedColumns: ["id"];
2544
+ }
2545
+ ];
2546
+ };
2547
+ shop_roasters: {
2548
+ Row: {
2549
+ is_house_roaster: boolean | null;
2550
+ roaster_id: string;
2551
+ shop_id: string;
2552
+ };
2553
+ Insert: {
2554
+ is_house_roaster?: boolean | null;
2555
+ roaster_id: string;
2556
+ shop_id: string;
2557
+ };
2558
+ Update: {
2559
+ is_house_roaster?: boolean | null;
2560
+ roaster_id?: string;
2561
+ shop_id?: string;
2562
+ };
2563
+ Relationships: [
2564
+ {
2565
+ foreignKeyName: "shop_roasters_roaster_id_fkey";
2566
+ columns: ["roaster_id"];
2567
+ isOneToOne: false;
2568
+ referencedRelation: "roasters";
2569
+ referencedColumns: ["id"];
2570
+ },
2571
+ {
2572
+ foreignKeyName: "shop_roasters_shop_id_fkey";
2573
+ columns: ["shop_id"];
2574
+ isOneToOne: false;
2575
+ referencedRelation: "shop_stats";
2576
+ referencedColumns: ["id"];
2577
+ },
2578
+ {
2579
+ foreignKeyName: "shop_roasters_shop_id_fkey";
2580
+ columns: ["shop_id"];
2581
+ isOneToOne: false;
2582
+ referencedRelation: "shops";
2583
+ referencedColumns: ["id"];
2584
+ }
2585
+ ];
2586
+ };
2587
+ shops: {
2588
+ Row: {
2589
+ active: boolean | null;
2590
+ added_at: string | null;
2591
+ added_by_user: string | null;
2592
+ analytics: Json | null;
2593
+ awards: Json | null;
2594
+ brew_methods: string[] | null;
2595
+ city: string | null;
2596
+ coffee_brewing_methods: Json | null;
2597
+ contact_details: Json | null;
2598
+ country_code: string | null;
2599
+ cover_image: string | null;
2600
+ created_at: string | null;
2601
+ custom_roasters: string[] | null;
2602
+ features: Json | null;
2603
+ fika_rating: number | null;
2604
+ geo_point: Json | null;
2605
+ google_rating: number | null;
2606
+ id: string;
2607
+ images: Json | null;
2608
+ info: Json | null;
2609
+ logo_image: string | null;
2610
+ name: string;
2611
+ onboarding: Json | null;
2612
+ payment_options: Json | null;
2613
+ place_id: string | null;
2614
+ platform_loyalty_rewards: Json | null;
2615
+ rating_details: Json | null;
2616
+ regular_opening_hours: Json | null;
2617
+ roaster_refs_ids: string[] | null;
2618
+ roasting_and_beans_info: Json | null;
2619
+ signals: Json | null;
2620
+ slug: string | null;
2621
+ speciality_level: string | null;
2622
+ specialties: Json | null;
2623
+ specialty: Json | null;
2624
+ total_reviews: number | null;
2625
+ updated_at: string | null;
2626
+ };
2627
+ Insert: {
2628
+ active?: boolean | null;
2629
+ added_at?: string | null;
2630
+ added_by_user?: string | null;
2631
+ analytics?: Json | null;
2632
+ awards?: Json | null;
2633
+ brew_methods?: string[] | null;
2634
+ city?: string | null;
2635
+ coffee_brewing_methods?: Json | null;
2636
+ contact_details?: Json | null;
2637
+ country_code?: string | null;
2638
+ cover_image?: string | null;
2639
+ created_at?: string | null;
2640
+ custom_roasters?: string[] | null;
2641
+ features?: Json | null;
2642
+ fika_rating?: number | null;
2643
+ geo_point?: Json | null;
2644
+ google_rating?: number | null;
2645
+ id: string;
2646
+ images?: Json | null;
2647
+ info?: Json | null;
2648
+ logo_image?: string | null;
2649
+ name: string;
2650
+ onboarding?: Json | null;
2651
+ payment_options?: Json | null;
2652
+ place_id?: string | null;
2653
+ platform_loyalty_rewards?: Json | null;
2654
+ rating_details?: Json | null;
2655
+ regular_opening_hours?: Json | null;
2656
+ roaster_refs_ids?: string[] | null;
2657
+ roasting_and_beans_info?: Json | null;
2658
+ signals?: Json | null;
2659
+ slug?: string | null;
2660
+ speciality_level?: string | null;
2661
+ specialties?: Json | null;
2662
+ specialty?: Json | null;
2663
+ total_reviews?: number | null;
2664
+ updated_at?: string | null;
2665
+ };
2666
+ Update: {
2667
+ active?: boolean | null;
2668
+ added_at?: string | null;
2669
+ added_by_user?: string | null;
2670
+ analytics?: Json | null;
2671
+ awards?: Json | null;
2672
+ brew_methods?: string[] | null;
2673
+ city?: string | null;
2674
+ coffee_brewing_methods?: Json | null;
2675
+ contact_details?: Json | null;
2676
+ country_code?: string | null;
2677
+ cover_image?: string | null;
2678
+ created_at?: string | null;
2679
+ custom_roasters?: string[] | null;
2680
+ features?: Json | null;
2681
+ fika_rating?: number | null;
2682
+ geo_point?: Json | null;
2683
+ google_rating?: number | null;
2684
+ id?: string;
2685
+ images?: Json | null;
2686
+ info?: Json | null;
2687
+ logo_image?: string | null;
2688
+ name?: string;
2689
+ onboarding?: Json | null;
2690
+ payment_options?: Json | null;
2691
+ place_id?: string | null;
2692
+ platform_loyalty_rewards?: Json | null;
2693
+ rating_details?: Json | null;
2694
+ regular_opening_hours?: Json | null;
2695
+ roaster_refs_ids?: string[] | null;
2696
+ roasting_and_beans_info?: Json | null;
2697
+ signals?: Json | null;
2698
+ slug?: string | null;
2699
+ speciality_level?: string | null;
2700
+ specialties?: Json | null;
2701
+ specialty?: Json | null;
2702
+ total_reviews?: number | null;
2703
+ updated_at?: string | null;
2704
+ };
2705
+ Relationships: [
2706
+ {
2707
+ foreignKeyName: "shops_added_by_user_fkey";
2708
+ columns: ["added_by_user"];
2709
+ isOneToOne: false;
2710
+ referencedRelation: "leaderboard";
2711
+ referencedColumns: ["id"];
2712
+ },
2713
+ {
2714
+ foreignKeyName: "shops_added_by_user_fkey";
2715
+ columns: ["added_by_user"];
2716
+ isOneToOne: false;
2717
+ referencedRelation: "user_activity_summary";
2718
+ referencedColumns: ["id"];
2719
+ },
2720
+ {
2721
+ foreignKeyName: "shops_added_by_user_fkey";
2722
+ columns: ["added_by_user"];
2723
+ isOneToOne: false;
2724
+ referencedRelation: "users";
2725
+ referencedColumns: ["id"];
2726
+ }
2727
+ ];
2728
+ };
2729
+ shot_likes: {
2730
+ Row: {
2731
+ created_at: string | null;
2732
+ shot_id: string;
2733
+ user_id: string;
2734
+ };
2735
+ Insert: {
2736
+ created_at?: string | null;
2737
+ shot_id: string;
2738
+ user_id: string;
2739
+ };
2740
+ Update: {
2741
+ created_at?: string | null;
2742
+ shot_id?: string;
2743
+ user_id?: string;
2744
+ };
2745
+ Relationships: [
2746
+ {
2747
+ foreignKeyName: "shot_likes_shot_id_fkey";
2748
+ columns: ["shot_id"];
2749
+ isOneToOne: false;
2750
+ referencedRelation: "shots";
2751
+ referencedColumns: ["id"];
2752
+ },
2753
+ {
2754
+ foreignKeyName: "shot_likes_user_id_fkey";
2755
+ columns: ["user_id"];
2756
+ isOneToOne: false;
2757
+ referencedRelation: "leaderboard";
2758
+ referencedColumns: ["id"];
2759
+ },
2760
+ {
2761
+ foreignKeyName: "shot_likes_user_id_fkey";
2762
+ columns: ["user_id"];
2763
+ isOneToOne: false;
2764
+ referencedRelation: "user_activity_summary";
2765
+ referencedColumns: ["id"];
2766
+ },
2767
+ {
2768
+ foreignKeyName: "shot_likes_user_id_fkey";
2769
+ columns: ["user_id"];
2770
+ isOneToOne: false;
2771
+ referencedRelation: "users";
2772
+ referencedColumns: ["id"];
2773
+ }
2774
+ ];
2775
+ };
2776
+ shots: {
2777
+ Row: {
2778
+ coffee_shop_id: string | null;
2779
+ coffee_shop_name: string | null;
2780
+ created_at: string | null;
2781
+ date: string | null;
2782
+ geo_point: Json | null;
2783
+ id: string;
2784
+ image: string | null;
2785
+ user_id: string | null;
2786
+ };
2787
+ Insert: {
2788
+ coffee_shop_id?: string | null;
2789
+ coffee_shop_name?: string | null;
2790
+ created_at?: string | null;
2791
+ date?: string | null;
2792
+ geo_point?: Json | null;
2793
+ id: string;
2794
+ image?: string | null;
2795
+ user_id?: string | null;
2796
+ };
2797
+ Update: {
2798
+ coffee_shop_id?: string | null;
2799
+ coffee_shop_name?: string | null;
2800
+ created_at?: string | null;
2801
+ date?: string | null;
2802
+ geo_point?: Json | null;
2803
+ id?: string;
2804
+ image?: string | null;
2805
+ user_id?: string | null;
2806
+ };
2807
+ Relationships: [
2808
+ {
2809
+ foreignKeyName: "shots_coffee_shop_id_fkey";
2810
+ columns: ["coffee_shop_id"];
2811
+ isOneToOne: false;
2812
+ referencedRelation: "shop_stats";
2813
+ referencedColumns: ["id"];
2814
+ },
2815
+ {
2816
+ foreignKeyName: "shots_coffee_shop_id_fkey";
2817
+ columns: ["coffee_shop_id"];
2818
+ isOneToOne: false;
2819
+ referencedRelation: "shops";
2820
+ referencedColumns: ["id"];
2821
+ },
2822
+ {
2823
+ foreignKeyName: "shots_user_id_fkey";
2824
+ columns: ["user_id"];
2825
+ isOneToOne: false;
2826
+ referencedRelation: "leaderboard";
2827
+ referencedColumns: ["id"];
2828
+ },
2829
+ {
2830
+ foreignKeyName: "shots_user_id_fkey";
2831
+ columns: ["user_id"];
2832
+ isOneToOne: false;
2833
+ referencedRelation: "user_activity_summary";
2834
+ referencedColumns: ["id"];
2835
+ },
2836
+ {
2837
+ foreignKeyName: "shots_user_id_fkey";
2838
+ columns: ["user_id"];
2839
+ isOneToOne: false;
2840
+ referencedRelation: "users";
2841
+ referencedColumns: ["id"];
2842
+ }
2843
+ ];
2844
+ };
2845
+ specialty_jobs: {
2846
+ Row: {
2847
+ completed_at: string | null;
2848
+ created_at: string;
2849
+ error: string | null;
2850
+ error_message: string | null;
2851
+ finished_at: string | null;
2852
+ id: string;
2853
+ job_name: string | null;
2854
+ reason: string | null;
2855
+ result: Json | null;
2856
+ roaster_id: string | null;
2857
+ shop_id: string | null;
2858
+ started_at: string | null;
2859
+ status: string;
2860
+ type: string | null;
2861
+ };
2862
+ Insert: {
2863
+ completed_at?: string | null;
2864
+ created_at?: string;
2865
+ error?: string | null;
2866
+ error_message?: string | null;
2867
+ finished_at?: string | null;
2868
+ id?: string;
2869
+ job_name?: string | null;
2870
+ reason?: string | null;
2871
+ result?: Json | null;
2872
+ roaster_id?: string | null;
2873
+ shop_id?: string | null;
2874
+ started_at?: string | null;
2875
+ status?: string;
2876
+ type?: string | null;
2877
+ };
2878
+ Update: {
2879
+ completed_at?: string | null;
2880
+ created_at?: string;
2881
+ error?: string | null;
2882
+ error_message?: string | null;
2883
+ finished_at?: string | null;
2884
+ id?: string;
2885
+ job_name?: string | null;
2886
+ reason?: string | null;
2887
+ result?: Json | null;
2888
+ roaster_id?: string | null;
2889
+ shop_id?: string | null;
2890
+ started_at?: string | null;
2891
+ status?: string;
2892
+ type?: string | null;
2893
+ };
2894
+ Relationships: [];
2895
+ };
2896
+ staff: {
2897
+ Row: {
2898
+ accepted_at: string | null;
2899
+ bio: string | null;
2900
+ created_at: string;
2901
+ email: string | null;
2902
+ favourite_coffee_drink: string | null;
2903
+ id: string;
2904
+ invited_at: string | null;
2905
+ invited_by: string | null;
2906
+ is_authenticated: boolean | null;
2907
+ is_working: boolean | null;
2908
+ membership_id: string | null;
2909
+ name: string | null;
2910
+ permissions: Json | null;
2911
+ profile_picture: string | null;
2912
+ role: string | null;
2913
+ shop_id: string;
2914
+ status: string | null;
2915
+ updated_at: string;
2916
+ user_id: string | null;
2917
+ };
2918
+ Insert: {
2919
+ accepted_at?: string | null;
2920
+ bio?: string | null;
2921
+ created_at?: string;
2922
+ email?: string | null;
2923
+ favourite_coffee_drink?: string | null;
2924
+ id?: string;
2925
+ invited_at?: string | null;
2926
+ invited_by?: string | null;
2927
+ is_authenticated?: boolean | null;
2928
+ is_working?: boolean | null;
2929
+ membership_id?: string | null;
2930
+ name?: string | null;
2931
+ permissions?: Json | null;
2932
+ profile_picture?: string | null;
2933
+ role?: string | null;
2934
+ shop_id: string;
2935
+ status?: string | null;
2936
+ updated_at?: string;
2937
+ user_id?: string | null;
2938
+ };
2939
+ Update: {
2940
+ accepted_at?: string | null;
2941
+ bio?: string | null;
2942
+ created_at?: string;
2943
+ email?: string | null;
2944
+ favourite_coffee_drink?: string | null;
2945
+ id?: string;
2946
+ invited_at?: string | null;
2947
+ invited_by?: string | null;
2948
+ is_authenticated?: boolean | null;
2949
+ is_working?: boolean | null;
2950
+ membership_id?: string | null;
2951
+ name?: string | null;
2952
+ permissions?: Json | null;
2953
+ profile_picture?: string | null;
2954
+ role?: string | null;
2955
+ shop_id?: string;
2956
+ status?: string | null;
2957
+ updated_at?: string;
2958
+ user_id?: string | null;
2959
+ };
2960
+ Relationships: [
2961
+ {
2962
+ foreignKeyName: "staff_invited_by_fkey";
2963
+ columns: ["invited_by"];
2964
+ isOneToOne: false;
2965
+ referencedRelation: "leaderboard";
2966
+ referencedColumns: ["id"];
2967
+ },
2968
+ {
2969
+ foreignKeyName: "staff_invited_by_fkey";
2970
+ columns: ["invited_by"];
2971
+ isOneToOne: false;
2972
+ referencedRelation: "user_activity_summary";
2973
+ referencedColumns: ["id"];
2974
+ },
2975
+ {
2976
+ foreignKeyName: "staff_invited_by_fkey";
2977
+ columns: ["invited_by"];
2978
+ isOneToOne: false;
2979
+ referencedRelation: "users";
2980
+ referencedColumns: ["id"];
2981
+ },
2982
+ {
2983
+ foreignKeyName: "staff_shop_id_fkey";
2984
+ columns: ["shop_id"];
2985
+ isOneToOne: false;
2986
+ referencedRelation: "shop_stats";
2987
+ referencedColumns: ["id"];
2988
+ },
2989
+ {
2990
+ foreignKeyName: "staff_shop_id_fkey";
2991
+ columns: ["shop_id"];
2992
+ isOneToOne: false;
2993
+ referencedRelation: "shops";
2994
+ referencedColumns: ["id"];
2995
+ },
2996
+ {
2997
+ foreignKeyName: "staff_user_id_fkey";
2998
+ columns: ["user_id"];
2999
+ isOneToOne: false;
3000
+ referencedRelation: "leaderboard";
3001
+ referencedColumns: ["id"];
3002
+ },
3003
+ {
3004
+ foreignKeyName: "staff_user_id_fkey";
3005
+ columns: ["user_id"];
3006
+ isOneToOne: false;
3007
+ referencedRelation: "user_activity_summary";
3008
+ referencedColumns: ["id"];
3009
+ },
3010
+ {
3011
+ foreignKeyName: "staff_user_id_fkey";
3012
+ columns: ["user_id"];
3013
+ isOneToOne: false;
3014
+ referencedRelation: "users";
3015
+ referencedColumns: ["id"];
3016
+ }
3017
+ ];
3018
+ };
3019
+ staff_invites: {
3020
+ Row: {
3021
+ accepted_at: string | null;
3022
+ accepted_by: string | null;
3023
+ created_at: string;
3024
+ email: string;
3025
+ expires_at: string;
3026
+ id: string;
3027
+ invited_by: string | null;
3028
+ invited_email: string | null;
3029
+ permissions: Json | null;
3030
+ role: string | null;
3031
+ shop_id: string;
3032
+ status: string;
3033
+ token: string;
3034
+ };
3035
+ Insert: {
3036
+ accepted_at?: string | null;
3037
+ accepted_by?: string | null;
3038
+ created_at?: string;
3039
+ email: string;
3040
+ expires_at: string;
3041
+ id?: string;
3042
+ invited_by?: string | null;
3043
+ invited_email?: string | null;
3044
+ permissions?: Json | null;
3045
+ role?: string | null;
3046
+ shop_id: string;
3047
+ status?: string;
3048
+ token: string;
3049
+ };
3050
+ Update: {
3051
+ accepted_at?: string | null;
3052
+ accepted_by?: string | null;
3053
+ created_at?: string;
3054
+ email?: string;
3055
+ expires_at?: string;
3056
+ id?: string;
3057
+ invited_by?: string | null;
3058
+ invited_email?: string | null;
3059
+ permissions?: Json | null;
3060
+ role?: string | null;
3061
+ shop_id?: string;
3062
+ status?: string;
3063
+ token?: string;
3064
+ };
3065
+ Relationships: [
3066
+ {
3067
+ foreignKeyName: "staff_invites_accepted_by_fkey";
3068
+ columns: ["accepted_by"];
3069
+ isOneToOne: false;
3070
+ referencedRelation: "leaderboard";
3071
+ referencedColumns: ["id"];
3072
+ },
3073
+ {
3074
+ foreignKeyName: "staff_invites_accepted_by_fkey";
3075
+ columns: ["accepted_by"];
3076
+ isOneToOne: false;
3077
+ referencedRelation: "user_activity_summary";
3078
+ referencedColumns: ["id"];
3079
+ },
3080
+ {
3081
+ foreignKeyName: "staff_invites_accepted_by_fkey";
3082
+ columns: ["accepted_by"];
3083
+ isOneToOne: false;
3084
+ referencedRelation: "users";
3085
+ referencedColumns: ["id"];
3086
+ },
3087
+ {
3088
+ foreignKeyName: "staff_invites_invited_by_fkey";
3089
+ columns: ["invited_by"];
3090
+ isOneToOne: false;
3091
+ referencedRelation: "leaderboard";
3092
+ referencedColumns: ["id"];
3093
+ },
3094
+ {
3095
+ foreignKeyName: "staff_invites_invited_by_fkey";
3096
+ columns: ["invited_by"];
3097
+ isOneToOne: false;
3098
+ referencedRelation: "user_activity_summary";
3099
+ referencedColumns: ["id"];
3100
+ },
3101
+ {
3102
+ foreignKeyName: "staff_invites_invited_by_fkey";
3103
+ columns: ["invited_by"];
3104
+ isOneToOne: false;
3105
+ referencedRelation: "users";
3106
+ referencedColumns: ["id"];
3107
+ },
3108
+ {
3109
+ foreignKeyName: "staff_invites_shop_id_fkey";
3110
+ columns: ["shop_id"];
3111
+ isOneToOne: false;
3112
+ referencedRelation: "shop_stats";
3113
+ referencedColumns: ["id"];
3114
+ },
3115
+ {
3116
+ foreignKeyName: "staff_invites_shop_id_fkey";
3117
+ columns: ["shop_id"];
3118
+ isOneToOne: false;
3119
+ referencedRelation: "shops";
3120
+ referencedColumns: ["id"];
3121
+ }
3122
+ ];
3123
+ };
3124
+ stickers: {
3125
+ Row: {
3126
+ category: string | null;
3127
+ created_at: string;
3128
+ description: string | null;
3129
+ id: string;
3130
+ image_url: string | null;
3131
+ is_active: boolean | null;
3132
+ name: string;
3133
+ rarity: string | null;
3134
+ unlock_criteria: Json | null;
3135
+ };
3136
+ Insert: {
3137
+ category?: string | null;
3138
+ created_at?: string;
3139
+ description?: string | null;
3140
+ id: string;
3141
+ image_url?: string | null;
3142
+ is_active?: boolean | null;
3143
+ name: string;
3144
+ rarity?: string | null;
3145
+ unlock_criteria?: Json | null;
3146
+ };
3147
+ Update: {
3148
+ category?: string | null;
3149
+ created_at?: string;
3150
+ description?: string | null;
3151
+ id?: string;
3152
+ image_url?: string | null;
3153
+ is_active?: boolean | null;
3154
+ name?: string;
3155
+ rarity?: string | null;
3156
+ unlock_criteria?: Json | null;
3157
+ };
3158
+ Relationships: [];
3159
+ };
3160
+ submissions: {
3161
+ Row: {
3162
+ active: boolean | null;
3163
+ city: string | null;
3164
+ contact_details: Json | null;
3165
+ country_code: string | null;
3166
+ created_at: string;
3167
+ custom_roasters: string[] | null;
3168
+ data: Json | null;
3169
+ geo_point: Json | null;
3170
+ id: string;
3171
+ images: Json | null;
3172
+ info: Json | null;
3173
+ is_owner: boolean | null;
3174
+ owner_email: string | null;
3175
+ place_id: string | null;
3176
+ regular_opening_hours: Json | null;
3177
+ review: Json | null;
3178
+ review_notes: string | null;
3179
+ reviewed_at: string | null;
3180
+ reviewed_by: string | null;
3181
+ roaster_ids: string[] | null;
3182
+ shop_id: string | null;
3183
+ shop_name: string | null;
3184
+ status: string;
3185
+ type: string | null;
3186
+ updated_at: string;
3187
+ user_id: string;
3188
+ };
3189
+ Insert: {
3190
+ active?: boolean | null;
3191
+ city?: string | null;
3192
+ contact_details?: Json | null;
3193
+ country_code?: string | null;
3194
+ created_at?: string;
3195
+ custom_roasters?: string[] | null;
3196
+ data?: Json | null;
3197
+ geo_point?: Json | null;
3198
+ id?: string;
3199
+ images?: Json | null;
3200
+ info?: Json | null;
3201
+ is_owner?: boolean | null;
3202
+ owner_email?: string | null;
3203
+ place_id?: string | null;
3204
+ regular_opening_hours?: Json | null;
3205
+ review?: Json | null;
3206
+ review_notes?: string | null;
3207
+ reviewed_at?: string | null;
3208
+ reviewed_by?: string | null;
3209
+ roaster_ids?: string[] | null;
3210
+ shop_id?: string | null;
3211
+ shop_name?: string | null;
3212
+ status?: string;
3213
+ type?: string | null;
3214
+ updated_at?: string;
3215
+ user_id: string;
3216
+ };
3217
+ Update: {
3218
+ active?: boolean | null;
3219
+ city?: string | null;
3220
+ contact_details?: Json | null;
3221
+ country_code?: string | null;
3222
+ created_at?: string;
3223
+ custom_roasters?: string[] | null;
3224
+ data?: Json | null;
3225
+ geo_point?: Json | null;
3226
+ id?: string;
3227
+ images?: Json | null;
3228
+ info?: Json | null;
3229
+ is_owner?: boolean | null;
3230
+ owner_email?: string | null;
3231
+ place_id?: string | null;
3232
+ regular_opening_hours?: Json | null;
3233
+ review?: Json | null;
3234
+ review_notes?: string | null;
3235
+ reviewed_at?: string | null;
3236
+ reviewed_by?: string | null;
3237
+ roaster_ids?: string[] | null;
3238
+ shop_id?: string | null;
3239
+ shop_name?: string | null;
3240
+ status?: string;
3241
+ type?: string | null;
3242
+ updated_at?: string;
3243
+ user_id?: string;
3244
+ };
3245
+ Relationships: [
3246
+ {
3247
+ foreignKeyName: "submissions_reviewed_by_fkey";
3248
+ columns: ["reviewed_by"];
3249
+ isOneToOne: false;
3250
+ referencedRelation: "leaderboard";
3251
+ referencedColumns: ["id"];
3252
+ },
3253
+ {
3254
+ foreignKeyName: "submissions_reviewed_by_fkey";
3255
+ columns: ["reviewed_by"];
3256
+ isOneToOne: false;
3257
+ referencedRelation: "user_activity_summary";
3258
+ referencedColumns: ["id"];
3259
+ },
3260
+ {
3261
+ foreignKeyName: "submissions_reviewed_by_fkey";
3262
+ columns: ["reviewed_by"];
3263
+ isOneToOne: false;
3264
+ referencedRelation: "users";
3265
+ referencedColumns: ["id"];
3266
+ },
3267
+ {
3268
+ foreignKeyName: "submissions_user_id_fkey";
3269
+ columns: ["user_id"];
3270
+ isOneToOne: false;
3271
+ referencedRelation: "leaderboard";
3272
+ referencedColumns: ["id"];
3273
+ },
3274
+ {
3275
+ foreignKeyName: "submissions_user_id_fkey";
3276
+ columns: ["user_id"];
3277
+ isOneToOne: false;
3278
+ referencedRelation: "user_activity_summary";
3279
+ referencedColumns: ["id"];
3280
+ },
3281
+ {
3282
+ foreignKeyName: "submissions_user_id_fkey";
3283
+ columns: ["user_id"];
3284
+ isOneToOne: false;
3285
+ referencedRelation: "users";
3286
+ referencedColumns: ["id"];
3287
+ }
3288
+ ];
3289
+ };
3290
+ system_config: {
3291
+ Row: {
3292
+ created_at: string;
3293
+ description: string | null;
3294
+ id: string | null;
3295
+ key: string;
3296
+ tasks: Json | null;
3297
+ updated_at: string;
3298
+ updated_by: string | null;
3299
+ value: Json;
3300
+ version: number | null;
3301
+ };
3302
+ Insert: {
3303
+ created_at?: string;
3304
+ description?: string | null;
3305
+ id?: string | null;
3306
+ key: string;
3307
+ tasks?: Json | null;
3308
+ updated_at?: string;
3309
+ updated_by?: string | null;
3310
+ value: Json;
3311
+ version?: number | null;
3312
+ };
3313
+ Update: {
3314
+ created_at?: string;
3315
+ description?: string | null;
3316
+ id?: string | null;
3317
+ key?: string;
3318
+ tasks?: Json | null;
3319
+ updated_at?: string;
3320
+ updated_by?: string | null;
3321
+ value?: Json;
3322
+ version?: number | null;
3323
+ };
3324
+ Relationships: [
3325
+ {
3326
+ foreignKeyName: "system_config_updated_by_fkey";
3327
+ columns: ["updated_by"];
3328
+ isOneToOne: false;
3329
+ referencedRelation: "leaderboard";
3330
+ referencedColumns: ["id"];
3331
+ },
3332
+ {
3333
+ foreignKeyName: "system_config_updated_by_fkey";
3334
+ columns: ["updated_by"];
3335
+ isOneToOne: false;
3336
+ referencedRelation: "user_activity_summary";
3337
+ referencedColumns: ["id"];
3338
+ },
3339
+ {
3340
+ foreignKeyName: "system_config_updated_by_fkey";
3341
+ columns: ["updated_by"];
3342
+ isOneToOne: false;
3343
+ referencedRelation: "users";
3344
+ referencedColumns: ["id"];
3345
+ }
3346
+ ];
3347
+ };
3348
+ things_to_do: {
3349
+ Row: {
3350
+ active: boolean | null;
3351
+ city: string | null;
3352
+ coordinates: Json | null;
3353
+ country_code: string | null;
3354
+ created_at: string;
3355
+ cta: string | null;
3356
+ date: string | null;
3357
+ description: string | null;
3358
+ end_date: string | null;
3359
+ id: string;
3360
+ image_url: string | null;
3361
+ is_active: boolean | null;
3362
+ location: Json | null;
3363
+ location_name: string | null;
3364
+ name: string | null;
3365
+ priority: number | null;
3366
+ related_shop_id: string | null;
3367
+ start_date: string | null;
3368
+ tags: string[] | null;
3369
+ title: string | null;
3370
+ type: string | null;
3371
+ updated_at: string;
3372
+ url: string | null;
3373
+ };
3374
+ Insert: {
3375
+ active?: boolean | null;
3376
+ city?: string | null;
3377
+ coordinates?: Json | null;
3378
+ country_code?: string | null;
3379
+ created_at?: string;
3380
+ cta?: string | null;
3381
+ date?: string | null;
3382
+ description?: string | null;
3383
+ end_date?: string | null;
3384
+ id?: string;
3385
+ image_url?: string | null;
3386
+ is_active?: boolean | null;
3387
+ location?: Json | null;
3388
+ location_name?: string | null;
3389
+ name?: string | null;
3390
+ priority?: number | null;
3391
+ related_shop_id?: string | null;
3392
+ start_date?: string | null;
3393
+ tags?: string[] | null;
3394
+ title?: string | null;
3395
+ type?: string | null;
3396
+ updated_at?: string;
3397
+ url?: string | null;
3398
+ };
3399
+ Update: {
3400
+ active?: boolean | null;
3401
+ city?: string | null;
3402
+ coordinates?: Json | null;
3403
+ country_code?: string | null;
3404
+ created_at?: string;
3405
+ cta?: string | null;
3406
+ date?: string | null;
3407
+ description?: string | null;
3408
+ end_date?: string | null;
3409
+ id?: string;
3410
+ image_url?: string | null;
3411
+ is_active?: boolean | null;
3412
+ location?: Json | null;
3413
+ location_name?: string | null;
3414
+ name?: string | null;
3415
+ priority?: number | null;
3416
+ related_shop_id?: string | null;
3417
+ start_date?: string | null;
3418
+ tags?: string[] | null;
3419
+ title?: string | null;
3420
+ type?: string | null;
3421
+ updated_at?: string;
3422
+ url?: string | null;
3423
+ };
3424
+ Relationships: [
3425
+ {
3426
+ foreignKeyName: "things_to_do_related_shop_id_fkey";
3427
+ columns: ["related_shop_id"];
3428
+ isOneToOne: false;
3429
+ referencedRelation: "shop_stats";
3430
+ referencedColumns: ["id"];
3431
+ },
3432
+ {
3433
+ foreignKeyName: "things_to_do_related_shop_id_fkey";
3434
+ columns: ["related_shop_id"];
3435
+ isOneToOne: false;
3436
+ referencedRelation: "shops";
3437
+ referencedColumns: ["id"];
3438
+ }
3439
+ ];
3440
+ };
3441
+ user_corrections: {
3442
+ Row: {
3443
+ correction_data: Json | null;
3444
+ correction_type: string | null;
3445
+ created_at: string;
3446
+ current_value: string | null;
3447
+ entity_id: string | null;
3448
+ entity_type: string | null;
3449
+ field_name: string | null;
3450
+ id: string;
3451
+ notes: string | null;
3452
+ reason: string | null;
3453
+ review_notes: string | null;
3454
+ reviewed_at: string | null;
3455
+ reviewed_by: string | null;
3456
+ shop_id: string | null;
3457
+ shop_name: string | null;
3458
+ status: string;
3459
+ submitted_at: string | null;
3460
+ suggested_value: string | null;
3461
+ user_id: string;
3462
+ user_name: string | null;
3463
+ };
3464
+ Insert: {
3465
+ correction_data?: Json | null;
3466
+ correction_type?: string | null;
3467
+ created_at?: string;
3468
+ current_value?: string | null;
3469
+ entity_id?: string | null;
3470
+ entity_type?: string | null;
3471
+ field_name?: string | null;
3472
+ id?: string;
3473
+ notes?: string | null;
3474
+ reason?: string | null;
3475
+ review_notes?: string | null;
3476
+ reviewed_at?: string | null;
3477
+ reviewed_by?: string | null;
3478
+ shop_id?: string | null;
3479
+ shop_name?: string | null;
3480
+ status?: string;
3481
+ submitted_at?: string | null;
3482
+ suggested_value?: string | null;
3483
+ user_id: string;
3484
+ user_name?: string | null;
3485
+ };
3486
+ Update: {
3487
+ correction_data?: Json | null;
3488
+ correction_type?: string | null;
3489
+ created_at?: string;
3490
+ current_value?: string | null;
3491
+ entity_id?: string | null;
3492
+ entity_type?: string | null;
3493
+ field_name?: string | null;
3494
+ id?: string;
3495
+ notes?: string | null;
3496
+ reason?: string | null;
3497
+ review_notes?: string | null;
3498
+ reviewed_at?: string | null;
3499
+ reviewed_by?: string | null;
3500
+ shop_id?: string | null;
3501
+ shop_name?: string | null;
3502
+ status?: string;
3503
+ submitted_at?: string | null;
3504
+ suggested_value?: string | null;
3505
+ user_id?: string;
3506
+ user_name?: string | null;
3507
+ };
3508
+ Relationships: [
3509
+ {
3510
+ foreignKeyName: "user_corrections_reviewed_by_fkey";
3511
+ columns: ["reviewed_by"];
3512
+ isOneToOne: false;
3513
+ referencedRelation: "leaderboard";
3514
+ referencedColumns: ["id"];
3515
+ },
3516
+ {
3517
+ foreignKeyName: "user_corrections_reviewed_by_fkey";
3518
+ columns: ["reviewed_by"];
3519
+ isOneToOne: false;
3520
+ referencedRelation: "user_activity_summary";
3521
+ referencedColumns: ["id"];
3522
+ },
3523
+ {
3524
+ foreignKeyName: "user_corrections_reviewed_by_fkey";
3525
+ columns: ["reviewed_by"];
3526
+ isOneToOne: false;
3527
+ referencedRelation: "users";
3528
+ referencedColumns: ["id"];
3529
+ },
3530
+ {
3531
+ foreignKeyName: "user_corrections_user_id_fkey";
3532
+ columns: ["user_id"];
3533
+ isOneToOne: false;
3534
+ referencedRelation: "leaderboard";
3535
+ referencedColumns: ["id"];
3536
+ },
3537
+ {
3538
+ foreignKeyName: "user_corrections_user_id_fkey";
3539
+ columns: ["user_id"];
3540
+ isOneToOne: false;
3541
+ referencedRelation: "user_activity_summary";
3542
+ referencedColumns: ["id"];
3543
+ },
3544
+ {
3545
+ foreignKeyName: "user_corrections_user_id_fkey";
3546
+ columns: ["user_id"];
3547
+ isOneToOne: false;
3548
+ referencedRelation: "users";
3549
+ referencedColumns: ["id"];
3550
+ }
3551
+ ];
3552
+ };
3553
+ user_followers: {
3554
+ Row: {
3555
+ created_at: string | null;
3556
+ follower_id: string;
3557
+ following_id: string;
3558
+ };
3559
+ Insert: {
3560
+ created_at?: string | null;
3561
+ follower_id: string;
3562
+ following_id: string;
3563
+ };
3564
+ Update: {
3565
+ created_at?: string | null;
3566
+ follower_id?: string;
3567
+ following_id?: string;
3568
+ };
3569
+ Relationships: [
3570
+ {
3571
+ foreignKeyName: "user_followers_follower_id_fkey";
3572
+ columns: ["follower_id"];
3573
+ isOneToOne: false;
3574
+ referencedRelation: "leaderboard";
3575
+ referencedColumns: ["id"];
3576
+ },
3577
+ {
3578
+ foreignKeyName: "user_followers_follower_id_fkey";
3579
+ columns: ["follower_id"];
3580
+ isOneToOne: false;
3581
+ referencedRelation: "user_activity_summary";
3582
+ referencedColumns: ["id"];
3583
+ },
3584
+ {
3585
+ foreignKeyName: "user_followers_follower_id_fkey";
3586
+ columns: ["follower_id"];
3587
+ isOneToOne: false;
3588
+ referencedRelation: "users";
3589
+ referencedColumns: ["id"];
3590
+ },
3591
+ {
3592
+ foreignKeyName: "user_followers_following_id_fkey";
3593
+ columns: ["following_id"];
3594
+ isOneToOne: false;
3595
+ referencedRelation: "leaderboard";
3596
+ referencedColumns: ["id"];
3597
+ },
3598
+ {
3599
+ foreignKeyName: "user_followers_following_id_fkey";
3600
+ columns: ["following_id"];
3601
+ isOneToOne: false;
3602
+ referencedRelation: "user_activity_summary";
3603
+ referencedColumns: ["id"];
3604
+ },
3605
+ {
3606
+ foreignKeyName: "user_followers_following_id_fkey";
3607
+ columns: ["following_id"];
3608
+ isOneToOne: false;
3609
+ referencedRelation: "users";
3610
+ referencedColumns: ["id"];
3611
+ }
3612
+ ];
3613
+ };
3614
+ user_list_shops: {
3615
+ Row: {
3616
+ added_at: string;
3617
+ id: string;
3618
+ list_id: string;
3619
+ notes: string | null;
3620
+ position: number | null;
3621
+ shop_id: string;
3622
+ };
3623
+ Insert: {
3624
+ added_at?: string;
3625
+ id?: string;
3626
+ list_id: string;
3627
+ notes?: string | null;
3628
+ position?: number | null;
3629
+ shop_id: string;
3630
+ };
3631
+ Update: {
3632
+ added_at?: string;
3633
+ id?: string;
3634
+ list_id?: string;
3635
+ notes?: string | null;
3636
+ position?: number | null;
3637
+ shop_id?: string;
3638
+ };
3639
+ Relationships: [
3640
+ {
3641
+ foreignKeyName: "user_list_shops_list_id_fkey";
3642
+ columns: ["list_id"];
3643
+ isOneToOne: false;
3644
+ referencedRelation: "user_lists";
3645
+ referencedColumns: ["id"];
3646
+ },
3647
+ {
3648
+ foreignKeyName: "user_list_shops_shop_id_fkey";
3649
+ columns: ["shop_id"];
3650
+ isOneToOne: false;
3651
+ referencedRelation: "shop_stats";
3652
+ referencedColumns: ["id"];
3653
+ },
3654
+ {
3655
+ foreignKeyName: "user_list_shops_shop_id_fkey";
3656
+ columns: ["shop_id"];
3657
+ isOneToOne: false;
3658
+ referencedRelation: "shops";
3659
+ referencedColumns: ["id"];
3660
+ }
3661
+ ];
3662
+ };
3663
+ user_lists: {
3664
+ Row: {
3665
+ cover_image_url: string | null;
3666
+ created_at: string;
3667
+ description: string | null;
3668
+ id: string;
3669
+ is_public: boolean | null;
3670
+ name: string;
3671
+ updated_at: string;
3672
+ user_id: string;
3673
+ };
3674
+ Insert: {
3675
+ cover_image_url?: string | null;
3676
+ created_at?: string;
3677
+ description?: string | null;
3678
+ id: string;
3679
+ is_public?: boolean | null;
3680
+ name: string;
3681
+ updated_at?: string;
3682
+ user_id: string;
3683
+ };
3684
+ Update: {
3685
+ cover_image_url?: string | null;
3686
+ created_at?: string;
3687
+ description?: string | null;
3688
+ id?: string;
3689
+ is_public?: boolean | null;
3690
+ name?: string;
3691
+ updated_at?: string;
3692
+ user_id?: string;
3693
+ };
3694
+ Relationships: [
3695
+ {
3696
+ foreignKeyName: "user_lists_user_id_fkey";
3697
+ columns: ["user_id"];
3698
+ isOneToOne: false;
3699
+ referencedRelation: "leaderboard";
3700
+ referencedColumns: ["id"];
3701
+ },
3702
+ {
3703
+ foreignKeyName: "user_lists_user_id_fkey";
3704
+ columns: ["user_id"];
3705
+ isOneToOne: false;
3706
+ referencedRelation: "user_activity_summary";
3707
+ referencedColumns: ["id"];
3708
+ },
3709
+ {
3710
+ foreignKeyName: "user_lists_user_id_fkey";
3711
+ columns: ["user_id"];
3712
+ isOneToOne: false;
3713
+ referencedRelation: "users";
3714
+ referencedColumns: ["id"];
3715
+ }
3716
+ ];
3717
+ };
3718
+ user_shop_orders: {
3719
+ Row: {
3720
+ created_at: string;
3721
+ discount_amount: number | null;
3722
+ id: string;
3723
+ items: Json | null;
3724
+ last_order_at: string | null;
3725
+ loyalty_reward_action_id: string | null;
3726
+ order_date: string | null;
3727
+ order_type: string | null;
3728
+ preferences: Json | null;
3729
+ served_by_staff_id: string | null;
3730
+ shop_id: string;
3731
+ updated_at: string;
3732
+ user_id: string;
3733
+ voucher_id: string | null;
3734
+ };
3735
+ Insert: {
3736
+ created_at?: string;
3737
+ discount_amount?: number | null;
3738
+ id?: string;
3739
+ items?: Json | null;
3740
+ last_order_at?: string | null;
3741
+ loyalty_reward_action_id?: string | null;
3742
+ order_date?: string | null;
3743
+ order_type?: string | null;
3744
+ preferences?: Json | null;
3745
+ served_by_staff_id?: string | null;
3746
+ shop_id: string;
3747
+ updated_at?: string;
3748
+ user_id: string;
3749
+ voucher_id?: string | null;
3750
+ };
3751
+ Update: {
3752
+ created_at?: string;
3753
+ discount_amount?: number | null;
3754
+ id?: string;
3755
+ items?: Json | null;
3756
+ last_order_at?: string | null;
3757
+ loyalty_reward_action_id?: string | null;
3758
+ order_date?: string | null;
3759
+ order_type?: string | null;
3760
+ preferences?: Json | null;
3761
+ served_by_staff_id?: string | null;
3762
+ shop_id?: string;
3763
+ updated_at?: string;
3764
+ user_id?: string;
3765
+ voucher_id?: string | null;
3766
+ };
3767
+ Relationships: [
3768
+ {
3769
+ foreignKeyName: "user_shop_orders_shop_id_fkey";
3770
+ columns: ["shop_id"];
3771
+ isOneToOne: false;
3772
+ referencedRelation: "shop_stats";
3773
+ referencedColumns: ["id"];
3774
+ },
3775
+ {
3776
+ foreignKeyName: "user_shop_orders_shop_id_fkey";
3777
+ columns: ["shop_id"];
3778
+ isOneToOne: false;
3779
+ referencedRelation: "shops";
3780
+ referencedColumns: ["id"];
3781
+ },
3782
+ {
3783
+ foreignKeyName: "user_shop_orders_user_id_fkey";
3784
+ columns: ["user_id"];
3785
+ isOneToOne: false;
3786
+ referencedRelation: "leaderboard";
3787
+ referencedColumns: ["id"];
3788
+ },
3789
+ {
3790
+ foreignKeyName: "user_shop_orders_user_id_fkey";
3791
+ columns: ["user_id"];
3792
+ isOneToOne: false;
3793
+ referencedRelation: "user_activity_summary";
3794
+ referencedColumns: ["id"];
3795
+ },
3796
+ {
3797
+ foreignKeyName: "user_shop_orders_user_id_fkey";
3798
+ columns: ["user_id"];
3799
+ isOneToOne: false;
3800
+ referencedRelation: "users";
3801
+ referencedColumns: ["id"];
3802
+ }
3803
+ ];
3804
+ };
3805
+ user_stickers: {
3806
+ Row: {
3807
+ earned_at: string;
3808
+ id: string;
3809
+ metadata: Json | null;
3810
+ source: string | null;
3811
+ source_id: string | null;
3812
+ sticker_id: string;
3813
+ unlocked_at: string | null;
3814
+ user_id: string;
3815
+ };
3816
+ Insert: {
3817
+ earned_at?: string;
3818
+ id?: string;
3819
+ metadata?: Json | null;
3820
+ source?: string | null;
3821
+ source_id?: string | null;
3822
+ sticker_id: string;
3823
+ unlocked_at?: string | null;
3824
+ user_id: string;
3825
+ };
3826
+ Update: {
3827
+ earned_at?: string;
3828
+ id?: string;
3829
+ metadata?: Json | null;
3830
+ source?: string | null;
3831
+ source_id?: string | null;
3832
+ sticker_id?: string;
3833
+ unlocked_at?: string | null;
3834
+ user_id?: string;
3835
+ };
3836
+ Relationships: [
3837
+ {
3838
+ foreignKeyName: "user_stickers_sticker_id_fkey";
3839
+ columns: ["sticker_id"];
3840
+ isOneToOne: false;
3841
+ referencedRelation: "stickers";
3842
+ referencedColumns: ["id"];
3843
+ },
3844
+ {
3845
+ foreignKeyName: "user_stickers_user_id_fkey";
3846
+ columns: ["user_id"];
3847
+ isOneToOne: false;
3848
+ referencedRelation: "leaderboard";
3849
+ referencedColumns: ["id"];
3850
+ },
3851
+ {
3852
+ foreignKeyName: "user_stickers_user_id_fkey";
3853
+ columns: ["user_id"];
3854
+ isOneToOne: false;
3855
+ referencedRelation: "user_activity_summary";
3856
+ referencedColumns: ["id"];
3857
+ },
3858
+ {
3859
+ foreignKeyName: "user_stickers_user_id_fkey";
3860
+ columns: ["user_id"];
3861
+ isOneToOne: false;
3862
+ referencedRelation: "users";
3863
+ referencedColumns: ["id"];
3864
+ }
3865
+ ];
3866
+ };
3867
+ usernames: {
3868
+ Row: {
3869
+ updated_at: string | null;
3870
+ user_id: string | null;
3871
+ username: string;
3872
+ };
3873
+ Insert: {
3874
+ updated_at?: string | null;
3875
+ user_id?: string | null;
3876
+ username: string;
3877
+ };
3878
+ Update: {
3879
+ updated_at?: string | null;
3880
+ user_id?: string | null;
3881
+ username?: string;
3882
+ };
3883
+ Relationships: [
3884
+ {
3885
+ foreignKeyName: "usernames_user_id_fkey";
3886
+ columns: ["user_id"];
3887
+ isOneToOne: false;
3888
+ referencedRelation: "leaderboard";
3889
+ referencedColumns: ["id"];
3890
+ },
3891
+ {
3892
+ foreignKeyName: "usernames_user_id_fkey";
3893
+ columns: ["user_id"];
3894
+ isOneToOne: false;
3895
+ referencedRelation: "user_activity_summary";
3896
+ referencedColumns: ["id"];
3897
+ },
3898
+ {
3899
+ foreignKeyName: "usernames_user_id_fkey";
3900
+ columns: ["user_id"];
3901
+ isOneToOne: false;
3902
+ referencedRelation: "users";
3903
+ referencedColumns: ["id"];
3904
+ }
3905
+ ];
3906
+ };
3907
+ users: {
3908
+ Row: {
3909
+ created_at: string | null;
3910
+ custom_claims: Json | null;
3911
+ deleted_at: string | null;
3912
+ disabled: boolean | null;
3913
+ display_name: string | null;
3914
+ early_adopter: boolean | null;
3915
+ email: string | null;
3916
+ email_verified: boolean | null;
3917
+ featured_sticker_ids: string[] | null;
3918
+ home_city: string | null;
3919
+ home_country: string | null;
3920
+ id: string;
3921
+ last_location: Json | null;
3922
+ last_login: string | null;
3923
+ metadata: Json | null;
3924
+ photo_url: string | null;
3925
+ points: number | null;
3926
+ profile_image: string | null;
3927
+ provider_data: Json | null;
3928
+ shop_roles: Json | null;
3929
+ status: string | null;
3930
+ unread_notification_count: number | null;
3931
+ updated_at: string | null;
3932
+ username: string | null;
3933
+ };
3934
+ Insert: {
3935
+ created_at?: string | null;
3936
+ custom_claims?: Json | null;
3937
+ deleted_at?: string | null;
3938
+ disabled?: boolean | null;
3939
+ display_name?: string | null;
3940
+ early_adopter?: boolean | null;
3941
+ email?: string | null;
3942
+ email_verified?: boolean | null;
3943
+ featured_sticker_ids?: string[] | null;
3944
+ home_city?: string | null;
3945
+ home_country?: string | null;
3946
+ id: string;
3947
+ last_location?: Json | null;
3948
+ last_login?: string | null;
3949
+ metadata?: Json | null;
3950
+ photo_url?: string | null;
3951
+ points?: number | null;
3952
+ profile_image?: string | null;
3953
+ provider_data?: Json | null;
3954
+ shop_roles?: Json | null;
3955
+ status?: string | null;
3956
+ unread_notification_count?: number | null;
3957
+ updated_at?: string | null;
3958
+ username?: string | null;
3959
+ };
3960
+ Update: {
3961
+ created_at?: string | null;
3962
+ custom_claims?: Json | null;
3963
+ deleted_at?: string | null;
3964
+ disabled?: boolean | null;
3965
+ display_name?: string | null;
3966
+ early_adopter?: boolean | null;
3967
+ email?: string | null;
3968
+ email_verified?: boolean | null;
3969
+ featured_sticker_ids?: string[] | null;
3970
+ home_city?: string | null;
3971
+ home_country?: string | null;
3972
+ id?: string;
3973
+ last_location?: Json | null;
3974
+ last_login?: string | null;
3975
+ metadata?: Json | null;
3976
+ photo_url?: string | null;
3977
+ points?: number | null;
3978
+ profile_image?: string | null;
3979
+ provider_data?: Json | null;
3980
+ shop_roles?: Json | null;
3981
+ status?: string | null;
3982
+ unread_notification_count?: number | null;
3983
+ updated_at?: string | null;
3984
+ username?: string | null;
3985
+ };
3986
+ Relationships: [];
3987
+ };
3988
+ votes: {
3989
+ Row: {
3990
+ created_at: string | null;
3991
+ id: string;
3992
+ shop_id: string | null;
3993
+ source: string | null;
3994
+ subject_id: string;
3995
+ user_id: string | null;
3996
+ vote_type: string;
3997
+ };
3998
+ Insert: {
3999
+ created_at?: string | null;
4000
+ id: string;
4001
+ shop_id?: string | null;
4002
+ source?: string | null;
4003
+ subject_id: string;
4004
+ user_id?: string | null;
4005
+ vote_type: string;
4006
+ };
4007
+ Update: {
4008
+ created_at?: string | null;
4009
+ id?: string;
4010
+ shop_id?: string | null;
4011
+ source?: string | null;
4012
+ subject_id?: string;
4013
+ user_id?: string | null;
4014
+ vote_type?: string;
4015
+ };
4016
+ Relationships: [
4017
+ {
4018
+ foreignKeyName: "votes_shop_id_fkey";
4019
+ columns: ["shop_id"];
4020
+ isOneToOne: false;
4021
+ referencedRelation: "shop_stats";
4022
+ referencedColumns: ["id"];
4023
+ },
4024
+ {
4025
+ foreignKeyName: "votes_shop_id_fkey";
4026
+ columns: ["shop_id"];
4027
+ isOneToOne: false;
4028
+ referencedRelation: "shops";
4029
+ referencedColumns: ["id"];
4030
+ },
4031
+ {
4032
+ foreignKeyName: "votes_user_id_fkey";
4033
+ columns: ["user_id"];
4034
+ isOneToOne: false;
4035
+ referencedRelation: "leaderboard";
4036
+ referencedColumns: ["id"];
4037
+ },
4038
+ {
4039
+ foreignKeyName: "votes_user_id_fkey";
4040
+ columns: ["user_id"];
4041
+ isOneToOne: false;
4042
+ referencedRelation: "user_activity_summary";
4043
+ referencedColumns: ["id"];
4044
+ },
4045
+ {
4046
+ foreignKeyName: "votes_user_id_fkey";
4047
+ columns: ["user_id"];
4048
+ isOneToOne: false;
4049
+ referencedRelation: "users";
4050
+ referencedColumns: ["id"];
4051
+ }
4052
+ ];
4053
+ };
4054
+ vouchers: {
4055
+ Row: {
4056
+ claim_token: string | null;
4057
+ claim_token_expires_at: string | null;
4058
+ claimed_at: string | null;
4059
+ claimed_by: string | null;
4060
+ created_at: string | null;
4061
+ id: string;
4062
+ is_open_voucher: boolean | null;
4063
+ message: string | null;
4064
+ platform_reward: Json | null;
4065
+ redeemed: boolean | null;
4066
+ reward_description: string | null;
4067
+ reward_type: string | null;
4068
+ source: Json | null;
4069
+ user_id: string | null;
4070
+ valid: boolean | null;
4071
+ voucher_type: string | null;
4072
+ };
4073
+ Insert: {
4074
+ claim_token?: string | null;
4075
+ claim_token_expires_at?: string | null;
4076
+ claimed_at?: string | null;
4077
+ claimed_by?: string | null;
4078
+ created_at?: string | null;
4079
+ id: string;
4080
+ is_open_voucher?: boolean | null;
4081
+ message?: string | null;
4082
+ platform_reward?: Json | null;
4083
+ redeemed?: boolean | null;
4084
+ reward_description?: string | null;
4085
+ reward_type?: string | null;
4086
+ source?: Json | null;
4087
+ user_id?: string | null;
4088
+ valid?: boolean | null;
4089
+ voucher_type?: string | null;
4090
+ };
4091
+ Update: {
4092
+ claim_token?: string | null;
4093
+ claim_token_expires_at?: string | null;
4094
+ claimed_at?: string | null;
4095
+ claimed_by?: string | null;
4096
+ created_at?: string | null;
4097
+ id?: string;
4098
+ is_open_voucher?: boolean | null;
4099
+ message?: string | null;
4100
+ platform_reward?: Json | null;
4101
+ redeemed?: boolean | null;
4102
+ reward_description?: string | null;
4103
+ reward_type?: string | null;
4104
+ source?: Json | null;
4105
+ user_id?: string | null;
4106
+ valid?: boolean | null;
4107
+ voucher_type?: string | null;
4108
+ };
4109
+ Relationships: [
4110
+ {
4111
+ foreignKeyName: "vouchers_user_id_fkey";
4112
+ columns: ["user_id"];
4113
+ isOneToOne: false;
4114
+ referencedRelation: "leaderboard";
4115
+ referencedColumns: ["id"];
4116
+ },
4117
+ {
4118
+ foreignKeyName: "vouchers_user_id_fkey";
4119
+ columns: ["user_id"];
4120
+ isOneToOne: false;
4121
+ referencedRelation: "user_activity_summary";
4122
+ referencedColumns: ["id"];
4123
+ },
4124
+ {
4125
+ foreignKeyName: "vouchers_user_id_fkey";
4126
+ columns: ["user_id"];
4127
+ isOneToOne: false;
4128
+ referencedRelation: "users";
4129
+ referencedColumns: ["id"];
4130
+ }
4131
+ ];
4132
+ };
4133
+ };
4134
+ Views: {
4135
+ leaderboard: {
4136
+ Row: {
4137
+ display_name: string | null;
4138
+ id: string | null;
4139
+ profile_image: string | null;
4140
+ rank: number | null;
4141
+ total_points: number | null;
4142
+ total_reviews: number | null;
4143
+ total_shots: number | null;
4144
+ username: string | null;
4145
+ };
4146
+ Relationships: [];
4147
+ };
4148
+ shop_stats: {
4149
+ Row: {
4150
+ avg_craft_rating: number | null;
4151
+ favourite_count: number | null;
4152
+ follower_count: number | null;
4153
+ id: string | null;
4154
+ name: string | null;
4155
+ review_count: number | null;
4156
+ shot_count: number | null;
4157
+ };
4158
+ Relationships: [];
4159
+ };
4160
+ user_activity_summary: {
4161
+ Row: {
4162
+ follower_count: number | null;
4163
+ following_count: number | null;
4164
+ id: string | null;
4165
+ review_count: number | null;
4166
+ shot_count: number | null;
4167
+ stamp_count: number | null;
4168
+ total_points: number | null;
4169
+ username: string | null;
4170
+ };
4171
+ Relationships: [];
4172
+ };
4173
+ };
4174
+ Functions: {
4175
+ [_ in never]: never;
4176
+ };
4177
+ Enums: {
4178
+ [_ in never]: never;
4179
+ };
4180
+ CompositeTypes: {
4181
+ [_ in never]: never;
4182
+ };
4183
+ };
4184
+ };
4185
+ type DatabaseWithoutInternals = Omit<Database, "__InternalSupabase">;
4186
+ type DefaultSchema = DatabaseWithoutInternals[Extract<keyof Database, "public">];
4187
+ export type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) | {
4188
+ schema: keyof DatabaseWithoutInternals;
4189
+ }, TableName extends DefaultSchemaTableNameOrOptions extends {
4190
+ schema: keyof DatabaseWithoutInternals;
4191
+ } ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) : never = never> = DefaultSchemaTableNameOrOptions extends {
4192
+ schema: keyof DatabaseWithoutInternals;
4193
+ } ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
4194
+ Row: infer R;
4195
+ } ? R : never : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) ? (DefaultSchema["Tables"] & DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
4196
+ Row: infer R;
4197
+ } ? R : never : never;
4198
+ export type TablesInsert<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
4199
+ schema: keyof DatabaseWithoutInternals;
4200
+ }, TableName extends DefaultSchemaTableNameOrOptions extends {
4201
+ schema: keyof DatabaseWithoutInternals;
4202
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
4203
+ schema: keyof DatabaseWithoutInternals;
4204
+ } ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
4205
+ Insert: infer I;
4206
+ } ? I : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
4207
+ Insert: infer I;
4208
+ } ? I : never : never;
4209
+ export type TablesUpdate<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
4210
+ schema: keyof DatabaseWithoutInternals;
4211
+ }, TableName extends DefaultSchemaTableNameOrOptions extends {
4212
+ schema: keyof DatabaseWithoutInternals;
4213
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
4214
+ schema: keyof DatabaseWithoutInternals;
4215
+ } ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
4216
+ Update: infer U;
4217
+ } ? U : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
4218
+ Update: infer U;
4219
+ } ? U : never : never;
4220
+ export type Enums<DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] | {
4221
+ schema: keyof DatabaseWithoutInternals;
4222
+ }, EnumName extends DefaultSchemaEnumNameOrOptions extends {
4223
+ schema: keyof DatabaseWithoutInternals;
4224
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"] : never = never> = DefaultSchemaEnumNameOrOptions extends {
4225
+ schema: keyof DatabaseWithoutInternals;
4226
+ } ? DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName] : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions] : never;
4227
+ export type CompositeTypes<PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] | {
4228
+ schema: keyof DatabaseWithoutInternals;
4229
+ }, CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
4230
+ schema: keyof DatabaseWithoutInternals;
4231
+ } ? keyof DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"] : never = never> = PublicCompositeTypeNameOrOptions extends {
4232
+ schema: keyof DatabaseWithoutInternals;
4233
+ } ? DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName] : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions] : never;
4234
+ export declare const Constants: {
4235
+ readonly public: {
4236
+ readonly Enums: {};
4237
+ };
4238
+ };
4239
+ export {};