@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
@@ -3634,6 +3634,51 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
3634
3634
  referencedColumns: ["id"];
3635
3635
  }];
3636
3636
  };
3637
+ floriday_continuous_stock_queue: {
3638
+ Row: {
3639
+ attempts: number;
3640
+ connection_id: string;
3641
+ created_at: string;
3642
+ gateway_attempt_id: string | null;
3643
+ id: string;
3644
+ last_error: string | null;
3645
+ number_of_pieces: number;
3646
+ sent_at: string | null;
3647
+ status: string;
3648
+ trade_item_id: string;
3649
+ updated_at: string;
3650
+ user_id: string;
3651
+ };
3652
+ Insert: {
3653
+ attempts?: number;
3654
+ connection_id: string;
3655
+ created_at?: string;
3656
+ gateway_attempt_id?: string | null;
3657
+ id?: string;
3658
+ last_error?: string | null;
3659
+ number_of_pieces?: number;
3660
+ sent_at?: string | null;
3661
+ status?: string;
3662
+ trade_item_id: string;
3663
+ updated_at?: string;
3664
+ user_id: string;
3665
+ };
3666
+ Update: {
3667
+ attempts?: number;
3668
+ connection_id?: string;
3669
+ created_at?: string;
3670
+ gateway_attempt_id?: string | null;
3671
+ id?: string;
3672
+ last_error?: string | null;
3673
+ number_of_pieces?: number;
3674
+ sent_at?: string | null;
3675
+ status?: string;
3676
+ trade_item_id?: string;
3677
+ updated_at?: string;
3678
+ user_id?: string;
3679
+ };
3680
+ Relationships: [];
3681
+ };
3637
3682
  floriday_contract_trade_item_groups_cache: {
3638
3683
  Row: {
3639
3684
  connection_id: string;
@@ -5023,6 +5068,204 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
5023
5068
  };
5024
5069
  Relationships: [];
5025
5070
  };
5071
+ local_customer_agreements: {
5072
+ Row: {
5073
+ base_price: number | null;
5074
+ created_at: string;
5075
+ currency: string;
5076
+ customer_id: string;
5077
+ id: string;
5078
+ min_quantity: number;
5079
+ net_price: number;
5080
+ notes: string | null;
5081
+ product_category_id: string | null;
5082
+ product_id: string | null;
5083
+ updated_at: string;
5084
+ valid_from: string | null;
5085
+ valid_until: string | null;
5086
+ };
5087
+ Insert: {
5088
+ base_price?: number | null;
5089
+ created_at?: string;
5090
+ currency?: string;
5091
+ customer_id: string;
5092
+ id?: string;
5093
+ min_quantity?: number;
5094
+ net_price: number;
5095
+ notes?: string | null;
5096
+ product_category_id?: string | null;
5097
+ product_id?: string | null;
5098
+ updated_at?: string;
5099
+ valid_from?: string | null;
5100
+ valid_until?: string | null;
5101
+ };
5102
+ Update: {
5103
+ base_price?: number | null;
5104
+ created_at?: string;
5105
+ currency?: string;
5106
+ customer_id?: string;
5107
+ id?: string;
5108
+ min_quantity?: number;
5109
+ net_price?: number;
5110
+ notes?: string | null;
5111
+ product_category_id?: string | null;
5112
+ product_id?: string | null;
5113
+ updated_at?: string;
5114
+ valid_from?: string | null;
5115
+ valid_until?: string | null;
5116
+ };
5117
+ Relationships: [{
5118
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
5119
+ columns: ["customer_id"];
5120
+ isOneToOne: false;
5121
+ referencedRelation: "customers";
5122
+ referencedColumns: ["id"];
5123
+ }, {
5124
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
5125
+ columns: ["product_category_id"];
5126
+ isOneToOne: false;
5127
+ referencedRelation: "product_categories";
5128
+ referencedColumns: ["id"];
5129
+ }, {
5130
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
5131
+ columns: ["product_id"];
5132
+ isOneToOne: false;
5133
+ referencedRelation: "products";
5134
+ referencedColumns: ["id"];
5135
+ }];
5136
+ };
5137
+ local_customer_price_groups: {
5138
+ Row: {
5139
+ created_at: string;
5140
+ currency: string;
5141
+ customer_id: string;
5142
+ discount_type: string;
5143
+ discount_value: number;
5144
+ id: string;
5145
+ min_quantity: number;
5146
+ notes: string | null;
5147
+ product_category_id: string | null;
5148
+ product_id: string | null;
5149
+ updated_at: string;
5150
+ valid_from: string | null;
5151
+ valid_until: string | null;
5152
+ };
5153
+ Insert: {
5154
+ created_at?: string;
5155
+ currency?: string;
5156
+ customer_id: string;
5157
+ discount_type: string;
5158
+ discount_value: number;
5159
+ id?: string;
5160
+ min_quantity?: number;
5161
+ notes?: string | null;
5162
+ product_category_id?: string | null;
5163
+ product_id?: string | null;
5164
+ updated_at?: string;
5165
+ valid_from?: string | null;
5166
+ valid_until?: string | null;
5167
+ };
5168
+ Update: {
5169
+ created_at?: string;
5170
+ currency?: string;
5171
+ customer_id?: string;
5172
+ discount_type?: string;
5173
+ discount_value?: number;
5174
+ id?: string;
5175
+ min_quantity?: number;
5176
+ notes?: string | null;
5177
+ product_category_id?: string | null;
5178
+ product_id?: string | null;
5179
+ updated_at?: string;
5180
+ valid_from?: string | null;
5181
+ valid_until?: string | null;
5182
+ };
5183
+ Relationships: [{
5184
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
5185
+ columns: ["customer_id"];
5186
+ isOneToOne: false;
5187
+ referencedRelation: "customers";
5188
+ referencedColumns: ["id"];
5189
+ }, {
5190
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
5191
+ columns: ["product_category_id"];
5192
+ isOneToOne: false;
5193
+ referencedRelation: "product_categories";
5194
+ referencedColumns: ["id"];
5195
+ }, {
5196
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
5197
+ columns: ["product_id"];
5198
+ isOneToOne: false;
5199
+ referencedRelation: "products";
5200
+ referencedColumns: ["id"];
5201
+ }];
5202
+ };
5203
+ local_customer_sales_strategies: {
5204
+ Row: {
5205
+ created_at: string;
5206
+ currency: string;
5207
+ customer_id: string;
5208
+ discount_type: string;
5209
+ discount_value: number;
5210
+ id: string;
5211
+ min_quantity: number;
5212
+ notes: string | null;
5213
+ product_category_id: string | null;
5214
+ product_id: string | null;
5215
+ updated_at: string;
5216
+ valid_from: string | null;
5217
+ valid_until: string | null;
5218
+ };
5219
+ Insert: {
5220
+ created_at?: string;
5221
+ currency?: string;
5222
+ customer_id: string;
5223
+ discount_type: string;
5224
+ discount_value: number;
5225
+ id?: string;
5226
+ min_quantity?: number;
5227
+ notes?: string | null;
5228
+ product_category_id?: string | null;
5229
+ product_id?: string | null;
5230
+ updated_at?: string;
5231
+ valid_from?: string | null;
5232
+ valid_until?: string | null;
5233
+ };
5234
+ Update: {
5235
+ created_at?: string;
5236
+ currency?: string;
5237
+ customer_id?: string;
5238
+ discount_type?: string;
5239
+ discount_value?: number;
5240
+ id?: string;
5241
+ min_quantity?: number;
5242
+ notes?: string | null;
5243
+ product_category_id?: string | null;
5244
+ product_id?: string | null;
5245
+ updated_at?: string;
5246
+ valid_from?: string | null;
5247
+ valid_until?: string | null;
5248
+ };
5249
+ Relationships: [{
5250
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
5251
+ columns: ["customer_id"];
5252
+ isOneToOne: false;
5253
+ referencedRelation: "customers";
5254
+ referencedColumns: ["id"];
5255
+ }, {
5256
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
5257
+ columns: ["product_category_id"];
5258
+ isOneToOne: false;
5259
+ referencedRelation: "product_categories";
5260
+ referencedColumns: ["id"];
5261
+ }, {
5262
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
5263
+ columns: ["product_id"];
5264
+ isOneToOne: false;
5265
+ referencedRelation: "products";
5266
+ referencedColumns: ["id"];
5267
+ }];
5268
+ };
5026
5269
  locations: {
5027
5270
  Row: {
5028
5271
  created_at: string;
@@ -5530,99 +5773,366 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
5530
5773
  referencedColumns: ["id"];
5531
5774
  }];
