@flowselections/floriday-authenticatie-module 1.0.22 → 1.0.24

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.
Files changed (47) hide show
  1. package/dist-lib/components/settings/FloricodeSettingsCard.js +1 -1
  2. package/dist-lib/integrations/supabase/auth-middleware.d.ts +385 -3
  3. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  4. package/dist-lib/integrations/supabase/client.d.ts +385 -3
  5. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  6. package/dist-lib/integrations/supabase/client.server.d.ts +385 -3
  7. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  8. package/dist-lib/integrations/supabase/client.server.js +1 -0
  9. package/dist-lib/integrations/supabase/types.d.ts +389 -3
  10. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  11. package/dist-lib/lib/central-auth.server.d.ts +34 -0
  12. package/dist-lib/lib/central-auth.server.d.ts.map +1 -0
  13. package/dist-lib/lib/central-auth.server.js +105 -0
  14. package/dist-lib/lib/floricode-credentials.server.d.ts.map +1 -1
  15. package/dist-lib/lib/floricode-credentials.server.js +94 -26
  16. package/dist-lib/lib/floricode.functions.d.ts +2758 -83
  17. package/dist-lib/lib/floricode.functions.d.ts.map +1 -1
  18. package/dist-lib/lib/floricode.functions.js +13 -0
  19. package/dist-lib/lib/floriday-auction-letters.functions.d.ts +385 -3
  20. package/dist-lib/lib/floriday-auction-letters.functions.d.ts.map +1 -1
  21. package/dist-lib/lib/floriday-labels.functions.d.ts +385 -3
  22. package/dist-lib/lib/floriday-labels.functions.d.ts.map +1 -1
  23. package/dist-lib/lib/floriday-public.functions.d.ts +2310 -18
  24. package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
  25. package/dist-lib/lib/floriday-stickers.functions.d.ts +385 -3
  26. package/dist-lib/lib/floriday-stickers.functions.d.ts.map +1 -1
  27. package/dist-lib/lib/floriday-sync.functions.d.ts +12493 -651
  28. package/dist-lib/lib/floriday-sync.functions.d.ts.map +1 -1
  29. package/dist-lib/lib/floriday-sync.functions.js +2 -1
  30. package/dist-lib/lib/floriday-writes.functions.d.ts +2310 -18
  31. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  32. package/dist-lib/lib/floriday.functions.d.ts +7322 -321
  33. package/dist-lib/lib/floriday.functions.d.ts.map +1 -1
  34. package/dist-lib/lib/floriday.functions.js +33 -35
  35. package/dist-lib/lib/gateway/cache-tables.d.ts +2 -0
  36. package/dist-lib/lib/gateway/cache-tables.d.ts.map +1 -0
  37. package/dist-lib/lib/gateway/cache-tables.js +27 -0
  38. package/dist-lib/lib/gateway/cached-list.d.ts +15 -0
  39. package/dist-lib/lib/gateway/cached-list.d.ts.map +1 -0
  40. package/dist-lib/lib/gateway/cached-list.js +35 -0
  41. package/dist-lib/lib/gateway/index.d.ts +4 -0
  42. package/dist-lib/lib/gateway/index.d.ts.map +1 -0
  43. package/dist-lib/lib/gateway/index.js +3 -0
  44. package/dist-lib/lib/gateway/shared.d.ts +2 -0
  45. package/dist-lib/lib/gateway/shared.d.ts.map +1 -0
  46. package/dist-lib/lib/gateway/shared.js +3 -0
  47. package/package.json +6 -2
@@ -1043,6 +1043,141 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
1043
1043
  };
1044
1044
  Relationships: [];
1045
1045
  };
1046
+ cart_planning_pick_times: {
1047
+ Row: {
1048
+ created_at: string;
1049
+ id: string;
1050
+ pot_size: string;
1051
+ seconds_per_cart: number;
1052
+ updated_at: string;
1053
+ };
1054
+ Insert: {
1055
+ created_at?: string;
1056
+ id?: string;
1057
+ pot_size: string;
1058
+ seconds_per_cart: number;
1059
+ updated_at?: string;
1060
+ };
1061
+ Update: {
1062
+ created_at?: string;
1063
+ id?: string;
1064
+ pot_size?: string;
1065
+ seconds_per_cart?: number;
1066
+ updated_at?: string;
1067
+ };
1068
+ Relationships: [];
1069
+ };
1070
+ cart_planning_product_overrides: {
1071
+ Row: {
1072
+ created_at: string;
1073
+ id: string;
1074
+ max_party_share_per_layer_pct_override: number | null;
1075
+ never_mix: boolean;
1076
+ notes: string | null;
1077
+ product_id: string;
1078
+ updated_at: string;
1079
+ };
1080
+ Insert: {
1081
+ created_at?: string;
1082
+ id?: string;
1083
+ max_party_share_per_layer_pct_override?: number | null;
1084
+ never_mix?: boolean;
1085
+ notes?: string | null;
1086
+ product_id: string;
1087
+ updated_at?: string;
1088
+ };
1089
+ Update: {
1090
+ created_at?: string;
1091
+ id?: string;
1092
+ max_party_share_per_layer_pct_override?: number | null;
1093
+ never_mix?: boolean;
1094
+ notes?: string | null;
1095
+ product_id?: string;
1096
+ updated_at?: string;
1097
+ };
1098
+ Relationships: [{
1099
+ foreignKeyName: "cart_planning_product_overrides_product_id_fkey";
1100
+ columns: ["product_id"];
1101
+ isOneToOne: true;
1102
+ referencedRelation: "products";
1103
+ referencedColumns: ["id"];
1104
+ }];
1105
+ };
1106
+ cart_planning_settings: {
1107
+ Row: {
1108
+ allow_editing_after_pickstation_send: boolean;
1109
+ buffer_grouping_mode: string;
1110
+ combine_floriday_orders: boolean;
1111
+ combine_floriday_orders_window: string;
1112
+ combine_orders_scope: string;
1113
+ default_workers: number;
1114
+ id: number;
1115
+ max_beladingen_per_layer: number;
1116
+ max_customers_per_cart: number;
1117
+ max_one_customer_per_layer: boolean;
1118
+ max_party_share_per_layer_pct: number;
1119
+ optimization_strategy: string;
1120
+ own_cart_from_layers: number;
1121
+ pick_time_mode: string;
1122
+ plants_per_day: number;
1123
+ plants_per_hour: number;
1124
+ require_same_carrier: boolean;
1125
+ require_same_crate_type: boolean;
1126
+ require_same_delivery_date: boolean;
1127
+ require_same_delivery_location: boolean;
1128
+ updated_at: string;
1129
+ updated_by: string | null;
1130
+ };
1131
+ Insert: {
1132
+ allow_editing_after_pickstation_send?: boolean;
1133
+ buffer_grouping_mode?: string;
1134
+ combine_floriday_orders?: boolean;
1135
+ combine_floriday_orders_window?: string;
1136
+ combine_orders_scope?: string;
1137
+ default_workers?: number;
1138
+ id?: number;
1139
+ max_beladingen_per_layer?: number;
1140
+ max_customers_per_cart?: number;
1141
+ max_one_customer_per_layer?: boolean;
1142
+ max_party_share_per_layer_pct?: number;
1143
+ optimization_strategy?: string;
1144
+ own_cart_from_layers?: number;
1145
+ pick_time_mode?: string;
1146
+ plants_per_day?: number;
1147
+ plants_per_hour?: number;
1148
+ require_same_carrier?: boolean;
1149
+ require_same_crate_type?: boolean;
1150
+ require_same_delivery_date?: boolean;
1151
+ require_same_delivery_location?: boolean;
1152
+ updated_at?: string;
1153
+ updated_by?: string | null;
1154
+ };
1155
+ Update: {
1156
+ allow_editing_after_pickstation_send?: boolean;
1157
+ buffer_grouping_mode?: string;
1158
+ combine_floriday_orders?: boolean;
1159
+ combine_floriday_orders_window?: string;
1160
+ combine_orders_scope?: string;
1161
+ default_workers?: number;
1162
+ id?: number;
1163
+ max_beladingen_per_layer?: number;
1164
+ max_customers_per_cart?: number;
1165
+ max_one_customer_per_layer?: boolean;
1166
+ max_party_share_per_layer_pct?: number;
1167
+ optimization_strategy?: string;
1168
+ own_cart_from_layers?: number;
1169
+ pick_time_mode?: string;
1170
+ plants_per_day?: number;
1171
+ plants_per_hour?: number;
1172
+ require_same_carrier?: boolean;
1173
+ require_same_crate_type?: boolean;
1174
+ require_same_delivery_date?: boolean;
1175
+ require_same_delivery_location?: boolean;
1176
+ updated_at?: string;
1177
+ updated_by?: string | null;
1178
+ };
1179
+ Relationships: [];
1180
+ };
1046
1181
  cart_replan_queue: {
1047
1182
  Row: {
1048
1183
  attempts: number;
@@ -1073,6 +1208,39 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
1073
1208
  referencedColumns: ["id"];
1074
1209
  }];
1075
1210
  };
1211
+ cart_types: {
1212
+ Row: {
1213
+ created_at: string;
1214
+ id: string;
1215
+ is_default: boolean;
1216
+ layer_length_cm: number;
1217
+ layer_width_cm: number;
1218
+ layers_per_cart: number;
1219
+ name: string;
1220
+ updated_at: string;
1221
+ };
1222
+ Insert: {
1223
+ created_at?: string;
1224
+ id?: string;
1225
+ is_default?: boolean;
1226
+ layer_length_cm: number;
1227
+ layer_width_cm: number;
1228
+ layers_per_cart?: number;
1229
+ name: string;
1230
+ updated_at?: string;
1231
+ };
1232
+ Update: {
1233
+ created_at?: string;
1234
+ id?: string;
1235
+ is_default?: boolean;
1236
+ layer_length_cm?: number;
1237
+ layer_width_cm?: number;
1238
+ layers_per_cart?: number;
1239
+ name?: string;
1240
+ updated_at?: string;
1241
+ };
1242
+ Relationships: [];
1243
+ };
1076
1244
  collections: {
1077
1245
  Row: {
1078
1246
  created_at: string;
@@ -1097,6 +1265,36 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
1097
1265
  };
1098
1266
  Relationships: [];
1099
1267
  };
1268
+ crate_types: {
1269
+ Row: {
1270
+ created_at: string;
1271
+ id: string;
1272
+ length_cm: number;
1273
+ name: string;
1274
+ plants_per_crate: number;
1275
+ updated_at: string;
1276
+ width_cm: number;
1277
+ };
1278
+ Insert: {
1279
+ created_at?: string;
1280
+ id?: string;
1281
+ length_cm: number;
1282
+ name: string;
1283
+ plants_per_crate?: number;
1284
+ updated_at?: string;
1285
+ width_cm: number;
1286
+ };
1287
+ Update: {
1288
+ created_at?: string;
1289
+ id?: string;
1290
+ length_cm?: number;
1291
+ name?: string;
1292
+ plants_per_crate?: number;
1293
+ updated_at?: string;
1294
+ width_cm?: number;
1295
+ };
1296
+ Relationships: [];
1297
+ };
1100
1298
  customer_audit_log: {
1101
1299
  Row: {
1102
1300
  action: string;
@@ -5012,6 +5210,27 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
5012
5210
  referencedColumns: ["id"];
5013
5211
  }];
5014
5212
  };
5213
+ floriday_vbn_required_characteristics: {
5214
+ Row: {
5215
+ required_codes: string[];
5216
+ updated_at: string;
5217
+ updated_by: string | null;
5218
+ vbn_code: string;
5219
+ };
5220
+ Insert: {
5221
+ required_codes?: string[];
5222
+ updated_at?: string;
5223
+ updated_by?: string | null;
5224
+ vbn_code: string;
5225
+ };
5226
+ Update: {
5227
+ required_codes?: string[];
5228
+ updated_at?: string;
5229
+ updated_by?: string | null;
5230
+ vbn_code?: string;
5231
+ };
5232
+ Relationships: [];
5233
+ };
5015
5234
  floriday_warehouses_cache: {
5016
5235
  Row: {
5017
5236
  connection_id: string;
@@ -5714,6 +5933,69 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
5714
5933
  };
5715
5934
  Relationships: [];
5716
5935
  };
5936
+ logistics_capacity_events: {
5937
+ Row: {
5938
+ available_carts: number;
5939
+ created_at: string;
5940
+ id: string;
5941
+ measures: import("../integrations/supabase/types").Json;
5942
+ note: string | null;
5943
+ outcome: string;
5944
+ required_carts: number;
5945
+ reserve_minutes: number;
5946
+ shortage_carts: number;
5947
+ status: string;
5948
+ user_id: string;
5949
+ };
5950
+ Insert: {
5951
+ available_carts?: number;
5952
+ created_at?: string;
5953
+ id?: string;
5954
+ measures?: import("../integrations/supabase/types").Json;
5955
+ note?: string | null;
5956
+ outcome?: string;
5957
+ required_carts?: number;
5958
+ reserve_minutes?: number;
5959
+ shortage_carts?: number;
5960
+ status: string;
5961
+ user_id: string;
5962
+ };
5963
+ Update: {
5964
+ available_carts?: number;
5965
+ created_at?: string;
5966
+ id?: string;
5967
+ measures?: import("../integrations/supabase/types").Json;
5968
+ note?: string | null;
5969
+ outcome?: string;
5970
+ required_carts?: number;
5971
+ reserve_minutes?: number;
5972
+ shortage_carts?: number;
5973
+ status?: string;
5974
+ user_id?: string;
5975
+ };
5976
+ Relationships: [];
5977
+ };
5978
+ logistics_capacity_settings: {
5979
+ Row: {
5980
+ created_at: string;
5981
+ settings: import("../integrations/supabase/types").Json;
5982
+ updated_at: string;
5983
+ user_id: string;
5984
+ };
5985
+ Insert: {
5986
+ created_at?: string;
5987
+ settings?: import("../integrations/supabase/types").Json;
5988
+ updated_at?: string;
5989
+ user_id: string;
5990
+ };
5991
+ Update: {
5992
+ created_at?: string;
5993
+ settings?: import("../integrations/supabase/types").Json;
5994
+ updated_at?: string;
5995
+ user_id?: string;
5996
+ };
5997
+ Relationships: [];
5998
+ };
5717
5999
  logistics_decisions: {
5718
6000
  Row: {
5719
6001
  created_at: string;
@@ -7109,6 +7391,42 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7109
7391
  };
7110
7392
  Relationships: [];
7111
7393
  };
