@flowselections/floriday-afhandeling-module 1.0.12 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) 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/pickstation/KioskControle.d.ts +2 -0
  4. package/dist-lib/components/pickstation/KioskControle.d.ts.map +1 -0
  5. package/dist-lib/components/pickstation/KioskControle.js +7 -0
  6. package/dist-lib/components/pickstation/PickstationPage.d.ts +2 -0
  7. package/dist-lib/components/pickstation/PickstationPage.d.ts.map +1 -0
  8. package/dist-lib/components/pickstation/PickstationPage.js +217 -0
  9. package/dist-lib/index.d.ts +2 -0
  10. package/dist-lib/index.d.ts.map +1 -1
  11. package/dist-lib/index.js +2 -0
  12. package/dist-lib/integrations/supabase/auth-middleware.d.ts +700 -1
  13. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  14. package/dist-lib/integrations/supabase/client.d.ts +700 -1
  15. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  16. package/dist-lib/integrations/supabase/client.server.d.ts +700 -1
  17. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  18. package/dist-lib/integrations/supabase/types.d.ts +720 -1
  19. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  20. package/dist-lib/lib/afhandelingSettings.functions.d.ts +1545 -147
  21. package/dist-lib/lib/afhandelingSettings.functions.d.ts.map +1 -1
  22. package/dist-lib/lib/carriers.functions.d.ts +3500 -5
  23. package/dist-lib/lib/carriers.functions.d.ts.map +1 -1
  24. package/dist-lib/lib/cartAssignments.functions.d.ts +3500 -5
  25. package/dist-lib/lib/cartAssignments.functions.d.ts.map +1 -1
  26. package/dist-lib/lib/cartControl.functions.d.ts +7003 -10
  27. package/dist-lib/lib/cartControl.functions.d.ts.map +1 -1
  28. package/dist-lib/lib/cartControl.functions.js +3 -0
  29. package/dist-lib/lib/floriday.functions.d.ts +700 -1
  30. package/dist-lib/lib/floriday.functions.d.ts.map +1 -1
  31. package/dist-lib/lib/pickstationOrders.server.d.ts.map +1 -1
  32. package/dist-lib/lib/pickstationOrders.server.js +1 -0
  33. package/dist-lib/lib/pickstationTypes.d.ts +2 -0
  34. package/dist-lib/lib/pickstationTypes.d.ts.map +1 -1
  35. package/package.json +15 -1
@@ -3635,6 +3635,51 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
3635
3635
  referencedColumns: ["id"];
3636
3636
  }];
3637
3637
  };
3638
+ floriday_continuous_stock_queue: {
3639
+ Row: {
3640
+ attempts: number;
3641
+ connection_id: string;
3642
+ created_at: string;
3643
+ gateway_attempt_id: string | null;
3644
+ id: string;
3645
+ last_error: string | null;
3646
+ number_of_pieces: number;
3647
+ sent_at: string | null;
3648
+ status: string;
3649
+ trade_item_id: string;
3650
+ updated_at: string;
3651
+ user_id: string;
3652
+ };
3653
+ Insert: {
3654
+ attempts?: number;
3655
+ connection_id: string;
3656
+ created_at?: string;
3657
+ gateway_attempt_id?: string | null;
3658
+ id?: string;
3659
+ last_error?: string | null;
3660
+ number_of_pieces?: number;
3661
+ sent_at?: string | null;
3662
+ status?: string;
3663
+ trade_item_id: string;
3664
+ updated_at?: string;
3665
+ user_id: string;
3666
+ };
3667
+ Update: {
3668
+ attempts?: number;
3669
+ connection_id?: string;
3670
+ created_at?: string;
3671
+ gateway_attempt_id?: string | null;
3672
+ id?: string;
3673
+ last_error?: string | null;
3674
+ number_of_pieces?: number;
3675
+ sent_at?: string | null;
3676
+ status?: string;
3677
+ trade_item_id?: string;
3678
+ updated_at?: string;
3679
+ user_id?: string;
3680
+ };
3681
+ Relationships: [];
3682
+ };
3638
3683
  floriday_contract_trade_item_groups_cache: {
3639
3684
  Row: {
3640
3685
  connection_id: string;
@@ -5024,6 +5069,204 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
5024
5069
  };
5025
5070
  Relationships: [];
5026
5071
  };
5072
+ local_customer_agreements: {
5073
+ Row: {
5074
+ base_price: number | null;
5075
+ created_at: string;
5076
+ currency: string;
5077
+ customer_id: string;
5078
+ id: string;
5079
+ min_quantity: number;
5080
+ net_price: number;
5081
+ notes: string | null;
5082
+ product_category_id: string | null;
5083
+ product_id: string | null;
5084
+ updated_at: string;
5085
+ valid_from: string | null;
5086
+ valid_until: string | null;
5087
+ };
5088
+ Insert: {
5089
+ base_price?: number | null;
5090
+ created_at?: string;
5091
+ currency?: string;
5092
+ customer_id: string;
5093
+ id?: string;
5094
+ min_quantity?: number;
5095
+ net_price: number;
5096
+ notes?: string | null;
5097
+ product_category_id?: string | null;
5098
+ product_id?: string | null;
5099
+ updated_at?: string;
5100
+ valid_from?: string | null;
5101
+ valid_until?: string | null;
5102
+ };
5103
+ Update: {
5104
+ base_price?: number | null;
5105
+ created_at?: string;
5106
+ currency?: string;
5107
+ customer_id?: string;
5108
+ id?: string;
5109
+ min_quantity?: number;
5110
+ net_price?: number;
5111
+ notes?: string | null;
5112
+ product_category_id?: string | null;
5113
+ product_id?: string | null;
5114
+ updated_at?: string;
5115
+ valid_from?: string | null;
5116
+ valid_until?: string | null;
5117
+ };
5118
+ Relationships: [{
5119
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
5120
+ columns: ["customer_id"];
5121
+ isOneToOne: false;
5122
+ referencedRelation: "customers";
5123
+ referencedColumns: ["id"];
5124
+ }, {
5125
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
5126
+ columns: ["product_category_id"];
5127
+ isOneToOne: false;
5128
+ referencedRelation: "product_categories";
5129
+ referencedColumns: ["id"];
5130
+ }, {
5131
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
5132
+ columns: ["product_id"];
5133
+ isOneToOne: false;
5134
+ referencedRelation: "products";
5135
+ referencedColumns: ["id"];
5136
+ }];
5137
+ };
5138
+ local_customer_price_groups: {
5139
+ Row: {
5140
+ created_at: string;
5141
+ currency: string;
5142
+ customer_id: string;
5143
+ discount_type: string;
5144
+ discount_value: number;
5145
+ id: string;
5146
+ min_quantity: number;
5147
+ notes: string | null;
5148
+ product_category_id: string | null;
5149
+ product_id: string | null;
5150
+ updated_at: string;
5151
+ valid_from: string | null;
5152
+ valid_until: string | null;
5153
+ };
5154
+ Insert: {
5155
+ created_at?: string;
5156
+ currency?: string;
5157
+ customer_id: string;
5158
+ discount_type: string;
5159
+ discount_value: number;
5160
+ id?: string;
5161
+ min_quantity?: number;
5162
+ notes?: string | null;
5163
+ product_category_id?: string | null;
5164
+ product_id?: string | null;
5165
+ updated_at?: string;
5166
+ valid_from?: string | null;
5167
+ valid_until?: string | null;
5168
+ };
5169
+ Update: {
5170
+ created_at?: string;
5171
+ currency?: string;
5172
+ customer_id?: string;
5173
+ discount_type?: string;
5174
+ discount_value?: number;
5175
+ id?: string;
5176
+ min_quantity?: number;
5177
+ notes?: string | null;
5178
+ product_category_id?: string | null;
5179
+ product_id?: string | null;
5180
+ updated_at?: string;
5181
+ valid_from?: string | null;
5182
+ valid_until?: string | null;
5183
+ };
5184
+ Relationships: [{
5185
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
5186
+ columns: ["customer_id"];
5187
+ isOneToOne: false;
5188
+ referencedRelation: "customers";
5189
+ referencedColumns: ["id"];
5190
+ }, {
5191
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
5192
+ columns: ["product_category_id"];
5193
+ isOneToOne: false;
5194
+ referencedRelation: "product_categories";
5195
+ referencedColumns: ["id"];
5196
+ }, {
5197
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
5198
+ columns: ["product_id"];
5199
+ isOneToOne: false;
5200
+ referencedRelation: "products";
5201
+ referencedColumns: ["id"];
5202
+ }];
5203
+ };
5204
+ local_customer_sales_strategies: {
5205
+ Row: {
5206
+ created_at: string;
5207
+ currency: string;
5208
+ customer_id: string;
5209
+ discount_type: string;
5210
+ discount_value: number;
5211
+ id: string;
5212
+ min_quantity: number;
5213
+ notes: string | null;
5214
+ product_category_id: string | null;
5215
+ product_id: string | null;
5216
+ updated_at: string;
5217
+ valid_from: string | null;
5218
+ valid_until: string | null;
5219
+ };
5220
+ Insert: {
5221
+ created_at?: string;
5222
+ currency?: string;
5223
+ customer_id: string;
5224
+ discount_type: string;
5225
+ discount_value: number;
5226
+ id?: string;
5227
+ min_quantity?: number;
5228
+ notes?: string | null;
5229
+ product_category_id?: string | null;
5230
+ product_id?: string | null;
5231
+ updated_at?: string;
5232
+ valid_from?: string | null;
5233
+ valid_until?: string | null;
5234
+ };
5235
+ Update: {
5236
+ created_at?: string;
5237
+ currency?: string;
5238
+ customer_id?: string;
5239
+ discount_type?: string;
5240
+ discount_value?: number;
5241
+ id?: string;
5242
+ min_quantity?: number;
5243
+ notes?: string | null;
5244
+ product_category_id?: string | null;
5245
+ product_id?: string | null;
5246
+ updated_at?: string;
5247
+ valid_from?: string | null;
5248
+ valid_until?: string | null;
5249
+ };
5250
+ Relationships: [{
5251
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
5252
+ columns: ["customer_id"];
5253
+ isOneToOne: false;
5254
+ referencedRelation: "customers";
5255
+ referencedColumns: ["id"];
5256
+ }, {
5257
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
5258
+ columns: ["product_category_id"];
5259
+ isOneToOne: false;
5260
+ referencedRelation: "product_categories";
5261
+ referencedColumns: ["id"];
5262
+ }, {
5263
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
5264
+ columns: ["product_id"];
5265
+ isOneToOne: false;
5266
+ referencedRelation: "products";
5267
+ referencedColumns: ["id"];
5268
+ }];
5269
+ };
5027
5270
  locations: {
5028
5271
  Row: {
5029
5272
  created_at: string;
@@ -5531,6 +5774,273 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
5531
5774
  referencedColumns: ["id"];
5532
5775
  }];
5533
5776
  };
5777
+ nmbrs_component_mapping: {
5778
+ Row: {
5779
+ created_at: string;
5780
+ id: string;
5781
+ source_kind: string;
5782
+ source_value: string | null;
5783
+ updated_at: string;
5784
+ wage_code: string;
5785
+ };
5786
+ Insert: {
5787
+ created_at?: string;
5788
+ id?: string;
5789
+ source_kind: string;
5790
+ source_value?: string | null;
5791
+ updated_at?: string;
5792
+ wage_code: string;
5793
+ };
5794
+ Update: {
5795
+ created_at?: string;
5796
+ id?: string;
5797
+ source_kind?: string;
5798
+ source_value?: string | null;
5799
+ updated_at?: string;
5800
+ wage_code?: string;
5801
+ };
5802
+ Relationships: [{
5803
+ foreignKeyName: "nmbrs_component_mapping_wage_code_fkey";
5804
+ columns: ["wage_code"];
5805
+ isOneToOne: false;
5806
+ referencedRelation: "nmbrs_wage_components";
5807
+ referencedColumns: ["code"];
5808
+ }];
5809
+ };
5810
+ nmbrs_employee_mapping: {
5811
+ Row: {
5812
+ active_from: string | null;
5813
+ active_to: string | null;
5814
+ contract_hours_per_week: number | null;
5815
+ created_at: string;
5816
+ hourly_wage: number | null;
5817
+ id: string;
5818
+ monteur_id: string;
5819
+ nmbrs_company_code: string | null;
5820
+ nmbrs_employee_number: string;
5821
+ updated_at: string;
5822
+ };
5823
+ Insert: {
5824
+ active_from?: string | null;
5825
+ active_to?: string | null;
5826
+ contract_hours_per_week?: number | null;
5827
+ created_at?: string;
5828
+ hourly_wage?: number | null;
5829
+ id?: string;
5830
+ monteur_id: string;
5831
+ nmbrs_company_code?: string | null;
5832
+ nmbrs_employee_number: string;
5833
+ updated_at?: string;
5834
+ };
5835
+ Update: {
5836
+ active_from?: string | null;
5837
+ active_to?: string | null;
5838
+ contract_hours_per_week?: number | null;
5839
+ created_at?: string;
5840
+ hourly_wage?: number | null;
5841
+ id?: string;
5842
+ monteur_id?: string;
5843
+ nmbrs_company_code?: string | null;
5844
+ nmbrs_employee_number?: string;
5845
+ updated_at?: string;
5846
+ };
5847
+ Relationships: [{
5848
+ foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
5849
+ columns: ["monteur_id"];
5850
+ isOneToOne: true;
5851
+ referencedRelation: "monteurs";
5852
+ referencedColumns: ["id"];
5853
+ }];
5854
+ };
5855
+ nmbrs_export_lines: {
5856
+ Row: {
5857
+ amount: number;
5858
+ created_at: string;
5859
+ entry_date: string;
5860
+ hours: number;
5861
+ id: string;
5862
+ monteur_id: string;
5863
+ nmbrs_employee_number: string | null;
5864
+ notes: string | null;
5865
+ run_id: string;
5866
+ source_kind: string | null;
5867
+ source_ref_id: string | null;
5868
+ updated_at: string;
5869
+ wage_code: string;
5870
+ };
5871
+ Insert: {
5872
+ amount?: number;
5873
+ created_at?: string;
5874
+ entry_date: string;
5875
+ hours?: number;
5876
+ id?: string;
5877
+ monteur_id: string;
5878
+ nmbrs_employee_number?: string | null;
5879
+ notes?: string | null;
5880
+ run_id: string;
5881
+ source_kind?: string | null;
5882
+ source_ref_id?: string | null;
5883
+ updated_at?: string;
5884
+ wage_code: string;
5885
+ };
5886
+ Update: {
5887
+ amount?: number;
5888
+ created_at?: string;
5889
+ entry_date?: string;
5890
+ hours?: number;
5891
+ id?: string;
5892
+ monteur_id?: string;
5893
+ nmbrs_employee_number?: string | null;
5894
+ notes?: string | null;
5895
+ run_id?: string;
5896
+ source_kind?: string | null;
5897
+ source_ref_id?: string | null;
5898
+ updated_at?: string;
5899
+ wage_code?: string;
5900
+ };
5901
+ Relationships: [{
5902
+ foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
5903
+ columns: ["monteur_id"];
5904
+ isOneToOne: false;
5905
+ referencedRelation: "monteurs";
5906
+ referencedColumns: ["id"];
5907
+ }, {
5908
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
5909
+ columns: ["run_id"];
5910
+ isOneToOne: false;
5911
+ referencedRelation: "nmbrs_export_runs";
5912
+ referencedColumns: ["id"];
5913
+ }, {
5914
+ foreignKeyName: "nmbrs_export_lines_wage_code_fkey";
5915
+ columns: ["wage_code"];
5916
+ isOneToOne: false;
5917
+ referencedRelation: "nmbrs_wage_components";
5918
+ referencedColumns: ["code"];
5919
+ }];
5920
+ };
5921
+ nmbrs_export_runs: {
5922
+ Row: {
5923
+ created_at: string;
5924
+ file_name: string | null;
5925
+ generated_at: string;
5926
+ generated_by: string | null;
5927
+ id: string;
5928
+ notes: string | null;
5929
+ period_end: string;
5930
+ period_label: string;
5931
+ period_start: string;
5932
+ status: string;
5933
+ total_hours: number;
5934
+ total_lines: number;
5935
+ updated_at: string;
5936
+ };
5937
+ Insert: {
5938
+ created_at?: string;
5939
+ file_name?: string | null;
5940
+ generated_at?: string;
5941
+ generated_by?: string | null;
5942
+ id?: string;
5943
+ notes?: string | null;
5944
+ period_end: string;
5945
+ period_label: string;
5946
+ period_start: string;
5947
+ status?: string;
5948
+ total_hours?: number;
5949
+ total_lines?: number;
5950
+ updated_at?: string;
5951
+ };
5952
+ Update: {
5953
+ created_at?: string;
5954
+ file_name?: string | null;
5955
+ generated_at?: string;
5956
+ generated_by?: string | null;
5957
+ id?: string;
5958
+ notes?: string | null;
5959
+ period_end?: string;
5960
+ period_label?: string;
5961
+ period_start?: string;
5962
+ status?: string;
5963
+ total_hours?: number;
5964
+ total_lines?: number;
5965
+ updated_at?: string;
5966
+ };
5967
+ Relationships: [];
5968
+ };
5969
+ nmbrs_settings: {
5970
+ Row: {
5971
+ created_at: string;
5972
+ default_company_code: string | null;
5973
+ id: boolean;
5974
+ include_travel: boolean;
5975
+ overtime_threshold_daily: number;
5976
+ overtime_threshold_weekly: number;
5977
+ period_type: string;
5978
+ updated_at: string;
5979
+ updated_by: string | null;
5980
+ week_start_day: number;
5981
+ };
5982
+ Insert: {
5983
+ created_at?: string;
5984
+ default_company_code?: string | null;
5985
+ id?: boolean;
5986
+ include_travel?: boolean;
5987
+ overtime_threshold_daily?: number;
5988
+ overtime_threshold_weekly?: number;
5989
+ period_type?: string;
5990
+ updated_at?: string;
5991
+ updated_by?: string | null;
5992
+ week_start_day?: number;
5993
+ };
5994
+ Update: {
5995
+ created_at?: string;
5996
+ default_company_code?: string | null;
5997
+ id?: boolean;
5998
+ include_travel?: boolean;
5999
+ overtime_threshold_daily?: number;
6000
+ overtime_threshold_weekly?: number;
6001
+ period_type?: string;
6002
+ updated_at?: string;
6003
+ updated_by?: string | null;
6004
+ week_start_day?: number;
6005
+ };
6006
+ Relationships: [];
6007
+ };
6008
+ nmbrs_wage_components: {
6009
+ Row: {
6010
+ category: string;
6011
+ code: string;
6012
+ created_at: string;
6013
+ id: string;
6014
+ is_active: boolean;
6015
+ label: string;
6016
+ sort_order: number;
6017
+ unit: string;
6018
+ updated_at: string;
6019
+ };
6020
+ Insert: {
6021
+ category: string;
6022
+ code: string;
6023
+ created_at?: string;
6024
+ id?: string;
6025
+ is_active?: boolean;
6026
+ label: string;
6027
+ sort_order?: number;
6028
+ unit: string;
6029
+ updated_at?: string;
6030
+ };
6031
+ Update: {
6032
+ category?: string;
6033
+ code?: string;
6034
+ created_at?: string;
6035
+ id?: string;
6036
+ is_active?: boolean;
6037
+ label?: string;
6038
+ sort_order?: number;
6039
+ unit?: string;
6040
+ updated_at?: string;
6041
+ };
6042
+ Relationships: [];
6043
+ };
5534
6044
  notifications: {
5535
6045
  Row: {
5536
6046
  created_at: string;
@@ -7379,6 +7889,48 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
7379
7889
  };
7380
7890
  Relationships: [];
7381
7891
  };
