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