@flowselections/floriday-voorraad 1.0.16 → 1.0.18

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 +490 -3
  30. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  31. package/dist-lib/integrations/supabase/client.d.ts +490 -3
  32. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  33. package/dist-lib/integrations/supabase/client.server.d.ts +490 -3
  34. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  35. package/dist-lib/integrations/supabase/types.d.ts +498 -3
  36. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  37. package/dist-lib/lib/floricode-required-features.functions.d.ts +497 -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 +11281 -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 +13240 -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 +1509 -48
  56. package/dist-lib/lib/floriday-warehouse.functions.d.ts.map +1 -1
  57. package/dist-lib/lib/floriday-writes.functions.d.ts +983 -9
  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;
@@ -319,6 +328,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
319
328
  conflict_reason: string | null;
320
329
  created_at: string;
321
330
  created_by_role: string | null;
331
+ customer_address: string | null;
322
332
  customer_email: string | null;
323
333
  customer_name: string | null;
324
334
  end_time: string;
@@ -344,6 +354,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
344
354
  conflict_reason?: string | null;
345
355
  created_at?: string;
346
356
  created_by_role?: string | null;
357
+ customer_address?: string | null;
347
358
  customer_email?: string | null;
348
359
  customer_name?: string | null;
349
360
  end_time: string;
@@ -369,6 +380,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
369
380
  conflict_reason?: string | null;
370
381
  created_at?: string;
371
382
  created_by_role?: string | null;
383
+ customer_address?: string | null;
372
384
  customer_email?: string | null;
373
385
  customer_name?: string | null;
374
386
  end_time?: string;
@@ -837,6 +849,36 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
837
849
  };
838
850
  Relationships: [];
839
851
  };
852
+ cart_replan_queue: {
853
+ Row: {
854
+ attempts: number;
855
+ last_error: string | null;
856
+ order_id: string;
857
+ processed_at: string | null;
858
+ requested_at: string;
859
+ };
860
+ Insert: {
861
+ attempts?: number;
862
+ last_error?: string | null;
863
+ order_id: string;
864
+ processed_at?: string | null;
865
+ requested_at?: string;
866
+ };
867
+ Update: {
868
+ attempts?: number;
869
+ last_error?: string | null;
870
+ order_id?: string;
871
+ processed_at?: string | null;
872
+ requested_at?: string;
873
+ };
874
+ Relationships: [{
875
+ foreignKeyName: "cart_replan_queue_order_id_fkey";
876
+ columns: ["order_id"];
877
+ isOneToOne: true;
878
+ referencedRelation: "orders";
879
+ referencedColumns: ["id"];
880
+ }];
881
+ };
840
882
  collections: {
841
883
  Row: {
842
884
  created_at: string;
@@ -2962,34 +3004,52 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
2962
3004
  Row: {
2963
3005
  catalog_key: string | null;
2964
3006
  catalog_url: string;
3007
+ client_id: string | null;
3008
+ client_secret_ciphertext: string | null;
3009
+ client_secret_last4: string | null;
2965
3010
  created_at: string;
2966
3011
  id: number;
2967
3012
  last_meta: import("../integrations/supabase/types").Json | null;
2968
3013
  last_test_at: string | null;
2969
3014
  last_test_error: string | null;
2970
3015
  last_test_ok: boolean | null;
3016
+ last_token_test_at: string | null;
3017
+ last_token_test_error: string | null;
3018
+ last_token_test_ok: boolean | null;
2971
3019
  updated_at: string;
2972
3020
  };
2973
3021
  Insert: {
2974
3022
  catalog_key?: string | null;
2975
3023
  catalog_url?: string;
3024
+ client_id?: string | null;
3025
+ client_secret_ciphertext?: string | null;
3026
+ client_secret_last4?: string | null;
2976
3027
  created_at?: string;
2977
3028
  id?: number;
2978
3029
  last_meta?: import("../integrations/supabase/types").Json | null;
2979
3030
  last_test_at?: string | null;
2980
3031
  last_test_error?: string | null;
2981
3032
  last_test_ok?: boolean | null;
3033
+ last_token_test_at?: string | null;
3034
+ last_token_test_error?: string | null;
3035
+ last_token_test_ok?: boolean | null;
2982
3036
  updated_at?: string;
2983
3037
  };
2984
3038
  Update: {
2985
3039
  catalog_key?: string | null;
2986
3040
  catalog_url?: string;
3041
+ client_id?: string | null;
3042
+ client_secret_ciphertext?: string | null;
3043
+ client_secret_last4?: string | null;
2987
3044
  created_at?: string;
2988
3045
  id?: number;
2989
3046
  last_meta?: import("../integrations/supabase/types").Json | null;
2990
3047
  last_test_at?: string | null;
2991
3048
  last_test_error?: string | null;
2992
3049
  last_test_ok?: boolean | null;
3050
+ last_token_test_at?: string | null;
3051
+ last_token_test_error?: string | null;
3052
+ last_token_test_ok?: boolean | null;
2993
3053
  updated_at?: string;
2994
3054
  };
2995
3055
  Relationships: [];
@@ -3222,6 +3282,54 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
3222
3282
  referencedColumns: ["id"];
3223
3283
  }];
3224
3284
  };
3285
+ floriday_auto_fulfillment_log: {
3286
+ Row: {
3287
+ attempts: number;
3288
+ connection_id: string;
3289
+ created_at: string;
3290
+ error: string | null;
3291
+ fulfillment_order_id: string | null;
3292
+ id: string;
3293
+ last_attempt_at: string | null;
3294
+ reason: string | null;
3295
+ sales_order_id: string;
3296
+ status: string;
3297
+ updated_at: string;
3298
+ };
3299
+ Insert: {
3300
+ attempts?: number;
3301
+ connection_id: string;
3302
+ created_at?: string;
3303
+ error?: string | null;
3304
+ fulfillment_order_id?: string | null;
3305
+ id?: string;
3306
+ last_attempt_at?: string | null;
3307
+ reason?: string | null;
3308
+ sales_order_id: string;
3309
+ status?: string;
3310
+ updated_at?: string;
3311
+ };
3312
+ Update: {
3313
+ attempts?: number;
3314
+ connection_id?: string;
3315
+ created_at?: string;
3316
+ error?: string | null;
3317
+ fulfillment_order_id?: string | null;
3318
+ id?: string;
3319
+ last_attempt_at?: string | null;
3320
+ reason?: string | null;
3321
+ sales_order_id?: string;
3322
+ status?: string;
3323
+ updated_at?: string;
3324
+ };
3325
+ Relationships: [{
3326
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
3327
+ columns: ["connection_id"];
3328
+ isOneToOne: false;
3329
+ referencedRelation: "floriday_connections";
3330
+ referencedColumns: ["id"];
3331
+ }];
3332
+ };
3225
3333
  floriday_base_items_cache: {
3226
3334
  Row: {
3227
3335
  connection_id: string;
@@ -4326,6 +4434,24 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
4326
4434
  referencedColumns: ["id"];
4327
4435
  }];
4328
4436
  };
4437
+ floriday_rate_limit_state: {
4438
+ Row: {
4439
+ bucket: string;
4440
+ last_refill_at: string;
4441
+ tokens: number;
4442
+ };
4443
+ Insert: {
4444
+ bucket: string;
4445
+ last_refill_at?: string;
4446
+ tokens: number;
4447
+ };
4448
+ Update: {
4449
+ bucket?: string;
4450
+ last_refill_at?: string;
4451
+ tokens?: number;
4452
+ };
4453
+ Relationships: [];
4454
+ };
4329
4455
  floriday_resource_schemas: {
4330
4456
  Row: {
4331
4457
  enums: import("../integrations/supabase/types").Json;
@@ -4749,6 +4875,60 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
4749
4875
  referencedColumns: ["id"];
4750
4876
  }];
4751
4877
  };
4878
+ flow_role_assignments: {
4879
+ Row: {
4880
+ created_at: string;
4881
+ id: string;
4882
+ role_id: string;
4883
+ user_id: string;
4884
+ };
4885
+ Insert: {
4886
+ created_at?: string;
4887
+ id?: string;
4888
+ role_id: string;
4889
+ user_id: string;
4890
+ };
4891
+ Update: {
4892
+ created_at?: string;
4893
+ id?: string;
4894
+ role_id?: string;
4895
+ user_id?: string;
4896
+ };
4897
+ Relationships: [{
4898
+ foreignKeyName: "flow_role_assignments_role_id_fkey";
4899
+ columns: ["role_id"];
4900
+ isOneToOne: false;
4901
+ referencedRelation: "flow_roles";
4902
+ referencedColumns: ["id"];
4903
+ }];
4904
+ };
4905
+ flow_roles: {
4906
+ Row: {
4907
+ created_at: string;
4908
+ description: string | null;
4909
+ id: string;
4910
+ module_access: string[];
4911
+ name: string;
4912
+ updated_at: string;
4913
+ };
4914
+ Insert: {
4915
+ created_at?: string;
4916
+ description?: string | null;
4917
+ id?: string;
4918
+ module_access?: string[];
4919
+ name: string;
4920
+ updated_at?: string;
4921
+ };
4922
+ Update: {
4923
+ created_at?: string;
4924
+ description?: string | null;
4925
+ id?: string;
4926
+ module_access?: string[];
4927
+ name?: string;
4928
+ updated_at?: string;
4929
+ };
4930
+ Relationships: [];
4931
+ };
4752
4932
  imap_accounts: {
4753
4933
  Row: {
4754
4934
  created_at: string;
@@ -5380,6 +5560,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
5380
5560
  matched_customer_id: string | null;
5381
5561
  message_id: string;
5382
5562
  notes: string | null;
5563
+ order_number: string | null;
5383
5564
  parsed_payload: import("../integrations/supabase/types").Json | null;
5384
5565
  reviewed_at: string | null;
5385
5566
  reviewed_by: string | null;
@@ -5395,6 +5576,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
5395
5576
  matched_customer_id?: string | null;
5396
5577
  message_id: string;
5397
5578
  notes?: string | null;
5579
+ order_number?: string | null;
5398
5580
  parsed_payload?: import("../integrations/supabase/types").Json | null;
5399
5581
  reviewed_at?: string | null;
5400
5582
  reviewed_by?: string | null;
@@ -5410,6 +5592,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
5410
5592
  matched_customer_id?: string | null;
5411
5593
  message_id?: string;
5412
5594
  notes?: string | null;
5595
+ order_number?: string | null;
5413
5596
  parsed_payload?: import("../integrations/supabase/types").Json | null;
5414
5597
  reviewed_at?: string | null;
5415
5598
  reviewed_by?: string | null;
@@ -6266,6 +6449,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
6266
6449
  id: string;
6267
6450
  items: import("../integrations/supabase/types").Json;
6268
6451
  notes: string | null;
6452
+ order_number: string | null;
6269
6453
  recipient_id: string;
6270
6454
  total_amount: number;
6271
6455
  };
@@ -6279,6 +6463,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
6279
6463
  id?: string;
6280
6464
  items?: import("../integrations/supabase/types").Json;
6281
6465
  notes?: string | null;
6466
+ order_number?: string | null;
6282
6467
  recipient_id: string;
6283
6468
  total_amount?: number;
6284
6469
  };
@@ -6292,6 +6477,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
6292
6477
  id?: string;
6293
6478
  items?: import("../integrations/supabase/types").Json;
6294
6479
  notes?: string | null;
6480
+ order_number?: string | null;
6295
6481
  recipient_id?: string;
6296
6482
  total_amount?: number;
6297
6483
  };
@@ -6451,6 +6637,9 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
6451
6637
  crates_per_layer: number;
6452
6638
  created_at: string;
6453
6639
  id: string;
6640
+ layer_fraction: number;
6641
+ layer_share_pct: number;
6642
+ layers_per_cart: number;
6454
6643
  order_item_id: string | null;
6455
6644
  plants_per_crate: number;
6456
6645
  product_id: string | null;
@@ -6462,6 +6651,9 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
6462
6651
  crates_per_layer?: number;
6463
6652
  created_at?: string;
6464
6653
  id?: string;
6654
+ layer_fraction?: number;
6655
+ layer_share_pct?: number;
6656
+ layers_per_cart?: number;
6465
6657
  order_item_id?: string | null;
6466
6658
  plants_per_crate?: number;
6467
6659
  product_id?: string | null;
