@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
@@ -4,7 +4,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4
4
  Tables: {
5
5
  afhandeling_settings: {
6
6
  Row: {
7
+ auto_print_delivery_note: boolean;
8
+ auto_process_paused: boolean;
7
9
  created_at: string;
10
+ extra_pick_days_with_stickers: number;
8
11
  id: string;
9
12
  max_workdays_earlier_pick: number;
10
13
  pick_days_before_transport: number;
@@ -18,7 +21,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
18
21
  user_id: string;
19
22
  };
20
23
  Insert: {
24
+ auto_print_delivery_note?: boolean;
25
+ auto_process_paused?: boolean;
21
26
  created_at?: string;
27
+ extra_pick_days_with_stickers?: number;
22
28
  id?: string;
23
29
  max_workdays_earlier_pick?: number;
24
30
  pick_days_before_transport?: number;
@@ -32,7 +38,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
32
38
  user_id: string;
33
39
  };
34
40
  Update: {
41
+ auto_print_delivery_note?: boolean;
42
+ auto_process_paused?: boolean;
35
43
  created_at?: string;
44
+ extra_pick_days_with_stickers?: number;
36
45
  id?: string;
37
46
  max_workdays_earlier_pick?: number;
38
47
  pick_days_before_transport?: number;
@@ -824,6 +833,36 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
824
833
  };
825
834
  Relationships: [];
826
835
  };
836
+ cart_replan_queue: {
837
+ Row: {
838
+ attempts: number;
839
+ last_error: string | null;
840
+ order_id: string;
841
+ processed_at: string | null;
842
+ requested_at: string;
843
+ };
844
+ Insert: {
845
+ attempts?: number;
846
+ last_error?: string | null;
847
+ order_id: string;
848
+ processed_at?: string | null;
849
+ requested_at?: string;
850
+ };
851
+ Update: {
852
+ attempts?: number;
853
+ last_error?: string | null;
854
+ order_id?: string;
855
+ processed_at?: string | null;
856
+ requested_at?: string;
857
+ };
858
+ Relationships: [{
859
+ foreignKeyName: "cart_replan_queue_order_id_fkey";
860
+ columns: ["order_id"];
861
+ isOneToOne: true;
862
+ referencedRelation: "orders";
863
+ referencedColumns: ["id"];
864
+ }];
865
+ };
827
866
  collections: {
828
867
  Row: {
829
868
  created_at: string;
@@ -2949,34 +2988,52 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2949
2988
  Row: {
2950
2989
  catalog_key: string | null;
2951
2990
  catalog_url: string;
2991
+ client_id: string | null;
2992
+ client_secret_ciphertext: string | null;
2993
+ client_secret_last4: string | null;
2952
2994
  created_at: string;
2953
2995
  id: number;
2954
2996
  last_meta: import("./types").Json | null;
2955
2997
  last_test_at: string | null;
2956
2998
  last_test_error: string | null;
2957
2999
  last_test_ok: boolean | null;
3000
+ last_token_test_at: string | null;
3001
+ last_token_test_error: string | null;
3002
+ last_token_test_ok: boolean | null;
2958
3003
  updated_at: string;
2959
3004
  };
2960
3005
  Insert: {
2961
3006
  catalog_key?: string | null;
2962
3007
  catalog_url?: string;
3008
+ client_id?: string | null;
3009
+ client_secret_ciphertext?: string | null;
3010
+ client_secret_last4?: string | null;
2963
3011
  created_at?: string;
2964
3012
  id?: number;
2965
3013
  last_meta?: import("./types").Json | null;
2966
3014
  last_test_at?: string | null;
2967
3015
  last_test_error?: string | null;
2968
3016
  last_test_ok?: boolean | null;
3017
+ last_token_test_at?: string | null;
3018
+ last_token_test_error?: string | null;
3019
+ last_token_test_ok?: boolean | null;
2969
3020
  updated_at?: string;
2970
3021
  };
2971
3022
  Update: {
2972
3023
  catalog_key?: string | null;
2973
3024
  catalog_url?: string;
3025
+ client_id?: string | null;
3026
+ client_secret_ciphertext?: string | null;
3027
+ client_secret_last4?: string | null;
2974
3028
  created_at?: string;
2975
3029
  id?: number;
2976
3030
  last_meta?: import("./types").Json | null;
2977
3031
  last_test_at?: string | null;
2978
3032
  last_test_error?: string | null;
2979
3033
  last_test_ok?: boolean | null;
3034
+ last_token_test_at?: string | null;
3035
+ last_token_test_error?: string | null;
3036
+ last_token_test_ok?: boolean | null;
2980
3037
  updated_at?: string;
2981
3038
  };
2982
3039
  Relationships: [];
@@ -3209,6 +3266,54 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
3209
3266
  referencedColumns: ["id"];
3210
3267
  }];
3211
3268
  };
