@flowselections/floriday-afhandeling-module 1.0.13 → 1.0.14

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 (74) hide show
  1. package/dist-lib/components/afhandeling/AutoProcessStatus.d.ts +12 -0
  2. package/dist-lib/components/afhandeling/AutoProcessStatus.d.ts.map +1 -0
  3. package/dist-lib/components/afhandeling/AutoProcessStatus.js +103 -0
  4. package/dist-lib/components/afhandeling/ControleLijstPrint.d.ts +3 -1
  5. package/dist-lib/components/afhandeling/ControleLijstPrint.d.ts.map +1 -1
  6. package/dist-lib/components/afhandeling/ControleLijstPrint.js +41 -63
  7. package/dist-lib/components/afhandeling/DagDetailDialog.d.ts.map +1 -1
  8. package/dist-lib/components/afhandeling/DagDetailDialog.js +96 -4
  9. package/dist-lib/components/afhandeling/LeveringenPage.js +1 -1
  10. package/dist-lib/components/afhandeling/VervoerdersPage.d.ts.map +1 -1
  11. package/dist-lib/components/afhandeling/VervoerdersPage.js +2 -1
  12. package/dist-lib/components/afhandeling/WeekAgendaView.d.ts +3 -1
  13. package/dist-lib/components/afhandeling/WeekAgendaView.d.ts.map +1 -1
  14. package/dist-lib/components/afhandeling/WeekAgendaView.js +58 -17
  15. package/dist-lib/components/pickstation/PakbonTemplate.d.ts +2 -1
  16. package/dist-lib/components/pickstation/PakbonTemplate.d.ts.map +1 -1
  17. package/dist-lib/components/pickstation/PakbonTemplate.js +20 -17
  18. package/dist-lib/components/pickstation/PickstationPage.d.ts.map +1 -1
  19. package/dist-lib/components/pickstation/PickstationPage.js +57 -8
  20. package/dist-lib/components/settings/AfhandelingSettingsCard.d.ts.map +1 -1
  21. package/dist-lib/components/settings/AfhandelingSettingsCard.js +14 -2
  22. package/dist-lib/hooks/useOrderPlanning.d.ts.map +1 -1
  23. package/dist-lib/hooks/useOrderPlanning.js +28 -11
  24. package/dist-lib/index.d.ts +2 -0
  25. package/dist-lib/index.d.ts.map +1 -1
  26. package/dist-lib/index.js +2 -0
  27. package/dist-lib/integrations/supabase/auth-middleware.d.ts +484 -3
  28. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  29. package/dist-lib/integrations/supabase/client.d.ts +484 -3
  30. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  31. package/dist-lib/integrations/supabase/client.server.d.ts +484 -3
  32. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  33. package/dist-lib/integrations/supabase/types.d.ts +492 -3
  34. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  35. package/dist-lib/lib/afhandelingSettings.functions.d.ts +981 -7
  36. package/dist-lib/lib/afhandelingSettings.functions.d.ts.map +1 -1
  37. package/dist-lib/lib/afhandelingSettings.functions.js +28 -1
  38. package/dist-lib/lib/carrierPlanning.d.ts +25 -0
  39. package/dist-lib/lib/carrierPlanning.d.ts.map +1 -0
  40. package/dist-lib/lib/carrierPlanning.js +65 -0
  41. package/dist-lib/lib/carrierSignupMail.server.d.ts +0 -2
  42. package/dist-lib/lib/carrierSignupMail.server.d.ts.map +1 -1
  43. package/dist-lib/lib/carrierSignupMail.server.js +53 -216
  44. package/dist-lib/lib/carriers.functions.d.ts +2420 -15
  45. package/dist-lib/lib/carriers.functions.d.ts.map +1 -1
  46. package/dist-lib/lib/carriers.functions.js +5 -0
  47. package/dist-lib/lib/cartAssignments.functions.d.ts +2420 -15
  48. package/dist-lib/lib/cartAssignments.functions.d.ts.map +1 -1
  49. package/dist-lib/lib/cartControl.functions.d.ts +4840 -30
  50. package/dist-lib/lib/cartControl.functions.d.ts.map +1 -1
  51. package/dist-lib/lib/cartControl.functions.js +1 -1
  52. package/dist-lib/lib/cartRescheduling.d.ts.map +1 -1
  53. package/dist-lib/lib/cartRescheduling.js +8 -6
  54. package/dist-lib/lib/countries.d.ts +2 -0
  55. package/dist-lib/lib/countries.d.ts.map +1 -1
  56. package/dist-lib/lib/countries.js +51 -0
  57. package/dist-lib/lib/deliveryNotePrint.d.ts +26 -0
  58. package/dist-lib/lib/deliveryNotePrint.d.ts.map +1 -0
  59. package/dist-lib/lib/deliveryNotePrint.js +172 -0
  60. package/dist-lib/lib/floriday.functions.d.ts +492 -3
  61. package/dist-lib/lib/floriday.functions.d.ts.map +1 -1
  62. package/dist-lib/lib/floriday.functions.js +126 -8
  63. package/dist-lib/lib/floridayAutoProcess.d.ts +30 -0
  64. package/dist-lib/lib/floridayAutoProcess.d.ts.map +1 -0
  65. package/dist-lib/lib/floridayAutoProcess.js +70 -0
  66. package/dist-lib/lib/pickstationI18n.d.ts +46 -0
  67. package/dist-lib/lib/pickstationI18n.d.ts.map +1 -1
  68. package/dist-lib/lib/pickstationI18n.js +251 -0
  69. package/dist-lib/lib/pickstationOrders.server.d.ts.map +1 -1
  70. package/dist-lib/lib/pickstationOrders.server.js +55 -19
  71. package/dist-lib/lib/planning.d.ts +34 -0
  72. package/dist-lib/lib/planning.d.ts.map +1 -1
  73. package/dist-lib/lib/planning.js +84 -0
  74. package/package.json +1 -1
@@ -61,7 +61,10 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
61
61
  Tables: {
62
62
  afhandeling_settings: {
63
63
  Row: {
64
+ auto_print_delivery_note: boolean;
65
+ auto_process_paused: boolean;
64
66
  created_at: string;
67
+ extra_pick_days_with_stickers: number;
65
68
  id: string;
66
69
  max_workdays_earlier_pick: number;
67
70
  pick_days_before_transport: number;
@@ -75,7 +78,10 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
75
78
  user_id: string;
76
79
  };
77
80
  Insert: {
81
+ auto_print_delivery_note?: boolean;
82
+ auto_process_paused?: boolean;
78
83
  created_at?: string;
84
+ extra_pick_days_with_stickers?: number;
79
85
  id?: string;
80
86
  max_workdays_earlier_pick?: number;
81
87
  pick_days_before_transport?: number;
@@ -89,7 +95,10 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
89
95
  user_id: string;
90
96
  };
91
97
  Update: {
98
+ auto_print_delivery_note?: boolean;
99
+ auto_process_paused?: boolean;
92
100
  created_at?: string;
101
+ extra_pick_days_with_stickers?: number;
93
102
  id?: string;
94
103
  max_workdays_earlier_pick?: number;
95
104
  pick_days_before_transport?: number;
@@ -881,6 +890,36 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
881
890
  };
882
891
  Relationships: [];
883
892
  };
893
+ cart_replan_queue: {
894
+ Row: {
895
+ attempts: number;
896
+ last_error: string | null;
897
+ order_id: string;
898
+ processed_at: string | null;
899
+ requested_at: string;
900
+ };
901
+ Insert: {
902
+ attempts?: number;
903
+ last_error?: string | null;
904
+ order_id: string;
905
+ processed_at?: string | null;
906
+ requested_at?: string;
907
+ };
908
+ Update: {
909
+ attempts?: number;
910
+ last_error?: string | null;
911
+ order_id?: string;
912
+ processed_at?: string | null;
913
+ requested_at?: string;
914
+ };
915
+ Relationships: [{
916
+ foreignKeyName: "cart_replan_queue_order_id_fkey";
917
+ columns: ["order_id"];
918
+ isOneToOne: true;
919
+ referencedRelation: "orders";
920
+ referencedColumns: ["id"];
921
+ }];
922
+ };
884
923
  collections: {
885
924
  Row: {
886
925
  created_at: string;
@@ -3006,34 +3045,52 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
3006
3045
  Row: {
3007
3046
  catalog_key: string | null;
3008
3047
  catalog_url: string;
3048
+ client_id: string | null;
3049
+ client_secret_ciphertext: string | null;
3050
+ client_secret_last4: string | null;
3009
3051
  created_at: string;
3010
3052
  id: number;
3011
3053
  last_meta: import("../integrations/supabase/types").Json | null;
3012
3054
  last_test_at: string | null;
3013
3055
  last_test_error: string | null;
3014
3056
  last_test_ok: boolean | null;
3057
+ last_token_test_at: string | null;
3058
+ last_token_test_error: string | null;
3059
+ last_token_test_ok: boolean | null;
3015
3060
  updated_at: string;
3016
3061
  };
3017
3062
  Insert: {
3018
3063
  catalog_key?: string | null;
3019
3064
  catalog_url?: string;
3065
+ client_id?: string | null;
3066
+ client_secret_ciphertext?: string | null;
3067
+ client_secret_last4?: string | null;
3020
3068
  created_at?: string;
3021
3069
  id?: number;
3022
3070
  last_meta?: import("../integrations/supabase/types").Json | null;
3023
3071
  last_test_at?: string | null;
3024
3072
  last_test_error?: string | null;
3025
3073
  last_test_ok?: boolean | null;
3074
+ last_token_test_at?: string | null;
3075
+ last_token_test_error?: string | null;
3076
+ last_token_test_ok?: boolean | null;
3026
3077
  updated_at?: string;
3027
3078
  };
3028
3079
  Update: {
3029
3080
  catalog_key?: string | null;
3030
3081
  catalog_url?: string;
3082
+ client_id?: string | null;
3083
+ client_secret_ciphertext?: string | null;
3084
+ client_secret_last4?: string | null;
3031
3085
  created_at?: string;
3032
3086
  id?: number;
3033
3087
  last_meta?: import("../integrations/supabase/types").Json | null;
3034
3088
  last_test_at?: string | null;
3035
3089
  last_test_error?: string | null;
3036
3090
  last_test_ok?: boolean | null;
3091
+ last_token_test_at?: string | null;
3092
+ last_token_test_error?: string | null;
3093
+ last_token_test_ok?: boolean | null;
3037
3094
  updated_at?: string;
3038
3095
  };
3039
3096
  Relationships: [];
@@ -3266,6 +3323,54 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
3266
3323
  referencedColumns: ["id"];
3267
3324
  }];
3268
3325
  };
3326
+ floriday_auto_fulfillment_log: {
3327
+ Row: {
3328
+ attempts: number;
3329
+ connection_id: string;
3330
+ created_at: string;
3331
+ error: string | null;
3332
+ fulfillment_order_id: string | null;
3333
+ id: string;
3334
+ last_attempt_at: string | null;
3335
+ reason: string | null;
3336
+ sales_order_id: string;
3337
+ status: string;
3338
+ updated_at: string;
3339
+ };
3340
+ Insert: {
3341
+ attempts?: number;
3342
+ connection_id: string;
3343
+ created_at?: string;
3344
+ error?: string | null;
3345
+ fulfillment_order_id?: string | null;
3346
+ id?: string;
3347
+ last_attempt_at?: string | null;
3348
+ reason?: string | null;
3349
+ sales_order_id: string;
3350
+ status?: string;
3351
+ updated_at?: string;
3352
+ };
3353
+ Update: {
3354
+ attempts?: number;
3355
+ connection_id?: string;
3356
+ created_at?: string;
3357
+ error?: string | null;
3358
+ fulfillment_order_id?: string | null;
3359
+ id?: string;
3360
+ last_attempt_at?: string | null;
3361
+ reason?: string | null;
3362
+ sales_order_id?: string;
3363
+ status?: string;
3364
+ updated_at?: string;
3365
+ };
3366
+ Relationships: [{
3367
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
3368
+ columns: ["connection_id"];
3369
+ isOneToOne: false;
3370
+ referencedRelation: "floriday_connections";
3371
+ referencedColumns: ["id"];
3372
+ }];
3373
+ };
3269
3374
  floriday_base_items_cache: {
3270
3375
  Row: {
3271
3376
  connection_id: string;
@@ -4370,6 +4475,24 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
4370
4475
  referencedColumns: ["id"];
4371
4476
  }];
4372
4477
  };
4478
+ floriday_rate_limit_state: {
4479
+ Row: {
4480
+ bucket: string;
4481
+ last_refill_at: string;
4482
+ tokens: number;
4483
+ };
4484
+ Insert: {
4485
+ bucket: string;
4486
+ last_refill_at?: string;
4487
+ tokens: number;
4488
+ };
4489
+ Update: {
4490
+ bucket?: string;
4491
+ last_refill_at?: string;
4492
+ tokens?: number;
4493
+ };
4494
+ Relationships: [];
4495
+ };
4373
4496
  floriday_resource_schemas: {
4374
4497
  Row: {
4375
4498
  enums: import("../integrations/supabase/types").Json;
@@ -4793,6 +4916,60 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
4793
4916
  referencedColumns: ["id"];
4794
4917
  }];
4795
4918
  };
4919
+ flow_role_assignments: {
4920
+ Row: {
4921
+ created_at: string;
4922
+ id: string;
4923
+ role_id: string;
4924
+ user_id: string;
4925
+ };
4926
+ Insert: {
4927
+ created_at?: string;
4928
+ id?: string;
4929
+ role_id: string;
4930
+ user_id: string;
4931
+ };
4932
+ Update: {
4933
+ created_at?: string;
4934
+ id?: string;
4935
+ role_id?: string;
4936
+ user_id?: string;
4937
+ };
4938
+ Relationships: [{
4939
+ foreignKeyName: "flow_role_assignments_role_id_fkey";
4940
+ columns: ["role_id"];
4941
+ isOneToOne: false;
4942
+ referencedRelation: "flow_roles";
4943
+ referencedColumns: ["id"];
4944
+ }];
4945
+ };
4946
+ flow_roles: {
4947
+ Row: {
4948
+ created_at: string;
4949
+ description: string | null;
4950
+ id: string;
4951
+ module_access: string[];
4952
+ name: string;
4953
+ updated_at: string;
4954
+ };
4955
+ Insert: {
4956
+ created_at?: string;
4957
+ description?: string | null;
4958
+ id?: string;
4959
+ module_access?: string[];
4960
+ name: string;
4961
+ updated_at?: string;
4962
+ };
4963
+ Update: {
4964
+ created_at?: string;
4965
+ description?: string | null;
4966
+ id?: string;
4967
+ module_access?: string[];
4968
+ name?: string;
4969
+ updated_at?: string;
4970
+ };
4971
+ Relationships: [];
4972
+ };
4796
4973
  imap_accounts: {
4797
4974
  Row: {
4798
4975
  created_at: string;
@@ -5424,6 +5601,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
5424
5601
  matched_customer_id: string | null;
5425
5602
  message_id: string;
5426
5603
  notes: string | null;
5604
+ order_number: string | null;
5427
5605
  parsed_payload: import("../integrations/supabase/types").Json | null;
5428
5606
  reviewed_at: string | null;
5429
5607
  reviewed_by: string | null;
@@ -5439,6 +5617,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
5439
5617
  matched_customer_id?: string | null;
5440
5618
  message_id: string;
5441
5619
  notes?: string | null;
5620
+ order_number?: string | null;
5442
5621
  parsed_payload?: import("../integrations/supabase/types").Json | null;
5443
5622
  reviewed_at?: string | null;
5444
5623
  reviewed_by?: string | null;
@@ -5454,6 +5633,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
5454
5633
  matched_customer_id?: string | null;
5455
5634
  message_id?: string;
5456
5635
  notes?: string | null;
5636
+ order_number?: string | null;
5457
5637
  parsed_payload?: import("../integrations/supabase/types").Json | null;
5458
5638
  reviewed_at?: string | null;
5459
5639
  reviewed_by?: string | null;
@@ -6310,6 +6490,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
6310
6490
  id: string;
6311
6491
  items: import("../integrations/supabase/types").Json;
6312
6492
  notes: string | null;
6493
+ order_number: string | null;
6313
6494
  recipient_id: string;
6314
6495
  total_amount: number;
6315
6496
  };
@@ -6323,6 +6504,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
6323
6504
  id?: string;
6324
6505
  items?: import("../integrations/supabase/types").Json;
6325
6506
  notes?: string | null;
6507
+ order_number?: string | null;
6326
6508
  recipient_id: string;
6327
6509
  total_amount?: number;
6328
6510
  };
@@ -6336,6 +6518,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
6336
6518
  id?: string;
6337
6519
  items?: import("../integrations/supabase/types").Json;
6338
6520
  notes?: string | null;
6521
+ order_number?: string | null;
6339
6522
  recipient_id?: string;
6340
6523
  total_amount?: number;
6341
6524
  };
@@ -6495,6 +6678,9 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
6495
6678
  crates_per_layer: number;
6496
6679
  created_at: string;
6497
6680
  id: string;
6681
+ layer_fraction: number;
6682
+ layer_share_pct: number;
6683
+ layers_per_cart: number;
6498
6684
  order_item_id: string | null;
6499
6685
  plants_per_crate: number;
6500
6686
  product_id: string | null;
@@ -6506,6 +6692,9 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
6506
6692
  crates_per_layer?: number;
6507
6693
  created_at?: string;
6508
6694
  id?: string;
6695
+ layer_fraction?: number;
6696
+ layer_share_pct?: number;
6697
+ layers_per_cart?: number;
6509
6698
  order_item_id?: string | null;
6510
6699
  plants_per_crate?: number;
6511
6700
  product_id?: string | null;
@@ -6517,6 +6706,9 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
6517
6706
  crates_per_layer?: number;
6518
6707
  created_at?: string;
6519
6708
  id?: string;
6709
+ layer_fraction?: number;
6710
+ layer_share_pct?: number;
6711
+ layers_per_cart?: number;
6520
6712
  order_item_id?: string | null;
6521
6713
  plants_per_crate?: number;
6522
6714
  product_id?: string | null;
@@ -6544,33 +6736,45 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
6544
6736
  };