@@ -6473,6 +6665,9 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
6473
6665
  crates_per_layer?: number;
6474
6666
  created_at?: string;
6475
6667
  id?: string;
6668
+ layer_fraction?: number;
6669
+ layer_share_pct?: number;
6670
+ layers_per_cart?: number;
6476
6671
  order_item_id?: string | null;
6477
6672
  plants_per_crate?: number;
6478
6673
  product_id?: string | null;
@@ -6500,33 +6695,45 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
6500
6695
  };
6501
6696
  order_carts: {
6502
6697
  Row: {
6698
+ algorithm_version: number;
6503
6699
  cart_number: number;
6504
6700
  created_at: string;
6505
6701
  id: string;
6506
6702
  is_auto: boolean;
6507
6703
  is_complete: boolean;
6508
6704
  notes: string | null;
6705
+ occupancy_pct: number;
6509
6706
  order_id: string;
6707
+ source: string;
6708
+ total_layers_used: number;
6510
6709
  updated_at: string;
6511
6710
  };
6512
6711
  Insert: {
6712
+ algorithm_version?: number;
6513
6713
  cart_number: number;
6514
6714
  created_at?: string;
6515
6715
  id?: string;
6516
6716
  is_auto?: boolean;
6517
6717
  is_complete?: boolean;
6518
6718
  notes?: string | null;
6719
+ occupancy_pct?: number;
6519
6720
  order_id: string;
6721
+ source?: string;
6722
+ total_layers_used?: number;
6520
6723
  updated_at?: string;
6521
6724
  };
6522
6725
  Update: {
6726
+ algorithm_version?: number;
6523
6727
  cart_number?: number;
6524
6728
  created_at?: string;
6525
6729
  id?: string;
6526
6730
  is_auto?: boolean;
6527
6731
  is_complete?: boolean;
6528
6732
  notes?: string | null;
6733
+ occupancy_pct?: number;
6529
6734
  order_id?: string;
6735
+ source?: string;
6736
+ total_layers_used?: number;
6530
6737
  updated_at?: string;
6531
6738
  };
6532
6739
  Relationships: [{
@@ -6679,6 +6886,8 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
6679
6886
  order_date: string;
6680
6887
  order_number: string;
6681
6888
  order_source: string;
6889
+ plan_locked_at: string | null;
6890
+ plan_locked_ref: string | null;
6682
6891
  status: string;
6683
6892
  total: string;
6684
6893
  updated_at: string;
@@ -6695,6 +6904,8 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
6695
6904
  order_date?: string;
6696
6905
  order_number: string;
6697
6906
  order_source?: string;
6907
+ plan_locked_at?: string | null;
6908
+ plan_locked_ref?: string | null;
6698
6909
  status?: string;
6699
6910
  total?: string;
6700
6911
  updated_at?: string;
@@ -6711,6 +6922,8 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
6711
6922
  order_date?: string;
6712
6923
  order_number?: string;
6713
6924
  order_source?: string;
6925
+ plan_locked_at?: string | null;
6926
+ plan_locked_ref?: string | null;
6714
6927
  status?: string;
6715
6928
  total?: string;
6716
6929
  updated_at?: string;
@@ -7079,28 +7292,34 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
7079
7292
  };
7080
7293
  profiles: {
7081
7294
  Row: {
7295
+ address: string | null;
7082
7296
  created_at: string;
7083
7297
  display_name: string | null;
7084
7298
  email: string | null;
7085
7299
  id: string;
7300
+ is_superadmin: boolean;
7086
7301
  notification_preferences: import("../integrations/supabase/types").Json;
7087
7302
  tenant_id: string | null;
7088
7303
  updated_at: string;
7089
7304
  };
7090
7305
  Insert: {
7306
+ address?: string | null;
7091
7307
  created_at?: string;
7092
7308
  display_name?: string | null;
7093
7309
  email?: string | null;
7094
7310
  id: string;
7311
+ is_superadmin?: boolean;
7095
7312
  notification_preferences?: import("../integrations/supabase/types").Json;
7096
7313
  tenant_id?: string | null;
7097
7314
  updated_at?: string;
7098
7315
  };
7099
7316
  Update: {
7317
+ address?: string | null;
7100
7318
  created_at?: string;
7101
7319
  display_name?: string | null;
7102
7320
  email?: string | null;
7103
7321
  id?: string;
7322
+ is_superadmin?: boolean;
7104
7323
  notification_preferences?: import("../integrations/supabase/types").Json;
7105
7324
  tenant_id?: string | null;
7106
7325
  updated_at?: string;
@@ -7890,6 +8109,24 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
7890
8109
  };
7891
8110
  Relationships: [];
7892
8111
  };
8112
+ sidebar_config: {
8113
+ Row: {
8114
+ id: string;
8115
+ module_order: string[];
8116
+ updated_at: string;
8117
+ };
8118
+ Insert: {
8119
+ id?: string;
8120
+ module_order?: string[];
8121
+ updated_at?: string;
8122
+ };
8123
+ Update: {
8124
+ id?: string;
8125
+ module_order?: string[];
8126
+ updated_at?: string;
8127
+ };
8128
+ Relationships: [];
8129
+ };
7893
8130
  stock_import_runs: {
7894
8131
  Row: {
7895
8132
  connection_id: string | null;
@@ -7948,7 +8185,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
7948
8185
  reason: string | null;
7949
8186
  reserved_after: number | null;
7950
8187
  reserved_before: number | null;
7951
- trade_item_key: string;
8188
+ trade_item_key: string | null;
7952
8189
  };
7953
8190
  Insert: {
7954
8191
  connection_id?: string | null;
@@ -7965,7 +8202,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
7965
8202
  reason?: string | null;
7966
8203
  reserved_after?: number | null;
7967
8204
  reserved_before?: number | null;
7968
- trade_item_key: string;
8205
+ trade_item_key?: string | null;
7969
8206
  };
7970
8207
  Update: {
7971
8208
  connection_id?: string | null;
@@ -7982,7 +8219,7 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
7982
8219
  reason?: string | null;
7983
8220
  reserved_after?: number | null;
7984
8221
  reserved_before?: number | null;
7985
- trade_item_key?: string;
8222
+ trade_item_key?: string | null;
7986
8223
  };
7987
8224
  Relationships: [];
7988
8225
  };
@@ -8325,6 +8562,114 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
8325
8562
  };
8326
8563
  Relationships: [];
8327
8564
  };
8565
+ trade_item_supply_lines: {
8566
+ Row: {
8567
+ available_quantity: number | null;
8568
+ connection_id: string;
8569
+ created_at: string;
8570
+ currency: string | null;
8571
+ endpoint_family: string | null;
8572
+ environment: string | null;
8573
+ id: string;
8574
+ last_error: string | null;
8575
+ last_status: number | null;
8576
+ packing_configuration_id: string | null;
8577
+ period_end: string | null;
8578
+ period_start: string | null;
8579
+ price_per_piece: number | null;
8580
+ sales_unit: string | null;
8581
+ supply_line_id: string | null;
8582
+ supply_type: string;
8583
+ trade_item_id: string;
8584
+ updated_at: string;
8585
+ user_id: string;
8586
+ week: number | null;
8587
+ year: number | null;
8588
+ };
8589
+ Insert: {
8590
+ available_quantity?: number | null;
8591
+ connection_id: string;
8592
+ created_at?: string;
8593
+ currency?: string | null;
8594
+ endpoint_family?: string | null;
8595
+ environment?: string | null;
8596
+ id?: string;
8597
+ last_error?: string | null;
8598
+ last_status?: number | null;
8599
+ packing_configuration_id?: string | null;
8600
+ period_end?: string | null;
8601
+ period_start?: string | null;
8602
+ price_per_piece?: number | null;
8603
+ sales_unit?: string | null;
8604
+ supply_line_id?: string | null;
8605
+ supply_type?: string;
8606
+ trade_item_id: string;
8607
+ updated_at?: string;
8608
+ user_id: string;
8609
+ week?: number | null;
8610
+ year?: number | null;
8611
+ };
8612
+ Update: {
8613
+ available_quantity?: number | null;
8614
+ connection_id?: string;
8615
+ created_at?: string;
8616
+ currency?: string | null;
8617
+ endpoint_family?: string | null;
8618
+ environment?: string | null;
8619
+ id?: string;
8620
+ last_error?: string | null;
8621
+ last_status?: number | null;
8622
+ packing_configuration_id?: string | null;
8623
+ period_end?: string | null;
8624
+ period_start?: string | null;
8625
+ price_per_piece?: number | null;
8626
+ sales_unit?: string | null;
8627
+ supply_line_id?: string | null;
8628
+ supply_type?: string;
8629
+ trade_item_id?: string;
8630
+ updated_at?: string;
8631
+ user_id?: string;
8632
+ week?: number | null;
8633
+ year?: number | null;
8634
+ };
8635
+ Relationships: [];
8636
+ };
8637
+ trade_item_warehouse_preferences: {
8638
+ Row: {
8639
+ connection_id: string;
8640
+ created_at: string;
8641
+ id: string;
8642
+ trade_item_id: string;
8643
+ updated_at: string;
8644
+ warehouse_id: string;
8645
+ warehouse_name: string | null;
8646
+ };
8647
+ Insert: {
8648
+ connection_id: string;
8649
+ created_at?: string;
8650
+ id?: string;
8651
+ trade_item_id: string;
8652
+ updated_at?: string;
8653
+ warehouse_id: string;
8654
+ warehouse_name?: string | null;
8655
+ };
8656
+ Update: {
8657
+ connection_id?: string;
8658
+ created_at?: string;
8659
+ id?: string;
8660
+ trade_item_id?: string;
8661
+ updated_at?: string;
8662
+ warehouse_id?: string;
8663
+ warehouse_name?: string | null;
8664
+ };
8665
+ Relationships: [{
8666
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
8667
+ columns: ["connection_id"];
8668
+ isOneToOne: false;
8669
+ referencedRelation: "floriday_connections";
8670
+ referencedColumns: ["id"];
8671
+ }];
8672
+ };
8328
8673
  twinfield_connections: {
8329
8674
  Row: {
8330
8675
  access_token: string | null;
@@ -8644,6 +8989,10 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
8644
8989
  default_invoice_type: string;
8645
8990
  default_payment_term_days: number;
8646
8991
  default_vat_code: string;
8992
+ invoice_enabled_ao: boolean;
8993
+ invoice_enabled_fo: boolean;
8994
+ invoice_enabled_ho: boolean;
8995
+ invoice_enabled_mo: boolean;
8647
8996
  updated_at: string;
8648
8997
  user_id: string;
8649
8998
  };
@@ -8653,6 +9002,10 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
8653
9002
  default_invoice_type?: string;
8654
9003
  default_payment_term_days?: number;
8655
9004
  default_vat_code?: string;
9005
+ invoice_enabled_ao?: boolean;
9006
+ invoice_enabled_fo?: boolean;
9007
+ invoice_enabled_ho?: boolean;
9008
+ invoice_enabled_mo?: boolean;
8656
9009
  updated_at?: string;
8657
9010
  user_id: string;
8658
9011
  };
@@ -8662,6 +9015,10 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
8662
9015
  default_invoice_type?: string;
8663
9016
  default_payment_term_days?: number;
8664
9017
  default_vat_code?: string;
9018
+ invoice_enabled_ao?: boolean;
9019
+ invoice_enabled_fo?: boolean;
9020
+ invoice_enabled_ho?: boolean;
9021
+ invoice_enabled_mo?: boolean;
8665
9022
  updated_at?: string;
8666
9023
  user_id?: string;
8667
9024
  };
@@ -9956,6 +10313,12 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
9956
10313
  order_number: string;
9957
10314
  }[];
9958
10315
  };