7394
+ order_buffers: {
7395
+ Row: {
7396
+ buffer_key: string;
7397
+ created_at: string;
7398
+ customer_id: string | null;
7399
+ grouping_mode: string;
7400
+ id: string;
7401
+ pickup_date: string | null;
7402
+ pickup_location: string | null;
7403
+ plan_locked_at: string | null;
7404
+ updated_at: string;
7405
+ };
7406
+ Insert: {
7407
+ buffer_key: string;
7408
+ created_at?: string;
7409
+ customer_id?: string | null;
7410
+ grouping_mode: string;
7411
+ id?: string;
7412
+ pickup_date?: string | null;
7413
+ pickup_location?: string | null;
7414
+ plan_locked_at?: string | null;
7415
+ updated_at?: string;
7416
+ };
7417
+ Update: {
7418
+ buffer_key?: string;
7419
+ created_at?: string;
7420
+ customer_id?: string | null;
7421
+ grouping_mode?: string;
7422
+ id?: string;
7423
+ pickup_date?: string | null;
7424
+ pickup_location?: string | null;
7425
+ plan_locked_at?: string | null;
7426
+ updated_at?: string;
7427
+ };
7428
+ Relationships: [];
7429
+ };
7112
7430
  order_cart_items: {
7113
7431
  Row: {
7114
7432
  cart_id: string;
@@ -7175,6 +7493,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7175
7493
  order_carts: {
7176
7494
  Row: {
7177
7495
  algorithm_version: number;
7496
+ buffer_id: string | null;
7178
7497
  cart_number: number;
7179
7498
  created_at: string;
7180
7499
  id: string;
@@ -7182,13 +7501,14 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7182
7501
  is_complete: boolean;
7183
7502
  notes: string | null;
7184
7503
  occupancy_pct: number;
7185
- order_id: string;
7504
+ order_id: string | null;
7186
7505
  source: string;
7187
7506
  total_layers_used: number;
7188
7507
  updated_at: string;
7189
7508
  };
7190
7509
  Insert: {
7191
7510
  algorithm_version?: number;
7511
+ buffer_id?: string | null;
7192
7512
  cart_number: number;
7193
7513
  created_at?: string;
7194
7514
  id?: string;
@@ -7196,13 +7516,14 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7196
7516
  is_complete?: boolean;
7197
7517
  notes?: string | null;
7198
7518
  occupancy_pct?: number;
7199
- order_id: string;
7519
+ order_id?: string | null;
7200
7520
  source?: string;
7201
7521
  total_layers_used?: number;
7202
7522
  updated_at?: string;
7203
7523
  };
7204
7524
  Update: {
7205
7525
  algorithm_version?: number;
7526
+ buffer_id?: string | null;
7206
7527
  cart_number?: number;
7207
7528
  created_at?: string;
7208
7529
  id?: string;
@@ -7210,12 +7531,18 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7210
7531
  is_complete?: boolean;
7211
7532
  notes?: string | null;
7212
7533
  occupancy_pct?: number;
7213
- order_id?: string;
7534
+ order_id?: string | null;
7214
7535
  source?: string;
7215
7536
  total_layers_used?: number;
7216
7537
  updated_at?: string;
7217
7538
  };
7218
7539
  Relationships: [{
7540
+ foreignKeyName: "order_carts_buffer_id_fkey";
7541
+ columns: ["buffer_id"];
7542
+ isOneToOne: false;
7543
+ referencedRelation: "order_buffers";
7544
+ referencedColumns: ["id"];
7545
+ }, {
7219
7546
  foreignKeyName: "order_carts_order_id_fkey";
7220
7547
  columns: ["order_id"];
7221
7548
  isOneToOne: false;
@@ -7453,12 +7780,14 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7453
7780
  };
7454
7781
  orders: {
7455
7782
  Row: {
7783
+ buffer_id: string | null;
7456
7784
  created_at: string;
7457
7785
  custom_fields: import("../integrations/supabase/types").Json;
7458
7786
  customer_id: string | null;
7459
7787
  customer_name: string;
7460
7788
  deleted_at: string | null;
7461
7789
  delivery_date: string | null;
7790
+ floriday_sales_order_id: string | null;
7462
7791
  id: string;
7463
7792
  is_reservation: boolean;
7464
7793
  notes: string | null;
@@ -7472,12 +7801,14 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7472
7801
  updated_at: string;
7473
7802
  };
7474
7803
  Insert: {
7804
+ buffer_id?: string | null;
7475
7805
  created_at?: string;
7476
7806
  custom_fields?: import("../integrations/supabase/types").Json;
7477
7807
  customer_id?: string | null;
7478
7808
  customer_name?: string;
7479
7809
  deleted_at?: string | null;
7480
7810
  delivery_date?: string | null;
7811
+ floriday_sales_order_id?: string | null;
7481
7812
  id?: string;
7482
7813
  is_reservation?: boolean;
7483
7814
  notes?: string | null;
@@ -7491,12 +7822,14 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7491
7822
  updated_at?: string;
7492
7823
  };
7493
7824
  Update: {
7825
+ buffer_id?: string | null;
7494
7826
  created_at?: string;
7495
7827
  custom_fields?: import("../integrations/supabase/types").Json;
7496
7828
  customer_id?: string | null;
7497
7829
  customer_name?: string;
7498
7830
  deleted_at?: string | null;
7499
7831
  delivery_date?: string | null;
7832
+ floriday_sales_order_id?: string | null;
7500
7833
  id?: string;
7501
7834
  is_reservation?: boolean;
7502
7835
  notes?: string | null;
@@ -7510,6 +7843,12 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7510
7843
  updated_at?: string;
7511
7844
  };
7512
7845
  Relationships: [{
7846
+ foreignKeyName: "orders_buffer_id_fkey";
7847
+ columns: ["buffer_id"];
7848
+ isOneToOne: false;
7849
+ referencedRelation: "order_buffers";
7850
+ referencedColumns: ["id"];
7851
+ }, {
7513
7852
  foreignKeyName: "orders_customer_id_fkey";
7514
7853
  columns: ["customer_id"];
7515
7854
  isOneToOne: false;
@@ -7647,6 +7986,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7647
7986
  created_at: string;
7648
7987
  id: string;
7649
7988
  notes: string | null;
7989
+ packing_configuration_id: string | null;
7650
7990
  parent_product_id: string | null;
7651
7991
  parent_trade_item_floriday_id: string | null;
7652
7992
  quantity: number;
@@ -7661,6 +8001,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7661
8001
  created_at?: string;
7662
8002
  id?: string;
7663
8003
  notes?: string | null;
8004
+ packing_configuration_id?: string | null;
7664
8005
  parent_product_id?: string | null;
7665
8006
  parent_trade_item_floriday_id?: string | null;
7666
8007
  quantity?: number;
@@ -7675,6 +8016,7 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7675
8016
  created_at?: string;
7676
8017
  id?: string;
7677
8018
  notes?: string | null;
8019
+ packing_configuration_id?: string | null;
7678
8020
  parent_product_id?: string | null;
7679
8021
  parent_trade_item_floriday_id?: string | null;
7680
8022
  quantity?: number;
@@ -7876,11 +8218,13 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7876
8218
  created_at: string;
7877
8219
  id: string;
7878
8220
  is_package: boolean;
8221
+ label: string | null;
7879
8222
  layers_per_load_carrier: number | null;
7880
8223
  load_carrier: string | null;
7881
8224
  package_id: string | null;
7882
8225
  package_label: string | null;
7883
8226
  packages_per_layer: number | null;
8227
+ packing_configuration_id: string;
7884
8228
  product_id: string | null;
7885
8229
  tenant_id: string;
7886
8230
  trade_item_floriday_id: string | null;
@@ -7891,11 +8235,13 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7891
8235
  created_at?: string;
7892
8236
  id?: string;
7893
8237
  is_package?: boolean;
8238
+ label?: string | null;
7894
8239
  layers_per_load_carrier?: number | null;
7895
8240
  load_carrier?: string | null;
7896
8241
  package_id?: string | null;
7897
8242
  package_label?: string | null;
7898
8243
  packages_per_layer?: number | null;
8244
+ packing_configuration_id?: string;
7899
8245
  product_id?: string | null;
7900
8246
  tenant_id: string;
7901
8247
  trade_item_floriday_id?: string | null;
@@ -7906,11 +8252,13 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7906
8252
  created_at?: string;
7907
8253
  id?: string;
7908
8254
  is_package?: boolean;
8255
+ label?: string | null;
7909
8256
  layers_per_load_carrier?: number | null;
7910
8257
  load_carrier?: string | null;
7911
8258
  package_id?: string | null;
7912
8259
  package_label?: string | null;
7913
8260
  packages_per_layer?: number | null;
8261
+ packing_configuration_id?: string;
7914
8262
  product_id?: string | null;
7915
8263
  tenant_id?: string;
7916
8264
  trade_item_floriday_id?: string | null;
@@ -7991,6 +8339,8 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
7991
8339
  trade_item_key: string | null;
7992
8340
  unit: string;
7993
8341
  updated_at: string;
8342
+ vat_code: string | null;
8343
+ vat_rate: number | null;
7994
8344
  weight: string | null;
7995
8345
  };
7996
8346
  Insert: {
@@ -8019,6 +8369,8 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
8019
8369
  trade_item_key?: string | null;
8020
8370
  unit?: string;
8021
8371
  updated_at?: string;
8372
+ vat_code?: string | null;
8373
+ vat_rate?: number | null;
8022
8374
  weight?: string | null;
8023
8375
  };
8024
8376
  Update: {
@@ -8047,6 +8399,8 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
8047
8399
  trade_item_key?: string | null;
8048
8400
  unit?: string;
8049
8401
  updated_at?: string;
8402
+ vat_code?: string | null;
8403
+ vat_rate?: number | null;
8050
8404
  weight?: string | null;
8051
8405
  };
8052
8406
  Relationships: [];
@@ -11122,6 +11476,12 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
11122
11476
  processed_items: number;
11123
11477
  }[];
11124
11478
  };
11479
+ calculate_layer_stock: {
11480
+ Args: {
11481
+ p_product_id: string;
11482
+ };
11483
+ Returns: number;
11484
+ };
11125
11485
  call_exact_route: {
11126
11486
  Args: {
11127
11487
  path: string;
@@ -11491,6 +11851,12 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
11491
11851
  };
11492
11852
  Returns: string;
11493
11853
  };
11854
+ get_inventory_stock_for_key: {
11855
+ Args: {
11856
+ p_key: string;
11857
+ };
11858
+ Returns: number;
11859
+ };
11494
11860
  get_offer_by_link_code: {
11495
11861
  Args: {
11496
11862
  p_code: string;
@@ -11521,6 +11887,12 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
11521
11887
  };
11522
11888
  Returns: string;
11523
11889
  };
11890
+ get_product_group_available_stock: {
11891
+ Args: {
11892
+ p_group_id: string;
11893
+ };
11894
+ Returns: number;
11895
+ };
11524
11896
  get_room_busy_windows: {
11525
11897
  Args: {
11526
11898
  p_from: string;
@@ -12087,12 +12459,22 @@ export declare const acknowledgeSalesOrder: import("@tanstack/start-client-core"
12087
12459
  };
12088
12460
  Returns: string[];
12089
12461
  };
12462
+ sync_all_layer_stocks: {
12463
+ Args: never;
12464
+ Returns: undefined;
12465
+ };
12090
12466
  sync_cached_packing_from_product: {
12091
12467
  Args: {
12092
12468
  p_product_id: string;
12093
12469
  };
12094
12470
  Returns: undefined;
12095
12471
  };
12472
+ sync_layer_stock: {
12473
+ Args: {
12474
+ p_product_id: string;
12475
+ };
12476
+ Returns: undefined;
12477
+ };
12096
12478
  sync_order_cart_item_packing_from_product: {
12097
12479
  Args: {
12098
12480
  p_product_id: string;
@@ -13193,6 +13575,141 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
13193
13575
  };
13194
13576
  Relationships: [];
13195
13577
  };
13578
+ cart_planning_pick_times: {
13579
+ Row: {
13580
+ created_at: string;
13581
+ id: string;
13582
+ pot_size: string;
13583
+ seconds_per_cart: number;
13584
+ updated_at: string;
13585
+ };
13586
+ Insert: {
13587
+ created_at?: string;
13588
+ id?: string;
13589
+ pot_size: string;
13590
+ seconds_per_cart: number;
13591
+ updated_at?: string;
13592
+ };
13593
+ Update: {
13594
+ created_at?: string;
13595
+ id?: string;
13596
+ pot_size?: string;
13597
+ seconds_per_cart?: number;
13598
+ updated_at?: string;
13599
+ };
13600
+ Relationships: [];
13601
+ };
13602
+ cart_planning_product_overrides: {
13603
+ Row: {
13604
+ created_at: string;
13605
+ id: string;
13606
+ max_party_share_per_layer_pct_override: number | null;
13607
+ never_mix: boolean;
13608
+ notes: string | null;
13609
+ product_id: string;
13610
+ updated_at: string;
13611
+ };
13612
+ Insert: {
13613
+ created_at?: string;
13614
+ id?: string;
13615
+ max_party_share_per_layer_pct_override?: number | null;
13616
+ never_mix?: boolean;
13617
+ notes?: string | null;
13618
+ product_id: string;
13619
+ updated_at?: string;
13620
+ };
13621
+ Update: {
13622
+ created_at?: string;
13623
+ id?: string;
13624
+ max_party_share_per_layer_pct_override?: number | null;
13625
+ never_mix?: boolean;
13626
+ notes?: string | null;
13627
+ product_id?: string;
13628
+ updated_at?: string;
13629
+ };
13630
+ Relationships: [{
13631
+ foreignKeyName: "cart_planning_product_overrides_product_id_fkey";
13632
+ columns: ["product_id"];
13633
+ isOneToOne: true;
13634
+ referencedRelation: "products";
13635
+ referencedColumns: ["id"];
13636
+ }];
13637
+ };
13638
+ cart_planning_settings: {
13639
+ Row: {
13640
+ allow_editing_after_pickstation_send: boolean;
13641
+ buffer_grouping_mode: string;
13642
+ combine_floriday_orders: boolean;
13643
+ combine_floriday_orders_window: string;
13644
+ combine_orders_scope: string;
13645
+ default_workers: number;
13646
+ id: number;
13647
+ max_beladingen_per_layer: number;
13648
+ max_customers_per_cart: number;
13649
+ max_one_customer_per_layer: boolean;
13650
+ max_party_share_per_layer_pct: number;
13651
+ optimization_strategy: string;
13652
+ own_cart_from_layers: number;
13653
+ pick_time_mode: string;
13654
+ plants_per_day: number;
13655
+ plants_per_hour: number;
13656
+ require_same_carrier: boolean;
13657
+ require_same_crate_type: boolean;
13658
+ require_same_delivery_date: boolean;
13659
+ require_same_delivery_location: boolean;
13660
+ updated_at: string;
13661
+ updated_by: string | null;
13662
+ };
13663
+ Insert: {
13664
+ allow_editing_after_pickstation_send?: boolean;
13665
+ buffer_grouping_mode?: string;
13666
+ combine_floriday_orders?: boolean;
13667
+ combine_floriday_orders_window?: string;
13668
+ combine_orders_scope?: string;
13669
+ default_workers?: number;
13670
+ id?: number;
13671
+ max_beladingen_per_layer?: number;
13672
+ max_customers_per_cart?: number;
13673
+ max_one_customer_per_layer?: boolean;
13674
+ max_party_share_per_layer_pct?: number;
13675
+ optimization_strategy?: string;
13676
+ own_cart_from_layers?: number;
13677
+ pick_time_mode?: string;
13678
+ plants_per_day?: number;
13679
+ plants_per_hour?: number;
13680
+ require_same_carrier?: boolean;
13681
+ require_same_crate_type?: boolean;
13682
+ require_same_delivery_date?: boolean;
13683
+ require_same_delivery_location?: boolean;
13684
+ updated_at?: string;
13685
+ updated_by?: string | null;
13686
+ };
13687
+ Update: {
13688
+ allow_editing_after_pickstation_send?: boolean;
13689
+ buffer_grouping_mode?: string;
13690
+ combine_floriday_orders?: boolean;
13691
+ combine_floriday_orders_window?: string;
13692
+ combine_orders_scope?: string;
13693
+ default_workers?: number;
13694
+ id?: number;
13695
+ max_beladingen_per_layer?: number;
13696
+ max_customers_per_cart?: number;
13697
+ max_one_customer_per_layer?: boolean;
13698
+ max_party_share_per_layer_pct?: number;
13699
+ optimization_strategy?: string;
13700
+ own_cart_from_layers?: number;
13701
+ pick_time_mode?: string;
13702
+ plants_per_day?: number;
13703
+ plants_per_hour?: number;
13704
+ require_same_carrier?: boolean;
13705
+ require_same_crate_type?: boolean;
13706
+ require_same_delivery_date?: boolean;
13707
+ require_same_delivery_location?: boolean;
13708
+ updated_at?: string;
13709
+ updated_by?: string | null;
13710
+ };
13711
+ Relationships: [];
13712
+ };
13196
13713
  cart_replan_queue: {
13197
13714
  Row: {
13198
13715
  attempts: number;
@@ -13223,6 +13740,39 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
13223
13740
  referencedColumns: ["id"];
13224
13741
  }];
13225
13742
  };
13743
+ cart_types: {
13744
+ Row: {
13745
+ created_at: string;
13746
+ id: string;
13747
+ is_default: boolean;
13748
+ layer_length_cm: number;
13749
+ layer_width_cm: number;
13750
+ layers_per_cart: number;
13751
+ name: string;
13752
+ updated_at: string;
13753
+ };
13754
+ Insert: {
13755
+ created_at?: string;
13756
+ id?: string;
13757
+ is_default?: boolean;
13758
+ layer_length_cm: number;
13759
+ layer_width_cm: number;
13760
+ layers_per_cart?: number;
13761
+ name: string;
13762
+ updated_at?: string;
13763
+ };
13764
+ Update: {
13765
+ created_at?: string;
13766
+ id?: string;
13767
+ is_default?: boolean;
13768
+ layer_length_cm?: number;
13769
+ layer_width_cm?: number;
13770
+ layers_per_cart?: number;
13771
+ name?: string;
13772
+ updated_at?: string;
13773
+ };
13774
+ Relationships: [];
13775
+ };
13226
13776
  collections: {
13227
13777
  Row: {
13228
13778
  created_at: string;
@@ -13247,6 +13797,36 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
13247
13797
  };
13248
13798
  Relationships: [];
13249
13799
  };
13800
+ crate_types: {
13801
+ Row: {
13802
+ created_at: string;
13803
+ id: string;
13804
+ length_cm: number;
13805
+ name: string;
13806
+ plants_per_crate: number;
13807
+ updated_at: string;
13808
+ width_cm: number;
13809
+ };
13810
+ Insert: {
13811
+ created_at?: string;
13812
+ id?: string;
13813
+ length_cm: number;
13814
+ name: string;
13815
+ plants_per_crate?: number;
13816
+ updated_at?: string;
13817
+ width_cm: number;
13818
+ };
13819
+ Update: {
13820
+ created_at?: string;
13821
+ id?: string;
13822
+ length_cm?: number;
13823
+ name?: string;
13824
+ plants_per_crate?: number;
13825
+ updated_at?: string;
13826
+ width_cm?: number;
13827
+ };
13828
+ Relationships: [];
13829
+ };
13250
13830
  customer_audit_log: {
13251
13831
  Row: {
13252
13832
  action: string;
@@ -17162,6 +17742,27 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
17162
17742
  referencedColumns: ["id"];
17163
17743
  }];
17164
17744
  };
17745
+ floriday_vbn_required_characteristics: {
17746
+ Row: {
17747
+ required_codes: string[];
17748
+ updated_at: string;
17749
+ updated_by: string | null;
17750
+ vbn_code: string;
17751
+ };
17752
+ Insert: {
17753
+ required_codes?: string[];
17754
+ updated_at?: string;
17755
+ updated_by?: string | null;
17756
+ vbn_code: string;
17757
+ };
17758
+ Update: {
17759
+ required_codes?: string[];
17760
+ updated_at?: string;
17761
+ updated_by?: string | null;
17762
+ vbn_code?: string;
17763
+ };
17764
+ Relationships: [];
17765
+ };
17165
17766
  floriday_warehouses_cache: {
17166
17767
  Row: {
17167
17768
  connection_id: string;
@@ -17864,6 +18465,69 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
17864
18465
  };
17865
18466
  Relationships: [];
17866
18467
  };
18468
+ logistics_capacity_events: {
18469
+ Row: {
18470
+ available_carts: number;
18471
+ created_at: string;
18472
+ id: string;
18473
+ measures: import("../integrations/supabase/types").Json;
18474
+ note: string | null;
18475
+ outcome: string;
18476
+ required_carts: number;
18477
+ reserve_minutes: number;
18478
+ shortage_carts: number;
18479
+ status: string;
18480
+ user_id: string;
18481
+ };
18482
+ Insert: {
18483
+ available_carts?: number;
18484
+ created_at?: string;
18485
+ id?: string;
18486
+ measures?: import("../integrations/supabase/types").Json;
18487
+ note?: string | null;
18488
+ outcome?: string;
18489
+ required_carts?: number;
18490
+ reserve_minutes?: number;
18491
+ shortage_carts?: number;
18492
+ status: string;
18493
+ user_id: string;
18494
+ };
18495
+ Update: {
18496
+ available_carts?: number;
18497
+ created_at?: string;
18498
+ id?: string;
18499
+ measures?: import("../integrations/supabase/types").Json;
18500
+ note?: string | null;
18501
+ outcome?: string;
18502
+ required_carts?: number;
18503
+ reserve_minutes?: number;
18504
+ shortage_carts?: number;
18505
+ status?: string;
18506
+ user_id?: string;
18507
+ };
18508
+ Relationships: [];
18509
+ };
18510
+ logistics_capacity_settings: {
18511
+ Row: {
18512
+ created_at: string;
18513
+ settings: import("../integrations/supabase/types").Json;
18514
+ updated_at: string;
18515
+ user_id: string;
18516
+ };
18517
+ Insert: {
18518
+ created_at?: string;
18519
+ settings?: import("../integrations/supabase/types").Json;
18520
+ updated_at?: string;
18521
+ user_id: string;
18522
+ };
18523
+ Update: {
18524
+ created_at?: string;
18525
+ settings?: import("../integrations/supabase/types").Json;
18526
+ updated_at?: string;
18527
+ user_id?: string;
18528
+ };
18529
+ Relationships: [];
18530
+ };
17867
18531
  logistics_decisions: {
17868
18532
  Row: {
17869
18533
  created_at: string;
@@ -19259,6 +19923,42 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
19259
19923
  };
19260
19924
  Relationships: [];
19261
19925
  };
19926
+ order_buffers: {
19927
+ Row: {
19928
+ buffer_key: string;
19929
+ created_at: string;
19930
+ customer_id: string | null;
19931
+ grouping_mode: string;
19932
+ id: string;
19933
+ pickup_date: string | null;
19934
+ pickup_location: string | null;
19935
+ plan_locked_at: string | null;
19936
+ updated_at: string;
19937
+ };
19938
+ Insert: {
19939
+ buffer_key: string;
19940
+ created_at?: string;
19941
+ customer_id?: string | null;
19942
+ grouping_mode: string;
19943
+ id?: string;
19944
+ pickup_date?: string | null;
19945
+ pickup_location?: string | null;
19946
+ plan_locked_at?: string | null;
19947
+ updated_at?: string;
19948
+ };
19949
+ Update: {
19950
+ buffer_key?: string;
19951
+ created_at?: string;
19952
+ customer_id?: string | null;
19953
+ grouping_mode?: string;
19954
+ id?: string;
19955
+ pickup_date?: string | null;
19956
+ pickup_location?: string | null;
19957
+ plan_locked_at?: string | null;
19958
+ updated_at?: string;
19959
+ };
19960
+ Relationships: [];
19961
+ };
19262
19962
  order_cart_items: {
19263
19963
  Row: {
19264
19964
  cart_id: string;
@@ -19325,6 +20025,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
19325
20025
  order_carts: {
19326
20026
  Row: {
19327
20027
  algorithm_version: number;
20028
+ buffer_id: string | null;
19328
20029
  cart_number: number;
19329
20030
  created_at: string;
19330
20031
  id: string;
@@ -19332,13 +20033,14 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
19332
20033
  is_complete: boolean;
19333
20034
  notes: string | null;
19334
20035
  occupancy_pct: number;
19335
- order_id: string;
20036
+ order_id: string | null;
19336
20037
  source: string;
19337
20038
  total_layers_used: number;
19338
20039
  updated_at: string;
19339
20040
  };
19340
20041
  Insert: {
19341
20042
  algorithm_version?: number;
20043
+ buffer_id?: string | null;
19342
20044
  cart_number: number;
19343
20045
  created_at?: string;
19344
20046
  id?: string;
@@ -19346,13 +20048,14 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
19346
20048
  is_complete?: boolean;
19347
20049
  notes?: string | null;
19348
20050
  occupancy_pct?: number;
19349
- order_id: string;
20051
+ order_id?: string | null;
19350
20052
  source?: string;
19351
20053
  total_layers_used?: number;
19352
20054
  updated_at?: string;
19353
20055
  };
19354
20056
  Update: {
19355
20057
  algorithm_version?: number;
20058
+ buffer_id?: string | null;
19356
20059
  cart_number?: number;
19357
20060
  created_at?: string;
19358
20061
  id?: string;
@@ -19360,12 +20063,18 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
19360
20063
  is_complete?: boolean;
19361
20064
  notes?: string | null;
19362
20065
  occupancy_pct?: number;
19363
- order_id?: string;
20066
+ order_id?: string | null;
19364
20067
  source?: string;
19365
20068
  total_layers_used?: number;
19366
20069
  updated_at?: string;
19367
20070
  };
19368
20071
  Relationships: [{
20072
+ foreignKeyName: "order_carts_buffer_id_fkey";
20073
+ columns: ["buffer_id"];
20074
+ isOneToOne: false;
20075
+ referencedRelation: "order_buffers";
20076
+ referencedColumns: ["id"];
20077
+ }, {
19369
20078
  foreignKeyName: "order_carts_order_id_fkey";
19370
20079
  columns: ["order_id"];
19371
20080
  isOneToOne: false;
@@ -19603,12 +20312,14 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
19603
20312
  };
19604
20313
  orders: {
19605
20314
  Row: {
20315
+ buffer_id: string | null;
19606
20316
  created_at: string;
19607
20317
  custom_fields: import("../integrations/supabase/types").Json;
19608
20318
  customer_id: string | null;
19609
20319
  customer_name: string;
19610
20320
  deleted_at: string | null;
19611
20321
  delivery_date: string | null;
20322
+ floriday_sales_order_id: string | null;
19612
20323
  id: string;
19613
20324
  is_reservation: boolean;
19614
20325
  notes: string | null;
@@ -19622,12 +20333,14 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
19622
20333
  updated_at: string;
19623
20334
  };
19624
20335
  Insert: {
20336
+ buffer_id?: string | null;
19625
20337
  created_at?: string;
19626
20338
  custom_fields?: import("../integrations/supabase/types").Json;
19627
20339
  customer_id?: string | null;
19628
20340
  customer_name?: string;
19629
20341
  deleted_at?: string | null;
19630
20342
  delivery_date?: string | null;
20343
+ floriday_sales_order_id?: string | null;
19631
20344
  id?: string;
19632
20345
  is_reservation?: boolean;
19633
20346
  notes?: string | null;
@@ -19641,12 +20354,14 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
19641
20354
  updated_at?: string;
19642
20355
  };
19643
20356
  Update: {
20357
+ buffer_id?: string | null;
19644
20358
  created_at?: string;
19645
20359
  custom_fields?: import("../integrations/supabase/types").Json;
19646
20360
  customer_id?: string | null;
19647
20361
  customer_name?: string;
19648
20362
  deleted_at?: string | null;
19649
20363
  delivery_date?: string | null;
20364
+ floriday_sales_order_id?: string | null;
19650
20365
  id?: string;
19651
20366
  is_reservation?: boolean;
19652
20367
  notes?: string | null;
@@ -19660,6 +20375,12 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
19660
20375
  updated_at?: string;
19661
20376
  };
19662
20377
  Relationships: [{
20378
+ foreignKeyName: "orders_buffer_id_fkey";
20379
+ columns: ["buffer_id"];
20380
+ isOneToOne: false;
20381
+ referencedRelation: "order_buffers";
20382
+ referencedColumns: ["id"];
20383
+ }, {
19663
20384
  foreignKeyName: "orders_customer_id_fkey";
19664
20385
  columns: ["customer_id"];
19665
20386
  isOneToOne: false;
@@ -19797,6 +20518,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
19797
20518
  created_at: string;
19798
20519
  id: string;
19799
20520
  notes: string | null;
20521
+ packing_configuration_id: string | null;
19800
20522
  parent_product_id: string | null;
19801
20523
  parent_trade_item_floriday_id: string | null;
19802
20524
  quantity: number;
@@ -19811,6 +20533,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
19811
20533
  created_at?: string;
19812
20534
  id?: string;
19813
20535
  notes?: string | null;
20536
+ packing_configuration_id?: string | null;
19814
20537
  parent_product_id?: string | null;
19815
20538
  parent_trade_item_floriday_id?: string | null;
19816
20539
  quantity?: number;
@@ -19825,6 +20548,7 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
19825
20548
  created_at?: string;
19826
20549
  id?: string;
19827
20550
  notes?: string | null;
20551
+ packing_configuration_id?: string | null;
19828
20552
  parent_product_id?: string | null;
19829
20553
  parent_trade_item_floriday_id?: string | null;
19830
20554
  quantity?: number;
@@ -20026,11 +20750,13 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
20026
20750
  created_at: string;
20027
20751
  id: string;
20028
20752
  is_package: boolean;
20753
+ label: string | null;
20029
20754
  layers_per_load_carrier: number | null;
20030
20755
  load_carrier: string | null;
20031
20756
  package_id: string | null;
20032
20757
  package_label: string | null;
20033
20758
  packages_per_layer: number | null;
20759
+ packing_configuration_id: string;
20034
20760
  product_id: string | null;
20035
20761
  tenant_id: string;
20036
20762
  trade_item_floriday_id: string | null;
@@ -20041,11 +20767,13 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
20041
20767
  created_at?: string;
20042
20768
  id?: string;
20043
20769
  is_package?: boolean;
20770
+ label?: string | null;
20044
20771
  layers_per_load_carrier?: number | null;
20045
20772
  load_carrier?: string | null;
20046
20773
  package_id?: string | null;
20047
20774
  package_label?: string | null;
20048
20775
  packages_per_layer?: number | null;
20776
+ packing_configuration_id?: string;
20049
20777
  product_id?: string | null;
20050
20778
  tenant_id: string;
20051
20779
  trade_item_floriday_id?: string | null;
@@ -20056,11 +20784,13 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
20056
20784
  created_at?: string;
20057
20785
  id?: string;
20058
20786
  is_package?: boolean;
20787
+ label?: string | null;
20059
20788
  layers_per_load_carrier?: number | null;
20060
20789
  load_carrier?: string | null;
20061
20790
  package_id?: string | null;
20062
20791
  package_label?: string | null;
20063
20792
  packages_per_layer?: number | null;
20793
+ packing_configuration_id?: string;
20064
20794
  product_id?: string | null;
20065
20795
  tenant_id?: string;
20066
20796
  trade_item_floriday_id?: string | null;
@@ -20141,6 +20871,8 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
20141
20871
  trade_item_key: string | null;
20142
20872
  unit: string;
20143
20873
  updated_at: string;
20874
+ vat_code: string | null;
20875
+ vat_rate: number | null;
20144
20876
  weight: string | null;
20145
20877
  };
20146
20878
  Insert: {
@@ -20169,6 +20901,8 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
20169
20901
  trade_item_key?: string | null;
20170
20902
  unit?: string;
20171
20903
  updated_at?: string;
20904
+ vat_code?: string | null;
20905
+ vat_rate?: number | null;
20172
20906
  weight?: string | null;
20173
20907
  };
20174
20908
  Update: {
@@ -20197,6 +20931,8 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
20197
20931
  trade_item_key?: string | null;
20198
20932
  unit?: string;
20199
20933
  updated_at?: string;
20934
+ vat_code?: string | null;
20935
+ vat_rate?: number | null;
20200
20936
  weight?: string | null;
20201
20937
  };
20202
20938
  Relationships: [];
@@ -23272,6 +24008,12 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
23272
24008
  processed_items: number;
23273
24009
  }[];
23274
24010
  };
24011
+ calculate_layer_stock: {
24012
+ Args: {
24013
+ p_product_id: string;
24014
+ };
24015
+ Returns: number;
24016
+ };
23275
24017
  call_exact_route: {
23276
24018
  Args: {
23277
24019
  path: string;
@@ -23641,6 +24383,12 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
23641
24383
  };
23642
24384
  Returns: string;
23643
24385
  };
24386
+ get_inventory_stock_for_key: {
24387
+ Args: {
24388
+ p_key: string;
24389
+ };
24390
+ Returns: number;
24391
+ };
23644
24392
  get_offer_by_link_code: {
23645
24393
  Args: {
23646
24394
  p_code: string;
@@ -23671,6 +24419,12 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
23671
24419
  };
23672
24420
  Returns: string;
23673
24421
  };
24422
+ get_product_group_available_stock: {
24423
+ Args: {
24424
+ p_group_id: string;
24425
+ };
24426
+ Returns: number;
24427
+ };
23674
24428
  get_room_busy_windows: {
23675
24429
  Args: {
23676
24430
  p_from: string;
@@ -24237,12 +24991,22 @@ export declare const rejectSalesOrder: import("@tanstack/start-client-core").Req
24237
24991
  };
24238
24992
  Returns: string[];
24239
24993
  };
24994
+ sync_all_layer_stocks: {
24995
+ Args: never;
24996
+ Returns: undefined;
24997
+ };
24240
24998
  sync_cached_packing_from_product: {
24241
24999
  Args: {
24242
25000
  p_product_id: string;
24243
25001
  };
24244
25002
  Returns: undefined;
24245
25003
  };
25004
+ sync_layer_stock: {
25005
+ Args: {
25006
+ p_product_id: string;
25007
+ };
25008
+ Returns: undefined;
25009
+ };
24246
25010
  sync_order_cart_item_packing_from_product: {
24247
25011
  Args: {
24248
25012
  p_product_id: string;
@@ -25335,6 +26099,141 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
25335
26099
  };
25336
26100
  Relationships: [];
25337
26101
  };
26102
+ cart_planning_pick_times: {
26103
+ Row: {
26104
+ created_at: string;
26105
+ id: string;
26106
+ pot_size: string;
26107
+ seconds_per_cart: number;
26108
+ updated_at: string;
26109
+ };
26110
+ Insert: {
26111
+ created_at?: string;
26112
+ id?: string;
26113
+ pot_size: string;
26114
+ seconds_per_cart: number;
26115
+ updated_at?: string;
26116
+ };
26117
+ Update: {
26118
+ created_at?: string;
26119
+ id?: string;
26120
+ pot_size?: string;
26121
+ seconds_per_cart?: number;
26122
+ updated_at?: string;
26123
+ };
26124
+ Relationships: [];
26125
+ };
26126
+ cart_planning_product_overrides: {
26127
+ Row: {
26128
+ created_at: string;
26129
+ id: string;
26130
+ max_party_share_per_layer_pct_override: number | null;
26131
+ never_mix: boolean;
26132
+ notes: string | null;
26133
+ product_id: string;
26134
+ updated_at: string;
26135
+ };
26136
+ Insert: {
26137
+ created_at?: string;
26138
+ id?: string;
26139
+ max_party_share_per_layer_pct_override?: number | null;
26140
+ never_mix?: boolean;
26141
+ notes?: string | null;
26142
+ product_id: string;
26143
+ updated_at?: string;
26144
+ };
26145
+ Update: {
26146
+ created_at?: string;
26147
+ id?: string;
26148
+ max_party_share_per_layer_pct_override?: number | null;
26149
+ never_mix?: boolean;
26150
+ notes?: string | null;
26151
+ product_id?: string;
26152
+ updated_at?: string;
26153
+ };
26154
+ Relationships: [{
26155
+ foreignKeyName: "cart_planning_product_overrides_product_id_fkey";
26156
+ columns: ["product_id"];
26157
+ isOneToOne: true;
26158
+ referencedRelation: "products";
26159
+ referencedColumns: ["id"];
26160
+ }];
26161
+ };
26162
+ cart_planning_settings: {
26163
+ Row: {
26164
+ allow_editing_after_pickstation_send: boolean;
26165
+ buffer_grouping_mode: string;
26166
+ combine_floriday_orders: boolean;
26167
+ combine_floriday_orders_window: string;
26168
+ combine_orders_scope: string;
26169
+ default_workers: number;
26170
+ id: number;
26171
+ max_beladingen_per_layer: number;
26172
+ max_customers_per_cart: number;
26173
+ max_one_customer_per_layer: boolean;
26174
+ max_party_share_per_layer_pct: number;
26175
+ optimization_strategy: string;
26176
+ own_cart_from_layers: number;
26177
+ pick_time_mode: string;
26178
+ plants_per_day: number;
26179
+ plants_per_hour: number;
26180
+ require_same_carrier: boolean;
26181
+ require_same_crate_type: boolean;
26182
+ require_same_delivery_date: boolean;
26183
+ require_same_delivery_location: boolean;
26184
+ updated_at: string;
26185
+ updated_by: string | null;
26186
+ };
26187
+ Insert: {
26188
+ allow_editing_after_pickstation_send?: boolean;
26189
+ buffer_grouping_mode?: string;
26190
+ combine_floriday_orders?: boolean;
26191
+ combine_floriday_orders_window?: string;
26192
+ combine_orders_scope?: string;
26193
+ default_workers?: number;
26194
+ id?: number;
26195
+ max_beladingen_per_layer?: number;
26196
+ max_customers_per_cart?: number;
26197
+ max_one_customer_per_layer?: boolean;
26198
+ max_party_share_per_layer_pct?: number;
26199
+ optimization_strategy?: string;
26200
+ own_cart_from_layers?: number;
26201
+ pick_time_mode?: string;
26202
+ plants_per_day?: number;
26203
+ plants_per_hour?: number;
26204
+ require_same_carrier?: boolean;
26205
+ require_same_crate_type?: boolean;
26206
+ require_same_delivery_date?: boolean;
26207
+ require_same_delivery_location?: boolean;
26208
+ updated_at?: string;
26209
+ updated_by?: string | null;
26210
+ };
26211
+ Update: {
26212
+ allow_editing_after_pickstation_send?: boolean;
26213
+ buffer_grouping_mode?: string;
26214
+ combine_floriday_orders?: boolean;
26215
+ combine_floriday_orders_window?: string;
26216
+ combine_orders_scope?: string;
26217
+ default_workers?: number;
26218
+ id?: number;
26219
+ max_beladingen_per_layer?: number;
26220
+ max_customers_per_cart?: number;
26221
+ max_one_customer_per_layer?: boolean;
26222
+ max_party_share_per_layer_pct?: number;
26223
+ optimization_strategy?: string;
26224
+ own_cart_from_layers?: number;
26225
+ pick_time_mode?: string;
26226
+ plants_per_day?: number;
26227
+ plants_per_hour?: number;
26228
+ require_same_carrier?: boolean;
26229
+ require_same_crate_type?: boolean;
26230
+ require_same_delivery_date?: boolean;
26231
+ require_same_delivery_location?: boolean;
26232
+ updated_at?: string;
26233
+ updated_by?: string | null;
26234
+ };
26235
+ Relationships: [];
26236
+ };
25338
26237
  cart_replan_queue: {
25339
26238
  Row: {
25340
26239
  attempts: number;
@@ -25365,6 +26264,39 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
25365
26264
  referencedColumns: ["id"];
25366
26265
  }];
25367
26266
  };
26267
+ cart_types: {
26268
+ Row: {
26269
+ created_at: string;
26270
+ id: string;
26271
+ is_default: boolean;
26272
+ layer_length_cm: number;
26273
+ layer_width_cm: number;
26274
+ layers_per_cart: number;
26275
+ name: string;
26276
+ updated_at: string;
26277
+ };
26278
+ Insert: {
26279
+ created_at?: string;
26280
+ id?: string;
26281
+ is_default?: boolean;
26282
+ layer_length_cm: number;
26283
+ layer_width_cm: number;
26284
+ layers_per_cart?: number;
26285
+ name: string;
26286
+ updated_at?: string;
26287
+ };
26288
+ Update: {
26289
+ created_at?: string;
26290
+ id?: string;
26291
+ is_default?: boolean;
26292
+ layer_length_cm?: number;
26293
+ layer_width_cm?: number;
26294
+ layers_per_cart?: number;
26295
+ name?: string;
26296
+ updated_at?: string;
26297
+ };
26298
+ Relationships: [];
26299
+ };
25368
26300
  collections: {
25369
26301
  Row: {
25370
26302
  created_at: string;
@@ -25389,6 +26321,36 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
25389
26321
  };
25390
26322
  Relationships: [];
25391
26323
  };
26324
+ crate_types: {
26325
+ Row: {
26326
+ created_at: string;
26327
+ id: string;
26328
+ length_cm: number;
26329
+ name: string;
26330
+ plants_per_crate: number;
26331
+ updated_at: string;
26332
+ width_cm: number;
26333
+ };
26334
+ Insert: {
26335
+ created_at?: string;
26336
+ id?: string;
26337
+ length_cm: number;
26338
+ name: string;
26339
+ plants_per_crate?: number;
26340
+ updated_at?: string;
26341
+ width_cm: number;
26342
+ };
26343
+ Update: {
26344
+ created_at?: string;
26345
+ id?: string;
26346
+ length_cm?: number;
26347
+ name?: string;
26348
+ plants_per_crate?: number;
26349
+ updated_at?: string;
26350
+ width_cm?: number;
26351
+ };
26352
+ Relationships: [];
26353
+ };
25392
26354
  customer_audit_log: {
25393
26355
  Row: {
25394
26356
  action: string;
@@ -29304,6 +30266,27 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
29304
30266
  referencedColumns: ["id"];
29305
30267
  }];
29306
30268
  };
30269
+ floriday_vbn_required_characteristics: {
30270
+ Row: {
30271
+ required_codes: string[];
30272
+ updated_at: string;
30273
+ updated_by: string | null;
30274
+ vbn_code: string;
30275
+ };
30276
+ Insert: {
30277
+ required_codes?: string[];
30278
+ updated_at?: string;
30279
+ updated_by?: string | null;
30280
+ vbn_code: string;
30281
+ };
30282
+ Update: {
30283
+ required_codes?: string[];
30284
+ updated_at?: string;
30285
+ updated_by?: string | null;
30286
+ vbn_code?: string;
30287
+ };
30288
+ Relationships: [];
30289
+ };
29307
30290
  floriday_warehouses_cache: {
29308
30291
  Row: {
29309
30292
  connection_id: string;
@@ -30006,6 +30989,69 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
30006
30989
  };
30007
30990
  Relationships: [];
30008
30991
  };
30992
+ logistics_capacity_events: {
30993
+ Row: {
30994
+ available_carts: number;
30995
+ created_at: string;
30996
+ id: string;
30997
+ measures: import("../integrations/supabase/types").Json;
30998
+ note: string | null;
30999
+ outcome: string;
31000
+ required_carts: number;
31001
+ reserve_minutes: number;
31002
+ shortage_carts: number;
31003
+ status: string;
31004
+ user_id: string;
31005
+ };
31006
+ Insert: {
31007
+ available_carts?: number;
31008
+ created_at?: string;
31009
+ id?: string;
31010
+ measures?: import("../integrations/supabase/types").Json;
31011
+ note?: string | null;
31012
+ outcome?: string;
31013
+ required_carts?: number;
31014
+ reserve_minutes?: number;
31015
+ shortage_carts?: number;
31016
+ status: string;
31017
+ user_id: string;
31018
+ };
31019
+ Update: {
31020
+ available_carts?: number;
31021
+ created_at?: string;
31022
+ id?: string;
31023
+ measures?: import("../integrations/supabase/types").Json;
31024
+ note?: string | null;
31025
+ outcome?: string;
31026
+ required_carts?: number;
31027
+ reserve_minutes?: number;
31028
+ shortage_carts?: number;
31029
+ status?: string;
31030
+ user_id?: string;
31031
+ };
31032
+ Relationships: [];
31033
+ };
31034
+ logistics_capacity_settings: {
31035
+ Row: {
31036
+ created_at: string;
31037
+ settings: import("../integrations/supabase/types").Json;
31038
+ updated_at: string;
31039
+ user_id: string;
31040
+ };
31041
+ Insert: {
31042
+ created_at?: string;
31043
+ settings?: import("../integrations/supabase/types").Json;
31044
+ updated_at?: string;
31045
+ user_id: string;
31046
+ };
31047
+ Update: {
31048
+ created_at?: string;
31049
+ settings?: import("../integrations/supabase/types").Json;
31050
+ updated_at?: string;
31051
+ user_id?: string;
31052
+ };
31053
+ Relationships: [];
31054
+ };
30009
31055
  logistics_decisions: {
30010
31056
  Row: {
30011
31057
  created_at: string;
@@ -31401,6 +32447,42 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
31401
32447
  };
31402
32448
  Relationships: [];
31403
32449
  };
32450
+ order_buffers: {
32451
+ Row: {
32452
+ buffer_key: string;
32453
+ created_at: string;
32454
+ customer_id: string | null;
32455
+ grouping_mode: string;
32456
+ id: string;
32457
+ pickup_date: string | null;
32458
+ pickup_location: string | null;
32459
+ plan_locked_at: string | null;
32460
+ updated_at: string;
32461
+ };
32462
+ Insert: {
32463
+ buffer_key: string;
32464
+ created_at?: string;
32465
+ customer_id?: string | null;
32466
+ grouping_mode: string;
32467
+ id?: string;
32468
+ pickup_date?: string | null;
32469
+ pickup_location?: string | null;
32470
+ plan_locked_at?: string | null;
32471
+ updated_at?: string;
32472
+ };
32473
+ Update: {
32474
+ buffer_key?: string;
32475
+ created_at?: string;
32476
+ customer_id?: string | null;
32477
+ grouping_mode?: string;
32478
+ id?: string;
32479
+ pickup_date?: string | null;
32480
+ pickup_location?: string | null;
32481
+ plan_locked_at?: string | null;
32482
+ updated_at?: string;
32483
+ };
32484
+ Relationships: [];
32485
+ };
31404
32486
  order_cart_items: {
31405
32487
  Row: {
31406
32488
  cart_id: string;
@@ -31467,6 +32549,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
31467
32549
  order_carts: {
31468
32550
  Row: {
31469
32551
  algorithm_version: number;
32552
+ buffer_id: string | null;
31470
32553
  cart_number: number;
31471
32554
  created_at: string;
31472
32555
  id: string;
@@ -31474,13 +32557,14 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
31474
32557
  is_complete: boolean;
31475
32558
  notes: string | null;
31476
32559
  occupancy_pct: number;
31477
- order_id: string;
32560
+ order_id: string | null;
31478
32561
  source: string;
31479
32562
  total_layers_used: number;
31480
32563
  updated_at: string;
31481
32564
  };
31482
32565
  Insert: {
31483
32566
  algorithm_version?: number;
32567
+ buffer_id?: string | null;
31484
32568
  cart_number: number;
31485
32569
  created_at?: string;
31486
32570
  id?: string;
@@ -31488,13 +32572,14 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
31488
32572
  is_complete?: boolean;
31489
32573
  notes?: string | null;
31490
32574
  occupancy_pct?: number;
31491
- order_id: string;
32575
+ order_id?: string | null;
31492
32576
  source?: string;
31493
32577
  total_layers_used?: number;
31494
32578
  updated_at?: string;
31495
32579
  };
31496
32580
  Update: {
31497
32581
  algorithm_version?: number;
32582
+ buffer_id?: string | null;
31498
32583
  cart_number?: number;
31499
32584
  created_at?: string;
31500
32585
  id?: string;
@@ -31502,12 +32587,18 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
31502
32587
  is_complete?: boolean;
31503
32588
  notes?: string | null;
31504
32589
  occupancy_pct?: number;
31505
- order_id?: string;
32590
+ order_id?: string | null;
31506
32591
  source?: string;
31507
32592
  total_layers_used?: number;
31508
32593
  updated_at?: string;
31509
32594
  };
31510
32595
  Relationships: [{
32596
+ foreignKeyName: "order_carts_buffer_id_fkey";
32597
+ columns: ["buffer_id"];
32598
+ isOneToOne: false;
32599
+ referencedRelation: "order_buffers";
32600
+ referencedColumns: ["id"];
32601
+ }, {
31511
32602
  foreignKeyName: "order_carts_order_id_fkey";
31512
32603
  columns: ["order_id"];
31513
32604
  isOneToOne: false;
@@ -31745,12 +32836,14 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
31745
32836
  };
31746
32837
  orders: {
31747
32838
  Row: {
32839
+ buffer_id: string | null;
31748
32840
  created_at: string;
31749
32841
  custom_fields: import("../integrations/supabase/types").Json;
31750
32842
  customer_id: string | null;
31751
32843
  customer_name: string;
31752
32844
  deleted_at: string | null;
31753
32845
  delivery_date: string | null;
32846
+ floriday_sales_order_id: string | null;
31754
32847
  id: string;
31755
32848
  is_reservation: boolean;
31756
32849
  notes: string | null;
@@ -31764,12 +32857,14 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
31764
32857
  updated_at: string;
31765
32858
  };
31766
32859
  Insert: {
32860
+ buffer_id?: string | null;
31767
32861
  created_at?: string;
31768
32862
  custom_fields?: import("../integrations/supabase/types").Json;
31769
32863
  customer_id?: string | null;
31770
32864
  customer_name?: string;
31771
32865
  deleted_at?: string | null;
31772
32866
  delivery_date?: string | null;
32867
+ floriday_sales_order_id?: string | null;
31773
32868
  id?: string;
31774
32869
  is_reservation?: boolean;
31775
32870
  notes?: string | null;
@@ -31783,12 +32878,14 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
31783
32878
  updated_at?: string;
31784
32879
  };
31785
32880
  Update: {
32881
+ buffer_id?: string | null;
31786
32882
  created_at?: string;
31787
32883
  custom_fields?: import("../integrations/supabase/types").Json;
31788
32884
  customer_id?: string | null;
31789
32885
  customer_name?: string;
31790
32886
  deleted_at?: string | null;
31791
32887
  delivery_date?: string | null;
32888
+ floriday_sales_order_id?: string | null;
31792
32889
  id?: string;
31793
32890
  is_reservation?: boolean;
31794
32891
  notes?: string | null;
@@ -31802,6 +32899,12 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
31802
32899
  updated_at?: string;
31803
32900
  };
31804
32901
  Relationships: [{
32902
+ foreignKeyName: "orders_buffer_id_fkey";
32903
+ columns: ["buffer_id"];
32904
+ isOneToOne: false;
32905
+ referencedRelation: "order_buffers";
32906
+ referencedColumns: ["id"];
32907
+ }, {
31805
32908
  foreignKeyName: "orders_customer_id_fkey";
31806
32909
  columns: ["customer_id"];
31807
32910
  isOneToOne: false;
@@ -31939,6 +33042,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
31939
33042
  created_at: string;
31940
33043
  id: string;
31941
33044
  notes: string | null;
33045
+ packing_configuration_id: string | null;
31942
33046
  parent_product_id: string | null;
31943
33047
  parent_trade_item_floriday_id: string | null;
31944
33048
  quantity: number;
@@ -31953,6 +33057,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
31953
33057
  created_at?: string;
31954
33058
  id?: string;
31955
33059
  notes?: string | null;
33060
+ packing_configuration_id?: string | null;
31956
33061
  parent_product_id?: string | null;
31957
33062
  parent_trade_item_floriday_id?: string | null;
31958
33063
  quantity?: number;
@@ -31967,6 +33072,7 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
31967
33072
  created_at?: string;
31968
33073
  id?: string;
31969
33074
  notes?: string | null;
33075
+ packing_configuration_id?: string | null;
31970
33076
  parent_product_id?: string | null;
31971
33077
  parent_trade_item_floriday_id?: string | null;
31972
33078
  quantity?: number;
@@ -32168,11 +33274,13 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
32168
33274
  created_at: string;
32169
33275
  id: string;
32170
33276
  is_package: boolean;
33277
+ label: string | null;
32171
33278
  layers_per_load_carrier: number | null;
32172
33279
  load_carrier: string | null;
32173
33280
  package_id: string | null;
32174
33281
  package_label: string | null;
32175
33282
  packages_per_layer: number | null;
33283
+ packing_configuration_id: string;
32176
33284
  product_id: string | null;
32177
33285
  tenant_id: string;
32178
33286
  trade_item_floriday_id: string | null;
@@ -32183,11 +33291,13 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
32183
33291
  created_at?: string;
32184
33292
  id?: string;
32185
33293
  is_package?: boolean;
33294
+ label?: string | null;
32186
33295
  layers_per_load_carrier?: number | null;
32187
33296
  load_carrier?: string | null;
32188
33297
  package_id?: string | null;
32189
33298
  package_label?: string | null;
32190
33299
  packages_per_layer?: number | null;
33300
+ packing_configuration_id?: string;
32191
33301
  product_id?: string | null;
32192
33302
  tenant_id: string;
32193
33303
  trade_item_floriday_id?: string | null;
@@ -32198,11 +33308,13 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
32198
33308
  created_at?: string;
32199
33309
  id?: string;
32200
33310
  is_package?: boolean;
33311
+ label?: string | null;
32201
33312
  layers_per_load_carrier?: number | null;
32202
33313
  load_carrier?: string | null;
32203
33314
  package_id?: string | null;
32204
33315
  package_label?: string | null;
32205
33316
  packages_per_layer?: number | null;
33317
+ packing_configuration_id?: string;
32206
33318
  product_id?: string | null;
32207
33319
  tenant_id?: string;
32208
33320
  trade_item_floriday_id?: string | null;
@@ -32283,6 +33395,8 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
32283
33395
  trade_item_key: string | null;
32284
33396
  unit: string;
32285
33397
  updated_at: string;
33398
+ vat_code: string | null;
33399
+ vat_rate: number | null;
32286
33400
  weight: string | null;
32287
33401
  };
32288
33402
  Insert: {
@@ -32311,6 +33425,8 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
32311
33425
  trade_item_key?: string | null;
32312
33426
  unit?: string;
32313
33427
  updated_at?: string;
33428
+ vat_code?: string | null;
33429
+ vat_rate?: number | null;
32314
33430
  weight?: string | null;
32315
33431
  };
32316
33432
  Update: {
@@ -32339,6 +33455,8 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
32339
33455
  trade_item_key?: string | null;
32340
33456
  unit?: string;
32341
33457
  updated_at?: string;
33458
+ vat_code?: string | null;
33459
+ vat_rate?: number | null;
32342
33460
  weight?: string | null;
32343
33461
  };
32344
33462
  Relationships: [];
@@ -35414,6 +36532,12 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
35414
36532
  processed_items: number;
35415
36533
  }[];
35416
36534
  };
36535
+ calculate_layer_stock: {
36536
+ Args: {
36537
+ p_product_id: string;
36538
+ };
36539
+ Returns: number;
36540
+ };
35417
36541
  call_exact_route: {
35418
36542
  Args: {
35419
36543
  path: string;
@@ -35783,6 +36907,12 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
35783
36907
  };
35784
36908
  Returns: string;
35785
36909
  };
36910
+ get_inventory_stock_for_key: {
36911
+ Args: {
36912
+ p_key: string;
36913
+ };
36914
+ Returns: number;
36915
+ };
35786
36916
  get_offer_by_link_code: {
35787
36917
  Args: {
35788
36918
  p_code: string;
@@ -35813,6 +36943,12 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
35813
36943
  };
35814
36944
  Returns: string;
35815
36945
  };
36946
+ get_product_group_available_stock: {
36947
+ Args: {
36948
+ p_group_id: string;
36949
+ };
36950
+ Returns: number;
36951
+ };
35816
36952
  get_room_busy_windows: {
35817
36953
  Args: {
35818
36954
  p_from: string;
@@ -36379,12 +37515,22 @@ export declare const confirmFulfillmentOrder: import("@tanstack/start-client-cor
36379
37515
  };
36380
37516
  Returns: string[];
36381
37517
  };
37518
+ sync_all_layer_stocks: {
37519
+ Args: never;
37520
+ Returns: undefined;
37521
+ };
36382
37522
  sync_cached_packing_from_product: {
36383
37523
  Args: {
36384
37524
  p_product_id: string;
36385
37525
  };
36386
37526
  Returns: undefined;
36387
37527
  };
37528
+ sync_layer_stock: {
37529
+ Args: {
37530
+ p_product_id: string;
37531
+ };
37532
+ Returns: undefined;
37533
+ };
36388
37534
  sync_order_cart_item_packing_from_product: {
36389
37535
  Args: {
36390
37536
  p_product_id: string;
@@ -37485,6 +38631,141 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
37485
38631
  };
37486
38632
  Relationships: [];
37487
38633
  };
38634
+ cart_planning_pick_times: {
38635
+ Row: {
38636
+ created_at: string;
38637
+ id: string;
38638
+ pot_size: string;
38639
+ seconds_per_cart: number;
38640
+ updated_at: string;
38641
+ };
38642
+ Insert: {
38643
+ created_at?: string;
38644
+ id?: string;
38645
+ pot_size: string;
38646
+ seconds_per_cart: number;
38647
+ updated_at?: string;
38648
+ };
38649
+ Update: {
38650
+ created_at?: string;
38651
+ id?: string;
38652
+ pot_size?: string;
38653
+ seconds_per_cart?: number;
38654
+ updated_at?: string;
38655
+ };
38656
+ Relationships: [];
38657
+ };
38658
+ cart_planning_product_overrides: {
38659
+ Row: {
38660
+ created_at: string;
38661
+ id: string;
38662
+ max_party_share_per_layer_pct_override: number | null;
38663
+ never_mix: boolean;
38664
+ notes: string | null;
38665
+ product_id: string;
38666
+ updated_at: string;
38667
+ };
38668
+ Insert: {
38669
+ created_at?: string;
38670
+ id?: string;
38671
+ max_party_share_per_layer_pct_override?: number | null;
38672
+ never_mix?: boolean;
38673
+ notes?: string | null;
38674
+ product_id: string;
38675
+ updated_at?: string;
38676
+ };
38677
+ Update: {
38678
+ created_at?: string;
38679
+ id?: string;
38680
+ max_party_share_per_layer_pct_override?: number | null;
38681
+ never_mix?: boolean;
38682
+ notes?: string | null;
38683
+ product_id?: string;
38684
+ updated_at?: string;
38685
+ };
38686
+ Relationships: [{
38687
+ foreignKeyName: "cart_planning_product_overrides_product_id_fkey";
38688
+ columns: ["product_id"];
38689
+ isOneToOne: true;
38690
+ referencedRelation: "products";
38691
+ referencedColumns: ["id"];
38692
+ }];
38693
+ };
38694
+ cart_planning_settings: {
38695
+ Row: {
38696
+ allow_editing_after_pickstation_send: boolean;
38697
+ buffer_grouping_mode: string;
38698
+ combine_floriday_orders: boolean;
38699
+ combine_floriday_orders_window: string;
38700
+ combine_orders_scope: string;
38701
+ default_workers: number;
38702
+ id: number;
38703
+ max_beladingen_per_layer: number;
38704
+ max_customers_per_cart: number;
38705
+ max_one_customer_per_layer: boolean;
38706
+ max_party_share_per_layer_pct: number;
38707
+ optimization_strategy: string;
38708
+ own_cart_from_layers: number;
38709
+ pick_time_mode: string;
38710
+ plants_per_day: number;
38711
+ plants_per_hour: number;
38712
+ require_same_carrier: boolean;
38713
+ require_same_crate_type: boolean;
38714
+ require_same_delivery_date: boolean;
38715
+ require_same_delivery_location: boolean;
38716
+ updated_at: string;
38717
+ updated_by: string | null;
38718
+ };
38719
+ Insert: {
38720
+ allow_editing_after_pickstation_send?: boolean;
38721
+ buffer_grouping_mode?: string;
38722
+ combine_floriday_orders?: boolean;
38723
+ combine_floriday_orders_window?: string;
38724
+ combine_orders_scope?: string;
38725
+ default_workers?: number;
38726
+ id?: number;
38727
+ max_beladingen_per_layer?: number;
38728
+ max_customers_per_cart?: number;
38729
+ max_one_customer_per_layer?: boolean;
38730
+ max_party_share_per_layer_pct?: number;
38731
+ optimization_strategy?: string;
38732
+ own_cart_from_layers?: number;
38733
+ pick_time_mode?: string;
38734
+ plants_per_day?: number;
38735
+ plants_per_hour?: number;
38736
+ require_same_carrier?: boolean;
38737
+ require_same_crate_type?: boolean;
38738
+ require_same_delivery_date?: boolean;
38739
+ require_same_delivery_location?: boolean;
38740
+ updated_at?: string;
38741
+ updated_by?: string | null;
38742
+ };
38743
+ Update: {
38744
+ allow_editing_after_pickstation_send?: boolean;
38745
+ buffer_grouping_mode?: string;
38746
+ combine_floriday_orders?: boolean;
38747
+ combine_floriday_orders_window?: string;
38748
+ combine_orders_scope?: string;
38749
+ default_workers?: number;
38750
+ id?: number;
38751
+ max_beladingen_per_layer?: number;
38752
+ max_customers_per_cart?: number;
38753
+ max_one_customer_per_layer?: boolean;
38754
+ max_party_share_per_layer_pct?: number;
38755
+ optimization_strategy?: string;
38756
+ own_cart_from_layers?: number;
38757
+ pick_time_mode?: string;
38758
+ plants_per_day?: number;
38759
+ plants_per_hour?: number;
38760
+ require_same_carrier?: boolean;
38761
+ require_same_crate_type?: boolean;
38762
+ require_same_delivery_date?: boolean;
38763
+ require_same_delivery_location?: boolean;
38764
+ updated_at?: string;
38765
+ updated_by?: string | null;
38766
+ };
38767
+ Relationships: [];
38768
+ };
37488
38769
  cart_replan_queue: {
37489
38770
  Row: {
37490
38771
  attempts: number;
@@ -37515,6 +38796,39 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
37515
38796
  referencedColumns: ["id"];
37516
38797
  }];
37517
38798
  };
38799
+ cart_types: {
38800
+ Row: {
38801
+ created_at: string;
38802
+ id: string;
38803
+ is_default: boolean;
38804
+ layer_length_cm: number;
38805
+ layer_width_cm: number;
38806
+ layers_per_cart: number;
38807
+ name: string;
38808
+ updated_at: string;
38809
+ };
38810
+ Insert: {
38811
+ created_at?: string;
38812
+ id?: string;
38813
+ is_default?: boolean;
38814
+ layer_length_cm: number;
38815
+ layer_width_cm: number;
38816
+ layers_per_cart?: number;
38817
+ name: string;
38818
+ updated_at?: string;
38819
+ };
38820
+ Update: {
38821
+ created_at?: string;
38822
+ id?: string;
38823
+ is_default?: boolean;
38824
+ layer_length_cm?: number;
38825
+ layer_width_cm?: number;
38826
+ layers_per_cart?: number;
38827
+ name?: string;
38828
+ updated_at?: string;
38829
+ };
38830
+ Relationships: [];
38831
+ };
37518
38832
  collections: {
37519
38833
  Row: {
37520
38834
  created_at: string;
@@ -37539,6 +38853,36 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
37539
38853
  };
37540
38854
  Relationships: [];
37541
38855
  };
38856
+ crate_types: {
38857
+ Row: {
38858
+ created_at: string;
38859
+ id: string;
38860
+ length_cm: number;
38861
+ name: string;
38862
+ plants_per_crate: number;
38863
+ updated_at: string;
38864
+ width_cm: number;
38865
+ };
38866
+ Insert: {
38867
+ created_at?: string;
38868
+ id?: string;
38869
+ length_cm: number;
38870
+ name: string;
38871
+ plants_per_crate?: number;
38872
+ updated_at?: string;
38873
+ width_cm: number;
38874
+ };
38875
+ Update: {
38876
+ created_at?: string;
38877
+ id?: string;
38878
+ length_cm?: number;
38879
+ name?: string;
38880
+ plants_per_crate?: number;
38881
+ updated_at?: string;
38882
+ width_cm?: number;
38883
+ };
38884
+ Relationships: [];
38885
+ };
37542
38886
  customer_audit_log: {
37543
38887
  Row: {
37544
38888
  action: string;
@@ -41454,6 +42798,27 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
41454
42798
  referencedColumns: ["id"];
41455
42799
  }];
41456
42800
  };
42801
+ floriday_vbn_required_characteristics: {
42802
+ Row: {
42803
+ required_codes: string[];
42804
+ updated_at: string;
42805
+ updated_by: string | null;
42806
+ vbn_code: string;
42807
+ };
42808
+ Insert: {
42809
+ required_codes?: string[];
42810
+ updated_at?: string;
42811
+ updated_by?: string | null;
42812
+ vbn_code: string;
42813
+ };
42814
+ Update: {
42815
+ required_codes?: string[];
42816
+ updated_at?: string;
42817
+ updated_by?: string | null;
42818
+ vbn_code?: string;
42819
+ };
42820
+ Relationships: [];
42821
+ };
41457
42822
  floriday_warehouses_cache: {
41458
42823
  Row: {
41459
42824
  connection_id: string;
@@ -42156,6 +43521,69 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
42156
43521
  };
42157
43522
  Relationships: [];
42158
43523
  };
43524
+ logistics_capacity_events: {
43525
+ Row: {
43526
+ available_carts: number;
43527
+ created_at: string;
43528
+ id: string;
43529
+ measures: import("../integrations/supabase/types").Json;
43530
+ note: string | null;
43531
+ outcome: string;
43532
+ required_carts: number;
43533
+ reserve_minutes: number;
43534
+ shortage_carts: number;
43535
+ status: string;
43536
+ user_id: string;
43537
+ };
43538
+ Insert: {
43539
+ available_carts?: number;
43540
+ created_at?: string;
43541
+ id?: string;
43542
+ measures?: import("../integrations/supabase/types").Json;
43543
+ note?: string | null;
43544
+ outcome?: string;
43545
+ required_carts?: number;
43546
+ reserve_minutes?: number;
43547
+ shortage_carts?: number;
43548
+ status: string;
43549
+ user_id: string;
43550
+ };
43551
+ Update: {
43552
+ available_carts?: number;
43553
+ created_at?: string;
43554
+ id?: string;
43555
+ measures?: import("../integrations/supabase/types").Json;
43556
+ note?: string | null;
43557
+ outcome?: string;
43558
+ required_carts?: number;
43559
+ reserve_minutes?: number;
43560
+ shortage_carts?: number;
43561
+ status?: string;
43562
+ user_id?: string;
43563
+ };
43564
+ Relationships: [];
43565
+ };
43566
+ logistics_capacity_settings: {
43567
+ Row: {
43568
+ created_at: string;
43569
+ settings: import("../integrations/supabase/types").Json;
43570
+ updated_at: string;
43571
+ user_id: string;
43572
+ };
43573
+ Insert: {
43574
+ created_at?: string;
43575
+ settings?: import("../integrations/supabase/types").Json;
43576
+ updated_at?: string;
43577
+ user_id: string;
43578
+ };
43579
+ Update: {
43580
+ created_at?: string;
43581
+ settings?: import("../integrations/supabase/types").Json;
43582
+ updated_at?: string;
43583
+ user_id?: string;
43584
+ };
43585
+ Relationships: [];
43586
+ };
42159
43587
  logistics_decisions: {
42160
43588
  Row: {
42161
43589
  created_at: string;
@@ -43551,6 +44979,42 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
43551
44979
  };
43552
44980
  Relationships: [];
43553
44981
  };
44982
+ order_buffers: {
44983
+ Row: {
44984
+ buffer_key: string;
44985
+ created_at: string;
44986
+ customer_id: string | null;
44987
+ grouping_mode: string;
44988
+ id: string;
44989
+ pickup_date: string | null;
44990
+ pickup_location: string | null;
44991
+ plan_locked_at: string | null;
44992
+ updated_at: string;
44993
+ };
44994
+ Insert: {
44995
+ buffer_key: string;
44996
+ created_at?: string;
44997
+ customer_id?: string | null;
44998
+ grouping_mode: string;
44999
+ id?: string;
45000
+ pickup_date?: string | null;
45001
+ pickup_location?: string | null;
45002
+ plan_locked_at?: string | null;
45003
+ updated_at?: string;
45004
+ };
45005
+ Update: {
45006
+ buffer_key?: string;
45007
+ created_at?: string;
45008
+ customer_id?: string | null;
45009
+ grouping_mode?: string;
45010
+ id?: string;
45011
+ pickup_date?: string | null;
45012
+ pickup_location?: string | null;
45013
+ plan_locked_at?: string | null;
45014
+ updated_at?: string;
45015
+ };
45016
+ Relationships: [];
45017
+ };
43554
45018
  order_cart_items: {
43555
45019
  Row: {
43556
45020
  cart_id: string;
@@ -43617,6 +45081,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
43617
45081
  order_carts: {
43618
45082
  Row: {
43619
45083
  algorithm_version: number;
45084
+ buffer_id: string | null;
43620
45085
  cart_number: number;
43621
45086
  created_at: string;
43622
45087
  id: string;
@@ -43624,13 +45089,14 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
43624
45089
  is_complete: boolean;
43625
45090
  notes: string | null;
43626
45091
  occupancy_pct: number;
43627
- order_id: string;
45092
+ order_id: string | null;
43628
45093
  source: string;
43629
45094
  total_layers_used: number;
43630
45095
  updated_at: string;
43631
45096
  };
43632
45097
  Insert: {
43633
45098
  algorithm_version?: number;
45099
+ buffer_id?: string | null;
43634
45100
  cart_number: number;
43635
45101
  created_at?: string;
43636
45102
  id?: string;
@@ -43638,13 +45104,14 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
43638
45104
  is_complete?: boolean;
43639
45105
  notes?: string | null;
43640
45106
  occupancy_pct?: number;
43641
- order_id: string;
45107
+ order_id?: string | null;
43642
45108
  source?: string;
43643
45109
  total_layers_used?: number;
43644
45110
  updated_at?: string;
43645
45111
  };
43646
45112
  Update: {
43647
45113
  algorithm_version?: number;
45114
+ buffer_id?: string | null;
43648
45115
  cart_number?: number;
43649
45116
  created_at?: string;
43650
45117
  id?: string;
@@ -43652,12 +45119,18 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
43652
45119
  is_complete?: boolean;
43653
45120
  notes?: string | null;
43654
45121
  occupancy_pct?: number;
43655
- order_id?: string;
45122
+ order_id?: string | null;
43656
45123
  source?: string;
43657
45124
  total_layers_used?: number;
43658
45125
  updated_at?: string;
43659
45126
  };
43660
45127
  Relationships: [{
45128
+ foreignKeyName: "order_carts_buffer_id_fkey";
45129
+ columns: ["buffer_id"];
45130
+ isOneToOne: false;
45131
+ referencedRelation: "order_buffers";
45132
+ referencedColumns: ["id"];
45133
+ }, {
43661
45134
  foreignKeyName: "order_carts_order_id_fkey";
43662
45135
  columns: ["order_id"];
43663
45136
  isOneToOne: false;
@@ -43895,12 +45368,14 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
43895
45368
  };
43896
45369
  orders: {
43897
45370
  Row: {
45371
+ buffer_id: string | null;
43898
45372
  created_at: string;
43899
45373
  custom_fields: import("../integrations/supabase/types").Json;
43900
45374
  customer_id: string | null;
43901
45375
  customer_name: string;
43902
45376
  deleted_at: string | null;
43903
45377
  delivery_date: string | null;
45378
+ floriday_sales_order_id: string | null;
43904
45379
  id: string;
43905
45380
  is_reservation: boolean;
43906
45381
  notes: string | null;
@@ -43914,12 +45389,14 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
43914
45389
  updated_at: string;
43915
45390
  };
43916
45391
  Insert: {
45392
+ buffer_id?: string | null;
43917
45393
  created_at?: string;
43918
45394
  custom_fields?: import("../integrations/supabase/types").Json;
43919
45395
  customer_id?: string | null;
43920
45396
  customer_name?: string;
43921
45397
  deleted_at?: string | null;
43922
45398
  delivery_date?: string | null;
45399
+ floriday_sales_order_id?: string | null;
43923
45400
  id?: string;
43924
45401
  is_reservation?: boolean;
43925
45402
  notes?: string | null;
@@ -43933,12 +45410,14 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
43933
45410
  updated_at?: string;
43934
45411
  };
43935
45412
  Update: {
45413
+ buffer_id?: string | null;
43936
45414
  created_at?: string;
43937
45415
  custom_fields?: import("../integrations/supabase/types").Json;
43938
45416
  customer_id?: string | null;
43939
45417
  customer_name?: string;
43940
45418
  deleted_at?: string | null;
43941
45419
  delivery_date?: string | null;
45420
+ floriday_sales_order_id?: string | null;
43942
45421
  id?: string;
43943
45422
  is_reservation?: boolean;
43944
45423
  notes?: string | null;
@@ -43952,6 +45431,12 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
43952
45431
  updated_at?: string;
43953
45432
  };
43954
45433
  Relationships: [{
45434
+ foreignKeyName: "orders_buffer_id_fkey";
45435
+ columns: ["buffer_id"];
45436
+ isOneToOne: false;
45437
+ referencedRelation: "order_buffers";
45438
+ referencedColumns: ["id"];
45439
+ }, {
43955
45440
  foreignKeyName: "orders_customer_id_fkey";
43956
45441
  columns: ["customer_id"];
43957
45442
  isOneToOne: false;
@@ -44089,6 +45574,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
44089
45574
  created_at: string;
44090
45575
  id: string;
44091
45576
  notes: string | null;
45577
+ packing_configuration_id: string | null;
44092
45578
  parent_product_id: string | null;
44093
45579
  parent_trade_item_floriday_id: string | null;
44094
45580
  quantity: number;
@@ -44103,6 +45589,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
44103
45589
  created_at?: string;
44104
45590
  id?: string;
44105
45591
  notes?: string | null;
45592
+ packing_configuration_id?: string | null;
44106
45593
  parent_product_id?: string | null;
44107
45594
  parent_trade_item_floriday_id?: string | null;
44108
45595
  quantity?: number;
@@ -44117,6 +45604,7 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
44117
45604
  created_at?: string;
44118
45605
  id?: string;
44119
45606
  notes?: string | null;
45607
+ packing_configuration_id?: string | null;
44120
45608
  parent_product_id?: string | null;
44121
45609
  parent_trade_item_floriday_id?: string | null;
44122
45610
  quantity?: number;
@@ -44318,11 +45806,13 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
44318
45806
  created_at: string;
44319
45807
  id: string;
44320
45808
  is_package: boolean;
45809
+ label: string | null;
44321
45810
  layers_per_load_carrier: number | null;
44322
45811
  load_carrier: string | null;
44323
45812
  package_id: string | null;
44324
45813
  package_label: string | null;
44325
45814
  packages_per_layer: number | null;
45815
+ packing_configuration_id: string;
44326
45816
  product_id: string | null;
44327
45817
  tenant_id: string;
44328
45818
  trade_item_floriday_id: string | null;
@@ -44333,11 +45823,13 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
44333
45823
  created_at?: string;
44334
45824
  id?: string;
44335
45825
  is_package?: boolean;
45826
+ label?: string | null;
44336
45827
  layers_per_load_carrier?: number | null;
44337
45828
  load_carrier?: string | null;
44338
45829
  package_id?: string | null;
44339
45830
  package_label?: string | null;
44340
45831
  packages_per_layer?: number | null;
45832
+ packing_configuration_id?: string;
44341
45833
  product_id?: string | null;
44342
45834
  tenant_id: string;
44343
45835
  trade_item_floriday_id?: string | null;
@@ -44348,11 +45840,13 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
44348
45840
  created_at?: string;
44349
45841
  id?: string;
44350
45842
  is_package?: boolean;
45843
+ label?: string | null;
44351
45844
  layers_per_load_carrier?: number | null;
44352
45845
  load_carrier?: string | null;
44353
45846
  package_id?: string | null;
44354
45847
  package_label?: string | null;
44355
45848
  packages_per_layer?: number | null;
45849
+ packing_configuration_id?: string;
44356
45850
  product_id?: string | null;
44357
45851
  tenant_id?: string;
44358
45852
  trade_item_floriday_id?: string | null;
@@ -44433,6 +45927,8 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
44433
45927
  trade_item_key: string | null;
44434
45928
  unit: string;
44435
45929
  updated_at: string;
45930
+ vat_code: string | null;
45931
+ vat_rate: number | null;
44436
45932
  weight: string | null;
44437
45933
  };
44438
45934
  Insert: {
@@ -44461,6 +45957,8 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
44461
45957
  trade_item_key?: string | null;
44462
45958
  unit?: string;
44463
45959
  updated_at?: string;
45960
+ vat_code?: string | null;
45961
+ vat_rate?: number | null;
44464
45962
  weight?: string | null;
44465
45963
  };
44466
45964
  Update: {
@@ -44489,6 +45987,8 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
44489
45987
  trade_item_key?: string | null;
44490
45988
  unit?: string;
44491
45989
  updated_at?: string;
45990
+ vat_code?: string | null;
45991
+ vat_rate?: number | null;
44492
45992
  weight?: string | null;
44493
45993
  };
44494
45994
  Relationships: [];
@@ -47564,6 +49064,12 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
47564
49064
  processed_items: number;
47565
49065
  }[];
47566
49066
  };
49067
+ calculate_layer_stock: {
49068
+ Args: {
49069
+ p_product_id: string;
49070
+ };
49071
+ Returns: number;
49072
+ };
47567
49073
  call_exact_route: {
47568
49074
  Args: {
47569
49075
  path: string;
@@ -47933,6 +49439,12 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
47933
49439
  };
47934
49440
  Returns: string;
47935
49441
  };
49442
+ get_inventory_stock_for_key: {
49443
+ Args: {
49444
+ p_key: string;
49445
+ };
49446
+ Returns: number;
49447
+ };
47936
49448
  get_offer_by_link_code: {
47937
49449
  Args: {
47938
49450
  p_code: string;
@@ -47963,6 +49475,12 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
47963
49475
  };
47964
49476
  Returns: string;
47965
49477
  };
49478
+ get_product_group_available_stock: {
49479
+ Args: {
49480
+ p_group_id: string;
49481
+ };
49482
+ Returns: number;
49483
+ };
47966
49484
  get_room_busy_windows: {
47967
49485
  Args: {
47968
49486
  p_from: string;
@@ -48529,12 +50047,22 @@ export declare const publishTradeItem: import("@tanstack/start-client-core").Req
48529
50047
  };
48530
50048
  Returns: string[];
48531
50049
  };
50050
+ sync_all_layer_stocks: {
50051
+ Args: never;
50052
+ Returns: undefined;
50053
+ };
48532
50054
  sync_cached_packing_from_product: {
48533
50055
  Args: {
48534
50056
  p_product_id: string;
48535
50057
  };
48536
50058
  Returns: undefined;
48537
50059
  };
50060
+ sync_layer_stock: {
50061
+ Args: {
50062
+ p_product_id: string;
50063
+ };
50064
+ Returns: undefined;
50065
+ };
48538
50066
  sync_order_cart_item_packing_from_product: {
48539
50067
  Args: {
48540
50068
  p_product_id: string;
@@ -49627,6 +51155,141 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
49627
51155
  };
49628
51156
  Relationships: [];
49629
51157
  };
51158
+ cart_planning_pick_times: {
51159
+ Row: {
51160
+ created_at: string;
51161
+ id: string;
51162
+ pot_size: string;
51163
+ seconds_per_cart: number;
51164
+ updated_at: string;
51165
+ };
51166
+ Insert: {
51167
+ created_at?: string;
51168
+ id?: string;
51169
+ pot_size: string;
51170
+ seconds_per_cart: number;
51171
+ updated_at?: string;
51172
+ };
51173
+ Update: {
51174
+ created_at?: string;
51175
+ id?: string;
51176
+ pot_size?: string;
51177
+ seconds_per_cart?: number;
51178
+ updated_at?: string;
51179
+ };
51180
+ Relationships: [];
51181
+ };
51182
+ cart_planning_product_overrides: {
51183
+ Row: {
51184
+ created_at: string;
51185
+ id: string;
51186
+ max_party_share_per_layer_pct_override: number | null;
51187
+ never_mix: boolean;
51188
+ notes: string | null;
51189
+ product_id: string;
51190
+ updated_at: string;
51191
+ };
51192
+ Insert: {
51193
+ created_at?: string;
51194
+ id?: string;
51195
+ max_party_share_per_layer_pct_override?: number | null;
51196
+ never_mix?: boolean;
51197
+ notes?: string | null;
51198
+ product_id: string;
51199
+ updated_at?: string;
51200
+ };
51201
+ Update: {
51202
+ created_at?: string;
51203
+ id?: string;
51204
+ max_party_share_per_layer_pct_override?: number | null;
51205
+ never_mix?: boolean;
51206
+ notes?: string | null;
51207
+ product_id?: string;
51208
+ updated_at?: string;
51209
+ };
51210
+ Relationships: [{
51211
+ foreignKeyName: "cart_planning_product_overrides_product_id_fkey";
51212
+ columns: ["product_id"];
51213
+ isOneToOne: true;
51214
+ referencedRelation: "products";
51215
+ referencedColumns: ["id"];
51216
+ }];
51217
+ };
51218
+ cart_planning_settings: {
51219
+ Row: {
51220
+ allow_editing_after_pickstation_send: boolean;
51221
+ buffer_grouping_mode: string;
51222
+ combine_floriday_orders: boolean;
51223
+ combine_floriday_orders_window: string;
51224
+ combine_orders_scope: string;
51225
+ default_workers: number;
51226
+ id: number;
51227
+ max_beladingen_per_layer: number;
51228
+ max_customers_per_cart: number;
51229
+ max_one_customer_per_layer: boolean;
51230
+ max_party_share_per_layer_pct: number;
51231
+ optimization_strategy: string;
51232
+ own_cart_from_layers: number;
51233
+ pick_time_mode: string;
51234
+ plants_per_day: number;
51235
+ plants_per_hour: number;
51236
+ require_same_carrier: boolean;
51237
+ require_same_crate_type: boolean;
51238
+ require_same_delivery_date: boolean;
51239
+ require_same_delivery_location: boolean;
51240
+ updated_at: string;
51241
+ updated_by: string | null;
51242
+ };
51243
+ Insert: {
51244
+ allow_editing_after_pickstation_send?: boolean;
51245
+ buffer_grouping_mode?: string;
51246
+ combine_floriday_orders?: boolean;
51247
+ combine_floriday_orders_window?: string;
51248
+ combine_orders_scope?: string;
51249
+ default_workers?: number;
51250
+ id?: number;
51251
+ max_beladingen_per_layer?: number;
51252
+ max_customers_per_cart?: number;
51253
+ max_one_customer_per_layer?: boolean;
51254
+ max_party_share_per_layer_pct?: number;
51255
+ optimization_strategy?: string;
51256
+ own_cart_from_layers?: number;
51257
+ pick_time_mode?: string;
51258
+ plants_per_day?: number;
51259
+ plants_per_hour?: number;
51260
+ require_same_carrier?: boolean;
51261
+ require_same_crate_type?: boolean;
51262
+ require_same_delivery_date?: boolean;
51263
+ require_same_delivery_location?: boolean;
51264
+ updated_at?: string;
51265
+ updated_by?: string | null;
51266
+ };
51267
+ Update: {
51268
+ allow_editing_after_pickstation_send?: boolean;
51269
+ buffer_grouping_mode?: string;
51270
+ combine_floriday_orders?: boolean;
51271
+ combine_floriday_orders_window?: string;
51272
+ combine_orders_scope?: string;
51273
+ default_workers?: number;
51274
+ id?: number;
51275
+ max_beladingen_per_layer?: number;
51276
+ max_customers_per_cart?: number;
51277
+ max_one_customer_per_layer?: boolean;
51278
+ max_party_share_per_layer_pct?: number;
51279
+ optimization_strategy?: string;
51280
+ own_cart_from_layers?: number;
51281
+ pick_time_mode?: string;
51282
+ plants_per_day?: number;
51283
+ plants_per_hour?: number;
51284
+ require_same_carrier?: boolean;
51285
+ require_same_crate_type?: boolean;
51286
+ require_same_delivery_date?: boolean;
51287
+ require_same_delivery_location?: boolean;
51288
+ updated_at?: string;
51289
+ updated_by?: string | null;
51290
+ };
51291
+ Relationships: [];
51292
+ };
49630
51293
  cart_replan_queue: {
49631
51294
  Row: {
49632
51295
  attempts: number;
@@ -49657,6 +51320,39 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
49657
51320
  referencedColumns: ["id"];
49658
51321
  }];
49659
51322
  };
51323
+ cart_types: {
51324
+ Row: {
51325
+ created_at: string;
51326
+ id: string;
51327
+ is_default: boolean;
51328
+ layer_length_cm: number;
51329
+ layer_width_cm: number;
51330
+ layers_per_cart: number;
51331
+ name: string;
51332
+ updated_at: string;
51333
+ };
51334
+ Insert: {
51335
+ created_at?: string;
51336
+ id?: string;
51337
+ is_default?: boolean;
51338
+ layer_length_cm: number;
51339
+ layer_width_cm: number;
51340
+ layers_per_cart?: number;
51341
+ name: string;
51342
+ updated_at?: string;
51343
+ };
51344
+ Update: {
51345
+ created_at?: string;
51346
+ id?: string;
51347
+ is_default?: boolean;
51348
+ layer_length_cm?: number;
51349
+ layer_width_cm?: number;
51350
+ layers_per_cart?: number;
51351
+ name?: string;
51352
+ updated_at?: string;
51353
+ };
51354
+ Relationships: [];
51355
+ };
49660
51356
  collections: {
49661
51357
  Row: {
49662
51358
  created_at: string;
@@ -49681,6 +51377,36 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
49681
51377
  };
49682
51378
  Relationships: [];
49683
51379
  };
51380
+ crate_types: {
51381
+ Row: {
51382
+ created_at: string;
51383
+ id: string;
51384
+ length_cm: number;
51385
+ name: string;
51386
+ plants_per_crate: number;
51387
+ updated_at: string;
51388
+ width_cm: number;
51389
+ };
51390
+ Insert: {
51391
+ created_at?: string;
51392
+ id?: string;
51393
+ length_cm: number;
51394
+ name: string;
51395
+ plants_per_crate?: number;
51396
+ updated_at?: string;
51397
+ width_cm: number;
51398
+ };
51399
+ Update: {
51400
+ created_at?: string;
51401
+ id?: string;
51402
+ length_cm?: number;
51403
+ name?: string;
51404
+ plants_per_crate?: number;
51405
+ updated_at?: string;
51406
+ width_cm?: number;
51407
+ };
51408
+ Relationships: [];
51409
+ };
49684
51410
  customer_audit_log: {
49685
51411
  Row: {
49686
51412
  action: string;
@@ -53596,6 +55322,27 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
53596
55322
  referencedColumns: ["id"];
53597
55323
  }];
53598
55324
  };
55325
+ floriday_vbn_required_characteristics: {
55326
+ Row: {
55327
+ required_codes: string[];
55328
+ updated_at: string;
55329
+ updated_by: string | null;
55330
+ vbn_code: string;
55331
+ };
55332
+ Insert: {
55333
+ required_codes?: string[];
55334
+ updated_at?: string;
55335
+ updated_by?: string | null;
55336
+ vbn_code: string;
55337
+ };
55338
+ Update: {
55339
+ required_codes?: string[];
55340
+ updated_at?: string;
55341
+ updated_by?: string | null;
55342
+ vbn_code?: string;
55343
+ };
55344
+ Relationships: [];
55345
+ };
53599
55346
  floriday_warehouses_cache: {
53600
55347
  Row: {
53601
55348
  connection_id: string;
@@ -54298,6 +56045,69 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
54298
56045
  };
54299
56046
  Relationships: [];
54300
56047
  };
56048
+ logistics_capacity_events: {
56049
+ Row: {
56050
+ available_carts: number;
56051
+ created_at: string;
56052
+ id: string;
56053
+ measures: import("../integrations/supabase/types").Json;
56054
+ note: string | null;
56055
+ outcome: string;
56056
+ required_carts: number;
56057
+ reserve_minutes: number;
56058
+ shortage_carts: number;
56059
+ status: string;
56060
+ user_id: string;
56061
+ };
56062
+ Insert: {
56063
+ available_carts?: number;
56064
+ created_at?: string;
56065
+ id?: string;
56066
+ measures?: import("../integrations/supabase/types").Json;
56067
+ note?: string | null;
56068
+ outcome?: string;
56069
+ required_carts?: number;
56070
+ reserve_minutes?: number;
56071
+ shortage_carts?: number;
56072
+ status: string;
56073
+ user_id: string;
56074
+ };
56075
+ Update: {
56076
+ available_carts?: number;
56077
+ created_at?: string;
56078
+ id?: string;
56079
+ measures?: import("../integrations/supabase/types").Json;
56080
+ note?: string | null;
56081
+ outcome?: string;
56082
+ required_carts?: number;
56083
+ reserve_minutes?: number;
56084
+ shortage_carts?: number;
56085
+ status?: string;
56086
+ user_id?: string;
56087
+ };
56088
+ Relationships: [];
56089
+ };
56090
+ logistics_capacity_settings: {
56091
+ Row: {
56092
+ created_at: string;
56093
+ settings: import("../integrations/supabase/types").Json;
56094
+ updated_at: string;
56095
+ user_id: string;
56096
+ };
56097
+ Insert: {
56098
+ created_at?: string;
56099
+ settings?: import("../integrations/supabase/types").Json;
56100
+ updated_at?: string;
56101
+ user_id: string;
56102
+ };
56103
+ Update: {
56104
+ created_at?: string;
56105
+ settings?: import("../integrations/supabase/types").Json;
56106
+ updated_at?: string;
56107
+ user_id?: string;
56108
+ };
56109
+ Relationships: [];
56110
+ };
54301
56111
  logistics_decisions: {
54302
56112
  Row: {
54303
56113
  created_at: string;
@@ -55693,6 +57503,42 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
55693
57503
  };
55694
57504
  Relationships: [];
55695
57505
  };
57506
+ order_buffers: {
57507
+ Row: {
57508
+ buffer_key: string;
57509
+ created_at: string;
57510
+ customer_id: string | null;
57511
+ grouping_mode: string;
57512
+ id: string;
57513
+ pickup_date: string | null;
57514
+ pickup_location: string | null;
57515
+ plan_locked_at: string | null;
57516
+ updated_at: string;
57517
+ };
57518
+ Insert: {
57519
+ buffer_key: string;
57520
+ created_at?: string;
57521
+ customer_id?: string | null;
57522
+ grouping_mode: string;
57523
+ id?: string;
57524
+ pickup_date?: string | null;
57525
+ pickup_location?: string | null;
57526
+ plan_locked_at?: string | null;
57527
+ updated_at?: string;
57528
+ };
57529
+ Update: {
57530
+ buffer_key?: string;
57531
+ created_at?: string;
57532
+ customer_id?: string | null;
57533
+ grouping_mode?: string;
57534
+ id?: string;
57535
+ pickup_date?: string | null;
57536
+ pickup_location?: string | null;
57537
+ plan_locked_at?: string | null;
57538
+ updated_at?: string;
57539
+ };
57540
+ Relationships: [];
57541
+ };
55696
57542
  order_cart_items: {
55697
57543
  Row: {
55698
57544
  cart_id: string;
@@ -55759,6 +57605,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
55759
57605
  order_carts: {
55760
57606
  Row: {
55761
57607
  algorithm_version: number;
57608
+ buffer_id: string | null;
55762
57609
  cart_number: number;
55763
57610
  created_at: string;
55764
57611
  id: string;
@@ -55766,13 +57613,14 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
55766
57613
  is_complete: boolean;
55767
57614
  notes: string | null;
55768
57615
  occupancy_pct: number;
55769
- order_id: string;
57616
+ order_id: string | null;
55770
57617
  source: string;
55771
57618
  total_layers_used: number;
55772
57619
  updated_at: string;
55773
57620
  };
55774
57621
  Insert: {
55775
57622
  algorithm_version?: number;
57623
+ buffer_id?: string | null;
55776
57624
  cart_number: number;
55777
57625
  created_at?: string;
55778
57626
  id?: string;
@@ -55780,13 +57628,14 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
55780
57628
  is_complete?: boolean;
55781
57629
  notes?: string | null;
55782
57630
  occupancy_pct?: number;
55783
- order_id: string;
57631
+ order_id?: string | null;
55784
57632
  source?: string;
55785
57633
  total_layers_used?: number;
55786
57634
  updated_at?: string;
55787
57635
  };
55788
57636
  Update: {
55789
57637
  algorithm_version?: number;
57638
+ buffer_id?: string | null;
55790
57639
  cart_number?: number;
55791
57640
  created_at?: string;
55792
57641
  id?: string;
@@ -55794,12 +57643,18 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
55794
57643
  is_complete?: boolean;
55795
57644
  notes?: string | null;
55796
57645
  occupancy_pct?: number;
55797
- order_id?: string;
57646
+ order_id?: string | null;
55798
57647
  source?: string;
55799
57648
  total_layers_used?: number;
55800
57649
  updated_at?: string;
55801
57650
  };
55802
57651
  Relationships: [{
57652
+ foreignKeyName: "order_carts_buffer_id_fkey";
57653
+ columns: ["buffer_id"];
57654
+ isOneToOne: false;
57655
+ referencedRelation: "order_buffers";
57656
+ referencedColumns: ["id"];
57657
+ }, {
55803
57658
  foreignKeyName: "order_carts_order_id_fkey";
55804
57659
  columns: ["order_id"];
55805
57660
  isOneToOne: false;
@@ -56037,12 +57892,14 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
56037
57892
  };
56038
57893
  orders: {
56039
57894
  Row: {
57895
+ buffer_id: string | null;
56040
57896
  created_at: string;
56041
57897
  custom_fields: import("../integrations/supabase/types").Json;
56042
57898
  customer_id: string | null;
56043
57899
  customer_name: string;
56044
57900
  deleted_at: string | null;
56045
57901
  delivery_date: string | null;
57902
+ floriday_sales_order_id: string | null;
56046
57903
  id: string;
56047
57904
  is_reservation: boolean;
56048
57905
  notes: string | null;
@@ -56056,12 +57913,14 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
56056
57913
  updated_at: string;
56057
57914
  };
56058
57915
  Insert: {
57916
+ buffer_id?: string | null;
56059
57917
  created_at?: string;
56060
57918
  custom_fields?: import("../integrations/supabase/types").Json;
56061
57919
  customer_id?: string | null;
56062
57920
  customer_name?: string;
56063
57921
  deleted_at?: string | null;
56064
57922
  delivery_date?: string | null;
57923
+ floriday_sales_order_id?: string | null;
56065
57924
  id?: string;
56066
57925
  is_reservation?: boolean;
56067
57926
  notes?: string | null;
@@ -56075,12 +57934,14 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
56075
57934
  updated_at?: string;
56076
57935
  };
56077
57936
  Update: {
57937
+ buffer_id?: string | null;
56078
57938
  created_at?: string;
56079
57939
  custom_fields?: import("../integrations/supabase/types").Json;
56080
57940
  customer_id?: string | null;
56081
57941
  customer_name?: string;
56082
57942
  deleted_at?: string | null;
56083
57943
  delivery_date?: string | null;
57944
+ floriday_sales_order_id?: string | null;
56084
57945
  id?: string;
56085
57946
  is_reservation?: boolean;
56086
57947
  notes?: string | null;
@@ -56094,6 +57955,12 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
56094
57955
  updated_at?: string;
56095
57956
  };
56096
57957
  Relationships: [{
57958
+ foreignKeyName: "orders_buffer_id_fkey";
57959
+ columns: ["buffer_id"];
57960
+ isOneToOne: false;
57961
+ referencedRelation: "order_buffers";
57962
+ referencedColumns: ["id"];
57963
+ }, {
56097
57964
  foreignKeyName: "orders_customer_id_fkey";
56098
57965
  columns: ["customer_id"];
56099
57966
  isOneToOne: false;
@@ -56231,6 +58098,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
56231
58098
  created_at: string;
56232
58099
  id: string;
56233
58100
  notes: string | null;
58101
+ packing_configuration_id: string | null;
56234
58102
  parent_product_id: string | null;
56235
58103
  parent_trade_item_floriday_id: string | null;
56236
58104
  quantity: number;
@@ -56245,6 +58113,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
56245
58113
  created_at?: string;
56246
58114
  id?: string;
56247
58115
  notes?: string | null;
58116
+ packing_configuration_id?: string | null;
56248
58117
  parent_product_id?: string | null;
56249
58118
  parent_trade_item_floriday_id?: string | null;
56250
58119
  quantity?: number;
@@ -56259,6 +58128,7 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
56259
58128
  created_at?: string;
56260
58129
  id?: string;
56261
58130
  notes?: string | null;
58131
+ packing_configuration_id?: string | null;
56262
58132
  parent_product_id?: string | null;
56263
58133
  parent_trade_item_floriday_id?: string | null;
56264
58134
  quantity?: number;
@@ -56460,11 +58330,13 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
56460
58330
  created_at: string;
56461
58331
  id: string;
56462
58332
  is_package: boolean;
58333
+ label: string | null;
56463
58334
  layers_per_load_carrier: number | null;
56464
58335
  load_carrier: string | null;
56465
58336
  package_id: string | null;
56466
58337
  package_label: string | null;
56467
58338
  packages_per_layer: number | null;
58339
+ packing_configuration_id: string;
56468
58340
  product_id: string | null;
56469
58341
  tenant_id: string;
56470
58342
  trade_item_floriday_id: string | null;
@@ -56475,11 +58347,13 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
56475
58347
  created_at?: string;
56476
58348
  id?: string;
56477
58349
  is_package?: boolean;
58350
+ label?: string | null;
56478
58351
  layers_per_load_carrier?: number | null;
56479
58352
  load_carrier?: string | null;
56480
58353
  package_id?: string | null;
56481
58354
  package_label?: string | null;
56482
58355
  packages_per_layer?: number | null;
58356
+ packing_configuration_id?: string;
56483
58357
  product_id?: string | null;
56484
58358
  tenant_id: string;
56485
58359
  trade_item_floriday_id?: string | null;
@@ -56490,11 +58364,13 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
56490
58364
  created_at?: string;
56491
58365
  id?: string;
56492
58366
  is_package?: boolean;
58367
+ label?: string | null;
56493
58368
  layers_per_load_carrier?: number | null;
56494
58369
  load_carrier?: string | null;
56495
58370
  package_id?: string | null;
56496
58371
  package_label?: string | null;
56497
58372
  packages_per_layer?: number | null;
58373
+ packing_configuration_id?: string;
56498
58374
  product_id?: string | null;
56499
58375
  tenant_id?: string;
56500
58376
  trade_item_floriday_id?: string | null;
@@ -56575,6 +58451,8 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
56575
58451
  trade_item_key: string | null;
56576
58452
  unit: string;
56577
58453
  updated_at: string;
58454
+ vat_code: string | null;
58455
+ vat_rate: number | null;
56578
58456
  weight: string | null;
56579
58457
  };
56580
58458
  Insert: {
@@ -56603,6 +58481,8 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
56603
58481
  trade_item_key?: string | null;
56604
58482
  unit?: string;
56605
58483
  updated_at?: string;
58484
+ vat_code?: string | null;
58485
+ vat_rate?: number | null;
56606
58486
  weight?: string | null;
56607
58487
  };
56608
58488
  Update: {
@@ -56631,6 +58511,8 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
56631
58511
  trade_item_key?: string | null;
56632
58512
  unit?: string;
56633
58513
  updated_at?: string;
58514
+ vat_code?: string | null;
58515
+ vat_rate?: number | null;
56634
58516
  weight?: string | null;
56635
58517
  };
56636
58518
  Relationships: [];
@@ -59706,6 +61588,12 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
59706
61588
  processed_items: number;
59707
61589
  }[];
59708
61590
  };
61591
+ calculate_layer_stock: {
61592
+ Args: {
61593
+ p_product_id: string;
61594
+ };
61595
+ Returns: number;
61596
+ };
59709
61597
  call_exact_route: {
59710
61598
  Args: {
59711
61599
  path: string;
@@ -60075,6 +61963,12 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
60075
61963
  };
60076
61964
  Returns: string;
60077
61965
  };
61966
+ get_inventory_stock_for_key: {
61967
+ Args: {
61968
+ p_key: string;
61969
+ };
61970
+ Returns: number;
61971
+ };
60078
61972
  get_offer_by_link_code: {
60079
61973
  Args: {
60080
61974
  p_code: string;
@@ -60105,6 +61999,12 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
60105
61999
  };
60106
62000
  Returns: string;
60107
62001
  };
62002
+ get_product_group_available_stock: {
62003
+ Args: {
62004
+ p_group_id: string;
62005
+ };
62006
+ Returns: number;
62007
+ };
60108
62008
  get_room_busy_windows: {
60109
62009
  Args: {
60110
62010
  p_from: string;
@@ -60671,12 +62571,22 @@ export declare const upsertSupplyLine: import("@tanstack/start-client-core").Req
60671
62571
  };
60672
62572
  Returns: string[];
60673
62573
  };
62574
+ sync_all_layer_stocks: {
62575
+ Args: never;
62576
+ Returns: undefined;
62577
+ };
60674
62578
  sync_cached_packing_from_product: {
60675
62579
  Args: {
60676
62580
  p_product_id: string;
60677
62581
  };
60678
62582
  Returns: undefined;
60679
62583
  };
62584
+ sync_layer_stock: {
62585
+ Args: {
62586
+ p_product_id: string;
62587
+ };
62588
+ Returns: undefined;
62589
+ };
60680
62590
  sync_order_cart_item_packing_from_product: {
60681
62591
  Args: {
60682
62592
  p_product_id: string;
@@ -61774,6 +63684,141 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
61774
63684
  };
61775
63685
  Relationships: [];
61776
63686
  };
63687
+ cart_planning_pick_times: {
63688
+ Row: {
63689
+ created_at: string;
63690
+ id: string;
63691
+ pot_size: string;
63692
+ seconds_per_cart: number;
63693
+ updated_at: string;
63694
+ };
63695
+ Insert: {
63696
+ created_at?: string;
63697
+ id?: string;
63698
+ pot_size: string;
63699
+ seconds_per_cart: number;
63700
+ updated_at?: string;
63701
+ };
63702
+ Update: {
63703
+ created_at?: string;
63704
+ id?: string;
63705
+ pot_size?: string;
63706
+ seconds_per_cart?: number;
63707
+ updated_at?: string;
63708
+ };
63709
+ Relationships: [];
63710
+ };
63711
+ cart_planning_product_overrides: {
63712
+ Row: {
63713
+ created_at: string;
63714
+ id: string;
63715
+ max_party_share_per_layer_pct_override: number | null;
63716
+ never_mix: boolean;
63717
+ notes: string | null;
63718
+ product_id: string;
63719
+ updated_at: string;
63720
+ };
63721
+ Insert: {
63722
+ created_at?: string;
63723
+ id?: string;
63724
+ max_party_share_per_layer_pct_override?: number | null;
63725
+ never_mix?: boolean;
63726
+ notes?: string | null;
63727
+ product_id: string;
63728
+ updated_at?: string;
63729
+ };
63730
+ Update: {
63731
+ created_at?: string;
63732
+ id?: string;
63733
+ max_party_share_per_layer_pct_override?: number | null;
63734
+ never_mix?: boolean;
63735
+ notes?: string | null;
63736
+ product_id?: string;
63737
+ updated_at?: string;
63738
+ };
63739
+ Relationships: [{
63740
+ foreignKeyName: "cart_planning_product_overrides_product_id_fkey";
63741
+ columns: ["product_id"];
63742
+ isOneToOne: true;
63743
+ referencedRelation: "products";
63744
+ referencedColumns: ["id"];
63745
+ }];
63746
+ };
63747
+ cart_planning_settings: {
63748
+ Row: {
63749
+ allow_editing_after_pickstation_send: boolean;
63750
+ buffer_grouping_mode: string;
63751
+ combine_floriday_orders: boolean;
63752
+ combine_floriday_orders_window: string;
63753
+ combine_orders_scope: string;
63754
+ default_workers: number;
63755
+ id: number;
63756
+ max_beladingen_per_layer: number;
63757
+ max_customers_per_cart: number;
63758
+ max_one_customer_per_layer: boolean;
63759
+ max_party_share_per_layer_pct: number;
63760
+ optimization_strategy: string;
63761
+ own_cart_from_layers: number;
63762
+ pick_time_mode: string;
63763
+ plants_per_day: number;
63764
+ plants_per_hour: number;
63765
+ require_same_carrier: boolean;
63766
+ require_same_crate_type: boolean;
63767
+ require_same_delivery_date: boolean;
63768
+ require_same_delivery_location: boolean;
63769
+ updated_at: string;
63770
+ updated_by: string | null;
63771
+ };
63772
+ Insert: {
63773
+ allow_editing_after_pickstation_send?: boolean;
63774
+ buffer_grouping_mode?: string;
63775
+ combine_floriday_orders?: boolean;
63776
+ combine_floriday_orders_window?: string;
63777
+ combine_orders_scope?: string;
63778
+ default_workers?: number;
63779
+ id?: number;
63780
+ max_beladingen_per_layer?: number;
63781
+ max_customers_per_cart?: number;
63782
+ max_one_customer_per_layer?: boolean;
63783
+ max_party_share_per_layer_pct?: number;
63784
+ optimization_strategy?: string;
63785
+ own_cart_from_layers?: number;
63786
+ pick_time_mode?: string;
63787
+ plants_per_day?: number;
63788
+ plants_per_hour?: number;
63789
+ require_same_carrier?: boolean;
63790
+ require_same_crate_type?: boolean;
63791
+ require_same_delivery_date?: boolean;
63792
+ require_same_delivery_location?: boolean;
63793
+ updated_at?: string;
63794
+ updated_by?: string | null;
63795
+ };
63796
+ Update: {
63797
+ allow_editing_after_pickstation_send?: boolean;
63798
+ buffer_grouping_mode?: string;
63799
+ combine_floriday_orders?: boolean;
63800
+ combine_floriday_orders_window?: string;
63801
+ combine_orders_scope?: string;
63802
+ default_workers?: number;
63803
+ id?: number;
63804
+ max_beladingen_per_layer?: number;
63805
+ max_customers_per_cart?: number;
63806
+ max_one_customer_per_layer?: boolean;
63807
+ max_party_share_per_layer_pct?: number;
63808
+ optimization_strategy?: string;
63809
+ own_cart_from_layers?: number;
63810
+ pick_time_mode?: string;
63811
+ plants_per_day?: number;
63812
+ plants_per_hour?: number;
63813
+ require_same_carrier?: boolean;
63814
+ require_same_crate_type?: boolean;
63815
+ require_same_delivery_date?: boolean;
63816
+ require_same_delivery_location?: boolean;
63817
+ updated_at?: string;
63818
+ updated_by?: string | null;
63819
+ };
63820
+ Relationships: [];
63821
+ };
61777
63822
  cart_replan_queue: {
61778
63823
  Row: {
61779
63824
  attempts: number;
@@ -61804,6 +63849,39 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
61804
63849
  referencedColumns: ["id"];
61805
63850
  }];
61806
63851
  };
63852
+ cart_types: {
63853
+ Row: {
63854
+ created_at: string;
63855
+ id: string;
63856
+ is_default: boolean;
63857
+ layer_length_cm: number;
63858
+ layer_width_cm: number;
63859
+ layers_per_cart: number;
63860
+ name: string;
63861
+ updated_at: string;
63862
+ };
63863
+ Insert: {
63864
+ created_at?: string;
63865
+ id?: string;
63866
+ is_default?: boolean;
63867
+ layer_length_cm: number;
63868
+ layer_width_cm: number;
63869
+ layers_per_cart?: number;
63870
+ name: string;
63871
+ updated_at?: string;
63872
+ };
63873
+ Update: {
63874
+ created_at?: string;
63875
+ id?: string;
63876
+ is_default?: boolean;
63877
+ layer_length_cm?: number;
63878
+ layer_width_cm?: number;
63879
+ layers_per_cart?: number;
63880
+ name?: string;
63881
+ updated_at?: string;
63882
+ };
63883
+ Relationships: [];
63884
+ };
61807
63885
  collections: {
61808
63886
  Row: {
61809
63887
  created_at: string;
@@ -61828,6 +63906,36 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
61828
63906
  };
61829
63907
  Relationships: [];
61830
63908
  };
63909
+ crate_types: {
63910
+ Row: {
63911
+ created_at: string;
63912
+ id: string;
63913
+ length_cm: number;
63914
+ name: string;
63915
+ plants_per_crate: number;
63916
+ updated_at: string;
63917
+ width_cm: number;
63918
+ };
63919
+ Insert: {
63920
+ created_at?: string;
63921
+ id?: string;
63922
+ length_cm: number;
63923
+ name: string;
63924
+ plants_per_crate?: number;
63925
+ updated_at?: string;
63926
+ width_cm: number;
63927
+ };
63928
+ Update: {
63929
+ created_at?: string;
63930
+ id?: string;
63931
+ length_cm?: number;
63932
+ name?: string;
63933
+ plants_per_crate?: number;
63934
+ updated_at?: string;
63935
+ width_cm?: number;
63936
+ };
63937
+ Relationships: [];
63938
+ };
61831
63939
  customer_audit_log: {
61832
63940
  Row: {
61833
63941
  action: string;
@@ -65743,6 +67851,27 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
65743
67851
  referencedColumns: ["id"];
65744
67852
  }];
65745
67853
  };
67854
+ floriday_vbn_required_characteristics: {
67855
+ Row: {
67856
+ required_codes: string[];
67857
+ updated_at: string;
67858
+ updated_by: string | null;
67859
+ vbn_code: string;
67860
+ };
67861
+ Insert: {
67862
+ required_codes?: string[];
67863
+ updated_at?: string;
67864
+ updated_by?: string | null;
67865
+ vbn_code: string;
67866
+ };
67867
+ Update: {
67868
+ required_codes?: string[];
67869
+ updated_at?: string;
67870
+ updated_by?: string | null;
67871
+ vbn_code?: string;
67872
+ };
67873
+ Relationships: [];
67874
+ };
65746
67875
  floriday_warehouses_cache: {
65747
67876
  Row: {
65748
67877
  connection_id: string;
@@ -66445,6 +68574,69 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
66445
68574
  };
66446
68575
  Relationships: [];
66447
68576
  };
68577
+ logistics_capacity_events: {
68578
+ Row: {
68579
+ available_carts: number;
68580
+ created_at: string;
68581
+ id: string;
68582
+ measures: import("../integrations/supabase/types").Json;
68583
+ note: string | null;
68584
+ outcome: string;
68585
+ required_carts: number;
68586
+ reserve_minutes: number;
68587
+ shortage_carts: number;
68588
+ status: string;
68589
+ user_id: string;
68590
+ };
68591
+ Insert: {
68592
+ available_carts?: number;
68593
+ created_at?: string;
68594
+ id?: string;
68595
+ measures?: import("../integrations/supabase/types").Json;
68596
+ note?: string | null;
68597
+ outcome?: string;
68598
+ required_carts?: number;
68599
+ reserve_minutes?: number;
68600
+ shortage_carts?: number;
68601
+ status: string;
68602
+ user_id: string;
68603
+ };
68604
+ Update: {
68605
+ available_carts?: number;
68606
+ created_at?: string;
68607
+ id?: string;
68608
+ measures?: import("../integrations/supabase/types").Json;
68609
+ note?: string | null;
68610
+ outcome?: string;
68611
+ required_carts?: number;
68612
+ reserve_minutes?: number;
68613
+ shortage_carts?: number;
68614
+ status?: string;
68615
+ user_id?: string;
68616
+ };
68617
+ Relationships: [];
68618
+ };
68619
+ logistics_capacity_settings: {
68620
+ Row: {
68621
+ created_at: string;
68622
+ settings: import("../integrations/supabase/types").Json;
68623
+ updated_at: string;
68624
+ user_id: string;
68625
+ };
68626
+ Insert: {
68627
+ created_at?: string;
68628
+ settings?: import("../integrations/supabase/types").Json;
68629
+ updated_at?: string;
68630
+ user_id: string;
68631
+ };
68632
+ Update: {
68633
+ created_at?: string;
68634
+ settings?: import("../integrations/supabase/types").Json;
68635
+ updated_at?: string;
68636
+ user_id?: string;
68637
+ };
68638
+ Relationships: [];
68639
+ };
66448
68640
  logistics_decisions: {
66449
68641
  Row: {
66450
68642
  created_at: string;
@@ -67840,6 +70032,42 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
67840
70032
  };
67841
70033
  Relationships: [];
67842
70034
  };
70035
+ order_buffers: {
70036
+ Row: {
70037
+ buffer_key: string;
70038
+ created_at: string;
70039
+ customer_id: string | null;
70040
+ grouping_mode: string;
70041
+ id: string;
70042
+ pickup_date: string | null;
70043
+ pickup_location: string | null;
70044
+ plan_locked_at: string | null;
70045
+ updated_at: string;
70046
+ };
70047
+ Insert: {
70048
+ buffer_key: string;
70049
+ created_at?: string;
70050
+ customer_id?: string | null;
70051
+ grouping_mode: string;
70052
+ id?: string;
70053
+ pickup_date?: string | null;
70054
+ pickup_location?: string | null;
70055
+ plan_locked_at?: string | null;
70056
+ updated_at?: string;
70057
+ };
70058
+ Update: {
70059
+ buffer_key?: string;
70060
+ created_at?: string;
70061
+ customer_id?: string | null;
70062
+ grouping_mode?: string;
70063
+ id?: string;
70064
+ pickup_date?: string | null;
70065
+ pickup_location?: string | null;
70066
+ plan_locked_at?: string | null;
70067
+ updated_at?: string;
70068
+ };
70069
+ Relationships: [];
70070
+ };
67843
70071
  order_cart_items: {
67844
70072
  Row: {
67845
70073
  cart_id: string;
@@ -67906,6 +70134,7 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
67906
70134
  order_carts: {
67907
70135
  Row: {
67908
70136
  algorithm_version: number;
70137
+ buffer_id: string | null;
67909
70138
  cart_number: number;
67910
70139
  created_at: string;
67911
70140
  id: string;
@@ -67913,13 +70142,14 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
67913
70142
  is_complete: boolean;
67914
70143
  notes: string | null;
67915
70144
  occupancy_pct: number;
67916
- order_id: string;
70145
+ order_id: string | null;
67917
70146
  source: string;
67918
70147
  total_layers_used: number;
67919
70148
  updated_at: string;
67920
70149
  };
67921
70150
  Insert: {
67922
70151
  algorithm_version?: number;
70152
+ buffer_id?: string | null;
67923
70153
  cart_number: number;
67924
70154
  created_at?: string;
67925
70155
  id?: string;
@@ -67927,13 +70157,14 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
67927
70157
  is_complete?: boolean;
67928
70158
  notes?: string | null;
67929
70159
  occupancy_pct?: number;
67930
- order_id: string;
70160
+ order_id?: string | null;
67931
70161
  source?: string;
67932
70162
  total_layers_used?: number;
67933
70163
  updated_at?: string;
67934
70164
  };
67935
70165
  Update: {
67936
70166
  algorithm_version?: number;
70167
+ buffer_id?: string | null;
67937
70168
  cart_number?: number;
67938
70169
  created_at?: string;
67939
70170
  id?: string;
@@ -67941,12 +70172,18 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
67941
70172
  is_complete?: boolean;
67942
70173
  notes?: string | null;
67943
70174
  occupancy_pct?: number;
67944
- order_id?: string;
70175
+ order_id?: string | null;
67945
70176
  source?: string;
67946
70177
  total_layers_used?: number;
67947
70178
  updated_at?: string;
67948
70179
  };
67949
70180
  Relationships: [{
70181
+ foreignKeyName: "order_carts_buffer_id_fkey";
70182
+ columns: ["buffer_id"];
70183
+ isOneToOne: false;
70184
+ referencedRelation: "order_buffers";
70185
+ referencedColumns: ["id"];
70186
+ }, {
67950
70187
  foreignKeyName: "order_carts_order_id_fkey";
67951
70188
  columns: ["order_id"];
67952
70189
  isOneToOne: false;
@@ -68184,12 +70421,14 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
68184
70421
  };
68185
70422
  orders: {
68186
70423
  Row: {
70424
+ buffer_id: string | null;
68187
70425
  created_at: string;
68188
70426
  custom_fields: import("../integrations/supabase/types").Json;
68189
70427
  customer_id: string | null;
68190
70428
  customer_name: string;
68191
70429
  deleted_at: string | null;
68192
70430
  delivery_date: string | null;
70431
+ floriday_sales_order_id: string | null;
68193
70432
  id: string;
68194
70433
  is_reservation: boolean;
68195
70434
  notes: string | null;
@@ -68203,12 +70442,14 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
68203
70442
  updated_at: string;
68204
70443
  };
68205
70444
  Insert: {
70445
+ buffer_id?: string | null;
68206
70446
  created_at?: string;
68207
70447
  custom_fields?: import("../integrations/supabase/types").Json;
68208
70448
  customer_id?: string | null;
68209
70449
  customer_name?: string;
68210
70450
  deleted_at?: string | null;
68211
70451
  delivery_date?: string | null;
70452
+ floriday_sales_order_id?: string | null;
68212
70453
  id?: string;
68213
70454
  is_reservation?: boolean;
68214
70455
  notes?: string | null;
@@ -68222,12 +70463,14 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
68222
70463
  updated_at?: string;
68223
70464
  };
68224
70465
  Update: {
70466
+ buffer_id?: string | null;
68225
70467
  created_at?: string;
68226
70468
  custom_fields?: import("../integrations/supabase/types").Json;
68227
70469
  customer_id?: string | null;
68228
70470
  customer_name?: string;
68229
70471
  deleted_at?: string | null;
68230
70472
  delivery_date?: string | null;
70473
+ floriday_sales_order_id?: string | null;
68231
70474
  id?: string;
68232
70475
  is_reservation?: boolean;
68233
70476
  notes?: string | null;
@@ -68241,6 +70484,12 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
68241
70484
  updated_at?: string;
68242
70485
  };
68243
70486
  Relationships: [{
70487
+ foreignKeyName: "orders_buffer_id_fkey";
70488
+ columns: ["buffer_id"];
70489
+ isOneToOne: false;
70490
+ referencedRelation: "order_buffers";
70491
+ referencedColumns: ["id"];
70492
+ }, {
68244
70493
  foreignKeyName: "orders_customer_id_fkey";
68245
70494
  columns: ["customer_id"];
68246
70495
  isOneToOne: false;
@@ -68378,6 +70627,7 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
68378
70627
  created_at: string;
68379
70628
  id: string;
68380
70629
  notes: string | null;
70630
+ packing_configuration_id: string | null;
68381
70631
  parent_product_id: string | null;
68382
70632
  parent_trade_item_floriday_id: string | null;
68383
70633
  quantity: number;
@@ -68392,6 +70642,7 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
68392
70642
  created_at?: string;
68393
70643
  id?: string;
68394
70644
  notes?: string | null;
70645
+ packing_configuration_id?: string | null;
68395
70646
  parent_product_id?: string | null;
68396
70647
  parent_trade_item_floriday_id?: string | null;
68397
70648
  quantity?: number;
@@ -68406,6 +70657,7 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
68406
70657
  created_at?: string;
68407
70658
  id?: string;
68408
70659
  notes?: string | null;
70660
+ packing_configuration_id?: string | null;
68409
70661
  parent_product_id?: string | null;
68410
70662
  parent_trade_item_floriday_id?: string | null;
68411
70663
  quantity?: number;
@@ -68607,11 +70859,13 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
68607
70859
  created_at: string;
68608
70860
  id: string;
68609
70861
  is_package: boolean;
70862
+ label: string | null;
68610
70863
  layers_per_load_carrier: number | null;
68611
70864
  load_carrier: string | null;
68612
70865
  package_id: string | null;
68613
70866
  package_label: string | null;
68614
70867
  packages_per_layer: number | null;
70868
+ packing_configuration_id: string;
68615
70869
  product_id: string | null;
68616
70870
  tenant_id: string;
68617
70871
  trade_item_floriday_id: string | null;
@@ -68622,11 +70876,13 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
68622
70876
  created_at?: string;
68623
70877
  id?: string;
68624
70878
  is_package?: boolean;
70879
+ label?: string | null;
68625
70880
  layers_per_load_carrier?: number | null;
68626
70881
  load_carrier?: string | null;
68627
70882
  package_id?: string | null;
68628
70883
  package_label?: string | null;
68629
70884
  packages_per_layer?: number | null;
70885
+ packing_configuration_id?: string;
68630
70886
  product_id?: string | null;
68631
70887
  tenant_id: string;
68632
70888
  trade_item_floriday_id?: string | null;
@@ -68637,11 +70893,13 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
68637
70893
  created_at?: string;
68638
70894
  id?: string;
68639
70895
  is_package?: boolean;
70896
+ label?: string | null;
68640
70897
  layers_per_load_carrier?: number | null;
68641
70898
  load_carrier?: string | null;
68642
70899
  package_id?: string | null;
68643
70900
  package_label?: string | null;
68644
70901
  packages_per_layer?: number | null;
70902
+ packing_configuration_id?: string;
68645
70903
  product_id?: string | null;
68646
70904
  tenant_id?: string;
68647
70905
  trade_item_floriday_id?: string | null;
@@ -68722,6 +70980,8 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
68722
70980
  trade_item_key: string | null;
68723
70981
  unit: string;
68724
70982
  updated_at: string;
70983
+ vat_code: string | null;
70984
+ vat_rate: number | null;
68725
70985
  weight: string | null;
68726
70986
  };
68727
70987
  Insert: {
@@ -68750,6 +71010,8 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
68750
71010
  trade_item_key?: string | null;
68751
71011
  unit?: string;
68752
71012
  updated_at?: string;
71013
+ vat_code?: string | null;
71014
+ vat_rate?: number | null;
68753
71015
  weight?: string | null;
68754
71016
  };
68755
71017
  Update: {
@@ -68778,6 +71040,8 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
68778
71040
  trade_item_key?: string | null;
68779
71041
  unit?: string;
68780
71042
  updated_at?: string;
71043
+ vat_code?: string | null;
71044
+ vat_rate?: number | null;
68781
71045
  weight?: string | null;
68782
71046
  };
68783
71047
  Relationships: [];
@@ -71853,6 +74117,12 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
71853
74117
  processed_items: number;
71854
74118
  }[];
71855
74119
  };
74120
+ calculate_layer_stock: {
74121
+ Args: {
74122
+ p_product_id: string;
74123
+ };
74124
+ Returns: number;
74125
+ };
71856
74126
  call_exact_route: {
71857
74127
  Args: {
71858
74128
  path: string;
@@ -72222,6 +74492,12 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
72222
74492
  };
72223
74493
  Returns: string;
72224
74494
  };
74495
+ get_inventory_stock_for_key: {
74496
+ Args: {
74497
+ p_key: string;
74498
+ };
74499
+ Returns: number;
74500
+ };
72225
74501
  get_offer_by_link_code: {
72226
74502
  Args: {
72227
74503
  p_code: string;
@@ -72252,6 +74528,12 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
72252
74528
  };
72253
74529
  Returns: string;
72254
74530
  };
74531
+ get_product_group_available_stock: {
74532
+ Args: {
74533
+ p_group_id: string;
74534
+ };
74535
+ Returns: number;
74536
+ };
72255
74537
  get_room_busy_windows: {
72256
74538
  Args: {
72257
74539
  p_from: string;
@@ -72818,12 +75100,22 @@ export declare const florydayWriteThrough: import("@tanstack/start-client-core")
72818
75100
  };
72819
75101
  Returns: string[];
72820
75102
  };
75103
+ sync_all_layer_stocks: {
75104
+ Args: never;
75105
+ Returns: undefined;
75106
+ };
72821
75107
  sync_cached_packing_from_product: {
72822
75108
  Args: {
72823
75109
  p_product_id: string;
72824
75110
  };
72825
75111
  Returns: undefined;
72826
75112
  };
75113
+ sync_layer_stock: {
75114
+ Args: {
75115
+ p_product_id: string;
75116
+ };
75117
+ Returns: undefined;
75118
+ };
72827
75119
  sync_order_cart_item_packing_from_product: {
72828
75120
  Args: {
72829
75121
  p_product_id: string;