3269
+ floriday_auto_fulfillment_log: {
3270
+ Row: {
3271
+ attempts: number;
3272
+ connection_id: string;
3273
+ created_at: string;
3274
+ error: string | null;
3275
+ fulfillment_order_id: string | null;
3276
+ id: string;
3277
+ last_attempt_at: string | null;
3278
+ reason: string | null;
3279
+ sales_order_id: string;
3280
+ status: string;
3281
+ updated_at: string;
3282
+ };
3283
+ Insert: {
3284
+ attempts?: number;
3285
+ connection_id: string;
3286
+ created_at?: string;
3287
+ error?: string | null;
3288
+ fulfillment_order_id?: string | null;
3289
+ id?: string;
3290
+ last_attempt_at?: string | null;
3291
+ reason?: string | null;
3292
+ sales_order_id: string;
3293
+ status?: string;
3294
+ updated_at?: string;
3295
+ };
3296
+ Update: {
3297
+ attempts?: number;
3298
+ connection_id?: string;
3299
+ created_at?: string;
3300
+ error?: string | null;
3301
+ fulfillment_order_id?: string | null;
3302
+ id?: string;
3303
+ last_attempt_at?: string | null;
3304
+ reason?: string | null;
3305
+ sales_order_id?: string;
3306
+ status?: string;
3307
+ updated_at?: string;
3308
+ };
3309
+ Relationships: [{
3310
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
3311
+ columns: ["connection_id"];
3312
+ isOneToOne: false;
3313
+ referencedRelation: "floriday_connections";
3314
+ referencedColumns: ["id"];
3315
+ }];
3316
+ };
3212
3317
  floriday_base_items_cache: {
3213
3318
  Row: {
3214
3319
  connection_id: string;
@@ -4313,6 +4418,24 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4313
4418
  referencedColumns: ["id"];
4314
4419
  }];
4315
4420
  };
4421
+ floriday_rate_limit_state: {
4422
+ Row: {
4423
+ bucket: string;
4424
+ last_refill_at: string;
4425
+ tokens: number;
4426
+ };
4427
+ Insert: {
4428
+ bucket: string;
4429
+ last_refill_at?: string;
4430
+ tokens: number;
4431
+ };
4432
+ Update: {
4433
+ bucket?: string;
4434
+ last_refill_at?: string;
4435
+ tokens?: number;
4436
+ };
4437
+ Relationships: [];
4438
+ };
4316
4439
  floriday_resource_schemas: {
4317
4440
  Row: {
4318
4441
  enums: import("./types").Json;
@@ -4736,6 +4859,60 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4736
4859
  referencedColumns: ["id"];
4737
4860
  }];
4738
4861
  };