10316
+ autolink_product_to_floriday: {
10317
+ Args: {
10318
+ p_product_id: string;
10319
+ };
10320
+ Returns: string;
10321
+ };
9959
10322
  backfill_open_order_reservations: {
9960
10323
  Args: never;
9961
10324
  Returns: {
@@ -9994,6 +10357,18 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
9994
10357
  Args: never;
9995
10358
  Returns: number;
9996
10359
  };
10360
+ consume_floriday_rate_limit: {
10361
+ Args: {
10362
+ p_bucket: string;
10363
+ p_capacity: number;
10364
+ p_cost?: number;
10365
+ p_refill_per_sec: number;
10366
+ };
10367
+ Returns: {
10368
+ granted: boolean;
10369
+ wait_ms: number;
10370
+ }[];
10371
+ };
9997
10372
  control_get_todays_carts: {
9998
10373
  Args: never;
9999
10374
  Returns: {
@@ -10074,6 +10449,12 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10074
10449
  status: string;
10075
10450
  }[];
10076
10451
  };
10452
+ enqueue_cart_replan_if_unlocked: {
10453
+ Args: {
10454
+ p_order_id: string;
10455
+ };
10456
+ Returns: undefined;
10457
+ };
10077
10458
  ensure_trade_item_stock_row: {
10078
10459
  Args: {
10079
10460
  p_key: string;
@@ -10180,6 +10561,13 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10180
10561
  office_code: string;
10181
10562
  }[];
10182
10563
  };
10564
+ get_floricode_record_counts: {
10565
+ Args: never;
10566
+ Returns: {
10567
+ count: number;
10568
+ resource: string;
10569
+ }[];
10570
+ };
10183
10571
  get_floriday_agreements_active: {
10184
10572
  Args: {
10185
10573
  p_on_date?: string;
@@ -10271,6 +10659,12 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10271
10659
  };
10272
10660
  Returns: import("../integrations/supabase/types").Json;
10273
10661
  };
10662
+ get_offer_delivery_options: {
10663
+ Args: {
10664
+ p_code: string;
10665
+ };
10666
+ Returns: import("../integrations/supabase/types").Json;
10667
+ };
10274
10668
  get_offer_recipient_by_code: {
10275
10669
  Args: {
10276
10670
  p_code: string;
@@ -10335,6 +10729,12 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10335
10729
  Args: never;
10336
10730
  Returns: boolean;
10337
10731
  };
10732
+ is_superadmin: {
10733
+ Args: {
10734
+ _user_id: string;
10735
+ };
10736
+ Returns: boolean;
10737
+ };
10338
10738
  local_effective_price: {
10339
10739
  Args: {
10340
10740
  _customer_id: string;
@@ -10369,6 +10769,13 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10369
10769
  };
10370
10770
  Returns: string;
10371
10771
  };
10772
+ next_order_number_for_date: {
10773
+ Args: {
10774
+ p_created_at?: string;
10775
+ p_prefix: string;
10776
+ };
10777
+ Returns: string;
10778
+ };
10372
10779
  next_work_order_number: {
10373
10780
  Args: {
10374
10781
  p_parent_work_order_id?: string;
@@ -10376,6 +10783,12 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10376
10783
  };
10377
10784
  Returns: string;
10378
10785
  };
10786
+ normalize_order_source: {
10787
+ Args: {
10788
+ p_src: string;
10789
+ };
10790
+ Returns: string;
10791
+ };
10379
10792
  normalize_vat: {
10380
10793
  Args: {
10381
10794
  v: string;
@@ -10390,9 +10803,20 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10390
10803
  };
10391
10804
  Returns: boolean;
10392
10805
  };
10393
- pickstation_get_orders_raw: {
10394
- Args: never;
10395
- Returns: import("../integrations/supabase/types").Json;
10806
+ order_number_prefix: {
10807
+ Args: {
10808
+ p_custom_fields?: import("../integrations/supabase/types").Json;
10809
+ p_order_source: string;
10810
+ };
10811
+ Returns: string;
10812
+ };
10813
+ pickstation_get_orders_raw: {
10814
+ Args: never;
10815
+ Returns: import("../integrations/supabase/types").Json;
10816
+ };
10817
+ pickstation_get_planning_context: {
10818
+ Args: never;
10819
+ Returns: import("../integrations/supabase/types").Json;
10396
10820
  };
10397
10821
  pickstation_get_settings: {
10398
10822
  Args: never;
@@ -10424,6 +10848,28 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10424
10848
  };
10425
10849
  Returns: undefined;
10426
10850
  };
10851
+ recompute_order_status: {
10852
+ Args: {
10853
+ p_order_id: string;
10854
+ };
10855
+ Returns: undefined;
10856
+ };
10857
+ recompute_reserved_for_order: {
10858
+ Args: {
10859
+ p_order_id: string;
10860
+ };
10861
+ Returns: undefined;
10862
+ };
10863
+ recompute_reserved_stock: {
10864
+ Args: {
10865
+ p_trade_item_key: string;
10866
+ };
10867
+ Returns: undefined;
10868
+ };
10869
+ refresh_external_customers_grouped: {
10870
+ Args: never;
10871
+ Returns: undefined;
10872
+ };
10427
10873
  refresh_floricode_derived_code_lists: {
10428
10874
  Args: never;
10429
10875
  Returns: {
@@ -10438,6 +10884,12 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10438
10884
  };
10439
10885
  Returns: number;
10440
10886
  };
10887
+ refresh_floricode_derived_for_products: {
10888
+ Args: {
10889
+ _product_ids: string[];
10890
+ };
10891
+ Returns: number;
10892
+ };
10441
10893
  reset_floriday_sync_cursor: {
10442
10894
  Args: {
10443
10895
  p_connection_id: string;
@@ -10445,6 +10897,12 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10445
10897
  };
10446
10898
  Returns: undefined;
10447
10899
  };
10900
+ resolve_product_id_for_item: {
10901
+ Args: {
10902
+ p_product_name: string;
10903
+ };
10904
+ Returns: string;
10905
+ };
10448
10906
  schedule_floriday_additional_services_sync: {
10449
10907
  Args: {
10450
10908
  p_apikey: string;
@@ -10722,6 +11180,24 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10722
11180
  };
10723
11181
  Returns: string[];
10724
11182
  };
11183
+ sync_cached_packing_from_product: {
11184
+ Args: {
11185
+ p_product_id: string;
11186
+ };
11187
+ Returns: undefined;
11188
+ };
11189
+ sync_order_cart_item_packing_from_product: {
11190
+ Args: {
11191
+ p_product_id: string;
11192
+ };
11193
+ Returns: undefined;
11194
+ };
11195
+ sync_product_packing_from_floriday_cache: {
11196
+ Args: {
11197
+ p_floriday_id: string;
11198
+ };
11199
+ Returns: undefined;
11200
+ };
10725
11201
  twinfield_decrypt: {
10726
11202
  Args: {
10727
11203
  cipher: string;
@@ -10734,6 +11210,17 @@ export declare const listWarehousesFn: import("@tanstack/start-client-core").Opt
10734
11210
  };
10735
11211
  Returns: string;
10736
11212
  };
11213
+ upsert_auto_fulfillment_log: {
11214
+ Args: {
11215
+ p_connection_id: string;
11216
+ p_error?: string;
11217
+ p_fulfillment_order_id?: string;
11218
+ p_reason?: string;
11219
+ p_sales_order_id: string;
11220
+ p_status: string;
11221
+ };
11222
+ Returns: undefined;
11223
+ };
10737
11224
  };
10738
11225
  Enums: {
10739
11226
  app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
@@ -10758,7 +11245,10 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
10758
11245
  Tables: {
10759
11246
  afhandeling_settings: {
10760
11247
  Row: {
11248
+ auto_print_delivery_note: boolean;
11249
+ auto_process_paused: boolean;
10761
11250
  created_at: string;
11251
+ extra_pick_days_with_stickers: number;
10762
11252
  id: string;
10763
11253
  max_workdays_earlier_pick: number;
10764
11254
  pick_days_before_transport: number;
@@ -10772,7 +11262,10 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
10772
11262
  user_id: string;
10773
11263
  };
10774
11264
  Insert: {
11265
+ auto_print_delivery_note?: boolean;
11266
+ auto_process_paused?: boolean;
10775
11267
  created_at?: string;
11268
+ extra_pick_days_with_stickers?: number;
10776
11269
  id?: string;
10777
11270
  max_workdays_earlier_pick?: number;
10778
11271
  pick_days_before_transport?: number;
@@ -10786,7 +11279,10 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
10786
11279
  user_id: string;
10787
11280
  };
10788
11281
  Update: {
11282
+ auto_print_delivery_note?: boolean;
11283
+ auto_process_paused?: boolean;
10789
11284
  created_at?: string;
11285
+ extra_pick_days_with_stickers?: number;
10790
11286
  id?: string;
10791
11287
  max_workdays_earlier_pick?: number;
10792
11288
  pick_days_before_transport?: number;
@@ -11060,6 +11556,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
11060
11556
  conflict_reason: string | null;
11061
11557
  created_at: string;
11062
11558
  created_by_role: string | null;
11559
+ customer_address: string | null;
11063
11560
  customer_email: string | null;
11064
11561
  customer_name: string | null;
11065
11562
  end_time: string;
@@ -11085,6 +11582,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
11085
11582
  conflict_reason?: string | null;
11086
11583
  created_at?: string;
11087
11584
  created_by_role?: string | null;
11585
+ customer_address?: string | null;
11088
11586
  customer_email?: string | null;
11089
11587
  customer_name?: string | null;
11090
11588
  end_time: string;
@@ -11110,6 +11608,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
11110
11608
  conflict_reason?: string | null;
11111
11609
  created_at?: string;
11112
11610
  created_by_role?: string | null;
11611
+ customer_address?: string | null;
11113
11612
  customer_email?: string | null;
11114
11613
  customer_name?: string | null;
11115
11614
  end_time?: string;
@@ -11578,6 +12077,36 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
11578
12077
  };
11579
12078
  Relationships: [];
11580
12079
  };
12080
+ cart_replan_queue: {
12081
+ Row: {
12082
+ attempts: number;
12083
+ last_error: string | null;
12084
+ order_id: string;
12085
+ processed_at: string | null;
12086
+ requested_at: string;
12087
+ };
12088
+ Insert: {
12089
+ attempts?: number;
12090
+ last_error?: string | null;
12091
+ order_id: string;
12092
+ processed_at?: string | null;
12093
+ requested_at?: string;
12094
+ };
12095
+ Update: {
12096
+ attempts?: number;
12097
+ last_error?: string | null;
12098
+ order_id?: string;
12099
+ processed_at?: string | null;
12100
+ requested_at?: string;
12101
+ };
12102
+ Relationships: [{
12103
+ foreignKeyName: "cart_replan_queue_order_id_fkey";
12104
+ columns: ["order_id"];
12105
+ isOneToOne: true;
12106
+ referencedRelation: "orders";
12107
+ referencedColumns: ["id"];
12108
+ }];
12109
+ };
11581
12110
  collections: {
11582
12111
  Row: {
11583
12112
  created_at: string;
@@ -13703,34 +14232,52 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
13703
14232
  Row: {
13704
14233
  catalog_key: string | null;
13705
14234
  catalog_url: string;
14235
+ client_id: string | null;
14236
+ client_secret_ciphertext: string | null;
14237
+ client_secret_last4: string | null;
13706
14238
  created_at: string;
13707
14239
  id: number;
13708
14240
  last_meta: import("../integrations/supabase/types").Json | null;
13709
14241
  last_test_at: string | null;
13710
14242
  last_test_error: string | null;
13711
14243
  last_test_ok: boolean | null;
14244
+ last_token_test_at: string | null;
14245
+ last_token_test_error: string | null;
14246
+ last_token_test_ok: boolean | null;
13712
14247
  updated_at: string;
13713
14248
  };
13714
14249
  Insert: {
13715
14250
  catalog_key?: string | null;
13716
14251
  catalog_url?: string;
14252
+ client_id?: string | null;
14253
+ client_secret_ciphertext?: string | null;
14254
+ client_secret_last4?: string | null;
13717
14255
  created_at?: string;
13718
14256
  id?: number;
13719
14257
  last_meta?: import("../integrations/supabase/types").Json | null;
13720
14258
  last_test_at?: string | null;
13721
14259
  last_test_error?: string | null;
13722
14260
  last_test_ok?: boolean | null;
14261
+ last_token_test_at?: string | null;
14262
+ last_token_test_error?: string | null;
14263
+ last_token_test_ok?: boolean | null;
13723
14264
  updated_at?: string;
13724
14265
  };
13725
14266
  Update: {
13726
14267
  catalog_key?: string | null;
13727
14268
  catalog_url?: string;
14269
+ client_id?: string | null;
14270
+ client_secret_ciphertext?: string | null;
14271
+ client_secret_last4?: string | null;
13728
14272
  created_at?: string;
13729
14273
  id?: number;
13730
14274
  last_meta?: import("../integrations/supabase/types").Json | null;
13731
14275
  last_test_at?: string | null;
13732
14276
  last_test_error?: string | null;
13733
14277
  last_test_ok?: boolean | null;
14278
+ last_token_test_at?: string | null;
14279
+ last_token_test_error?: string | null;
14280
+ last_token_test_ok?: boolean | null;
13734
14281
  updated_at?: string;
13735
14282
  };
13736
14283
  Relationships: [];
@@ -13963,6 +14510,54 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
13963
14510
  referencedColumns: ["id"];
13964
14511
  }];
13965
14512
  };
14513
+ floriday_auto_fulfillment_log: {
14514
+ Row: {
14515
+ attempts: number;
14516
+ connection_id: string;
14517
+ created_at: string;
14518
+ error: string | null;
14519
+ fulfillment_order_id: string | null;
14520
+ id: string;
14521
+ last_attempt_at: string | null;
14522
+ reason: string | null;
14523
+ sales_order_id: string;
14524
+ status: string;
14525
+ updated_at: string;
14526
+ };
14527
+ Insert: {
14528
+ attempts?: number;
14529
+ connection_id: string;
14530
+ created_at?: string;
14531
+ error?: string | null;
14532
+ fulfillment_order_id?: string | null;
14533
+ id?: string;
14534
+ last_attempt_at?: string | null;
14535
+ reason?: string | null;
14536
+ sales_order_id: string;
14537
+ status?: string;
14538
+ updated_at?: string;
14539
+ };
14540
+ Update: {
14541
+ attempts?: number;
14542
+ connection_id?: string;
14543
+ created_at?: string;
14544
+ error?: string | null;
14545
+ fulfillment_order_id?: string | null;
14546
+ id?: string;
14547
+ last_attempt_at?: string | null;
14548
+ reason?: string | null;
14549
+ sales_order_id?: string;
14550
+ status?: string;
14551
+ updated_at?: string;
14552
+ };
14553
+ Relationships: [{
14554
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
14555
+ columns: ["connection_id"];
14556
+ isOneToOne: false;
14557
+ referencedRelation: "floriday_connections";
14558
+ referencedColumns: ["id"];
14559
+ }];
14560
+ };
13966
14561
  floriday_base_items_cache: {
13967
14562
  Row: {
13968
14563
  connection_id: string;
@@ -15067,6 +15662,24 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
15067
15662
  referencedColumns: ["id"];
15068
15663
  }];
15069
15664
  };
15665
+ floriday_rate_limit_state: {
15666
+ Row: {
15667
+ bucket: string;
15668
+ last_refill_at: string;
15669
+ tokens: number;
15670
+ };
15671
+ Insert: {
15672
+ bucket: string;
15673
+ last_refill_at?: string;
15674
+ tokens: number;
15675
+ };
15676
+ Update: {
15677
+ bucket?: string;
15678
+ last_refill_at?: string;
15679
+ tokens?: number;
15680
+ };
15681
+ Relationships: [];
15682
+ };
15070
15683
  floriday_resource_schemas: {
15071
15684
  Row: {
15072
15685
  enums: import("../integrations/supabase/types").Json;
@@ -15490,6 +16103,60 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
15490
16103
  referencedColumns: ["id"];
15491
16104
  }];
15492
16105
  };
