@flowselections/floriday-afhandeling-module 1.0.11 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist-lib/components/afhandeling/ControleLijstPrint.d.ts.map +1 -1
  2. package/dist-lib/components/afhandeling/ControleLijstPrint.js +63 -2
  3. package/dist-lib/components/afhandeling/ControlePage.d.ts +3 -1
  4. package/dist-lib/components/afhandeling/ControlePage.d.ts.map +1 -1
  5. package/dist-lib/components/afhandeling/ControlePage.js +6 -2
  6. package/dist-lib/components/pickstation/KioskControle.d.ts +2 -0
  7. package/dist-lib/components/pickstation/KioskControle.d.ts.map +1 -0
  8. package/dist-lib/components/pickstation/KioskControle.js +7 -0
  9. package/dist-lib/components/pickstation/PickstationPage.d.ts +2 -0
  10. package/dist-lib/components/pickstation/PickstationPage.d.ts.map +1 -0
  11. package/dist-lib/components/pickstation/PickstationPage.js +217 -0
  12. package/dist-lib/index.d.ts +2 -0
  13. package/dist-lib/index.d.ts.map +1 -1
  14. package/dist-lib/index.js +2 -0
  15. package/dist-lib/integrations/supabase/auth-middleware.d.ts +885 -60
  16. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  17. package/dist-lib/integrations/supabase/client.d.ts +885 -60
  18. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  19. package/dist-lib/integrations/supabase/client.server.d.ts +885 -60
  20. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  21. package/dist-lib/integrations/supabase/types.d.ts +907 -62
  22. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  23. package/dist-lib/lib/afhandelingSettings.functions.d.ts +1767 -117
  24. package/dist-lib/lib/afhandelingSettings.functions.d.ts.map +1 -1
  25. package/dist-lib/lib/carriers.functions.d.ts +4125 -0
  26. package/dist-lib/lib/carriers.functions.d.ts.map +1 -1
  27. package/dist-lib/lib/cartAssignments.functions.d.ts +4125 -0
  28. package/dist-lib/lib/cartAssignments.functions.d.ts.map +1 -1
  29. package/dist-lib/lib/cartControl.functions.d.ts +8253 -0
  30. package/dist-lib/lib/cartControl.functions.d.ts.map +1 -1
  31. package/dist-lib/lib/cartControl.functions.js +3 -0
  32. package/dist-lib/lib/floriday.functions.d.ts +885 -60
  33. package/dist-lib/lib/floriday.functions.d.ts.map +1 -1
  34. package/dist-lib/lib/pickstationOrders.server.d.ts.map +1 -1
  35. package/dist-lib/lib/pickstationOrders.server.js +1 -0
  36. package/dist-lib/lib/pickstationTypes.d.ts +2 -0
  37. package/dist-lib/lib/pickstationTypes.d.ts.map +1 -1
  38. package/package.json +20 -1
@@ -726,6 +726,7 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
726
726
  notes: string | null;
727
727
  performed_at: string;
728
728
  rescheduled_count: number;
729
+ stock_consumed_at: string | null;
729
730
  total_carts: number;
730
731
  updated_at: string;
731
732
  user_id: string;
@@ -739,6 +740,7 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
739
740
  notes?: string | null;
740
741
  performed_at?: string;
741
742
  rescheduled_count?: number;
743
+ stock_consumed_at?: string | null;
742
744
  total_carts?: number;
743
745
  updated_at?: string;
744
746
  user_id: string;
@@ -752,6 +754,7 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
752
754
  notes?: string | null;
753
755
  performed_at?: string;
754
756
  rescheduled_count?: number;
757
+ stock_consumed_at?: string | null;
755
758
  total_carts?: number;
756
759
  updated_at?: string;
757
760
  user_id?: string;
@@ -3632,6 +3635,51 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
3632
3635
  referencedColumns: ["id"];
3633
3636
  }];
3634
3637
  };
3638
+ floriday_continuous_stock_queue: {
3639
+ Row: {
3640
+ attempts: number;
3641
+ connection_id: string;
3642
+ created_at: string;
3643
+ gateway_attempt_id: string | null;
3644
+ id: string;
3645
+ last_error: string | null;
3646
+ number_of_pieces: number;
3647
+ sent_at: string | null;
3648
+ status: string;
3649
+ trade_item_id: string;
3650
+ updated_at: string;
3651
+ user_id: string;
3652
+ };
3653
+ Insert: {
3654
+ attempts?: number;
3655
+ connection_id: string;
3656
+ created_at?: string;
3657
+ gateway_attempt_id?: string | null;
3658
+ id?: string;
3659
+ last_error?: string | null;
3660
+ number_of_pieces?: number;
3661
+ sent_at?: string | null;
3662
+ status?: string;
3663
+ trade_item_id: string;
3664
+ updated_at?: string;
3665
+ user_id: string;
3666
+ };
3667
+ Update: {
3668
+ attempts?: number;
3669
+ connection_id?: string;
3670
+ created_at?: string;
3671
+ gateway_attempt_id?: string | null;
3672
+ id?: string;
3673
+ last_error?: string | null;
3674
+ number_of_pieces?: number;
3675
+ sent_at?: string | null;
3676
+ status?: string;
3677
+ trade_item_id?: string;
3678
+ updated_at?: string;
3679
+ user_id?: string;
3680
+ };
3681
+ Relationships: [];
3682
+ };
3635
3683
  floriday_contract_trade_item_groups_cache: {
3636
3684
  Row: {
3637
3685
  connection_id: string;
@@ -5021,6 +5069,204 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
5021
5069
  };
5022
5070
  Relationships: [];
5023
5071
  };
5072
+ local_customer_agreements: {
5073
+ Row: {
5074
+ base_price: number | null;
5075
+ created_at: string;
5076
+ currency: string;
5077
+ customer_id: string;
5078
+ id: string;
5079
+ min_quantity: number;
5080
+ net_price: number;
5081
+ notes: string | null;
5082
+ product_category_id: string | null;
5083
+ product_id: string | null;
5084
+ updated_at: string;
5085
+ valid_from: string | null;
5086
+ valid_until: string | null;
5087
+ };
5088
+ Insert: {
5089
+ base_price?: number | null;
5090
+ created_at?: string;
5091
+ currency?: string;
5092
+ customer_id: string;
5093
+ id?: string;
5094
+ min_quantity?: number;
5095
+ net_price: number;
5096
+ notes?: string | null;
5097
+ product_category_id?: string | null;
5098
+ product_id?: string | null;
5099
+ updated_at?: string;
5100
+ valid_from?: string | null;
5101
+ valid_until?: string | null;
5102
+ };
5103
+ Update: {
5104
+ base_price?: number | null;
5105
+ created_at?: string;
5106
+ currency?: string;
5107
+ customer_id?: string;
5108
+ id?: string;
5109
+ min_quantity?: number;
5110
+ net_price?: number;
5111
+ notes?: string | null;
5112
+ product_category_id?: string | null;
5113
+ product_id?: string | null;
5114
+ updated_at?: string;
5115
+ valid_from?: string | null;
5116
+ valid_until?: string | null;
5117
+ };
5118
+ Relationships: [{
5119
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
5120
+ columns: ["customer_id"];
5121
+ isOneToOne: false;
5122
+ referencedRelation: "customers";
5123
+ referencedColumns: ["id"];
5124
+ }, {
5125
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
5126
+ columns: ["product_category_id"];
5127
+ isOneToOne: false;
5128
+ referencedRelation: "product_categories";
5129
+ referencedColumns: ["id"];
5130
+ }, {
5131
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
5132
+ columns: ["product_id"];
5133
+ isOneToOne: false;
5134
+ referencedRelation: "products";
5135
+ referencedColumns: ["id"];
5136
+ }];
5137
+ };
5138
+ local_customer_price_groups: {
5139
+ Row: {
5140
+ created_at: string;
5141
+ currency: string;
5142
+ customer_id: string;
5143
+ discount_type: string;
5144
+ discount_value: number;
5145
+ id: string;
5146
+ min_quantity: number;
5147
+ notes: string | null;
5148
+ product_category_id: string | null;
5149
+ product_id: string | null;
5150
+ updated_at: string;
5151
+ valid_from: string | null;
5152
+ valid_until: string | null;
5153
+ };
5154
+ Insert: {
5155
+ created_at?: string;
5156
+ currency?: string;
5157
+ customer_id: string;
5158
+ discount_type: string;
5159
+ discount_value: number;
5160
+ id?: string;
5161
+ min_quantity?: number;
5162
+ notes?: string | null;
5163
+ product_category_id?: string | null;
5164
+ product_id?: string | null;
5165
+ updated_at?: string;
5166
+ valid_from?: string | null;
5167
+ valid_until?: string | null;
5168
+ };
5169
+ Update: {
5170
+ created_at?: string;
5171
+ currency?: string;
5172
+ customer_id?: string;
5173
+ discount_type?: string;
5174
+ discount_value?: number;
5175
+ id?: string;
5176
+ min_quantity?: number;
5177
+ notes?: string | null;
5178
+ product_category_id?: string | null;
5179
+ product_id?: string | null;
5180
+ updated_at?: string;
5181
+ valid_from?: string | null;
5182
+ valid_until?: string | null;
5183
+ };
5184
+ Relationships: [{
5185
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
5186
+ columns: ["customer_id"];
5187
+ isOneToOne: false;
5188
+ referencedRelation: "customers";
5189
+ referencedColumns: ["id"];
5190
+ }, {
5191
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
5192
+ columns: ["product_category_id"];
5193
+ isOneToOne: false;
5194
+ referencedRelation: "product_categories";
5195
+ referencedColumns: ["id"];
5196
+ }, {
5197
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
5198
+ columns: ["product_id"];
5199
+ isOneToOne: false;
5200
+ referencedRelation: "products";
5201
+ referencedColumns: ["id"];
5202
+ }];
5203
+ };
5204
+ local_customer_sales_strategies: {
5205
+ Row: {
5206
+ created_at: string;
5207
+ currency: string;
5208
+ customer_id: string;
5209
+ discount_type: string;
5210
+ discount_value: number;
5211
+ id: string;
5212
+ min_quantity: number;
5213
+ notes: string | null;
5214
+ product_category_id: string | null;
5215
+ product_id: string | null;
5216
+ updated_at: string;
5217
+ valid_from: string | null;
5218
+ valid_until: string | null;
5219
+ };
5220
+ Insert: {
5221
+ created_at?: string;
5222
+ currency?: string;
5223
+ customer_id: string;
5224
+ discount_type: string;
5225
+ discount_value: number;
5226
+ id?: string;
5227
+ min_quantity?: number;
5228
+ notes?: string | null;
5229
+ product_category_id?: string | null;
5230
+ product_id?: string | null;
5231
+ updated_at?: string;
5232
+ valid_from?: string | null;
5233
+ valid_until?: string | null;
5234
+ };
5235
+ Update: {
5236
+ created_at?: string;
5237
+ currency?: string;
5238
+ customer_id?: string;
5239
+ discount_type?: string;
5240
+ discount_value?: number;
5241
+ id?: string;
5242
+ min_quantity?: number;
5243
+ notes?: string | null;
5244
+ product_category_id?: string | null;
5245
+ product_id?: string | null;
5246
+ updated_at?: string;
5247
+ valid_from?: string | null;
5248
+ valid_until?: string | null;
5249
+ };
5250
+ Relationships: [{
5251
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
5252
+ columns: ["customer_id"];
5253
+ isOneToOne: false;
5254
+ referencedRelation: "customers";
5255
+ referencedColumns: ["id"];
5256
+ }, {
5257
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
5258
+ columns: ["product_category_id"];
5259
+ isOneToOne: false;
5260
+ referencedRelation: "product_categories";
5261
+ referencedColumns: ["id"];
5262
+ }, {
5263
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
5264
+ columns: ["product_id"];
5265
+ isOneToOne: false;
5266
+ referencedRelation: "products";
5267
+ referencedColumns: ["id"];
5268
+ }];
5269
+ };
5024
5270
  locations: {
5025
5271
  Row: {
5026
5272
  created_at: string;
@@ -5528,6 +5774,273 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
5528
5774
  referencedColumns: ["id"];
5529
5775
  }];
5530
5776
  };
5777
+ nmbrs_component_mapping: {
5778
+ Row: {
5779
+ created_at: string;
5780
+ id: string;
5781
+ source_kind: string;
5782
+ source_value: string | null;
5783
+ updated_at: string;
5784
+ wage_code: string;
5785
+ };
5786
+ Insert: {
5787
+ created_at?: string;
5788
+ id?: string;
5789
+ source_kind: string;
5790
+ source_value?: string | null;
5791
+ updated_at?: string;
5792
+ wage_code: string;
5793
+ };
5794
+ Update: {
5795
+ created_at?: string;
5796
+ id?: string;
5797
+ source_kind?: string;
5798
+ source_value?: string | null;
5799
+ updated_at?: string;
5800
+ wage_code?: string;
5801
+ };
5802
+ Relationships: [{
5803
+ foreignKeyName: "nmbrs_component_mapping_wage_code_fkey";
5804
+ columns: ["wage_code"];
5805
+ isOneToOne: false;
5806
+ referencedRelation: "nmbrs_wage_components";
5807
+ referencedColumns: ["code"];
5808
+ }];
5809
+ };
5810
+ nmbrs_employee_mapping: {
5811
+ Row: {
5812
+ active_from: string | null;
5813
+ active_to: string | null;
5814
+ contract_hours_per_week: number | null;
5815
+ created_at: string;
5816
+ hourly_wage: number | null;
5817
+ id: string;
5818
+ monteur_id: string;
5819
+ nmbrs_company_code: string | null;
5820
+ nmbrs_employee_number: string;
5821
+ updated_at: string;
5822
+ };
5823
+ Insert: {
5824
+ active_from?: string | null;
5825
+ active_to?: string | null;
5826
+ contract_hours_per_week?: number | null;
5827
+ created_at?: string;
5828
+ hourly_wage?: number | null;
5829
+ id?: string;
5830
+ monteur_id: string;
5831
+ nmbrs_company_code?: string | null;
5832
+ nmbrs_employee_number: string;
5833
+ updated_at?: string;
5834
+ };
5835
+ Update: {
5836
+ active_from?: string | null;
5837
+ active_to?: string | null;
5838
+ contract_hours_per_week?: number | null;
5839
+ created_at?: string;
5840
+ hourly_wage?: number | null;
5841
+ id?: string;
5842
+ monteur_id?: string;
5843
+ nmbrs_company_code?: string | null;
5844
+ nmbrs_employee_number?: string;
5845
+ updated_at?: string;
5846
+ };
5847
+ Relationships: [{
5848
+ foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
5849
+ columns: ["monteur_id"];
5850
+ isOneToOne: true;
5851
+ referencedRelation: "monteurs";
5852
+ referencedColumns: ["id"];
5853
+ }];
5854
+ };
5855
+ nmbrs_export_lines: {
5856
+ Row: {
5857
+ amount: number;
5858
+ created_at: string;
5859
+ entry_date: string;
5860
+ hours: number;
5861
+ id: string;
5862
+ monteur_id: string;
5863
+ nmbrs_employee_number: string | null;
5864
+ notes: string | null;
5865
+ run_id: string;
5866
+ source_kind: string | null;
5867
+ source_ref_id: string | null;
5868
+ updated_at: string;
5869
+ wage_code: string;
5870
+ };
5871
+ Insert: {
5872
+ amount?: number;
5873
+ created_at?: string;
5874
+ entry_date: string;
5875
+ hours?: number;
5876
+ id?: string;
5877
+ monteur_id: string;
5878
+ nmbrs_employee_number?: string | null;
5879
+ notes?: string | null;
5880
+ run_id: string;
5881
+ source_kind?: string | null;
5882
+ source_ref_id?: string | null;
5883
+ updated_at?: string;
5884
+ wage_code: string;
5885
+ };
5886
+ Update: {
5887
+ amount?: number;
5888
+ created_at?: string;
5889
+ entry_date?: string;
5890
+ hours?: number;
5891
+ id?: string;
5892
+ monteur_id?: string;
5893
+ nmbrs_employee_number?: string | null;
5894
+ notes?: string | null;
5895
+ run_id?: string;
5896
+ source_kind?: string | null;
5897
+ source_ref_id?: string | null;
5898
+ updated_at?: string;
5899
+ wage_code?: string;
5900
+ };
5901
+ Relationships: [{
5902
+ foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
5903
+ columns: ["monteur_id"];
5904
+ isOneToOne: false;
5905
+ referencedRelation: "monteurs";
5906
+ referencedColumns: ["id"];
5907
+ }, {
5908
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
5909
+ columns: ["run_id"];
5910
+ isOneToOne: false;
5911
+ referencedRelation: "nmbrs_export_runs";
5912
+ referencedColumns: ["id"];
5913
+ }, {
5914
+ foreignKeyName: "nmbrs_export_lines_wage_code_fkey";
5915
+ columns: ["wage_code"];
5916
+ isOneToOne: false;
5917
+ referencedRelation: "nmbrs_wage_components";
5918
+ referencedColumns: ["code"];
5919
+ }];
5920
+ };
5921
+ nmbrs_export_runs: {
5922
+ Row: {
5923
+ created_at: string;
5924
+ file_name: string | null;
5925
+ generated_at: string;
5926
+ generated_by: string | null;
5927
+ id: string;
5928
+ notes: string | null;
5929
+ period_end: string;
5930
+ period_label: string;
5931
+ period_start: string;
5932
+ status: string;
5933
+ total_hours: number;
5934
+ total_lines: number;
5935
+ updated_at: string;
5936
+ };
5937
+ Insert: {
5938
+ created_at?: string;
5939
+ file_name?: string | null;
5940
+ generated_at?: string;
5941
+ generated_by?: string | null;
5942
+ id?: string;
5943
+ notes?: string | null;
5944
+ period_end: string;
5945
+ period_label: string;
5946
+ period_start: string;
5947
+ status?: string;
5948
+ total_hours?: number;
5949
+ total_lines?: number;
5950
+ updated_at?: string;
5951
+ };
5952
+ Update: {
5953
+ created_at?: string;
5954
+ file_name?: string | null;
5955
+ generated_at?: string;
5956
+ generated_by?: string | null;
5957
+ id?: string;
5958
+ notes?: string | null;
5959
+ period_end?: string;
5960
+ period_label?: string;
5961
+ period_start?: string;
5962
+ status?: string;
5963
+ total_hours?: number;
5964
+ total_lines?: number;
5965
+ updated_at?: string;
5966
+ };
5967
+ Relationships: [];
5968
+ };
5969
+ nmbrs_settings: {
5970
+ Row: {
5971
+ created_at: string;
5972
+ default_company_code: string | null;
5973
+ id: boolean;
5974
+ include_travel: boolean;
5975
+ overtime_threshold_daily: number;
5976
+ overtime_threshold_weekly: number;
5977
+ period_type: string;
5978
+ updated_at: string;
5979
+ updated_by: string | null;
5980
+ week_start_day: number;
5981
+ };
5982
+ Insert: {
5983
+ created_at?: string;
5984
+ default_company_code?: string | null;
5985
+ id?: boolean;
5986
+ include_travel?: boolean;
5987
+ overtime_threshold_daily?: number;
5988
+ overtime_threshold_weekly?: number;
5989
+ period_type?: string;
5990
+ updated_at?: string;
5991
+ updated_by?: string | null;
5992
+ week_start_day?: number;
5993
+ };
5994
+ Update: {
5995
+ created_at?: string;
5996
+ default_company_code?: string | null;
5997
+ id?: boolean;
5998
+ include_travel?: boolean;
5999
+ overtime_threshold_daily?: number;
6000
+ overtime_threshold_weekly?: number;
6001
+ period_type?: string;
6002
+ updated_at?: string;
6003
+ updated_by?: string | null;
6004
+ week_start_day?: number;
6005
+ };
6006
+ Relationships: [];
6007
+ };
6008
+ nmbrs_wage_components: {
6009
+ Row: {
6010
+ category: string;
6011
+ code: string;
6012
+ created_at: string;
6013
+ id: string;
6014
+ is_active: boolean;
6015
+ label: string;
6016
+ sort_order: number;
6017
+ unit: string;
6018
+ updated_at: string;
6019
+ };
6020
+ Insert: {
6021
+ category: string;
6022
+ code: string;
6023
+ created_at?: string;
6024
+ id?: string;
6025
+ is_active?: boolean;
6026
+ label: string;
6027
+ sort_order?: number;
6028
+ unit: string;
6029
+ updated_at?: string;
6030
+ };
6031
+ Update: {
6032
+ category?: string;
6033
+ code?: string;
6034
+ created_at?: string;
6035
+ id?: string;
6036
+ is_active?: boolean;
6037
+ label?: string;
6038
+ sort_order?: number;
6039
+ unit?: string;
6040
+ updated_at?: string;
6041
+ };
6042
+ Relationships: [];
6043
+ };
5531
6044
  notifications: {
5532
6045
  Row: {
5533
6046
  created_at: string;
@@ -6510,6 +7023,7 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
6510
7023
  purchase_price: number | null;
6511
7024
  quantity: number;
6512
7025
  sale_price: number | null;
7026
+ trade_item_key: string | null;
6513
7027
  unit: string;
6514
7028
  updated_at: string;
6515
7029
  weight: string | null;
@@ -6532,6 +7046,7 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
6532
7046
  purchase_price?: number | null;
6533
7047
  quantity?: number;
6534
7048
  sale_price?: number | null;
7049
+ trade_item_key?: string | null;
6535
7050
  unit?: string;
6536
7051
  updated_at?: string;
6537
7052
  weight?: string | null;
@@ -6554,6 +7069,7 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
6554
7069
  purchase_price?: number | null;
6555
7070
  quantity?: number;
6556
7071
  sale_price?: number | null;
7072
+ trade_item_key?: string | null;
6557
7073
  unit?: string;
6558
7074
  updated_at?: string;
6559
7075
  weight?: string | null;
@@ -7373,6 +7889,102 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
7373
7889
  };
7374
7890
  Relationships: [];
7375
7891
  };