6545
6737
  order_carts: {
6546
6738
  Row: {
6739
+ algorithm_version: number;
6547
6740
  cart_number: number;
6548
6741
  created_at: string;
6549
6742
  id: string;
6550
6743
  is_auto: boolean;
6551
6744
  is_complete: boolean;
6552
6745
  notes: string | null;
6746
+ occupancy_pct: number;
6553
6747
  order_id: string;
6748
+ source: string;
6749
+ total_layers_used: number;
6554
6750
  updated_at: string;
6555
6751
  };
6556
6752
  Insert: {
6753
+ algorithm_version?: number;
6557
6754
  cart_number: number;
6558
6755
  created_at?: string;
6559
6756
  id?: string;
6560
6757
  is_auto?: boolean;
6561
6758
  is_complete?: boolean;
6562
6759
  notes?: string | null;
6760
+ occupancy_pct?: number;
6563
6761
  order_id: string;
6762
+ source?: string;
6763
+ total_layers_used?: number;
6564
6764
  updated_at?: string;
6565
6765
  };
6566
6766
  Update: {
6767
+ algorithm_version?: number;
6567
6768
  cart_number?: number;
6568
6769
  created_at?: string;
6569
6770
  id?: string;
6570
6771
  is_auto?: boolean;
6571
6772
  is_complete?: boolean;
6572
6773
  notes?: string | null;
6774
+ occupancy_pct?: number;
6573
6775
  order_id?: string;
6776
+ source?: string;
6777
+ total_layers_used?: number;
6574
6778
  updated_at?: string;
6575
6779
  };
6576
6780
  Relationships: [{
@@ -6723,6 +6927,8 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
6723
6927
  order_date: string;
6724
6928
  order_number: string;
6725
6929
  order_source: string;
6930
+ plan_locked_at: string | null;
6931
+ plan_locked_ref: string | null;
6726
6932
  status: string;
6727
6933
  total: string;
6728
6934
  updated_at: string;
@@ -6739,6 +6945,8 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
6739
6945
  order_date?: string;
6740
6946
  order_number: string;
6741
6947
  order_source?: string;
6948
+ plan_locked_at?: string | null;
6949
+ plan_locked_ref?: string | null;
6742
6950
  status?: string;
6743
6951
  total?: string;
6744
6952
  updated_at?: string;
@@ -6755,6 +6963,8 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
6755
6963
  order_date?: string;
6756
6964
  order_number?: string;
6757
6965
  order_source?: string;
6966
+ plan_locked_at?: string | null;
6967
+ plan_locked_ref?: string | null;
6758
6968
  status?: string;
6759
6969
  total?: string;
6760
6970
  updated_at?: string;
@@ -7127,6 +7337,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
7127
7337
  display_name: string | null;
7128
7338
  email: string | null;
7129
7339
  id: string;
7340
+ is_superadmin: boolean;
7130
7341
  notification_preferences: import("../integrations/supabase/types").Json;
7131
7342
  tenant_id: string | null;
7132
7343
  updated_at: string;
@@ -7136,6 +7347,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
7136
7347
  display_name?: string | null;
7137
7348
  email?: string | null;
7138
7349
  id: string;
7350
+ is_superadmin?: boolean;
7139
7351
  notification_preferences?: import("../integrations/supabase/types").Json;
7140
7352
  tenant_id?: string | null;
7141
7353
  updated_at?: string;
@@ -7145,6 +7357,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
7145
7357
  display_name?: string | null;
7146
7358
  email?: string | null;
7147
7359
  id?: string;
7360
+ is_superadmin?: boolean;
7148
7361
  notification_preferences?: import("../integrations/supabase/types").Json;
7149
7362
  tenant_id?: string | null;
7150
7363
  updated_at?: string;
@@ -7934,6 +8147,24 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
7934
8147
  };
7935
8148
  Relationships: [];
7936
8149
  };
8150
+ sidebar_config: {
8151
+ Row: {
8152
+ id: string;
8153
+ module_order: string[];
8154
+ updated_at: string;
8155
+ };
8156
+ Insert: {
8157
+ id?: string;
8158
+ module_order?: string[];
8159
+ updated_at?: string;
8160
+ };
8161
+ Update: {
8162
+ id?: string;
8163
+ module_order?: string[];
8164
+ updated_at?: string;
8165
+ };
8166
+ Relationships: [];
8167
+ };
7937
8168
  stock_import_runs: {
7938
8169
  Row: {
7939
8170
  connection_id: string | null;
@@ -7992,7 +8223,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
7992
8223
  reason: string | null;
7993
8224
  reserved_after: number | null;
7994
8225
  reserved_before: number | null;
7995
- trade_item_key: string;
8226
+ trade_item_key: string | null;
7996
8227
  };
7997
8228
  Insert: {
7998
8229
  connection_id?: string | null;
@@ -8009,7 +8240,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
8009
8240
  reason?: string | null;
8010
8241
  reserved_after?: number | null;
8011
8242
  reserved_before?: number | null;
8012
- trade_item_key: string;
8243
+ trade_item_key?: string | null;
8013
8244
  };
8014
8245
  Update: {
8015
8246
  connection_id?: string | null;
@@ -8026,7 +8257,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
8026
8257
  reason?: string | null;
8027
8258
  reserved_after?: number | null;
8028
8259
  reserved_before?: number | null;
8029
- trade_item_key?: string;
8260
+ trade_item_key?: string | null;
8030
8261
  };
8031
8262
  Relationships: [];
8032
8263
  };
@@ -8369,6 +8600,114 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
8369
8600
  };
8370
8601
  Relationships: [];
8371
8602
  };
8603
+ trade_item_supply_lines: {
8604
+ Row: {
8605
+ available_quantity: number | null;
8606
+ connection_id: string;
8607
+ created_at: string;
8608
+ currency: string | null;
8609
+ endpoint_family: string | null;
8610
+ environment: string | null;
8611
+ id: string;
8612
+ last_error: string | null;
8613
+ last_status: number | null;
8614
+ packing_configuration_id: string | null;
8615
+ period_end: string | null;
8616
+ period_start: string | null;
8617
+ price_per_piece: number | null;
8618
+ sales_unit: string | null;
8619
+ supply_line_id: string | null;
8620
+ supply_type: string;
8621
+ trade_item_id: string;
8622
+ updated_at: string;
8623
+ user_id: string;
8624
+ week: number | null;
8625
+ year: number | null;
8626
+ };
8627
+ Insert: {
8628
+ available_quantity?: number | null;
8629
+ connection_id: string;
8630
+ created_at?: string;
8631
+ currency?: string | null;
8632
+ endpoint_family?: string | null;
8633
+ environment?: string | null;
8634
+ id?: string;
8635
+ last_error?: string | null;
8636
+ last_status?: number | null;
8637
+ packing_configuration_id?: string | null;
8638
+ period_end?: string | null;
8639
+ period_start?: string | null;
8640
+ price_per_piece?: number | null;
8641
+ sales_unit?: string | null;
8642
+ supply_line_id?: string | null;
8643
+ supply_type?: string;
8644
+ trade_item_id: string;
8645
+ updated_at?: string;
8646
+ user_id: string;
8647
+ week?: number | null;
8648
+ year?: number | null;
8649
+ };
8650
+ Update: {
8651
+ available_quantity?: number | null;
8652
+ connection_id?: string;
8653
+ created_at?: string;
8654
+ currency?: string | null;
8655
+ endpoint_family?: string | null;
8656
+ environment?: string | null;
8657
+ id?: string;
8658
+ last_error?: string | null;
8659
+ last_status?: number | null;
8660
+ packing_configuration_id?: string | null;
8661
+ period_end?: string | null;
8662
+ period_start?: string | null;
8663
+ price_per_piece?: number | null;
8664
+ sales_unit?: string | null;
8665
+ supply_line_id?: string | null;
8666
+ supply_type?: string;
8667
+ trade_item_id?: string;
8668
+ updated_at?: string;
8669
+ user_id?: string;
8670
+ week?: number | null;
8671
+ year?: number | null;
8672
+ };
8673
+ Relationships: [];
8674
+ };
8675
+ trade_item_warehouse_preferences: {
8676
+ Row: {
8677
+ connection_id: string;
8678
+ created_at: string;
8679
+ id: string;
8680
+ trade_item_id: string;
8681
+ updated_at: string;
8682
+ warehouse_id: string;
8683
+ warehouse_name: string | null;
8684
+ };
8685
+ Insert: {
8686
+ connection_id: string;
8687
+ created_at?: string;
8688
+ id?: string;
8689
+ trade_item_id: string;
8690
+ updated_at?: string;
8691
+ warehouse_id: string;
8692
+ warehouse_name?: string | null;
8693
+ };
8694
+ Update: {
8695
+ connection_id?: string;
8696
+ created_at?: string;
8697
+ id?: string;
8698
+ trade_item_id?: string;
8699
+ updated_at?: string;
8700
+ warehouse_id?: string;
8701
+ warehouse_name?: string | null;
8702
+ };
8703
+ Relationships: [{
8704
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
8705
+ columns: ["connection_id"];
8706
+ isOneToOne: false;
8707
+ referencedRelation: "floriday_connections";
8708
+ referencedColumns: ["id"];
8709
+ }];
8710
+ };
8372
8711
  twinfield_connections: {
8373
8712
  Row: {
8374
8713
  access_token: string | null;
@@ -8688,6 +9027,10 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
8688
9027
  default_invoice_type: string;
8689
9028
  default_payment_term_days: number;
8690
9029
  default_vat_code: string;
9030
+ invoice_enabled_ao: boolean;
9031
+ invoice_enabled_fo: boolean;
9032
+ invoice_enabled_ho: boolean;
9033
+ invoice_enabled_mo: boolean;
8691
9034
  updated_at: string;
8692
9035
  user_id: string;
8693
9036
  };
@@ -8697,6 +9040,10 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
8697
9040
  default_invoice_type?: string;
8698
9041
  default_payment_term_days?: number;
8699
9042
  default_vat_code?: string;
9043
+ invoice_enabled_ao?: boolean;
9044
+ invoice_enabled_fo?: boolean;
9045
+ invoice_enabled_ho?: boolean;
9046
+ invoice_enabled_mo?: boolean;
8700
9047
  updated_at?: string;
8701
9048
  user_id: string;
8702
9049
  };
@@ -8706,6 +9053,10 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
8706
9053
  default_invoice_type?: string;
8707
9054
  default_payment_term_days?: number;
8708
9055
  default_vat_code?: string;
9056
+ invoice_enabled_ao?: boolean;
9057
+ invoice_enabled_fo?: boolean;
9058
+ invoice_enabled_ho?: boolean;
9059
+ invoice_enabled_mo?: boolean;
8709
9060
  updated_at?: string;
8710
9061
  user_id?: string;
8711
9062
  };
@@ -10000,6 +10351,12 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
10000
10351
  order_number: string;
10001
10352
  }[];
10002
10353
  };
10354
+ autolink_product_to_floriday: {
10355
+ Args: {
10356
+ p_product_id: string;
10357
+ };
10358
+ Returns: string;
10359
+ };
10003
10360
  backfill_open_order_reservations: {
10004
10361
  Args: never;
10005
10362
  Returns: {
@@ -10038,6 +10395,18 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
10038
10395
  Args: never;
10039
10396
  Returns: number;
10040
10397
  };
10398
+ consume_floriday_rate_limit: {
10399
+ Args: {
10400
+ p_bucket: string;
10401
+ p_capacity: number;
10402
+ p_cost?: number;
10403
+ p_refill_per_sec: number;
10404
+ };
10405
+ Returns: {
10406
+ granted: boolean;
10407
+ wait_ms: number;
10408
+ }[];
10409
+ };
10041
10410
  control_get_todays_carts: {
10042
10411
  Args: never;
10043
10412
  Returns: {
@@ -10118,6 +10487,12 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
10118
10487
  status: string;
10119
10488
  }[];
10120
10489
  };
10490
+ enqueue_cart_replan_if_unlocked: {
10491
+ Args: {
10492
+ p_order_id: string;
10493
+ };
10494
+ Returns: undefined;
10495
+ };
10121
10496
  ensure_trade_item_stock_row: {
10122
10497
  Args: {
10123
10498
  p_key: string;
@@ -10224,6 +10599,13 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
10224
10599
  office_code: string;
10225
10600
  }[];
10226
10601
  };
10602
+ get_floricode_record_counts: {
10603
+ Args: never;
10604
+ Returns: {
10605
+ count: number;
10606
+ resource: string;
10607
+ }[];
10608
+ };
10227
10609
  get_floriday_agreements_active: {
10228
10610
  Args: {
10229
10611
  p_on_date?: string;
@@ -10315,6 +10697,12 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
10315
10697
  };
10316
10698
  Returns: import("../integrations/supabase/types").Json;
10317
10699
  };
10700
+ get_offer_delivery_options: {
10701
+ Args: {
10702
+ p_code: string;
10703
+ };
10704
+ Returns: import("../integrations/supabase/types").Json;
10705
+ };
10318
10706
  get_offer_recipient_by_code: {
10319
10707
  Args: {
10320
10708
  p_code: string;
@@ -10379,6 +10767,12 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
10379
10767
  Args: never;
10380
10768
  Returns: boolean;
10381
10769
  };
10770
+ is_superadmin: {
10771
+ Args: {
10772
+ _user_id: string;
10773
+ };
10774
+ Returns: boolean;
10775
+ };
10382
10776
  local_effective_price: {
10383
10777
  Args: {
10384
10778
  _customer_id: string;
@@ -10413,6 +10807,13 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
10413
10807
  };
10414
10808
  Returns: string;
10415
10809
  };
10810
+ next_order_number_for_date: {
10811
+ Args: {
10812
+ p_created_at?: string;
10813
+ p_prefix: string;
10814
+ };
10815
+ Returns: string;
10816
+ };
10416
10817
  next_work_order_number: {
10417
10818
  Args: {
10418
10819
  p_parent_work_order_id?: string;
@@ -10420,6 +10821,12 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
10420
10821
  };
10421
10822
  Returns: string;
10422
10823
  };
10824
+ normalize_order_source: {
10825
+ Args: {
10826
+ p_src: string;
10827
+ };
10828
+ Returns: string;
10829
+ };
10423
10830
  normalize_vat: {
10424
10831
  Args: {
10425
10832
  v: string;
@@ -10434,10 +10841,21 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
10434
10841
  };
10435
10842
  Returns: boolean;
10436
10843
  };
10844
+ order_number_prefix: {
10845
+ Args: {
10846
+ p_custom_fields?: import("../integrations/supabase/types").Json;
10847
+ p_order_source: string;
10848
+ };
10849
+ Returns: string;
10850
+ };
10437
10851
  pickstation_get_orders_raw: {
10438
10852
  Args: never;
10439
10853
  Returns: import("../integrations/supabase/types").Json;
10440
10854
  };
10855
+ pickstation_get_planning_context: {
10856
+ Args: never;
10857
+ Returns: import("../integrations/supabase/types").Json;
10858
+ };
10441
10859
  pickstation_get_settings: {
10442
10860
  Args: never;
10443
10861
  Returns: import("../integrations/supabase/types").Json;
@@ -10468,6 +10886,28 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
10468
10886
  };
10469
10887
  Returns: undefined;
10470
10888
  };
10889
+ recompute_order_status: {
10890
+ Args: {
10891
+ p_order_id: string;
10892
+ };
10893
+ Returns: undefined;
10894
+ };
10895
+ recompute_reserved_for_order: {
10896
+ Args: {
10897
+ p_order_id: string;
10898
+ };
10899
+ Returns: undefined;
10900
+ };
10901
+ recompute_reserved_stock: {
10902
+ Args: {
10903
+ p_trade_item_key: string;
10904
+ };
10905
+ Returns: undefined;
10906
+ };
10907
+ refresh_external_customers_grouped: {
10908
+ Args: never;
10909
+ Returns: undefined;
10910
+ };
10471
10911
  refresh_floricode_derived_code_lists: {
10472
10912
  Args: never;
10473
10913
  Returns: {
@@ -10482,6 +10922,12 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
10482
10922
  };
10483
10923
  Returns: number;
10484
10924
  };
10925
+ refresh_floricode_derived_for_products: {
10926
+ Args: {
10927
+ _product_ids: string[];
10928
+ };
10929
+ Returns: number;
10930
+ };
10485
10931
  reset_floriday_sync_cursor: {
10486
10932
  Args: {
10487
10933
  p_connection_id: string;
@@ -10489,6 +10935,12 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
10489
10935
  };
10490
10936
  Returns: undefined;
10491
10937
  };
10938
+ resolve_product_id_for_item: {
10939
+ Args: {
10940
+ p_product_name: string;
10941
+ };
10942
+ Returns: string;
10943
+ };
10492
10944
  schedule_floriday_additional_services_sync: {
10493
10945
  Args: {
10494
10946
  p_apikey: string;
@@ -10766,6 +11218,24 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
10766
11218
  };
10767
11219
  Returns: string[];
10768
11220
  };
11221
+ sync_cached_packing_from_product: {
11222
+ Args: {
11223
+ p_product_id: string;
11224
+ };
11225
+ Returns: undefined;
11226
+ };
11227
+ sync_order_cart_item_packing_from_product: {
11228
+ Args: {
11229
+ p_product_id: string;
11230
+ };
11231
+ Returns: undefined;
11232
+ };
11233
+ sync_product_packing_from_floriday_cache: {
11234
+ Args: {
11235
+ p_floriday_id: string;
11236
+ };
11237
+ Returns: undefined;
11238
+ };
10769
11239
  twinfield_decrypt: {
10770
11240
  Args: {
10771
11241
  cipher: string;
@@ -10778,6 +11248,17 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
10778
11248
  };
10779
11249
  Returns: string;
10780
11250
  };
11251
+ upsert_auto_fulfillment_log: {
11252
+ Args: {
11253
+ p_connection_id: string;
11254
+ p_error?: string;
11255
+ p_fulfillment_order_id?: string;
11256
+ p_reason?: string;
11257
+ p_sales_order_id: string;
11258
+ p_status: string;
11259
+ };
11260
+ Returns: undefined;
11261
+ };
10781
11262
  };
10782
11263
  Enums: {
10783
11264
  app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
@@ -10799,7 +11280,10 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
10799
11280
  Tables: {
10800
11281
  afhandeling_settings: {
10801
11282
  Row: {
11283
+ auto_print_delivery_note: boolean;
11284
+ auto_process_paused: boolean;
10802
11285
  created_at: string;
11286
+ extra_pick_days_with_stickers: number;
10803
11287
  id: string;
10804
11288
  max_workdays_earlier_pick: number;
10805
11289
  pick_days_before_transport: number;
@@ -10813,7 +11297,10 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
10813
11297
  user_id: string;
10814
11298
  };
10815
11299
  Insert: {
11300
+ auto_print_delivery_note?: boolean;
11301
+ auto_process_paused?: boolean;
10816
11302
  created_at?: string;
11303
+ extra_pick_days_with_stickers?: number;
10817
11304
  id?: string;
10818
11305
  max_workdays_earlier_pick?: number;
10819
11306
  pick_days_before_transport?: number;
@@ -10827,7 +11314,10 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
10827
11314
  user_id: string;
10828
11315
  };
10829
11316
  Update: {
11317
+ auto_print_delivery_note?: boolean;
11318
+ auto_process_paused?: boolean;
10830
11319
  created_at?: string;
11320
+ extra_pick_days_with_stickers?: number;
10831
11321
  id?: string;
10832
11322
  max_workdays_earlier_pick?: number;
10833
11323
  pick_days_before_transport?: number;
@@ -11619,6 +12109,36 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
11619
12109
  };
11620
12110
  Relationships: [];
11621
12111
  };
12112
+ cart_replan_queue: {
12113
+ Row: {
12114
+ attempts: number;
12115
+ last_error: string | null;
12116
+ order_id: string;
12117
+ processed_at: string | null;
12118
+ requested_at: string;
12119
+ };
12120
+ Insert: {
12121
+ attempts?: number;
12122
+ last_error?: string | null;
12123
+ order_id: string;
12124
+ processed_at?: string | null;
12125
+ requested_at?: string;
12126
+ };
12127
+ Update: {
12128
+ attempts?: number;
12129
+ last_error?: string | null;
12130
+ order_id?: string;
12131
+ processed_at?: string | null;
12132
+ requested_at?: string;
12133
+ };
12134
+ Relationships: [{
12135
+ foreignKeyName: "cart_replan_queue_order_id_fkey";
12136
+ columns: ["order_id"];
12137
+ isOneToOne: true;
12138
+ referencedRelation: "orders";
12139
+ referencedColumns: ["id"];
12140
+ }];
12141
+ };
11622
12142
  collections: {
11623
12143
  Row: {
11624
12144
  created_at: string;
@@ -13744,34 +14264,52 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
13744
14264
  Row: {
13745
14265
  catalog_key: string | null;
13746
14266
  catalog_url: string;
14267
+ client_id: string | null;
14268
+ client_secret_ciphertext: string | null;
14269
+ client_secret_last4: string | null;
13747
14270
  created_at: string;
13748
14271
  id: number;
13749
14272
  last_meta: import("../integrations/supabase/types").Json | null;
13750
14273
  last_test_at: string | null;
13751
14274
  last_test_error: string | null;
13752
14275
  last_test_ok: boolean | null;
14276
+ last_token_test_at: string | null;
14277
+ last_token_test_error: string | null;
14278
+ last_token_test_ok: boolean | null;
13753
14279
  updated_at: string;
13754
14280
  };
13755
14281
  Insert: {
13756
14282
  catalog_key?: string | null;
13757
14283
  catalog_url?: string;
14284
+ client_id?: string | null;
14285
+ client_secret_ciphertext?: string | null;
14286
+ client_secret_last4?: string | null;
13758
14287
  created_at?: string;
13759
14288
  id?: number;
13760
14289
  last_meta?: import("../integrations/supabase/types").Json | null;
13761
14290
  last_test_at?: string | null;
13762
14291
  last_test_error?: string | null;
13763
14292
  last_test_ok?: boolean | null;
14293
+ last_token_test_at?: string | null;
14294
+ last_token_test_error?: string | null;
14295
+ last_token_test_ok?: boolean | null;
13764
14296
  updated_at?: string;
13765
14297
  };
13766
14298
  Update: {
13767
14299
  catalog_key?: string | null;
13768
14300
  catalog_url?: string;
14301
+ client_id?: string | null;
14302
+ client_secret_ciphertext?: string | null;
14303
+ client_secret_last4?: string | null;
13769
14304
  created_at?: string;
13770
14305
  id?: number;
13771
14306
  last_meta?: import("../integrations/supabase/types").Json | null;
13772
14307
  last_test_at?: string | null;
13773
14308
  last_test_error?: string | null;
13774
14309
  last_test_ok?: boolean | null;
14310
+ last_token_test_at?: string | null;
14311
+ last_token_test_error?: string | null;
14312
+ last_token_test_ok?: boolean | null;
13775
14313
  updated_at?: string;
13776
14314
  };
13777
14315
  Relationships: [];
@@ -14004,6 +14542,54 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
14004
14542
  referencedColumns: ["id"];
14005
14543
  }];
14006
14544
  };
14545
+ floriday_auto_fulfillment_log: {
14546
+ Row: {
14547
+ attempts: number;
14548
+ connection_id: string;
14549
+ created_at: string;
14550
+ error: string | null;
14551
+ fulfillment_order_id: string | null;
14552
+ id: string;
14553
+ last_attempt_at: string | null;
14554
+ reason: string | null;
14555
+ sales_order_id: string;
14556
+ status: string;
14557
+ updated_at: string;
14558
+ };
14559
+ Insert: {
14560
+ attempts?: number;
14561
+ connection_id: string;
14562
+ created_at?: string;
14563
+ error?: string | null;
14564
+ fulfillment_order_id?: string | null;
14565
+ id?: string;
14566
+ last_attempt_at?: string | null;
14567
+ reason?: string | null;
14568
+ sales_order_id: string;
14569
+ status?: string;
14570
+ updated_at?: string;
14571
+ };
14572
+ Update: {
14573
+ attempts?: number;
14574
+ connection_id?: string;
14575
+ created_at?: string;
14576
+ error?: string | null;
14577
+ fulfillment_order_id?: string | null;
14578
+ id?: string;
14579
+ last_attempt_at?: string | null;
14580
+ reason?: string | null;
14581
+ sales_order_id?: string;
14582
+ status?: string;
14583
+ updated_at?: string;
14584
+ };
14585
+ Relationships: [{
14586
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
14587
+ columns: ["connection_id"];
14588
+ isOneToOne: false;
14589
+ referencedRelation: "floriday_connections";
14590
+ referencedColumns: ["id"];
14591
+ }];
14592
+ };
14007
14593
  floriday_base_items_cache: {
14008
14594
  Row: {
14009
14595
  connection_id: string;
@@ -15108,6 +15694,24 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
15108
15694
  referencedColumns: ["id"];
15109
15695
  }];
15110
15696
  };
