@flowselections/floriday-voorraad 1.0.16 → 1.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist-lib/components/voorraad/AdditionalPackagingDialog.d.ts +9 -0
  2. package/dist-lib/components/voorraad/AdditionalPackagingDialog.d.ts.map +1 -0
  3. package/dist-lib/components/voorraad/AdditionalPackagingDialog.js +51 -0
  4. package/dist-lib/components/voorraad/ArtikelWizard.d.ts.map +1 -1
  5. package/dist-lib/components/voorraad/ArtikelWizard.js +372 -30
  6. package/dist-lib/components/voorraad/EditArtikelPage.d.ts.map +1 -1
  7. package/dist-lib/components/voorraad/EditArtikelPage.js +78 -4
  8. package/dist-lib/components/voorraad/OrderHistoryCard.d.ts +8 -0
  9. package/dist-lib/components/voorraad/OrderHistoryCard.d.ts.map +1 -0
  10. package/dist-lib/components/voorraad/OrderHistoryCard.js +133 -0
  11. package/dist-lib/components/voorraad/PriceStatusBadge.d.ts +7 -0
  12. package/dist-lib/components/voorraad/PriceStatusBadge.d.ts.map +1 -0
  13. package/dist-lib/components/voorraad/PriceStatusBadge.js +67 -0
  14. package/dist-lib/components/voorraad/VoorraadStockCard.d.ts +2 -1
  15. package/dist-lib/components/voorraad/VoorraadStockCard.d.ts.map +1 -1
  16. package/dist-lib/components/voorraad/VoorraadStockCard.js +5 -4
  17. package/dist-lib/components/voorraad/VoorraadTable.d.ts.map +1 -1
  18. package/dist-lib/components/voorraad/VoorraadTable.js +6 -1
  19. package/dist-lib/hooks/useLocalTradeItems.d.ts.map +1 -1
  20. package/dist-lib/hooks/useLocalTradeItems.js +4 -0
  21. package/dist-lib/hooks/useTradeItemStock.d.ts +14 -1
  22. package/dist-lib/hooks/useTradeItemStock.d.ts.map +1 -1
  23. package/dist-lib/hooks/useTradeItemStock.js +76 -17
  24. package/dist-lib/hooks/useTradeItemSupplyLine.d.ts +21 -0
  25. package/dist-lib/hooks/useTradeItemSupplyLine.d.ts.map +1 -0
  26. package/dist-lib/hooks/useTradeItemSupplyLine.js +49 -0
  27. package/dist-lib/hooks/useVoorraadData.d.ts.map +1 -1
  28. package/dist-lib/hooks/useVoorraadData.js +35 -3
  29. package/dist-lib/integrations/supabase/auth-middleware.d.ts +473 -3
  30. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  31. package/dist-lib/integrations/supabase/client.d.ts +473 -3
  32. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  33. package/dist-lib/integrations/supabase/client.server.d.ts +473 -3
  34. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  35. package/dist-lib/integrations/supabase/types.d.ts +481 -3
  36. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  37. package/dist-lib/lib/floricode-required-features.functions.d.ts +480 -4
  38. package/dist-lib/lib/floricode-required-features.functions.d.ts.map +1 -1
  39. package/dist-lib/lib/floricode-required-features.functions.js +20 -2
  40. package/dist-lib/lib/floriday-customer-offer.functions.d.ts +11264 -0
  41. package/dist-lib/lib/floriday-customer-offer.functions.d.ts.map +1 -0
  42. package/dist-lib/lib/floriday-customer-offer.functions.js +175 -0
  43. package/dist-lib/lib/floriday-gateway.functions.d.ts +13155 -15
  44. package/dist-lib/lib/floriday-gateway.functions.d.ts.map +1 -1
  45. package/dist-lib/lib/floriday-gateway.functions.js +150 -0
  46. package/dist-lib/lib/floriday-gateway.server.d.ts +22 -0
  47. package/dist-lib/lib/floriday-gateway.server.d.ts.map +1 -1
  48. package/dist-lib/lib/floriday-gateway.server.js +3 -0
  49. package/dist-lib/lib/floriday-payload.d.ts +60 -6
  50. package/dist-lib/lib/floriday-payload.d.ts.map +1 -1
  51. package/dist-lib/lib/floriday-payload.js +104 -7
  52. package/dist-lib/lib/floriday-supply-line.d.ts +53 -0
  53. package/dist-lib/lib/floriday-supply-line.d.ts.map +1 -0
  54. package/dist-lib/lib/floriday-supply-line.js +109 -0
  55. package/dist-lib/lib/floriday-warehouse.functions.d.ts +1420 -10
  56. package/dist-lib/lib/floriday-warehouse.functions.d.ts.map +1 -1
  57. package/dist-lib/lib/floriday-writes.functions.d.ts +947 -7
  58. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  59. package/dist-lib/lib/floriday-writes.functions.js +6 -1
  60. package/dist-lib/lib/vrs-catalog.d.ts +27 -0
  61. package/dist-lib/lib/vrs-catalog.d.ts.map +1 -0
  62. package/dist-lib/lib/vrs-catalog.js +98 -0
  63. package/package.json +3 -2
  64. package/public/flowselections-assets/Voorraad/floriday-logo.png +0 -0
