@flowselections/floriday-verkoop-module 1.0.12 → 1.0.13

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/verkoop/AutoFulfillmentStatusCard.d.ts +4 -0
  2. package/dist-lib/components/verkoop/AutoFulfillmentStatusCard.d.ts.map +1 -0
  3. package/dist-lib/components/verkoop/AutoFulfillmentStatusCard.js +95 -0
  4. package/dist-lib/components/verkoop/CartAssignmentWizard.d.ts +6 -0
  5. package/dist-lib/components/verkoop/CartAssignmentWizard.d.ts.map +1 -0
  6. package/dist-lib/components/verkoop/CartAssignmentWizard.js +194 -0
  7. package/dist-lib/components/verkoop/CreateOrderPage.d.ts.map +1 -1
  8. package/dist-lib/components/verkoop/CreateOrderPage.js +14 -4
  9. package/dist-lib/components/verkoop/OrderAfleverbrievenCard.d.ts +4 -0
  10. package/dist-lib/components/verkoop/OrderAfleverbrievenCard.d.ts.map +1 -0
  11. package/dist-lib/components/verkoop/OrderAfleverbrievenCard.js +44 -0
  12. package/dist-lib/components/verkoop/OrderKarindelingCard.d.ts +5 -0
  13. package/dist-lib/components/verkoop/OrderKarindelingCard.d.ts.map +1 -0
  14. package/dist-lib/components/verkoop/OrderKarindelingCard.js +160 -0
  15. package/dist-lib/components/verkoop/SalesOrderDetailView.d.ts.map +1 -1
  16. package/dist-lib/components/verkoop/SalesOrderDetailView.js +6 -3
  17. package/dist-lib/components/verkoop/VerkoopOrdersPage.d.ts.map +1 -1
  18. package/dist-lib/components/verkoop/VerkoopOrdersPage.js +39 -3
  19. package/dist-lib/integrations/supabase/auth-middleware.d.ts +473 -3
  20. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  21. package/dist-lib/integrations/supabase/client.d.ts +473 -3
  22. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  23. package/dist-lib/integrations/supabase/client.server.d.ts +473 -3
  24. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  25. package/dist-lib/integrations/supabase/types.d.ts +481 -3
  26. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  27. package/dist-lib/lib/cart-lock.functions.d.ts +11225 -0
  28. package/dist-lib/lib/cart-lock.functions.d.ts.map +1 -0
  29. package/dist-lib/lib/cart-lock.functions.js +47 -0
  30. package/dist-lib/lib/cart-planner.d.ts +38 -0
  31. package/dist-lib/lib/cart-planner.d.ts.map +1 -0
  32. package/dist-lib/lib/cart-planner.js +217 -0
  33. package/dist-lib/lib/cart-replan.functions.d.ts +22467 -0
  34. package/dist-lib/lib/cart-replan.functions.d.ts.map +1 -0
  35. package/dist-lib/lib/cart-replan.functions.js +203 -0
  36. package/dist-lib/lib/create-order.functions.d.ts +25821 -77
  37. package/dist-lib/lib/create-order.functions.d.ts.map +1 -1
  38. package/dist-lib/lib/create-order.functions.js +158 -3
  39. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts +33640 -0
  40. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts.map +1 -0
  41. package/dist-lib/lib/floriday-auto-fulfillment.functions.js +65 -0
  42. package/dist-lib/lib/floriday-auto-fulfillment.server.d.ts +21 -0
  43. package/dist-lib/lib/floriday-auto-fulfillment.server.d.ts.map +1 -0
  44. package/dist-lib/lib/floriday-auto-fulfillment.server.js +352 -0
  45. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts +11220 -0
  46. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts.map +1 -0
  47. package/dist-lib/lib/floriday-logistic-labels.functions.js +171 -0
  48. package/dist-lib/lib/floriday-public.functions.d.ts +3313 -37
  49. package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
  50. package/dist-lib/lib/floriday-public.functions.js +45 -47
  51. package/dist-lib/lib/floriday-writes.functions.d.ts +2365 -15
  52. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  53. package/dist-lib/lib/salesorders-mapping.d.ts +2 -0
  54. package/dist-lib/lib/salesorders-mapping.d.ts.map +1 -1
  55. package/dist-lib/lib/salesorders-mapping.js +46 -20
  56. package/dist-lib/lib/salesorders.functions.d.ts +1420 -10
  57. package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
  58. package/dist-lib/lib/salesorders.functions.js +8 -0
  59. package/dist-lib/lib/tradeitems.functions.d.ts +473 -3
  60. package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
  61. package/dist-lib/lib/useSalesOrdersQuery.d.ts +1 -0
  62. package/dist-lib/lib/useSalesOrdersQuery.d.ts.map +1 -1
  63. package/dist-lib/lib/useSalesOrdersQuery.js +121 -39
  64. package/package.json +1 -1