7892
+ stock_import_runs: {
7893
+ Row: {
7894
+ connection_id: string | null;
7895
+ created_at: string;
7896
+ created_rows: number;
7897
+ errors: import("../integrations/supabase/types").Json;
7898
+ filename: string | null;
7899
+ id: string;
7900
+ mutations: import("../integrations/supabase/types").Json;
7901
+ skipped_rows: number;
7902
+ total_rows: number;
7903
+ updated_rows: number;
7904
+ user_id: string;
7905
+ };
7906
+ Insert: {
7907
+ connection_id?: string | null;
7908
+ created_at?: string;
7909
+ created_rows?: number;
7910
+ errors?: import("../integrations/supabase/types").Json;
7911
+ filename?: string | null;
7912
+ id?: string;
7913
+ mutations?: import("../integrations/supabase/types").Json;
7914
+ skipped_rows?: number;
7915
+ total_rows?: number;
7916
+ updated_rows?: number;
7917
+ user_id: string;
7918
+ };
7919
+ Update: {
7920
+ connection_id?: string | null;
7921
+ created_at?: string;
7922
+ created_rows?: number;
7923
+ errors?: import("../integrations/supabase/types").Json;
7924
+ filename?: string | null;
7925
+ id?: string;
7926
+ mutations?: import("../integrations/supabase/types").Json;
7927
+ skipped_rows?: number;
7928
+ total_rows?: number;
7929
+ updated_rows?: number;
7930
+ user_id?: string;
7931
+ };
7932
+ Relationships: [];
7933
+ };
7382
7934
  stock_mutation_log: {
7383
7935
  Row: {
7384
7936
  connection_id: string | null;
@@ -9010,6 +9562,44 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
9010
9562
  };
9011
9563
  Relationships: [];
9012
9564
  };
9565
+ floriday_customer_discounts: {
9566
+ Row: {
9567
+ base_price: number | null;
9568
+ buyer_organization_id: string | null;
9569
+ currency: string | null;
9570
+ discount_type: string | null;
9571
+ discount_value: number | null;
9572
+ min_quantity: number | null;
9573
+ net_price: number | null;
9574
+ product_group_id: string | null;
9575
+ raw: import("../integrations/supabase/types").Json | null;
9576
+ source: string | null;
9577
+ source_id: string | null;
9578
+ trade_item_id: string | null;
9579
+ valid_from: string | null;
9580
+ valid_until: string | null;
9581
+ };
9582
+ Relationships: [];
9583
+ };
9584
+ local_customer_discounts: {
9585
+ Row: {
9586
+ base_price: number | null;
9587
+ currency: string | null;
9588
+ customer_id: string | null;
9589
+ discount_type: string | null;
9590
+ discount_value: number | null;
9591
+ min_quantity: number | null;
9592
+ net_price: number | null;
9593
+ product_category_id: string | null;
9594
+ product_id: string | null;
9595
+ product_name: string | null;
9596
+ source: string | null;
9597
+ source_id: string | null;
9598
+ valid_from: string | null;
9599
+ valid_until: string | null;
9600
+ };
9601
+ Relationships: [];
9602
+ };
9013
9603
  manufacture_product_possible_stock_view: {
9014
9604
  Row: {
9015
9605
  component_count: number | null;
@@ -9377,6 +9967,28 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
9377
9967
  };
9378
9968
  Returns: number;
9379
9969
  };
9970
+ check_offer_product_available_stock: {
9971
+ Args: {
9972
+ p_campaign_product_id: string;
9973
+ p_code: string;
9974
+ p_needed_qty?: number;
9975
+ p_product_name?: string;
9976
+ };
9977
+ Returns: import("../integrations/supabase/types").Json;
9978
+ };
9979
+ check_trade_item_available_stock: {
9980
+ Args: {
9981
+ p_connection_id?: string;
9982
+ p_context?: string;
9983
+ p_needed_qty?: number;
9984
+ p_order_id?: string;
9985
+ p_order_item_id?: string;
9986
+ p_owner_id?: string;
9987
+ p_product_name?: string;
9988
+ p_trade_item_key: string;
9989
+ };
9990
+ Returns: import("../integrations/supabase/types").Json;
9991
+ };
9380
9992
  cleanup_old_bookings: {
9381
9993
  Args: never;
9382
9994
  Returns: number;
@@ -9461,6 +10073,12 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
9461
10073
  status: string;
9462
10074
  }[];
9463
10075
  };
10076
+ ensure_trade_item_stock_row: {
10077
+ Args: {
10078
+ p_key: string;
10079
+ };
10080
+ Returns: undefined;
10081
+ };
9464
10082
  ensure_user_tenant: {
9465
10083
  Args: never;
9466
10084
  Returns: string;
@@ -9498,12 +10116,31 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
9498
10116
  };
9499
10117
  Returns: boolean;
9500
10118
  };
9501
- find_trade_item_key_by_name: {
10119
+ find_trade_item_key: {
9502
10120
  Args: {
10121
+ p_barcode: string;
9503
10122
  p_name: string;
10123
+ p_product_id: string;
9504
10124
  };
9505
10125
  Returns: string;
9506
10126
  };
10127
+ floriday_effective_price: {
10128
+ Args: {
10129
+ _buyer_id: string;
10130
+ _on_date?: string;
10131
+ _quantity?: number;
10132
+ _trade_item_id: string;
10133
+ };
10134
+ Returns: {
10135
+ base_price: number;
10136
+ currency: string;
10137
+ discount_type: string;
10138
+ discount_value: number;
10139
+ net_price: number;
10140
+ source: string;
10141
+ source_id: string;
10142
+ }[];
10143
+ };
9507
10144
  format_cart_number: {
9508
10145
  Args: {
9509
10146
  p_pick_date: string;
@@ -9524,6 +10161,13 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
9524
10161
  preferred_warehouse_name: string;
9525
10162
  }[];
9526
10163
  };
10164
+ get_active_floriday_context: {
10165
+ Args: never;
10166
+ Returns: {
10167
+ connection_id: string;
10168
+ user_id: string;
10169
+ }[];
10170
+ };
9527
10171
  get_active_twinfield_public: {
9528
10172
  Args: never;
9529
10173
  Returns: {
@@ -9626,6 +10270,18 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
9626
10270
  };
9627
10271
  Returns: import("../integrations/supabase/types").Json;
9628
10272
  };
10273
+ get_offer_recipient_by_code: {
10274
+ Args: {
10275
+ p_code: string;
10276
+ };
10277
+ Returns: {
10278
+ campaign_id: string;
10279
+ clicked_at: string;
10280
+ customer_id: string;
10281
+ id: string;
10282
+ ordered_at: string;
10283
+ }[];
10284
+ };
9629
10285
  get_or_assign_floriday_order_number: {
9630
10286
  Args: {
9631
10287
  p_floriday_id: string;
@@ -9678,6 +10334,34 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
9678
10334
  Args: never;
9679
10335
  Returns: boolean;
9680
10336
  };
10337
+ local_effective_price: {
10338
+ Args: {
10339
+ _customer_id: string;
10340
+ _on_date?: string;
10341
+ _product_id: string;
10342
+ _quantity?: number;
10343
+ };
10344
+ Returns: {
10345
+ currency: string;
10346
+ discount_type: string;
10347
+ discount_value: number;
10348
+ net_price: number;
10349
+ source: string;
10350
+ source_id: string;
10351
+ }[];
10352
+ };
10353
+ mark_offer_clicked: {
10354
+ Args: {
10355
+ p_code: string;
10356
+ };
10357
+ Returns: undefined;
10358
+ };
10359
+ mark_offer_ordered: {
10360
+ Args: {
10361
+ p_code: string;
10362
+ };
10363
+ Returns: undefined;
10364
+ };
9681
10365
  next_order_number: {
9682
10366
  Args: {
9683
10367
  p_prefix: string;
@@ -9697,6 +10381,14 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
9697
10381
  };
9698
10382
  Returns: string;
9699
10383
  };
10384
+ offer_recipient_matches: {
10385
+ Args: {
10386
+ _campaign_id: string;
10387
+ _customer_id: string;
10388
+ _recipient_id: string;
10389
+ };
10390
+ Returns: boolean;
10391
+ };
9700
10392
  pickstation_get_orders_raw: {
9701
10393
  Args: never;
9702
10394
  Returns: import("../integrations/supabase/types").Json;
@@ -9724,6 +10416,13 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
9724
10416
  };
9725
10417
  Returns: undefined;
9726
10418
  };
10419
+ promote_trade_item_key: {
10420
+ Args: {
10421
+ p_new: string;
10422
+ p_old: string;
10423
+ };
10424
+ Returns: undefined;
10425
+ };
9727
10426
  refresh_floricode_derived_code_lists: {
9728
10427
  Args: never;
9729
10428
  Returns: {
@@ -13681,6 +14380,51 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
13681
14380
  referencedColumns: ["id"];
13682
14381
  }];
13683
14382
  };
14383
+ floriday_continuous_stock_queue: {
14384
+ Row: {
14385
+ attempts: number;
14386
+ connection_id: string;
14387
+ created_at: string;
14388
+ gateway_attempt_id: string | null;
14389
+ id: string;
14390
+ last_error: string | null;
14391
+ number_of_pieces: number;
14392
+ sent_at: string | null;
14393
+ status: string;
14394
+ trade_item_id: string;
14395
+ updated_at: string;
14396
+ user_id: string;
14397
+ };
14398
+ Insert: {
14399
+ attempts?: number;
14400
+ connection_id: string;
14401
+ created_at?: string;
14402
+ gateway_attempt_id?: string | null;
14403
+ id?: string;
14404
+ last_error?: string | null;
14405
+ number_of_pieces?: number;
14406
+ sent_at?: string | null;
14407
+ status?: string;
14408
+ trade_item_id: string;
14409
+ updated_at?: string;
14410
+ user_id: string;
14411
+ };
14412
+ Update: {
14413
+ attempts?: number;
14414
+ connection_id?: string;
14415
+ created_at?: string;
14416
+ gateway_attempt_id?: string | null;
14417
+ id?: string;
14418
+ last_error?: string | null;
14419
+ number_of_pieces?: number;
14420
+ sent_at?: string | null;
14421
+ status?: string;
14422
+ trade_item_id?: string;
14423
+ updated_at?: string;
14424
+ user_id?: string;
14425
+ };
14426
+ Relationships: [];
14427
+ };
13684
14428
  floriday_contract_trade_item_groups_cache: {
13685
14429
  Row: {
13686
14430
  connection_id: string;
@@ -15070,6 +15814,204 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
15070
15814
  };
15071
15815
  Relationships: [];
15072
15816
  };
