@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
@@ -771,6 +771,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
771
771
  notes: string | null;
772
772
  performed_at: string;
773
773
  rescheduled_count: number;
774
+ stock_consumed_at: string | null;
774
775
  total_carts: number;
775
776
  updated_at: string;
776
777
  user_id: string;
@@ -784,6 +785,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
784
785
  notes?: string | null;
785
786
  performed_at?: string;
786
787
  rescheduled_count?: number;
788
+ stock_consumed_at?: string | null;
787
789
  total_carts?: number;
788
790
  updated_at?: string;
789
791
  user_id: string;
@@ -797,6 +799,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
797
799
  notes?: string | null;
798
800
  performed_at?: string;
799
801
  rescheduled_count?: number;
802
+ stock_consumed_at?: string | null;
800
803
  total_carts?: number;
801
804
  updated_at?: string;
802
805
  user_id?: string;
@@ -3677,6 +3680,51 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
3677
3680
  referencedColumns: ["id"];
3678
3681
  }];
3679
3682
  };
3683
+ floriday_continuous_stock_queue: {
3684
+ Row: {
3685
+ attempts: number;
3686
+ connection_id: string;
3687
+ created_at: string;
3688
+ gateway_attempt_id: string | null;
3689
+ id: string;
3690
+ last_error: string | null;
3691
+ number_of_pieces: number;
3692
+ sent_at: string | null;
3693
+ status: string;
3694
+ trade_item_id: string;
3695
+ updated_at: string;
3696
+ user_id: string;
3697
+ };
3698
+ Insert: {
3699
+ attempts?: number;
3700
+ connection_id: string;
3701
+ created_at?: string;
3702
+ gateway_attempt_id?: string | null;
3703
+ id?: string;
3704
+ last_error?: string | null;
3705
+ number_of_pieces?: number;
3706
+ sent_at?: string | null;
3707
+ status?: string;
3708
+ trade_item_id: string;
3709
+ updated_at?: string;
3710
+ user_id: string;
3711
+ };
3712
+ Update: {
3713
+ attempts?: number;
3714
+ connection_id?: string;
3715
+ created_at?: string;
3716
+ gateway_attempt_id?: string | null;
3717
+ id?: string;
3718
+ last_error?: string | null;
3719
+ number_of_pieces?: number;
3720
+ sent_at?: string | null;
3721
+ status?: string;
3722
+ trade_item_id?: string;
3723
+ updated_at?: string;
3724
+ user_id?: string;
3725
+ };
3726
+ Relationships: [];
3727
+ };
3680
3728
  floriday_contract_trade_item_groups_cache: {
3681
3729
  Row: {
3682
3730
  connection_id: string;
@@ -5066,6 +5114,204 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
5066
5114
  };
5067
5115
  Relationships: [];
5068
5116
  };
5117
+ local_customer_agreements: {
5118
+ Row: {
5119
+ base_price: number | null;
5120
+ created_at: string;
5121
+ currency: string;
5122
+ customer_id: string;
5123
+ id: string;
5124
+ min_quantity: number;
5125
+ net_price: number;
5126
+ notes: string | null;
5127
+ product_category_id: string | null;
5128
+ product_id: string | null;
5129
+ updated_at: string;
5130
+ valid_from: string | null;
5131
+ valid_until: string | null;
5132
+ };
5133
+ Insert: {
5134
+ base_price?: number | null;
5135
+ created_at?: string;
5136
+ currency?: string;
5137
+ customer_id: string;
5138
+ id?: string;
5139
+ min_quantity?: number;
5140
+ net_price: number;
5141
+ notes?: string | null;
5142
+ product_category_id?: string | null;
5143
+ product_id?: string | null;
5144
+ updated_at?: string;
5145
+ valid_from?: string | null;
5146
+ valid_until?: string | null;
5147
+ };
5148
+ Update: {
5149
+ base_price?: number | null;
5150
+ created_at?: string;
5151
+ currency?: string;
5152
+ customer_id?: string;
5153
+ id?: string;
5154
+ min_quantity?: number;
5155
+ net_price?: number;
5156
+ notes?: string | null;
5157
+ product_category_id?: string | null;
5158
+ product_id?: string | null;
5159
+ updated_at?: string;
5160
+ valid_from?: string | null;
5161
+ valid_until?: string | null;
5162
+ };
5163
+ Relationships: [{
5164
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
5165
+ columns: ["customer_id"];
5166
+ isOneToOne: false;
5167
+ referencedRelation: "customers";
5168
+ referencedColumns: ["id"];
5169
+ }, {
5170
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
5171
+ columns: ["product_category_id"];
5172
+ isOneToOne: false;
5173
+ referencedRelation: "product_categories";
5174
+ referencedColumns: ["id"];
5175
+ }, {
5176
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
5177
+ columns: ["product_id"];
5178
+ isOneToOne: false;
5179
+ referencedRelation: "products";
5180
+ referencedColumns: ["id"];
5181
+ }];
5182
+ };
5183
+ local_customer_price_groups: {
5184
+ Row: {
5185
+ created_at: string;
5186
+ currency: string;
5187
+ customer_id: string;
5188
+ discount_type: string;
5189
+ discount_value: number;
5190
+ id: string;
5191
+ min_quantity: number;
5192
+ notes: string | null;
5193
+ product_category_id: string | null;
5194
+ product_id: string | null;
5195
+ updated_at: string;
5196
+ valid_from: string | null;
5197
+ valid_until: string | null;
5198
+ };
5199
+ Insert: {
5200
+ created_at?: string;
5201
+ currency?: string;
5202
+ customer_id: string;
5203
+ discount_type: string;
5204
+ discount_value: number;
5205
+ id?: string;
5206
+ min_quantity?: number;
5207
+ notes?: string | null;
5208
+ product_category_id?: string | null;
5209
+ product_id?: string | null;
5210
+ updated_at?: string;
5211
+ valid_from?: string | null;
5212
+ valid_until?: string | null;
5213
+ };
5214
+ Update: {
5215
+ created_at?: string;
5216
+ currency?: string;
5217
+ customer_id?: string;
5218
+ discount_type?: string;
5219
+ discount_value?: number;
5220
+ id?: string;
5221
+ min_quantity?: number;
5222
+ notes?: string | null;
5223
+ product_category_id?: string | null;
5224
+ product_id?: string | null;
5225
+ updated_at?: string;
5226
+ valid_from?: string | null;
5227
+ valid_until?: string | null;
5228
+ };
5229
+ Relationships: [{
5230
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
5231
+ columns: ["customer_id"];
5232
+ isOneToOne: false;
5233
+ referencedRelation: "customers";
5234
+ referencedColumns: ["id"];
5235
+ }, {
5236
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
5237
+ columns: ["product_category_id"];
5238
+ isOneToOne: false;
5239
+ referencedRelation: "product_categories";
5240
+ referencedColumns: ["id"];
5241
+ }, {
5242
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
5243
+ columns: ["product_id"];
5244
+ isOneToOne: false;
5245
+ referencedRelation: "products";
5246
+ referencedColumns: ["id"];
5247
+ }];
5248
+ };
5249
+ local_customer_sales_strategies: {
5250
+ Row: {
5251
+ created_at: string;
5252
+ currency: string;
5253
+ customer_id: string;
5254
+ discount_type: string;
5255
+ discount_value: number;
5256
+ id: string;
5257
+ min_quantity: number;
5258
+ notes: string | null;
5259
+ product_category_id: string | null;
5260
+ product_id: string | null;
5261
+ updated_at: string;
5262
+ valid_from: string | null;
5263
+ valid_until: string | null;
5264
+ };
5265
+ Insert: {
5266
+ created_at?: string;
5267
+ currency?: string;
5268
+ customer_id: string;
5269
+ discount_type: string;
5270
+ discount_value: number;
5271
+ id?: string;
5272
+ min_quantity?: number;
5273
+ notes?: string | null;
5274
+ product_category_id?: string | null;
5275
+ product_id?: string | null;
5276
+ updated_at?: string;
5277
+ valid_from?: string | null;
5278
+ valid_until?: string | null;
5279
+ };
5280
+ Update: {
5281
+ created_at?: string;
5282
+ currency?: string;
5283
+ customer_id?: string;
5284
+ discount_type?: string;
5285
+ discount_value?: number;
5286
+ id?: string;
5287
+ min_quantity?: number;
5288
+ notes?: string | null;
5289
+ product_category_id?: string | null;
5290
+ product_id?: string | null;
5291
+ updated_at?: string;
5292
+ valid_from?: string | null;
5293
+ valid_until?: string | null;
5294
+ };
5295
+ Relationships: [{
5296
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
5297
+ columns: ["customer_id"];
5298
+ isOneToOne: false;
5299
+ referencedRelation: "customers";
5300
+ referencedColumns: ["id"];
5301
+ }, {
5302
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
5303
+ columns: ["product_category_id"];
5304
+ isOneToOne: false;
5305
+ referencedRelation: "product_categories";
5306
+ referencedColumns: ["id"];
5307
+ }, {
5308
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
5309
+ columns: ["product_id"];
5310
+ isOneToOne: false;
5311
+ referencedRelation: "products";
5312
+ referencedColumns: ["id"];
5313
+ }];
5314
+ };
5069
5315
  locations: {
5070
5316
  Row: {
5071
5317
  created_at: string;
@@ -5573,6 +5819,273 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
5573
5819
  referencedColumns: ["id"];
5574
5820
  }];
5575
5821
  };
5822
+ nmbrs_component_mapping: {
5823
+ Row: {
5824
+ created_at: string;
5825
+ id: string;
5826
+ source_kind: string;
5827
+ source_value: string | null;
5828
+ updated_at: string;
5829
+ wage_code: string;
5830
+ };
5831
+ Insert: {
5832
+ created_at?: string;
5833
+ id?: string;
5834
+ source_kind: string;
5835
+ source_value?: string | null;
5836
+ updated_at?: string;
5837
+ wage_code: string;
5838
+ };
5839
+ Update: {
5840
+ created_at?: string;
5841
+ id?: string;
5842
+ source_kind?: string;
5843
+ source_value?: string | null;
5844
+ updated_at?: string;
5845
+ wage_code?: string;
5846
+ };
5847
+ Relationships: [{
5848
+ foreignKeyName: "nmbrs_component_mapping_wage_code_fkey";
5849
+ columns: ["wage_code"];
5850
+ isOneToOne: false;
5851
+ referencedRelation: "nmbrs_wage_components";
5852
+ referencedColumns: ["code"];
5853
+ }];
5854
+ };
5855
+ nmbrs_employee_mapping: {
5856
+ Row: {
5857
+ active_from: string | null;
5858
+ active_to: string | null;
5859
+ contract_hours_per_week: number | null;
5860
+ created_at: string;
5861
+ hourly_wage: number | null;
5862
+ id: string;
5863
+ monteur_id: string;
5864
+ nmbrs_company_code: string | null;
5865
+ nmbrs_employee_number: string;
5866
+ updated_at: string;
5867
+ };
5868
+ Insert: {
5869
+ active_from?: string | null;
5870
+ active_to?: string | null;
5871
+ contract_hours_per_week?: number | null;
5872
+ created_at?: string;
5873
+ hourly_wage?: number | null;
5874
+ id?: string;
5875
+ monteur_id: string;
5876
+ nmbrs_company_code?: string | null;
5877
+ nmbrs_employee_number: string;
5878
+ updated_at?: string;
5879
+ };
5880
+ Update: {
5881
+ active_from?: string | null;
5882
+ active_to?: string | null;
5883
+ contract_hours_per_week?: number | null;
5884
+ created_at?: string;
5885
+ hourly_wage?: number | null;
5886
+ id?: string;
5887
+ monteur_id?: string;
5888
+ nmbrs_company_code?: string | null;
5889
+ nmbrs_employee_number?: string;
5890
+ updated_at?: string;
5891
+ };
5892
+ Relationships: [{
5893
+ foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
5894
+ columns: ["monteur_id"];
5895
+ isOneToOne: true;
5896
+ referencedRelation: "monteurs";
5897
+ referencedColumns: ["id"];
5898
+ }];
5899
+ };
5900
+ nmbrs_export_lines: {
5901
+ Row: {
5902
+ amount: number;
5903
+ created_at: string;
5904
+ entry_date: string;
5905
+ hours: number;
5906
+ id: string;
5907
+ monteur_id: string;
5908
+ nmbrs_employee_number: string | null;
5909
+ notes: string | null;
5910
+ run_id: string;
5911
+ source_kind: string | null;
5912
+ source_ref_id: string | null;
5913
+ updated_at: string;
5914
+ wage_code: string;
5915
+ };
5916
+ Insert: {
5917
+ amount?: number;
5918
+ created_at?: string;
5919
+ entry_date: string;
5920
+ hours?: number;
5921
+ id?: string;
5922
+ monteur_id: string;
5923
+ nmbrs_employee_number?: string | null;
5924
+ notes?: string | null;
5925
+ run_id: string;
5926
+ source_kind?: string | null;
5927
+ source_ref_id?: string | null;
5928
+ updated_at?: string;
5929
+ wage_code: string;
5930
+ };
5931
+ Update: {
5932
+ amount?: number;
5933
+ created_at?: string;
5934
+ entry_date?: string;
5935
+ hours?: number;
5936
+ id?: string;
5937
+ monteur_id?: string;
5938
+ nmbrs_employee_number?: string | null;
5939
+ notes?: string | null;
5940
+ run_id?: string;
5941
+ source_kind?: string | null;
5942
+ source_ref_id?: string | null;
5943
+ updated_at?: string;
5944
+ wage_code?: string;
5945
+ };
5946
+ Relationships: [{
5947
+ foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
5948
+ columns: ["monteur_id"];
5949
+ isOneToOne: false;
5950
+ referencedRelation: "monteurs";
5951
+ referencedColumns: ["id"];
5952
+ }, {
5953
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
5954
+ columns: ["run_id"];
5955
+ isOneToOne: false;
5956
+ referencedRelation: "nmbrs_export_runs";
5957
+ referencedColumns: ["id"];
5958
+ }, {
5959
+ foreignKeyName: "nmbrs_export_lines_wage_code_fkey";
5960
+ columns: ["wage_code"];
5961
+ isOneToOne: false;
5962
+ referencedRelation: "nmbrs_wage_components";
5963
+ referencedColumns: ["code"];
5964
+ }];
5965
+ };
5966
+ nmbrs_export_runs: {
5967
+ Row: {
5968
+ created_at: string;
5969
+ file_name: string | null;
5970
+ generated_at: string;
5971
+ generated_by: string | null;
5972
+ id: string;
5973
+ notes: string | null;
5974
+ period_end: string;
5975
+ period_label: string;
5976
+ period_start: string;
5977
+ status: string;
5978
+ total_hours: number;
5979
+ total_lines: number;
5980
+ updated_at: string;
5981
+ };
5982
+ Insert: {
5983
+ created_at?: string;
5984
+ file_name?: string | null;
5985
+ generated_at?: string;
5986
+ generated_by?: string | null;
5987
+ id?: string;
5988
+ notes?: string | null;
5989
+ period_end: string;
5990
+ period_label: string;
5991
+ period_start: string;
5992
+ status?: string;
5993
+ total_hours?: number;
5994
+ total_lines?: number;
5995
+ updated_at?: string;
5996
+ };
5997
+ Update: {
5998
+ created_at?: string;
5999
+ file_name?: string | null;
6000
+ generated_at?: string;
6001
+ generated_by?: string | null;
6002
+ id?: string;
6003
+ notes?: string | null;
6004
+ period_end?: string;
6005
+ period_label?: string;
6006
+ period_start?: string;
6007
+ status?: string;
6008
+ total_hours?: number;
6009
+ total_lines?: number;
6010
+ updated_at?: string;
6011
+ };
6012
+ Relationships: [];
6013
+ };
6014
+ nmbrs_settings: {
6015
+ Row: {
6016
+ created_at: string;
6017
+ default_company_code: string | null;
6018
+ id: boolean;
6019
+ include_travel: boolean;
6020
+ overtime_threshold_daily: number;
6021
+ overtime_threshold_weekly: number;
6022
+ period_type: string;
6023
+ updated_at: string;
6024
+ updated_by: string | null;
6025
+ week_start_day: number;
6026
+ };
6027
+ Insert: {
6028
+ created_at?: string;
6029
+ default_company_code?: string | null;
6030
+ id?: boolean;
6031
+ include_travel?: boolean;
6032
+ overtime_threshold_daily?: number;
6033
+ overtime_threshold_weekly?: number;
6034
+ period_type?: string;
6035
+ updated_at?: string;
6036
+ updated_by?: string | null;
6037
+ week_start_day?: number;
6038
+ };
6039
+ Update: {
6040
+ created_at?: string;
6041
+ default_company_code?: string | null;
6042
+ id?: boolean;
6043
+ include_travel?: boolean;
6044
+ overtime_threshold_daily?: number;
6045
+ overtime_threshold_weekly?: number;
6046
+ period_type?: string;
6047
+ updated_at?: string;
6048
+ updated_by?: string | null;
6049
+ week_start_day?: number;
6050
+ };
6051
+ Relationships: [];
6052
+ };
6053
+ nmbrs_wage_components: {
6054
+ Row: {
6055
+ category: string;
6056
+ code: string;
6057
+ created_at: string;
6058
+ id: string;
6059
+ is_active: boolean;
6060
+ label: string;
6061
+ sort_order: number;
6062
+ unit: string;
6063
+ updated_at: string;
6064
+ };
6065
+ Insert: {
6066
+ category: string;
6067
+ code: string;
6068
+ created_at?: string;
6069
+ id?: string;
6070
+ is_active?: boolean;
6071
+ label: string;
6072
+ sort_order?: number;
6073
+ unit: string;
6074
+ updated_at?: string;
6075
+ };
6076
+ Update: {
6077
+ category?: string;
6078
+ code?: string;
6079
+ created_at?: string;
6080
+ id?: string;
6081
+ is_active?: boolean;
6082
+ label?: string;
6083
+ sort_order?: number;
6084
+ unit?: string;
6085
+ updated_at?: string;
6086
+ };
6087
+ Relationships: [];
6088
+ };
5576
6089
  notifications: {
5577
6090
  Row: {
5578
6091
  created_at: string;
@@ -6555,6 +7068,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
6555
7068
  purchase_price: number | null;
6556
7069
  quantity: number;
6557
7070
  sale_price: number | null;
7071
+ trade_item_key: string | null;
6558
7072
  unit: string;
6559
7073
  updated_at: string;
6560
7074
  weight: string | null;
@@ -6577,6 +7091,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
6577
7091
  purchase_price?: number | null;
6578
7092
  quantity?: number;
6579
7093
  sale_price?: number | null;
7094
+ trade_item_key?: string | null;
6580
7095
  unit?: string;
6581
7096
  updated_at?: string;
6582
7097
  weight?: string | null;
@@ -6599,6 +7114,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
6599
7114
  purchase_price?: number | null;
6600
7115
  quantity?: number;
6601
7116
  sale_price?: number | null;
7117
+ trade_item_key?: string | null;
6602
7118
  unit?: string;
6603
7119
  updated_at?: string;
6604
7120
  weight?: string | null;
@@ -7418,6 +7934,102 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
7418
7934
  };
7419
7935
  Relationships: [];
7420
7936
  };
