@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
@@ -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;
@@ -306,6 +315,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
306
315
  conflict_reason: string | null;
307
316
  created_at: string;
308
317
  created_by_role: string | null;
318
+ customer_address: string | null;
309
319
  customer_email: string | null;
310
320
  customer_name: string | null;
311
321
  end_time: string;
@@ -331,6 +341,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
331
341
  conflict_reason?: string | null;
332
342
  created_at?: string;
333
343
  created_by_role?: string | null;
344
+ customer_address?: string | null;
334
345
  customer_email?: string | null;
335
346
  customer_name?: string | null;
336
347
  end_time: string;
@@ -356,6 +367,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
356
367
  conflict_reason?: string | null;
357
368
  created_at?: string;
358
369
  created_by_role?: string | null;
370
+ customer_address?: string | null;
359
371
  customer_email?: string | null;
360
372
  customer_name?: string | null;
361
373
  end_time?: string;
@@ -824,6 +836,36 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
824
836
  };
825
837
  Relationships: [];
826
838
  };
839
+ cart_replan_queue: {
840
+ Row: {
841
+ attempts: number;
842
+ last_error: string | null;
843
+ order_id: string;
844
+ processed_at: string | null;
845
+ requested_at: string;
846
+ };
847
+ Insert: {
848
+ attempts?: number;
849
+ last_error?: string | null;
850
+ order_id: string;
851
+ processed_at?: string | null;
852
+ requested_at?: string;
853
+ };
854
+ Update: {
855
+ attempts?: number;
856
+ last_error?: string | null;
857
+ order_id?: string;
858
+ processed_at?: string | null;
859
+ requested_at?: string;
860
+ };
861
+ Relationships: [{
862
+ foreignKeyName: "cart_replan_queue_order_id_fkey";
863
+ columns: ["order_id"];
864
+ isOneToOne: true;
865
+ referencedRelation: "orders";
866
+ referencedColumns: ["id"];
867
+ }];
868
+ };
827
869
  collections: {
828
870
  Row: {
829
871
  created_at: string;
@@ -2949,34 +2991,52 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2949
2991
  Row: {
2950
2992
  catalog_key: string | null;
2951
2993
  catalog_url: string;
2994
+ client_id: string | null;
2995
+ client_secret_ciphertext: string | null;
2996
+ client_secret_last4: string | null;
2952
2997
  created_at: string;
2953
2998
  id: number;
2954
2999
  last_meta: import("./types").Json | null;
2955
3000
  last_test_at: string | null;
2956
3001
  last_test_error: string | null;
2957
3002
  last_test_ok: boolean | null;
3003
+ last_token_test_at: string | null;
3004
+ last_token_test_error: string | null;
3005
+ last_token_test_ok: boolean | null;
2958
3006
  updated_at: string;
2959
3007
  };
2960
3008
  Insert: {
2961
3009
  catalog_key?: string | null;
2962
3010
  catalog_url?: string;
3011
+ client_id?: string | null;
3012
+ client_secret_ciphertext?: string | null;
3013
+ client_secret_last4?: string | null;
2963
3014
  created_at?: string;
2964
3015
  id?: number;
2965
3016
  last_meta?: import("./types").Json | null;
2966
3017
  last_test_at?: string | null;
2967
3018
  last_test_error?: string | null;
2968
3019
  last_test_ok?: boolean | null;
3020
+ last_token_test_at?: string | null;
3021
+ last_token_test_error?: string | null;
3022
+ last_token_test_ok?: boolean | null;
2969
3023
  updated_at?: string;
2970
3024
  };
2971
3025
  Update: {
2972
3026
  catalog_key?: string | null;
2973
3027
  catalog_url?: string;
3028
+ client_id?: string | null;
3029
+ client_secret_ciphertext?: string | null;
3030
+ client_secret_last4?: string | null;
2974
3031
  created_at?: string;
2975
3032
  id?: number;
2976
3033
  last_meta?: import("./types").Json | null;
2977
3034
  last_test_at?: string | null;
2978
3035
  last_test_error?: string | null;
2979
3036
  last_test_ok?: boolean | null;
3037
+ last_token_test_at?: string | null;
3038
+ last_token_test_error?: string | null;
3039
+ last_token_test_ok?: boolean | null;
2980
3040
  updated_at?: string;
2981
3041
  };
2982
3042
  Relationships: [];
@@ -3209,6 +3269,54 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
3209
3269
  referencedColumns: ["id"];
3210
3270
  }];