15817
+ local_customer_agreements: {
15818
+ Row: {
15819
+ base_price: number | null;
15820
+ created_at: string;
15821
+ currency: string;
15822
+ customer_id: string;
15823
+ id: string;
15824
+ min_quantity: number;
15825
+ net_price: number;
15826
+ notes: string | null;
15827
+ product_category_id: string | null;
15828
+ product_id: string | null;
15829
+ updated_at: string;
15830
+ valid_from: string | null;
15831
+ valid_until: string | null;
15832
+ };
15833
+ Insert: {
15834
+ base_price?: number | null;
15835
+ created_at?: string;
15836
+ currency?: string;
15837
+ customer_id: string;
15838
+ id?: string;
15839
+ min_quantity?: number;
15840
+ net_price: number;
15841
+ notes?: string | null;
15842
+ product_category_id?: string | null;
15843
+ product_id?: string | null;
15844
+ updated_at?: string;
15845
+ valid_from?: string | null;
15846
+ valid_until?: string | null;
15847
+ };
15848
+ Update: {
15849
+ base_price?: number | null;
15850
+ created_at?: string;
15851
+ currency?: string;
15852
+ customer_id?: string;
15853
+ id?: string;
15854
+ min_quantity?: number;
15855
+ net_price?: number;
15856
+ notes?: string | null;
15857
+ product_category_id?: string | null;
15858
+ product_id?: string | null;
15859
+ updated_at?: string;
15860
+ valid_from?: string | null;
15861
+ valid_until?: string | null;
15862
+ };
15863
+ Relationships: [{
15864
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
15865
+ columns: ["customer_id"];
15866
+ isOneToOne: false;
15867
+ referencedRelation: "customers";
15868
+ referencedColumns: ["id"];
15869
+ }, {
15870
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
15871
+ columns: ["product_category_id"];
15872
+ isOneToOne: false;
15873
+ referencedRelation: "product_categories";
15874
+ referencedColumns: ["id"];
15875
+ }, {
15876
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
15877
+ columns: ["product_id"];
15878
+ isOneToOne: false;
15879
+ referencedRelation: "products";
15880
+ referencedColumns: ["id"];
15881
+ }];
15882
+ };
15883
+ local_customer_price_groups: {
15884
+ Row: {
15885
+ created_at: string;
15886
+ currency: string;
15887
+ customer_id: string;
15888
+ discount_type: string;
15889
+ discount_value: number;
15890
+ id: string;
15891
+ min_quantity: number;
15892
+ notes: string | null;
15893
+ product_category_id: string | null;
15894
+ product_id: string | null;
15895
+ updated_at: string;
15896
+ valid_from: string | null;
15897
+ valid_until: string | null;
15898
+ };
15899
+ Insert: {
15900
+ created_at?: string;
15901
+ currency?: string;
15902
+ customer_id: string;
15903
+ discount_type: string;
15904
+ discount_value: number;
15905
+ id?: string;
15906
+ min_quantity?: number;
15907
+ notes?: string | null;
15908
+ product_category_id?: string | null;
15909
+ product_id?: string | null;
15910
+ updated_at?: string;
15911
+ valid_from?: string | null;
15912
+ valid_until?: string | null;
15913
+ };
15914
+ Update: {
15915
+ created_at?: string;
15916
+ currency?: string;
15917
+ customer_id?: string;
15918
+ discount_type?: string;
15919
+ discount_value?: number;
15920
+ id?: string;
15921
+ min_quantity?: number;
15922
+ notes?: string | null;
15923
+ product_category_id?: string | null;
15924
+ product_id?: string | null;
15925
+ updated_at?: string;
15926
+ valid_from?: string | null;
15927
+ valid_until?: string | null;
15928
+ };
15929
+ Relationships: [{
15930
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
15931
+ columns: ["customer_id"];
15932
+ isOneToOne: false;
15933
+ referencedRelation: "customers";
15934
+ referencedColumns: ["id"];
15935
+ }, {
15936
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
15937
+ columns: ["product_category_id"];
15938
+ isOneToOne: false;
15939
+ referencedRelation: "product_categories";
15940
+ referencedColumns: ["id"];
15941
+ }, {
15942
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
15943
+ columns: ["product_id"];
15944
+ isOneToOne: false;
15945
+ referencedRelation: "products";
15946
+ referencedColumns: ["id"];
15947
+ }];
15948
+ };
15949
+ local_customer_sales_strategies: {
15950
+ Row: {
15951
+ created_at: string;
15952
+ currency: string;
15953
+ customer_id: string;
15954
+ discount_type: string;
15955
+ discount_value: number;
15956
+ id: string;
15957
+ min_quantity: number;
15958
+ notes: string | null;
15959
+ product_category_id: string | null;
15960
+ product_id: string | null;
15961
+ updated_at: string;
15962
+ valid_from: string | null;
15963
+ valid_until: string | null;
15964
+ };
15965
+ Insert: {
15966
+ created_at?: string;
15967
+ currency?: string;
15968
+ customer_id: string;
15969
+ discount_type: string;
15970
+ discount_value: number;
15971
+ id?: string;
15972
+ min_quantity?: number;
15973
+ notes?: string | null;
15974
+ product_category_id?: string | null;
15975
+ product_id?: string | null;
15976
+ updated_at?: string;
15977
+ valid_from?: string | null;
15978
+ valid_until?: string | null;
15979
+ };
15980
+ Update: {
15981
+ created_at?: string;
15982
+ currency?: string;
15983
+ customer_id?: string;
15984
+ discount_type?: string;
15985
+ discount_value?: number;
15986
+ id?: string;
15987
+ min_quantity?: number;
15988
+ notes?: string | null;
15989
+ product_category_id?: string | null;
15990
+ product_id?: string | null;
15991
+ updated_at?: string;
15992
+ valid_from?: string | null;
15993
+ valid_until?: string | null;
15994
+ };
15995
+ Relationships: [{
15996
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
15997
+ columns: ["customer_id"];
15998
+ isOneToOne: false;
15999
+ referencedRelation: "customers";
16000
+ referencedColumns: ["id"];
16001
+ }, {
16002
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
16003
+ columns: ["product_category_id"];
16004
+ isOneToOne: false;
16005
+ referencedRelation: "product_categories";
16006
+ referencedColumns: ["id"];
16007
+ }, {
16008
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
16009
+ columns: ["product_id"];
16010
+ isOneToOne: false;
16011
+ referencedRelation: "products";
16012
+ referencedColumns: ["id"];
16013
+ }];
16014
+ };
15073
16015
  locations: {
15074
16016
  Row: {
15075
16017
  created_at: string;
@@ -15577,6 +16519,273 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
15577
16519
  referencedColumns: ["id"];
15578
16520
  }];
15579
16521
  };
16522
+ nmbrs_component_mapping: {
16523
+ Row: {
16524
+ created_at: string;
16525
+ id: string;
16526
+ source_kind: string;
16527
+ source_value: string | null;
16528
+ updated_at: string;
16529
+ wage_code: string;
16530
+ };
16531
+ Insert: {
16532
+ created_at?: string;
16533
+ id?: string;
16534
+ source_kind: string;
16535
+ source_value?: string | null;
16536
+ updated_at?: string;
16537
+ wage_code: string;
16538
+ };
16539
+ Update: {
16540
+ created_at?: string;
16541
+ id?: string;
16542
+ source_kind?: string;
16543
+ source_value?: string | null;
16544
+ updated_at?: string;
16545
+ wage_code?: string;
16546
+ };
16547
+ Relationships: [{
16548
+ foreignKeyName: "nmbrs_component_mapping_wage_code_fkey";
16549
+ columns: ["wage_code"];
16550
+ isOneToOne: false;
16551
+ referencedRelation: "nmbrs_wage_components";
16552
+ referencedColumns: ["code"];
16553
+ }];
16554
+ };
16555
+ nmbrs_employee_mapping: {
16556
+ Row: {
16557
+ active_from: string | null;
16558
+ active_to: string | null;
16559
+ contract_hours_per_week: number | null;
16560
+ created_at: string;
16561
+ hourly_wage: number | null;
16562
+ id: string;
16563
+ monteur_id: string;
16564
+ nmbrs_company_code: string | null;
16565
+ nmbrs_employee_number: string;
16566
+ updated_at: string;
16567
+ };
16568
+ Insert: {
16569
+ active_from?: string | null;
16570
+ active_to?: string | null;
16571
+ contract_hours_per_week?: number | null;
16572
+ created_at?: string;
16573
+ hourly_wage?: number | null;
16574
+ id?: string;
16575
+ monteur_id: string;
16576
+ nmbrs_company_code?: string | null;
16577
+ nmbrs_employee_number: string;
16578
+ updated_at?: string;
16579
+ };
16580
+ Update: {
16581
+ active_from?: string | null;
16582
+ active_to?: string | null;
16583
+ contract_hours_per_week?: number | null;
16584
+ created_at?: string;
16585
+ hourly_wage?: number | null;
16586
+ id?: string;
16587
+ monteur_id?: string;
16588
+ nmbrs_company_code?: string | null;
16589
+ nmbrs_employee_number?: string;
16590
+ updated_at?: string;
16591
+ };
16592
+ Relationships: [{
16593
+ foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
16594
+ columns: ["monteur_id"];
16595
+ isOneToOne: true;
16596
+ referencedRelation: "monteurs";
16597
+ referencedColumns: ["id"];
16598
+ }];
16599
+ };
16600
+ nmbrs_export_lines: {
16601
+ Row: {
16602
+ amount: number;
16603
+ created_at: string;
16604
+ entry_date: string;
16605
+ hours: number;
16606
+ id: string;
16607
+ monteur_id: string;
16608
+ nmbrs_employee_number: string | null;
16609
+ notes: string | null;
16610
+ run_id: string;
16611
+ source_kind: string | null;
16612
+ source_ref_id: string | null;
16613
+ updated_at: string;
16614
+ wage_code: string;
16615
+ };
16616
+ Insert: {
16617
+ amount?: number;
16618
+ created_at?: string;
16619
+ entry_date: string;
16620
+ hours?: number;
16621
+ id?: string;
16622
+ monteur_id: string;
16623
+ nmbrs_employee_number?: string | null;
16624
+ notes?: string | null;
16625
+ run_id: string;
16626
+ source_kind?: string | null;
16627
+ source_ref_id?: string | null;
16628
+ updated_at?: string;
16629
+ wage_code: string;
16630
+ };
16631
+ Update: {
16632
+ amount?: number;
16633
+ created_at?: string;
16634
+ entry_date?: string;
16635
+ hours?: number;
16636
+ id?: string;
16637
+ monteur_id?: string;
16638
+ nmbrs_employee_number?: string | null;
16639
+ notes?: string | null;
16640
+ run_id?: string;
16641
+ source_kind?: string | null;
16642
+ source_ref_id?: string | null;
16643
+ updated_at?: string;
16644
+ wage_code?: string;
16645
+ };
16646
+ Relationships: [{
16647
+ foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
16648
+ columns: ["monteur_id"];
16649
+ isOneToOne: false;
16650
+ referencedRelation: "monteurs";
16651
+ referencedColumns: ["id"];
16652
+ }, {
16653
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
16654
+ columns: ["run_id"];
16655
+ isOneToOne: false;
16656
+ referencedRelation: "nmbrs_export_runs";
16657
+ referencedColumns: ["id"];
16658
+ }, {
16659
+ foreignKeyName: "nmbrs_export_lines_wage_code_fkey";
16660
+ columns: ["wage_code"];
16661
+ isOneToOne: false;
16662
+ referencedRelation: "nmbrs_wage_components";
16663
+ referencedColumns: ["code"];
16664
+ }];
16665
+ };
16666
+ nmbrs_export_runs: {
16667
+ Row: {
16668
+ created_at: string;
16669
+ file_name: string | null;
16670
+ generated_at: string;
16671
+ generated_by: string | null;
16672
+ id: string;
16673
+ notes: string | null;
16674
+ period_end: string;
16675
+ period_label: string;
16676
+ period_start: string;
16677
+ status: string;
16678
+ total_hours: number;
16679
+ total_lines: number;
16680
+ updated_at: string;
16681
+ };
16682
+ Insert: {
16683
+ created_at?: string;
16684
+ file_name?: string | null;
16685
+ generated_at?: string;
16686
+ generated_by?: string | null;
16687
+ id?: string;
16688
+ notes?: string | null;
16689
+ period_end: string;
16690
+ period_label: string;
16691
+ period_start: string;
16692
+ status?: string;
16693
+ total_hours?: number;
16694
+ total_lines?: number;
16695
+ updated_at?: string;
16696
+ };
16697
+ Update: {
16698
+ created_at?: string;
16699
+ file_name?: string | null;
16700
+ generated_at?: string;
16701
+ generated_by?: string | null;
16702
+ id?: string;
16703
+ notes?: string | null;
16704
+ period_end?: string;
16705
+ period_label?: string;
16706
+ period_start?: string;
16707
+ status?: string;
16708
+ total_hours?: number;
16709
+ total_lines?: number;
16710
+ updated_at?: string;
16711
+ };
16712
+ Relationships: [];
16713
+ };
16714
+ nmbrs_settings: {
16715
+ Row: {
16716
+ created_at: string;
16717
+ default_company_code: string | null;
16718
+ id: boolean;
16719
+ include_travel: boolean;
16720
+ overtime_threshold_daily: number;
16721
+ overtime_threshold_weekly: number;
16722
+ period_type: string;
16723
+ updated_at: string;
16724
+ updated_by: string | null;
16725
+ week_start_day: number;
16726
+ };
16727
+ Insert: {
16728
+ created_at?: string;
16729
+ default_company_code?: string | null;
16730
+ id?: boolean;
16731
+ include_travel?: boolean;
16732
+ overtime_threshold_daily?: number;
16733
+ overtime_threshold_weekly?: number;
16734
+ period_type?: string;
16735
+ updated_at?: string;
16736
+ updated_by?: string | null;
16737
+ week_start_day?: number;
16738
+ };
16739
+ Update: {
16740
+ created_at?: string;
16741
+ default_company_code?: string | null;
16742
+ id?: boolean;
16743
+ include_travel?: boolean;
16744
+ overtime_threshold_daily?: number;
16745
+ overtime_threshold_weekly?: number;
16746
+ period_type?: string;
16747
+ updated_at?: string;
16748
+ updated_by?: string | null;
16749
+ week_start_day?: number;
16750
+ };
16751
+ Relationships: [];
16752
+ };
16753
+ nmbrs_wage_components: {
16754
+ Row: {
16755
+ category: string;
16756
+ code: string;
16757
+ created_at: string;
16758
+ id: string;
16759
+ is_active: boolean;
16760
+ label: string;
16761
+ sort_order: number;
16762
+ unit: string;
16763
+ updated_at: string;
16764
+ };
16765
+ Insert: {
16766
+ category: string;
16767
+ code: string;
16768
+ created_at?: string;
16769
+ id?: string;
16770
+ is_active?: boolean;
16771
+ label: string;
16772
+ sort_order?: number;
16773
+ unit: string;
16774
+ updated_at?: string;
16775
+ };
16776
+ Update: {
16777
+ category?: string;
16778
+ code?: string;
16779
+ created_at?: string;
16780
+ id?: string;
16781
+ is_active?: boolean;
16782
+ label?: string;
16783
+ sort_order?: number;
16784
+ unit?: string;
16785
+ updated_at?: string;
16786
+ };
16787
+ Relationships: [];
16788
+ };
15580
16789
  notifications: {
15581
16790
  Row: {
15582
16791
  created_at: string;
@@ -17425,6 +18634,48 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
17425
18634
  };
17426
18635
  Relationships: [];
17427
18636
  };
18637
+ stock_import_runs: {
18638
+ Row: {
18639
+ connection_id: string | null;
18640
+ created_at: string;
18641
+ created_rows: number;
18642
+ errors: import("../integrations/supabase/types").Json;
18643
+ filename: string | null;
18644
+ id: string;
18645
+ mutations: import("../integrations/supabase/types").Json;
18646
+ skipped_rows: number;
18647
+ total_rows: number;
18648
+ updated_rows: number;
18649
+ user_id: string;
18650
+ };
18651
+ Insert: {
18652
+ connection_id?: string | null;
18653
+ created_at?: string;
18654
+ created_rows?: number;
18655
+ errors?: import("../integrations/supabase/types").Json;
18656
+ filename?: string | null;
18657
+ id?: string;
18658
+ mutations?: import("../integrations/supabase/types").Json;
18659
+ skipped_rows?: number;
18660
+ total_rows?: number;
18661
+ updated_rows?: number;
18662
+ user_id: string;
18663
+ };
18664
+ Update: {
18665
+ connection_id?: string | null;
18666
+ created_at?: string;
18667
+ created_rows?: number;
18668
+ errors?: import("../integrations/supabase/types").Json;
18669
+ filename?: string | null;
18670
+ id?: string;
18671
+ mutations?: import("../integrations/supabase/types").Json;
18672
+ skipped_rows?: number;
18673
+ total_rows?: number;
18674
+ updated_rows?: number;
18675
+ user_id?: string;
18676
+ };
18677
+ Relationships: [];
18678
+ };
17428
18679
  stock_mutation_log: {
17429
18680
  Row: {
17430
18681
  connection_id: string | null;
@@ -19056,6 +20307,44 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
19056
20307
  };
19057
20308
  Relationships: [];
19058
20309
  };
20310
+ floriday_customer_discounts: {
20311
+ Row: {
20312
+ base_price: number | null;
20313
+ buyer_organization_id: string | null;
20314
+ currency: string | null;
20315
+ discount_type: string | null;
20316
+ discount_value: number | null;
20317
+ min_quantity: number | null;
20318
+ net_price: number | null;
20319
+ product_group_id: string | null;
20320
+ raw: import("../integrations/supabase/types").Json | null;
20321
+ source: string | null;
20322
+ source_id: string | null;
20323
+ trade_item_id: string | null;
20324
+ valid_from: string | null;
20325
+ valid_until: string | null;
20326
+ };
20327
+ Relationships: [];
20328
+ };
20329
+ local_customer_discounts: {
20330
+ Row: {
20331
+ base_price: number | null;
20332
+ currency: string | null;
20333
+ customer_id: string | null;
20334
+ discount_type: string | null;
20335
+ discount_value: number | null;
20336
+ min_quantity: number | null;
20337
+ net_price: number | null;
20338
+ product_category_id: string | null;
20339
+ product_id: string | null;
20340
+ product_name: string | null;
20341
+ source: string | null;
20342
+ source_id: string | null;
20343
+ valid_from: string | null;
20344
+ valid_until: string | null;
20345
+ };
20346
+ Relationships: [];
20347
+ };
19059
20348
  manufacture_product_possible_stock_view: {
19060
20349
  Row: {
19061
20350
  component_count: number | null;
@@ -19423,6 +20712,28 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
19423
20712
  };
19424
20713
  Returns: number;
19425
20714
  };
20715
+ check_offer_product_available_stock: {
20716
+ Args: {
20717
+ p_campaign_product_id: string;
20718
+ p_code: string;
20719
+ p_needed_qty?: number;
20720
+ p_product_name?: string;
20721
+ };
20722
+ Returns: import("../integrations/supabase/types").Json;
20723
+ };
20724
+ check_trade_item_available_stock: {
20725
+ Args: {
20726
+ p_connection_id?: string;
20727
+ p_context?: string;
20728
+ p_needed_qty?: number;
20729
+ p_order_id?: string;
20730
+ p_order_item_id?: string;
20731
+ p_owner_id?: string;
20732
+ p_product_name?: string;
20733
+ p_trade_item_key: string;
20734
+ };
20735
+ Returns: import("../integrations/supabase/types").Json;
20736
+ };
19426
20737
  cleanup_old_bookings: {
19427
20738
  Args: never;
19428
20739
  Returns: number;
@@ -19507,6 +20818,12 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
19507
20818
  status: string;
19508
20819
  }[];