7937
+ stock_import_runs: {
7938
+ Row: {
7939
+ connection_id: string | null;
7940
+ created_at: string;
7941
+ created_rows: number;
7942
+ errors: import("../integrations/supabase/types").Json;
7943
+ filename: string | null;
7944
+ id: string;
7945
+ mutations: import("../integrations/supabase/types").Json;
7946
+ skipped_rows: number;
7947
+ total_rows: number;
7948
+ updated_rows: number;
7949
+ user_id: string;
7950
+ };
7951
+ Insert: {
7952
+ connection_id?: string | null;
7953
+ created_at?: string;
7954
+ created_rows?: number;
7955
+ errors?: import("../integrations/supabase/types").Json;
7956
+ filename?: string | null;
7957
+ id?: string;
7958
+ mutations?: import("../integrations/supabase/types").Json;
7959
+ skipped_rows?: number;
7960
+ total_rows?: number;
7961
+ updated_rows?: number;
7962
+ user_id: string;
7963
+ };
7964
+ Update: {
7965
+ connection_id?: string | null;
7966
+ created_at?: string;
7967
+ created_rows?: number;
7968
+ errors?: import("../integrations/supabase/types").Json;
7969
+ filename?: string | null;
7970
+ id?: string;
7971
+ mutations?: import("../integrations/supabase/types").Json;
7972
+ skipped_rows?: number;
7973
+ total_rows?: number;
7974
+ updated_rows?: number;
7975
+ user_id?: string;
7976
+ };
7977
+ Relationships: [];
7978
+ };
7979
+ stock_mutation_log: {
7980
+ Row: {
7981
+ connection_id: string | null;
7982
+ created_at: string;
7983
+ created_by: string | null;
7984
+ id: string;
7985
+ mutation_type: string;
7986
+ order_id: string | null;
7987
+ order_item_id: string | null;
7988
+ order_source: string | null;
7989
+ physical_after: number | null;
7990
+ physical_before: number | null;
7991
+ qty_delta: number;
7992
+ reason: string | null;
7993
+ reserved_after: number | null;
7994
+ reserved_before: number | null;
7995
+ trade_item_key: string;
7996
+ };
7997
+ Insert: {
7998
+ connection_id?: string | null;
7999
+ created_at?: string;
8000
+ created_by?: string | null;
8001
+ id?: string;
8002
+ mutation_type: string;
8003
+ order_id?: string | null;
8004
+ order_item_id?: string | null;
8005
+ order_source?: string | null;
8006
+ physical_after?: number | null;
8007
+ physical_before?: number | null;
8008
+ qty_delta: number;
8009
+ reason?: string | null;
8010
+ reserved_after?: number | null;
8011
+ reserved_before?: number | null;
8012
+ trade_item_key: string;
8013
+ };
8014
+ Update: {
8015
+ connection_id?: string | null;
8016
+ created_at?: string;
8017
+ created_by?: string | null;
8018
+ id?: string;
8019
+ mutation_type?: string;
8020
+ order_id?: string | null;
8021
+ order_item_id?: string | null;
8022
+ order_source?: string | null;
8023
+ physical_after?: number | null;
8024
+ physical_before?: number | null;
8025
+ qty_delta?: number;
8026
+ reason?: string | null;
8027
+ reserved_after?: number | null;
8028
+ reserved_before?: number | null;
8029
+ trade_item_key?: string;
8030
+ };
8031
+ Relationships: [];
8032
+ };
7421
8033
  supplier_products: {
7422
8034
  Row: {
7423
8035
  article_number: string | null;
@@ -8995,6 +9607,44 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
8995
9607
  };
8996
9608
  Relationships: [];
8997
9609
  };
9610
+ floriday_customer_discounts: {
9611
+ Row: {
9612
+ base_price: number | null;
9613
+ buyer_organization_id: string | null;
9614
+ currency: string | null;
9615
+ discount_type: string | null;
9616
+ discount_value: number | null;
9617
+ min_quantity: number | null;
9618
+ net_price: number | null;
9619
+ product_group_id: string | null;
9620
+ raw: import("../integrations/supabase/types").Json | null;
9621
+ source: string | null;
9622
+ source_id: string | null;
9623
+ trade_item_id: string | null;
9624
+ valid_from: string | null;
9625
+ valid_until: string | null;
9626
+ };
9627
+ Relationships: [];
9628
+ };
9629
+ local_customer_discounts: {
9630
+ Row: {
9631
+ base_price: number | null;
9632
+ currency: string | null;
9633
+ customer_id: string | null;
9634
+ discount_type: string | null;
9635
+ discount_value: number | null;
9636
+ min_quantity: number | null;
9637
+ net_price: number | null;
9638
+ product_category_id: string | null;
9639
+ product_id: string | null;
9640
+ product_name: string | null;
9641
+ source: string | null;
9642
+ source_id: string | null;
9643
+ valid_from: string | null;
9644
+ valid_until: string | null;
9645
+ };
9646
+ Relationships: [];
9647
+ };
8998
9648
  manufacture_product_possible_stock_view: {
8999
9649
  Row: {
9000
9650
  component_count: number | null;
@@ -9279,6 +9929,54 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
9279
9929
  };
9280
9930
  Returns: number;
9281
9931
  };
9932
+ afh_city_code: {
9933
+ Args: {
9934
+ _city: string;
9935
+ _country: string;
9936
+ };
9937
+ Returns: string;
9938
+ };
9939
+ afh_normalize_country: {
9940
+ Args: {
9941
+ _raw: string;
9942
+ };
9943
+ Returns: string;
9944
+ };
9945
+ afh_normalize_nl_province: {
9946
+ Args: {
9947
+ _raw: string;
9948
+ };
9949
+ Returns: string;
9950
+ };
9951
+ afh_subtract_workdays: {
9952
+ Args: {
9953
+ _date: string;
9954
+ _days: number;
9955
+ };
9956
+ Returns: string;
9957
+ };
9958
+ apply_stock_consumption: {
9959
+ Args: {
9960
+ p_order_id: string;
9961
+ p_order_item_id: string;
9962
+ p_qty: number;
9963
+ p_reason: string;
9964
+ p_source: string;
9965
+ p_trade_item_key: string;
9966
+ };
9967
+ Returns: undefined;
9968
+ };
9969
+ apply_stock_reservation: {
9970
+ Args: {
9971
+ p_order_id: string;
9972
+ p_order_item_id: string;
9973
+ p_qty: number;
9974
+ p_reason: string;
9975
+ p_source: string;
9976
+ p_trade_item_key: string;
9977
+ };
9978
+ Returns: undefined;
9979
+ };
9282
9980
  assign_cart_numbers: {
9283
9981
  Args: {
9284
9982
  p_carts: import("../integrations/supabase/types").Json;
@@ -9302,12 +10000,40 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
9302
10000
  order_number: string;
9303
10001
  }[];
9304
10002
  };
10003
+ backfill_open_order_reservations: {
10004
+ Args: never;
10005
+ Returns: {
10006
+ processed_items: number;
10007
+ }[];
10008
+ };
9305
10009
  call_exact_route: {
9306
10010
  Args: {
9307
10011
  path: string;
9308
10012
  };
9309
10013
  Returns: number;
9310
10014
  };
10015
+ check_offer_product_available_stock: {
10016
+ Args: {
10017
+ p_campaign_product_id: string;
10018
+ p_code: string;
10019
+ p_needed_qty?: number;
10020
+ p_product_name?: string;
10021
+ };
10022
+ Returns: import("../integrations/supabase/types").Json;
10023
+ };
10024
+ check_trade_item_available_stock: {
10025
+ Args: {
10026
+ p_connection_id?: string;
10027
+ p_context?: string;
10028
+ p_needed_qty?: number;
10029
+ p_order_id?: string;
10030
+ p_order_item_id?: string;
10031
+ p_owner_id?: string;
10032
+ p_product_name?: string;
10033
+ p_trade_item_key: string;
10034
+ };
10035
+ Returns: import("../integrations/supabase/types").Json;
10036
+ };
9311
10037
  cleanup_old_bookings: {
9312
10038
  Args: never;
9313
10039
  Returns: number;
@@ -9351,6 +10077,12 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
9351
10077
  table_name: string;
9352
10078
  }[];
9353
10079
  };
10080
+ dispatch_carrier_signups_sql: {
10081
+ Args: {
10082
+ _catchup?: string;
10083
+ };
10084
+ Returns: import("../integrations/supabase/types").Json;
10085
+ };
9354
10086
  email_auth_decrypt: {
9355
10087
  Args: {
9356
10088
  cipher: string;
@@ -9386,6 +10118,12 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
9386
10118
  status: string;
9387
10119
  }[];
9388
10120
  };
10121
+ ensure_trade_item_stock_row: {
10122
+ Args: {
10123
+ p_key: string;
10124
+ };
10125
+ Returns: undefined;
10126
+ };
9389
10127
  ensure_user_tenant: {
9390
10128
  Args: never;
9391
10129
  Returns: string;
@@ -9423,6 +10161,31 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
9423
10161
  };
9424
10162
  Returns: boolean;
9425
10163
  };
10164
+ find_trade_item_key: {
10165
+ Args: {
10166
+ p_barcode: string;
10167
+ p_name: string;
10168
+ p_product_id: string;
10169
+ };
10170
+ Returns: string;
10171
+ };
10172
+ floriday_effective_price: {
10173
+ Args: {
10174
+ _buyer_id: string;
10175
+ _on_date?: string;
10176
+ _quantity?: number;
10177
+ _trade_item_id: string;
10178
+ };
10179
+ Returns: {
10180
+ base_price: number;
10181
+ currency: string;
10182
+ discount_type: string;
10183
+ discount_value: number;
10184
+ net_price: number;
10185
+ source: string;
10186
+ source_id: string;
10187
+ }[];
10188
+ };
9426
10189
  format_cart_number: {
9427
10190
  Args: {
9428
10191
  p_pick_date: string;
@@ -9443,6 +10206,13 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
9443
10206
  preferred_warehouse_name: string;
9444
10207
  }[];
9445
10208
  };
10209
+ get_active_floriday_context: {
10210
+ Args: never;
10211
+ Returns: {
10212
+ connection_id: string;
10213
+ user_id: string;
10214
+ }[];
10215
+ };
9446
10216
  get_active_twinfield_public: {
9447
10217
  Args: never;
9448
10218
  Returns: {
@@ -9545,6 +10315,18 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
9545
10315
  };
9546
10316
  Returns: import("../integrations/supabase/types").Json;
9547
10317
  };
10318
+ get_offer_recipient_by_code: {
10319
+ Args: {
10320
+ p_code: string;
10321
+ };
10322
+ Returns: {
10323
+ campaign_id: string;
10324
+ clicked_at: string;
10325
+ customer_id: string;
10326
+ id: string;
10327
+ ordered_at: string;
10328
+ }[];
10329
+ };
9548
10330
  get_or_assign_floriday_order_number: {
9549
10331
  Args: {
9550
10332
  p_floriday_id: string;
@@ -9597,6 +10379,34 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
9597
10379
  Args: never;
9598
10380
  Returns: boolean;
9599
10381
  };
10382
+ local_effective_price: {
10383
+ Args: {
10384
+ _customer_id: string;
10385
+ _on_date?: string;
10386
+ _product_id: string;
10387
+ _quantity?: number;
10388
+ };
10389
+ Returns: {
10390
+ currency: string;
10391
+ discount_type: string;
10392
+ discount_value: number;
10393
+ net_price: number;
10394
+ source: string;
10395
+ source_id: string;
10396
+ }[];
10397
+ };
10398
+ mark_offer_clicked: {
10399
+ Args: {
10400
+ p_code: string;
10401
+ };
10402
+ Returns: undefined;
10403
+ };
10404
+ mark_offer_ordered: {
10405
+ Args: {
10406
+ p_code: string;
10407
+ };
10408
+ Returns: undefined;
10409
+ };
9600
10410
  next_order_number: {
9601
10411
  Args: {
9602
10412
  p_prefix: string;
@@ -9616,6 +10426,14 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
9616
10426
  };
9617
10427
  Returns: string;
9618
10428
  };
10429
+ offer_recipient_matches: {
10430
+ Args: {
10431
+ _campaign_id: string;
10432
+ _customer_id: string;
10433
+ _recipient_id: string;
10434
+ };
10435
+ Returns: boolean;
10436
+ };
9619
10437
  pickstation_get_orders_raw: {
9620
10438
  Args: never;
9621
10439
  Returns: import("../integrations/supabase/types").Json;
@@ -9643,6 +10461,13 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
9643
10461
  };
9644
10462
  Returns: undefined;
9645
10463
  };
10464
+ promote_trade_item_key: {
10465
+ Args: {
10466
+ p_new: string;
10467
+ p_old: string;
10468
+ };
10469
+ Returns: undefined;
10470
+ };
9646
10471
  refresh_floricode_derived_code_lists: {
9647
10472
  Args: never;
9648
10473
  Returns: {
@@ -10684,6 +11509,7 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
10684
11509
  notes: string | null;
10685
11510
  performed_at: string;
10686
11511
  rescheduled_count: number;
11512
+ stock_consumed_at: string | null;
10687
11513
  total_carts: number;
10688
11514
  updated_at: string;
10689
11515
  user_id: string;
@@ -10697,6 +11523,7 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
10697
11523
  notes?: string | null;
10698
11524
  performed_at?: string;
10699
11525
  rescheduled_count?: number;
11526
+ stock_consumed_at?: string | null;
10700
11527
  total_carts?: number;
10701
11528
  updated_at?: string;
10702
11529
  user_id: string;
@@ -10710,6 +11537,7 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
10710
11537
  notes?: string | null;
10711
11538
  performed_at?: string;
10712
11539
  rescheduled_count?: number;
11540
+ stock_consumed_at?: string | null;
10713
11541
  total_carts?: number;
10714
11542
  updated_at?: string;
10715
11543
  user_id?: string;
@@ -13590,6 +14418,51 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
13590
14418
  referencedColumns: ["id"];
13591
14419
  }];
13592
14420
  };
14421
+ floriday_continuous_stock_queue: {
14422
+ Row: {
14423
+ attempts: number;
14424
+ connection_id: string;
14425
+ created_at: string;
14426
+ gateway_attempt_id: string | null;
14427
+ id: string;
14428
+ last_error: string | null;
14429
+ number_of_pieces: number;
14430
+ sent_at: string | null;
14431
+ status: string;
14432
+ trade_item_id: string;
14433
+ updated_at: string;
14434
+ user_id: string;
14435
+ };
14436
+ Insert: {
14437
+ attempts?: number;
14438
+ connection_id: string;
14439
+ created_at?: string;
14440
+ gateway_attempt_id?: string | null;
14441
+ id?: string;
14442
+ last_error?: string | null;
14443
+ number_of_pieces?: number;
14444
+ sent_at?: string | null;
14445
+ status?: string;
14446
+ trade_item_id: string;
14447
+ updated_at?: string;
14448
+ user_id: string;
14449
+ };
14450
+ Update: {
14451
+ attempts?: number;
14452
+ connection_id?: string;
14453
+ created_at?: string;
14454
+ gateway_attempt_id?: string | null;
14455
+ id?: string;
14456
+ last_error?: string | null;
14457
+ number_of_pieces?: number;
14458
+ sent_at?: string | null;
14459
+ status?: string;
14460
+ trade_item_id?: string;
14461
+ updated_at?: string;
14462
+ user_id?: string;
14463
+ };
14464
+ Relationships: [];
14465
+ };
13593
14466
  floriday_contract_trade_item_groups_cache: {
13594
14467
  Row: {
13595
14468
  connection_id: string;
@@ -14979,6 +15852,204 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
14979
15852
  };
14980
15853
  Relationships: [];
14981
15854
  };
15855
+ local_customer_agreements: {
15856
+ Row: {
15857
+ base_price: number | null;
15858
+ created_at: string;
15859
+ currency: string;
15860
+ customer_id: string;
15861
+ id: string;
15862
+ min_quantity: number;
15863
+ net_price: number;
15864
+ notes: string | null;
15865
+ product_category_id: string | null;
15866
+ product_id: string | null;
15867
+ updated_at: string;
15868
+ valid_from: string | null;
15869
+ valid_until: string | null;
15870
+ };
15871
+ Insert: {
15872
+ base_price?: number | null;
15873
+ created_at?: string;
15874
+ currency?: string;
15875
+ customer_id: string;
15876
+ id?: string;
15877
+ min_quantity?: number;
15878
+ net_price: number;
15879
+ notes?: string | null;
15880
+ product_category_id?: string | null;
15881
+ product_id?: string | null;
15882
+ updated_at?: string;
15883
+ valid_from?: string | null;
15884
+ valid_until?: string | null;
15885
+ };
15886
+ Update: {
15887
+ base_price?: number | null;
15888
+ created_at?: string;
15889
+ currency?: string;
15890
+ customer_id?: string;
15891
+ id?: string;
15892
+ min_quantity?: number;
15893
+ net_price?: number;
15894
+ notes?: string | null;
15895
+ product_category_id?: string | null;
15896
+ product_id?: string | null;
15897
+ updated_at?: string;
15898
+ valid_from?: string | null;
15899
+ valid_until?: string | null;
15900
+ };
15901
+ Relationships: [{
15902
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
15903
+ columns: ["customer_id"];
15904
+ isOneToOne: false;
15905
+ referencedRelation: "customers";
15906
+ referencedColumns: ["id"];
15907
+ }, {
15908
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
15909
+ columns: ["product_category_id"];
15910
+ isOneToOne: false;
15911
+ referencedRelation: "product_categories";
15912
+ referencedColumns: ["id"];
15913
+ }, {
15914
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
15915
+ columns: ["product_id"];
15916
+ isOneToOne: false;
15917
+ referencedRelation: "products";
15918
+ referencedColumns: ["id"];
15919
+ }];
15920
+ };
15921
+ local_customer_price_groups: {
15922
+ Row: {
15923
+ created_at: string;
15924
+ currency: string;
15925
+ customer_id: string;
15926
+ discount_type: string;
15927
+ discount_value: number;
15928
+ id: string;
15929
+ min_quantity: number;
15930
+ notes: string | null;
15931
+ product_category_id: string | null;
15932
+ product_id: string | null;
15933
+ updated_at: string;
15934
+ valid_from: string | null;
15935
+ valid_until: string | null;
15936
+ };
15937
+ Insert: {
15938
+ created_at?: string;
15939
+ currency?: string;
15940
+ customer_id: string;
15941
+ discount_type: string;
15942
+ discount_value: number;
15943
+ id?: string;
15944
+ min_quantity?: number;
15945
+ notes?: string | null;
15946
+ product_category_id?: string | null;
15947
+ product_id?: string | null;
15948
+ updated_at?: string;
15949
+ valid_from?: string | null;
15950
+ valid_until?: string | null;
15951
+ };
15952
+ Update: {
15953
+ created_at?: string;
15954
+ currency?: string;
15955
+ customer_id?: string;
15956
+ discount_type?: string;
15957
+ discount_value?: number;
15958
+ id?: string;
15959
+ min_quantity?: number;
15960
+ notes?: string | null;
15961
+ product_category_id?: string | null;
15962
+ product_id?: string | null;
15963
+ updated_at?: string;
15964
+ valid_from?: string | null;
15965
+ valid_until?: string | null;
15966
+ };
15967
+ Relationships: [{
15968
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
15969
+ columns: ["customer_id"];
15970
+ isOneToOne: false;
15971
+ referencedRelation: "customers";
15972
+ referencedColumns: ["id"];
15973
+ }, {
15974
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
15975
+ columns: ["product_category_id"];
15976
+ isOneToOne: false;
15977
+ referencedRelation: "product_categories";
15978
+ referencedColumns: ["id"];
15979
+ }, {
15980
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
15981
+ columns: ["product_id"];
15982
+ isOneToOne: false;
15983
+ referencedRelation: "products";
15984
+ referencedColumns: ["id"];
15985
+ }];
15986
+ };
15987
+ local_customer_sales_strategies: {
15988
+ Row: {
15989
+ created_at: string;
15990
+ currency: string;
15991
+ customer_id: string;
15992
+ discount_type: string;
15993
+ discount_value: number;
15994
+ id: string;
15995
+ min_quantity: number;
15996
+ notes: string | null;
15997
+ product_category_id: string | null;
15998
+ product_id: string | null;
15999
+ updated_at: string;
16000
+ valid_from: string | null;
16001
+ valid_until: string | null;
16002
+ };
16003
+ Insert: {
16004
+ created_at?: string;
16005
+ currency?: string;
16006
+ customer_id: string;
16007
+ discount_type: string;
16008
+ discount_value: number;
16009
+ id?: string;
16010
+ min_quantity?: number;
16011
+ notes?: string | null;
16012
+ product_category_id?: string | null;
16013
+ product_id?: string | null;
16014
+ updated_at?: string;
16015
+ valid_from?: string | null;
16016
+ valid_until?: string | null;
16017
+ };
16018
+ Update: {
16019
+ created_at?: string;
16020
+ currency?: string;
16021
+ customer_id?: string;
16022
+ discount_type?: string;
16023
+ discount_value?: number;
16024
+ id?: string;
16025
+ min_quantity?: number;
16026
+ notes?: string | null;
16027
+ product_category_id?: string | null;
16028
+ product_id?: string | null;
16029
+ updated_at?: string;
16030
+ valid_from?: string | null;
16031
+ valid_until?: string | null;
16032
+ };
16033
+ Relationships: [{
16034
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
16035
+ columns: ["customer_id"];
16036
+ isOneToOne: false;
16037
+ referencedRelation: "customers";
16038
+ referencedColumns: ["id"];
16039
+ }, {
16040
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
16041
+ columns: ["product_category_id"];
16042
+ isOneToOne: false;
16043
+ referencedRelation: "product_categories";
16044
+ referencedColumns: ["id"];
16045
+ }, {
16046
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
16047
+ columns: ["product_id"];
16048
+ isOneToOne: false;
16049
+ referencedRelation: "products";
16050
+ referencedColumns: ["id"];
16051
+ }];
16052
+ };
14982
16053
  locations: {
14983
16054
  Row: {
14984
16055
  created_at: string;
@@ -15486,6 +16557,273 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
15486
16557
  referencedColumns: ["id"];
15487
16558
  }];