@@ -8,7 +8,10 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8
8
  Tables: {
9
9
  afhandeling_settings: {
10
10
  Row: {
11
+ auto_print_delivery_note: boolean;
12
+ auto_process_paused: boolean;
11
13
  created_at: string;
14
+ extra_pick_days_with_stickers: number;
12
15
  id: string;
13
16
  max_workdays_earlier_pick: number;
14
17
  pick_days_before_transport: number;
@@ -22,7 +25,10 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
22
25
  user_id: string;
23
26
  };
24
27
  Insert: {
28
+ auto_print_delivery_note?: boolean;
29
+ auto_process_paused?: boolean;
25
30
  created_at?: string;
31
+ extra_pick_days_with_stickers?: number;
26
32
  id?: string;
27
33
  max_workdays_earlier_pick?: number;
28
34
  pick_days_before_transport?: number;
@@ -36,7 +42,10 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
36
42
  user_id: string;
37
43
  };
38
44
  Update: {
45
+ auto_print_delivery_note?: boolean;
46
+ auto_process_paused?: boolean;
39
47
  created_at?: string;
48
+ extra_pick_days_with_stickers?: number;
40
49
  id?: string;
41
50
  max_workdays_earlier_pick?: number;
42
51
  pick_days_before_transport?: number;
@@ -828,6 +837,36 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
828
837
  };
829
838
  Relationships: [];
830
839
  };
840
+ cart_replan_queue: {
841
+ Row: {
842
+ attempts: number;
843
+ last_error: string | null;
844
+ order_id: string;
845
+ processed_at: string | null;
846
+ requested_at: string;
847
+ };
848
+ Insert: {
849
+ attempts?: number;
850
+ last_error?: string | null;
851
+ order_id: string;
852
+ processed_at?: string | null;
853
+ requested_at?: string;
854
+ };
855
+ Update: {
856
+ attempts?: number;
857
+ last_error?: string | null;
858
+ order_id?: string;
859
+ processed_at?: string | null;
860
+ requested_at?: string;
861
+ };
862
+ Relationships: [{
863
+ foreignKeyName: "cart_replan_queue_order_id_fkey";
864
+ columns: ["order_id"];
865
+ isOneToOne: true;
866
+ referencedRelation: "orders";
867
+ referencedColumns: ["id"];
868
+ }];
869
+ };
831
870
  collections: {
832
871
  Row: {
833
872
  created_at: string;
@@ -2953,34 +2992,52 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
2953
2992
  Row: {
2954
2993
  catalog_key: string | null;
2955
2994
  catalog_url: string;
2995
+ client_id: string | null;
2996
+ client_secret_ciphertext: string | null;
2997
+ client_secret_last4: string | null;
2956
2998
  created_at: string;
2957
2999
  id: number;
2958
3000
  last_meta: import("../integrations/supabase/types").Json | null;
2959
3001
  last_test_at: string | null;
2960
3002
  last_test_error: string | null;
2961
3003
  last_test_ok: boolean | null;
3004
+ last_token_test_at: string | null;
3005
+ last_token_test_error: string | null;
3006
+ last_token_test_ok: boolean | null;
2962
3007
  updated_at: string;
2963
3008
  };
2964
3009
  Insert: {
2965
3010
  catalog_key?: string | null;
2966
3011
  catalog_url?: string;
3012
+ client_id?: string | null;
3013
+ client_secret_ciphertext?: string | null;
3014
+ client_secret_last4?: string | null;
2967
3015
  created_at?: string;
2968
3016
  id?: number;
2969
3017
  last_meta?: import("../integrations/supabase/types").Json | null;
2970
3018
  last_test_at?: string | null;
2971
3019
  last_test_error?: string | null;
2972
3020
  last_test_ok?: boolean | null;
3021
+ last_token_test_at?: string | null;
3022
+ last_token_test_error?: string | null;
3023
+ last_token_test_ok?: boolean | null;
2973
3024
  updated_at?: string;
2974
3025
  };
2975
3026
  Update: {
2976
3027
  catalog_key?: string | null;
2977
3028
  catalog_url?: string;
3029
+ client_id?: string | null;
3030
+ client_secret_ciphertext?: string | null;
3031
+ client_secret_last4?: string | null;
2978
3032
  created_at?: string;
2979
3033
  id?: number;
2980
3034
  last_meta?: import("../integrations/supabase/types").Json | null;
2981
3035
  last_test_at?: string | null;
2982
3036
  last_test_error?: string | null;
2983
3037
  last_test_ok?: boolean | null;
3038
+ last_token_test_at?: string | null;
3039
+ last_token_test_error?: string | null;
3040
+ last_token_test_ok?: boolean | null;
2984
3041
  updated_at?: string;
2985
3042
  };
2986
3043
  Relationships: [];
@@ -3213,6 +3270,54 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
3213
3270
  referencedColumns: ["id"];
3214
3271
  }];
3215
3272
  };
