@flowselections/floriday-voorraad 1.0.16 → 1.0.17

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 (64) hide show
  1. package/dist-lib/components/voorraad/AdditionalPackagingDialog.d.ts +9 -0
  2. package/dist-lib/components/voorraad/AdditionalPackagingDialog.d.ts.map +1 -0
  3. package/dist-lib/components/voorraad/AdditionalPackagingDialog.js +51 -0
  4. package/dist-lib/components/voorraad/ArtikelWizard.d.ts.map +1 -1
  5. package/dist-lib/components/voorraad/ArtikelWizard.js +372 -30
  6. package/dist-lib/components/voorraad/EditArtikelPage.d.ts.map +1 -1
  7. package/dist-lib/components/voorraad/EditArtikelPage.js +78 -4
  8. package/dist-lib/components/voorraad/OrderHistoryCard.d.ts +8 -0
  9. package/dist-lib/components/voorraad/OrderHistoryCard.d.ts.map +1 -0
  10. package/dist-lib/components/voorraad/OrderHistoryCard.js +133 -0
  11. package/dist-lib/components/voorraad/PriceStatusBadge.d.ts +7 -0
  12. package/dist-lib/components/voorraad/PriceStatusBadge.d.ts.map +1 -0
  13. package/dist-lib/components/voorraad/PriceStatusBadge.js +67 -0
  14. package/dist-lib/components/voorraad/VoorraadStockCard.d.ts +2 -1
  15. package/dist-lib/components/voorraad/VoorraadStockCard.d.ts.map +1 -1
  16. package/dist-lib/components/voorraad/VoorraadStockCard.js +5 -4
  17. package/dist-lib/components/voorraad/VoorraadTable.d.ts.map +1 -1
  18. package/dist-lib/components/voorraad/VoorraadTable.js +6 -1
  19. package/dist-lib/hooks/useLocalTradeItems.d.ts.map +1 -1
  20. package/dist-lib/hooks/useLocalTradeItems.js +4 -0
  21. package/dist-lib/hooks/useTradeItemStock.d.ts +14 -1
  22. package/dist-lib/hooks/useTradeItemStock.d.ts.map +1 -1
  23. package/dist-lib/hooks/useTradeItemStock.js +76 -17
  24. package/dist-lib/hooks/useTradeItemSupplyLine.d.ts +21 -0
  25. package/dist-lib/hooks/useTradeItemSupplyLine.d.ts.map +1 -0
  26. package/dist-lib/hooks/useTradeItemSupplyLine.js +49 -0
  27. package/dist-lib/hooks/useVoorraadData.d.ts.map +1 -1
  28. package/dist-lib/hooks/useVoorraadData.js +35 -3
  29. package/dist-lib/integrations/supabase/auth-middleware.d.ts +473 -3
  30. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  31. package/dist-lib/integrations/supabase/client.d.ts +473 -3
  32. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  33. package/dist-lib/integrations/supabase/client.server.d.ts +473 -3
  34. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  35. package/dist-lib/integrations/supabase/types.d.ts +481 -3
  36. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  37. package/dist-lib/lib/floricode-required-features.functions.d.ts +480 -4
  38. package/dist-lib/lib/floricode-required-features.functions.d.ts.map +1 -1
  39. package/dist-lib/lib/floricode-required-features.functions.js +20 -2
  40. package/dist-lib/lib/floriday-customer-offer.functions.d.ts +11264 -0
  41. package/dist-lib/lib/floriday-customer-offer.functions.d.ts.map +1 -0
  42. package/dist-lib/lib/floriday-customer-offer.functions.js +175 -0
  43. package/dist-lib/lib/floriday-gateway.functions.d.ts +13155 -15
  44. package/dist-lib/lib/floriday-gateway.functions.d.ts.map +1 -1
  45. package/dist-lib/lib/floriday-gateway.functions.js +150 -0
  46. package/dist-lib/lib/floriday-gateway.server.d.ts +22 -0
  47. package/dist-lib/lib/floriday-gateway.server.d.ts.map +1 -1
  48. package/dist-lib/lib/floriday-gateway.server.js +3 -0
  49. package/dist-lib/lib/floriday-payload.d.ts +60 -6
  50. package/dist-lib/lib/floriday-payload.d.ts.map +1 -1
  51. package/dist-lib/lib/floriday-payload.js +104 -7
  52. package/dist-lib/lib/floriday-supply-line.d.ts +53 -0
  53. package/dist-lib/lib/floriday-supply-line.d.ts.map +1 -0
  54. package/dist-lib/lib/floriday-supply-line.js +109 -0
  55. package/dist-lib/lib/floriday-warehouse.functions.d.ts +1420 -10
  56. package/dist-lib/lib/floriday-warehouse.functions.d.ts.map +1 -1
  57. package/dist-lib/lib/floriday-writes.functions.d.ts +947 -7
  58. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  59. package/dist-lib/lib/floriday-writes.functions.js +6 -1
  60. package/dist-lib/lib/vrs-catalog.d.ts +27 -0
  61. package/dist-lib/lib/vrs-catalog.d.ts.map +1 -0
  62. package/dist-lib/lib/vrs-catalog.js +98 -0
  63. package/package.json +3 -2
  64. package/public/flowselections-assets/Voorraad/floriday-logo.png +0 -0
@@ -17,7 +17,10 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
17
17
  Tables: {
18
18
  afhandeling_settings: {
19
19
  Row: {
20
+ auto_print_delivery_note: boolean;
21
+ auto_process_paused: boolean;
20
22
  created_at: string;
23
+ extra_pick_days_with_stickers: number;
21
24
  id: string;
22
25
  max_workdays_earlier_pick: number;
23
26
  pick_days_before_transport: number;
@@ -31,7 +34,10 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
31
34
  user_id: string;
32
35
  };
33
36
  Insert: {
37
+ auto_print_delivery_note?: boolean;
38
+ auto_process_paused?: boolean;
34
39
  created_at?: string;
40
+ extra_pick_days_with_stickers?: number;
35
41
  id?: string;
36
42
  max_workdays_earlier_pick?: number;
37
43
  pick_days_before_transport?: number;
@@ -45,7 +51,10 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
45
51
  user_id: string;
46
52
  };
47
53
  Update: {
54
+ auto_print_delivery_note?: boolean;
55
+ auto_process_paused?: boolean;
48
56
  created_at?: string;
57
+ extra_pick_days_with_stickers?: number;
49
58
  id?: string;
50
59
  max_workdays_earlier_pick?: number;
51
60
  pick_days_before_transport?: number;
@@ -837,6 +846,36 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
837
846
  };
838
847
  Relationships: [];
839
848
  };
849
+ cart_replan_queue: {
850
+ Row: {
851
+ attempts: number;
852
+ last_error: string | null;
853
+ order_id: string;
854
+ processed_at: string | null;
855
+ requested_at: string;
856
+ };
857
+ Insert: {
858
+ attempts?: number;
859
+ last_error?: string | null;
860
+ order_id: string;
861
+ processed_at?: string | null;
862
+ requested_at?: string;
863
+ };
864
+ Update: {
865
+ attempts?: number;
866
+ last_error?: string | null;
867
+ order_id?: string;
868
+ processed_at?: string | null;
869
+ requested_at?: string;
870
+ };
871
+ Relationships: [{
872
+ foreignKeyName: "cart_replan_queue_order_id_fkey";
873
+ columns: ["order_id"];
874
+ isOneToOne: true;
875
+ referencedRelation: "orders";
876
+ referencedColumns: ["id"];
877
+ }];
878
+ };
840
879
  collections: {
841
880
  Row: {
842
881
  created_at: string;
@@ -2962,34 +3001,52 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
2962
3001
  Row: {
2963
3002
  catalog_key: string | null;
2964
3003
  catalog_url: string;
3004
+ client_id: string | null;
3005
+ client_secret_ciphertext: string | null;
3006
+ client_secret_last4: string | null;
2965
3007
  created_at: string;
2966
3008
  id: number;
2967
3009
  last_meta: import("../integrations/supabase/types").Json | null;
2968
3010
  last_test_at: string | null;
2969
3011
  last_test_error: string | null;
2970
3012
  last_test_ok: boolean | null;
3013
+ last_token_test_at: string | null;
3014
+ last_token_test_error: string | null;
3015
+ last_token_test_ok: boolean | null;
2971
3016
  updated_at: string;
2972
3017
  };
2973
3018
  Insert: {
2974
3019
  catalog_key?: string | null;
2975
3020
  catalog_url?: string;
3021
+ client_id?: string | null;
3022
+ client_secret_ciphertext?: string | null;
3023
+ client_secret_last4?: string | null;
2976
3024
  created_at?: string;
2977
3025
  id?: number;
2978
3026
  last_meta?: import("../integrations/supabase/types").Json | null;
2979
3027
  last_test_at?: string | null;
2980
3028
  last_test_error?: string | null;
2981
3029
  last_test_ok?: boolean | null;
3030
+ last_token_test_at?: string | null;
3031
+ last_token_test_error?: string | null;
3032
+ last_token_test_ok?: boolean | null;
2982
3033
  updated_at?: string;
2983
3034
  };
2984
3035
  Update: {
2985
3036
  catalog_key?: string | null;
2986
3037
  catalog_url?: string;
3038
+ client_id?: string | null;
3039
+ client_secret_ciphertext?: string | null;
3040
+ client_secret_last4?: string | null;
2987
3041
  created_at?: string;
2988
3042
  id?: number;
2989
3043
  last_meta?: import("../integrations/supabase/types").Json | null;
2990
3044
  last_test_at?: string | null;
2991
3045
  last_test_error?: string | null;
2992
3046
  last_test_ok?: boolean | null;
3047
+ last_token_test_at?: string | null;
3048
+ last_token_test_error?: string | null;
3049
+ last_token_test_ok?: boolean | null;
2993
3050
  updated_at?: string;
2994
3051
  };
2995
3052
  Relationships: [];
@@ -3222,6 +3279,54 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
3222
3279
  referencedColumns: ["id"];
3223
3280
  }];
3224
3281
  };
3282
+ floriday_auto_fulfillment_log: {
3283
+ Row: {
3284
+ attempts: number;
3285
+ connection_id: string;
3286
+ created_at: string;
3287
+ error: string | null;
3288
+ fulfillment_order_id: string | null;
3289
+ id: string;
3290
+ last_attempt_at: string | null;
3291
+ reason: string | null;
3292
+ sales_order_id: string;
3293
+ status: string;
3294
+ updated_at: string;
3295
+ };
3296
+ Insert: {
3297
+ attempts?: number;
3298
+ connection_id: string;
3299
+ created_at?: string;
3300
+ error?: string | null;
3301
+ fulfillment_order_id?: string | null;
3302
+ id?: string;
3303
+ last_attempt_at?: string | null;
3304
+ reason?: string | null;
3305
+ sales_order_id: string;
3306
+ status?: string;
3307
+ updated_at?: string;
3308
+ };
3309
+ Update: {
3310
+ attempts?: number;
3311
+ connection_id?: string;
3312
+ created_at?: string;
3313
+ error?: string | null;
3314
+ fulfillment_order_id?: string | null;
3315
+ id?: string;
3316
+ last_attempt_at?: string | null;
3317
+ reason?: string | null;
3318
+ sales_order_id?: string;
3319
+ status?: string;
3320
+ updated_at?: string;
3321
+ };
3322
+ Relationships: [{
3323
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
3324
+ columns: ["connection_id"];
3325
+ isOneToOne: false;
3326
+ referencedRelation: "floriday_connections";
3327
+ referencedColumns: ["id"];
3328
+ }];
3329
+ };
3225
3330
  floriday_base_items_cache: {
3226
3331
  Row: {
3227
3332
  connection_id: string;
@@ -4326,6 +4431,24 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
4326
4431
  referencedColumns: ["id"];
4327
4432
  }];
4328
4433
  };
