@koloseum/types 0.3.4 → 0.3.6

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,39 @@ 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;
2956
2958
  player_id: string;
2959
+ role: string;
2957
2960
  user_id: string;
2958
2961
  };
2959
2962
  Insert: {
2960
2963
  created_at?: string;
2964
+ id?: string;
2965
+ lounge_branch_id?: string | null;
2961
2966
  lounge_id: string;
2962
2967
  player_id: string;
2968
+ role: string;
2963
2969
  user_id: string;
2964
2970
  };
2965
2971
  Update: {
2966
2972
  created_at?: string;
2973
+ id?: string;
2974
+ lounge_branch_id?: string | null;
2967
2975
  lounge_id?: string;
2968
2976
  player_id?: string;
2977
+ role?: string;
2969
2978
  user_id?: string;
2970
2979
  };
2971
2980
  Relationships: [
2981
+ {
2982
+ foreignKeyName: "lounge_staff_lounge_branch_id_fkey";
2983
+ columns: ["lounge_branch_id"];
2984
+ isOneToOne: false;
2985
+ referencedRelation: "lounge_branches";
2986
+ referencedColumns: ["id"];
2987
+ },
2972
2988
  {
2973
2989
  foreignKeyName: "lounge_staff_lounge_id_fkey";
2974
2990
  columns: ["lounge_id"];
@@ -2982,6 +2998,13 @@ export type Database = {
2982
2998
  isOneToOne: false;
2983
2999
  referencedRelation: "players";
2984
3000
  referencedColumns: ["id"];
3001
+ },
3002
+ {
3003
+ foreignKeyName: "lounge_staff_role_fkey";
3004
+ columns: ["user_id", "role"];
3005
+ isOneToOne: false;
3006
+ referencedRelation: "user_roles";
3007
+ referencedColumns: ["user_id", "role"];
2985
3008
  }
2986
3009
  ];
2987
3010
  };
@@ -4153,6 +4176,16 @@ export type Database = {
4153
4176
  updates: Json;
4154
4177
  }[];
4155
4178
  };