15697
+ floriday_rate_limit_state: {
15698
+ Row: {
15699
+ bucket: string;
15700
+ last_refill_at: string;
15701
+ tokens: number;
15702
+ };
15703
+ Insert: {
15704
+ bucket: string;
15705
+ last_refill_at?: string;
15706
+ tokens: number;
15707
+ };
15708
+ Update: {
15709
+ bucket?: string;
15710
+ last_refill_at?: string;
15711
+ tokens?: number;
15712
+ };
15713
+ Relationships: [];
15714
+ };
15111
15715
  floriday_resource_schemas: {
15112
15716
  Row: {
15113
15717
  enums: import("../integrations/supabase/types").Json;
@@ -15531,6 +16135,60 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
15531
16135
  referencedColumns: ["id"];
15532
16136
  }];
15533
16137
  };
16138
+ flow_role_assignments: {
16139
+ Row: {
16140
+ created_at: string;
16141
+ id: string;
16142
+ role_id: string;
16143
+ user_id: string;
16144
+ };
16145
+ Insert: {
16146
+ created_at?: string;
16147
+ id?: string;
16148
+ role_id: string;
16149
+ user_id: string;
16150
+ };
16151
+ Update: {
16152
+ created_at?: string;
16153
+ id?: string;
16154
+ role_id?: string;
16155
+ user_id?: string;
16156
+ };
16157
+ Relationships: [{
16158
+ foreignKeyName: "flow_role_assignments_role_id_fkey";
16159
+ columns: ["role_id"];
16160
+ isOneToOne: false;
16161
+ referencedRelation: "flow_roles";
16162
+ referencedColumns: ["id"];
16163
+ }];
16164
+ };
16165
+ flow_roles: {
16166
+ Row: {
16167
+ created_at: string;
16168
+ description: string | null;
16169
+ id: string;
16170
+ module_access: string[];
16171
+ name: string;
16172
+ updated_at: string;
16173
+ };
16174
+ Insert: {
16175
+ created_at?: string;
16176
+ description?: string | null;
16177
+ id?: string;
16178
+ module_access?: string[];
16179
+ name: string;
16180
+ updated_at?: string;
16181
+ };
16182
+ Update: {
16183
+ created_at?: string;
16184
+ description?: string | null;
16185
+ id?: string;
16186
+ module_access?: string[];
16187
+ name?: string;
16188
+ updated_at?: string;
16189
+ };
16190
+ Relationships: [];
16191
+ };
15534
16192
  imap_accounts: {
15535
16193
  Row: {
15536
16194
  created_at: string;
@@ -16162,6 +16820,7 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
16162
16820
  matched_customer_id: string | null;
16163
16821
  message_id: string;
16164
16822
  notes: string | null;
16823
+ order_number: string | null;
16165
16824
  parsed_payload: import("../integrations/supabase/types").Json | null;
16166
16825
  reviewed_at: string | null;
16167
16826
  reviewed_by: string | null;
@@ -16177,6 +16836,7 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
16177
16836
  matched_customer_id?: string | null;
16178
16837
  message_id: string;
16179
16838
  notes?: string | null;
16839
+ order_number?: string | null;
16180
16840
  parsed_payload?: import("../integrations/supabase/types").Json | null;
16181
16841
  reviewed_at?: string | null;
16182
16842
  reviewed_by?: string | null;
@@ -16192,6 +16852,7 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
16192
16852
  matched_customer_id?: string | null;
16193
16853
  message_id?: string;
16194
16854
  notes?: string | null;
16855
+ order_number?: string | null;
16195
16856
  parsed_payload?: import("../integrations/supabase/types").Json | null;
16196
16857
  reviewed_at?: string | null;
16197
16858
  reviewed_by?: string | null;
@@ -17048,6 +17709,7 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
17048
17709
  id: string;
17049
17710
  items: import("../integrations/supabase/types").Json;
17050
17711
  notes: string | null;
17712
+ order_number: string | null;
17051
17713
  recipient_id: string;
17052
17714
  total_amount: number;
17053
17715
  };
@@ -17061,6 +17723,7 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
17061
17723
  id?: string;
17062
17724
  items?: import("../integrations/supabase/types").Json;
17063
17725
  notes?: string | null;
17726
+ order_number?: string | null;
17064
17727
  recipient_id: string;
17065
17728
  total_amount?: number;
17066
17729
  };
@@ -17074,6 +17737,7 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
17074
17737
  id?: string;
17075
17738
  items?: import("../integrations/supabase/types").Json;
17076
17739
  notes?: string | null;
17740
+ order_number?: string | null;
17077
17741
  recipient_id?: string;
17078
17742
  total_amount?: number;
17079
17743
  };
@@ -17233,6 +17897,9 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
17233
17897
  crates_per_layer: number;
17234
17898
  created_at: string;
17235
17899
  id: string;
17900
+ layer_fraction: number;
17901
+ layer_share_pct: number;
17902
+ layers_per_cart: number;
17236
17903
  order_item_id: string | null;
17237
17904
  plants_per_crate: number;
17238
17905
  product_id: string | null;
@@ -17244,6 +17911,9 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
17244
17911
  crates_per_layer?: number;
17245
17912
  created_at?: string;
17246
17913
  id?: string;
17914
+ layer_fraction?: number;
17915
+ layer_share_pct?: number;
17916
+ layers_per_cart?: number;
17247
17917
  order_item_id?: string | null;
17248
17918
  plants_per_crate?: number;
17249
17919
  product_id?: string | null;
@@ -17255,6 +17925,9 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
17255
17925
  crates_per_layer?: number;
17256
17926
  created_at?: string;
17257
17927
  id?: string;
17928
+ layer_fraction?: number;
17929
+ layer_share_pct?: number;
17930
+ layers_per_cart?: number;
17258
17931
  order_item_id?: string | null;
17259
17932
  plants_per_crate?: number;
17260
17933
  product_id?: string | null;
@@ -17282,33 +17955,45 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
17282
17955
  };
17283
17956
  order_carts: {
17284
17957
  Row: {
17958
+ algorithm_version: number;
17285
17959
  cart_number: number;
17286
17960
  created_at: string;
17287
17961
  id: string;
17288
17962
  is_auto: boolean;
17289
17963
  is_complete: boolean;
17290
17964
  notes: string | null;
17965
+ occupancy_pct: number;
17291
17966
  order_id: string;
17967
+ source: string;
17968
+ total_layers_used: number;
17292
17969
  updated_at: string;
17293
17970
  };
17294
17971
  Insert: {
17972
+ algorithm_version?: number;
17295
17973
  cart_number: number;
17296
17974
  created_at?: string;
17297
17975
  id?: string;
17298
17976
  is_auto?: boolean;
17299
17977
  is_complete?: boolean;
17300
17978
  notes?: string | null;
17979
+ occupancy_pct?: number;
17301
17980
  order_id: string;
17981
+ source?: string;
17982
+ total_layers_used?: number;
17302
17983
  updated_at?: string;
17303
17984
  };
17304
17985
  Update: {
17986
+ algorithm_version?: number;
17305
17987
  cart_number?: number;
17306
17988
  created_at?: string;
17307
17989
  id?: string;
17308
17990
  is_auto?: boolean;
17309
17991
  is_complete?: boolean;
17310
17992
  notes?: string | null;
17993
+ occupancy_pct?: number;
17311
17994
  order_id?: string;
17995
+ source?: string;
17996
+ total_layers_used?: number;
17312
17997
  updated_at?: string;
17313
17998
  };
17314
17999
  Relationships: [{
@@ -17461,6 +18146,8 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
17461
18146
  order_date: string;
17462
18147
  order_number: string;
17463
18148
  order_source: string;
18149
+ plan_locked_at: string | null;
18150
+ plan_locked_ref: string | null;
17464
18151
  status: string;
17465
18152
  total: string;
17466
18153
  updated_at: string;
@@ -17477,6 +18164,8 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
17477
18164
  order_date?: string;
17478
18165
  order_number: string;
17479
18166
  order_source?: string;
18167
+ plan_locked_at?: string | null;
18168
+ plan_locked_ref?: string | null;
17480
18169
  status?: string;
17481
18170
  total?: string;
17482
18171
  updated_at?: string;
@@ -17493,6 +18182,8 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
17493
18182
  order_date?: string;
17494
18183
  order_number?: string;
17495
18184
  order_source?: string;
18185
+ plan_locked_at?: string | null;
18186
+ plan_locked_ref?: string | null;
17496
18187
  status?: string;
17497
18188
  total?: string;
17498
18189
  updated_at?: string;
@@ -17865,6 +18556,7 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
17865
18556
  display_name: string | null;
17866
18557
  email: string | null;
17867
18558
  id: string;
18559
+ is_superadmin: boolean;
17868
18560
  notification_preferences: import("../integrations/supabase/types").Json;
17869
18561
  tenant_id: string | null;
17870
18562
  updated_at: string;
@@ -17874,6 +18566,7 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
17874
18566
  display_name?: string | null;
17875
18567
  email?: string | null;
17876
18568
  id: string;
18569
+ is_superadmin?: boolean;
17877
18570
  notification_preferences?: import("../integrations/supabase/types").Json;
17878
18571
  tenant_id?: string | null;
17879
18572
  updated_at?: string;
@@ -17883,6 +18576,7 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
17883
18576
  display_name?: string | null;
17884
18577
  email?: string | null;
17885
18578
  id?: string;
18579
+ is_superadmin?: boolean;
17886
18580
  notification_preferences?: import("../integrations/supabase/types").Json;
17887
18581
  tenant_id?: string | null;
17888
18582
  updated_at?: string;
@@ -18672,6 +19366,24 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
18672
19366
  };
18673
19367
  Relationships: [];
18674
19368
  };
19369
+ sidebar_config: {
19370
+ Row: {
19371
+ id: string;
19372
+ module_order: string[];
19373
+ updated_at: string;
19374
+ };
19375
+ Insert: {
19376
+ id?: string;
19377
+ module_order?: string[];
19378
+ updated_at?: string;
19379
+ };
19380
+ Update: {
19381
+ id?: string;
19382
+ module_order?: string[];
19383
+ updated_at?: string;
19384
+ };
19385
+ Relationships: [];
19386
+ };
18675
19387
  stock_import_runs: {
18676
19388
  Row: {
18677
19389
  connection_id: string | null;
@@ -18730,7 +19442,7 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
18730
19442
  reason: string | null;
18731
19443
  reserved_after: number | null;
18732
19444
  reserved_before: number | null;
18733
- trade_item_key: string;
19445
+ trade_item_key: string | null;
18734
19446
  };
18735
19447
  Insert: {
18736
19448
  connection_id?: string | null;
@@ -18747,7 +19459,7 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
18747
19459
  reason?: string | null;
18748
19460
  reserved_after?: number | null;
18749
19461
  reserved_before?: number | null;
18750
- trade_item_key: string;
19462
+ trade_item_key?: string | null;
18751
19463
  };
18752
19464
  Update: {
18753
19465
  connection_id?: string | null;
@@ -18764,7 +19476,7 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
18764
19476
  reason?: string | null;
18765
19477
  reserved_after?: number | null;
18766
19478
  reserved_before?: number | null;
18767
- trade_item_key?: string;
19479
+ trade_item_key?: string | null;
18768
19480
  };
18769
19481
  Relationships: [];
18770
19482
  };
@@ -19107,6 +19819,114 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
19107
19819
  };
19108
19820
  Relationships: [];
19109
19821
  };
19822
+ trade_item_supply_lines: {
19823
+ Row: {
19824
+ available_quantity: number | null;
19825
+ connection_id: string;
19826
+ created_at: string;
19827
+ currency: string | null;
19828
+ endpoint_family: string | null;
19829
+ environment: string | null;
19830
+ id: string;
19831
+ last_error: string | null;
19832
+ last_status: number | null;
19833
+ packing_configuration_id: string | null;
19834
+ period_end: string | null;
19835
+ period_start: string | null;
19836
+ price_per_piece: number | null;
19837
+ sales_unit: string | null;
19838
+ supply_line_id: string | null;
19839
+ supply_type: string;
19840
+ trade_item_id: string;
19841
+ updated_at: string;
19842
+ user_id: string;
19843
+ week: number | null;
19844
+ year: number | null;
19845
+ };
19846
+ Insert: {
19847
+ available_quantity?: number | null;
19848
+ connection_id: string;
19849
+ created_at?: string;
19850
+ currency?: string | null;
19851
+ endpoint_family?: string | null;
19852
+ environment?: string | null;
19853
+ id?: string;
19854
+ last_error?: string | null;
19855
+ last_status?: number | null;
19856
+ packing_configuration_id?: string | null;
19857
+ period_end?: string | null;
19858
+ period_start?: string | null;
19859
+ price_per_piece?: number | null;
19860
+ sales_unit?: string | null;
19861
+ supply_line_id?: string | null;
19862
+ supply_type?: string;
19863
+ trade_item_id: string;
19864
+ updated_at?: string;
19865
+ user_id: string;
19866
+ week?: number | null;
19867
+ year?: number | null;
19868
+ };
19869
+ Update: {
19870
+ available_quantity?: number | null;
19871
+ connection_id?: string;
19872
+ created_at?: string;
19873
+ currency?: string | null;
19874
+ endpoint_family?: string | null;
19875
+ environment?: string | null;
19876
+ id?: string;
19877
+ last_error?: string | null;
19878
+ last_status?: number | null;
19879
+ packing_configuration_id?: string | null;
19880
+ period_end?: string | null;
19881
+ period_start?: string | null;
19882
+ price_per_piece?: number | null;
19883
+ sales_unit?: string | null;
19884
+ supply_line_id?: string | null;
19885
+ supply_type?: string;
19886
+ trade_item_id?: string;
19887
+ updated_at?: string;
19888
+ user_id?: string;
19889
+ week?: number | null;
19890
+ year?: number | null;
19891
+ };
19892
+ Relationships: [];
19893
+ };
19894
+ trade_item_warehouse_preferences: {
19895
+ Row: {
19896
+ connection_id: string;
19897
+ created_at: string;
19898
+ id: string;
19899
+ trade_item_id: string;
19900
+ updated_at: string;
19901
+ warehouse_id: string;
19902
+ warehouse_name: string | null;
19903
+ };
19904
+ Insert: {
19905
+ connection_id: string;
19906
+ created_at?: string;
19907
+ id?: string;
19908
+ trade_item_id: string;
19909
+ updated_at?: string;
19910
+ warehouse_id: string;
19911
+ warehouse_name?: string | null;
19912
+ };
19913
+ Update: {
19914
+ connection_id?: string;
19915
+ created_at?: string;
19916
+ id?: string;
19917
+ trade_item_id?: string;
19918
+ updated_at?: string;
19919
+ warehouse_id?: string;
19920
+ warehouse_name?: string | null;
19921
+ };
19922
+ Relationships: [{
19923
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
19924
+ columns: ["connection_id"];
19925
+ isOneToOne: false;
19926
+ referencedRelation: "floriday_connections";
19927
+ referencedColumns: ["id"];
19928
+ }];
19929
+ };
19110
19930
  twinfield_connections: {
19111
19931
  Row: {
19112
19932
  access_token: string | null;
@@ -19426,6 +20246,10 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
19426
20246
  default_invoice_type: string;
19427
20247
  default_payment_term_days: number;
19428
20248
  default_vat_code: string;
20249
+ invoice_enabled_ao: boolean;
20250
+ invoice_enabled_fo: boolean;
20251
+ invoice_enabled_ho: boolean;
20252
+ invoice_enabled_mo: boolean;
19429
20253
  updated_at: string;
19430
20254
  user_id: string;
19431
20255
  };
@@ -19435,6 +20259,10 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
19435
20259
  default_invoice_type?: string;
19436
20260
  default_payment_term_days?: number;
19437
20261
  default_vat_code?: string;
20262
+ invoice_enabled_ao?: boolean;
20263
+ invoice_enabled_fo?: boolean;
20264
+ invoice_enabled_ho?: boolean;
20265
+ invoice_enabled_mo?: boolean;
19438
20266
  updated_at?: string;
19439
20267
  user_id: string;
19440
20268
  };
@@ -19444,6 +20272,10 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
19444
20272
  default_invoice_type?: string;
19445
20273
  default_payment_term_days?: number;
19446
20274
  default_vat_code?: string;
20275
+ invoice_enabled_ao?: boolean;
20276
+ invoice_enabled_fo?: boolean;
20277
+ invoice_enabled_ho?: boolean;
20278
+ invoice_enabled_mo?: boolean;
19447
20279
  updated_at?: string;
19448
20280
  user_id?: string;
19449
20281
  };
@@ -20738,6 +21570,12 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
20738
21570
  order_number: string;
20739
21571
  }[];
20740
21572
  };