5532
5775
  };
5533
- notifications: {
5776
+ nmbrs_component_mapping: {
5534
5777
  Row: {
5535
5778
  created_at: string;
5536
5779
  id: string;
5537
- message: string | null;
5538
- read: boolean;
5539
- title: string;
5780
+ source_kind: string;
5781
+ source_value: string | null;
5540
5782
  updated_at: string;
5541
- user_id: string;
5783
+ wage_code: string;
5542
5784
  };
5543
5785
  Insert: {
5544
5786
  created_at?: string;
5545
5787
  id?: string;
5546
- message?: string | null;
5547
- read?: boolean;
5548
- title: string;
5788
+ source_kind: string;
5789
+ source_value?: string | null;
5549
5790
  updated_at?: string;
5550
- user_id: string;
5791
+ wage_code: string;
5551
5792
  };
5552
5793
  Update: {
5553
5794
  created_at?: string;
5554
5795
  id?: string;
5555
- message?: string | null;
5556
- read?: boolean;
5557
- title?: string;
5796
+ source_kind?: string;
5797
+ source_value?: string | null;
5558
5798
  updated_at?: string;
5559
- user_id?: string;
5799
+ wage_code?: string;
5560
5800
  };
5561
- Relationships: [];
5801
+ Relationships: [{
5802
+ foreignKeyName: "nmbrs_component_mapping_wage_code_fkey";
5803
+ columns: ["wage_code"];
5804
+ isOneToOne: false;
5805
+ referencedRelation: "nmbrs_wage_components";
5806
+ referencedColumns: ["code"];
5807
+ }];
5562
5808
  };
5563
- offer_campaign_product_tiers: {
5809
+ nmbrs_employee_mapping: {
5564
5810
  Row: {
5565
- campaign_product_id: string;
5811
+ active_from: string | null;
5812
+ active_to: string | null;
5813
+ contract_hours_per_week: number | null;
5566
5814
  created_at: string;
5815
+ hourly_wage: number | null;
5567
5816
  id: string;
5568
- min_crates: number;
5569
- price_per_crate: number;
5570
- sort_order: number;
5817
+ monteur_id: string;
5818
+ nmbrs_company_code: string | null;
5819
+ nmbrs_employee_number: string;
5820
+ updated_at: string;
5571
5821
  };
5572
5822
  Insert: {
5573
- campaign_product_id: string;
5823
+ active_from?: string | null;
5824
+ active_to?: string | null;
5825
+ contract_hours_per_week?: number | null;
5574
5826
  created_at?: string;
5827
+ hourly_wage?: number | null;
5575
5828
  id?: string;
5576
- min_crates?: number;
5577
- price_per_crate?: number;
5578
- sort_order?: number;
5829
+ monteur_id: string;
5830
+ nmbrs_company_code?: string | null;
5831
+ nmbrs_employee_number: string;
5832
+ updated_at?: string;
5579
5833
  };
5580
5834
  Update: {
5581
- campaign_product_id?: string;
5835
+ active_from?: string | null;
5836
+ active_to?: string | null;
5837
+ contract_hours_per_week?: number | null;
5582
5838
  created_at?: string;
5839
+ hourly_wage?: number | null;
5583
5840
  id?: string;
5584
- min_crates?: number;
5585
- price_per_crate?: number;
5586
- sort_order?: number;
5841
+ monteur_id?: string;
5842
+ nmbrs_company_code?: string | null;
5843
+ nmbrs_employee_number?: string;
5844
+ updated_at?: string;
5587
5845
  };
5588
5846
  Relationships: [{
5589
- foreignKeyName: "offer_campaign_product_tiers_campaign_product_id_fkey";
5590
- columns: ["campaign_product_id"];
5591
- isOneToOne: false;
5592
- referencedRelation: "offer_campaign_products";
5847
+ foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
5848
+ columns: ["monteur_id"];
5849
+ isOneToOne: true;
5850
+ referencedRelation: "monteurs";
5593
5851
  referencedColumns: ["id"];
5594
5852
  }];
5595
5853
  };
5596
- offer_campaign_products: {
5854
+ nmbrs_export_lines: {
5597
5855
  Row: {
5598
- available_stock: number;
5599
- barcode: string | null;
5600
- belading: string | null;
5601
- campaign_id: string;
5602
- crate_price: number | null;
5856
+ amount: number;
5603
5857
  created_at: string;
5604
- description: string | null;
5605
- discount_price: number;
5858
+ entry_date: string;
5859
+ hours: number;
5606
5860
  id: string;
5607
- image_url: string | null;
5608
- normal_price: number;
5609
- plants_per_crate: number | null;
5610
- product_id: string | null;
5611
- product_name: string;
5612
- sort_order: number;
5613
- sticker_available: boolean;
5614
- sticker_cost: number | null;
5861
+ monteur_id: string;
5862
+ nmbrs_employee_number: string | null;
5863
+ notes: string | null;
5864
+ run_id: string;
5865
+ source_kind: string | null;
5866
+ source_ref_id: string | null;
5867
+ updated_at: string;
5868
+ wage_code: string;
5615
5869
  };
5616
5870
  Insert: {
5617
- available_stock?: number;
5618
- barcode?: string | null;
5619
- belading?: string | null;
5620
- campaign_id: string;
5621
- crate_price?: number | null;
5871
+ amount?: number;
5622
5872
  created_at?: string;
5623
- description?: string | null;
5624
- discount_price?: number;
5625
- id?: string;
5873
+ entry_date: string;
5874
+ hours?: number;
5875
+ id?: string;
5876
+ monteur_id: string;
5877
+ nmbrs_employee_number?: string | null;
5878
+ notes?: string | null;
5879
+ run_id: string;
5880
+ source_kind?: string | null;
5881
+ source_ref_id?: string | null;
5882
+ updated_at?: string;
5883
+ wage_code: string;
5884
+ };
5885
+ Update: {
5886
+ amount?: number;
5887
+ created_at?: string;
5888
+ entry_date?: string;
5889
+ hours?: number;
5890
+ id?: string;
5891
+ monteur_id?: string;
5892
+ nmbrs_employee_number?: string | null;
5893
+ notes?: string | null;
5894
+ run_id?: string;
5895
+ source_kind?: string | null;
5896
+ source_ref_id?: string | null;
5897
+ updated_at?: string;
5898
+ wage_code?: string;
5899
+ };
5900
+ Relationships: [{
5901
+ foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
5902
+ columns: ["monteur_id"];
5903
+ isOneToOne: false;
5904
+ referencedRelation: "monteurs";
5905
+ referencedColumns: ["id"];
5906
+ }, {
5907
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
5908
+ columns: ["run_id"];
5909
+ isOneToOne: false;
5910
+ referencedRelation: "nmbrs_export_runs";
5911
+ referencedColumns: ["id"];
5912
+ }, {
5913
+ foreignKeyName: "nmbrs_export_lines_wage_code_fkey";
5914
+ columns: ["wage_code"];
5915
+ isOneToOne: false;
5916
+ referencedRelation: "nmbrs_wage_components";
5917
+ referencedColumns: ["code"];
5918
+ }];
5919
+ };
5920
+ nmbrs_export_runs: {
5921
+ Row: {
5922
+ created_at: string;
5923
+ file_name: string | null;
5924
+ generated_at: string;
5925
+ generated_by: string | null;
5926
+ id: string;
5927
+ notes: string | null;
5928
+ period_end: string;
5929
+ period_label: string;
5930
+ period_start: string;
5931
+ status: string;
5932
+ total_hours: number;
5933
+ total_lines: number;
5934
+ updated_at: string;
5935
+ };
5936
+ Insert: {
5937
+ created_at?: string;
5938
+ file_name?: string | null;
5939
+ generated_at?: string;
5940
+ generated_by?: string | null;
5941
+ id?: string;
5942
+ notes?: string | null;
5943
+ period_end: string;
5944
+ period_label: string;
5945
+ period_start: string;
5946
+ status?: string;
5947
+ total_hours?: number;
5948
+ total_lines?: number;
5949
+ updated_at?: string;
5950
+ };
5951
+ Update: {
5952
+ created_at?: string;
5953
+ file_name?: string | null;
5954
+ generated_at?: string;
5955
+ generated_by?: string | null;
5956
+ id?: string;
5957
+ notes?: string | null;
5958
+ period_end?: string;
5959
+ period_label?: string;
5960
+ period_start?: string;
5961
+ status?: string;
5962
+ total_hours?: number;
5963
+ total_lines?: number;
5964
+ updated_at?: string;
5965
+ };
5966
+ Relationships: [];
5967
+ };
5968
+ nmbrs_settings: {
5969
+ Row: {
5970
+ created_at: string;
5971
+ default_company_code: string | null;
5972
+ id: boolean;
5973
+ include_travel: boolean;
5974
+ overtime_threshold_daily: number;
5975
+ overtime_threshold_weekly: number;
5976
+ period_type: string;
5977
+ updated_at: string;
5978
+ updated_by: string | null;
5979
+ week_start_day: number;
5980
+ };
5981
+ Insert: {
5982
+ created_at?: string;
5983
+ default_company_code?: string | null;
5984
+ id?: boolean;
5985
+ include_travel?: boolean;
5986
+ overtime_threshold_daily?: number;
5987
+ overtime_threshold_weekly?: number;
5988
+ period_type?: string;
5989
+ updated_at?: string;
5990
+ updated_by?: string | null;
5991
+ week_start_day?: number;
5992
+ };
5993
+ Update: {
5994
+ created_at?: string;
5995
+ default_company_code?: string | null;
5996
+ id?: boolean;
5997
+ include_travel?: boolean;
5998
+ overtime_threshold_daily?: number;
5999
+ overtime_threshold_weekly?: number;
6000
+ period_type?: string;
6001
+ updated_at?: string;
6002
+ updated_by?: string | null;
6003
+ week_start_day?: number;
6004
+ };
6005
+ Relationships: [];
6006
+ };
6007
+ nmbrs_wage_components: {
6008
+ Row: {
6009
+ category: string;
6010
+ code: string;
6011
+ created_at: string;
6012
+ id: string;
6013
+ is_active: boolean;
6014
+ label: string;
6015
+ sort_order: number;
6016
+ unit: string;
6017
+ updated_at: string;
6018
+ };
6019
+ Insert: {
6020
+ category: string;
6021
+ code: string;
6022
+ created_at?: string;
6023
+ id?: string;
6024
+ is_active?: boolean;
6025
+ label: string;
6026
+ sort_order?: number;
6027
+ unit: string;
6028
+ updated_at?: string;
6029
+ };
6030
+ Update: {
6031
+ category?: string;
6032
+ code?: string;
6033
+ created_at?: string;
6034
+ id?: string;
6035
+ is_active?: boolean;
6036
+ label?: string;
6037
+ sort_order?: number;
6038
+ unit?: string;
6039
+ updated_at?: string;
6040
+ };
6041
+ Relationships: [];
6042
+ };
6043
+ notifications: {
6044
+ Row: {
6045
+ created_at: string;
6046
+ id: string;
6047
+ message: string | null;
6048
+ read: boolean;
6049
+ title: string;
6050
+ updated_at: string;
6051
+ user_id: string;
6052
+ };
6053
+ Insert: {
6054
+ created_at?: string;
6055
+ id?: string;
6056
+ message?: string | null;
6057
+ read?: boolean;
6058
+ title: string;
6059
+ updated_at?: string;
6060
+ user_id: string;
6061
+ };
6062
+ Update: {
6063
+ created_at?: string;
6064
+ id?: string;
6065
+ message?: string | null;
6066
+ read?: boolean;
6067
+ title?: string;
6068
+ updated_at?: string;
6069
+ user_id?: string;
6070
+ };
6071
+ Relationships: [];
6072
+ };
6073
+ offer_campaign_product_tiers: {
6074
+ Row: {
6075
+ campaign_product_id: string;
6076
+ created_at: string;
6077
+ id: string;
6078
+ min_crates: number;
6079
+ price_per_crate: number;
6080
+ sort_order: number;
6081
+ };
6082
+ Insert: {
6083
+ campaign_product_id: string;
6084
+ created_at?: string;
6085
+ id?: string;
6086
+ min_crates?: number;
6087
+ price_per_crate?: number;
6088
+ sort_order?: number;
6089
+ };
6090
+ Update: {
6091
+ campaign_product_id?: string;
6092
+ created_at?: string;
6093
+ id?: string;
6094
+ min_crates?: number;
6095
+ price_per_crate?: number;
6096
+ sort_order?: number;
6097
+ };
6098
+ Relationships: [{
6099
+ foreignKeyName: "offer_campaign_product_tiers_campaign_product_id_fkey";
6100
+ columns: ["campaign_product_id"];
6101
+ isOneToOne: false;
6102
+ referencedRelation: "offer_campaign_products";
6103
+ referencedColumns: ["id"];
6104
+ }];
6105
+ };
6106
+ offer_campaign_products: {
6107
+ Row: {
6108
+ available_stock: number;
6109
+ barcode: string | null;
6110
+ belading: string | null;
6111
+ campaign_id: string;
6112
+ crate_price: number | null;
6113
+ created_at: string;
6114
+ description: string | null;
6115
+ discount_price: number;
6116
+ id: string;
6117
+ image_url: string | null;
6118
+ normal_price: number;
6119
+ plants_per_crate: number | null;
6120
+ product_id: string | null;
6121
+ product_name: string;
6122
+ sort_order: number;
6123
+ sticker_available: boolean;
6124
+ sticker_cost: number | null;
6125
+ };
6126
+ Insert: {
6127
+ available_stock?: number;
6128
+ barcode?: string | null;
6129
+ belading?: string | null;
6130
+ campaign_id: string;
6131
+ crate_price?: number | null;
6132
+ created_at?: string;
6133
+ description?: string | null;
6134
+ discount_price?: number;
6135
+ id?: string;
5626
6136
  image_url?: string | null;
5627
6137
  normal_price?: number;
5628
6138
  plants_per_crate?: number | null;
@@ -7378,6 +7888,48 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
7378
7888
  };
7379
7889
  Relationships: [];
7380
7890
  };
7891
+ stock_import_runs: {
7892
+ Row: {
7893
+ connection_id: string | null;
7894
+ created_at: string;
7895
+ created_rows: number;
7896
+ errors: import("../integrations/supabase/types").Json;
7897
+ filename: string | null;
7898
+ id: string;
7899
+ mutations: import("../integrations/supabase/types").Json;
7900
+ skipped_rows: number;
7901
+ total_rows: number;
7902
+ updated_rows: number;
7903
+ user_id: string;
7904
+ };
7905
+ Insert: {
7906
+ connection_id?: string | null;
7907
+ created_at?: string;
7908
+ created_rows?: number;
7909
+ errors?: import("../integrations/supabase/types").Json;
7910
+ filename?: string | null;
7911
+ id?: string;
7912
+ mutations?: import("../integrations/supabase/types").Json;
7913
+ skipped_rows?: number;
7914
+ total_rows?: number;
7915
+ updated_rows?: number;
7916
+ user_id: string;
7917
+ };
7918
+ Update: {
7919
+ connection_id?: string | null;
7920
+ created_at?: string;
7921
+ created_rows?: number;
7922
+ errors?: import("../integrations/supabase/types").Json;
7923
+ filename?: string | null;
7924
+ id?: string;
7925
+ mutations?: import("../integrations/supabase/types").Json;
7926
+ skipped_rows?: number;
7927
+ total_rows?: number;
7928
+ updated_rows?: number;
7929
+ user_id?: string;
7930
+ };
7931
+ Relationships: [];
7932
+ };
7381
7933
  stock_mutation_log: {
7382
7934
  Row: {
7383
7935
  connection_id: string | null;
@@ -9009,6 +9561,44 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
9009
9561
  };
9010
9562
  Relationships: [];
9011
9563
  };
9564
+ floriday_customer_discounts: {
9565
+ Row: {
9566
+ base_price: number | null;
9567
+ buyer_organization_id: string | null;
9568
+ currency: string | null;
9569
+ discount_type: string | null;
9570
+ discount_value: number | null;
9571
+ min_quantity: number | null;
9572
+ net_price: number | null;
9573
+ product_group_id: string | null;
9574
+ raw: import("../integrations/supabase/types").Json | null;
9575
+ source: string | null;
9576
+ source_id: string | null;
9577
+ trade_item_id: string | null;
9578
+ valid_from: string | null;
9579
+ valid_until: string | null;
9580
+ };
9581
+ Relationships: [];
9582
+ };
9583
+ local_customer_discounts: {
9584
+ Row: {
9585
+ base_price: number | null;
9586
+ currency: string | null;
9587
+ customer_id: string | null;
9588
+ discount_type: string | null;
9589
+ discount_value: number | null;
9590
+ min_quantity: number | null;
9591
+ net_price: number | null;
9592
+ product_category_id: string | null;
9593
+ product_id: string | null;
9594
+ product_name: string | null;
9595
+ source: string | null;
9596
+ source_id: string | null;
9597
+ valid_from: string | null;
9598
+ valid_until: string | null;
9599
+ };
9600
+ Relationships: [];
9601
+ };
9012
9602
  manufacture_product_possible_stock_view: {
9013
9603
  Row: {
9014
9604
  component_count: number | null;
@@ -9376,9 +9966,31 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
9376
9966
  };
9377
9967
  Returns: number;
9378
9968
  };
9379
- cleanup_old_bookings: {
9380
- Args: never;
9381
- Returns: number;
9969
+ check_offer_product_available_stock: {
9970
+ Args: {
9971
+ p_campaign_product_id: string;
9972
+ p_code: string;
9973
+ p_needed_qty?: number;
9974
+ p_product_name?: string;
9975
+ };
9976
+ Returns: import("../integrations/supabase/types").Json;
9977
+ };
9978
+ check_trade_item_available_stock: {
9979
+ Args: {
9980
+ p_connection_id?: string;
9981
+ p_context?: string;
9982
+ p_needed_qty?: number;
9983
+ p_order_id?: string;
9984
+ p_order_item_id?: string;
9985
+ p_owner_id?: string;
9986
+ p_product_name?: string;
9987
+ p_trade_item_key: string;
9988
+ };
9989
+ Returns: import("../integrations/supabase/types").Json;
9990
+ };
9991
+ cleanup_old_bookings: {
9992
+ Args: never;
9993
+ Returns: number;
9382
9994
  };
9383
9995
  control_get_todays_carts: {
9384
9996
  Args: never;
@@ -9460,6 +10072,12 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
9460
10072
  status: string;
9461
10073
  }[];
9462
10074
  };
10075
+ ensure_trade_item_stock_row: {
10076
+ Args: {
10077
+ p_key: string;
10078
+ };
10079
+ Returns: undefined;
10080
+ };
9463
10081
  ensure_user_tenant: {
9464
10082
  Args: never;
9465
10083
  Returns: string;
@@ -9497,12 +10115,31 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
9497
10115
  };
9498
10116
  Returns: boolean;
9499
10117
  };
9500
- find_trade_item_key_by_name: {
10118
+ find_trade_item_key: {
9501
10119
  Args: {
10120
+ p_barcode: string;
9502
10121
  p_name: string;
10122
+ p_product_id: string;
9503
10123
  };
9504
10124
  Returns: string;
9505
10125
  };
10126
+ floriday_effective_price: {
10127
+ Args: {
10128
+ _buyer_id: string;
10129
+ _on_date?: string;
10130
+ _quantity?: number;
10131
+ _trade_item_id: string;
10132
+ };
10133
+ Returns: {
10134
+ base_price: number;
10135
+ currency: string;
10136
+ discount_type: string;
10137
+ discount_value: number;
10138
+ net_price: number;
10139
+ source: string;
10140
+ source_id: string;
10141
+ }[];
10142
+ };
9506
10143
  format_cart_number: {
9507
10144
  Args: {
9508
10145
  p_pick_date: string;
@@ -9523,6 +10160,13 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
9523
10160
  preferred_warehouse_name: string;
9524
10161
  }[];
9525
10162
  };
10163
+ get_active_floriday_context: {
10164
+ Args: never;
10165
+ Returns: {
10166
+ connection_id: string;
10167
+ user_id: string;
10168
+ }[];
10169
+ };
9526
10170
  get_active_twinfield_public: {
9527
10171
  Args: never;
9528
10172
  Returns: {
@@ -9625,6 +10269,18 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
9625
10269
  };
9626
10270
  Returns: import("../integrations/supabase/types").Json;
9627
10271
  };
10272
+ get_offer_recipient_by_code: {
10273
+ Args: {
10274
+ p_code: string;
10275
+ };
10276
+ Returns: {
10277
+ campaign_id: string;
10278
+ clicked_at: string;
10279
+ customer_id: string;
10280
+ id: string;
10281
+ ordered_at: string;
10282
+ }[];
10283
+ };
9628
10284
  get_or_assign_floriday_order_number: {
9629
10285
  Args: {
9630
10286
  p_floriday_id: string;
@@ -9677,6 +10333,34 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
9677
10333
  Args: never;
9678
10334
  Returns: boolean;
9679
10335
  };
10336
+ local_effective_price: {
10337
+ Args: {
10338
+ _customer_id: string;
10339
+ _on_date?: string;
10340
+ _product_id: string;
10341
+ _quantity?: number;
10342
+ };
10343
+ Returns: {
10344
+ currency: string;
10345
+ discount_type: string;
10346
+ discount_value: number;
10347
+ net_price: number;
10348
+ source: string;
10349
+ source_id: string;
10350
+ }[];
10351
+ };
10352
+ mark_offer_clicked: {
10353
+ Args: {
10354
+ p_code: string;
10355
+ };
10356
+ Returns: undefined;
10357
+ };
10358
+ mark_offer_ordered: {
10359
+ Args: {
10360
+ p_code: string;
10361
+ };
10362
+ Returns: undefined;
10363
+ };
9680
10364
  next_order_number: {
9681
10365
  Args: {
9682
10366
  p_prefix: string;
@@ -9696,6 +10380,14 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
9696
10380
  };
9697
10381
  Returns: string;
9698
10382
  };
10383
+ offer_recipient_matches: {
10384
+ Args: {
10385
+ _campaign_id: string;
10386
+ _customer_id: string;
10387
+ _recipient_id: string;
10388
+ };
10389
+ Returns: boolean;
10390
+ };
9699
10391
  pickstation_get_orders_raw: {
9700
10392
  Args: never;
9701
10393
  Returns: import("../integrations/supabase/types").Json;
@@ -9723,6 +10415,13 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
9723
10415
  };
9724
10416
  Returns: undefined;
9725
10417
  };
10418
+ promote_trade_item_key: {
10419
+ Args: {
10420
+ p_new: string;
10421
+ p_old: string;
10422
+ };
10423
+ Returns: undefined;
10424
+ };
9726
10425
  refresh_floricode_derived_code_lists: {
9727
10426
  Args: never;
9728
10427
  Returns: {
@@ -13671,6 +14370,51 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
13671
14370
  referencedColumns: ["id"];
13672
14371
  }];
13673
14372
  };
14373
+ floriday_continuous_stock_queue: {
14374
+ Row: {
14375
+ attempts: number;
14376
+ connection_id: string;
14377
+ created_at: string;
14378
+ gateway_attempt_id: string | null;
14379
+ id: string;
14380
+ last_error: string | null;
14381
+ number_of_pieces: number;
14382
+ sent_at: string | null;
14383
+ status: string;
14384
+ trade_item_id: string;
14385
+ updated_at: string;
14386
+ user_id: string;
14387
+ };
14388
+ Insert: {
14389
+ attempts?: number;
14390
+ connection_id: string;
14391
+ created_at?: string;
14392
+ gateway_attempt_id?: string | null;
14393
+ id?: string;
14394
+ last_error?: string | null;
14395
+ number_of_pieces?: number;
14396
+ sent_at?: string | null;
14397
+ status?: string;
14398
+ trade_item_id: string;
14399
+ updated_at?: string;
14400
+ user_id: string;
14401
+ };
14402
+ Update: {
14403
+ attempts?: number;
14404
+ connection_id?: string;
14405
+ created_at?: string;
14406
+ gateway_attempt_id?: string | null;
14407
+ id?: string;
14408
+ last_error?: string | null;
14409
+ number_of_pieces?: number;
14410
+ sent_at?: string | null;
14411
+ status?: string;
14412
+ trade_item_id?: string;
14413
+ updated_at?: string;
14414
+ user_id?: string;
14415
+ };
14416
+ Relationships: [];
14417
+ };
13674
14418
  floriday_contract_trade_item_groups_cache: {
13675
14419
  Row: {
13676
14420
  connection_id: string;
@@ -15060,6 +15804,204 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
15060
15804
  };
15061
15805
  Relationships: [];
15062
15806
  };
15807
+ local_customer_agreements: {
15808
+ Row: {
15809
+ base_price: number | null;
15810
+ created_at: string;
15811
+ currency: string;
15812
+ customer_id: string;
15813
+ id: string;
15814
+ min_quantity: number;
15815
+ net_price: number;
15816
+ notes: string | null;
15817
+ product_category_id: string | null;
15818
+ product_id: string | null;
15819
+ updated_at: string;
15820
+ valid_from: string | null;
15821
+ valid_until: string | null;
15822
+ };
15823
+ Insert: {
15824
+ base_price?: number | null;
15825
+ created_at?: string;
15826
+ currency?: string;
15827
+ customer_id: string;
15828
+ id?: string;
15829
+ min_quantity?: number;
15830
+ net_price: number;
15831
+ notes?: string | null;
15832
+ product_category_id?: string | null;
15833
+ product_id?: string | null;
15834
+ updated_at?: string;
15835
+ valid_from?: string | null;
15836
+ valid_until?: string | null;
15837
+ };
15838
+ Update: {
15839
+ base_price?: number | null;
15840
+ created_at?: string;
15841
+ currency?: string;
15842
+ customer_id?: string;
15843
+ id?: string;
15844
+ min_quantity?: number;
15845
+ net_price?: number;
15846
+ notes?: string | null;
15847
+ product_category_id?: string | null;
15848
+ product_id?: string | null;
15849
+ updated_at?: string;
15850
+ valid_from?: string | null;
15851
+ valid_until?: string | null;
15852
+ };
15853
+ Relationships: [{
15854
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
15855
+ columns: ["customer_id"];
15856
+ isOneToOne: false;
15857
+ referencedRelation: "customers";
15858
+ referencedColumns: ["id"];
15859
+ }, {
15860
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
15861
+ columns: ["product_category_id"];
15862
+ isOneToOne: false;
15863
+ referencedRelation: "product_categories";
15864
+ referencedColumns: ["id"];
15865
+ }, {
15866
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
15867
+ columns: ["product_id"];
15868
+ isOneToOne: false;
15869
+ referencedRelation: "products";
15870
+ referencedColumns: ["id"];
15871
+ }];
15872
+ };
15873
+ local_customer_price_groups: {
15874
+ Row: {
15875
+ created_at: string;
15876
+ currency: string;
15877
+ customer_id: string;
15878
+ discount_type: string;
15879
+ discount_value: number;
15880
+ id: string;
15881
+ min_quantity: number;
15882
+ notes: string | null;
15883
+ product_category_id: string | null;
15884
+ product_id: string | null;
15885
+ updated_at: string;
15886
+ valid_from: string | null;
15887
+ valid_until: string | null;
15888
+ };
15889
+ Insert: {
15890
+ created_at?: string;
15891
+ currency?: string;
15892
+ customer_id: string;
15893
+ discount_type: string;
15894
+ discount_value: number;
15895
+ id?: string;
15896
+ min_quantity?: number;
15897
+ notes?: string | null;
15898
+ product_category_id?: string | null;
15899
+ product_id?: string | null;
15900
+ updated_at?: string;
15901
+ valid_from?: string | null;
15902
+ valid_until?: string | null;
15903
+ };
15904
+ Update: {
15905
+ created_at?: string;
15906
+ currency?: string;
15907
+ customer_id?: string;
15908
+ discount_type?: string;
15909
+ discount_value?: number;
15910
+ id?: string;
15911
+ min_quantity?: number;
15912
+ notes?: string | null;
15913
+ product_category_id?: string | null;
15914
+ product_id?: string | null;
15915
+ updated_at?: string;
15916
+ valid_from?: string | null;
15917
+ valid_until?: string | null;
15918
+ };
15919
+ Relationships: [{
15920
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
15921
+ columns: ["customer_id"];
15922
+ isOneToOne: false;
15923
+ referencedRelation: "customers";
15924
+ referencedColumns: ["id"];
15925
+ }, {
15926
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
15927
+ columns: ["product_category_id"];
15928
+ isOneToOne: false;
15929
+ referencedRelation: "product_categories";
15930
+ referencedColumns: ["id"];
15931
+ }, {
15932
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
15933
+ columns: ["product_id"];
15934
+ isOneToOne: false;
15935
+ referencedRelation: "products";
15936
+ referencedColumns: ["id"];
15937
+ }];
15938
+ };
15939
+ local_customer_sales_strategies: {
15940
+ Row: {
15941
+ created_at: string;
15942
+ currency: string;
15943
+ customer_id: string;
15944
+ discount_type: string;
15945
+ discount_value: number;
15946
+ id: string;
15947
+ min_quantity: number;
15948
+ notes: string | null;
15949
+ product_category_id: string | null;
15950
+ product_id: string | null;
15951
+ updated_at: string;
15952
+ valid_from: string | null;
15953
+ valid_until: string | null;
15954
+ };
15955
+ Insert: {
15956
+ created_at?: string;
15957
+ currency?: string;
15958
+ customer_id: string;
15959
+ discount_type: string;
15960
+ discount_value: number;
15961
+ id?: string;
15962
+ min_quantity?: number;
15963
+ notes?: string | null;
15964
+ product_category_id?: string | null;
15965
+ product_id?: string | null;
15966
+ updated_at?: string;
15967
+ valid_from?: string | null;
15968
+ valid_until?: string | null;
15969
+ };
15970
+ Update: {
15971
+ created_at?: string;
15972
+ currency?: string;
15973
+ customer_id?: string;
15974
+ discount_type?: string;
15975
+ discount_value?: number;
15976
+ id?: string;
15977
+ min_quantity?: number;
15978
+ notes?: string | null;
15979
+ product_category_id?: string | null;
15980
+ product_id?: string | null;
15981
+ updated_at?: string;
15982
+ valid_from?: string | null;
15983
+ valid_until?: string | null;
15984
+ };
15985
+ Relationships: [{
15986
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
15987
+ columns: ["customer_id"];
15988
+ isOneToOne: false;
15989
+ referencedRelation: "customers";
15990
+ referencedColumns: ["id"];
15991
+ }, {
15992
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
15993
+ columns: ["product_category_id"];
15994
+ isOneToOne: false;
15995
+ referencedRelation: "product_categories";
15996
+ referencedColumns: ["id"];
15997
+ }, {
15998
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
15999
+ columns: ["product_id"];
16000
+ isOneToOne: false;
16001
+ referencedRelation: "products";
16002
+ referencedColumns: ["id"];
16003
+ }];
16004
+ };
15063
16005
  locations: {
15064
16006
  Row: {
15065
16007
  created_at: string;
@@ -15423,149 +16365,416 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
15423
16365
  };
15424
16366
  Relationships: [];
15425
16367
  };
15426
- manufacture_product_components: {
16368
+ manufacture_product_components: {
16369
+ Row: {
16370
+ component_type: string;
16371
+ created_at: string;
16372
+ id: string;
16373
+ manufacture_product_id: string;
16374
+ product_group_id: string | null;
16375
+ quantity: number;
16376
+ trade_item_id: string | null;
16377
+ unit: string;
16378
+ };
16379
+ Insert: {
16380
+ component_type: string;
16381
+ created_at?: string;
16382
+ id?: string;
16383
+ manufacture_product_id: string;
16384
+ product_group_id?: string | null;
16385
+ quantity?: number;
16386
+ trade_item_id?: string | null;
16387
+ unit?: string;
16388
+ };
16389
+ Update: {
16390
+ component_type?: string;
16391
+ created_at?: string;
16392
+ id?: string;
16393
+ manufacture_product_id?: string;
16394
+ product_group_id?: string | null;
16395
+ quantity?: number;
16396
+ trade_item_id?: string | null;
16397
+ unit?: string;
16398
+ };
16399
+ Relationships: [{
16400
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
16401
+ columns: ["manufacture_product_id"];
16402
+ isOneToOne: false;
16403
+ referencedRelation: "manufacture_product_possible_stock_view";
16404
+ referencedColumns: ["manufacture_product_id"];
16405
+ }, {
16406
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
16407
+ columns: ["manufacture_product_id"];
16408
+ isOneToOne: false;
16409
+ referencedRelation: "manufacture_products";
16410
+ referencedColumns: ["id"];
16411
+ }, {
16412
+ foreignKeyName: "manufacture_product_components_product_group_id_fkey";
16413
+ columns: ["product_group_id"];
16414
+ isOneToOne: false;
16415
+ referencedRelation: "product_groups";
16416
+ referencedColumns: ["id"];
16417
+ }];
16418
+ };
16419
+ manufacture_products: {
16420
+ Row: {
16421
+ created_at: string;
16422
+ description: string | null;
16423
+ id: string;
16424
+ is_active: boolean;
16425
+ name: string;
16426
+ produced_stock: number;
16427
+ product_code: string;
16428
+ tenant_id: string;
16429
+ updated_at: string;
16430
+ };
16431
+ Insert: {
16432
+ created_at?: string;
16433
+ description?: string | null;
16434
+ id?: string;
16435
+ is_active?: boolean;
16436
+ name: string;
16437
+ produced_stock?: number;
16438
+ product_code: string;
16439
+ tenant_id: string;
16440
+ updated_at?: string;
16441
+ };
16442
+ Update: {
16443
+ created_at?: string;
16444
+ description?: string | null;
16445
+ id?: string;
16446
+ is_active?: boolean;
16447
+ name?: string;
16448
+ produced_stock?: number;
16449
+ product_code?: string;
16450
+ tenant_id?: string;
16451
+ updated_at?: string;
16452
+ };
16453
+ Relationships: [];
16454
+ };
16455
+ monteurs: {
16456
+ Row: {
16457
+ avatar_url: string | null;
16458
+ color: string | null;
16459
+ created_at: string;
16460
+ email: string | null;
16461
+ id: string;
16462
+ is_active: boolean;
16463
+ leave_balance_hours: number;
16464
+ name: string;
16465
+ persnr: number | null;
16466
+ phone: string | null;
16467
+ role: string;
16468
+ tenant_id: string;
16469
+ updated_at: string;
16470
+ user_id: string | null;
16471
+ };
16472
+ Insert: {
16473
+ avatar_url?: string | null;
16474
+ color?: string | null;
16475
+ created_at?: string;
16476
+ email?: string | null;
16477
+ id?: string;
16478
+ is_active?: boolean;
16479
+ leave_balance_hours?: number;
16480
+ name: string;
16481
+ persnr?: number | null;
16482
+ phone?: string | null;
16483
+ role?: string;
16484
+ tenant_id: string;
16485
+ updated_at?: string;
16486
+ user_id?: string | null;
16487
+ };
16488
+ Update: {
16489
+ avatar_url?: string | null;
16490
+ color?: string | null;
16491
+ created_at?: string;
16492
+ email?: string | null;
16493
+ id?: string;
16494
+ is_active?: boolean;
16495
+ leave_balance_hours?: number;
16496
+ name?: string;
16497
+ persnr?: number | null;
16498
+ phone?: string | null;
16499
+ role?: string;
16500
+ tenant_id?: string;
16501
+ updated_at?: string;
16502
+ user_id?: string | null;
16503
+ };
16504
+ Relationships: [{
16505
+ foreignKeyName: "monteurs_tenant_id_fkey";
16506
+ columns: ["tenant_id"];
16507
+ isOneToOne: false;
16508
+ referencedRelation: "tenants";
16509
+ referencedColumns: ["id"];
16510
+ }];
16511
+ };
16512
+ nmbrs_component_mapping: {
16513
+ Row: {
16514
+ created_at: string;
16515
+ id: string;
16516
+ source_kind: string;
16517
+ source_value: string | null;
16518
+ updated_at: string;
16519
+ wage_code: string;
16520
+ };
16521
+ Insert: {
16522
+ created_at?: string;
16523
+ id?: string;
16524
+ source_kind: string;
16525
+ source_value?: string | null;
16526
+ updated_at?: string;
16527
+ wage_code: string;
16528
+ };
16529
+ Update: {
16530
+ created_at?: string;
16531
+ id?: string;
16532
+ source_kind?: string;
16533
+ source_value?: string | null;
16534
+ updated_at?: string;
16535
+ wage_code?: string;
16536
+ };
16537
+ Relationships: [{
16538
+ foreignKeyName: "nmbrs_component_mapping_wage_code_fkey";
16539
+ columns: ["wage_code"];
16540
+ isOneToOne: false;
16541
+ referencedRelation: "nmbrs_wage_components";
16542
+ referencedColumns: ["code"];
16543
+ }];
16544
+ };
16545
+ nmbrs_employee_mapping: {
16546
+ Row: {
16547
+ active_from: string | null;
16548
+ active_to: string | null;
16549
+ contract_hours_per_week: number | null;
16550
+ created_at: string;
16551
+ hourly_wage: number | null;
16552
+ id: string;
16553
+ monteur_id: string;
16554
+ nmbrs_company_code: string | null;
16555
+ nmbrs_employee_number: string;
16556
+ updated_at: string;
16557
+ };
16558
+ Insert: {
16559
+ active_from?: string | null;
16560
+ active_to?: string | null;
16561
+ contract_hours_per_week?: number | null;
16562
+ created_at?: string;
16563
+ hourly_wage?: number | null;
16564
+ id?: string;
16565
+ monteur_id: string;
16566
+ nmbrs_company_code?: string | null;
16567
+ nmbrs_employee_number: string;
16568
+ updated_at?: string;
16569
+ };
16570
+ Update: {
16571
+ active_from?: string | null;
16572
+ active_to?: string | null;
16573
+ contract_hours_per_week?: number | null;
16574
+ created_at?: string;
16575
+ hourly_wage?: number | null;
16576
+ id?: string;
16577
+ monteur_id?: string;
16578
+ nmbrs_company_code?: string | null;
16579
+ nmbrs_employee_number?: string;
16580
+ updated_at?: string;
16581
+ };
16582
+ Relationships: [{
16583
+ foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
16584
+ columns: ["monteur_id"];
16585
+ isOneToOne: true;
16586
+ referencedRelation: "monteurs";
16587
+ referencedColumns: ["id"];
16588
+ }];
16589
+ };
16590
+ nmbrs_export_lines: {
15427
16591
  Row: {
15428
- component_type: string;
16592
+ amount: number;
15429
16593
  created_at: string;
16594
+ entry_date: string;
16595
+ hours: number;
15430
16596
  id: string;
15431
- manufacture_product_id: string;
15432
- product_group_id: string | null;
15433
- quantity: number;
15434
- trade_item_id: string | null;
15435
- unit: string;
16597
+ monteur_id: string;
16598
+ nmbrs_employee_number: string | null;
16599
+ notes: string | null;
16600
+ run_id: string;
16601
+ source_kind: string | null;
16602
+ source_ref_id: string | null;
16603
+ updated_at: string;
16604
+ wage_code: string;
15436
16605
  };
15437
16606
  Insert: {
15438
- component_type: string;
16607
+ amount?: number;
15439
16608
  created_at?: string;
16609
+ entry_date: string;
16610
+ hours?: number;
15440
16611
  id?: string;
15441
- manufacture_product_id: string;
15442
- product_group_id?: string | null;
15443
- quantity?: number;
15444
- trade_item_id?: string | null;
15445
- unit?: string;
16612
+ monteur_id: string;
16613
+ nmbrs_employee_number?: string | null;
16614
+ notes?: string | null;
16615
+ run_id: string;
16616
+ source_kind?: string | null;
16617
+ source_ref_id?: string | null;
16618
+ updated_at?: string;
16619
+ wage_code: string;
15446
16620
  };
15447
16621
  Update: {
15448
- component_type?: string;
16622
+ amount?: number;
15449
16623
  created_at?: string;
16624
+ entry_date?: string;
16625
+ hours?: number;
15450
16626
  id?: string;
15451
- manufacture_product_id?: string;
15452
- product_group_id?: string | null;
15453
- quantity?: number;
15454
- trade_item_id?: string | null;
15455
- unit?: string;
16627
+ monteur_id?: string;
16628
+ nmbrs_employee_number?: string | null;
16629
+ notes?: string | null;
16630
+ run_id?: string;
16631
+ source_kind?: string | null;
16632
+ source_ref_id?: string | null;
16633
+ updated_at?: string;
16634
+ wage_code?: string;
15456
16635
  };
15457
16636
  Relationships: [{
15458
- foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
15459
- columns: ["manufacture_product_id"];
16637
+ foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
16638
+ columns: ["monteur_id"];
15460
16639
  isOneToOne: false;
15461
- referencedRelation: "manufacture_product_possible_stock_view";
15462
- referencedColumns: ["manufacture_product_id"];
16640
+ referencedRelation: "monteurs";
16641
+ referencedColumns: ["id"];
15463
16642
  }, {
15464
- foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
15465
- columns: ["manufacture_product_id"];
16643
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
16644
+ columns: ["run_id"];
15466
16645
  isOneToOne: false;
15467
- referencedRelation: "manufacture_products";
16646
+ referencedRelation: "nmbrs_export_runs";
15468
16647
  referencedColumns: ["id"];
15469
16648
  }, {
15470
- foreignKeyName: "manufacture_product_components_product_group_id_fkey";
15471
- columns: ["product_group_id"];
16649
+ foreignKeyName: "nmbrs_export_lines_wage_code_fkey";
16650
+ columns: ["wage_code"];
15472
16651
  isOneToOne: false;
15473
- referencedRelation: "product_groups";
15474
- referencedColumns: ["id"];
16652
+ referencedRelation: "nmbrs_wage_components";
16653
+ referencedColumns: ["code"];
15475
16654
  }];
15476
16655
  };
15477
- manufacture_products: {
16656
+ nmbrs_export_runs: {
15478
16657
  Row: {
15479
16658
  created_at: string;
15480
- description: string | null;
16659
+ file_name: string | null;
16660
+ generated_at: string;
16661
+ generated_by: string | null;
15481
16662
  id: string;
15482
- is_active: boolean;
15483
- name: string;
15484
- produced_stock: number;
15485
- product_code: string;
15486
- tenant_id: string;
16663
+ notes: string | null;
16664
+ period_end: string;
16665
+ period_label: string;
16666
+ period_start: string;
16667
+ status: string;
16668
+ total_hours: number;
16669
+ total_lines: number;
15487
16670
  updated_at: string;
15488
16671
  };
15489
16672
  Insert: {
15490
16673
  created_at?: string;
15491
- description?: string | null;
16674
+ file_name?: string | null;
16675
+ generated_at?: string;
16676
+ generated_by?: string | null;
15492
16677
  id?: string;
15493
- is_active?: boolean;
15494
- name: string;
15495
- produced_stock?: number;
15496
- product_code: string;
15497
- tenant_id: string;
16678
+ notes?: string | null;
16679
+ period_end: string;
16680
+ period_label: string;
16681
+ period_start: string;
16682
+ status?: string;
16683
+ total_hours?: number;
16684
+ total_lines?: number;
15498
16685
  updated_at?: string;
15499
16686
  };
15500
16687
  Update: {
15501
16688
  created_at?: string;
15502
- description?: string | null;
16689
+ file_name?: string | null;
16690
+ generated_at?: string;
16691
+ generated_by?: string | null;
15503
16692
  id?: string;
15504
- is_active?: boolean;
15505
- name?: string;
15506
- produced_stock?: number;
15507
- product_code?: string;
15508
- tenant_id?: string;
16693
+ notes?: string | null;
16694
+ period_end?: string;
16695
+ period_label?: string;
16696
+ period_start?: string;
16697
+ status?: string;
16698
+ total_hours?: number;
16699
+ total_lines?: number;
15509
16700
  updated_at?: string;
15510
16701
  };
15511
16702
  Relationships: [];
15512
16703
  };
15513
- monteurs: {
16704
+ nmbrs_settings: {
15514
16705
  Row: {
15515
- avatar_url: string | null;
15516
- color: string | null;
15517
16706
  created_at: string;
15518
- email: string | null;
16707
+ default_company_code: string | null;
16708
+ id: boolean;
16709
+ include_travel: boolean;
16710
+ overtime_threshold_daily: number;
16711
+ overtime_threshold_weekly: number;
16712
+ period_type: string;
16713
+ updated_at: string;
16714
+ updated_by: string | null;
16715
+ week_start_day: number;
16716
+ };
16717
+ Insert: {
16718
+ created_at?: string;
16719
+ default_company_code?: string | null;
16720
+ id?: boolean;
16721
+ include_travel?: boolean;
16722
+ overtime_threshold_daily?: number;
16723
+ overtime_threshold_weekly?: number;
16724
+ period_type?: string;
16725
+ updated_at?: string;
16726
+ updated_by?: string | null;
16727
+ week_start_day?: number;
16728
+ };
16729
+ Update: {
16730
+ created_at?: string;
16731
+ default_company_code?: string | null;
16732
+ id?: boolean;
16733
+ include_travel?: boolean;
16734
+ overtime_threshold_daily?: number;
16735
+ overtime_threshold_weekly?: number;
16736
+ period_type?: string;
16737
+ updated_at?: string;
16738
+ updated_by?: string | null;
16739
+ week_start_day?: number;
16740
+ };
16741
+ Relationships: [];
16742
+ };
16743
+ nmbrs_wage_components: {
16744
+ Row: {
16745
+ category: string;
16746
+ code: string;
16747
+ created_at: string;
15519
16748
  id: string;
15520
16749
  is_active: boolean;
15521
- leave_balance_hours: number;
15522
- name: string;
15523
- persnr: number | null;
15524
- phone: string | null;
15525
- role: string;
15526
- tenant_id: string;
16750
+ label: string;
16751
+ sort_order: number;
16752
+ unit: string;
15527
16753
  updated_at: string;
15528
- user_id: string | null;
15529
16754
  };
15530
16755
  Insert: {
15531
- avatar_url?: string | null;
15532
- color?: string | null;
16756
+ category: string;
16757
+ code: string;
15533
16758
  created_at?: string;
15534
- email?: string | null;
15535
16759
  id?: string;
15536
16760
  is_active?: boolean;
15537
- leave_balance_hours?: number;
15538
- name: string;
15539
- persnr?: number | null;
15540
- phone?: string | null;
15541
- role?: string;
15542
- tenant_id: string;
16761
+ label: string;
16762
+ sort_order?: number;
16763
+ unit: string;
15543
16764
  updated_at?: string;
15544
- user_id?: string | null;
15545
16765
  };
15546
16766
  Update: {
15547
- avatar_url?: string | null;
15548
- color?: string | null;
16767
+ category?: string;
16768
+ code?: string;
15549
16769
  created_at?: string;
15550
- email?: string | null;
15551
16770
  id?: string;
15552
16771
  is_active?: boolean;
15553
- leave_balance_hours?: number;
15554
- name?: string;
15555
- persnr?: number | null;
15556
- phone?: string | null;
15557
- role?: string;
15558
- tenant_id?: string;
16772
+ label?: string;
16773
+ sort_order?: number;
16774
+ unit?: string;
15559
16775
  updated_at?: string;
15560
- user_id?: string | null;
15561
16776
  };
15562
- Relationships: [{
15563
- foreignKeyName: "monteurs_tenant_id_fkey";
15564
- columns: ["tenant_id"];
15565
- isOneToOne: false;
15566
- referencedRelation: "tenants";
15567
- referencedColumns: ["id"];
15568
- }];
16777
+ Relationships: [];
15569
16778
  };
15570
16779
  notifications: {
15571
16780
  Row: {
@@ -17415,6 +18624,48 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
17415
18624
  };
17416
18625
  Relationships: [];
17417
18626
  };
18627
+ stock_import_runs: {
18628
+ Row: {
18629
+ connection_id: string | null;
18630
+ created_at: string;
18631
+ created_rows: number;
18632
+ errors: import("../integrations/supabase/types").Json;
18633
+ filename: string | null;
18634
+ id: string;
18635
+ mutations: import("../integrations/supabase/types").Json;
18636
+ skipped_rows: number;
18637
+ total_rows: number;
18638
+ updated_rows: number;
18639
+ user_id: string;
18640
+ };
18641
+ Insert: {
18642
+ connection_id?: string | null;
18643
+ created_at?: string;
18644
+ created_rows?: number;
18645
+ errors?: import("../integrations/supabase/types").Json;
18646
+ filename?: string | null;
18647
+ id?: string;
18648
+ mutations?: import("../integrations/supabase/types").Json;
18649
+ skipped_rows?: number;
18650
+ total_rows?: number;
18651
+ updated_rows?: number;
18652
+ user_id: string;
18653
+ };
18654
+ Update: {
18655
+ connection_id?: string | null;
18656
+ created_at?: string;
18657
+ created_rows?: number;
18658
+ errors?: import("../integrations/supabase/types").Json;
18659
+ filename?: string | null;
18660
+ id?: string;
18661
+ mutations?: import("../integrations/supabase/types").Json;
18662
+ skipped_rows?: number;
18663
+ total_rows?: number;
18664
+ updated_rows?: number;
18665
+ user_id?: string;
18666
+ };
18667
+ Relationships: [];
18668
+ };
17418
18669
  stock_mutation_log: {
17419
18670
  Row: {
17420
18671
  connection_id: string | null;
@@ -19046,6 +20297,44 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
19046
20297
  };
19047
20298
  Relationships: [];
19048
20299
  };
20300
+ floriday_customer_discounts: {
20301
+ Row: {
20302
+ base_price: number | null;
20303
+ buyer_organization_id: string | null;
20304
+ currency: string | null;
20305
+ discount_type: string | null;
20306
+ discount_value: number | null;
20307
+ min_quantity: number | null;
20308
+ net_price: number | null;
20309
+ product_group_id: string | null;
20310
+ raw: import("../integrations/supabase/types").Json | null;
20311
+ source: string | null;
20312
+ source_id: string | null;
20313
+ trade_item_id: string | null;
20314
+ valid_from: string | null;
20315
+ valid_until: string | null;
20316
+ };
20317
+ Relationships: [];
20318
+ };
20319
+ local_customer_discounts: {
20320
+ Row: {
20321
+ base_price: number | null;
20322
+ currency: string | null;
20323
+ customer_id: string | null;
20324
+ discount_type: string | null;
20325
+ discount_value: number | null;
20326
+ min_quantity: number | null;
20327
+ net_price: number | null;
20328
+ product_category_id: string | null;
20329
+ product_id: string | null;
20330
+ product_name: string | null;
20331
+ source: string | null;
20332
+ source_id: string | null;
20333
+ valid_from: string | null;
20334
+ valid_until: string | null;
20335
+ };
20336
+ Relationships: [];
20337
+ };
19049
20338
  manufacture_product_possible_stock_view: {
19050
20339
  Row: {
19051
20340
  component_count: number | null;
@@ -19413,6 +20702,28 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
19413
20702
  };
19414
20703
  Returns: number;
19415
20704
  };
20705
+ check_offer_product_available_stock: {
20706
+ Args: {
20707
+ p_campaign_product_id: string;
20708
+ p_code: string;
20709
+ p_needed_qty?: number;
20710
+ p_product_name?: string;
20711
+ };
20712
+ Returns: import("../integrations/supabase/types").Json;
20713
+ };
20714
+ check_trade_item_available_stock: {
20715
+ Args: {
20716
+ p_connection_id?: string;
20717
+ p_context?: string;
20718
+ p_needed_qty?: number;
20719
+ p_order_id?: string;
20720
+ p_order_item_id?: string;
20721
+ p_owner_id?: string;
20722
+ p_product_name?: string;
20723
+ p_trade_item_key: string;
20724
+ };
20725
+ Returns: import("../integrations/supabase/types").Json;
20726
+ };
19416
20727
  cleanup_old_bookings: {
19417
20728
  Args: never;
19418
20729
  Returns: number;
@@ -19497,6 +20808,12 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
19497
20808
  status: string;
19498
20809
  }[];
19499
20810
  };
20811
+ ensure_trade_item_stock_row: {
20812
+ Args: {
20813
+ p_key: string;
20814
+ };
20815
+ Returns: undefined;
20816
+ };
19500
20817
  ensure_user_tenant: {
19501
20818
  Args: never;
19502
20819
  Returns: string;
@@ -19534,12 +20851,31 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
19534
20851
  };
19535
20852
  Returns: boolean;
19536
20853
  };
19537
- find_trade_item_key_by_name: {
20854
+ find_trade_item_key: {
19538
20855
  Args: {
20856
+ p_barcode: string;
19539
20857
  p_name: string;
20858
+ p_product_id: string;
19540
20859
  };
19541
20860
  Returns: string;
19542
20861
  };
20862
+ floriday_effective_price: {
20863
+ Args: {
20864
+ _buyer_id: string;
20865
+ _on_date?: string;
20866
+ _quantity?: number;
20867
+ _trade_item_id: string;
20868
+ };
20869
+ Returns: {
20870
+ base_price: number;
20871
+ currency: string;
20872
+ discount_type: string;
20873
+ discount_value: number;
20874
+ net_price: number;
20875
+ source: string;
20876
+ source_id: string;
20877
+ }[];
20878
+ };
19543
20879
  format_cart_number: {
19544
20880
  Args: {
19545
20881
  p_pick_date: string;
@@ -19560,6 +20896,13 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
19560
20896
  preferred_warehouse_name: string;
19561
20897
  }[];
19562
20898
  };
20899
+ get_active_floriday_context: {
20900
+ Args: never;
20901
+ Returns: {
20902
+ connection_id: string;
20903
+ user_id: string;
20904
+ }[];
20905
+ };
19563
20906
  get_active_twinfield_public: {
19564
20907
  Args: never;
19565
20908
  Returns: {
@@ -19662,6 +21005,18 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
19662
21005
  };
19663
21006
  Returns: import("../integrations/supabase/types").Json;
19664
21007
  };
21008
+ get_offer_recipient_by_code: {
21009
+ Args: {
21010
+ p_code: string;
21011
+ };
21012
+ Returns: {
21013
+ campaign_id: string;
21014
+ clicked_at: string;
21015
+ customer_id: string;
21016
+ id: string;
21017
+ ordered_at: string;
21018
+ }[];
21019
+ };
19665
21020
  get_or_assign_floriday_order_number: {
19666
21021
  Args: {
19667
21022
  p_floriday_id: string;
@@ -19714,6 +21069,34 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
19714
21069
  Args: never;
19715
21070
  Returns: boolean;
19716
21071
  };
21072
+ local_effective_price: {
21073
+ Args: {
21074
+ _customer_id: string;
21075
+ _on_date?: string;
21076
+ _product_id: string;
21077
+ _quantity?: number;
21078
+ };
21079
+ Returns: {
21080
+ currency: string;
21081
+ discount_type: string;
21082
+ discount_value: number;
21083
+ net_price: number;
21084
+ source: string;
21085
+ source_id: string;
21086
+ }[];
21087
+ };
21088
+ mark_offer_clicked: {
21089
+ Args: {
21090
+ p_code: string;
21091
+ };
21092
+ Returns: undefined;
21093
+ };
21094
+ mark_offer_ordered: {
21095
+ Args: {
21096
+ p_code: string;
21097
+ };
21098
+ Returns: undefined;
21099
+ };
19717
21100
  next_order_number: {
19718
21101
  Args: {
19719
21102
  p_prefix: string;
@@ -19733,6 +21116,14 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
19733
21116
  };
19734
21117
  Returns: string;
19735
21118
  };
21119
+ offer_recipient_matches: {
21120
+ Args: {
21121
+ _campaign_id: string;
21122
+ _customer_id: string;
21123
+ _recipient_id: string;
21124
+ };
21125
+ Returns: boolean;
21126
+ };
19736
21127
  pickstation_get_orders_raw: {
19737
21128
  Args: never;
19738
21129
  Returns: import("../integrations/supabase/types").Json;
@@ -19760,6 +21151,13 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
19760
21151
  };
19761
21152
  Returns: undefined;
19762
21153
  };
21154
+ promote_trade_item_key: {
21155
+ Args: {
21156
+ p_new: string;
21157
+ p_old: string;
21158
+ };
21159
+ Returns: undefined;
21160
+ };
19763
21161
  refresh_floricode_derived_code_lists: {
19764
21162
  Args: never;
19765
21163
  Returns: {