16106
+ flow_role_assignments: {
16107
+ Row: {
16108
+ created_at: string;
16109
+ id: string;
16110
+ role_id: string;
16111
+ user_id: string;
16112
+ };
16113
+ Insert: {
16114
+ created_at?: string;
16115
+ id?: string;
16116
+ role_id: string;
16117
+ user_id: string;
16118
+ };
16119
+ Update: {
16120
+ created_at?: string;
16121
+ id?: string;
16122
+ role_id?: string;
16123
+ user_id?: string;
16124
+ };
16125
+ Relationships: [{
16126
+ foreignKeyName: "flow_role_assignments_role_id_fkey";
16127
+ columns: ["role_id"];
16128
+ isOneToOne: false;
16129
+ referencedRelation: "flow_roles";
16130
+ referencedColumns: ["id"];
16131
+ }];
16132
+ };
16133
+ flow_roles: {
16134
+ Row: {
16135
+ created_at: string;
16136
+ description: string | null;
16137
+ id: string;
16138
+ module_access: string[];
16139
+ name: string;
16140
+ updated_at: string;
16141
+ };
16142
+ Insert: {
16143
+ created_at?: string;
16144
+ description?: string | null;
16145
+ id?: string;
16146
+ module_access?: string[];
16147
+ name: string;
16148
+ updated_at?: string;
16149
+ };
16150
+ Update: {
16151
+ created_at?: string;
16152
+ description?: string | null;
16153
+ id?: string;
16154
+ module_access?: string[];
16155
+ name?: string;
16156
+ updated_at?: string;
16157
+ };
16158
+ Relationships: [];
16159
+ };
15493
16160
  imap_accounts: {
15494
16161
  Row: {
15495
16162
  created_at: string;
@@ -16121,6 +16788,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
16121
16788
  matched_customer_id: string | null;
16122
16789
  message_id: string;
16123
16790
  notes: string | null;
16791
+ order_number: string | null;
16124
16792
  parsed_payload: import("../integrations/supabase/types").Json | null;
16125
16793
  reviewed_at: string | null;
16126
16794
  reviewed_by: string | null;
@@ -16136,6 +16804,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
16136
16804
  matched_customer_id?: string | null;
16137
16805
  message_id: string;
16138
16806
  notes?: string | null;
16807
+ order_number?: string | null;
16139
16808
  parsed_payload?: import("../integrations/supabase/types").Json | null;
16140
16809
  reviewed_at?: string | null;
16141
16810
  reviewed_by?: string | null;
@@ -16151,6 +16820,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
16151
16820
  matched_customer_id?: string | null;
16152
16821
  message_id?: string;
16153
16822
  notes?: string | null;
16823
+ order_number?: string | null;
16154
16824
  parsed_payload?: import("../integrations/supabase/types").Json | null;
16155
16825
  reviewed_at?: string | null;
16156
16826
  reviewed_by?: string | null;
@@ -17007,6 +17677,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
17007
17677
  id: string;
17008
17678
  items: import("../integrations/supabase/types").Json;
17009
17679
  notes: string | null;
17680
+ order_number: string | null;
17010
17681
  recipient_id: string;
17011
17682
  total_amount: number;
17012
17683
  };
@@ -17020,6 +17691,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
17020
17691
  id?: string;
17021
17692
  items?: import("../integrations/supabase/types").Json;
17022
17693
  notes?: string | null;
17694
+ order_number?: string | null;
17023
17695
  recipient_id: string;
17024
17696
  total_amount?: number;
17025
17697
  };
@@ -17033,6 +17705,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
17033
17705
  id?: string;
17034
17706
  items?: import("../integrations/supabase/types").Json;
17035
17707
  notes?: string | null;
17708
+ order_number?: string | null;
17036
17709
  recipient_id?: string;
17037
17710
  total_amount?: number;
17038
17711
  };
@@ -17192,6 +17865,9 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
17192
17865
  crates_per_layer: number;
17193
17866
  created_at: string;
17194
17867
  id: string;
17868
+ layer_fraction: number;
17869
+ layer_share_pct: number;
17870
+ layers_per_cart: number;
17195
17871
  order_item_id: string | null;
17196
17872
  plants_per_crate: number;
17197
17873
  product_id: string | null;
@@ -17203,6 +17879,9 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
17203
17879
  crates_per_layer?: number;
17204
17880
  created_at?: string;
17205
17881
  id?: string;
17882
+ layer_fraction?: number;
17883
+ layer_share_pct?: number;
17884
+ layers_per_cart?: number;
17206
17885
  order_item_id?: string | null;
17207
17886
  plants_per_crate?: number;
17208
17887
  product_id?: string | null;
@@ -17214,6 +17893,9 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
17214
17893
  crates_per_layer?: number;
17215
17894
  created_at?: string;
17216
17895
  id?: string;
17896
+ layer_fraction?: number;
17897
+ layer_share_pct?: number;
17898
+ layers_per_cart?: number;
17217
17899
  order_item_id?: string | null;
17218
17900
  plants_per_crate?: number;
17219
17901
  product_id?: string | null;
@@ -17241,33 +17923,45 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
17241
17923
  };
17242
17924
  order_carts: {
17243
17925
  Row: {
17926
+ algorithm_version: number;
17244
17927
  cart_number: number;
17245
17928
  created_at: string;
17246
17929
  id: string;
17247
17930
  is_auto: boolean;
17248
17931
  is_complete: boolean;
17249
17932
  notes: string | null;
17933
+ occupancy_pct: number;
17250
17934
  order_id: string;
17935
+ source: string;
17936
+ total_layers_used: number;
17251
17937
  updated_at: string;
17252
17938
  };
17253
17939
  Insert: {
17940
+ algorithm_version?: number;
17254
17941
  cart_number: number;
17255
17942
  created_at?: string;
17256
17943
  id?: string;
17257
17944
  is_auto?: boolean;
17258
17945
  is_complete?: boolean;
17259
17946
  notes?: string | null;
17947
+ occupancy_pct?: number;
17260
17948
  order_id: string;
17949
+ source?: string;
17950
+ total_layers_used?: number;
17261
17951
  updated_at?: string;
17262
17952
  };
17263
17953
  Update: {
17954
+ algorithm_version?: number;
17264
17955
  cart_number?: number;
17265
17956
  created_at?: string;
17266
17957
  id?: string;
17267
17958
  is_auto?: boolean;
17268
17959
  is_complete?: boolean;
17269
17960
  notes?: string | null;
17961
+ occupancy_pct?: number;
17270
17962
  order_id?: string;
17963
+ source?: string;
17964
+ total_layers_used?: number;
17271
17965
  updated_at?: string;
17272
17966
  };
17273
17967
  Relationships: [{
@@ -17420,6 +18114,8 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
17420
18114
  order_date: string;
17421
18115
  order_number: string;
17422
18116
  order_source: string;
18117
+ plan_locked_at: string | null;
18118
+ plan_locked_ref: string | null;
17423
18119
  status: string;
17424
18120
  total: string;
17425
18121
  updated_at: string;
@@ -17436,6 +18132,8 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
17436
18132
  order_date?: string;
17437
18133
  order_number: string;
17438
18134
  order_source?: string;
18135
+ plan_locked_at?: string | null;
18136
+ plan_locked_ref?: string | null;
17439
18137
  status?: string;
17440
18138
  total?: string;
17441
18139
  updated_at?: string;
@@ -17452,6 +18150,8 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
17452
18150
  order_date?: string;
17453
18151
  order_number?: string;
17454
18152
  order_source?: string;
18153
+ plan_locked_at?: string | null;
18154
+ plan_locked_ref?: string | null;
17455
18155
  status?: string;
17456
18156
  total?: string;
17457
18157
  updated_at?: string;
@@ -17820,28 +18520,34 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
17820
18520
  };
17821
18521
  profiles: {
17822
18522
  Row: {
18523
+ address: string | null;
17823
18524
  created_at: string;
17824
18525
  display_name: string | null;
17825
18526
  email: string | null;
17826
18527
  id: string;
18528
+ is_superadmin: boolean;
17827
18529
  notification_preferences: import("../integrations/supabase/types").Json;
17828
18530
  tenant_id: string | null;
17829
18531
  updated_at: string;
17830
18532
  };
17831
18533
  Insert: {
18534
+ address?: string | null;
17832
18535
  created_at?: string;
17833
18536
  display_name?: string | null;
17834
18537
  email?: string | null;
17835
18538
  id: string;
18539
+ is_superadmin?: boolean;
17836
18540
  notification_preferences?: import("../integrations/supabase/types").Json;
17837
18541
  tenant_id?: string | null;
17838
18542
  updated_at?: string;
17839
18543
  };
17840
18544
  Update: {
18545
+ address?: string | null;
17841
18546
  created_at?: string;
17842
18547
  display_name?: string | null;
17843
18548
  email?: string | null;
17844
18549
  id?: string;
18550
+ is_superadmin?: boolean;
17845
18551
  notification_preferences?: import("../integrations/supabase/types").Json;
17846
18552
  tenant_id?: string | null;
17847
18553
  updated_at?: string;
@@ -18631,6 +19337,24 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
18631
19337
  };
18632
19338
  Relationships: [];
18633
19339
  };
19340
+ sidebar_config: {
19341
+ Row: {
19342
+ id: string;
19343
+ module_order: string[];
19344
+ updated_at: string;
19345
+ };
19346
+ Insert: {
19347
+ id?: string;
19348
+ module_order?: string[];
19349
+ updated_at?: string;
19350
+ };
19351
+ Update: {
19352
+ id?: string;
19353
+ module_order?: string[];
19354
+ updated_at?: string;
19355
+ };
19356
+ Relationships: [];
19357
+ };
18634
19358
  stock_import_runs: {
18635
19359
  Row: {
18636
19360
  connection_id: string | null;
@@ -18689,7 +19413,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
18689
19413
  reason: string | null;
18690
19414
  reserved_after: number | null;
18691
19415
  reserved_before: number | null;
18692
- trade_item_key: string;
19416
+ trade_item_key: string | null;
18693
19417
  };
18694
19418
  Insert: {
18695
19419
  connection_id?: string | null;
@@ -18706,7 +19430,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
18706
19430
  reason?: string | null;
18707
19431
  reserved_after?: number | null;
18708
19432
  reserved_before?: number | null;
18709
- trade_item_key: string;
19433
+ trade_item_key?: string | null;
18710
19434
  };
18711
19435
  Update: {
18712
19436
  connection_id?: string | null;
@@ -18723,7 +19447,7 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
18723
19447
  reason?: string | null;
18724
19448
  reserved_after?: number | null;
18725
19449
  reserved_before?: number | null;
18726
- trade_item_key?: string;
19450
+ trade_item_key?: string | null;
18727
19451
  };
18728
19452
  Relationships: [];
18729
19453
  };
@@ -19066,55 +19790,163 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
19066
19790
  };
19067
19791
  Relationships: [];
19068
19792
  };
