@koloseum/types 0.3.5 → 0.3.7

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.
@@ -2952,23 +2952,42 @@ export type Database = {
2952
2952
  lounge_staff: {
2953
2953
  Row: {
2954
2954
  created_at: string;
2955
+ id: string;
2956
+ lounge_branch_id: string | null;
2955
2957
  lounge_id: string;
2958
+ metadata: Json;
2956
2959
  player_id: string;
2960
+ role: string;
2957
2961
  user_id: string;
2958
2962
  };
2959
2963
  Insert: {
2960
2964
  created_at?: string;
2965
+ id?: string;
2966
+ lounge_branch_id?: string | null;
2961
2967
  lounge_id: string;
2968
+ metadata?: Json;
2962
2969
  player_id: string;
2970
+ role: string;
2963
2971
  user_id: string;
2964
2972
  };
2965
2973
  Update: {
2966
2974
  created_at?: string;
2975
+ id?: string;
2976
+ lounge_branch_id?: string | null;
2967
2977
  lounge_id?: string;
2978
+ metadata?: Json;
2968
2979
  player_id?: string;
2980
+ role?: string;
2969
2981
  user_id?: string;
2970
2982
  };
2971
2983
  Relationships: [
2984
+ {
2985
+ foreignKeyName: "lounge_staff_lounge_branch_id_fkey";
2986
+ columns: ["lounge_branch_id"];
2987
+ isOneToOne: false;
2988
+ referencedRelation: "lounge_branches";
2989
+ referencedColumns: ["id"];
2990
+ },
2972
2991
  {
2973
2992
  foreignKeyName: "lounge_staff_lounge_id_fkey";
2974
2993
  columns: ["lounge_id"];
@@ -2982,6 +3001,13 @@ export type Database = {
2982
3001
  isOneToOne: false;
2983
3002
  referencedRelation: "players";
2984
3003
  referencedColumns: ["id"];
3004
+ },
3005
+ {
3006
+ foreignKeyName: "lounge_staff_role_fkey";
3007
+ columns: ["user_id", "role"];
3008
+ isOneToOne: false;
3009
+ referencedRelation: "user_roles";
3010
+ referencedColumns: ["user_id", "role"];
2985
3011
  }
2986
3012
  ];
2987
3013
  };
@@ -3048,6 +3074,86 @@ export type Database = {
3048
3074
  };
3049
3075
  Relationships: [];
3050
3076
  };
3077
+ notification_events: {
3078
+ Row: {
3079
+ created_at: string;
3080
+ idempotency_key: string | null;
3081
+ request_id: number | null;
3082
+ response_data: Json | null;
3083
+ system_event_id: string;
3084
+ workflow_event_key: string;
3085
+ };
3086
+ Insert: {
3087
+ created_at?: string;
3088
+ idempotency_key?: string | null;
3089
+ request_id?: number | null;
3090
+ response_data?: Json | null;
3091
+ system_event_id: string;
3092
+ workflow_event_key: string;
3093
+ };
3094
+ Update: {
3095
+ created_at?: string;
3096
+ idempotency_key?: string | null;
3097
+ request_id?: number | null;
3098
+ response_data?: Json | null;
3099
+ system_event_id?: string;
3100
+ workflow_event_key?: string;
3101
+ };
3102
+ Relationships: [
3103
+ {
3104
+ foreignKeyName: "notification_events_system_event_id_fkey";
3105
+ columns: ["system_event_id"];
3106
+ isOneToOne: false;
3107
+ referencedRelation: "system_events";
3108
+ referencedColumns: ["id"];
3109
+ },
3110
+ {
3111
+ foreignKeyName: "notification_events_workflow_event_key_fkey";
3112
+ columns: ["workflow_event_key"];
3113
+ isOneToOne: false;
3114
+ referencedRelation: "notification_workflows";
3115
+ referencedColumns: ["event_key"];
3116
+ }
3117
+ ];
3118
+ };
3119
+ notification_workflows: {
3120
+ Row: {
3121
+ created_at: string;
3122
+ description: string | null;
3123
+ enabled: boolean;
3124
+ event_key: string;
3125
+ metadata: Json;
3126
+ system_event_type: string;
3127
+ updated_at: string | null;
3128
+ };
3129
+ Insert: {
3130
+ created_at?: string;
3131
+ description?: string | null;
3132
+ enabled?: boolean;
3133
+ event_key: string;
3134
+ metadata?: Json;
3135
+ system_event_type: string;
3136
+ updated_at?: string | null;
3137
+ };
3138
+ Update: {
3139
+ created_at?: string;
3140
+ description?: string | null;
3141
+ enabled?: boolean;
3142
+ event_key?: string;
3143
+ metadata?: Json;
3144
+ system_event_type?: string;
3145
+ updated_at?: string | null;
3146
+ };
3147
+ Relationships: [
3148
+ {
3149
+ foreignKeyName: "notification_workflows_system_event_type_fkey";
3150
+ columns: ["system_event_type"];
3151
+ isOneToOne: false;
3152
+ referencedRelation: "system_event_types";
3153
+ referencedColumns: ["event_type"];
3154
+ }
3155
+ ];
3156
+ };
3051
3157
  phone_verification_attempts: {
3052
3158
  Row: {
3053
3159
  created_at: string;
@@ -3669,6 +3775,7 @@ export type Database = {
3669
3775
  gender_identity: Database["compliance"]["Enums"]["gender_identity"] | null;
3670
3776
  id: string;
3671
3777
  last_name: string;
3778
+ metadata: Json;
3672
3779
  middle_names: string | null;
3673
3780
  nationality: string;
3674
3781
  phone: string;
@@ -3688,6 +3795,7 @@ export type Database = {
3688
3795
  gender_identity?: Database["compliance"]["Enums"]["gender_identity"] | null;
3689
3796
  id?: string;
3690
3797
  last_name: string;
3798
+ metadata?: Json;
3691
3799
  middle_names?: string | null;
3692
3800
  nationality: string;
3693
3801
  phone?: string;
@@ -3707,6 +3815,7 @@ export type Database = {
3707
3815
  gender_identity?: Database["compliance"]["Enums"]["gender_identity"] | null;
3708
3816
  id?: string;
3709
3817
  last_name?: string;
3818
+ metadata?: Json;
3710
3819
  middle_names?: string | null;
3711
3820
  nationality?: string;
3712
3821
  phone?: string;
@@ -4022,6 +4131,10 @@ export type Database = {
4022
4131
  };
4023
4132
  Returns: boolean;
4024
4133
  };
4134
+ backfill_notification_response_data: {
4135
+ Args: never;
4136
+ Returns: number;
4137
+ };
4025
4138
  check_annual_update_limit: {
4026
4139
  Args: {
4027
4140
  p_account_type: Database["compliance"]["Enums"]["account_type"];
@@ -4153,6 +4266,16 @@ export type Database = {
4153
4266
  updates: Json;
4154
4267
  }[];
4155
4268
  };
4269
+ get_lounge_branch_display_info: {
4270
+ Args: {
4271
+ p_lounge_branch_id: string;
4272
+ };
4273
+ Returns: {
4274
+ id: string;
4275
+ lounge_id: string;
4276
+ name: string;
4277
+ }[];
4278
+ };
4156
4279
  get_lounge_branches: {
4157
4280
  Args: {
4158
4281
  search?: string;
@@ -4175,6 +4298,12 @@ export type Database = {
4175
4298
  isSetofReturn: true;
4176
4299
  };
4177
4300
  };
4301
+ get_lounge_id_from_branch: {
4302
+ Args: {
4303
+ p_lounge_branch_id: string;
4304
+ };
4305
+ Returns: string;
4306
+ };
4178
4307
  get_lounge_ids: {
4179
4308
  Args: {
4180
4309
  search?: string;
@@ -4211,6 +4340,12 @@ export type Database = {
4211
4340
  institution_name: string;
4212
4341
  }[];
4213
4342
  };
4343
+ get_suprsend_response: {
4344
+ Args: {
4345
+ p_search: string;
4346
+ };
4347
+ Returns: Json;
4348
+ };
4214
4349
  get_user_phone: {
4215
4350
  Args: {
4216
4351
  search?: string;
@@ -4223,6 +4358,16 @@ export type Database = {
4223
4358
  };
4224
4359
  Returns: undefined;
4225
4360
  };
4361
+ is_current_player_minor: {
4362
+ Args: never;
4363
+ Returns: boolean;
4364
+ };
4365
+ is_current_user_lounge_branch_staff: {
4366
+ Args: {
4367
+ p_lounge_branch_id: string;
4368
+ };
4369
+ Returns: boolean;
4370
+ };
4226
4371
  is_current_user_permanent: {
4227
4372
  Args: {
4228
4373
  user_id: string;
@@ -4230,6 +4375,15 @@ export type Database = {
4230
4375
  };
4231
4376
  Returns: boolean;
4232
4377
  };
4378
+ is_user_lounge_staff: {
4379
+ Args: {
4380
+ p_lounge_branch_id?: string;
4381
+ p_lounge_id: string;
4382
+ p_role?: string;
4383
+ p_user_id: string;
4384
+ };
4385
+ Returns: boolean;
4386
+ };
4233
4387
  kxp_daily_login_grant_amount: {
4234
4388
  Args: never;
4235
4389
  Returns: number;
@@ -4269,6 +4423,14 @@ export type Database = {
4269
4423
  };
4270
4424
  Returns: string;
4271
4425
  };
4426
+ render_pronouns: {
4427
+ Args: {
4428
+ p_pronouns: Database["compliance"]["Enums"]["pronouns"][];
4429
+ p_sex: Database["compliance"]["Enums"]["sex"];
4430
+ p_show_pronouns: boolean;
4431
+ };
4432
+ Returns: Database["compliance"]["Enums"]["pronouns"][];
4433
+ };
4272
4434
  search_lounges: {
4273
4435
  Args: {
4274
4436
  search_term: string;
@@ -4277,7 +4439,9 @@ export type Database = {
4277
4439
  Returns: {
4278
4440
  company_name: string;
4279
4441
  created_at: string;
4442
+ email: string;
4280
4443
  id: string;
4444
+ phone: string;
4281
4445
  registration_date: string;
4282
4446
  trade_name: string;
4283
4447
  user_id: string;
@@ -4303,6 +4467,15 @@ export type Database = {
4303
4467
  user_id: string;
4304
4468
  }[];
4305
4469
  };
4470
+ send_suprsend_notification: {
4471
+ Args: {
4472
+ p_idempotency_key?: string;
4473
+ p_system_event_id?: string;
4474
+ p_workflow_body: Json;
4475
+ p_workflow_event_key?: string;
4476
+ };
4477
+ Returns: undefined;
4478
+ };
4306
4479
  submit_gaming_and_socials_data: {
4307
4480
  Args: {
4308
4481
  p_consoles: Json[];
@@ -4328,6 +4501,13 @@ export type Database = {
4328
4501
  };
4329
4502
  Returns: boolean;
4330
4503
  };
4504
+ validate_suprsend_subscriber: {
4505
+ Args: {
4506
+ p_person_data: Json;
4507
+ p_user_id: string;
4508
+ };
4509
+ Returns: undefined;
4510
+ };
4331
4511
  };
4332
4512
  Enums: {
4333
4513
  account_type: "player" | "lounge";
@@ -4604,10 +4784,14 @@ export type Database = {
4604
4784
  Views: {
4605
4785
  active_lounges: {
4606
4786
  Row: {
4787
+ average_rating: number | null;
4607
4788
  created_at: string | null;
4789
+ email: string | null;
4608
4790
  id: string | null;
4609
4791
  name: string | null;
4792
+ phone: string | null;
4610
4793
  registration_date: string | null;
4794
+ website: string | null;
4611
4795
  };
4612
4796
  Relationships: [];
4613
4797
  };
@@ -4631,6 +4815,28 @@ export type Database = {
4631
4815
  pronouns: Database["compliance"]["Enums"]["pronouns"][] | null;
4632
4816
  pseudonym: string | null;
4633
4817
  };
4818
+ Insert: {
4819
+ birth_date?: never;
4820
+ created_at?: string | null;
4821
+ first_name?: string | null;
4822
+ id?: string | null;
4823
+ last_name?: string | null;
4824
+ middle_names?: string | null;
4825
+ nationality?: string | null;
4826
+ pronouns?: never;
4827
+ pseudonym?: string | null;
4828
+ };
4829
+ Update: {
4830
+ birth_date?: never;
4831
+ created_at?: string | null;
4832
+ first_name?: string | null;
4833
+ id?: string | null;
4834
+ last_name?: string | null;
4835
+ middle_names?: string | null;
4836
+ nationality?: string | null;
4837
+ pronouns?: never;
4838
+ pseudonym?: string | null;
4839
+ };
4634
4840
  Relationships: [
4635
4841
  {
4636
4842
  foreignKeyName: "players_nationality_fkey";
@@ -4649,10 +4855,14 @@ export type Database = {
4649
4855
  search_type?: string;
4650
4856
  };
4651
4857
  Returns: {
4858
+ average_rating: number;
4652
4859
  created_at: string;
4860
+ email: string;
4653
4861
  id: string;
4654
4862
  name: string;
4863
+ phone: string;
4655
4864
  registration_date: string;
4865
+ website: string;
4656
4866
  }[];
4657
4867
  };
4658
4868
  search_active_players: {
@@ -4751,20 +4961,20 @@ export type Database = {
4751
4961
  Row: {
4752
4962
  created_at: string;
4753
4963
  games_consoles_id: string;
4754
- id: string;
4755
4964
  lounge_branch_id: string;
4965
+ quantity: number;
4756
4966
  };
4757
4967
  Insert: {
4758
4968
  created_at?: string;
4759
4969
  games_consoles_id: string;
4760
- id?: string;
4761
4970
  lounge_branch_id: string;
4971
+ quantity?: number;
4762
4972
  };
4763
4973
  Update: {
4764
4974
  created_at?: string;
4765
4975
  games_consoles_id?: string;
4766
- id?: string;
4767
4976
  lounge_branch_id?: string;
4977
+ quantity?: number;
4768
4978
  };
4769
4979
  Relationships: [];
4770
4980
  };
@@ -4772,22 +4982,22 @@ export type Database = {
4772
4982
  Row: {
4773
4983
  created_at: string;
4774
4984
  id: string;
4775
- in_use: boolean;
4776
4985
  lounge_branch_id: string;
4986
+ quantity: number;
4777
4987
  slot_label: string;
4778
4988
  };
4779
4989
  Insert: {
4780
4990
  created_at?: string;
4781
4991
  id?: string;
4782
- in_use?: boolean;
4783
4992
  lounge_branch_id: string;
4993
+ quantity?: number;
4784
4994
  slot_label: string;
4785
4995
  };
4786
4996
  Update: {
4787
4997
  created_at?: string;
4788
4998
  id?: string;
4789
- in_use?: boolean;
4790
4999
  lounge_branch_id?: string;
5000
+ quantity?: number;
4791
5001
  slot_label?: string;
4792
5002
  };
4793
5003
  Relationships: [];
@@ -4849,33 +5059,83 @@ export type Database = {
4849
5059
  };
4850
5060
  Relationships: [];
4851
5061
  };
4852
- lounge_branch_payment_display: {
5062
+ lounge_branch_payment_options: {
4853
5063
  Row: {
4854
5064
  created_at: string;
4855
- details: Json | null;
5065
+ details: string;
4856
5066
  id: string;
4857
5067
  lounge_branch_id: string;
4858
- name: string | null;
5068
+ name: string;
4859
5069
  updated_at: string;
5070
+ updated_by: string | null;
4860
5071
  };
4861
5072
  Insert: {
4862
5073
  created_at?: string;
4863
- details?: Json | null;
5074
+ details: string;
4864
5075
  id?: string;
4865
5076
  lounge_branch_id: string;
4866
- name?: string | null;
5077
+ name: string;
4867
5078
  updated_at?: string;
5079
+ updated_by?: string | null;
4868
5080
  };
4869
5081
  Update: {
4870
5082
  created_at?: string;
4871
- details?: Json | null;
5083
+ details?: string;
4872
5084
  id?: string;
4873
5085
  lounge_branch_id?: string;
4874
- name?: string | null;
5086
+ name?: string;
4875
5087
  updated_at?: string;
5088
+ updated_by?: string | null;
4876
5089
  };
4877
5090
  Relationships: [];
4878
5091
  };
5092
+ lounge_branch_session_bill_options: {
5093
+ Row: {
5094
+ amount_cents: number;
5095
+ bill_type: Database["sessions"]["Enums"]["session_bill_type"];
5096
+ billing_interval_minutes: number | null;
5097
+ created_at: string;
5098
+ games_consoles_id: string | null;
5099
+ id: string;
5100
+ lounge_branch_id: string;
5101
+ station_id: string | null;
5102
+ unit_label: string | null;
5103
+ updated_at: string;
5104
+ };
5105
+ Insert: {
5106
+ amount_cents: number;
5107
+ bill_type: Database["sessions"]["Enums"]["session_bill_type"];
5108
+ billing_interval_minutes?: number | null;
5109
+ created_at?: string;
5110
+ games_consoles_id?: string | null;
5111
+ id?: string;
5112
+ lounge_branch_id: string;
5113
+ station_id?: string | null;
5114
+ unit_label?: string | null;
5115
+ updated_at?: string;
5116
+ };
5117
+ Update: {
5118
+ amount_cents?: number;
5119
+ bill_type?: Database["sessions"]["Enums"]["session_bill_type"];
5120
+ billing_interval_minutes?: number | null;
5121
+ created_at?: string;
5122
+ games_consoles_id?: string | null;
5123
+ id?: string;
5124
+ lounge_branch_id?: string;
5125
+ station_id?: string | null;
5126
+ unit_label?: string | null;
5127
+ updated_at?: string;
5128
+ };
5129
+ Relationships: [
5130
+ {
5131
+ foreignKeyName: "lounge_branch_session_bill_options_station_id_fkey";
5132
+ columns: ["station_id"];
5133
+ isOneToOne: false;
5134
+ referencedRelation: "lounge_branch_stations";
5135
+ referencedColumns: ["id"];
5136
+ }
5137
+ ];
5138
+ };
4879
5139
  lounge_branch_session_discount_targets: {
4880
5140
  Row: {
4881
5141
  console_id: string | null;
@@ -4919,91 +5179,56 @@ export type Database = {
4919
5179
  };
4920
5180
  lounge_branch_session_discounts: {
4921
5181
  Row: {
5182
+ amount_cents: number | null;
4922
5183
  created_at: string;
5184
+ description: string | null;
4923
5185
  discount_type: Database["sessions"]["Enums"]["session_discount_type"];
4924
5186
  id: string;
4925
5187
  incremental_discount_percentage: number | null;
4926
5188
  maximum_discount_percentage: number | null;
5189
+ name: string;
4927
5190
  option_id: string;
5191
+ regular_percentage: number | null;
4928
5192
  updated_at: string;
4929
5193
  valid_from: string | null;
4930
5194
  valid_until: string | null;
4931
- value: number | null;
4932
5195
  };
4933
5196
  Insert: {
5197
+ amount_cents?: number | null;
4934
5198
  created_at?: string;
5199
+ description?: string | null;
4935
5200
  discount_type: Database["sessions"]["Enums"]["session_discount_type"];
4936
5201
  id?: string;
4937
5202
  incremental_discount_percentage?: number | null;
4938
5203
  maximum_discount_percentage?: number | null;
5204
+ name: string;
4939
5205
  option_id: string;
5206
+ regular_percentage?: number | null;
4940
5207
  updated_at?: string;
4941
5208
  valid_from?: string | null;
4942
5209
  valid_until?: string | null;
4943
- value?: number | null;
4944
5210
  };
4945
5211
  Update: {
5212
+ amount_cents?: number | null;
4946
5213
  created_at?: string;
5214
+ description?: string | null;
4947
5215
  discount_type?: Database["sessions"]["Enums"]["session_discount_type"];
4948
5216
  id?: string;
4949
5217
  incremental_discount_percentage?: number | null;
4950
5218
  maximum_discount_percentage?: number | null;
5219
+ name?: string;
4951
5220
  option_id?: string;
5221
+ regular_percentage?: number | null;
4952
5222
  updated_at?: string;
4953
5223
  valid_from?: string | null;
4954
5224
  valid_until?: string | null;
4955
- value?: number | null;
4956
5225
  };
4957
5226
  Relationships: [
4958
5227
  {
4959
5228
  foreignKeyName: "lounge_branch_session_discounts_option_id_fkey";
4960
5229
  columns: ["option_id"];
4961
5230
  isOneToOne: false;
4962
- referencedRelation: "lounge_branch_session_options";
4963
- referencedColumns: ["id"];
4964
- }
4965
- ];
4966
- };
4967
- lounge_branch_session_options: {
4968
- Row: {
4969
- amount_cents: number;
4970
- created_at: string;
4971
- games_consoles_id: string | null;
4972
- id: string;
4973
- lounge_branch_id: string;
4974
- minimum_billing_minutes: number | null;
4975
- pricing_type: Database["sessions"]["Enums"]["session_pricing_type"];
4976
- unit_label: string | null;
4977
- updated_at: string;
4978
- };
4979
- Insert: {
4980
- amount_cents: number;
4981
- created_at?: string;
4982
- games_consoles_id?: string | null;
4983
- id?: string;
4984
- lounge_branch_id: string;
4985
- minimum_billing_minutes?: number | null;
4986
- pricing_type: Database["sessions"]["Enums"]["session_pricing_type"];
4987
- unit_label?: string | null;
4988
- updated_at?: string;
4989
- };
4990
- Update: {
4991
- amount_cents?: number;
4992
- created_at?: string;
4993
- games_consoles_id?: string | null;
4994
- id?: string;
4995
- lounge_branch_id?: string;
4996
- minimum_billing_minutes?: number | null;
4997
- pricing_type?: Database["sessions"]["Enums"]["session_pricing_type"];
4998
- unit_label?: string | null;
4999
- updated_at?: string;
5000
- };
5001
- Relationships: [
5002
- {
5003
- foreignKeyName: "lounge_branch_session_options_games_consoles_id_fkey";
5004
- columns: ["games_consoles_id"];
5005
- isOneToOne: false;
5006
- referencedRelation: "lounge_branch_games_consoles";
5231
+ referencedRelation: "lounge_branch_session_bill_options";
5007
5232
  referencedColumns: ["id"];
5008
5233
  }
5009
5234
  ];
@@ -5017,23 +5242,21 @@ export type Database = {
5017
5242
  lounge_branch_id: string;
5018
5243
  name: string;
5019
5244
  number: string;
5020
- online_play: boolean | null;
5245
+ online_play: boolean;
5021
5246
  special_controllers: string | null;
5022
- status: Database["sessions"]["Enums"]["lounge_branch_station_status"];
5023
5247
  updated_at: string;
5024
5248
  updated_by: string | null;
5025
5249
  };
5026
5250
  Insert: {
5027
- capacity: number;
5251
+ capacity?: number;
5028
5252
  console_id: string;
5029
5253
  created_at?: string;
5030
5254
  id?: string;
5031
5255
  lounge_branch_id: string;
5032
5256
  name: string;
5033
5257
  number: string;
5034
- online_play?: boolean | null;
5258
+ online_play?: boolean;
5035
5259
  special_controllers?: string | null;
5036
- status?: Database["sessions"]["Enums"]["lounge_branch_station_status"];
5037
5260
  updated_at?: string;
5038
5261
  updated_by?: string | null;
5039
5262
  };
@@ -5045,9 +5268,8 @@ export type Database = {
5045
5268
  lounge_branch_id?: string;
5046
5269
  name?: string;
5047
5270
  number?: string;
5048
- online_play?: boolean | null;
5271
+ online_play?: boolean;
5049
5272
  special_controllers?: string | null;
5050
- status?: Database["sessions"]["Enums"]["lounge_branch_station_status"];
5051
5273
  updated_at?: string;
5052
5274
  updated_by?: string | null;
5053
5275
  };
@@ -5069,7 +5291,7 @@ export type Database = {
5069
5291
  created_at?: string;
5070
5292
  id?: string;
5071
5293
  requested_at?: string;
5072
- requested_by: string;
5294
+ requested_by?: string;
5073
5295
  session_id: string;
5074
5296
  };
5075
5297
  Update: {
@@ -5091,52 +5313,65 @@ export type Database = {
5091
5313
  }
5092
5314
  ];
5093
5315
  };
5094
- player_session_billing: {
5316
+ player_session_bills: {
5095
5317
  Row: {
5318
+ cost_snapshot: Json | null;
5096
5319
  created_at: string;
5097
5320
  discount_id: string | null;
5098
5321
  id: string;
5099
5322
  option_id: string;
5100
5323
  session_id: string;
5324
+ station_period_id: string;
5101
5325
  units: number | null;
5102
5326
  };
5103
5327
  Insert: {
5328
+ cost_snapshot?: Json | null;
5104
5329
  created_at?: string;
5105
5330
  discount_id?: string | null;
5106
5331
  id?: string;
5107
5332
  option_id: string;
5108
5333
  session_id: string;
5334
+ station_period_id: string;
5109
5335
  units?: number | null;
5110
5336
  };
5111
5337
  Update: {
5338
+ cost_snapshot?: Json | null;
5112
5339
  created_at?: string;
5113
5340
  discount_id?: string | null;
5114
5341
  id?: string;
5115
5342
  option_id?: string;
5116
5343
  session_id?: string;
5344
+ station_period_id?: string;
5117
5345
  units?: number | null;
5118
5346
  };
5119
5347
  Relationships: [
5120
5348
  {
5121
- foreignKeyName: "player_session_billing_discount_id_fkey";
5349
+ foreignKeyName: "player_session_bills_discount_id_fkey";
5122
5350
  columns: ["discount_id"];
5123
5351
  isOneToOne: false;
5124
5352
  referencedRelation: "lounge_branch_session_discounts";
5125
5353
  referencedColumns: ["id"];
5126
5354
  },
5127
5355
  {
5128
- foreignKeyName: "player_session_billing_option_id_fkey";
5356
+ foreignKeyName: "player_session_bills_option_id_fkey";
5129
5357
  columns: ["option_id"];
5130
5358
  isOneToOne: false;
5131
- referencedRelation: "lounge_branch_session_options";
5359
+ referencedRelation: "lounge_branch_session_bill_options";
5132
5360
  referencedColumns: ["id"];
5133
5361
  },
5134
5362
  {
5135
- foreignKeyName: "player_session_billing_session_id_fkey";
5363
+ foreignKeyName: "player_session_bills_session_id_fkey";
5136
5364
  columns: ["session_id"];
5137
5365
  isOneToOne: false;
5138
5366
  referencedRelation: "player_sessions";
5139
5367
  referencedColumns: ["id"];
5368
+ },
5369
+ {
5370
+ foreignKeyName: "player_session_bills_station_period_id_fkey";
5371
+ columns: ["station_period_id"];
5372
+ isOneToOne: false;
5373
+ referencedRelation: "player_session_stations";
5374
+ referencedColumns: ["id"];
5140
5375
  }
5141
5376
  ];
5142
5377
  };
@@ -5149,7 +5384,6 @@ export type Database = {
5149
5384
  player_id: string;
5150
5385
  subject: string;
5151
5386
  target_lounge_branch_id: string | null;
5152
- target_lounge_id: string | null;
5153
5387
  target_session_id: string | null;
5154
5388
  user_id: string | null;
5155
5389
  };
@@ -5158,10 +5392,9 @@ export type Database = {
5158
5392
  created_at?: string;
5159
5393
  id?: string;
5160
5394
  message: string;
5161
- player_id: string;
5395
+ player_id?: string;
5162
5396
  subject: string;
5163
5397
  target_lounge_branch_id?: string | null;
5164
- target_lounge_id?: string | null;
5165
5398
  target_session_id?: string | null;
5166
5399
  user_id?: string | null;
5167
5400
  };
@@ -5173,7 +5406,6 @@ export type Database = {
5173
5406
  player_id?: string;
5174
5407
  subject?: string;
5175
5408
  target_lounge_branch_id?: string | null;
5176
- target_lounge_id?: string | null;
5177
5409
  target_session_id?: string | null;
5178
5410
  user_id?: string | null;
5179
5411
  };
@@ -5187,29 +5419,103 @@ export type Database = {
5187
5419
  }
5188
5420
  ];
5189
5421
  };
5190
- player_session_eatery_order_items: {
5422
+ player_session_eatery_cart: {
5191
5423
  Row: {
5192
5424
  created_at: string;
5193
5425
  id: string;
5194
- item_id: string | null;
5195
- item_snapshot: Json | null;
5196
- order_id: string;
5197
- quantity: number;
5198
- unit_price_cents: number;
5426
+ session_id: string;
5427
+ updated_at: string;
5199
5428
  };
5200
5429
  Insert: {
5201
5430
  created_at?: string;
5202
5431
  id?: string;
5203
- item_id?: string | null;
5204
- item_snapshot?: Json | null;
5205
- order_id: string;
5206
- quantity: number;
5207
- unit_price_cents: number;
5432
+ session_id: string;
5433
+ updated_at?: string;
5208
5434
  };
5209
5435
  Update: {
5210
5436
  created_at?: string;
5211
5437
  id?: string;
5212
- item_id?: string | null;
5438
+ session_id?: string;
5439
+ updated_at?: string;
5440
+ };
5441
+ Relationships: [
5442
+ {
5443
+ foreignKeyName: "player_session_eatery_cart_session_id_fkey";
5444
+ columns: ["session_id"];
5445
+ isOneToOne: true;
5446
+ referencedRelation: "player_sessions";
5447
+ referencedColumns: ["id"];
5448
+ }
5449
+ ];
5450
+ };
5451
+ player_session_eatery_cart_items: {
5452
+ Row: {
5453
+ cart_id: string;
5454
+ created_at: string;
5455
+ id: string;
5456
+ item_id: string;
5457
+ item_snapshot: Json | null;
5458
+ quantity: number;
5459
+ unit_price_cents: number;
5460
+ };
5461
+ Insert: {
5462
+ cart_id: string;
5463
+ created_at?: string;
5464
+ id?: string;
5465
+ item_id: string;
5466
+ item_snapshot?: Json | null;
5467
+ quantity: number;
5468
+ unit_price_cents: number;
5469
+ };
5470
+ Update: {
5471
+ cart_id?: string;
5472
+ created_at?: string;
5473
+ id?: string;
5474
+ item_id?: string;
5475
+ item_snapshot?: Json | null;
5476
+ quantity?: number;
5477
+ unit_price_cents?: number;
5478
+ };
5479
+ Relationships: [
5480
+ {
5481
+ foreignKeyName: "player_session_eatery_cart_items_cart_id_fkey";
5482
+ columns: ["cart_id"];
5483
+ isOneToOne: false;
5484
+ referencedRelation: "player_session_eatery_cart";
5485
+ referencedColumns: ["id"];
5486
+ },
5487
+ {
5488
+ foreignKeyName: "player_session_eatery_cart_items_item_id_fkey";
5489
+ columns: ["item_id"];
5490
+ isOneToOne: false;
5491
+ referencedRelation: "lounge_branch_eatery_items";
5492
+ referencedColumns: ["id"];
5493
+ }
5494
+ ];
5495
+ };
5496
+ player_session_eatery_order_items: {
5497
+ Row: {
5498
+ created_at: string;
5499
+ id: string;
5500
+ item_id: string | null;
5501
+ item_snapshot: Json | null;
5502
+ order_id: string;
5503
+ quantity: number;
5504
+ unit_price_cents: number;
5505
+ };
5506
+ Insert: {
5507
+ created_at?: string;
5508
+ id?: string;
5509
+ item_id?: string | null;
5510
+ item_snapshot?: Json | null;
5511
+ order_id: string;
5512
+ quantity: number;
5513
+ unit_price_cents: number;
5514
+ };
5515
+ Update: {
5516
+ created_at?: string;
5517
+ id?: string;
5518
+ item_id?: string | null;
5213
5519
  item_snapshot?: Json | null;
5214
5520
  order_id?: string;
5215
5521
  quantity?: number;
@@ -5235,26 +5541,32 @@ export type Database = {
5235
5541
  player_session_eatery_orders: {
5236
5542
  Row: {
5237
5543
  cancellation_reason: string | null;
5544
+ cancelled_at: string | null;
5545
+ cancelled_by: string | null;
5238
5546
  created_at: string;
5239
5547
  id: string;
5240
5548
  session_id: string;
5241
- status: string;
5549
+ status: Database["sessions"]["Enums"]["session_eatery_order_status"];
5242
5550
  updated_at: string;
5243
5551
  };
5244
5552
  Insert: {
5245
5553
  cancellation_reason?: string | null;
5554
+ cancelled_at?: string | null;
5555
+ cancelled_by?: string | null;
5246
5556
  created_at?: string;
5247
5557
  id?: string;
5248
5558
  session_id: string;
5249
- status?: string;
5559
+ status?: Database["sessions"]["Enums"]["session_eatery_order_status"];
5250
5560
  updated_at?: string;
5251
5561
  };
5252
5562
  Update: {
5253
5563
  cancellation_reason?: string | null;
5564
+ cancelled_at?: string | null;
5565
+ cancelled_by?: string | null;
5254
5566
  created_at?: string;
5255
5567
  id?: string;
5256
5568
  session_id?: string;
5257
- status?: string;
5569
+ status?: Database["sessions"]["Enums"]["session_eatery_order_status"];
5258
5570
  updated_at?: string;
5259
5571
  };
5260
5572
  Relationships: [
@@ -5267,41 +5579,170 @@ export type Database = {
5267
5579
  }
5268
5580
  ];
5269
5581
  };
5582
+ player_session_games: {
5583
+ Row: {
5584
+ created_at: string;
5585
+ ended_at: string | null;
5586
+ games_consoles_id: string;
5587
+ id: string;
5588
+ request_approved_at: string | null;
5589
+ request_approved_by: string | null;
5590
+ request_cancelled_at: string | null;
5591
+ request_cancelled_by: string | null;
5592
+ request_cancelled_reason: string | null;
5593
+ request_rejected_at: string | null;
5594
+ request_rejected_by: string | null;
5595
+ request_rejected_reason: string | null;
5596
+ requested_at: string | null;
5597
+ session_id: string;
5598
+ started_at: string | null;
5599
+ };
5600
+ Insert: {
5601
+ created_at?: string;
5602
+ ended_at?: string | null;
5603
+ games_consoles_id: string;
5604
+ id?: string;
5605
+ request_approved_at?: string | null;
5606
+ request_approved_by?: string | null;
5607
+ request_cancelled_at?: string | null;
5608
+ request_cancelled_by?: string | null;
5609
+ request_cancelled_reason?: string | null;
5610
+ request_rejected_at?: string | null;
5611
+ request_rejected_by?: string | null;
5612
+ request_rejected_reason?: string | null;
5613
+ requested_at?: string | null;
5614
+ session_id: string;
5615
+ started_at?: string | null;
5616
+ };
5617
+ Update: {
5618
+ created_at?: string;
5619
+ ended_at?: string | null;
5620
+ games_consoles_id?: string;
5621
+ id?: string;
5622
+ request_approved_at?: string | null;
5623
+ request_approved_by?: string | null;
5624
+ request_cancelled_at?: string | null;
5625
+ request_cancelled_by?: string | null;
5626
+ request_cancelled_reason?: string | null;
5627
+ request_rejected_at?: string | null;
5628
+ request_rejected_by?: string | null;
5629
+ request_rejected_reason?: string | null;
5630
+ requested_at?: string | null;
5631
+ session_id?: string;
5632
+ started_at?: string | null;
5633
+ };
5634
+ Relationships: [
5635
+ {
5636
+ foreignKeyName: "player_session_games_session_id_fkey";
5637
+ columns: ["session_id"];
5638
+ isOneToOne: false;
5639
+ referencedRelation: "player_sessions";
5640
+ referencedColumns: ["id"];
5641
+ }
5642
+ ];
5643
+ };
5644
+ player_session_luggage_slots: {
5645
+ Row: {
5646
+ assigned_at: string | null;
5647
+ created_at: string;
5648
+ luggage_slot_id: string;
5649
+ member_id: string;
5650
+ quantity: number;
5651
+ returned_at: string | null;
5652
+ session_id: string;
5653
+ status: Database["sessions"]["Enums"]["session_luggage_slot_status"];
5654
+ };
5655
+ Insert: {
5656
+ assigned_at?: string | null;
5657
+ created_at?: string;
5658
+ luggage_slot_id: string;
5659
+ member_id: string;
5660
+ quantity?: number;
5661
+ returned_at?: string | null;
5662
+ session_id: string;
5663
+ status?: Database["sessions"]["Enums"]["session_luggage_slot_status"];
5664
+ };
5665
+ Update: {
5666
+ assigned_at?: string | null;
5667
+ created_at?: string;
5668
+ luggage_slot_id?: string;
5669
+ member_id?: string;
5670
+ quantity?: number;
5671
+ returned_at?: string | null;
5672
+ session_id?: string;
5673
+ status?: Database["sessions"]["Enums"]["session_luggage_slot_status"];
5674
+ };
5675
+ Relationships: [
5676
+ {
5677
+ foreignKeyName: "player_session_luggage_slots_luggage_slot_id_fkey";
5678
+ columns: ["luggage_slot_id"];
5679
+ isOneToOne: false;
5680
+ referencedRelation: "lounge_branch_luggage_slots";
5681
+ referencedColumns: ["id"];
5682
+ },
5683
+ {
5684
+ foreignKeyName: "player_session_luggage_slots_member_id_fkey";
5685
+ columns: ["member_id"];
5686
+ isOneToOne: false;
5687
+ referencedRelation: "player_session_members";
5688
+ referencedColumns: ["id"];
5689
+ },
5690
+ {
5691
+ foreignKeyName: "player_session_luggage_slots_session_id_fkey";
5692
+ columns: ["session_id"];
5693
+ isOneToOne: false;
5694
+ referencedRelation: "player_sessions";
5695
+ referencedColumns: ["id"];
5696
+ }
5697
+ ];
5698
+ };
5270
5699
  player_session_members: {
5271
5700
  Row: {
5701
+ cancelled_at: string | null;
5702
+ cancelled_by: string | null;
5272
5703
  created_at: string;
5273
5704
  id: string;
5274
- joined_at: string;
5705
+ joined_at: string | null;
5275
5706
  left_at: string | null;
5707
+ minor_rep_consent_otp_sent_at: string | null;
5708
+ minor_rep_consent_twilio_sid: string | null;
5709
+ minor_rep_consent_verified_at: string | null;
5276
5710
  player_id: string;
5277
5711
  role: string;
5278
5712
  session_id: string;
5279
5713
  status: Database["sessions"]["Enums"]["session_member_status"];
5280
- updated_at: string;
5281
5714
  user_id: string | null;
5282
5715
  };
5283
5716
  Insert: {
5717
+ cancelled_at?: string | null;
5718
+ cancelled_by?: string | null;
5284
5719
  created_at?: string;
5285
5720
  id?: string;
5286
- joined_at?: string;
5721
+ joined_at?: string | null;
5287
5722
  left_at?: string | null;
5723
+ minor_rep_consent_otp_sent_at?: string | null;
5724
+ minor_rep_consent_twilio_sid?: string | null;
5725
+ minor_rep_consent_verified_at?: string | null;
5288
5726
  player_id: string;
5289
5727
  role: string;
5290
5728
  session_id: string;
5291
5729
  status?: Database["sessions"]["Enums"]["session_member_status"];
5292
- updated_at?: string;
5293
5730
  user_id?: string | null;
5294
5731
  };
5295
5732
  Update: {
5733
+ cancelled_at?: string | null;
5734
+ cancelled_by?: string | null;
5296
5735
  created_at?: string;
5297
5736
  id?: string;
5298
- joined_at?: string;
5737
+ joined_at?: string | null;
5299
5738
  left_at?: string | null;
5739
+ minor_rep_consent_otp_sent_at?: string | null;
5740
+ minor_rep_consent_twilio_sid?: string | null;
5741
+ minor_rep_consent_verified_at?: string | null;
5300
5742
  player_id?: string;
5301
5743
  role?: string;
5302
5744
  session_id?: string;
5303
5745
  status?: Database["sessions"]["Enums"]["session_member_status"];
5304
- updated_at?: string;
5305
5746
  user_id?: string | null;
5306
5747
  };
5307
5748
  Relationships: [
@@ -5314,92 +5755,239 @@ export type Database = {
5314
5755
  }
5315
5756
  ];
5316
5757
  };
5758
+ player_session_ratings: {
5759
+ Row: {
5760
+ amenities: number;
5761
+ atmosphere: number;
5762
+ created_at: string;
5763
+ customer_service: number;
5764
+ eatery: number | null;
5765
+ equipment: number;
5766
+ review: string | null;
5767
+ session_id: string;
5768
+ };
5769
+ Insert: {
5770
+ amenities: number;
5771
+ atmosphere: number;
5772
+ created_at?: string;
5773
+ customer_service: number;
5774
+ eatery?: number | null;
5775
+ equipment: number;
5776
+ review?: string | null;
5777
+ session_id: string;
5778
+ };
5779
+ Update: {
5780
+ amenities?: number;
5781
+ atmosphere?: number;
5782
+ created_at?: string;
5783
+ customer_service?: number;
5784
+ eatery?: number | null;
5785
+ equipment?: number;
5786
+ review?: string | null;
5787
+ session_id?: string;
5788
+ };
5789
+ Relationships: [
5790
+ {
5791
+ foreignKeyName: "player_session_ratings_session_id_fkey";
5792
+ columns: ["session_id"];
5793
+ isOneToOne: true;
5794
+ referencedRelation: "player_sessions";
5795
+ referencedColumns: ["id"];
5796
+ }
5797
+ ];
5798
+ };
5799
+ player_session_stations: {
5800
+ Row: {
5801
+ created_at: string;
5802
+ ended_at: string | null;
5803
+ id: string;
5804
+ request_approved_at: string | null;
5805
+ request_approved_by: string | null;
5806
+ request_cancelled_at: string | null;
5807
+ request_cancelled_by: string | null;
5808
+ request_cancelled_reason: string | null;
5809
+ request_rejected_at: string | null;
5810
+ request_rejected_by: string | null;
5811
+ request_rejected_reason: string | null;
5812
+ requested_at: string | null;
5813
+ session_id: string;
5814
+ started_at: string | null;
5815
+ station_id: string;
5816
+ };
5817
+ Insert: {
5818
+ created_at?: string;
5819
+ ended_at?: string | null;
5820
+ id?: string;
5821
+ request_approved_at?: string | null;
5822
+ request_approved_by?: string | null;
5823
+ request_cancelled_at?: string | null;
5824
+ request_cancelled_by?: string | null;
5825
+ request_cancelled_reason?: string | null;
5826
+ request_rejected_at?: string | null;
5827
+ request_rejected_by?: string | null;
5828
+ request_rejected_reason?: string | null;
5829
+ requested_at?: string | null;
5830
+ session_id: string;
5831
+ started_at?: string | null;
5832
+ station_id: string;
5833
+ };
5834
+ Update: {
5835
+ created_at?: string;
5836
+ ended_at?: string | null;
5837
+ id?: string;
5838
+ request_approved_at?: string | null;
5839
+ request_approved_by?: string | null;
5840
+ request_cancelled_at?: string | null;
5841
+ request_cancelled_by?: string | null;
5842
+ request_cancelled_reason?: string | null;
5843
+ request_rejected_at?: string | null;
5844
+ request_rejected_by?: string | null;
5845
+ request_rejected_reason?: string | null;
5846
+ requested_at?: string | null;
5847
+ session_id?: string;
5848
+ started_at?: string | null;
5849
+ station_id?: string;
5850
+ };
5851
+ Relationships: [
5852
+ {
5853
+ foreignKeyName: "player_session_stations_session_id_fkey";
5854
+ columns: ["session_id"];
5855
+ isOneToOne: false;
5856
+ referencedRelation: "player_sessions";
5857
+ referencedColumns: ["id"];
5858
+ },
5859
+ {
5860
+ foreignKeyName: "player_session_stations_station_id_fkey";
5861
+ columns: ["station_id"];
5862
+ isOneToOne: false;
5863
+ referencedRelation: "lounge_branch_stations";
5864
+ referencedColumns: ["id"];
5865
+ }
5866
+ ];
5867
+ };
5317
5868
  player_sessions: {
5318
5869
  Row: {
5870
+ cancelled_at: string | null;
5871
+ cancelled_reason: string | null;
5319
5872
  checkout_requested_at: string | null;
5320
5873
  created_at: string;
5321
5874
  ended_at: string | null;
5322
- games_consoles_id: string;
5875
+ ended_by: string | null;
5876
+ final_cost_cents: number | null;
5323
5877
  id: string;
5324
5878
  is_reservation: boolean;
5325
5879
  lounge_branch_id: string;
5326
- luggage_slot_id: string | null;
5327
- minor_representative_consent_verified_at: string | null;
5880
+ minor_rep_consent_otp_sent_at: string | null;
5881
+ minor_rep_consent_twilio_sid: string | null;
5882
+ minor_rep_consent_verified_at: string | null;
5328
5883
  player_id: string;
5329
- requested_games_consoles_id: string | null;
5330
- requested_station_id: string | null;
5884
+ reservation_approved_at: string | null;
5885
+ reservation_approved_by: string | null;
5886
+ reservation_rejected_at: string | null;
5887
+ reservation_rejected_by: string | null;
5888
+ reservation_rejected_reason: string | null;
5331
5889
  reservation_requested_at: string | null;
5332
5890
  started_at: string | null;
5333
- station_id: string;
5891
+ started_by: string | null;
5334
5892
  status: Database["sessions"]["Enums"]["session_status"];
5335
- updated_at: string;
5336
5893
  user_id: string | null;
5337
5894
  };
5338
5895
  Insert: {
5896
+ cancelled_at?: string | null;
5897
+ cancelled_reason?: string | null;
5339
5898
  checkout_requested_at?: string | null;
5340
5899
  created_at?: string;
5341
5900
  ended_at?: string | null;
5342
- games_consoles_id: string;
5901
+ ended_by?: string | null;
5902
+ final_cost_cents?: number | null;
5343
5903
  id?: string;
5344
5904
  is_reservation?: boolean;
5345
5905
  lounge_branch_id: string;
5346
- luggage_slot_id?: string | null;
5347
- minor_representative_consent_verified_at?: string | null;
5906
+ minor_rep_consent_otp_sent_at?: string | null;
5907
+ minor_rep_consent_twilio_sid?: string | null;
5908
+ minor_rep_consent_verified_at?: string | null;
5348
5909
  player_id: string;
5349
- requested_games_consoles_id?: string | null;
5350
- requested_station_id?: string | null;
5910
+ reservation_approved_at?: string | null;
5911
+ reservation_approved_by?: string | null;
5912
+ reservation_rejected_at?: string | null;
5913
+ reservation_rejected_by?: string | null;
5914
+ reservation_rejected_reason?: string | null;
5351
5915
  reservation_requested_at?: string | null;
5352
5916
  started_at?: string | null;
5353
- station_id: string;
5354
- status: Database["sessions"]["Enums"]["session_status"];
5355
- updated_at?: string;
5917
+ started_by?: string | null;
5918
+ status?: Database["sessions"]["Enums"]["session_status"];
5356
5919
  user_id?: string | null;
5357
5920
  };
5358
5921
  Update: {
5922
+ cancelled_at?: string | null;
5923
+ cancelled_reason?: string | null;
5359
5924
  checkout_requested_at?: string | null;
5360
5925
  created_at?: string;
5361
5926
  ended_at?: string | null;
5362
- games_consoles_id?: string;
5927
+ ended_by?: string | null;
5928
+ final_cost_cents?: number | null;
5363
5929
  id?: string;
5364
5930
  is_reservation?: boolean;
5365
5931
  lounge_branch_id?: string;
5366
- luggage_slot_id?: string | null;
5367
- minor_representative_consent_verified_at?: string | null;
5932
+ minor_rep_consent_otp_sent_at?: string | null;
5933
+ minor_rep_consent_twilio_sid?: string | null;
5934
+ minor_rep_consent_verified_at?: string | null;
5368
5935
  player_id?: string;
5369
- requested_games_consoles_id?: string | null;
5370
- requested_station_id?: string | null;
5936
+ reservation_approved_at?: string | null;
5937
+ reservation_approved_by?: string | null;
5938
+ reservation_rejected_at?: string | null;
5939
+ reservation_rejected_by?: string | null;
5940
+ reservation_rejected_reason?: string | null;
5371
5941
  reservation_requested_at?: string | null;
5372
5942
  started_at?: string | null;
5373
- station_id?: string;
5943
+ started_by?: string | null;
5374
5944
  status?: Database["sessions"]["Enums"]["session_status"];
5375
- updated_at?: string;
5945
+ user_id?: string | null;
5946
+ };
5947
+ Relationships: [];
5948
+ };
5949
+ player_sessions_regular_preferences: {
5950
+ Row: {
5951
+ created_at: string;
5952
+ lounge_branch_id: string;
5953
+ player_id: string;
5954
+ preferred_games_consoles_id: string | null;
5955
+ preferred_session_bill_option_id: string | null;
5956
+ preferred_station_id: string | null;
5957
+ updated_at: string | null;
5958
+ user_id: string | null;
5959
+ };
5960
+ Insert: {
5961
+ created_at?: string;
5962
+ lounge_branch_id: string;
5963
+ player_id: string;
5964
+ preferred_games_consoles_id?: string | null;
5965
+ preferred_session_bill_option_id?: string | null;
5966
+ preferred_station_id?: string | null;
5967
+ updated_at?: string | null;
5968
+ user_id?: string | null;
5969
+ };
5970
+ Update: {
5971
+ created_at?: string;
5972
+ lounge_branch_id?: string;
5973
+ player_id?: string;
5974
+ preferred_games_consoles_id?: string | null;
5975
+ preferred_session_bill_option_id?: string | null;
5976
+ preferred_station_id?: string | null;
5977
+ updated_at?: string | null;
5376
5978
  user_id?: string | null;
5377
5979
  };
5378
5980
  Relationships: [
5379
5981
  {
5380
- foreignKeyName: "player_sessions_lounge_branch_id_requested_station_id_fkey";
5381
- columns: ["lounge_branch_id", "requested_station_id"];
5382
- isOneToOne: false;
5383
- referencedRelation: "lounge_branch_stations";
5384
- referencedColumns: ["lounge_branch_id", "id"];
5385
- },
5386
- {
5387
- foreignKeyName: "player_sessions_lounge_branch_id_station_id_fkey";
5388
- columns: ["lounge_branch_id", "station_id"];
5389
- isOneToOne: false;
5390
- referencedRelation: "lounge_branch_stations";
5391
- referencedColumns: ["lounge_branch_id", "id"];
5392
- },
5393
- {
5394
- foreignKeyName: "player_sessions_luggage_slot_id_fkey";
5395
- columns: ["luggage_slot_id"];
5982
+ foreignKeyName: "player_sessions_regular_preferences_session_bill_option_fkey";
5983
+ columns: ["preferred_session_bill_option_id"];
5396
5984
  isOneToOne: false;
5397
- referencedRelation: "lounge_branch_luggage_slots";
5985
+ referencedRelation: "lounge_branch_session_bill_options";
5398
5986
  referencedColumns: ["id"];
5399
5987
  },
5400
5988
  {
5401
- foreignKeyName: "player_sessions_station_id_fkey";
5402
- columns: ["station_id"];
5989
+ foreignKeyName: "player_sessions_regular_preferences_station_fkey";
5990
+ columns: ["preferred_station_id"];
5403
5991
  isOneToOne: false;
5404
5992
  referencedRelation: "lounge_branch_stations";
5405
5993
  referencedColumns: ["id"];
@@ -5408,34 +5996,325 @@ export type Database = {
5408
5996
  };
5409
5997
  };
5410
5998
  Views: {
5411
- [_ in never]: never;
5999
+ lounge_average_ratings: {
6000
+ Row: {
6001
+ average_rating: number | null;
6002
+ lounge_id: string | null;
6003
+ };
6004
+ Relationships: [];
6005
+ };
5412
6006
  };
5413
6007
  Functions: {
6008
+ accept_session_invite: {
6009
+ Args: {
6010
+ p_session_id: string;
6011
+ };
6012
+ Returns: Json;
6013
+ };
6014
+ add_eatery_cart_item: {
6015
+ Args: {
6016
+ p_item_id: string;
6017
+ p_item_snapshot: Json;
6018
+ p_quantity: number;
6019
+ p_session_id: string;
6020
+ p_unit_price_cents: number;
6021
+ };
6022
+ Returns: string;
6023
+ };
6024
+ add_units_for_session: {
6025
+ Args: {
6026
+ p_option_id?: string;
6027
+ p_session_id: string;
6028
+ p_units?: number;
6029
+ };
6030
+ Returns: string;
6031
+ };
6032
+ cancel_pending_session: {
6033
+ Args: {
6034
+ p_complaint_message?: string;
6035
+ p_complaint_subject?: string;
6036
+ p_session_id: string;
6037
+ };
6038
+ Returns: string;
6039
+ };
6040
+ cancel_session_invite: {
6041
+ Args: {
6042
+ p_session_id: string;
6043
+ };
6044
+ Returns: undefined;
6045
+ };
6046
+ compute_final_session_cost: {
6047
+ Args: {
6048
+ p_session_id: string;
6049
+ };
6050
+ Returns: number;
6051
+ };
6052
+ compute_session_bill_cost: {
6053
+ Args: {
6054
+ p_bill_id: string;
6055
+ };
6056
+ Returns: Json;
6057
+ };
6058
+ create_eatery_order: {
6059
+ Args: {
6060
+ p_session_id: string;
6061
+ };
6062
+ Returns: string;
6063
+ };
6064
+ create_session: {
6065
+ Args: {
6066
+ p_discount_id?: string;
6067
+ p_games_consoles_id: string;
6068
+ p_invited_luggage_slots?: Json;
6069
+ p_invited_player_ids?: string[];
6070
+ p_is_reservation?: boolean;
6071
+ p_lounge_branch_id: string;
6072
+ p_luggage_slot?: Json;
6073
+ p_option_id: string;
6074
+ p_station_id: string;
6075
+ p_units?: number;
6076
+ };
6077
+ Returns: string;
6078
+ };
6079
+ create_session_complaint: {
6080
+ Args: {
6081
+ p_message: string;
6082
+ p_station_number?: string;
6083
+ p_subject: string;
6084
+ };
6085
+ Returns: string;
6086
+ };
6087
+ ensure_session_eatery_cart: {
6088
+ Args: {
6089
+ p_session_id: string;
6090
+ };
6091
+ Returns: string;
6092
+ };
6093
+ get_current_session: {
6094
+ Args: never;
6095
+ Returns: Json;
6096
+ };
6097
+ get_lounge_average_rating: {
6098
+ Args: {
6099
+ p_lounge_branch_id?: string;
6100
+ p_lounge_id: string;
6101
+ };
6102
+ Returns: number;
6103
+ };
6104
+ get_lounge_branch_data: {
6105
+ Args: {
6106
+ p_lounge_branch_id: string;
6107
+ };
6108
+ Returns: Json;
6109
+ };
6110
+ get_lounge_branch_games: {
6111
+ Args: {
6112
+ available_only?: boolean;
6113
+ p_lounge_branch_id: string;
6114
+ };
6115
+ Returns: {
6116
+ consoles: Json;
6117
+ cover_url: string;
6118
+ game_id: string;
6119
+ name: string;
6120
+ }[];
6121
+ };
6122
+ get_lounge_branch_stations: {
6123
+ Args: {
6124
+ available_only?: boolean;
6125
+ p_lounge_branch_id: string;
6126
+ };
6127
+ Returns: {
6128
+ capacity: number;
6129
+ console_abbreviation: string;
6130
+ console_name: string;
6131
+ id: string;
6132
+ name: string;
6133
+ number: string;
6134
+ online_play: boolean;
6135
+ special_controllers: string;
6136
+ }[];
6137
+ };
6138
+ get_lounge_branches_with_open_status: {
6139
+ Args: {
6140
+ p_lounge_branch_id?: string;
6141
+ p_lounge_id?: string;
6142
+ };
6143
+ Returns: {
6144
+ address: Json;
6145
+ amenities: Json;
6146
+ email: string;
6147
+ id: string;
6148
+ is_open: boolean;
6149
+ lounge_id: string;
6150
+ name: string;
6151
+ opening_times: Json;
6152
+ phone: string;
6153
+ }[];
6154
+ };
6155
+ get_lounge_with_branches: {
6156
+ Args: {
6157
+ p_lounge_id: string;
6158
+ };
6159
+ Returns: Json;
6160
+ };
6161
+ get_minor_rep_consent_context_for_session: {
6162
+ Args: {
6163
+ p_session_id: string;
6164
+ };
6165
+ Returns: Json;
6166
+ };
6167
+ get_past_sessions: {
6168
+ Args: {
6169
+ p_lounge_branch_id?: string;
6170
+ p_lounge_id?: string;
6171
+ };
6172
+ Returns: Json;
6173
+ };
6174
+ get_pending_invite_for_current_player: {
6175
+ Args: {
6176
+ p_session_id: string;
6177
+ };
6178
+ Returns: Json;
6179
+ };
6180
+ get_session_bill_data: {
6181
+ Args: {
6182
+ p_session_id: string;
6183
+ };
6184
+ Returns: Json;
6185
+ };
6186
+ get_session_data: {
6187
+ Args: {
6188
+ p_session_id: string;
6189
+ };
6190
+ Returns: Json;
6191
+ };
6192
+ get_session_start_data: {
6193
+ Args: {
6194
+ p_lounge_branch_id: string;
6195
+ };
6196
+ Returns: Json;
6197
+ };
6198
+ handle_session_cancel: {
6199
+ Args: {
6200
+ p_session_id: string;
6201
+ };
6202
+ Returns: undefined;
6203
+ };
6204
+ handle_session_end: {
6205
+ Args: {
6206
+ p_session_id: string;
6207
+ };
6208
+ Returns: undefined;
6209
+ };
6210
+ invite_players_to_session: {
6211
+ Args: {
6212
+ p_capacity?: number;
6213
+ p_players?: Json;
6214
+ p_session_id: string;
6215
+ p_station_id?: string;
6216
+ };
6217
+ Returns: undefined;
6218
+ };
5414
6219
  is_active_session_member: {
5415
6220
  Args: {
5416
6221
  p_session_id: string;
5417
6222
  };
5418
6223
  Returns: boolean;
5419
6224
  };
6225
+ is_current_player_lounge_regular: {
6226
+ Args: {
6227
+ p_lounge_id: string;
6228
+ };
6229
+ Returns: boolean;
6230
+ };
6231
+ is_game_available_for_session: {
6232
+ Args: {
6233
+ p_exclude_session_id?: string;
6234
+ p_games_consoles_id: string;
6235
+ p_lounge_branch_id: string;
6236
+ };
6237
+ Returns: Json;
6238
+ };
6239
+ is_reservation_available_at_lounge_branch: {
6240
+ Args: {
6241
+ p_lounge_branch_id: string;
6242
+ };
6243
+ Returns: Json;
6244
+ };
6245
+ is_reservation_within_grace: {
6246
+ Args: {
6247
+ p_reservation_requested_at: string;
6248
+ };
6249
+ Returns: boolean;
6250
+ };
6251
+ is_session_member: {
6252
+ Args: {
6253
+ p_member_statuses?: Database["sessions"]["Enums"]["session_member_status"][];
6254
+ p_session_id: string;
6255
+ };
6256
+ Returns: boolean;
6257
+ };
5420
6258
  is_session_owner: {
5421
6259
  Args: {
5422
6260
  p_session_id: string;
5423
6261
  };
5424
6262
  Returns: boolean;
5425
6263
  };
5426
- lounge_branch_owned_by_current_user: {
6264
+ is_station_available_for_session: {
5427
6265
  Args: {
6266
+ p_exclude_session_id?: string;
5428
6267
  p_lounge_branch_id: string;
6268
+ p_station_id: string;
5429
6269
  };
5430
- Returns: boolean;
6270
+ Returns: Json;
6271
+ };
6272
+ leave_active_session: {
6273
+ Args: {
6274
+ p_session_id: string;
6275
+ };
6276
+ Returns: undefined;
6277
+ };
6278
+ request_change_for_session: {
6279
+ Args: {
6280
+ p_games_consoles_id?: string;
6281
+ p_session_id: string;
6282
+ p_station_id?: string;
6283
+ };
6284
+ Returns: Json;
6285
+ };
6286
+ request_checkout: {
6287
+ Args: {
6288
+ p_session_id: string;
6289
+ };
6290
+ Returns: number;
6291
+ };
6292
+ resolve_session_change_requests: {
6293
+ Args: {
6294
+ p_game_reject_reason?: string;
6295
+ p_game_resolution?: string;
6296
+ p_game_row_id?: string;
6297
+ p_session_id: string;
6298
+ p_station_reject_reason?: string;
6299
+ p_station_resolution?: string;
6300
+ p_station_row_id?: string;
6301
+ };
6302
+ Returns: undefined;
6303
+ };
6304
+ terminate_luggage_and_eatery_for_session: {
6305
+ Args: {
6306
+ p_session_id: string;
6307
+ };
6308
+ Returns: undefined;
5431
6309
  };
5432
6310
  };
5433
6311
  Enums: {
5434
- lounge_branch_station_status: "available" | "occupied";
6312
+ session_bill_type: "time" | "unit";
5435
6313
  session_complaint_type: "session" | "lounge_branch";
5436
6314
  session_discount_type: "regular" | "incremental_time";
5437
- session_member_status: "pending" | "active" | "left";
5438
- session_pricing_type: "time" | "unit";
6315
+ session_eatery_order_status: "pending" | "acknowledged" | "fulfilled" | "paid" | "cancelled";
6316
+ session_luggage_slot_status: "pending" | "assigned" | "returned";
6317
+ session_member_status: "pending" | "active" | "left" | "cancelled";
5439
6318
  session_status: "pending" | "active" | "change_requested" | "checking_out" | "ended" | "cancelled";
5440
6319
  };
5441
6320
  CompositeTypes: {
@@ -6105,11 +6984,12 @@ export declare const Constants: {
6105
6984
  };
6106
6985
  readonly sessions: {
6107
6986
  readonly Enums: {
6108
- readonly lounge_branch_station_status: readonly ["available", "occupied"];
6987
+ readonly session_bill_type: readonly ["time", "unit"];
6109
6988
  readonly session_complaint_type: readonly ["session", "lounge_branch"];
6110
6989
  readonly session_discount_type: readonly ["regular", "incremental_time"];
6111
- readonly session_member_status: readonly ["pending", "active", "left"];
6112
- readonly session_pricing_type: readonly ["time", "unit"];
6990
+ readonly session_eatery_order_status: readonly ["pending", "acknowledged", "fulfilled", "paid", "cancelled"];
6991
+ readonly session_luggage_slot_status: readonly ["pending", "assigned", "returned"];
6992
+ readonly session_member_status: readonly ["pending", "active", "left", "cancelled"];
6113
6993
  readonly session_status: readonly ["pending", "active", "change_requested", "checking_out", "ended", "cancelled"];
6114
6994
  };
6115
6995
  };