19509
20820
  };
20821
+ ensure_trade_item_stock_row: {
20822
+ Args: {
20823
+ p_key: string;
20824
+ };
20825
+ Returns: undefined;
20826
+ };
19510
20827
  ensure_user_tenant: {
19511
20828
  Args: never;
19512
20829
  Returns: string;
@@ -19544,12 +20861,31 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
19544
20861
  };
19545
20862
  Returns: boolean;
19546
20863
  };
19547
- find_trade_item_key_by_name: {
20864
+ find_trade_item_key: {
19548
20865
  Args: {
20866
+ p_barcode: string;
19549
20867
  p_name: string;
20868
+ p_product_id: string;
19550
20869
  };
19551
20870
  Returns: string;
19552
20871
  };
20872
+ floriday_effective_price: {
20873
+ Args: {
20874
+ _buyer_id: string;
20875
+ _on_date?: string;
20876
+ _quantity?: number;
20877
+ _trade_item_id: string;
20878
+ };
20879
+ Returns: {
20880
+ base_price: number;
20881
+ currency: string;
20882
+ discount_type: string;
20883
+ discount_value: number;
20884
+ net_price: number;
20885
+ source: string;
20886
+ source_id: string;
20887
+ }[];
20888
+ };
19553
20889
  format_cart_number: {
19554
20890
  Args: {
19555
20891
  p_pick_date: string;
@@ -19570,6 +20906,13 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
19570
20906
  preferred_warehouse_name: string;
19571
20907
  }[];
19572
20908
  };
20909
+ get_active_floriday_context: {
20910
+ Args: never;
20911
+ Returns: {
20912
+ connection_id: string;
20913
+ user_id: string;
20914
+ }[];
20915
+ };
19573
20916
  get_active_twinfield_public: {
19574
20917
  Args: never;
19575
20918
  Returns: {
@@ -19672,6 +21015,18 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
19672
21015
  };
19673
21016
  Returns: import("../integrations/supabase/types").Json;
19674
21017
  };
21018
+ get_offer_recipient_by_code: {
21019
+ Args: {
21020
+ p_code: string;
21021
+ };
21022
+ Returns: {
21023
+ campaign_id: string;
21024
+ clicked_at: string;
21025
+ customer_id: string;
21026
+ id: string;
21027
+ ordered_at: string;
21028
+ }[];
21029
+ };
19675
21030
  get_or_assign_floriday_order_number: {
19676
21031
  Args: {
19677
21032
  p_floriday_id: string;
@@ -19724,6 +21079,34 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
19724
21079
  Args: never;
19725
21080
  Returns: boolean;
19726
21081
  };
21082
+ local_effective_price: {
21083
+ Args: {
21084
+ _customer_id: string;
21085
+ _on_date?: string;
21086
+ _product_id: string;
21087
+ _quantity?: number;
21088
+ };
21089
+ Returns: {
21090
+ currency: string;
21091
+ discount_type: string;
21092
+ discount_value: number;
21093
+ net_price: number;
21094
+ source: string;
21095
+ source_id: string;
21096
+ }[];
21097
+ };
21098
+ mark_offer_clicked: {
21099
+ Args: {
21100
+ p_code: string;
21101
+ };
21102
+ Returns: undefined;
21103
+ };
21104
+ mark_offer_ordered: {
21105
+ Args: {
21106
+ p_code: string;
21107
+ };
21108
+ Returns: undefined;
21109
+ };
19727
21110
  next_order_number: {
19728
21111
  Args: {
19729
21112
  p_prefix: string;
@@ -19743,6 +21126,14 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
19743
21126
  };
19744
21127
  Returns: string;
19745
21128
  };
21129
+ offer_recipient_matches: {
21130
+ Args: {
21131
+ _campaign_id: string;
21132
+ _customer_id: string;
21133
+ _recipient_id: string;
21134
+ };
21135
+ Returns: boolean;
21136
+ };
19746
21137
  pickstation_get_orders_raw: {
19747
21138
  Args: never;
19748
21139
  Returns: import("../integrations/supabase/types").Json;
@@ -19770,6 +21161,13 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
19770
21161
  };
19771
21162
  Returns: undefined;
19772
21163
  };
21164
+ promote_trade_item_key: {
21165
+ Args: {
21166
+ p_new: string;
21167
+ p_old: string;
21168
+ };
21169
+ Returns: undefined;
21170
+ };
19773
21171
  refresh_floricode_derived_code_lists: {
19774
21172
  Args: never;
19775
21173
  Returns: {
@@ -23721,6 +25119,51 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
23721
25119
  referencedColumns: ["id"];
23722
25120
  }];
23723
25121
  };
25122
+ floriday_continuous_stock_queue: {
25123
+ Row: {
25124
+ attempts: number;
25125
+ connection_id: string;
25126
+ created_at: string;
25127
+ gateway_attempt_id: string | null;
25128
+ id: string;
25129
+ last_error: string | null;
25130
+ number_of_pieces: number;
25131
+ sent_at: string | null;
25132
+ status: string;
25133
+ trade_item_id: string;
25134
+ updated_at: string;
25135
+ user_id: string;
25136
+ };
25137
+ Insert: {
25138
+ attempts?: number;
25139
+ connection_id: string;
25140
+ created_at?: string;
25141
+ gateway_attempt_id?: string | null;
25142
+ id?: string;
25143
+ last_error?: string | null;
25144
+ number_of_pieces?: number;
25145
+ sent_at?: string | null;
25146
+ status?: string;
25147
+ trade_item_id: string;
25148
+ updated_at?: string;
25149
+ user_id: string;
25150
+ };
25151
+ Update: {
25152
+ attempts?: number;
25153
+ connection_id?: string;
25154
+ created_at?: string;
25155
+ gateway_attempt_id?: string | null;
25156
+ id?: string;
25157
+ last_error?: string | null;
25158
+ number_of_pieces?: number;
25159
+ sent_at?: string | null;
25160
+ status?: string;
25161
+ trade_item_id?: string;
25162
+ updated_at?: string;
25163
+ user_id?: string;
25164
+ };
25165
+ Relationships: [];
25166
+ };
23724
25167
  floriday_contract_trade_item_groups_cache: {
23725
25168
  Row: {
23726
25169
  connection_id: string;
@@ -25110,6 +26553,204 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
25110
26553
  };
25111
26554
  Relationships: [];
25112
26555
  };
26556
+ local_customer_agreements: {
26557
+ Row: {
26558
+ base_price: number | null;
26559
+ created_at: string;
26560
+ currency: string;
26561
+ customer_id: string;
26562
+ id: string;
26563
+ min_quantity: number;
26564
+ net_price: number;
26565
+ notes: string | null;
26566
+ product_category_id: string | null;
26567
+ product_id: string | null;
26568
+ updated_at: string;
26569
+ valid_from: string | null;
26570
+ valid_until: string | null;
26571
+ };
26572
+ Insert: {
26573
+ base_price?: number | null;
26574
+ created_at?: string;
26575
+ currency?: string;
26576
+ customer_id: string;
26577
+ id?: string;
26578
+ min_quantity?: number;
26579
+ net_price: number;
26580
+ notes?: string | null;
26581
+ product_category_id?: string | null;
26582
+ product_id?: string | null;
26583
+ updated_at?: string;
26584
+ valid_from?: string | null;
26585
+ valid_until?: string | null;
26586
+ };
26587
+ Update: {
26588
+ base_price?: number | null;
26589
+ created_at?: string;
26590
+ currency?: string;
26591
+ customer_id?: string;
26592
+ id?: string;
26593
+ min_quantity?: number;
26594
+ net_price?: number;
26595
+ notes?: string | null;
26596
+ product_category_id?: string | null;
26597
+ product_id?: string | null;
26598
+ updated_at?: string;
26599
+ valid_from?: string | null;
26600
+ valid_until?: string | null;
26601
+ };
26602
+ Relationships: [{
26603
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
26604
+ columns: ["customer_id"];
26605
+ isOneToOne: false;
26606
+ referencedRelation: "customers";
26607
+ referencedColumns: ["id"];
26608
+ }, {
26609
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
26610
+ columns: ["product_category_id"];
26611
+ isOneToOne: false;
26612
+ referencedRelation: "product_categories";
26613
+ referencedColumns: ["id"];
26614
+ }, {
26615
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
26616
+ columns: ["product_id"];
26617
+ isOneToOne: false;
26618
+ referencedRelation: "products";
26619
+ referencedColumns: ["id"];
26620
+ }];
26621
+ };
26622
+ local_customer_price_groups: {
26623
+ Row: {
26624
+ created_at: string;
26625
+ currency: string;
26626
+ customer_id: string;
26627
+ discount_type: string;
26628
+ discount_value: number;
26629
+ id: string;
26630
+ min_quantity: number;
26631
+ notes: string | null;
26632
+ product_category_id: string | null;
26633
+ product_id: string | null;
26634
+ updated_at: string;
26635
+ valid_from: string | null;
26636
+ valid_until: string | null;
26637
+ };
26638
+ Insert: {
26639
+ created_at?: string;
26640
+ currency?: string;
26641
+ customer_id: string;
26642
+ discount_type: string;
26643
+ discount_value: number;
26644
+ id?: string;
26645
+ min_quantity?: number;
26646
+ notes?: string | null;
26647
+ product_category_id?: string | null;
26648
+ product_id?: string | null;
26649
+ updated_at?: string;
26650
+ valid_from?: string | null;
26651
+ valid_until?: string | null;
26652
+ };
26653
+ Update: {
26654
+ created_at?: string;
26655
+ currency?: string;
26656
+ customer_id?: string;
26657
+ discount_type?: string;
26658
+ discount_value?: number;
26659
+ id?: string;
26660
+ min_quantity?: number;
26661
+ notes?: string | null;
26662
+ product_category_id?: string | null;
26663
+ product_id?: string | null;
26664
+ updated_at?: string;
26665
+ valid_from?: string | null;
26666
+ valid_until?: string | null;
26667
+ };
26668
+ Relationships: [{
26669
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
26670
+ columns: ["customer_id"];
26671
+ isOneToOne: false;
26672
+ referencedRelation: "customers";
26673
+ referencedColumns: ["id"];
26674
+ }, {
26675
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
26676
+ columns: ["product_category_id"];
26677
+ isOneToOne: false;
26678
+ referencedRelation: "product_categories";
26679
+ referencedColumns: ["id"];
26680
+ }, {
26681
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
26682
+ columns: ["product_id"];
26683
+ isOneToOne: false;
26684
+ referencedRelation: "products";
26685
+ referencedColumns: ["id"];
26686
+ }];
26687
+ };
26688
+ local_customer_sales_strategies: {
26689
+ Row: {
26690
+ created_at: string;
26691
+ currency: string;
26692
+ customer_id: string;
26693
+ discount_type: string;
26694
+ discount_value: number;
26695
+ id: string;
26696
+ min_quantity: number;
26697
+ notes: string | null;
26698
+ product_category_id: string | null;
26699
+ product_id: string | null;
26700
+ updated_at: string;
26701
+ valid_from: string | null;
26702
+ valid_until: string | null;
26703
+ };
26704
+ Insert: {
26705
+ created_at?: string;
26706
+ currency?: string;
26707
+ customer_id: string;
26708
+ discount_type: string;
26709
+ discount_value: number;
26710
+ id?: string;
26711
+ min_quantity?: number;
26712
+ notes?: string | null;
26713
+ product_category_id?: string | null;
26714
+ product_id?: string | null;
26715
+ updated_at?: string;
26716
+ valid_from?: string | null;
26717
+ valid_until?: string | null;
26718
+ };
26719
+ Update: {
26720
+ created_at?: string;
26721
+ currency?: string;
26722
+ customer_id?: string;
26723
+ discount_type?: string;
26724
+ discount_value?: number;
26725
+ id?: string;
26726
+ min_quantity?: number;
26727
+ notes?: string | null;
26728
+ product_category_id?: string | null;
26729
+ product_id?: string | null;
26730
+ updated_at?: string;
26731
+ valid_from?: string | null;
26732
+ valid_until?: string | null;
26733
+ };
26734
+ Relationships: [{
26735
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
26736
+ columns: ["customer_id"];
26737
+ isOneToOne: false;
26738
+ referencedRelation: "customers";
26739
+ referencedColumns: ["id"];
26740
+ }, {
26741
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
26742
+ columns: ["product_category_id"];
26743
+ isOneToOne: false;
26744
+ referencedRelation: "product_categories";
26745
+ referencedColumns: ["id"];
26746
+ }, {
26747
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
26748
+ columns: ["product_id"];
26749
+ isOneToOne: false;
26750
+ referencedRelation: "products";
26751
+ referencedColumns: ["id"];
26752
+ }];
26753
+ };
25113
26754
  locations: {
25114
26755
  Row: {
25115
26756
  created_at: string;
@@ -25617,6 +27258,273 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
25617
27258
  referencedColumns: ["id"];
25618
27259
  }];
25619
27260
  };