7892
+ stock_import_runs: {
7893
+ Row: {
7894
+ connection_id: string | null;
7895
+ created_at: string;
7896
+ created_rows: number;
7897
+ errors: import("../integrations/supabase/types").Json;
7898
+ filename: string | null;
7899
+ id: string;
7900
+ mutations: import("../integrations/supabase/types").Json;
7901
+ skipped_rows: number;
7902
+ total_rows: number;
7903
+ updated_rows: number;
7904
+ user_id: string;
7905
+ };
7906
+ Insert: {
7907
+ connection_id?: string | null;
7908
+ created_at?: string;
7909
+ created_rows?: number;
7910
+ errors?: import("../integrations/supabase/types").Json;
7911
+ filename?: string | null;
7912
+ id?: string;
7913
+ mutations?: import("../integrations/supabase/types").Json;
7914
+ skipped_rows?: number;
7915
+ total_rows?: number;
7916
+ updated_rows?: number;
7917
+ user_id: string;
7918
+ };
7919
+ Update: {
7920
+ connection_id?: string | null;
7921
+ created_at?: string;
7922
+ created_rows?: number;
7923
+ errors?: import("../integrations/supabase/types").Json;
7924
+ filename?: string | null;
7925
+ id?: string;
7926
+ mutations?: import("../integrations/supabase/types").Json;
7927
+ skipped_rows?: number;
7928
+ total_rows?: number;
7929
+ updated_rows?: number;
7930
+ user_id?: string;
7931
+ };
7932
+ Relationships: [];
7933
+ };
7934
+ stock_mutation_log: {
7935
+ Row: {
7936
+ connection_id: string | null;
7937
+ created_at: string;
7938
+ created_by: string | null;
7939
+ id: string;
7940
+ mutation_type: string;
7941
+ order_id: string | null;
7942
+ order_item_id: string | null;
7943
+ order_source: string | null;
7944
+ physical_after: number | null;
7945
+ physical_before: number | null;
7946
+ qty_delta: number;
7947
+ reason: string | null;
7948
+ reserved_after: number | null;
7949
+ reserved_before: number | null;
7950
+ trade_item_key: string;
7951
+ };
7952
+ Insert: {
7953
+ connection_id?: string | null;
7954
+ created_at?: string;
7955
+ created_by?: string | null;
7956
+ id?: string;
7957
+ mutation_type: string;
7958
+ order_id?: string | null;
7959
+ order_item_id?: string | null;
7960
+ order_source?: string | null;
7961
+ physical_after?: number | null;
7962
+ physical_before?: number | null;
7963
+ qty_delta: number;
7964
+ reason?: string | null;
7965
+ reserved_after?: number | null;
7966
+ reserved_before?: number | null;
7967
+ trade_item_key: string;
7968
+ };
7969
+ Update: {
7970
+ connection_id?: string | null;
7971
+ created_at?: string;
7972
+ created_by?: string | null;
7973
+ id?: string;
7974
+ mutation_type?: string;
7975
+ order_id?: string | null;
7976
+ order_item_id?: string | null;
7977
+ order_source?: string | null;
7978
+ physical_after?: number | null;
7979
+ physical_before?: number | null;
7980
+ qty_delta?: number;
7981
+ reason?: string | null;
7982
+ reserved_after?: number | null;
7983
+ reserved_before?: number | null;
7984
+ trade_item_key?: string;
7985
+ };
7986
+ Relationships: [];
7987
+ };
7376
7988
  supplier_products: {
7377
7989
  Row: {
7378
7990
  article_number: string | null;
@@ -8950,6 +9562,44 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
8950
9562
  };
8951
9563
  Relationships: [];
8952
9564
  };
9565
+ floriday_customer_discounts: {
9566
+ Row: {
9567
+ base_price: number | null;
9568
+ buyer_organization_id: string | null;
9569
+ currency: string | null;
9570
+ discount_type: string | null;
9571
+ discount_value: number | null;
9572
+ min_quantity: number | null;
9573
+ net_price: number | null;
9574
+ product_group_id: string | null;
9575
+ raw: import("../integrations/supabase/types").Json | null;
9576
+ source: string | null;
9577
+ source_id: string | null;
9578
+ trade_item_id: string | null;
9579
+ valid_from: string | null;
9580
+ valid_until: string | null;
9581
+ };
9582
+ Relationships: [];
9583
+ };
9584
+ local_customer_discounts: {
9585
+ Row: {
9586
+ base_price: number | null;
9587
+ currency: string | null;
9588
+ customer_id: string | null;
9589
+ discount_type: string | null;
9590
+ discount_value: number | null;
9591
+ min_quantity: number | null;
9592
+ net_price: number | null;
9593
+ product_category_id: string | null;
9594
+ product_id: string | null;
9595
+ product_name: string | null;
9596
+ source: string | null;
9597
+ source_id: string | null;
9598
+ valid_from: string | null;
9599
+ valid_until: string | null;
9600
+ };
9601
+ Relationships: [];
9602
+ };
8953
9603
  manufacture_product_possible_stock_view: {
8954
9604
  Row: {
8955
9605
  component_count: number | null;
@@ -9234,6 +9884,54 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
9234
9884
  };
9235
9885
  Returns: number;
9236
9886
  };
9887
+ afh_city_code: {
9888
+ Args: {
9889
+ _city: string;
9890
+ _country: string;
9891
+ };
9892
+ Returns: string;
9893
+ };
9894
+ afh_normalize_country: {
9895
+ Args: {
9896
+ _raw: string;
9897
+ };
9898
+ Returns: string;
9899
+ };
9900
+ afh_normalize_nl_province: {
9901
+ Args: {
9902
+ _raw: string;
9903
+ };
9904
+ Returns: string;
9905
+ };
9906
+ afh_subtract_workdays: {
9907
+ Args: {
9908
+ _date: string;
9909
+ _days: number;
9910
+ };
9911
+ Returns: string;
9912
+ };
9913
+ apply_stock_consumption: {
9914
+ Args: {
9915
+ p_order_id: string;
9916
+ p_order_item_id: string;
9917
+ p_qty: number;
9918
+ p_reason: string;
9919
+ p_source: string;
9920
+ p_trade_item_key: string;
9921
+ };
9922
+ Returns: undefined;
9923
+ };
9924
+ apply_stock_reservation: {
9925
+ Args: {
9926
+ p_order_id: string;
9927
+ p_order_item_id: string;
9928
+ p_qty: number;
9929
+ p_reason: string;
9930
+ p_source: string;
9931
+ p_trade_item_key: string;
9932
+ };
9933
+ Returns: undefined;
9934
+ };
9237
9935
  assign_cart_numbers: {
9238
9936
  Args: {
9239
9937
  p_carts: import("../integrations/supabase/types").Json;
@@ -9257,12 +9955,40 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
9257
9955
  order_number: string;
9258
9956
  }[];
9259
9957
  };
9958
+ backfill_open_order_reservations: {
9959
+ Args: never;
9960
+ Returns: {
9961
+ processed_items: number;
9962
+ }[];
9963
+ };
9260
9964
  call_exact_route: {
9261
9965
  Args: {
9262
9966
  path: string;
9263
9967
  };
9264
9968
  Returns: number;
9265
9969
  };
9970
+ check_offer_product_available_stock: {
9971
+ Args: {
9972
+ p_campaign_product_id: string;
9973
+ p_code: string;
9974
+ p_needed_qty?: number;
9975
+ p_product_name?: string;
9976
+ };
9977
+ Returns: import("../integrations/supabase/types").Json;
9978
+ };
9979
+ check_trade_item_available_stock: {
9980
+ Args: {
9981
+ p_connection_id?: string;
9982
+ p_context?: string;
9983
+ p_needed_qty?: number;
9984
+ p_order_id?: string;
9985
+ p_order_item_id?: string;
9986
+ p_owner_id?: string;
9987
+ p_product_name?: string;
9988
+ p_trade_item_key: string;
9989
+ };
9990
+ Returns: import("../integrations/supabase/types").Json;
9991
+ };
9266
9992
  cleanup_old_bookings: {
9267
9993
  Args: never;
9268
9994
  Returns: number;
@@ -9306,6 +10032,12 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
9306
10032
  table_name: string;
9307
10033
  }[];
9308
10034
  };
10035
+ dispatch_carrier_signups_sql: {
10036
+ Args: {
10037
+ _catchup?: string;
10038
+ };
10039
+ Returns: import("../integrations/supabase/types").Json;
10040
+ };
9309
10041
  email_auth_decrypt: {
9310
10042
  Args: {
9311
10043
  cipher: string;
@@ -9341,6 +10073,12 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
9341
10073
  status: string;
9342
10074
  }[];
9343
10075
  };
10076
+ ensure_trade_item_stock_row: {
10077
+ Args: {
10078
+ p_key: string;
10079
+ };
10080
+ Returns: undefined;
10081
+ };
9344
10082
  ensure_user_tenant: {
9345
10083
  Args: never;
9346
10084
  Returns: string;
@@ -9378,6 +10116,31 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
9378
10116
  };
9379
10117
  Returns: boolean;
9380
10118
  };
10119
+ find_trade_item_key: {
10120
+ Args: {
10121
+ p_barcode: string;
10122
+ p_name: string;
10123
+ p_product_id: string;
10124
+ };
10125
+ Returns: string;
10126
+ };
10127
+ floriday_effective_price: {
10128
+ Args: {
10129
+ _buyer_id: string;
10130
+ _on_date?: string;
10131
+ _quantity?: number;
10132
+ _trade_item_id: string;
10133
+ };
10134
+ Returns: {
10135
+ base_price: number;
10136
+ currency: string;
10137
+ discount_type: string;
10138
+ discount_value: number;
10139
+ net_price: number;
10140
+ source: string;
10141
+ source_id: string;
10142
+ }[];
10143
+ };
9381
10144
  format_cart_number: {
9382
10145
  Args: {
9383
10146
  p_pick_date: string;
@@ -9398,6 +10161,13 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
9398
10161
  preferred_warehouse_name: string;
9399
10162
  }[];
9400
10163
  };
10164
+ get_active_floriday_context: {
10165
+ Args: never;
10166
+ Returns: {
10167
+ connection_id: string;
10168
+ user_id: string;
10169
+ }[];
10170
+ };
9401
10171
  get_active_twinfield_public: {
9402
10172
  Args: never;
9403
10173
  Returns: {
@@ -9500,6 +10270,18 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
9500
10270
  };
9501
10271
  Returns: import("../integrations/supabase/types").Json;
9502
10272
  };
10273
+ get_offer_recipient_by_code: {
10274
+ Args: {
10275
+ p_code: string;
10276
+ };
10277
+ Returns: {
10278
+ campaign_id: string;
10279
+ clicked_at: string;
10280
+ customer_id: string;
10281
+ id: string;
10282
+ ordered_at: string;
10283
+ }[];
10284
+ };
9503
10285
  get_or_assign_floriday_order_number: {
9504
10286
  Args: {
9505
10287
  p_floriday_id: string;
@@ -9552,6 +10334,34 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
9552
10334
  Args: never;
9553
10335
  Returns: boolean;
9554
10336
  };
10337
+ local_effective_price: {
10338
+ Args: {
10339
+ _customer_id: string;
10340
+ _on_date?: string;
10341
+ _product_id: string;
10342
+ _quantity?: number;
10343
+ };
10344
+ Returns: {
10345
+ currency: string;
10346
+ discount_type: string;
10347
+ discount_value: number;
10348
+ net_price: number;
10349
+ source: string;
10350
+ source_id: string;
10351
+ }[];
10352
+ };
10353
+ mark_offer_clicked: {
10354
+ Args: {
10355
+ p_code: string;
10356
+ };
10357
+ Returns: undefined;
10358
+ };
10359
+ mark_offer_ordered: {
10360
+ Args: {
10361
+ p_code: string;
10362
+ };
10363
+ Returns: undefined;
10364
+ };
9555
10365
  next_order_number: {
9556
10366
  Args: {
9557
10367
  p_prefix: string;
@@ -9571,6 +10381,14 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
9571
10381
  };
9572
10382
  Returns: string;
9573
10383
  };
10384
+ offer_recipient_matches: {
10385
+ Args: {
10386
+ _campaign_id: string;
10387
+ _customer_id: string;
10388
+ _recipient_id: string;
10389
+ };
10390
+ Returns: boolean;
10391
+ };
9574
10392
  pickstation_get_orders_raw: {
9575
10393
  Args: never;
9576
10394
  Returns: import("../integrations/supabase/types").Json;
@@ -9598,6 +10416,13 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
9598
10416
  };
9599
10417
  Returns: undefined;
9600
10418
  };
10419
+ promote_trade_item_key: {
10420
+ Args: {
10421
+ p_new: string;
10422
+ p_old: string;
10423
+ };
10424
+ Returns: undefined;
10425
+ };
9601
10426
  refresh_floricode_derived_code_lists: {
9602
10427
  Args: never;
9603
10428
  Returns: {
@@ -10646,6 +11471,7 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
10646
11471
  notes: string | null;
10647
11472
  performed_at: string;
10648
11473
  rescheduled_count: number;
11474
+ stock_consumed_at: string | null;
10649
11475
  total_carts: number;
10650
11476
  updated_at: string;
10651
11477
  user_id: string;
@@ -10659,6 +11485,7 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
10659
11485
  notes?: string | null;
10660
11486
  performed_at?: string;
10661
11487
  rescheduled_count?: number;
11488
+ stock_consumed_at?: string | null;
10662
11489
  total_carts?: number;
10663
11490
  updated_at?: string;
10664
11491
  user_id: string;
@@ -10672,6 +11499,7 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
10672
11499
  notes?: string | null;
10673
11500
  performed_at?: string;
10674
11501
  rescheduled_count?: number;
11502
+ stock_consumed_at?: string | null;
10675
11503
  total_carts?: number;
10676
11504
  updated_at?: string;
10677
11505
  user_id?: string;
@@ -13552,6 +14380,51 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
13552
14380
  referencedColumns: ["id"];
13553
14381
  }];
13554
14382
  };
14383
+ floriday_continuous_stock_queue: {
14384
+ Row: {
14385
+ attempts: number;
14386
+ connection_id: string;
14387
+ created_at: string;
14388
+ gateway_attempt_id: string | null;
14389
+ id: string;
14390
+ last_error: string | null;
14391
+ number_of_pieces: number;
14392
+ sent_at: string | null;
14393
+ status: string;
14394
+ trade_item_id: string;
14395
+ updated_at: string;
14396
+ user_id: string;
14397
+ };
14398
+ Insert: {
14399
+ attempts?: number;
14400
+ connection_id: string;
14401
+ created_at?: string;
14402
+ gateway_attempt_id?: string | null;
14403
+ id?: string;
14404
+ last_error?: string | null;
14405
+ number_of_pieces?: number;
14406
+ sent_at?: string | null;
14407
+ status?: string;
14408
+ trade_item_id: string;
14409
+ updated_at?: string;
14410
+ user_id: string;
14411
+ };
14412
+ Update: {
14413
+ attempts?: number;
14414
+ connection_id?: string;
14415
+ created_at?: string;
14416
+ gateway_attempt_id?: string | null;
14417
+ id?: string;
14418
+ last_error?: string | null;
14419
+ number_of_pieces?: number;
14420
+ sent_at?: string | null;
14421
+ status?: string;
14422
+ trade_item_id?: string;
14423
+ updated_at?: string;
14424
+ user_id?: string;
14425
+ };
14426
+ Relationships: [];
14427
+ };
13555
14428
  floriday_contract_trade_item_groups_cache: {
13556
14429
  Row: {
13557
14430
  connection_id: string;
@@ -14941,6 +15814,204 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
14941
15814
  };
14942
15815
  Relationships: [];
14943
15816
  };