21573
+ autolink_product_to_floriday: {
21574
+ Args: {
21575
+ p_product_id: string;
21576
+ };
21577
+ Returns: string;
21578
+ };
20741
21579
  backfill_open_order_reservations: {
20742
21580
  Args: never;
20743
21581
  Returns: {
@@ -20776,6 +21614,18 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
20776
21614
  Args: never;
20777
21615
  Returns: number;
20778
21616
  };
21617
+ consume_floriday_rate_limit: {
21618
+ Args: {
21619
+ p_bucket: string;
21620
+ p_capacity: number;
21621
+ p_cost?: number;
21622
+ p_refill_per_sec: number;
21623
+ };
21624
+ Returns: {
21625
+ granted: boolean;
21626
+ wait_ms: number;
21627
+ }[];
21628
+ };
20779
21629
  control_get_todays_carts: {
20780
21630
  Args: never;
20781
21631
  Returns: {
@@ -20856,6 +21706,12 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
20856
21706
  status: string;
20857
21707
  }[];
20858
21708
  };
21709
+ enqueue_cart_replan_if_unlocked: {
21710
+ Args: {
21711
+ p_order_id: string;
21712
+ };
21713
+ Returns: undefined;
21714
+ };
20859
21715
  ensure_trade_item_stock_row: {
20860
21716
  Args: {
20861
21717
  p_key: string;
@@ -20962,6 +21818,13 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
20962
21818
  office_code: string;
20963
21819
  }[];
20964
21820
  };
21821
+ get_floricode_record_counts: {
21822
+ Args: never;
21823
+ Returns: {
21824
+ count: number;
21825
+ resource: string;
21826
+ }[];
21827
+ };
20965
21828
  get_floriday_agreements_active: {
20966
21829
  Args: {
20967
21830
  p_on_date?: string;
@@ -21053,6 +21916,12 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
21053
21916
  };
21054
21917
  Returns: import("../integrations/supabase/types").Json;
21055
21918
  };
21919
+ get_offer_delivery_options: {
21920
+ Args: {
21921
+ p_code: string;
21922
+ };
21923
+ Returns: import("../integrations/supabase/types").Json;
21924
+ };
21056
21925
  get_offer_recipient_by_code: {
21057
21926
  Args: {
21058
21927
  p_code: string;
@@ -21117,6 +21986,12 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
21117
21986
  Args: never;
21118
21987
  Returns: boolean;
21119
21988
  };
21989
+ is_superadmin: {
21990
+ Args: {
21991
+ _user_id: string;
21992
+ };
21993
+ Returns: boolean;
21994
+ };
21120
21995
  local_effective_price: {
21121
21996
  Args: {
21122
21997
  _customer_id: string;
@@ -21151,6 +22026,13 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
21151
22026
  };
21152
22027
  Returns: string;
21153
22028
  };
22029
+ next_order_number_for_date: {
22030
+ Args: {
22031
+ p_created_at?: string;
22032
+ p_prefix: string;
22033
+ };
22034
+ Returns: string;
22035
+ };
21154
22036
  next_work_order_number: {
21155
22037
  Args: {
21156
22038
  p_parent_work_order_id?: string;
@@ -21158,6 +22040,12 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
21158
22040
  };
21159
22041
  Returns: string;
21160
22042
  };
22043
+ normalize_order_source: {
22044
+ Args: {
22045
+ p_src: string;
22046
+ };
22047
+ Returns: string;
22048
+ };
21161
22049
  normalize_vat: {
21162
22050
  Args: {
21163
22051
  v: string;
@@ -21172,10 +22060,21 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
21172
22060
  };
21173
22061
  Returns: boolean;
21174
22062
  };
22063
+ order_number_prefix: {
22064
+ Args: {
22065
+ p_custom_fields?: import("../integrations/supabase/types").Json;
22066
+ p_order_source: string;
22067
+ };
22068
+ Returns: string;
22069
+ };
21175
22070
  pickstation_get_orders_raw: {
21176
22071
  Args: never;
21177
22072
  Returns: import("../integrations/supabase/types").Json;
21178
22073
  };
22074
+ pickstation_get_planning_context: {
22075
+ Args: never;
22076
+ Returns: import("../integrations/supabase/types").Json;
22077
+ };
21179
22078
  pickstation_get_settings: {
21180
22079
  Args: never;
21181
22080
  Returns: import("../integrations/supabase/types").Json;
@@ -21206,6 +22105,28 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
21206
22105
  };
21207
22106
  Returns: undefined;
21208
22107
  };
22108
+ recompute_order_status: {
22109
+ Args: {
22110
+ p_order_id: string;
22111
+ };
22112
+ Returns: undefined;
22113
+ };
22114
+ recompute_reserved_for_order: {
22115
+ Args: {
22116
+ p_order_id: string;
22117
+ };
22118
+ Returns: undefined;
22119
+ };
22120
+ recompute_reserved_stock: {
22121
+ Args: {
22122
+ p_trade_item_key: string;
22123
+ };
22124
+ Returns: undefined;
22125
+ };
22126
+ refresh_external_customers_grouped: {
22127
+ Args: never;
22128
+ Returns: undefined;
22129
+ };
21209
22130
  refresh_floricode_derived_code_lists: {
21210
22131
  Args: never;
21211
22132
  Returns: {
@@ -21220,6 +22141,12 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
21220
22141
  };
21221
22142
  Returns: number;
21222
22143
  };
22144
+ refresh_floricode_derived_for_products: {
22145
+ Args: {
22146
+ _product_ids: string[];
22147
+ };
22148
+ Returns: number;
22149
+ };
21223
22150
  reset_floriday_sync_cursor: {
21224
22151
  Args: {
21225
22152
  p_connection_id: string;
@@ -21227,6 +22154,12 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
21227
22154
  };
21228
22155
  Returns: undefined;
21229
22156
  };
22157
+ resolve_product_id_for_item: {
22158
+ Args: {
22159
+ p_product_name: string;
22160
+ };
22161
+ Returns: string;
22162
+ };
21230
22163
  schedule_floriday_additional_services_sync: {
21231
22164
  Args: {
21232
22165
  p_apikey: string;
@@ -21504,6 +22437,24 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
21504
22437
  };
21505
22438
  Returns: string[];
21506
22439
  };
22440
+ sync_cached_packing_from_product: {
22441
+ Args: {
22442
+ p_product_id: string;
22443
+ };
22444
+ Returns: undefined;
22445
+ };
22446
+ sync_order_cart_item_packing_from_product: {
22447
+ Args: {
22448
+ p_product_id: string;
22449
+ };
22450
+ Returns: undefined;
22451
+ };
22452
+ sync_product_packing_from_floriday_cache: {
22453
+ Args: {
22454
+ p_floriday_id: string;
22455
+ };
22456
+ Returns: undefined;
22457
+ };
21507
22458
  twinfield_decrypt: {
21508
22459
  Args: {
21509
22460
  cipher: string;
@@ -21516,6 +22467,17 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
21516
22467
  };
21517
22468
  Returns: string;
21518
22469
  };
22470
+ upsert_auto_fulfillment_log: {
22471
+ Args: {
22472
+ p_connection_id: string;
22473
+ p_error?: string;
22474
+ p_fulfillment_order_id?: string;
22475
+ p_reason?: string;
22476
+ p_sales_order_id: string;
22477
+ p_status: string;
22478
+ };
22479
+ Returns: undefined;
22480
+ };
21519
22481
  };
21520
22482
  Enums: {
21521
22483
  app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
@@ -21541,7 +22503,10 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
21541
22503
  Tables: {
21542
22504
  afhandeling_settings: {
21543
22505
  Row: {
22506
+ auto_print_delivery_note: boolean;
22507
+ auto_process_paused: boolean;
21544
22508
  created_at: string;
22509
+ extra_pick_days_with_stickers: number;
21545
22510
  id: string;
21546
22511
  max_workdays_earlier_pick: number;
21547
22512
  pick_days_before_transport: number;
@@ -21555,7 +22520,10 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
21555
22520
  user_id: string;
21556
22521
  };
21557
22522
  Insert: {
22523
+ auto_print_delivery_note?: boolean;
22524
+ auto_process_paused?: boolean;
21558
22525
  created_at?: string;
22526
+ extra_pick_days_with_stickers?: number;
21559
22527
  id?: string;
21560
22528
  max_workdays_earlier_pick?: number;
21561
22529
  pick_days_before_transport?: number;
@@ -21569,7 +22537,10 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
21569
22537
  user_id: string;
21570
22538
  };
21571
22539
  Update: {
22540
+ auto_print_delivery_note?: boolean;
22541
+ auto_process_paused?: boolean;
21572
22542
  created_at?: string;
22543
+ extra_pick_days_with_stickers?: number;
21573
22544
  id?: string;
21574
22545
  max_workdays_earlier_pick?: number;
21575
22546
  pick_days_before_transport?: number;
@@ -22361,6 +23332,36 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
22361
23332
  };
22362
23333
  Relationships: [];
22363
23334
  };
23335
+ cart_replan_queue: {
23336
+ Row: {
23337
+ attempts: number;
23338
+ last_error: string | null;
23339
+ order_id: string;
23340
+ processed_at: string | null;
23341
+ requested_at: string;
23342
+ };
23343
+ Insert: {
23344
+ attempts?: number;
23345
+ last_error?: string | null;
23346
+ order_id: string;
23347
+ processed_at?: string | null;
23348
+ requested_at?: string;
23349
+ };
23350
+ Update: {
23351
+ attempts?: number;
23352
+ last_error?: string | null;
23353
+ order_id?: string;
23354
+ processed_at?: string | null;
23355
+ requested_at?: string;
23356
+ };
23357
+ Relationships: [{
23358
+ foreignKeyName: "cart_replan_queue_order_id_fkey";
23359
+ columns: ["order_id"];
23360
+ isOneToOne: true;
23361
+ referencedRelation: "orders";
23362
+ referencedColumns: ["id"];
23363
+ }];
23364
+ };
22364
23365
  collections: {
22365
23366
  Row: {
22366
23367
  created_at: string;
@@ -24486,34 +25487,52 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
24486
25487
  Row: {
24487
25488
  catalog_key: string | null;
24488
25489
  catalog_url: string;
25490
+ client_id: string | null;
25491
+ client_secret_ciphertext: string | null;
25492
+ client_secret_last4: string | null;
24489
25493
  created_at: string;
24490
25494
  id: number;
24491
25495
  last_meta: import("../integrations/supabase/types").Json | null;
24492
25496
  last_test_at: string | null;
24493
25497
  last_test_error: string | null;
24494
25498
  last_test_ok: boolean | null;
25499
+ last_token_test_at: string | null;
25500
+ last_token_test_error: string | null;
25501
+ last_token_test_ok: boolean | null;
24495
25502
  updated_at: string;
24496
25503
  };
24497
25504
  Insert: {
24498
25505
  catalog_key?: string | null;
24499
25506
  catalog_url?: string;
25507
+ client_id?: string | null;
25508
+ client_secret_ciphertext?: string | null;
25509
+ client_secret_last4?: string | null;
24500
25510
  created_at?: string;
24501
25511
  id?: number;
24502
25512
  last_meta?: import("../integrations/supabase/types").Json | null;
24503
25513
  last_test_at?: string | null;
24504
25514
  last_test_error?: string | null;
24505
25515
  last_test_ok?: boolean | null;
25516
+ last_token_test_at?: string | null;
25517
+ last_token_test_error?: string | null;
25518
+ last_token_test_ok?: boolean | null;
24506
25519
  updated_at?: string;
24507
25520
  };
24508
25521
  Update: {
24509
25522
  catalog_key?: string | null;
24510
25523
  catalog_url?: string;
25524
+ client_id?: string | null;
25525
+ client_secret_ciphertext?: string | null;
25526
+ client_secret_last4?: string | null;
24511
25527
  created_at?: string;
24512
25528
  id?: number;
24513
25529
  last_meta?: import("../integrations/supabase/types").Json | null;
24514
25530
  last_test_at?: string | null;
24515
25531
  last_test_error?: string | null;
24516
25532
  last_test_ok?: boolean | null;
25533
+ last_token_test_at?: string | null;
25534
+ last_token_test_error?: string | null;
25535
+ last_token_test_ok?: boolean | null;
24517
25536
  updated_at?: string;
24518
25537
  };
24519
25538
  Relationships: [];
@@ -24746,6 +25765,54 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
24746
25765
  referencedColumns: ["id"];
24747
25766
  }];
24748
25767
  };
25768
+ floriday_auto_fulfillment_log: {
25769
+ Row: {
25770
+ attempts: number;
25771
+ connection_id: string;
25772
+ created_at: string;
25773
+ error: string | null;
25774
+ fulfillment_order_id: string | null;
25775
+ id: string;
25776
+ last_attempt_at: string | null;
25777
+ reason: string | null;
25778
+ sales_order_id: string;
25779
+ status: string;
25780
+ updated_at: string;
25781
+ };
25782
+ Insert: {
25783
+ attempts?: number;
25784
+ connection_id: string;
25785
+ created_at?: string;
25786
+ error?: string | null;
25787
+ fulfillment_order_id?: string | null;
25788
+ id?: string;
25789
+ last_attempt_at?: string | null;
25790
+ reason?: string | null;
25791
+ sales_order_id: string;
25792
+ status?: string;
25793
+ updated_at?: string;
25794
+ };
25795
+ Update: {
25796
+ attempts?: number;
25797
+ connection_id?: string;
25798
+ created_at?: string;
25799
+ error?: string | null;
25800
+ fulfillment_order_id?: string | null;
25801
+ id?: string;
25802
+ last_attempt_at?: string | null;
25803
+ reason?: string | null;
25804
+ sales_order_id?: string;
25805
+ status?: string;
25806
+ updated_at?: string;
25807
+ };
25808
+ Relationships: [{
25809
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
25810
+ columns: ["connection_id"];
25811
+ isOneToOne: false;
25812
+ referencedRelation: "floriday_connections";
25813
+ referencedColumns: ["id"];
25814
+ }];
25815
+ };
24749
25816
  floriday_base_items_cache: {
24750
25817
  Row: {
24751
25818
  connection_id: string;
@@ -25850,6 +26917,24 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
25850
26917
  referencedColumns: ["id"];
25851
26918
  }];
25852
26919
  };
26920
+ floriday_rate_limit_state: {
26921
+ Row: {
26922
+ bucket: string;
26923
+ last_refill_at: string;
26924
+ tokens: number;
26925
+ };
26926
+ Insert: {
26927
+ bucket: string;
26928
+ last_refill_at?: string;
26929
+ tokens: number;
26930
+ };
26931
+ Update: {
26932
+ bucket?: string;
26933
+ last_refill_at?: string;
26934
+ tokens?: number;
26935
+ };
26936
+ Relationships: [];
26937
+ };
25853
26938
  floriday_resource_schemas: {
25854
26939
  Row: {
25855
26940
  enums: import("../integrations/supabase/types").Json;
@@ -26273,6 +27358,60 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
26273
27358
  referencedColumns: ["id"];
26274
27359
  }];
26275
27360
  };
27361
+ flow_role_assignments: {
27362
+ Row: {
27363
+ created_at: string;
27364
+ id: string;
27365
+ role_id: string;
27366
+ user_id: string;
27367
+ };
27368
+ Insert: {
27369
+ created_at?: string;
27370
+ id?: string;
27371
+ role_id: string;
27372
+ user_id: string;
27373
+ };
27374
+ Update: {
27375
+ created_at?: string;
27376
+ id?: string;
27377
+ role_id?: string;
27378
+ user_id?: string;
27379
+ };
27380
+ Relationships: [{
27381
+ foreignKeyName: "flow_role_assignments_role_id_fkey";
27382
+ columns: ["role_id"];
27383
+ isOneToOne: false;
27384
+ referencedRelation: "flow_roles";
27385
+ referencedColumns: ["id"];
27386
+ }];
27387
+ };
27388
+ flow_roles: {
27389
+ Row: {
27390
+ created_at: string;
27391
+ description: string | null;
27392
+ id: string;
27393
+ module_access: string[];
27394
+ name: string;
27395
+ updated_at: string;
27396
+ };
27397
+ Insert: {
27398
+ created_at?: string;
27399
+ description?: string | null;
27400
+ id?: string;
27401
+ module_access?: string[];
27402
+ name: string;
27403
+ updated_at?: string;
27404
+ };
27405
+ Update: {
27406
+ created_at?: string;
27407
+ description?: string | null;
27408
+ id?: string;
27409
+ module_access?: string[];
27410
+ name?: string;
27411
+ updated_at?: string;
27412
+ };
27413
+ Relationships: [];
27414
+ };
26276
27415
  imap_accounts: {
26277
27416
  Row: {
26278
27417
  created_at: string;
@@ -26904,6 +28043,7 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
26904
28043
  matched_customer_id: string | null;
26905
28044
  message_id: string;
26906
28045
  notes: string | null;
28046
+ order_number: string | null;
26907
28047
  parsed_payload: import("../integrations/supabase/types").Json | null;
26908
28048
  reviewed_at: string | null;
26909
28049
  reviewed_by: string | null;
@@ -26919,6 +28059,7 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
26919
28059
  matched_customer_id?: string | null;
26920
28060
  message_id: string;
26921
28061
  notes?: string | null;
28062
+ order_number?: string | null;
26922
28063
  parsed_payload?: import("../integrations/supabase/types").Json | null;
26923
28064
  reviewed_at?: string | null;
26924
28065
  reviewed_by?: string | null;
@@ -26934,6 +28075,7 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
26934
28075
  matched_customer_id?: string | null;
26935
28076
  message_id?: string;
26936
28077
  notes?: string | null;
28078
+ order_number?: string | null;
26937
28079
  parsed_payload?: import("../integrations/supabase/types").Json | null;
26938
28080
  reviewed_at?: string | null;
26939
28081
  reviewed_by?: string | null;
@@ -27790,6 +28932,7 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
27790
28932
  id: string;
27791
28933
  items: import("../integrations/supabase/types").Json;
27792
28934
  notes: string | null;
28935
+ order_number: string | null;
27793
28936
  recipient_id: string;
27794
28937
  total_amount: number;
27795
28938
  };
@@ -27803,6 +28946,7 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
27803
28946
  id?: string;
27804
28947
  items?: import("../integrations/supabase/types").Json;
27805
28948
  notes?: string | null;
28949
+ order_number?: string | null;
27806
28950
  recipient_id: string;
27807
28951
  total_amount?: number;
27808
28952
  };
@@ -27816,6 +28960,7 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
27816
28960
  id?: string;
27817
28961
  items?: import("../integrations/supabase/types").Json;
27818
28962
  notes?: string | null;
28963
+ order_number?: string | null;
27819
28964
  recipient_id?: string;
27820
28965
  total_amount?: number;
27821
28966
  };
@@ -27975,6 +29120,9 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
27975
29120
  crates_per_layer: number;
27976
29121
  created_at: string;
27977
29122
  id: string;
29123
+ layer_fraction: number;
29124
+ layer_share_pct: number;
29125
+ layers_per_cart: number;
27978
29126
  order_item_id: string | null;
27979
29127
  plants_per_crate: number;
27980
29128
  product_id: string | null;
@@ -27986,6 +29134,9 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
27986
29134
  crates_per_layer?: number;
27987
29135
  created_at?: string;
27988
29136
  id?: string;
29137
+ layer_fraction?: number;
29138
+ layer_share_pct?: number;
29139
+ layers_per_cart?: number;
27989
29140
  order_item_id?: string | null;
27990
29141
  plants_per_crate?: number;
27991
29142
  product_id?: string | null;
@@ -27997,6 +29148,9 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
27997
29148
  crates_per_layer?: number;
27998
29149
  created_at?: string;
27999
29150
  id?: string;
29151
+ layer_fraction?: number;
29152
+ layer_share_pct?: number;
29153
+ layers_per_cart?: number;
28000
29154
  order_item_id?: string | null;
28001
29155
  plants_per_crate?: number;
28002
29156
  product_id?: string | null;
@@ -28024,33 +29178,45 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
28024
29178
  };