27261
+ nmbrs_component_mapping: {
27262
+ Row: {
27263
+ created_at: string;
27264
+ id: string;
27265
+ source_kind: string;
27266
+ source_value: string | null;
27267
+ updated_at: string;
27268
+ wage_code: string;
27269
+ };
27270
+ Insert: {
27271
+ created_at?: string;
27272
+ id?: string;
27273
+ source_kind: string;
27274
+ source_value?: string | null;
27275
+ updated_at?: string;
27276
+ wage_code: string;
27277
+ };
27278
+ Update: {
27279
+ created_at?: string;
27280
+ id?: string;
27281
+ source_kind?: string;
27282
+ source_value?: string | null;
27283
+ updated_at?: string;
27284
+ wage_code?: string;
27285
+ };
27286
+ Relationships: [{
27287
+ foreignKeyName: "nmbrs_component_mapping_wage_code_fkey";
27288
+ columns: ["wage_code"];
27289
+ isOneToOne: false;
27290
+ referencedRelation: "nmbrs_wage_components";
27291
+ referencedColumns: ["code"];
27292
+ }];
27293
+ };
27294
+ nmbrs_employee_mapping: {
27295
+ Row: {
27296
+ active_from: string | null;
27297
+ active_to: string | null;
27298
+ contract_hours_per_week: number | null;
27299
+ created_at: string;
27300
+ hourly_wage: number | null;
27301
+ id: string;
27302
+ monteur_id: string;
27303
+ nmbrs_company_code: string | null;
27304
+ nmbrs_employee_number: string;
27305
+ updated_at: string;
27306
+ };
27307
+ Insert: {
27308
+ active_from?: string | null;
27309
+ active_to?: string | null;
27310
+ contract_hours_per_week?: number | null;
27311
+ created_at?: string;
27312
+ hourly_wage?: number | null;
27313
+ id?: string;
27314
+ monteur_id: string;
27315
+ nmbrs_company_code?: string | null;
27316
+ nmbrs_employee_number: string;
27317
+ updated_at?: string;
27318
+ };
27319
+ Update: {
27320
+ active_from?: string | null;
27321
+ active_to?: string | null;
27322
+ contract_hours_per_week?: number | null;
27323
+ created_at?: string;
27324
+ hourly_wage?: number | null;
27325
+ id?: string;
27326
+ monteur_id?: string;
27327
+ nmbrs_company_code?: string | null;
27328
+ nmbrs_employee_number?: string;
27329
+ updated_at?: string;
27330
+ };
27331
+ Relationships: [{
27332
+ foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
27333
+ columns: ["monteur_id"];
27334
+ isOneToOne: true;
27335
+ referencedRelation: "monteurs";
27336
+ referencedColumns: ["id"];
27337
+ }];
27338
+ };
27339
+ nmbrs_export_lines: {
27340
+ Row: {
27341
+ amount: number;
27342
+ created_at: string;
27343
+ entry_date: string;
27344
+ hours: number;
27345
+ id: string;
27346
+ monteur_id: string;
27347
+ nmbrs_employee_number: string | null;
27348
+ notes: string | null;
27349
+ run_id: string;
27350
+ source_kind: string | null;
27351
+ source_ref_id: string | null;
27352
+ updated_at: string;
27353
+ wage_code: string;
27354
+ };
27355
+ Insert: {
27356
+ amount?: number;
27357
+ created_at?: string;
27358
+ entry_date: string;
27359
+ hours?: number;
27360
+ id?: string;
27361
+ monteur_id: string;
27362
+ nmbrs_employee_number?: string | null;
27363
+ notes?: string | null;
27364
+ run_id: string;
27365
+ source_kind?: string | null;
27366
+ source_ref_id?: string | null;
27367
+ updated_at?: string;
27368
+ wage_code: string;
27369
+ };
27370
+ Update: {
27371
+ amount?: number;
27372
+ created_at?: string;
27373
+ entry_date?: string;
27374
+ hours?: number;
27375
+ id?: string;
27376
+ monteur_id?: string;
27377
+ nmbrs_employee_number?: string | null;
27378
+ notes?: string | null;
27379
+ run_id?: string;
27380
+ source_kind?: string | null;
27381
+ source_ref_id?: string | null;
27382
+ updated_at?: string;
27383
+ wage_code?: string;
27384
+ };
27385
+ Relationships: [{
27386
+ foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
27387
+ columns: ["monteur_id"];
27388
+ isOneToOne: false;
27389
+ referencedRelation: "monteurs";
27390
+ referencedColumns: ["id"];
27391
+ }, {
27392
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
27393
+ columns: ["run_id"];
27394
+ isOneToOne: false;
27395
+ referencedRelation: "nmbrs_export_runs";
27396
+ referencedColumns: ["id"];
27397
+ }, {
27398
+ foreignKeyName: "nmbrs_export_lines_wage_code_fkey";
27399
+ columns: ["wage_code"];
27400
+ isOneToOne: false;
27401
+ referencedRelation: "nmbrs_wage_components";
27402
+ referencedColumns: ["code"];
27403
+ }];
27404
+ };
27405
+ nmbrs_export_runs: {
27406
+ Row: {
27407
+ created_at: string;
27408
+ file_name: string | null;
27409
+ generated_at: string;
27410
+ generated_by: string | null;
27411
+ id: string;
27412
+ notes: string | null;
27413
+ period_end: string;
27414
+ period_label: string;
27415
+ period_start: string;
27416
+ status: string;
27417
+ total_hours: number;
27418
+ total_lines: number;
27419
+ updated_at: string;
27420
+ };
27421
+ Insert: {
27422
+ created_at?: string;
27423
+ file_name?: string | null;
27424
+ generated_at?: string;
27425
+ generated_by?: string | null;
27426
+ id?: string;
27427
+ notes?: string | null;
27428
+ period_end: string;
27429
+ period_label: string;
27430
+ period_start: string;
27431
+ status?: string;
27432
+ total_hours?: number;
27433
+ total_lines?: number;
27434
+ updated_at?: string;
27435
+ };
27436
+ Update: {
27437
+ created_at?: string;
27438
+ file_name?: string | null;
27439
+ generated_at?: string;
27440
+ generated_by?: string | null;
27441
+ id?: string;
27442
+ notes?: string | null;
27443
+ period_end?: string;
27444
+ period_label?: string;
27445
+ period_start?: string;
27446
+ status?: string;
27447
+ total_hours?: number;
27448
+ total_lines?: number;
27449
+ updated_at?: string;
27450
+ };
27451
+ Relationships: [];
27452
+ };
27453
+ nmbrs_settings: {
27454
+ Row: {
27455
+ created_at: string;
27456
+ default_company_code: string | null;
27457
+ id: boolean;
27458
+ include_travel: boolean;
27459
+ overtime_threshold_daily: number;
27460
+ overtime_threshold_weekly: number;
27461
+ period_type: string;
27462
+ updated_at: string;
27463
+ updated_by: string | null;
27464
+ week_start_day: number;
27465
+ };
27466
+ Insert: {
27467
+ created_at?: string;
27468
+ default_company_code?: string | null;
27469
+ id?: boolean;
27470
+ include_travel?: boolean;
27471
+ overtime_threshold_daily?: number;
27472
+ overtime_threshold_weekly?: number;
27473
+ period_type?: string;
27474
+ updated_at?: string;
27475
+ updated_by?: string | null;
27476
+ week_start_day?: number;
27477
+ };
27478
+ Update: {
27479
+ created_at?: string;
27480
+ default_company_code?: string | null;
27481
+ id?: boolean;
27482
+ include_travel?: boolean;
27483
+ overtime_threshold_daily?: number;
27484
+ overtime_threshold_weekly?: number;
27485
+ period_type?: string;
27486
+ updated_at?: string;
27487
+ updated_by?: string | null;
27488
+ week_start_day?: number;
27489
+ };
27490
+ Relationships: [];
27491
+ };
27492
+ nmbrs_wage_components: {
27493
+ Row: {
27494
+ category: string;
27495
+ code: string;
27496
+ created_at: string;
27497
+ id: string;
27498
+ is_active: boolean;
27499
+ label: string;
27500
+ sort_order: number;
27501
+ unit: string;
27502
+ updated_at: string;
27503
+ };
27504
+ Insert: {
27505
+ category: string;
27506
+ code: string;
27507
+ created_at?: string;
27508
+ id?: string;
27509
+ is_active?: boolean;
27510
+ label: string;
27511
+ sort_order?: number;
27512
+ unit: string;
27513
+ updated_at?: string;
27514
+ };
27515
+ Update: {
27516
+ category?: string;
27517
+ code?: string;
27518
+ created_at?: string;
27519
+ id?: string;
27520
+ is_active?: boolean;
27521
+ label?: string;
27522
+ sort_order?: number;
27523
+ unit?: string;
27524
+ updated_at?: string;
27525
+ };
27526
+ Relationships: [];
27527
+ };
25620
27528
  notifications: {
25621
27529
  Row: {
25622
27530
  created_at: string;
@@ -27465,6 +29373,48 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
27465
29373
  };
27466
29374
  Relationships: [];
27467
29375
  };
29376
+ stock_import_runs: {
29377
+ Row: {
29378
+ connection_id: string | null;
29379
+ created_at: string;
29380
+ created_rows: number;
29381
+ errors: import("../integrations/supabase/types").Json;
29382
+ filename: string | null;
29383
+ id: string;
29384
+ mutations: import("../integrations/supabase/types").Json;
29385
+ skipped_rows: number;
29386
+ total_rows: number;
29387
+ updated_rows: number;
29388
+ user_id: string;
29389
+ };
29390
+ Insert: {
29391
+ connection_id?: string | null;
29392
+ created_at?: string;
29393
+ created_rows?: number;
29394
+ errors?: import("../integrations/supabase/types").Json;
29395
+ filename?: string | null;
29396
+ id?: string;
29397
+ mutations?: import("../integrations/supabase/types").Json;
29398
+ skipped_rows?: number;
29399
+ total_rows?: number;
29400
+ updated_rows?: number;
29401
+ user_id: string;
29402
+ };
29403
+ Update: {
29404
+ connection_id?: string | null;
29405
+ created_at?: string;
29406
+ created_rows?: number;
29407
+ errors?: import("../integrations/supabase/types").Json;
29408
+ filename?: string | null;
29409
+ id?: string;
29410
+ mutations?: import("../integrations/supabase/types").Json;
29411
+ skipped_rows?: number;
29412
+ total_rows?: number;
29413
+ updated_rows?: number;
29414
+ user_id?: string;
29415
+ };
29416
+ Relationships: [];
29417
+ };
27468
29418
  stock_mutation_log: {
27469
29419
  Row: {
27470
29420
  connection_id: string | null;
@@ -29096,6 +31046,44 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
29096
31046
  };
29097
31047
  Relationships: [];
29098
31048
  };
31049
+ floriday_customer_discounts: {
31050
+ Row: {
31051
+ base_price: number | null;
31052
+ buyer_organization_id: string | null;
31053
+ currency: string | null;
31054
+ discount_type: string | null;
31055
+ discount_value: number | null;
31056
+ min_quantity: number | null;
31057
+ net_price: number | null;
31058
+ product_group_id: string | null;
31059
+ raw: import("../integrations/supabase/types").Json | null;
31060
+ source: string | null;
31061
+ source_id: string | null;
31062
+ trade_item_id: string | null;
31063
+ valid_from: string | null;
31064
+ valid_until: string | null;
31065
+ };
31066
+ Relationships: [];
31067
+ };
31068
+ local_customer_discounts: {
31069
+ Row: {
31070
+ base_price: number | null;
31071
+ currency: string | null;
31072
+ customer_id: string | null;
31073
+ discount_type: string | null;
31074
+ discount_value: number | null;
31075
+ min_quantity: number | null;
31076
+ net_price: number | null;
31077
+ product_category_id: string | null;
31078
+ product_id: string | null;
31079
+ product_name: string | null;
31080
+ source: string | null;
31081
+ source_id: string | null;
31082
+ valid_from: string | null;
31083
+ valid_until: string | null;
31084
+ };
31085
+ Relationships: [];
31086
+ };
29099
31087
  manufacture_product_possible_stock_view: {
29100
31088
  Row: {
29101
31089
  component_count: number | null;
@@ -29463,6 +31451,28 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
29463
31451
  };
29464
31452
  Returns: number;
29465
31453
  };
31454
+ check_offer_product_available_stock: {
31455
+ Args: {
31456
+ p_campaign_product_id: string;
31457
+ p_code: string;
31458
+ p_needed_qty?: number;
31459
+ p_product_name?: string;
31460
+ };
31461
+ Returns: import("../integrations/supabase/types").Json;
31462
+ };
31463
+ check_trade_item_available_stock: {
31464
+ Args: {
31465
+ p_connection_id?: string;
31466
+ p_context?: string;
31467
+ p_needed_qty?: number;
31468
+ p_order_id?: string;
31469
+ p_order_item_id?: string;
31470
+ p_owner_id?: string;
31471
+ p_product_name?: string;
31472
+ p_trade_item_key: string;
31473
+ };
31474
+ Returns: import("../integrations/supabase/types").Json;
31475
+ };
29466
31476
  cleanup_old_bookings: {
29467
31477
  Args: never;
29468
31478
  Returns: number;
@@ -29547,6 +31557,12 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
29547
31557
  status: string;
29548
31558
  }[];
29549
31559
  };
31560
+ ensure_trade_item_stock_row: {
31561
+ Args: {
31562
+ p_key: string;
31563
+ };
31564
+ Returns: undefined;
31565
+ };
29550
31566
  ensure_user_tenant: {
29551
31567
  Args: never;
29552
31568
  Returns: string;
@@ -29584,12 +31600,31 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
29584
31600
  };
29585
31601
  Returns: boolean;
29586
31602
  };
29587
- find_trade_item_key_by_name: {
31603
+ find_trade_item_key: {
29588
31604
  Args: {
31605
+ p_barcode: string;
29589
31606
  p_name: string;
31607
+ p_product_id: string;
29590
31608
  };
29591
31609
  Returns: string;
29592
31610
  };
31611
+ floriday_effective_price: {
31612
+ Args: {
31613
+ _buyer_id: string;
31614
+ _on_date?: string;
31615
+ _quantity?: number;
31616
+ _trade_item_id: string;
31617
+ };
31618
+ Returns: {
31619
+ base_price: number;
31620
+ currency: string;
31621
+ discount_type: string;
31622
+ discount_value: number;
31623
+ net_price: number;
31624
+ source: string;
31625
+ source_id: string;
31626
+ }[];
31627
+ };
29593
31628
  format_cart_number: {
29594
31629
  Args: {
29595
31630
  p_pick_date: string;
@@ -29610,6 +31645,13 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
29610
31645
  preferred_warehouse_name: string;
29611
31646
  }[];
29612
31647
  };
31648
+ get_active_floriday_context: {
31649
+ Args: never;
31650
+ Returns: {
31651
+ connection_id: string;
31652
+ user_id: string;
31653
+ }[];
31654
+ };
29613
31655
  get_active_twinfield_public: {
29614
31656
  Args: never;
29615
31657
  Returns: {
@@ -29712,6 +31754,18 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
29712
31754
  };
29713
31755
  Returns: import("../integrations/supabase/types").Json;
29714
31756
  };
31757
+ get_offer_recipient_by_code: {
31758
+ Args: {
31759
+ p_code: string;
31760
+ };
31761
+ Returns: {
31762
+ campaign_id: string;
31763
+ clicked_at: string;
31764
+ customer_id: string;
31765
+ id: string;
31766
+ ordered_at: string;
31767
+ }[];
31768
+ };
29715
31769
  get_or_assign_floriday_order_number: {
29716
31770
  Args: {
29717
31771
  p_floriday_id: string;
@@ -29764,6 +31818,34 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
29764
31818
  Args: never;
29765
31819
  Returns: boolean;
29766
31820
  };
31821
+ local_effective_price: {
31822
+ Args: {
31823
+ _customer_id: string;
31824
+ _on_date?: string;
31825
+ _product_id: string;
31826
+ _quantity?: number;
31827
+ };
31828
+ Returns: {
31829
+ currency: string;
31830
+ discount_type: string;
31831
+ discount_value: number;
31832
+ net_price: number;
31833
+ source: string;
31834
+ source_id: string;
31835
+ }[];
31836
+ };
31837
+ mark_offer_clicked: {
31838
+ Args: {
31839
+ p_code: string;
31840
+ };
31841
+ Returns: undefined;
31842
+ };
31843
+ mark_offer_ordered: {
31844
+ Args: {
31845
+ p_code: string;
31846
+ };
31847
+ Returns: undefined;
31848
+ };
29767
31849
  next_order_number: {
29768
31850
  Args: {
29769
31851
  p_prefix: string;
@@ -29783,6 +31865,14 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
29783
31865
  };
29784
31866
  Returns: string;
29785
31867
  };
31868
+ offer_recipient_matches: {
31869
+ Args: {
31870
+ _campaign_id: string;
31871
+ _customer_id: string;
31872
+ _recipient_id: string;
31873
+ };
31874
+ Returns: boolean;
31875
+ };
29786
31876
  pickstation_get_orders_raw: {
29787
31877
  Args: never;
29788
31878
  Returns: import("../integrations/supabase/types").Json;
@@ -29810,6 +31900,13 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
29810
31900
  };
29811
31901
  Returns: undefined;
29812
31902
  };
31903
+ promote_trade_item_key: {
31904
+ Args: {
31905
+ p_new: string;
31906
+ p_old: string;
31907
+ };
31908
+ Returns: undefined;
31909
+ };
29813
31910
  refresh_floricode_derived_code_lists: {
29814
31911
  Args: never;
29815
31912
  Returns: {
@@ -33768,6 +35865,51 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
33768
35865
  referencedColumns: ["id"];
33769
35866
  }];
33770
35867
  };
35868
+ floriday_continuous_stock_queue: {
35869
+ Row: {
35870
+ attempts: number;
35871
+ connection_id: string;
35872
+ created_at: string;
35873
+ gateway_attempt_id: string | null;
35874
+ id: string;
35875
+ last_error: string | null;
35876
+ number_of_pieces: number;
35877
+ sent_at: string | null;
35878
+ status: string;
35879
+ trade_item_id: string;
35880
+ updated_at: string;
35881
+ user_id: string;
35882
+ };
35883
+ Insert: {
35884
+ attempts?: number;
35885
+ connection_id: string;
35886
+ created_at?: string;
35887
+ gateway_attempt_id?: string | null;
35888
+ id?: string;
35889
+ last_error?: string | null;
35890
+ number_of_pieces?: number;
35891
+ sent_at?: string | null;
35892
+ status?: string;
35893
+ trade_item_id: string;
35894
+ updated_at?: string;
35895
+ user_id: string;
35896
+ };
35897
+ Update: {
35898
+ attempts?: number;
35899
+ connection_id?: string;
35900
+ created_at?: string;
35901
+ gateway_attempt_id?: string | null;
35902
+ id?: string;
35903
+ last_error?: string | null;
35904
+ number_of_pieces?: number;
35905
+ sent_at?: string | null;
35906
+ status?: string;
35907
+ trade_item_id?: string;
35908
+ updated_at?: string;
35909
+ user_id?: string;
35910
+ };
35911
+ Relationships: [];
35912
+ };
33771
35913
  floriday_contract_trade_item_groups_cache: {
33772
35914
  Row: {
33773
35915
  connection_id: string;
@@ -35157,6 +37299,204 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
35157
37299
  };
35158
37300
  Relationships: [];
35159
37301
  };