4862
+ flow_role_assignments: {
4863
+ Row: {
4864
+ created_at: string;
4865
+ id: string;
4866
+ role_id: string;
4867
+ user_id: string;
4868
+ };
4869
+ Insert: {
4870
+ created_at?: string;
4871
+ id?: string;
4872
+ role_id: string;
4873
+ user_id: string;
4874
+ };
4875
+ Update: {
4876
+ created_at?: string;
4877
+ id?: string;
4878
+ role_id?: string;
4879
+ user_id?: string;
4880
+ };
4881
+ Relationships: [{
4882
+ foreignKeyName: "flow_role_assignments_role_id_fkey";
4883
+ columns: ["role_id"];
4884
+ isOneToOne: false;
4885
+ referencedRelation: "flow_roles";
4886
+ referencedColumns: ["id"];
4887
+ }];
4888
+ };
4889
+ flow_roles: {
4890
+ Row: {
4891
+ created_at: string;
4892
+ description: string | null;
4893
+ id: string;
4894
+ module_access: string[];
4895
+ name: string;
4896
+ updated_at: string;
4897
+ };
4898
+ Insert: {
4899
+ created_at?: string;
4900
+ description?: string | null;
4901
+ id?: string;
4902
+ module_access?: string[];
4903
+ name: string;
4904
+ updated_at?: string;
4905
+ };
4906
+ Update: {
4907
+ created_at?: string;
4908
+ description?: string | null;
4909
+ id?: string;
4910
+ module_access?: string[];
4911
+ name?: string;
4912
+ updated_at?: string;
4913
+ };
4914
+ Relationships: [];
4915
+ };
4739
4916
  imap_accounts: {
4740
4917
  Row: {
4741
4918
  created_at: string;
@@ -5367,6 +5544,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5367
5544
  matched_customer_id: string | null;
5368
5545
  message_id: string;
5369
5546
  notes: string | null;
5547
+ order_number: string | null;
5370
5548
  parsed_payload: import("./types").Json | null;
5371
5549
  reviewed_at: string | null;
5372
5550
  reviewed_by: string | null;
@@ -5382,6 +5560,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5382
5560
  matched_customer_id?: string | null;
5383
5561
  message_id: string;
5384
5562
  notes?: string | null;
5563
+ order_number?: string | null;
5385
5564
  parsed_payload?: import("./types").Json | null;
5386
5565
  reviewed_at?: string | null;
5387
5566
  reviewed_by?: string | null;
@@ -5397,6 +5576,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5397
5576
  matched_customer_id?: string | null;
5398
5577
  message_id?: string;
5399
5578
  notes?: string | null;
5579
+ order_number?: string | null;
5400
5580
  parsed_payload?: import("./types").Json | null;
5401
5581
  reviewed_at?: string | null;
5402
5582
  reviewed_by?: string | null;
@@ -6253,6 +6433,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6253
6433
  id: string;
6254
6434
  items: import("./types").Json;
6255
6435
  notes: string | null;
6436
+ order_number: string | null;
6256
6437
  recipient_id: string;
6257
6438
  total_amount: number;
6258
6439
  };
@@ -6266,6 +6447,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6266
6447
  id?: string;
6267
6448
  items?: import("./types").Json;
6268
6449
  notes?: string | null;
6450
+ order_number?: string | null;
6269
6451
  recipient_id: string;
6270
6452
  total_amount?: number;
6271
6453
  };
@@ -6279,6 +6461,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6279
6461
  id?: string;
6280
6462
  items?: import("./types").Json;
6281
6463
  notes?: string | null;
6464
+ order_number?: string | null;
6282
6465
  recipient_id?: string;
6283
6466
  total_amount?: number;
6284
6467
  };
@@ -6438,6 +6621,9 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6438
6621
  crates_per_layer: number;
6439
6622
  created_at: string;
6440
6623
  id: string;
6624
+ layer_fraction: number;
6625
+ layer_share_pct: number;
6626
+ layers_per_cart: number;
6441
6627
  order_item_id: string | null;
6442
6628
  plants_per_crate: number;
6443
6629
  product_id: string | null;
@@ -6449,6 +6635,9 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6449
6635
  crates_per_layer?: number;
6450
6636
  created_at?: string;
6451
6637
  id?: string;
6638
+ layer_fraction?: number;
6639
+ layer_share_pct?: number;
6640
+ layers_per_cart?: number;
6452
6641
  order_item_id?: string | null;
6453
6642
  plants_per_crate?: number;
6454
6643
  product_id?: string | null;
@@ -6460,6 +6649,9 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6460
6649
  crates_per_layer?: number;
6461
6650
  created_at?: string;
6462
6651
  id?: string;
6652
+ layer_fraction?: number;
6653
+ layer_share_pct?: number;
6654
+ layers_per_cart?: number;
6463
6655
  order_item_id?: string | null;
6464
6656
  plants_per_crate?: number;
6465
6657
  product_id?: string | null;
@@ -6487,33 +6679,45 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6487
6679
  };