4179
+ get_lounge_branch_display_info: {
4180
+ Args: {
4181
+ p_lounge_branch_id: string;
4182
+ };
4183
+ Returns: {
4184
+ id: string;
4185
+ lounge_id: string;
4186
+ name: string;
4187
+ }[];
4188
+ };
4156
4189
  get_lounge_branches: {
4157
4190
  Args: {
4158
4191
  search?: string;
@@ -4175,6 +4208,12 @@ export type Database = {
4175
4208
  isSetofReturn: true;
4176
4209
  };
4177
4210
  };
4211
+ get_lounge_id_from_branch: {
4212
+ Args: {
4213
+ p_lounge_branch_id: string;
4214
+ };
4215
+ Returns: string;
4216
+ };
4178
4217
  get_lounge_ids: {
4179
4218
  Args: {
4180
4219
  search?: string;
@@ -4223,6 +4262,16 @@ export type Database = {
4223
4262
  };
4224
4263
  Returns: undefined;
4225
4264
  };
4265
+ is_current_player_minor: {
4266
+ Args: never;
4267
+ Returns: boolean;
4268
+ };
4269
+ is_current_user_lounge_branch_staff: {
4270
+ Args: {
4271
+ p_lounge_branch_id: string;
4272
+ };
4273
+ Returns: boolean;
4274
+ };
4226
4275
  is_current_user_permanent: {
4227
4276
  Args: {
4228
4277
  user_id: string;
@@ -4230,6 +4279,15 @@ export type Database = {
4230
4279
  };
4231
4280
  Returns: boolean;
4232
4281
  };
4282
+ is_user_lounge_staff: {
4283
+ Args: {
4284
+ p_lounge_branch_id?: string;
4285
+ p_lounge_id: string;
4286
+ p_role?: string;
4287
+ p_user_id: string;
4288
+ };
4289
+ Returns: boolean;
4290
+ };
4233
4291
  kxp_daily_login_grant_amount: {
4234
4292
  Args: never;
4235
4293
  Returns: number;
@@ -4269,6 +4327,14 @@ export type Database = {
4269
4327
  };
4270
4328
  Returns: string;
4271
4329
  };
4330
+ render_pronouns: {
4331
+ Args: {
4332
+ p_pronouns: Database["compliance"]["Enums"]["pronouns"][];
4333
+ p_sex: Database["compliance"]["Enums"]["sex"];
4334
+ p_show_pronouns: boolean;
4335
+ };
4336
+ Returns: Database["compliance"]["Enums"]["pronouns"][];
4337
+ };
4272
4338
  search_lounges: {
4273
4339
  Args: {
4274
4340
  search_term: string;
@@ -4277,7 +4343,9 @@ export type Database = {
4277
4343
  Returns: {
4278
4344
  company_name: string;
4279
4345
  created_at: string;
4346
+ email: string;
4280
4347
  id: string;
4348
+ phone: string;
4281
4349
  registration_date: string;
4282
4350
  trade_name: string;
4283
4351
  user_id: string;
@@ -4604,10 +4672,14 @@ export type Database = {
4604
4672
  Views: {
4605
4673
  active_lounges: {
4606
4674
  Row: {
4675
+ average_rating: number | null;
4607
4676
  created_at: string | null;
4677
+ email: string | null;
4608
4678
  id: string | null;
4609
4679
  name: string | null;
4680
+ phone: string | null;
4610
4681
  registration_date: string | null;
4682
+ website: string | null;
4611
4683
  };
4612
4684
  Relationships: [];
4613
4685
  };
@@ -4649,10 +4721,14 @@ export type Database = {
4649
4721
  search_type?: string;
4650
4722
  };
4651
4723
  Returns: {
4724
+ average_rating: number;
4652
4725
  created_at: string;
4726
+ email: string;
4653
4727
  id: string;
4654
4728
  name: string;
4729
+ phone: string;
4655
4730
  registration_date: string;
4731
+ website: string;
4656
4732
  }[];
4657
4733
  };
4658
4734
  search_active_players: {
@@ -4751,20 +4827,20 @@ export type Database = {
4751
4827
  Row: {
4752
4828
  created_at: string;
4753
4829
  games_consoles_id: string;
4754
- id: string;
4755
4830
  lounge_branch_id: string;
4831
+ quantity: number;
4756
4832
  };
4757
4833
  Insert: {
4758
4834
  created_at?: string;
4759
4835
  games_consoles_id: string;
4760
- id?: string;
4761
4836
  lounge_branch_id: string;
4837
+ quantity?: number;
4762
4838
  };
4763
4839
  Update: {
4764
4840
  created_at?: string;
4765
4841
  games_consoles_id?: string;
4766
- id?: string;
4767
4842
  lounge_branch_id?: string;
4843
+ quantity?: number;
4768
4844
  };
4769
4845
  Relationships: [];
4770
4846
  };
@@ -4772,22 +4848,22 @@ export type Database = {
4772
4848
  Row: {
4773
4849
  created_at: string;
4774
4850
  id: string;
4775
- in_use: boolean;
4776
4851
  lounge_branch_id: string;
4852
+ quantity: number;
4777
4853
  slot_label: string;
4778
4854
  };
4779
4855
  Insert: {
4780
4856
  created_at?: string;
4781
4857
  id?: string;
4782
- in_use?: boolean;
4783
4858
  lounge_branch_id: string;
4859
+ quantity?: number;
4784
4860
  slot_label: string;
4785
4861
  };
4786
4862
  Update: {
4787
4863
  created_at?: string;
4788
4864
  id?: string;
4789
- in_use?: boolean;
4790
4865
  lounge_branch_id?: string;
4866
+ quantity?: number;
4791
4867
  slot_label?: string;
4792
4868
  };
4793
4869
  Relationships: [];
@@ -4849,33 +4925,83 @@ export type Database = {
4849
4925
  };
4850
4926
  Relationships: [];
4851
4927
  };
4852
- lounge_branch_payment_display: {
4928
+ lounge_branch_payment_options: {
4853
4929
  Row: {
4854
4930
  created_at: string;
4855
- details: Json | null;
4931
+ details: string;
4856
4932
  id: string;
4857
4933
  lounge_branch_id: string;
4858
- name: string | null;
4934
+ name: string;
4859
4935
  updated_at: string;
4936
+ updated_by: string | null;
4860
4937
  };
4861
4938
  Insert: {
4862
4939
  created_at?: string;
4863
- details?: Json | null;
4940
+ details: string;
4864
4941
  id?: string;
4865
4942
  lounge_branch_id: string;
4866
- name?: string | null;
4943
+ name: string;
4867
4944
  updated_at?: string;
4945
+ updated_by?: string | null;
4868
4946
  };
4869
4947
  Update: {
4870
4948
  created_at?: string;
4871
- details?: Json | null;
4949
+ details?: string;
4872
4950
  id?: string;
4873
4951
  lounge_branch_id?: string;
4874
- name?: string | null;
4952
+ name?: string;
4875
4953
  updated_at?: string;
4954
+ updated_by?: string | null;
4876
4955
  };
4877
4956
  Relationships: [];
4878
4957
  };
4958
+ lounge_branch_session_bill_options: {
4959
+ Row: {
4960
+ amount_cents: number;
4961
+ bill_type: Database["sessions"]["Enums"]["session_bill_type"];
4962
+ billing_interval_minutes: number | null;
4963
+ created_at: string;
4964
+ games_consoles_id: string | null;
4965
+ id: string;
4966
+ lounge_branch_id: string;
4967
+ station_id: string | null;
4968
+ unit_label: string | null;
4969
+ updated_at: string;
4970
+ };
4971
+ Insert: {
4972
+ amount_cents: number;
4973
+ bill_type: Database["sessions"]["Enums"]["session_bill_type"];
4974
+ billing_interval_minutes?: number | null;
4975
+ created_at?: string;
4976
+ games_consoles_id?: string | null;
4977
+ id?: string;
4978
+ lounge_branch_id: string;
4979
+ station_id?: string | null;
4980
+ unit_label?: string | null;
4981
+ updated_at?: string;
4982
+ };
4983
+ Update: {
4984
+ amount_cents?: number;
4985
+ bill_type?: Database["sessions"]["Enums"]["session_bill_type"];
4986
+ billing_interval_minutes?: number | null;
4987
+ created_at?: string;
4988
+ games_consoles_id?: string | null;
4989
+ id?: string;
4990
+ lounge_branch_id?: string;
4991
+ station_id?: string | null;
4992
+ unit_label?: string | null;
4993
+ updated_at?: string;
4994
+ };
4995
+ Relationships: [
4996
+ {
4997
+ foreignKeyName: "lounge_branch_session_bill_options_station_id_fkey";
4998
+ columns: ["station_id"];
4999
+ isOneToOne: false;
5000
+ referencedRelation: "lounge_branch_stations";
5001
+ referencedColumns: ["id"];
5002
+ }
5003
+ ];
5004
+ };
4879
5005
  lounge_branch_session_discount_targets: {
4880
5006
  Row: {
4881
5007
  console_id: string | null;
@@ -4919,91 +5045,56 @@ export type Database = {
4919
5045
  };
4920
5046
  lounge_branch_session_discounts: {
4921
5047
  Row: {
5048
+ amount_cents: number | null;
4922
5049
  created_at: string;
5050
+ description: string | null;
4923
5051
  discount_type: Database["sessions"]["Enums"]["session_discount_type"];
4924
5052
  id: string;
4925
5053
  incremental_discount_percentage: number | null;
4926
5054
  maximum_discount_percentage: number | null;
5055
+ name: string;
4927
5056
  option_id: string;
5057
+ regular_percentage: number | null;
4928
5058
  updated_at: string;
4929
5059
  valid_from: string | null;
4930
5060
  valid_until: string | null;
4931
- value: number | null;
4932
5061
  };
4933
5062
  Insert: {
5063
+ amount_cents?: number | null;
4934
5064
  created_at?: string;
5065
+ description?: string | null;
4935
5066
  discount_type: Database["sessions"]["Enums"]["session_discount_type"];
4936
5067
  id?: string;
4937
5068
  incremental_discount_percentage?: number | null;
4938
5069
  maximum_discount_percentage?: number | null;
5070
+ name: string;
4939
5071
  option_id: string;
5072
+ regular_percentage?: number | null;
4940
5073
  updated_at?: string;
4941
5074
  valid_from?: string | null;
4942
5075
  valid_until?: string | null;
4943
- value?: number | null;
4944
5076
  };
4945
5077
  Update: {
5078
+ amount_cents?: number | null;
4946
5079
  created_at?: string;
5080
+ description?: string | null;
4947
5081
  discount_type?: Database["sessions"]["Enums"]["session_discount_type"];
4948
5082
  id?: string;
4949
5083
  incremental_discount_percentage?: number | null;
4950
5084
  maximum_discount_percentage?: number | null;
5085
+ name?: string;
4951
5086
  option_id?: string;
5087
+ regular_percentage?: number | null;
4952
5088
  updated_at?: string;
4953
5089
  valid_from?: string | null;
4954
5090
  valid_until?: string | null;
4955
- value?: number | null;
4956
5091
  };
4957
5092
  Relationships: [
4958
5093
  {
4959
5094
  foreignKeyName: "lounge_branch_session_discounts_option_id_fkey";
4960
5095
  columns: ["option_id"];
4961
5096
  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";
5097
+ referencedRelation: "lounge_branch_session_bill_options";
5007
5098
  referencedColumns: ["id"];
5008
5099
  }
5009
5100
  ];
@@ -5017,23 +5108,21 @@ export type Database = {
5017
5108
  lounge_branch_id: string;
5018
5109
  name: string;
5019
5110
  number: string;
5020
- online_play: boolean | null;
5111
+ online_play: boolean;
5021
5112
  special_controllers: string | null;
5022
- status: Database["sessions"]["Enums"]["lounge_branch_station_status"];
5023
5113
  updated_at: string;
5024
5114
  updated_by: string | null;
5025
5115
  };
5026
5116
  Insert: {
5027
- capacity: number;
5117
+ capacity?: number;
5028
5118
  console_id: string;
5029
5119
  created_at?: string;
5030
5120
  id?: string;
5031
5121
  lounge_branch_id: string;
5032
5122
  name: string;
5033
5123
  number: string;
5034
- online_play?: boolean | null;
5124
+ online_play?: boolean;
5035
5125
  special_controllers?: string | null;
5036
- status?: Database["sessions"]["Enums"]["lounge_branch_station_status"];
5037
5126
  updated_at?: string;
5038
5127
  updated_by?: string | null;
5039
5128
  };
@@ -5045,9 +5134,8 @@ export type Database = {
5045
5134
  lounge_branch_id?: string;
5046
5135
  name?: string;
5047
5136
  number?: string;
5048
- online_play?: boolean | null;
5137
+ online_play?: boolean;
5049
5138
  special_controllers?: string | null;
5050
- status?: Database["sessions"]["Enums"]["lounge_branch_station_status"];
5051
5139
  updated_at?: string;
5052
5140
  updated_by?: string | null;
5053
5141
  };
@@ -5069,7 +5157,7 @@ export type Database = {
5069
5157
  created_at?: string;
5070
5158
  id?: string;
5071
5159
  requested_at?: string;
5072
- requested_by: string;
5160
+ requested_by?: string;
5073
5161
  session_id: string;
5074
5162
  };
5075
5163
  Update: {
@@ -5091,52 +5179,65 @@ export type Database = {
5091
5179
  }
5092
5180
  ];
5093
5181
  };
5094
- player_session_billing: {
5182
+ player_session_bills: {
5095
5183
  Row: {
5184
+ cost_snapshot: Json | null;
5096
5185
  created_at: string;
5097
5186
  discount_id: string | null;
5098
5187
  id: string;
5099
5188
  option_id: string;
5100
5189
  session_id: string;
5190
+ station_period_id: string;
5101
5191
  units: number | null;
5102
5192
  };
5103
5193
  Insert: {
5194
+ cost_snapshot?: Json | null;
5104
5195
  created_at?: string;
5105
5196
  discount_id?: string | null;
5106
5197
  id?: string;
5107
5198
  option_id: string;
5108
5199
  session_id: string;
5200
+ station_period_id: string;
5109
5201
  units?: number | null;
5110
5202
  };
5111
5203
  Update: {
5204
+ cost_snapshot?: Json | null;
5112
5205
  created_at?: string;
5113
5206
  discount_id?: string | null;
5114
5207
  id?: string;
5115
5208
  option_id?: string;
5116
5209
  session_id?: string;
5210
+ station_period_id?: string;
5117
5211
  units?: number | null;
5118
5212
  };
5119
5213
  Relationships: [
5120
5214
  {
5121
- foreignKeyName: "player_session_billing_discount_id_fkey";
5215
+ foreignKeyName: "player_session_bills_discount_id_fkey";
5122
5216
  columns: ["discount_id"];
5123
5217
  isOneToOne: false;
5124
5218
  referencedRelation: "lounge_branch_session_discounts";
5125
5219
  referencedColumns: ["id"];
5126
5220
  },
5127
5221
  {
5128
- foreignKeyName: "player_session_billing_option_id_fkey";
5222
+ foreignKeyName: "player_session_bills_option_id_fkey";
5129
5223
  columns: ["option_id"];
5130
5224
  isOneToOne: false;
5131
- referencedRelation: "lounge_branch_session_options";
5225
+ referencedRelation: "lounge_branch_session_bill_options";
5132
5226
  referencedColumns: ["id"];
5133
5227
  },
5134
5228
  {
5135
- foreignKeyName: "player_session_billing_session_id_fkey";
5229
+ foreignKeyName: "player_session_bills_session_id_fkey";
5136
5230
  columns: ["session_id"];
5137
5231
  isOneToOne: false;
5138
5232
  referencedRelation: "player_sessions";
5139
5233
  referencedColumns: ["id"];
5234
+ },
5235
+ {
5236
+ foreignKeyName: "player_session_bills_station_period_id_fkey";
5237
+ columns: ["station_period_id"];
5238
+ isOneToOne: false;
5239
+ referencedRelation: "player_session_stations";
5240
+ referencedColumns: ["id"];
5140
5241
  }
5141
5242
  ];
5142
5243
  };
@@ -5149,7 +5250,6 @@ export type Database = {
5149
5250
  player_id: string;
5150
5251
  subject: string;
5151
5252
  target_lounge_branch_id: string | null;
5152
- target_lounge_id: string | null;
5153
5253
  target_session_id: string | null;
5154
5254
  user_id: string | null;
5155
5255
  };
@@ -5158,10 +5258,9 @@ export type Database = {
5158
5258
  created_at?: string;
5159
5259
  id?: string;
5160
5260
  message: string;
5161
- player_id: string;
5261
+ player_id?: string;
5162
5262
  subject: string;
5163
5263
  target_lounge_branch_id?: string | null;
5164
- target_lounge_id?: string | null;
5165
5264
  target_session_id?: string | null;
5166
5265
  user_id?: string | null;
5167
5266
  };
@@ -5173,7 +5272,6 @@ export type Database = {
5173
5272
  player_id?: string;
5174
5273
  subject?: string;
5175
5274
  target_lounge_branch_id?: string | null;
5176
- target_lounge_id?: string | null;
5177
5275
  target_session_id?: string | null;
5178
5276
  user_id?: string | null;
5179
5277
  };
@@ -5187,6 +5285,80 @@ export type Database = {
5187
5285
  }
5188
5286
  ];
5189
5287
  };
5288
+ player_session_eatery_cart: {
5289
+ Row: {
5290
+ created_at: string;
5291
+ id: string;
5292
+ session_id: string;
5293
+ updated_at: string;
5294
+ };
5295
+ Insert: {
5296
+ created_at?: string;
5297
+ id?: string;
5298
+ session_id: string;
5299
+ updated_at?: string;
5300
+ };
5301
+ Update: {
5302
+ created_at?: string;
5303
+ id?: string;
5304
+ session_id?: string;
5305
+ updated_at?: string;
5306
+ };
5307
+ Relationships: [
5308
+ {
5309
+ foreignKeyName: "player_session_eatery_cart_session_id_fkey";
5310
+ columns: ["session_id"];
5311
+ isOneToOne: true;
5312
+ referencedRelation: "player_sessions";
5313
+ referencedColumns: ["id"];
5314
+ }
5315
+ ];
5316
+ };
5317
+ player_session_eatery_cart_items: {
5318
+ Row: {
5319
+ cart_id: string;
5320
+ created_at: string;
5321
+ id: string;
5322
+ item_id: string;
5323
+ item_snapshot: Json | null;
5324
+ quantity: number;
5325
+ unit_price_cents: number;
5326
+ };
5327
+ Insert: {
5328
+ cart_id: string;
5329
+ created_at?: string;
5330
+ id?: string;
5331
+ item_id: string;
5332
+ item_snapshot?: Json | null;
5333
+ quantity: number;
5334
+ unit_price_cents: number;
5335
+ };
5336
+ Update: {
5337
+ cart_id?: string;
5338
+ created_at?: string;
5339
+ id?: string;
5340
+ item_id?: string;
5341
+ item_snapshot?: Json | null;
5342
+ quantity?: number;
5343
+ unit_price_cents?: number;
5344
+ };
5345
+ Relationships: [
5346
+ {
5347
+ foreignKeyName: "player_session_eatery_cart_items_cart_id_fkey";
5348
+ columns: ["cart_id"];
5349
+ isOneToOne: false;
5350
+ referencedRelation: "player_session_eatery_cart";
5351
+ referencedColumns: ["id"];
5352
+ },
5353
+ {
5354
+ foreignKeyName: "player_session_eatery_cart_items_item_id_fkey";
5355
+ columns: ["item_id"];
5356
+ isOneToOne: false;
5357
+ referencedRelation: "lounge_branch_eatery_items";
5358
+ referencedColumns: ["id"];
5359
+ }
5360
+ ];
5361
+ };
5190
5362
  player_session_eatery_order_items: {
5191
5363
  Row: {
5192
5364
  created_at: string;
@@ -5235,26 +5407,32 @@ export type Database = {
5235
5407
  player_session_eatery_orders: {
5236
5408
  Row: {
5237
5409
  cancellation_reason: string | null;
5410
+ cancelled_at: string | null;
5411
+ cancelled_by: string | null;
5238
5412
  created_at: string;
5239
5413
  id: string;
5240
5414
  session_id: string;
5241
- status: string;
5415
+ status: Database["sessions"]["Enums"]["session_eatery_order_status"];
5242
5416
  updated_at: string;
5243
5417
  };
5244
5418
  Insert: {
5245
5419
  cancellation_reason?: string | null;
5420
+ cancelled_at?: string | null;
5421
+ cancelled_by?: string | null;
5246
5422
  created_at?: string;
5247
5423
  id?: string;
5248
5424
  session_id: string;
5249
- status?: string;
5425
+ status?: Database["sessions"]["Enums"]["session_eatery_order_status"];
5250
5426
  updated_at?: string;
5251
5427
  };
5252
5428
  Update: {
5253
5429
  cancellation_reason?: string | null;
5430
+ cancelled_at?: string | null;
5431
+ cancelled_by?: string | null;
5254
5432
  created_at?: string;
5255
5433
  id?: string;
5256
5434
  session_id?: string;
5257
- status?: string;
5435
+ status?: Database["sessions"]["Enums"]["session_eatery_order_status"];
5258
5436
  updated_at?: string;
5259
5437
  };
5260
5438
  Relationships: [
@@ -5267,42 +5445,171 @@ export type Database = {
5267
5445
  }
5268
5446
  ];
5269
5447
  };
5270
- player_session_members: {
5448
+ player_session_games: {
5271
5449
  Row: {
5272
5450
  created_at: string;
5451
+ ended_at: string | null;
5452
+ games_consoles_id: string;
5273
5453
  id: string;
5274
- joined_at: string;
5275
- left_at: string | null;
5276
- player_id: string;
5277
- role: string;
5454
+ request_approved_at: string | null;
5455
+ request_approved_by: string | null;
5456
+ request_cancelled_at: string | null;
5457
+ request_cancelled_by: string | null;
5458
+ request_cancelled_reason: string | null;
5459
+ request_rejected_at: string | null;
5460
+ request_rejected_by: string | null;
5461
+ request_rejected_reason: string | null;
5462
+ requested_at: string | null;
5278
5463
  session_id: string;
5279
- status: Database["sessions"]["Enums"]["session_member_status"];
5280
- updated_at: string;
5281
- user_id: string | null;
5464
+ started_at: string | null;
5282
5465
  };
5283
5466
  Insert: {
5284
5467
  created_at?: string;
5468
+ ended_at?: string | null;
5469
+ games_consoles_id: string;
5285
5470
  id?: string;
5286
- joined_at?: string;
5287
- left_at?: string | null;
5288
- player_id: string;
5289
- role: string;
5471
+ request_approved_at?: string | null;
5472
+ request_approved_by?: string | null;
5473
+ request_cancelled_at?: string | null;
5474
+ request_cancelled_by?: string | null;
5475
+ request_cancelled_reason?: string | null;
5476
+ request_rejected_at?: string | null;
5477
+ request_rejected_by?: string | null;
5478
+ request_rejected_reason?: string | null;
5479
+ requested_at?: string | null;
5290
5480
  session_id: string;
5291
- status?: Database["sessions"]["Enums"]["session_member_status"];
5292
- updated_at?: string;
5293
- user_id?: string | null;
5481
+ started_at?: string | null;
5294
5482
  };
5295
5483
  Update: {
5296
5484
  created_at?: string;
5485
+ ended_at?: string | null;
5486
+ games_consoles_id?: string;
5297
5487
  id?: string;
5298
- joined_at?: string;
5299
- left_at?: string | null;
5300
- player_id?: string;
5301
- role?: string;
5488
+ request_approved_at?: string | null;
5489
+ request_approved_by?: string | null;
5490
+ request_cancelled_at?: string | null;
5491
+ request_cancelled_by?: string | null;
5492
+ request_cancelled_reason?: string | null;
5493
+ request_rejected_at?: string | null;
5494
+ request_rejected_by?: string | null;
5495
+ request_rejected_reason?: string | null;
5496
+ requested_at?: string | null;
5302
5497
  session_id?: string;
5303
- status?: Database["sessions"]["Enums"]["session_member_status"];
5304
- updated_at?: string;
5305
- user_id?: string | null;
5498
+ started_at?: string | null;
5499
+ };
5500
+ Relationships: [
5501
+ {
5502
+ foreignKeyName: "player_session_games_session_id_fkey";
5503
+ columns: ["session_id"];
5504
+ isOneToOne: false;
5505
+ referencedRelation: "player_sessions";
5506
+ referencedColumns: ["id"];
5507
+ }
5508
+ ];
5509
+ };
5510
+ player_session_luggage_slots: {
5511
+ Row: {
5512
+ assigned_at: string | null;
5513
+ created_at: string;
5514
+ luggage_slot_id: string;
5515
+ member_id: string;
5516
+ quantity: number;
5517
+ returned_at: string | null;
5518
+ session_id: string;
5519
+ status: Database["sessions"]["Enums"]["session_luggage_slot_status"];
5520
+ };
5521
+ Insert: {
5522
+ assigned_at?: string | null;
5523
+ created_at?: string;
5524
+ luggage_slot_id: string;
5525
+ member_id: string;
5526
+ quantity?: number;
5527
+ returned_at?: string | null;
5528
+ session_id: string;
5529
+ status?: Database["sessions"]["Enums"]["session_luggage_slot_status"];
5530
+ };
5531
+ Update: {
5532
+ assigned_at?: string | null;
5533
+ created_at?: string;
5534
+ luggage_slot_id?: string;
5535
+ member_id?: string;
5536
+ quantity?: number;
5537
+ returned_at?: string | null;
5538
+ session_id?: string;
5539
+ status?: Database["sessions"]["Enums"]["session_luggage_slot_status"];
5540
+ };
5541
+ Relationships: [
5542
+ {
5543
+ foreignKeyName: "player_session_luggage_slots_luggage_slot_id_fkey";
5544
+ columns: ["luggage_slot_id"];
5545
+ isOneToOne: false;
5546
+ referencedRelation: "lounge_branch_luggage_slots";
5547
+ referencedColumns: ["id"];
5548
+ },
5549
+ {
5550
+ foreignKeyName: "player_session_luggage_slots_member_id_fkey";
5551
+ columns: ["member_id"];
5552
+ isOneToOne: false;
5553
+ referencedRelation: "player_session_members";
5554
+ referencedColumns: ["id"];
5555
+ },
5556
+ {
5557
+ foreignKeyName: "player_session_luggage_slots_session_id_fkey";
5558
+ columns: ["session_id"];
5559
+ isOneToOne: false;
5560
+ referencedRelation: "player_sessions";
5561
+ referencedColumns: ["id"];
5562
+ }
5563
+ ];
5564
+ };
5565
+ player_session_members: {
5566
+ Row: {
5567
+ cancelled_at: string | null;
5568
+ cancelled_by: string | null;
5569
+ created_at: string;
5570
+ id: string;
5571
+ joined_at: string | null;
5572
+ left_at: string | null;
5573
+ minor_rep_consent_otp_sent_at: string | null;
5574
+ minor_rep_consent_twilio_sid: string | null;
5575
+ minor_rep_consent_verified_at: string | null;
5576
+ player_id: string;
5577
+ role: string;
5578
+ session_id: string;
5579
+ status: Database["sessions"]["Enums"]["session_member_status"];
5580
+ user_id: string | null;
5581
+ };
5582
+ Insert: {
5583
+ cancelled_at?: string | null;
5584
+ cancelled_by?: string | null;
5585
+ created_at?: string;
5586
+ id?: string;
5587
+ joined_at?: string | null;
5588
+ left_at?: string | null;
5589
+ minor_rep_consent_otp_sent_at?: string | null;
5590
+ minor_rep_consent_twilio_sid?: string | null;
5591
+ minor_rep_consent_verified_at?: string | null;
5592
+ player_id: string;
5593
+ role: string;
5594
+ session_id: string;
5595
+ status?: Database["sessions"]["Enums"]["session_member_status"];
5596
+ user_id?: string | null;
5597
+ };
5598
+ Update: {
5599
+ cancelled_at?: string | null;
5600
+ cancelled_by?: string | null;
5601
+ created_at?: string;
5602
+ id?: string;
5603
+ joined_at?: string | null;
5604
+ left_at?: string | null;
5605
+ minor_rep_consent_otp_sent_at?: string | null;
5606
+ minor_rep_consent_twilio_sid?: string | null;
5607
+ minor_rep_consent_verified_at?: string | null;
5608
+ player_id?: string;
5609
+ role?: string;
5610
+ session_id?: string;
5611
+ status?: Database["sessions"]["Enums"]["session_member_status"];
5612
+ user_id?: string | null;
5306
5613
  };
5307
5614
  Relationships: [
5308
5615
  {
@@ -5314,92 +5621,239 @@ export type Database = {
5314
5621
  }
5315
5622
  ];
5316
5623
  };
5624
+ player_session_ratings: {
5625
+ Row: {
5626
+ amenities: number;
5627
+ atmosphere: number;
5628
+ created_at: string;
5629
+ customer_service: number;
5630
+ eatery: number | null;
5631
+ equipment: number;
5632
+ review: string | null;
5633
+ session_id: string;
5634
+ };
5635
+ Insert: {
5636
+ amenities: number;
5637
+ atmosphere: number;
5638
+ created_at?: string;
5639
+ customer_service: number;
5640
+ eatery?: number | null;
5641
+ equipment: number;
5642
+ review?: string | null;
5643
+ session_id: string;
5644
+ };
5645
+ Update: {
5646
+ amenities?: number;
5647
+ atmosphere?: number;
5648
+ created_at?: string;
5649
+ customer_service?: number;
5650
+ eatery?: number | null;
5651
+ equipment?: number;
5652
+ review?: string | null;
5653
+ session_id?: string;
5654
+ };
5655
+ Relationships: [
5656
+ {
5657
+ foreignKeyName: "player_session_ratings_session_id_fkey";
5658
+ columns: ["session_id"];
5659
+ isOneToOne: true;
5660
+ referencedRelation: "player_sessions";
5661
+ referencedColumns: ["id"];
5662
+ }
5663
+ ];
5664
+ };
5665
+ player_session_stations: {
5666
+ Row: {
5667
+ created_at: string;
5668
+ ended_at: string | null;
5669
+ id: string;
5670
+ request_approved_at: string | null;
5671
+ request_approved_by: string | null;
5672
+ request_cancelled_at: string | null;
5673
+ request_cancelled_by: string | null;
5674
+ request_cancelled_reason: string | null;
5675
+ request_rejected_at: string | null;
5676
+ request_rejected_by: string | null;
5677
+ request_rejected_reason: string | null;
5678
+ requested_at: string | null;
5679
+ session_id: string;
5680
+ started_at: string | null;
5681
+ station_id: string;
5682
+ };
5683
+ Insert: {
5684
+ created_at?: string;
5685
+ ended_at?: string | null;
5686
+ id?: string;
5687
+ request_approved_at?: string | null;
5688
+ request_approved_by?: string | null;
5689
+ request_cancelled_at?: string | null;
5690
+ request_cancelled_by?: string | null;
5691
+ request_cancelled_reason?: string | null;
5692
+ request_rejected_at?: string | null;
5693
+ request_rejected_by?: string | null;
5694
+ request_rejected_reason?: string | null;
5695
+ requested_at?: string | null;
5696
+ session_id: string;
5697
+ started_at?: string | null;
5698
+ station_id: string;
5699
+ };
5700
+ Update: {
5701
+ created_at?: string;
5702
+ ended_at?: string | null;
5703
+ id?: string;
5704
+ request_approved_at?: string | null;
5705
+ request_approved_by?: string | null;
5706
+ request_cancelled_at?: string | null;
5707
+ request_cancelled_by?: string | null;
5708
+ request_cancelled_reason?: string | null;
5709
+ request_rejected_at?: string | null;
5710
+ request_rejected_by?: string | null;
5711
+ request_rejected_reason?: string | null;
5712
+ requested_at?: string | null;
5713
+ session_id?: string;
5714
+ started_at?: string | null;
5715
+ station_id?: string;
5716
+ };
5717
+ Relationships: [
5718
+ {
5719
+ foreignKeyName: "player_session_stations_session_id_fkey";
5720
+ columns: ["session_id"];
5721
+ isOneToOne: false;
5722
+ referencedRelation: "player_sessions";
5723
+ referencedColumns: ["id"];
5724
+ },
5725
+ {
5726
+ foreignKeyName: "player_session_stations_station_id_fkey";
5727
+ columns: ["station_id"];
5728
+ isOneToOne: false;
5729
+ referencedRelation: "lounge_branch_stations";
5730
+ referencedColumns: ["id"];
5731
+ }
5732
+ ];
5733
+ };
5317
5734
  player_sessions: {
5318
5735
  Row: {
5736
+ cancelled_at: string | null;
5737
+ cancelled_reason: string | null;
5319
5738
  checkout_requested_at: string | null;
5320
5739
  created_at: string;
5321
5740
  ended_at: string | null;
5322
- games_consoles_id: string;
5741
+ ended_by: string | null;
5742
+ final_cost_cents: number | null;
5323
5743
  id: string;
5324
5744
  is_reservation: boolean;
5325
5745
  lounge_branch_id: string;
5326
- luggage_slot_id: string | null;
5327
- minor_representative_consent_verified_at: string | null;
5746
+ minor_rep_consent_otp_sent_at: string | null;
5747
+ minor_rep_consent_twilio_sid: string | null;
5748
+ minor_rep_consent_verified_at: string | null;
5328
5749
  player_id: string;
5329
- requested_games_consoles_id: string | null;
5330
- requested_station_id: string | null;
5750
+ reservation_approved_at: string | null;
5751
+ reservation_approved_by: string | null;
5752
+ reservation_rejected_at: string | null;
5753
+ reservation_rejected_by: string | null;
5754
+ reservation_rejected_reason: string | null;
5331
5755
  reservation_requested_at: string | null;
5332
5756
  started_at: string | null;
5333
- station_id: string;
5757
+ started_by: string | null;
5334
5758
  status: Database["sessions"]["Enums"]["session_status"];
5335
- updated_at: string;
5336
5759
  user_id: string | null;
5337
5760
  };
5338
5761
  Insert: {
5762
+ cancelled_at?: string | null;
5763
+ cancelled_reason?: string | null;
5339
5764
  checkout_requested_at?: string | null;
5340
5765
  created_at?: string;
5341
5766
  ended_at?: string | null;
5342
- games_consoles_id: string;
5767
+ ended_by?: string | null;
5768
+ final_cost_cents?: number | null;
5343
5769
  id?: string;
5344
5770
  is_reservation?: boolean;
5345
5771
  lounge_branch_id: string;
5346
- luggage_slot_id?: string | null;
5347
- minor_representative_consent_verified_at?: string | null;
5772
+ minor_rep_consent_otp_sent_at?: string | null;
5773
+ minor_rep_consent_twilio_sid?: string | null;
5774
+ minor_rep_consent_verified_at?: string | null;
5348
5775
  player_id: string;
5349
- requested_games_consoles_id?: string | null;
5350
- requested_station_id?: string | null;
5776
+ reservation_approved_at?: string | null;
5777
+ reservation_approved_by?: string | null;
5778
+ reservation_rejected_at?: string | null;
5779
+ reservation_rejected_by?: string | null;
5780
+ reservation_rejected_reason?: string | null;
5351
5781
  reservation_requested_at?: string | null;
5352
5782
  started_at?: string | null;
5353
- station_id: string;
5354
- status: Database["sessions"]["Enums"]["session_status"];
5355
- updated_at?: string;
5783
+ started_by?: string | null;
5784
+ status?: Database["sessions"]["Enums"]["session_status"];
5356
5785
  user_id?: string | null;
5357
5786
  };
5358
5787
  Update: {
5788
+ cancelled_at?: string | null;
5789
+ cancelled_reason?: string | null;
5359
5790
  checkout_requested_at?: string | null;
5360
5791
  created_at?: string;
5361
5792
  ended_at?: string | null;
5362
- games_consoles_id?: string;
5793
+ ended_by?: string | null;
5794
+ final_cost_cents?: number | null;
5363
5795
  id?: string;
5364
5796
  is_reservation?: boolean;
5365
5797
  lounge_branch_id?: string;
5366
- luggage_slot_id?: string | null;
5367
- minor_representative_consent_verified_at?: string | null;
5798
+ minor_rep_consent_otp_sent_at?: string | null;
5799
+ minor_rep_consent_twilio_sid?: string | null;
5800
+ minor_rep_consent_verified_at?: string | null;
5368
5801
  player_id?: string;
5369
- requested_games_consoles_id?: string | null;
5370
- requested_station_id?: string | null;
5802
+ reservation_approved_at?: string | null;
5803
+ reservation_approved_by?: string | null;
5804
+ reservation_rejected_at?: string | null;
5805
+ reservation_rejected_by?: string | null;
5806
+ reservation_rejected_reason?: string | null;
5371
5807
  reservation_requested_at?: string | null;
5372
5808
  started_at?: string | null;
5373
- station_id?: string;
5809
+ started_by?: string | null;
5374
5810
  status?: Database["sessions"]["Enums"]["session_status"];
5375
- updated_at?: string;
5811
+ user_id?: string | null;
5812
+ };
5813
+ Relationships: [];
5814
+ };
5815
+ player_sessions_regular_preferences: {
5816
+ Row: {
5817
+ created_at: string;
5818
+ lounge_branch_id: string;
5819
+ player_id: string;
5820
+ preferred_games_consoles_id: string | null;
5821
+ preferred_session_bill_option_id: string | null;
5822
+ preferred_station_id: string | null;
5823
+ updated_at: string | null;
5824
+ user_id: string | null;
5825
+ };
5826
+ Insert: {
5827
+ created_at?: string;
5828
+ lounge_branch_id: string;
5829
+ player_id: string;
5830
+ preferred_games_consoles_id?: string | null;
5831
+ preferred_session_bill_option_id?: string | null;
5832
+ preferred_station_id?: string | null;
5833
+ updated_at?: string | null;
5834
+ user_id?: string | null;
5835
+ };
5836
+ Update: {
5837
+ created_at?: string;
5838
+ lounge_branch_id?: string;
5839
+ player_id?: string;
5840
+ preferred_games_consoles_id?: string | null;
5841
+ preferred_session_bill_option_id?: string | null;
5842
+ preferred_station_id?: string | null;
5843
+ updated_at?: string | null;
5376
5844
  user_id?: string | null;
5377
5845
  };
5378
5846
  Relationships: [
5379
5847
  {
5380
- foreignKeyName: "player_sessions_lounge_branch_id_station_id_fkey";
5381
- columns: ["lounge_branch_id", "station_id"];
5848
+ foreignKeyName: "player_sessions_regular_preferences_session_bill_option_fkey";
5849
+ columns: ["preferred_session_bill_option_id"];
5382
5850
  isOneToOne: false;
5383
- referencedRelation: "lounge_branch_stations";
5384
- referencedColumns: ["lounge_branch_id", "id"];
5385
- },
5386
- {
5387
- foreignKeyName: "player_sessions_luggage_slot_id_fkey";
5388
- columns: ["luggage_slot_id"];
5389
- isOneToOne: false;
5390
- referencedRelation: "lounge_branch_luggage_slots";
5851
+ referencedRelation: "lounge_branch_session_bill_options";
5391
5852
  referencedColumns: ["id"];
5392
5853
  },
5393
5854
  {
5394
- foreignKeyName: "player_sessions_requested_station_id_fkey";
5395
- columns: ["requested_station_id"];
5396
- isOneToOne: false;
5397
- referencedRelation: "lounge_branch_stations";
5398
- referencedColumns: ["id"];
5399
- },
5400
- {
5401
- foreignKeyName: "player_sessions_station_id_fkey";
5402
- columns: ["station_id"];
5855
+ foreignKeyName: "player_sessions_regular_preferences_station_fkey";
5856
+ columns: ["preferred_station_id"];
5403
5857
  isOneToOne: false;
5404
5858
  referencedRelation: "lounge_branch_stations";
5405
5859
  referencedColumns: ["id"];
@@ -5411,25 +5865,316 @@ export type Database = {
5411
5865
  [_ in never]: never;
5412
5866
  };
5413
5867
  Functions: {
5868
+ accept_session_invite: {
5869
+ Args: {
5870
+ p_session_id: string;
5871
+ };
5872
+ Returns: Json;
5873
+ };
5874
+ add_eatery_cart_item: {
5875
+ Args: {
5876
+ p_item_id: string;
5877
+ p_item_snapshot: Json;
5878
+ p_quantity: number;
5879
+ p_session_id: string;
5880
+ p_unit_price_cents: number;
5881
+ };
5882
+ Returns: string;
5883
+ };
5884
+ add_units_for_session: {
5885
+ Args: {
5886
+ p_option_id?: string;
5887
+ p_session_id: string;
5888
+ p_units?: number;
5889
+ };
5890
+ Returns: string;
5891
+ };
5892
+ cancel_pending_session: {
5893
+ Args: {
5894
+ p_complaint_message?: string;
5895
+ p_complaint_subject?: string;
5896
+ p_session_id: string;
5897
+ };
5898
+ Returns: string;
5899
+ };
5900
+ cancel_session_invite: {
5901
+ Args: {
5902
+ p_session_id: string;
5903
+ };
5904
+ Returns: undefined;
5905
+ };
5906
+ compute_final_session_cost: {
5907
+ Args: {
5908
+ p_session_id: string;
5909
+ };
5910
+ Returns: number;
5911
+ };
5912
+ compute_session_bill_cost: {
5913
+ Args: {
5914
+ p_bill_id: string;
5915
+ };
5916
+ Returns: Json;
5917
+ };
5918
+ create_eatery_order: {
5919
+ Args: {
5920
+ p_session_id: string;
5921
+ };
5922
+ Returns: string;
5923
+ };
5924
+ create_session: {
5925
+ Args: {
5926
+ p_discount_id?: string;
5927
+ p_games_consoles_id: string;
5928
+ p_invited_luggage_slots?: Json;
5929
+ p_invited_player_ids?: string[];
5930
+ p_is_reservation?: boolean;
5931
+ p_lounge_branch_id: string;
5932
+ p_luggage_slot?: Json;
5933
+ p_option_id: string;
5934
+ p_station_id: string;
5935
+ p_units?: number;
5936
+ };
5937
+ Returns: string;
5938
+ };
5939
+ create_session_complaint: {
5940
+ Args: {
5941
+ p_message: string;
5942
+ p_station_number?: string;
5943
+ p_subject: string;
5944
+ };
5945
+ Returns: string;
5946
+ };
5947
+ ensure_session_eatery_cart: {
5948
+ Args: {
5949
+ p_session_id: string;
5950
+ };
5951
+ Returns: string;
5952
+ };
5953
+ get_current_session: {
5954
+ Args: never;
5955
+ Returns: Json;
5956
+ };
5957
+ get_lounge_average_rating: {
5958
+ Args: {
5959
+ p_lounge_branch_id?: string;
5960
+ p_lounge_id: string;
5961
+ };
5962
+ Returns: number;
5963
+ };
5964
+ get_lounge_branch_data: {
5965
+ Args: {
5966
+ p_lounge_branch_id: string;
5967
+ };
5968
+ Returns: Json;
5969
+ };
5970
+ get_lounge_branch_games: {
5971
+ Args: {
5972
+ available_only?: boolean;
5973
+ p_lounge_branch_id: string;
5974
+ };
5975
+ Returns: {
5976
+ consoles: Json;
5977
+ cover_url: string;
5978
+ game_id: string;
5979
+ name: string;
5980
+ }[];
5981
+ };
5982
+ get_lounge_branch_stations: {
5983
+ Args: {
5984
+ available_only?: boolean;
5985
+ p_lounge_branch_id: string;
5986
+ };
5987
+ Returns: {
5988
+ capacity: number;
5989
+ console_abbreviation: string;
5990
+ console_name: string;
5991
+ id: string;
5992
+ name: string;
5993
+ number: string;
5994
+ online_play: boolean;
5995
+ special_controllers: string;
5996
+ }[];
5997
+ };
5998
+ get_lounge_branches_with_open_status: {
5999
+ Args: {
6000
+ p_lounge_branch_id?: string;
6001
+ p_lounge_id?: string;
6002
+ };
6003
+ Returns: {
6004
+ address: Json;
6005
+ amenities: Json;
6006
+ email: string;
6007
+ id: string;
6008
+ is_open: boolean;
6009
+ lounge_id: string;
6010
+ name: string;
6011
+ opening_times: Json;
6012
+ phone: string;
6013
+ }[];
6014
+ };
6015
+ get_lounge_with_branches: {
6016
+ Args: {
6017
+ p_lounge_id: string;
6018
+ };
6019
+ Returns: Json;
6020
+ };
6021
+ get_minor_rep_consent_context_for_session: {
6022
+ Args: {
6023
+ p_session_id: string;
6024
+ };
6025
+ Returns: Json;
6026
+ };
6027
+ get_past_sessions: {
6028
+ Args: {
6029
+ p_lounge_branch_id?: string;
6030
+ p_lounge_id?: string;
6031
+ };
6032
+ Returns: Json;
6033
+ };
6034
+ get_pending_invite_for_current_player: {
6035
+ Args: {
6036
+ p_session_id: string;
6037
+ };
6038
+ Returns: Json;
6039
+ };
6040
+ get_session_bill_data: {
6041
+ Args: {
6042
+ p_session_id: string;
6043
+ };
6044
+ Returns: Json;
6045
+ };
6046
+ get_session_data: {
6047
+ Args: {
6048
+ p_session_id: string;
6049
+ };
6050
+ Returns: Json;
6051
+ };
6052
+ get_session_start_data: {
6053
+ Args: {
6054
+ p_lounge_branch_id: string;
6055
+ };
6056
+ Returns: Json;
6057
+ };
6058
+ handle_session_cancel: {
6059
+ Args: {
6060
+ p_session_id: string;
6061
+ };
6062
+ Returns: undefined;
6063
+ };
6064
+ handle_session_end: {
6065
+ Args: {
6066
+ p_session_id: string;
6067
+ };
6068
+ Returns: undefined;
6069
+ };
6070
+ invite_players_to_session: {
6071
+ Args: {
6072
+ p_capacity?: number;
6073
+ p_players?: Json;
6074
+ p_session_id: string;
6075
+ p_station_id?: string;
6076
+ };
6077
+ Returns: undefined;
6078
+ };
5414
6079
  is_active_session_member: {
5415
6080
  Args: {
5416
6081
  p_session_id: string;
5417
6082
  };
5418
6083
  Returns: boolean;
5419
6084
  };
6085
+ is_current_player_lounge_regular: {
6086
+ Args: {
6087
+ p_lounge_id: string;
6088
+ };
6089
+ Returns: boolean;
6090
+ };
6091
+ is_game_available_for_session: {
6092
+ Args: {
6093
+ p_exclude_session_id?: string;
6094
+ p_games_consoles_id: string;
6095
+ p_lounge_branch_id: string;
6096
+ };
6097
+ Returns: Json;
6098
+ };
6099
+ is_reservation_available_at_lounge_branch: {
6100
+ Args: {
6101
+ p_lounge_branch_id: string;
6102
+ };
6103
+ Returns: Json;
6104
+ };
6105
+ is_reservation_within_grace: {
6106
+ Args: {
6107
+ p_reservation_requested_at: string;
6108
+ };
6109
+ Returns: boolean;
6110
+ };
6111
+ is_session_member: {
6112
+ Args: {
6113
+ p_member_statuses?: Database["sessions"]["Enums"]["session_member_status"][];
6114
+ p_session_id: string;
6115
+ };
6116
+ Returns: boolean;
6117
+ };
5420
6118
  is_session_owner: {
5421
6119
  Args: {
5422
6120
  p_session_id: string;
5423
6121
  };
5424
6122
  Returns: boolean;
5425
6123
  };
6124
+ is_station_available_for_session: {
6125
+ Args: {
6126
+ p_exclude_session_id?: string;
6127
+ p_lounge_branch_id: string;
6128
+ p_station_id: string;
6129
+ };
6130
+ Returns: Json;
6131
+ };
6132
+ leave_active_session: {
6133
+ Args: {
6134
+ p_session_id: string;
6135
+ };
6136
+ Returns: undefined;
6137
+ };
6138
+ request_change_for_session: {
6139
+ Args: {
6140
+ p_games_consoles_id?: string;
6141
+ p_session_id: string;
6142
+ p_station_id?: string;
6143
+ };
6144
+ Returns: Json;
6145
+ };
6146
+ request_checkout: {
6147
+ Args: {
6148
+ p_session_id: string;
6149
+ };
6150
+ Returns: number;
6151
+ };
6152
+ resolve_session_change_requests: {
6153
+ Args: {
6154
+ p_game_reject_reason?: string;
6155
+ p_game_resolution?: string;
6156
+ p_game_row_id?: string;
6157
+ p_session_id: string;
6158
+ p_station_reject_reason?: string;
6159
+ p_station_resolution?: string;
6160
+ p_station_row_id?: string;
6161
+ };
6162
+ Returns: undefined;
6163
+ };
6164
+ terminate_luggage_and_eatery_for_session: {
6165
+ Args: {
6166
+ p_session_id: string;
6167
+ };
6168
+ Returns: undefined;
6169
+ };
5426
6170
  };
5427
6171
  Enums: {
5428
- lounge_branch_station_status: "available" | "occupied";
6172
+ session_bill_type: "time" | "unit";
5429
6173
  session_complaint_type: "session" | "lounge_branch";
5430
6174
  session_discount_type: "regular" | "incremental_time";
5431
- session_member_status: "pending" | "active" | "left";
5432
- session_pricing_type: "time" | "unit";
6175
+ session_eatery_order_status: "pending" | "acknowledged" | "fulfilled" | "paid" | "cancelled";
6176
+ session_luggage_slot_status: "pending" | "assigned" | "returned";
6177
+ session_member_status: "pending" | "active" | "left" | "cancelled";
5433
6178
  session_status: "pending" | "active" | "change_requested" | "checking_out" | "ended" | "cancelled";
5434
6179
  };
5435
6180
  CompositeTypes: {
@@ -6099,11 +6844,12 @@ export declare const Constants: {
6099
6844
  };
6100
6845
  readonly sessions: {
6101
6846
  readonly Enums: {
6102
- readonly lounge_branch_station_status: readonly ["available", "occupied"];
6847
+ readonly session_bill_type: readonly ["time", "unit"];
6103
6848
  readonly session_complaint_type: readonly ["session", "lounge_branch"];
6104
6849
  readonly session_discount_type: readonly ["regular", "incremental_time"];
6105
- readonly session_member_status: readonly ["pending", "active", "left"];
6106
- readonly session_pricing_type: readonly ["time", "unit"];
6850
+ readonly session_eatery_order_status: readonly ["pending", "acknowledged", "fulfilled", "paid", "cancelled"];
6851
+ readonly session_luggage_slot_status: readonly ["pending", "assigned", "returned"];
6852
+ readonly session_member_status: readonly ["pending", "active", "left", "cancelled"];
6107
6853
  readonly session_status: readonly ["pending", "active", "change_requested", "checking_out", "ended", "cancelled"];
6108
6854
  };
6109
6855
  };