4434
+ floriday_rate_limit_state: {
4435
+ Row: {
4436
+ bucket: string;
4437
+ last_refill_at: string;
4438
+ tokens: number;
4439
+ };
4440
+ Insert: {
4441
+ bucket: string;
4442
+ last_refill_at?: string;
4443
+ tokens: number;
4444
+ };
4445
+ Update: {
4446
+ bucket?: string;
4447
+ last_refill_at?: string;
4448
+ tokens?: number;
4449
+ };
4450
+ Relationships: [];
4451
+ };
4329
4452
  floriday_resource_schemas: {
4330
4453
  Row: {
4331
4454
  enums: import("../integrations/supabase/types").Json;
@@ -4749,6 +4872,60 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
4749
4872
  referencedColumns: ["id"];
4750
4873
  }];
4751
4874
  };
4875
+ flow_role_assignments: {
4876
+ Row: {
4877
+ created_at: string;
4878
+ id: string;
4879
+ role_id: string;
4880
+ user_id: string;
4881
+ };
4882
+ Insert: {
4883
+ created_at?: string;
4884
+ id?: string;
4885
+ role_id: string;
4886
+ user_id: string;
4887
+ };
4888
+ Update: {
4889
+ created_at?: string;
4890
+ id?: string;
4891
+ role_id?: string;
4892
+ user_id?: string;
4893
+ };
4894
+ Relationships: [{
4895
+ foreignKeyName: "flow_role_assignments_role_id_fkey";
4896
+ columns: ["role_id"];
4897
+ isOneToOne: false;
4898
+ referencedRelation: "flow_roles";
4899
+ referencedColumns: ["id"];
4900
+ }];
4901
+ };
4902
+ flow_roles: {
4903
+ Row: {
4904
+ created_at: string;
4905
+ description: string | null;
4906
+ id: string;
4907
+ module_access: string[];
4908
+ name: string;
4909
+ updated_at: string;
4910
+ };
4911
+ Insert: {
4912
+ created_at?: string;
4913
+ description?: string | null;
4914
+ id?: string;
4915
+ module_access?: string[];
4916
+ name: string;
4917
+ updated_at?: string;
4918
+ };
4919
+ Update: {
4920
+ created_at?: string;
4921
+ description?: string | null;
4922
+ id?: string;
4923
+ module_access?: string[];
4924
+ name?: string;
4925
+ updated_at?: string;
4926
+ };
4927
+ Relationships: [];
4928
+ };
4752
4929
  imap_accounts: {
4753
4930
  Row: {
4754
4931
  created_at: string;
@@ -5380,6 +5557,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
5380
5557
  matched_customer_id: string | null;
5381
5558
  message_id: string;
5382
5559
  notes: string | null;
5560
+ order_number: string | null;
5383
5561
  parsed_payload: import("../integrations/supabase/types").Json | null;
5384
5562
  reviewed_at: string | null;
5385
5563
  reviewed_by: string | null;
@@ -5395,6 +5573,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
5395
5573
  matched_customer_id?: string | null;
5396
5574
  message_id: string;
5397
5575
  notes?: string | null;
5576
+ order_number?: string | null;
5398
5577
  parsed_payload?: import("../integrations/supabase/types").Json | null;
5399
5578
  reviewed_at?: string | null;
5400
5579
  reviewed_by?: string | null;
@@ -5410,6 +5589,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
5410
5589
  matched_customer_id?: string | null;
5411
5590
  message_id?: string;
5412
5591
  notes?: string | null;
5592
+ order_number?: string | null;
5413
5593
  parsed_payload?: import("../integrations/supabase/types").Json | null;
5414
5594
  reviewed_at?: string | null;
5415
5595
  reviewed_by?: string | null;
@@ -6266,6 +6446,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
6266
6446
  id: string;
6267
6447
  items: import("../integrations/supabase/types").Json;
6268
6448
  notes: string | null;
6449
+ order_number: string | null;
6269
6450
  recipient_id: string;
6270
6451
  total_amount: number;
6271
6452
  };
@@ -6279,6 +6460,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
6279
6460
  id?: string;
6280
6461
  items?: import("../integrations/supabase/types").Json;
6281
6462
  notes?: string | null;
6463
+ order_number?: string | null;
6282
6464
  recipient_id: string;
6283
6465
  total_amount?: number;
6284
6466
  };
@@ -6292,6 +6474,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
6292
6474
  id?: string;
6293
6475
  items?: import("../integrations/supabase/types").Json;
6294
6476
  notes?: string | null;
6477
+ order_number?: string | null;
6295
6478
  recipient_id?: string;
6296
6479
  total_amount?: number;
6297
6480
  };
@@ -6451,6 +6634,9 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
6451
6634
  crates_per_layer: number;
6452
6635
  created_at: string;
6453
6636
  id: string;
6637
+ layer_fraction: number;
6638
+ layer_share_pct: number;
6639
+ layers_per_cart: number;
6454
6640
  order_item_id: string | null;
6455
6641
  plants_per_crate: number;
6456
6642
  product_id: string | null;
@@ -6462,6 +6648,9 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
6462
6648
  crates_per_layer?: number;
6463
6649
  created_at?: string;
6464
6650
  id?: string;
6651
+ layer_fraction?: number;
6652
+ layer_share_pct?: number;
6653
+ layers_per_cart?: number;
6465
6654
  order_item_id?: string | null;
6466
6655
  plants_per_crate?: number;
6467
6656
  product_id?: string | null;
@@ -6473,6 +6662,9 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
6473
6662
  crates_per_layer?: number;
6474
6663
  created_at?: string;
6475
6664
  id?: string;
6665
+ layer_fraction?: number;
6666
+ layer_share_pct?: number;
6667
+ layers_per_cart?: number;
6476
6668
  order_item_id?: string | null;
6477
6669
  plants_per_crate?: number;
6478
6670
  product_id?: string | null;
@@ -6500,33 +6692,45 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
6500
6692
  };
6501
6693
  order_carts: {
6502
6694
  Row: {
6695
+ algorithm_version: number;
6503
6696
  cart_number: number;
6504
6697
  created_at: string;
6505
6698
  id: string;
6506
6699
  is_auto: boolean;
6507
6700
  is_complete: boolean;
6508
6701
  notes: string | null;
6702
+ occupancy_pct: number;
6509
6703
  order_id: string;
6704
+ source: string;
6705
+ total_layers_used: number;
6510
6706
  updated_at: string;
6511
6707
  };
6512
6708
  Insert: {
6709
+ algorithm_version?: number;
6513
6710
  cart_number: number;
6514
6711
  created_at?: string;
6515
6712
  id?: string;
6516
6713
  is_auto?: boolean;
6517
6714
  is_complete?: boolean;
6518
6715
  notes?: string | null;
6716
+ occupancy_pct?: number;
6519
6717
  order_id: string;
6718
+ source?: string;
6719
+ total_layers_used?: number;
6520
6720
  updated_at?: string;
6521
6721
  };
6522
6722
  Update: {
6723
+ algorithm_version?: number;
6523
6724
  cart_number?: number;
6524
6725
  created_at?: string;
6525
6726
  id?: string;
6526
6727
  is_auto?: boolean;
6527
6728
  is_complete?: boolean;
6528
6729
  notes?: string | null;
6730
+ occupancy_pct?: number;
6529
6731
  order_id?: string;
6732
+ source?: string;
6733
+ total_layers_used?: number;
6530
6734
  updated_at?: string;
6531
6735
  };
6532
6736
  Relationships: [{
@@ -6679,6 +6883,8 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
6679
6883
  order_date: string;
6680
6884
  order_number: string;
6681
6885
  order_source: string;
6886
+ plan_locked_at: string | null;
6887
+ plan_locked_ref: string | null;
6682
6888
  status: string;
6683
6889
  total: string;
6684
6890
  updated_at: string;
@@ -6695,6 +6901,8 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
6695
6901
  order_date?: string;
6696
6902
  order_number: string;
6697
6903
  order_source?: string;
6904
+ plan_locked_at?: string | null;
6905
+ plan_locked_ref?: string | null;
6698
6906
  status?: string;
6699
6907
  total?: string;
6700
6908
  updated_at?: string;
@@ -6711,6 +6919,8 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
6711
6919
  order_date?: string;
6712
6920
  order_number?: string;
6713
6921
  order_source?: string;
6922
+ plan_locked_at?: string | null;
6923
+ plan_locked_ref?: string | null;
6714
6924
  status?: string;
6715
6925
  total?: string;
6716
6926
  updated_at?: string;
@@ -7083,6 +7293,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
7083
7293
  display_name: string | null;
7084
7294
  email: string | null;
7085
7295
  id: string;
7296
+ is_superadmin: boolean;
7086
7297
  notification_preferences: import("../integrations/supabase/types").Json;
7087
7298
  tenant_id: string | null;
7088
7299
  updated_at: string;
@@ -7092,6 +7303,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
7092
7303
  display_name?: string | null;
7093
7304
  email?: string | null;
7094
7305
  id: string;
7306
+ is_superadmin?: boolean;
7095
7307
  notification_preferences?: import("../integrations/supabase/types").Json;
7096
7308
  tenant_id?: string | null;
7097
7309
  updated_at?: string;
@@ -7101,6 +7313,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
7101
7313
  display_name?: string | null;
7102
7314
  email?: string | null;
7103
7315
  id?: string;
7316
+ is_superadmin?: boolean;
7104
7317
  notification_preferences?: import("../integrations/supabase/types").Json;
7105
7318
  tenant_id?: string | null;
7106
7319
  updated_at?: string;
@@ -7890,6 +8103,24 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
7890
8103
  };
7891
8104
  Relationships: [];
7892
8105
  };
8106
+ sidebar_config: {
8107
+ Row: {
8108
+ id: string;
8109
+ module_order: string[];
8110
+ updated_at: string;
8111
+ };
8112
+ Insert: {
8113
+ id?: string;
8114
+ module_order?: string[];
8115
+ updated_at?: string;
8116
+ };
8117
+ Update: {
8118
+ id?: string;
8119
+ module_order?: string[];
8120
+ updated_at?: string;
8121
+ };
8122
+ Relationships: [];
8123
+ };
7893
8124
  stock_import_runs: {
7894
8125
  Row: {
7895
8126
  connection_id: string | null;
@@ -7948,7 +8179,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
7948
8179
  reason: string | null;
7949
8180
  reserved_after: number | null;
7950
8181
  reserved_before: number | null;
7951
- trade_item_key: string;
8182
+ trade_item_key: string | null;
7952
8183
  };
7953
8184
  Insert: {
7954
8185
  connection_id?: string | null;
@@ -7965,7 +8196,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
7965
8196
  reason?: string | null;
7966
8197
  reserved_after?: number | null;
7967
8198
  reserved_before?: number | null;
7968
- trade_item_key: string;
8199
+ trade_item_key?: string | null;
7969
8200
  };
7970
8201
  Update: {
7971
8202
  connection_id?: string | null;
@@ -7982,7 +8213,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
7982
8213
  reason?: string | null;
7983
8214
  reserved_after?: number | null;
7984
8215
  reserved_before?: number | null;
7985
- trade_item_key?: string;
8216
+ trade_item_key?: string | null;
7986
8217
  };
7987
8218
  Relationships: [];
7988
8219
  };
@@ -8325,6 +8556,114 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
8325
8556
  };
8326
8557
  Relationships: [];
8327
8558
  };