37302
+ local_customer_agreements: {
37303
+ Row: {
37304
+ base_price: number | null;
37305
+ created_at: string;
37306
+ currency: string;
37307
+ customer_id: string;
37308
+ id: string;
37309
+ min_quantity: number;
37310
+ net_price: number;
37311
+ notes: string | null;
37312
+ product_category_id: string | null;
37313
+ product_id: string | null;
37314
+ updated_at: string;
37315
+ valid_from: string | null;
37316
+ valid_until: string | null;
37317
+ };
37318
+ Insert: {
37319
+ base_price?: number | null;
37320
+ created_at?: string;
37321
+ currency?: string;
37322
+ customer_id: string;
37323
+ id?: string;
37324
+ min_quantity?: number;
37325
+ net_price: number;
37326
+ notes?: string | null;
37327
+ product_category_id?: string | null;
37328
+ product_id?: string | null;
37329
+ updated_at?: string;
37330
+ valid_from?: string | null;
37331
+ valid_until?: string | null;
37332
+ };
37333
+ Update: {
37334
+ base_price?: number | null;
37335
+ created_at?: string;
37336
+ currency?: string;
37337
+ customer_id?: string;
37338
+ id?: string;
37339
+ min_quantity?: number;
37340
+ net_price?: number;
37341
+ notes?: string | null;
37342
+ product_category_id?: string | null;
37343
+ product_id?: string | null;
37344
+ updated_at?: string;
37345
+ valid_from?: string | null;
37346
+ valid_until?: string | null;
37347
+ };
37348
+ Relationships: [{
37349
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
37350
+ columns: ["customer_id"];
37351
+ isOneToOne: false;
37352
+ referencedRelation: "customers";
37353
+ referencedColumns: ["id"];
37354
+ }, {
37355
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
37356
+ columns: ["product_category_id"];
37357
+ isOneToOne: false;
37358
+ referencedRelation: "product_categories";
37359
+ referencedColumns: ["id"];
37360
+ }, {
37361
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
37362
+ columns: ["product_id"];
37363
+ isOneToOne: false;
37364
+ referencedRelation: "products";
37365
+ referencedColumns: ["id"];
37366
+ }];
37367
+ };
37368
+ local_customer_price_groups: {
37369
+ Row: {
37370
+ created_at: string;
37371
+ currency: string;
37372
+ customer_id: string;
37373
+ discount_type: string;
37374
+ discount_value: number;
37375
+ id: string;
37376
+ min_quantity: number;
37377
+ notes: string | null;
37378
+ product_category_id: string | null;
37379
+ product_id: string | null;
37380
+ updated_at: string;
37381
+ valid_from: string | null;
37382
+ valid_until: string | null;
37383
+ };
37384
+ Insert: {
37385
+ created_at?: string;
37386
+ currency?: string;
37387
+ customer_id: string;
37388
+ discount_type: string;
37389
+ discount_value: number;
37390
+ id?: string;
37391
+ min_quantity?: number;
37392
+ notes?: string | null;
37393
+ product_category_id?: string | null;
37394
+ product_id?: string | null;
37395
+ updated_at?: string;
37396
+ valid_from?: string | null;
37397
+ valid_until?: string | null;
37398
+ };
37399
+ Update: {
37400
+ created_at?: string;
37401
+ currency?: string;
37402
+ customer_id?: string;
37403
+ discount_type?: string;
37404
+ discount_value?: number;
37405
+ id?: string;
37406
+ min_quantity?: number;
37407
+ notes?: string | null;
37408
+ product_category_id?: string | null;
37409
+ product_id?: string | null;
37410
+ updated_at?: string;
37411
+ valid_from?: string | null;
37412
+ valid_until?: string | null;
37413
+ };
37414
+ Relationships: [{
37415
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
37416
+ columns: ["customer_id"];
37417
+ isOneToOne: false;
37418
+ referencedRelation: "customers";
37419
+ referencedColumns: ["id"];
37420
+ }, {
37421
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
37422
+ columns: ["product_category_id"];
37423
+ isOneToOne: false;
37424
+ referencedRelation: "product_categories";
37425
+ referencedColumns: ["id"];
37426
+ }, {
37427
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
37428
+ columns: ["product_id"];
37429
+ isOneToOne: false;
37430
+ referencedRelation: "products";
37431
+ referencedColumns: ["id"];
37432
+ }];
37433
+ };
37434
+ local_customer_sales_strategies: {
37435
+ Row: {
37436
+ created_at: string;
37437
+ currency: string;
37438
+ customer_id: string;
37439
+ discount_type: string;
37440
+ discount_value: number;
37441
+ id: string;
37442
+ min_quantity: number;
37443
+ notes: string | null;
37444
+ product_category_id: string | null;
37445
+ product_id: string | null;
37446
+ updated_at: string;
37447
+ valid_from: string | null;
37448
+ valid_until: string | null;
37449
+ };
37450
+ Insert: {
37451
+ created_at?: string;
37452
+ currency?: string;
37453
+ customer_id: string;
37454
+ discount_type: string;
37455
+ discount_value: number;
37456
+ id?: string;
37457
+ min_quantity?: number;
37458
+ notes?: string | null;
37459
+ product_category_id?: string | null;
37460
+ product_id?: string | null;
37461
+ updated_at?: string;
37462
+ valid_from?: string | null;
37463
+ valid_until?: string | null;
37464
+ };
37465
+ Update: {
37466
+ created_at?: string;
37467
+ currency?: string;
37468
+ customer_id?: string;
37469
+ discount_type?: string;
37470
+ discount_value?: number;
37471
+ id?: string;
37472
+ min_quantity?: number;
37473
+ notes?: string | null;
37474
+ product_category_id?: string | null;
37475
+ product_id?: string | null;
37476
+ updated_at?: string;
37477
+ valid_from?: string | null;
37478
+ valid_until?: string | null;
37479
+ };
37480
+ Relationships: [{
37481
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
37482
+ columns: ["customer_id"];
37483
+ isOneToOne: false;
37484
+ referencedRelation: "customers";
37485
+ referencedColumns: ["id"];
37486
+ }, {
37487
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
37488
+ columns: ["product_category_id"];
37489
+ isOneToOne: false;
37490
+ referencedRelation: "product_categories";
37491
+ referencedColumns: ["id"];
37492
+ }, {
37493
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
37494
+ columns: ["product_id"];
37495
+ isOneToOne: false;
37496
+ referencedRelation: "products";
37497
+ referencedColumns: ["id"];
37498
+ }];
37499
+ };
35160
37500
  locations: {
35161
37501
  Row: {
35162
37502
  created_at: string;
@@ -35664,6 +38004,273 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
35664
38004
  referencedColumns: ["id"];
35665
38005
  }];
35666
38006
  };
38007
+ nmbrs_component_mapping: {
38008
+ Row: {
38009
+ created_at: string;
38010
+ id: string;
38011
+ source_kind: string;
38012
+ source_value: string | null;
38013
+ updated_at: string;
38014
+ wage_code: string;
38015
+ };
38016
+ Insert: {
38017
+ created_at?: string;
38018
+ id?: string;
38019
+ source_kind: string;
38020
+ source_value?: string | null;
38021
+ updated_at?: string;
38022
+ wage_code: string;
38023
+ };
38024
+ Update: {
38025
+ created_at?: string;
38026
+ id?: string;
38027
+ source_kind?: string;
38028
+ source_value?: string | null;
38029
+ updated_at?: string;
38030
+ wage_code?: string;
38031
+ };
38032
+ Relationships: [{
38033
+ foreignKeyName: "nmbrs_component_mapping_wage_code_fkey";
38034
+ columns: ["wage_code"];
38035
+ isOneToOne: false;
38036
+ referencedRelation: "nmbrs_wage_components";
38037
+ referencedColumns: ["code"];
38038
+ }];
38039
+ };
38040
+ nmbrs_employee_mapping: {
38041
+ Row: {
38042
+ active_from: string | null;
38043
+ active_to: string | null;
38044
+ contract_hours_per_week: number | null;
38045
+ created_at: string;
38046
+ hourly_wage: number | null;
38047
+ id: string;
38048
+ monteur_id: string;
38049
+ nmbrs_company_code: string | null;
38050
+ nmbrs_employee_number: string;
38051
+ updated_at: string;
38052
+ };
38053
+ Insert: {
38054
+ active_from?: string | null;
38055
+ active_to?: string | null;
38056
+ contract_hours_per_week?: number | null;
38057
+ created_at?: string;
38058
+ hourly_wage?: number | null;
38059
+ id?: string;
38060
+ monteur_id: string;
38061
+ nmbrs_company_code?: string | null;
38062
+ nmbrs_employee_number: string;
38063
+ updated_at?: string;
38064
+ };
38065
+ Update: {
38066
+ active_from?: string | null;
38067
+ active_to?: string | null;
38068
+ contract_hours_per_week?: number | null;
38069
+ created_at?: string;
38070
+ hourly_wage?: number | null;
38071
+ id?: string;
38072
+ monteur_id?: string;
38073
+ nmbrs_company_code?: string | null;
38074
+ nmbrs_employee_number?: string;
38075
+ updated_at?: string;
38076
+ };
38077
+ Relationships: [{
38078
+ foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
38079
+ columns: ["monteur_id"];
38080
+ isOneToOne: true;
38081
+ referencedRelation: "monteurs";
38082
+ referencedColumns: ["id"];
38083
+ }];
38084
+ };
38085
+ nmbrs_export_lines: {
38086
+ Row: {
38087
+ amount: number;
38088
+ created_at: string;
38089
+ entry_date: string;
38090
+ hours: number;
38091
+ id: string;
38092
+ monteur_id: string;
38093
+ nmbrs_employee_number: string | null;
38094
+ notes: string | null;
38095
+ run_id: string;
38096
+ source_kind: string | null;
38097
+ source_ref_id: string | null;
38098
+ updated_at: string;
38099
+ wage_code: string;
38100
+ };
38101
+ Insert: {
38102
+ amount?: number;
38103
+ created_at?: string;
38104
+ entry_date: string;
38105
+ hours?: number;
38106
+ id?: string;
38107
+ monteur_id: string;
38108
+ nmbrs_employee_number?: string | null;
38109
+ notes?: string | null;
38110
+ run_id: string;
38111
+ source_kind?: string | null;
38112
+ source_ref_id?: string | null;
38113
+ updated_at?: string;
38114
+ wage_code: string;
38115
+ };
38116
+ Update: {
38117
+ amount?: number;
38118
+ created_at?: string;
38119
+ entry_date?: string;
38120
+ hours?: number;
38121
+ id?: string;
38122
+ monteur_id?: string;
38123
+ nmbrs_employee_number?: string | null;
38124
+ notes?: string | null;
38125
+ run_id?: string;
38126
+ source_kind?: string | null;
38127
+ source_ref_id?: string | null;
38128
+ updated_at?: string;
38129
+ wage_code?: string;
38130
+ };
38131
+ Relationships: [{
38132
+ foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
38133
+ columns: ["monteur_id"];
38134
+ isOneToOne: false;
38135
+ referencedRelation: "monteurs";
38136
+ referencedColumns: ["id"];
38137
+ }, {
38138
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
38139
+ columns: ["run_id"];
38140
+ isOneToOne: false;
38141
+ referencedRelation: "nmbrs_export_runs";
38142
+ referencedColumns: ["id"];
38143
+ }, {
38144
+ foreignKeyName: "nmbrs_export_lines_wage_code_fkey";
38145
+ columns: ["wage_code"];
38146
+ isOneToOne: false;
38147
+ referencedRelation: "nmbrs_wage_components";
38148
+ referencedColumns: ["code"];
38149
+ }];
38150
+ };
38151
+ nmbrs_export_runs: {
38152
+ Row: {
38153
+ created_at: string;
38154
+ file_name: string | null;
38155
+ generated_at: string;
38156
+ generated_by: string | null;
38157
+ id: string;
38158
+ notes: string | null;
38159
+ period_end: string;
38160
+ period_label: string;
38161
+ period_start: string;
38162
+ status: string;
38163
+ total_hours: number;
38164
+ total_lines: number;
38165
+ updated_at: string;
38166
+ };
38167
+ Insert: {
38168
+ created_at?: string;
38169
+ file_name?: string | null;
38170
+ generated_at?: string;
38171
+ generated_by?: string | null;
38172
+ id?: string;
38173
+ notes?: string | null;
38174
+ period_end: string;
38175
+ period_label: string;
38176
+ period_start: string;
38177
+ status?: string;
38178
+ total_hours?: number;
38179
+ total_lines?: number;
38180
+ updated_at?: string;
38181
+ };
38182
+ Update: {
38183
+ created_at?: string;
38184
+ file_name?: string | null;
38185
+ generated_at?: string;
38186
+ generated_by?: string | null;
38187
+ id?: string;
38188
+ notes?: string | null;
38189
+ period_end?: string;
38190
+ period_label?: string;
38191
+ period_start?: string;
38192
+ status?: string;
38193
+ total_hours?: number;
38194
+ total_lines?: number;
38195
+ updated_at?: string;
38196
+ };
38197
+ Relationships: [];
38198
+ };
38199
+ nmbrs_settings: {
38200
+ Row: {
38201
+ created_at: string;
38202
+ default_company_code: string | null;
38203
+ id: boolean;
38204
+ include_travel: boolean;
38205
+ overtime_threshold_daily: number;
38206
+ overtime_threshold_weekly: number;
38207
+ period_type: string;
38208
+ updated_at: string;
38209
+ updated_by: string | null;
38210
+ week_start_day: number;
38211
+ };
38212
+ Insert: {
38213
+ created_at?: string;
38214
+ default_company_code?: string | null;
38215
+ id?: boolean;
38216
+ include_travel?: boolean;
38217
+ overtime_threshold_daily?: number;
38218
+ overtime_threshold_weekly?: number;
38219
+ period_type?: string;
38220
+ updated_at?: string;
38221
+ updated_by?: string | null;
38222
+ week_start_day?: number;
38223
+ };
38224
+ Update: {
38225
+ created_at?: string;
38226
+ default_company_code?: string | null;
38227
+ id?: boolean;
38228
+ include_travel?: boolean;
38229
+ overtime_threshold_daily?: number;
38230
+ overtime_threshold_weekly?: number;
38231
+ period_type?: string;
38232
+ updated_at?: string;
38233
+ updated_by?: string | null;
38234
+ week_start_day?: number;
38235
+ };
38236
+ Relationships: [];
38237
+ };
38238
+ nmbrs_wage_components: {
38239
+ Row: {
38240
+ category: string;
38241
+ code: string;
38242
+ created_at: string;
38243
+ id: string;
38244
+ is_active: boolean;
38245
+ label: string;
38246
+ sort_order: number;
38247
+ unit: string;
38248
+ updated_at: string;
38249
+ };
38250
+ Insert: {
38251
+ category: string;
38252
+ code: string;
38253
+ created_at?: string;
38254
+ id?: string;
38255
+ is_active?: boolean;
38256
+ label: string;
38257
+ sort_order?: number;
38258
+ unit: string;
38259
+ updated_at?: string;
38260
+ };
38261
+ Update: {
38262
+ category?: string;
38263
+ code?: string;
38264
+ created_at?: string;
38265
+ id?: string;
38266
+ is_active?: boolean;
38267
+ label?: string;
38268
+ sort_order?: number;
38269
+ unit?: string;
38270
+ updated_at?: string;
38271
+ };
38272
+ Relationships: [];
38273
+ };
35667
38274
  notifications: {
35668
38275
  Row: {
35669
38276
  created_at: string;
@@ -37512,6 +40119,48 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
37512
40119
  };
37513
40120
  Relationships: [];
37514
40121
  };
40122
+ stock_import_runs: {
40123
+ Row: {
40124
+ connection_id: string | null;
40125
+ created_at: string;
40126
+ created_rows: number;
40127
+ errors: import("../integrations/supabase/types").Json;
40128
+ filename: string | null;
40129
+ id: string;
40130
+ mutations: import("../integrations/supabase/types").Json;
40131
+ skipped_rows: number;
40132
+ total_rows: number;
40133
+ updated_rows: number;
40134
+ user_id: string;
40135
+ };
40136
+ Insert: {
40137
+ connection_id?: string | null;
40138
+ created_at?: string;
40139
+ created_rows?: number;
40140
+ errors?: import("../integrations/supabase/types").Json;
40141
+ filename?: string | null;
40142
+ id?: string;
40143
+ mutations?: import("../integrations/supabase/types").Json;
40144
+ skipped_rows?: number;
40145
+ total_rows?: number;
40146
+ updated_rows?: number;
40147
+ user_id: string;
40148
+ };
40149
+ Update: {
40150
+ connection_id?: string | null;
40151
+ created_at?: string;
40152
+ created_rows?: number;
40153
+ errors?: import("../integrations/supabase/types").Json;
40154
+ filename?: string | null;
40155
+ id?: string;
40156
+ mutations?: import("../integrations/supabase/types").Json;
40157
+ skipped_rows?: number;
40158
+ total_rows?: number;
40159
+ updated_rows?: number;
40160
+ user_id?: string;
40161
+ };
40162
+ Relationships: [];
40163
+ };
37515
40164
  stock_mutation_log: {
37516
40165
  Row: {
37517
40166
  connection_id: string | null;
@@ -39143,6 +41792,44 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
39143
41792
  };
39144
41793
  Relationships: [];
39145
41794
  };