15488
16559
  };
16560
+ nmbrs_component_mapping: {
16561
+ Row: {
16562
+ created_at: string;
16563
+ id: string;
16564
+ source_kind: string;
16565
+ source_value: string | null;
16566
+ updated_at: string;
16567
+ wage_code: string;
16568
+ };
16569
+ Insert: {
16570
+ created_at?: string;
16571
+ id?: string;
16572
+ source_kind: string;
16573
+ source_value?: string | null;
16574
+ updated_at?: string;
16575
+ wage_code: string;
16576
+ };
16577
+ Update: {
16578
+ created_at?: string;
16579
+ id?: string;
16580
+ source_kind?: string;
16581
+ source_value?: string | null;
16582
+ updated_at?: string;
16583
+ wage_code?: string;
16584
+ };
16585
+ Relationships: [{
16586
+ foreignKeyName: "nmbrs_component_mapping_wage_code_fkey";
16587
+ columns: ["wage_code"];
16588
+ isOneToOne: false;
16589
+ referencedRelation: "nmbrs_wage_components";
16590
+ referencedColumns: ["code"];
16591
+ }];
16592
+ };
16593
+ nmbrs_employee_mapping: {
16594
+ Row: {
16595
+ active_from: string | null;
16596
+ active_to: string | null;
16597
+ contract_hours_per_week: number | null;
16598
+ created_at: string;
16599
+ hourly_wage: number | null;
16600
+ id: string;
16601
+ monteur_id: string;
16602
+ nmbrs_company_code: string | null;
16603
+ nmbrs_employee_number: string;
16604
+ updated_at: string;
16605
+ };
16606
+ Insert: {
16607
+ active_from?: string | null;
16608
+ active_to?: string | null;
16609
+ contract_hours_per_week?: number | null;
16610
+ created_at?: string;
16611
+ hourly_wage?: number | null;
16612
+ id?: string;
16613
+ monteur_id: string;
16614
+ nmbrs_company_code?: string | null;
16615
+ nmbrs_employee_number: string;
16616
+ updated_at?: string;
16617
+ };
16618
+ Update: {
16619
+ active_from?: string | null;
16620
+ active_to?: string | null;
16621
+ contract_hours_per_week?: number | null;
16622
+ created_at?: string;
16623
+ hourly_wage?: number | null;
16624
+ id?: string;
16625
+ monteur_id?: string;
16626
+ nmbrs_company_code?: string | null;
16627
+ nmbrs_employee_number?: string;
16628
+ updated_at?: string;
16629
+ };
16630
+ Relationships: [{
16631
+ foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
16632
+ columns: ["monteur_id"];
16633
+ isOneToOne: true;
16634
+ referencedRelation: "monteurs";
16635
+ referencedColumns: ["id"];
16636
+ }];
16637
+ };
16638
+ nmbrs_export_lines: {
16639
+ Row: {
16640
+ amount: number;
16641
+ created_at: string;
16642
+ entry_date: string;
16643
+ hours: number;
16644
+ id: string;
16645
+ monteur_id: string;
16646
+ nmbrs_employee_number: string | null;
16647
+ notes: string | null;
16648
+ run_id: string;
16649
+ source_kind: string | null;
16650
+ source_ref_id: string | null;
16651
+ updated_at: string;
16652
+ wage_code: string;
16653
+ };
16654
+ Insert: {
16655
+ amount?: number;
16656
+ created_at?: string;
16657
+ entry_date: string;
16658
+ hours?: number;
16659
+ id?: string;
16660
+ monteur_id: string;
16661
+ nmbrs_employee_number?: string | null;
16662
+ notes?: string | null;
16663
+ run_id: string;
16664
+ source_kind?: string | null;
16665
+ source_ref_id?: string | null;
16666
+ updated_at?: string;
16667
+ wage_code: string;
16668
+ };
16669
+ Update: {
16670
+ amount?: number;
16671
+ created_at?: string;
16672
+ entry_date?: string;
16673
+ hours?: number;
16674
+ id?: string;
16675
+ monteur_id?: string;
16676
+ nmbrs_employee_number?: string | null;
16677
+ notes?: string | null;
16678
+ run_id?: string;
16679
+ source_kind?: string | null;
16680
+ source_ref_id?: string | null;
16681
+ updated_at?: string;
16682
+ wage_code?: string;
16683
+ };
16684
+ Relationships: [{
16685
+ foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
16686
+ columns: ["monteur_id"];
16687
+ isOneToOne: false;
16688
+ referencedRelation: "monteurs";
16689
+ referencedColumns: ["id"];
16690
+ }, {
16691
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
16692
+ columns: ["run_id"];
16693
+ isOneToOne: false;
16694
+ referencedRelation: "nmbrs_export_runs";
16695
+ referencedColumns: ["id"];
16696
+ }, {
16697
+ foreignKeyName: "nmbrs_export_lines_wage_code_fkey";
16698
+ columns: ["wage_code"];
16699
+ isOneToOne: false;
16700
+ referencedRelation: "nmbrs_wage_components";
16701
+ referencedColumns: ["code"];
16702
+ }];
16703
+ };
16704
+ nmbrs_export_runs: {
16705
+ Row: {
16706
+ created_at: string;
16707
+ file_name: string | null;
16708
+ generated_at: string;
16709
+ generated_by: string | null;
16710
+ id: string;
16711
+ notes: string | null;
16712
+ period_end: string;
16713
+ period_label: string;
16714
+ period_start: string;
16715
+ status: string;
16716
+ total_hours: number;
16717
+ total_lines: number;
16718
+ updated_at: string;
16719
+ };
16720
+ Insert: {
16721
+ created_at?: string;
16722
+ file_name?: string | null;
16723
+ generated_at?: string;
16724
+ generated_by?: string | null;
16725
+ id?: string;
16726
+ notes?: string | null;
16727
+ period_end: string;
16728
+ period_label: string;
16729
+ period_start: string;
16730
+ status?: string;
16731
+ total_hours?: number;
16732
+ total_lines?: number;
16733
+ updated_at?: string;
16734
+ };
16735
+ Update: {
16736
+ created_at?: string;
16737
+ file_name?: string | null;
16738
+ generated_at?: string;
16739
+ generated_by?: string | null;
16740
+ id?: string;
16741
+ notes?: string | null;
16742
+ period_end?: string;
16743
+ period_label?: string;
16744
+ period_start?: string;
16745
+ status?: string;
16746
+ total_hours?: number;
16747
+ total_lines?: number;
16748
+ updated_at?: string;
16749
+ };
16750
+ Relationships: [];
16751
+ };
16752
+ nmbrs_settings: {
16753
+ Row: {
16754
+ created_at: string;
16755
+ default_company_code: string | null;
16756
+ id: boolean;
16757
+ include_travel: boolean;
16758
+ overtime_threshold_daily: number;
16759
+ overtime_threshold_weekly: number;
16760
+ period_type: string;
16761
+ updated_at: string;
16762
+ updated_by: string | null;
16763
+ week_start_day: number;
16764
+ };
16765
+ Insert: {
16766
+ created_at?: string;
16767
+ default_company_code?: string | null;
16768
+ id?: boolean;
16769
+ include_travel?: boolean;
16770
+ overtime_threshold_daily?: number;
16771
+ overtime_threshold_weekly?: number;
16772
+ period_type?: string;
16773
+ updated_at?: string;
16774
+ updated_by?: string | null;
16775
+ week_start_day?: number;
16776
+ };
16777
+ Update: {
16778
+ created_at?: string;
16779
+ default_company_code?: string | null;
16780
+ id?: boolean;
16781
+ include_travel?: boolean;
16782
+ overtime_threshold_daily?: number;
16783
+ overtime_threshold_weekly?: number;
16784
+ period_type?: string;
16785
+ updated_at?: string;
16786
+ updated_by?: string | null;
16787
+ week_start_day?: number;
16788
+ };
16789
+ Relationships: [];
16790
+ };
16791
+ nmbrs_wage_components: {
16792
+ Row: {
16793
+ category: string;
16794
+ code: string;
16795
+ created_at: string;
16796
+ id: string;
16797
+ is_active: boolean;
16798
+ label: string;
16799
+ sort_order: number;
16800
+ unit: string;
16801
+ updated_at: string;
16802
+ };
16803
+ Insert: {
16804
+ category: string;
16805
+ code: string;
16806
+ created_at?: string;
16807
+ id?: string;
16808
+ is_active?: boolean;
16809
+ label: string;
16810
+ sort_order?: number;
16811
+ unit: string;
16812
+ updated_at?: string;
16813
+ };
16814
+ Update: {
16815
+ category?: string;
16816
+ code?: string;
16817
+ created_at?: string;
16818
+ id?: string;
16819
+ is_active?: boolean;
16820
+ label?: string;
16821
+ sort_order?: number;
16822
+ unit?: string;
16823
+ updated_at?: string;
16824
+ };
16825
+ Relationships: [];
16826
+ };
15489
16827
  notifications: {
15490
16828
  Row: {
15491
16829
  created_at: string;
@@ -16468,6 +17806,7 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
16468
17806
  purchase_price: number | null;
16469
17807
  quantity: number;
16470
17808
  sale_price: number | null;
17809
+ trade_item_key: string | null;
16471
17810
  unit: string;
16472
17811
  updated_at: string;
16473
17812
  weight: string | null;
@@ -16490,6 +17829,7 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
16490
17829
  purchase_price?: number | null;
16491
17830
  quantity?: number;
16492
17831
  sale_price?: number | null;
17832
+ trade_item_key?: string | null;
16493
17833
  unit?: string;
16494
17834
  updated_at?: string;
16495
17835
  weight?: string | null;
@@ -16512,6 +17852,7 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
16512
17852
  purchase_price?: number | null;
16513
17853
  quantity?: number;
16514
17854
  sale_price?: number | null;
17855
+ trade_item_key?: string | null;
16515
17856
  unit?: string;
16516
17857
  updated_at?: string;
16517
17858
  weight?: string | null;
@@ -17331,6 +18672,102 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
17331
18672
  };
17332
18673
  Relationships: [];
17333
18674
  };
18675
+ stock_import_runs: {
18676
+ Row: {
18677
+ connection_id: string | null;
18678
+ created_at: string;
18679
+ created_rows: number;
18680
+ errors: import("../integrations/supabase/types").Json;
18681
+ filename: string | null;
18682
+ id: string;
18683
+ mutations: import("../integrations/supabase/types").Json;
18684
+ skipped_rows: number;
18685
+ total_rows: number;
18686
+ updated_rows: number;
18687
+ user_id: string;
18688
+ };
18689
+ Insert: {
18690
+ connection_id?: string | null;
18691
+ created_at?: string;
18692
+ created_rows?: number;
18693
+ errors?: import("../integrations/supabase/types").Json;
18694
+ filename?: string | null;
18695
+ id?: string;
18696
+ mutations?: import("../integrations/supabase/types").Json;
18697
+ skipped_rows?: number;
18698
+ total_rows?: number;
18699
+ updated_rows?: number;
18700
+ user_id: string;
18701
+ };
18702
+ Update: {
18703
+ connection_id?: string | null;
18704
+ created_at?: string;
18705
+ created_rows?: number;
18706
+ errors?: import("../integrations/supabase/types").Json;
18707
+ filename?: string | null;
18708
+ id?: string;
18709
+ mutations?: import("../integrations/supabase/types").Json;
18710
+ skipped_rows?: number;
18711
+ total_rows?: number;
18712
+ updated_rows?: number;
18713
+ user_id?: string;
18714
+ };
18715
+ Relationships: [];
18716
+ };
18717
+ stock_mutation_log: {
18718
+ Row: {
18719
+ connection_id: string | null;
18720
+ created_at: string;
18721
+ created_by: string | null;
18722
+ id: string;
18723
+ mutation_type: string;
18724
+ order_id: string | null;
18725
+ order_item_id: string | null;
18726
+ order_source: string | null;
18727
+ physical_after: number | null;
18728
+ physical_before: number | null;
18729
+ qty_delta: number;
18730
+ reason: string | null;
18731
+ reserved_after: number | null;
18732
+ reserved_before: number | null;
18733
+ trade_item_key: string;
18734
+ };
18735
+ Insert: {
18736
+ connection_id?: string | null;
18737
+ created_at?: string;
18738
+ created_by?: string | null;
18739
+ id?: string;
18740
+ mutation_type: string;
18741
+ order_id?: string | null;
18742
+ order_item_id?: string | null;
18743
+ order_source?: string | null;
18744
+ physical_after?: number | null;
18745
+ physical_before?: number | null;
18746
+ qty_delta: number;
18747
+ reason?: string | null;
18748
+ reserved_after?: number | null;
18749
+ reserved_before?: number | null;
18750
+ trade_item_key: string;
18751
+ };
18752
+ Update: {
18753
+ connection_id?: string | null;
18754
+ created_at?: string;
18755
+ created_by?: string | null;
18756
+ id?: string;
18757
+ mutation_type?: string;
18758
+ order_id?: string | null;
18759
+ order_item_id?: string | null;
18760
+ order_source?: string | null;
18761
+ physical_after?: number | null;
18762
+ physical_before?: number | null;
18763
+ qty_delta?: number;
18764
+ reason?: string | null;
18765
+ reserved_after?: number | null;
18766
+ reserved_before?: number | null;
18767
+ trade_item_key?: string;
18768
+ };
18769
+ Relationships: [];
18770
+ };
17334
18771
  supplier_products: {
17335
18772
  Row: {
17336
18773
  article_number: string | null;
@@ -18908,6 +20345,44 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
18908
20345
  };
18909
20346
  Relationships: [];
18910
20347
  };
20348
+ floriday_customer_discounts: {
20349
+ Row: {
20350
+ base_price: number | null;
20351
+ buyer_organization_id: string | null;
20352
+ currency: string | null;
20353
+ discount_type: string | null;
20354
+ discount_value: number | null;
20355
+ min_quantity: number | null;
20356
+ net_price: number | null;
20357
+ product_group_id: string | null;
20358
+ raw: import("../integrations/supabase/types").Json | null;
20359
+ source: string | null;
20360
+ source_id: string | null;
20361
+ trade_item_id: string | null;
20362
+ valid_from: string | null;
20363
+ valid_until: string | null;
20364
+ };
20365
+ Relationships: [];
20366
+ };
20367
+ local_customer_discounts: {
20368
+ Row: {
20369
+ base_price: number | null;
20370
+ currency: string | null;
20371
+ customer_id: string | null;
20372
+ discount_type: string | null;
20373
+ discount_value: number | null;
20374
+ min_quantity: number | null;
20375
+ net_price: number | null;
20376
+ product_category_id: string | null;
20377
+ product_id: string | null;
20378
+ product_name: string | null;
20379
+ source: string | null;
20380
+ source_id: string | null;
20381
+ valid_from: string | null;
20382
+ valid_until: string | null;
20383
+ };
20384
+ Relationships: [];
20385
+ };
18911
20386
  manufacture_product_possible_stock_view: {
18912
20387
  Row: {
18913
20388
  component_count: number | null;
@@ -19192,6 +20667,54 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
19192
20667
  };
19193
20668
  Returns: number;
19194
20669
  };
20670
+ afh_city_code: {
20671
+ Args: {
20672
+ _city: string;
20673
+ _country: string;
20674
+ };
20675
+ Returns: string;
20676
+ };
20677
+ afh_normalize_country: {
20678
+ Args: {
20679
+ _raw: string;
20680
+ };
20681
+ Returns: string;
20682
+ };
20683
+ afh_normalize_nl_province: {
20684
+ Args: {
20685
+ _raw: string;
20686
+ };
20687
+ Returns: string;
20688
+ };
20689
+ afh_subtract_workdays: {
20690
+ Args: {
20691
+ _date: string;
20692
+ _days: number;
20693
+ };
20694
+ Returns: string;
20695
+ };
20696
+ apply_stock_consumption: {
20697
+ Args: {
20698
+ p_order_id: string;
20699
+ p_order_item_id: string;
20700
+ p_qty: number;
20701
+ p_reason: string;
20702
+ p_source: string;
20703
+ p_trade_item_key: string;
20704
+ };
20705
+ Returns: undefined;
20706
+ };
20707
+ apply_stock_reservation: {
20708
+ Args: {
20709
+ p_order_id: string;
20710
+ p_order_item_id: string;
20711
+ p_qty: number;
20712
+ p_reason: string;
20713
+ p_source: string;
20714
+ p_trade_item_key: string;
20715
+ };
20716
+ Returns: undefined;
20717
+ };
19195
20718
  assign_cart_numbers: {
19196
20719
  Args: {
19197
20720
  p_carts: import("../integrations/supabase/types").Json;
@@ -19215,12 +20738,40 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
19215
20738
  order_number: string;
19216
20739
  }[];
19217
20740
  };
20741
+ backfill_open_order_reservations: {
20742
+ Args: never;
20743
+ Returns: {
20744
+ processed_items: number;
20745
+ }[];
20746
+ };
19218
20747
  call_exact_route: {
19219
20748
  Args: {
19220
20749
  path: string;
19221
20750
  };
19222
20751
  Returns: number;
19223
20752
  };
20753
+ check_offer_product_available_stock: {
20754
+ Args: {
20755
+ p_campaign_product_id: string;
20756
+ p_code: string;
20757
+ p_needed_qty?: number;
20758
+ p_product_name?: string;
20759
+ };
20760
+ Returns: import("../integrations/supabase/types").Json;
20761
+ };
20762
+ check_trade_item_available_stock: {
20763
+ Args: {
20764
+ p_connection_id?: string;
20765
+ p_context?: string;
20766
+ p_needed_qty?: number;
20767
+ p_order_id?: string;
20768
+ p_order_item_id?: string;
20769
+ p_owner_id?: string;
20770
+ p_product_name?: string;
20771
+ p_trade_item_key: string;
20772
+ };
20773
+ Returns: import("../integrations/supabase/types").Json;
20774
+ };
19224
20775
  cleanup_old_bookings: {
19225
20776
  Args: never;
19226
20777
  Returns: number;
@@ -19264,6 +20815,12 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
19264
20815
  table_name: string;
19265
20816
  }[];
19266
20817
  };
20818
+ dispatch_carrier_signups_sql: {
20819
+ Args: {
20820
+ _catchup?: string;
20821
+ };
20822
+ Returns: import("../integrations/supabase/types").Json;
20823
+ };
19267
20824
  email_auth_decrypt: {
19268
20825
  Args: {
19269
20826
  cipher: string;
@@ -19299,6 +20856,12 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
19299
20856
  status: string;
19300
20857
  }[];
19301
20858
  };
20859
+ ensure_trade_item_stock_row: {
20860
+ Args: {
20861
+ p_key: string;
20862
+ };
20863
+ Returns: undefined;
20864
+ };
19302
20865
  ensure_user_tenant: {
19303
20866
  Args: never;
19304
20867
  Returns: string;
@@ -19336,6 +20899,31 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
19336
20899
  };
19337
20900
  Returns: boolean;
19338
20901
  };