28025
29179
  order_carts: {
28026
29180
  Row: {
29181
+ algorithm_version: number;
28027
29182
  cart_number: number;
28028
29183
  created_at: string;
28029
29184
  id: string;
28030
29185
  is_auto: boolean;
28031
29186
  is_complete: boolean;
28032
29187
  notes: string | null;
29188
+ occupancy_pct: number;
28033
29189
  order_id: string;
29190
+ source: string;
29191
+ total_layers_used: number;
28034
29192
  updated_at: string;
28035
29193
  };
28036
29194
  Insert: {
29195
+ algorithm_version?: number;
28037
29196
  cart_number: number;
28038
29197
  created_at?: string;
28039
29198
  id?: string;
28040
29199
  is_auto?: boolean;
28041
29200
  is_complete?: boolean;
28042
29201
  notes?: string | null;
29202
+ occupancy_pct?: number;
28043
29203
  order_id: string;
29204
+ source?: string;
29205
+ total_layers_used?: number;
28044
29206
  updated_at?: string;
28045
29207
  };
28046
29208
  Update: {
29209
+ algorithm_version?: number;
28047
29210
  cart_number?: number;
28048
29211
  created_at?: string;
28049
29212
  id?: string;
28050
29213
  is_auto?: boolean;
28051
29214
  is_complete?: boolean;
28052
29215
  notes?: string | null;
29216
+ occupancy_pct?: number;
28053
29217
  order_id?: string;
29218
+ source?: string;
29219
+ total_layers_used?: number;
28054
29220
  updated_at?: string;
28055
29221
  };
28056
29222
  Relationships: [{
@@ -28203,6 +29369,8 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
28203
29369
  order_date: string;
28204
29370
  order_number: string;
28205
29371
  order_source: string;
29372
+ plan_locked_at: string | null;
29373
+ plan_locked_ref: string | null;
28206
29374
  status: string;
28207
29375
  total: string;
28208
29376
  updated_at: string;
@@ -28219,6 +29387,8 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
28219
29387
  order_date?: string;
28220
29388
  order_number: string;
28221
29389
  order_source?: string;
29390
+ plan_locked_at?: string | null;
29391
+ plan_locked_ref?: string | null;
28222
29392
  status?: string;
28223
29393
  total?: string;
28224
29394
  updated_at?: string;
@@ -28235,6 +29405,8 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
28235
29405
  order_date?: string;
28236
29406
  order_number?: string;
28237
29407
  order_source?: string;
29408
+ plan_locked_at?: string | null;
29409
+ plan_locked_ref?: string | null;
28238
29410
  status?: string;
28239
29411
  total?: string;
28240
29412
  updated_at?: string;
@@ -28607,6 +29779,7 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
28607
29779
  display_name: string | null;
28608
29780
  email: string | null;
28609
29781
  id: string;
29782
+ is_superadmin: boolean;
28610
29783
  notification_preferences: import("../integrations/supabase/types").Json;
28611
29784
  tenant_id: string | null;
28612
29785
  updated_at: string;
@@ -28616,6 +29789,7 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
28616
29789
  display_name?: string | null;
28617
29790
  email?: string | null;
28618
29791
  id: string;
29792
+ is_superadmin?: boolean;
28619
29793
  notification_preferences?: import("../integrations/supabase/types").Json;
28620
29794
  tenant_id?: string | null;
28621
29795
  updated_at?: string;
@@ -28625,6 +29799,7 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
28625
29799
  display_name?: string | null;
28626
29800
  email?: string | null;
28627
29801
  id?: string;
29802
+ is_superadmin?: boolean;
28628
29803
  notification_preferences?: import("../integrations/supabase/types").Json;
28629
29804
  tenant_id?: string | null;
28630
29805
  updated_at?: string;
@@ -29414,6 +30589,24 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
29414
30589
  };
29415
30590
  Relationships: [];
29416
30591
  };
30592
+ sidebar_config: {
30593
+ Row: {
30594
+ id: string;
30595
+ module_order: string[];
30596
+ updated_at: string;
30597
+ };
30598
+ Insert: {
30599
+ id?: string;
30600
+ module_order?: string[];
30601
+ updated_at?: string;
30602
+ };
30603
+ Update: {
30604
+ id?: string;
30605
+ module_order?: string[];
30606
+ updated_at?: string;
30607
+ };
30608
+ Relationships: [];
30609
+ };
29417
30610
  stock_import_runs: {
29418
30611
  Row: {
29419
30612
  connection_id: string | null;
@@ -29472,7 +30665,7 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
29472
30665
  reason: string | null;
29473
30666
  reserved_after: number | null;
29474
30667
  reserved_before: number | null;
29475
- trade_item_key: string;
30668
+ trade_item_key: string | null;
29476
30669
  };
29477
30670
  Insert: {
29478
30671
  connection_id?: string | null;
@@ -29489,7 +30682,7 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
29489
30682
  reason?: string | null;
29490
30683
  reserved_after?: number | null;
29491
30684
  reserved_before?: number | null;
29492
- trade_item_key: string;
30685
+ trade_item_key?: string | null;
29493
30686
  };
29494
30687
  Update: {
29495
30688
  connection_id?: string | null;
@@ -29506,7 +30699,7 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
29506
30699
  reason?: string | null;
29507
30700
  reserved_after?: number | null;
29508
30701
  reserved_before?: number | null;
29509
- trade_item_key?: string;
30702
+ trade_item_key?: string | null;
29510
30703
  };
29511
30704
  Relationships: [];
29512
30705
  };
@@ -29849,6 +31042,114 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
29849
31042
  };
29850
31043
  Relationships: [];
29851
31044
  };
31045
+ trade_item_supply_lines: {
31046
+ Row: {
31047
+ available_quantity: number | null;
31048
+ connection_id: string;
31049
+ created_at: string;
31050
+ currency: string | null;
31051
+ endpoint_family: string | null;
31052
+ environment: string | null;
31053
+ id: string;
31054
+ last_error: string | null;
31055
+ last_status: number | null;
31056
+ packing_configuration_id: string | null;
31057
+ period_end: string | null;
31058
+ period_start: string | null;
31059
+ price_per_piece: number | null;
31060
+ sales_unit: string | null;
31061
+ supply_line_id: string | null;
31062
+ supply_type: string;
31063
+ trade_item_id: string;
31064
+ updated_at: string;
31065
+ user_id: string;
31066
+ week: number | null;
31067
+ year: number | null;
31068
+ };
31069
+ Insert: {
31070
+ available_quantity?: number | null;
31071
+ connection_id: string;
31072
+ created_at?: string;
31073
+ currency?: string | null;
31074
+ endpoint_family?: string | null;
31075
+ environment?: string | null;
31076
+ id?: string;
31077
+ last_error?: string | null;
31078
+ last_status?: number | null;
31079
+ packing_configuration_id?: string | null;
31080
+ period_end?: string | null;
31081
+ period_start?: string | null;
31082
+ price_per_piece?: number | null;
31083
+ sales_unit?: string | null;
31084
+ supply_line_id?: string | null;
31085
+ supply_type?: string;
31086
+ trade_item_id: string;
31087
+ updated_at?: string;
31088
+ user_id: string;
31089
+ week?: number | null;
31090
+ year?: number | null;
31091
+ };
31092
+ Update: {
31093
+ available_quantity?: number | null;
31094
+ connection_id?: string;
31095
+ created_at?: string;
31096
+ currency?: string | null;
31097
+ endpoint_family?: string | null;
31098
+ environment?: string | null;
31099
+ id?: string;
31100
+ last_error?: string | null;
31101
+ last_status?: number | null;
31102
+ packing_configuration_id?: string | null;
31103
+ period_end?: string | null;
31104
+ period_start?: string | null;
31105
+ price_per_piece?: number | null;
31106
+ sales_unit?: string | null;
31107
+ supply_line_id?: string | null;
31108
+ supply_type?: string;
31109
+ trade_item_id?: string;
31110
+ updated_at?: string;
31111
+ user_id?: string;
31112
+ week?: number | null;
31113
+ year?: number | null;
31114
+ };
31115
+ Relationships: [];
31116
+ };
31117
+ trade_item_warehouse_preferences: {
31118
+ Row: {
31119
+ connection_id: string;
31120
+ created_at: string;
31121
+ id: string;
31122
+ trade_item_id: string;
31123
+ updated_at: string;
31124
+ warehouse_id: string;
31125
+ warehouse_name: string | null;
31126
+ };
31127
+ Insert: {
31128
+ connection_id: string;
31129
+ created_at?: string;
31130
+ id?: string;
31131
+ trade_item_id: string;
31132
+ updated_at?: string;
31133
+ warehouse_id: string;
31134
+ warehouse_name?: string | null;
31135
+ };
31136
+ Update: {
31137
+ connection_id?: string;
31138
+ created_at?: string;
31139
+ id?: string;
31140
+ trade_item_id?: string;
31141
+ updated_at?: string;
31142
+ warehouse_id?: string;
31143
+ warehouse_name?: string | null;
31144
+ };
31145
+ Relationships: [{
31146
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
31147
+ columns: ["connection_id"];
31148
+ isOneToOne: false;
31149
+ referencedRelation: "floriday_connections";
31150
+ referencedColumns: ["id"];
31151
+ }];
31152
+ };
29852
31153
  twinfield_connections: {
29853
31154
  Row: {
29854
31155
  access_token: string | null;
@@ -30168,6 +31469,10 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
30168
31469
  default_invoice_type: string;
30169
31470
  default_payment_term_days: number;
30170
31471
  default_vat_code: string;
31472
+ invoice_enabled_ao: boolean;
31473
+ invoice_enabled_fo: boolean;
31474
+ invoice_enabled_ho: boolean;
31475
+ invoice_enabled_mo: boolean;
30171
31476
  updated_at: string;
30172
31477
  user_id: string;
30173
31478
  };
@@ -30177,6 +31482,10 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
30177
31482
  default_invoice_type?: string;
30178
31483
  default_payment_term_days?: number;
30179
31484
  default_vat_code?: string;
31485
+ invoice_enabled_ao?: boolean;
31486
+ invoice_enabled_fo?: boolean;
31487
+ invoice_enabled_ho?: boolean;
31488
+ invoice_enabled_mo?: boolean;
30180
31489
  updated_at?: string;
30181
31490
  user_id: string;
30182
31491
  };
@@ -30186,6 +31495,10 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
30186
31495
  default_invoice_type?: string;
30187
31496
  default_payment_term_days?: number;
30188
31497
  default_vat_code?: string;
31498
+ invoice_enabled_ao?: boolean;
31499
+ invoice_enabled_fo?: boolean;
31500
+ invoice_enabled_ho?: boolean;
31501
+ invoice_enabled_mo?: boolean;
30189
31502
  updated_at?: string;
30190
31503
  user_id?: string;
30191
31504
  };
@@ -31480,6 +32793,12 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
31480
32793
  order_number: string;
31481
32794
  }[];
31482
32795
  };
32796
+ autolink_product_to_floriday: {
32797
+ Args: {
32798
+ p_product_id: string;
32799
+ };
32800
+ Returns: string;
32801
+ };
31483
32802
  backfill_open_order_reservations: {
31484
32803
  Args: never;
31485
32804
  Returns: {
@@ -31518,6 +32837,18 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
31518
32837
  Args: never;
31519
32838
  Returns: number;
31520
32839
  };
32840
+ consume_floriday_rate_limit: {
32841
+ Args: {
32842
+ p_bucket: string;
32843
+ p_capacity: number;
32844
+ p_cost?: number;
32845
+ p_refill_per_sec: number;
32846
+ };
32847
+ Returns: {
32848
+ granted: boolean;
32849
+ wait_ms: number;
32850
+ }[];
32851
+ };
31521
32852
  control_get_todays_carts: {
31522
32853
  Args: never;
31523
32854
  Returns: {
@@ -31598,6 +32929,12 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
31598
32929
  status: string;
31599
32930
  }[];
31600
32931
  };
32932
+ enqueue_cart_replan_if_unlocked: {
32933
+ Args: {
32934
+ p_order_id: string;
32935
+ };
32936
+ Returns: undefined;
32937
+ };
31601
32938
  ensure_trade_item_stock_row: {
31602
32939
  Args: {
31603
32940
  p_key: string;
@@ -31704,6 +33041,13 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
31704
33041
  office_code: string;
31705
33042
  }[];
31706
33043
  };
33044
+ get_floricode_record_counts: {
33045
+ Args: never;
33046
+ Returns: {
33047
+ count: number;
33048
+ resource: string;
33049
+ }[];
33050
+ };
31707
33051
  get_floriday_agreements_active: {
31708
33052
  Args: {
31709
33053
  p_on_date?: string;
@@ -31795,6 +33139,12 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
31795
33139
  };
31796
33140
  Returns: import("../integrations/supabase/types").Json;
31797
33141
  };
33142
+ get_offer_delivery_options: {
33143
+ Args: {
33144
+ p_code: string;
33145
+ };
33146
+ Returns: import("../integrations/supabase/types").Json;
33147
+ };
31798
33148
  get_offer_recipient_by_code: {
31799
33149
  Args: {
31800
33150
  p_code: string;
@@ -31859,6 +33209,12 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
31859
33209
  Args: never;
31860
33210
  Returns: boolean;
31861
33211
  };
33212
+ is_superadmin: {
33213
+ Args: {
33214
+ _user_id: string;
33215
+ };
33216
+ Returns: boolean;
33217
+ };
31862
33218
  local_effective_price: {
31863
33219
  Args: {
31864
33220
  _customer_id: string;
@@ -31893,6 +33249,13 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
31893
33249
  };
31894
33250
  Returns: string;
31895
33251
  };
33252
+ next_order_number_for_date: {
33253
+ Args: {
33254
+ p_created_at?: string;
33255
+ p_prefix: string;
33256
+ };
33257
+ Returns: string;
33258
+ };
31896
33259
  next_work_order_number: {
31897
33260
  Args: {
31898
33261
  p_parent_work_order_id?: string;
@@ -31900,6 +33263,12 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
31900
33263
  };
31901
33264
  Returns: string;
31902
33265
  };
33266
+ normalize_order_source: {
33267
+ Args: {
33268
+ p_src: string;
33269
+ };
33270
+ Returns: string;
33271
+ };
31903
33272
  normalize_vat: {
31904
33273
  Args: {
31905
33274
  v: string;
@@ -31914,10 +33283,21 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
31914
33283
  };
31915
33284
  Returns: boolean;
31916
33285
  };
33286
+ order_number_prefix: {
33287
+ Args: {
33288
+ p_custom_fields?: import("../integrations/supabase/types").Json;
33289
+ p_order_source: string;
33290
+ };
33291
+ Returns: string;
33292
+ };
31917
33293
  pickstation_get_orders_raw: {
31918
33294
  Args: never;
31919
33295
  Returns: import("../integrations/supabase/types").Json;
31920
33296
  };
33297
+ pickstation_get_planning_context: {
33298
+ Args: never;
33299
+ Returns: import("../integrations/supabase/types").Json;
33300
+ };
31921
33301
  pickstation_get_settings: {
31922
33302
  Args: never;
31923
33303
  Returns: import("../integrations/supabase/types").Json;
@@ -31948,6 +33328,28 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
31948
33328
  };
31949
33329
  Returns: undefined;
31950
33330
  };
33331
+ recompute_order_status: {
33332
+ Args: {
33333
+ p_order_id: string;
33334
+ };
33335
+ Returns: undefined;
33336
+ };
33337
+ recompute_reserved_for_order: {
33338
+ Args: {
33339
+ p_order_id: string;
33340
+ };
33341
+ Returns: undefined;
33342
+ };
33343
+ recompute_reserved_stock: {
33344
+ Args: {
33345
+ p_trade_item_key: string;
33346
+ };
33347
+ Returns: undefined;
33348
+ };
33349
+ refresh_external_customers_grouped: {
33350
+ Args: never;
33351
+ Returns: undefined;
33352
+ };
31951
33353
  refresh_floricode_derived_code_lists: {
31952
33354
  Args: never;
31953
33355
  Returns: {
@@ -31962,6 +33364,12 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
31962
33364
  };
31963
33365
  Returns: number;
31964
33366
  };
33367
+ refresh_floricode_derived_for_products: {
33368
+ Args: {
33369
+ _product_ids: string[];
33370
+ };
33371
+ Returns: number;
33372
+ };
31965
33373
  reset_floriday_sync_cursor: {
31966
33374
  Args: {
31967
33375
  p_connection_id: string;
@@ -31969,6 +33377,12 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
31969
33377
  };
31970
33378
  Returns: undefined;
31971
33379
  };
33380
+ resolve_product_id_for_item: {
33381
+ Args: {
33382
+ p_product_name: string;
33383
+ };
33384
+ Returns: string;
33385
+ };
31972
33386
  schedule_floriday_additional_services_sync: {
31973
33387
  Args: {
31974
33388
  p_apikey: string;
@@ -32246,6 +33660,24 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
32246
33660
  };
32247
33661
  Returns: string[];
32248
33662
  };
33663
+ sync_cached_packing_from_product: {
33664
+ Args: {
33665
+ p_product_id: string;
33666
+ };
33667
+ Returns: undefined;
33668
+ };
33669
+ sync_order_cart_item_packing_from_product: {
33670
+ Args: {
33671
+ p_product_id: string;
33672
+ };
33673
+ Returns: undefined;
33674
+ };
33675
+ sync_product_packing_from_floriday_cache: {
33676
+ Args: {
33677
+ p_floriday_id: string;
33678
+ };
33679
+ Returns: undefined;
33680
+ };
32249
33681
  twinfield_decrypt: {
32250
33682
  Args: {
32251
33683
  cipher: string;
@@ -32258,6 +33690,17 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
32258
33690
  };
32259
33691
  Returns: string;
32260
33692
  };
33693
+ upsert_auto_fulfillment_log: {
33694
+ Args: {
33695
+ p_connection_id: string;
33696
+ p_error?: string;
33697
+ p_fulfillment_order_id?: string;
33698
+ p_reason?: string;
33699
+ p_sales_order_id: string;
33700
+ p_status: string;
33701
+ };
33702
+ Returns: undefined;
33703
+ };
32261
33704
  };