8559
+ trade_item_supply_lines: {
8560
+ Row: {
8561
+ available_quantity: number | null;
8562
+ connection_id: string;
8563
+ created_at: string;
8564
+ currency: string | null;
8565
+ endpoint_family: string | null;
8566
+ environment: string | null;
8567
+ id: string;
8568
+ last_error: string | null;
8569
+ last_status: number | null;
8570
+ packing_configuration_id: string | null;
8571
+ period_end: string | null;
8572
+ period_start: string | null;
8573
+ price_per_piece: number | null;
8574
+ sales_unit: string | null;
8575
+ supply_line_id: string | null;
8576
+ supply_type: string;
8577
+ trade_item_id: string;
8578
+ updated_at: string;
8579
+ user_id: string;
8580
+ week: number | null;
8581
+ year: number | null;
8582
+ };
8583
+ Insert: {
8584
+ available_quantity?: number | null;
8585
+ connection_id: string;
8586
+ created_at?: string;
8587
+ currency?: string | null;
8588
+ endpoint_family?: string | null;
8589
+ environment?: string | null;
8590
+ id?: string;
8591
+ last_error?: string | null;
8592
+ last_status?: number | null;
8593
+ packing_configuration_id?: string | null;
8594
+ period_end?: string | null;
8595
+ period_start?: string | null;
8596
+ price_per_piece?: number | null;
8597
+ sales_unit?: string | null;
8598
+ supply_line_id?: string | null;
8599
+ supply_type?: string;
8600
+ trade_item_id: string;
8601
+ updated_at?: string;
8602
+ user_id: string;
8603
+ week?: number | null;
8604
+ year?: number | null;
8605
+ };
8606
+ Update: {
8607
+ available_quantity?: number | null;
8608
+ connection_id?: string;
8609
+ created_at?: string;
8610
+ currency?: string | null;
8611
+ endpoint_family?: string | null;
8612
+ environment?: string | null;
8613
+ id?: string;
8614
+ last_error?: string | null;
8615
+ last_status?: number | null;
8616
+ packing_configuration_id?: string | null;
8617
+ period_end?: string | null;
8618
+ period_start?: string | null;
8619
+ price_per_piece?: number | null;
8620
+ sales_unit?: string | null;
8621
+ supply_line_id?: string | null;
8622
+ supply_type?: string;
8623
+ trade_item_id?: string;
8624
+ updated_at?: string;
8625
+ user_id?: string;
8626
+ week?: number | null;
8627
+ year?: number | null;
8628
+ };
8629
+ Relationships: [];
8630
+ };
8631
+ trade_item_warehouse_preferences: {
8632
+ Row: {
8633
+ connection_id: string;
8634
+ created_at: string;
8635
+ id: string;
8636
+ trade_item_id: string;
8637
+ updated_at: string;
8638
+ warehouse_id: string;
8639
+ warehouse_name: string | null;
8640
+ };
8641
+ Insert: {
8642
+ connection_id: string;
8643
+ created_at?: string;
8644
+ id?: string;
8645
+ trade_item_id: string;
8646
+ updated_at?: string;
8647
+ warehouse_id: string;
8648
+ warehouse_name?: string | null;
8649
+ };
8650
+ Update: {
8651
+ connection_id?: string;
8652
+ created_at?: string;
8653
+ id?: string;
8654
+ trade_item_id?: string;
8655
+ updated_at?: string;
8656
+ warehouse_id?: string;
8657
+ warehouse_name?: string | null;
8658
+ };
8659
+ Relationships: [{
8660
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
8661
+ columns: ["connection_id"];
8662
+ isOneToOne: false;
8663
+ referencedRelation: "floriday_connections";
8664
+ referencedColumns: ["id"];
8665
+ }];
8666
+ };
8328
8667
  twinfield_connections: {
8329
8668
  Row: {
8330
8669
  access_token: string | null;
@@ -8644,6 +8983,10 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
8644
8983
  default_invoice_type: string;
8645
8984
  default_payment_term_days: number;
8646
8985
  default_vat_code: string;
8986
+ invoice_enabled_ao: boolean;
8987
+ invoice_enabled_fo: boolean;
8988
+ invoice_enabled_ho: boolean;
8989
+ invoice_enabled_mo: boolean;
8647
8990
  updated_at: string;
8648
8991
  user_id: string;
8649
8992
  };
@@ -8653,6 +8996,10 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
8653
8996
  default_invoice_type?: string;
8654
8997
  default_payment_term_days?: number;
8655
8998
  default_vat_code?: string;
8999
+ invoice_enabled_ao?: boolean;
9000
+ invoice_enabled_fo?: boolean;
9001
+ invoice_enabled_ho?: boolean;
9002
+ invoice_enabled_mo?: boolean;
8656
9003
  updated_at?: string;
8657
9004
  user_id: string;
8658
9005
  };
@@ -8662,6 +9009,10 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
8662
9009
  default_invoice_type?: string;
8663
9010
  default_payment_term_days?: number;
8664
9011
  default_vat_code?: string;
9012
+ invoice_enabled_ao?: boolean;
9013
+ invoice_enabled_fo?: boolean;
9014
+ invoice_enabled_ho?: boolean;
9015
+ invoice_enabled_mo?: boolean;
8665
9016
  updated_at?: string;
8666
9017
  user_id?: string;
8667
9018
  };
@@ -9956,6 +10307,12 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
9956
10307
  order_number: string;
9957
10308
  }[];
9958
10309
  };