@@ -31,7 +31,10 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
31
31
  Tables: {
32
32
  afhandeling_settings: {
33
33
  Row: {
34
+ auto_print_delivery_note: boolean;
35
+ auto_process_paused: boolean;
34
36
  created_at: string;
37
+ extra_pick_days_with_stickers: number;
35
38
  id: string;
36
39
  max_workdays_earlier_pick: number;
37
40
  pick_days_before_transport: number;
@@ -45,7 +48,10 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
45
48
  user_id: string;
46
49
  };
47
50
  Insert: {
51
+ auto_print_delivery_note?: boolean;
52
+ auto_process_paused?: boolean;
48
53
  created_at?: string;
54
+ extra_pick_days_with_stickers?: number;
49
55
  id?: string;
50
56
  max_workdays_earlier_pick?: number;
51
57
  pick_days_before_transport?: number;
@@ -55,11 +61,20 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
55
61
  signup_mail_lead_minutes?: number;
56
62
  signup_mail_purpose?: string;
57
63
  transport_register_days_before?: number;
58
- updated_at?: string;
64
+ updated_at
65
+ /**
66
+ * Minimalistische Supabase-client-shape die `computeVbnRequiredFeatures`
67
+ * daadwerkelijk gebruikt. Getypeerd als `any` zodat zowel de echte
68
+ * `SupabaseClient` als de fake-client in tests passen.
69
+ */
70
+ ?: string;
59
71
  user_id: string;
60
72
  };
61
73
  Update: {
74
+ auto_print_delivery_note?: boolean;
75
+ auto_process_paused?: boolean;
62
76
  created_at?: string;
77
+ extra_pick_days_with_stickers?: number;
63
78
  id?: string;
64
79
  max_workdays_earlier_pick?: number;
65
80
  pick_days_before_transport?: number;
@@ -851,6 +866,36 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
851
866
  };
852
867
  Relationships: [];
853
868
  };
869
+ cart_replan_queue: {
870
+ Row: {
871
+ attempts: number;
872
+ last_error: string | null;
873
+ order_id: string;
874
+ processed_at: string | null;
875
+ requested_at: string;
876
+ };
877
+ Insert: {
878
+ attempts?: number;
879
+ last_error?: string | null;
880
+ order_id: string;
881
+ processed_at?: string | null;
882
+ requested_at?: string;
883
+ };
884
+ Update: {
885
+ attempts?: number;
886
+ last_error?: string | null;
887
+ order_id?: string;
888
+ processed_at?: string | null;
889
+ requested_at?: string;
890
+ };
891
+ Relationships: [{
892
+ foreignKeyName: "cart_replan_queue_order_id_fkey";
893
+ columns: ["order_id"];
894
+ isOneToOne: true;
895
+ referencedRelation: "orders";
896
+ referencedColumns: ["id"];
897
+ }];
898
+ };
854
899
  collections: {
855
900
  Row: {
856
901
  created_at: string;
@@ -2976,34 +3021,52 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
2976
3021
  Row: {
2977
3022
  catalog_key: string | null;
2978
3023
  catalog_url: string;
3024
+ client_id: string | null;
3025
+ client_secret_ciphertext: string | null;
3026
+ client_secret_last4: string | null;
2979
3027
  created_at: string;
2980
3028
  id: number;
2981
3029
  last_meta: import("../integrations/supabase/types").Json | null;
2982
3030
  last_test_at: string | null;
2983
3031
  last_test_error: string | null;
2984
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;
2985
3036
  updated_at: string;
2986
3037
  };
2987
3038
  Insert: {
2988
3039
  catalog_key?: string | null;
2989
3040
  catalog_url?: string;
3041
+ client_id?: string | null;
3042
+ client_secret_ciphertext?: string | null;
3043
+ client_secret_last4?: string | null;
2990
3044
  created_at?: string;
2991
3045
  id?: number;
2992
3046
  last_meta?: import("../integrations/supabase/types").Json | null;
2993
3047
  last_test_at?: string | null;
2994
3048
  last_test_error?: string | null;
2995
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;
2996
3053
  updated_at?: string;
2997
3054
  };
2998
3055
  Update: {
2999
3056
  catalog_key?: string | null;
3000
3057
  catalog_url?: string;
3058
+ client_id?: string | null;
3059
+ client_secret_ciphertext?: string | null;
3060
+ client_secret_last4?: string | null;
3001
3061
  created_at?: string;
3002
3062
  id?: number;
3003
3063
  last_meta?: import("../integrations/supabase/types").Json | null;
3004
3064
  last_test_at?: string | null;
3005
3065
  last_test_error?: string | null;
3006
3066
  last_test_ok?: boolean | null;
3067
+ last_token_test_at?: string | null;
3068
+ last_token_test_error?: string | null;
3069
+ last_token_test_ok?: boolean | null;
3007
3070
  updated_at?: string;
3008
3071
  };
3009
3072
  Relationships: [];
@@ -3236,6 +3299,54 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
3236
3299
  referencedColumns: ["id"];
3237
3300
  }];
3238
3301
  };