32262
33705
  Enums: {
32263
33706
  app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
@@ -32285,7 +33728,10 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
32285
33728
  Tables: {
32286
33729
  afhandeling_settings: {
32287
33730
  Row: {
33731
+ auto_print_delivery_note: boolean;
33732
+ auto_process_paused: boolean;
32288
33733
  created_at: string;
33734
+ extra_pick_days_with_stickers: number;
32289
33735
  id: string;
32290
33736
  max_workdays_earlier_pick: number;
32291
33737
  pick_days_before_transport: number;
@@ -32299,7 +33745,10 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
32299
33745
  user_id: string;
32300
33746
  };
32301
33747
  Insert: {
33748
+ auto_print_delivery_note?: boolean;
33749
+ auto_process_paused?: boolean;
32302
33750
  created_at?: string;
33751
+ extra_pick_days_with_stickers?: number;
32303
33752
  id?: string;
32304
33753
  max_workdays_earlier_pick?: number;
32305
33754
  pick_days_before_transport?: number;
@@ -32313,7 +33762,10 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
32313
33762
  user_id: string;
32314
33763
  };
32315
33764
  Update: {
33765
+ auto_print_delivery_note?: boolean;
33766
+ auto_process_paused?: boolean;
32316
33767
  created_at?: string;
33768
+ extra_pick_days_with_stickers?: number;
32317
33769
  id?: string;
32318
33770
  max_workdays_earlier_pick?: number;
32319
33771
  pick_days_before_transport?: number;
@@ -33105,6 +34557,36 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
33105
34557
  };
33106
34558
  Relationships: [];
33107
34559
  };
34560
+ cart_replan_queue: {
34561
+ Row: {
34562
+ attempts: number;
34563
+ last_error: string | null;
34564
+ order_id: string;
34565
+ processed_at: string | null;
34566
+ requested_at: string;
34567
+ };
34568
+ Insert: {
34569
+ attempts?: number;
34570
+ last_error?: string | null;
34571
+ order_id: string;
34572
+ processed_at?: string | null;
34573
+ requested_at?: string;
34574
+ };
34575
+ Update: {
34576
+ attempts?: number;
34577
+ last_error?: string | null;
34578
+ order_id?: string;
34579
+ processed_at?: string | null;
34580
+ requested_at?: string;
34581
+ };
34582
+ Relationships: [{
34583
+ foreignKeyName: "cart_replan_queue_order_id_fkey";
34584
+ columns: ["order_id"];
34585
+ isOneToOne: true;
34586
+ referencedRelation: "orders";
34587
+ referencedColumns: ["id"];
34588
+ }];
34589
+ };
33108
34590
  collections: {
33109
34591
  Row: {
33110
34592
  created_at: string;
@@ -35230,34 +36712,52 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
35230
36712
  Row: {
35231
36713
  catalog_key: string | null;
35232
36714
  catalog_url: string;
36715
+ client_id: string | null;
36716
+ client_secret_ciphertext: string | null;
36717
+ client_secret_last4: string | null;
35233
36718
  created_at: string;
35234
36719
  id: number;
35235
36720
  last_meta: import("../integrations/supabase/types").Json | null;
35236
36721
  last_test_at: string | null;
35237
36722
  last_test_error: string | null;
35238
36723
  last_test_ok: boolean | null;
36724
+ last_token_test_at: string | null;
36725
+ last_token_test_error: string | null;
36726
+ last_token_test_ok: boolean | null;
35239
36727
  updated_at: string;
35240
36728
  };
35241
36729
  Insert: {
35242
36730
  catalog_key?: string | null;
35243
36731
  catalog_url?: string;
36732
+ client_id?: string | null;
36733
+ client_secret_ciphertext?: string | null;
36734
+ client_secret_last4?: string | null;
35244
36735
  created_at?: string;
35245
36736
  id?: number;
35246
36737
  last_meta?: import("../integrations/supabase/types").Json | null;
35247
36738
  last_test_at?: string | null;
35248
36739
  last_test_error?: string | null;
35249
36740
  last_test_ok?: boolean | null;
36741
+ last_token_test_at?: string | null;
36742
+ last_token_test_error?: string | null;
36743
+ last_token_test_ok?: boolean | null;
35250
36744
  updated_at?: string;
35251
36745
  };
35252
36746
  Update: {
35253
36747
  catalog_key?: string | null;
35254
36748
  catalog_url?: string;
36749
+ client_id?: string | null;
36750
+ client_secret_ciphertext?: string | null;
36751
+ client_secret_last4?: string | null;
35255
36752
  created_at?: string;
35256
36753
  id?: number;
35257
36754
  last_meta?: import("../integrations/supabase/types").Json | null;
35258
36755
  last_test_at?: string | null;
35259
36756
  last_test_error?: string | null;
35260
36757
  last_test_ok?: boolean | null;
36758
+ last_token_test_at?: string | null;
36759
+ last_token_test_error?: string | null;
36760
+ last_token_test_ok?: boolean | null;
35261
36761
  updated_at?: string;
35262
36762
  };
35263
36763
  Relationships: [];
@@ -35490,6 +36990,54 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
35490
36990
  referencedColumns: ["id"];
35491
36991
  }];
35492
36992
  };
36993
+ floriday_auto_fulfillment_log: {
36994
+ Row: {
36995
+ attempts: number;
36996
+ connection_id: string;
36997
+ created_at: string;
36998
+ error: string | null;
36999
+ fulfillment_order_id: string | null;
37000
+ id: string;
37001
+ last_attempt_at: string | null;
37002
+ reason: string | null;
37003
+ sales_order_id: string;
37004
+ status: string;
37005
+ updated_at: string;
37006
+ };
37007
+ Insert: {
37008
+ attempts?: number;
37009
+ connection_id: string;
37010
+ created_at?: string;
37011
+ error?: string | null;
37012
+ fulfillment_order_id?: string | null;
37013
+ id?: string;
37014
+ last_attempt_at?: string | null;
37015
+ reason?: string | null;
37016
+ sales_order_id: string;
37017
+ status?: string;
37018
+ updated_at?: string;
37019
+ };
37020
+ Update: {
37021
+ attempts?: number;
37022
+ connection_id?: string;
37023
+ created_at?: string;
37024
+ error?: string | null;
37025
+ fulfillment_order_id?: string | null;
37026
+ id?: string;
37027
+ last_attempt_at?: string | null;
37028
+ reason?: string | null;
37029
+ sales_order_id?: string;
37030
+ status?: string;
37031
+ updated_at?: string;
37032
+ };
37033
+ Relationships: [{
37034
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
37035
+ columns: ["connection_id"];
37036
+ isOneToOne: false;
37037
+ referencedRelation: "floriday_connections";
37038
+ referencedColumns: ["id"];
37039
+ }];
37040
+ };
35493
37041
  floriday_base_items_cache: {
35494
37042
  Row: {
35495
37043
  connection_id: string;
@@ -36594,6 +38142,24 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
36594
38142
  referencedColumns: ["id"];
36595
38143
  }];
36596
38144
  };
38145
+ floriday_rate_limit_state: {
38146
+ Row: {
38147
+ bucket: string;
38148
+ last_refill_at: string;
38149
+ tokens: number;
38150
+ };
38151
+ Insert: {
38152
+ bucket: string;
38153
+ last_refill_at?: string;
38154
+ tokens: number;
38155
+ };
38156
+ Update: {
38157
+ bucket?: string;
38158
+ last_refill_at?: string;
38159
+ tokens?: number;
38160
+ };
38161
+ Relationships: [];
38162
+ };
36597
38163
  floriday_resource_schemas: {
36598
38164
  Row: {
36599
38165
  enums: import("../integrations/supabase/types").Json;
@@ -37017,6 +38583,60 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
37017
38583
  referencedColumns: ["id"];
37018
38584
  }];
37019
38585
  };
38586
+ flow_role_assignments: {
38587
+ Row: {
38588
+ created_at: string;
38589
+ id: string;
38590
+ role_id: string;
38591
+ user_id: string;
38592
+ };
38593
+ Insert: {
38594
+ created_at?: string;
38595
+ id?: string;
38596
+ role_id: string;
38597
+ user_id: string;
38598
+ };
38599
+ Update: {
38600
+ created_at?: string;
38601
+ id?: string;
38602
+ role_id?: string;
38603
+ user_id?: string;
38604
+ };
38605
+ Relationships: [{
38606
+ foreignKeyName: "flow_role_assignments_role_id_fkey";
38607
+ columns: ["role_id"];
38608
+ isOneToOne: false;
38609
+ referencedRelation: "flow_roles";
38610
+ referencedColumns: ["id"];
38611
+ }];
38612
+ };
38613
+ flow_roles: {
38614
+ Row: {
38615
+ created_at: string;
38616
+ description: string | null;
38617
+ id: string;
38618
+ module_access: string[];
38619
+ name: string;
38620
+ updated_at: string;
38621
+ };
38622
+ Insert: {
38623
+ created_at?: string;
38624
+ description?: string | null;
38625
+ id?: string;
38626
+ module_access?: string[];
38627
+ name: string;
38628
+ updated_at?: string;
38629
+ };
38630
+ Update: {
38631
+ created_at?: string;
38632
+ description?: string | null;
38633
+ id?: string;
38634
+ module_access?: string[];
38635
+ name?: string;
38636
+ updated_at?: string;
38637
+ };
38638
+ Relationships: [];
38639
+ };
37020
38640
  imap_accounts: {
37021
38641
  Row: {
37022
38642
  created_at: string;
@@ -37648,6 +39268,7 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
37648
39268
  matched_customer_id: string | null;
37649
39269
  message_id: string;
37650
39270
  notes: string | null;
39271
+ order_number: string | null;
37651
39272
  parsed_payload: import("../integrations/supabase/types").Json | null;
37652
39273
  reviewed_at: string | null;
37653
39274
  reviewed_by: string | null;
@@ -37663,6 +39284,7 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
37663
39284
  matched_customer_id?: string | null;
37664
39285
  message_id: string;
37665
39286
  notes?: string | null;
39287
+ order_number?: string | null;
37666
39288
  parsed_payload?: import("../integrations/supabase/types").Json | null;
37667
39289
  reviewed_at?: string | null;
37668
39290
  reviewed_by?: string | null;
@@ -37678,6 +39300,7 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
37678
39300
  matched_customer_id?: string | null;
37679
39301
  message_id?: string;
37680
39302
  notes?: string | null;
39303
+ order_number?: string | null;
37681
39304
  parsed_payload?: import("../integrations/supabase/types").Json | null;
37682
39305
  reviewed_at?: string | null;
37683
39306
  reviewed_by?: string | null;
@@ -38534,6 +40157,7 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
38534
40157
  id: string;
38535
40158
  items: import("../integrations/supabase/types").Json;
38536
40159
  notes: string | null;
40160
+ order_number: string | null;
38537
40161
  recipient_id: string;
38538
40162
  total_amount: number;
38539
40163
  };
@@ -38547,6 +40171,7 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
38547
40171
  id?: string;
38548
40172
  items?: import("../integrations/supabase/types").Json;
38549
40173
  notes?: string | null;
40174
+ order_number?: string | null;
38550
40175
  recipient_id: string;
38551
40176
  total_amount?: number;
38552
40177
  };
@@ -38560,6 +40185,7 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
38560
40185
  id?: string;
38561
40186
  items?: import("../integrations/supabase/types").Json;
38562
40187
  notes?: string | null;
40188
+ order_number?: string | null;
38563
40189
  recipient_id?: string;
38564
40190
  total_amount?: number;
38565
40191
  };
@@ -38719,6 +40345,9 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
38719
40345
  crates_per_layer: number;
38720
40346
  created_at: string;
38721
40347
  id: string;
40348
+ layer_fraction: number;
40349
+ layer_share_pct: number;
40350
+ layers_per_cart: number;
38722
40351
  order_item_id: string | null;
38723
40352
  plants_per_crate: number;
38724
40353
  product_id: string | null;
@@ -38730,6 +40359,9 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
38730
40359
  crates_per_layer?: number;
38731
40360
  created_at?: string;
38732
40361
  id?: string;
40362
+ layer_fraction?: number;
40363
+ layer_share_pct?: number;
40364
+ layers_per_cart?: number;
38733
40365
  order_item_id?: string | null;
38734
40366
  plants_per_crate?: number;
38735
40367
  product_id?: string | null;
@@ -38741,6 +40373,9 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
38741
40373
  crates_per_layer?: number;
38742
40374
  created_at?: string;
38743
40375
  id?: string;
40376
+ layer_fraction?: number;
40377
+ layer_share_pct?: number;
40378
+ layers_per_cart?: number;
38744
40379
  order_item_id?: string | null;
38745
40380
  plants_per_crate?: number;
38746
40381
  product_id?: string | null;
@@ -38768,33 +40403,45 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
38768
40403
  };
38769
40404
  order_carts: {
38770
40405
  Row: {
40406
+ algorithm_version: number;
38771
40407
  cart_number: number;
38772
40408
  created_at: string;
38773
40409
  id: string;
38774
40410
  is_auto: boolean;
38775
40411
  is_complete: boolean;
38776
40412
  notes: string | null;
40413
+ occupancy_pct: number;
38777
40414
  order_id: string;
40415
+ source: string;
40416
+ total_layers_used: number;
38778
40417
  updated_at: string;
38779
40418
  };
38780
40419
  Insert: {
40420
+ algorithm_version?: number;
38781
40421
  cart_number: number;
38782
40422
  created_at?: string;
38783
40423
  id?: string;
38784
40424
  is_auto?: boolean;
38785
40425
  is_complete?: boolean;
38786
40426
  notes?: string | null;
40427
+ occupancy_pct?: number;
38787
40428
  order_id: string;
40429
+ source?: string;
40430
+ total_layers_used?: number;
38788
40431
  updated_at?: string;
38789
40432
  };
38790
40433
  Update: {
40434
+ algorithm_version?: number;
38791
40435
  cart_number?: number;
38792
40436
  created_at?: string;
38793
40437
  id?: string;
38794
40438
  is_auto?: boolean;
38795
40439
  is_complete?: boolean;
38796
40440
  notes?: string | null;
40441
+ occupancy_pct?: number;
38797
40442
  order_id?: string;
40443
+ source?: string;
40444
+ total_layers_used?: number;
38798
40445
  updated_at?: string;
38799
40446
  };
38800
40447
  Relationships: [{
@@ -38947,6 +40594,8 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
38947
40594
  order_date: string;
38948
40595
  order_number: string;
38949
40596
  order_source: string;
40597
+ plan_locked_at: string | null;
40598
+ plan_locked_ref: string | null;
38950
40599
  status: string;
38951
40600
  total: string;
38952
40601
  updated_at: string;
@@ -38963,6 +40612,8 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
38963
40612
  order_date?: string;
38964
40613
  order_number: string;
38965
40614
  order_source?: string;
40615
+ plan_locked_at?: string | null;
40616
+ plan_locked_ref?: string | null;
38966
40617
  status?: string;
38967
40618
  total?: string;
38968
40619
  updated_at?: string;
@@ -38979,6 +40630,8 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
38979
40630
  order_date?: string;
38980
40631
  order_number?: string;
38981
40632
  order_source?: string;
40633
+ plan_locked_at?: string | null;
40634
+ plan_locked_ref?: string | null;
38982
40635
  status?: string;
38983
40636
  total?: string;
38984
40637
  updated_at?: string;
@@ -39351,6 +41004,7 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
39351
41004
  display_name: string | null;
39352
41005
  email: string | null;
39353
41006
  id: string;
41007
+ is_superadmin: boolean;
39354
41008
  notification_preferences: import("../integrations/supabase/types").Json;
39355
41009
  tenant_id: string | null;
39356
41010
  updated_at: string;
@@ -39360,6 +41014,7 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
39360
41014
  display_name?: string | null;
39361
41015
  email?: string | null;
39362
41016
  id: string;
41017
+ is_superadmin?: boolean;
39363
41018
  notification_preferences?: import("../integrations/supabase/types").Json;
39364
41019
  tenant_id?: string | null;
39365
41020
  updated_at?: string;
@@ -39369,6 +41024,7 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
39369
41024
  display_name?: string | null;
39370
41025
  email?: string | null;
39371
41026
  id?: string;
41027
+ is_superadmin?: boolean;
39372
41028
  notification_preferences?: import("../integrations/supabase/types").Json;
39373
41029
  tenant_id?: string | null;
39374
41030
  updated_at?: string;
@@ -40158,6 +41814,24 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
40158
41814
  };
40159
41815
  Relationships: [];
40160
41816
  };
41817
+ sidebar_config: {
41818
+ Row: {
41819
+ id: string;
41820
+ module_order: string[];
41821
+ updated_at: string;
41822
+ };
41823
+ Insert: {
41824
+ id?: string;
41825
+ module_order?: string[];
41826
+ updated_at?: string;
41827
+ };
41828
+ Update: {
41829
+ id?: string;
41830
+ module_order?: string[];
41831
+ updated_at?: string;
41832
+ };
41833
+ Relationships: [];
41834
+ };
40161
41835
  stock_import_runs: {
40162
41836
  Row: {
40163
41837
  connection_id: string | null;
@@ -40216,7 +41890,7 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
40216
41890
  reason: string | null;
40217
41891
  reserved_after: number | null;
40218
41892
  reserved_before: number | null;
40219
- trade_item_key: string;
41893
+ trade_item_key: string | null;
40220
41894
  };
40221
41895
  Insert: {
40222
41896
  connection_id?: string | null;
@@ -40233,7 +41907,7 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
40233
41907
  reason?: string | null;
40234
41908
  reserved_after?: number | null;
40235
41909
  reserved_before?: number | null;
40236
- trade_item_key: string;
41910
+ trade_item_key?: string | null;
40237
41911
  };
40238
41912
  Update: {
40239
41913
  connection_id?: string | null;
@@ -40250,7 +41924,7 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
40250
41924
  reason?: string | null;
40251
41925
  reserved_after?: number | null;
40252
41926
  reserved_before?: number | null;
40253
- trade_item_key?: string;
41927
+ trade_item_key?: string | null;
40254
41928
  };
40255
41929
  Relationships: [];
40256
41930
  };
@@ -40593,6 +42267,114 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
40593
42267
  };
40594
42268
  Relationships: [];
40595
42269
  };
42270
+ trade_item_supply_lines: {
42271
+ Row: {
42272
+ available_quantity: number | null;
42273
+ connection_id: string;
42274
+ created_at: string;
42275
+ currency: string | null;
42276
+ endpoint_family: string | null;
42277
+ environment: string | null;
42278
+ id: string;
42279
+ last_error: string | null;
42280
+ last_status: number | null;
42281
+ packing_configuration_id: string | null;
42282
+ period_end: string | null;
42283
+ period_start: string | null;
42284
+ price_per_piece: number | null;
42285
+ sales_unit: string | null;
42286
+ supply_line_id: string | null;
42287
+ supply_type: string;
42288
+ trade_item_id: string;
42289
+ updated_at: string;
42290
+ user_id: string;
42291
+ week: number | null;
42292
+ year: number | null;
42293
+ };
42294
+ Insert: {
42295
+ available_quantity?: number | null;
42296
+ connection_id: string;
42297
+ created_at?: string;
42298
+ currency?: string | null;
42299
+ endpoint_family?: string | null;
42300
+ environment?: string | null;
42301
+ id?: string;
42302
+ last_error?: string | null;
42303
+ last_status?: number | null;
42304
+ packing_configuration_id?: string | null;
42305
+ period_end?: string | null;
42306
+ period_start?: string | null;
42307
+ price_per_piece?: number | null;
42308
+ sales_unit?: string | null;
42309
+ supply_line_id?: string | null;
42310
+ supply_type?: string;
42311
+ trade_item_id: string;
42312
+ updated_at?: string;
42313
+ user_id: string;
42314
+ week?: number | null;
42315
+ year?: number | null;
42316
+ };
42317
+ Update: {
42318
+ available_quantity?: number | null;
42319
+ connection_id?: string;
42320
+ created_at?: string;
42321
+ currency?: string | null;
42322
+ endpoint_family?: string | null;
42323
+ environment?: string | null;
42324
+ id?: string;
42325
+ last_error?: string | null;
42326
+ last_status?: number | null;
42327
+ packing_configuration_id?: string | null;
42328
+ period_end?: string | null;
42329
+ period_start?: string | null;
42330
+ price_per_piece?: number | null;
42331
+ sales_unit?: string | null;
42332
+ supply_line_id?: string | null;
42333
+ supply_type?: string;
42334
+ trade_item_id?: string;
42335
+ updated_at?: string;
42336
+ user_id?: string;
42337
+ week?: number | null;
42338
+ year?: number | null;
42339
+ };
42340
+ Relationships: [];
42341
+ };
42342
+ trade_item_warehouse_preferences: {
42343
+ Row: {
42344
+ connection_id: string;
42345
+ created_at: string;
42346
+ id: string;
42347
+ trade_item_id: string;
42348
+ updated_at: string;
42349
+ warehouse_id: string;
42350
+ warehouse_name: string | null;
42351
+ };
42352
+ Insert: {
42353
+ connection_id: string;
42354
+ created_at?: string;
42355
+ id?: string;
42356
+ trade_item_id: string;
42357
+ updated_at?: string;
42358
+ warehouse_id: string;
42359
+ warehouse_name?: string | null;
42360
+ };
42361
+ Update: {
42362
+ connection_id?: string;
42363
+ created_at?: string;
42364
+ id?: string;
42365
+ trade_item_id?: string;
42366
+ updated_at?: string;
42367
+ warehouse_id?: string;
42368
+ warehouse_name?: string | null;
42369
+ };
42370
+ Relationships: [{
42371
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
42372
+ columns: ["connection_id"];
42373
+ isOneToOne: false;
42374
+ referencedRelation: "floriday_connections";
42375
+ referencedColumns: ["id"];
42376
+ }];
42377
+ };
40596
42378
  twinfield_connections: {
40597
42379
  Row: {
40598
42380
  access_token: string | null;
@@ -40912,6 +42694,10 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
40912
42694
  default_invoice_type: string;
40913
42695
  default_payment_term_days: number;
40914
42696
  default_vat_code: string;
42697
+ invoice_enabled_ao: boolean;
42698
+ invoice_enabled_fo: boolean;
42699
+ invoice_enabled_ho: boolean;
42700
+ invoice_enabled_mo: boolean;
40915
42701
  updated_at: string;
40916
42702
  user_id: string;
40917
42703
  };
@@ -40921,6 +42707,10 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
40921
42707
  default_invoice_type?: string;
40922
42708
  default_payment_term_days?: number;
40923
42709
  default_vat_code?: string;
42710
+ invoice_enabled_ao?: boolean;
42711
+ invoice_enabled_fo?: boolean;
42712
+ invoice_enabled_ho?: boolean;
42713
+ invoice_enabled_mo?: boolean;
40924
42714
  updated_at?: string;
40925
42715
  user_id: string;
40926
42716
  };