10310
+ autolink_product_to_floriday: {
10311
+ Args: {
10312
+ p_product_id: string;
10313
+ };
10314
+ Returns: string;
10315
+ };
9959
10316
  backfill_open_order_reservations: {
9960
10317
  Args: never;
9961
10318
  Returns: {
@@ -9994,6 +10351,18 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
9994
10351
  Args: never;
9995
10352
  Returns: number;
9996
10353
  };
10354
+ consume_floriday_rate_limit: {
10355
+ Args: {
10356
+ p_bucket: string;
10357
+ p_capacity: number;
10358
+ p_cost?: number;
10359
+ p_refill_per_sec: number;
10360
+ };
10361
+ Returns: {
10362
+ granted: boolean;
10363
+ wait_ms: number;
10364
+ }[];
10365
+ };
9997
10366
  control_get_todays_carts: {
9998
10367
  Args: never;
9999
10368
  Returns: {
@@ -10074,6 +10443,12 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10074
10443
  status: string;
10075
10444
  }[];
10076
10445
  };
10446
+ enqueue_cart_replan_if_unlocked: {
10447
+ Args: {
10448
+ p_order_id: string;
10449
+ };
10450
+ Returns: undefined;
10451
+ };
10077
10452
  ensure_trade_item_stock_row: {
10078
10453
  Args: {
10079
10454
  p_key: string;
@@ -10180,6 +10555,13 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10180
10555
  office_code: string;
10181
10556
  }[];
10182
10557
  };
10558
+ get_floricode_record_counts: {
10559
+ Args: never;
10560
+ Returns: {
10561
+ count: number;
10562
+ resource: string;
10563
+ }[];
10564
+ };
10183
10565
  get_floriday_agreements_active: {
10184
10566
  Args: {
10185
10567
  p_on_date?: string;
@@ -10271,6 +10653,12 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10271
10653
  };
10272
10654
  Returns: import("../integrations/supabase/types").Json;
10273
10655
  };
10656
+ get_offer_delivery_options: {
10657
+ Args: {
10658
+ p_code: string;
10659
+ };
10660
+ Returns: import("../integrations/supabase/types").Json;
10661
+ };
10274
10662
  get_offer_recipient_by_code: {
10275
10663
  Args: {
10276
10664
  p_code: string;
@@ -10335,6 +10723,12 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10335
10723
  Args: never;
10336
10724
  Returns: boolean;
10337
10725
  };
10726
+ is_superadmin: {
10727
+ Args: {
10728
+ _user_id: string;
10729
+ };
10730
+ Returns: boolean;
10731
+ };
10338
10732
  local_effective_price: {
10339
10733
  Args: {
10340
10734
  _customer_id: string;
@@ -10369,6 +10763,13 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10369
10763
  };
10370
10764
  Returns: string;
10371
10765
  };
10766
+ next_order_number_for_date: {
10767
+ Args: {
10768
+ p_created_at?: string;
10769
+ p_prefix: string;
10770
+ };
10771
+ Returns: string;
10772
+ };
10372
10773
  next_work_order_number: {
10373
10774
  Args: {
10374
10775
  p_parent_work_order_id?: string;
@@ -10376,6 +10777,12 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10376
10777
  };
10377
10778
  Returns: string;
10378
10779
  };
10780
+ normalize_order_source: {
10781
+ Args: {
10782
+ p_src: string;
10783
+ };
10784
+ Returns: string;
10785
+ };
10379
10786
  normalize_vat: {
10380
10787
  Args: {
10381
10788
  v: string;
@@ -10390,11 +10797,22 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10390
10797
  };
10391
10798
  Returns: boolean;
10392
10799
  };
10800
+ order_number_prefix: {
10801
+ Args: {
10802
+ p_custom_fields?: import("../integrations/supabase/types").Json;
10803
+ p_order_source: string;
10804
+ };
10805
+ Returns: string;
10806
+ };
10393
10807
  pickstation_get_orders_raw: {
10394
10808
  Args: never;
10395
10809
  Returns: import("../integrations/supabase/types").Json;
10396
10810
  };
10397
- pickstation_get_settings: {
10811
+ pickstation_get_planning_context: {
10812
+ Args: never;
10813
+ Returns: import("../integrations/supabase/types").Json;
10814
+ };
10815
+ pickstation_get_settings: {
10398
10816
  Args: never;
10399
10817
  Returns: import("../integrations/supabase/types").Json;
10400
10818
  };
@@ -10424,6 +10842,28 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10424
10842
  };
10425
10843
  Returns: undefined;
10426
10844
  };
10845
+ recompute_order_status: {
10846
+ Args: {
10847
+ p_order_id: string;
10848
+ };
10849
+ Returns: undefined;
10850
+ };
10851
+ recompute_reserved_for_order: {
10852
+ Args: {
10853
+ p_order_id: string;
10854
+ };
10855
+ Returns: undefined;
10856
+ };
10857
+ recompute_reserved_stock: {
10858
+ Args: {
10859
+ p_trade_item_key: string;
10860
+ };
10861
+ Returns: undefined;
10862
+ };
10863
+ refresh_external_customers_grouped: {
10864
+ Args: never;
10865
+ Returns: undefined;
10866
+ };
10427
10867
  refresh_floricode_derived_code_lists: {
10428
10868
  Args: never;
10429
10869
  Returns: {
@@ -10438,6 +10878,12 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10438
10878
  };
10439
10879
  Returns: number;
10440
10880
  };
10881
+ refresh_floricode_derived_for_products: {
10882
+ Args: {
10883
+ _product_ids: string[];
10884
+ };
10885
+ Returns: number;
10886
+ };
10441
10887
  reset_floriday_sync_cursor: {
10442
10888
  Args: {
10443
10889
  p_connection_id: string;
@@ -10445,6 +10891,12 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10445
10891
  };
10446
10892
  Returns: undefined;
10447
10893
  };
10894
+ resolve_product_id_for_item: {
10895
+ Args: {
10896
+ p_product_name: string;
10897
+ };
10898
+ Returns: string;
10899
+ };
10448
10900
  schedule_floriday_additional_services_sync: {
10449
10901
  Args: {
10450
10902
  p_apikey: string;
@@ -10722,6 +11174,24 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10722
11174
  };
10723
11175
  Returns: string[];
10724
11176
  };
11177
+ sync_cached_packing_from_product: {
11178
+ Args: {
11179
+ p_product_id: string;
11180
+ };
11181
+ Returns: undefined;
11182
+ };
11183
+ sync_order_cart_item_packing_from_product: {
11184
+ Args: {
11185
+ p_product_id: string;
11186
+ };
11187
+ Returns: undefined;
11188
+ };
11189
+ sync_product_packing_from_floriday_cache: {
11190
+ Args: {
11191
+ p_floriday_id: string;
11192
+ };
11193
+ Returns: undefined;
11194
+ };
10725
11195
  twinfield_decrypt: {
10726
11196
  Args: {
10727
11197
  cipher: string;
@@ -10758,7 +11228,10 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
10758
11228
  Tables: {
10759
11229
  afhandeling_settings: {
10760
11230
  Row: {
11231
+ auto_print_delivery_note: boolean;
11232
+ auto_process_paused: boolean;
10761
11233
  created_at: string;
11234
+ extra_pick_days_with_stickers: number;
10762
11235
  id: string;
10763
11236
  max_workdays_earlier_pick: number;
10764
11237
  pick_days_before_transport: number;
@@ -10772,7 +11245,10 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
10772
11245
  user_id: string;
10773
11246
  };
10774
11247
  Insert: {
11248
+ auto_print_delivery_note?: boolean;
11249
+ auto_process_paused?: boolean;
10775
11250
  created_at?: string;
11251
+ extra_pick_days_with_stickers?: number;
10776
11252
  id?: string;
10777
11253
  max_workdays_earlier_pick?: number;
10778
11254
  pick_days_before_transport?: number;
@@ -10786,7 +11262,10 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
10786
11262
  user_id: string;
10787
11263
  };
10788
11264
  Update: {
11265
+ auto_print_delivery_note?: boolean;
11266
+ auto_process_paused?: boolean;
10789
11267
  created_at?: string;
11268
+ extra_pick_days_with_stickers?: number;
10790
11269
  id?: string;
10791
11270
  max_workdays_earlier_pick?: number;
10792
11271
  pick_days_before_transport?: number;
@@ -11578,6 +12057,36 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
11578
12057
  };
11579
12058
  Relationships: [];
11580
12059
  };
12060
+ cart_replan_queue: {
12061
+ Row: {
12062
+ attempts: number;
12063
+ last_error: string | null;
12064
+ order_id: string;
12065
+ processed_at: string | null;
12066
+ requested_at: string;
12067
+ };
12068
+ Insert: {
12069
+ attempts?: number;
12070
+ last_error?: string | null;
12071
+ order_id: string;
12072
+ processed_at?: string | null;
12073
+ requested_at?: string;
12074
+ };
12075
+ Update: {
12076
+ attempts?: number;
12077
+ last_error?: string | null;
12078
+ order_id?: string;
12079
+ processed_at?: string | null;
12080
+ requested_at?: string;
12081
+ };
12082
+ Relationships: [{
12083
+ foreignKeyName: "cart_replan_queue_order_id_fkey";
12084
+ columns: ["order_id"];
12085
+ isOneToOne: true;
12086
+ referencedRelation: "orders";
12087
+ referencedColumns: ["id"];
12088
+ }];
12089
+ };
11581
12090
  collections: {
11582
12091
  Row: {
11583
12092
  created_at: string;
@@ -13703,34 +14212,52 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
13703
14212
  Row: {
13704
14213
  catalog_key: string | null;
13705
14214
  catalog_url: string;
14215
+ client_id: string | null;
14216
+ client_secret_ciphertext: string | null;
14217
+ client_secret_last4: string | null;
13706
14218
  created_at: string;
13707
14219
  id: number;
13708
14220
  last_meta: import("../integrations/supabase/types").Json | null;
13709
14221
  last_test_at: string | null;
13710
14222
  last_test_error: string | null;
13711
14223
  last_test_ok: boolean | null;
14224
+ last_token_test_at: string | null;
14225
+ last_token_test_error: string | null;
14226
+ last_token_test_ok: boolean | null;
13712
14227
  updated_at: string;
13713
14228
  };
13714
14229
  Insert: {
13715
14230
  catalog_key?: string | null;
13716
14231
  catalog_url?: string;
14232
+ client_id?: string | null;
14233
+ client_secret_ciphertext?: string | null;
14234
+ client_secret_last4?: string | null;
13717
14235
  created_at?: string;
13718
14236
  id?: number;
13719
14237
  last_meta?: import("../integrations/supabase/types").Json | null;
13720
14238
  last_test_at?: string | null;
13721
14239
  last_test_error?: string | null;
13722
14240
  last_test_ok?: boolean | null;
14241
+ last_token_test_at?: string | null;
14242
+ last_token_test_error?: string | null;
14243
+ last_token_test_ok?: boolean | null;
13723
14244
  updated_at?: string;
13724
14245
  };
13725
14246
  Update: {
13726
14247
  catalog_key?: string | null;
13727
14248
  catalog_url?: string;
14249
+ client_id?: string | null;
14250
+ client_secret_ciphertext?: string | null;
14251
+ client_secret_last4?: string | null;
13728
14252
  created_at?: string;
13729
14253
  id?: number;
13730
14254
  last_meta?: import("../integrations/supabase/types").Json | null;
13731
14255
  last_test_at?: string | null;
13732
14256
  last_test_error?: string | null;
13733
14257
  last_test_ok?: boolean | null;
14258
+ last_token_test_at?: string | null;
14259
+ last_token_test_error?: string | null;
14260
+ last_token_test_ok?: boolean | null;
13734
14261
  updated_at?: string;
13735
14262
  };
13736
14263
  Relationships: [];
@@ -13963,6 +14490,54 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
13963
14490
  referencedColumns: ["id"];
13964
14491
  }];
13965
14492
  };
14493
+ floriday_auto_fulfillment_log: {
14494
+ Row: {
14495
+ attempts: number;
14496
+ connection_id: string;
14497
+ created_at: string;
14498
+ error: string | null;
14499
+ fulfillment_order_id: string | null;
14500
+ id: string;
14501
+ last_attempt_at: string | null;
14502
+ reason: string | null;
14503
+ sales_order_id: string;
14504
+ status: string;
14505
+ updated_at: string;
14506
+ };
14507
+ Insert: {
14508
+ attempts?: number;
14509
+ connection_id: string;
14510
+ created_at?: string;
14511
+ error?: string | null;
14512
+ fulfillment_order_id?: string | null;
14513
+ id?: string;
14514
+ last_attempt_at?: string | null;
14515
+ reason?: string | null;
14516
+ sales_order_id: string;
14517
+ status?: string;
14518
+ updated_at?: string;
14519
+ };
14520
+ Update: {
14521
+ attempts?: number;
14522
+ connection_id?: string;
14523
+ created_at?: string;
14524
+ error?: string | null;
14525
+ fulfillment_order_id?: string | null;
14526
+ id?: string;
14527
+ last_attempt_at?: string | null;
14528
+ reason?: string | null;
14529
+ sales_order_id?: string;
14530
+ status?: string;
14531
+ updated_at?: string;
14532
+ };
14533
+ Relationships: [{
14534
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
14535
+ columns: ["connection_id"];
14536
+ isOneToOne: false;
14537
+ referencedRelation: "floriday_connections";
14538
+ referencedColumns: ["id"];
14539
+ }];
14540
+ };
13966
14541
  floriday_base_items_cache: {
13967
14542
  Row: {
13968
14543
  connection_id: string;
@@ -15067,6 +15642,24 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
15067
15642
  referencedColumns: ["id"];
15068
15643
  }];
15069
15644
  };
15645
+ floriday_rate_limit_state: {
15646
+ Row: {
15647
+ bucket: string;
15648
+ last_refill_at: string;
15649
+ tokens: number;
15650
+ };
15651
+ Insert: {
15652
+ bucket: string;
15653
+ last_refill_at?: string;
15654
+ tokens: number;
15655
+ };
15656
+ Update: {
15657
+ bucket?: string;
15658
+ last_refill_at?: string;
15659
+ tokens?: number;
15660
+ };
15661
+ Relationships: [];
15662
+ };
15070
15663
  floriday_resource_schemas: {
15071
15664
  Row: {
15072
15665
  enums: import("../integrations/supabase/types").Json;
@@ -15490,6 +16083,60 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
15490
16083
  referencedColumns: ["id"];
15491
16084
  }];
15492
16085
  };
16086
+ flow_role_assignments: {
16087
+ Row: {
16088
+ created_at: string;
16089
+ id: string;
16090
+ role_id: string;
16091
+ user_id: string;
16092
+ };
16093
+ Insert: {
16094
+ created_at?: string;
16095
+ id?: string;
16096
+ role_id: string;
16097
+ user_id: string;
16098
+ };
16099
+ Update: {
16100
+ created_at?: string;
16101
+ id?: string;
16102
+ role_id?: string;
16103
+ user_id?: string;
16104
+ };
16105
+ Relationships: [{
16106
+ foreignKeyName: "flow_role_assignments_role_id_fkey";
16107
+ columns: ["role_id"];
16108
+ isOneToOne: false;
16109
+ referencedRelation: "flow_roles";
16110
+ referencedColumns: ["id"];
16111
+ }];
16112
+ };
16113
+ flow_roles: {
16114
+ Row: {
16115
+ created_at: string;
16116
+ description: string | null;
16117
+ id: string;
16118
+ module_access: string[];
16119
+ name: string;
16120
+ updated_at: string;
16121
+ };
16122
+ Insert: {
16123
+ created_at?: string;
16124
+ description?: string | null;
16125
+ id?: string;
16126
+ module_access?: string[];
16127
+ name: string;
16128
+ updated_at?: string;
16129
+ };
16130
+ Update: {
16131
+ created_at?: string;
16132
+ description?: string | null;
16133
+ id?: string;
16134
+ module_access?: string[];
16135
+ name?: string;
16136
+ updated_at?: string;
16137
+ };
16138
+ Relationships: [];
16139
+ };
15493
16140
  imap_accounts: {
15494
16141
  Row: {
15495
16142
  created_at: string;
@@ -16121,6 +16768,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
16121
16768
  matched_customer_id: string | null;
16122
16769
  message_id: string;
16123
16770
  notes: string | null;
16771
+ order_number: string | null;
16124
16772
  parsed_payload: import("../integrations/supabase/types").Json | null;
16125
16773
  reviewed_at: string | null;
16126
16774
  reviewed_by: string | null;
@@ -16136,6 +16784,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
16136
16784
  matched_customer_id?: string | null;
16137
16785
  message_id: string;
16138
16786
  notes?: string | null;
16787
+ order_number?: string | null;
16139
16788
  parsed_payload?: import("../integrations/supabase/types").Json | null;
16140
16789
  reviewed_at?: string | null;
16141
16790
  reviewed_by?: string | null;
@@ -16151,6 +16800,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
16151
16800
  matched_customer_id?: string | null;
16152
16801
  message_id?: string;
16153
16802
  notes?: string | null;
16803
+ order_number?: string | null;
16154
16804
  parsed_payload?: import("../integrations/supabase/types").Json | null;
16155
16805
  reviewed_at?: string | null;
16156
16806
  reviewed_by?: string | null;
@@ -17007,6 +17657,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
17007
17657
  id: string;
17008
17658
  items: import("../integrations/supabase/types").Json;
17009
17659
  notes: string | null;
17660
+ order_number: string | null;
17010
17661
  recipient_id: string;
17011
17662
  total_amount: number;
17012
17663
  };
@@ -17020,6 +17671,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
17020
17671
  id?: string;
17021
17672
  items?: import("../integrations/supabase/types").Json;
17022
17673
  notes?: string | null;
17674
+ order_number?: string | null;
17023
17675
  recipient_id: string;
17024
17676
  total_amount?: number;
17025
17677
  };
@@ -17033,6 +17685,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
17033
17685
  id?: string;
17034
17686
  items?: import("../integrations/supabase/types").Json;
17035
17687
  notes?: string | null;
17688
+ order_number?: string | null;
17036
17689
  recipient_id?: string;
17037
17690
  total_amount?: number;
17038
17691
  };
@@ -17192,6 +17845,9 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
17192
17845
  crates_per_layer: number;
17193
17846
  created_at: string;
17194
17847
  id: string;
17848
+ layer_fraction: number;
17849
+ layer_share_pct: number;
17850
+ layers_per_cart: number;
17195
17851
  order_item_id: string | null;
17196
17852
  plants_per_crate: number;
17197
17853
  product_id: string | null;
@@ -17203,6 +17859,9 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
17203
17859
  crates_per_layer?: number;
17204
17860
  created_at?: string;
17205
17861
  id?: string;
17862
+ layer_fraction?: number;
17863
+ layer_share_pct?: number;
17864
+ layers_per_cart?: number;
17206
17865
  order_item_id?: string | null;
17207
17866
  plants_per_crate?: number;
17208
17867
  product_id?: string | null;
@@ -17214,6 +17873,9 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
17214
17873
  crates_per_layer?: number;
17215
17874
  created_at?: string;
17216
17875
  id?: string;
17876
+ layer_fraction?: number;
17877
+ layer_share_pct?: number;
17878
+ layers_per_cart?: number;
17217
17879
  order_item_id?: string | null;
17218
17880
  plants_per_crate?: number;
17219
17881
  product_id?: string | null;
@@ -17241,33 +17903,45 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
17241
17903
  };