15817
+ local_customer_agreements: {
15818
+ Row: {
15819
+ base_price: number | null;
15820
+ created_at: string;
15821
+ currency: string;
15822
+ customer_id: string;
15823
+ id: string;
15824
+ min_quantity: number;
15825
+ net_price: number;
15826
+ notes: string | null;
15827
+ product_category_id: string | null;
15828
+ product_id: string | null;
15829
+ updated_at: string;
15830
+ valid_from: string | null;
15831
+ valid_until: string | null;
15832
+ };
15833
+ Insert: {
15834
+ base_price?: number | null;
15835
+ created_at?: string;
15836
+ currency?: string;
15837
+ customer_id: string;
15838
+ id?: string;
15839
+ min_quantity?: number;
15840
+ net_price: number;
15841
+ notes?: string | null;
15842
+ product_category_id?: string | null;
15843
+ product_id?: string | null;
15844
+ updated_at?: string;
15845
+ valid_from?: string | null;
15846
+ valid_until?: string | null;
15847
+ };
15848
+ Update: {
15849
+ base_price?: number | null;
15850
+ created_at?: string;
15851
+ currency?: string;
15852
+ customer_id?: string;
15853
+ id?: string;
15854
+ min_quantity?: number;
15855
+ net_price?: number;
15856
+ notes?: string | null;
15857
+ product_category_id?: string | null;
15858
+ product_id?: string | null;
15859
+ updated_at?: string;
15860
+ valid_from?: string | null;
15861
+ valid_until?: string | null;
15862
+ };
15863
+ Relationships: [{
15864
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
15865
+ columns: ["customer_id"];
15866
+ isOneToOne: false;
15867
+ referencedRelation: "customers";
15868
+ referencedColumns: ["id"];
15869
+ }, {
15870
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
15871
+ columns: ["product_category_id"];
15872
+ isOneToOne: false;
15873
+ referencedRelation: "product_categories";
15874
+ referencedColumns: ["id"];
15875
+ }, {
15876
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
15877
+ columns: ["product_id"];
15878
+ isOneToOne: false;
15879
+ referencedRelation: "products";
15880
+ referencedColumns: ["id"];
15881
+ }];
15882
+ };
15883
+ local_customer_price_groups: {
15884
+ Row: {
15885
+ created_at: string;
15886
+ currency: string;
15887
+ customer_id: string;
15888
+ discount_type: string;
15889
+ discount_value: number;
15890
+ id: string;
15891
+ min_quantity: number;
15892
+ notes: string | null;
15893
+ product_category_id: string | null;
15894
+ product_id: string | null;
15895
+ updated_at: string;
15896
+ valid_from: string | null;
15897
+ valid_until: string | null;
15898
+ };
15899
+ Insert: {
15900
+ created_at?: string;
15901
+ currency?: string;
15902
+ customer_id: string;
15903
+ discount_type: string;
15904
+ discount_value: number;
15905
+ id?: string;
15906
+ min_quantity?: number;
15907
+ notes?: string | null;
15908
+ product_category_id?: string | null;
15909
+ product_id?: string | null;
15910
+ updated_at?: string;
15911
+ valid_from?: string | null;
15912
+ valid_until?: string | null;
15913
+ };
15914
+ Update: {
15915
+ created_at?: string;
15916
+ currency?: string;
15917
+ customer_id?: string;
15918
+ discount_type?: string;
15919
+ discount_value?: number;
15920
+ id?: string;
15921
+ min_quantity?: number;
15922
+ notes?: string | null;
15923
+ product_category_id?: string | null;
15924
+ product_id?: string | null;
15925
+ updated_at?: string;
15926
+ valid_from?: string | null;
15927
+ valid_until?: string | null;
15928
+ };
15929
+ Relationships: [{
15930
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
15931
+ columns: ["customer_id"];
15932
+ isOneToOne: false;
15933
+ referencedRelation: "customers";
15934
+ referencedColumns: ["id"];
15935
+ }, {
15936
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
15937
+ columns: ["product_category_id"];
15938
+ isOneToOne: false;
15939
+ referencedRelation: "product_categories";
15940
+ referencedColumns: ["id"];
15941
+ }, {
15942
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
15943
+ columns: ["product_id"];
15944
+ isOneToOne: false;
15945
+ referencedRelation: "products";
15946
+ referencedColumns: ["id"];
15947
+ }];
15948
+ };
15949
+ local_customer_sales_strategies: {
15950
+ Row: {
15951
+ created_at: string;
15952
+ currency: string;
15953
+ customer_id: string;
15954
+ discount_type: string;
15955
+ discount_value: number;
15956
+ id: string;
15957
+ min_quantity: number;
15958
+ notes: string | null;
15959
+ product_category_id: string | null;
15960
+ product_id: string | null;
15961
+ updated_at: string;
15962
+ valid_from: string | null;
15963
+ valid_until: string | null;
15964
+ };
15965
+ Insert: {
15966
+ created_at?: string;
15967
+ currency?: string;
15968
+ customer_id: string;
15969
+ discount_type: string;
15970
+ discount_value: number;
15971
+ id?: string;
15972
+ min_quantity?: number;
15973
+ notes?: string | null;
15974
+ product_category_id?: string | null;
15975
+ product_id?: string | null;
15976
+ updated_at?: string;
15977
+ valid_from?: string | null;
15978
+ valid_until?: string | null;
15979
+ };
15980
+ Update: {
15981
+ created_at?: string;
15982
+ currency?: string;
15983
+ customer_id?: string;
15984
+ discount_type?: string;
15985
+ discount_value?: number;
15986
+ id?: string;
15987
+ min_quantity?: number;
15988
+ notes?: string | null;
15989
+ product_category_id?: string | null;
15990
+ product_id?: string | null;
15991
+ updated_at?: string;
15992
+ valid_from?: string | null;
15993
+ valid_until?: string | null;
15994
+ };
15995
+ Relationships: [{
15996
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
15997
+ columns: ["customer_id"];
15998
+ isOneToOne: false;
15999
+ referencedRelation: "customers";
16000
+ referencedColumns: ["id"];
16001
+ }, {
16002
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
16003
+ columns: ["product_category_id"];
16004
+ isOneToOne: false;
16005
+ referencedRelation: "product_categories";
16006
+ referencedColumns: ["id"];
16007
+ }, {
16008
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
16009
+ columns: ["product_id"];
16010
+ isOneToOne: false;
16011
+ referencedRelation: "products";
16012
+ referencedColumns: ["id"];
16013
+ }];
16014
+ };
14944
16015
  locations: {
14945
16016
  Row: {
14946
16017
  created_at: string;
@@ -15448,6 +16519,273 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
15448
16519
  referencedColumns: ["id"];
15449
16520
  }];
15450
16521
  };
16522
+ nmbrs_component_mapping: {
16523
+ Row: {
16524
+ created_at: string;
16525
+ id: string;
16526
+ source_kind: string;
16527
+ source_value: string | null;
16528
+ updated_at: string;
16529
+ wage_code: string;
16530
+ };
16531
+ Insert: {
16532
+ created_at?: string;
16533
+ id?: string;
16534
+ source_kind: string;
16535
+ source_value?: string | null;
16536
+ updated_at?: string;
16537
+ wage_code: string;
16538
+ };
16539
+ Update: {
16540
+ created_at?: string;
16541
+ id?: string;
16542
+ source_kind?: string;
16543
+ source_value?: string | null;
16544
+ updated_at?: string;
16545
+ wage_code?: string;
16546
+ };
16547
+ Relationships: [{
16548
+ foreignKeyName: "nmbrs_component_mapping_wage_code_fkey";
16549
+ columns: ["wage_code"];
16550
+ isOneToOne: false;
16551
+ referencedRelation: "nmbrs_wage_components";
16552
+ referencedColumns: ["code"];
16553
+ }];
16554
+ };
16555
+ nmbrs_employee_mapping: {
16556
+ Row: {
16557
+ active_from: string | null;
16558
+ active_to: string | null;
16559
+ contract_hours_per_week: number | null;
16560
+ created_at: string;
16561
+ hourly_wage: number | null;
16562
+ id: string;
16563
+ monteur_id: string;
16564
+ nmbrs_company_code: string | null;
16565
+ nmbrs_employee_number: string;
16566
+ updated_at: string;
16567
+ };
16568
+ Insert: {
16569
+ active_from?: string | null;
16570
+ active_to?: string | null;
16571
+ contract_hours_per_week?: number | null;
16572
+ created_at?: string;
16573
+ hourly_wage?: number | null;
16574
+ id?: string;
16575
+ monteur_id: string;
16576
+ nmbrs_company_code?: string | null;
16577
+ nmbrs_employee_number: string;
16578
+ updated_at?: string;
16579
+ };
16580
+ Update: {
16581
+ active_from?: string | null;
16582
+ active_to?: string | null;
16583
+ contract_hours_per_week?: number | null;
16584
+ created_at?: string;
16585
+ hourly_wage?: number | null;
16586
+ id?: string;
16587
+ monteur_id?: string;
16588
+ nmbrs_company_code?: string | null;
16589
+ nmbrs_employee_number?: string;
16590
+ updated_at?: string;
16591
+ };
16592
+ Relationships: [{
16593
+ foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
16594
+ columns: ["monteur_id"];
16595
+ isOneToOne: true;
16596
+ referencedRelation: "monteurs";
16597
+ referencedColumns: ["id"];
16598
+ }];
16599
+ };
16600
+ nmbrs_export_lines: {
16601
+ Row: {
16602
+ amount: number;
16603
+ created_at: string;
16604
+ entry_date: string;
16605
+ hours: number;
16606
+ id: string;
16607
+ monteur_id: string;
16608
+ nmbrs_employee_number: string | null;
16609
+ notes: string | null;
16610
+ run_id: string;
16611
+ source_kind: string | null;
16612
+ source_ref_id: string | null;
16613
+ updated_at: string;
16614
+ wage_code: string;
16615
+ };
16616
+ Insert: {
16617
+ amount?: number;
16618
+ created_at?: string;
16619
+ entry_date: string;
16620
+ hours?: number;
16621
+ id?: string;
16622
+ monteur_id: string;
16623
+ nmbrs_employee_number?: string | null;
16624
+ notes?: string | null;
16625
+ run_id: string;
16626
+ source_kind?: string | null;
16627
+ source_ref_id?: string | null;
16628
+ updated_at?: string;
16629
+ wage_code: string;
16630
+ };
16631
+ Update: {
16632
+ amount?: number;
16633
+ created_at?: string;
16634
+ entry_date?: string;
16635
+ hours?: number;
16636
+ id?: string;
16637
+ monteur_id?: string;
16638
+ nmbrs_employee_number?: string | null;
16639
+ notes?: string | null;
16640
+ run_id?: string;
16641
+ source_kind?: string | null;
16642
+ source_ref_id?: string | null;
16643
+ updated_at?: string;
16644
+ wage_code?: string;
16645
+ };
16646
+ Relationships: [{
16647
+ foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
16648
+ columns: ["monteur_id"];
16649
+ isOneToOne: false;
16650
+ referencedRelation: "monteurs";
16651
+ referencedColumns: ["id"];
16652
+ }, {
16653
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
16654
+ columns: ["run_id"];
16655
+ isOneToOne: false;
16656
+ referencedRelation: "nmbrs_export_runs";
16657
+ referencedColumns: ["id"];
16658
+ }, {
16659
+ foreignKeyName: "nmbrs_export_lines_wage_code_fkey";
16660
+ columns: ["wage_code"];
16661
+ isOneToOne: false;
16662
+ referencedRelation: "nmbrs_wage_components";
16663
+ referencedColumns: ["code"];
16664
+ }];
16665
+ };
16666
+ nmbrs_export_runs: {
16667
+ Row: {
16668
+ created_at: string;
16669
+ file_name: string | null;
16670
+ generated_at: string;
16671
+ generated_by: string | null;
16672
+ id: string;
16673
+ notes: string | null;
16674
+ period_end: string;
16675
+ period_label: string;
16676
+ period_start: string;
16677
+ status: string;
16678
+ total_hours: number;
16679
+ total_lines: number;
16680
+ updated_at: string;
16681
+ };
16682
+ Insert: {
16683
+ created_at?: string;
16684
+ file_name?: string | null;
16685
+ generated_at?: string;
16686
+ generated_by?: string | null;
16687
+ id?: string;
16688
+ notes?: string | null;
16689
+ period_end: string;
16690
+ period_label: string;
16691
+ period_start: string;
16692
+ status?: string;
16693
+ total_hours?: number;
16694
+ total_lines?: number;
16695
+ updated_at?: string;
16696
+ };
16697
+ Update: {
16698
+ created_at?: string;
16699
+ file_name?: string | null;
16700
+ generated_at?: string;
16701
+ generated_by?: string | null;
16702
+ id?: string;
16703
+ notes?: string | null;
16704
+ period_end?: string;
16705
+ period_label?: string;
16706
+ period_start?: string;
16707
+ status?: string;
16708
+ total_hours?: number;
16709
+ total_lines?: number;
16710
+ updated_at?: string;
16711
+ };
16712
+ Relationships: [];
16713
+ };
16714
+ nmbrs_settings: {
16715
+ Row: {
16716
+ created_at: string;
16717
+ default_company_code: string | null;
16718
+ id: boolean;
16719
+ include_travel: boolean;
16720
+ overtime_threshold_daily: number;
16721
+ overtime_threshold_weekly: number;
16722
+ period_type: string;
16723
+ updated_at: string;
16724
+ updated_by: string | null;
16725
+ week_start_day: number;
16726
+ };
16727
+ Insert: {
16728
+ created_at?: string;
16729
+ default_company_code?: string | null;
16730
+ id?: boolean;
16731
+ include_travel?: boolean;
16732
+ overtime_threshold_daily?: number;
16733
+ overtime_threshold_weekly?: number;
16734
+ period_type?: string;
16735
+ updated_at?: string;
16736
+ updated_by?: string | null;
16737
+ week_start_day?: number;
16738
+ };
16739
+ Update: {
16740
+ created_at?: string;
16741
+ default_company_code?: string | null;
16742
+ id?: boolean;
16743
+ include_travel?: boolean;
16744
+ overtime_threshold_daily?: number;
16745
+ overtime_threshold_weekly?: number;
16746
+ period_type?: string;
16747
+ updated_at?: string;
16748
+ updated_by?: string | null;
16749
+ week_start_day?: number;
16750
+ };
16751
+ Relationships: [];
16752
+ };
16753
+ nmbrs_wage_components: {
16754
+ Row: {
16755
+ category: string;
16756
+ code: string;
16757
+ created_at: string;
16758
+ id: string;
16759
+ is_active: boolean;
16760
+ label: string;
16761
+ sort_order: number;
16762
+ unit: string;
16763
+ updated_at: string;
16764
+ };
16765
+ Insert: {
16766
+ category: string;
16767
+ code: string;
16768
+ created_at?: string;
16769
+ id?: string;
16770
+ is_active?: boolean;
16771
+ label: string;
16772
+ sort_order?: number;
16773
+ unit: string;
16774
+ updated_at?: string;
16775
+ };
16776
+ Update: {
16777
+ category?: string;
16778
+ code?: string;
16779
+ created_at?: string;
16780
+ id?: string;
16781
+ is_active?: boolean;
16782
+ label?: string;
16783
+ sort_order?: number;
16784
+ unit?: string;
16785
+ updated_at?: string;
16786
+ };
16787
+ Relationships: [];
16788
+ };
15451
16789
  notifications: {
15452
16790
  Row: {
15453
16791
  created_at: string;
@@ -16430,6 +17768,7 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
16430
17768
  purchase_price: number | null;
16431
17769
  quantity: number;
16432
17770
  sale_price: number | null;
17771
+ trade_item_key: string | null;
16433
17772
  unit: string;
16434
17773
  updated_at: string;
16435
17774
  weight: string | null;
@@ -16452,6 +17791,7 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
16452
17791
  purchase_price?: number | null;
16453
17792
  quantity?: number;
16454
17793
  sale_price?: number | null;
17794
+ trade_item_key?: string | null;
16455
17795
  unit?: string;
16456
17796
  updated_at?: string;
16457
17797
  weight?: string | null;
@@ -16474,6 +17814,7 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
16474
17814
  purchase_price?: number | null;
16475
17815
  quantity?: number;
16476
17816
  sale_price?: number | null;
17817
+ trade_item_key?: string | null;
16477
17818
  unit?: string;
16478
17819
  updated_at?: string;
16479
17820
  weight?: string | null;
@@ -17293,6 +18634,102 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
17293
18634
  };
17294
18635
  Relationships: [];
17295
18636
  };
18637
+ stock_import_runs: {
18638
+ Row: {
18639
+ connection_id: string | null;
18640
+ created_at: string;
18641
+ created_rows: number;
18642
+ errors: import("../integrations/supabase/types").Json;
18643
+ filename: string | null;
18644
+ id: string;
18645
+ mutations: import("../integrations/supabase/types").Json;
18646
+ skipped_rows: number;
18647
+ total_rows: number;
18648
+ updated_rows: number;
18649
+ user_id: string;
18650
+ };
18651
+ Insert: {
18652
+ connection_id?: string | null;
18653
+ created_at?: string;
18654
+ created_rows?: number;
18655
+ errors?: import("../integrations/supabase/types").Json;
18656
+ filename?: string | null;
18657
+ id?: string;
18658
+ mutations?: import("../integrations/supabase/types").Json;
18659
+ skipped_rows?: number;
18660
+ total_rows?: number;
18661
+ updated_rows?: number;
18662
+ user_id: string;
18663
+ };
18664
+ Update: {
18665
+ connection_id?: string | null;
18666
+ created_at?: string;
18667
+ created_rows?: number;
18668
+ errors?: import("../integrations/supabase/types").Json;
18669
+ filename?: string | null;
18670
+ id?: string;
18671
+ mutations?: import("../integrations/supabase/types").Json;
18672
+ skipped_rows?: number;
18673
+ total_rows?: number;
18674
+ updated_rows?: number;
18675
+ user_id?: string;
18676
+ };
18677
+ Relationships: [];
18678
+ };
18679
+ stock_mutation_log: {
18680
+ Row: {
18681
+ connection_id: string | null;
18682
+ created_at: string;
18683
+ created_by: string | null;
18684
+ id: string;
18685
+ mutation_type: string;
18686
+ order_id: string | null;
18687
+ order_item_id: string | null;
18688
+ order_source: string | null;
18689
+ physical_after: number | null;
18690
+ physical_before: number | null;
18691
+ qty_delta: number;
18692
+ reason: string | null;
18693
+ reserved_after: number | null;
18694
+ reserved_before: number | null;
18695
+ trade_item_key: string;
18696
+ };
18697
+ Insert: {
18698
+ connection_id?: string | null;
18699
+ created_at?: string;
18700
+ created_by?: string | null;
18701
+ id?: string;
18702
+ mutation_type: string;
18703
+ order_id?: string | null;
18704
+ order_item_id?: string | null;
18705
+ order_source?: string | null;
18706
+ physical_after?: number | null;
18707
+ physical_before?: number | null;
18708
+ qty_delta: number;
18709
+ reason?: string | null;
18710
+ reserved_after?: number | null;
18711
+ reserved_before?: number | null;
18712
+ trade_item_key: string;
18713
+ };
18714
+ Update: {
18715
+ connection_id?: string | null;
18716
+ created_at?: string;
18717
+ created_by?: string | null;
18718
+ id?: string;
18719
+ mutation_type?: string;
18720
+ order_id?: string | null;
18721
+ order_item_id?: string | null;
18722
+ order_source?: string | null;
18723
+ physical_after?: number | null;
18724
+ physical_before?: number | null;
18725
+ qty_delta?: number;
18726
+ reason?: string | null;
18727
+ reserved_after?: number | null;
18728
+ reserved_before?: number | null;
18729
+ trade_item_key?: string;
18730
+ };
18731
+ Relationships: [];
18732
+ };
17296
18733
  supplier_products: {
17297
18734
  Row: {
17298
18735
  article_number: string | null;
@@ -18870,6 +20307,44 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
18870
20307
  };
18871
20308
  Relationships: [];
18872
20309
  };
20310
+ floriday_customer_discounts: {
20311
+ Row: {
20312
+ base_price: number | null;
20313
+ buyer_organization_id: string | null;
20314
+ currency: string | null;
20315
+ discount_type: string | null;
20316
+ discount_value: number | null;
20317
+ min_quantity: number | null;
20318
+ net_price: number | null;
20319
+ product_group_id: string | null;
20320
+ raw: import("../integrations/supabase/types").Json | null;
20321
+ source: string | null;
20322
+ source_id: string | null;
20323
+ trade_item_id: string | null;
20324
+ valid_from: string | null;
20325
+ valid_until: string | null;
20326
+ };
20327
+ Relationships: [];
20328
+ };
20329
+ local_customer_discounts: {
20330
+ Row: {
20331
+ base_price: number | null;
20332
+ currency: string | null;
20333
+ customer_id: string | null;
20334
+ discount_type: string | null;
20335
+ discount_value: number | null;
20336
+ min_quantity: number | null;
20337
+ net_price: number | null;
20338
+ product_category_id: string | null;
20339
+ product_id: string | null;
20340
+ product_name: string | null;
20341
+ source: string | null;
20342
+ source_id: string | null;
20343
+ valid_from: string | null;
20344
+ valid_until: string | null;
20345
+ };
20346
+ Relationships: [];
20347
+ };
18873
20348
  manufacture_product_possible_stock_view: {
18874
20349
  Row: {
18875
20350
  component_count: number | null;
@@ -19154,6 +20629,54 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
19154
20629
  };
19155
20630
  Returns: number;
19156
20631
  };
20632
+ afh_city_code: {
20633
+ Args: {
20634
+ _city: string;
20635
+ _country: string;
20636
+ };
20637
+ Returns: string;
20638
+ };
20639
+ afh_normalize_country: {
20640
+ Args: {
20641
+ _raw: string;
20642
+ };
20643
+ Returns: string;
20644
+ };
20645
+ afh_normalize_nl_province: {
20646
+ Args: {
20647
+ _raw: string;
20648
+ };
20649
+ Returns: string;
20650
+ };
20651
+ afh_subtract_workdays: {
20652
+ Args: {
20653
+ _date: string;
20654
+ _days: number;
20655
+ };
20656
+ Returns: string;
20657
+ };
20658
+ apply_stock_consumption: {
20659
+ Args: {
20660
+ p_order_id: string;
20661
+ p_order_item_id: string;
20662
+ p_qty: number;
20663
+ p_reason: string;
20664
+ p_source: string;
20665
+ p_trade_item_key: string;
20666
+ };
20667
+ Returns: undefined;
20668
+ };
20669
+ apply_stock_reservation: {
20670
+ Args: {
20671
+ p_order_id: string;
20672
+ p_order_item_id: string;
20673
+ p_qty: number;
20674
+ p_reason: string;
20675
+ p_source: string;
20676
+ p_trade_item_key: string;
20677
+ };
20678
+ Returns: undefined;
20679
+ };
19157
20680
  assign_cart_numbers: {
19158
20681
  Args: {
19159
20682
  p_carts: import("../integrations/supabase/types").Json;
@@ -19177,12 +20700,40 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
19177
20700
  order_number: string;
19178
20701
  }[];
19179
20702
  };
20703
+ backfill_open_order_reservations: {
20704
+ Args: never;
20705
+ Returns: {
20706
+ processed_items: number;
20707
+ }[];
20708
+ };
19180
20709
  call_exact_route: {
19181
20710
  Args: {
19182
20711
  path: string;
19183
20712
  };
19184
20713
  Returns: number;
19185
20714
  };
