@simonarcher/fika-types 1.5.1 → 2.0.0-rc.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.
@@ -270,22 +270,80 @@ export type Database = {
270
270
  }
271
271
  ];
272
272
  };
273
+ coffee_bean_origins: {
274
+ Row: {
275
+ altitude_max_m: number | null;
276
+ altitude_min_m: number | null;
277
+ bean_id: string;
278
+ blend_percentage: number | null;
279
+ country_code: string;
280
+ country_name: string | null;
281
+ farm_id: string | null;
282
+ farm_name_unverified: string | null;
283
+ ordinal: number;
284
+ producer_name: string | null;
285
+ region: string | null;
286
+ subregion: string | null;
287
+ trade_program: string | null;
288
+ };
289
+ Insert: {
290
+ altitude_max_m?: number | null;
291
+ altitude_min_m?: number | null;
292
+ bean_id: string;
293
+ blend_percentage?: number | null;
294
+ country_code: string;
295
+ country_name?: string | null;
296
+ farm_id?: string | null;
297
+ farm_name_unverified?: string | null;
298
+ ordinal: number;
299
+ producer_name?: string | null;
300
+ region?: string | null;
301
+ subregion?: string | null;
302
+ trade_program?: string | null;
303
+ };
304
+ Update: {
305
+ altitude_max_m?: number | null;
306
+ altitude_min_m?: number | null;
307
+ bean_id?: string;
308
+ blend_percentage?: number | null;
309
+ country_code?: string;
310
+ country_name?: string | null;
311
+ farm_id?: string | null;
312
+ farm_name_unverified?: string | null;
313
+ ordinal?: number;
314
+ producer_name?: string | null;
315
+ region?: string | null;
316
+ subregion?: string | null;
317
+ trade_program?: string | null;
318
+ };
319
+ Relationships: [
320
+ {
321
+ foreignKeyName: "coffee_bean_origins_bean_id_fkey";
322
+ columns: ["bean_id"];
323
+ isOneToOne: false;
324
+ referencedRelation: "coffee_beans";
325
+ referencedColumns: ["id"];
326
+ },
327
+ {
328
+ foreignKeyName: "coffee_bean_origins_farm_id_fkey";
329
+ columns: ["farm_id"];
330
+ isOneToOne: false;
331
+ referencedRelation: "farms";
332
+ referencedColumns: ["id"];
333
+ }
334
+ ];
335
+ };
273
336
  coffee_bean_submissions: {
274
337
  Row: {
275
338
  active: boolean | null;
276
- approved_bean_id: string | null;
277
339
  bean_id: string | null;
278
- bean_name: string | null;
279
340
  country: string | null;
280
- created_at: string;
341
+ created_at: string | null;
281
342
  decaf_method: string | null;
282
343
  id: string;
283
344
  image: string | null;
284
- image_url: string | null;
285
345
  is_decaf: boolean | null;
286
346
  name: string | null;
287
- origin: string | null;
288
- process: string | null;
289
347
  processing: string | null;
290
348
  review_notes: string | null;
291
349
  reviewed_at: string | null;
@@ -295,24 +353,19 @@ export type Database = {
295
353
  shop_id: string | null;
296
354
  status: string;
297
355
  tasting_notes: string[] | null;
298
- updated_at: string;
356
+ updated_at: string | null;
299
357
  user_id: string | null;
300
358
  };
301
359
  Insert: {
302
360
  active?: boolean | null;
303
- approved_bean_id?: string | null;
304
361
  bean_id?: string | null;
305
- bean_name?: string | null;
306
362
  country?: string | null;
307
- created_at?: string;
363
+ created_at?: string | null;
308
364
  decaf_method?: string | null;
309
365
  id?: string;
310
366
  image?: string | null;
311
- image_url?: string | null;
312
367
  is_decaf?: boolean | null;
313
368
  name?: string | null;
314
- origin?: string | null;
315
- process?: string | null;
316
369
  processing?: string | null;
317
370
  review_notes?: string | null;
318
371
  reviewed_at?: string | null;
@@ -322,24 +375,19 @@ export type Database = {
322
375
  shop_id?: string | null;
323
376
  status?: string;
324
377
  tasting_notes?: string[] | null;
325
- updated_at?: string;
378
+ updated_at?: string | null;
326
379
  user_id?: string | null;
327
380
  };
328
381
  Update: {
329
382
  active?: boolean | null;
330
- approved_bean_id?: string | null;
331
383
  bean_id?: string | null;
332
- bean_name?: string | null;
333
384
  country?: string | null;
334
- created_at?: string;
385
+ created_at?: string | null;
335
386
  decaf_method?: string | null;
336
387
  id?: string;
337
388
  image?: string | null;
338
- image_url?: string | null;
339
389
  is_decaf?: boolean | null;
340
390
  name?: string | null;
341
- origin?: string | null;
342
- process?: string | null;
343
391
  processing?: string | null;
344
392
  review_notes?: string | null;
345
393
  reviewed_at?: string | null;
@@ -349,145 +397,98 @@ export type Database = {
349
397
  shop_id?: string | null;
350
398
  status?: string;
351
399
  tasting_notes?: string[] | null;
352
- updated_at?: string;
400
+ updated_at?: string | null;
353
401
  user_id?: string | null;
354
402
  };
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
- ];
403
+ Relationships: [];
427
404
  };
428
405
  coffee_beans: {
429
406
  Row: {
430
407
  active: boolean | null;
431
- country: string | null;
408
+ awards: string[] | null;
409
+ brew_recommendations: string[] | null;
410
+ certifications: string[] | null;
432
411
  created_at: string | null;
412
+ cup_profile: string | null;
433
413
  decaf_method: string | null;
434
414
  description: string | null;
435
- elevation: number | null;
436
415
  farm_id: string | null;
416
+ farmer_story: string | null;
417
+ harvest_period: string | null;
418
+ harvest_year: number | null;
437
419
  id: string;
438
420
  image: string | null;
421
+ impact_notes: string | null;
439
422
  is_decaf: boolean | null;
440
423
  limited_edition: boolean | null;
424
+ lot_name: string | null;
441
425
  name: string | null;
442
- origin: string | null;
443
- origins: Json | null;
444
426
  processing: string | null;
445
- region: string | null;
427
+ processing_details: string | null;
428
+ roast_level: string | null;
446
429
  roaster_id: string | null;
430
+ sca_score: number | null;
447
431
  tasting_notes: string[] | null;
448
432
  updated_at: string | null;
433
+ varieties: string[] | null;
449
434
  };
450
435
  Insert: {
451
436
  active?: boolean | null;
452
- country?: string | null;
437
+ awards?: string[] | null;
438
+ brew_recommendations?: string[] | null;
439
+ certifications?: string[] | null;
453
440
  created_at?: string | null;
441
+ cup_profile?: string | null;
454
442
  decaf_method?: string | null;
455
443
  description?: string | null;
456
- elevation?: number | null;
457
444
  farm_id?: string | null;
445
+ farmer_story?: string | null;
446
+ harvest_period?: string | null;
447
+ harvest_year?: number | null;
458
448
  id: string;
459
449
  image?: string | null;
450
+ impact_notes?: string | null;
460
451
  is_decaf?: boolean | null;
461
452
  limited_edition?: boolean | null;
453
+ lot_name?: string | null;
462
454
  name?: string | null;
463
- origin?: string | null;
464
- origins?: Json | null;
465
455
  processing?: string | null;
466
- region?: string | null;
456
+ processing_details?: string | null;
457
+ roast_level?: string | null;
467
458
  roaster_id?: string | null;
459
+ sca_score?: number | null;
468
460
  tasting_notes?: string[] | null;
469
461
  updated_at?: string | null;
462
+ varieties?: string[] | null;
470
463
  };
471
464
  Update: {
472
465
  active?: boolean | null;
473
- country?: string | null;
466
+ awards?: string[] | null;
467
+ brew_recommendations?: string[] | null;
468
+ certifications?: string[] | null;
474
469
  created_at?: string | null;
470
+ cup_profile?: string | null;
475
471
  decaf_method?: string | null;
476
472
  description?: string | null;
477
- elevation?: number | null;
478
473
  farm_id?: string | null;
474
+ farmer_story?: string | null;
475
+ harvest_period?: string | null;
476
+ harvest_year?: number | null;
479
477
  id?: string;
480
478
  image?: string | null;
479
+ impact_notes?: string | null;
481
480
  is_decaf?: boolean | null;
482
481
  limited_edition?: boolean | null;
482
+ lot_name?: string | null;
483
483
  name?: string | null;
484
- origin?: string | null;
485
- origins?: Json | null;
486
484
  processing?: string | null;
487
- region?: string | null;
485
+ processing_details?: string | null;
486
+ roast_level?: string | null;
488
487
  roaster_id?: string | null;
488
+ sca_score?: number | null;
489
489
  tasting_notes?: string[] | null;
490
490
  updated_at?: string | null;
491
+ varieties?: string[] | null;
491
492
  };
492
493
  Relationships: [
493
494
  {
@@ -556,6 +557,422 @@ export type Database = {
556
557
  }
557
558
  ];
558
559
  };
560
+ event_checkins: {
561
+ Row: {
562
+ checked_in_at: string;
563
+ event_id: string;
564
+ id: string;
565
+ user_city: string | null;
566
+ user_country: string | null;
567
+ user_display_name: string | null;
568
+ user_id: string;
569
+ user_photo_url: string | null;
570
+ username: string | null;
571
+ };
572
+ Insert: {
573
+ checked_in_at?: string;
574
+ event_id: string;
575
+ id?: string;
576
+ user_city?: string | null;
577
+ user_country?: string | null;
578
+ user_display_name?: string | null;
579
+ user_id: string;
580
+ user_photo_url?: string | null;
581
+ username?: string | null;
582
+ };
583
+ Update: {
584
+ checked_in_at?: string;
585
+ event_id?: string;
586
+ id?: string;
587
+ user_city?: string | null;
588
+ user_country?: string | null;
589
+ user_display_name?: string | null;
590
+ user_id?: string;
591
+ user_photo_url?: string | null;
592
+ username?: string | null;
593
+ };
594
+ Relationships: [
595
+ {
596
+ foreignKeyName: "event_checkins_event_id_fkey";
597
+ columns: ["event_id"];
598
+ isOneToOne: false;
599
+ referencedRelation: "events";
600
+ referencedColumns: ["id"];
601
+ }
602
+ ];
603
+ };
604
+ event_photo_reports: {
605
+ Row: {
606
+ created_at: string;
607
+ photo_id: string;
608
+ user_id: string;
609
+ };
610
+ Insert: {
611
+ created_at?: string;
612
+ photo_id: string;
613
+ user_id: string;
614
+ };
615
+ Update: {
616
+ created_at?: string;
617
+ photo_id?: string;
618
+ user_id?: string;
619
+ };
620
+ Relationships: [
621
+ {
622
+ foreignKeyName: "event_photo_reports_photo_id_fkey";
623
+ columns: ["photo_id"];
624
+ isOneToOne: false;
625
+ referencedRelation: "event_photos";
626
+ referencedColumns: ["id"];
627
+ },
628
+ {
629
+ foreignKeyName: "event_photo_reports_user_id_fkey";
630
+ columns: ["user_id"];
631
+ isOneToOne: false;
632
+ referencedRelation: "leaderboard";
633
+ referencedColumns: ["id"];
634
+ },
635
+ {
636
+ foreignKeyName: "event_photo_reports_user_id_fkey";
637
+ columns: ["user_id"];
638
+ isOneToOne: false;
639
+ referencedRelation: "user_activity_summary";
640
+ referencedColumns: ["id"];
641
+ },
642
+ {
643
+ foreignKeyName: "event_photo_reports_user_id_fkey";
644
+ columns: ["user_id"];
645
+ isOneToOne: false;
646
+ referencedRelation: "users";
647
+ referencedColumns: ["id"];
648
+ }
649
+ ];
650
+ };
651
+ event_photos: {
652
+ Row: {
653
+ created_at: string;
654
+ event_id: string;
655
+ id: string;
656
+ is_removed: boolean;
657
+ photo_url: string;
658
+ report_count: number;
659
+ reviewed_at: string | null;
660
+ user_id: string;
661
+ };
662
+ Insert: {
663
+ created_at?: string;
664
+ event_id: string;
665
+ id?: string;
666
+ is_removed?: boolean;
667
+ photo_url: string;
668
+ report_count?: number;
669
+ reviewed_at?: string | null;
670
+ user_id: string;
671
+ };
672
+ Update: {
673
+ created_at?: string;
674
+ event_id?: string;
675
+ id?: string;
676
+ is_removed?: boolean;
677
+ photo_url?: string;
678
+ report_count?: number;
679
+ reviewed_at?: string | null;
680
+ user_id?: string;
681
+ };
682
+ Relationships: [
683
+ {
684
+ foreignKeyName: "event_photos_event_id_fkey";
685
+ columns: ["event_id"];
686
+ isOneToOne: false;
687
+ referencedRelation: "events";
688
+ referencedColumns: ["id"];
689
+ },
690
+ {
691
+ foreignKeyName: "event_photos_user_id_fkey";
692
+ columns: ["user_id"];
693
+ isOneToOne: false;
694
+ referencedRelation: "leaderboard";
695
+ referencedColumns: ["id"];
696
+ },
697
+ {
698
+ foreignKeyName: "event_photos_user_id_fkey";
699
+ columns: ["user_id"];
700
+ isOneToOne: false;
701
+ referencedRelation: "user_activity_summary";
702
+ referencedColumns: ["id"];
703
+ },
704
+ {
705
+ foreignKeyName: "event_photos_user_id_fkey";
706
+ columns: ["user_id"];
707
+ isOneToOne: false;
708
+ referencedRelation: "users";
709
+ referencedColumns: ["id"];
710
+ }
711
+ ];
712
+ };
713
+ event_post_reactions: {
714
+ Row: {
715
+ created_at: string;
716
+ id: string;
717
+ post_id: string;
718
+ type: string;
719
+ user_id: string;
720
+ };
721
+ Insert: {
722
+ created_at?: string;
723
+ id?: string;
724
+ post_id: string;
725
+ type?: string;
726
+ user_id: string;
727
+ };
728
+ Update: {
729
+ created_at?: string;
730
+ id?: string;
731
+ post_id?: string;
732
+ type?: string;
733
+ user_id?: string;
734
+ };
735
+ Relationships: [
736
+ {
737
+ foreignKeyName: "event_post_reactions_post_id_fkey";
738
+ columns: ["post_id"];
739
+ isOneToOne: false;
740
+ referencedRelation: "event_posts";
741
+ referencedColumns: ["id"];
742
+ }
743
+ ];
744
+ };
745
+ event_post_reports: {
746
+ Row: {
747
+ created_at: string;
748
+ id: string;
749
+ post_id: string;
750
+ user_id: string;
751
+ };
752
+ Insert: {
753
+ created_at?: string;
754
+ id?: string;
755
+ post_id: string;
756
+ user_id: string;
757
+ };
758
+ Update: {
759
+ created_at?: string;
760
+ id?: string;
761
+ post_id?: string;
762
+ user_id?: string;
763
+ };
764
+ Relationships: [
765
+ {
766
+ foreignKeyName: "event_post_reports_post_id_fkey";
767
+ columns: ["post_id"];
768
+ isOneToOne: false;
769
+ referencedRelation: "event_posts";
770
+ referencedColumns: ["id"];
771
+ }
772
+ ];
773
+ };
774
+ event_posts: {
775
+ Row: {
776
+ caption: string | null;
777
+ created_at: string;
778
+ event_id: string;
779
+ id: string;
780
+ is_removed: boolean;
781
+ photo_url: string | null;
782
+ report_count: number;
783
+ user_display_name: string | null;
784
+ user_id: string;
785
+ user_photo_url: string | null;
786
+ username: string | null;
787
+ };
788
+ Insert: {
789
+ caption?: string | null;
790
+ created_at?: string;
791
+ event_id: string;
792
+ id?: string;
793
+ is_removed?: boolean;
794
+ photo_url?: string | null;
795
+ report_count?: number;
796
+ user_display_name?: string | null;
797
+ user_id: string;
798
+ user_photo_url?: string | null;
799
+ username?: string | null;
800
+ };
801
+ Update: {
802
+ caption?: string | null;
803
+ created_at?: string;
804
+ event_id?: string;
805
+ id?: string;
806
+ is_removed?: boolean;
807
+ photo_url?: string | null;
808
+ report_count?: number;
809
+ user_display_name?: string | null;
810
+ user_id?: string;
811
+ user_photo_url?: string | null;
812
+ username?: string | null;
813
+ };
814
+ Relationships: [
815
+ {
816
+ foreignKeyName: "event_posts_event_id_fkey";
817
+ columns: ["event_id"];
818
+ isOneToOne: false;
819
+ referencedRelation: "events";
820
+ referencedColumns: ["id"];
821
+ }
822
+ ];
823
+ };
824
+ event_sessions: {
825
+ Row: {
826
+ created_at: string;
827
+ description: string | null;
828
+ display_order: number;
829
+ end_time: string;
830
+ event_id: string;
831
+ host_image_url: string | null;
832
+ host_name: string | null;
833
+ id: string;
834
+ location_detail: string | null;
835
+ session_type: string;
836
+ start_time: string;
837
+ title: string;
838
+ track: string;
839
+ updated_at: string;
840
+ };
841
+ Insert: {
842
+ created_at?: string;
843
+ description?: string | null;
844
+ display_order?: number;
845
+ end_time: string;
846
+ event_id: string;
847
+ host_image_url?: string | null;
848
+ host_name?: string | null;
849
+ id?: string;
850
+ location_detail?: string | null;
851
+ session_type?: string;
852
+ start_time: string;
853
+ title: string;
854
+ track: string;
855
+ updated_at?: string;
856
+ };
857
+ Update: {
858
+ created_at?: string;
859
+ description?: string | null;
860
+ display_order?: number;
861
+ end_time?: string;
862
+ event_id?: string;
863
+ host_image_url?: string | null;
864
+ host_name?: string | null;
865
+ id?: string;
866
+ location_detail?: string | null;
867
+ session_type?: string;
868
+ start_time?: string;
869
+ title?: string;
870
+ track?: string;
871
+ updated_at?: string;
872
+ };
873
+ Relationships: [
874
+ {
875
+ foreignKeyName: "event_sessions_event_id_fkey";
876
+ columns: ["event_id"];
877
+ isOneToOne: false;
878
+ referencedRelation: "events";
879
+ referencedColumns: ["id"];
880
+ }
881
+ ];
882
+ };
883
+ event_submissions: {
884
+ Row: {
885
+ active: boolean | null;
886
+ address: string | null;
887
+ approved_event_id: string | null;
888
+ city: string | null;
889
+ country_code: string | null;
890
+ created_at: string | null;
891
+ cta: string | null;
892
+ date: string | null;
893
+ description: string | null;
894
+ end_date: string | null;
895
+ event_url: string | null;
896
+ extraction_model: string | null;
897
+ extraction_raw: Json | null;
898
+ host_id: string | null;
899
+ id: string;
900
+ image_url: string | null;
901
+ latitude: number | null;
902
+ location_name: string | null;
903
+ longitude: number | null;
904
+ name: string | null;
905
+ review_notes: string | null;
906
+ reviewed_at: string | null;
907
+ reviewed_by: string | null;
908
+ source_image_url: string;
909
+ spaces: number | null;
910
+ status: string;
911
+ updated_at: string | null;
912
+ user_id: string | null;
913
+ };
914
+ Insert: {
915
+ active?: boolean | null;
916
+ address?: string | null;
917
+ approved_event_id?: string | null;
918
+ city?: string | null;
919
+ country_code?: string | null;
920
+ created_at?: string | null;
921
+ cta?: string | null;
922
+ date?: string | null;
923
+ description?: string | null;
924
+ end_date?: string | null;
925
+ event_url?: string | null;
926
+ extraction_model?: string | null;
927
+ extraction_raw?: Json | null;
928
+ host_id?: string | null;
929
+ id?: string;
930
+ image_url?: string | null;
931
+ latitude?: number | null;
932
+ location_name?: string | null;
933
+ longitude?: number | null;
934
+ name?: string | null;
935
+ review_notes?: string | null;
936
+ reviewed_at?: string | null;
937
+ reviewed_by?: string | null;
938
+ source_image_url: string;
939
+ spaces?: number | null;
940
+ status?: string;
941
+ updated_at?: string | null;
942
+ user_id?: string | null;
943
+ };
944
+ Update: {
945
+ active?: boolean | null;
946
+ address?: string | null;
947
+ approved_event_id?: string | null;
948
+ city?: string | null;
949
+ country_code?: string | null;
950
+ created_at?: string | null;
951
+ cta?: string | null;
952
+ date?: string | null;
953
+ description?: string | null;
954
+ end_date?: string | null;
955
+ event_url?: string | null;
956
+ extraction_model?: string | null;
957
+ extraction_raw?: Json | null;
958
+ host_id?: string | null;
959
+ id?: string;
960
+ image_url?: string | null;
961
+ latitude?: number | null;
962
+ location_name?: string | null;
963
+ longitude?: number | null;
964
+ name?: string | null;
965
+ review_notes?: string | null;
966
+ reviewed_at?: string | null;
967
+ reviewed_by?: string | null;
968
+ source_image_url?: string;
969
+ spaces?: number | null;
970
+ status?: string;
971
+ updated_at?: string | null;
972
+ user_id?: string | null;
973
+ };
974
+ Relationships: [];
975
+ };
559
976
  event_updates: {
560
977
  Row: {
561
978
  event_id: string | null;
@@ -617,6 +1034,7 @@ export type Database = {
617
1034
  events: {
618
1035
  Row: {
619
1036
  active: boolean | null;
1037
+ address: string | null;
620
1038
  city: string | null;
621
1039
  coordinates: Json | null;
622
1040
  country_code: string | null;
@@ -624,20 +1042,24 @@ export type Database = {
624
1042
  cta: string | null;
625
1043
  date: string | null;
626
1044
  description: string | null;
1045
+ end_date: string | null;
627
1046
  event_url: string | null;
628
1047
  host_id: string | null;
629
1048
  id: string;
630
1049
  image_url: string | null;
1050
+ images: string[] | null;
631
1051
  latitude: number | null;
632
1052
  location_name: string | null;
633
1053
  longitude: number | null;
634
1054
  name: string | null;
1055
+ reward_sticker_id: string | null;
635
1056
  spaces: number | null;
636
1057
  updated_at: string | null;
637
1058
  url: string | null;
638
1059
  };
639
1060
  Insert: {
640
1061
  active?: boolean | null;
1062
+ address?: string | null;
641
1063
  city?: string | null;
642
1064
  coordinates?: Json | null;
643
1065
  country_code?: string | null;
@@ -645,20 +1067,24 @@ export type Database = {
645
1067
  cta?: string | null;
646
1068
  date?: string | null;
647
1069
  description?: string | null;
1070
+ end_date?: string | null;
648
1071
  event_url?: string | null;
649
1072
  host_id?: string | null;
650
1073
  id: string;
651
1074
  image_url?: string | null;
1075
+ images?: string[] | null;
652
1076
  latitude?: number | null;
653
1077
  location_name?: string | null;
654
1078
  longitude?: number | null;
655
1079
  name?: string | null;
1080
+ reward_sticker_id?: string | null;
656
1081
  spaces?: number | null;
657
1082
  updated_at?: string | null;
658
1083
  url?: string | null;
659
1084
  };
660
1085
  Update: {
661
1086
  active?: boolean | null;
1087
+ address?: string | null;
662
1088
  city?: string | null;
663
1089
  coordinates?: Json | null;
664
1090
  country_code?: string | null;
@@ -666,14 +1092,17 @@ export type Database = {
666
1092
  cta?: string | null;
667
1093
  date?: string | null;
668
1094
  description?: string | null;
1095
+ end_date?: string | null;
669
1096
  event_url?: string | null;
670
1097
  host_id?: string | null;
671
1098
  id?: string;
672
1099
  image_url?: string | null;
1100
+ images?: string[] | null;
673
1101
  latitude?: number | null;
674
1102
  location_name?: string | null;
675
1103
  longitude?: number | null;
676
1104
  name?: string | null;
1105
+ reward_sticker_id?: string | null;
677
1106
  spaces?: number | null;
678
1107
  updated_at?: string | null;
679
1108
  url?: string | null;
@@ -692,6 +1121,13 @@ export type Database = {
692
1121
  isOneToOne: false;
693
1122
  referencedRelation: "shops";
694
1123
  referencedColumns: ["id"];
1124
+ },
1125
+ {
1126
+ foreignKeyName: "events_reward_sticker_id_fkey";
1127
+ columns: ["reward_sticker_id"];
1128
+ isOneToOne: false;
1129
+ referencedRelation: "stickers";
1130
+ referencedColumns: ["id"];
695
1131
  }
696
1132
  ];
697
1133
  };
@@ -952,22 +1388,7 @@ export type Database = {
952
1388
  staff_id?: string | null;
953
1389
  timestamp?: string | null;
954
1390
  };
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
- ];
1391
+ Relationships: [];
971
1392
  };
972
1393
  loyalty_stamps: {
973
1394
  Row: {
@@ -1013,20 +1434,6 @@ export type Database = {
1013
1434
  voucher_id?: string | null;
1014
1435
  };
1015
1436
  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
1437
  {
1031
1438
  foreignKeyName: "loyalty_stamps_user_id_fkey";
1032
1439
  columns: ["user_id"];
@@ -1537,7 +1944,7 @@ export type Database = {
1537
1944
  created_at: string;
1538
1945
  field_path: string;
1539
1946
  id: string;
1540
- ip_address: string | null;
1947
+ ip_address: unknown;
1541
1948
  shop_id: string;
1542
1949
  token_id: string | null;
1543
1950
  user_agent: string | null;
@@ -1549,7 +1956,7 @@ export type Database = {
1549
1956
  created_at?: string;
1550
1957
  field_path: string;
1551
1958
  id?: string;
1552
- ip_address?: string | null;
1959
+ ip_address?: unknown;
1553
1960
  shop_id: string;
1554
1961
  token_id?: string | null;
1555
1962
  user_agent?: string | null;
@@ -1561,18 +1968,32 @@ export type Database = {
1561
1968
  created_at?: string;
1562
1969
  field_path?: string;
1563
1970
  id?: string;
1564
- ip_address?: string | null;
1971
+ ip_address?: unknown;
1565
1972
  shop_id?: string;
1566
1973
  token_id?: string | null;
1567
1974
  user_agent?: string | null;
1568
1975
  };
1569
1976
  Relationships: [
1977
+ {
1978
+ foreignKeyName: "owner_edit_log_shop_id_fkey";
1979
+ columns: ["shop_id"];
1980
+ isOneToOne: false;
1981
+ referencedRelation: "shop_stats";
1982
+ referencedColumns: ["id"];
1983
+ },
1570
1984
  {
1571
1985
  foreignKeyName: "owner_edit_log_shop_id_fkey";
1572
1986
  columns: ["shop_id"];
1573
1987
  isOneToOne: false;
1574
1988
  referencedRelation: "shops";
1575
1989
  referencedColumns: ["id"];
1990
+ },
1991
+ {
1992
+ foreignKeyName: "owner_edit_log_token_id_fkey";
1993
+ columns: ["token_id"];
1994
+ isOneToOne: false;
1995
+ referencedRelation: "staff_invites";
1996
+ referencedColumns: ["id"];
1576
1997
  }
1577
1998
  ];
1578
1999
  };
@@ -1581,7 +2002,7 @@ export type Database = {
1581
2002
  actor_email: string | null;
1582
2003
  created_at: string;
1583
2004
  id: string;
1584
- ip_address: string | null;
2005
+ ip_address: unknown;
1585
2006
  message: string | null;
1586
2007
  reason: string;
1587
2008
  resolution_note: string | null;
@@ -1595,7 +2016,7 @@ export type Database = {
1595
2016
  actor_email?: string | null;
1596
2017
  created_at?: string;
1597
2018
  id?: string;
1598
- ip_address?: string | null;
2019
+ ip_address?: unknown;
1599
2020
  message?: string | null;
1600
2021
  reason: string;
1601
2022
  resolution_note?: string | null;
@@ -1609,7 +2030,7 @@ export type Database = {
1609
2030
  actor_email?: string | null;
1610
2031
  created_at?: string;
1611
2032
  id?: string;
1612
- ip_address?: string | null;
2033
+ ip_address?: unknown;
1613
2034
  message?: string | null;
1614
2035
  reason?: string;
1615
2036
  resolution_note?: string | null;
@@ -1620,12 +2041,26 @@ export type Database = {
1620
2041
  user_agent?: string | null;
1621
2042
  };
1622
2043
  Relationships: [
2044
+ {
2045
+ foreignKeyName: "owner_listing_reports_shop_id_fkey";
2046
+ columns: ["shop_id"];
2047
+ isOneToOne: false;
2048
+ referencedRelation: "shop_stats";
2049
+ referencedColumns: ["id"];
2050
+ },
1623
2051
  {
1624
2052
  foreignKeyName: "owner_listing_reports_shop_id_fkey";
1625
2053
  columns: ["shop_id"];
1626
2054
  isOneToOne: false;
1627
2055
  referencedRelation: "shops";
1628
2056
  referencedColumns: ["id"];
2057
+ },
2058
+ {
2059
+ foreignKeyName: "owner_listing_reports_token_id_fkey";
2060
+ columns: ["token_id"];
2061
+ isOneToOne: false;
2062
+ referencedRelation: "staff_invites";
2063
+ referencedColumns: ["id"];
1629
2064
  }
1630
2065
  ];
1631
2066
  };
@@ -1636,7 +2071,7 @@ export type Database = {
1636
2071
  current_value: Json | null;
1637
2072
  field_path: string;
1638
2073
  id: string;
1639
- ip_address: string | null;
2074
+ ip_address: unknown;
1640
2075
  proposed_value: Json | null;
1641
2076
  rejection_reason: string | null;
1642
2077
  reviewed_at: string | null;
@@ -1652,7 +2087,7 @@ export type Database = {
1652
2087
  current_value?: Json | null;
1653
2088
  field_path: string;
1654
2089
  id?: string;
1655
- ip_address?: string | null;
2090
+ ip_address?: unknown;
1656
2091
  proposed_value?: Json | null;
1657
2092
  rejection_reason?: string | null;
1658
2093
  reviewed_at?: string | null;
@@ -1668,7 +2103,7 @@ export type Database = {
1668
2103
  current_value?: Json | null;
1669
2104
  field_path?: string;
1670
2105
  id?: string;
1671
- ip_address?: string | null;
2106
+ ip_address?: unknown;
1672
2107
  proposed_value?: Json | null;
1673
2108
  rejection_reason?: string | null;
1674
2109
  reviewed_at?: string | null;
@@ -1679,12 +2114,26 @@ export type Database = {
1679
2114
  user_agent?: string | null;
1680
2115
  };
1681
2116
  Relationships: [
2117
+ {
2118
+ foreignKeyName: "owner_pending_field_changes_shop_id_fkey";
2119
+ columns: ["shop_id"];
2120
+ isOneToOne: false;
2121
+ referencedRelation: "shop_stats";
2122
+ referencedColumns: ["id"];
2123
+ },
1682
2124
  {
1683
2125
  foreignKeyName: "owner_pending_field_changes_shop_id_fkey";
1684
2126
  columns: ["shop_id"];
1685
2127
  isOneToOne: false;
1686
2128
  referencedRelation: "shops";
1687
2129
  referencedColumns: ["id"];
2130
+ },
2131
+ {
2132
+ foreignKeyName: "owner_pending_field_changes_token_id_fkey";
2133
+ columns: ["token_id"];
2134
+ isOneToOne: false;
2135
+ referencedRelation: "staff_invites";
2136
+ referencedColumns: ["id"];
1688
2137
  }
1689
2138
  ];
1690
2139
  };
@@ -2136,7 +2585,7 @@ export type Database = {
2136
2585
  reported_item_id: string | null;
2137
2586
  reporter_id: string | null;
2138
2587
  status: string;
2139
- updated_at: string;
2588
+ updated_at: string | null;
2140
2589
  };
2141
2590
  Insert: {
2142
2591
  assigned_to?: string | null;
@@ -2154,7 +2603,7 @@ export type Database = {
2154
2603
  reported_item_id?: string | null;
2155
2604
  reporter_id?: string | null;
2156
2605
  status?: string;
2157
- updated_at?: string;
2606
+ updated_at?: string | null;
2158
2607
  };
2159
2608
  Update: {
2160
2609
  assigned_to?: string | null;
@@ -2172,7 +2621,7 @@ export type Database = {
2172
2621
  reported_item_id?: string | null;
2173
2622
  reporter_id?: string | null;
2174
2623
  status?: string;
2175
- updated_at?: string;
2624
+ updated_at?: string | null;
2176
2625
  };
2177
2626
  Relationships: [
2178
2627
  {
@@ -2313,6 +2762,44 @@ export type Database = {
2313
2762
  }
2314
2763
  ];
2315
2764
  };
2765
+ reward_rules: {
2766
+ Row: {
2767
+ created_at: string;
2768
+ id: string;
2769
+ is_active: boolean;
2770
+ sticker_id: string;
2771
+ threshold: number;
2772
+ type: string;
2773
+ updated_at: string;
2774
+ };
2775
+ Insert: {
2776
+ created_at?: string;
2777
+ id?: string;
2778
+ is_active?: boolean;
2779
+ sticker_id: string;
2780
+ threshold: number;
2781
+ type: string;
2782
+ updated_at?: string;
2783
+ };
2784
+ Update: {
2785
+ created_at?: string;
2786
+ id?: string;
2787
+ is_active?: boolean;
2788
+ sticker_id?: string;
2789
+ threshold?: number;
2790
+ type?: string;
2791
+ updated_at?: string;
2792
+ };
2793
+ Relationships: [
2794
+ {
2795
+ foreignKeyName: "reward_rules_sticker_id_fkey";
2796
+ columns: ["sticker_id"];
2797
+ isOneToOne: false;
2798
+ referencedRelation: "stickers";
2799
+ referencedColumns: ["id"];
2800
+ }
2801
+ ];
2802
+ };
2316
2803
  rewards: {
2317
2804
  Row: {
2318
2805
  created_at: string | null;
@@ -2362,36 +2849,6 @@ export type Database = {
2362
2849
  }
2363
2850
  ];
2364
2851
  };
2365
- roaster_farms: {
2366
- Row: {
2367
- farm_id: string;
2368
- roaster_id: string;
2369
- };
2370
- Insert: {
2371
- farm_id: string;
2372
- roaster_id: string;
2373
- };
2374
- Update: {
2375
- farm_id?: string;
2376
- roaster_id?: string;
2377
- };
2378
- Relationships: [
2379
- {
2380
- foreignKeyName: "roaster_farms_farm_id_fkey";
2381
- columns: ["farm_id"];
2382
- isOneToOne: false;
2383
- referencedRelation: "farms";
2384
- referencedColumns: ["id"];
2385
- },
2386
- {
2387
- foreignKeyName: "roaster_farms_roaster_id_fkey";
2388
- columns: ["roaster_id"];
2389
- isOneToOne: false;
2390
- referencedRelation: "roasters";
2391
- referencedColumns: ["id"];
2392
- }
2393
- ];
2394
- };
2395
2852
  roaster_submissions: {
2396
2853
  Row: {
2397
2854
  about: string | null;
@@ -2401,7 +2858,7 @@ export type Database = {
2401
2858
  contact_details: Json | null;
2402
2859
  country: string | null;
2403
2860
  country_code: string | null;
2404
- created_at: string;
2861
+ created_at: string | null;
2405
2862
  description: string | null;
2406
2863
  evidence_urls: string[] | null;
2407
2864
  id: string;
@@ -2415,9 +2872,10 @@ export type Database = {
2415
2872
  reviewed_at: string | null;
2416
2873
  reviewed_by: string | null;
2417
2874
  roaster_id: string | null;
2875
+ shop_id: string | null;
2418
2876
  status: string;
2419
2877
  suggested_tier: number | null;
2420
- updated_at: string;
2878
+ updated_at: string | null;
2421
2879
  user_id: string | null;
2422
2880
  website: string | null;
2423
2881
  };
@@ -2429,7 +2887,7 @@ export type Database = {
2429
2887
  contact_details?: Json | null;
2430
2888
  country?: string | null;
2431
2889
  country_code?: string | null;
2432
- created_at?: string;
2890
+ created_at?: string | null;
2433
2891
  description?: string | null;
2434
2892
  evidence_urls?: string[] | null;
2435
2893
  id?: string;
@@ -2443,9 +2901,10 @@ export type Database = {
2443
2901
  reviewed_at?: string | null;
2444
2902
  reviewed_by?: string | null;
2445
2903
  roaster_id?: string | null;
2904
+ shop_id?: string | null;
2446
2905
  status?: string;
2447
2906
  suggested_tier?: number | null;
2448
- updated_at?: string;
2907
+ updated_at?: string | null;
2449
2908
  user_id?: string | null;
2450
2909
  website?: string | null;
2451
2910
  };
@@ -2457,7 +2916,7 @@ export type Database = {
2457
2916
  contact_details?: Json | null;
2458
2917
  country?: string | null;
2459
2918
  country_code?: string | null;
2460
- created_at?: string;
2919
+ created_at?: string | null;
2461
2920
  description?: string | null;
2462
2921
  evidence_urls?: string[] | null;
2463
2922
  id?: string;
@@ -2471,60 +2930,26 @@ export type Database = {
2471
2930
  reviewed_at?: string | null;
2472
2931
  reviewed_by?: string | null;
2473
2932
  roaster_id?: string | null;
2933
+ shop_id?: string | null;
2474
2934
  status?: string;
2475
2935
  suggested_tier?: number | null;
2476
- updated_at?: string;
2936
+ updated_at?: string | null;
2477
2937
  user_id?: string | null;
2478
2938
  website?: string | null;
2479
2939
  };
2480
2940
  Relationships: [
2481
2941
  {
2482
- foreignKeyName: "roaster_submissions_approved_roaster_id_fkey";
2483
- columns: ["approved_roaster_id"];
2484
- isOneToOne: false;
2485
- referencedRelation: "roasters";
2486
- referencedColumns: ["id"];
2487
- },
2488
- {
2489
- foreignKeyName: "roaster_submissions_reviewed_by_fkey";
2490
- columns: ["reviewed_by"];
2491
- isOneToOne: false;
2492
- referencedRelation: "leaderboard";
2493
- referencedColumns: ["id"];
2494
- },
2495
- {
2496
- foreignKeyName: "roaster_submissions_reviewed_by_fkey";
2497
- columns: ["reviewed_by"];
2498
- isOneToOne: false;
2499
- referencedRelation: "user_activity_summary";
2500
- referencedColumns: ["id"];
2501
- },
2502
- {
2503
- foreignKeyName: "roaster_submissions_reviewed_by_fkey";
2504
- columns: ["reviewed_by"];
2505
- isOneToOne: false;
2506
- referencedRelation: "users";
2507
- referencedColumns: ["id"];
2508
- },
2509
- {
2510
- foreignKeyName: "roaster_submissions_user_id_fkey";
2511
- columns: ["user_id"];
2512
- isOneToOne: false;
2513
- referencedRelation: "leaderboard";
2514
- referencedColumns: ["id"];
2515
- },
2516
- {
2517
- foreignKeyName: "roaster_submissions_user_id_fkey";
2518
- columns: ["user_id"];
2942
+ foreignKeyName: "roaster_submissions_shop_id_fkey";
2943
+ columns: ["shop_id"];
2519
2944
  isOneToOne: false;
2520
- referencedRelation: "user_activity_summary";
2945
+ referencedRelation: "shop_stats";
2521
2946
  referencedColumns: ["id"];
2522
2947
  },
2523
2948
  {
2524
- foreignKeyName: "roaster_submissions_user_id_fkey";
2525
- columns: ["user_id"];
2949
+ foreignKeyName: "roaster_submissions_shop_id_fkey";
2950
+ columns: ["shop_id"];
2526
2951
  isOneToOne: false;
2527
- referencedRelation: "users";
2952
+ referencedRelation: "shops";
2528
2953
  referencedColumns: ["id"];
2529
2954
  }
2530
2955
  ];
@@ -2586,84 +3011,56 @@ export type Database = {
2586
3011
  };
2587
3012
  Relationships: [];
2588
3013
  };
2589
- shop_beans: {
2590
- Row: {
2591
- bean_id: string;
2592
- shop_id: string;
2593
- };
2594
- Insert: {
2595
- bean_id: string;
2596
- shop_id: string;
2597
- };
2598
- Update: {
2599
- bean_id?: string;
2600
- shop_id?: string;
2601
- };
2602
- Relationships: [
2603
- {
2604
- foreignKeyName: "shop_beans_bean_id_fkey";
2605
- columns: ["bean_id"];
2606
- isOneToOne: false;
2607
- referencedRelation: "coffee_beans";
2608
- referencedColumns: ["id"];
2609
- },
2610
- {
2611
- foreignKeyName: "shop_beans_shop_id_fkey";
2612
- columns: ["shop_id"];
2613
- isOneToOne: false;
2614
- referencedRelation: "shop_stats";
2615
- referencedColumns: ["id"];
2616
- },
2617
- {
2618
- foreignKeyName: "shop_beans_shop_id_fkey";
2619
- columns: ["shop_id"];
2620
- isOneToOne: false;
2621
- referencedRelation: "shops";
2622
- referencedColumns: ["id"];
2623
- }
2624
- ];
2625
- };
2626
- shop_daily_visitor_stats: {
3014
+ shop_awards: {
2627
3015
  Row: {
3016
+ award_type: string;
2628
3017
  created_at: string | null;
2629
- date: string;
2630
3018
  id: string;
3019
+ image_url: string | null;
3020
+ issued_by: string | null;
3021
+ notes: string | null;
2631
3022
  shop_id: string;
2632
- total_check_ins: number | null;
2633
- unique_visitors: number | null;
3023
+ title: string;
3024
+ type: string;
2634
3025
  updated_at: string | null;
2635
- user_check_ins: Json | null;
3026
+ year: number | null;
2636
3027
  };
2637
3028
  Insert: {
3029
+ award_type: string;
2638
3030
  created_at?: string | null;
2639
- date: string;
2640
3031
  id?: string;
3032
+ image_url?: string | null;
3033
+ issued_by?: string | null;
3034
+ notes?: string | null;
2641
3035
  shop_id: string;
2642
- total_check_ins?: number | null;
2643
- unique_visitors?: number | null;
3036
+ title: string;
3037
+ type: string;
2644
3038
  updated_at?: string | null;
2645
- user_check_ins?: Json | null;
3039
+ year?: number | null;
2646
3040
  };
2647
3041
  Update: {
3042
+ award_type?: string;
2648
3043
  created_at?: string | null;
2649
- date?: string;
2650
3044
  id?: string;
3045
+ image_url?: string | null;
3046
+ issued_by?: string | null;
3047
+ notes?: string | null;
2651
3048
  shop_id?: string;
2652
- total_check_ins?: number | null;
2653
- unique_visitors?: number | null;
3049
+ title?: string;
3050
+ type?: string;
2654
3051
  updated_at?: string | null;
2655
- user_check_ins?: Json | null;
3052
+ year?: number | null;
2656
3053
  };
2657
3054
  Relationships: [
2658
3055
  {
2659
- foreignKeyName: "shop_daily_visitor_stats_shop_id_fkey";
3056
+ foreignKeyName: "shop_awards_shop_id_fkey";
2660
3057
  columns: ["shop_id"];
2661
3058
  isOneToOne: false;
2662
3059
  referencedRelation: "shop_stats";
2663
3060
  referencedColumns: ["id"];
2664
3061
  },
2665
3062
  {
2666
- foreignKeyName: "shop_daily_visitor_stats_shop_id_fkey";
3063
+ foreignKeyName: "shop_awards_shop_id_fkey";
2667
3064
  columns: ["shop_id"];
2668
3065
  isOneToOne: false;
2669
3066
  referencedRelation: "shops";
@@ -2671,103 +3068,84 @@ export type Database = {
2671
3068
  }
2672
3069
  ];
2673
3070
  };
2674
- shop_favourites: {
3071
+ shop_beans: {
2675
3072
  Row: {
2676
- created_at: string | null;
3073
+ bean_id: string;
2677
3074
  shop_id: string;
2678
- user_id: string;
2679
3075
  };
2680
3076
  Insert: {
2681
- created_at?: string | null;
3077
+ bean_id: string;
2682
3078
  shop_id: string;
2683
- user_id: string;
2684
3079
  };
2685
3080
  Update: {
2686
- created_at?: string | null;
3081
+ bean_id?: string;
2687
3082
  shop_id?: string;
2688
- user_id?: string;
2689
3083
  };
2690
3084
  Relationships: [
2691
3085
  {
2692
- foreignKeyName: "shop_favourites_shop_id_fkey";
2693
- columns: ["shop_id"];
3086
+ foreignKeyName: "shop_beans_bean_id_fkey";
3087
+ columns: ["bean_id"];
2694
3088
  isOneToOne: false;
2695
- referencedRelation: "shop_stats";
3089
+ referencedRelation: "coffee_beans";
2696
3090
  referencedColumns: ["id"];
2697
3091
  },
2698
3092
  {
2699
- foreignKeyName: "shop_favourites_shop_id_fkey";
3093
+ foreignKeyName: "shop_beans_shop_id_fkey";
2700
3094
  columns: ["shop_id"];
2701
3095
  isOneToOne: false;
2702
- referencedRelation: "shops";
2703
- referencedColumns: ["id"];
2704
- },
2705
- {
2706
- foreignKeyName: "shop_favourites_user_id_fkey";
2707
- columns: ["user_id"];
2708
- isOneToOne: false;
2709
- referencedRelation: "leaderboard";
2710
- referencedColumns: ["id"];
2711
- },
2712
- {
2713
- foreignKeyName: "shop_favourites_user_id_fkey";
2714
- columns: ["user_id"];
2715
- isOneToOne: false;
2716
- referencedRelation: "user_activity_summary";
3096
+ referencedRelation: "shop_stats";
2717
3097
  referencedColumns: ["id"];
2718
3098
  },
2719
3099
  {
2720
- foreignKeyName: "shop_favourites_user_id_fkey";
2721
- columns: ["user_id"];
3100
+ foreignKeyName: "shop_beans_shop_id_fkey";
3101
+ columns: ["shop_id"];
2722
3102
  isOneToOne: false;
2723
- referencedRelation: "users";
3103
+ referencedRelation: "shops";
2724
3104
  referencedColumns: ["id"];
2725
3105
  }
2726
3106
  ];
2727
3107
  };
2728
- shop_awards: {
3108
+ shop_daily_visitor_stats: {
2729
3109
  Row: {
2730
- id: string;
2731
- shop_id: string;
2732
- type: string;
2733
- award_type: string;
2734
- title: string;
2735
- year: number | null;
2736
- notes: string | null;
2737
- image_url: string | null;
2738
- issued_by: string | null;
2739
3110
  created_at: string | null;
3111
+ date: string;
3112
+ id: string;
3113
+ shop_id: string;
3114
+ total_check_ins: number | null;
3115
+ unique_visitors: number | null;
2740
3116
  updated_at: string | null;
3117
+ user_check_ins: Json | null;
2741
3118
  };
2742
3119
  Insert: {
3120
+ created_at?: string | null;
3121
+ date: string;
2743
3122
  id?: string;
2744
3123
  shop_id: string;
2745
- type: string;
2746
- award_type: string;
2747
- title: string;
2748
- year?: number | null;
2749
- notes?: string | null;
2750
- image_url?: string | null;
2751
- issued_by?: string | null;
2752
- created_at?: string | null;
3124
+ total_check_ins?: number | null;
3125
+ unique_visitors?: number | null;
2753
3126
  updated_at?: string | null;
3127
+ user_check_ins?: Json | null;
2754
3128
  };
2755
3129
  Update: {
3130
+ created_at?: string | null;
3131
+ date?: string;
2756
3132
  id?: string;
2757
3133
  shop_id?: string;
2758
- type?: string;
2759
- award_type?: string;
2760
- title?: string;
2761
- year?: number | null;
2762
- notes?: string | null;
2763
- image_url?: string | null;
2764
- issued_by?: string | null;
2765
- created_at?: string | null;
3134
+ total_check_ins?: number | null;
3135
+ unique_visitors?: number | null;
2766
3136
  updated_at?: string | null;
3137
+ user_check_ins?: Json | null;
2767
3138
  };
2768
3139
  Relationships: [
2769
3140
  {
2770
- foreignKeyName: "shop_awards_shop_id_fkey";
3141
+ foreignKeyName: "shop_daily_visitor_stats_shop_id_fkey";
3142
+ columns: ["shop_id"];
3143
+ isOneToOne: false;
3144
+ referencedRelation: "shop_stats";
3145
+ referencedColumns: ["id"];
3146
+ },
3147
+ {
3148
+ foreignKeyName: "shop_daily_visitor_stats_shop_id_fkey";
2771
3149
  columns: ["shop_id"];
2772
3150
  isOneToOne: false;
2773
3151
  referencedRelation: "shops";
@@ -2775,7 +3153,7 @@ export type Database = {
2775
3153
  }
2776
3154
  ];
2777
3155
  };
2778
- shop_followers: {
3156
+ shop_favourites: {
2779
3157
  Row: {
2780
3158
  created_at: string | null;
2781
3159
  shop_id: string;
@@ -2793,35 +3171,35 @@ export type Database = {
2793
3171
  };
2794
3172
  Relationships: [
2795
3173
  {
2796
- foreignKeyName: "shop_followers_shop_id_fkey";
3174
+ foreignKeyName: "shop_favourites_shop_id_fkey";
2797
3175
  columns: ["shop_id"];
2798
3176
  isOneToOne: false;
2799
3177
  referencedRelation: "shop_stats";
2800
3178
  referencedColumns: ["id"];
2801
3179
  },
2802
3180
  {
2803
- foreignKeyName: "shop_followers_shop_id_fkey";
3181
+ foreignKeyName: "shop_favourites_shop_id_fkey";
2804
3182
  columns: ["shop_id"];
2805
3183
  isOneToOne: false;
2806
3184
  referencedRelation: "shops";
2807
3185
  referencedColumns: ["id"];
2808
3186
  },
2809
3187
  {
2810
- foreignKeyName: "shop_followers_user_id_fkey";
3188
+ foreignKeyName: "shop_favourites_user_id_fkey";
2811
3189
  columns: ["user_id"];
2812
3190
  isOneToOne: false;
2813
3191
  referencedRelation: "leaderboard";
2814
3192
  referencedColumns: ["id"];
2815
3193
  },
2816
3194
  {
2817
- foreignKeyName: "shop_followers_user_id_fkey";
3195
+ foreignKeyName: "shop_favourites_user_id_fkey";
2818
3196
  columns: ["user_id"];
2819
3197
  isOneToOne: false;
2820
3198
  referencedRelation: "user_activity_summary";
2821
3199
  referencedColumns: ["id"];
2822
3200
  },
2823
3201
  {
2824
- foreignKeyName: "shop_followers_user_id_fkey";
3202
+ foreignKeyName: "shop_favourites_user_id_fkey";
2825
3203
  columns: ["user_id"];
2826
3204
  isOneToOne: false;
2827
3205
  referencedRelation: "users";
@@ -2908,19 +3286,28 @@ export type Database = {
2908
3286
  };
2909
3287
  shop_roasters: {
2910
3288
  Row: {
3289
+ available_for_purchase: boolean;
3290
+ in_grinder: boolean;
2911
3291
  is_house_roaster: boolean | null;
2912
3292
  roaster_id: string;
2913
3293
  shop_id: string;
3294
+ show_on_public_profile: boolean;
2914
3295
  };
2915
3296
  Insert: {
3297
+ available_for_purchase?: boolean;
3298
+ in_grinder?: boolean;
2916
3299
  is_house_roaster?: boolean | null;
2917
3300
  roaster_id: string;
2918
3301
  shop_id: string;
3302
+ show_on_public_profile?: boolean;
2919
3303
  };
2920
3304
  Update: {
3305
+ available_for_purchase?: boolean;
3306
+ in_grinder?: boolean;
2921
3307
  is_house_roaster?: boolean | null;
2922
3308
  roaster_id?: string;
2923
3309
  shop_id?: string;
3310
+ show_on_public_profile?: boolean;
2924
3311
  };
2925
3312
  Relationships: [
2926
3313
  {
@@ -3026,6 +3413,7 @@ export type Database = {
3026
3413
  fika_rating: number | null;
3027
3414
  flag_for_review: boolean;
3028
3415
  flag_reason: string | null;
3416
+ franchise_id: string | null;
3029
3417
  geo_point: Json | null;
3030
3418
  google_rating: number | null;
3031
3419
  id: string;
@@ -3044,6 +3432,7 @@ export type Database = {
3044
3432
  roasting_and_beans_info: Json | null;
3045
3433
  signals: Json | null;
3046
3434
  slug: string | null;
3435
+ socials: Json | null;
3047
3436
  speciality_level: string | null;
3048
3437
  specialties: Json | null;
3049
3438
  specialty: Json | null;
@@ -3069,6 +3458,7 @@ export type Database = {
3069
3458
  fika_rating?: number | null;
3070
3459
  flag_for_review?: boolean;
3071
3460
  flag_reason?: string | null;
3461
+ franchise_id?: string | null;
3072
3462
  geo_point?: Json | null;
3073
3463
  google_rating?: number | null;
3074
3464
  id: string;
@@ -3087,6 +3477,7 @@ export type Database = {
3087
3477
  roasting_and_beans_info?: Json | null;
3088
3478
  signals?: Json | null;
3089
3479
  slug?: string | null;
3480
+ socials?: Json | null;
3090
3481
  speciality_level?: string | null;
3091
3482
  specialties?: Json | null;
3092
3483
  specialty?: Json | null;
@@ -3112,6 +3503,7 @@ export type Database = {
3112
3503
  fika_rating?: number | null;
3113
3504
  flag_for_review?: boolean;
3114
3505
  flag_reason?: string | null;
3506
+ franchise_id?: string | null;
3115
3507
  geo_point?: Json | null;
3116
3508
  google_rating?: number | null;
3117
3509
  id?: string;
@@ -3130,6 +3522,7 @@ export type Database = {
3130
3522
  roasting_and_beans_info?: Json | null;
3131
3523
  signals?: Json | null;
3132
3524
  slug?: string | null;
3525
+ socials?: Json | null;
3133
3526
  speciality_level?: string | null;
3134
3527
  specialties?: Json | null;
3135
3528
  specialty?: Json | null;
@@ -3157,121 +3550,12 @@ export type Database = {
3157
3550
  isOneToOne: false;
3158
3551
  referencedRelation: "users";
3159
3552
  referencedColumns: ["id"];
3160
- }
3161
- ];
3162
- };
3163
- shot_likes: {
3164
- Row: {
3165
- created_at: string | null;
3166
- shot_id: string;
3167
- user_id: string;
3168
- };
3169
- Insert: {
3170
- created_at?: string | null;
3171
- shot_id: string;
3172
- user_id: string;
3173
- };
3174
- Update: {
3175
- created_at?: string | null;
3176
- shot_id?: string;
3177
- user_id?: string;
3178
- };
3179
- Relationships: [
3180
- {
3181
- foreignKeyName: "shot_likes_shot_id_fkey";
3182
- columns: ["shot_id"];
3183
- isOneToOne: false;
3184
- referencedRelation: "shots";
3185
- referencedColumns: ["id"];
3186
- },
3187
- {
3188
- foreignKeyName: "shot_likes_user_id_fkey";
3189
- columns: ["user_id"];
3190
- isOneToOne: false;
3191
- referencedRelation: "leaderboard";
3192
- referencedColumns: ["id"];
3193
- },
3194
- {
3195
- foreignKeyName: "shot_likes_user_id_fkey";
3196
- columns: ["user_id"];
3197
- isOneToOne: false;
3198
- referencedRelation: "user_activity_summary";
3199
- referencedColumns: ["id"];
3200
- },
3201
- {
3202
- foreignKeyName: "shot_likes_user_id_fkey";
3203
- columns: ["user_id"];
3204
- isOneToOne: false;
3205
- referencedRelation: "users";
3206
- referencedColumns: ["id"];
3207
- }
3208
- ];
3209
- };
3210
- shots: {
3211
- Row: {
3212
- coffee_shop_id: string | null;
3213
- coffee_shop_name: string | null;
3214
- created_at: string | null;
3215
- date: string | null;
3216
- geo_point: Json | null;
3217
- id: string;
3218
- image: string | null;
3219
- user_id: string | null;
3220
- };
3221
- Insert: {
3222
- coffee_shop_id?: string | null;
3223
- coffee_shop_name?: string | null;
3224
- created_at?: string | null;
3225
- date?: string | null;
3226
- geo_point?: Json | null;
3227
- id: string;
3228
- image?: string | null;
3229
- user_id?: string | null;
3230
- };
3231
- Update: {
3232
- coffee_shop_id?: string | null;
3233
- coffee_shop_name?: string | null;
3234
- created_at?: string | null;
3235
- date?: string | null;
3236
- geo_point?: Json | null;
3237
- id?: string;
3238
- image?: string | null;
3239
- user_id?: string | null;
3240
- };
3241
- Relationships: [
3242
- {
3243
- foreignKeyName: "shots_coffee_shop_id_fkey";
3244
- columns: ["coffee_shop_id"];
3245
- isOneToOne: false;
3246
- referencedRelation: "shop_stats";
3247
- referencedColumns: ["id"];
3248
- },
3249
- {
3250
- foreignKeyName: "shots_coffee_shop_id_fkey";
3251
- columns: ["coffee_shop_id"];
3252
- isOneToOne: false;
3253
- referencedRelation: "shops";
3254
- referencedColumns: ["id"];
3255
- },
3256
- {
3257
- foreignKeyName: "shots_user_id_fkey";
3258
- columns: ["user_id"];
3259
- isOneToOne: false;
3260
- referencedRelation: "leaderboard";
3261
- referencedColumns: ["id"];
3262
- },
3263
- {
3264
- foreignKeyName: "shots_user_id_fkey";
3265
- columns: ["user_id"];
3266
- isOneToOne: false;
3267
- referencedRelation: "user_activity_summary";
3268
- referencedColumns: ["id"];
3269
3553
  },
3270
3554
  {
3271
- foreignKeyName: "shots_user_id_fkey";
3272
- columns: ["user_id"];
3555
+ foreignKeyName: "shops_franchise_id_fkey";
3556
+ columns: ["franchise_id"];
3273
3557
  isOneToOne: false;
3274
- referencedRelation: "users";
3558
+ referencedRelation: "franchises";
3275
3559
  referencedColumns: ["id"];
3276
3560
  }
3277
3561
  ];
@@ -3327,6 +3611,27 @@ export type Database = {
3327
3611
  };
3328
3612
  Relationships: [];
3329
3613
  };
3614
+ specialty_scoring_config: {
3615
+ Row: {
3616
+ description: string | null;
3617
+ key: string;
3618
+ updated_at: string | null;
3619
+ value: Json;
3620
+ };
3621
+ Insert: {
3622
+ description?: string | null;
3623
+ key: string;
3624
+ updated_at?: string | null;
3625
+ value: Json;
3626
+ };
3627
+ Update: {
3628
+ description?: string | null;
3629
+ key?: string;
3630
+ updated_at?: string | null;
3631
+ value?: Json;
3632
+ };
3633
+ Relationships: [];
3634
+ };
3330
3635
  staff: {
3331
3636
  Row: {
3332
3637
  accepted_at: string | null;
@@ -3455,7 +3760,7 @@ export type Database = {
3455
3760
  accepted_at: string | null;
3456
3761
  accepted_by: string | null;
3457
3762
  created_at: string;
3458
- email: string;
3763
+ email: string | null;
3459
3764
  expires_at: string;
3460
3765
  id: string;
3461
3766
  invited_by: string | null;
@@ -3465,12 +3770,13 @@ export type Database = {
3465
3770
  shop_id: string;
3466
3771
  status: string;
3467
3772
  token: string;
3773
+ updated_at: string | null;
3468
3774
  };
3469
3775
  Insert: {
3470
3776
  accepted_at?: string | null;
3471
3777
  accepted_by?: string | null;
3472
3778
  created_at?: string;
3473
- email: string;
3779
+ email?: string | null;
3474
3780
  expires_at: string;
3475
3781
  id?: string;
3476
3782
  invited_by?: string | null;
@@ -3480,12 +3786,13 @@ export type Database = {
3480
3786
  shop_id: string;
3481
3787
  status?: string;
3482
3788
  token: string;
3789
+ updated_at?: string | null;
3483
3790
  };
3484
3791
  Update: {
3485
3792
  accepted_at?: string | null;
3486
3793
  accepted_by?: string | null;
3487
3794
  created_at?: string;
3488
- email?: string;
3795
+ email?: string | null;
3489
3796
  expires_at?: string;
3490
3797
  id?: string;
3491
3798
  invited_by?: string | null;
@@ -3495,6 +3802,7 @@ export type Database = {
3495
3802
  shop_id?: string;
3496
3803
  status?: string;
3497
3804
  token?: string;
3805
+ updated_at?: string | null;
3498
3806
  };
3499
3807
  Relationships: [
3500
3808
  {
@@ -3563,6 +3871,7 @@ export type Database = {
3563
3871
  id: string;
3564
3872
  image_url: string | null;
3565
3873
  is_active: boolean | null;
3874
+ is_default: boolean | null;
3566
3875
  name: string;
3567
3876
  rarity: string | null;
3568
3877
  unlock_criteria: Json | null;
@@ -3574,6 +3883,7 @@ export type Database = {
3574
3883
  id: string;
3575
3884
  image_url?: string | null;
3576
3885
  is_active?: boolean | null;
3886
+ is_default?: boolean | null;
3577
3887
  name: string;
3578
3888
  rarity?: string | null;
3579
3889
  unlock_criteria?: Json | null;
@@ -3585,19 +3895,83 @@ export type Database = {
3585
3895
  id?: string;
3586
3896
  image_url?: string | null;
3587
3897
  is_active?: boolean | null;
3898
+ is_default?: boolean | null;
3588
3899
  name?: string;
3589
3900
  rarity?: string | null;
3590
3901
  unlock_criteria?: Json | null;
3591
3902
  };
3592
3903
  Relationships: [];
3593
3904
  };
3905
+ submission_origins: {
3906
+ Row: {
3907
+ altitude_max_m: number | null;
3908
+ altitude_min_m: number | null;
3909
+ blend_percentage: number | null;
3910
+ country_code: string;
3911
+ country_name: string | null;
3912
+ farm_id: string | null;
3913
+ farm_name_unverified: string | null;
3914
+ ordinal: number;
3915
+ producer_name: string | null;
3916
+ region: string | null;
3917
+ submission_id: string;
3918
+ subregion: string | null;
3919
+ trade_program: string | null;
3920
+ };
3921
+ Insert: {
3922
+ altitude_max_m?: number | null;
3923
+ altitude_min_m?: number | null;
3924
+ blend_percentage?: number | null;
3925
+ country_code: string;
3926
+ country_name?: string | null;
3927
+ farm_id?: string | null;
3928
+ farm_name_unverified?: string | null;
3929
+ ordinal: number;
3930
+ producer_name?: string | null;
3931
+ region?: string | null;
3932
+ submission_id: string;
3933
+ subregion?: string | null;
3934
+ trade_program?: string | null;
3935
+ };
3936
+ Update: {
3937
+ altitude_max_m?: number | null;
3938
+ altitude_min_m?: number | null;
3939
+ blend_percentage?: number | null;
3940
+ country_code?: string;
3941
+ country_name?: string | null;
3942
+ farm_id?: string | null;
3943
+ farm_name_unverified?: string | null;
3944
+ ordinal?: number;
3945
+ producer_name?: string | null;
3946
+ region?: string | null;
3947
+ submission_id?: string;
3948
+ subregion?: string | null;
3949
+ trade_program?: string | null;
3950
+ };
3951
+ Relationships: [
3952
+ {
3953
+ foreignKeyName: "submission_origins_farm_id_fkey";
3954
+ columns: ["farm_id"];
3955
+ isOneToOne: false;
3956
+ referencedRelation: "farms";
3957
+ referencedColumns: ["id"];
3958
+ },
3959
+ {
3960
+ foreignKeyName: "submission_origins_submission_id_fkey";
3961
+ columns: ["submission_id"];
3962
+ isOneToOne: false;
3963
+ referencedRelation: "coffee_bean_submissions";
3964
+ referencedColumns: ["id"];
3965
+ }
3966
+ ];
3967
+ };
3594
3968
  submissions: {
3595
3969
  Row: {
3596
3970
  active: boolean | null;
3597
3971
  city: string | null;
3598
3972
  contact_details: Json | null;
3599
3973
  country_code: string | null;
3600
- created_at: string;
3974
+ created_at: string | null;
3601
3975
  custom_roasters: string[] | null;
3602
3976
  data: Json | null;
3603
3977
  geo_point: Json | null;
@@ -3617,7 +3991,7 @@ export type Database = {
3617
3991
  shop_name: string | null;
3618
3992
  status: string;
3619
3993
  type: string | null;
3620
- updated_at: string;
3994
+ updated_at: string | null;
3621
3995
  user_id: string;
3622
3996
  };
3623
3997
  Insert: {
@@ -3625,7 +3999,7 @@ export type Database = {
3625
3999
  city?: string | null;
3626
4000
  contact_details?: Json | null;
3627
4001
  country_code?: string | null;
3628
- created_at?: string;
4002
+ created_at?: string | null;
3629
4003
  custom_roasters?: string[] | null;
3630
4004
  data?: Json | null;
3631
4005
  geo_point?: Json | null;
@@ -3645,7 +4019,7 @@ export type Database = {
3645
4019
  shop_name?: string | null;
3646
4020
  status?: string;
3647
4021
  type?: string | null;
3648
- updated_at?: string;
4022
+ updated_at?: string | null;
3649
4023
  user_id: string;
3650
4024
  };
3651
4025
  Update: {
@@ -3653,7 +4027,7 @@ export type Database = {
3653
4027
  city?: string | null;
3654
4028
  contact_details?: Json | null;
3655
4029
  country_code?: string | null;
3656
- created_at?: string;
4030
+ created_at?: string | null;
3657
4031
  custom_roasters?: string[] | null;
3658
4032
  data?: Json | null;
3659
4033
  geo_point?: Json | null;
@@ -3673,7 +4047,7 @@ export type Database = {
3673
4047
  shop_name?: string | null;
3674
4048
  status?: string;
3675
4049
  type?: string | null;
3676
- updated_at?: string;
4050
+ updated_at?: string | null;
3677
4051
  user_id?: string;
3678
4052
  };
3679
4053
  Relationships: [
@@ -3697,27 +4071,6 @@ export type Database = {
3697
4071
  isOneToOne: false;
3698
4072
  referencedRelation: "users";
3699
4073
  referencedColumns: ["id"];
3700
- },
3701
- {
3702
- foreignKeyName: "submissions_user_id_fkey";
3703
- columns: ["user_id"];
3704
- isOneToOne: false;
3705
- referencedRelation: "leaderboard";
3706
- referencedColumns: ["id"];
3707
- },
3708
- {
3709
- foreignKeyName: "submissions_user_id_fkey";
3710
- columns: ["user_id"];
3711
- isOneToOne: false;
3712
- referencedRelation: "user_activity_summary";
3713
- referencedColumns: ["id"];
3714
- },
3715
- {
3716
- foreignKeyName: "submissions_user_id_fkey";
3717
- columns: ["user_id"];
3718
- isOneToOne: false;
3719
- referencedRelation: "users";
3720
- referencedColumns: ["id"];
3721
4074
  }
3722
4075
  ];
3723
4076
  };
@@ -4280,13 +4633,6 @@ export type Database = {
4280
4633
  user_id?: string;
4281
4634
  };
4282
4635
  Relationships: [
4283
- {
4284
- foreignKeyName: "user_stickers_sticker_id_fkey";
4285
- columns: ["sticker_id"];
4286
- isOneToOne: false;
4287
- referencedRelation: "stickers";
4288
- referencedColumns: ["id"];
4289
- },
4290
4636
  {
4291
4637
  foreignKeyName: "user_stickers_user_id_fkey";
4292
4638
  columns: ["user_id"];
@@ -4378,6 +4724,7 @@ export type Database = {
4378
4724
  unread_notification_count: number | null;
4379
4725
  updated_at: string | null;
4380
4726
  username: string | null;
4727
+ username_is_generated: boolean;
4381
4728
  };
4382
4729
  Insert: {
4383
4730
  created_at?: string | null;
@@ -4406,6 +4753,7 @@ export type Database = {
4406
4753
  unread_notification_count?: number | null;
4407
4754
  updated_at?: string | null;
4408
4755
  username?: string | null;
4756
+ username_is_generated?: boolean;
4409
4757
  };
4410
4758
  Update: {
4411
4759
  created_at?: string | null;
@@ -4434,6 +4782,7 @@ export type Database = {
4434
4782
  unread_notification_count?: number | null;
4435
4783
  updated_at?: string | null;
4436
4784
  username?: string | null;
4785
+ username_is_generated?: boolean;
4437
4786
  };
4438
4787
  Relationships: [];
4439
4788
  };
@@ -4587,12 +4936,12 @@ export type Database = {
4587
4936
  leaderboard: {
4588
4937
  Row: {
4589
4938
  display_name: string | null;
4939
+ home_country: string | null;
4590
4940
  id: string | null;
4591
4941
  profile_image: string | null;
4592
4942
  rank: number | null;
4593
4943
  total_points: number | null;
4594
4944
  total_reviews: number | null;
4595
- total_shots: number | null;
4596
4945
  username: string | null;
4597
4946
  };
4598
4947
  Relationships: [];
@@ -4601,11 +4950,9 @@ export type Database = {
4601
4950
  Row: {
4602
4951
  avg_craft_rating: number | null;
4603
4952
  favourite_count: number | null;
4604
- follower_count: number | null;
4605
4953
  id: string | null;
4606
4954
  name: string | null;
4607
4955
  review_count: number | null;
4608
- shot_count: number | null;
4609
4956
  };
4610
4957
  Relationships: [];
4611
4958
  };
@@ -4615,7 +4962,6 @@ export type Database = {
4615
4962
  following_count: number | null;
4616
4963
  id: string | null;
4617
4964
  review_count: number | null;
4618
- shot_count: number | null;
4619
4965
  stamp_count: number | null;
4620
4966
  total_points: number | null;
4621
4967
  username: string | null;
@@ -4624,7 +4970,103 @@ export type Database = {
4624
4970
  };
4625
4971
  };
4626
4972
  Functions: {
4627
- [_ in never]: never;
4973
+ calculate_brew_method_score: {
4974
+ Args: {
4975
+ p_shop_id: string;
4976
+ };
4977
+ Returns: number;
4978
+ };
4979
+ calculate_community_score: {
4980
+ Args: {
4981
+ p_shop_id: string;
4982
+ };
4983
+ Returns: number;
4984
+ };
4985
+ calculate_crowd_score: {
4986
+ Args: {
4987
+ p_shop_id: string;
4988
+ };
4989
+ Returns: number;
4990
+ };
4991
+ calculate_roaster_score: {
4992
+ Args: {
4993
+ p_shop_id: string;
4994
+ };
4995
+ Returns: number;
4996
+ };
4997
+ calculate_semantic_score: {
4998
+ Args: {
4999
+ p_shop_id: string;
5000
+ };
5001
+ Returns: number;
5002
+ };
5003
+ generate_specialty_explanations: {
5004
+ Args: {
5005
+ p_brew_score: number;
5006
+ p_community_score: number;
5007
+ p_crowd_score: number;
5008
+ p_highest_tier: number;
5009
+ p_roaster_score: number;
5010
+ p_semantic_score: number;
5011
+ p_shop_id: string;
5012
+ };
5013
+ Returns: Json;
5014
+ };
5015
+ get_scoring_config: {
5016
+ Args: {
5017
+ p_key: string;
5018
+ };
5019
+ Returns: Json;
5020
+ };
5021
+ get_tier_from_score: {
5022
+ Args: {
5023
+ p_score: number;
5024
+ };
5025
+ Returns: string;
5026
+ };
5027
+ increment_event_photo_report_count: {
5028
+ Args: {
5029
+ photo_id_arg: string;
5030
+ };
5031
+ Returns: undefined;
5032
+ };
5033
+ increment_event_post_report_count: {
5034
+ Args: {
5035
+ post_id_arg: string;
5036
+ };
5037
+ Returns: undefined;
5038
+ };
5039
+ is_fika_auth_jwt: {
5040
+ Args: never;
5041
+ Returns: boolean;
5042
+ };
5043
+ process_specialty_jobs: {
5044
+ Args: {
5045
+ p_limit?: number;
5046
+ };
5047
+ Returns: number;
5048
+ };
5049
+ recalculate_shop_aggregates: {
5050
+ Args: {
5051
+ p_shop_id: string;
5052
+ };
5053
+ Returns: undefined;
5054
+ };
5055
+ recompute_shop_specialty: {
5056
+ Args: {
5057
+ p_force?: boolean;
5058
+ p_shop_id: string;
5059
+ };
5060
+ Returns: undefined;
5061
+ };
5062
+ request_is_admin: {
5063
+ Args: never;
5064
+ Returns: boolean;
5065
+ };
5066
+ request_jwt_uid: {
5067
+ Args: never;
5068
+ Returns: string;
5069
+ };
4628
5070
  };
4629
5071
  Enums: {
4630
5072
  menu_item_category: "drink" | "food";