41795
+ floriday_customer_discounts: {
41796
+ Row: {
41797
+ base_price: number | null;
41798
+ buyer_organization_id: string | null;
41799
+ currency: string | null;
41800
+ discount_type: string | null;
41801
+ discount_value: number | null;
41802
+ min_quantity: number | null;
41803
+ net_price: number | null;
41804
+ product_group_id: string | null;
41805
+ raw: import("../integrations/supabase/types").Json | null;
41806
+ source: string | null;
41807
+ source_id: string | null;
41808
+ trade_item_id: string | null;
41809
+ valid_from: string | null;
41810
+ valid_until: string | null;
41811
+ };
41812
+ Relationships: [];
41813
+ };
41814
+ local_customer_discounts: {
41815
+ Row: {
41816
+ base_price: number | null;
41817
+ currency: string | null;
41818
+ customer_id: string | null;
41819
+ discount_type: string | null;
41820
+ discount_value: number | null;
41821
+ min_quantity: number | null;
41822
+ net_price: number | null;
41823
+ product_category_id: string | null;
41824
+ product_id: string | null;
41825
+ product_name: string | null;
41826
+ source: string | null;
41827
+ source_id: string | null;
41828
+ valid_from: string | null;
41829
+ valid_until: string | null;
41830
+ };
41831
+ Relationships: [];
41832
+ };
39146
41833
  manufacture_product_possible_stock_view: {
39147
41834
  Row: {
39148
41835
  component_count: number | null;
@@ -39510,6 +42197,28 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
39510
42197
  };
39511
42198
  Returns: number;
39512
42199
  };
42200
+ check_offer_product_available_stock: {
42201
+ Args: {
42202
+ p_campaign_product_id: string;
42203
+ p_code: string;
42204
+ p_needed_qty?: number;
42205
+ p_product_name?: string;
42206
+ };
42207
+ Returns: import("../integrations/supabase/types").Json;
42208
+ };
42209
+ check_trade_item_available_stock: {
42210
+ Args: {
42211
+ p_connection_id?: string;
42212
+ p_context?: string;
42213
+ p_needed_qty?: number;
42214
+ p_order_id?: string;
42215
+ p_order_item_id?: string;
42216
+ p_owner_id?: string;
42217
+ p_product_name?: string;
42218
+ p_trade_item_key: string;
42219
+ };
42220
+ Returns: import("../integrations/supabase/types").Json;
42221
+ };
39513
42222
  cleanup_old_bookings: {
39514
42223
  Args: never;
39515
42224
  Returns: number;
@@ -39594,6 +42303,12 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
39594
42303
  status: string;
39595
42304
  }[];
39596
42305
  };
42306
+ ensure_trade_item_stock_row: {
42307
+ Args: {
42308
+ p_key: string;
42309
+ };
42310
+ Returns: undefined;
42311
+ };
39597
42312
  ensure_user_tenant: {
39598
42313
  Args: never;
39599
42314
  Returns: string;
@@ -39631,12 +42346,31 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
39631
42346
  };
39632
42347
  Returns: boolean;
39633
42348
  };
39634
- find_trade_item_key_by_name: {
42349
+ find_trade_item_key: {
39635
42350
  Args: {
42351
+ p_barcode: string;
39636
42352
  p_name: string;
42353
+ p_product_id: string;
39637
42354
  };
39638
42355
  Returns: string;
39639
42356
  };
42357
+ floriday_effective_price: {
42358
+ Args: {
42359
+ _buyer_id: string;
42360
+ _on_date?: string;
42361
+ _quantity?: number;
42362
+ _trade_item_id: string;
42363
+ };
42364
+ Returns: {
42365
+ base_price: number;
42366
+ currency: string;
42367
+ discount_type: string;
42368
+ discount_value: number;
42369
+ net_price: number;
42370
+ source: string;
42371
+ source_id: string;
42372
+ }[];
42373
+ };
39640
42374
  format_cart_number: {
39641
42375
  Args: {
39642
42376
  p_pick_date: string;
@@ -39657,6 +42391,13 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
39657
42391
  preferred_warehouse_name: string;
39658
42392
  }[];
39659
42393
  };
42394
+ get_active_floriday_context: {
42395
+ Args: never;
42396
+ Returns: {
42397
+ connection_id: string;
42398
+ user_id: string;
42399
+ }[];
42400
+ };
39660
42401
  get_active_twinfield_public: {
39661
42402
  Args: never;
39662
42403
  Returns: {
@@ -39759,6 +42500,18 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
39759
42500
  };
39760
42501
  Returns: import("../integrations/supabase/types").Json;
39761
42502
  };
42503
+ get_offer_recipient_by_code: {
42504
+ Args: {
42505
+ p_code: string;
42506
+ };
42507
+ Returns: {
42508
+ campaign_id: string;
42509
+ clicked_at: string;
42510
+ customer_id: string;
42511
+ id: string;
42512
+ ordered_at: string;
42513
+ }[];
42514
+ };
39762
42515
  get_or_assign_floriday_order_number: {
39763
42516
  Args: {
39764
42517
  p_floriday_id: string;
@@ -39811,6 +42564,34 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
39811
42564
  Args: never;
39812
42565
  Returns: boolean;
39813
42566
  };
42567
+ local_effective_price: {
42568
+ Args: {
42569
+ _customer_id: string;
42570
+ _on_date?: string;
42571
+ _product_id: string;
42572
+ _quantity?: number;
42573
+ };
42574
+ Returns: {
42575
+ currency: string;
42576
+ discount_type: string;
42577
+ discount_value: number;
42578
+ net_price: number;
42579
+ source: string;
42580
+ source_id: string;
42581
+ }[];
42582
+ };
42583
+ mark_offer_clicked: {
42584
+ Args: {
42585
+ p_code: string;
42586
+ };
42587
+ Returns: undefined;
42588
+ };
42589
+ mark_offer_ordered: {
42590
+ Args: {
42591
+ p_code: string;
42592
+ };
42593
+ Returns: undefined;
42594
+ };
39814
42595
  next_order_number: {
39815
42596
  Args: {
39816
42597
  p_prefix: string;
@@ -39830,6 +42611,14 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
39830
42611
  };
39831
42612
  Returns: string;
39832
42613
  };
42614
+ offer_recipient_matches: {
42615
+ Args: {
42616
+ _campaign_id: string;
42617
+ _customer_id: string;
42618
+ _recipient_id: string;
42619
+ };
42620
+ Returns: boolean;
42621
+ };
39833
42622
  pickstation_get_orders_raw: {
39834
42623
  Args: never;
39835
42624
  Returns: import("../integrations/supabase/types").Json;
@@ -39857,6 +42646,13 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
39857
42646
  };
39858
42647
  Returns: undefined;
39859
42648
  };
42649
+ promote_trade_item_key: {
42650
+ Args: {
42651
+ p_new: string;
42652
+ p_old: string;
42653
+ };
42654
+ Returns: undefined;
42655
+ };
39860
42656
  refresh_floricode_derived_code_lists: {
39861
42657
  Args: never;
39862
42658
  Returns: {
@@ -43815,6 +46611,51 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
43815
46611
  referencedColumns: ["id"];
43816
46612
  }];
43817
46613
  };
46614
+ floriday_continuous_stock_queue: {
46615
+ Row: {
46616
+ attempts: number;
46617
+ connection_id: string;
46618
+ created_at: string;
46619
+ gateway_attempt_id: string | null;
46620
+ id: string;
46621
+ last_error: string | null;
46622
+ number_of_pieces: number;
46623
+ sent_at: string | null;
46624
+ status: string;
46625
+ trade_item_id: string;
46626
+ updated_at: string;
46627
+ user_id: string;
46628
+ };
46629
+ Insert: {
46630
+ attempts?: number;
46631
+ connection_id: string;
46632
+ created_at?: string;
46633
+ gateway_attempt_id?: string | null;
46634
+ id?: string;
46635
+ last_error?: string | null;
46636
+ number_of_pieces?: number;
46637
+ sent_at?: string | null;
46638
+ status?: string;
46639
+ trade_item_id: string;
46640
+ updated_at?: string;
46641
+ user_id: string;
46642
+ };
46643
+ Update: {
46644
+ attempts?: number;
46645
+ connection_id?: string;
46646
+ created_at?: string;
46647
+ gateway_attempt_id?: string | null;
46648
+ id?: string;
46649
+ last_error?: string | null;
46650
+ number_of_pieces?: number;
46651
+ sent_at?: string | null;
46652
+ status?: string;
46653
+ trade_item_id?: string;
46654
+ updated_at?: string;
46655
+ user_id?: string;
46656
+ };
46657
+ Relationships: [];
46658
+ };
43818
46659
  floriday_contract_trade_item_groups_cache: {
43819
46660
  Row: {
43820
46661
  connection_id: string;
@@ -45204,6 +48045,204 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
45204
48045
  };
45205
48046
  Relationships: [];
45206
48047
  };
48048
+ local_customer_agreements: {
48049
+ Row: {
48050
+ base_price: number | null;
48051
+ created_at: string;
48052
+ currency: string;
48053
+ customer_id: string;
48054
+ id: string;
48055
+ min_quantity: number;
48056
+ net_price: number;
48057
+ notes: string | null;
48058
+ product_category_id: string | null;
48059
+ product_id: string | null;
48060
+ updated_at: string;
48061
+ valid_from: string | null;
48062
+ valid_until: string | null;
48063
+ };
48064
+ Insert: {
48065
+ base_price?: number | null;
48066
+ created_at?: string;
48067
+ currency?: string;
48068
+ customer_id: string;
48069
+ id?: string;
48070
+ min_quantity?: number;
48071
+ net_price: number;
48072
+ notes?: string | null;
48073
+ product_category_id?: string | null;
48074
+ product_id?: string | null;
48075
+ updated_at?: string;
48076
+ valid_from?: string | null;
48077
+ valid_until?: string | null;
48078
+ };
48079
+ Update: {
48080
+ base_price?: number | null;
48081
+ created_at?: string;
48082
+ currency?: string;
48083
+ customer_id?: string;
48084
+ id?: string;
48085
+ min_quantity?: number;
48086
+ net_price?: number;
48087
+ notes?: string | null;
48088
+ product_category_id?: string | null;
48089
+ product_id?: string | null;
48090
+ updated_at?: string;
48091
+ valid_from?: string | null;
48092
+ valid_until?: string | null;
48093
+ };
48094
+ Relationships: [{
48095
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
48096
+ columns: ["customer_id"];
48097
+ isOneToOne: false;
48098
+ referencedRelation: "customers";
48099
+ referencedColumns: ["id"];
48100
+ }, {
48101
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
48102
+ columns: ["product_category_id"];
48103
+ isOneToOne: false;
48104
+ referencedRelation: "product_categories";
48105
+ referencedColumns: ["id"];
48106
+ }, {
48107
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
48108
+ columns: ["product_id"];
48109
+ isOneToOne: false;
48110
+ referencedRelation: "products";
48111
+ referencedColumns: ["id"];
48112
+ }];
48113
+ };
48114
+ local_customer_price_groups: {
48115
+ Row: {
48116
+ created_at: string;
48117
+ currency: string;
48118
+ customer_id: string;
48119
+ discount_type: string;
48120
+ discount_value: number;
48121
+ id: string;
48122
+ min_quantity: number;
48123
+ notes: string | null;
48124
+ product_category_id: string | null;
48125
+ product_id: string | null;
48126
+ updated_at: string;
48127
+ valid_from: string | null;
48128
+ valid_until: string | null;
48129
+ };
48130
+ Insert: {
48131
+ created_at?: string;
48132
+ currency?: string;
48133
+ customer_id: string;
48134
+ discount_type: string;
48135
+ discount_value: number;
48136
+ id?: string;
48137
+ min_quantity?: number;
48138
+ notes?: string | null;
48139
+ product_category_id?: string | null;
48140
+ product_id?: string | null;
48141
+ updated_at?: string;
48142
+ valid_from?: string | null;
48143
+ valid_until?: string | null;
48144
+ };
48145
+ Update: {
48146
+ created_at?: string;
48147
+ currency?: string;
48148
+ customer_id?: string;
48149
+ discount_type?: string;
48150
+ discount_value?: number;
48151
+ id?: string;
48152
+ min_quantity?: number;
48153
+ notes?: string | null;
48154
+ product_category_id?: string | null;
48155
+ product_id?: string | null;
48156
+ updated_at?: string;
48157
+ valid_from?: string | null;
48158
+ valid_until?: string | null;
48159
+ };
48160
+ Relationships: [{
48161
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
48162
+ columns: ["customer_id"];
48163
+ isOneToOne: false;
48164
+ referencedRelation: "customers";
48165
+ referencedColumns: ["id"];
48166
+ }, {
48167
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
48168
+ columns: ["product_category_id"];
48169
+ isOneToOne: false;
48170
+ referencedRelation: "product_categories";
48171
+ referencedColumns: ["id"];
48172
+ }, {
48173
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
48174
+ columns: ["product_id"];
48175
+ isOneToOne: false;
48176
+ referencedRelation: "products";
48177
+ referencedColumns: ["id"];
48178
+ }];
48179
+ };
48180
+ local_customer_sales_strategies: {
48181
+ Row: {
48182
+ created_at: string;
48183
+ currency: string;
48184
+ customer_id: string;
48185
+ discount_type: string;
48186
+ discount_value: number;
48187
+ id: string;
48188
+ min_quantity: number;
48189
+ notes: string | null;
48190
+ product_category_id: string | null;
48191
+ product_id: string | null;
48192
+ updated_at: string;
48193
+ valid_from: string | null;
48194
+ valid_until: string | null;
48195
+ };
48196
+ Insert: {
48197
+ created_at?: string;
48198
+ currency?: string;
48199
+ customer_id: string;
48200
+ discount_type: string;
48201
+ discount_value: number;
48202
+ id?: string;
48203
+ min_quantity?: number;
48204
+ notes?: string | null;
48205
+ product_category_id?: string | null;
48206
+ product_id?: string | null;
48207
+ updated_at?: string;
48208
+ valid_from?: string | null;
48209
+ valid_until?: string | null;
48210
+ };
48211
+ Update: {
48212
+ created_at?: string;
48213
+ currency?: string;
48214
+ customer_id?: string;
48215
+ discount_type?: string;
48216
+ discount_value?: number;
48217
+ id?: string;
48218
+ min_quantity?: number;
48219
+ notes?: string | null;
48220
+ product_category_id?: string | null;
48221
+ product_id?: string | null;
48222
+ updated_at?: string;
48223
+ valid_from?: string | null;
48224
+ valid_until?: string | null;
48225
+ };
48226
+ Relationships: [{
48227
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
48228
+ columns: ["customer_id"];
48229
+ isOneToOne: false;
48230
+ referencedRelation: "customers";
48231
+ referencedColumns: ["id"];
48232
+ }, {
48233
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
48234
+ columns: ["product_category_id"];
48235
+ isOneToOne: false;
48236
+ referencedRelation: "product_categories";
48237
+ referencedColumns: ["id"];
48238
+ }, {
48239
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
48240
+ columns: ["product_id"];
48241
+ isOneToOne: false;
48242
+ referencedRelation: "products";
48243
+ referencedColumns: ["id"];
48244
+ }];
48245
+ };
45207
48246
  locations: {
45208
48247
  Row: {
45209
48248
  created_at: string;
@@ -45711,6 +48750,273 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
45711
48750
  referencedColumns: ["id"];
45712
48751
  }];
45713
48752
  };