3211
3271
  };
3272
+ floriday_auto_fulfillment_log: {
3273
+ Row: {
3274
+ attempts: number;
3275
+ connection_id: string;
3276
+ created_at: string;
3277
+ error: string | null;
3278
+ fulfillment_order_id: string | null;
3279
+ id: string;
3280
+ last_attempt_at: string | null;
3281
+ reason: string | null;
3282
+ sales_order_id: string;
3283
+ status: string;
3284
+ updated_at: string;
3285
+ };
3286
+ Insert: {
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
+ Update: {
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
+ Relationships: [{
3313
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
3314
+ columns: ["connection_id"];
3315
+ isOneToOne: false;
3316
+ referencedRelation: "floriday_connections";
3317
+ referencedColumns: ["id"];
3318
+ }];
3319
+ };
3212
3320
  floriday_base_items_cache: {
3213
3321
  Row: {
3214
3322
  connection_id: string;
@@ -4313,6 +4421,24 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4313
4421
  referencedColumns: ["id"];
4314
4422
  }];
4315
4423
  };
4424
+ floriday_rate_limit_state: {
4425
+ Row: {
4426
+ bucket: string;
4427
+ last_refill_at: string;
4428
+ tokens: number;
4429
+ };
4430
+ Insert: {
4431
+ bucket: string;
4432
+ last_refill_at?: string;
4433
+ tokens: number;
4434
+ };
4435
+ Update: {
4436
+ bucket?: string;
4437
+ last_refill_at?: string;
4438
+ tokens?: number;
4439
+ };
4440
+ Relationships: [];
4441
+ };
4316
4442
  floriday_resource_schemas: {
4317
4443
  Row: {
4318
4444
  enums: import("./types").Json;
@@ -4736,6 +4862,60 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4736
4862
  referencedColumns: ["id"];
4737
4863
  }];
4738
4864
  };
4865
+ flow_role_assignments: {
4866
+ Row: {
4867
+ created_at: string;
4868
+ id: string;
4869
+ role_id: string;
4870
+ user_id: string;
4871
+ };
4872
+ Insert: {
4873
+ created_at?: string;
4874
+ id?: string;
4875
+ role_id: string;
4876
+ user_id: string;
4877
+ };
4878
+ Update: {
4879
+ created_at?: string;
4880
+ id?: string;
4881
+ role_id?: string;
4882
+ user_id?: string;
4883
+ };
4884
+ Relationships: [{
4885
+ foreignKeyName: "flow_role_assignments_role_id_fkey";
4886
+ columns: ["role_id"];
4887
+ isOneToOne: false;
4888
+ referencedRelation: "flow_roles";
4889
+ referencedColumns: ["id"];
4890
+ }];
4891
+ };
4892
+ flow_roles: {
4893
+ Row: {
4894
+ created_at: string;
4895
+ description: string | null;
4896
+ id: string;
4897
+ module_access: string[];
4898
+ name: string;
4899
+ updated_at: string;
4900
+ };
4901
+ Insert: {
4902
+ created_at?: string;
4903
+ description?: string | null;
4904
+ id?: string;
4905
+ module_access?: string[];
4906
+ name: string;
4907
+ updated_at?: string;
4908
+ };
4909
+ Update: {
4910
+ created_at?: string;
4911
+ description?: string | null;
4912
+ id?: string;
4913
+ module_access?: string[];
4914
+ name?: string;
4915
+ updated_at?: string;
4916
+ };
4917
+ Relationships: [];
4918
+ };
4739
4919
  imap_accounts: {
4740
4920
  Row: {
4741
4921
  created_at: string;
@@ -5367,6 +5547,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5367
5547
  matched_customer_id: string | null;
5368
5548
  message_id: string;
5369
5549
  notes: string | null;
5550
+ order_number: string | null;
5370
5551
  parsed_payload: import("./types").Json | null;
5371
5552
  reviewed_at: string | null;
5372
5553
  reviewed_by: string | null;
@@ -5382,6 +5563,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5382
5563
  matched_customer_id?: string | null;
5383
5564
  message_id: string;
5384
5565
  notes?: string | null;
5566
+ order_number?: string | null;
5385
5567
  parsed_payload?: import("./types").Json | null;
5386
5568
  reviewed_at?: string | null;
5387
5569
  reviewed_by?: string | null;
@@ -5397,6 +5579,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5397
5579
  matched_customer_id?: string | null;
5398
5580
  message_id?: string;
5399
5581
  notes?: string | null;
5582
+ order_number?: string | null;
5400
5583
  parsed_payload?: import("./types").Json | null;
5401
5584
  reviewed_at?: string | null;
5402
5585
  reviewed_by?: string | null;
@@ -6253,6 +6436,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6253
6436
  id: string;
6254
6437
  items: import("./types").Json;
6255
6438
  notes: string | null;
6439
+ order_number: string | null;
6256
6440
  recipient_id: string;
6257
6441
  total_amount: number;
6258
6442
  };
@@ -6266,6 +6450,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6266
6450
  id?: string;
6267
6451
  items?: import("./types").Json;
6268
6452
  notes?: string | null;
6453
+ order_number?: string | null;
6269
6454
  recipient_id: string;
6270
6455
  total_amount?: number;
6271
6456
  };