6488
6680
  order_carts: {
6489
6681
  Row: {
6682
+ algorithm_version: number;
6490
6683
  cart_number: number;
6491
6684
  created_at: string;
6492
6685
  id: string;
6493
6686
  is_auto: boolean;
6494
6687
  is_complete: boolean;
6495
6688
  notes: string | null;
6689
+ occupancy_pct: number;
6496
6690
  order_id: string;
6691
+ source: string;
6692
+ total_layers_used: number;
6497
6693
  updated_at: string;
6498
6694
  };
6499
6695
  Insert: {
6696
+ algorithm_version?: number;
6500
6697
  cart_number: number;
6501
6698
  created_at?: string;
6502
6699
  id?: string;
6503
6700
  is_auto?: boolean;
6504
6701
  is_complete?: boolean;
6505
6702
  notes?: string | null;
6703
+ occupancy_pct?: number;
6506
6704
  order_id: string;
6705
+ source?: string;
6706
+ total_layers_used?: number;
6507
6707
  updated_at?: string;
6508
6708
  };
6509
6709
  Update: {
6710
+ algorithm_version?: number;
6510
6711
  cart_number?: number;
6511
6712
  created_at?: string;
6512
6713
  id?: string;
6513
6714
  is_auto?: boolean;
6514
6715
  is_complete?: boolean;
6515
6716
  notes?: string | null;
6717
+ occupancy_pct?: number;
6516
6718
  order_id?: string;
6719
+ source?: string;
6720
+ total_layers_used?: number;
6517
6721
  updated_at?: string;
6518
6722
  };
6519
6723
  Relationships: [{
@@ -6666,6 +6870,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6666
6870
  order_date: string;
6667
6871
  order_number: string;
6668
6872
  order_source: string;
6873
+ plan_locked_at: string | null;
6874
+ plan_locked_ref: string | null;
6669
6875
  status: string;
6670
6876
  total: string;
6671
6877
  updated_at: string;
@@ -6682,6 +6888,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6682
6888
  order_date?: string;
6683
6889
  order_number: string;
6684
6890
  order_source?: string;
6891
+ plan_locked_at?: string | null;
6892
+ plan_locked_ref?: string | null;
6685
6893
  status?: string;
6686
6894
  total?: string;
6687
6895
  updated_at?: string;
@@ -6698,6 +6906,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6698
6906
  order_date?: string;
6699
6907
  order_number?: string;
6700
6908
  order_source?: string;
6909
+ plan_locked_at?: string | null;
6910
+ plan_locked_ref?: string | null;
6701
6911
  status?: string;
6702
6912
  total?: string;
6703
6913
  updated_at?: string;
@@ -7070,6 +7280,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7070
7280
  display_name: string | null;
7071
7281
  email: string | null;
7072
7282
  id: string;
7283
+ is_superadmin: boolean;
7073
7284
  notification_preferences: import("./types").Json;
7074
7285
  tenant_id: string | null;
7075
7286
  updated_at: string;
@@ -7079,6 +7290,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7079
7290
  display_name?: string | null;
7080
7291
  email?: string | null;
7081
7292
  id: string;
7293
+ is_superadmin?: boolean;
7082
7294
  notification_preferences?: import("./types").Json;
7083
7295
  tenant_id?: string | null;
7084
7296
  updated_at?: string;
@@ -7088,6 +7300,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7088
7300
  display_name?: string | null;
7089
7301
  email?: string | null;
7090
7302
  id?: string;
7303
+ is_superadmin?: boolean;
7091
7304
  notification_preferences?: import("./types").Json;
7092
7305
  tenant_id?: string | null;
7093
7306
  updated_at?: string;
@@ -7877,6 +8090,24 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7877
8090
  };
7878
8091
  Relationships: [];
7879
8092
  };
8093
+ sidebar_config: {
8094
+ Row: {
8095
+ id: string;
8096
+ module_order: string[];
8097
+ updated_at: string;
8098
+ };
8099
+ Insert: {
8100
+ id?: string;
8101
+ module_order?: string[];
8102
+ updated_at?: string;
8103
+ };
8104
+ Update: {
8105
+ id?: string;
8106
+ module_order?: string[];
8107
+ updated_at?: string;
8108
+ };
8109
+ Relationships: [];
8110
+ };
7880
8111
  stock_import_runs: {
7881
8112
  Row: {
7882
8113
  connection_id: string | null;
@@ -7935,7 +8166,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7935
8166
  reason: string | null;
7936
8167
  reserved_after: number | null;
7937
8168
  reserved_before: number | null;
7938
- trade_item_key: string;
8169
+ trade_item_key: string | null;
7939
8170
  };
7940
8171
  Insert: {
7941
8172
  connection_id?: string | null;
@@ -7952,7 +8183,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7952
8183
  reason?: string | null;
7953
8184
  reserved_after?: number | null;
7954
8185
  reserved_before?: number | null;
7955
- trade_item_key: string;
8186
+ trade_item_key?: string | null;
7956
8187
  };
7957
8188
  Update: {
7958
8189
  connection_id?: string | null;
@@ -7969,7 +8200,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7969
8200
  reason?: string | null;
7970
8201
  reserved_after?: number | null;
7971
8202
  reserved_before?: number | null;
7972
- trade_item_key?: string;
8203
+ trade_item_key?: string | null;
7973
8204
  };
7974
8205
  Relationships: [];
7975
8206
  };
@@ -8312,6 +8543,114 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8312
8543
  };