20902
+ find_trade_item_key: {
20903
+ Args: {
20904
+ p_barcode: string;
20905
+ p_name: string;
20906
+ p_product_id: string;
20907
+ };
20908
+ Returns: string;
20909
+ };
20910
+ floriday_effective_price: {
20911
+ Args: {
20912
+ _buyer_id: string;
20913
+ _on_date?: string;
20914
+ _quantity?: number;
20915
+ _trade_item_id: string;
20916
+ };
20917
+ Returns: {
20918
+ base_price: number;
20919
+ currency: string;
20920
+ discount_type: string;
20921
+ discount_value: number;
20922
+ net_price: number;
20923
+ source: string;
20924
+ source_id: string;
20925
+ }[];
20926
+ };
19339
20927
  format_cart_number: {
19340
20928
  Args: {
19341
20929
  p_pick_date: string;
@@ -19356,6 +20944,13 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
19356
20944
  preferred_warehouse_name: string;
19357
20945
  }[];
19358
20946
  };
20947
+ get_active_floriday_context: {
20948
+ Args: never;
20949
+ Returns: {
20950
+ connection_id: string;
20951
+ user_id: string;
20952
+ }[];
20953
+ };
19359
20954
  get_active_twinfield_public: {
19360
20955
  Args: never;
19361
20956
  Returns: {
@@ -19458,6 +21053,18 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
19458
21053
  };
19459
21054
  Returns: import("../integrations/supabase/types").Json;
19460
21055
  };
21056
+ get_offer_recipient_by_code: {
21057
+ Args: {
21058
+ p_code: string;
21059
+ };
21060
+ Returns: {
21061
+ campaign_id: string;
21062
+ clicked_at: string;
21063
+ customer_id: string;
21064
+ id: string;
21065
+ ordered_at: string;
21066
+ }[];
21067
+ };
19461
21068
  get_or_assign_floriday_order_number: {
19462
21069
  Args: {
19463
21070
  p_floriday_id: string;
@@ -19510,6 +21117,34 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
19510
21117
  Args: never;
19511
21118
  Returns: boolean;
19512
21119
  };
21120
+ local_effective_price: {
21121
+ Args: {
21122
+ _customer_id: string;
21123
+ _on_date?: string;
21124
+ _product_id: string;
21125
+ _quantity?: number;
21126
+ };
21127
+ Returns: {
21128
+ currency: string;
21129
+ discount_type: string;
21130
+ discount_value: number;
21131
+ net_price: number;
21132
+ source: string;
21133
+ source_id: string;
21134
+ }[];
21135
+ };
21136
+ mark_offer_clicked: {
21137
+ Args: {
21138
+ p_code: string;
21139
+ };
21140
+ Returns: undefined;
21141
+ };
21142
+ mark_offer_ordered: {
21143
+ Args: {
21144
+ p_code: string;
21145
+ };
21146
+ Returns: undefined;
21147
+ };
19513
21148
  next_order_number: {
19514
21149
  Args: {
19515
21150
  p_prefix: string;
@@ -19529,6 +21164,14 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
19529
21164
  };
19530
21165
  Returns: string;
19531
21166
  };
21167
+ offer_recipient_matches: {
21168
+ Args: {
21169
+ _campaign_id: string;
21170
+ _customer_id: string;
21171
+ _recipient_id: string;
21172
+ };
21173
+ Returns: boolean;
21174
+ };
19532
21175
  pickstation_get_orders_raw: {
19533
21176
  Args: never;
19534
21177
  Returns: import("../integrations/supabase/types").Json;
@@ -19556,6 +21199,13 @@ export declare const getCarrier: import("@tanstack/start-client-core").RequiredF
19556
21199
  };
19557
21200
  Returns: undefined;
19558
21201
  };
21202
+ promote_trade_item_key: {
21203
+ Args: {
21204
+ p_new: string;
21205
+ p_old: string;
21206
+ };
21207
+ Returns: undefined;
21208
+ };
19559
21209
  refresh_floricode_derived_code_lists: {
19560
21210
  Args: never;
19561
21211
  Returns: {
@@ -20601,6 +22251,7 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
20601
22251
  notes: string | null;
20602
22252
  performed_at: string;
20603
22253
  rescheduled_count: number;
22254
+ stock_consumed_at: string | null;
20604
22255
  total_carts: number;
20605
22256
  updated_at: string;
20606
22257
  user_id: string;
@@ -20614,6 +22265,7 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
20614
22265
  notes?: string | null;
20615
22266
  performed_at?: string;
20616
22267
  rescheduled_count?: number;
22268
+ stock_consumed_at?: string | null;
20617
22269
  total_carts?: number;
20618
22270
  updated_at?: string;
20619
22271
  user_id: string;
@@ -20627,6 +22279,7 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
20627
22279
  notes?: string | null;
20628
22280
  performed_at?: string;
20629
22281
  rescheduled_count?: number;
22282
+ stock_consumed_at?: string | null;
20630
22283
  total_carts?: number;
20631
22284
  updated_at?: string;
20632
22285
  user_id?: string;
@@ -23507,6 +25160,51 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
23507
25160
  referencedColumns: ["id"];
23508
25161
  }];
23509
25162
  };
25163
+ floriday_continuous_stock_queue: {
25164
+ Row: {
25165
+ attempts: number;
25166
+ connection_id: string;
25167
+ created_at: string;
25168
+ gateway_attempt_id: string | null;
25169
+ id: string;
25170
+ last_error: string | null;
25171
+ number_of_pieces: number;
25172
+ sent_at: string | null;
25173
+ status: string;
25174
+ trade_item_id: string;
25175
+ updated_at: string;
25176
+ user_id: string;
25177
+ };
25178
+ Insert: {
25179
+ attempts?: number;
25180
+ connection_id: string;
25181
+ created_at?: string;
25182
+ gateway_attempt_id?: string | null;
25183
+ id?: string;
25184
+ last_error?: string | null;
25185
+ number_of_pieces?: number;
25186
+ sent_at?: string | null;
25187
+ status?: string;
25188
+ trade_item_id: string;
25189
+ updated_at?: string;
25190
+ user_id: string;
25191
+ };
25192
+ Update: {
25193
+ attempts?: number;
25194
+ connection_id?: string;
25195
+ created_at?: string;
25196
+ gateway_attempt_id?: string | null;
25197
+ id?: string;
25198
+ last_error?: string | null;
25199
+ number_of_pieces?: number;
25200
+ sent_at?: string | null;
25201
+ status?: string;
25202
+ trade_item_id?: string;
25203
+ updated_at?: string;
25204
+ user_id?: string;
25205
+ };
25206
+ Relationships: [];
25207
+ };
23510
25208
  floriday_contract_trade_item_groups_cache: {
23511
25209
  Row: {
23512
25210
  connection_id: string;
@@ -24896,6 +26594,204 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
24896
26594
  };
24897
26595
  Relationships: [];
24898
26596
  };
26597
+ local_customer_agreements: {
26598
+ Row: {
26599
+ base_price: number | null;
26600
+ created_at: string;
26601
+ currency: string;
26602
+ customer_id: string;
26603
+ id: string;
26604
+ min_quantity: number;
26605
+ net_price: number;
26606
+ notes: string | null;
26607
+ product_category_id: string | null;
26608
+ product_id: string | null;
26609
+ updated_at: string;
26610
+ valid_from: string | null;
26611
+ valid_until: string | null;
26612
+ };
26613
+ Insert: {
26614
+ base_price?: number | null;
26615
+ created_at?: string;
26616
+ currency?: string;
26617
+ customer_id: string;
26618
+ id?: string;
26619
+ min_quantity?: number;
26620
+ net_price: number;
26621
+ notes?: string | null;
26622
+ product_category_id?: string | null;
26623
+ product_id?: string | null;
26624
+ updated_at?: string;
26625
+ valid_from?: string | null;
26626
+ valid_until?: string | null;
26627
+ };
26628
+ Update: {
26629
+ base_price?: number | null;
26630
+ created_at?: string;
26631
+ currency?: string;
26632
+ customer_id?: string;
26633
+ id?: string;
26634
+ min_quantity?: number;
26635
+ net_price?: number;
26636
+ notes?: string | null;
26637
+ product_category_id?: string | null;
26638
+ product_id?: string | null;
26639
+ updated_at?: string;
26640
+ valid_from?: string | null;
26641
+ valid_until?: string | null;
26642
+ };
26643
+ Relationships: [{
26644
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
26645
+ columns: ["customer_id"];
26646
+ isOneToOne: false;
26647
+ referencedRelation: "customers";
26648
+ referencedColumns: ["id"];
26649
+ }, {
26650
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
26651
+ columns: ["product_category_id"];
26652
+ isOneToOne: false;
26653
+ referencedRelation: "product_categories";
26654
+ referencedColumns: ["id"];
26655
+ }, {
26656
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
26657
+ columns: ["product_id"];
26658
+ isOneToOne: false;
26659
+ referencedRelation: "products";
26660
+ referencedColumns: ["id"];
26661
+ }];
26662
+ };
26663
+ local_customer_price_groups: {
26664
+ Row: {
26665
+ created_at: string;
26666
+ currency: string;
26667
+ customer_id: string;
26668
+ discount_type: string;
26669
+ discount_value: number;
26670
+ id: string;
26671
+ min_quantity: number;
26672
+ notes: string | null;
26673
+ product_category_id: string | null;
26674
+ product_id: string | null;
26675
+ updated_at: string;
26676
+ valid_from: string | null;
26677
+ valid_until: string | null;
26678
+ };
26679
+ Insert: {
26680
+ created_at?: string;
26681
+ currency?: string;
26682
+ customer_id: string;
26683
+ discount_type: string;
26684
+ discount_value: number;
26685
+ id?: string;
26686
+ min_quantity?: number;
26687
+ notes?: string | null;
26688
+ product_category_id?: string | null;
26689
+ product_id?: string | null;
26690
+ updated_at?: string;
26691
+ valid_from?: string | null;
26692
+ valid_until?: string | null;
26693
+ };
26694
+ Update: {
26695
+ created_at?: string;
26696
+ currency?: string;
26697
+ customer_id?: string;
26698
+ discount_type?: string;
26699
+ discount_value?: number;
26700
+ id?: string;
26701
+ min_quantity?: number;
26702
+ notes?: string | null;
26703
+ product_category_id?: string | null;
26704
+ product_id?: string | null;
26705
+ updated_at?: string;
26706
+ valid_from?: string | null;
26707
+ valid_until?: string | null;
26708
+ };
26709
+ Relationships: [{
26710
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
26711
+ columns: ["customer_id"];
26712
+ isOneToOne: false;
26713
+ referencedRelation: "customers";
26714
+ referencedColumns: ["id"];
26715
+ }, {
26716
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
26717
+ columns: ["product_category_id"];
26718
+ isOneToOne: false;
26719
+ referencedRelation: "product_categories";
26720
+ referencedColumns: ["id"];
26721
+ }, {
26722
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
26723
+ columns: ["product_id"];
26724
+ isOneToOne: false;
26725
+ referencedRelation: "products";
26726
+ referencedColumns: ["id"];
26727
+ }];
26728
+ };
26729
+ local_customer_sales_strategies: {
26730
+ Row: {
26731
+ created_at: string;
26732
+ currency: string;
26733
+ customer_id: string;
26734
+ discount_type: string;
26735
+ discount_value: number;
26736
+ id: string;
26737
+ min_quantity: number;
26738
+ notes: string | null;
26739
+ product_category_id: string | null;
26740
+ product_id: string | null;
26741
+ updated_at: string;
26742
+ valid_from: string | null;
26743
+ valid_until: string | null;
26744
+ };
26745
+ Insert: {
26746
+ created_at?: string;
26747
+ currency?: string;
26748
+ customer_id: string;
26749
+ discount_type: string;
26750
+ discount_value: number;
26751
+ id?: string;
26752
+ min_quantity?: number;
26753
+ notes?: string | null;
26754
+ product_category_id?: string | null;
26755
+ product_id?: string | null;
26756
+ updated_at?: string;
26757
+ valid_from?: string | null;
26758
+ valid_until?: string | null;
26759
+ };
26760
+ Update: {
26761
+ created_at?: string;
26762
+ currency?: string;
26763
+ customer_id?: string;
26764
+ discount_type?: string;
26765
+ discount_value?: number;
26766
+ id?: string;
26767
+ min_quantity?: number;
26768
+ notes?: string | null;
26769
+ product_category_id?: string | null;
26770
+ product_id?: string | null;
26771
+ updated_at?: string;
26772
+ valid_from?: string | null;
26773
+ valid_until?: string | null;
26774
+ };
26775
+ Relationships: [{
26776
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
26777
+ columns: ["customer_id"];
26778
+ isOneToOne: false;
26779
+ referencedRelation: "customers";
26780
+ referencedColumns: ["id"];
26781
+ }, {
26782
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
26783
+ columns: ["product_category_id"];
26784
+ isOneToOne: false;
26785
+ referencedRelation: "product_categories";
26786
+ referencedColumns: ["id"];
26787
+ }, {
26788
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
26789
+ columns: ["product_id"];
26790
+ isOneToOne: false;
26791
+ referencedRelation: "products";
26792
+ referencedColumns: ["id"];
26793
+ }];
26794
+ };
24899
26795
  locations: {
24900
26796
  Row: {
24901
26797
  created_at: string;
@@ -25403,6 +27299,273 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
25403
27299
  referencedColumns: ["id"];
25404
27300
  }];
25405
27301
  };
27302
+ nmbrs_component_mapping: {
27303
+ Row: {
27304
+ created_at: string;
27305
+ id: string;
27306
+ source_kind: string;
27307
+ source_value: string | null;
27308
+ updated_at: string;
27309
+ wage_code: string;
27310
+ };
27311
+ Insert: {
27312
+ created_at?: string;
27313
+ id?: string;
27314
+ source_kind: string;
27315
+ source_value?: string | null;
27316
+ updated_at?: string;
27317
+ wage_code: string;
27318
+ };
27319
+ Update: {
27320
+ created_at?: string;
27321
+ id?: string;
27322
+ source_kind?: string;
27323
+ source_value?: string | null;
27324
+ updated_at?: string;
27325
+ wage_code?: string;
27326
+ };
27327
+ Relationships: [{
27328
+ foreignKeyName: "nmbrs_component_mapping_wage_code_fkey";
27329
+ columns: ["wage_code"];
27330
+ isOneToOne: false;
27331
+ referencedRelation: "nmbrs_wage_components";
27332
+ referencedColumns: ["code"];
27333
+ }];
27334
+ };
27335
+ nmbrs_employee_mapping: {
27336
+ Row: {
27337
+ active_from: string | null;
27338
+ active_to: string | null;
27339
+ contract_hours_per_week: number | null;
27340
+ created_at: string;
27341
+ hourly_wage: number | null;
27342
+ id: string;
27343
+ monteur_id: string;
27344
+ nmbrs_company_code: string | null;
27345
+ nmbrs_employee_number: string;
27346
+ updated_at: string;
27347
+ };
27348
+ Insert: {
27349
+ active_from?: string | null;
27350
+ active_to?: string | null;
27351
+ contract_hours_per_week?: number | null;
27352
+ created_at?: string;
27353
+ hourly_wage?: number | null;
27354
+ id?: string;
27355
+ monteur_id: string;
27356
+ nmbrs_company_code?: string | null;
27357
+ nmbrs_employee_number: string;
27358
+ updated_at?: string;
27359
+ };
27360
+ Update: {
27361
+ active_from?: string | null;
27362
+ active_to?: string | null;
27363
+ contract_hours_per_week?: number | null;
27364
+ created_at?: string;
27365
+ hourly_wage?: number | null;
27366
+ id?: string;
27367
+ monteur_id?: string;
27368
+ nmbrs_company_code?: string | null;
27369
+ nmbrs_employee_number?: string;
27370
+ updated_at?: string;
27371
+ };
27372
+ Relationships: [{
27373
+ foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
27374
+ columns: ["monteur_id"];
27375
+ isOneToOne: true;
27376
+ referencedRelation: "monteurs";
27377
+ referencedColumns: ["id"];
27378
+ }];
27379
+ };
27380
+ nmbrs_export_lines: {
27381
+ Row: {
27382
+ amount: number;
27383
+ created_at: string;
27384
+ entry_date: string;
27385
+ hours: number;
27386
+ id: string;
27387
+ monteur_id: string;
27388
+ nmbrs_employee_number: string | null;
27389
+ notes: string | null;
27390
+ run_id: string;
27391
+ source_kind: string | null;
27392
+ source_ref_id: string | null;
27393
+ updated_at: string;
27394
+ wage_code: string;
27395
+ };
27396
+ Insert: {
27397
+ amount?: number;
27398
+ created_at?: string;
27399
+ entry_date: string;
27400
+ hours?: number;
27401
+ id?: string;
27402
+ monteur_id: string;
27403
+ nmbrs_employee_number?: string | null;
27404
+ notes?: string | null;
27405
+ run_id: string;
27406
+ source_kind?: string | null;
27407
+ source_ref_id?: string | null;
27408
+ updated_at?: string;
27409
+ wage_code: string;
27410
+ };
27411
+ Update: {
27412
+ amount?: number;
27413
+ created_at?: string;
27414
+ entry_date?: string;
27415
+ hours?: number;
27416
+ id?: string;
27417
+ monteur_id?: string;
27418
+ nmbrs_employee_number?: string | null;
27419
+ notes?: string | null;
27420
+ run_id?: string;
27421
+ source_kind?: string | null;
27422
+ source_ref_id?: string | null;
27423
+ updated_at?: string;
27424
+ wage_code?: string;
27425
+ };
27426
+ Relationships: [{
27427
+ foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
27428
+ columns: ["monteur_id"];
27429
+ isOneToOne: false;
27430
+ referencedRelation: "monteurs";
27431
+ referencedColumns: ["id"];
27432
+ }, {
27433
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
27434
+ columns: ["run_id"];
27435
+ isOneToOne: false;
27436
+ referencedRelation: "nmbrs_export_runs";
27437
+ referencedColumns: ["id"];
27438
+ }, {
27439
+ foreignKeyName: "nmbrs_export_lines_wage_code_fkey";
27440
+ columns: ["wage_code"];
27441
+ isOneToOne: false;
27442
+ referencedRelation: "nmbrs_wage_components";
27443
+ referencedColumns: ["code"];
27444
+ }];
27445
+ };
27446
+ nmbrs_export_runs: {
27447
+ Row: {
27448
+ created_at: string;
27449
+ file_name: string | null;
27450
+ generated_at: string;
27451
+ generated_by: string | null;
27452
+ id: string;
27453
+ notes: string | null;
27454
+ period_end: string;
27455
+ period_label: string;
27456
+ period_start: string;
27457
+ status: string;
27458
+ total_hours: number;
27459
+ total_lines: number;
27460
+ updated_at: string;
27461
+ };
27462
+ Insert: {
27463
+ created_at?: string;
27464
+ file_name?: string | null;
27465
+ generated_at?: string;
27466
+ generated_by?: string | null;
27467
+ id?: string;
27468
+ notes?: string | null;
27469
+ period_end: string;
27470
+ period_label: string;
27471
+ period_start: string;
27472
+ status?: string;
27473
+ total_hours?: number;
27474
+ total_lines?: number;
27475
+ updated_at?: string;
27476
+ };
27477
+ Update: {
27478
+ created_at?: string;
27479
+ file_name?: string | null;
27480
+ generated_at?: string;
27481
+ generated_by?: string | null;
27482
+ id?: string;
27483
+ notes?: string | null;
27484
+ period_end?: string;
27485
+ period_label?: string;
27486
+ period_start?: string;
27487
+ status?: string;
27488
+ total_hours?: number;
27489
+ total_lines?: number;
27490
+ updated_at?: string;
27491
+ };
27492
+ Relationships: [];
27493
+ };
27494
+ nmbrs_settings: {
27495
+ Row: {
27496
+ created_at: string;
27497
+ default_company_code: string | null;
27498
+ id: boolean;
27499
+ include_travel: boolean;
27500
+ overtime_threshold_daily: number;
27501
+ overtime_threshold_weekly: number;
27502
+ period_type: string;
27503
+ updated_at: string;
27504
+ updated_by: string | null;
27505
+ week_start_day: number;
27506
+ };
27507
+ Insert: {
27508
+ created_at?: string;
27509
+ default_company_code?: string | null;
27510
+ id?: boolean;
27511
+ include_travel?: boolean;
27512
+ overtime_threshold_daily?: number;
27513
+ overtime_threshold_weekly?: number;
27514
+ period_type?: string;
27515
+ updated_at?: string;
27516
+ updated_by?: string | null;
27517
+ week_start_day?: number;
27518
+ };
27519
+ Update: {
27520
+ created_at?: string;
27521
+ default_company_code?: string | null;
27522
+ id?: boolean;
27523
+ include_travel?: boolean;
27524
+ overtime_threshold_daily?: number;
27525
+ overtime_threshold_weekly?: number;
27526
+ period_type?: string;
27527
+ updated_at?: string;
27528
+ updated_by?: string | null;
27529
+ week_start_day?: number;
27530
+ };
27531
+ Relationships: [];
27532
+ };
27533
+ nmbrs_wage_components: {
27534
+ Row: {
27535
+ category: string;
27536
+ code: string;
27537
+ created_at: string;
27538
+ id: string;
27539
+ is_active: boolean;
27540
+ label: string;
27541
+ sort_order: number;
27542
+ unit: string;
27543
+ updated_at: string;
27544
+ };
27545
+ Insert: {
27546
+ category: string;
27547
+ code: string;
27548
+ created_at?: string;
27549
+ id?: string;
27550
+ is_active?: boolean;
27551
+ label: string;
27552
+ sort_order?: number;
27553
+ unit: string;
27554
+ updated_at?: string;
27555
+ };
27556
+ Update: {
27557
+ category?: string;
27558
+ code?: string;
27559
+ created_at?: string;
27560
+ id?: string;
27561
+ is_active?: boolean;
27562
+ label?: string;
27563
+ sort_order?: number;
27564
+ unit?: string;
27565
+ updated_at?: string;
27566
+ };
27567
+ Relationships: [];
27568
+ };
25406
27569
  notifications: {
25407
27570
  Row: {
25408
27571
  created_at: string;
@@ -26385,6 +28548,7 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
26385
28548
  purchase_price: number | null;
26386
28549
  quantity: number;
26387
28550
  sale_price: number | null;
28551
+ trade_item_key: string | null;
26388
28552
  unit: string;
26389
28553
  updated_at: string;
26390
28554
  weight: string | null;
@@ -26407,6 +28571,7 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
26407
28571
  purchase_price?: number | null;
26408
28572
  quantity?: number;
26409
28573
  sale_price?: number | null;
28574
+ trade_item_key?: string | null;
26410
28575
  unit?: string;
26411
28576
  updated_at?: string;
26412
28577
  weight?: string | null;
@@ -26429,6 +28594,7 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
26429
28594
  purchase_price?: number | null;
26430
28595
  quantity?: number;
26431
28596
  sale_price?: number | null;
28597
+ trade_item_key?: string | null;
26432
28598
  unit?: string;
26433
28599
  updated_at?: string;
26434
28600
  weight?: string | null;
@@ -27248,6 +29414,102 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
27248
29414
  };
27249
29415
  Relationships: [];
27250
29416
  };