@@ -6279,6 +6464,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6279
6464
  id?: string;
6280
6465
  items?: import("./types").Json;
6281
6466
  notes?: string | null;
6467
+ order_number?: string | null;
6282
6468
  recipient_id?: string;
6283
6469
  total_amount?: number;
6284
6470
  };
@@ -6438,6 +6624,9 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6438
6624
  crates_per_layer: number;
6439
6625
  created_at: string;
6440
6626
  id: string;
6627
+ layer_fraction: number;
6628
+ layer_share_pct: number;
6629
+ layers_per_cart: number;
6441
6630
  order_item_id: string | null;
6442
6631
  plants_per_crate: number;
6443
6632
  product_id: string | null;
@@ -6449,6 +6638,9 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6449
6638
  crates_per_layer?: number;
6450
6639
  created_at?: string;
6451
6640
  id?: string;
6641
+ layer_fraction?: number;
6642
+ layer_share_pct?: number;
6643
+ layers_per_cart?: number;
6452
6644
  order_item_id?: string | null;
6453
6645
  plants_per_crate?: number;
6454
6646
  product_id?: string | null;
@@ -6460,6 +6652,9 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6460
6652
  crates_per_layer?: number;
6461
6653
  created_at?: string;
6462
6654
  id?: string;
6655
+ layer_fraction?: number;
6656
+ layer_share_pct?: number;
6657
+ layers_per_cart?: number;
6463
6658
  order_item_id?: string | null;
6464
6659
  plants_per_crate?: number;
6465
6660
  product_id?: string | null;
@@ -6487,33 +6682,45 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6487
6682
  };