19069
- twinfield_connections: {
19793
+ trade_item_supply_lines: {
19070
19794
  Row: {
19071
- access_token: string | null;
19072
- client_id: string;
19073
- client_secret: string | null;
19074
- cluster_uri: string | null;
19075
- company_code: string | null;
19076
- company_name: string | null;
19077
- connected_at: string | null;
19795
+ available_quantity: number | null;
19796
+ connection_id: string;
19078
19797
  created_at: string;
19079
- environment: string;
19798
+ currency: string | null;
19799
+ endpoint_family: string | null;
19800
+ environment: string | null;
19080
19801
  id: string;
19081
- is_active: boolean;
19082
- label: string | null;
19083
- office_code: string | null;
19084
- redirect_uri: string;
19085
- refresh_token: string | null;
19086
- token_expires_at: string | null;
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;
19087
19812
  updated_at: string;
19088
19813
  user_id: string;
19814
+ week: number | null;
19815
+ year: number | null;
19089
19816
  };
19090
19817
  Insert: {
19091
- access_token?: string | null;
19092
- client_id: string;
19093
- client_secret?: string | null;
19094
- cluster_uri?: string | null;
19095
- company_code?: string | null;
19096
- company_name?: string | null;
19097
- connected_at?: string | null;
19818
+ available_quantity?: number | null;
19819
+ connection_id: string;
19098
19820
  created_at?: string;
19099
- environment: string;
19821
+ currency?: string | null;
19822
+ endpoint_family?: string | null;
19823
+ environment?: string | null;
19100
19824
  id?: string;
19101
- is_active?: boolean;
19102
- label?: string | null;
19103
- office_code?: string | null;
19104
- redirect_uri: string;
19105
- refresh_token?: string | null;
19106
- token_expires_at?: string | null;
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;
19107
19835
  updated_at?: string;
19108
19836
  user_id: string;
19837
+ week?: number | null;
19838
+ year?: number | null;
19109
19839
  };
19110
19840
  Update: {
19111
- access_token?: string | null;
19112
- client_id?: string;
19113
- client_secret?: string | null;
19114
- cluster_uri?: string | null;
19115
- company_code?: string | null;
19116
- company_name?: string | null;
19117
- connected_at?: string | null;
19841
+ available_quantity?: number | null;
19842
+ connection_id?: string;
19843
+ created_at?: string;
19844
+ currency?: string | null;
19845
+ endpoint_family?: string | null;
19846
+ environment?: string | null;
19847
+ id?: string;
19848
+ last_error?: string | null;
19849
+ last_status?: number | null;
19850
+ packing_configuration_id?: string | null;
19851
+ period_end?: string | null;
19852
+ period_start?: string | null;
19853
+ price_per_piece?: number | null;
19854
+ sales_unit?: string | null;
19855
+ supply_line_id?: string | null;
19856
+ supply_type?: string;
19857
+ trade_item_id?: string;
19858
+ updated_at?: string;
19859
+ user_id?: string;
19860
+ week?: number | null;
19861
+ year?: number | null;
19862
+ };
19863
+ Relationships: [];
19864
+ };
19865
+ trade_item_warehouse_preferences: {
19866
+ Row: {
19867
+ connection_id: string;
19868
+ created_at: string;
19869
+ id: string;
19870
+ trade_item_id: string;
19871
+ updated_at: string;
19872
+ warehouse_id: string;
19873
+ warehouse_name: string | null;
19874
+ };
19875
+ Insert: {
19876
+ connection_id: string;
19877
+ created_at?: string;
19878
+ id?: string;
19879
+ trade_item_id: string;
19880
+ updated_at?: string;
19881
+ warehouse_id: string;
19882
+ warehouse_name?: string | null;
19883
+ };
19884
+ Update: {
19885
+ connection_id?: string;
19886
+ created_at?: string;
19887
+ id?: string;
19888
+ trade_item_id?: string;
19889
+ updated_at?: string;
19890
+ warehouse_id?: string;
19891
+ warehouse_name?: string | null;
19892
+ };
19893
+ Relationships: [{
19894
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
19895
+ columns: ["connection_id"];
19896
+ isOneToOne: false;
19897
+ referencedRelation: "floriday_connections";
19898
+ referencedColumns: ["id"];
19899
+ }];
19900
+ };
19901
+ twinfield_connections: {
19902
+ Row: {
19903
+ access_token: string | null;
19904
+ client_id: string;
19905
+ client_secret: string | null;
19906
+ cluster_uri: string | null;
19907
+ company_code: string | null;
19908
+ company_name: string | null;
19909
+ connected_at: string | null;
19910
+ created_at: string;
19911
+ environment: string;
19912
+ id: string;
19913
+ is_active: boolean;
19914
+ label: string | null;
19915
+ office_code: string | null;
19916
+ redirect_uri: string;
19917
+ refresh_token: string | null;
19918
+ token_expires_at: string | null;
19919
+ updated_at: string;
19920
+ user_id: string;
19921
+ };
19922
+ Insert: {
19923
+ access_token?: string | null;
19924
+ client_id: string;
19925
+ client_secret?: string | null;
19926
+ cluster_uri?: string | null;
19927
+ company_code?: string | null;
19928
+ company_name?: string | null;
19929
+ connected_at?: string | null;
19930
+ created_at?: string;
19931
+ environment: string;
19932
+ id?: string;
19933
+ is_active?: boolean;
19934
+ label?: string | null;
19935
+ office_code?: string | null;
19936
+ redirect_uri: string;
19937
+ refresh_token?: string | null;
19938
+ token_expires_at?: string | null;
19939
+ updated_at?: string;
19940
+ user_id: string;
19941
+ };
19942
+ Update: {
19943
+ access_token?: string | null;
19944
+ client_id?: string;
19945
+ client_secret?: string | null;
19946
+ cluster_uri?: string | null;
19947
+ company_code?: string | null;
19948
+ company_name?: string | null;
19949
+ connected_at?: string | null;
19118
19950
  created_at?: string;
19119
19951
  environment?: string;
19120
19952
  id?: string;
@@ -19385,6 +20217,10 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
19385
20217
  default_invoice_type: string;
19386
20218
  default_payment_term_days: number;
19387
20219
  default_vat_code: string;
20220
+ invoice_enabled_ao: boolean;
20221
+ invoice_enabled_fo: boolean;
20222
+ invoice_enabled_ho: boolean;
20223
+ invoice_enabled_mo: boolean;
19388
20224
  updated_at: string;
19389
20225
  user_id: string;
19390
20226
  };
@@ -19394,6 +20230,10 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
19394
20230
  default_invoice_type?: string;
19395
20231
  default_payment_term_days?: number;
19396
20232
  default_vat_code?: string;
20233
+ invoice_enabled_ao?: boolean;
20234
+ invoice_enabled_fo?: boolean;
20235
+ invoice_enabled_ho?: boolean;
20236
+ invoice_enabled_mo?: boolean;
19397
20237
  updated_at?: string;
19398
20238
  user_id: string;
19399
20239
  };
@@ -19403,6 +20243,10 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
19403
20243
  default_invoice_type?: string;
19404
20244
  default_payment_term_days?: number;
19405
20245
  default_vat_code?: string;
20246
+ invoice_enabled_ao?: boolean;
20247
+ invoice_enabled_fo?: boolean;
20248
+ invoice_enabled_ho?: boolean;
20249
+ invoice_enabled_mo?: boolean;
19406
20250
  updated_at?: string;
19407
20251
  user_id?: string;
19408
20252
  };
@@ -20697,6 +21541,12 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
20697
21541
  order_number: string;
20698
21542
  }[];
20699
21543
  };