17242
17904
  order_carts: {
17243
17905
  Row: {
17906
+ algorithm_version: number;
17244
17907
  cart_number: number;
17245
17908
  created_at: string;
17246
17909
  id: string;
17247
17910
  is_auto: boolean;
17248
17911
  is_complete: boolean;
17249
17912
  notes: string | null;
17913
+ occupancy_pct: number;
17250
17914
  order_id: string;
17915
+ source: string;
17916
+ total_layers_used: number;
17251
17917
  updated_at: string;
17252
17918
  };
17253
17919
  Insert: {
17920
+ algorithm_version?: number;
17254
17921
  cart_number: number;
17255
17922
  created_at?: string;
17256
17923
  id?: string;
17257
17924
  is_auto?: boolean;
17258
17925
  is_complete?: boolean;
17259
17926
  notes?: string | null;
17927
+ occupancy_pct?: number;
17260
17928
  order_id: string;
17929
+ source?: string;
17930
+ total_layers_used?: number;
17261
17931
  updated_at?: string;
17262
17932
  };
17263
17933
  Update: {
17934
+ algorithm_version?: number;
17264
17935
  cart_number?: number;
17265
17936
  created_at?: string;
17266
17937
  id?: string;
17267
17938
  is_auto?: boolean;
17268
17939
  is_complete?: boolean;
17269
17940
  notes?: string | null;
17941
+ occupancy_pct?: number;
17270
17942
  order_id?: string;
17943
+ source?: string;
17944
+ total_layers_used?: number;
17271
17945
  updated_at?: string;
17272
17946
  };
17273
17947
  Relationships: [{
@@ -17420,6 +18094,8 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
17420
18094
  order_date: string;
17421
18095
  order_number: string;
17422
18096
  order_source: string;
18097
+ plan_locked_at: string | null;
18098
+ plan_locked_ref: string | null;
17423
18099
  status: string;
17424
18100
  total: string;
17425
18101
  updated_at: string;
@@ -17436,6 +18112,8 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
17436
18112
  order_date?: string;
17437
18113
  order_number: string;
17438
18114
  order_source?: string;
18115
+ plan_locked_at?: string | null;
18116
+ plan_locked_ref?: string | null;
17439
18117
  status?: string;
17440
18118
  total?: string;
17441
18119
  updated_at?: string;
@@ -17452,6 +18130,8 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
17452
18130
  order_date?: string;
17453
18131
  order_number?: string;
17454
18132
  order_source?: string;
18133
+ plan_locked_at?: string | null;
18134
+ plan_locked_ref?: string | null;
17455
18135
  status?: string;
17456
18136
  total?: string;
17457
18137
  updated_at?: string;
@@ -17824,6 +18504,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
17824
18504
  display_name: string | null;
17825
18505
  email: string | null;
17826
18506
  id: string;
18507
+ is_superadmin: boolean;
17827
18508
  notification_preferences: import("../integrations/supabase/types").Json;
17828
18509
  tenant_id: string | null;
17829
18510
  updated_at: string;
@@ -17833,6 +18514,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
17833
18514
  display_name?: string | null;
17834
18515
  email?: string | null;
17835
18516
  id: string;
18517
+ is_superadmin?: boolean;
17836
18518
  notification_preferences?: import("../integrations/supabase/types").Json;
17837
18519
  tenant_id?: string | null;
17838
18520
  updated_at?: string;
@@ -17842,6 +18524,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
17842
18524
  display_name?: string | null;
17843
18525
  email?: string | null;
17844
18526
  id?: string;
18527
+ is_superadmin?: boolean;
17845
18528
  notification_preferences?: import("../integrations/supabase/types").Json;
17846
18529
  tenant_id?: string | null;
17847
18530
  updated_at?: string;
@@ -18631,6 +19314,24 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
18631
19314
  };
18632
19315
  Relationships: [];
18633
19316
  };
19317
+ sidebar_config: {
19318
+ Row: {
19319
+ id: string;
19320
+ module_order: string[];
19321
+ updated_at: string;
19322
+ };
19323
+ Insert: {
19324
+ id?: string;
19325
+ module_order?: string[];
19326
+ updated_at?: string;
19327
+ };
19328
+ Update: {
19329
+ id?: string;
19330
+ module_order?: string[];
19331
+ updated_at?: string;
19332
+ };
19333
+ Relationships: [];
19334
+ };
18634
19335
  stock_import_runs: {
18635
19336
  Row: {
18636
19337
  connection_id: string | null;
@@ -18689,7 +19390,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
18689
19390
  reason: string | null;
18690
19391
  reserved_after: number | null;
18691
19392
  reserved_before: number | null;
18692
- trade_item_key: string;
19393
+ trade_item_key: string | null;
18693
19394
  };
18694
19395
  Insert: {
18695
19396
  connection_id?: string | null;
@@ -18706,7 +19407,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
18706
19407
  reason?: string | null;
18707
19408
  reserved_after?: number | null;
18708
19409
  reserved_before?: number | null;
18709
- trade_item_key: string;
19410
+ trade_item_key?: string | null;
18710
19411
  };
18711
19412
  Update: {
18712
19413
  connection_id?: string | null;
@@ -18723,7 +19424,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
18723
19424
  reason?: string | null;
18724
19425
  reserved_after?: number | null;
18725
19426
  reserved_before?: number | null;
18726
- trade_item_key?: string;
19427
+ trade_item_key?: string | null;
18727
19428
  };
18728
19429
  Relationships: [];
18729
19430
  };
@@ -19066,6 +19767,114 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
19066
19767
  };
19067
19768
  Relationships: [];
19068
19769
  };
19770
+ trade_item_supply_lines: {
19771
+ Row: {
19772
+ available_quantity: number | null;
19773
+ connection_id: string;
19774
+ created_at: string;
19775
+ currency: string | null;
19776
+ endpoint_family: string | null;
19777
+ environment: string | null;
19778
+ id: string;
19779
+ last_error: string | null;
19780
+ last_status: number | null;
19781
+ packing_configuration_id: string | null;
19782
+ period_end: string | null;
19783
+ period_start: string | null;
19784
+ price_per_piece: number | null;
19785
+ sales_unit: string | null;
19786
+ supply_line_id: string | null;
19787
+ supply_type: string;
19788
+ trade_item_id: string;
19789
+ updated_at: string;
19790
+ user_id: string;
19791
+ week: number | null;
19792
+ year: number | null;
19793
+ };
19794
+ Insert: {
19795
+ available_quantity?: number | null;
19796
+ connection_id: string;
19797
+ created_at?: string;
19798
+ currency?: string | null;
19799
+ endpoint_family?: string | null;
19800
+ environment?: string | null;
19801
+ id?: string;
19802
+ last_error?: string | null;
19803
+ last_status?: number | null;
19804
+ packing_configuration_id?: string | null;
19805
+ period_end?: string | null;
19806
+ period_start?: string | null;
19807
+ price_per_piece?: number | null;
19808
+ sales_unit?: string | null;
19809
+ supply_line_id?: string | null;
19810
+ supply_type?: string;
19811
+ trade_item_id: string;
19812
+ updated_at?: string;
19813
+ user_id: string;
19814
+ week?: number | null;
19815
+ year?: number | null;
19816
+ };
19817
+ Update: {
19818
+ available_quantity?: number | null;
19819
+ connection_id?: string;
19820
+ created_at?: string;
19821
+ currency?: string | null;
19822
+ endpoint_family?: string | null;
19823
+ environment?: string | null;
19824
+ id?: string;
19825
+ last_error?: string | null;
19826
+ last_status?: number | null;
19827
+ packing_configuration_id?: string | null;
19828
+ period_end?: string | null;
19829
+ period_start?: string | null;
19830
+ price_per_piece?: number | null;
19831
+ sales_unit?: string | null;
19832
+ supply_line_id?: string | null;
19833
+ supply_type?: string;
19834
+ trade_item_id?: string;
19835
+ updated_at?: string;
19836
+ user_id?: string;
19837
+ week?: number | null;
19838
+ year?: number | null;
19839
+ };
19840
+ Relationships: [];
19841
+ };
19842
+ trade_item_warehouse_preferences: {
19843
+ Row: {
19844
+ connection_id: string;
19845
+ created_at: string;
19846
+ id: string;
19847
+ trade_item_id: string;
19848
+ updated_at: string;
19849
+ warehouse_id: string;
19850
+ warehouse_name: string | null;
19851
+ };
19852
+ Insert: {
19853
+ connection_id: string;
19854
+ created_at?: string;
19855
+ id?: string;
19856
+ trade_item_id: string;
19857
+ updated_at?: string;
19858
+ warehouse_id: string;
19859
+ warehouse_name?: string | null;
19860
+ };
19861
+ Update: {
19862
+ connection_id?: string;
19863
+ created_at?: string;
19864
+ id?: string;
19865
+ trade_item_id?: string;
19866
+ updated_at?: string;
19867
+ warehouse_id?: string;
19868
+ warehouse_name?: string | null;
19869
+ };
19870
+ Relationships: [{
19871
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
19872
+ columns: ["connection_id"];
19873
+ isOneToOne: false;
19874
+ referencedRelation: "floriday_connections";
19875
+ referencedColumns: ["id"];
19876
+ }];
19877
+ };
19069
19878
  twinfield_connections: {
19070
19879
  Row: {
19071
19880
  access_token: string | null;
@@ -19385,6 +20194,10 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
19385
20194
  default_invoice_type: string;
19386
20195
  default_payment_term_days: number;
19387
20196
  default_vat_code: string;
20197
+ invoice_enabled_ao: boolean;
20198
+ invoice_enabled_fo: boolean;
20199
+ invoice_enabled_ho: boolean;
20200
+ invoice_enabled_mo: boolean;
19388
20201
  updated_at: string;
19389
20202
  user_id: string;
19390
20203
  };
@@ -19394,6 +20207,10 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
19394
20207
  default_invoice_type?: string;
19395
20208
  default_payment_term_days?: number;
19396
20209
  default_vat_code?: string;
20210
+ invoice_enabled_ao?: boolean;
20211
+ invoice_enabled_fo?: boolean;
20212
+ invoice_enabled_ho?: boolean;
20213
+ invoice_enabled_mo?: boolean;
19397
20214
  updated_at?: string;
19398
20215
  user_id: string;
19399
20216
  };
@@ -19403,6 +20220,10 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
19403
20220
  default_invoice_type?: string;
19404
20221
  default_payment_term_days?: number;
19405
20222
  default_vat_code?: string;
20223
+ invoice_enabled_ao?: boolean;
20224
+ invoice_enabled_fo?: boolean;
20225
+ invoice_enabled_ho?: boolean;
20226
+ invoice_enabled_mo?: boolean;
19406
20227
  updated_at?: string;
19407
20228
  user_id?: string;
19408
20229
  };
@@ -20697,6 +21518,12 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
20697
21518
  order_number: string;
20698
21519
  }[];
20699
21520
  };