6488
6683
  order_carts: {
6489
6684
  Row: {
6685
+ algorithm_version: number;
6490
6686
  cart_number: number;
6491
6687
  created_at: string;
6492
6688
  id: string;
6493
6689
  is_auto: boolean;
6494
6690
  is_complete: boolean;
6495
6691
  notes: string | null;
6692
+ occupancy_pct: number;
6496
6693
  order_id: string;
6694
+ source: string;
6695
+ total_layers_used: number;
6497
6696
  updated_at: string;
6498
6697
  };
6499
6698
  Insert: {
6699
+ algorithm_version?: number;
6500
6700
  cart_number: number;
6501
6701
  created_at?: string;
6502
6702
  id?: string;
6503
6703
  is_auto?: boolean;
6504
6704
  is_complete?: boolean;
6505
6705
  notes?: string | null;
6706
+ occupancy_pct?: number;
6506
6707
  order_id: string;
6708
+ source?: string;
6709
+ total_layers_used?: number;
6507
6710
  updated_at?: string;
6508
6711
  };
6509
6712
  Update: {
6713
+ algorithm_version?: number;
6510
6714
  cart_number?: number;
6511
6715
  created_at?: string;
6512
6716
  id?: string;
6513
6717
  is_auto?: boolean;
6514
6718
  is_complete?: boolean;
6515
6719
  notes?: string | null;
6720
+ occupancy_pct?: number;
6516
6721
  order_id?: string;
6722
+ source?: string;
6723
+ total_layers_used?: number;
6517
6724
  updated_at?: string;
6518
6725
  };
6519
6726
  Relationships: [{
@@ -6666,6 +6873,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6666
6873
  order_date: string;
6667
6874
  order_number: string;
6668
6875
  order_source: string;
6876
+ plan_locked_at: string | null;
6877
+ plan_locked_ref: string | null;
6669
6878
  status: string;
6670
6879
  total: string;
6671
6880
  updated_at: string;
@@ -6682,6 +6891,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6682
6891
  order_date?: string;
6683
6892
  order_number: string;
6684
6893
  order_source?: string;
6894
+ plan_locked_at?: string | null;
6895
+ plan_locked_ref?: string | null;
6685
6896
  status?: string;
6686
6897
  total?: string;
6687
6898
  updated_at?: string;
@@ -6698,6 +6909,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6698
6909
  order_date?: string;
6699
6910
  order_number?: string;
6700
6911
  order_source?: string;
6912
+ plan_locked_at?: string | null;
6913
+ plan_locked_ref?: string | null;
6701
6914
  status?: string;
6702
6915
  total?: string;
6703
6916
  updated_at?: string;
@@ -7066,28 +7279,34 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7066
7279
  };
7067
7280
  profiles: {
7068
7281
  Row: {
7282
+ address: string | null;
7069
7283
  created_at: string;
7070
7284
  display_name: string | null;
7071
7285
  email: string | null;
7072
7286
  id: string;
7287
+ is_superadmin: boolean;
7073
7288
  notification_preferences: import("./types").Json;
7074
7289
  tenant_id: string | null;
7075
7290
  updated_at: string;
7076
7291
  };
7077
7292
  Insert: {
7293
+ address?: string | null;
7078
7294
  created_at?: string;
7079
7295
  display_name?: string | null;
7080
7296
  email?: string | null;
7081
7297
  id: string;
7298
+ is_superadmin?: boolean;
7082
7299
  notification_preferences?: import("./types").Json;
7083
7300
  tenant_id?: string | null;
7084
7301
  updated_at?: string;
7085
7302
  };
7086
7303
  Update: {
7304
+ address?: string | null;
7087
7305
  created_at?: string;
7088
7306
  display_name?: string | null;
7089
7307
  email?: string | null;
7090
7308
  id?: string;
7309
+ is_superadmin?: boolean;
7091
7310
  notification_preferences?: import("./types").Json;
7092
7311
  tenant_id?: string | null;
7093
7312
  updated_at?: string;
@@ -7877,6 +8096,24 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7877
8096
  };
7878
8097
  Relationships: [];
7879
8098
  };
8099
+ sidebar_config: {
8100
+ Row: {
8101
+ id: string;
8102
+ module_order: string[];
8103
+ updated_at: string;
8104
+ };
8105
+ Insert: {
8106
+ id?: string;
8107
+ module_order?: string[];
8108
+ updated_at?: string;
8109
+ };
8110
+ Update: {
8111
+ id?: string;
8112
+ module_order?: string[];
8113
+ updated_at?: string;
8114
+ };
8115
+ Relationships: [];
8116
+ };
7880
8117
  stock_import_runs: {
7881
8118
  Row: {
7882
8119
  connection_id: string | null;
@@ -7935,7 +8172,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7935
8172
  reason: string | null;
7936
8173
  reserved_after: number | null;
7937
8174
  reserved_before: number | null;
7938
- trade_item_key: string;
8175
+ trade_item_key: string | null;
7939
8176
  };
7940
8177
  Insert: {
7941
8178
  connection_id?: string | null;
@@ -7952,7 +8189,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7952
8189
  reason?: string | null;
7953
8190
  reserved_after?: number | null;
7954
8191
  reserved_before?: number | null;
7955
- trade_item_key: string;
8192
+ trade_item_key?: string | null;
7956
8193
  };
7957
8194
  Update: {
7958
8195
  connection_id?: string | null;
@@ -7969,7 +8206,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7969
8206
  reason?: string | null;
7970
8207
  reserved_after?: number | null;
7971
8208
  reserved_before?: number | null;
7972
- trade_item_key?: string;
8209
+ trade_item_key?: string | null;
7973
8210
  };
7974
8211
  Relationships: [];
7975
8212
  };
@@ -8312,6 +8549,114 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8312
8549
  };
8313
8550
  Relationships: [];
8314
8551
  };