3302
+ floriday_auto_fulfillment_log: {
3303
+ Row: {
3304
+ attempts: number;
3305
+ connection_id: string;
3306
+ created_at: string;
3307
+ error: string | null;
3308
+ fulfillment_order_id: string | null;
3309
+ id: string;
3310
+ last_attempt_at: string | null;
3311
+ reason: string | null;
3312
+ sales_order_id: string;
3313
+ status: string;
3314
+ updated_at: string;
3315
+ };
3316
+ Insert: {
3317
+ attempts?: number;
3318
+ connection_id: string;
3319
+ created_at?: string;
3320
+ error?: string | null;
3321
+ fulfillment_order_id?: string | null;
3322
+ id?: string;
3323
+ last_attempt_at?: string | null;
3324
+ reason?: string | null;
3325
+ sales_order_id: string;
3326
+ status?: string;
3327
+ updated_at?: string;
3328
+ };
3329
+ Update: {
3330
+ attempts?: number;
3331
+ connection_id?: string;
3332
+ created_at?: string;
3333
+ error?: string | null;
3334
+ fulfillment_order_id?: string | null;
3335
+ id?: string;
3336
+ last_attempt_at?: string | null;
3337
+ reason?: string | null;
3338
+ sales_order_id?: string;
3339
+ status?: string;
3340
+ updated_at?: string;
3341
+ };
3342
+ Relationships: [{
3343
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
3344
+ columns: ["connection_id"];
3345
+ isOneToOne: false;
3346
+ referencedRelation: "floriday_connections";
3347
+ referencedColumns: ["id"];
3348
+ }];
3349
+ };
3239
3350
  floriday_base_items_cache: {
3240
3351
  Row: {
3241
3352
  connection_id: string;
@@ -4340,6 +4451,24 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
4340
4451
  referencedColumns: ["id"];
4341
4452
  }];
4342
4453
  };
4454
+ floriday_rate_limit_state: {
4455
+ Row: {
4456
+ bucket: string;
4457
+ last_refill_at: string;
4458
+ tokens: number;
4459
+ };
4460
+ Insert: {
4461
+ bucket: string;
4462
+ last_refill_at?: string;
4463
+ tokens: number;
4464
+ };
4465
+ Update: {
4466
+ bucket?: string;
4467
+ last_refill_at?: string;
4468
+ tokens?: number;
4469
+ };
4470
+ Relationships: [];
4471
+ };
4343
4472
  floriday_resource_schemas: {
4344
4473
  Row: {
4345
4474
  enums: import("../integrations/supabase/types").Json;
@@ -4763,6 +4892,60 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
4763
4892
  referencedColumns: ["id"];
4764
4893
  }];
4765
4894
  };