21521
+ autolink_product_to_floriday: {
21522
+ Args: {
21523
+ p_product_id: string;
21524
+ };
21525
+ Returns: string;
21526
+ };
20700
21527
  backfill_open_order_reservations: {
20701
21528
  Args: never;
20702
21529
  Returns: {
@@ -20735,6 +21562,18 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
20735
21562
  Args: never;
20736
21563
  Returns: number;
20737
21564
  };
21565
+ consume_floriday_rate_limit: {
21566
+ Args: {
21567
+ p_bucket: string;
21568
+ p_capacity: number;
21569
+ p_cost?: number;
21570
+ p_refill_per_sec: number;
21571
+ };
21572
+ Returns: {
21573
+ granted: boolean;
21574
+ wait_ms: number;
21575
+ }[];
21576
+ };
20738
21577
  control_get_todays_carts: {
20739
21578
  Args: never;
20740
21579
  Returns: {
@@ -20815,6 +21654,12 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
20815
21654
  status: string;
20816
21655
  }[];
20817
21656
  };
21657
+ enqueue_cart_replan_if_unlocked: {
21658
+ Args: {
21659
+ p_order_id: string;
21660
+ };
21661
+ Returns: undefined;
21662
+ };
20818
21663
  ensure_trade_item_stock_row: {
20819
21664
  Args: {
20820
21665
  p_key: string;
@@ -20921,6 +21766,13 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
20921
21766
  office_code: string;
20922
21767
  }[];
20923
21768
  };
21769
+ get_floricode_record_counts: {
21770
+ Args: never;
21771
+ Returns: {
21772
+ count: number;
21773
+ resource: string;
21774
+ }[];
21775
+ };
20924
21776
  get_floriday_agreements_active: {
20925
21777
  Args: {
20926
21778
  p_on_date?: string;
@@ -21012,6 +21864,12 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
21012
21864
  };
21013
21865
  Returns: import("../integrations/supabase/types").Json;
21014
21866
  };
21867
+ get_offer_delivery_options: {
21868
+ Args: {
21869
+ p_code: string;
21870
+ };
21871
+ Returns: import("../integrations/supabase/types").Json;
21872
+ };
21015
21873
  get_offer_recipient_by_code: {
21016
21874
  Args: {
21017
21875
  p_code: string;
@@ -21076,6 +21934,12 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
21076
21934
  Args: never;
21077
21935
  Returns: boolean;
21078
21936
  };
21937
+ is_superadmin: {
21938
+ Args: {
21939
+ _user_id: string;
21940
+ };
21941
+ Returns: boolean;
21942
+ };
21079
21943
  local_effective_price: {
21080
21944
  Args: {
21081
21945
  _customer_id: string;
@@ -21110,6 +21974,13 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
21110
21974
  };
21111
21975
  Returns: string;
21112
21976
  };
21977
+ next_order_number_for_date: {
21978
+ Args: {
21979
+ p_created_at?: string;
21980
+ p_prefix: string;
21981
+ };
21982
+ Returns: string;
21983
+ };
21113
21984
  next_work_order_number: {
21114
21985
  Args: {
21115
21986
  p_parent_work_order_id?: string;
@@ -21117,6 +21988,12 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
21117
21988
  };
21118
21989
  Returns: string;
21119
21990
  };
21991
+ normalize_order_source: {
21992
+ Args: {
21993
+ p_src: string;
21994
+ };
21995
+ Returns: string;
21996
+ };
21120
21997
  normalize_vat: {
21121
21998
  Args: {
21122
21999
  v: string;
@@ -21131,10 +22008,21 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
21131
22008
  };
21132
22009
  Returns: boolean;
21133
22010
  };
22011
+ order_number_prefix: {
22012
+ Args: {
22013
+ p_custom_fields?: import("../integrations/supabase/types").Json;
22014
+ p_order_source: string;
22015
+ };
22016
+ Returns: string;
22017
+ };
21134
22018
  pickstation_get_orders_raw: {
21135
22019
  Args: never;
21136
22020
  Returns: import("../integrations/supabase/types").Json;
21137
22021
  };
22022
+ pickstation_get_planning_context: {
22023
+ Args: never;
22024
+ Returns: import("../integrations/supabase/types").Json;
22025
+ };
21138
22026
  pickstation_get_settings: {
21139
22027
  Args: never;
21140
22028
  Returns: import("../integrations/supabase/types").Json;
@@ -21165,6 +22053,28 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
21165
22053
  };
21166
22054
  Returns: undefined;
21167
22055
  };
22056
+ recompute_order_status: {
22057
+ Args: {
22058
+ p_order_id: string;
22059
+ };
22060
+ Returns: undefined;
22061
+ };
22062
+ recompute_reserved_for_order: {
22063
+ Args: {
22064
+ p_order_id: string;
22065
+ };
22066
+ Returns: undefined;
22067
+ };
22068
+ recompute_reserved_stock: {
22069
+ Args: {
22070
+ p_trade_item_key: string;
22071
+ };
22072
+ Returns: undefined;
22073
+ };
22074
+ refresh_external_customers_grouped: {
22075
+ Args: never;
22076
+ Returns: undefined;
22077
+ };
21168
22078
  refresh_floricode_derived_code_lists: {
21169
22079
  Args: never;
21170
22080
  Returns: {
@@ -21179,6 +22089,12 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
21179
22089
  };
21180
22090
  Returns: number;
21181
22091
  };
22092
+ refresh_floricode_derived_for_products: {
22093
+ Args: {
22094
+ _product_ids: string[];
22095
+ };
22096
+ Returns: number;
22097
+ };
21182
22098
  reset_floriday_sync_cursor: {
21183
22099
  Args: {
21184
22100
  p_connection_id: string;
@@ -21186,6 +22102,12 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
21186
22102
  };
21187
22103
  Returns: undefined;
21188
22104
  };
22105
+ resolve_product_id_for_item: {
22106
+ Args: {
22107
+ p_product_name: string;
22108
+ };
22109
+ Returns: string;
22110
+ };
21189
22111
  schedule_floriday_additional_services_sync: {
21190
22112
  Args: {
21191
22113
  p_apikey: string;
@@ -21463,6 +22385,24 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
21463
22385
  };
21464
22386
  Returns: string[];
21465
22387
  };
22388
+ sync_cached_packing_from_product: {
22389
+ Args: {
22390
+ p_product_id: string;
22391
+ };
22392
+ Returns: undefined;
22393
+ };
22394
+ sync_order_cart_item_packing_from_product: {
22395
+ Args: {
22396
+ p_product_id: string;
22397
+ };
22398
+ Returns: undefined;
22399
+ };
22400
+ sync_product_packing_from_floriday_cache: {
22401
+ Args: {
22402
+ p_floriday_id: string;
22403
+ };
22404
+ Returns: undefined;
22405
+ };
21466
22406
  twinfield_decrypt: {
21467
22407
  Args: {
21468
22408
  cipher: string;
@@ -21494,7 +22434,10 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
21494
22434
  Tables: {
21495
22435
  afhandeling_settings: {
21496
22436
  Row: {
22437
+ auto_print_delivery_note: boolean;
22438
+ auto_process_paused: boolean;
21497
22439
  created_at: string;
22440
+ extra_pick_days_with_stickers: number;
21498
22441
  id: string;
21499
22442
  max_workdays_earlier_pick: number;
21500
22443
  pick_days_before_transport: number;
@@ -21508,7 +22451,10 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
21508
22451
  user_id: string;
21509
22452
  };
21510
22453
  Insert: {
22454
+ auto_print_delivery_note?: boolean;
22455
+ auto_process_paused?: boolean;
21511
22456
  created_at?: string;
22457
+ extra_pick_days_with_stickers?: number;
21512
22458
  id?: string;
21513
22459
  max_workdays_earlier_pick?: number;
21514
22460
  pick_days_before_transport?: number;
@@ -21522,7 +22468,10 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
21522
22468
  user_id: string;
21523
22469
  };
21524
22470
  Update: {
22471
+ auto_print_delivery_note?: boolean;
22472
+ auto_process_paused?: boolean;
21525
22473
  created_at?: string;
22474
+ extra_pick_days_with_stickers?: number;
21526
22475
  id?: string;
21527
22476
  max_workdays_earlier_pick?: number;
21528
22477
  pick_days_before_transport?: number;
@@ -22314,6 +23263,36 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
22314
23263
  };
22315
23264
  Relationships: [];
22316
23265
  };
23266
+ cart_replan_queue: {
23267
+ Row: {
23268
+ attempts: number;
23269
+ last_error: string | null;
23270
+ order_id: string;
23271
+ processed_at: string | null;
23272
+ requested_at: string;
23273
+ };
23274
+ Insert: {
23275
+ attempts?: number;
23276
+ last_error?: string | null;
23277
+ order_id: string;
23278
+ processed_at?: string | null;
23279
+ requested_at?: string;
23280
+ };
23281
+ Update: {
23282
+ attempts?: number;
23283
+ last_error?: string | null;
23284
+ order_id?: string;
23285
+ processed_at?: string | null;
23286
+ requested_at?: string;
23287
+ };
23288
+ Relationships: [{
23289
+ foreignKeyName: "cart_replan_queue_order_id_fkey";
23290
+ columns: ["order_id"];
23291
+ isOneToOne: true;
23292
+ referencedRelation: "orders";
23293
+ referencedColumns: ["id"];
23294
+ }];
23295
+ };
22317
23296
  collections: {
22318
23297
  Row: {
22319
23298
  created_at: string;
@@ -24439,34 +25418,52 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
24439
25418
  Row: {
24440
25419
  catalog_key: string | null;
24441
25420
  catalog_url: string;
25421
+ client_id: string | null;
25422
+ client_secret_ciphertext: string | null;
25423
+ client_secret_last4: string | null;
24442
25424
  created_at: string;
24443
25425
  id: number;
24444
25426
  last_meta: import("../integrations/supabase/types").Json | null;
24445
25427
  last_test_at: string | null;
24446
25428
  last_test_error: string | null;
24447
25429
  last_test_ok: boolean | null;
25430
+ last_token_test_at: string | null;
25431
+ last_token_test_error: string | null;
25432
+ last_token_test_ok: boolean | null;
24448
25433
  updated_at: string;
24449
25434
  };
24450
25435
  Insert: {
24451
25436
  catalog_key?: string | null;
24452
25437
  catalog_url?: string;
25438
+ client_id?: string | null;
25439
+ client_secret_ciphertext?: string | null;
25440
+ client_secret_last4?: string | null;
24453
25441
  created_at?: string;
24454
25442
  id?: number;
24455
25443
  last_meta?: import("../integrations/supabase/types").Json | null;
24456
25444
  last_test_at?: string | null;
24457
25445
  last_test_error?: string | null;
24458
25446
  last_test_ok?: boolean | null;
25447
+ last_token_test_at?: string | null;
25448
+ last_token_test_error?: string | null;
25449
+ last_token_test_ok?: boolean | null;
24459
25450
  updated_at?: string;
24460
25451
  };
24461
25452
  Update: {
24462
25453
  catalog_key?: string | null;
24463
25454
  catalog_url?: string;
25455
+ client_id?: string | null;
25456
+ client_secret_ciphertext?: string | null;
25457
+ client_secret_last4?: string | null;
24464
25458
  created_at?: string;
24465
25459
  id?: number;
24466
25460
  last_meta?: import("../integrations/supabase/types").Json | null;
24467
25461
  last_test_at?: string | null;
24468
25462
  last_test_error?: string | null;
24469
25463
  last_test_ok?: boolean | null;
25464
+ last_token_test_at?: string | null;
25465
+ last_token_test_error?: string | null;
25466
+ last_token_test_ok?: boolean | null;
24470
25467
  updated_at?: string;
24471
25468
  };
24472
25469
  Relationships: [];
@@ -24699,6 +25696,54 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
24699
25696
  referencedColumns: ["id"];
24700
25697
  }];
24701
25698
  };
25699
+ floriday_auto_fulfillment_log: {
25700
+ Row: {
25701
+ attempts: number;
25702
+ connection_id: string;
25703
+ created_at: string;
25704
+ error: string | null;
25705
+ fulfillment_order_id: string | null;
25706
+ id: string;
25707
+ last_attempt_at: string | null;
25708
+ reason: string | null;
25709
+ sales_order_id: string;
25710
+ status: string;
25711
+ updated_at: string;
25712
+ };
25713
+ Insert: {
25714
+ attempts?: number;
25715
+ connection_id: string;
25716
+ created_at?: string;
25717
+ error?: string | null;
25718
+ fulfillment_order_id?: string | null;
25719
+ id?: string;
25720
+ last_attempt_at?: string | null;
25721
+ reason?: string | null;
25722
+ sales_order_id: string;
25723
+ status?: string;
25724
+ updated_at?: string;
25725
+ };
25726
+ Update: {
25727
+ attempts?: number;
25728
+ connection_id?: string;
25729
+ created_at?: string;
25730
+ error?: string | null;
25731
+ fulfillment_order_id?: string | null;
25732
+ id?: string;
25733
+ last_attempt_at?: string | null;
25734
+ reason?: string | null;
25735
+ sales_order_id?: string;
25736
+ status?: string;
25737
+ updated_at?: string;
25738
+ };
25739
+ Relationships: [{
25740
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
25741
+ columns: ["connection_id"];
25742
+ isOneToOne: false;
25743
+ referencedRelation: "floriday_connections";
25744
+ referencedColumns: ["id"];
25745
+ }];
25746
+ };
24702
25747
  floriday_base_items_cache: {
24703
25748
  Row: {
24704
25749
  connection_id: string;
@@ -25803,6 +26848,24 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
25803
26848
  referencedColumns: ["id"];
25804
26849
  }];
25805
26850
  };
26851
+ floriday_rate_limit_state: {
26852
+ Row: {
26853
+ bucket: string;
26854
+ last_refill_at: string;
26855
+ tokens: number;
26856
+ };
26857
+ Insert: {
26858
+ bucket: string;
26859
+ last_refill_at?: string;
26860
+ tokens: number;
26861
+ };
26862
+ Update: {
26863
+ bucket?: string;
26864
+ last_refill_at?: string;
26865
+ tokens?: number;
26866
+ };
26867
+ Relationships: [];
26868
+ };
25806
26869
  floriday_resource_schemas: {
25807
26870
  Row: {
25808
26871
  enums: import("../integrations/supabase/types").Json;
@@ -26226,6 +27289,60 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
26226
27289
  referencedColumns: ["id"];
26227
27290
  }];
26228
27291
  };
27292
+ flow_role_assignments: {
27293
+ Row: {
27294
+ created_at: string;
27295
+ id: string;
27296
+ role_id: string;
27297
+ user_id: string;
27298
+ };
27299
+ Insert: {
27300
+ created_at?: string;
27301
+ id?: string;
27302
+ role_id: string;
27303
+ user_id: string;
27304
+ };
27305
+ Update: {
27306
+ created_at?: string;
27307
+ id?: string;
27308
+ role_id?: string;
27309
+ user_id?: string;
27310
+ };
27311
+ Relationships: [{
27312
+ foreignKeyName: "flow_role_assignments_role_id_fkey";
27313
+ columns: ["role_id"];
27314
+ isOneToOne: false;
27315
+ referencedRelation: "flow_roles";
27316
+ referencedColumns: ["id"];
27317
+ }];
27318
+ };
27319
+ flow_roles: {
27320
+ Row: {
27321
+ created_at: string;
27322
+ description: string | null;
27323
+ id: string;
27324
+ module_access: string[];
27325
+ name: string;
27326
+ updated_at: string;
27327
+ };
27328
+ Insert: {
27329
+ created_at?: string;
27330
+ description?: string | null;
27331
+ id?: string;
27332
+ module_access?: string[];
27333
+ name: string;
27334
+ updated_at?: string;
27335
+ };
27336
+ Update: {
27337
+ created_at?: string;
27338
+ description?: string | null;
27339
+ id?: string;
27340
+ module_access?: string[];
27341
+ name?: string;
27342
+ updated_at?: string;
27343
+ };
27344
+ Relationships: [];
27345
+ };
26229
27346
  imap_accounts: {
26230
27347
  Row: {
26231
27348
  created_at: string;
@@ -26857,6 +27974,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
26857
27974
  matched_customer_id: string | null;
26858
27975
  message_id: string;
26859
27976
  notes: string | null;
27977
+ order_number: string | null;
26860
27978
  parsed_payload: import("../integrations/supabase/types").Json | null;
26861
27979
  reviewed_at: string | null;
26862
27980
  reviewed_by: string | null;
@@ -26872,6 +27990,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
26872
27990
  matched_customer_id?: string | null;
26873
27991
  message_id: string;
26874
27992
  notes?: string | null;
27993
+ order_number?: string | null;
26875
27994
  parsed_payload?: import("../integrations/supabase/types").Json | null;
26876
27995
  reviewed_at?: string | null;
26877
27996
  reviewed_by?: string | null;
@@ -26887,6 +28006,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
26887
28006
  matched_customer_id?: string | null;
26888
28007
  message_id?: string;
26889
28008
  notes?: string | null;
28009
+ order_number?: string | null;
26890
28010
  parsed_payload?: import("../integrations/supabase/types").Json | null;
26891
28011
  reviewed_at?: string | null;
26892
28012
  reviewed_by?: string | null;
@@ -27743,6 +28863,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
27743
28863
  id: string;
27744
28864
  items: import("../integrations/supabase/types").Json;
27745
28865
  notes: string | null;
28866
+ order_number: string | null;
27746
28867
  recipient_id: string;
27747
28868
  total_amount: number;
27748
28869
  };
@@ -27756,6 +28877,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
27756
28877
  id?: string;
27757
28878
  items?: import("../integrations/supabase/types").Json;
27758
28879
  notes?: string | null;
28880
+ order_number?: string | null;
27759
28881
  recipient_id: string;
27760
28882
  total_amount?: number;
27761
28883
  };
@@ -27769,6 +28891,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
27769
28891
  id?: string;
27770
28892
  items?: import("../integrations/supabase/types").Json;
27771
28893
  notes?: string | null;
28894
+ order_number?: string | null;
27772
28895
  recipient_id?: string;
27773
28896
  total_amount?: number;
27774
28897
  };