8552
+ trade_item_supply_lines: {
8553
+ Row: {
8554
+ available_quantity: number | null;
8555
+ connection_id: string;
8556
+ created_at: string;
8557
+ currency: string | null;
8558
+ endpoint_family: string | null;
8559
+ environment: string | null;
8560
+ id: string;
8561
+ last_error: string | null;
8562
+ last_status: number | null;
8563
+ packing_configuration_id: string | null;
8564
+ period_end: string | null;
8565
+ period_start: string | null;
8566
+ price_per_piece: number | null;
8567
+ sales_unit: string | null;
8568
+ supply_line_id: string | null;
8569
+ supply_type: string;
8570
+ trade_item_id: string;
8571
+ updated_at: string;
8572
+ user_id: string;
8573
+ week: number | null;
8574
+ year: number | null;
8575
+ };
8576
+ Insert: {
8577
+ available_quantity?: number | null;
8578
+ connection_id: string;
8579
+ created_at?: string;
8580
+ currency?: string | null;
8581
+ endpoint_family?: string | null;
8582
+ environment?: string | null;
8583
+ id?: string;
8584
+ last_error?: string | null;
8585
+ last_status?: number | null;
8586
+ packing_configuration_id?: string | null;
8587
+ period_end?: string | null;
8588
+ period_start?: string | null;
8589
+ price_per_piece?: number | null;
8590
+ sales_unit?: string | null;
8591
+ supply_line_id?: string | null;
8592
+ supply_type?: string;
8593
+ trade_item_id: string;
8594
+ updated_at?: string;
8595
+ user_id: string;
8596
+ week?: number | null;
8597
+ year?: number | null;
8598
+ };
8599
+ Update: {
8600
+ available_quantity?: number | null;
8601
+ connection_id?: string;
8602
+ created_at?: string;
8603
+ currency?: string | null;
8604
+ endpoint_family?: string | null;
8605
+ environment?: string | null;
8606
+ id?: string;
8607
+ last_error?: string | null;
8608
+ last_status?: number | null;
8609
+ packing_configuration_id?: string | null;
8610
+ period_end?: string | null;
8611
+ period_start?: string | null;
8612
+ price_per_piece?: number | null;
8613
+ sales_unit?: string | null;
8614
+ supply_line_id?: string | null;
8615
+ supply_type?: string;
8616
+ trade_item_id?: string;
8617
+ updated_at?: string;
8618
+ user_id?: string;
8619
+ week?: number | null;
8620
+ year?: number | null;
8621
+ };
8622
+ Relationships: [];
8623
+ };
8624
+ trade_item_warehouse_preferences: {
8625
+ Row: {
8626
+ connection_id: string;
8627
+ created_at: string;
8628
+ id: string;
8629
+ trade_item_id: string;
8630
+ updated_at: string;
8631
+ warehouse_id: string;
8632
+ warehouse_name: string | null;
8633
+ };
8634
+ Insert: {
8635
+ connection_id: string;
8636
+ created_at?: string;
8637
+ id?: string;
8638
+ trade_item_id: string;
8639
+ updated_at?: string;
8640
+ warehouse_id: string;
8641
+ warehouse_name?: string | null;
8642
+ };
8643
+ Update: {
8644
+ connection_id?: string;
8645
+ created_at?: string;
8646
+ id?: string;
8647
+ trade_item_id?: string;
8648
+ updated_at?: string;
8649
+ warehouse_id?: string;
8650
+ warehouse_name?: string | null;
8651
+ };
8652
+ Relationships: [{
8653
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
8654
+ columns: ["connection_id"];
8655
+ isOneToOne: false;
8656
+ referencedRelation: "floriday_connections";
8657
+ referencedColumns: ["id"];
8658
+ }];
8659
+ };
8315
8660
  twinfield_connections: {
8316
8661
  Row: {
8317
8662
  access_token: string | null;
@@ -8631,6 +8976,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8631
8976
  default_invoice_type: string;
8632
8977
  default_payment_term_days: number;
8633
8978
  default_vat_code: string;
8979
+ invoice_enabled_ao: boolean;
8980
+ invoice_enabled_fo: boolean;
8981
+ invoice_enabled_ho: boolean;
8982
+ invoice_enabled_mo: boolean;
8634
8983
  updated_at: string;
8635
8984
  user_id: string;
8636
8985
  };
@@ -8640,6 +8989,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8640
8989
  default_invoice_type?: string;
8641
8990
  default_payment_term_days?: number;
8642
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;
8643
8996
  updated_at?: string;
8644
8997
  user_id: string;
8645
8998
  };