8313
8544
  Relationships: [];
8314
8545
  };
8546
+ trade_item_supply_lines: {
8547
+ Row: {
8548
+ available_quantity: number | null;
8549
+ connection_id: string;
8550
+ created_at: string;
8551
+ currency: string | null;
8552
+ endpoint_family: string | null;
8553
+ environment: string | null;
8554
+ id: string;
8555
+ last_error: string | null;
8556
+ last_status: number | null;
8557
+ packing_configuration_id: string | null;
8558
+ period_end: string | null;
8559
+ period_start: string | null;
8560
+ price_per_piece: number | null;
8561
+ sales_unit: string | null;
8562
+ supply_line_id: string | null;
8563
+ supply_type: string;
8564
+ trade_item_id: string;
8565
+ updated_at: string;
8566
+ user_id: string;
8567
+ week: number | null;
8568
+ year: number | null;
8569
+ };
8570
+ Insert: {
8571
+ available_quantity?: number | null;
8572
+ connection_id: string;
8573
+ created_at?: string;
8574
+ currency?: string | null;
8575
+ endpoint_family?: string | null;
8576
+ environment?: string | null;
8577
+ id?: string;
8578
+ last_error?: string | null;
8579
+ last_status?: number | null;
8580
+ packing_configuration_id?: string | null;
8581
+ period_end?: string | null;
8582
+ period_start?: string | null;
8583
+ price_per_piece?: number | null;
8584
+ sales_unit?: string | null;
8585
+ supply_line_id?: string | null;
8586
+ supply_type?: string;
8587
+ trade_item_id: string;
8588
+ updated_at?: string;
8589
+ user_id: string;
8590
+ week?: number | null;
8591
+ year?: number | null;
8592
+ };
8593
+ Update: {
8594
+ available_quantity?: number | null;
8595
+ connection_id?: string;
8596
+ created_at?: string;
8597
+ currency?: string | null;
8598
+ endpoint_family?: string | null;
8599
+ environment?: string | null;
8600
+ id?: string;
8601
+ last_error?: string | null;
8602
+ last_status?: number | null;
8603
+ packing_configuration_id?: string | null;
8604
+ period_end?: string | null;
8605
+ period_start?: string | null;
8606
+ price_per_piece?: number | null;
8607
+ sales_unit?: string | null;
8608
+ supply_line_id?: string | null;
8609
+ supply_type?: string;
8610
+ trade_item_id?: string;
8611
+ updated_at?: string;
8612
+ user_id?: string;
8613
+ week?: number | null;
8614
+ year?: number | null;
8615
+ };
8616
+ Relationships: [];
8617
+ };
8618
+ trade_item_warehouse_preferences: {
8619
+ Row: {
8620
+ connection_id: string;
8621
+ created_at: string;
8622
+ id: string;
8623
+ trade_item_id: string;
8624
+ updated_at: string;
8625
+ warehouse_id: string;
8626
+ warehouse_name: string | null;
8627
+ };
8628
+ Insert: {
8629
+ connection_id: string;
8630
+ created_at?: string;
8631
+ id?: string;
8632
+ trade_item_id: string;
8633
+ updated_at?: string;
8634
+ warehouse_id: string;
8635
+ warehouse_name?: string | null;
8636
+ };
8637
+ Update: {
8638
+ connection_id?: string;
8639
+ created_at?: string;
8640
+ id?: string;
8641
+ trade_item_id?: string;
8642
+ updated_at?: string;
8643
+ warehouse_id?: string;
8644
+ warehouse_name?: string | null;
8645
+ };
8646
+ Relationships: [{
8647
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
8648
+ columns: ["connection_id"];
8649
+ isOneToOne: false;
8650
+ referencedRelation: "floriday_connections";
8651
+ referencedColumns: ["id"];
8652
+ }];
8653
+ };
8315
8654
  twinfield_connections: {
8316
8655
  Row: {
8317
8656
  access_token: string | null;
@@ -8631,6 +8970,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8631
8970
  default_invoice_type: string;
8632
8971
  default_payment_term_days: number;
8633
8972
  default_vat_code: string;
8973
+ invoice_enabled_ao: boolean;
8974
+ invoice_enabled_fo: boolean;
8975
+ invoice_enabled_ho: boolean;
8976
+ invoice_enabled_mo: boolean;
8634
8977
  updated_at: string;
8635
8978
  user_id: string;
8636
8979
  };
@@ -8640,6 +8983,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8640
8983
  default_invoice_type?: string;
8641
8984
  default_payment_term_days?: number;
8642
8985
  default_vat_code?: string;
8986
+ invoice_enabled_ao?: boolean;
8987
+ invoice_enabled_fo?: boolean;
8988
+ invoice_enabled_ho?: boolean;
8989
+ invoice_enabled_mo?: boolean;
8643
8990
  updated_at?: string;
8644
8991
  user_id: string;
8645
8992
  };