21544
+ autolink_product_to_floriday: {
21545
+ Args: {
21546
+ p_product_id: string;
21547
+ };
21548
+ Returns: string;
21549
+ };
20700
21550
  backfill_open_order_reservations: {
20701
21551
  Args: never;
20702
21552
  Returns: {
@@ -20735,6 +21585,18 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
20735
21585
  Args: never;
20736
21586
  Returns: number;
20737
21587
  };
21588
+ consume_floriday_rate_limit: {
21589
+ Args: {
21590
+ p_bucket: string;
21591
+ p_capacity: number;
21592
+ p_cost?: number;
21593
+ p_refill_per_sec: number;
21594
+ };
21595
+ Returns: {
21596
+ granted: boolean;
21597
+ wait_ms: number;
21598
+ }[];
21599
+ };
20738
21600
  control_get_todays_carts: {
20739
21601
  Args: never;
20740
21602
  Returns: {
@@ -20815,6 +21677,12 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
20815
21677
  status: string;
20816
21678
  }[];
20817
21679
  };
21680
+ enqueue_cart_replan_if_unlocked: {
21681
+ Args: {
21682
+ p_order_id: string;
21683
+ };
21684
+ Returns: undefined;
21685
+ };
20818
21686
  ensure_trade_item_stock_row: {
20819
21687
  Args: {
20820
21688
  p_key: string;
@@ -20921,6 +21789,13 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
20921
21789
  office_code: string;
20922
21790
  }[];
20923
21791
  };
21792
+ get_floricode_record_counts: {
21793
+ Args: never;
21794
+ Returns: {
21795
+ count: number;
21796
+ resource: string;
21797
+ }[];
21798
+ };
20924
21799
  get_floriday_agreements_active: {
20925
21800
  Args: {
20926
21801
  p_on_date?: string;
@@ -21012,6 +21887,12 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
21012
21887
  };
21013
21888
  Returns: import("../integrations/supabase/types").Json;
21014
21889
  };
21890
+ get_offer_delivery_options: {
21891
+ Args: {
21892
+ p_code: string;
21893
+ };
21894
+ Returns: import("../integrations/supabase/types").Json;
21895
+ };
21015
21896
  get_offer_recipient_by_code: {
21016
21897
  Args: {
21017
21898
  p_code: string;
@@ -21076,6 +21957,12 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
21076
21957
  Args: never;
21077
21958
  Returns: boolean;
21078
21959
  };
21960
+ is_superadmin: {
21961
+ Args: {
21962
+ _user_id: string;
21963
+ };
21964
+ Returns: boolean;
21965
+ };
21079
21966
  local_effective_price: {
21080
21967
  Args: {
21081
21968
  _customer_id: string;
@@ -21110,6 +21997,13 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
21110
21997
  };
21111
21998
  Returns: string;
21112
21999
  };
22000
+ next_order_number_for_date: {
22001
+ Args: {
22002
+ p_created_at?: string;
22003
+ p_prefix: string;
22004
+ };
22005
+ Returns: string;
22006
+ };
21113
22007
  next_work_order_number: {
21114
22008
  Args: {
21115
22009
  p_parent_work_order_id?: string;
@@ -21117,6 +22011,12 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
21117
22011
  };
21118
22012
  Returns: string;
21119
22013
  };
22014
+ normalize_order_source: {
22015
+ Args: {
22016
+ p_src: string;
22017
+ };
22018
+ Returns: string;
22019
+ };
21120
22020
  normalize_vat: {
21121
22021
  Args: {
21122
22022
  v: string;
@@ -21131,10 +22031,21 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
21131
22031
  };
21132
22032
  Returns: boolean;
21133
22033
  };
22034
+ order_number_prefix: {
22035
+ Args: {
22036
+ p_custom_fields?: import("../integrations/supabase/types").Json;
22037
+ p_order_source: string;
22038
+ };
22039
+ Returns: string;
22040
+ };
21134
22041
  pickstation_get_orders_raw: {
21135
22042
  Args: never;
21136
22043
  Returns: import("../integrations/supabase/types").Json;
21137
22044
  };
22045
+ pickstation_get_planning_context: {
22046
+ Args: never;
22047
+ Returns: import("../integrations/supabase/types").Json;
22048
+ };
21138
22049
  pickstation_get_settings: {
21139
22050
  Args: never;
21140
22051
  Returns: import("../integrations/supabase/types").Json;
@@ -21165,6 +22076,28 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
21165
22076
  };
21166
22077
  Returns: undefined;
21167
22078
  };
22079
+ recompute_order_status: {
22080
+ Args: {
22081
+ p_order_id: string;
22082
+ };
22083
+ Returns: undefined;
22084
+ };
22085
+ recompute_reserved_for_order: {
22086
+ Args: {
22087
+ p_order_id: string;
22088
+ };
22089
+ Returns: undefined;
22090
+ };
22091
+ recompute_reserved_stock: {
22092
+ Args: {
22093
+ p_trade_item_key: string;
22094
+ };
22095
+ Returns: undefined;
22096
+ };
22097
+ refresh_external_customers_grouped: {
22098
+ Args: never;
22099
+ Returns: undefined;
22100
+ };
21168
22101
  refresh_floricode_derived_code_lists: {
21169
22102
  Args: never;
21170
22103
  Returns: {
@@ -21179,6 +22112,12 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
21179
22112
  };
21180
22113
  Returns: number;
21181
22114
  };
22115
+ refresh_floricode_derived_for_products: {
22116
+ Args: {
22117
+ _product_ids: string[];
22118
+ };
22119
+ Returns: number;
22120
+ };
21182
22121
  reset_floriday_sync_cursor: {
21183
22122
  Args: {
21184
22123
  p_connection_id: string;
@@ -21186,6 +22125,12 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
21186
22125
  };
21187
22126
  Returns: undefined;
21188
22127
  };
22128
+ resolve_product_id_for_item: {
22129
+ Args: {
22130
+ p_product_name: string;
22131
+ };
22132
+ Returns: string;
22133
+ };
21189
22134
  schedule_floriday_additional_services_sync: {
21190
22135
  Args: {
21191
22136
  p_apikey: string;
@@ -21463,6 +22408,24 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
21463
22408
  };
21464
22409
  Returns: string[];
21465
22410
  };
22411
+ sync_cached_packing_from_product: {
22412
+ Args: {
22413
+ p_product_id: string;
22414
+ };
22415
+ Returns: undefined;
22416
+ };
22417
+ sync_order_cart_item_packing_from_product: {
22418
+ Args: {
22419
+ p_product_id: string;
22420
+ };
22421
+ Returns: undefined;
22422
+ };
22423
+ sync_product_packing_from_floriday_cache: {
22424
+ Args: {
22425
+ p_floriday_id: string;
22426
+ };
22427
+ Returns: undefined;
22428
+ };
21466
22429
  twinfield_decrypt: {
21467
22430
  Args: {
21468
22431
  cipher: string;
@@ -21475,6 +22438,17 @@ export declare const createWarehouseFn: import("@tanstack/start-client-core").Re
21475
22438
  };
21476
22439
  Returns: string;
21477
22440
  };
22441
+ upsert_auto_fulfillment_log: {
22442
+ Args: {
22443
+ p_connection_id: string;
22444
+ p_error?: string;
22445
+ p_fulfillment_order_id?: string;
22446
+ p_reason?: string;
22447
+ p_sales_order_id: string;
22448
+ p_status: string;
22449
+ };
22450
+ Returns: undefined;
22451
+ };
21478
22452
  };
21479
22453
  Enums: {
21480
22454
  app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
@@ -21494,7 +22468,10 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
21494
22468
  Tables: {
21495
22469
  afhandeling_settings: {
21496
22470
  Row: {
22471
+ auto_print_delivery_note: boolean;
22472
+ auto_process_paused: boolean;
21497
22473
  created_at: string;
22474
+ extra_pick_days_with_stickers: number;
21498
22475
  id: string;
21499
22476
  max_workdays_earlier_pick: number;
21500
22477
  pick_days_before_transport: number;
@@ -21508,7 +22485,10 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
21508
22485
  user_id: string;
21509
22486
  };
21510
22487
  Insert: {
22488
+ auto_print_delivery_note?: boolean;
22489
+ auto_process_paused?: boolean;
21511
22490
  created_at?: string;
22491
+ extra_pick_days_with_stickers?: number;
21512
22492
  id?: string;
21513
22493
  max_workdays_earlier_pick?: number;
21514
22494
  pick_days_before_transport?: number;
@@ -21522,7 +22502,10 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
21522
22502
  user_id: string;
21523
22503
  };
21524
22504
  Update: {
22505
+ auto_print_delivery_note?: boolean;
22506
+ auto_process_paused?: boolean;
21525
22507
  created_at?: string;
22508
+ extra_pick_days_with_stickers?: number;
21526
22509
  id?: string;
21527
22510
  max_workdays_earlier_pick?: number;
21528
22511
  pick_days_before_transport?: number;
@@ -21796,6 +22779,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
21796
22779
  conflict_reason: string | null;
21797
22780
  created_at: string;
21798
22781
  created_by_role: string | null;
22782
+ customer_address: string | null;
21799
22783
  customer_email: string | null;
21800
22784
  customer_name: string | null;
21801
22785
  end_time: string;
@@ -21821,6 +22805,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
21821
22805
  conflict_reason?: string | null;
21822
22806
  created_at?: string;
21823
22807
  created_by_role?: string | null;
22808
+ customer_address?: string | null;
21824
22809
  customer_email?: string | null;
21825
22810
  customer_name?: string | null;
21826
22811
  end_time: string;
@@ -21846,6 +22831,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
21846
22831
  conflict_reason?: string | null;
21847
22832
  created_at?: string;
21848
22833
  created_by_role?: string | null;
22834
+ customer_address?: string | null;
21849
22835
  customer_email?: string | null;
21850
22836
  customer_name?: string | null;
21851
22837
  end_time?: string;
@@ -22314,6 +23300,36 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
22314
23300
  };
22315
23301
  Relationships: [];
22316
23302
  };
23303
+ cart_replan_queue: {
23304
+ Row: {
23305
+ attempts: number;
23306
+ last_error: string | null;
23307
+ order_id: string;
23308
+ processed_at: string | null;
23309
+ requested_at: string;
23310
+ };
23311
+ Insert: {
23312
+ attempts?: number;
23313
+ last_error?: string | null;
23314
+ order_id: string;
23315
+ processed_at?: string | null;
23316
+ requested_at?: string;
23317
+ };
23318
+ Update: {
23319
+ attempts?: number;
23320
+ last_error?: string | null;
23321
+ order_id?: string;
23322
+ processed_at?: string | null;
23323
+ requested_at?: string;
23324
+ };
23325
+ Relationships: [{
23326
+ foreignKeyName: "cart_replan_queue_order_id_fkey";
23327
+ columns: ["order_id"];
23328
+ isOneToOne: true;
23329
+ referencedRelation: "orders";
23330
+ referencedColumns: ["id"];
23331
+ }];
23332
+ };
22317
23333
  collections: {
22318
23334
  Row: {
22319
23335
  created_at: string;
@@ -24439,34 +25455,52 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
24439
25455
  Row: {
24440
25456
  catalog_key: string | null;
24441
25457
  catalog_url: string;
25458
+ client_id: string | null;
25459
+ client_secret_ciphertext: string | null;
25460
+ client_secret_last4: string | null;
24442
25461
  created_at: string;
24443
25462
  id: number;
24444
25463
  last_meta: import("../integrations/supabase/types").Json | null;
24445
25464
  last_test_at: string | null;
24446
25465
  last_test_error: string | null;
24447
25466
  last_test_ok: boolean | null;
25467
+ last_token_test_at: string | null;
25468
+ last_token_test_error: string | null;
25469
+ last_token_test_ok: boolean | null;
24448
25470
  updated_at: string;
24449
25471
  };
24450
25472
  Insert: {
24451
25473
  catalog_key?: string | null;
24452
25474
  catalog_url?: string;
25475
+ client_id?: string | null;
25476
+ client_secret_ciphertext?: string | null;
25477
+ client_secret_last4?: string | null;
24453
25478
  created_at?: string;
24454
25479
  id?: number;
24455
25480
  last_meta?: import("../integrations/supabase/types").Json | null;
24456
25481
  last_test_at?: string | null;
24457
25482
  last_test_error?: string | null;
24458
25483
  last_test_ok?: boolean | null;
25484
+ last_token_test_at?: string | null;
25485
+ last_token_test_error?: string | null;
25486
+ last_token_test_ok?: boolean | null;
24459
25487
  updated_at?: string;
24460
25488
  };
24461
25489
  Update: {
24462
25490
  catalog_key?: string | null;
24463
25491
  catalog_url?: string;
25492
+ client_id?: string | null;
25493
+ client_secret_ciphertext?: string | null;
25494
+ client_secret_last4?: string | null;
24464
25495
  created_at?: string;
24465
25496
  id?: number;
24466
25497
  last_meta?: import("../integrations/supabase/types").Json | null;
24467
25498
  last_test_at?: string | null;
24468
25499
  last_test_error?: string | null;
24469
25500
  last_test_ok?: boolean | null;
25501
+ last_token_test_at?: string | null;
25502
+ last_token_test_error?: string | null;
25503
+ last_token_test_ok?: boolean | null;
24470
25504
  updated_at?: string;
24471
25505
  };
24472
25506
  Relationships: [];
@@ -24699,6 +25733,54 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
24699
25733
  referencedColumns: ["id"];
24700
25734
  }];
24701
25735
  };
25736
+ floriday_auto_fulfillment_log: {
25737
+ Row: {
25738
+ attempts: number;
25739
+ connection_id: string;
25740
+ created_at: string;
25741
+ error: string | null;
25742
+ fulfillment_order_id: string | null;
25743
+ id: string;
25744
+ last_attempt_at: string | null;
25745
+ reason: string | null;
25746
+ sales_order_id: string;
25747
+ status: string;
25748
+ updated_at: string;
25749
+ };
25750
+ Insert: {
25751
+ attempts?: number;
25752
+ connection_id: string;
25753
+ created_at?: string;
25754
+ error?: string | null;
25755
+ fulfillment_order_id?: string | null;
25756
+ id?: string;
25757
+ last_attempt_at?: string | null;
25758
+ reason?: string | null;
25759
+ sales_order_id: string;
25760
+ status?: string;
25761
+ updated_at?: string;
25762
+ };
25763
+ Update: {
25764
+ attempts?: number;
25765
+ connection_id?: string;
25766
+ created_at?: string;
25767
+ error?: string | null;
25768
+ fulfillment_order_id?: string | null;
25769
+ id?: string;
25770
+ last_attempt_at?: string | null;
25771
+ reason?: string | null;
25772
+ sales_order_id?: string;
25773
+ status?: string;
25774
+ updated_at?: string;
25775
+ };
25776
+ Relationships: [{
25777
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
25778
+ columns: ["connection_id"];
25779
+ isOneToOne: false;
25780
+ referencedRelation: "floriday_connections";
25781
+ referencedColumns: ["id"];
25782
+ }];
25783
+ };
24702
25784
  floriday_base_items_cache: {
24703
25785
  Row: {
24704
25786
  connection_id: string;
@@ -25803,6 +26885,24 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
25803
26885
  referencedColumns: ["id"];
25804
26886
  }];
25805
26887
  };