20715
+ check_offer_product_available_stock: {
20716
+ Args: {
20717
+ p_campaign_product_id: string;
20718
+ p_code: string;
20719
+ p_needed_qty?: number;
20720
+ p_product_name?: string;
20721
+ };
20722
+ Returns: import("../integrations/supabase/types").Json;
20723
+ };
20724
+ check_trade_item_available_stock: {
20725
+ Args: {
20726
+ p_connection_id?: string;
20727
+ p_context?: string;
20728
+ p_needed_qty?: number;
20729
+ p_order_id?: string;
20730
+ p_order_item_id?: string;
20731
+ p_owner_id?: string;
20732
+ p_product_name?: string;
20733
+ p_trade_item_key: string;
20734
+ };
20735
+ Returns: import("../integrations/supabase/types").Json;
20736
+ };
19186
20737
  cleanup_old_bookings: {
19187
20738
  Args: never;
19188
20739
  Returns: number;
@@ -19226,6 +20777,12 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
19226
20777
  table_name: string;
19227
20778
  }[];
19228
20779
  };
20780
+ dispatch_carrier_signups_sql: {
20781
+ Args: {
20782
+ _catchup?: string;
20783
+ };
20784
+ Returns: import("../integrations/supabase/types").Json;
20785
+ };
19229
20786
  email_auth_decrypt: {
19230
20787
  Args: {
19231
20788
  cipher: string;
@@ -19261,6 +20818,12 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
19261
20818
  status: string;
19262
20819
  }[];
19263
20820
  };
20821
+ ensure_trade_item_stock_row: {
20822
+ Args: {
20823
+ p_key: string;
20824
+ };
20825
+ Returns: undefined;
20826
+ };
19264
20827
  ensure_user_tenant: {
19265
20828
  Args: never;
19266
20829
  Returns: string;
@@ -19298,6 +20861,31 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
19298
20861
  };
19299
20862
  Returns: boolean;
19300
20863
  };
20864
+ find_trade_item_key: {
20865
+ Args: {
20866
+ p_barcode: string;
20867
+ p_name: string;
20868
+ p_product_id: string;
20869
+ };
20870
+ Returns: string;
20871
+ };
20872
+ floriday_effective_price: {
20873
+ Args: {
20874
+ _buyer_id: string;
20875
+ _on_date?: string;
20876
+ _quantity?: number;
20877
+ _trade_item_id: string;
20878
+ };
20879
+ Returns: {
20880
+ base_price: number;
20881
+ currency: string;
20882
+ discount_type: string;
20883
+ discount_value: number;
20884
+ net_price: number;
20885
+ source: string;
20886
+ source_id: string;
20887
+ }[];
20888
+ };
19301
20889
  format_cart_number: {
19302
20890
  Args: {
19303
20891
  p_pick_date: string;
@@ -19318,6 +20906,13 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
19318
20906
  preferred_warehouse_name: string;
19319
20907
  }[];
19320
20908
  };
20909
+ get_active_floriday_context: {
20910
+ Args: never;
20911
+ Returns: {
20912
+ connection_id: string;
20913
+ user_id: string;
20914
+ }[];
20915
+ };
19321
20916
  get_active_twinfield_public: {
19322
20917
  Args: never;
19323
20918
  Returns: {
@@ -19420,6 +21015,18 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
19420
21015
  };
19421
21016
  Returns: import("../integrations/supabase/types").Json;
19422
21017
  };
21018
+ get_offer_recipient_by_code: {
21019
+ Args: {
21020
+ p_code: string;
21021
+ };
21022
+ Returns: {
21023
+ campaign_id: string;
21024
+ clicked_at: string;
21025
+ customer_id: string;
21026
+ id: string;
21027
+ ordered_at: string;
21028
+ }[];
21029
+ };
19423
21030
  get_or_assign_floriday_order_number: {
19424
21031
  Args: {
19425
21032
  p_floriday_id: string;
@@ -19472,6 +21079,34 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
19472
21079
  Args: never;
19473
21080
  Returns: boolean;
19474
21081
  };
21082
+ local_effective_price: {
21083
+ Args: {
21084
+ _customer_id: string;
21085
+ _on_date?: string;
21086
+ _product_id: string;
21087
+ _quantity?: number;
21088
+ };
21089
+ Returns: {
21090
+ currency: string;
21091
+ discount_type: string;
21092
+ discount_value: number;
21093
+ net_price: number;
21094
+ source: string;
21095
+ source_id: string;
21096
+ }[];
21097
+ };
21098
+ mark_offer_clicked: {
21099
+ Args: {
21100
+ p_code: string;
21101
+ };
21102
+ Returns: undefined;
21103
+ };
21104
+ mark_offer_ordered: {
21105
+ Args: {
21106
+ p_code: string;
21107
+ };
21108
+ Returns: undefined;
21109
+ };
19475
21110
  next_order_number: {
19476
21111
  Args: {
19477
21112
  p_prefix: string;
@@ -19491,6 +21126,14 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
19491
21126
  };
19492
21127
  Returns: string;
19493
21128
  };
21129
+ offer_recipient_matches: {
21130
+ Args: {
21131
+ _campaign_id: string;
21132
+ _customer_id: string;
21133
+ _recipient_id: string;
21134
+ };
21135
+ Returns: boolean;
21136
+ };
19494
21137
  pickstation_get_orders_raw: {
19495
21138
  Args: never;
19496
21139
  Returns: import("../integrations/supabase/types").Json;
@@ -19518,6 +21161,13 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
19518
21161
  };
19519
21162
  Returns: undefined;
19520
21163
  };
21164
+ promote_trade_item_key: {
21165
+ Args: {
21166
+ p_new: string;
21167
+ p_old: string;
21168
+ };
21169
+ Returns: undefined;
21170
+ };
19521
21171
  refresh_floricode_derived_code_lists: {
19522
21172
  Args: never;
19523
21173
  Returns: {
@@ -20560,6 +22210,7 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
20560
22210
  notes: string | null;
20561
22211
  performed_at: string;
20562
22212
  rescheduled_count: number;
22213
+ stock_consumed_at: string | null;
20563
22214
  total_carts: number;
20564
22215
  updated_at: string;
20565
22216
  user_id: string;
@@ -20573,6 +22224,7 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
20573
22224
  notes?: string | null;
20574
22225
  performed_at?: string;
20575
22226
  rescheduled_count?: number;
22227
+ stock_consumed_at?: string | null;
20576
22228
  total_carts?: number;
20577
22229
  updated_at?: string;
20578
22230
  user_id: string;
@@ -20586,6 +22238,7 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
20586
22238
  notes?: string | null;
20587
22239
  performed_at?: string;
20588
22240
  rescheduled_count?: number;
22241
+ stock_consumed_at?: string | null;
20589
22242
  total_carts?: number;
20590
22243
  updated_at?: string;
20591
22244
  user_id?: string;
@@ -23466,6 +25119,51 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
23466
25119
  referencedColumns: ["id"];
23467
25120
  }];
23468
25121
  };
25122
+ floriday_continuous_stock_queue: {
25123
+ Row: {
25124
+ attempts: number;
25125
+ connection_id: string;
25126
+ created_at: string;
25127
+ gateway_attempt_id: string | null;
25128
+ id: string;
25129
+ last_error: string | null;
25130
+ number_of_pieces: number;
25131
+ sent_at: string | null;
25132
+ status: string;
25133
+ trade_item_id: string;
25134
+ updated_at: string;
25135
+ user_id: string;
25136
+ };
25137
+ Insert: {
25138
+ attempts?: number;
25139
+ connection_id: string;
25140
+ created_at?: string;
25141
+ gateway_attempt_id?: string | null;
25142
+ id?: string;
25143
+ last_error?: string | null;
25144
+ number_of_pieces?: number;
25145
+ sent_at?: string | null;
25146
+ status?: string;
25147
+ trade_item_id: string;
25148
+ updated_at?: string;
25149
+ user_id: string;
25150
+ };
25151
+ Update: {
25152
+ attempts?: number;
25153
+ connection_id?: string;
25154
+ created_at?: string;
25155
+ gateway_attempt_id?: string | null;
25156
+ id?: string;
25157
+ last_error?: string | null;
25158
+ number_of_pieces?: number;
25159
+ sent_at?: string | null;
25160
+ status?: string;
25161
+ trade_item_id?: string;
25162
+ updated_at?: string;
25163
+ user_id?: string;
25164
+ };
25165
+ Relationships: [];
25166
+ };
23469
25167
  floriday_contract_trade_item_groups_cache: {
23470
25168
  Row: {
23471
25169
  connection_id: string;
@@ -24855,6 +26553,204 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
24855
26553
  };
24856
26554
  Relationships: [];
24857
26555
  };
26556
+ local_customer_agreements: {
26557
+ Row: {
26558
+ base_price: number | null;
26559
+ created_at: string;
26560
+ currency: string;
26561
+ customer_id: string;
26562
+ id: string;
26563
+ min_quantity: number;
26564
+ net_price: number;
26565
+ notes: string | null;
26566
+ product_category_id: string | null;
26567
+ product_id: string | null;
26568
+ updated_at: string;
26569
+ valid_from: string | null;
26570
+ valid_until: string | null;
26571
+ };
26572
+ Insert: {
26573
+ base_price?: number | null;
26574
+ created_at?: string;
26575
+ currency?: string;
26576
+ customer_id: string;
26577
+ id?: string;
26578
+ min_quantity?: number;
26579
+ net_price: number;
26580
+ notes?: string | null;
26581
+ product_category_id?: string | null;
26582
+ product_id?: string | null;
26583
+ updated_at?: string;
26584
+ valid_from?: string | null;
26585
+ valid_until?: string | null;
26586
+ };
26587
+ Update: {
26588
+ base_price?: number | null;
26589
+ created_at?: string;
26590
+ currency?: string;
26591
+ customer_id?: string;
26592
+ id?: string;
26593
+ min_quantity?: number;
26594
+ net_price?: number;
26595
+ notes?: string | null;
26596
+ product_category_id?: string | null;
26597
+ product_id?: string | null;
26598
+ updated_at?: string;
26599
+ valid_from?: string | null;
26600
+ valid_until?: string | null;
26601
+ };
26602
+ Relationships: [{
26603
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
26604
+ columns: ["customer_id"];
26605
+ isOneToOne: false;
26606
+ referencedRelation: "customers";
26607
+ referencedColumns: ["id"];
26608
+ }, {
26609
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
26610
+ columns: ["product_category_id"];
26611
+ isOneToOne: false;
26612
+ referencedRelation: "product_categories";
26613
+ referencedColumns: ["id"];
26614
+ }, {
26615
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
26616
+ columns: ["product_id"];
26617
+ isOneToOne: false;
26618
+ referencedRelation: "products";
26619
+ referencedColumns: ["id"];
26620
+ }];
26621
+ };
26622
+ local_customer_price_groups: {
26623
+ Row: {
26624
+ created_at: string;
26625
+ currency: string;
26626
+ customer_id: string;
26627
+ discount_type: string;
26628
+ discount_value: number;
26629
+ id: string;
26630
+ min_quantity: number;
26631
+ notes: string | null;
26632
+ product_category_id: string | null;
26633
+ product_id: string | null;
26634
+ updated_at: string;
26635
+ valid_from: string | null;
26636
+ valid_until: string | null;
26637
+ };
26638
+ Insert: {
26639
+ created_at?: string;
26640
+ currency?: string;
26641
+ customer_id: string;
26642
+ discount_type: string;
26643
+ discount_value: number;
26644
+ id?: string;
26645
+ min_quantity?: number;
26646
+ notes?: string | null;
26647
+ product_category_id?: string | null;
26648
+ product_id?: string | null;
26649
+ updated_at?: string;
26650
+ valid_from?: string | null;
26651
+ valid_until?: string | null;
26652
+ };
26653
+ Update: {
26654
+ created_at?: string;
26655
+ currency?: string;
26656
+ customer_id?: string;
26657
+ discount_type?: string;
26658
+ discount_value?: number;
26659
+ id?: string;
26660
+ min_quantity?: number;
26661
+ notes?: string | null;
26662
+ product_category_id?: string | null;
26663
+ product_id?: string | null;
26664
+ updated_at?: string;
26665
+ valid_from?: string | null;
26666
+ valid_until?: string | null;
26667
+ };
26668
+ Relationships: [{
26669
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
26670
+ columns: ["customer_id"];
26671
+ isOneToOne: false;
26672
+ referencedRelation: "customers";
26673
+ referencedColumns: ["id"];
26674
+ }, {
26675
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
26676
+ columns: ["product_category_id"];
26677
+ isOneToOne: false;
26678
+ referencedRelation: "product_categories";
26679
+ referencedColumns: ["id"];
26680
+ }, {
26681
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
26682
+ columns: ["product_id"];
26683
+ isOneToOne: false;
26684
+ referencedRelation: "products";
26685
+ referencedColumns: ["id"];
26686
+ }];
26687
+ };
26688
+ local_customer_sales_strategies: {
26689
+ Row: {
26690
+ created_at: string;
26691
+ currency: string;
26692
+ customer_id: string;
26693
+ discount_type: string;
26694
+ discount_value: number;
26695
+ id: string;
26696
+ min_quantity: number;
26697
+ notes: string | null;
26698
+ product_category_id: string | null;
26699
+ product_id: string | null;
26700
+ updated_at: string;
26701
+ valid_from: string | null;
26702
+ valid_until: string | null;
26703
+ };
26704
+ Insert: {
26705
+ created_at?: string;
26706
+ currency?: string;
26707
+ customer_id: string;
26708
+ discount_type: string;
26709
+ discount_value: number;
26710
+ id?: string;
26711
+ min_quantity?: number;
26712
+ notes?: string | null;
26713
+ product_category_id?: string | null;
26714
+ product_id?: string | null;
26715
+ updated_at?: string;
26716
+ valid_from?: string | null;
26717
+ valid_until?: string | null;
26718
+ };
26719
+ Update: {
26720
+ created_at?: string;
26721
+ currency?: string;
26722
+ customer_id?: string;
26723
+ discount_type?: string;
26724
+ discount_value?: number;
26725
+ id?: string;
26726
+ min_quantity?: number;
26727
+ notes?: string | null;
26728
+ product_category_id?: string | null;
26729
+ product_id?: string | null;
26730
+ updated_at?: string;
26731
+ valid_from?: string | null;
26732
+ valid_until?: string | null;
26733
+ };
26734
+ Relationships: [{
26735
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
26736
+ columns: ["customer_id"];
26737
+ isOneToOne: false;
26738
+ referencedRelation: "customers";
26739
+ referencedColumns: ["id"];
26740
+ }, {
26741
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
26742
+ columns: ["product_category_id"];
26743
+ isOneToOne: false;
26744
+ referencedRelation: "product_categories";
26745
+ referencedColumns: ["id"];
26746
+ }, {
26747
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
26748
+ columns: ["product_id"];
26749
+ isOneToOne: false;
26750
+ referencedRelation: "products";
26751
+ referencedColumns: ["id"];
26752
+ }];
26753
+ };
24858
26754
  locations: {
24859
26755
  Row: {
24860
26756
  created_at: string;
@@ -25362,6 +27258,273 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
25362
27258
  referencedColumns: ["id"];
25363
27259
  }];
25364
27260
  };
27261
+ nmbrs_component_mapping: {
27262
+ Row: {
27263
+ created_at: string;
27264
+ id: string;
27265
+ source_kind: string;
27266
+ source_value: string | null;
27267
+ updated_at: string;
27268
+ wage_code: string;
27269
+ };
27270
+ Insert: {
27271
+ created_at?: string;
27272
+ id?: string;
27273
+ source_kind: string;
27274
+ source_value?: string | null;
27275
+ updated_at?: string;
27276
+ wage_code: string;
27277
+ };
27278
+ Update: {
27279
+ created_at?: string;
27280
+ id?: string;
27281
+ source_kind?: string;
27282
+ source_value?: string | null;
27283
+ updated_at?: string;
27284
+ wage_code?: string;
27285
+ };
27286
+ Relationships: [{
27287
+ foreignKeyName: "nmbrs_component_mapping_wage_code_fkey";
27288
+ columns: ["wage_code"];
27289
+ isOneToOne: false;
27290
+ referencedRelation: "nmbrs_wage_components";
27291
+ referencedColumns: ["code"];
27292
+ }];
27293
+ };
27294
+ nmbrs_employee_mapping: {
27295
+ Row: {
27296
+ active_from: string | null;
27297
+ active_to: string | null;
27298
+ contract_hours_per_week: number | null;
27299
+ created_at: string;
27300
+ hourly_wage: number | null;
27301
+ id: string;
27302
+ monteur_id: string;
27303
+ nmbrs_company_code: string | null;
27304
+ nmbrs_employee_number: string;
27305
+ updated_at: string;
27306
+ };
27307
+ Insert: {
27308
+ active_from?: string | null;
27309
+ active_to?: string | null;
27310
+ contract_hours_per_week?: number | null;
27311
+ created_at?: string;
27312
+ hourly_wage?: number | null;
27313
+ id?: string;
27314
+ monteur_id: string;
27315
+ nmbrs_company_code?: string | null;
27316
+ nmbrs_employee_number: string;
27317
+ updated_at?: string;
27318
+ };
27319
+ Update: {
27320
+ active_from?: string | null;
27321
+ active_to?: string | null;
27322
+ contract_hours_per_week?: number | null;
27323
+ created_at?: string;
27324
+ hourly_wage?: number | null;
27325
+ id?: string;
27326
+ monteur_id?: string;
27327
+ nmbrs_company_code?: string | null;
27328
+ nmbrs_employee_number?: string;
27329
+ updated_at?: string;
27330
+ };
27331
+ Relationships: [{
27332
+ foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
27333
+ columns: ["monteur_id"];
27334
+ isOneToOne: true;
27335
+ referencedRelation: "monteurs";
27336
+ referencedColumns: ["id"];
27337
+ }];
27338
+ };
27339
+ nmbrs_export_lines: {
27340
+ Row: {
27341
+ amount: number;
27342
+ created_at: string;
27343
+ entry_date: string;
27344
+ hours: number;
27345
+ id: string;
27346
+ monteur_id: string;
27347
+ nmbrs_employee_number: string | null;
27348
+ notes: string | null;
27349
+ run_id: string;
27350
+ source_kind: string | null;
27351
+ source_ref_id: string | null;
27352
+ updated_at: string;
27353
+ wage_code: string;
27354
+ };
27355
+ Insert: {
27356
+ amount?: number;
27357
+ created_at?: string;
27358
+ entry_date: string;
27359
+ hours?: number;
27360
+ id?: string;
27361
+ monteur_id: string;
27362
+ nmbrs_employee_number?: string | null;
27363
+ notes?: string | null;
27364
+ run_id: string;
27365
+ source_kind?: string | null;
27366
+ source_ref_id?: string | null;
27367
+ updated_at?: string;
27368
+ wage_code: string;
27369
+ };
27370
+ Update: {
27371
+ amount?: number;
27372
+ created_at?: string;
27373
+ entry_date?: string;
27374
+ hours?: number;
27375
+ id?: string;
27376
+ monteur_id?: string;
27377
+ nmbrs_employee_number?: string | null;
27378
+ notes?: string | null;
27379
+ run_id?: string;
27380
+ source_kind?: string | null;
27381
+ source_ref_id?: string | null;
27382
+ updated_at?: string;
27383
+ wage_code?: string;
27384
+ };
27385
+ Relationships: [{
27386
+ foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
27387
+ columns: ["monteur_id"];
27388
+ isOneToOne: false;
27389
+ referencedRelation: "monteurs";
27390
+ referencedColumns: ["id"];
27391
+ }, {
27392
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
27393
+ columns: ["run_id"];
27394
+ isOneToOne: false;
27395
+ referencedRelation: "nmbrs_export_runs";
27396
+ referencedColumns: ["id"];
27397
+ }, {
27398
+ foreignKeyName: "nmbrs_export_lines_wage_code_fkey";
27399
+ columns: ["wage_code"];
27400
+ isOneToOne: false;
27401
+ referencedRelation: "nmbrs_wage_components";
27402
+ referencedColumns: ["code"];
27403
+ }];
27404
+ };
27405
+ nmbrs_export_runs: {
27406
+ Row: {
27407
+ created_at: string;
27408
+ file_name: string | null;
27409
+ generated_at: string;
27410
+ generated_by: string | null;
27411
+ id: string;
27412
+ notes: string | null;
27413
+ period_end: string;
27414
+ period_label: string;
27415
+ period_start: string;
27416
+ status: string;
27417
+ total_hours: number;
27418
+ total_lines: number;
27419
+ updated_at: string;
27420
+ };
27421
+ Insert: {
27422
+ created_at?: string;
27423
+ file_name?: string | null;
27424
+ generated_at?: string;
27425
+ generated_by?: string | null;
27426
+ id?: string;
27427
+ notes?: string | null;
27428
+ period_end: string;
27429
+ period_label: string;
27430
+ period_start: string;
27431
+ status?: string;
27432
+ total_hours?: number;
27433
+ total_lines?: number;
27434
+ updated_at?: string;
27435
+ };
27436
+ Update: {
27437
+ created_at?: string;
27438
+ file_name?: string | null;
27439
+ generated_at?: string;
27440
+ generated_by?: string | null;
27441
+ id?: string;
27442
+ notes?: string | null;
27443
+ period_end?: string;
27444
+ period_label?: string;
27445
+ period_start?: string;
27446
+ status?: string;
27447
+ total_hours?: number;
27448
+ total_lines?: number;
27449
+ updated_at?: string;
27450
+ };
27451
+ Relationships: [];
27452
+ };
27453
+ nmbrs_settings: {
27454
+ Row: {
27455
+ created_at: string;
27456
+ default_company_code: string | null;
27457
+ id: boolean;
27458
+ include_travel: boolean;
27459
+ overtime_threshold_daily: number;
27460
+ overtime_threshold_weekly: number;
27461
+ period_type: string;
27462
+ updated_at: string;
27463
+ updated_by: string | null;
27464
+ week_start_day: number;
27465
+ };
27466
+ Insert: {
27467
+ created_at?: string;
27468
+ default_company_code?: string | null;
27469
+ id?: boolean;
27470
+ include_travel?: boolean;
27471
+ overtime_threshold_daily?: number;
27472
+ overtime_threshold_weekly?: number;
27473
+ period_type?: string;
27474
+ updated_at?: string;
27475
+ updated_by?: string | null;
27476
+ week_start_day?: number;
27477
+ };
27478
+ Update: {
27479
+ created_at?: string;
27480
+ default_company_code?: string | null;
27481
+ id?: boolean;
27482
+ include_travel?: boolean;
27483
+ overtime_threshold_daily?: number;
27484
+ overtime_threshold_weekly?: number;
27485
+ period_type?: string;
27486
+ updated_at?: string;
27487
+ updated_by?: string | null;
27488
+ week_start_day?: number;
27489
+ };
27490
+ Relationships: [];
27491
+ };
27492
+ nmbrs_wage_components: {
27493
+ Row: {
27494
+ category: string;
27495
+ code: string;
27496
+ created_at: string;
27497
+ id: string;
27498
+ is_active: boolean;
27499
+ label: string;
27500
+ sort_order: number;
27501
+ unit: string;
27502
+ updated_at: string;
27503
+ };
27504
+ Insert: {
27505
+ category: string;
27506
+ code: string;
27507
+ created_at?: string;
27508
+ id?: string;
27509
+ is_active?: boolean;
27510
+ label: string;
27511
+ sort_order?: number;
27512
+ unit: string;
27513
+ updated_at?: string;
27514
+ };
27515
+ Update: {
27516
+ category?: string;
27517
+ code?: string;
27518
+ created_at?: string;
27519
+ id?: string;
27520
+ is_active?: boolean;
27521
+ label?: string;
27522
+ sort_order?: number;
27523
+ unit?: string;
27524
+ updated_at?: string;
27525
+ };
27526
+ Relationships: [];
27527
+ };
25365
27528
  notifications: {
25366
27529
  Row: {
25367
27530
  created_at: string;
@@ -26344,6 +28507,7 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
26344
28507
  purchase_price: number | null;
26345
28508
  quantity: number;
26346
28509
  sale_price: number | null;
28510
+ trade_item_key: string | null;
26347
28511
  unit: string;
26348
28512
  updated_at: string;
26349
28513
  weight: string | null;
@@ -26366,6 +28530,7 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
26366
28530
  purchase_price?: number | null;
26367
28531
  quantity?: number;
26368
28532
  sale_price?: number | null;
28533
+ trade_item_key?: string | null;
26369
28534
  unit?: string;
26370
28535
  updated_at?: string;
26371
28536
  weight?: string | null;
@@ -26388,6 +28553,7 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
26388
28553
  purchase_price?: number | null;
26389
28554
  quantity?: number;
26390
28555
  sale_price?: number | null;
28556
+ trade_item_key?: string | null;
26391
28557
  unit?: string;
26392
28558
  updated_at?: string;
26393
28559
  weight?: string | null;
@@ -27207,6 +29373,102 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
27207
29373
  };
27208
29374
  Relationships: [];
27209
29375
  };
