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