29417
+ stock_import_runs: {
29418
+ Row: {
29419
+ connection_id: string | null;
29420
+ created_at: string;
29421
+ created_rows: number;
29422
+ errors: import("../integrations/supabase/types").Json;
29423
+ filename: string | null;
29424
+ id: string;
29425
+ mutations: import("../integrations/supabase/types").Json;
29426
+ skipped_rows: number;
29427
+ total_rows: number;
29428
+ updated_rows: number;
29429
+ user_id: string;
29430
+ };
29431
+ Insert: {
29432
+ connection_id?: string | null;
29433
+ created_at?: string;
29434
+ created_rows?: number;
29435
+ errors?: import("../integrations/supabase/types").Json;
29436
+ filename?: string | null;
29437
+ id?: string;
29438
+ mutations?: import("../integrations/supabase/types").Json;
29439
+ skipped_rows?: number;
29440
+ total_rows?: number;
29441
+ updated_rows?: number;
29442
+ user_id: string;
29443
+ };
29444
+ Update: {
29445
+ connection_id?: string | null;
29446
+ created_at?: string;
29447
+ created_rows?: number;
29448
+ errors?: import("../integrations/supabase/types").Json;
29449
+ filename?: string | null;
29450
+ id?: string;
29451
+ mutations?: import("../integrations/supabase/types").Json;
29452
+ skipped_rows?: number;
29453
+ total_rows?: number;
29454
+ updated_rows?: number;
29455
+ user_id?: string;
29456
+ };
29457
+ Relationships: [];
29458
+ };
29459
+ stock_mutation_log: {
29460
+ Row: {
29461
+ connection_id: string | null;
29462
+ created_at: string;
29463
+ created_by: string | null;
29464
+ id: string;
29465
+ mutation_type: string;
29466
+ order_id: string | null;
29467
+ order_item_id: string | null;
29468
+ order_source: string | null;
29469
+ physical_after: number | null;
29470
+ physical_before: number | null;
29471
+ qty_delta: number;
29472
+ reason: string | null;
29473
+ reserved_after: number | null;
29474
+ reserved_before: number | null;
29475
+ trade_item_key: string;
29476
+ };
29477
+ Insert: {
29478
+ connection_id?: string | null;
29479
+ created_at?: string;
29480
+ created_by?: string | null;
29481
+ id?: string;
29482
+ mutation_type: string;
29483
+ order_id?: string | null;
29484
+ order_item_id?: string | null;
29485
+ order_source?: string | null;
29486
+ physical_after?: number | null;
29487
+ physical_before?: number | null;
29488
+ qty_delta: number;
29489
+ reason?: string | null;
29490
+ reserved_after?: number | null;
29491
+ reserved_before?: number | null;
29492
+ trade_item_key: string;
29493
+ };
29494
+ Update: {
29495
+ connection_id?: string | null;
29496
+ created_at?: string;
29497
+ created_by?: string | null;
29498
+ id?: string;
29499
+ mutation_type?: string;
29500
+ order_id?: string | null;
29501
+ order_item_id?: string | null;
29502
+ order_source?: string | null;
29503
+ physical_after?: number | null;
29504
+ physical_before?: number | null;
29505
+ qty_delta?: number;
29506
+ reason?: string | null;
29507
+ reserved_after?: number | null;
29508
+ reserved_before?: number | null;
29509
+ trade_item_key?: string;
29510
+ };
29511
+ Relationships: [];
29512
+ };
27251
29513
  supplier_products: {
27252
29514
  Row: {
27253
29515
  article_number: string | null;
@@ -28825,6 +31087,44 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
28825
31087
  };
28826
31088
  Relationships: [];
28827
31089
  };
31090
+ floriday_customer_discounts: {
31091
+ Row: {
31092
+ base_price: number | null;
31093
+ buyer_organization_id: string | null;
31094
+ currency: string | null;
31095
+ discount_type: string | null;
31096
+ discount_value: number | null;
31097
+ min_quantity: number | null;
31098
+ net_price: number | null;
31099
+ product_group_id: string | null;
31100
+ raw: import("../integrations/supabase/types").Json | null;
31101
+ source: string | null;
31102
+ source_id: string | null;
31103
+ trade_item_id: string | null;
31104
+ valid_from: string | null;
31105
+ valid_until: string | null;
31106
+ };
31107
+ Relationships: [];
31108
+ };
31109
+ local_customer_discounts: {
31110
+ Row: {
31111
+ base_price: number | null;
31112
+ currency: string | null;
31113
+ customer_id: string | null;
31114
+ discount_type: string | null;
31115
+ discount_value: number | null;
31116
+ min_quantity: number | null;
31117
+ net_price: number | null;
31118
+ product_category_id: string | null;
31119
+ product_id: string | null;
31120
+ product_name: string | null;
31121
+ source: string | null;
31122
+ source_id: string | null;
31123
+ valid_from: string | null;
31124
+ valid_until: string | null;
31125
+ };
31126
+ Relationships: [];
31127
+ };
28828
31128
  manufacture_product_possible_stock_view: {
28829
31129
  Row: {
28830
31130
  component_count: number | null;
@@ -29109,6 +31409,54 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
29109
31409
  };
29110
31410
  Returns: number;
29111
31411
  };
31412
+ afh_city_code: {
31413
+ Args: {
31414
+ _city: string;
31415
+ _country: string;
31416
+ };
31417
+ Returns: string;
31418
+ };
31419
+ afh_normalize_country: {
31420
+ Args: {
31421
+ _raw: string;
31422
+ };
31423
+ Returns: string;
31424
+ };
31425
+ afh_normalize_nl_province: {
31426
+ Args: {
31427
+ _raw: string;
31428
+ };
31429
+ Returns: string;
31430
+ };
31431
+ afh_subtract_workdays: {
31432
+ Args: {
31433
+ _date: string;
31434
+ _days: number;
31435
+ };
31436
+ Returns: string;
31437
+ };
31438
+ apply_stock_consumption: {
31439
+ Args: {
31440
+ p_order_id: string;
31441
+ p_order_item_id: string;
31442
+ p_qty: number;
31443
+ p_reason: string;
31444
+ p_source: string;
31445
+ p_trade_item_key: string;
31446
+ };
31447
+ Returns: undefined;
31448
+ };
31449
+ apply_stock_reservation: {
31450
+ Args: {
31451
+ p_order_id: string;
31452
+ p_order_item_id: string;
31453
+ p_qty: number;
31454
+ p_reason: string;
31455
+ p_source: string;
31456
+ p_trade_item_key: string;
31457
+ };
31458
+ Returns: undefined;
31459
+ };
29112
31460
  assign_cart_numbers: {
29113
31461
  Args: {
29114
31462
  p_carts: import("../integrations/supabase/types").Json;
@@ -29132,12 +31480,40 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
29132
31480
  order_number: string;
29133
31481
  }[];
29134
31482
  };
31483
+ backfill_open_order_reservations: {
31484
+ Args: never;
31485
+ Returns: {
31486
+ processed_items: number;
31487
+ }[];
31488
+ };
29135
31489
  call_exact_route: {
29136
31490
  Args: {
29137
31491
  path: string;
29138
31492
  };
29139
31493
  Returns: number;
29140
31494
  };
31495
+ check_offer_product_available_stock: {
31496
+ Args: {
31497
+ p_campaign_product_id: string;
31498
+ p_code: string;
31499
+ p_needed_qty?: number;
31500
+ p_product_name?: string;
31501
+ };
31502
+ Returns: import("../integrations/supabase/types").Json;
31503
+ };
31504
+ check_trade_item_available_stock: {
31505
+ Args: {
31506
+ p_connection_id?: string;
31507
+ p_context?: string;
31508
+ p_needed_qty?: number;
31509
+ p_order_id?: string;
31510
+ p_order_item_id?: string;
31511
+ p_owner_id?: string;
31512
+ p_product_name?: string;
31513
+ p_trade_item_key: string;
31514
+ };
31515
+ Returns: import("../integrations/supabase/types").Json;
31516
+ };
29141
31517
  cleanup_old_bookings: {
29142
31518
  Args: never;
29143
31519
  Returns: number;
@@ -29181,6 +31557,12 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
29181
31557
  table_name: string;
29182
31558
  }[];
29183
31559
  };
31560
+ dispatch_carrier_signups_sql: {
31561
+ Args: {
31562
+ _catchup?: string;
31563
+ };
31564
+ Returns: import("../integrations/supabase/types").Json;
31565
+ };
29184
31566
  email_auth_decrypt: {
29185
31567
  Args: {
29186
31568
  cipher: string;
@@ -29216,6 +31598,12 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
29216
31598
  status: string;
29217
31599
  }[];
29218
31600
  };
31601
+ ensure_trade_item_stock_row: {
31602
+ Args: {
31603
+ p_key: string;
31604
+ };
31605
+ Returns: undefined;
31606
+ };
29219
31607
  ensure_user_tenant: {
29220
31608
  Args: never;
29221
31609
  Returns: string;
@@ -29253,6 +31641,31 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
29253
31641
  };
29254
31642
  Returns: boolean;
29255
31643
  };
31644
+ find_trade_item_key: {
31645
+ Args: {
31646
+ p_barcode: string;
31647
+ p_name: string;
31648
+ p_product_id: string;
31649
+ };
31650
+ Returns: string;
31651
+ };
31652
+ floriday_effective_price: {
31653
+ Args: {
31654
+ _buyer_id: string;
31655
+ _on_date?: string;
31656
+ _quantity?: number;
31657
+ _trade_item_id: string;
31658
+ };
31659
+ Returns: {
31660
+ base_price: number;
31661
+ currency: string;
31662
+ discount_type: string;
31663
+ discount_value: number;
31664
+ net_price: number;
31665
+ source: string;
31666
+ source_id: string;
31667
+ }[];
31668
+ };
29256
31669
  format_cart_number: {
29257
31670
  Args: {
29258
31671
  p_pick_date: string;
@@ -29273,6 +31686,13 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
29273
31686
  preferred_warehouse_name: string;
29274
31687
  }[];
29275
31688
  };
31689
+ get_active_floriday_context: {
31690
+ Args: never;
31691
+ Returns: {
31692
+ connection_id: string;
31693
+ user_id: string;
31694
+ }[];
31695
+ };
29276
31696
  get_active_twinfield_public: {
29277
31697
  Args: never;
29278
31698
  Returns: {
@@ -29375,6 +31795,18 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
29375
31795
  };
29376
31796
  Returns: import("../integrations/supabase/types").Json;
29377
31797
  };
31798
+ get_offer_recipient_by_code: {
31799
+ Args: {
31800
+ p_code: string;
31801
+ };
31802
+ Returns: {
31803
+ campaign_id: string;
31804
+ clicked_at: string;
31805
+ customer_id: string;
31806
+ id: string;
31807
+ ordered_at: string;
31808
+ }[];
31809
+ };
29378
31810
  get_or_assign_floriday_order_number: {
29379
31811
  Args: {
29380
31812
  p_floriday_id: string;
@@ -29427,6 +31859,34 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
29427
31859
  Args: never;
29428
31860
  Returns: boolean;
29429
31861
  };
31862
+ local_effective_price: {
31863
+ Args: {
31864
+ _customer_id: string;
31865
+ _on_date?: string;
31866
+ _product_id: string;
31867
+ _quantity?: number;
31868
+ };
31869
+ Returns: {
31870
+ currency: string;
31871
+ discount_type: string;
31872
+ discount_value: number;
31873
+ net_price: number;
31874
+ source: string;
31875
+ source_id: string;
31876
+ }[];
31877
+ };
31878
+ mark_offer_clicked: {
31879
+ Args: {
31880
+ p_code: string;
31881
+ };
31882
+ Returns: undefined;
31883
+ };
31884
+ mark_offer_ordered: {
31885
+ Args: {
31886
+ p_code: string;
31887
+ };
31888
+ Returns: undefined;
31889
+ };
29430
31890
  next_order_number: {
29431
31891
  Args: {
29432
31892
  p_prefix: string;
@@ -29446,6 +31906,14 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
29446
31906
  };
29447
31907
  Returns: string;
29448
31908
  };
31909
+ offer_recipient_matches: {
31910
+ Args: {
31911
+ _campaign_id: string;
31912
+ _customer_id: string;
31913
+ _recipient_id: string;
31914
+ };
31915
+ Returns: boolean;
31916
+ };
29449
31917
  pickstation_get_orders_raw: {
29450
31918
  Args: never;
29451
31919
  Returns: import("../integrations/supabase/types").Json;
@@ -29473,6 +31941,13 @@ export declare const upsertCarrier: import("@tanstack/start-client-core").Requir
29473
31941
  };
29474
31942
  Returns: undefined;
29475
31943
  };
31944
+ promote_trade_item_key: {
31945
+ Args: {
31946
+ p_new: string;
31947
+ p_old: string;
31948
+ };
31949
+ Returns: undefined;
31950
+ };
29476
31951
  refresh_floricode_derived_code_lists: {
29477
31952
  Args: never;
29478
31953
  Returns: {
@@ -30520,6 +32995,7 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
30520
32995
  notes: string | null;
30521
32996
  performed_at: string;
30522
32997
  rescheduled_count: number;
32998
+ stock_consumed_at: string | null;
30523
32999
  total_carts: number;
30524
33000
  updated_at: string;
30525
33001
  user_id: string;
@@ -30533,6 +33009,7 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
30533
33009
  notes?: string | null;
30534
33010
  performed_at?: string;
30535
33011
  rescheduled_count?: number;
33012
+ stock_consumed_at?: string | null;
30536
33013
  total_carts?: number;
30537
33014
  updated_at?: string;
30538
33015
  user_id: string;
@@ -30546,6 +33023,7 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
30546
33023
  notes?: string | null;
30547
33024
  performed_at?: string;
30548
33025
  rescheduled_count?: number;
33026
+ stock_consumed_at?: string | null;
30549
33027
  total_carts?: number;
30550
33028
  updated_at?: string;
30551
33029
  user_id?: string;
@@ -33426,6 +35904,51 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
33426
35904
  referencedColumns: ["id"];
33427
35905
  }];
33428
35906
  };
35907
+ floriday_continuous_stock_queue: {
35908
+ Row: {
35909
+ attempts: number;
35910
+ connection_id: string;
35911
+ created_at: string;
35912
+ gateway_attempt_id: string | null;
35913
+ id: string;
35914
+ last_error: string | null;
35915
+ number_of_pieces: number;
35916
+ sent_at: string | null;
35917
+ status: string;
35918
+ trade_item_id: string;
35919
+ updated_at: string;
35920
+ user_id: string;
35921
+ };
35922
+ Insert: {
35923
+ attempts?: number;
35924
+ connection_id: string;
35925
+ created_at?: string;
35926
+ gateway_attempt_id?: string | null;
35927
+ id?: string;
35928
+ last_error?: string | null;
35929
+ number_of_pieces?: number;
35930
+ sent_at?: string | null;
35931
+ status?: string;
35932
+ trade_item_id: string;
35933
+ updated_at?: string;
35934
+ user_id: string;
35935
+ };
35936
+ Update: {
35937
+ attempts?: number;
35938
+ connection_id?: string;
35939
+ created_at?: string;
35940
+ gateway_attempt_id?: string | null;
35941
+ id?: string;
35942
+ last_error?: string | null;
35943
+ number_of_pieces?: number;
35944
+ sent_at?: string | null;
35945
+ status?: string;
35946
+ trade_item_id?: string;
35947
+ updated_at?: string;
35948
+ user_id?: string;
35949
+ };
35950
+ Relationships: [];
35951
+ };
33429
35952
  floriday_contract_trade_item_groups_cache: {
33430
35953
  Row: {
33431
35954
  connection_id: string;
@@ -34815,6 +37338,204 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
34815
37338
  };
34816
37339
  Relationships: [];
34817
37340
  };