29376
+ stock_import_runs: {
29377
+ Row: {
29378
+ connection_id: string | null;
29379
+ created_at: string;
29380
+ created_rows: number;
29381
+ errors: import("../integrations/supabase/types").Json;
29382
+ filename: string | null;
29383
+ id: string;
29384
+ mutations: import("../integrations/supabase/types").Json;
29385
+ skipped_rows: number;
29386
+ total_rows: number;
29387
+ updated_rows: number;
29388
+ user_id: string;
29389
+ };
29390
+ Insert: {
29391
+ connection_id?: string | null;
29392
+ created_at?: string;
29393
+ created_rows?: number;
29394
+ errors?: import("../integrations/supabase/types").Json;
29395
+ filename?: string | null;
29396
+ id?: string;
29397
+ mutations?: import("../integrations/supabase/types").Json;
29398
+ skipped_rows?: number;
29399
+ total_rows?: number;
29400
+ updated_rows?: number;
29401
+ user_id: string;
29402
+ };
29403
+ Update: {
29404
+ connection_id?: string | null;
29405
+ created_at?: string;
29406
+ created_rows?: number;
29407
+ errors?: import("../integrations/supabase/types").Json;
29408
+ filename?: string | null;
29409
+ id?: string;
29410
+ mutations?: import("../integrations/supabase/types").Json;
29411
+ skipped_rows?: number;
29412
+ total_rows?: number;
29413
+ updated_rows?: number;
29414
+ user_id?: string;
29415
+ };
29416
+ Relationships: [];
29417
+ };
29418
+ stock_mutation_log: {
29419
+ Row: {
29420
+ connection_id: string | null;
29421
+ created_at: string;
29422
+ created_by: string | null;
29423
+ id: string;
29424
+ mutation_type: string;
29425
+ order_id: string | null;
29426
+ order_item_id: string | null;
29427
+ order_source: string | null;
29428
+ physical_after: number | null;
29429
+ physical_before: number | null;
29430
+ qty_delta: number;
29431
+ reason: string | null;
29432
+ reserved_after: number | null;
29433
+ reserved_before: number | null;
29434
+ trade_item_key: string;
29435
+ };
29436
+ Insert: {
29437
+ connection_id?: string | null;
29438
+ created_at?: string;
29439
+ created_by?: string | null;
29440
+ id?: string;
29441
+ mutation_type: string;
29442
+ order_id?: string | null;
29443
+ order_item_id?: string | null;
29444
+ order_source?: string | null;
29445
+ physical_after?: number | null;
29446
+ physical_before?: number | null;
29447
+ qty_delta: number;
29448
+ reason?: string | null;
29449
+ reserved_after?: number | null;
29450
+ reserved_before?: number | null;
29451
+ trade_item_key: string;
29452
+ };
29453
+ Update: {
29454
+ connection_id?: string | null;
29455
+ created_at?: string;
29456
+ created_by?: string | null;
29457
+ id?: string;
29458
+ mutation_type?: string;
29459
+ order_id?: string | null;
29460
+ order_item_id?: string | null;
29461
+ order_source?: string | null;
29462
+ physical_after?: number | null;
29463
+ physical_before?: number | null;
29464
+ qty_delta?: number;
29465
+ reason?: string | null;
29466
+ reserved_after?: number | null;
29467
+ reserved_before?: number | null;
29468
+ trade_item_key?: string;
29469
+ };
29470
+ Relationships: [];
29471
+ };
27210
29472
  supplier_products: {
27211
29473
  Row: {
27212
29474
  article_number: string | null;
@@ -28784,6 +31046,44 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
28784
31046
  };
28785
31047
  Relationships: [];
28786
31048
  };
31049
+ floriday_customer_discounts: {
31050
+ Row: {
31051
+ base_price: number | null;
31052
+ buyer_organization_id: string | null;
31053
+ currency: string | null;
31054
+ discount_type: string | null;
31055
+ discount_value: number | null;
31056
+ min_quantity: number | null;
31057
+ net_price: number | null;
31058
+ product_group_id: string | null;
31059
+ raw: import("../integrations/supabase/types").Json | null;
31060
+ source: string | null;
31061
+ source_id: string | null;
31062
+ trade_item_id: string | null;
31063
+ valid_from: string | null;
31064
+ valid_until: string | null;
31065
+ };
31066
+ Relationships: [];
31067
+ };
31068
+ local_customer_discounts: {
31069
+ Row: {
31070
+ base_price: number | null;
31071
+ currency: string | null;
31072
+ customer_id: string | null;
31073
+ discount_type: string | null;
31074
+ discount_value: number | null;
31075
+ min_quantity: number | null;
31076
+ net_price: number | null;
31077
+ product_category_id: string | null;
31078
+ product_id: string | null;
31079
+ product_name: string | null;
31080
+ source: string | null;
31081
+ source_id: string | null;
31082
+ valid_from: string | null;
31083
+ valid_until: string | null;
31084
+ };
31085
+ Relationships: [];
31086
+ };
28787
31087
  manufacture_product_possible_stock_view: {
28788
31088
  Row: {
28789
31089
  component_count: number | null;
@@ -29068,6 +31368,54 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
29068
31368
  };
29069
31369
  Returns: number;
29070
31370
  };
31371
+ afh_city_code: {
31372
+ Args: {
31373
+ _city: string;
31374
+ _country: string;
31375
+ };
31376
+ Returns: string;
31377
+ };
31378
+ afh_normalize_country: {
31379
+ Args: {
31380
+ _raw: string;
31381
+ };
31382
+ Returns: string;
31383
+ };
31384
+ afh_normalize_nl_province: {
31385
+ Args: {
31386
+ _raw: string;
31387
+ };
31388
+ Returns: string;
31389
+ };
31390
+ afh_subtract_workdays: {
31391
+ Args: {
31392
+ _date: string;
31393
+ _days: number;
31394
+ };
31395
+ Returns: string;
31396
+ };
31397
+ apply_stock_consumption: {
31398
+ Args: {
31399
+ p_order_id: string;
31400
+ p_order_item_id: string;
31401
+ p_qty: number;
31402
+ p_reason: string;
31403
+ p_source: string;
31404
+ p_trade_item_key: string;
31405
+ };
31406
+ Returns: undefined;
31407
+ };
31408
+ apply_stock_reservation: {
31409
+ Args: {
31410
+ p_order_id: string;
31411
+ p_order_item_id: string;
31412
+ p_qty: number;
31413
+ p_reason: string;
31414
+ p_source: string;
31415
+ p_trade_item_key: string;
31416
+ };
31417
+ Returns: undefined;
31418
+ };
29071
31419
  assign_cart_numbers: {
29072
31420
  Args: {
29073
31421
  p_carts: import("../integrations/supabase/types").Json;
@@ -29091,12 +31439,40 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
29091
31439
  order_number: string;
29092
31440
  }[];
29093
31441
  };
31442
+ backfill_open_order_reservations: {
31443
+ Args: never;
31444
+ Returns: {
31445
+ processed_items: number;
31446
+ }[];
31447
+ };
29094
31448
  call_exact_route: {
29095
31449
  Args: {
29096
31450
  path: string;
29097
31451
  };
29098
31452
  Returns: number;
29099
31453
  };
31454
+ check_offer_product_available_stock: {
31455
+ Args: {
31456
+ p_campaign_product_id: string;
31457
+ p_code: string;
31458
+ p_needed_qty?: number;
31459
+ p_product_name?: string;
31460
+ };
31461
+ Returns: import("../integrations/supabase/types").Json;
31462
+ };
31463
+ check_trade_item_available_stock: {
31464
+ Args: {
31465
+ p_connection_id?: string;
31466
+ p_context?: string;
31467
+ p_needed_qty?: number;
31468
+ p_order_id?: string;
31469
+ p_order_item_id?: string;
31470
+ p_owner_id?: string;
31471
+ p_product_name?: string;
31472
+ p_trade_item_key: string;
31473
+ };
31474
+ Returns: import("../integrations/supabase/types").Json;
31475
+ };
29100
31476
  cleanup_old_bookings: {
29101
31477
  Args: never;
29102
31478
  Returns: number;
@@ -29140,6 +31516,12 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
29140
31516
  table_name: string;
29141
31517
  }[];
29142
31518
  };
31519
+ dispatch_carrier_signups_sql: {
31520
+ Args: {
31521
+ _catchup?: string;
31522
+ };
31523
+ Returns: import("../integrations/supabase/types").Json;
31524
+ };
29143
31525
  email_auth_decrypt: {
29144
31526
  Args: {
29145
31527
  cipher: string;
@@ -29175,6 +31557,12 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
29175
31557
  status: string;
29176
31558
  }[];
29177
31559
  };
31560
+ ensure_trade_item_stock_row: {
31561
+ Args: {
31562
+ p_key: string;
31563
+ };
31564
+ Returns: undefined;
31565
+ };
29178
31566
  ensure_user_tenant: {
29179
31567
  Args: never;
29180
31568
  Returns: string;
@@ -29212,6 +31600,31 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
29212
31600
  };
29213
31601
  Returns: boolean;
29214
31602
  };
31603
+ find_trade_item_key: {
31604
+ Args: {
31605
+ p_barcode: string;
31606
+ p_name: string;
31607
+ p_product_id: string;
31608
+ };
31609
+ Returns: string;
31610
+ };
31611
+ floriday_effective_price: {
31612
+ Args: {
31613
+ _buyer_id: string;
31614
+ _on_date?: string;
31615
+ _quantity?: number;
31616
+ _trade_item_id: string;
31617
+ };
31618
+ Returns: {
31619
+ base_price: number;
31620
+ currency: string;
31621
+ discount_type: string;
31622
+ discount_value: number;
31623
+ net_price: number;
31624
+ source: string;
31625
+ source_id: string;
31626
+ }[];
31627
+ };
29215
31628
  format_cart_number: {
29216
31629
  Args: {
29217
31630
  p_pick_date: string;
@@ -29232,6 +31645,13 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
29232
31645
  preferred_warehouse_name: string;
29233
31646
  }[];
29234
31647
  };
31648
+ get_active_floriday_context: {
31649
+ Args: never;
31650
+ Returns: {
31651
+ connection_id: string;
31652
+ user_id: string;
31653
+ }[];
31654
+ };
29235
31655
  get_active_twinfield_public: {
29236
31656
  Args: never;
29237
31657
  Returns: {
@@ -29334,6 +31754,18 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
29334
31754
  };
29335
31755
  Returns: import("../integrations/supabase/types").Json;
29336
31756
  };
31757
+ get_offer_recipient_by_code: {
31758
+ Args: {
31759
+ p_code: string;
31760
+ };
31761
+ Returns: {
31762
+ campaign_id: string;
31763
+ clicked_at: string;
31764
+ customer_id: string;
31765
+ id: string;
31766
+ ordered_at: string;
31767
+ }[];
31768
+ };
29337
31769
  get_or_assign_floriday_order_number: {
29338
31770
  Args: {
29339
31771
  p_floriday_id: string;
@@ -29386,6 +31818,34 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
29386
31818
  Args: never;
29387
31819
  Returns: boolean;
29388
31820
  };
31821
+ local_effective_price: {
31822
+ Args: {
31823
+ _customer_id: string;
31824
+ _on_date?: string;
31825
+ _product_id: string;
31826
+ _quantity?: number;
31827
+ };
31828
+ Returns: {
31829
+ currency: string;
31830
+ discount_type: string;
31831
+ discount_value: number;
31832
+ net_price: number;
31833
+ source: string;
31834
+ source_id: string;
31835
+ }[];
31836
+ };
31837
+ mark_offer_clicked: {
31838
+ Args: {
31839
+ p_code: string;
31840
+ };
31841
+ Returns: undefined;
31842
+ };
31843
+ mark_offer_ordered: {
31844
+ Args: {
31845
+ p_code: string;
31846
+ };
31847
+ Returns: undefined;
31848
+ };
29389
31849
  next_order_number: {
29390
31850
  Args: {
29391
31851
  p_prefix: string;
@@ -29405,6 +31865,14 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
29405
31865
  };
29406
31866
  Returns: string;
29407
31867
  };
31868
+ offer_recipient_matches: {
31869
+ Args: {
31870
+ _campaign_id: string;
31871
+ _customer_id: string;
31872
+ _recipient_id: string;
31873
+ };
31874
+ Returns: boolean;
31875
+ };
29408
31876
  pickstation_get_orders_raw: {
29409
31877
  Args: never;
29410
31878
  Returns: import("../integrations/supabase/types").Json;
@@ -29432,6 +31900,13 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
29432
31900
  };
29433
31901
  Returns: undefined;
29434
31902
  };
31903
+ promote_trade_item_key: {
31904
+ Args: {
31905
+ p_new: string;
31906
+ p_old: string;
31907
+ };
31908
+ Returns: undefined;
31909
+ };
29435
31910
  refresh_floricode_derived_code_lists: {
29436
31911
  Args: never;
29437
31912
  Returns: {
@@ -30481,6 +32956,7 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
30481
32956
  notes: string | null;
30482
32957
  performed_at: string;
30483
32958
  rescheduled_count: number;
32959
+ stock_consumed_at: string | null;
30484
32960
  total_carts: number;
30485
32961
  updated_at: string;
30486
32962
  user_id: string;
@@ -30494,6 +32970,7 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
30494
32970
  notes?: string | null;
30495
32971
  performed_at?: string;
30496
32972
  rescheduled_count?: number;
32973
+ stock_consumed_at?: string | null;
30497
32974
  total_carts?: number;
30498
32975
  updated_at?: string;
30499
32976
  user_id: string;
@@ -30507,6 +32984,7 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
30507
32984
  notes?: string | null;
30508
32985
  performed_at?: string;
30509
32986
  rescheduled_count?: number;
32987
+ stock_consumed_at?: string | null;
30510
32988
  total_carts?: number;
30511
32989
  updated_at?: string;
30512
32990
  user_id?: string;
@@ -33387,6 +35865,51 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
33387
35865
  referencedColumns: ["id"];
33388
35866
  }];
33389
35867
  };
35868
+ floriday_continuous_stock_queue: {
35869
+ Row: {
35870
+ attempts: number;
35871
+ connection_id: string;
35872
+ created_at: string;
35873
+ gateway_attempt_id: string | null;
35874
+ id: string;
35875
+ last_error: string | null;
35876
+ number_of_pieces: number;
35877
+ sent_at: string | null;
35878
+ status: string;
35879
+ trade_item_id: string;
35880
+ updated_at: string;
35881
+ user_id: string;
35882
+ };
35883
+ Insert: {
35884
+ attempts?: number;
35885
+ connection_id: string;
35886
+ created_at?: string;
35887
+ gateway_attempt_id?: string | null;
35888
+ id?: string;
35889
+ last_error?: string | null;
35890
+ number_of_pieces?: number;
35891
+ sent_at?: string | null;
35892
+ status?: string;
35893
+ trade_item_id: string;
35894
+ updated_at?: string;
35895
+ user_id: string;
35896
+ };
35897
+ Update: {
35898
+ attempts?: number;
35899
+ connection_id?: string;
35900
+ created_at?: string;
35901
+ gateway_attempt_id?: string | null;
35902
+ id?: string;
35903
+ last_error?: string | null;
35904
+ number_of_pieces?: number;
35905
+ sent_at?: string | null;
35906
+ status?: string;
35907
+ trade_item_id?: string;
35908
+ updated_at?: string;
35909
+ user_id?: string;
35910
+ };
35911
+ Relationships: [];
35912
+ };
33390
35913
  floriday_contract_trade_item_groups_cache: {
33391
35914
  Row: {
33392
35915
  connection_id: string;
@@ -34776,6 +37299,204 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
34776
37299
  };
34777
37300
  Relationships: [];
34778
37301
  };