26888
+ floriday_rate_limit_state: {
26889
+ Row: {
26890
+ bucket: string;
26891
+ last_refill_at: string;
26892
+ tokens: number;
26893
+ };
26894
+ Insert: {
26895
+ bucket: string;
26896
+ last_refill_at?: string;
26897
+ tokens: number;
26898
+ };
26899
+ Update: {
26900
+ bucket?: string;
26901
+ last_refill_at?: string;
26902
+ tokens?: number;
26903
+ };
26904
+ Relationships: [];
26905
+ };
25806
26906
  floriday_resource_schemas: {
25807
26907
  Row: {
25808
26908
  enums: import("../integrations/supabase/types").Json;
@@ -26226,6 +27326,60 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
26226
27326
  referencedColumns: ["id"];
26227
27327
  }];
26228
27328
  };
27329
+ flow_role_assignments: {
27330
+ Row: {
27331
+ created_at: string;
27332
+ id: string;
27333
+ role_id: string;
27334
+ user_id: string;
27335
+ };
27336
+ Insert: {
27337
+ created_at?: string;
27338
+ id?: string;
27339
+ role_id: string;
27340
+ user_id: string;
27341
+ };
27342
+ Update: {
27343
+ created_at?: string;
27344
+ id?: string;
27345
+ role_id?: string;
27346
+ user_id?: string;
27347
+ };
27348
+ Relationships: [{
27349
+ foreignKeyName: "flow_role_assignments_role_id_fkey";
27350
+ columns: ["role_id"];
27351
+ isOneToOne: false;
27352
+ referencedRelation: "flow_roles";
27353
+ referencedColumns: ["id"];
27354
+ }];
27355
+ };
27356
+ flow_roles: {
27357
+ Row: {
27358
+ created_at: string;
27359
+ description: string | null;
27360
+ id: string;
27361
+ module_access: string[];
27362
+ name: string;
27363
+ updated_at: string;
27364
+ };
27365
+ Insert: {
27366
+ created_at?: string;
27367
+ description?: string | null;
27368
+ id?: string;
27369
+ module_access?: string[];
27370
+ name: string;
27371
+ updated_at?: string;
27372
+ };
27373
+ Update: {
27374
+ created_at?: string;
27375
+ description?: string | null;
27376
+ id?: string;
27377
+ module_access?: string[];
27378
+ name?: string;
27379
+ updated_at?: string;
27380
+ };
27381
+ Relationships: [];
27382
+ };
26229
27383
  imap_accounts: {
26230
27384
  Row: {
26231
27385
  created_at: string;
@@ -26857,6 +28011,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
26857
28011
  matched_customer_id: string | null;
26858
28012
  message_id: string;
26859
28013
  notes: string | null;
28014
+ order_number: string | null;
26860
28015
  parsed_payload: import("../integrations/supabase/types").Json | null;
26861
28016
  reviewed_at: string | null;
26862
28017
  reviewed_by: string | null;
@@ -26872,6 +28027,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
26872
28027
  matched_customer_id?: string | null;
26873
28028
  message_id: string;
26874
28029
  notes?: string | null;
28030
+ order_number?: string | null;
26875
28031
  parsed_payload?: import("../integrations/supabase/types").Json | null;
26876
28032
  reviewed_at?: string | null;
26877
28033
  reviewed_by?: string | null;
@@ -26887,6 +28043,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
26887
28043
  matched_customer_id?: string | null;
26888
28044
  message_id?: string;
26889
28045
  notes?: string | null;
28046
+ order_number?: string | null;
26890
28047
  parsed_payload?: import("../integrations/supabase/types").Json | null;
26891
28048
  reviewed_at?: string | null;
26892
28049
  reviewed_by?: string | null;
@@ -27743,6 +28900,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
27743
28900
  id: string;
27744
28901
  items: import("../integrations/supabase/types").Json;
27745
28902
  notes: string | null;
28903
+ order_number: string | null;
27746
28904
  recipient_id: string;
27747
28905
  total_amount: number;
27748
28906
  };
@@ -27756,6 +28914,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
27756
28914
  id?: string;
27757
28915
  items?: import("../integrations/supabase/types").Json;
27758
28916
  notes?: string | null;
28917
+ order_number?: string | null;
27759
28918
  recipient_id: string;
27760
28919
  total_amount?: number;
27761
28920
  };
@@ -27769,6 +28928,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
27769
28928
  id?: string;
27770
28929
  items?: import("../integrations/supabase/types").Json;
27771
28930
  notes?: string | null;
28931
+ order_number?: string | null;
27772
28932
  recipient_id?: string;
27773
28933
  total_amount?: number;
27774
28934
  };
@@ -27928,6 +29088,9 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
27928
29088
  crates_per_layer: number;
27929
29089
  created_at: string;
27930
29090
  id: string;
29091
+ layer_fraction: number;
29092
+ layer_share_pct: number;
29093
+ layers_per_cart: number;
27931
29094
  order_item_id: string | null;
27932
29095
  plants_per_crate: number;
27933
29096
  product_id: string | null;
@@ -27939,6 +29102,9 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
27939
29102
  crates_per_layer?: number;
27940
29103
  created_at?: string;
27941
29104
  id?: string;
29105
+ layer_fraction?: number;
29106
+ layer_share_pct?: number;
29107
+ layers_per_cart?: number;
27942
29108
  order_item_id?: string | null;
27943
29109
  plants_per_crate?: number;
27944
29110
  product_id?: string | null;
@@ -27950,6 +29116,9 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
27950
29116
  crates_per_layer?: number;
27951
29117
  created_at?: string;
27952
29118
  id?: string;
29119
+ layer_fraction?: number;
29120
+ layer_share_pct?: number;
29121
+ layers_per_cart?: number;
27953
29122
  order_item_id?: string | null;
27954
29123
  plants_per_crate?: number;
27955
29124
  product_id?: string | null;
@@ -27977,33 +29146,45 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
27977
29146
  };
27978
29147
  order_carts: {
27979
29148
  Row: {
29149
+ algorithm_version: number;
27980
29150
  cart_number: number;
27981
29151
  created_at: string;
27982
29152
  id: string;
27983
29153
  is_auto: boolean;
27984
29154
  is_complete: boolean;
27985
29155
  notes: string | null;
29156
+ occupancy_pct: number;
27986
29157
  order_id: string;
29158
+ source: string;
29159
+ total_layers_used: number;
27987
29160
  updated_at: string;
27988
29161
  };
27989
29162
  Insert: {
29163
+ algorithm_version?: number;
27990
29164
  cart_number: number;
27991
29165
  created_at?: string;
27992
29166
  id?: string;
27993
29167
  is_auto?: boolean;
27994
29168
  is_complete?: boolean;
27995
29169
  notes?: string | null;
29170
+ occupancy_pct?: number;
27996
29171
  order_id: string;
29172
+ source?: string;
29173
+ total_layers_used?: number;
27997
29174
  updated_at?: string;
27998
29175
  };
27999
29176
  Update: {
29177
+ algorithm_version?: number;
28000
29178
  cart_number?: number;
28001
29179
  created_at?: string;
28002
29180
  id?: string;
28003
29181
  is_auto?: boolean;
28004
29182
  is_complete?: boolean;
28005
29183
  notes?: string | null;
29184
+ occupancy_pct?: number;
28006
29185
  order_id?: string;
29186
+ source?: string;
29187
+ total_layers_used?: number;
28007
29188
  updated_at?: string;
28008
29189
  };
28009
29190
  Relationships: [{
@@ -28156,6 +29337,8 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
28156
29337
  order_date: string;
28157
29338
  order_number: string;
28158
29339
  order_source: string;
29340
+ plan_locked_at: string | null;
29341
+ plan_locked_ref: string | null;
28159
29342
  status: string;
28160
29343
  total: string;
28161
29344
  updated_at: string;
@@ -28172,6 +29355,8 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
28172
29355
  order_date?: string;
28173
29356
  order_number: string;
28174
29357
  order_source?: string;
29358
+ plan_locked_at?: string | null;
29359
+ plan_locked_ref?: string | null;
28175
29360
  status?: string;
28176
29361
  total?: string;
28177
29362
  updated_at?: string;
@@ -28188,6 +29373,8 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
28188
29373
  order_date?: string;
28189
29374
  order_number?: string;
28190
29375
  order_source?: string;
29376
+ plan_locked_at?: string | null;
29377
+ plan_locked_ref?: string | null;
28191
29378
  status?: string;
28192
29379
  total?: string;
28193
29380
  updated_at?: string;
@@ -28556,28 +29743,34 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
28556
29743
  };
28557
29744
  profiles: {
28558
29745
  Row: {
29746
+ address: string | null;
28559
29747
  created_at: string;
28560
29748
  display_name: string | null;
28561
29749
  email: string | null;
28562
29750
  id: string;
29751
+ is_superadmin: boolean;
28563
29752
  notification_preferences: import("../integrations/supabase/types").Json;
28564
29753
  tenant_id: string | null;
28565
29754
  updated_at: string;
28566
29755
  };
28567
29756
  Insert: {
29757
+ address?: string | null;
28568
29758
  created_at?: string;
28569
29759
  display_name?: string | null;
28570
29760
  email?: string | null;
28571
29761
  id: string;
29762
+ is_superadmin?: boolean;
28572
29763
  notification_preferences?: import("../integrations/supabase/types").Json;
28573
29764
  tenant_id?: string | null;
28574
29765
  updated_at?: string;
28575
29766
  };
28576
29767
  Update: {
29768
+ address?: string | null;
28577
29769
  created_at?: string;
28578
29770
  display_name?: string | null;
28579
29771
  email?: string | null;
28580
29772
  id?: string;
29773
+ is_superadmin?: boolean;
28581
29774
  notification_preferences?: import("../integrations/supabase/types").Json;
28582
29775
  tenant_id?: string | null;
28583
29776
  updated_at?: string;
@@ -29367,6 +30560,24 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
29367
30560
  };
29368
30561
  Relationships: [];
29369
30562
  };
30563
+ sidebar_config: {
30564
+ Row: {
30565
+ id: string;
30566
+ module_order: string[];
30567
+ updated_at: string;
30568
+ };
30569
+ Insert: {
30570
+ id?: string;
30571
+ module_order?: string[];
30572
+ updated_at?: string;
30573
+ };
30574
+ Update: {
30575
+ id?: string;
30576
+ module_order?: string[];
30577
+ updated_at?: string;
30578
+ };
30579
+ Relationships: [];
30580
+ };
29370
30581
  stock_import_runs: {
29371
30582
  Row: {
29372
30583
  connection_id: string | null;
@@ -29425,7 +30636,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
29425
30636
  reason: string | null;
29426
30637
  reserved_after: number | null;
29427
30638
  reserved_before: number | null;
29428
- trade_item_key: string;
30639
+ trade_item_key: string | null;
29429
30640
  };
29430
30641
  Insert: {
29431
30642
  connection_id?: string | null;
@@ -29442,7 +30653,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
29442
30653
  reason?: string | null;
29443
30654
  reserved_after?: number | null;
29444
30655
  reserved_before?: number | null;
29445
- trade_item_key: string;
30656
+ trade_item_key?: string | null;
29446
30657
  };
29447
30658
  Update: {
29448
30659
  connection_id?: string | null;
@@ -29459,7 +30670,7 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
29459
30670
  reason?: string | null;
29460
30671
  reserved_after?: number | null;
29461
30672
  reserved_before?: number | null;
29462
- trade_item_key?: string;
30673
+ trade_item_key?: string | null;
29463
30674
  };
29464
30675
  Relationships: [];
29465
30676
  };
@@ -29802,6 +31013,114 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
29802
31013
  };
29803
31014
  Relationships: [];
29804
31015
  };