4895
+ flow_role_assignments: {
4896
+ Row: {
4897
+ created_at: string;
4898
+ id: string;
4899
+ role_id: string;
4900
+ user_id: string;
4901
+ };
4902
+ Insert: {
4903
+ created_at?: string;
4904
+ id?: string;
4905
+ role_id: string;
4906
+ user_id: string;
4907
+ };
4908
+ Update: {
4909
+ created_at?: string;
4910
+ id?: string;
4911
+ role_id?: string;
4912
+ user_id?: string;
4913
+ };
4914
+ Relationships: [{
4915
+ foreignKeyName: "flow_role_assignments_role_id_fkey";
4916
+ columns: ["role_id"];
4917
+ isOneToOne: false;
4918
+ referencedRelation: "flow_roles";
4919
+ referencedColumns: ["id"];
4920
+ }];
4921
+ };
4922
+ flow_roles: {
4923
+ Row: {
4924
+ created_at: string;
4925
+ description: string | null;
4926
+ id: string;
4927
+ module_access: string[];
4928
+ name: string;
4929
+ updated_at: string;
4930
+ };
4931
+ Insert: {
4932
+ created_at?: string;
4933
+ description?: string | null;
4934
+ id?: string;
4935
+ module_access?: string[];
4936
+ name: string;
4937
+ updated_at?: string;
4938
+ };
4939
+ Update: {
4940
+ created_at?: string;
4941
+ description?: string | null;
4942
+ id?: string;
4943
+ module_access?: string[];
4944
+ name?: string;
4945
+ updated_at?: string;
4946
+ };
4947
+ Relationships: [];
4948
+ };
4766
4949
  imap_accounts: {
4767
4950
  Row: {
4768
4951
  created_at: string;
@@ -5394,6 +5577,7 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
5394
5577
  matched_customer_id: string | null;
5395
5578
  message_id: string;
5396
5579
  notes: string | null;
5580
+ order_number: string | null;
5397
5581
  parsed_payload: import("../integrations/supabase/types").Json | null;
5398
5582
  reviewed_at: string | null;
5399
5583
  reviewed_by: string | null;
@@ -5409,6 +5593,7 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
5409
5593
  matched_customer_id?: string | null;
5410
5594
  message_id: string;
5411
5595
  notes?: string | null;
5596
+ order_number?: string | null;
5412
5597
  parsed_payload?: import("../integrations/supabase/types").Json | null;
5413
5598
  reviewed_at?: string | null;
5414
5599
  reviewed_by?: string | null;
@@ -5424,6 +5609,7 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
5424
5609
  matched_customer_id?: string | null;
5425
5610
  message_id?: string;
5426
5611
  notes?: string | null;
5612
+ order_number?: string | null;
5427
5613
  parsed_payload?: import("../integrations/supabase/types").Json | null;
5428
5614
  reviewed_at?: string | null;
5429
5615
  reviewed_by?: string | null;
@@ -6280,6 +6466,7 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
6280
6466
  id: string;
6281
6467
  items: import("../integrations/supabase/types").Json;
6282
6468
  notes: string | null;
6469
+ order_number: string | null;
6283
6470
  recipient_id: string;
6284
6471
  total_amount: number;
6285
6472
  };
@@ -6293,6 +6480,7 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
6293
6480
  id?: string;
6294
6481
  items?: import("../integrations/supabase/types").Json;
6295
6482
  notes?: string | null;
6483
+ order_number?: string | null;
6296
6484
  recipient_id: string;
6297
6485
  total_amount?: number;
6298
6486
  };
@@ -6306,6 +6494,7 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
6306
6494
  id?: string;
6307
6495
  items?: import("../integrations/supabase/types").Json;
6308
6496
  notes?: string | null;
6497
+ order_number?: string | null;
6309
6498
  recipient_id?: string;
6310
6499
  total_amount?: number;
6311
6500
  };
@@ -6465,6 +6654,9 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
6465
6654
  crates_per_layer: number;
6466
6655
  created_at: string;
6467
6656
  id: string;
6657
+ layer_fraction: number;
6658
+ layer_share_pct: number;
6659
+ layers_per_cart: number;
6468
6660
  order_item_id: string | null;
6469
6661
  plants_per_crate: number;
6470
6662
  product_id: string | null;
@@ -6476,6 +6668,9 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
6476
6668
  crates_per_layer?: number;
6477
6669
  created_at?: string;
6478
6670
  id?: string;
6671
+ layer_fraction?: number;
6672
+ layer_share_pct?: number;
6673
+ layers_per_cart?: number;
6479
6674
  order_item_id?: string | null;
6480
6675
  plants_per_crate?: number;
6481
6676
  product_id?: string | null;
@@ -6487,6 +6682,9 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
6487
6682
  crates_per_layer?: number;
6488
6683
  created_at?: string;
6489
6684
  id?: string;
6685
+ layer_fraction?: number;
6686
+ layer_share_pct?: number;
6687
+ layers_per_cart?: number;
6490
6688
  order_item_id?: string | null;
6491
6689
  plants_per_crate?: number;
6492
6690
  product_id?: string | null;
@@ -6514,33 +6712,45 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
6514
6712
  };