3273
+ floriday_auto_fulfillment_log: {
3274
+ Row: {
3275
+ attempts: number;
3276
+ connection_id: string;
3277
+ created_at: string;
3278
+ error: string | null;
3279
+ fulfillment_order_id: string | null;
3280
+ id: string;
3281
+ last_attempt_at: string | null;
3282
+ reason: string | null;
3283
+ sales_order_id: string;
3284
+ status: string;
3285
+ updated_at: string;
3286
+ };
3287
+ Insert: {
3288
+ attempts?: number;
3289
+ connection_id: string;
3290
+ created_at?: string;
3291
+ error?: string | null;
3292
+ fulfillment_order_id?: string | null;
3293
+ id?: string;
3294
+ last_attempt_at?: string | null;
3295
+ reason?: string | null;
3296
+ sales_order_id: string;
3297
+ status?: string;
3298
+ updated_at?: string;
3299
+ };
3300
+ Update: {
3301
+ attempts?: number;
3302
+ connection_id?: string;
3303
+ created_at?: string;
3304
+ error?: string | null;
3305
+ fulfillment_order_id?: string | null;
3306
+ id?: string;
3307
+ last_attempt_at?: string | null;
3308
+ reason?: string | null;
3309
+ sales_order_id?: string;
3310
+ status?: string;
3311
+ updated_at?: string;
3312
+ };
3313
+ Relationships: [{
3314
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
3315
+ columns: ["connection_id"];
3316
+ isOneToOne: false;
3317
+ referencedRelation: "floriday_connections";
3318
+ referencedColumns: ["id"];
3319
+ }];
3320
+ };
3216
3321
  floriday_base_items_cache: {
3217
3322
  Row: {
3218
3323
  connection_id: string;
@@ -4317,6 +4422,24 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
4317
4422
  referencedColumns: ["id"];
4318
4423
  }];
4319
4424
  };
4425
+ floriday_rate_limit_state: {
4426
+ Row: {
4427
+ bucket: string;
4428
+ last_refill_at: string;
4429
+ tokens: number;
4430
+ };
4431
+ Insert: {
4432
+ bucket: string;
4433
+ last_refill_at?: string;
4434
+ tokens: number;
4435
+ };
4436
+ Update: {
4437
+ bucket?: string;
4438
+ last_refill_at?: string;
4439
+ tokens?: number;
4440
+ };
4441
+ Relationships: [];
4442
+ };
4320
4443
  floriday_resource_schemas: {
4321
4444
  Row: {
4322
4445
  enums: import("../integrations/supabase/types").Json;
@@ -4740,6 +4863,60 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
4740
4863
  referencedColumns: ["id"];
4741
4864
  }];
4742
4865
  };