@@ -27928,6 +29051,9 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
27928
29051
  crates_per_layer: number;
27929
29052
  created_at: string;
27930
29053
  id: string;
29054
+ layer_fraction: number;
29055
+ layer_share_pct: number;
29056
+ layers_per_cart: number;
27931
29057
  order_item_id: string | null;
27932
29058
  plants_per_crate: number;
27933
29059
  product_id: string | null;
@@ -27939,6 +29065,9 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
27939
29065
  crates_per_layer?: number;
27940
29066
  created_at?: string;
27941
29067
  id?: string;
29068
+ layer_fraction?: number;
29069
+ layer_share_pct?: number;
29070
+ layers_per_cart?: number;
27942
29071
  order_item_id?: string | null;
27943
29072
  plants_per_crate?: number;
27944
29073
  product_id?: string | null;
@@ -27950,6 +29079,9 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
27950
29079
  crates_per_layer?: number;
27951
29080
  created_at?: string;
27952
29081
  id?: string;
29082
+ layer_fraction?: number;
29083
+ layer_share_pct?: number;
29084
+ layers_per_cart?: number;
27953
29085
  order_item_id?: string | null;
27954
29086
  plants_per_crate?: number;
27955
29087
  product_id?: string | null;
@@ -27977,33 +29109,45 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
27977
29109
  };
27978
29110
  order_carts: {
27979
29111
  Row: {
29112
+ algorithm_version: number;
27980
29113
  cart_number: number;
27981
29114
  created_at: string;
27982
29115
  id: string;
27983
29116
  is_auto: boolean;
27984
29117
  is_complete: boolean;
27985
29118
  notes: string | null;
29119
+ occupancy_pct: number;
27986
29120
  order_id: string;
29121
+ source: string;
29122
+ total_layers_used: number;
27987
29123
  updated_at: string;
27988
29124
  };
27989
29125
  Insert: {
29126
+ algorithm_version?: number;
27990
29127
  cart_number: number;
27991
29128
  created_at?: string;
27992
29129
  id?: string;
27993
29130
  is_auto?: boolean;
27994
29131
  is_complete?: boolean;
27995
29132
  notes?: string | null;
29133
+ occupancy_pct?: number;
27996
29134
  order_id: string;
29135
+ source?: string;
29136
+ total_layers_used?: number;
27997
29137
  updated_at?: string;
27998
29138
  };
27999
29139
  Update: {
29140
+ algorithm_version?: number;
28000
29141
  cart_number?: number;
28001
29142
  created_at?: string;
28002
29143
  id?: string;
28003
29144
  is_auto?: boolean;
28004
29145
  is_complete?: boolean;
28005
29146
  notes?: string | null;
29147
+ occupancy_pct?: number;
28006
29148
  order_id?: string;
29149
+ source?: string;
29150
+ total_layers_used?: number;
28007
29151
  updated_at?: string;
28008
29152
  };
28009
29153
  Relationships: [{
@@ -28156,6 +29300,8 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
28156
29300
  order_date: string;
28157
29301
  order_number: string;
28158
29302
  order_source: string;
29303
+ plan_locked_at: string | null;
29304
+ plan_locked_ref: string | null;
28159
29305
  status: string;
28160
29306
  total: string;
28161
29307
  updated_at: string;
@@ -28172,6 +29318,8 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
28172
29318
  order_date?: string;
28173
29319
  order_number: string;
28174
29320
  order_source?: string;
29321
+ plan_locked_at?: string | null;
29322
+ plan_locked_ref?: string | null;
28175
29323
  status?: string;
28176
29324
  total?: string;
28177
29325
  updated_at?: string;
@@ -28188,6 +29336,8 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
28188
29336
  order_date?: string;
28189
29337
  order_number?: string;
28190
29338
  order_source?: string;
29339
+ plan_locked_at?: string | null;
29340
+ plan_locked_ref?: string | null;
28191
29341
  status?: string;
28192
29342
  total?: string;
28193
29343
  updated_at?: string;
@@ -28560,6 +29710,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
28560
29710
  display_name: string | null;
28561
29711
  email: string | null;
28562
29712
  id: string;
29713
+ is_superadmin: boolean;
28563
29714
  notification_preferences: import("../integrations/supabase/types").Json;
28564
29715
  tenant_id: string | null;
28565
29716
  updated_at: string;
@@ -28569,6 +29720,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
28569
29720
  display_name?: string | null;
28570
29721
  email?: string | null;
28571
29722
  id: string;
29723
+ is_superadmin?: boolean;
28572
29724
  notification_preferences?: import("../integrations/supabase/types").Json;
28573
29725
  tenant_id?: string | null;
28574
29726
  updated_at?: string;
@@ -28578,6 +29730,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
28578
29730
  display_name?: string | null;
28579
29731
  email?: string | null;
28580
29732
  id?: string;
29733
+ is_superadmin?: boolean;
28581
29734
  notification_preferences?: import("../integrations/supabase/types").Json;
28582
29735
  tenant_id?: string | null;
28583
29736
  updated_at?: string;
@@ -29367,6 +30520,24 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
29367
30520
  };
29368
30521
  Relationships: [];
29369
30522
  };
30523
+ sidebar_config: {
30524
+ Row: {
30525
+ id: string;
30526
+ module_order: string[];
30527
+ updated_at: string;
30528
+ };
30529
+ Insert: {
30530
+ id?: string;
30531
+ module_order?: string[];
30532
+ updated_at?: string;
30533
+ };
30534
+ Update: {
30535
+ id?: string;
30536
+ module_order?: string[];
30537
+ updated_at?: string;
30538
+ };
30539
+ Relationships: [];
30540
+ };
29370
30541
  stock_import_runs: {
29371
30542
  Row: {
29372
30543
  connection_id: string | null;
@@ -29425,7 +30596,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
29425
30596
  reason: string | null;
29426
30597
  reserved_after: number | null;
29427
30598
  reserved_before: number | null;
29428
- trade_item_key: string;
30599
+ trade_item_key: string | null;
29429
30600
  };
29430
30601
  Insert: {
29431
30602
  connection_id?: string | null;
@@ -29442,7 +30613,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
29442
30613
  reason?: string | null;
29443
30614
  reserved_after?: number | null;
29444
30615
  reserved_before?: number | null;
29445
- trade_item_key: string;
30616
+ trade_item_key?: string | null;
29446
30617
  };
29447
30618
  Update: {
29448
30619
  connection_id?: string | null;
@@ -29459,7 +30630,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
29459
30630
  reason?: string | null;
29460
30631
  reserved_after?: number | null;
29461
30632
  reserved_before?: number | null;
29462
- trade_item_key?: string;
30633
+ trade_item_key?: string | null;
29463
30634
  };
29464
30635
  Relationships: [];
29465
30636
  };
@@ -29802,6 +30973,114 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
29802
30973
  };
29803
30974
  Relationships: [];
29804
30975
  };