6515
6713
  order_carts: {
6516
6714
  Row: {
6715
+ algorithm_version: number;
6517
6716
  cart_number: number;
6518
6717
  created_at: string;
6519
6718
  id: string;
6520
6719
  is_auto: boolean;
6521
6720
  is_complete: boolean;
6522
6721
  notes: string | null;
6722
+ occupancy_pct: number;
6523
6723
  order_id: string;
6724
+ source: string;
6725
+ total_layers_used: number;
6524
6726
  updated_at: string;
6525
6727
  };
6526
6728
  Insert: {
6729
+ algorithm_version?: number;
6527
6730
  cart_number: number;
6528
6731
  created_at?: string;
6529
6732
  id?: string;
6530
6733
  is_auto?: boolean;
6531
6734
  is_complete?: boolean;
6532
6735
  notes?: string | null;
6736
+ occupancy_pct?: number;
6533
6737
  order_id: string;
6738
+ source?: string;
6739
+ total_layers_used?: number;
6534
6740
  updated_at?: string;
6535
6741
  };
6536
6742
  Update: {
6743
+ algorithm_version?: number;
6537
6744
  cart_number?: number;
6538
6745
  created_at?: string;
6539
6746
  id?: string;
6540
6747
  is_auto?: boolean;
6541
6748
  is_complete?: boolean;
6542
6749
  notes?: string | null;
6750
+ occupancy_pct?: number;
6543
6751
  order_id?: string;
6752
+ source?: string;
6753
+ total_layers_used?: number;
6544
6754
  updated_at?: string;
6545
6755
  };
6546
6756
  Relationships: [{
@@ -6693,6 +6903,8 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
6693
6903
  order_date: string;
6694
6904
  order_number: string;
6695
6905
  order_source: string;
6906
+ plan_locked_at: string | null;
6907
+ plan_locked_ref: string | null;
6696
6908
  status: string;
6697
6909
  total: string;
6698
6910
  updated_at: string;
@@ -6709,6 +6921,8 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
6709
6921
  order_date?: string;
6710
6922
  order_number: string;
6711
6923
  order_source?: string;
6924
+ plan_locked_at?: string | null;
6925
+ plan_locked_ref?: string | null;
6712
6926
  status?: string;
6713
6927
  total?: string;
6714
6928
  updated_at?: string;
@@ -6725,6 +6939,8 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
6725
6939
  order_date?: string;
6726
6940
  order_number?: string;
6727
6941
  order_source?: string;
6942
+ plan_locked_at?: string | null;
6943
+ plan_locked_ref?: string | null;
6728
6944
  status?: string;
6729
6945
  total?: string;
6730
6946
  updated_at?: string;
@@ -7097,6 +7313,7 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
7097
7313
  display_name: string | null;
7098
7314
  email: string | null;
7099
7315
  id: string;
7316
+ is_superadmin: boolean;
7100
7317
  notification_preferences: import("../integrations/supabase/types").Json;
7101
7318
  tenant_id: string | null;
7102
7319
  updated_at: string;
@@ -7106,6 +7323,7 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
7106
7323
  display_name?: string | null;
7107
7324
  email?: string | null;
7108
7325
  id: string;
7326
+ is_superadmin?: boolean;
7109
7327
  notification_preferences?: import("../integrations/supabase/types").Json;
7110
7328
  tenant_id?: string | null;
7111
7329
  updated_at?: string;
@@ -7115,6 +7333,7 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
7115
7333
  display_name?: string | null;
7116
7334
  email?: string | null;
7117
7335
  id?: string;
7336
+ is_superadmin?: boolean;
7118
7337
  notification_preferences?: import("../integrations/supabase/types").Json;
7119
7338
  tenant_id?: string | null;
7120
7339
  updated_at?: string;
@@ -7904,6 +8123,24 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
7904
8123
  };
7905
8124
  Relationships: [];
7906
8125
  };
8126
+ sidebar_config: {
8127
+ Row: {
8128
+ id: string;
8129
+ module_order: string[];
8130
+ updated_at: string;
8131
+ };
8132
+ Insert: {
8133
+ id?: string;
8134
+ module_order?: string[];
8135
+ updated_at?: string;
8136
+ };
8137
+ Update: {
8138
+ id?: string;
8139
+ module_order?: string[];
8140
+ updated_at?: string;
8141
+ };
8142
+ Relationships: [];
8143
+ };
7907
8144
  stock_import_runs: {
7908
8145
  Row: {
7909
8146
  connection_id: string | null;
@@ -7962,7 +8199,7 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
7962
8199
  reason: string | null;
7963
8200
  reserved_after: number | null;
7964
8201
  reserved_before: number | null;
7965
- trade_item_key: string;
8202
+ trade_item_key: string | null;
7966
8203
  };
7967
8204
  Insert: {
7968
8205
  connection_id?: string | null;
@@ -7979,7 +8216,7 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
7979
8216
  reason?: string | null;
7980
8217
  reserved_after?: number | null;
7981
8218
  reserved_before?: number | null;
7982
- trade_item_key: string;
8219
+ trade_item_key?: string | null;
7983
8220
  };
7984
8221
  Update: {
7985
8222
  connection_id?: string | null;
@@ -7996,7 +8233,7 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
7996
8233
  reason?: string | null;
7997
8234
  reserved_after?: number | null;
7998
8235
  reserved_before?: number | null;
7999
- trade_item_key?: string;
8236
+ trade_item_key?: string | null;
8000
8237
  };
8001
8238
  Relationships: [];
8002
8239
  };
@@ -8339,6 +8576,114 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
8339
8576
  };