37302
+ local_customer_agreements: {
37303
+ Row: {
37304
+ base_price: number | null;
37305
+ created_at: string;
37306
+ currency: string;
37307
+ customer_id: string;
37308
+ id: string;
37309
+ min_quantity: number;
37310
+ net_price: number;
37311
+ notes: string | null;
37312
+ product_category_id: string | null;
37313
+ product_id: string | null;
37314
+ updated_at: string;
37315
+ valid_from: string | null;
37316
+ valid_until: string | null;
37317
+ };
37318
+ Insert: {
37319
+ base_price?: number | null;
37320
+ created_at?: string;
37321
+ currency?: string;
37322
+ customer_id: string;
37323
+ id?: string;
37324
+ min_quantity?: number;
37325
+ net_price: number;
37326
+ notes?: string | null;
37327
+ product_category_id?: string | null;
37328
+ product_id?: string | null;
37329
+ updated_at?: string;
37330
+ valid_from?: string | null;
37331
+ valid_until?: string | null;
37332
+ };
37333
+ Update: {
37334
+ base_price?: number | null;
37335
+ created_at?: string;
37336
+ currency?: string;
37337
+ customer_id?: string;
37338
+ id?: string;
37339
+ min_quantity?: number;
37340
+ net_price?: number;
37341
+ notes?: string | null;
37342
+ product_category_id?: string | null;
37343
+ product_id?: string | null;
37344
+ updated_at?: string;
37345
+ valid_from?: string | null;
37346
+ valid_until?: string | null;
37347
+ };
37348
+ Relationships: [{
37349
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
37350
+ columns: ["customer_id"];
37351
+ isOneToOne: false;
37352
+ referencedRelation: "customers";
37353
+ referencedColumns: ["id"];
37354
+ }, {
37355
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
37356
+ columns: ["product_category_id"];
37357
+ isOneToOne: false;
37358
+ referencedRelation: "product_categories";
37359
+ referencedColumns: ["id"];
37360
+ }, {
37361
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
37362
+ columns: ["product_id"];
37363
+ isOneToOne: false;
37364
+ referencedRelation: "products";
37365
+ referencedColumns: ["id"];
37366
+ }];
37367
+ };
37368
+ local_customer_price_groups: {
37369
+ Row: {
37370
+ created_at: string;
37371
+ currency: string;
37372
+ customer_id: string;
37373
+ discount_type: string;
37374
+ discount_value: number;
37375
+ id: string;
37376
+ min_quantity: number;
37377
+ notes: string | null;
37378
+ product_category_id: string | null;
37379
+ product_id: string | null;
37380
+ updated_at: string;
37381
+ valid_from: string | null;
37382
+ valid_until: string | null;
37383
+ };
37384
+ Insert: {
37385
+ created_at?: string;
37386
+ currency?: string;
37387
+ customer_id: string;
37388
+ discount_type: string;
37389
+ discount_value: number;
37390
+ id?: string;
37391
+ min_quantity?: number;
37392
+ notes?: string | null;
37393
+ product_category_id?: string | null;
37394
+ product_id?: string | null;
37395
+ updated_at?: string;
37396
+ valid_from?: string | null;
37397
+ valid_until?: string | null;
37398
+ };
37399
+ Update: {
37400
+ created_at?: string;
37401
+ currency?: string;
37402
+ customer_id?: string;
37403
+ discount_type?: string;
37404
+ discount_value?: number;
37405
+ id?: string;
37406
+ min_quantity?: number;
37407
+ notes?: string | null;
37408
+ product_category_id?: string | null;
37409
+ product_id?: string | null;
37410
+ updated_at?: string;
37411
+ valid_from?: string | null;
37412
+ valid_until?: string | null;
37413
+ };
37414
+ Relationships: [{
37415
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
37416
+ columns: ["customer_id"];
37417
+ isOneToOne: false;
37418
+ referencedRelation: "customers";
37419
+ referencedColumns: ["id"];
37420
+ }, {
37421
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
37422
+ columns: ["product_category_id"];
37423
+ isOneToOne: false;
37424
+ referencedRelation: "product_categories";
37425
+ referencedColumns: ["id"];
37426
+ }, {
37427
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
37428
+ columns: ["product_id"];
37429
+ isOneToOne: false;
37430
+ referencedRelation: "products";
37431
+ referencedColumns: ["id"];
37432
+ }];
37433
+ };
37434
+ local_customer_sales_strategies: {
37435
+ Row: {
37436
+ created_at: string;
37437
+ currency: string;
37438
+ customer_id: string;
37439
+ discount_type: string;
37440
+ discount_value: number;
37441
+ id: string;
37442
+ min_quantity: number;
37443
+ notes: string | null;
37444
+ product_category_id: string | null;
37445
+ product_id: string | null;
37446
+ updated_at: string;
37447
+ valid_from: string | null;
37448
+ valid_until: string | null;
37449
+ };
37450
+ Insert: {
37451
+ created_at?: string;
37452
+ currency?: string;
37453
+ customer_id: string;
37454
+ discount_type: string;
37455
+ discount_value: number;
37456
+ id?: string;
37457
+ min_quantity?: number;
37458
+ notes?: string | null;
37459
+ product_category_id?: string | null;
37460
+ product_id?: string | null;
37461
+ updated_at?: string;
37462
+ valid_from?: string | null;
37463
+ valid_until?: string | null;
37464
+ };
37465
+ Update: {
37466
+ created_at?: string;
37467
+ currency?: string;
37468
+ customer_id?: string;
37469
+ discount_type?: string;
37470
+ discount_value?: number;
37471
+ id?: string;
37472
+ min_quantity?: number;
37473
+ notes?: string | null;
37474
+ product_category_id?: string | null;
37475
+ product_id?: string | null;
37476
+ updated_at?: string;
37477
+ valid_from?: string | null;
37478
+ valid_until?: string | null;
37479
+ };
37480
+ Relationships: [{
37481
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
37482
+ columns: ["customer_id"];
37483
+ isOneToOne: false;
37484
+ referencedRelation: "customers";
37485
+ referencedColumns: ["id"];
37486
+ }, {
37487
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
37488
+ columns: ["product_category_id"];
37489
+ isOneToOne: false;
37490
+ referencedRelation: "product_categories";
37491
+ referencedColumns: ["id"];
37492
+ }, {
37493
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
37494
+ columns: ["product_id"];
37495
+ isOneToOne: false;
37496
+ referencedRelation: "products";
37497
+ referencedColumns: ["id"];
37498
+ }];
37499
+ };
34779
37500
  locations: {
34780
37501
  Row: {
34781
37502
  created_at: string;
@@ -35283,6 +38004,273 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
35283
38004
  referencedColumns: ["id"];
35284
38005
  }];
35285
38006
  };
38007
+ nmbrs_component_mapping: {
38008
+ Row: {
38009
+ created_at: string;
38010
+ id: string;
38011
+ source_kind: string;
38012
+ source_value: string | null;
38013
+ updated_at: string;
38014
+ wage_code: string;
38015
+ };
38016
+ Insert: {
38017
+ created_at?: string;
38018
+ id?: string;
38019
+ source_kind: string;
38020
+ source_value?: string | null;
38021
+ updated_at?: string;
38022
+ wage_code: string;
38023
+ };
38024
+ Update: {
38025
+ created_at?: string;
38026
+ id?: string;
38027
+ source_kind?: string;
38028
+ source_value?: string | null;
38029
+ updated_at?: string;
38030
+ wage_code?: string;
38031
+ };
38032
+ Relationships: [{
38033
+ foreignKeyName: "nmbrs_component_mapping_wage_code_fkey";
38034
+ columns: ["wage_code"];
38035
+ isOneToOne: false;
38036
+ referencedRelation: "nmbrs_wage_components";
38037
+ referencedColumns: ["code"];
38038
+ }];
38039
+ };
38040
+ nmbrs_employee_mapping: {
38041
+ Row: {
38042
+ active_from: string | null;
38043
+ active_to: string | null;
38044
+ contract_hours_per_week: number | null;
38045
+ created_at: string;
38046
+ hourly_wage: number | null;
38047
+ id: string;
38048
+ monteur_id: string;
38049
+ nmbrs_company_code: string | null;
38050
+ nmbrs_employee_number: string;
38051
+ updated_at: string;
38052
+ };
38053
+ Insert: {
38054
+ active_from?: string | null;
38055
+ active_to?: string | null;
38056
+ contract_hours_per_week?: number | null;
38057
+ created_at?: string;
38058
+ hourly_wage?: number | null;
38059
+ id?: string;
38060
+ monteur_id: string;
38061
+ nmbrs_company_code?: string | null;
38062
+ nmbrs_employee_number: string;
38063
+ updated_at?: string;
38064
+ };
38065
+ Update: {
38066
+ active_from?: string | null;
38067
+ active_to?: string | null;
38068
+ contract_hours_per_week?: number | null;
38069
+ created_at?: string;
38070
+ hourly_wage?: number | null;
38071
+ id?: string;
38072
+ monteur_id?: string;
38073
+ nmbrs_company_code?: string | null;
38074
+ nmbrs_employee_number?: string;
38075
+ updated_at?: string;
38076
+ };
38077
+ Relationships: [{
38078
+ foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
38079
+ columns: ["monteur_id"];
38080
+ isOneToOne: true;
38081
+ referencedRelation: "monteurs";
38082
+ referencedColumns: ["id"];
38083
+ }];
38084
+ };
38085
+ nmbrs_export_lines: {
38086
+ Row: {
38087
+ amount: number;
38088
+ created_at: string;
38089
+ entry_date: string;
38090
+ hours: number;
38091
+ id: string;
38092
+ monteur_id: string;
38093
+ nmbrs_employee_number: string | null;
38094
+ notes: string | null;
38095
+ run_id: string;
38096
+ source_kind: string | null;
38097
+ source_ref_id: string | null;
38098
+ updated_at: string;
38099
+ wage_code: string;
38100
+ };
38101
+ Insert: {
38102
+ amount?: number;
38103
+ created_at?: string;
38104
+ entry_date: string;
38105
+ hours?: number;
38106
+ id?: string;
38107
+ monteur_id: string;
38108
+ nmbrs_employee_number?: string | null;
38109
+ notes?: string | null;
38110
+ run_id: string;
38111
+ source_kind?: string | null;
38112
+ source_ref_id?: string | null;
38113
+ updated_at?: string;
38114
+ wage_code: string;
38115
+ };
38116
+ Update: {
38117
+ amount?: number;
38118
+ created_at?: string;
38119
+ entry_date?: string;
38120
+ hours?: number;
38121
+ id?: string;
38122
+ monteur_id?: string;
38123
+ nmbrs_employee_number?: string | null;
38124
+ notes?: string | null;
38125
+ run_id?: string;
38126
+ source_kind?: string | null;
38127
+ source_ref_id?: string | null;
38128
+ updated_at?: string;
38129
+ wage_code?: string;
38130
+ };
38131
+ Relationships: [{
38132
+ foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
38133
+ columns: ["monteur_id"];
38134
+ isOneToOne: false;
38135
+ referencedRelation: "monteurs";
38136
+ referencedColumns: ["id"];
38137
+ }, {
38138
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
38139
+ columns: ["run_id"];
38140
+ isOneToOne: false;
38141
+ referencedRelation: "nmbrs_export_runs";
38142
+ referencedColumns: ["id"];
38143
+ }, {
38144
+ foreignKeyName: "nmbrs_export_lines_wage_code_fkey";
38145
+ columns: ["wage_code"];
38146
+ isOneToOne: false;
38147
+ referencedRelation: "nmbrs_wage_components";
38148
+ referencedColumns: ["code"];
38149
+ }];
38150
+ };
38151
+ nmbrs_export_runs: {
38152
+ Row: {
38153
+ created_at: string;
38154
+ file_name: string | null;
38155
+ generated_at: string;
38156
+ generated_by: string | null;
38157
+ id: string;
38158
+ notes: string | null;
38159
+ period_end: string;
38160
+ period_label: string;
38161
+ period_start: string;
38162
+ status: string;
38163
+ total_hours: number;
38164
+ total_lines: number;
38165
+ updated_at: string;
38166
+ };
38167
+ Insert: {
38168
+ created_at?: string;
38169
+ file_name?: string | null;
38170
+ generated_at?: string;
38171
+ generated_by?: string | null;
38172
+ id?: string;
38173
+ notes?: string | null;
38174
+ period_end: string;
38175
+ period_label: string;
38176
+ period_start: string;
38177
+ status?: string;
38178
+ total_hours?: number;
38179
+ total_lines?: number;
38180
+ updated_at?: string;
38181
+ };
38182
+ Update: {
38183
+ created_at?: string;
38184
+ file_name?: string | null;
38185
+ generated_at?: string;
38186
+ generated_by?: string | null;
38187
+ id?: string;
38188
+ notes?: string | null;
38189
+ period_end?: string;
38190
+ period_label?: string;
38191
+ period_start?: string;
38192
+ status?: string;
38193
+ total_hours?: number;
38194
+ total_lines?: number;
38195
+ updated_at?: string;
38196
+ };
38197
+ Relationships: [];
38198
+ };
38199
+ nmbrs_settings: {
38200
+ Row: {
38201
+ created_at: string;
38202
+ default_company_code: string | null;
38203
+ id: boolean;
38204
+ include_travel: boolean;
38205
+ overtime_threshold_daily: number;
38206
+ overtime_threshold_weekly: number;
38207
+ period_type: string;
38208
+ updated_at: string;
38209
+ updated_by: string | null;
38210
+ week_start_day: number;
38211
+ };
38212
+ Insert: {
38213
+ created_at?: string;
38214
+ default_company_code?: string | null;
38215
+ id?: boolean;
38216
+ include_travel?: boolean;
38217
+ overtime_threshold_daily?: number;
38218
+ overtime_threshold_weekly?: number;
38219
+ period_type?: string;
38220
+ updated_at?: string;
38221
+ updated_by?: string | null;
38222
+ week_start_day?: number;
38223
+ };
38224
+ Update: {
38225
+ created_at?: string;
38226
+ default_company_code?: string | null;
38227
+ id?: boolean;
38228
+ include_travel?: boolean;
38229
+ overtime_threshold_daily?: number;
38230
+ overtime_threshold_weekly?: number;
38231
+ period_type?: string;
38232
+ updated_at?: string;
38233
+ updated_by?: string | null;
38234
+ week_start_day?: number;
38235
+ };
38236
+ Relationships: [];
38237
+ };
38238
+ nmbrs_wage_components: {
38239
+ Row: {
38240
+ category: string;
38241
+ code: string;
38242
+ created_at: string;
38243
+ id: string;
38244
+ is_active: boolean;
38245
+ label: string;
38246
+ sort_order: number;
38247
+ unit: string;
38248
+ updated_at: string;
38249
+ };
38250
+ Insert: {
38251
+ category: string;
38252
+ code: string;
38253
+ created_at?: string;
38254
+ id?: string;
38255
+ is_active?: boolean;
38256
+ label: string;
38257
+ sort_order?: number;
38258
+ unit: string;
38259
+ updated_at?: string;
38260
+ };
38261
+ Update: {
38262
+ category?: string;
38263
+ code?: string;
38264
+ created_at?: string;
38265
+ id?: string;
38266
+ is_active?: boolean;
38267
+ label?: string;
38268
+ sort_order?: number;
38269
+ unit?: string;
38270
+ updated_at?: string;
38271
+ };
38272
+ Relationships: [];
38273
+ };
35286
38274
  notifications: {
35287
38275
  Row: {
35288
38276
  created_at: string;
@@ -36265,6 +39253,7 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
36265
39253
  purchase_price: number | null;
36266
39254
  quantity: number;
36267
39255
  sale_price: number | null;
39256
+ trade_item_key: string | null;
36268
39257
  unit: string;
36269
39258
  updated_at: string;
36270
39259
  weight: string | null;
@@ -36287,6 +39276,7 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
36287
39276
  purchase_price?: number | null;
36288
39277
  quantity?: number;
36289
39278
  sale_price?: number | null;
39279
+ trade_item_key?: string | null;
36290
39280
  unit?: string;
36291
39281
  updated_at?: string;
36292
39282
  weight?: string | null;
@@ -36309,6 +39299,7 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
36309
39299
  purchase_price?: number | null;
36310
39300
  quantity?: number;
36311
39301
  sale_price?: number | null;
39302
+ trade_item_key?: string | null;
36312
39303
  unit?: string;
36313
39304
  updated_at?: string;
36314
39305
  weight?: string | null;
@@ -37128,6 +40119,102 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
37128
40119
  };
37129
40120
  Relationships: [];
37130
40121
  };
40122
+ stock_import_runs: {
40123
+ Row: {
40124
+ connection_id: string | null;
40125
+ created_at: string;
40126
+ created_rows: number;
40127
+ errors: import("../integrations/supabase/types").Json;
40128
+ filename: string | null;
40129
+ id: string;
40130
+ mutations: import("../integrations/supabase/types").Json;
40131
+ skipped_rows: number;
40132
+ total_rows: number;
40133
+ updated_rows: number;
40134
+ user_id: string;
40135
+ };
40136
+ Insert: {
40137
+ connection_id?: string | null;
40138
+ created_at?: string;
40139
+ created_rows?: number;
40140
+ errors?: import("../integrations/supabase/types").Json;
40141
+ filename?: string | null;
40142
+ id?: string;
40143
+ mutations?: import("../integrations/supabase/types").Json;
40144
+ skipped_rows?: number;
40145
+ total_rows?: number;
40146
+ updated_rows?: number;
40147
+ user_id: string;
40148
+ };
40149
+ Update: {
40150
+ connection_id?: string | null;
40151
+ created_at?: string;
40152
+ created_rows?: number;
40153
+ errors?: import("../integrations/supabase/types").Json;
40154
+ filename?: string | null;
40155
+ id?: string;
40156
+ mutations?: import("../integrations/supabase/types").Json;
40157
+ skipped_rows?: number;
40158
+ total_rows?: number;
40159
+ updated_rows?: number;
40160
+ user_id?: string;
40161
+ };
40162
+ Relationships: [];
40163
+ };
40164
+ stock_mutation_log: {
40165
+ Row: {
40166
+ connection_id: string | null;
40167
+ created_at: string;
40168
+ created_by: string | null;
40169
+ id: string;
40170
+ mutation_type: string;
40171
+ order_id: string | null;
40172
+ order_item_id: string | null;
40173
+ order_source: string | null;
40174
+ physical_after: number | null;
40175
+ physical_before: number | null;
40176
+ qty_delta: number;
40177
+ reason: string | null;
40178
+ reserved_after: number | null;
40179
+ reserved_before: number | null;
40180
+ trade_item_key: string;
40181
+ };
40182
+ Insert: {
40183
+ connection_id?: string | null;
40184
+ created_at?: string;
40185
+ created_by?: string | null;
40186
+ id?: string;
40187
+ mutation_type: string;
40188
+ order_id?: string | null;
40189
+ order_item_id?: string | null;
40190
+ order_source?: string | null;
40191
+ physical_after?: number | null;
40192
+ physical_before?: number | null;
40193
+ qty_delta: number;
40194
+ reason?: string | null;
40195
+ reserved_after?: number | null;
40196
+ reserved_before?: number | null;
40197
+ trade_item_key: string;
40198
+ };
40199
+ Update: {
40200
+ connection_id?: string | null;
40201
+ created_at?: string;
40202
+ created_by?: string | null;
40203
+ id?: string;
40204
+ mutation_type?: string;
40205
+ order_id?: string | null;
40206
+ order_item_id?: string | null;
40207
+ order_source?: string | null;
40208
+ physical_after?: number | null;
40209
+ physical_before?: number | null;
40210
+ qty_delta?: number;
40211
+ reason?: string | null;
40212
+ reserved_after?: number | null;
40213
+ reserved_before?: number | null;
40214
+ trade_item_key?: string;
40215
+ };
40216
+ Relationships: [];
40217
+ };
37131
40218
  supplier_products: {
37132
40219
  Row: {
37133
40220
  article_number: string | null;
@@ -38705,6 +41792,44 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
38705
41792
  };
38706
41793
  Relationships: [];
38707
41794
  };