@@ -40930,6 +42720,10 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
40930
42720
  default_invoice_type?: string;
40931
42721
  default_payment_term_days?: number;
40932
42722
  default_vat_code?: string;
42723
+ invoice_enabled_ao?: boolean;
42724
+ invoice_enabled_fo?: boolean;
42725
+ invoice_enabled_ho?: boolean;
42726
+ invoice_enabled_mo?: boolean;
40933
42727
  updated_at?: string;
40934
42728
  user_id?: string;
40935
42729
  };
@@ -42224,6 +44018,12 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
42224
44018
  order_number: string;
42225
44019
  }[];
42226
44020
  };
44021
+ autolink_product_to_floriday: {
44022
+ Args: {
44023
+ p_product_id: string;
44024
+ };
44025
+ Returns: string;
44026
+ };
42227
44027
  backfill_open_order_reservations: {
42228
44028
  Args: never;
42229
44029
  Returns: {
@@ -42262,6 +44062,18 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
42262
44062
  Args: never;
42263
44063
  Returns: number;
42264
44064
  };
44065
+ consume_floriday_rate_limit: {
44066
+ Args: {
44067
+ p_bucket: string;
44068
+ p_capacity: number;
44069
+ p_cost?: number;
44070
+ p_refill_per_sec: number;
44071
+ };
44072
+ Returns: {
44073
+ granted: boolean;
44074
+ wait_ms: number;
44075
+ }[];
44076
+ };
42265
44077
  control_get_todays_carts: {
42266
44078
  Args: never;
42267
44079
  Returns: {
@@ -42342,6 +44154,12 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
42342
44154
  status: string;
42343
44155
  }[];
42344
44156
  };
44157
+ enqueue_cart_replan_if_unlocked: {
44158
+ Args: {
44159
+ p_order_id: string;
44160
+ };
44161
+ Returns: undefined;
44162
+ };
42345
44163
  ensure_trade_item_stock_row: {
42346
44164
  Args: {
42347
44165
  p_key: string;
@@ -42448,6 +44266,13 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
42448
44266
  office_code: string;
42449
44267
  }[];
42450
44268
  };
44269
+ get_floricode_record_counts: {
44270
+ Args: never;
44271
+ Returns: {
44272
+ count: number;
44273
+ resource: string;
44274
+ }[];
44275
+ };
42451
44276
  get_floriday_agreements_active: {
42452
44277
  Args: {
42453
44278
  p_on_date?: string;
@@ -42539,6 +44364,12 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
42539
44364
  };
42540
44365
  Returns: import("../integrations/supabase/types").Json;
42541
44366
  };
44367
+ get_offer_delivery_options: {
44368
+ Args: {
44369
+ p_code: string;
44370
+ };
44371
+ Returns: import("../integrations/supabase/types").Json;
44372
+ };
42542
44373
  get_offer_recipient_by_code: {
42543
44374
  Args: {
42544
44375
  p_code: string;
@@ -42603,6 +44434,12 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
42603
44434
  Args: never;
42604
44435
  Returns: boolean;
42605
44436
  };
44437
+ is_superadmin: {
44438
+ Args: {
44439
+ _user_id: string;
44440
+ };
44441
+ Returns: boolean;
44442
+ };
42606
44443
  local_effective_price: {
42607
44444
  Args: {
42608
44445
  _customer_id: string;
@@ -42637,6 +44474,13 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
42637
44474
  };
42638
44475
  Returns: string;
42639
44476
  };
44477
+ next_order_number_for_date: {
44478
+ Args: {
44479
+ p_created_at?: string;
44480
+ p_prefix: string;
44481
+ };
44482
+ Returns: string;
44483
+ };
42640
44484
  next_work_order_number: {
42641
44485
  Args: {
42642
44486
  p_parent_work_order_id?: string;
@@ -42644,6 +44488,12 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
42644
44488
  };
42645
44489
  Returns: string;
42646
44490
  };
44491
+ normalize_order_source: {
44492
+ Args: {
44493
+ p_src: string;
44494
+ };
44495
+ Returns: string;
44496
+ };
42647
44497
  normalize_vat: {
42648
44498
  Args: {
42649
44499
  v: string;
@@ -42658,10 +44508,21 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
42658
44508
  };
42659
44509
  Returns: boolean;
42660
44510
  };
44511
+ order_number_prefix: {
44512
+ Args: {
44513
+ p_custom_fields?: import("../integrations/supabase/types").Json;
44514
+ p_order_source: string;
44515
+ };
44516
+ Returns: string;
44517
+ };
42661
44518
  pickstation_get_orders_raw: {
42662
44519
  Args: never;
42663
44520
  Returns: import("../integrations/supabase/types").Json;
42664
44521
  };
44522
+ pickstation_get_planning_context: {
44523
+ Args: never;
44524
+ Returns: import("../integrations/supabase/types").Json;
44525
+ };
42665
44526
  pickstation_get_settings: {
42666
44527
  Args: never;
42667
44528
  Returns: import("../integrations/supabase/types").Json;
@@ -42692,6 +44553,28 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
42692
44553
  };
42693
44554
  Returns: undefined;
42694
44555
  };
44556
+ recompute_order_status: {
44557
+ Args: {
44558
+ p_order_id: string;
44559
+ };
44560
+ Returns: undefined;
44561
+ };
44562
+ recompute_reserved_for_order: {
44563
+ Args: {
44564
+ p_order_id: string;
44565
+ };
44566
+ Returns: undefined;
44567
+ };
44568
+ recompute_reserved_stock: {
44569
+ Args: {
44570
+ p_trade_item_key: string;
44571
+ };
44572
+ Returns: undefined;
44573
+ };
44574
+ refresh_external_customers_grouped: {
44575
+ Args: never;
44576
+ Returns: undefined;
44577
+ };
42695
44578
  refresh_floricode_derived_code_lists: {
42696
44579
  Args: never;
42697
44580
  Returns: {
@@ -42706,6 +44589,12 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
42706
44589
  };
42707
44590
  Returns: number;
42708
44591
  };
44592
+ refresh_floricode_derived_for_products: {
44593
+ Args: {
44594
+ _product_ids: string[];
44595
+ };
44596
+ Returns: number;
44597
+ };
42709
44598
  reset_floriday_sync_cursor: {
42710
44599
  Args: {
42711
44600
  p_connection_id: string;
@@ -42713,6 +44602,12 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
42713
44602
  };
42714
44603
  Returns: undefined;
42715
44604
  };
44605
+ resolve_product_id_for_item: {
44606
+ Args: {
44607
+ p_product_name: string;
44608
+ };
44609
+ Returns: string;
44610
+ };
42716
44611
  schedule_floriday_additional_services_sync: {
42717
44612
  Args: {
42718
44613
  p_apikey: string;
@@ -42990,6 +44885,24 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
42990
44885
  };
42991
44886
  Returns: string[];
42992
44887
  };
44888
+ sync_cached_packing_from_product: {
44889
+ Args: {
44890
+ p_product_id: string;
44891
+ };
44892
+ Returns: undefined;
44893
+ };
44894
+ sync_order_cart_item_packing_from_product: {
44895
+ Args: {
44896
+ p_product_id: string;
44897
+ };
44898
+ Returns: undefined;
44899
+ };
44900
+ sync_product_packing_from_floriday_cache: {
44901
+ Args: {
44902
+ p_floriday_id: string;
44903
+ };
44904
+ Returns: undefined;
44905
+ };
42993
44906
  twinfield_decrypt: {
42994
44907
  Args: {
42995
44908
  cipher: string;
@@ -43002,6 +44915,17 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
43002
44915
  };
43003
44916
  Returns: string;
43004
44917
  };
44918
+ upsert_auto_fulfillment_log: {
44919
+ Args: {
44920
+ p_connection_id: string;
44921
+ p_error?: string;
44922
+ p_fulfillment_order_id?: string;
44923
+ p_reason?: string;
44924
+ p_sales_order_id: string;
44925
+ p_status: string;
44926
+ };
44927
+ Returns: undefined;
44928
+ };
43005
44929
  };
43006
44930
  Enums: {
43007
44931
  app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
@@ -43027,7 +44951,10 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
43027
44951
  Tables: {
43028
44952
  afhandeling_settings: {
43029
44953
  Row: {
44954
+ auto_print_delivery_note: boolean;
44955
+ auto_process_paused: boolean;
43030
44956
  created_at: string;
44957
+ extra_pick_days_with_stickers: number;
43031
44958
  id: string;
43032
44959
  max_workdays_earlier_pick: number;
43033
44960
  pick_days_before_transport: number;
@@ -43041,7 +44968,10 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
43041
44968
  user_id: string;
43042
44969
  };
43043
44970
  Insert: {
44971
+ auto_print_delivery_note?: boolean;
44972
+ auto_process_paused?: boolean;
43044
44973
  created_at?: string;
44974
+ extra_pick_days_with_stickers?: number;
43045
44975
  id?: string;
43046
44976
  max_workdays_earlier_pick?: number;
43047
44977
  pick_days_before_transport?: number;
@@ -43055,7 +44985,10 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
43055
44985
  user_id: string;
43056
44986
  };
43057
44987
  Update: {
44988
+ auto_print_delivery_note?: boolean;
44989
+ auto_process_paused?: boolean;
43058
44990
  created_at?: string;
44991
+ extra_pick_days_with_stickers?: number;
43059
44992
  id?: string;
43060
44993
  max_workdays_earlier_pick?: number;
43061
44994
  pick_days_before_transport?: number;
@@ -43847,6 +45780,36 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
43847
45780
  };
43848
45781
  Relationships: [];
43849
45782
  };
45783
+ cart_replan_queue: {
45784
+ Row: {
45785
+ attempts: number;
45786
+ last_error: string | null;
45787
+ order_id: string;
45788
+ processed_at: string | null;
45789
+ requested_at: string;
45790
+ };
45791
+ Insert: {
45792
+ attempts?: number;
45793
+ last_error?: string | null;
45794
+ order_id: string;
45795
+ processed_at?: string | null;
45796
+ requested_at?: string;
45797
+ };
45798
+ Update: {
45799
+ attempts?: number;
45800
+ last_error?: string | null;
45801
+ order_id?: string;
45802
+ processed_at?: string | null;
45803
+ requested_at?: string;
45804
+ };
45805
+ Relationships: [{
45806
+ foreignKeyName: "cart_replan_queue_order_id_fkey";
45807
+ columns: ["order_id"];
45808
+ isOneToOne: true;
45809
+ referencedRelation: "orders";
45810
+ referencedColumns: ["id"];
45811
+ }];
45812
+ };
43850
45813
  collections: {
43851
45814
  Row: {
43852
45815
  created_at: string;
@@ -45972,34 +47935,52 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
45972
47935
  Row: {
45973
47936
  catalog_key: string | null;
45974
47937
  catalog_url: string;
47938
+ client_id: string | null;
47939
+ client_secret_ciphertext: string | null;
47940
+ client_secret_last4: string | null;
45975
47941
  created_at: string;
45976
47942
  id: number;
45977
47943
  last_meta: import("../integrations/supabase/types").Json | null;
45978
47944
  last_test_at: string | null;
45979
47945
  last_test_error: string | null;
45980
47946
  last_test_ok: boolean | null;
47947
+ last_token_test_at: string | null;
47948
+ last_token_test_error: string | null;
47949
+ last_token_test_ok: boolean | null;
45981
47950
  updated_at: string;
45982
47951
  };
45983
47952
  Insert: {
45984
47953
  catalog_key?: string | null;
45985
47954
  catalog_url?: string;
47955
+ client_id?: string | null;
47956
+ client_secret_ciphertext?: string | null;
47957
+ client_secret_last4?: string | null;
45986
47958
  created_at?: string;
45987
47959
  id?: number;
45988
47960
  last_meta?: import("../integrations/supabase/types").Json | null;
45989
47961
  last_test_at?: string | null;
45990
47962
  last_test_error?: string | null;
45991
47963
  last_test_ok?: boolean | null;
47964
+ last_token_test_at?: string | null;
47965
+ last_token_test_error?: string | null;
47966
+ last_token_test_ok?: boolean | null;
45992
47967
  updated_at?: string;
45993
47968
  };
45994
47969
  Update: {
45995
47970
  catalog_key?: string | null;
45996
47971
  catalog_url?: string;
47972
+ client_id?: string | null;
47973
+ client_secret_ciphertext?: string | null;
47974
+ client_secret_last4?: string | null;
45997
47975
  created_at?: string;
45998
47976
  id?: number;
45999
47977
  last_meta?: import("../integrations/supabase/types").Json | null;
46000
47978
  last_test_at?: string | null;
46001
47979
  last_test_error?: string | null;
46002
47980
  last_test_ok?: boolean | null;
47981
+ last_token_test_at?: string | null;
47982
+ last_token_test_error?: string | null;
47983
+ last_token_test_ok?: boolean | null;
46003
47984
  updated_at?: string;
46004
47985
  };
46005
47986
  Relationships: [];
@@ -46232,6 +48213,54 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
46232
48213
  referencedColumns: ["id"];
46233
48214
  }];
46234
48215
  };
48216
+ floriday_auto_fulfillment_log: {
48217
+ Row: {
48218
+ attempts: number;
48219
+ connection_id: string;
48220
+ created_at: string;
48221
+ error: string | null;
48222
+ fulfillment_order_id: string | null;
48223
+ id: string;
48224
+ last_attempt_at: string | null;
48225
+ reason: string | null;
48226
+ sales_order_id: string;
48227
+ status: string;
48228
+ updated_at: string;
48229
+ };
48230
+ Insert: {
48231
+ attempts?: number;
48232
+ connection_id: string;
48233
+ created_at?: string;
48234
+ error?: string | null;
48235
+ fulfillment_order_id?: string | null;
48236
+ id?: string;
48237
+ last_attempt_at?: string | null;
48238
+ reason?: string | null;
48239
+ sales_order_id: string;
48240
+ status?: string;
48241
+ updated_at?: string;
48242
+ };
48243
+ Update: {
48244
+ attempts?: number;
48245
+ connection_id?: string;
48246
+ created_at?: string;
48247
+ error?: string | null;
48248
+ fulfillment_order_id?: string | null;
48249
+ id?: string;
48250
+ last_attempt_at?: string | null;
48251
+ reason?: string | null;
48252
+ sales_order_id?: string;
48253
+ status?: string;
48254
+ updated_at?: string;
48255
+ };
48256
+ Relationships: [{
48257
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
48258
+ columns: ["connection_id"];
48259
+ isOneToOne: false;
48260
+ referencedRelation: "floriday_connections";
48261
+ referencedColumns: ["id"];
48262
+ }];
48263
+ };
46235
48264
  floriday_base_items_cache: {
46236
48265
  Row: {
46237
48266
  connection_id: string;
@@ -47336,6 +49365,24 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
47336
49365
  referencedColumns: ["id"];
47337
49366
  }];
47338
49367
  };
49368
+ floriday_rate_limit_state: {
49369
+ Row: {
49370
+ bucket: string;
49371
+ last_refill_at: string;
49372
+ tokens: number;
49373
+ };
49374
+ Insert: {
49375
+ bucket: string;
49376
+ last_refill_at?: string;
49377
+ tokens: number;
49378
+ };
49379
+ Update: {
49380
+ bucket?: string;
49381
+ last_refill_at?: string;
49382
+ tokens?: number;
49383
+ };
49384
+ Relationships: [];
49385
+ };
47339
49386
  floriday_resource_schemas: {
47340
49387
  Row: {
47341
49388
  enums: import("../integrations/supabase/types").Json;
@@ -47759,6 +49806,60 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
47759
49806
  referencedColumns: ["id"];
47760
49807
  }];
47761
49808
  };
49809
+ flow_role_assignments: {
49810
+ Row: {
49811
+ created_at: string;
49812
+ id: string;
49813
+ role_id: string;
49814
+ user_id: string;
49815
+ };
49816
+ Insert: {
49817
+ created_at?: string;
49818
+ id?: string;
49819
+ role_id: string;
49820
+ user_id: string;
49821
+ };
49822
+ Update: {
49823
+ created_at?: string;
49824
+ id?: string;
49825
+ role_id?: string;
49826
+ user_id?: string;
49827
+ };
49828
+ Relationships: [{
49829
+ foreignKeyName: "flow_role_assignments_role_id_fkey";
49830
+ columns: ["role_id"];
49831
+ isOneToOne: false;
49832
+ referencedRelation: "flow_roles";
49833
+ referencedColumns: ["id"];
49834
+ }];
49835
+ };
49836
+ flow_roles: {
49837
+ Row: {
49838
+ created_at: string;
49839
+ description: string | null;
49840
+ id: string;
49841
+ module_access: string[];
49842
+ name: string;
49843
+ updated_at: string;
49844
+ };
49845
+ Insert: {
49846
+ created_at?: string;
49847
+ description?: string | null;
49848
+ id?: string;
49849
+ module_access?: string[];
49850
+ name: string;
49851
+ updated_at?: string;
49852
+ };
49853
+ Update: {
49854
+ created_at?: string;
49855
+ description?: string | null;
49856
+ id?: string;
49857
+ module_access?: string[];
49858
+ name?: string;
49859
+ updated_at?: string;
49860
+ };
49861
+ Relationships: [];
49862
+ };
47762
49863
  imap_accounts: {
47763
49864
  Row: {
47764
49865
  created_at: string;
@@ -48390,6 +50491,7 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
48390
50491
  matched_customer_id: string | null;
48391
50492
  message_id: string;
48392
50493
  notes: string | null;
50494
+ order_number: string | null;
48393
50495
  parsed_payload: import("../integrations/supabase/types").Json | null;
48394
50496
  reviewed_at: string | null;
48395
50497
  reviewed_by: string | null;
@@ -48405,6 +50507,7 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
48405
50507
  matched_customer_id?: string | null;
48406
50508
  message_id: string;
48407
50509
  notes?: string | null;
50510
+ order_number?: string | null;
48408
50511
  parsed_payload?: import("../integrations/supabase/types").Json | null;
48409
50512
  reviewed_at?: string | null;
48410
50513
  reviewed_by?: string | null;
@@ -48420,6 +50523,7 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
48420
50523
  matched_customer_id?: string | null;
48421
50524
  message_id?: string;
48422
50525
  notes?: string | null;
50526
+ order_number?: string | null;
48423
50527
  parsed_payload?: import("../integrations/supabase/types").Json | null;
48424
50528
  reviewed_at?: string | null;
48425
50529
  reviewed_by?: string | null;
@@ -49276,6 +51380,7 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
49276
51380
  id: string;
49277
51381
  items: import("../integrations/supabase/types").Json;
49278
51382
  notes: string | null;
51383
+ order_number: string | null;
49279
51384
  recipient_id: string;
49280
51385
  total_amount: number;
49281
51386
  };
@@ -49289,6 +51394,7 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
49289
51394
  id?: string;
49290
51395
  items?: import("../integrations/supabase/types").Json;
49291
51396
  notes?: string | null;
51397
+ order_number?: string | null;
49292
51398
  recipient_id: string;
49293
51399
  total_amount?: number;
49294
51400
  };