4866
+ flow_role_assignments: {
4867
+ Row: {
4868
+ created_at: string;
4869
+ id: string;
4870
+ role_id: string;
4871
+ user_id: string;
4872
+ };
4873
+ Insert: {
4874
+ created_at?: string;
4875
+ id?: string;
4876
+ role_id: string;
4877
+ user_id: string;
4878
+ };
4879
+ Update: {
4880
+ created_at?: string;
4881
+ id?: string;
4882
+ role_id?: string;
4883
+ user_id?: string;
4884
+ };
4885
+ Relationships: [{
4886
+ foreignKeyName: "flow_role_assignments_role_id_fkey";
4887
+ columns: ["role_id"];
4888
+ isOneToOne: false;
4889
+ referencedRelation: "flow_roles";
4890
+ referencedColumns: ["id"];
4891
+ }];
4892
+ };
4893
+ flow_roles: {
4894
+ Row: {
4895
+ created_at: string;
4896
+ description: string | null;
4897
+ id: string;
4898
+ module_access: string[];
4899
+ name: string;
4900
+ updated_at: string;
4901
+ };
4902
+ Insert: {
4903
+ created_at?: string;
4904
+ description?: string | null;
4905
+ id?: string;
4906
+ module_access?: string[];
4907
+ name: string;
4908
+ updated_at?: string;
4909
+ };
4910
+ Update: {
4911
+ created_at?: string;
4912
+ description?: string | null;
4913
+ id?: string;
4914
+ module_access?: string[];
4915
+ name?: string;
4916
+ updated_at?: string;
4917
+ };
4918
+ Relationships: [];
4919
+ };
4743
4920
  imap_accounts: {
4744
4921
  Row: {
4745
4922
  created_at: string;
@@ -5371,6 +5548,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
5371
5548
  matched_customer_id: string | null;
5372
5549
  message_id: string;
5373
5550
  notes: string | null;
5551
+ order_number: string | null;
5374
5552
  parsed_payload: import("../integrations/supabase/types").Json | null;
5375
5553
  reviewed_at: string | null;
5376
5554
  reviewed_by: string | null;
@@ -5386,6 +5564,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
5386
5564
  matched_customer_id?: string | null;
5387
5565
  message_id: string;
5388
5566
  notes?: string | null;
5567
+ order_number?: string | null;
5389
5568
  parsed_payload?: import("../integrations/supabase/types").Json | null;
5390
5569
  reviewed_at?: string | null;
5391
5570
  reviewed_by?: string | null;
@@ -5401,6 +5580,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
5401
5580
  matched_customer_id?: string | null;
5402
5581
  message_id?: string;
5403
5582
  notes?: string | null;
5583
+ order_number?: string | null;
5404
5584
  parsed_payload?: import("../integrations/supabase/types").Json | null;
5405
5585
  reviewed_at?: string | null;
5406
5586
  reviewed_by?: string | null;
@@ -6257,6 +6437,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
6257
6437
  id: string;
6258
6438
  items: import("../integrations/supabase/types").Json;
6259
6439
  notes: string | null;
6440
+ order_number: string | null;
6260
6441
  recipient_id: string;
6261
6442
  total_amount: number;
6262
6443
  };
@@ -6270,6 +6451,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
6270
6451
  id?: string;
6271
6452
  items?: import("../integrations/supabase/types").Json;
6272
6453
  notes?: string | null;
6454
+ order_number?: string | null;
6273
6455
  recipient_id: string;
6274
6456
  total_amount?: number;
6275
6457
  };
@@ -6283,6 +6465,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
6283
6465
  id?: string;
6284
6466
  items?: import("../integrations/supabase/types").Json;
6285
6467
  notes?: string | null;
6468
+ order_number?: string | null;
6286
6469
  recipient_id?: string;
6287
6470
  total_amount?: number;
6288
6471
  };
@@ -6442,6 +6625,9 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
6442
6625
  crates_per_layer: number;
6443
6626
  created_at: string;
6444
6627
  id: string;
6628
+ layer_fraction: number;
6629
+ layer_share_pct: number;
6630
+ layers_per_cart: number;
6445
6631
  order_item_id: string | null;
6446
6632
  plants_per_crate: number;
6447
6633
  product_id: string | null;
@@ -6453,6 +6639,9 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
6453
6639
  crates_per_layer?: number;
6454
6640
  created_at?: string;
6455
6641
  id?: string;
6642
+ layer_fraction?: number;
6643
+ layer_share_pct?: number;
6644
+ layers_per_cart?: number;
6456
6645
  order_item_id?: string | null;
6457
6646
  plants_per_crate?: number;
6458
6647
  product_id?: string | null;
@@ -6464,6 +6653,9 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
6464
6653
  crates_per_layer?: number;
6465
6654
  created_at?: string;
6466
6655
  id?: string;
6656
+ layer_fraction?: number;
6657
+ layer_share_pct?: number;
6658
+ layers_per_cart?: number;
6467
6659
  order_item_id?: string | null;
6468
6660
  plants_per_crate?: number;
6469
6661
  product_id?: string | null;
@@ -6491,33 +6683,45 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
6491
6683
  };