41795
+ floriday_customer_discounts: {
41796
+ Row: {
41797
+ base_price: number | null;
41798
+ buyer_organization_id: string | null;
41799
+ currency: string | null;
41800
+ discount_type: string | null;
41801
+ discount_value: number | null;
41802
+ min_quantity: number | null;
41803
+ net_price: number | null;
41804
+ product_group_id: string | null;
41805
+ raw: import("../integrations/supabase/types").Json | null;
41806
+ source: string | null;
41807
+ source_id: string | null;
41808
+ trade_item_id: string | null;
41809
+ valid_from: string | null;
41810
+ valid_until: string | null;
41811
+ };
41812
+ Relationships: [];
41813
+ };
41814
+ local_customer_discounts: {
41815
+ Row: {
41816
+ base_price: number | null;
41817
+ currency: string | null;
41818
+ customer_id: string | null;
41819
+ discount_type: string | null;
41820
+ discount_value: number | null;
41821
+ min_quantity: number | null;
41822
+ net_price: number | null;
41823
+ product_category_id: string | null;
41824
+ product_id: string | null;
41825
+ product_name: string | null;
41826
+ source: string | null;
41827
+ source_id: string | null;
41828
+ valid_from: string | null;
41829
+ valid_until: string | null;
41830
+ };
41831
+ Relationships: [];
41832
+ };
38708
41833
  manufacture_product_possible_stock_view: {
38709
41834
  Row: {
38710
41835
  component_count: number | null;
@@ -38989,6 +42114,54 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
38989
42114
  };
38990
42115
  Returns: number;
38991
42116
  };
42117
+ afh_city_code: {
42118
+ Args: {
42119
+ _city: string;
42120
+ _country: string;
42121
+ };
42122
+ Returns: string;
42123
+ };
42124
+ afh_normalize_country: {
42125
+ Args: {
42126
+ _raw: string;
42127
+ };
42128
+ Returns: string;
42129
+ };
42130
+ afh_normalize_nl_province: {
42131
+ Args: {
42132
+ _raw: string;
42133
+ };
42134
+ Returns: string;
42135
+ };
42136
+ afh_subtract_workdays: {
42137
+ Args: {
42138
+ _date: string;
42139
+ _days: number;
42140
+ };
42141
+ Returns: string;
42142
+ };
42143
+ apply_stock_consumption: {
42144
+ Args: {
42145
+ p_order_id: string;
42146
+ p_order_item_id: string;
42147
+ p_qty: number;
42148
+ p_reason: string;
42149
+ p_source: string;
42150
+ p_trade_item_key: string;
42151
+ };
42152
+ Returns: undefined;
42153
+ };
42154
+ apply_stock_reservation: {
42155
+ Args: {
42156
+ p_order_id: string;
42157
+ p_order_item_id: string;
42158
+ p_qty: number;
42159
+ p_reason: string;
42160
+ p_source: string;
42161
+ p_trade_item_key: string;
42162
+ };
42163
+ Returns: undefined;
42164
+ };
38992
42165
  assign_cart_numbers: {
38993
42166
  Args: {
38994
42167
  p_carts: import("../integrations/supabase/types").Json;
@@ -39012,12 +42185,40 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
39012
42185
  order_number: string;
39013
42186
  }[];
39014
42187
  };
42188
+ backfill_open_order_reservations: {
42189
+ Args: never;
42190
+ Returns: {
42191
+ processed_items: number;
42192
+ }[];
42193
+ };
39015
42194
  call_exact_route: {
39016
42195
  Args: {
39017
42196
  path: string;
39018
42197
  };
39019
42198
  Returns: number;
39020
42199
  };
42200
+ check_offer_product_available_stock: {
42201
+ Args: {
42202
+ p_campaign_product_id: string;
42203
+ p_code: string;
42204
+ p_needed_qty?: number;
42205
+ p_product_name?: string;
42206
+ };
42207
+ Returns: import("../integrations/supabase/types").Json;
42208
+ };
42209
+ check_trade_item_available_stock: {
42210
+ Args: {
42211
+ p_connection_id?: string;
42212
+ p_context?: string;
42213
+ p_needed_qty?: number;
42214
+ p_order_id?: string;
42215
+ p_order_item_id?: string;
42216
+ p_owner_id?: string;
42217
+ p_product_name?: string;
42218
+ p_trade_item_key: string;
42219
+ };
42220
+ Returns: import("../integrations/supabase/types").Json;
42221
+ };
39021
42222
  cleanup_old_bookings: {
39022
42223
  Args: never;
39023
42224
  Returns: number;
@@ -39061,6 +42262,12 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
39061
42262
  table_name: string;
39062
42263
  }[];
39063
42264
  };
42265
+ dispatch_carrier_signups_sql: {
42266
+ Args: {
42267
+ _catchup?: string;
42268
+ };
42269
+ Returns: import("../integrations/supabase/types").Json;
42270
+ };
39064
42271
  email_auth_decrypt: {
39065
42272
  Args: {
39066
42273
  cipher: string;
@@ -39096,6 +42303,12 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
39096
42303
  status: string;
39097
42304
  }[];
39098
42305
  };
42306
+ ensure_trade_item_stock_row: {
42307
+ Args: {
42308
+ p_key: string;
42309
+ };
42310
+ Returns: undefined;
42311
+ };
39099
42312
  ensure_user_tenant: {
39100
42313
  Args: never;
39101
42314
  Returns: string;
@@ -39133,6 +42346,31 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
39133
42346
  };
39134
42347
  Returns: boolean;
39135
42348
  };
42349
+ find_trade_item_key: {
42350
+ Args: {
42351
+ p_barcode: string;
42352
+ p_name: string;
42353
+ p_product_id: string;
42354
+ };
42355
+ Returns: string;
42356
+ };
42357
+ floriday_effective_price: {
42358
+ Args: {
42359
+ _buyer_id: string;
42360
+ _on_date?: string;
42361
+ _quantity?: number;
42362
+ _trade_item_id: string;
42363
+ };
42364
+ Returns: {
42365
+ base_price: number;
42366
+ currency: string;
42367
+ discount_type: string;
42368
+ discount_value: number;
42369
+ net_price: number;
42370
+ source: string;
42371
+ source_id: string;
42372
+ }[];
42373
+ };
39136
42374
  format_cart_number: {
39137
42375
  Args: {
39138
42376
  p_pick_date: string;
@@ -39153,6 +42391,13 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
39153
42391
  preferred_warehouse_name: string;
39154
42392
  }[];
39155
42393
  };
42394
+ get_active_floriday_context: {
42395
+ Args: never;
42396
+ Returns: {
42397
+ connection_id: string;
42398
+ user_id: string;
42399
+ }[];
42400
+ };
39156
42401
  get_active_twinfield_public: {
39157
42402
  Args: never;
39158
42403
  Returns: {
@@ -39255,6 +42500,18 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
39255
42500
  };
39256
42501
  Returns: import("../integrations/supabase/types").Json;
39257
42502
  };
42503
+ get_offer_recipient_by_code: {
42504
+ Args: {
42505
+ p_code: string;
42506
+ };
42507
+ Returns: {
42508
+ campaign_id: string;
42509
+ clicked_at: string;
42510
+ customer_id: string;
42511
+ id: string;
42512
+ ordered_at: string;
42513
+ }[];
42514
+ };
39258
42515
  get_or_assign_floriday_order_number: {
39259
42516
  Args: {
39260
42517
  p_floriday_id: string;
@@ -39307,6 +42564,34 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
39307
42564
  Args: never;
39308
42565
  Returns: boolean;
39309
42566
  };
42567
+ local_effective_price: {
42568
+ Args: {
42569
+ _customer_id: string;
42570
+ _on_date?: string;
42571
+ _product_id: string;
42572
+ _quantity?: number;
42573
+ };
42574
+ Returns: {
42575
+ currency: string;
42576
+ discount_type: string;
42577
+ discount_value: number;
42578
+ net_price: number;
42579
+ source: string;
42580
+ source_id: string;
42581
+ }[];
42582
+ };
42583
+ mark_offer_clicked: {
42584
+ Args: {
42585
+ p_code: string;
42586
+ };
42587
+ Returns: undefined;
42588
+ };
42589
+ mark_offer_ordered: {
42590
+ Args: {
42591
+ p_code: string;
42592
+ };
42593
+ Returns: undefined;
42594
+ };
39310
42595
  next_order_number: {
39311
42596
  Args: {
39312
42597
  p_prefix: string;
@@ -39326,6 +42611,14 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
39326
42611
  };
39327
42612
  Returns: string;
39328
42613
  };
42614
+ offer_recipient_matches: {
42615
+ Args: {
42616
+ _campaign_id: string;
42617
+ _customer_id: string;
42618
+ _recipient_id: string;
42619
+ };
42620
+ Returns: boolean;
42621
+ };
39329
42622
  pickstation_get_orders_raw: {
39330
42623
  Args: never;
39331
42624
  Returns: import("../integrations/supabase/types").Json;
@@ -39353,6 +42646,13 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
39353
42646
  };
39354
42647
  Returns: undefined;
39355
42648
  };
42649
+ promote_trade_item_key: {
42650
+ Args: {
42651
+ p_new: string;
42652
+ p_old: string;
42653
+ };
42654
+ Returns: undefined;
42655
+ };
39356
42656
  refresh_floricode_derived_code_lists: {
39357
42657
  Args: never;
39358
42658
  Returns: {
@@ -40402,6 +43702,7 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
40402
43702
  notes: string | null;
40403
43703
  performed_at: string;
40404
43704
  rescheduled_count: number;
43705
+ stock_consumed_at: string | null;
40405
43706
  total_carts: number;
40406
43707
  updated_at: string;
40407
43708
  user_id: string;
@@ -40415,6 +43716,7 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
40415
43716
  notes?: string | null;
40416
43717
  performed_at?: string;
40417
43718
  rescheduled_count?: number;
43719
+ stock_consumed_at?: string | null;
40418
43720
  total_carts?: number;
40419
43721
  updated_at?: string;
40420
43722
  user_id: string;
@@ -40428,6 +43730,7 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
40428
43730
  notes?: string | null;
40429
43731
  performed_at?: string;
40430
43732
  rescheduled_count?: number;
43733
+ stock_consumed_at?: string | null;
40431
43734
  total_carts?: number;
40432
43735
  updated_at?: string;
40433
43736
  user_id?: string;
@@ -43308,6 +46611,51 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
43308
46611
  referencedColumns: ["id"];
43309
46612
  }];
43310
46613
  };
46614
+ floriday_continuous_stock_queue: {
46615
+ Row: {
46616
+ attempts: number;
46617
+ connection_id: string;
46618
+ created_at: string;
46619
+ gateway_attempt_id: string | null;
46620
+ id: string;
46621
+ last_error: string | null;
46622
+ number_of_pieces: number;
46623
+ sent_at: string | null;
46624
+ status: string;
46625
+ trade_item_id: string;
46626
+ updated_at: string;
46627
+ user_id: string;
46628
+ };
46629
+ Insert: {
46630
+ attempts?: number;
46631
+ connection_id: string;
46632
+ created_at?: string;
46633
+ gateway_attempt_id?: string | null;
46634
+ id?: string;
46635
+ last_error?: string | null;
46636
+ number_of_pieces?: number;
46637
+ sent_at?: string | null;
46638
+ status?: string;
46639
+ trade_item_id: string;
46640
+ updated_at?: string;
46641
+ user_id: string;
46642
+ };
46643
+ Update: {
46644
+ attempts?: number;
46645
+ connection_id?: string;
46646
+ created_at?: string;
46647
+ gateway_attempt_id?: string | null;
46648
+ id?: string;
46649
+ last_error?: string | null;
46650
+ number_of_pieces?: number;
46651
+ sent_at?: string | null;
46652
+ status?: string;
46653
+ trade_item_id?: string;
46654
+ updated_at?: string;
46655
+ user_id?: string;
46656
+ };
46657
+ Relationships: [];
46658
+ };
43311
46659
  floriday_contract_trade_item_groups_cache: {
43312
46660
  Row: {
43313
46661
  connection_id: string;
@@ -44697,6 +48045,204 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
44697
48045
  };
44698
48046
  Relationships: [];
44699
48047
  };
48048
+ local_customer_agreements: {
48049
+ Row: {
48050
+ base_price: number | null;
48051
+ created_at: string;
48052
+ currency: string;
48053
+ customer_id: string;
48054
+ id: string;
48055
+ min_quantity: number;
48056
+ net_price: number;
48057
+ notes: string | null;
48058
+ product_category_id: string | null;
48059
+ product_id: string | null;
48060
+ updated_at: string;
48061
+ valid_from: string | null;
48062
+ valid_until: string | null;
48063
+ };
48064
+ Insert: {
48065
+ base_price?: number | null;
48066
+ created_at?: string;
48067
+ currency?: string;
48068
+ customer_id: string;
48069
+ id?: string;
48070
+ min_quantity?: number;
48071
+ net_price: number;
48072
+ notes?: string | null;
48073
+ product_category_id?: string | null;
48074
+ product_id?: string | null;
48075
+ updated_at?: string;
48076
+ valid_from?: string | null;
48077
+ valid_until?: string | null;
48078
+ };
48079
+ Update: {
48080
+ base_price?: number | null;
48081
+ created_at?: string;
48082
+ currency?: string;
48083
+ customer_id?: string;
48084
+ id?: string;
48085
+ min_quantity?: number;
48086
+ net_price?: number;
48087
+ notes?: string | null;
48088
+ product_category_id?: string | null;
48089
+ product_id?: string | null;
48090
+ updated_at?: string;
48091
+ valid_from?: string | null;
48092
+ valid_until?: string | null;
48093
+ };
48094
+ Relationships: [{
48095
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
48096
+ columns: ["customer_id"];
48097
+ isOneToOne: false;
48098
+ referencedRelation: "customers";
48099
+ referencedColumns: ["id"];
48100
+ }, {
48101
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
48102
+ columns: ["product_category_id"];
48103
+ isOneToOne: false;
48104
+ referencedRelation: "product_categories";
48105
+ referencedColumns: ["id"];
48106
+ }, {
48107
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
48108
+ columns: ["product_id"];
48109
+ isOneToOne: false;
48110
+ referencedRelation: "products";
48111
+ referencedColumns: ["id"];
48112
+ }];
48113
+ };
48114
+ local_customer_price_groups: {
48115
+ Row: {
48116
+ created_at: string;
48117
+ currency: string;
48118
+ customer_id: string;
48119
+ discount_type: string;
48120
+ discount_value: number;
48121
+ id: string;
48122
+ min_quantity: number;
48123
+ notes: string | null;
48124
+ product_category_id: string | null;
48125
+ product_id: string | null;
48126
+ updated_at: string;
48127
+ valid_from: string | null;
48128
+ valid_until: string | null;
48129
+ };
48130
+ Insert: {
48131
+ created_at?: string;
48132
+ currency?: string;
48133
+ customer_id: string;
48134
+ discount_type: string;
48135
+ discount_value: number;
48136
+ id?: string;
48137
+ min_quantity?: number;
48138
+ notes?: string | null;
48139
+ product_category_id?: string | null;
48140
+ product_id?: string | null;
48141
+ updated_at?: string;
48142
+ valid_from?: string | null;
48143
+ valid_until?: string | null;
48144
+ };
48145
+ Update: {
48146
+ created_at?: string;
48147
+ currency?: string;
48148
+ customer_id?: string;
48149
+ discount_type?: string;
48150
+ discount_value?: number;
48151
+ id?: string;
48152
+ min_quantity?: number;
48153
+ notes?: string | null;
48154
+ product_category_id?: string | null;
48155
+ product_id?: string | null;
48156
+ updated_at?: string;
48157
+ valid_from?: string | null;
48158
+ valid_until?: string | null;
48159
+ };
48160
+ Relationships: [{
48161
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
48162
+ columns: ["customer_id"];
48163
+ isOneToOne: false;
48164
+ referencedRelation: "customers";
48165
+ referencedColumns: ["id"];
48166
+ }, {
48167
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
48168
+ columns: ["product_category_id"];
48169
+ isOneToOne: false;
48170
+ referencedRelation: "product_categories";
48171
+ referencedColumns: ["id"];
48172
+ }, {
48173
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
48174
+ columns: ["product_id"];
48175
+ isOneToOne: false;
48176
+ referencedRelation: "products";
48177
+ referencedColumns: ["id"];
48178
+ }];
48179
+ };
48180
+ local_customer_sales_strategies: {
48181
+ Row: {
48182
+ created_at: string;
48183
+ currency: string;
48184
+ customer_id: string;
48185
+ discount_type: string;
48186
+ discount_value: number;
48187
+ id: string;
48188
+ min_quantity: number;
48189
+ notes: string | null;
48190
+ product_category_id: string | null;
48191
+ product_id: string | null;
48192
+ updated_at: string;
48193
+ valid_from: string | null;
48194
+ valid_until: string | null;
48195
+ };
48196
+ Insert: {
48197
+ created_at?: string;
48198
+ currency?: string;
48199
+ customer_id: string;
48200
+ discount_type: string;
48201
+ discount_value: number;
48202
+ id?: string;
48203
+ min_quantity?: number;
48204
+ notes?: string | null;
48205
+ product_category_id?: string | null;
48206
+ product_id?: string | null;
48207
+ updated_at?: string;
48208
+ valid_from?: string | null;
48209
+ valid_until?: string | null;
48210
+ };
48211
+ Update: {
48212
+ created_at?: string;
48213
+ currency?: string;
48214
+ customer_id?: string;
48215
+ discount_type?: string;
48216
+ discount_value?: number;
48217
+ id?: string;
48218
+ min_quantity?: number;
48219
+ notes?: string | null;
48220
+ product_category_id?: string | null;
48221
+ product_id?: string | null;
48222
+ updated_at?: string;
48223
+ valid_from?: string | null;
48224
+ valid_until?: string | null;
48225
+ };
48226
+ Relationships: [{
48227
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
48228
+ columns: ["customer_id"];
48229
+ isOneToOne: false;
48230
+ referencedRelation: "customers";
48231
+ referencedColumns: ["id"];
48232
+ }, {
48233
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
48234
+ columns: ["product_category_id"];
48235
+ isOneToOne: false;
48236
+ referencedRelation: "product_categories";
48237
+ referencedColumns: ["id"];
48238
+ }, {
48239
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
48240
+ columns: ["product_id"];
48241
+ isOneToOne: false;
48242
+ referencedRelation: "products";
48243
+ referencedColumns: ["id"];
48244
+ }];
48245
+ };
44700
48246
  locations: {
44701
48247
  Row: {
44702
48248
  created_at: string;
@@ -45204,6 +48750,273 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
45204
48750
  referencedColumns: ["id"];
45205
48751
  }];
45206
48752
  };