@@ -8649,6 +9002,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8649
9002
  default_invoice_type?: string;
8650
9003
  default_payment_term_days?: number;
8651
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;
8652
9009
  updated_at?: string;
8653
9010
  user_id?: string;
8654
9011
  };
@@ -9943,6 +10300,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9943
10300
  order_number: string;
9944
10301
  }[];
9945
10302
  };
10303
+ autolink_product_to_floriday: {
10304
+ Args: {
10305
+ p_product_id: string;
10306
+ };
10307
+ Returns: string;
10308
+ };
9946
10309
  backfill_open_order_reservations: {
9947
10310
  Args: never;
9948
10311
  Returns: {
@@ -9981,6 +10344,18 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9981
10344
  Args: never;
9982
10345
  Returns: number;
9983
10346
  };
10347
+ consume_floriday_rate_limit: {
10348
+ Args: {
10349
+ p_bucket: string;
10350
+ p_capacity: number;
10351
+ p_cost?: number;
10352
+ p_refill_per_sec: number;
10353
+ };
10354
+ Returns: {
10355
+ granted: boolean;
10356
+ wait_ms: number;
10357
+ }[];
10358
+ };
9984
10359
  control_get_todays_carts: {
9985
10360
  Args: never;
9986
10361
  Returns: {
@@ -10061,6 +10436,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10061
10436
  status: string;
10062
10437
  }[];
10063
10438
  };
10439
+ enqueue_cart_replan_if_unlocked: {
10440
+ Args: {
10441
+ p_order_id: string;
10442
+ };
10443
+ Returns: undefined;
10444
+ };
10064
10445
  ensure_trade_item_stock_row: {
10065
10446
  Args: {
10066
10447
  p_key: string;
@@ -10167,6 +10548,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10167
10548
  office_code: string;
10168
10549
  }[];
10169
10550
  };
10551
+ get_floricode_record_counts: {
10552
+ Args: never;
10553
+ Returns: {
10554
+ count: number;
10555
+ resource: string;
10556
+ }[];
10557
+ };
10170
10558
  get_floriday_agreements_active: {
10171
10559
  Args: {
10172
10560
  p_on_date?: string;
@@ -10258,6 +10646,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10258
10646
  };
10259
10647
  Returns: import("./types").Json;
10260
10648
  };
10649
+ get_offer_delivery_options: {
10650
+ Args: {
10651
+ p_code: string;
10652
+ };
10653
+ Returns: import("./types").Json;
10654
+ };
10261
10655
  get_offer_recipient_by_code: {
10262
10656
  Args: {
10263
10657
  p_code: string;
@@ -10322,6 +10716,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10322
10716
  Args: never;
10323
10717
  Returns: boolean;
10324
10718
  };
10719
+ is_superadmin: {
10720
+ Args: {
10721
+ _user_id: string;
10722
+ };
10723
+ Returns: boolean;
10724
+ };
10325
10725
  local_effective_price: {
10326
10726
  Args: {
10327
10727
  _customer_id: string;
@@ -10356,6 +10756,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10356
10756
  };
10357
10757
  Returns: string;
10358
10758
  };
10759
+ next_order_number_for_date: {
10760
+ Args: {
10761
+ p_created_at?: string;
10762
+ p_prefix: string;
10763
+ };
10764
+ Returns: string;
10765
+ };
10359
10766
  next_work_order_number: {
10360
10767
  Args: {
10361
10768
  p_parent_work_order_id?: string;
@@ -10363,6 +10770,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10363
10770
  };
10364
10771
  Returns: string;
10365
10772
  };
10773
+ normalize_order_source: {
10774
+ Args: {
10775
+ p_src: string;
10776
+ };
10777
+ Returns: string;
10778
+ };
10366
10779
  normalize_vat: {
10367
10780
  Args: {
10368
10781
  v: string;
@@ -10377,10 +10790,21 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10377
10790
  };
10378
10791
  Returns: boolean;
10379
10792
  };
10793
+ order_number_prefix: {
10794
+ Args: {
10795
+ p_custom_fields?: import("./types").Json;
10796
+ p_order_source: string;
10797
+ };
10798
+ Returns: string;
10799
+ };
10380
10800
  pickstation_get_orders_raw: {
10381
10801
  Args: never;
10382
10802
  Returns: import("./types").Json;
10383
10803
  };
10804
+ pickstation_get_planning_context: {
10805
+ Args: never;
10806
+ Returns: import("./types").Json;
10807
+ };
10384
10808
  pickstation_get_settings: {
10385
10809
  Args: never;
10386
10810
  Returns: import("./types").Json;
@@ -10411,6 +10835,28 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10411
10835
  };
10412
10836
  Returns: undefined;
10413
10837
  };
10838
+ recompute_order_status: {
10839
+ Args: {
10840
+ p_order_id: string;
10841
+ };
10842
+ Returns: undefined;
10843
+ };
10844
+ recompute_reserved_for_order: {
10845
+ Args: {
10846
+ p_order_id: string;
10847
+ };
10848
+ Returns: undefined;
10849
+ };
10850
+ recompute_reserved_stock: {
10851
+ Args: {
10852
+ p_trade_item_key: string;
10853
+ };
10854
+ Returns: undefined;
10855
+ };
10856
+ refresh_external_customers_grouped: {
10857
+ Args: never;
10858
+ Returns: undefined;
10859
+ };
10414
10860
  refresh_floricode_derived_code_lists: {
10415
10861
  Args: never;
10416
10862
  Returns: {
@@ -10425,6 +10871,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10425
10871
  };
10426
10872
  Returns: number;
10427
10873
  };
10874
+ refresh_floricode_derived_for_products: {
10875
+ Args: {
10876
+ _product_ids: string[];
10877
+ };
10878
+ Returns: number;
10879
+ };
10428
10880
  reset_floriday_sync_cursor: {
10429
10881
  Args: {
10430
10882
  p_connection_id: string;
@@ -10432,6 +10884,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10432
10884
  };
10433
10885
  Returns: undefined;
10434
10886
  };
10887
+ resolve_product_id_for_item: {
10888
+ Args: {
10889
+ p_product_name: string;
10890
+ };
10891
+ Returns: string;
10892
+ };
10435
10893
  schedule_floriday_additional_services_sync: {
10436
10894
  Args: {
10437
10895
  p_apikey: string;
@@ -10709,6 +11167,24 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10709
11167
  };
10710
11168
  Returns: string[];
10711
11169
  };
11170
+ sync_cached_packing_from_product: {
11171
+ Args: {
11172
+ p_product_id: string;
11173
+ };
11174
+ Returns: undefined;
11175
+ };
11176
+ sync_order_cart_item_packing_from_product: {
11177
+ Args: {
11178
+ p_product_id: string;
11179
+ };
11180
+ Returns: undefined;
11181
+ };
11182
+ sync_product_packing_from_floriday_cache: {
11183
+ Args: {
11184
+ p_floriday_id: string;
11185
+ };
11186
+ Returns: undefined;
11187
+ };
10712
11188
  twinfield_decrypt: {
10713
11189
  Args: {
10714
11190
  cipher: string;
@@ -10721,6 +11197,17 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10721
11197
  };
10722
11198
  Returns: string;
10723
11199
  };
11200
+ upsert_auto_fulfillment_log: {
11201
+ Args: {
11202
+ p_connection_id: string;
11203
+ p_error?: string;
11204
+ p_fulfillment_order_id?: string;
11205
+ p_reason?: string;
11206
+ p_sales_order_id: string;
11207
+ p_status: string;
11208
+ };
11209
+ Returns: undefined;
11210
+ };
10724
11211
  };
10725
11212
  Enums: {
10726
11213
  app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";