31016
+ trade_item_supply_lines: {
31017
+ Row: {
31018
+ available_quantity: number | null;
31019
+ connection_id: string;
31020
+ created_at: string;
31021
+ currency: string | null;
31022
+ endpoint_family: string | null;
31023
+ environment: string | null;
31024
+ id: string;
31025
+ last_error: string | null;
31026
+ last_status: number | null;
31027
+ packing_configuration_id: string | null;
31028
+ period_end: string | null;
31029
+ period_start: string | null;
31030
+ price_per_piece: number | null;
31031
+ sales_unit: string | null;
31032
+ supply_line_id: string | null;
31033
+ supply_type: string;
31034
+ trade_item_id: string;
31035
+ updated_at: string;
31036
+ user_id: string;
31037
+ week: number | null;
31038
+ year: number | null;
31039
+ };
31040
+ Insert: {
31041
+ available_quantity?: number | null;
31042
+ connection_id: string;
31043
+ created_at?: string;
31044
+ currency?: string | null;
31045
+ endpoint_family?: string | null;
31046
+ environment?: string | null;
31047
+ id?: string;
31048
+ last_error?: string | null;
31049
+ last_status?: number | null;
31050
+ packing_configuration_id?: string | null;
31051
+ period_end?: string | null;
31052
+ period_start?: string | null;
31053
+ price_per_piece?: number | null;
31054
+ sales_unit?: string | null;
31055
+ supply_line_id?: string | null;
31056
+ supply_type?: string;
31057
+ trade_item_id: string;
31058
+ updated_at?: string;
31059
+ user_id: string;
31060
+ week?: number | null;
31061
+ year?: number | null;
31062
+ };
31063
+ Update: {
31064
+ available_quantity?: number | null;
31065
+ connection_id?: string;
31066
+ created_at?: string;
31067
+ currency?: string | null;
31068
+ endpoint_family?: string | null;
31069
+ environment?: string | null;
31070
+ id?: string;
31071
+ last_error?: string | null;
31072
+ last_status?: number | null;
31073
+ packing_configuration_id?: string | null;
31074
+ period_end?: string | null;
31075
+ period_start?: string | null;
31076
+ price_per_piece?: number | null;
31077
+ sales_unit?: string | null;
31078
+ supply_line_id?: string | null;
31079
+ supply_type?: string;
31080
+ trade_item_id?: string;
31081
+ updated_at?: string;
31082
+ user_id?: string;
31083
+ week?: number | null;
31084
+ year?: number | null;
31085
+ };
31086
+ Relationships: [];
31087
+ };
31088
+ trade_item_warehouse_preferences: {
31089
+ Row: {
31090
+ connection_id: string;
31091
+ created_at: string;
31092
+ id: string;
31093
+ trade_item_id: string;
31094
+ updated_at: string;
31095
+ warehouse_id: string;
31096
+ warehouse_name: string | null;
31097
+ };
31098
+ Insert: {
31099
+ connection_id: string;
31100
+ created_at?: string;
31101
+ id?: string;
31102
+ trade_item_id: string;
31103
+ updated_at?: string;
31104
+ warehouse_id: string;
31105
+ warehouse_name?: string | null;
31106
+ };
31107
+ Update: {
31108
+ connection_id?: string;
31109
+ created_at?: string;
31110
+ id?: string;
31111
+ trade_item_id?: string;
31112
+ updated_at?: string;
31113
+ warehouse_id?: string;
31114
+ warehouse_name?: string | null;
31115
+ };
31116
+ Relationships: [{
31117
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
31118
+ columns: ["connection_id"];
31119
+ isOneToOne: false;
31120
+ referencedRelation: "floriday_connections";
31121
+ referencedColumns: ["id"];
31122
+ }];
31123
+ };
29805
31124
  twinfield_connections: {
29806
31125
  Row: {
29807
31126
  access_token: string | null;
@@ -30121,6 +31440,10 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
30121
31440
  default_invoice_type: string;
30122
31441
  default_payment_term_days: number;
30123
31442
  default_vat_code: string;
31443
+ invoice_enabled_ao: boolean;
31444
+ invoice_enabled_fo: boolean;
31445
+ invoice_enabled_ho: boolean;
31446
+ invoice_enabled_mo: boolean;
30124
31447
  updated_at: string;
30125
31448
  user_id: string;
30126
31449
  };
@@ -30130,6 +31453,10 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
30130
31453
  default_invoice_type?: string;
30131
31454
  default_payment_term_days?: number;
30132
31455
  default_vat_code?: string;
31456
+ invoice_enabled_ao?: boolean;
31457
+ invoice_enabled_fo?: boolean;
31458
+ invoice_enabled_ho?: boolean;
31459
+ invoice_enabled_mo?: boolean;
30133
31460
  updated_at?: string;
30134
31461
  user_id: string;
30135
31462
  };
@@ -30139,6 +31466,10 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
30139
31466
  default_invoice_type?: string;
30140
31467
  default_payment_term_days?: number;
30141
31468
  default_vat_code?: string;
31469
+ invoice_enabled_ao?: boolean;
31470
+ invoice_enabled_fo?: boolean;
31471
+ invoice_enabled_ho?: boolean;
31472
+ invoice_enabled_mo?: boolean;
30142
31473
  updated_at?: string;
30143
31474
  user_id?: string;
30144
31475
  };
@@ -31433,6 +32764,12 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31433
32764
  order_number: string;
31434
32765
  }[];
31435
32766
  };
32767
+ autolink_product_to_floriday: {
32768
+ Args: {
32769
+ p_product_id: string;
32770
+ };
32771
+ Returns: string;
32772
+ };
31436
32773
  backfill_open_order_reservations: {
31437
32774
  Args: never;
31438
32775
  Returns: {
@@ -31471,6 +32808,18 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31471
32808
  Args: never;
31472
32809
  Returns: number;
31473
32810
  };
32811
+ consume_floriday_rate_limit: {
32812
+ Args: {
32813
+ p_bucket: string;
32814
+ p_capacity: number;
32815
+ p_cost?: number;
32816
+ p_refill_per_sec: number;
32817
+ };
32818
+ Returns: {
32819
+ granted: boolean;
32820
+ wait_ms: number;
32821
+ }[];
32822
+ };
31474
32823
  control_get_todays_carts: {
31475
32824
  Args: never;
31476
32825
  Returns: {
@@ -31551,6 +32900,12 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31551
32900
  status: string;
31552
32901
  }[];
31553
32902
  };
32903
+ enqueue_cart_replan_if_unlocked: {
32904
+ Args: {
32905
+ p_order_id: string;
32906
+ };
32907
+ Returns: undefined;
32908
+ };
31554
32909
  ensure_trade_item_stock_row: {
31555
32910
  Args: {
31556
32911
  p_key: string;
@@ -31657,6 +33012,13 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31657
33012
  office_code: string;
31658
33013
  }[];
31659
33014
  };
33015
+ get_floricode_record_counts: {
33016
+ Args: never;
33017
+ Returns: {
33018
+ count: number;
33019
+ resource: string;
33020
+ }[];
33021
+ };
31660
33022
  get_floriday_agreements_active: {
31661
33023
  Args: {
31662
33024
  p_on_date?: string;
@@ -31748,6 +33110,12 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31748
33110
  };
31749
33111
  Returns: import("../integrations/supabase/types").Json;
31750
33112
  };
33113
+ get_offer_delivery_options: {
33114
+ Args: {
33115
+ p_code: string;
33116
+ };
33117
+ Returns: import("../integrations/supabase/types").Json;
33118
+ };
31751
33119
  get_offer_recipient_by_code: {
31752
33120
  Args: {
31753
33121
  p_code: string;
@@ -31812,6 +33180,12 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31812
33180
  Args: never;
31813
33181
  Returns: boolean;
31814
33182
  };
33183
+ is_superadmin: {
33184
+ Args: {
33185
+ _user_id: string;
33186
+ };
33187
+ Returns: boolean;
33188
+ };
31815
33189
  local_effective_price: {
31816
33190
  Args: {
31817
33191
  _customer_id: string;
@@ -31846,6 +33220,13 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31846
33220
  };
31847
33221
  Returns: string;
31848
33222
  };
33223
+ next_order_number_for_date: {
33224
+ Args: {
33225
+ p_created_at?: string;
33226
+ p_prefix: string;
33227
+ };
33228
+ Returns: string;
33229
+ };
31849
33230
  next_work_order_number: {
31850
33231
  Args: {
31851
33232
  p_parent_work_order_id?: string;
@@ -31853,6 +33234,12 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31853
33234
  };
31854
33235
  Returns: string;
31855
33236
  };
33237
+ normalize_order_source: {
33238
+ Args: {
33239
+ p_src: string;
33240
+ };
33241
+ Returns: string;
33242
+ };
31856
33243
  normalize_vat: {
31857
33244
  Args: {
31858
33245
  v: string;
@@ -31867,10 +33254,21 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31867
33254
  };
31868
33255
  Returns: boolean;
31869
33256
  };
33257
+ order_number_prefix: {
33258
+ Args: {
33259
+ p_custom_fields?: import("../integrations/supabase/types").Json;
33260
+ p_order_source: string;
33261
+ };
33262
+ Returns: string;
33263
+ };
31870
33264
  pickstation_get_orders_raw: {
31871
33265
  Args: never;
31872
33266
  Returns: import("../integrations/supabase/types").Json;
31873
33267
  };
33268
+ pickstation_get_planning_context: {
33269
+ Args: never;
33270
+ Returns: import("../integrations/supabase/types").Json;
33271
+ };
31874
33272
  pickstation_get_settings: {
31875
33273
  Args: never;
31876
33274
  Returns: import("../integrations/supabase/types").Json;
@@ -31901,6 +33299,28 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31901
33299
  };
31902
33300
  Returns: undefined;
31903
33301
  };
33302
+ recompute_order_status: {
33303
+ Args: {
33304
+ p_order_id: string;
33305
+ };
33306
+ Returns: undefined;
33307
+ };
33308
+ recompute_reserved_for_order: {
33309
+ Args: {
33310
+ p_order_id: string;
33311
+ };
33312
+ Returns: undefined;
33313
+ };
33314
+ recompute_reserved_stock: {
33315
+ Args: {
33316
+ p_trade_item_key: string;
33317
+ };
33318
+ Returns: undefined;
33319
+ };
33320
+ refresh_external_customers_grouped: {
33321
+ Args: never;
33322
+ Returns: undefined;
33323
+ };
31904
33324
  refresh_floricode_derived_code_lists: {
31905
33325
  Args: never;
31906
33326
  Returns: {
@@ -31915,6 +33335,12 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31915
33335
  };
31916
33336
  Returns: number;
31917
33337
  };
33338
+ refresh_floricode_derived_for_products: {
33339
+ Args: {
33340
+ _product_ids: string[];
33341
+ };
33342
+ Returns: number;
33343
+ };
31918
33344
  reset_floriday_sync_cursor: {
31919
33345
  Args: {
31920
33346
  p_connection_id: string;
@@ -31922,6 +33348,12 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
31922
33348
  };
31923
33349
  Returns: undefined;
31924
33350
  };
33351
+ resolve_product_id_for_item: {
33352
+ Args: {
33353
+ p_product_name: string;
33354
+ };
33355
+ Returns: string;
33356
+ };
31925
33357
  schedule_floriday_additional_services_sync: {
31926
33358
  Args: {
31927
33359
  p_apikey: string;
@@ -32199,6 +33631,24 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
32199
33631
  };
32200
33632
  Returns: string[];
32201
33633
  };
33634
+ sync_cached_packing_from_product: {
33635
+ Args: {
33636
+ p_product_id: string;
33637
+ };
33638
+ Returns: undefined;
33639
+ };
33640
+ sync_order_cart_item_packing_from_product: {
33641
+ Args: {
33642
+ p_product_id: string;
33643
+ };
33644
+ Returns: undefined;
33645
+ };
33646
+ sync_product_packing_from_floriday_cache: {
33647
+ Args: {
33648
+ p_floriday_id: string;
33649
+ };
33650
+ Returns: undefined;
33651
+ };
32202
33652
  twinfield_decrypt: {
32203
33653
  Args: {
32204
33654
  cipher: string;
@@ -32211,6 +33661,17 @@ export declare const updateWarehouseFn: import("@tanstack/start-client-core").Re
32211
33661
  };
32212
33662
  Returns: string;
32213
33663
  };
33664
+ upsert_auto_fulfillment_log: {
33665
+ Args: {
33666
+ p_connection_id: string;
33667
+ p_error?: string;
33668
+ p_fulfillment_order_id?: string;
33669
+ p_reason?: string;
33670
+ p_sales_order_id: string;
33671
+ p_status: string;
33672
+ };
33673
+ Returns: undefined;
33674
+ };
32214
33675
  };
32215
33676
  Enums: {
32216
33677
  app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";