6492
6684
  order_carts: {
6493
6685
  Row: {
6686
+ algorithm_version: number;
6494
6687
  cart_number: number;
6495
6688
  created_at: string;
6496
6689
  id: string;
6497
6690
  is_auto: boolean;
6498
6691
  is_complete: boolean;
6499
6692
  notes: string | null;
6693
+ occupancy_pct: number;
6500
6694
  order_id: string;
6695
+ source: string;
6696
+ total_layers_used: number;
6501
6697
  updated_at: string;
6502
6698
  };
6503
6699
  Insert: {
6700
+ algorithm_version?: number;
6504
6701
  cart_number: number;
6505
6702
  created_at?: string;
6506
6703
  id?: string;
6507
6704
  is_auto?: boolean;
6508
6705
  is_complete?: boolean;
6509
6706
  notes?: string | null;
6707
+ occupancy_pct?: number;
6510
6708
  order_id: string;
6709
+ source?: string;
6710
+ total_layers_used?: number;
6511
6711
  updated_at?: string;
6512
6712
  };
6513
6713
  Update: {
6714
+ algorithm_version?: number;
6514
6715
  cart_number?: number;
6515
6716
  created_at?: string;
6516
6717
  id?: string;
6517
6718
  is_auto?: boolean;
6518
6719
  is_complete?: boolean;
6519
6720
  notes?: string | null;
6721
+ occupancy_pct?: number;
6520
6722
  order_id?: string;
6723
+ source?: string;
6724
+ total_layers_used?: number;
6521
6725
  updated_at?: string;
6522
6726
  };
6523
6727
  Relationships: [{
@@ -6670,6 +6874,8 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
6670
6874
  order_date: string;
6671
6875
  order_number: string;
6672
6876
  order_source: string;
6877
+ plan_locked_at: string | null;
6878
+ plan_locked_ref: string | null;
6673
6879
  status: string;
6674
6880
  total: string;
6675
6881
  updated_at: string;
@@ -6686,6 +6892,8 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
6686
6892
  order_date?: string;
6687
6893
  order_number: string;
6688
6894
  order_source?: string;
6895
+ plan_locked_at?: string | null;
6896
+ plan_locked_ref?: string | null;
6689
6897
  status?: string;
6690
6898
  total?: string;
6691
6899
  updated_at?: string;
@@ -6702,6 +6910,8 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
6702
6910
  order_date?: string;
6703
6911
  order_number?: string;
6704
6912
  order_source?: string;
6913
+ plan_locked_at?: string | null;
6914
+ plan_locked_ref?: string | null;
6705
6915
  status?: string;
6706
6916
  total?: string;
6707
6917
  updated_at?: string;
@@ -7074,6 +7284,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7074
7284
  display_name: string | null;
7075
7285
  email: string | null;
7076
7286
  id: string;
7287
+ is_superadmin: boolean;
7077
7288
  notification_preferences: import("../integrations/supabase/types").Json;
7078
7289
  tenant_id: string | null;
7079
7290
  updated_at: string;
@@ -7083,6 +7294,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7083
7294
  display_name?: string | null;
7084
7295
  email?: string | null;
7085
7296
  id: string;
7297
+ is_superadmin?: boolean;
7086
7298
  notification_preferences?: import("../integrations/supabase/types").Json;
7087
7299
  tenant_id?: string | null;
7088
7300
  updated_at?: string;
@@ -7092,6 +7304,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7092
7304
  display_name?: string | null;
7093
7305
  email?: string | null;
7094
7306
  id?: string;
7307
+ is_superadmin?: boolean;
7095
7308
  notification_preferences?: import("../integrations/supabase/types").Json;
7096
7309
  tenant_id?: string | null;
7097
7310
  updated_at?: string;
@@ -7881,6 +8094,24 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7881
8094
  };
7882
8095
  Relationships: [];
7883
8096
  };
8097
+ sidebar_config: {
8098
+ Row: {
8099
+ id: string;
8100
+ module_order: string[];
8101
+ updated_at: string;
8102
+ };
8103
+ Insert: {
8104
+ id?: string;
8105
+ module_order?: string[];
8106
+ updated_at?: string;
8107
+ };
8108
+ Update: {
8109
+ id?: string;
8110
+ module_order?: string[];
8111
+ updated_at?: string;
8112
+ };
8113
+ Relationships: [];
8114
+ };
7884
8115
  stock_import_runs: {
7885
8116
  Row: {
7886
8117
  connection_id: string | null;
@@ -7939,7 +8170,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7939
8170
  reason: string | null;
7940
8171
  reserved_after: number | null;
7941
8172
  reserved_before: number | null;
7942
- trade_item_key: string;
8173
+ trade_item_key: string | null;
7943
8174
  };
7944
8175
  Insert: {
7945
8176
  connection_id?: string | null;
@@ -7956,7 +8187,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7956
8187
  reason?: string | null;
7957
8188
  reserved_after?: number | null;
7958
8189
  reserved_before?: number | null;
7959
- trade_item_key: string;
8190
+ trade_item_key?: string | null;
7960
8191
  };
7961
8192
  Update: {
7962
8193
  connection_id?: string | null;
@@ -7973,7 +8204,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7973
8204
  reason?: string | null;
7974
8205
  reserved_after?: number | null;
7975
8206
  reserved_before?: number | null;
7976
- trade_item_key?: string;
8207
+ trade_item_key?: string | null;
7977
8208
  };
7978
8209
  Relationships: [];
7979
8210
  };
@@ -8316,6 +8547,114 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8316
8547
  };