37341
+ local_customer_agreements: {
37342
+ Row: {
37343
+ base_price: number | null;
37344
+ created_at: string;
37345
+ currency: string;
37346
+ customer_id: string;
37347
+ id: string;
37348
+ min_quantity: number;
37349
+ net_price: number;
37350
+ notes: string | null;
37351
+ product_category_id: string | null;
37352
+ product_id: string | null;
37353
+ updated_at: string;
37354
+ valid_from: string | null;
37355
+ valid_until: string | null;
37356
+ };
37357
+ Insert: {
37358
+ base_price?: number | null;
37359
+ created_at?: string;
37360
+ currency?: string;
37361
+ customer_id: string;
37362
+ id?: string;
37363
+ min_quantity?: number;
37364
+ net_price: number;
37365
+ notes?: string | null;
37366
+ product_category_id?: string | null;
37367
+ product_id?: string | null;
37368
+ updated_at?: string;
37369
+ valid_from?: string | null;
37370
+ valid_until?: string | null;
37371
+ };
37372
+ Update: {
37373
+ base_price?: number | null;
37374
+ created_at?: string;
37375
+ currency?: string;
37376
+ customer_id?: string;
37377
+ id?: string;
37378
+ min_quantity?: number;
37379
+ net_price?: number;
37380
+ notes?: string | null;
37381
+ product_category_id?: string | null;
37382
+ product_id?: string | null;
37383
+ updated_at?: string;
37384
+ valid_from?: string | null;
37385
+ valid_until?: string | null;
37386
+ };
37387
+ Relationships: [{
37388
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
37389
+ columns: ["customer_id"];
37390
+ isOneToOne: false;
37391
+ referencedRelation: "customers";
37392
+ referencedColumns: ["id"];
37393
+ }, {
37394
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
37395
+ columns: ["product_category_id"];
37396
+ isOneToOne: false;
37397
+ referencedRelation: "product_categories";
37398
+ referencedColumns: ["id"];
37399
+ }, {
37400
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
37401
+ columns: ["product_id"];
37402
+ isOneToOne: false;
37403
+ referencedRelation: "products";
37404
+ referencedColumns: ["id"];
37405
+ }];
37406
+ };
37407
+ local_customer_price_groups: {
37408
+ Row: {
37409
+ created_at: string;
37410
+ currency: string;
37411
+ customer_id: string;
37412
+ discount_type: string;
37413
+ discount_value: number;
37414
+ id: string;
37415
+ min_quantity: number;
37416
+ notes: string | null;
37417
+ product_category_id: string | null;
37418
+ product_id: string | null;
37419
+ updated_at: string;
37420
+ valid_from: string | null;
37421
+ valid_until: string | null;
37422
+ };
37423
+ Insert: {
37424
+ created_at?: string;
37425
+ currency?: string;
37426
+ customer_id: string;
37427
+ discount_type: string;
37428
+ discount_value: number;
37429
+ id?: string;
37430
+ min_quantity?: number;
37431
+ notes?: string | null;
37432
+ product_category_id?: string | null;
37433
+ product_id?: string | null;
37434
+ updated_at?: string;
37435
+ valid_from?: string | null;
37436
+ valid_until?: string | null;
37437
+ };
37438
+ Update: {
37439
+ created_at?: string;
37440
+ currency?: string;
37441
+ customer_id?: string;
37442
+ discount_type?: string;
37443
+ discount_value?: number;
37444
+ id?: string;
37445
+ min_quantity?: number;
37446
+ notes?: string | null;
37447
+ product_category_id?: string | null;
37448
+ product_id?: string | null;
37449
+ updated_at?: string;
37450
+ valid_from?: string | null;
37451
+ valid_until?: string | null;
37452
+ };
37453
+ Relationships: [{
37454
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
37455
+ columns: ["customer_id"];
37456
+ isOneToOne: false;
37457
+ referencedRelation: "customers";
37458
+ referencedColumns: ["id"];
37459
+ }, {
37460
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
37461
+ columns: ["product_category_id"];
37462
+ isOneToOne: false;
37463
+ referencedRelation: "product_categories";
37464
+ referencedColumns: ["id"];
37465
+ }, {
37466
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
37467
+ columns: ["product_id"];
37468
+ isOneToOne: false;
37469
+ referencedRelation: "products";
37470
+ referencedColumns: ["id"];
37471
+ }];
37472
+ };
37473
+ local_customer_sales_strategies: {
37474
+ Row: {
37475
+ created_at: string;
37476
+ currency: string;
37477
+ customer_id: string;
37478
+ discount_type: string;
37479
+ discount_value: number;
37480
+ id: string;
37481
+ min_quantity: number;
37482
+ notes: string | null;
37483
+ product_category_id: string | null;
37484
+ product_id: string | null;
37485
+ updated_at: string;
37486
+ valid_from: string | null;
37487
+ valid_until: string | null;
37488
+ };
37489
+ Insert: {
37490
+ created_at?: string;
37491
+ currency?: string;
37492
+ customer_id: string;
37493
+ discount_type: string;
37494
+ discount_value: number;
37495
+ id?: string;
37496
+ min_quantity?: number;
37497
+ notes?: string | null;
37498
+ product_category_id?: string | null;
37499
+ product_id?: string | null;
37500
+ updated_at?: string;
37501
+ valid_from?: string | null;
37502
+ valid_until?: string | null;
37503
+ };
37504
+ Update: {
37505
+ created_at?: string;
37506
+ currency?: string;
37507
+ customer_id?: string;
37508
+ discount_type?: string;
37509
+ discount_value?: number;
37510
+ id?: string;
37511
+ min_quantity?: number;
37512
+ notes?: string | null;
37513
+ product_category_id?: string | null;
37514
+ product_id?: string | null;
37515
+ updated_at?: string;
37516
+ valid_from?: string | null;
37517
+ valid_until?: string | null;
37518
+ };
37519
+ Relationships: [{
37520
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
37521
+ columns: ["customer_id"];
37522
+ isOneToOne: false;
37523
+ referencedRelation: "customers";
37524
+ referencedColumns: ["id"];
37525
+ }, {
37526
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
37527
+ columns: ["product_category_id"];
37528
+ isOneToOne: false;
37529
+ referencedRelation: "product_categories";
37530
+ referencedColumns: ["id"];
37531
+ }, {
37532
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
37533
+ columns: ["product_id"];
37534
+ isOneToOne: false;
37535
+ referencedRelation: "products";
37536
+ referencedColumns: ["id"];
37537
+ }];
37538
+ };
34818
37539
  locations: {
34819
37540
  Row: {
34820
37541
  created_at: string;
@@ -35322,6 +38043,273 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
35322
38043
  referencedColumns: ["id"];
35323
38044
  }];
35324
38045
  };
38046
+ nmbrs_component_mapping: {
38047
+ Row: {
38048
+ created_at: string;
38049
+ id: string;
38050
+ source_kind: string;
38051
+ source_value: string | null;
38052
+ updated_at: string;
38053
+ wage_code: string;
38054
+ };
38055
+ Insert: {
38056
+ created_at?: string;
38057
+ id?: string;
38058
+ source_kind: string;
38059
+ source_value?: string | null;
38060
+ updated_at?: string;
38061
+ wage_code: string;
38062
+ };
38063
+ Update: {
38064
+ created_at?: string;
38065
+ id?: string;
38066
+ source_kind?: string;
38067
+ source_value?: string | null;
38068
+ updated_at?: string;
38069
+ wage_code?: string;
38070
+ };
38071
+ Relationships: [{
38072
+ foreignKeyName: "nmbrs_component_mapping_wage_code_fkey";
38073
+ columns: ["wage_code"];
38074
+ isOneToOne: false;
38075
+ referencedRelation: "nmbrs_wage_components";
38076
+ referencedColumns: ["code"];
38077
+ }];
38078
+ };
38079
+ nmbrs_employee_mapping: {
38080
+ Row: {
38081
+ active_from: string | null;
38082
+ active_to: string | null;
38083
+ contract_hours_per_week: number | null;
38084
+ created_at: string;
38085
+ hourly_wage: number | null;
38086
+ id: string;
38087
+ monteur_id: string;
38088
+ nmbrs_company_code: string | null;
38089
+ nmbrs_employee_number: string;
38090
+ updated_at: string;
38091
+ };
38092
+ Insert: {
38093
+ active_from?: string | null;
38094
+ active_to?: string | null;
38095
+ contract_hours_per_week?: number | null;
38096
+ created_at?: string;
38097
+ hourly_wage?: number | null;
38098
+ id?: string;
38099
+ monteur_id: string;
38100
+ nmbrs_company_code?: string | null;
38101
+ nmbrs_employee_number: string;
38102
+ updated_at?: string;
38103
+ };
38104
+ Update: {
38105
+ active_from?: string | null;
38106
+ active_to?: string | null;
38107
+ contract_hours_per_week?: number | null;
38108
+ created_at?: string;
38109
+ hourly_wage?: number | null;
38110
+ id?: string;
38111
+ monteur_id?: string;
38112
+ nmbrs_company_code?: string | null;
38113
+ nmbrs_employee_number?: string;
38114
+ updated_at?: string;
38115
+ };
38116
+ Relationships: [{
38117
+ foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
38118
+ columns: ["monteur_id"];
38119
+ isOneToOne: true;
38120
+ referencedRelation: "monteurs";
38121
+ referencedColumns: ["id"];
38122
+ }];
38123
+ };
38124
+ nmbrs_export_lines: {
38125
+ Row: {
38126
+ amount: number;
38127
+ created_at: string;
38128
+ entry_date: string;
38129
+ hours: number;
38130
+ id: string;
38131
+ monteur_id: string;
38132
+ nmbrs_employee_number: string | null;
38133
+ notes: string | null;
38134
+ run_id: string;
38135
+ source_kind: string | null;
38136
+ source_ref_id: string | null;
38137
+ updated_at: string;
38138
+ wage_code: string;
38139
+ };
38140
+ Insert: {
38141
+ amount?: number;
38142
+ created_at?: string;
38143
+ entry_date: string;
38144
+ hours?: number;
38145
+ id?: string;
38146
+ monteur_id: string;
38147
+ nmbrs_employee_number?: string | null;
38148
+ notes?: string | null;
38149
+ run_id: string;
38150
+ source_kind?: string | null;
38151
+ source_ref_id?: string | null;
38152
+ updated_at?: string;
38153
+ wage_code: string;
38154
+ };
38155
+ Update: {
38156
+ amount?: number;
38157
+ created_at?: string;
38158
+ entry_date?: string;
38159
+ hours?: number;
38160
+ id?: string;
38161
+ monteur_id?: string;
38162
+ nmbrs_employee_number?: string | null;
38163
+ notes?: string | null;
38164
+ run_id?: string;
38165
+ source_kind?: string | null;
38166
+ source_ref_id?: string | null;
38167
+ updated_at?: string;
38168
+ wage_code?: string;
38169
+ };
38170
+ Relationships: [{
38171
+ foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
38172
+ columns: ["monteur_id"];
38173
+ isOneToOne: false;
38174
+ referencedRelation: "monteurs";
38175
+ referencedColumns: ["id"];
38176
+ }, {
38177
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
38178
+ columns: ["run_id"];
38179
+ isOneToOne: false;
38180
+ referencedRelation: "nmbrs_export_runs";
38181
+ referencedColumns: ["id"];
38182
+ }, {
38183
+ foreignKeyName: "nmbrs_export_lines_wage_code_fkey";
38184
+ columns: ["wage_code"];
38185
+ isOneToOne: false;
38186
+ referencedRelation: "nmbrs_wage_components";
38187
+ referencedColumns: ["code"];
38188
+ }];
38189
+ };
38190
+ nmbrs_export_runs: {
38191
+ Row: {
38192
+ created_at: string;
38193
+ file_name: string | null;
38194
+ generated_at: string;
38195
+ generated_by: string | null;
38196
+ id: string;
38197
+ notes: string | null;
38198
+ period_end: string;
38199
+ period_label: string;
38200
+ period_start: string;
38201
+ status: string;
38202
+ total_hours: number;
38203
+ total_lines: number;
38204
+ updated_at: string;
38205
+ };
38206
+ Insert: {
38207
+ created_at?: string;
38208
+ file_name?: string | null;
38209
+ generated_at?: string;
38210
+ generated_by?: string | null;
38211
+ id?: string;
38212
+ notes?: string | null;
38213
+ period_end: string;
38214
+ period_label: string;
38215
+ period_start: string;
38216
+ status?: string;
38217
+ total_hours?: number;
38218
+ total_lines?: number;
38219
+ updated_at?: string;
38220
+ };
38221
+ Update: {
38222
+ created_at?: string;
38223
+ file_name?: string | null;
38224
+ generated_at?: string;
38225
+ generated_by?: string | null;
38226
+ id?: string;
38227
+ notes?: string | null;
38228
+ period_end?: string;
38229
+ period_label?: string;
38230
+ period_start?: string;
38231
+ status?: string;
38232
+ total_hours?: number;
38233
+ total_lines?: number;
38234
+ updated_at?: string;
38235
+ };
38236
+ Relationships: [];
38237
+ };
38238
+ nmbrs_settings: {
38239
+ Row: {
38240
+ created_at: string;
38241
+ default_company_code: string | null;
38242
+ id: boolean;
38243
+ include_travel: boolean;
38244
+ overtime_threshold_daily: number;
38245
+ overtime_threshold_weekly: number;
38246
+ period_type: string;
38247
+ updated_at: string;
38248
+ updated_by: string | null;
38249
+ week_start_day: number;
38250
+ };
38251
+ Insert: {
38252
+ created_at?: string;
38253
+ default_company_code?: string | null;
38254
+ id?: boolean;
38255
+ include_travel?: boolean;
38256
+ overtime_threshold_daily?: number;
38257
+ overtime_threshold_weekly?: number;
38258
+ period_type?: string;
38259
+ updated_at?: string;
38260
+ updated_by?: string | null;
38261
+ week_start_day?: number;
38262
+ };
38263
+ Update: {
38264
+ created_at?: string;
38265
+ default_company_code?: string | null;
38266
+ id?: boolean;
38267
+ include_travel?: boolean;
38268
+ overtime_threshold_daily?: number;
38269
+ overtime_threshold_weekly?: number;
38270
+ period_type?: string;
38271
+ updated_at?: string;
38272
+ updated_by?: string | null;
38273
+ week_start_day?: number;
38274
+ };
38275
+ Relationships: [];
38276
+ };
38277
+ nmbrs_wage_components: {
38278
+ Row: {
38279
+ category: string;
38280
+ code: string;
38281
+ created_at: string;
38282
+ id: string;
38283
+ is_active: boolean;
38284
+ label: string;
38285
+ sort_order: number;
38286
+ unit: string;
38287
+ updated_at: string;
38288
+ };
38289
+ Insert: {
38290
+ category: string;
38291
+ code: string;
38292
+ created_at?: string;
38293
+ id?: string;
38294
+ is_active?: boolean;
38295
+ label: string;
38296
+ sort_order?: number;
38297
+ unit: string;
38298
+ updated_at?: string;
38299
+ };
38300
+ Update: {
38301
+ category?: string;
38302
+ code?: string;
38303
+ created_at?: string;
38304
+ id?: string;
38305
+ is_active?: boolean;
38306
+ label?: string;
38307
+ sort_order?: number;
38308
+ unit?: string;
38309
+ updated_at?: string;
38310
+ };
38311
+ Relationships: [];
38312
+ };
35325
38313
  notifications: {
35326
38314
  Row: {
35327
38315
  created_at: string;
@@ -36304,6 +39292,7 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
36304
39292
  purchase_price: number | null;
36305
39293
  quantity: number;
36306
39294
  sale_price: number | null;
39295
+ trade_item_key: string | null;
36307
39296
  unit: string;
36308
39297
  updated_at: string;
36309
39298
  weight: string | null;
@@ -36326,6 +39315,7 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
36326
39315
  purchase_price?: number | null;
36327
39316
  quantity?: number;
36328
39317
  sale_price?: number | null;
39318
+ trade_item_key?: string | null;
36329
39319
  unit?: string;
36330
39320
  updated_at?: string;
36331
39321
  weight?: string | null;
@@ -36348,6 +39338,7 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
36348
39338
  purchase_price?: number | null;
36349
39339
  quantity?: number;
36350
39340
  sale_price?: number | null;
39341
+ trade_item_key?: string | null;
36351
39342
  unit?: string;
36352
39343
  updated_at?: string;
36353
39344
  weight?: string | null;
@@ -37167,6 +40158,102 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
37167
40158
  };
37168
40159
  Relationships: [];
37169
40160
  };
40161
+ stock_import_runs: {
40162
+ Row: {
40163
+ connection_id: string | null;
40164
+ created_at: string;
40165
+ created_rows: number;
40166
+ errors: import("../integrations/supabase/types").Json;
40167
+ filename: string | null;
40168
+ id: string;
40169
+ mutations: import("../integrations/supabase/types").Json;
40170
+ skipped_rows: number;
40171
+ total_rows: number;
40172
+ updated_rows: number;
40173
+ user_id: string;
40174
+ };
40175
+ Insert: {
40176
+ connection_id?: string | null;
40177
+ created_at?: string;
40178
+ created_rows?: number;
40179
+ errors?: import("../integrations/supabase/types").Json;
40180
+ filename?: string | null;
40181
+ id?: string;
40182
+ mutations?: import("../integrations/supabase/types").Json;
40183
+ skipped_rows?: number;
40184
+ total_rows?: number;
40185
+ updated_rows?: number;
40186
+ user_id: string;
40187
+ };
40188
+ Update: {
40189
+ connection_id?: string | null;
40190
+ created_at?: string;
40191
+ created_rows?: number;
40192
+ errors?: import("../integrations/supabase/types").Json;
40193
+ filename?: string | null;
40194
+ id?: string;
40195
+ mutations?: import("../integrations/supabase/types").Json;
40196
+ skipped_rows?: number;
40197
+ total_rows?: number;
40198
+ updated_rows?: number;
40199
+ user_id?: string;
40200
+ };
40201
+ Relationships: [];
40202
+ };
40203
+ stock_mutation_log: {
40204
+ Row: {
40205
+ connection_id: string | null;
40206
+ created_at: string;
40207
+ created_by: string | null;
40208
+ id: string;
40209
+ mutation_type: string;
40210
+ order_id: string | null;
40211
+ order_item_id: string | null;
40212
+ order_source: string | null;
40213
+ physical_after: number | null;
40214
+ physical_before: number | null;
40215
+ qty_delta: number;
40216
+ reason: string | null;
40217
+ reserved_after: number | null;
40218
+ reserved_before: number | null;
40219
+ trade_item_key: string;
40220
+ };
40221
+ Insert: {
40222
+ connection_id?: string | null;
40223
+ created_at?: string;
40224
+ created_by?: string | null;
40225
+ id?: string;
40226
+ mutation_type: string;
40227
+ order_id?: string | null;
40228
+ order_item_id?: string | null;
40229
+ order_source?: string | null;
40230
+ physical_after?: number | null;
40231
+ physical_before?: number | null;
40232
+ qty_delta: number;
40233
+ reason?: string | null;
40234
+ reserved_after?: number | null;
40235
+ reserved_before?: number | null;
40236
+ trade_item_key: string;
40237
+ };
40238
+ Update: {
40239
+ connection_id?: string | null;
40240
+ created_at?: string;
40241
+ created_by?: string | null;
40242
+ id?: string;
40243
+ mutation_type?: string;
40244
+ order_id?: string | null;
40245
+ order_item_id?: string | null;
40246
+ order_source?: string | null;
40247
+ physical_after?: number | null;
40248
+ physical_before?: number | null;
40249
+ qty_delta?: number;
40250
+ reason?: string | null;
40251
+ reserved_after?: number | null;
40252
+ reserved_before?: number | null;
40253
+ trade_item_key?: string;
40254
+ };
40255
+ Relationships: [];
40256
+ };
37170
40257
  supplier_products: {
37171
40258
  Row: {
37172
40259
  article_number: string | null;
@@ -38744,6 +41831,44 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
38744
41831
  };
38745
41832
  Relationships: [];
38746
41833
  };
41834
+ floriday_customer_discounts: {
41835
+ Row: {
41836
+ base_price: number | null;
41837
+ buyer_organization_id: string | null;
41838
+ currency: string | null;
41839
+ discount_type: string | null;
41840
+ discount_value: number | null;
41841
+ min_quantity: number | null;
41842
+ net_price: number | null;
41843
+ product_group_id: string | null;
41844
+ raw: import("../integrations/supabase/types").Json | null;
41845
+ source: string | null;
41846
+ source_id: string | null;
41847
+ trade_item_id: string | null;
41848
+ valid_from: string | null;
41849
+ valid_until: string | null;
41850
+ };
41851
+ Relationships: [];
41852
+ };
41853
+ local_customer_discounts: {
41854
+ Row: {
41855
+ base_price: number | null;
41856
+ currency: string | null;
41857
+ customer_id: string | null;
41858
+ discount_type: string | null;
41859
+ discount_value: number | null;
41860
+ min_quantity: number | null;
41861
+ net_price: number | null;
41862
+ product_category_id: string | null;
41863
+ product_id: string | null;
41864
+ product_name: string | null;
41865
+ source: string | null;
41866
+ source_id: string | null;
41867
+ valid_from: string | null;
41868
+ valid_until: string | null;
41869
+ };
41870
+ Relationships: [];
41871
+ };
38747
41872
  manufacture_product_possible_stock_view: {
38748
41873
  Row: {
38749
41874
  component_count: number | null;
@@ -39028,6 +42153,54 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
39028
42153
  };
39029
42154
  Returns: number;
39030
42155
  };