@@ -8649,6 +8996,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8649
8996
  default_invoice_type?: string;
8650
8997
  default_payment_term_days?: number;
8651
8998
  default_vat_code?: string;
8999
+ invoice_enabled_ao?: boolean;
9000
+ invoice_enabled_fo?: boolean;
9001
+ invoice_enabled_ho?: boolean;
9002
+ invoice_enabled_mo?: boolean;
8652
9003
  updated_at?: string;
8653
9004
  user_id?: string;
8654
9005
  };
@@ -9943,6 +10294,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9943
10294
  order_number: string;
9944
10295
  }[];
9945
10296
  };
10297
+ autolink_product_to_floriday: {
10298
+ Args: {
10299
+ p_product_id: string;
10300
+ };
10301
+ Returns: string;
10302
+ };
9946
10303
  backfill_open_order_reservations: {
9947
10304
  Args: never;
9948
10305
  Returns: {
@@ -9981,6 +10338,18 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9981
10338
  Args: never;
9982
10339
  Returns: number;
9983
10340
  };
10341
+ consume_floriday_rate_limit: {
10342
+ Args: {
10343
+ p_bucket: string;
10344
+ p_capacity: number;
10345
+ p_cost?: number;
10346
+ p_refill_per_sec: number;
10347
+ };
10348
+ Returns: {
10349
+ granted: boolean;
10350
+ wait_ms: number;
10351
+ }[];
10352
+ };
9984
10353
  control_get_todays_carts: {
9985
10354
  Args: never;
9986
10355
  Returns: {
@@ -10061,6 +10430,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10061
10430
  status: string;
10062
10431
  }[];
10063
10432
  };
10433
+ enqueue_cart_replan_if_unlocked: {
10434
+ Args: {
10435
+ p_order_id: string;
10436
+ };
10437
+ Returns: undefined;
10438
+ };
10064
10439
  ensure_trade_item_stock_row: {
10065
10440
  Args: {
10066
10441
  p_key: string;
@@ -10167,6 +10542,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10167
10542
  office_code: string;
10168
10543
  }[];
10169
10544
  };
10545
+ get_floricode_record_counts: {
10546
+ Args: never;
10547
+ Returns: {
10548
+ count: number;
10549
+ resource: string;
10550
+ }[];
10551
+ };
10170
10552
  get_floriday_agreements_active: {
10171
10553
  Args: {
10172
10554
  p_on_date?: string;
@@ -10258,6 +10640,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10258
10640
  };
10259
10641
  Returns: import("./types").Json;
10260
10642
  };
10643
+ get_offer_delivery_options: {
10644
+ Args: {
10645
+ p_code: string;
10646
+ };
10647
+ Returns: import("./types").Json;
10648
+ };
10261
10649
  get_offer_recipient_by_code: {
10262
10650
  Args: {
10263
10651
  p_code: string;
@@ -10322,6 +10710,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10322
10710
  Args: never;
10323
10711
  Returns: boolean;
10324
10712
  };
10713
+ is_superadmin: {
10714
+ Args: {
10715
+ _user_id: string;
10716
+ };
10717
+ Returns: boolean;
10718
+ };
10325
10719
  local_effective_price: {
10326
10720
  Args: {
10327
10721
  _customer_id: string;
@@ -10356,6 +10750,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10356
10750
  };
10357
10751
  Returns: string;
10358
10752
  };
10753
+ next_order_number_for_date: {
10754
+ Args: {
10755
+ p_created_at?: string;
10756
+ p_prefix: string;
10757
+ };
10758
+ Returns: string;
10759
+ };
10359
10760
  next_work_order_number: {
10360
10761
  Args: {
10361
10762
  p_parent_work_order_id?: string;
@@ -10363,6 +10764,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10363
10764
  };
10364
10765
  Returns: string;
10365
10766
  };
10767
+ normalize_order_source: {
10768
+ Args: {
10769
+ p_src: string;
10770
+ };
10771
+ Returns: string;
10772
+ };
10366
10773
  normalize_vat: {
10367
10774
  Args: {
10368
10775
  v: string;
@@ -10377,10 +10784,21 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10377
10784
  };
10378
10785
  Returns: boolean;
10379
10786
  };
10787
+ order_number_prefix: {
10788
+ Args: {
10789
+ p_custom_fields?: import("./types").Json;
10790
+ p_order_source: string;
10791
+ };
10792
+ Returns: string;
10793
+ };
10380
10794
  pickstation_get_orders_raw: {
10381
10795
  Args: never;
10382
10796
  Returns: import("./types").Json;
10383
10797
  };
10798
+ pickstation_get_planning_context: {
10799
+ Args: never;
10800
+ Returns: import("./types").Json;
10801
+ };
10384
10802
  pickstation_get_settings: {
10385
10803
  Args: never;
10386
10804
  Returns: import("./types").Json;
@@ -10411,6 +10829,28 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10411
10829
  };
10412
10830
  Returns: undefined;
10413
10831
  };
10832
+ recompute_order_status: {
10833
+ Args: {
10834
+ p_order_id: string;
10835
+ };
10836
+ Returns: undefined;
10837
+ };
10838
+ recompute_reserved_for_order: {
10839
+ Args: {
10840
+ p_order_id: string;
10841
+ };
10842
+ Returns: undefined;
10843
+ };
10844
+ recompute_reserved_stock: {
10845
+ Args: {
10846
+ p_trade_item_key: string;
10847
+ };
10848
+ Returns: undefined;
10849
+ };
10850
+ refresh_external_customers_grouped: {
10851
+ Args: never;
10852
+ Returns: undefined;
10853
+ };
10414
10854
  refresh_floricode_derived_code_lists: {
10415
10855
  Args: never;
10416
10856
  Returns: {
@@ -10425,6 +10865,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10425
10865
  };
10426
10866
  Returns: number;
10427
10867
  };
10868
+ refresh_floricode_derived_for_products: {
10869
+ Args: {
10870
+ _product_ids: string[];
10871
+ };
10872
+ Returns: number;
10873
+ };
10428
10874
  reset_floriday_sync_cursor: {
10429
10875
  Args: {
10430
10876
  p_connection_id: string;
@@ -10432,6 +10878,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10432
10878
  };
10433
10879
  Returns: undefined;
10434
10880
  };
10881
+ resolve_product_id_for_item: {
10882
+ Args: {
10883
+ p_product_name: string;
10884
+ };
10885
+ Returns: string;
10886
+ };
10435
10887
  schedule_floriday_additional_services_sync: {
10436
10888
  Args: {
10437
10889
  p_apikey: string;
@@ -10709,6 +11161,24 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10709
11161
  };
10710
11162
  Returns: string[];
10711
11163
  };
11164
+ sync_cached_packing_from_product: {
11165
+ Args: {
11166
+ p_product_id: string;
11167
+ };
11168
+ Returns: undefined;
11169
+ };
11170
+ sync_order_cart_item_packing_from_product: {
11171
+ Args: {
11172
+ p_product_id: string;
11173
+ };
11174
+ Returns: undefined;
11175
+ };
11176
+ sync_product_packing_from_floriday_cache: {
11177
+ Args: {
11178
+ p_floriday_id: string;
11179
+ };
11180
+ Returns: undefined;
11181
+ };
10712
11182
  twinfield_decrypt: {
10713
11183
  Args: {
10714
11184
  cipher: string;