30976
+ trade_item_supply_lines: {
30977
+ Row: {
30978
+ available_quantity: number | null;
30979
+ connection_id: string;
30980
+ created_at: string;
30981
+ currency: string | null;
30982
+ endpoint_family: string | null;
30983
+ environment: string | null;
30984
+ id: string;
30985
+ last_error: string | null;
30986
+ last_status: number | null;
30987
+ packing_configuration_id: string | null;
30988
+ period_end: string | null;
30989
+ period_start: string | null;
30990
+ price_per_piece: number | null;
30991
+ sales_unit: string | null;
30992
+ supply_line_id: string | null;
30993
+ supply_type: string;
30994
+ trade_item_id: string;
30995
+ updated_at: string;
30996
+ user_id: string;
30997
+ week: number | null;
30998
+ year: number | null;
30999
+ };
31000
+ Insert: {
31001
+ available_quantity?: number | null;
31002
+ connection_id: string;
31003
+ created_at?: string;
31004
+ currency?: string | null;
31005
+ endpoint_family?: string | null;
31006
+ environment?: string | null;
31007
+ id?: string;
31008
+ last_error?: string | null;
31009
+ last_status?: number | null;
31010
+ packing_configuration_id?: string | null;
31011
+ period_end?: string | null;
31012
+ period_start?: string | null;
31013
+ price_per_piece?: number | null;
31014
+ sales_unit?: string | null;
31015
+ supply_line_id?: string | null;
31016
+ supply_type?: string;
31017
+ trade_item_id: string;
31018
+ updated_at?: string;
31019
+ user_id: string;
31020
+ week?: number | null;
31021
+ year?: number | null;
31022
+ };
31023
+ Update: {
31024
+ available_quantity?: number | null;
31025
+ connection_id?: string;
31026
+ created_at?: string;
31027
+ currency?: string | null;
31028
+ endpoint_family?: string | null;
31029
+ environment?: string | null;
31030
+ id?: string;
31031
+ last_error?: string | null;
31032
+ last_status?: number | null;
31033
+ packing_configuration_id?: string | null;
31034
+ period_end?: string | null;
31035
+ period_start?: string | null;
31036
+ price_per_piece?: number | null;
31037
+ sales_unit?: string | null;
31038
+ supply_line_id?: string | null;
31039
+ supply_type?: string;
31040
+ trade_item_id?: string;
31041
+ updated_at?: string;
31042
+ user_id?: string;
31043
+ week?: number | null;
31044
+ year?: number | null;
31045
+ };
31046
+ Relationships: [];
31047
+ };
31048
+ trade_item_warehouse_preferences: {
31049
+ Row: {
31050
+ connection_id: string;
31051
+ created_at: string;
31052
+ id: string;
31053
+ trade_item_id: string;
31054
+ updated_at: string;
31055
+ warehouse_id: string;
31056
+ warehouse_name: string | null;
31057
+ };
31058
+ Insert: {
31059
+ connection_id: string;
31060
+ created_at?: string;
31061
+ id?: string;
31062
+ trade_item_id: string;
31063
+ updated_at?: string;
31064
+ warehouse_id: string;
31065
+ warehouse_name?: string | null;
31066
+ };
31067
+ Update: {
31068
+ connection_id?: string;
31069
+ created_at?: string;
31070
+ id?: string;
31071
+ trade_item_id?: string;
31072
+ updated_at?: string;
31073
+ warehouse_id?: string;
31074
+ warehouse_name?: string | null;
31075
+ };
31076
+ Relationships: [{
31077
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
31078
+ columns: ["connection_id"];
31079
+ isOneToOne: false;
31080
+ referencedRelation: "floriday_connections";
31081
+ referencedColumns: ["id"];
31082
+ }];
31083
+ };
29805
31084
  twinfield_connections: {
29806
31085
  Row: {
29807
31086
  access_token: string | null;
@@ -30121,6 +31400,10 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
30121
31400
  default_invoice_type: string;
30122
31401
  default_payment_term_days: number;
30123
31402
  default_vat_code: string;
31403
+ invoice_enabled_ao: boolean;
31404
+ invoice_enabled_fo: boolean;
31405
+ invoice_enabled_ho: boolean;
31406
+ invoice_enabled_mo: boolean;
30124
31407
  updated_at: string;
30125
31408
  user_id: string;
30126
31409
  };
@@ -30130,6 +31413,10 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
30130
31413
  default_invoice_type?: string;
30131
31414
  default_payment_term_days?: number;
30132
31415
  default_vat_code?: string;
31416
+ invoice_enabled_ao?: boolean;
31417
+ invoice_enabled_fo?: boolean;
31418
+ invoice_enabled_ho?: boolean;
31419
+ invoice_enabled_mo?: boolean;
30133
31420
  updated_at?: string;
30134
31421
  user_id: string;
30135
31422
  };
@@ -30139,6 +31426,10 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
30139
31426
  default_invoice_type?: string;
30140
31427
  default_payment_term_days?: number;
30141
31428
  default_vat_code?: string;
31429
+ invoice_enabled_ao?: boolean;
31430
+ invoice_enabled_fo?: boolean;
31431
+ invoice_enabled_ho?: boolean;
31432
+ invoice_enabled_mo?: boolean;
30142
31433
  updated_at?: string;
30143
31434
  user_id?: string;
30144
31435
  };
@@ -31433,6 +32724,12 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31433
32724
  order_number: string;
31434
32725
  }[];
31435
32726
  };
32727
+ autolink_product_to_floriday: {
32728
+ Args: {
32729
+ p_product_id: string;
32730
+ };
32731
+ Returns: string;
32732
+ };
31436
32733
  backfill_open_order_reservations: {
31437
32734
  Args: never;
31438
32735
  Returns: {
@@ -31471,6 +32768,18 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31471
32768
  Args: never;
31472
32769
  Returns: number;
31473
32770
  };
32771
+ consume_floriday_rate_limit: {
32772
+ Args: {
32773
+ p_bucket: string;
32774
+ p_capacity: number;
32775
+ p_cost?: number;
32776
+ p_refill_per_sec: number;
32777
+ };
32778
+ Returns: {
32779
+ granted: boolean;
32780
+ wait_ms: number;
32781
+ }[];
32782
+ };
31474
32783
  control_get_todays_carts: {
31475
32784
  Args: never;
31476
32785
  Returns: {
@@ -31551,6 +32860,12 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31551
32860
  status: string;
31552
32861
  }[];
31553
32862
  };
32863
+ enqueue_cart_replan_if_unlocked: {
32864
+ Args: {
32865
+ p_order_id: string;
32866
+ };
32867
+ Returns: undefined;
32868
+ };
31554
32869
  ensure_trade_item_stock_row: {
31555
32870
  Args: {
31556
32871
  p_key: string;
@@ -31657,6 +32972,13 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31657
32972
  office_code: string;
31658
32973
  }[];
31659
32974
  };
32975
+ get_floricode_record_counts: {
32976
+ Args: never;
32977
+ Returns: {
32978
+ count: number;
32979
+ resource: string;
32980
+ }[];
32981
+ };
31660
32982
  get_floriday_agreements_active: {
31661
32983
  Args: {
31662
32984
  p_on_date?: string;
@@ -31748,6 +33070,12 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31748
33070
  };
31749
33071
  Returns: import("../integrations/supabase/types").Json;
31750
33072
  };
33073
+ get_offer_delivery_options: {
33074
+ Args: {
33075
+ p_code: string;
33076
+ };
33077
+ Returns: import("../integrations/supabase/types").Json;
33078
+ };
31751
33079
  get_offer_recipient_by_code: {
31752
33080
  Args: {
31753
33081
  p_code: string;
@@ -31812,6 +33140,12 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31812
33140
  Args: never;
31813
33141
  Returns: boolean;
31814
33142
  };
33143
+ is_superadmin: {
33144
+ Args: {
33145
+ _user_id: string;
33146
+ };
33147
+ Returns: boolean;
33148
+ };
31815
33149
  local_effective_price: {
31816
33150
  Args: {
31817
33151
  _customer_id: string;
@@ -31846,6 +33180,13 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31846
33180
  };
31847
33181
  Returns: string;
31848
33182
  };
33183
+ next_order_number_for_date: {
33184
+ Args: {
33185
+ p_created_at?: string;
33186
+ p_prefix: string;
33187
+ };
33188
+ Returns: string;
33189
+ };
31849
33190
  next_work_order_number: {
31850
33191
  Args: {
31851
33192
  p_parent_work_order_id?: string;
@@ -31853,6 +33194,12 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31853
33194
  };
31854
33195
  Returns: string;
31855
33196
  };
33197
+ normalize_order_source: {
33198
+ Args: {
33199
+ p_src: string;
33200
+ };
33201
+ Returns: string;
33202
+ };
31856
33203
  normalize_vat: {
31857
33204
  Args: {
31858
33205
  v: string;
@@ -31867,10 +33214,21 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31867
33214
  };
31868
33215
  Returns: boolean;
31869
33216
  };
33217
+ order_number_prefix: {
33218
+ Args: {
33219
+ p_custom_fields?: import("../integrations/supabase/types").Json;
33220
+ p_order_source: string;
33221
+ };
33222
+ Returns: string;
33223
+ };
31870
33224
  pickstation_get_orders_raw: {
31871
33225
  Args: never;
31872
33226
  Returns: import("../integrations/supabase/types").Json;
31873
33227
  };
33228
+ pickstation_get_planning_context: {
33229
+ Args: never;
33230
+ Returns: import("../integrations/supabase/types").Json;
33231
+ };
31874
33232
  pickstation_get_settings: {
31875
33233
  Args: never;
31876
33234
  Returns: import("../integrations/supabase/types").Json;
@@ -31901,6 +33259,28 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31901
33259
  };
31902
33260
  Returns: undefined;
31903
33261
  };
33262
+ recompute_order_status: {
33263
+ Args: {
33264
+ p_order_id: string;
33265
+ };
33266
+ Returns: undefined;
33267
+ };
33268
+ recompute_reserved_for_order: {
33269
+ Args: {
33270
+ p_order_id: string;
33271
+ };
33272
+ Returns: undefined;
33273
+ };
33274
+ recompute_reserved_stock: {
33275
+ Args: {
33276
+ p_trade_item_key: string;
33277
+ };
33278
+ Returns: undefined;
33279
+ };
33280
+ refresh_external_customers_grouped: {
33281
+ Args: never;
33282
+ Returns: undefined;
33283
+ };
31904
33284
  refresh_floricode_derived_code_lists: {
31905
33285
  Args: never;
31906
33286
  Returns: {
@@ -31915,6 +33295,12 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31915
33295
  };
31916
33296
  Returns: number;
31917
33297
  };
33298
+ refresh_floricode_derived_for_products: {
33299
+ Args: {
33300
+ _product_ids: string[];
33301
+ };
33302
+ Returns: number;
33303
+ };
31918
33304
  reset_floriday_sync_cursor: {
31919
33305
  Args: {
31920
33306
  p_connection_id: string;
@@ -31922,6 +33308,12 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31922
33308
  };
31923
33309
  Returns: undefined;
31924
33310
  };
33311
+ resolve_product_id_for_item: {
33312
+ Args: {
33313
+ p_product_name: string;
33314
+ };
33315
+ Returns: string;
33316
+ };
31925
33317
  schedule_floriday_additional_services_sync: {
31926
33318
  Args: {
31927
33319
  p_apikey: string;
@@ -32199,6 +33591,24 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
32199
33591
  };
32200
33592
  Returns: string[];
32201
33593
  };
33594
+ sync_cached_packing_from_product: {
33595
+ Args: {
33596
+ p_product_id: string;
33597
+ };
33598
+ Returns: undefined;
33599
+ };
33600
+ sync_order_cart_item_packing_from_product: {
33601
+ Args: {
33602
+ p_product_id: string;
33603
+ };
33604
+ Returns: undefined;
33605
+ };
33606
+ sync_product_packing_from_floriday_cache: {
33607
+ Args: {
33608
+ p_floriday_id: string;
33609
+ };
33610
+ Returns: undefined;
33611
+ };
32202
33612
  twinfield_decrypt: {
32203
33613
  Args: {
32204
33614
  cipher: string;