42156
+ afh_city_code: {
42157
+ Args: {
42158
+ _city: string;
42159
+ _country: string;
42160
+ };
42161
+ Returns: string;
42162
+ };
42163
+ afh_normalize_country: {
42164
+ Args: {
42165
+ _raw: string;
42166
+ };
42167
+ Returns: string;
42168
+ };
42169
+ afh_normalize_nl_province: {
42170
+ Args: {
42171
+ _raw: string;
42172
+ };
42173
+ Returns: string;
42174
+ };
42175
+ afh_subtract_workdays: {
42176
+ Args: {
42177
+ _date: string;
42178
+ _days: number;
42179
+ };
42180
+ Returns: string;
42181
+ };
42182
+ apply_stock_consumption: {
42183
+ Args: {
42184
+ p_order_id: string;
42185
+ p_order_item_id: string;
42186
+ p_qty: number;
42187
+ p_reason: string;
42188
+ p_source: string;
42189
+ p_trade_item_key: string;
42190
+ };
42191
+ Returns: undefined;
42192
+ };
42193
+ apply_stock_reservation: {
42194
+ Args: {
42195
+ p_order_id: string;
42196
+ p_order_item_id: string;
42197
+ p_qty: number;
42198
+ p_reason: string;
42199
+ p_source: string;
42200
+ p_trade_item_key: string;
42201
+ };
42202
+ Returns: undefined;
42203
+ };
39031
42204
  assign_cart_numbers: {
39032
42205
  Args: {
39033
42206
  p_carts: import("../integrations/supabase/types").Json;
@@ -39051,12 +42224,40 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
39051
42224
  order_number: string;
39052
42225
  }[];
39053
42226
  };
42227
+ backfill_open_order_reservations: {
42228
+ Args: never;
42229
+ Returns: {
42230
+ processed_items: number;
42231
+ }[];
42232
+ };
39054
42233
  call_exact_route: {
39055
42234
  Args: {
39056
42235
  path: string;
39057
42236
  };
39058
42237
  Returns: number;
39059
42238
  };
42239
+ check_offer_product_available_stock: {
42240
+ Args: {
42241
+ p_campaign_product_id: string;
42242
+ p_code: string;
42243
+ p_needed_qty?: number;
42244
+ p_product_name?: string;
42245
+ };
42246
+ Returns: import("../integrations/supabase/types").Json;
42247
+ };
42248
+ check_trade_item_available_stock: {
42249
+ Args: {
42250
+ p_connection_id?: string;
42251
+ p_context?: string;
42252
+ p_needed_qty?: number;
42253
+ p_order_id?: string;
42254
+ p_order_item_id?: string;
42255
+ p_owner_id?: string;
42256
+ p_product_name?: string;
42257
+ p_trade_item_key: string;
42258
+ };
42259
+ Returns: import("../integrations/supabase/types").Json;
42260
+ };
39060
42261
  cleanup_old_bookings: {
39061
42262
  Args: never;
39062
42263
  Returns: number;
@@ -39100,6 +42301,12 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
39100
42301
  table_name: string;
39101
42302
  }[];
39102
42303
  };
42304
+ dispatch_carrier_signups_sql: {
42305
+ Args: {
42306
+ _catchup?: string;
42307
+ };
42308
+ Returns: import("../integrations/supabase/types").Json;
42309
+ };
39103
42310
  email_auth_decrypt: {
39104
42311
  Args: {
39105
42312
  cipher: string;
@@ -39135,6 +42342,12 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
39135
42342
  status: string;
39136
42343
  }[];
39137
42344
  };
42345
+ ensure_trade_item_stock_row: {
42346
+ Args: {
42347
+ p_key: string;
42348
+ };
42349
+ Returns: undefined;
42350
+ };
39138
42351
  ensure_user_tenant: {
39139
42352
  Args: never;
39140
42353
  Returns: string;
@@ -39172,6 +42385,31 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
39172
42385
  };
39173
42386
  Returns: boolean;
39174
42387
  };
42388
+ find_trade_item_key: {
42389
+ Args: {
42390
+ p_barcode: string;
42391
+ p_name: string;
42392
+ p_product_id: string;
42393
+ };
42394
+ Returns: string;
42395
+ };
42396
+ floriday_effective_price: {
42397
+ Args: {
42398
+ _buyer_id: string;
42399
+ _on_date?: string;
42400
+ _quantity?: number;
42401
+ _trade_item_id: string;
42402
+ };
42403
+ Returns: {
42404
+ base_price: number;
42405
+ currency: string;
42406
+ discount_type: string;
42407
+ discount_value: number;
42408
+ net_price: number;
42409
+ source: string;
42410
+ source_id: string;
42411
+ }[];
42412
+ };
39175
42413
  format_cart_number: {
39176
42414
  Args: {
39177
42415
  p_pick_date: string;
@@ -39192,6 +42430,13 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
39192
42430
  preferred_warehouse_name: string;
39193
42431
  }[];
39194
42432
  };
42433
+ get_active_floriday_context: {
42434
+ Args: never;
42435
+ Returns: {
42436
+ connection_id: string;
42437
+ user_id: string;
42438
+ }[];
42439
+ };
39195
42440
  get_active_twinfield_public: {
39196
42441
  Args: never;
39197
42442
  Returns: {
@@ -39294,6 +42539,18 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
39294
42539
  };
39295
42540
  Returns: import("../integrations/supabase/types").Json;
39296
42541
  };
42542
+ get_offer_recipient_by_code: {
42543
+ Args: {
42544
+ p_code: string;
42545
+ };
42546
+ Returns: {
42547
+ campaign_id: string;
42548
+ clicked_at: string;
42549
+ customer_id: string;
42550
+ id: string;
42551
+ ordered_at: string;
42552
+ }[];
42553
+ };
39297
42554
  get_or_assign_floriday_order_number: {
39298
42555
  Args: {
39299
42556
  p_floriday_id: string;
@@ -39346,6 +42603,34 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
39346
42603
  Args: never;
39347
42604
  Returns: boolean;
39348
42605
  };
42606
+ local_effective_price: {
42607
+ Args: {
42608
+ _customer_id: string;
42609
+ _on_date?: string;
42610
+ _product_id: string;
42611
+ _quantity?: number;
42612
+ };
42613
+ Returns: {
42614
+ currency: string;
42615
+ discount_type: string;
42616
+ discount_value: number;
42617
+ net_price: number;
42618
+ source: string;
42619
+ source_id: string;
42620
+ }[];
42621
+ };
42622
+ mark_offer_clicked: {
42623
+ Args: {
42624
+ p_code: string;
42625
+ };
42626
+ Returns: undefined;
42627
+ };
42628
+ mark_offer_ordered: {
42629
+ Args: {
42630
+ p_code: string;
42631
+ };
42632
+ Returns: undefined;
42633
+ };
39349
42634
  next_order_number: {
39350
42635
  Args: {
39351
42636
  p_prefix: string;
@@ -39365,6 +42650,14 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
39365
42650
  };
39366
42651
  Returns: string;
39367
42652
  };
42653
+ offer_recipient_matches: {
42654
+ Args: {
42655
+ _campaign_id: string;
42656
+ _customer_id: string;
42657
+ _recipient_id: string;
42658
+ };
42659
+ Returns: boolean;
42660
+ };
39368
42661
  pickstation_get_orders_raw: {
39369
42662
  Args: never;
39370
42663
  Returns: import("../integrations/supabase/types").Json;
@@ -39392,6 +42685,13 @@ export declare const deleteCarrier: import("@tanstack/start-client-core").Requir
39392
42685
  };
39393
42686
  Returns: undefined;
39394
42687
  };
42688
+ promote_trade_item_key: {
42689
+ Args: {
42690
+ p_new: string;
42691
+ p_old: string;
42692
+ };
42693
+ Returns: undefined;
42694
+ };
39395
42695
  refresh_floricode_derived_code_lists: {
39396
42696
  Args: never;
39397
42697
  Returns: {
@@ -40437,6 +43737,7 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
40437
43737
  notes: string | null;
40438
43738
  performed_at: string;
40439
43739
  rescheduled_count: number;
43740
+ stock_consumed_at: string | null;
40440
43741
  total_carts: number;
40441
43742
  updated_at: string;
40442
43743
  user_id: string;
@@ -40450,6 +43751,7 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
40450
43751
  notes?: string | null;
40451
43752
  performed_at?: string;
40452
43753
  rescheduled_count?: number;
43754
+ stock_consumed_at?: string | null;
40453
43755
  total_carts?: number;
40454
43756
  updated_at?: string;
40455
43757
  user_id: string;
@@ -40463,6 +43765,7 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
40463
43765
  notes?: string | null;
40464
43766
  performed_at?: string;
40465
43767
  rescheduled_count?: number;
43768
+ stock_consumed_at?: string | null;
40466
43769
  total_carts?: number;
40467
43770
  updated_at?: string;
40468
43771
  user_id?: string;
@@ -43343,6 +46646,51 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
43343
46646
  referencedColumns: ["id"];
43344
46647
  }];
43345
46648
  };
46649
+ floriday_continuous_stock_queue: {
46650
+ Row: {
46651
+ attempts: number;
46652
+ connection_id: string;
46653
+ created_at: string;
46654
+ gateway_attempt_id: string | null;
46655
+ id: string;
46656
+ last_error: string | null;
46657
+ number_of_pieces: number;
46658
+ sent_at: string | null;
46659
+ status: string;
46660
+ trade_item_id: string;
46661
+ updated_at: string;
46662
+ user_id: string;
46663
+ };
46664
+ Insert: {
46665
+ attempts?: number;
46666
+ connection_id: string;
46667
+ created_at?: string;
46668
+ gateway_attempt_id?: string | null;
46669
+ id?: string;
46670
+ last_error?: string | null;
46671
+ number_of_pieces?: number;
46672
+ sent_at?: string | null;
46673
+ status?: string;
46674
+ trade_item_id: string;
46675
+ updated_at?: string;
46676
+ user_id: string;
46677
+ };
46678
+ Update: {
46679
+ attempts?: number;
46680
+ connection_id?: string;
46681
+ created_at?: string;
46682
+ gateway_attempt_id?: string | null;
46683
+ id?: string;
46684
+ last_error?: string | null;
46685
+ number_of_pieces?: number;
46686
+ sent_at?: string | null;
46687
+ status?: string;
46688
+ trade_item_id?: string;
46689
+ updated_at?: string;
46690
+ user_id?: string;
46691
+ };
46692
+ Relationships: [];
46693
+ };
43346
46694
  floriday_contract_trade_item_groups_cache: {
43347
46695
  Row: {
43348
46696
  connection_id: string;
@@ -44732,6 +48080,204 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
44732
48080
  };
44733
48081
  Relationships: [];
44734
48082
  };
48083
+ local_customer_agreements: {
48084
+ Row: {
48085
+ base_price: number | null;
48086
+ created_at: string;
48087
+ currency: string;
48088
+ customer_id: string;
48089
+ id: string;
48090
+ min_quantity: number;
48091
+ net_price: number;
48092
+ notes: string | null;
48093
+ product_category_id: string | null;
48094
+ product_id: string | null;
48095
+ updated_at: string;
48096
+ valid_from: string | null;
48097
+ valid_until: string | null;
48098
+ };
48099
+ Insert: {
48100
+ base_price?: number | null;
48101
+ created_at?: string;
48102
+ currency?: string;
48103
+ customer_id: string;
48104
+ id?: string;
48105
+ min_quantity?: number;
48106
+ net_price: number;
48107
+ notes?: string | null;
48108
+ product_category_id?: string | null;
48109
+ product_id?: string | null;
48110
+ updated_at?: string;
48111
+ valid_from?: string | null;
48112
+ valid_until?: string | null;
48113
+ };
48114
+ Update: {
48115
+ base_price?: number | null;
48116
+ created_at?: string;
48117
+ currency?: string;
48118
+ customer_id?: string;
48119
+ id?: string;
48120
+ min_quantity?: number;
48121
+ net_price?: number;
48122
+ notes?: string | null;
48123
+ product_category_id?: string | null;
48124
+ product_id?: string | null;
48125
+ updated_at?: string;
48126
+ valid_from?: string | null;
48127
+ valid_until?: string | null;
48128
+ };
48129
+ Relationships: [{
48130
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
48131
+ columns: ["customer_id"];
48132
+ isOneToOne: false;
48133
+ referencedRelation: "customers";
48134
+ referencedColumns: ["id"];
48135
+ }, {
48136
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
48137
+ columns: ["product_category_id"];
48138
+ isOneToOne: false;
48139
+ referencedRelation: "product_categories";
48140
+ referencedColumns: ["id"];
48141
+ }, {
48142
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
48143
+ columns: ["product_id"];
48144
+ isOneToOne: false;
48145
+ referencedRelation: "products";
48146
+ referencedColumns: ["id"];
48147
+ }];
48148
+ };
48149
+ local_customer_price_groups: {
48150
+ Row: {
48151
+ created_at: string;
48152
+ currency: string;
48153
+ customer_id: string;
48154
+ discount_type: string;
48155
+ discount_value: number;
48156
+ id: string;
48157
+ min_quantity: number;
48158
+ notes: string | null;
48159
+ product_category_id: string | null;
48160
+ product_id: string | null;
48161
+ updated_at: string;
48162
+ valid_from: string | null;
48163
+ valid_until: string | null;
48164
+ };
48165
+ Insert: {
48166
+ created_at?: string;
48167
+ currency?: string;
48168
+ customer_id: string;
48169
+ discount_type: string;
48170
+ discount_value: number;
48171
+ id?: string;
48172
+ min_quantity?: number;
48173
+ notes?: string | null;
48174
+ product_category_id?: string | null;
48175
+ product_id?: string | null;
48176
+ updated_at?: string;
48177
+ valid_from?: string | null;
48178
+ valid_until?: string | null;
48179
+ };
48180
+ Update: {
48181
+ created_at?: string;
48182
+ currency?: string;
48183
+ customer_id?: string;
48184
+ discount_type?: string;
48185
+ discount_value?: number;
48186
+ id?: string;
48187
+ min_quantity?: number;
48188
+ notes?: string | null;
48189
+ product_category_id?: string | null;
48190
+ product_id?: string | null;
48191
+ updated_at?: string;
48192
+ valid_from?: string | null;
48193
+ valid_until?: string | null;
48194
+ };
48195
+ Relationships: [{
48196
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
48197
+ columns: ["customer_id"];
48198
+ isOneToOne: false;
48199
+ referencedRelation: "customers";
48200
+ referencedColumns: ["id"];
48201
+ }, {
48202
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
48203
+ columns: ["product_category_id"];
48204
+ isOneToOne: false;
48205
+ referencedRelation: "product_categories";
48206
+ referencedColumns: ["id"];
48207
+ }, {
48208
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
48209
+ columns: ["product_id"];
48210
+ isOneToOne: false;
48211
+ referencedRelation: "products";
48212
+ referencedColumns: ["id"];
48213
+ }];
48214
+ };
48215
+ local_customer_sales_strategies: {
48216
+ Row: {
48217
+ created_at: string;
48218
+ currency: string;
48219
+ customer_id: string;
48220
+ discount_type: string;
48221
+ discount_value: number;
48222
+ id: string;
48223
+ min_quantity: number;
48224
+ notes: string | null;
48225
+ product_category_id: string | null;
48226
+ product_id: string | null;
48227
+ updated_at: string;
48228
+ valid_from: string | null;
48229
+ valid_until: string | null;
48230
+ };
48231
+ Insert: {
48232
+ created_at?: string;
48233
+ currency?: string;
48234
+ customer_id: string;
48235
+ discount_type: string;
48236
+ discount_value: number;
48237
+ id?: string;
48238
+ min_quantity?: number;
48239
+ notes?: string | null;
48240
+ product_category_id?: string | null;
48241
+ product_id?: string | null;
48242
+ updated_at?: string;
48243
+ valid_from?: string | null;
48244
+ valid_until?: string | null;
48245
+ };
48246
+ Update: {
48247
+ created_at?: string;
48248
+ currency?: string;
48249
+ customer_id?: string;
48250
+ discount_type?: string;
48251
+ discount_value?: number;
48252
+ id?: string;
48253
+ min_quantity?: number;
48254
+ notes?: string | null;
48255
+ product_category_id?: string | null;
48256
+ product_id?: string | null;
48257
+ updated_at?: string;
48258
+ valid_from?: string | null;
48259
+ valid_until?: string | null;
48260
+ };
48261
+ Relationships: [{
48262
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
48263
+ columns: ["customer_id"];
48264
+ isOneToOne: false;
48265
+ referencedRelation: "customers";
48266
+ referencedColumns: ["id"];
48267
+ }, {
48268
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
48269
+ columns: ["product_category_id"];
48270
+ isOneToOne: false;
48271
+ referencedRelation: "product_categories";
48272
+ referencedColumns: ["id"];
48273
+ }, {
48274
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
48275
+ columns: ["product_id"];
48276
+ isOneToOne: false;
48277
+ referencedRelation: "products";
48278
+ referencedColumns: ["id"];
48279
+ }];
48280
+ };
44735
48281
  locations: {
44736
48282
  Row: {
44737
48283
  created_at: string;
@@ -45239,6 +48785,273 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
45239
48785
  referencedColumns: ["id"];
45240
48786
  }];
45241
48787
  };