48753
+ nmbrs_component_mapping: {
48754
+ Row: {
48755
+ created_at: string;
48756
+ id: string;
48757
+ source_kind: string;
48758
+ source_value: string | null;
48759
+ updated_at: string;
48760
+ wage_code: string;
48761
+ };
48762
+ Insert: {
48763
+ created_at?: string;
48764
+ id?: string;
48765
+ source_kind: string;
48766
+ source_value?: string | null;
48767
+ updated_at?: string;
48768
+ wage_code: string;
48769
+ };
48770
+ Update: {
48771
+ created_at?: string;
48772
+ id?: string;
48773
+ source_kind?: string;
48774
+ source_value?: string | null;
48775
+ updated_at?: string;
48776
+ wage_code?: string;
48777
+ };
48778
+ Relationships: [{
48779
+ foreignKeyName: "nmbrs_component_mapping_wage_code_fkey";
48780
+ columns: ["wage_code"];
48781
+ isOneToOne: false;
48782
+ referencedRelation: "nmbrs_wage_components";
48783
+ referencedColumns: ["code"];
48784
+ }];
48785
+ };
48786
+ nmbrs_employee_mapping: {
48787
+ Row: {
48788
+ active_from: string | null;
48789
+ active_to: string | null;
48790
+ contract_hours_per_week: number | null;
48791
+ created_at: string;
48792
+ hourly_wage: number | null;
48793
+ id: string;
48794
+ monteur_id: string;
48795
+ nmbrs_company_code: string | null;
48796
+ nmbrs_employee_number: string;
48797
+ updated_at: string;
48798
+ };
48799
+ Insert: {
48800
+ active_from?: string | null;
48801
+ active_to?: string | null;
48802
+ contract_hours_per_week?: number | null;
48803
+ created_at?: string;
48804
+ hourly_wage?: number | null;
48805
+ id?: string;
48806
+ monteur_id: string;
48807
+ nmbrs_company_code?: string | null;
48808
+ nmbrs_employee_number: string;
48809
+ updated_at?: string;
48810
+ };
48811
+ Update: {
48812
+ active_from?: string | null;
48813
+ active_to?: string | null;
48814
+ contract_hours_per_week?: number | null;
48815
+ created_at?: string;
48816
+ hourly_wage?: number | null;
48817
+ id?: string;
48818
+ monteur_id?: string;
48819
+ nmbrs_company_code?: string | null;
48820
+ nmbrs_employee_number?: string;
48821
+ updated_at?: string;
48822
+ };
48823
+ Relationships: [{
48824
+ foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
48825
+ columns: ["monteur_id"];
48826
+ isOneToOne: true;
48827
+ referencedRelation: "monteurs";
48828
+ referencedColumns: ["id"];
48829
+ }];
48830
+ };
48831
+ nmbrs_export_lines: {
48832
+ Row: {
48833
+ amount: number;
48834
+ created_at: string;
48835
+ entry_date: string;
48836
+ hours: number;
48837
+ id: string;
48838
+ monteur_id: string;
48839
+ nmbrs_employee_number: string | null;
48840
+ notes: string | null;
48841
+ run_id: string;
48842
+ source_kind: string | null;
48843
+ source_ref_id: string | null;
48844
+ updated_at: string;
48845
+ wage_code: string;
48846
+ };
48847
+ Insert: {
48848
+ amount?: number;
48849
+ created_at?: string;
48850
+ entry_date: string;
48851
+ hours?: number;
48852
+ id?: string;
48853
+ monteur_id: string;
48854
+ nmbrs_employee_number?: string | null;
48855
+ notes?: string | null;
48856
+ run_id: string;
48857
+ source_kind?: string | null;
48858
+ source_ref_id?: string | null;
48859
+ updated_at?: string;
48860
+ wage_code: string;
48861
+ };
48862
+ Update: {
48863
+ amount?: number;
48864
+ created_at?: string;
48865
+ entry_date?: string;
48866
+ hours?: number;
48867
+ id?: string;
48868
+ monteur_id?: string;
48869
+ nmbrs_employee_number?: string | null;
48870
+ notes?: string | null;
48871
+ run_id?: string;
48872
+ source_kind?: string | null;
48873
+ source_ref_id?: string | null;
48874
+ updated_at?: string;
48875
+ wage_code?: string;
48876
+ };
48877
+ Relationships: [{
48878
+ foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
48879
+ columns: ["monteur_id"];
48880
+ isOneToOne: false;
48881
+ referencedRelation: "monteurs";
48882
+ referencedColumns: ["id"];
48883
+ }, {
48884
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
48885
+ columns: ["run_id"];
48886
+ isOneToOne: false;
48887
+ referencedRelation: "nmbrs_export_runs";
48888
+ referencedColumns: ["id"];
48889
+ }, {
48890
+ foreignKeyName: "nmbrs_export_lines_wage_code_fkey";
48891
+ columns: ["wage_code"];
48892
+ isOneToOne: false;
48893
+ referencedRelation: "nmbrs_wage_components";
48894
+ referencedColumns: ["code"];
48895
+ }];
48896
+ };
48897
+ nmbrs_export_runs: {
48898
+ Row: {
48899
+ created_at: string;
48900
+ file_name: string | null;
48901
+ generated_at: string;
48902
+ generated_by: string | null;
48903
+ id: string;
48904
+ notes: string | null;
48905
+ period_end: string;
48906
+ period_label: string;
48907
+ period_start: string;
48908
+ status: string;
48909
+ total_hours: number;
48910
+ total_lines: number;
48911
+ updated_at: string;
48912
+ };
48913
+ Insert: {
48914
+ created_at?: string;
48915
+ file_name?: string | null;
48916
+ generated_at?: string;
48917
+ generated_by?: string | null;
48918
+ id?: string;
48919
+ notes?: string | null;
48920
+ period_end: string;
48921
+ period_label: string;
48922
+ period_start: string;
48923
+ status?: string;
48924
+ total_hours?: number;
48925
+ total_lines?: number;
48926
+ updated_at?: string;
48927
+ };
48928
+ Update: {
48929
+ created_at?: string;
48930
+ file_name?: string | null;
48931
+ generated_at?: string;
48932
+ generated_by?: string | null;
48933
+ id?: string;
48934
+ notes?: string | null;
48935
+ period_end?: string;
48936
+ period_label?: string;
48937
+ period_start?: string;
48938
+ status?: string;
48939
+ total_hours?: number;
48940
+ total_lines?: number;
48941
+ updated_at?: string;
48942
+ };
48943
+ Relationships: [];
48944
+ };
48945
+ nmbrs_settings: {
48946
+ Row: {
48947
+ created_at: string;
48948
+ default_company_code: string | null;
48949
+ id: boolean;
48950
+ include_travel: boolean;
48951
+ overtime_threshold_daily: number;
48952
+ overtime_threshold_weekly: number;
48953
+ period_type: string;
48954
+ updated_at: string;
48955
+ updated_by: string | null;
48956
+ week_start_day: number;
48957
+ };
48958
+ Insert: {
48959
+ created_at?: string;
48960
+ default_company_code?: string | null;
48961
+ id?: boolean;
48962
+ include_travel?: boolean;
48963
+ overtime_threshold_daily?: number;
48964
+ overtime_threshold_weekly?: number;
48965
+ period_type?: string;
48966
+ updated_at?: string;
48967
+ updated_by?: string | null;
48968
+ week_start_day?: number;
48969
+ };
48970
+ Update: {
48971
+ created_at?: string;
48972
+ default_company_code?: string | null;
48973
+ id?: boolean;
48974
+ include_travel?: boolean;
48975
+ overtime_threshold_daily?: number;
48976
+ overtime_threshold_weekly?: number;
48977
+ period_type?: string;
48978
+ updated_at?: string;
48979
+ updated_by?: string | null;
48980
+ week_start_day?: number;
48981
+ };
48982
+ Relationships: [];
48983
+ };
48984
+ nmbrs_wage_components: {
48985
+ Row: {
48986
+ category: string;
48987
+ code: string;
48988
+ created_at: string;
48989
+ id: string;
48990
+ is_active: boolean;
48991
+ label: string;
48992
+ sort_order: number;
48993
+ unit: string;
48994
+ updated_at: string;
48995
+ };
48996
+ Insert: {
48997
+ category: string;
48998
+ code: string;
48999
+ created_at?: string;
49000
+ id?: string;
49001
+ is_active?: boolean;
49002
+ label: string;
49003
+ sort_order?: number;
49004
+ unit: string;
49005
+ updated_at?: string;
49006
+ };
49007
+ Update: {
49008
+ category?: string;
49009
+ code?: string;
49010
+ created_at?: string;
49011
+ id?: string;
49012
+ is_active?: boolean;
49013
+ label?: string;
49014
+ sort_order?: number;
49015
+ unit?: string;
49016
+ updated_at?: string;
49017
+ };
49018
+ Relationships: [];
49019
+ };
45714
49020
  notifications: {
45715
49021
  Row: {
45716
49022
  created_at: string;
@@ -47559,6 +50865,48 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
47559
50865
  };
47560
50866
  Relationships: [];
47561
50867
  };
50868
+ stock_import_runs: {
50869
+ Row: {
50870
+ connection_id: string | null;
50871
+ created_at: string;
50872
+ created_rows: number;
50873
+ errors: import("../integrations/supabase/types").Json;
50874
+ filename: string | null;
50875
+ id: string;
50876
+ mutations: import("../integrations/supabase/types").Json;
50877
+ skipped_rows: number;
50878
+ total_rows: number;
50879
+ updated_rows: number;
50880
+ user_id: string;
50881
+ };
50882
+ Insert: {
50883
+ connection_id?: string | null;
50884
+ created_at?: string;
50885
+ created_rows?: number;
50886
+ errors?: import("../integrations/supabase/types").Json;
50887
+ filename?: string | null;
50888
+ id?: string;
50889
+ mutations?: import("../integrations/supabase/types").Json;
50890
+ skipped_rows?: number;
50891
+ total_rows?: number;
50892
+ updated_rows?: number;
50893
+ user_id: string;
50894
+ };
50895
+ Update: {
50896
+ connection_id?: string | null;
50897
+ created_at?: string;
50898
+ created_rows?: number;
50899
+ errors?: import("../integrations/supabase/types").Json;
50900
+ filename?: string | null;
50901
+ id?: string;
50902
+ mutations?: import("../integrations/supabase/types").Json;
50903
+ skipped_rows?: number;
50904
+ total_rows?: number;
50905
+ updated_rows?: number;
50906
+ user_id?: string;
50907
+ };
50908
+ Relationships: [];
50909
+ };
47562
50910
  stock_mutation_log: {
47563
50911
  Row: {
47564
50912
  connection_id: string | null;
@@ -49190,6 +52538,44 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
49190
52538
  };
49191
52539
  Relationships: [];
49192
52540
  };
52541
+ floriday_customer_discounts: {
52542
+ Row: {
52543
+ base_price: number | null;
52544
+ buyer_organization_id: string | null;
52545
+ currency: string | null;
52546
+ discount_type: string | null;
52547
+ discount_value: number | null;
52548
+ min_quantity: number | null;
52549
+ net_price: number | null;
52550
+ product_group_id: string | null;
52551
+ raw: import("../integrations/supabase/types").Json | null;
52552
+ source: string | null;
52553
+ source_id: string | null;
52554
+ trade_item_id: string | null;
52555
+ valid_from: string | null;
52556
+ valid_until: string | null;
52557
+ };
52558
+ Relationships: [];
52559
+ };
52560
+ local_customer_discounts: {
52561
+ Row: {
52562
+ base_price: number | null;
52563
+ currency: string | null;
52564
+ customer_id: string | null;
52565
+ discount_type: string | null;
52566
+ discount_value: number | null;
52567
+ min_quantity: number | null;
52568
+ net_price: number | null;
52569
+ product_category_id: string | null;
52570
+ product_id: string | null;
52571
+ product_name: string | null;
52572
+ source: string | null;
52573
+ source_id: string | null;
52574
+ valid_from: string | null;
52575
+ valid_until: string | null;
52576
+ };
52577
+ Relationships: [];
52578
+ };
49193
52579
  manufacture_product_possible_stock_view: {
49194
52580
  Row: {
49195
52581
  component_count: number | null;
@@ -49557,6 +52943,28 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
49557
52943
  };
49558
52944
  Returns: number;
49559
52945
  };
52946
+ check_offer_product_available_stock: {
52947
+ Args: {
52948
+ p_campaign_product_id: string;
52949
+ p_code: string;
52950
+ p_needed_qty?: number;
52951
+ p_product_name?: string;
52952
+ };
52953
+ Returns: import("../integrations/supabase/types").Json;
52954
+ };
52955
+ check_trade_item_available_stock: {
52956
+ Args: {
52957
+ p_connection_id?: string;
52958
+ p_context?: string;
52959
+ p_needed_qty?: number;
52960
+ p_order_id?: string;
52961
+ p_order_item_id?: string;
52962
+ p_owner_id?: string;
52963
+ p_product_name?: string;
52964
+ p_trade_item_key: string;
52965
+ };
52966
+ Returns: import("../integrations/supabase/types").Json;
52967
+ };
49560
52968
  cleanup_old_bookings: {
49561
52969
  Args: never;
49562
52970
  Returns: number;
@@ -49641,6 +53049,12 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
49641
53049
  status: string;
49642
53050
  }[];
49643
53051
  };
53052
+ ensure_trade_item_stock_row: {
53053
+ Args: {
53054
+ p_key: string;
53055
+ };
53056
+ Returns: undefined;
53057
+ };
49644
53058
  ensure_user_tenant: {
49645
53059
  Args: never;
49646
53060
  Returns: string;
@@ -49678,12 +53092,31 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
49678
53092
  };
49679
53093
  Returns: boolean;
49680
53094
  };
49681
- find_trade_item_key_by_name: {
53095
+ find_trade_item_key: {
49682
53096
  Args: {
53097
+ p_barcode: string;
49683
53098
  p_name: string;
53099
+ p_product_id: string;
49684
53100
  };
49685
53101
  Returns: string;
49686
53102
  };
53103
+ floriday_effective_price: {
53104
+ Args: {
53105
+ _buyer_id: string;
53106
+ _on_date?: string;
53107
+ _quantity?: number;
53108
+ _trade_item_id: string;
53109
+ };
53110
+ Returns: {
53111
+ base_price: number;
53112
+ currency: string;
53113
+ discount_type: string;
53114
+ discount_value: number;
53115
+ net_price: number;
53116
+ source: string;
53117
+ source_id: string;
53118
+ }[];
53119
+ };
49687
53120
  format_cart_number: {
49688
53121
  Args: {
49689
53122
  p_pick_date: string;
@@ -49704,6 +53137,13 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
49704
53137
  preferred_warehouse_name: string;
49705
53138
  }[];
49706
53139
  };
53140
+ get_active_floriday_context: {
53141
+ Args: never;
53142
+ Returns: {
53143
+ connection_id: string;
53144
+ user_id: string;
53145
+ }[];
53146
+ };
49707
53147
  get_active_twinfield_public: {
49708
53148
  Args: never;
49709
53149
  Returns: {
@@ -49806,6 +53246,18 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
49806
53246
  };
49807
53247
  Returns: import("../integrations/supabase/types").Json;
49808
53248
  };
53249
+ get_offer_recipient_by_code: {
53250
+ Args: {
53251
+ p_code: string;
53252
+ };
53253
+ Returns: {
53254
+ campaign_id: string;
53255
+ clicked_at: string;
53256
+ customer_id: string;
53257
+ id: string;
53258
+ ordered_at: string;
53259
+ }[];
53260
+ };
49809
53261
  get_or_assign_floriday_order_number: {
49810
53262
  Args: {
49811
53263
  p_floriday_id: string;
@@ -49858,6 +53310,34 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
49858
53310
  Args: never;
49859
53311
  Returns: boolean;
49860
53312
  };
53313
+ local_effective_price: {
53314
+ Args: {
53315
+ _customer_id: string;
53316
+ _on_date?: string;
53317
+ _product_id: string;
53318
+ _quantity?: number;
53319
+ };
53320
+ Returns: {
53321
+ currency: string;
53322
+ discount_type: string;
53323
+ discount_value: number;
53324
+ net_price: number;
53325
+ source: string;
53326
+ source_id: string;
53327
+ }[];
53328
+ };
53329
+ mark_offer_clicked: {
53330
+ Args: {
53331
+ p_code: string;
53332
+ };
53333
+ Returns: undefined;
53334
+ };
53335
+ mark_offer_ordered: {
53336
+ Args: {
53337
+ p_code: string;
53338
+ };
53339
+ Returns: undefined;
53340
+ };
49861
53341
  next_order_number: {
49862
53342
  Args: {
49863
53343
  p_prefix: string;
@@ -49877,6 +53357,14 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
49877
53357
  };
49878
53358
  Returns: string;
49879
53359
  };
53360
+ offer_recipient_matches: {
53361
+ Args: {
53362
+ _campaign_id: string;
53363
+ _customer_id: string;
53364
+ _recipient_id: string;
53365
+ };
53366
+ Returns: boolean;
53367
+ };
49880
53368
  pickstation_get_orders_raw: {
49881
53369
  Args: never;
49882
53370
  Returns: import("../integrations/supabase/types").Json;
@@ -49904,6 +53392,13 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
49904
53392
  };
49905
53393
  Returns: undefined;
49906
53394
  };
53395
+ promote_trade_item_key: {
53396
+ Args: {
53397
+ p_new: string;
53398
+ p_old: string;
53399
+ };
53400
+ Returns: undefined;
53401
+ };
49907
53402
  refresh_floricode_derived_code_lists: {
49908
53403
  Args: never;
49909
53404
  Returns: {