8317
8548
  Relationships: [];
8318
8549
  };
8550
+ trade_item_supply_lines: {
8551
+ Row: {
8552
+ available_quantity: number | null;
8553
+ connection_id: string;
8554
+ created_at: string;
8555
+ currency: string | null;
8556
+ endpoint_family: string | null;
8557
+ environment: string | null;
8558
+ id: string;
8559
+ last_error: string | null;
8560
+ last_status: number | null;
8561
+ packing_configuration_id: string | null;
8562
+ period_end: string | null;
8563
+ period_start: string | null;
8564
+ price_per_piece: number | null;
8565
+ sales_unit: string | null;
8566
+ supply_line_id: string | null;
8567
+ supply_type: string;
8568
+ trade_item_id: string;
8569
+ updated_at: string;
8570
+ user_id: string;
8571
+ week: number | null;
8572
+ year: number | null;
8573
+ };
8574
+ Insert: {
8575
+ available_quantity?: number | null;
8576
+ connection_id: string;
8577
+ created_at?: string;
8578
+ currency?: string | null;
8579
+ endpoint_family?: string | null;
8580
+ environment?: string | null;
8581
+ id?: string;
8582
+ last_error?: string | null;
8583
+ last_status?: number | null;
8584
+ packing_configuration_id?: string | null;
8585
+ period_end?: string | null;
8586
+ period_start?: string | null;
8587
+ price_per_piece?: number | null;
8588
+ sales_unit?: string | null;
8589
+ supply_line_id?: string | null;
8590
+ supply_type?: string;
8591
+ trade_item_id: string;
8592
+ updated_at?: string;
8593
+ user_id: string;
8594
+ week?: number | null;
8595
+ year?: number | null;
8596
+ };
8597
+ Update: {
8598
+ available_quantity?: number | null;
8599
+ connection_id?: string;
8600
+ created_at?: string;
8601
+ currency?: string | null;
8602
+ endpoint_family?: string | null;
8603
+ environment?: string | null;
8604
+ id?: string;
8605
+ last_error?: string | null;
8606
+ last_status?: number | null;
8607
+ packing_configuration_id?: string | null;
8608
+ period_end?: string | null;
8609
+ period_start?: string | null;
8610
+ price_per_piece?: number | null;
8611
+ sales_unit?: string | null;
8612
+ supply_line_id?: string | null;
8613
+ supply_type?: string;
8614
+ trade_item_id?: string;
8615
+ updated_at?: string;
8616
+ user_id?: string;
8617
+ week?: number | null;
8618
+ year?: number | null;
8619
+ };
8620
+ Relationships: [];
8621
+ };
8622
+ trade_item_warehouse_preferences: {
8623
+ Row: {
8624
+ connection_id: string;
8625
+ created_at: string;
8626
+ id: string;
8627
+ trade_item_id: string;
8628
+ updated_at: string;
8629
+ warehouse_id: string;
8630
+ warehouse_name: string | null;
8631
+ };
8632
+ Insert: {
8633
+ connection_id: string;
8634
+ created_at?: string;
8635
+ id?: string;
8636
+ trade_item_id: string;
8637
+ updated_at?: string;
8638
+ warehouse_id: string;
8639
+ warehouse_name?: string | null;
8640
+ };
8641
+ Update: {
8642
+ connection_id?: string;
8643
+ created_at?: string;
8644
+ id?: string;
8645
+ trade_item_id?: string;
8646
+ updated_at?: string;
8647
+ warehouse_id?: string;
8648
+ warehouse_name?: string | null;
8649
+ };
8650
+ Relationships: [{
8651
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
8652
+ columns: ["connection_id"];
8653
+ isOneToOne: false;
8654
+ referencedRelation: "floriday_connections";
8655
+ referencedColumns: ["id"];
8656
+ }];
8657
+ };
8319
8658
  twinfield_connections: {
8320
8659
  Row: {
8321
8660
  access_token: string | null;
@@ -8635,6 +8974,10 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8635
8974
  default_invoice_type: string;
8636
8975
  default_payment_term_days: number;
8637
8976
  default_vat_code: string;
8977
+ invoice_enabled_ao: boolean;
8978
+ invoice_enabled_fo: boolean;
8979
+ invoice_enabled_ho: boolean;
8980
+ invoice_enabled_mo: boolean;
8638
8981
  updated_at: string;
8639
8982
  user_id: string;
8640
8983
  };
@@ -8644,6 +8987,10 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8644
8987
  default_invoice_type?: string;
8645
8988
  default_payment_term_days?: number;
8646
8989
  default_vat_code?: string;
8990
+ invoice_enabled_ao?: boolean;
8991
+ invoice_enabled_fo?: boolean;
8992
+ invoice_enabled_ho?: boolean;
8993
+ invoice_enabled_mo?: boolean;
8647
8994
  updated_at?: string;
8648
8995
  user_id: string;
8649
8996
  };