48788
+ nmbrs_component_mapping: {
48789
+ Row: {
48790
+ created_at: string;
48791
+ id: string;
48792
+ source_kind: string;
48793
+ source_value: string | null;
48794
+ updated_at: string;
48795
+ wage_code: string;
48796
+ };
48797
+ Insert: {
48798
+ created_at?: string;
48799
+ id?: string;
48800
+ source_kind: string;
48801
+ source_value?: string | null;
48802
+ updated_at?: string;
48803
+ wage_code: string;
48804
+ };
48805
+ Update: {
48806
+ created_at?: string;
48807
+ id?: string;
48808
+ source_kind?: string;
48809
+ source_value?: string | null;
48810
+ updated_at?: string;
48811
+ wage_code?: string;
48812
+ };
48813
+ Relationships: [{
48814
+ foreignKeyName: "nmbrs_component_mapping_wage_code_fkey";
48815
+ columns: ["wage_code"];
48816
+ isOneToOne: false;
48817
+ referencedRelation: "nmbrs_wage_components";
48818
+ referencedColumns: ["code"];
48819
+ }];
48820
+ };
48821
+ nmbrs_employee_mapping: {
48822
+ Row: {
48823
+ active_from: string | null;
48824
+ active_to: string | null;
48825
+ contract_hours_per_week: number | null;
48826
+ created_at: string;
48827
+ hourly_wage: number | null;
48828
+ id: string;
48829
+ monteur_id: string;
48830
+ nmbrs_company_code: string | null;
48831
+ nmbrs_employee_number: string;
48832
+ updated_at: string;
48833
+ };
48834
+ Insert: {
48835
+ active_from?: string | null;
48836
+ active_to?: string | null;
48837
+ contract_hours_per_week?: number | null;
48838
+ created_at?: string;
48839
+ hourly_wage?: number | null;
48840
+ id?: string;
48841
+ monteur_id: string;
48842
+ nmbrs_company_code?: string | null;
48843
+ nmbrs_employee_number: string;
48844
+ updated_at?: string;
48845
+ };
48846
+ Update: {
48847
+ active_from?: string | null;
48848
+ active_to?: string | null;
48849
+ contract_hours_per_week?: number | null;
48850
+ created_at?: string;
48851
+ hourly_wage?: number | null;
48852
+ id?: string;
48853
+ monteur_id?: string;
48854
+ nmbrs_company_code?: string | null;
48855
+ nmbrs_employee_number?: string;
48856
+ updated_at?: string;
48857
+ };
48858
+ Relationships: [{
48859
+ foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
48860
+ columns: ["monteur_id"];
48861
+ isOneToOne: true;
48862
+ referencedRelation: "monteurs";
48863
+ referencedColumns: ["id"];
48864
+ }];
48865
+ };
48866
+ nmbrs_export_lines: {
48867
+ Row: {
48868
+ amount: number;
48869
+ created_at: string;
48870
+ entry_date: string;
48871
+ hours: number;
48872
+ id: string;
48873
+ monteur_id: string;
48874
+ nmbrs_employee_number: string | null;
48875
+ notes: string | null;
48876
+ run_id: string;
48877
+ source_kind: string | null;
48878
+ source_ref_id: string | null;
48879
+ updated_at: string;
48880
+ wage_code: string;
48881
+ };
48882
+ Insert: {
48883
+ amount?: number;
48884
+ created_at?: string;
48885
+ entry_date: string;
48886
+ hours?: number;
48887
+ id?: string;
48888
+ monteur_id: string;
48889
+ nmbrs_employee_number?: string | null;
48890
+ notes?: string | null;
48891
+ run_id: string;
48892
+ source_kind?: string | null;
48893
+ source_ref_id?: string | null;
48894
+ updated_at?: string;
48895
+ wage_code: string;
48896
+ };
48897
+ Update: {
48898
+ amount?: number;
48899
+ created_at?: string;
48900
+ entry_date?: string;
48901
+ hours?: number;
48902
+ id?: string;
48903
+ monteur_id?: string;
48904
+ nmbrs_employee_number?: string | null;
48905
+ notes?: string | null;
48906
+ run_id?: string;
48907
+ source_kind?: string | null;
48908
+ source_ref_id?: string | null;
48909
+ updated_at?: string;
48910
+ wage_code?: string;
48911
+ };
48912
+ Relationships: [{
48913
+ foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
48914
+ columns: ["monteur_id"];
48915
+ isOneToOne: false;
48916
+ referencedRelation: "monteurs";
48917
+ referencedColumns: ["id"];
48918
+ }, {
48919
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
48920
+ columns: ["run_id"];
48921
+ isOneToOne: false;
48922
+ referencedRelation: "nmbrs_export_runs";
48923
+ referencedColumns: ["id"];
48924
+ }, {
48925
+ foreignKeyName: "nmbrs_export_lines_wage_code_fkey";
48926
+ columns: ["wage_code"];
48927
+ isOneToOne: false;
48928
+ referencedRelation: "nmbrs_wage_components";
48929
+ referencedColumns: ["code"];
48930
+ }];
48931
+ };
48932
+ nmbrs_export_runs: {
48933
+ Row: {
48934
+ created_at: string;
48935
+ file_name: string | null;
48936
+ generated_at: string;
48937
+ generated_by: string | null;
48938
+ id: string;
48939
+ notes: string | null;
48940
+ period_end: string;
48941
+ period_label: string;
48942
+ period_start: string;
48943
+ status: string;
48944
+ total_hours: number;
48945
+ total_lines: number;
48946
+ updated_at: string;
48947
+ };
48948
+ Insert: {
48949
+ created_at?: string;
48950
+ file_name?: string | null;
48951
+ generated_at?: string;
48952
+ generated_by?: string | null;
48953
+ id?: string;
48954
+ notes?: string | null;
48955
+ period_end: string;
48956
+ period_label: string;
48957
+ period_start: string;
48958
+ status?: string;
48959
+ total_hours?: number;
48960
+ total_lines?: number;
48961
+ updated_at?: string;
48962
+ };
48963
+ Update: {
48964
+ created_at?: string;
48965
+ file_name?: string | null;
48966
+ generated_at?: string;
48967
+ generated_by?: string | null;
48968
+ id?: string;
48969
+ notes?: string | null;
48970
+ period_end?: string;
48971
+ period_label?: string;
48972
+ period_start?: string;
48973
+ status?: string;
48974
+ total_hours?: number;
48975
+ total_lines?: number;
48976
+ updated_at?: string;
48977
+ };
48978
+ Relationships: [];
48979
+ };
48980
+ nmbrs_settings: {
48981
+ Row: {
48982
+ created_at: string;
48983
+ default_company_code: string | null;
48984
+ id: boolean;
48985
+ include_travel: boolean;
48986
+ overtime_threshold_daily: number;
48987
+ overtime_threshold_weekly: number;
48988
+ period_type: string;
48989
+ updated_at: string;
48990
+ updated_by: string | null;
48991
+ week_start_day: number;
48992
+ };
48993
+ Insert: {
48994
+ created_at?: string;
48995
+ default_company_code?: string | null;
48996
+ id?: boolean;
48997
+ include_travel?: boolean;
48998
+ overtime_threshold_daily?: number;
48999
+ overtime_threshold_weekly?: number;
49000
+ period_type?: string;
49001
+ updated_at?: string;
49002
+ updated_by?: string | null;
49003
+ week_start_day?: number;
49004
+ };
49005
+ Update: {
49006
+ created_at?: string;
49007
+ default_company_code?: string | null;
49008
+ id?: boolean;
49009
+ include_travel?: boolean;
49010
+ overtime_threshold_daily?: number;
49011
+ overtime_threshold_weekly?: number;
49012
+ period_type?: string;
49013
+ updated_at?: string;
49014
+ updated_by?: string | null;
49015
+ week_start_day?: number;
49016
+ };
49017
+ Relationships: [];
49018
+ };
49019
+ nmbrs_wage_components: {
49020
+ Row: {
49021
+ category: string;
49022
+ code: string;
49023
+ created_at: string;
49024
+ id: string;
49025
+ is_active: boolean;
49026
+ label: string;
49027
+ sort_order: number;
49028
+ unit: string;
49029
+ updated_at: string;
49030
+ };
49031
+ Insert: {
49032
+ category: string;
49033
+ code: string;
49034
+ created_at?: string;
49035
+ id?: string;
49036
+ is_active?: boolean;
49037
+ label: string;
49038
+ sort_order?: number;
49039
+ unit: string;
49040
+ updated_at?: string;
49041
+ };
49042
+ Update: {
49043
+ category?: string;
49044
+ code?: string;
49045
+ created_at?: string;
49046
+ id?: string;
49047
+ is_active?: boolean;
49048
+ label?: string;
49049
+ sort_order?: number;
49050
+ unit?: string;
49051
+ updated_at?: string;
49052
+ };
49053
+ Relationships: [];
49054
+ };
45242
49055
  notifications: {
45243
49056
  Row: {
45244
49057
  created_at: string;
@@ -46221,6 +50034,7 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
46221
50034
  purchase_price: number | null;
46222
50035
  quantity: number;
46223
50036
  sale_price: number | null;
50037
+ trade_item_key: string | null;
46224
50038
  unit: string;
46225
50039
  updated_at: string;
46226
50040
  weight: string | null;
@@ -46243,6 +50057,7 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
46243
50057
  purchase_price?: number | null;
46244
50058
  quantity?: number;
46245
50059
  sale_price?: number | null;
50060
+ trade_item_key?: string | null;
46246
50061
  unit?: string;
46247
50062
  updated_at?: string;
46248
50063
  weight?: string | null;
@@ -46265,6 +50080,7 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
46265
50080
  purchase_price?: number | null;
46266
50081
  quantity?: number;
46267
50082
  sale_price?: number | null;
50083
+ trade_item_key?: string | null;
46268
50084
  unit?: string;
46269
50085
  updated_at?: string;
46270
50086
  weight?: string | null;
@@ -47084,6 +50900,102 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
47084
50900
  };
47085
50901
  Relationships: [];
47086
50902
  };
50903
+ stock_import_runs: {
50904
+ Row: {
50905
+ connection_id: string | null;
50906
+ created_at: string;
50907
+ created_rows: number;
50908
+ errors: import("../integrations/supabase/types").Json;
50909
+ filename: string | null;
50910
+ id: string;
50911
+ mutations: import("../integrations/supabase/types").Json;
50912
+ skipped_rows: number;
50913
+ total_rows: number;
50914
+ updated_rows: number;
50915
+ user_id: string;
50916
+ };
50917
+ Insert: {
50918
+ connection_id?: string | null;
50919
+ created_at?: string;
50920
+ created_rows?: number;
50921
+ errors?: import("../integrations/supabase/types").Json;
50922
+ filename?: string | null;
50923
+ id?: string;
50924
+ mutations?: import("../integrations/supabase/types").Json;
50925
+ skipped_rows?: number;
50926
+ total_rows?: number;
50927
+ updated_rows?: number;
50928
+ user_id: string;
50929
+ };
50930
+ Update: {
50931
+ connection_id?: string | null;
50932
+ created_at?: string;
50933
+ created_rows?: number;
50934
+ errors?: import("../integrations/supabase/types").Json;
50935
+ filename?: string | null;
50936
+ id?: string;
50937
+ mutations?: import("../integrations/supabase/types").Json;
50938
+ skipped_rows?: number;
50939
+ total_rows?: number;
50940
+ updated_rows?: number;
50941
+ user_id?: string;
50942
+ };
50943
+ Relationships: [];
50944
+ };
50945
+ stock_mutation_log: {
50946
+ Row: {
50947
+ connection_id: string | null;
50948
+ created_at: string;
50949
+ created_by: string | null;
50950
+ id: string;
50951
+ mutation_type: string;
50952
+ order_id: string | null;
50953
+ order_item_id: string | null;
50954
+ order_source: string | null;
50955
+ physical_after: number | null;
50956
+ physical_before: number | null;
50957
+ qty_delta: number;
50958
+ reason: string | null;
50959
+ reserved_after: number | null;
50960
+ reserved_before: number | null;
50961
+ trade_item_key: string;
50962
+ };
50963
+ Insert: {
50964
+ connection_id?: string | null;
50965
+ created_at?: string;
50966
+ created_by?: string | null;
50967
+ id?: string;
50968
+ mutation_type: string;
50969
+ order_id?: string | null;
50970
+ order_item_id?: string | null;
50971
+ order_source?: string | null;
50972
+ physical_after?: number | null;
50973
+ physical_before?: number | null;
50974
+ qty_delta: number;
50975
+ reason?: string | null;
50976
+ reserved_after?: number | null;
50977
+ reserved_before?: number | null;
50978
+ trade_item_key: string;
50979
+ };
50980
+ Update: {
50981
+ connection_id?: string | null;
50982
+ created_at?: string;
50983
+ created_by?: string | null;
50984
+ id?: string;
50985
+ mutation_type?: string;
50986
+ order_id?: string | null;
50987
+ order_item_id?: string | null;
50988
+ order_source?: string | null;
50989
+ physical_after?: number | null;
50990
+ physical_before?: number | null;
50991
+ qty_delta?: number;
50992
+ reason?: string | null;
50993
+ reserved_after?: number | null;
50994
+ reserved_before?: number | null;
50995
+ trade_item_key?: string;
50996
+ };
50997
+ Relationships: [];
50998
+ };
47087
50999
  supplier_products: {
47088
51000
  Row: {
47089
51001
  article_number: string | null;
@@ -48661,6 +52573,44 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
48661
52573
  };
48662
52574
  Relationships: [];
48663
52575
  };
52576
+ floriday_customer_discounts: {
52577
+ Row: {
52578
+ base_price: number | null;
52579
+ buyer_organization_id: string | null;
52580
+ currency: string | null;
52581
+ discount_type: string | null;
52582
+ discount_value: number | null;
52583
+ min_quantity: number | null;
52584
+ net_price: number | null;
52585
+ product_group_id: string | null;
52586
+ raw: import("../integrations/supabase/types").Json | null;
52587
+ source: string | null;
52588
+ source_id: string | null;
52589
+ trade_item_id: string | null;
52590
+ valid_from: string | null;
52591
+ valid_until: string | null;
52592
+ };
52593
+ Relationships: [];
52594
+ };
52595
+ local_customer_discounts: {
52596
+ Row: {
52597
+ base_price: number | null;
52598
+ currency: string | null;
52599
+ customer_id: string | null;
52600
+ discount_type: string | null;
52601
+ discount_value: number | null;
52602
+ min_quantity: number | null;
52603
+ net_price: number | null;
52604
+ product_category_id: string | null;
52605
+ product_id: string | null;
52606
+ product_name: string | null;
52607
+ source: string | null;
52608
+ source_id: string | null;
52609
+ valid_from: string | null;
52610
+ valid_until: string | null;
52611
+ };
52612
+ Relationships: [];
52613
+ };
48664
52614
  manufacture_product_possible_stock_view: {
48665
52615
  Row: {
48666
52616
  component_count: number | null;
@@ -48945,6 +52895,54 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
48945
52895
  };
48946
52896
  Returns: number;
48947
52897
  };
52898
+ afh_city_code: {
52899
+ Args: {
52900
+ _city: string;
52901
+ _country: string;
52902
+ };
52903
+ Returns: string;
52904
+ };
52905
+ afh_normalize_country: {
52906
+ Args: {
52907
+ _raw: string;
52908
+ };
52909
+ Returns: string;
52910
+ };
52911
+ afh_normalize_nl_province: {
52912
+ Args: {
52913
+ _raw: string;
52914
+ };
52915
+ Returns: string;
52916
+ };
52917
+ afh_subtract_workdays: {
52918
+ Args: {
52919
+ _date: string;
52920
+ _days: number;
52921
+ };
52922
+ Returns: string;
52923
+ };
52924
+ apply_stock_consumption: {
52925
+ Args: {
52926
+ p_order_id: string;
52927
+ p_order_item_id: string;
52928
+ p_qty: number;
52929
+ p_reason: string;
52930
+ p_source: string;
52931
+ p_trade_item_key: string;
52932
+ };
52933
+ Returns: undefined;
52934
+ };
52935
+ apply_stock_reservation: {
52936
+ Args: {
52937
+ p_order_id: string;
52938
+ p_order_item_id: string;
52939
+ p_qty: number;
52940
+ p_reason: string;
52941
+ p_source: string;
52942
+ p_trade_item_key: string;
52943
+ };
52944
+ Returns: undefined;
52945
+ };
48948
52946
  assign_cart_numbers: {
48949
52947
  Args: {
48950
52948
  p_carts: import("../integrations/supabase/types").Json;
@@ -48968,12 +52966,40 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
48968
52966
  order_number: string;
48969
52967
  }[];
48970
52968
  };
52969
+ backfill_open_order_reservations: {
52970
+ Args: never;
52971
+ Returns: {
52972
+ processed_items: number;
52973
+ }[];
52974
+ };
48971
52975
  call_exact_route: {
48972
52976
  Args: {
48973
52977
  path: string;
48974
52978
  };
48975
52979
  Returns: number;
48976
52980
  };
52981
+ check_offer_product_available_stock: {
52982
+ Args: {
52983
+ p_campaign_product_id: string;
52984
+ p_code: string;
52985
+ p_needed_qty?: number;
52986
+ p_product_name?: string;
52987
+ };
52988
+ Returns: import("../integrations/supabase/types").Json;
52989
+ };
52990
+ check_trade_item_available_stock: {
52991
+ Args: {
52992
+ p_connection_id?: string;
52993
+ p_context?: string;
52994
+ p_needed_qty?: number;
52995
+ p_order_id?: string;
52996
+ p_order_item_id?: string;
52997
+ p_owner_id?: string;
52998
+ p_product_name?: string;
52999
+ p_trade_item_key: string;
53000
+ };
53001
+ Returns: import("../integrations/supabase/types").Json;
53002
+ };
48977
53003
  cleanup_old_bookings: {
48978
53004
  Args: never;
48979
53005
  Returns: number;
@@ -49017,6 +53043,12 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
49017
53043
  table_name: string;
49018
53044
  }[];
49019
53045
  };
53046
+ dispatch_carrier_signups_sql: {
53047
+ Args: {
53048
+ _catchup?: string;
53049
+ };
53050
+ Returns: import("../integrations/supabase/types").Json;
53051
+ };
49020
53052
  email_auth_decrypt: {
49021
53053
  Args: {
49022
53054
  cipher: string;
@@ -49052,6 +53084,12 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
49052
53084
  status: string;
49053
53085
  }[];
49054
53086
  };
53087
+ ensure_trade_item_stock_row: {
53088
+ Args: {
53089
+ p_key: string;
53090
+ };
53091
+ Returns: undefined;
53092
+ };
49055
53093
  ensure_user_tenant: {
49056
53094
  Args: never;
49057
53095
  Returns: string;
@@ -49089,6 +53127,31 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
49089
53127
  };
49090
53128
  Returns: boolean;
49091
53129
  };
53130
+ find_trade_item_key: {
53131
+ Args: {
53132
+ p_barcode: string;
53133
+ p_name: string;
53134
+ p_product_id: string;
53135
+ };
53136
+ Returns: string;
53137
+ };
53138
+ floriday_effective_price: {
53139
+ Args: {
53140
+ _buyer_id: string;
53141
+ _on_date?: string;
53142
+ _quantity?: number;
53143
+ _trade_item_id: string;
53144
+ };
53145
+ Returns: {
53146
+ base_price: number;
53147
+ currency: string;
53148
+ discount_type: string;
53149
+ discount_value: number;
53150
+ net_price: number;
53151
+ source: string;
53152
+ source_id: string;
53153
+ }[];
53154
+ };
49092
53155
  format_cart_number: {
49093
53156
  Args: {
49094
53157
  p_pick_date: string;
@@ -49109,6 +53172,13 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
49109
53172
  preferred_warehouse_name: string;
49110
53173
  }[];
49111
53174
  };
53175
+ get_active_floriday_context: {
53176
+ Args: never;
53177
+ Returns: {
53178
+ connection_id: string;
53179
+ user_id: string;
53180
+ }[];
53181
+ };
49112
53182
  get_active_twinfield_public: {
49113
53183
  Args: never;
49114
53184
  Returns: {
@@ -49211,6 +53281,18 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
49211
53281
  };
49212
53282
  Returns: import("../integrations/supabase/types").Json;
49213
53283
  };
53284
+ get_offer_recipient_by_code: {
53285
+ Args: {
53286
+ p_code: string;
53287
+ };
53288
+ Returns: {
53289
+ campaign_id: string;
53290
+ clicked_at: string;
53291
+ customer_id: string;
53292
+ id: string;
53293
+ ordered_at: string;
53294
+ }[];
53295
+ };
49214
53296
  get_or_assign_floriday_order_number: {
49215
53297
  Args: {
49216
53298
  p_floriday_id: string;
@@ -49263,6 +53345,34 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
49263
53345
  Args: never;
49264
53346
  Returns: boolean;
49265
53347
  };
53348
+ local_effective_price: {
53349
+ Args: {
53350
+ _customer_id: string;
53351
+ _on_date?: string;
53352
+ _product_id: string;
53353
+ _quantity?: number;
53354
+ };
53355
+ Returns: {
53356
+ currency: string;
53357
+ discount_type: string;
53358
+ discount_value: number;
53359
+ net_price: number;
53360
+ source: string;
53361
+ source_id: string;
53362
+ }[];
53363
+ };
53364
+ mark_offer_clicked: {
53365
+ Args: {
53366
+ p_code: string;
53367
+ };
53368
+ Returns: undefined;
53369
+ };
53370
+ mark_offer_ordered: {
53371
+ Args: {
53372
+ p_code: string;
53373
+ };
53374
+ Returns: undefined;
53375
+ };
49266
53376
  next_order_number: {
49267
53377
  Args: {
49268
53378
  p_prefix: string;
@@ -49282,6 +53392,14 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
49282
53392
  };
49283
53393
  Returns: string;
49284
53394
  };
53395
+ offer_recipient_matches: {
53396
+ Args: {
53397
+ _campaign_id: string;
53398
+ _customer_id: string;
53399
+ _recipient_id: string;
53400
+ };
53401
+ Returns: boolean;
53402
+ };
49285
53403
  pickstation_get_orders_raw: {
49286
53404
  Args: never;
49287
53405
  Returns: import("../integrations/supabase/types").Json;
@@ -49309,6 +53427,13 @@ export declare const reorderCarriers: import("@tanstack/start-client-core").Requ
49309
53427
  };
49310
53428
  Returns: undefined;
49311
53429
  };
53430
+ promote_trade_item_key: {
53431
+ Args: {
53432
+ p_new: string;
53433
+ p_old: string;
53434
+ };
53435
+ Returns: undefined;
53436
+ };
49312
53437
  refresh_floricode_derived_code_lists: {
49313
53438
  Args: never;
49314
53439
  Returns: {