48753
+ nmbrs_component_mapping: {
48754
+ Row: {
48755
+ created_at: string;
48756
+ id: string;
48757
+ source_kind: string;
48758
+ source_value: string | null;
48759
+ updated_at: string;
48760
+ wage_code: string;
48761
+ };
48762
+ Insert: {
48763
+ created_at?: string;
48764
+ id?: string;
48765
+ source_kind: string;
48766
+ source_value?: string | null;
48767
+ updated_at?: string;
48768
+ wage_code: string;
48769
+ };
48770
+ Update: {
48771
+ created_at?: string;
48772
+ id?: string;
48773
+ source_kind?: string;
48774
+ source_value?: string | null;
48775
+ updated_at?: string;
48776
+ wage_code?: string;
48777
+ };
48778
+ Relationships: [{
48779
+ foreignKeyName: "nmbrs_component_mapping_wage_code_fkey";
48780
+ columns: ["wage_code"];
48781
+ isOneToOne: false;
48782
+ referencedRelation: "nmbrs_wage_components";
48783
+ referencedColumns: ["code"];
48784
+ }];
48785
+ };
48786
+ nmbrs_employee_mapping: {
48787
+ Row: {
48788
+ active_from: string | null;
48789
+ active_to: string | null;
48790
+ contract_hours_per_week: number | null;
48791
+ created_at: string;
48792
+ hourly_wage: number | null;
48793
+ id: string;
48794
+ monteur_id: string;
48795
+ nmbrs_company_code: string | null;
48796
+ nmbrs_employee_number: string;
48797
+ updated_at: string;
48798
+ };
48799
+ Insert: {
48800
+ active_from?: string | null;
48801
+ active_to?: string | null;
48802
+ contract_hours_per_week?: number | null;
48803
+ created_at?: string;
48804
+ hourly_wage?: number | null;
48805
+ id?: string;
48806
+ monteur_id: string;
48807
+ nmbrs_company_code?: string | null;
48808
+ nmbrs_employee_number: string;
48809
+ updated_at?: string;
48810
+ };
48811
+ Update: {
48812
+ active_from?: string | null;
48813
+ active_to?: string | null;
48814
+ contract_hours_per_week?: number | null;
48815
+ created_at?: string;
48816
+ hourly_wage?: number | null;
48817
+ id?: string;
48818
+ monteur_id?: string;
48819
+ nmbrs_company_code?: string | null;
48820
+ nmbrs_employee_number?: string;
48821
+ updated_at?: string;
48822
+ };
48823
+ Relationships: [{
48824
+ foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
48825
+ columns: ["monteur_id"];
48826
+ isOneToOne: true;
48827
+ referencedRelation: "monteurs";
48828
+ referencedColumns: ["id"];
48829
+ }];
48830
+ };
48831
+ nmbrs_export_lines: {
48832
+ Row: {
48833
+ amount: number;
48834
+ created_at: string;
48835
+ entry_date: string;
48836
+ hours: number;
48837
+ id: string;
48838
+ monteur_id: string;
48839
+ nmbrs_employee_number: string | null;
48840
+ notes: string | null;
48841
+ run_id: string;
48842
+ source_kind: string | null;
48843
+ source_ref_id: string | null;
48844
+ updated_at: string;
48845
+ wage_code: string;
48846
+ };
48847
+ Insert: {
48848
+ amount?: number;
48849
+ created_at?: string;
48850
+ entry_date: string;
48851
+ hours?: number;
48852
+ id?: string;
48853
+ monteur_id: string;
48854
+ nmbrs_employee_number?: string | null;
48855
+ notes?: string | null;
48856
+ run_id: string;
48857
+ source_kind?: string | null;
48858
+ source_ref_id?: string | null;
48859
+ updated_at?: string;
48860
+ wage_code: string;
48861
+ };
48862
+ Update: {
48863
+ amount?: number;
48864
+ created_at?: string;
48865
+ entry_date?: string;
48866
+ hours?: number;
48867
+ id?: string;
48868
+ monteur_id?: string;
48869
+ nmbrs_employee_number?: string | null;
48870
+ notes?: string | null;
48871
+ run_id?: string;
48872
+ source_kind?: string | null;
48873
+ source_ref_id?: string | null;
48874
+ updated_at?: string;
48875
+ wage_code?: string;
48876
+ };
48877
+ Relationships: [{
48878
+ foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
48879
+ columns: ["monteur_id"];
48880
+ isOneToOne: false;
48881
+ referencedRelation: "monteurs";
48882
+ referencedColumns: ["id"];
48883
+ }, {
48884
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
48885
+ columns: ["run_id"];
48886
+ isOneToOne: false;
48887
+ referencedRelation: "nmbrs_export_runs";
48888
+ referencedColumns: ["id"];
48889
+ }, {
48890
+ foreignKeyName: "nmbrs_export_lines_wage_code_fkey";
48891
+ columns: ["wage_code"];
48892
+ isOneToOne: false;
48893
+ referencedRelation: "nmbrs_wage_components";
48894
+ referencedColumns: ["code"];
48895
+ }];
48896
+ };
48897
+ nmbrs_export_runs: {
48898
+ Row: {
48899
+ created_at: string;
48900
+ file_name: string | null;
48901
+ generated_at: string;
48902
+ generated_by: string | null;
48903
+ id: string;
48904
+ notes: string | null;
48905
+ period_end: string;
48906
+ period_label: string;
48907
+ period_start: string;
48908
+ status: string;
48909
+ total_hours: number;
48910
+ total_lines: number;
48911
+ updated_at: string;
48912
+ };
48913
+ Insert: {
48914
+ created_at?: string;
48915
+ file_name?: string | null;
48916
+ generated_at?: string;
48917
+ generated_by?: string | null;
48918
+ id?: string;
48919
+ notes?: string | null;
48920
+ period_end: string;
48921
+ period_label: string;
48922
+ period_start: string;
48923
+ status?: string;
48924
+ total_hours?: number;
48925
+ total_lines?: number;
48926
+ updated_at?: string;
48927
+ };
48928
+ Update: {
48929
+ created_at?: string;
48930
+ file_name?: string | null;
48931
+ generated_at?: string;
48932
+ generated_by?: string | null;
48933
+ id?: string;
48934
+ notes?: string | null;
48935
+ period_end?: string;
48936
+ period_label?: string;
48937
+ period_start?: string;
48938
+ status?: string;
48939
+ total_hours?: number;
48940
+ total_lines?: number;
48941
+ updated_at?: string;
48942
+ };
48943
+ Relationships: [];
48944
+ };
48945
+ nmbrs_settings: {
48946
+ Row: {
48947
+ created_at: string;
48948
+ default_company_code: string | null;
48949
+ id: boolean;
48950
+ include_travel: boolean;
48951
+ overtime_threshold_daily: number;
48952
+ overtime_threshold_weekly: number;
48953
+ period_type: string;
48954
+ updated_at: string;
48955
+ updated_by: string | null;
48956
+ week_start_day: number;
48957
+ };
48958
+ Insert: {
48959
+ created_at?: string;
48960
+ default_company_code?: string | null;
48961
+ id?: boolean;
48962
+ include_travel?: boolean;
48963
+ overtime_threshold_daily?: number;
48964
+ overtime_threshold_weekly?: number;
48965
+ period_type?: string;
48966
+ updated_at?: string;
48967
+ updated_by?: string | null;
48968
+ week_start_day?: number;
48969
+ };
48970
+ Update: {
48971
+ created_at?: string;
48972
+ default_company_code?: string | null;
48973
+ id?: boolean;
48974
+ include_travel?: boolean;
48975
+ overtime_threshold_daily?: number;
48976
+ overtime_threshold_weekly?: number;
48977
+ period_type?: string;
48978
+ updated_at?: string;
48979
+ updated_by?: string | null;
48980
+ week_start_day?: number;
48981
+ };
48982
+ Relationships: [];
48983
+ };
48984
+ nmbrs_wage_components: {
48985
+ Row: {
48986
+ category: string;
48987
+ code: string;
48988
+ created_at: string;
48989
+ id: string;
48990
+ is_active: boolean;
48991
+ label: string;
48992
+ sort_order: number;
48993
+ unit: string;
48994
+ updated_at: string;
48995
+ };
48996
+ Insert: {
48997
+ category: string;
48998
+ code: string;
48999
+ created_at?: string;
49000
+ id?: string;
49001
+ is_active?: boolean;
49002
+ label: string;
49003
+ sort_order?: number;
49004
+ unit: string;
49005
+ updated_at?: string;
49006
+ };
49007
+ Update: {
49008
+ category?: string;
49009
+ code?: string;
49010
+ created_at?: string;
49011
+ id?: string;
49012
+ is_active?: boolean;
49013
+ label?: string;
49014
+ sort_order?: number;
49015
+ unit?: string;
49016
+ updated_at?: string;
49017
+ };
49018
+ Relationships: [];
49019
+ };
45207
49020
  notifications: {
45208
49021
  Row: {
45209
49022
  created_at: string;
@@ -46186,6 +49999,7 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
46186
49999
  purchase_price: number | null;
46187
50000
  quantity: number;
46188
50001
  sale_price: number | null;
50002
+ trade_item_key: string | null;
46189
50003
  unit: string;
46190
50004
  updated_at: string;
46191
50005
  weight: string | null;
@@ -46208,6 +50022,7 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
46208
50022
  purchase_price?: number | null;
46209
50023
  quantity?: number;
46210
50024
  sale_price?: number | null;
50025
+ trade_item_key?: string | null;
46211
50026
  unit?: string;
46212
50027
  updated_at?: string;
46213
50028
  weight?: string | null;
@@ -46230,6 +50045,7 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
46230
50045
  purchase_price?: number | null;
46231
50046
  quantity?: number;
46232
50047
  sale_price?: number | null;
50048
+ trade_item_key?: string | null;
46233
50049
  unit?: string;
46234
50050
  updated_at?: string;
46235
50051
  weight?: string | null;
@@ -47049,6 +50865,102 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
47049
50865
  };
47050
50866
  Relationships: [];
47051
50867
  };
50868
+ stock_import_runs: {
50869
+ Row: {
50870
+ connection_id: string | null;
50871
+ created_at: string;
50872
+ created_rows: number;
50873
+ errors: import("../integrations/supabase/types").Json;
50874
+ filename: string | null;
50875
+ id: string;
50876
+ mutations: import("../integrations/supabase/types").Json;
50877
+ skipped_rows: number;
50878
+ total_rows: number;
50879
+ updated_rows: number;
50880
+ user_id: string;
50881
+ };
50882
+ Insert: {
50883
+ connection_id?: string | null;
50884
+ created_at?: string;
50885
+ created_rows?: number;
50886
+ errors?: import("../integrations/supabase/types").Json;
50887
+ filename?: string | null;
50888
+ id?: string;
50889
+ mutations?: import("../integrations/supabase/types").Json;
50890
+ skipped_rows?: number;
50891
+ total_rows?: number;
50892
+ updated_rows?: number;
50893
+ user_id: string;
50894
+ };
50895
+ Update: {
50896
+ connection_id?: string | null;
50897
+ created_at?: string;
50898
+ created_rows?: number;
50899
+ errors?: import("../integrations/supabase/types").Json;
50900
+ filename?: string | null;
50901
+ id?: string;
50902
+ mutations?: import("../integrations/supabase/types").Json;
50903
+ skipped_rows?: number;
50904
+ total_rows?: number;
50905
+ updated_rows?: number;
50906
+ user_id?: string;
50907
+ };
50908
+ Relationships: [];
50909
+ };
50910
+ stock_mutation_log: {
50911
+ Row: {
50912
+ connection_id: string | null;
50913
+ created_at: string;
50914
+ created_by: string | null;
50915
+ id: string;
50916
+ mutation_type: string;
50917
+ order_id: string | null;
50918
+ order_item_id: string | null;
50919
+ order_source: string | null;
50920
+ physical_after: number | null;
50921
+ physical_before: number | null;
50922
+ qty_delta: number;
50923
+ reason: string | null;
50924
+ reserved_after: number | null;
50925
+ reserved_before: number | null;
50926
+ trade_item_key: string;
50927
+ };
50928
+ Insert: {
50929
+ connection_id?: string | null;
50930
+ created_at?: string;
50931
+ created_by?: string | null;
50932
+ id?: string;
50933
+ mutation_type: string;
50934
+ order_id?: string | null;
50935
+ order_item_id?: string | null;
50936
+ order_source?: string | null;
50937
+ physical_after?: number | null;
50938
+ physical_before?: number | null;
50939
+ qty_delta: number;
50940
+ reason?: string | null;
50941
+ reserved_after?: number | null;
50942
+ reserved_before?: number | null;
50943
+ trade_item_key: string;
50944
+ };
50945
+ Update: {
50946
+ connection_id?: string | null;
50947
+ created_at?: string;
50948
+ created_by?: string | null;
50949
+ id?: string;
50950
+ mutation_type?: string;
50951
+ order_id?: string | null;
50952
+ order_item_id?: string | null;
50953
+ order_source?: string | null;
50954
+ physical_after?: number | null;
50955
+ physical_before?: number | null;
50956
+ qty_delta?: number;
50957
+ reason?: string | null;
50958
+ reserved_after?: number | null;
50959
+ reserved_before?: number | null;
50960
+ trade_item_key?: string;
50961
+ };
50962
+ Relationships: [];
50963
+ };
47052
50964
  supplier_products: {
47053
50965
  Row: {
47054
50966
  article_number: string | null;
@@ -48626,6 +52538,44 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
48626
52538
  };
48627
52539
  Relationships: [];
48628
52540
  };
52541
+ floriday_customer_discounts: {
52542
+ Row: {
52543
+ base_price: number | null;
52544
+ buyer_organization_id: string | null;
52545
+ currency: string | null;
52546
+ discount_type: string | null;
52547
+ discount_value: number | null;
52548
+ min_quantity: number | null;
52549
+ net_price: number | null;
52550
+ product_group_id: string | null;
52551
+ raw: import("../integrations/supabase/types").Json | null;
52552
+ source: string | null;
52553
+ source_id: string | null;
52554
+ trade_item_id: string | null;
52555
+ valid_from: string | null;
52556
+ valid_until: string | null;
52557
+ };
52558
+ Relationships: [];
52559
+ };
52560
+ local_customer_discounts: {
52561
+ Row: {
52562
+ base_price: number | null;
52563
+ currency: string | null;
52564
+ customer_id: string | null;
52565
+ discount_type: string | null;
52566
+ discount_value: number | null;
52567
+ min_quantity: number | null;
52568
+ net_price: number | null;
52569
+ product_category_id: string | null;
52570
+ product_id: string | null;
52571
+ product_name: string | null;
52572
+ source: string | null;
52573
+ source_id: string | null;
52574
+ valid_from: string | null;
52575
+ valid_until: string | null;
52576
+ };
52577
+ Relationships: [];
52578
+ };
48629
52579
  manufacture_product_possible_stock_view: {
48630
52580
  Row: {
48631
52581
  component_count: number | null;
@@ -48910,6 +52860,54 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
48910
52860
  };
48911
52861
  Returns: number;
48912
52862
  };
52863
+ afh_city_code: {
52864
+ Args: {
52865
+ _city: string;
52866
+ _country: string;
52867
+ };
52868
+ Returns: string;
52869
+ };
52870
+ afh_normalize_country: {
52871
+ Args: {
52872
+ _raw: string;
52873
+ };
52874
+ Returns: string;
52875
+ };
52876
+ afh_normalize_nl_province: {
52877
+ Args: {
52878
+ _raw: string;
52879
+ };
52880
+ Returns: string;
52881
+ };
52882
+ afh_subtract_workdays: {
52883
+ Args: {
52884
+ _date: string;
52885
+ _days: number;
52886
+ };
52887
+ Returns: string;
52888
+ };
52889
+ apply_stock_consumption: {
52890
+ Args: {
52891
+ p_order_id: string;
52892
+ p_order_item_id: string;
52893
+ p_qty: number;
52894
+ p_reason: string;
52895
+ p_source: string;
52896
+ p_trade_item_key: string;
52897
+ };
52898
+ Returns: undefined;
52899
+ };
52900
+ apply_stock_reservation: {
52901
+ Args: {
52902
+ p_order_id: string;
52903
+ p_order_item_id: string;
52904
+ p_qty: number;
52905
+ p_reason: string;
52906
+ p_source: string;
52907
+ p_trade_item_key: string;
52908
+ };
52909
+ Returns: undefined;
52910
+ };
48913
52911
  assign_cart_numbers: {
48914
52912
  Args: {
48915
52913
  p_carts: import("../integrations/supabase/types").Json;
@@ -48933,12 +52931,40 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
48933
52931
  order_number: string;
48934
52932
  }[];
48935
52933
  };
52934
+ backfill_open_order_reservations: {
52935
+ Args: never;
52936
+ Returns: {
52937
+ processed_items: number;
52938
+ }[];
52939
+ };
48936
52940
  call_exact_route: {
48937
52941
  Args: {
48938
52942
  path: string;
48939
52943
  };
48940
52944
  Returns: number;
48941
52945
  };
52946
+ check_offer_product_available_stock: {
52947
+ Args: {
52948
+ p_campaign_product_id: string;
52949
+ p_code: string;
52950
+ p_needed_qty?: number;
52951
+ p_product_name?: string;
52952
+ };
52953
+ Returns: import("../integrations/supabase/types").Json;
52954
+ };
52955
+ check_trade_item_available_stock: {
52956
+ Args: {
52957
+ p_connection_id?: string;
52958
+ p_context?: string;
52959
+ p_needed_qty?: number;
52960
+ p_order_id?: string;
52961
+ p_order_item_id?: string;
52962
+ p_owner_id?: string;
52963
+ p_product_name?: string;
52964
+ p_trade_item_key: string;
52965
+ };
52966
+ Returns: import("../integrations/supabase/types").Json;
52967
+ };
48942
52968
  cleanup_old_bookings: {
48943
52969
  Args: never;
48944
52970
  Returns: number;
@@ -48982,6 +53008,12 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
48982
53008
  table_name: string;
48983
53009
  }[];
48984
53010
  };
53011
+ dispatch_carrier_signups_sql: {
53012
+ Args: {
53013
+ _catchup?: string;
53014
+ };
53015
+ Returns: import("../integrations/supabase/types").Json;
53016
+ };
48985
53017
  email_auth_decrypt: {
48986
53018
  Args: {
48987
53019
  cipher: string;
@@ -49017,6 +53049,12 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
49017
53049
  status: string;
49018
53050
  }[];
49019
53051
  };
53052
+ ensure_trade_item_stock_row: {
53053
+ Args: {
53054
+ p_key: string;
53055
+ };
53056
+ Returns: undefined;
53057
+ };
49020
53058
  ensure_user_tenant: {
49021
53059
  Args: never;
49022
53060
  Returns: string;
@@ -49054,6 +53092,31 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
49054
53092
  };
49055
53093
  Returns: boolean;
49056
53094
  };
53095
+ find_trade_item_key: {
53096
+ Args: {
53097
+ p_barcode: string;
53098
+ p_name: string;
53099
+ p_product_id: string;
53100
+ };
53101
+ Returns: string;
53102
+ };
53103
+ floriday_effective_price: {
53104
+ Args: {
53105
+ _buyer_id: string;
53106
+ _on_date?: string;
53107
+ _quantity?: number;
53108
+ _trade_item_id: string;
53109
+ };
53110
+ Returns: {
53111
+ base_price: number;
53112
+ currency: string;
53113
+ discount_type: string;
53114
+ discount_value: number;
53115
+ net_price: number;
53116
+ source: string;
53117
+ source_id: string;
53118
+ }[];
53119
+ };
49057
53120
  format_cart_number: {
49058
53121
  Args: {
49059
53122
  p_pick_date: string;
@@ -49074,6 +53137,13 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
49074
53137
  preferred_warehouse_name: string;
49075
53138
  }[];
49076
53139
  };
53140
+ get_active_floriday_context: {
53141
+ Args: never;
53142
+ Returns: {
53143
+ connection_id: string;
53144
+ user_id: string;
53145
+ }[];
53146
+ };
49077
53147
  get_active_twinfield_public: {
49078
53148
  Args: never;
49079
53149
  Returns: {
@@ -49176,6 +53246,18 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
49176
53246
  };
49177
53247
  Returns: import("../integrations/supabase/types").Json;
49178
53248
  };
53249
+ get_offer_recipient_by_code: {
53250
+ Args: {
53251
+ p_code: string;
53252
+ };
53253
+ Returns: {
53254
+ campaign_id: string;
53255
+ clicked_at: string;
53256
+ customer_id: string;
53257
+ id: string;
53258
+ ordered_at: string;
53259
+ }[];
53260
+ };
49179
53261
  get_or_assign_floriday_order_number: {
49180
53262
  Args: {
49181
53263
  p_floriday_id: string;
@@ -49228,6 +53310,34 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
49228
53310
  Args: never;
49229
53311
  Returns: boolean;
49230
53312
  };
53313
+ local_effective_price: {
53314
+ Args: {
53315
+ _customer_id: string;
53316
+ _on_date?: string;
53317
+ _product_id: string;
53318
+ _quantity?: number;
53319
+ };
53320
+ Returns: {
53321
+ currency: string;
53322
+ discount_type: string;
53323
+ discount_value: number;
53324
+ net_price: number;
53325
+ source: string;
53326
+ source_id: string;
53327
+ }[];
53328
+ };
53329
+ mark_offer_clicked: {
53330
+ Args: {
53331
+ p_code: string;
53332
+ };
53333
+ Returns: undefined;
53334
+ };
53335
+ mark_offer_ordered: {
53336
+ Args: {
53337
+ p_code: string;
53338
+ };
53339
+ Returns: undefined;
53340
+ };
49231
53341
  next_order_number: {
49232
53342
  Args: {
49233
53343
  p_prefix: string;
@@ -49247,6 +53357,14 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
49247
53357
  };
49248
53358
  Returns: string;
49249
53359
  };
53360
+ offer_recipient_matches: {
53361
+ Args: {
53362
+ _campaign_id: string;
53363
+ _customer_id: string;
53364
+ _recipient_id: string;
53365
+ };
53366
+ Returns: boolean;
53367
+ };
49250
53368
  pickstation_get_orders_raw: {
49251
53369
  Args: never;
49252
53370
  Returns: import("../integrations/supabase/types").Json;
@@ -49274,6 +53392,13 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
49274
53392
  };
49275
53393
  Returns: undefined;
49276
53394
  };
53395
+ promote_trade_item_key: {
53396
+ Args: {
53397
+ p_new: string;
53398
+ p_old: string;
53399
+ };
53400
+ Returns: undefined;
53401
+ };
49277
53402
  refresh_floricode_derived_code_lists: {
49278
53403
  Args: never;
49279
53404
  Returns: {