@@ -8653,6 +9000,10 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8653
9000
  default_invoice_type?: string;
8654
9001
  default_payment_term_days?: number;
8655
9002
  default_vat_code?: string;
9003
+ invoice_enabled_ao?: boolean;
9004
+ invoice_enabled_fo?: boolean;
9005
+ invoice_enabled_ho?: boolean;
9006
+ invoice_enabled_mo?: boolean;
8656
9007
  updated_at?: string;
8657
9008
  user_id?: string;
8658
9009
  };
@@ -9947,6 +10298,12 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9947
10298
  order_number: string;
9948
10299
  }[];
9949
10300
  };
10301
+ autolink_product_to_floriday: {
10302
+ Args: {
10303
+ p_product_id: string;
10304
+ };
10305
+ Returns: string;
10306
+ };
9950
10307
  backfill_open_order_reservations: {
9951
10308
  Args: never;
9952
10309
  Returns: {
@@ -9985,6 +10342,18 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9985
10342
  Args: never;
9986
10343
  Returns: number;
9987
10344
  };
10345
+ consume_floriday_rate_limit: {
10346
+ Args: {
10347
+ p_bucket: string;
10348
+ p_capacity: number;
10349
+ p_cost?: number;
10350
+ p_refill_per_sec: number;
10351
+ };
10352
+ Returns: {
10353
+ granted: boolean;
10354
+ wait_ms: number;
10355
+ }[];
10356
+ };
9988
10357
  control_get_todays_carts: {
9989
10358
  Args: never;
9990
10359
  Returns: {
@@ -10065,6 +10434,12 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10065
10434
  status: string;
10066
10435
  }[];
10067
10436
  };
10437
+ enqueue_cart_replan_if_unlocked: {
10438
+ Args: {
10439
+ p_order_id: string;
10440
+ };
10441
+ Returns: undefined;
10442
+ };
10068
10443
  ensure_trade_item_stock_row: {
10069
10444
  Args: {
10070
10445
  p_key: string;
@@ -10171,6 +10546,13 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10171
10546
  office_code: string;
10172
10547
  }[];
10173
10548
  };
10549
+ get_floricode_record_counts: {
10550
+ Args: never;
10551
+ Returns: {
10552
+ count: number;
10553
+ resource: string;
10554
+ }[];
10555
+ };
10174
10556
  get_floriday_agreements_active: {
10175
10557
  Args: {
10176
10558
  p_on_date?: string;
@@ -10262,6 +10644,12 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10262
10644
  };
10263
10645
  Returns: import("../integrations/supabase/types").Json;
10264
10646
  };
10647
+ get_offer_delivery_options: {
10648
+ Args: {
10649
+ p_code: string;
10650
+ };
10651
+ Returns: import("../integrations/supabase/types").Json;
10652
+ };
10265
10653
  get_offer_recipient_by_code: {
10266
10654
  Args: {
10267
10655
  p_code: string;
@@ -10326,6 +10714,12 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10326
10714
  Args: never;
10327
10715
  Returns: boolean;
10328
10716
  };
10717
+ is_superadmin: {
10718
+ Args: {
10719
+ _user_id: string;
10720
+ };
10721
+ Returns: boolean;
10722
+ };
10329
10723
  local_effective_price: {
10330
10724
  Args: {
10331
10725
  _customer_id: string;
@@ -10360,6 +10754,13 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10360
10754
  };
10361
10755
  Returns: string;
10362
10756
  };
10757
+ next_order_number_for_date: {
10758
+ Args: {
10759
+ p_created_at?: string;
10760
+ p_prefix: string;
10761
+ };
10762
+ Returns: string;
10763
+ };
10363
10764
  next_work_order_number: {
10364
10765
  Args: {
10365
10766
  p_parent_work_order_id?: string;
@@ -10367,6 +10768,12 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10367
10768
  };
10368
10769
  Returns: string;
10369
10770
  };
10771
+ normalize_order_source: {
10772
+ Args: {
10773
+ p_src: string;
10774
+ };
10775
+ Returns: string;
10776
+ };
10370
10777
  normalize_vat: {
10371
10778
  Args: {
10372
10779
  v: string;
@@ -10381,10 +10788,21 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10381
10788
  };
10382
10789
  Returns: boolean;
10383
10790
  };
10791
+ order_number_prefix: {
10792
+ Args: {
10793
+ p_custom_fields?: import("../integrations/supabase/types").Json;
10794
+ p_order_source: string;
10795
+ };
10796
+ Returns: string;
10797
+ };
10384
10798
  pickstation_get_orders_raw: {
10385
10799
  Args: never;
10386
10800
  Returns: import("../integrations/supabase/types").Json;
10387
10801
  };
10802
+ pickstation_get_planning_context: {
10803
+ Args: never;
10804
+ Returns: import("../integrations/supabase/types").Json;
10805
+ };
10388
10806
  pickstation_get_settings: {
10389
10807
  Args: never;
10390
10808
  Returns: import("../integrations/supabase/types").Json;
@@ -10415,6 +10833,28 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10415
10833
  };
10416
10834
  Returns: undefined;
10417
10835
  };
10836
+ recompute_order_status: {
10837
+ Args: {
10838
+ p_order_id: string;
10839
+ };
10840
+ Returns: undefined;
10841
+ };
10842
+ recompute_reserved_for_order: {
10843
+ Args: {
10844
+ p_order_id: string;
10845
+ };
10846
+ Returns: undefined;
10847
+ };
10848
+ recompute_reserved_stock: {
10849
+ Args: {
10850
+ p_trade_item_key: string;
10851
+ };
10852
+ Returns: undefined;
10853
+ };
10854
+ refresh_external_customers_grouped: {
10855
+ Args: never;
10856
+ Returns: undefined;
10857
+ };
10418
10858
  refresh_floricode_derived_code_lists: {
10419
10859
  Args: never;
10420
10860
  Returns: {
@@ -10429,6 +10869,12 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10429
10869
  };
10430
10870
  Returns: number;
10431
10871
  };
10872
+ refresh_floricode_derived_for_products: {
10873
+ Args: {
10874
+ _product_ids: string[];
10875
+ };
10876
+ Returns: number;
10877
+ };
10432
10878
  reset_floriday_sync_cursor: {
10433
10879
  Args: {
10434
10880
  p_connection_id: string;
@@ -10436,6 +10882,12 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10436
10882
  };
10437
10883
  Returns: undefined;
10438
10884
  };
10885
+ resolve_product_id_for_item: {
10886
+ Args: {
10887
+ p_product_name: string;
10888
+ };
10889
+ Returns: string;
10890
+ };
10439
10891
  schedule_floriday_additional_services_sync: {
10440
10892
  Args: {
10441
10893
  p_apikey: string;
@@ -10713,6 +11165,24 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10713
11165
  };
10714
11166
  Returns: string[];
10715
11167
  };
11168
+ sync_cached_packing_from_product: {
11169
+ Args: {
11170
+ p_product_id: string;
11171
+ };
11172
+ Returns: undefined;
11173
+ };
11174
+ sync_order_cart_item_packing_from_product: {
11175
+ Args: {
11176
+ p_product_id: string;
11177
+ };
11178
+ Returns: undefined;
11179
+ };
11180
+ sync_product_packing_from_floriday_cache: {
11181
+ Args: {
11182
+ p_floriday_id: string;
11183
+ };
11184
+ Returns: undefined;
11185
+ };
10716
11186
  twinfield_decrypt: {
10717
11187
  Args: {
10718
11188
  cipher: string;