@@ -49302,6 +51408,7 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
49302
51408
  id?: string;
49303
51409
  items?: import("../integrations/supabase/types").Json;
49304
51410
  notes?: string | null;
51411
+ order_number?: string | null;
49305
51412
  recipient_id?: string;
49306
51413
  total_amount?: number;
49307
51414
  };
@@ -49461,6 +51568,9 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
49461
51568
  crates_per_layer: number;
49462
51569
  created_at: string;
49463
51570
  id: string;
51571
+ layer_fraction: number;
51572
+ layer_share_pct: number;
51573
+ layers_per_cart: number;
49464
51574
  order_item_id: string | null;
49465
51575
  plants_per_crate: number;
49466
51576
  product_id: string | null;
@@ -49472,6 +51582,9 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
49472
51582
  crates_per_layer?: number;
49473
51583
  created_at?: string;
49474
51584
  id?: string;
51585
+ layer_fraction?: number;
51586
+ layer_share_pct?: number;
51587
+ layers_per_cart?: number;
49475
51588
  order_item_id?: string | null;
49476
51589
  plants_per_crate?: number;
49477
51590
  product_id?: string | null;
@@ -49483,6 +51596,9 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
49483
51596
  crates_per_layer?: number;
49484
51597
  created_at?: string;
49485
51598
  id?: string;
51599
+ layer_fraction?: number;
51600
+ layer_share_pct?: number;
51601
+ layers_per_cart?: number;
49486
51602
  order_item_id?: string | null;
49487
51603
  plants_per_crate?: number;
49488
51604
  product_id?: string | null;
@@ -49510,33 +51626,45 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
49510
51626
  };
49511
51627
  order_carts: {
49512
51628
  Row: {
51629
+ algorithm_version: number;
49513
51630
  cart_number: number;
49514
51631
  created_at: string;
49515
51632
  id: string;
49516
51633
  is_auto: boolean;
49517
51634
  is_complete: boolean;
49518
51635
  notes: string | null;
51636
+ occupancy_pct: number;
49519
51637
  order_id: string;
51638
+ source: string;
51639
+ total_layers_used: number;
49520
51640
  updated_at: string;
49521
51641
  };
49522
51642
  Insert: {
51643
+ algorithm_version?: number;
49523
51644
  cart_number: number;
49524
51645
  created_at?: string;
49525
51646
  id?: string;
49526
51647
  is_auto?: boolean;
49527
51648
  is_complete?: boolean;
49528
51649
  notes?: string | null;
51650
+ occupancy_pct?: number;
49529
51651
  order_id: string;
51652
+ source?: string;
51653
+ total_layers_used?: number;
49530
51654
  updated_at?: string;
49531
51655
  };
49532
51656
  Update: {
51657
+ algorithm_version?: number;
49533
51658
  cart_number?: number;
49534
51659
  created_at?: string;
49535
51660
  id?: string;
49536
51661
  is_auto?: boolean;
49537
51662
  is_complete?: boolean;
49538
51663
  notes?: string | null;
51664
+ occupancy_pct?: number;
49539
51665
  order_id?: string;
51666
+ source?: string;
51667
+ total_layers_used?: number;
49540
51668
  updated_at?: string;
49541
51669
  };
49542
51670
  Relationships: [{
@@ -49689,6 +51817,8 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
49689
51817
  order_date: string;
49690
51818
  order_number: string;
49691
51819
  order_source: string;
51820
+ plan_locked_at: string | null;
51821
+ plan_locked_ref: string | null;
49692
51822
  status: string;
49693
51823
  total: string;
49694
51824
  updated_at: string;
@@ -49705,6 +51835,8 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
49705
51835
  order_date?: string;
49706
51836
  order_number: string;
49707
51837
  order_source?: string;
51838
+ plan_locked_at?: string | null;
51839
+ plan_locked_ref?: string | null;
49708
51840
  status?: string;
49709
51841
  total?: string;
49710
51842
  updated_at?: string;
@@ -49721,6 +51853,8 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
49721
51853
  order_date?: string;
49722
51854
  order_number?: string;
49723
51855
  order_source?: string;
51856
+ plan_locked_at?: string | null;
51857
+ plan_locked_ref?: string | null;
49724
51858
  status?: string;
49725
51859
  total?: string;
49726
51860
  updated_at?: string;
@@ -50093,6 +52227,7 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
50093
52227
  display_name: string | null;
50094
52228
  email: string | null;
50095
52229
  id: string;
52230
+ is_superadmin: boolean;
50096
52231
  notification_preferences: import("../integrations/supabase/types").Json;
50097
52232
  tenant_id: string | null;
50098
52233
  updated_at: string;
@@ -50102,6 +52237,7 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
50102
52237
  display_name?: string | null;
50103
52238
  email?: string | null;
50104
52239
  id: string;
52240
+ is_superadmin?: boolean;
50105
52241
  notification_preferences?: import("../integrations/supabase/types").Json;
50106
52242
  tenant_id?: string | null;
50107
52243
  updated_at?: string;
@@ -50111,6 +52247,7 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
50111
52247
  display_name?: string | null;
50112
52248
  email?: string | null;
50113
52249
  id?: string;
52250
+ is_superadmin?: boolean;
50114
52251
  notification_preferences?: import("../integrations/supabase/types").Json;
50115
52252
  tenant_id?: string | null;
50116
52253
  updated_at?: string;
@@ -50900,6 +53037,24 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
50900
53037
  };
50901
53038
  Relationships: [];
50902
53039
  };
53040
+ sidebar_config: {
53041
+ Row: {
53042
+ id: string;
53043
+ module_order: string[];
53044
+ updated_at: string;
53045
+ };
53046
+ Insert: {
53047
+ id?: string;
53048
+ module_order?: string[];
53049
+ updated_at?: string;
53050
+ };
53051
+ Update: {
53052
+ id?: string;
53053
+ module_order?: string[];
53054
+ updated_at?: string;
53055
+ };
53056
+ Relationships: [];
53057
+ };
50903
53058
  stock_import_runs: {
50904
53059
  Row: {
50905
53060
  connection_id: string | null;
@@ -50958,7 +53113,7 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
50958
53113
  reason: string | null;
50959
53114
  reserved_after: number | null;
50960
53115
  reserved_before: number | null;
50961
- trade_item_key: string;
53116
+ trade_item_key: string | null;
50962
53117
  };
50963
53118
  Insert: {
50964
53119
  connection_id?: string | null;
@@ -50975,7 +53130,7 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
50975
53130
  reason?: string | null;
50976
53131
  reserved_after?: number | null;
50977
53132
  reserved_before?: number | null;
50978
- trade_item_key: string;
53133
+ trade_item_key?: string | null;
50979
53134
  };
50980
53135
  Update: {
50981
53136
  connection_id?: string | null;
@@ -50992,7 +53147,7 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
50992
53147
  reason?: string | null;
50993
53148
  reserved_after?: number | null;
50994
53149
  reserved_before?: number | null;
50995
- trade_item_key?: string;
53150
+ trade_item_key?: string | null;
50996
53151
  };
50997
53152
  Relationships: [];
50998
53153
  };
@@ -51335,6 +53490,114 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
51335
53490
  };
51336
53491
  Relationships: [];
51337
53492
  };
53493
+ trade_item_supply_lines: {
53494
+ Row: {
53495
+ available_quantity: number | null;
53496
+ connection_id: string;
53497
+ created_at: string;
53498
+ currency: string | null;
53499
+ endpoint_family: string | null;
53500
+ environment: string | null;
53501
+ id: string;
53502
+ last_error: string | null;
53503
+ last_status: number | null;
53504
+ packing_configuration_id: string | null;
53505
+ period_end: string | null;
53506
+ period_start: string | null;
53507
+ price_per_piece: number | null;
53508
+ sales_unit: string | null;
53509
+ supply_line_id: string | null;
53510
+ supply_type: string;
53511
+ trade_item_id: string;
53512
+ updated_at: string;
53513
+ user_id: string;
53514
+ week: number | null;
53515
+ year: number | null;
53516
+ };
53517
+ Insert: {
53518
+ available_quantity?: number | null;
53519
+ connection_id: string;
53520
+ created_at?: string;
53521
+ currency?: string | null;
53522
+ endpoint_family?: string | null;
53523
+ environment?: string | null;
53524
+ id?: string;
53525
+ last_error?: string | null;
53526
+ last_status?: number | null;
53527
+ packing_configuration_id?: string | null;
53528
+ period_end?: string | null;
53529
+ period_start?: string | null;
53530
+ price_per_piece?: number | null;
53531
+ sales_unit?: string | null;
53532
+ supply_line_id?: string | null;
53533
+ supply_type?: string;
53534
+ trade_item_id: string;
53535
+ updated_at?: string;
53536
+ user_id: string;
53537
+ week?: number | null;
53538
+ year?: number | null;
53539
+ };
53540
+ Update: {
53541
+ available_quantity?: number | null;
53542
+ connection_id?: string;
53543
+ created_at?: string;
53544
+ currency?: string | null;
53545
+ endpoint_family?: string | null;
53546
+ environment?: string | null;
53547
+ id?: string;
53548
+ last_error?: string | null;
53549
+ last_status?: number | null;
53550
+ packing_configuration_id?: string | null;
53551
+ period_end?: string | null;
53552
+ period_start?: string | null;
53553
+ price_per_piece?: number | null;
53554
+ sales_unit?: string | null;
53555
+ supply_line_id?: string | null;
53556
+ supply_type?: string;
53557
+ trade_item_id?: string;
53558
+ updated_at?: string;
53559
+ user_id?: string;
53560
+ week?: number | null;
53561
+ year?: number | null;
53562
+ };
53563
+ Relationships: [];
53564
+ };
53565
+ trade_item_warehouse_preferences: {
53566
+ Row: {
53567
+ connection_id: string;
53568
+ created_at: string;
53569
+ id: string;
53570
+ trade_item_id: string;
53571
+ updated_at: string;
53572
+ warehouse_id: string;
53573
+ warehouse_name: string | null;
53574
+ };
53575
+ Insert: {
53576
+ connection_id: string;
53577
+ created_at?: string;
53578
+ id?: string;
53579
+ trade_item_id: string;
53580
+ updated_at?: string;
53581
+ warehouse_id: string;
53582
+ warehouse_name?: string | null;
53583
+ };
53584
+ Update: {
53585
+ connection_id?: string;
53586
+ created_at?: string;
53587
+ id?: string;
53588
+ trade_item_id?: string;
53589
+ updated_at?: string;
53590
+ warehouse_id?: string;
53591
+ warehouse_name?: string | null;
53592
+ };
53593
+ Relationships: [{
53594
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
53595
+ columns: ["connection_id"];
53596
+ isOneToOne: false;
53597
+ referencedRelation: "floriday_connections";
53598
+ referencedColumns: ["id"];
53599
+ }];
53600
+ };
51338
53601
  twinfield_connections: {
51339
53602
  Row: {
51340
53603
  access_token: string | null;
@@ -51654,6 +53917,10 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
51654
53917
  default_invoice_type: string;
51655
53918
  default_payment_term_days: number;
51656
53919
  default_vat_code: string;
53920
+ invoice_enabled_ao: boolean;
53921
+ invoice_enabled_fo: boolean;
53922
+ invoice_enabled_ho: boolean;
53923
+ invoice_enabled_mo: boolean;
51657
53924
  updated_at: string;
51658
53925
  user_id: string;
51659
53926
  };
@@ -51663,6 +53930,10 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
51663
53930
  default_invoice_type?: string;
51664
53931
  default_payment_term_days?: number;
51665
53932
  default_vat_code?: string;
53933
+ invoice_enabled_ao?: boolean;
53934
+ invoice_enabled_fo?: boolean;
53935
+ invoice_enabled_ho?: boolean;
53936
+ invoice_enabled_mo?: boolean;
51666
53937
  updated_at?: string;
51667
53938
  user_id: string;
51668
53939
  };
@@ -51672,6 +53943,10 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
51672
53943
  default_invoice_type?: string;
51673
53944
  default_payment_term_days?: number;
51674
53945
  default_vat_code?: string;
53946
+ invoice_enabled_ao?: boolean;
53947
+ invoice_enabled_fo?: boolean;
53948
+ invoice_enabled_ho?: boolean;
53949
+ invoice_enabled_mo?: boolean;
51675
53950
  updated_at?: string;
51676
53951
  user_id?: string;
51677
53952
  };
@@ -52966,6 +55241,12 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
52966
55241
  order_number: string;
52967
55242
  }[];
52968
55243
  };
55244
+ autolink_product_to_floriday: {
55245
+ Args: {
55246
+ p_product_id: string;
55247
+ };
55248
+ Returns: string;
55249
+ };
52969
55250
  backfill_open_order_reservations: {
52970
55251
  Args: never;
52971
55252
  Returns: {
@@ -53004,6 +55285,18 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
53004
55285
  Args: never;
53005
55286
  Returns: number;
53006
55287
  };
55288
+ consume_floriday_rate_limit: {
55289
+ Args: {
55290
+ p_bucket: string;
55291
+ p_capacity: number;
55292
+ p_cost?: number;
55293
+ p_refill_per_sec: number;
55294
+ };
55295
+ Returns: {
55296
+ granted: boolean;
55297
+ wait_ms: number;
55298
+ }[];
55299
+ };
53007
55300
  control_get_todays_carts: {
53008
55301
  Args: never;
53009
55302
  Returns: {
@@ -53084,6 +55377,12 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
53084
55377
  status: string;
53085
55378
  }[];
53086
55379
  };
55380
+ enqueue_cart_replan_if_unlocked: {
55381
+ Args: {
55382
+ p_order_id: string;
55383
+ };
55384
+ Returns: undefined;
55385
+ };
53087
55386
  ensure_trade_item_stock_row: {
53088
55387
  Args: {
53089
55388
  p_key: string;
@@ -53190,6 +55489,13 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
53190
55489
  office_code: string;
53191
55490
  }[];
53192
55491
  };
55492
+ get_floricode_record_counts: {
55493
+ Args: never;
55494
+ Returns: {
55495
+ count: number;
55496
+ resource: string;
55497
+ }[];
55498
+ };
53193
55499
  get_floriday_agreements_active: {
53194
55500
  Args: {
53195
55501
  p_on_date?: string;
@@ -53281,6 +55587,12 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
53281
55587
  };
53282
55588
  Returns: import("../integrations/supabase/types").Json;
53283
55589
  };
55590
+ get_offer_delivery_options: {
55591
+ Args: {
55592
+ p_code: string;
55593
+ };
55594
+ Returns: import("../integrations/supabase/types").Json;
55595
+ };
53284
55596
  get_offer_recipient_by_code: {
53285
55597
  Args: {
53286
55598
  p_code: string;
@@ -53345,6 +55657,12 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
53345
55657
  Args: never;
53346
55658
  Returns: boolean;
53347
55659
  };
55660
+ is_superadmin: {
55661
+ Args: {
55662
+ _user_id: string;
55663
+ };
55664
+ Returns: boolean;
55665
+ };
53348
55666
  local_effective_price: {
53349
55667
  Args: {
53350
55668
  _customer_id: string;
@@ -53379,6 +55697,13 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
53379
55697
  };
53380
55698
  Returns: string;
53381
55699
  };
55700
+ next_order_number_for_date: {
55701
+ Args: {
55702
+ p_created_at?: string;
55703
+ p_prefix: string;
55704
+ };
55705
+ Returns: string;
55706
+ };
53382
55707
  next_work_order_number: {
53383
55708
  Args: {
53384
55709
  p_parent_work_order_id?: string;
@@ -53386,6 +55711,12 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
53386
55711
  };
53387
55712
  Returns: string;
53388
55713
  };
55714
+ normalize_order_source: {
55715
+ Args: {
55716
+ p_src: string;
55717
+ };
55718
+ Returns: string;
55719
+ };
53389
55720
  normalize_vat: {
53390
55721
  Args: {
53391
55722
  v: string;
@@ -53400,10 +55731,21 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
53400
55731
  };
53401
55732
  Returns: boolean;
53402
55733
  };
55734
+ order_number_prefix: {
55735
+ Args: {
55736
+ p_custom_fields?: import("../integrations/supabase/types").Json;
55737
+ p_order_source: string;
55738
+ };
55739
+ Returns: string;
55740
+ };
53403
55741
  pickstation_get_orders_raw: {
53404
55742
  Args: never;
53405
55743
  Returns: import("../integrations/supabase/types").Json;
53406
55744
  };
55745
+ pickstation_get_planning_context: {
55746
+ Args: never;
55747
+ Returns: import("../integrations/supabase/types").Json;
55748
+ };
53407
55749
  pickstation_get_settings: {
53408
55750
  Args: never;
53409
55751
  Returns: import("../integrations/supabase/types").Json;
@@ -53434,6 +55776,28 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
53434
55776
  };
53435
55777
  Returns: undefined;
53436
55778
  };
55779
+ recompute_order_status: {
55780
+ Args: {
55781
+ p_order_id: string;
55782
+ };
55783
+ Returns: undefined;
55784
+ };
55785
+ recompute_reserved_for_order: {
55786
+ Args: {
55787
+ p_order_id: string;
55788
+ };
55789
+ Returns: undefined;
55790
+ };
55791
+ recompute_reserved_stock: {
55792
+ Args: {
55793
+ p_trade_item_key: string;
55794
+ };
55795
+ Returns: undefined;
55796
+ };
55797
+ refresh_external_customers_grouped: {
55798
+ Args: never;
55799
+ Returns: undefined;
55800
+ };
53437
55801
  refresh_floricode_derived_code_lists: {
53438
55802
  Args: never;
53439
55803
  Returns: {
@@ -53448,6 +55812,12 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
53448
55812
  };
53449
55813
  Returns: number;
53450
55814
  };
55815
+ refresh_floricode_derived_for_products: {
55816
+ Args: {
55817
+ _product_ids: string[];
55818
+ };
55819
+ Returns: number;
55820
+ };
53451
55821
  reset_floriday_sync_cursor: {
53452
55822
  Args: {
53453
55823
  p_connection_id: string;
@@ -53455,6 +55825,12 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
53455
55825
  };
53456
55826
  Returns: undefined;
53457
55827
  };
55828
+ resolve_product_id_for_item: {
55829
+ Args: {
55830
+ p_product_name: string;
55831
+ };
55832
+ Returns: string;
55833
+ };
53458
55834
  schedule_floriday_additional_services_sync: {
53459
55835
  Args: {
53460
55836
  p_apikey: string;
@@ -53732,6 +56108,24 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
53732
56108
  };
53733
56109
  Returns: string[];
53734
56110
  };
56111
+ sync_cached_packing_from_product: {
56112
+ Args: {
56113
+ p_product_id: string;
56114
+ };
56115
+ Returns: undefined;
56116
+ };
56117
+ sync_order_cart_item_packing_from_product: {
56118
+ Args: {
56119
+ p_product_id: string;
56120
+ };
56121
+ Returns: undefined;
56122
+ };
56123
+ sync_product_packing_from_floriday_cache: {
56124
+ Args: {
56125
+ p_floriday_id: string;
56126
+ };
56127
+ Returns: undefined;
56128
+ };
53735
56129
  twinfield_decrypt: {
53736
56130
  Args: {
53737
56131
  cipher: string;
@@ -53744,6 +56138,17 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
53744
56138
  };
53745
56139
  Returns: string;
53746
56140
  };
56141
+ upsert_auto_fulfillment_log: {
56142
+ Args: {
56143
+ p_connection_id: string;
56144
+ p_error?: string;
56145
+ p_fulfillment_order_id?: string;
56146
+ p_reason?: string;
56147
+ p_sales_order_id: string;
56148
+ p_status: string;
56149
+ };
56150
+ Returns: undefined;
56151
+ };
53747
56152
  };
53748
56153
  Enums: {
53749
56154
  app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";