8340
8577
  Relationships: [];
8341
8578
  };
8579
+ trade_item_supply_lines: {
8580
+ Row: {
8581
+ available_quantity: number | null;
8582
+ connection_id: string;
8583
+ created_at: string;
8584
+ currency: string | null;
8585
+ endpoint_family: string | null;
8586
+ environment: string | null;
8587
+ id: string;
8588
+ last_error: string | null;
8589
+ last_status: number | null;
8590
+ packing_configuration_id: string | null;
8591
+ period_end: string | null;
8592
+ period_start: string | null;
8593
+ price_per_piece: number | null;
8594
+ sales_unit: string | null;
8595
+ supply_line_id: string | null;
8596
+ supply_type: string;
8597
+ trade_item_id: string;
8598
+ updated_at: string;
8599
+ user_id: string;
8600
+ week: number | null;
8601
+ year: number | null;
8602
+ };
8603
+ Insert: {
8604
+ available_quantity?: number | null;
8605
+ connection_id: string;
8606
+ created_at?: string;
8607
+ currency?: string | null;
8608
+ endpoint_family?: string | null;
8609
+ environment?: string | null;
8610
+ id?: string;
8611
+ last_error?: string | null;
8612
+ last_status?: number | null;
8613
+ packing_configuration_id?: string | null;
8614
+ period_end?: string | null;
8615
+ period_start?: string | null;
8616
+ price_per_piece?: number | null;
8617
+ sales_unit?: string | null;
8618
+ supply_line_id?: string | null;
8619
+ supply_type?: string;
8620
+ trade_item_id: string;
8621
+ updated_at?: string;
8622
+ user_id: string;
8623
+ week?: number | null;
8624
+ year?: number | null;
8625
+ };
8626
+ Update: {
8627
+ available_quantity?: number | null;
8628
+ connection_id?: string;
8629
+ created_at?: string;
8630
+ currency?: string | null;
8631
+ endpoint_family?: string | null;
8632
+ environment?: string | null;
8633
+ id?: string;
8634
+ last_error?: string | null;
8635
+ last_status?: number | null;
8636
+ packing_configuration_id?: string | null;
8637
+ period_end?: string | null;
8638
+ period_start?: string | null;
8639
+ price_per_piece?: number | null;
8640
+ sales_unit?: string | null;
8641
+ supply_line_id?: string | null;
8642
+ supply_type?: string;
8643
+ trade_item_id?: string;
8644
+ updated_at?: string;
8645
+ user_id?: string;
8646
+ week?: number | null;
8647
+ year?: number | null;
8648
+ };
8649
+ Relationships: [];
8650
+ };
8651
+ trade_item_warehouse_preferences: {
8652
+ Row: {
8653
+ connection_id: string;
8654
+ created_at: string;
8655
+ id: string;
8656
+ trade_item_id: string;
8657
+ updated_at: string;
8658
+ warehouse_id: string;
8659
+ warehouse_name: string | null;
8660
+ };
8661
+ Insert: {
8662
+ connection_id: string;
8663
+ created_at?: string;
8664
+ id?: string;
8665
+ trade_item_id: string;
8666
+ updated_at?: string;
8667
+ warehouse_id: string;
8668
+ warehouse_name?: string | null;
8669
+ };
8670
+ Update: {
8671
+ connection_id?: string;
8672
+ created_at?: string;
8673
+ id?: string;
8674
+ trade_item_id?: string;
8675
+ updated_at?: string;
8676
+ warehouse_id?: string;
8677
+ warehouse_name?: string | null;
8678
+ };
8679
+ Relationships: [{
8680
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
8681
+ columns: ["connection_id"];
8682
+ isOneToOne: false;
8683
+ referencedRelation: "floriday_connections";
8684
+ referencedColumns: ["id"];
8685
+ }];
8686
+ };
8342
8687
  twinfield_connections: {
8343
8688
  Row: {
8344
8689
  access_token: string | null;
@@ -8658,6 +9003,10 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
8658
9003
  default_invoice_type: string;
8659
9004
  default_payment_term_days: number;
8660
9005
  default_vat_code: string;
9006
+ invoice_enabled_ao: boolean;
9007
+ invoice_enabled_fo: boolean;
9008
+ invoice_enabled_ho: boolean;
9009
+ invoice_enabled_mo: boolean;
8661
9010
  updated_at: string;
8662
9011
  user_id: string;
8663
9012
  };
@@ -8667,6 +9016,10 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
8667
9016
  default_invoice_type?: string;
8668
9017
  default_payment_term_days?: number;
8669
9018
  default_vat_code?: string;
9019
+ invoice_enabled_ao?: boolean;
9020
+ invoice_enabled_fo?: boolean;
9021
+ invoice_enabled_ho?: boolean;
9022
+ invoice_enabled_mo?: boolean;
8670
9023
  updated_at?: string;
8671
9024
  user_id: string;
8672
9025
  };
@@ -8676,6 +9029,10 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
8676
9029
  default_invoice_type?: string;
8677
9030
  default_payment_term_days?: number;
8678
9031
  default_vat_code?: string;
9032
+ invoice_enabled_ao?: boolean;
9033
+ invoice_enabled_fo?: boolean;
9034
+ invoice_enabled_ho?: boolean;
9035
+ invoice_enabled_mo?: boolean;
8679
9036
  updated_at?: string;
8680
9037
  user_id?: string;
8681
9038
  };
@@ -9970,6 +10327,12 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
9970
10327
  order_number: string;
9971
10328
  }[];
9972
10329
  };
10330
+ autolink_product_to_floriday: {
10331
+ Args: {
10332
+ p_product_id: string;
10333
+ };
10334
+ Returns: string;
10335
+ };
9973
10336
  backfill_open_order_reservations: {
9974
10337
  Args: never;
9975
10338
  Returns: {
@@ -10008,6 +10371,18 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
10008
10371
  Args: never;
10009
10372
  Returns: number;
10010
10373
  };
10374
+ consume_floriday_rate_limit: {
10375
+ Args: {
10376
+ p_bucket: string;
10377
+ p_capacity: number;
10378
+ p_cost?: number;
10379
+ p_refill_per_sec: number;
10380
+ };
10381
+ Returns: {
10382
+ granted: boolean;
10383
+ wait_ms: number;
10384
+ }[];
10385
+ };
10011
10386
  control_get_todays_carts: {
10012
10387
  Args: never;
10013
10388
  Returns: {
@@ -10088,6 +10463,12 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
10088
10463
  status: string;
10089
10464
  }[];
10090
10465
  };
10466
+ enqueue_cart_replan_if_unlocked: {
10467
+ Args: {
10468
+ p_order_id: string;
10469
+ };
10470
+ Returns: undefined;
10471
+ };
10091
10472
  ensure_trade_item_stock_row: {
10092
10473
  Args: {
10093
10474
  p_key: string;
@@ -10194,6 +10575,13 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
10194
10575
  office_code: string;
10195
10576
  }[];
10196
10577
  };
10578
+ get_floricode_record_counts: {
10579
+ Args: never;
10580
+ Returns: {
10581
+ count: number;
10582
+ resource: string;
10583
+ }[];
10584
+ };
10197
10585
  get_floriday_agreements_active: {
10198
10586
  Args: {
10199
10587
  p_on_date?: string;
@@ -10285,6 +10673,12 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
10285
10673
  };
10286
10674
  Returns: import("../integrations/supabase/types").Json;
10287
10675
  };
10676
+ get_offer_delivery_options: {
10677
+ Args: {
10678
+ p_code: string;
10679
+ };
10680
+ Returns: import("../integrations/supabase/types").Json;
10681
+ };
10288
10682
  get_offer_recipient_by_code: {
10289
10683
  Args: {
10290
10684
  p_code: string;
@@ -10349,6 +10743,12 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
10349
10743
  Args: never;
10350
10744
  Returns: boolean;
10351
10745
  };
10746
+ is_superadmin: {
10747
+ Args: {
10748
+ _user_id: string;
10749
+ };
10750
+ Returns: boolean;
10751
+ };
10352
10752
  local_effective_price: {
10353
10753
  Args: {
10354
10754
  _customer_id: string;
@@ -10383,6 +10783,13 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
10383
10783
  };
10384
10784
  Returns: string;
10385
10785
  };
10786
+ next_order_number_for_date: {
10787
+ Args: {
10788
+ p_created_at?: string;
10789
+ p_prefix: string;
10790
+ };
10791
+ Returns: string;
10792
+ };
10386
10793
  next_work_order_number: {
10387
10794
  Args: {
10388
10795
  p_parent_work_order_id?: string;
@@ -10390,6 +10797,12 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
10390
10797
  };
10391
10798
  Returns: string;
10392
10799
  };
10800
+ normalize_order_source: {
10801
+ Args: {
10802
+ p_src: string;
10803
+ };
10804
+ Returns: string;
10805
+ };
10393
10806
  normalize_vat: {
10394
10807
  Args: {
10395
10808
  v: string;
@@ -10404,10 +10817,21 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
10404
10817
  };
10405
10818
  Returns: boolean;
10406
10819
  };
10820
+ order_number_prefix: {
10821
+ Args: {
10822
+ p_custom_fields?: import("../integrations/supabase/types").Json;
10823
+ p_order_source: string;
10824
+ };
10825
+ Returns: string;
10826
+ };
10407
10827
  pickstation_get_orders_raw: {
10408
10828
  Args: never;
10409
10829
  Returns: import("../integrations/supabase/types").Json;
10410
10830
  };
10831
+ pickstation_get_planning_context: {
10832
+ Args: never;
10833
+ Returns: import("../integrations/supabase/types").Json;
10834
+ };
10411
10835
  pickstation_get_settings: {
10412
10836
  Args: never;
10413
10837
  Returns: import("../integrations/supabase/types").Json;
@@ -10438,6 +10862,28 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
10438
10862
  };
10439
10863
  Returns: undefined;
10440
10864
  };
10865
+ recompute_order_status: {
10866
+ Args: {
10867
+ p_order_id: string;
10868
+ };
10869
+ Returns: undefined;
10870
+ };
10871
+ recompute_reserved_for_order: {
10872
+ Args: {
10873
+ p_order_id: string;
10874
+ };
10875
+ Returns: undefined;
10876
+ };
10877
+ recompute_reserved_stock: {
10878
+ Args: {
10879
+ p_trade_item_key: string;
10880
+ };
10881
+ Returns: undefined;
10882
+ };
10883
+ refresh_external_customers_grouped: {
10884
+ Args: never;
10885
+ Returns: undefined;
10886
+ };
10441
10887
  refresh_floricode_derived_code_lists: {
10442
10888
  Args: never;
10443
10889
  Returns: {
@@ -10452,6 +10898,12 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
10452
10898
  };
10453
10899
  Returns: number;
10454
10900
  };
10901
+ refresh_floricode_derived_for_products: {
10902
+ Args: {
10903
+ _product_ids: string[];
10904
+ };
10905
+ Returns: number;
10906
+ };
10455
10907
  reset_floriday_sync_cursor: {
10456
10908
  Args: {
10457
10909
  p_connection_id: string;
@@ -10459,6 +10911,12 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
10459
10911
  };
10460
10912
  Returns: undefined;
10461
10913
  };
10914
+ resolve_product_id_for_item: {
10915
+ Args: {
10916
+ p_product_name: string;
10917
+ };
10918
+ Returns: string;
10919
+ };
10462
10920
  schedule_floriday_additional_services_sync: {
10463
10921
  Args: {
10464
10922
  p_apikey: string;
@@ -10736,6 +11194,24 @@ export declare const getVbnRequiredFeatures: import("@tanstack/start-client-core
10736
11194
  };
10737
11195
  Returns: string[];
10738
11196
  };
11197
+ sync_cached_packing_from_product: {
11198
+ Args: {
11199
+ p_product_id: string;
11200
+ };
11201
+ Returns: undefined;
11202
+ };
11203
+ sync_order_cart_item_packing_from_product: {
11204
+ Args: {
11205
+ p_product_id: string;
11206
+ };
11207
+ Returns: undefined;
11208
+ };
11209
+ sync_product_packing_from_floriday_cache: {
11210
+ Args: {
11211
+ p_floriday_id: string;
11212
+ };
11213
+ Returns: undefined;
11214
+ };
10739
11215
  twinfield_decrypt: {
10740
11216
  Args: {
10741
11217
  cipher: string;