@flowselections/floriday-voorraad 1.0.14 → 1.0.16

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 (45) hide show
  1. package/dist-lib/components/voorraad/ArtikelWizard.d.ts.map +1 -1
  2. package/dist-lib/components/voorraad/ArtikelWizard.js +48 -7
  3. package/dist-lib/components/voorraad/ExcelExportButton.d.ts +2 -1
  4. package/dist-lib/components/voorraad/ExcelExportButton.d.ts.map +1 -1
  5. package/dist-lib/components/voorraad/ExcelExportButton.js +24 -5
  6. package/dist-lib/components/voorraad/ProductLinkCard.d.ts +13 -0
  7. package/dist-lib/components/voorraad/ProductLinkCard.d.ts.map +1 -0
  8. package/dist-lib/components/voorraad/ProductLinkCard.js +159 -0
  9. package/dist-lib/components/voorraad/StockBulkButtons.d.ts.map +1 -1
  10. package/dist-lib/components/voorraad/StockBulkButtons.js +88 -7
  11. package/dist-lib/hooks/useTradeItemSpec.d.ts.map +1 -1
  12. package/dist-lib/hooks/useTradeItemSpec.js +4 -1
  13. package/dist-lib/hooks/useVoorraadData.d.ts +5 -4
  14. package/dist-lib/hooks/useVoorraadData.d.ts.map +1 -1
  15. package/dist-lib/hooks/useVoorraadData.js +40 -6
  16. package/dist-lib/index.d.ts +1 -0
  17. package/dist-lib/index.d.ts.map +1 -1
  18. package/dist-lib/index.js +1 -0
  19. package/dist-lib/integrations/supabase/auth-middleware.d.ts +743 -0
  20. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  21. package/dist-lib/integrations/supabase/client.d.ts +743 -0
  22. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  23. package/dist-lib/integrations/supabase/client.server.d.ts +743 -0
  24. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  25. package/dist-lib/integrations/supabase/types.d.ts +763 -0
  26. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  27. package/dist-lib/lib/ensure-article-codes.d.ts +8 -0
  28. package/dist-lib/lib/ensure-article-codes.d.ts.map +1 -0
  29. package/dist-lib/lib/ensure-article-codes.js +78 -0
  30. package/dist-lib/lib/floricode-required-features.functions.d.ts +743 -0
  31. package/dist-lib/lib/floricode-required-features.functions.d.ts.map +1 -1
  32. package/dist-lib/lib/floriday-client.d.ts +6 -0
  33. package/dist-lib/lib/floriday-client.d.ts.map +1 -1
  34. package/dist-lib/lib/floriday-gateway.functions.d.ts +2972 -0
  35. package/dist-lib/lib/floriday-gateway.functions.d.ts.map +1 -1
  36. package/dist-lib/lib/floriday-payload.d.ts +19 -5
  37. package/dist-lib/lib/floriday-payload.d.ts.map +1 -1
  38. package/dist-lib/lib/floriday-payload.js +106 -33
  39. package/dist-lib/lib/floriday-warehouse.functions.d.ts +32228 -0
  40. package/dist-lib/lib/floriday-warehouse.functions.d.ts.map +1 -0
  41. package/dist-lib/lib/floriday-warehouse.functions.js +98 -0
  42. package/dist-lib/lib/floriday-writes.functions.d.ts +1616 -130
  43. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  44. package/dist-lib/lib/floriday-writes.functions.js +34 -6
  45. package/package.json +7 -1
@@ -3647,6 +3647,51 @@ export declare const gatewaySchemaFn: import("@tanstack/start-client-core").Requ
3647
3647
  referencedColumns: ["id"];
3648
3648
  }];
3649
3649
  };
3650
+ floriday_continuous_stock_queue: {
3651
+ Row: {
3652
+ attempts: number;
3653
+ connection_id: string;
3654
+ created_at: string;
3655
+ gateway_attempt_id: string | null;
3656
+ id: string;
3657
+ last_error: string | null;
3658
+ number_of_pieces: number;
3659
+ sent_at: string | null;
3660
+ status: string;
3661
+ trade_item_id: string;
3662
+ updated_at: string;
3663
+ user_id: string;
3664
+ };
3665
+ Insert: {
3666
+ attempts?: number;
3667
+ connection_id: string;
3668
+ created_at?: string;
3669
+ gateway_attempt_id?: string | null;
3670
+ id?: string;
3671
+ last_error?: string | null;
3672
+ number_of_pieces?: number;
3673
+ sent_at?: string | null;
3674
+ status?: string;
3675
+ trade_item_id: string;
3676
+ updated_at?: string;
3677
+ user_id: string;
3678
+ };
3679
+ Update: {
3680
+ attempts?: number;
3681
+ connection_id?: string;
3682
+ created_at?: string;
3683
+ gateway_attempt_id?: string | null;
3684
+ id?: string;
3685
+ last_error?: string | null;
3686
+ number_of_pieces?: number;
3687
+ sent_at?: string | null;
3688
+ status?: string;
3689
+ trade_item_id?: string;
3690
+ updated_at?: string;
3691
+ user_id?: string;
3692
+ };
3693
+ Relationships: [];
3694
+ };
3650
3695
  floriday_contract_trade_item_groups_cache: {
3651
3696
  Row: {
3652
3697
  connection_id: string;
@@ -5036,6 +5081,204 @@ export declare const gatewaySchemaFn: import("@tanstack/start-client-core").Requ
5036
5081
  };
5037
5082
  Relationships: [];
5038
5083
  };
5084
+ local_customer_agreements: {
5085
+ Row: {
5086
+ base_price: number | null;
5087
+ created_at: string;
5088
+ currency: string;
5089
+ customer_id: string;
5090
+ id: string;
5091
+ min_quantity: number;
5092
+ net_price: number;
5093
+ notes: string | null;
5094
+ product_category_id: string | null;
5095
+ product_id: string | null;
5096
+ updated_at: string;
5097
+ valid_from: string | null;
5098
+ valid_until: string | null;
5099
+ };
5100
+ Insert: {
5101
+ base_price?: number | null;
5102
+ created_at?: string;
5103
+ currency?: string;
5104
+ customer_id: string;
5105
+ id?: string;
5106
+ min_quantity?: number;
5107
+ net_price: number;
5108
+ notes?: string | null;
5109
+ product_category_id?: string | null;
5110
+ product_id?: string | null;
5111
+ updated_at?: string;
5112
+ valid_from?: string | null;
5113
+ valid_until?: string | null;
5114
+ };
5115
+ Update: {
5116
+ base_price?: number | null;
5117
+ created_at?: string;
5118
+ currency?: string;
5119
+ customer_id?: string;
5120
+ id?: string;
5121
+ min_quantity?: number;
5122
+ net_price?: number;
5123
+ notes?: string | null;
5124
+ product_category_id?: string | null;
5125
+ product_id?: string | null;
5126
+ updated_at?: string;
5127
+ valid_from?: string | null;
5128
+ valid_until?: string | null;
5129
+ };
5130
+ Relationships: [{
5131
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
5132
+ columns: ["customer_id"];
5133
+ isOneToOne: false;
5134
+ referencedRelation: "customers";
5135
+ referencedColumns: ["id"];
5136
+ }, {
5137
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
5138
+ columns: ["product_category_id"];
5139
+ isOneToOne: false;
5140
+ referencedRelation: "product_categories";
5141
+ referencedColumns: ["id"];
5142
+ }, {
5143
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
5144
+ columns: ["product_id"];
5145
+ isOneToOne: false;
5146
+ referencedRelation: "products";
5147
+ referencedColumns: ["id"];
5148
+ }];
5149
+ };
5150
+ local_customer_price_groups: {
5151
+ Row: {
5152
+ created_at: string;
5153
+ currency: string;
5154
+ customer_id: string;
5155
+ discount_type: string;
5156
+ discount_value: number;
5157
+ id: string;
5158
+ min_quantity: number;
5159
+ notes: string | null;
5160
+ product_category_id: string | null;
5161
+ product_id: string | null;
5162
+ updated_at: string;
5163
+ valid_from: string | null;
5164
+ valid_until: string | null;
5165
+ };
5166
+ Insert: {
5167
+ created_at?: string;
5168
+ currency?: string;
5169
+ customer_id: string;
5170
+ discount_type: string;
5171
+ discount_value: number;
5172
+ id?: string;
5173
+ min_quantity?: number;
5174
+ notes?: string | null;
5175
+ product_category_id?: string | null;
5176
+ product_id?: string | null;
5177
+ updated_at?: string;
5178
+ valid_from?: string | null;
5179
+ valid_until?: string | null;
5180
+ };
5181
+ Update: {
5182
+ created_at?: string;
5183
+ currency?: string;
5184
+ customer_id?: string;
5185
+ discount_type?: string;
5186
+ discount_value?: number;
5187
+ id?: string;
5188
+ min_quantity?: number;
5189
+ notes?: string | null;
5190
+ product_category_id?: string | null;
5191
+ product_id?: string | null;
5192
+ updated_at?: string;
5193
+ valid_from?: string | null;
5194
+ valid_until?: string | null;
5195
+ };
5196
+ Relationships: [{
5197
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
5198
+ columns: ["customer_id"];
5199
+ isOneToOne: false;
5200
+ referencedRelation: "customers";
5201
+ referencedColumns: ["id"];
5202
+ }, {
5203
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
5204
+ columns: ["product_category_id"];
5205
+ isOneToOne: false;
5206
+ referencedRelation: "product_categories";
5207
+ referencedColumns: ["id"];
5208
+ }, {
5209
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
5210
+ columns: ["product_id"];
5211
+ isOneToOne: false;
5212
+ referencedRelation: "products";
5213
+ referencedColumns: ["id"];
5214
+ }];
5215
+ };
5216
+ local_customer_sales_strategies: {
5217
+ Row: {
5218
+ created_at: string;
5219
+ currency: string;
5220
+ customer_id: string;
5221
+ discount_type: string;
5222
+ discount_value: number;
5223
+ id: string;
5224
+ min_quantity: number;
5225
+ notes: string | null;
5226
+ product_category_id: string | null;
5227
+ product_id: string | null;
5228
+ updated_at: string;
5229
+ valid_from: string | null;
5230
+ valid_until: string | null;
5231
+ };
5232
+ Insert: {
5233
+ created_at?: string;
5234
+ currency?: string;
5235
+ customer_id: string;
5236
+ discount_type: string;
5237
+ discount_value: number;
5238
+ id?: string;
5239
+ min_quantity?: number;
5240
+ notes?: string | null;
5241
+ product_category_id?: string | null;
5242
+ product_id?: string | null;
5243
+ updated_at?: string;
5244
+ valid_from?: string | null;
5245
+ valid_until?: string | null;
5246
+ };
5247
+ Update: {
5248
+ created_at?: string;
5249
+ currency?: string;
5250
+ customer_id?: string;
5251
+ discount_type?: string;
5252
+ discount_value?: number;
5253
+ id?: string;
5254
+ min_quantity?: number;
5255
+ notes?: string | null;
5256
+ product_category_id?: string | null;
5257
+ product_id?: string | null;
5258
+ updated_at?: string;
5259
+ valid_from?: string | null;
5260
+ valid_until?: string | null;
5261
+ };
5262
+ Relationships: [{
5263
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
5264
+ columns: ["customer_id"];
5265
+ isOneToOne: false;
5266
+ referencedRelation: "customers";
5267
+ referencedColumns: ["id"];
5268
+ }, {
5269
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
5270
+ columns: ["product_category_id"];
5271
+ isOneToOne: false;
5272
+ referencedRelation: "product_categories";
5273
+ referencedColumns: ["id"];
5274
+ }, {
5275
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
5276
+ columns: ["product_id"];
5277
+ isOneToOne: false;
5278
+ referencedRelation: "products";
5279
+ referencedColumns: ["id"];
5280
+ }];
5281
+ };
5039
5282
  locations: {
5040
5283
  Row: {
5041
5284
  created_at: string;
@@ -5543,6 +5786,273 @@ export declare const gatewaySchemaFn: import("@tanstack/start-client-core").Requ
5543
5786
  referencedColumns: ["id"];
5544
5787
  }];
5545
5788
  };
5789
+ nmbrs_component_mapping: {
5790
+ Row: {
5791
+ created_at: string;
5792
+ id: string;
5793
+ source_kind: string;
5794
+ source_value: string | null;
5795
+ updated_at: string;
5796
+ wage_code: string;
5797
+ };
5798
+ Insert: {
5799
+ created_at?: string;
5800
+ id?: string;
5801
+ source_kind: string;
5802
+ source_value?: string | null;
5803
+ updated_at?: string;
5804
+ wage_code: string;
5805
+ };
5806
+ Update: {
5807
+ created_at?: string;
5808
+ id?: string;
5809
+ source_kind?: string;
5810
+ source_value?: string | null;
5811
+ updated_at?: string;
5812
+ wage_code?: string;
5813
+ };
5814
+ Relationships: [{
5815
+ foreignKeyName: "nmbrs_component_mapping_wage_code_fkey";
5816
+ columns: ["wage_code"];
5817
+ isOneToOne: false;
5818
+ referencedRelation: "nmbrs_wage_components";
5819
+ referencedColumns: ["code"];
5820
+ }];
5821
+ };
5822
+ nmbrs_employee_mapping: {
5823
+ Row: {
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
+ Insert: {
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
+ Update: {
5848
+ active_from?: string | null;
5849
+ active_to?: string | null;
5850
+ contract_hours_per_week?: number | null;
5851
+ created_at?: string;
5852
+ hourly_wage?: number | null;
5853
+ id?: string;
5854
+ monteur_id?: string;
5855
+ nmbrs_company_code?: string | null;
5856
+ nmbrs_employee_number?: string;
5857
+ updated_at?: string;
5858
+ };
5859
+ Relationships: [{
5860
+ foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
5861
+ columns: ["monteur_id"];
5862
+ isOneToOne: true;
5863
+ referencedRelation: "monteurs";
5864
+ referencedColumns: ["id"];
5865
+ }];
5866
+ };
5867
+ nmbrs_export_lines: {
5868
+ Row: {
5869
+ amount: number;
5870
+ created_at: string;
5871
+ entry_date: string;
5872
+ hours: number;
5873
+ id: string;
5874
+ monteur_id: string;
5875
+ nmbrs_employee_number: string | null;
5876
+ notes: string | null;
5877
+ run_id: string;
5878
+ source_kind: string | null;
5879
+ source_ref_id: string | null;
5880
+ updated_at: string;
5881
+ wage_code: string;
5882
+ };
5883
+ Insert: {
5884
+ amount?: number;
5885
+ created_at?: string;
5886
+ entry_date: string;
5887
+ hours?: number;
5888
+ id?: string;
5889
+ monteur_id: string;
5890
+ nmbrs_employee_number?: string | null;
5891
+ notes?: string | null;
5892
+ run_id: string;
5893
+ source_kind?: string | null;
5894
+ source_ref_id?: string | null;
5895
+ updated_at?: string;
5896
+ wage_code: string;
5897
+ };
5898
+ Update: {
5899
+ amount?: number;
5900
+ created_at?: string;
5901
+ entry_date?: string;
5902
+ hours?: number;
5903
+ id?: string;
5904
+ monteur_id?: string;
5905
+ nmbrs_employee_number?: string | null;
5906
+ notes?: string | null;
5907
+ run_id?: string;
5908
+ source_kind?: string | null;
5909
+ source_ref_id?: string | null;
5910
+ updated_at?: string;
5911
+ wage_code?: string;
5912
+ };
5913
+ Relationships: [{
5914
+ foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
5915
+ columns: ["monteur_id"];
5916
+ isOneToOne: false;
5917
+ referencedRelation: "monteurs";
5918
+ referencedColumns: ["id"];
5919
+ }, {
5920
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
5921
+ columns: ["run_id"];
5922
+ isOneToOne: false;
5923
+ referencedRelation: "nmbrs_export_runs";
5924
+ referencedColumns: ["id"];
5925
+ }, {
5926
+ foreignKeyName: "nmbrs_export_lines_wage_code_fkey";
5927
+ columns: ["wage_code"];
5928
+ isOneToOne: false;
5929
+ referencedRelation: "nmbrs_wage_components";
5930
+ referencedColumns: ["code"];
5931
+ }];
5932
+ };
5933
+ nmbrs_export_runs: {
5934
+ Row: {
5935
+ created_at: string;
5936
+ file_name: string | null;
5937
+ generated_at: string;
5938
+ generated_by: string | null;
5939
+ id: string;
5940
+ notes: string | null;
5941
+ period_end: string;
5942
+ period_label: string;
5943
+ period_start: string;
5944
+ status: string;
5945
+ total_hours: number;
5946
+ total_lines: number;
5947
+ updated_at: string;
5948
+ };
5949
+ Insert: {
5950
+ created_at?: string;
5951
+ file_name?: string | null;
5952
+ generated_at?: string;
5953
+ generated_by?: string | null;
5954
+ id?: string;
5955
+ notes?: string | null;
5956
+ period_end: string;
5957
+ period_label: string;
5958
+ period_start: string;
5959
+ status?: string;
5960
+ total_hours?: number;
5961
+ total_lines?: number;
5962
+ updated_at?: string;
5963
+ };
5964
+ Update: {
5965
+ created_at?: string;
5966
+ file_name?: string | null;
5967
+ generated_at?: string;
5968
+ generated_by?: string | null;
5969
+ id?: string;
5970
+ notes?: string | null;
5971
+ period_end?: string;
5972
+ period_label?: string;
5973
+ period_start?: string;
5974
+ status?: string;
5975
+ total_hours?: number;
5976
+ total_lines?: number;
5977
+ updated_at?: string;
5978
+ };
5979
+ Relationships: [];
5980
+ };
5981
+ nmbrs_settings: {
5982
+ Row: {
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
+ Insert: {
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
+ Update: {
6007
+ created_at?: string;
6008
+ default_company_code?: string | null;
6009
+ id?: boolean;
6010
+ include_travel?: boolean;
6011
+ overtime_threshold_daily?: number;
6012
+ overtime_threshold_weekly?: number;
6013
+ period_type?: string;
6014
+ updated_at?: string;
6015
+ updated_by?: string | null;
6016
+ week_start_day?: number;
6017
+ };
6018
+ Relationships: [];
6019
+ };
6020
+ nmbrs_wage_components: {
6021
+ Row: {
6022
+ category: string;
6023
+ code: string;
6024
+ created_at: string;
6025
+ id: string;
6026
+ is_active: boolean;
6027
+ label: string;
6028
+ sort_order: number;
6029
+ unit: string;
6030
+ updated_at: string;
6031
+ };
6032
+ Insert: {
6033
+ category: string;
6034
+ code: string;
6035
+ created_at?: string;
6036
+ id?: string;
6037
+ is_active?: boolean;
6038
+ label: string;
6039
+ sort_order?: number;
6040
+ unit: string;
6041
+ updated_at?: string;
6042
+ };
6043
+ Update: {
6044
+ category?: string;
6045
+ code?: string;
6046
+ created_at?: string;
6047
+ id?: string;
6048
+ is_active?: boolean;
6049
+ label?: string;
6050
+ sort_order?: number;
6051
+ unit?: string;
6052
+ updated_at?: string;
6053
+ };
6054
+ Relationships: [];
6055
+ };
5546
6056
  notifications: {
5547
6057
  Row: {
5548
6058
  created_at: string;
@@ -7391,6 +7901,48 @@ export declare const gatewaySchemaFn: import("@tanstack/start-client-core").Requ
7391
7901
  };
7392
7902
  Relationships: [];
7393
7903
  };
7904
+ stock_import_runs: {
7905
+ Row: {
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
+ Insert: {
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
+ Update: {
7932
+ connection_id?: string | null;
7933
+ created_at?: string;
7934
+ created_rows?: number;
7935
+ errors?: import("../integrations/supabase/types").Json;
7936
+ filename?: string | null;
7937
+ id?: string;
7938
+ mutations?: import("../integrations/supabase/types").Json;
7939
+ skipped_rows?: number;
7940
+ total_rows?: number;
7941
+ updated_rows?: number;
7942
+ user_id?: string;
7943
+ };
7944
+ Relationships: [];
7945
+ };
7394
7946
  stock_mutation_log: {
7395
7947
  Row: {
7396
7948
  connection_id: string | null;
@@ -9022,6 +9574,44 @@ export declare const gatewaySchemaFn: import("@tanstack/start-client-core").Requ
9022
9574
  };
9023
9575
  Relationships: [];
9024
9576
  };
9577
+ floriday_customer_discounts: {
9578
+ Row: {
9579
+ base_price: number | null;
9580
+ buyer_organization_id: string | null;
9581
+ currency: string | null;
9582
+ discount_type: string | null;
9583
+ discount_value: number | null;
9584
+ min_quantity: number | null;
9585
+ net_price: number | null;
9586
+ product_group_id: string | null;
9587
+ raw: import("../integrations/supabase/types").Json | null;
9588
+ source: string | null;
9589
+ source_id: string | null;
9590
+ trade_item_id: string | null;
9591
+ valid_from: string | null;
9592
+ valid_until: string | null;
9593
+ };
9594
+ Relationships: [];
9595
+ };
9596
+ local_customer_discounts: {
9597
+ Row: {
9598
+ base_price: number | null;
9599
+ currency: string | null;
9600
+ customer_id: string | null;
9601
+ discount_type: string | null;
9602
+ discount_value: number | null;
9603
+ min_quantity: number | null;
9604
+ net_price: number | null;
9605
+ product_category_id: string | null;
9606
+ product_id: string | null;
9607
+ product_name: string | null;
9608
+ source: string | null;
9609
+ source_id: string | null;
9610
+ valid_from: string | null;
9611
+ valid_until: string | null;
9612
+ };
9613
+ Relationships: [];
9614
+ };
9025
9615
  manufacture_product_possible_stock_view: {
9026
9616
  Row: {
9027
9617
  component_count: number | null;
@@ -9306,6 +9896,32 @@ export declare const gatewaySchemaFn: import("@tanstack/start-client-core").Requ
9306
9896
  };
9307
9897
  Returns: number;
9308
9898
  };
9899
+ afh_city_code: {
9900
+ Args: {
9901
+ _city: string;
9902
+ _country: string;
9903
+ };
9904
+ Returns: string;
9905
+ };
9906
+ afh_normalize_country: {
9907
+ Args: {
9908
+ _raw: string;
9909
+ };
9910
+ Returns: string;
9911
+ };
9912
+ afh_normalize_nl_province: {
9913
+ Args: {
9914
+ _raw: string;
9915
+ };
9916
+ Returns: string;
9917
+ };
9918
+ afh_subtract_workdays: {
9919
+ Args: {
9920
+ _date: string;
9921
+ _days: number;
9922
+ };
9923
+ Returns: string;
9924
+ };
9309
9925
  apply_stock_consumption: {
9310
9926
  Args: {
9311
9927
  p_order_id: string;
@@ -9351,12 +9967,40 @@ export declare const gatewaySchemaFn: import("@tanstack/start-client-core").Requ
9351
9967
  order_number: string;
9352
9968
  }[];
9353
9969
  };
9970
+ backfill_open_order_reservations: {
9971
+ Args: never;
9972
+ Returns: {
9973
+ processed_items: number;
9974
+ }[];
9975
+ };
9354
9976
  call_exact_route: {
9355
9977
  Args: {
9356
9978
  path: string;
9357
9979
  };
9358
9980
  Returns: number;
9359
9981
  };
9982
+ check_offer_product_available_stock: {
9983
+ Args: {
9984
+ p_campaign_product_id: string;
9985
+ p_code: string;
9986
+ p_needed_qty?: number;
9987
+ p_product_name?: string;
9988
+ };
9989
+ Returns: import("../integrations/supabase/types").Json;
9990
+ };
9991
+ check_trade_item_available_stock: {
9992
+ Args: {
9993
+ p_connection_id?: string;
9994
+ p_context?: string;
9995
+ p_needed_qty?: number;
9996
+ p_order_id?: string;
9997
+ p_order_item_id?: string;
9998
+ p_owner_id?: string;
9999
+ p_product_name?: string;
10000
+ p_trade_item_key: string;
10001
+ };
10002
+ Returns: import("../integrations/supabase/types").Json;
10003
+ };
9360
10004
  cleanup_old_bookings: {
9361
10005
  Args: never;
9362
10006
  Returns: number;
@@ -9400,6 +10044,12 @@ export declare const gatewaySchemaFn: import("@tanstack/start-client-core").Requ
9400
10044
  table_name: string;
9401
10045
  }[];
9402
10046
  };
10047
+ dispatch_carrier_signups_sql: {
10048
+ Args: {
10049
+ _catchup?: string;
10050
+ };
10051
+ Returns: import("../integrations/supabase/types").Json;
10052
+ };
9403
10053
  email_auth_decrypt: {
9404
10054
  Args: {
9405
10055
  cipher: string;
@@ -9435,6 +10085,12 @@ export declare const gatewaySchemaFn: import("@tanstack/start-client-core").Requ
9435
10085
  status: string;
9436
10086
  }[];
9437
10087
  };
10088
+ ensure_trade_item_stock_row: {
10089
+ Args: {
10090
+ p_key: string;
10091
+ };
10092
+ Returns: undefined;
10093
+ };
9438
10094
  ensure_user_tenant: {
9439
10095
  Args: never;
9440
10096
  Returns: string;
@@ -9472,6 +10128,31 @@ export declare const gatewaySchemaFn: import("@tanstack/start-client-core").Requ
9472
10128
  };
9473
10129
  Returns: boolean;
9474
10130
  };
10131
+ find_trade_item_key: {
10132
+ Args: {
10133
+ p_barcode: string;
10134
+ p_name: string;
10135
+ p_product_id: string;
10136
+ };
10137
+ Returns: string;
10138
+ };
10139
+ floriday_effective_price: {
10140
+ Args: {
10141
+ _buyer_id: string;
10142
+ _on_date?: string;
10143
+ _quantity?: number;
10144
+ _trade_item_id: string;
10145
+ };
10146
+ Returns: {
10147
+ base_price: number;
10148
+ currency: string;
10149
+ discount_type: string;
10150
+ discount_value: number;
10151
+ net_price: number;
10152
+ source: string;
10153
+ source_id: string;
10154
+ }[];
10155
+ };
9475
10156
  format_cart_number: {
9476
10157
  Args: {
9477
10158
  p_pick_date: string;
@@ -9492,6 +10173,13 @@ export declare const gatewaySchemaFn: import("@tanstack/start-client-core").Requ
9492
10173
  preferred_warehouse_name: string;
9493
10174
  }[];
9494
10175
  };
10176
+ get_active_floriday_context: {
10177
+ Args: never;
10178
+ Returns: {
10179
+ connection_id: string;
10180
+ user_id: string;
10181
+ }[];
10182
+ };
9495
10183
  get_active_twinfield_public: {
9496
10184
  Args: never;
9497
10185
  Returns: {
@@ -9594,6 +10282,18 @@ export declare const gatewaySchemaFn: import("@tanstack/start-client-core").Requ
9594
10282
  };
9595
10283
  Returns: import("../integrations/supabase/types").Json;
9596
10284
  };
10285
+ get_offer_recipient_by_code: {
10286
+ Args: {
10287
+ p_code: string;
10288
+ };
10289
+ Returns: {
10290
+ campaign_id: string;
10291
+ clicked_at: string;
10292
+ customer_id: string;
10293
+ id: string;
10294
+ ordered_at: string;
10295
+ }[];
10296
+ };
9597
10297
  get_or_assign_floriday_order_number: {
9598
10298
  Args: {
9599
10299
  p_floriday_id: string;
@@ -9646,6 +10346,34 @@ export declare const gatewaySchemaFn: import("@tanstack/start-client-core").Requ
9646
10346
  Args: never;
9647
10347
  Returns: boolean;
9648
10348
  };
10349
+ local_effective_price: {
10350
+ Args: {
10351
+ _customer_id: string;
10352
+ _on_date?: string;
10353
+ _product_id: string;
10354
+ _quantity?: number;
10355
+ };
10356
+ Returns: {
10357
+ currency: string;
10358
+ discount_type: string;
10359
+ discount_value: number;
10360
+ net_price: number;
10361
+ source: string;
10362
+ source_id: string;
10363
+ }[];
10364
+ };
10365
+ mark_offer_clicked: {
10366
+ Args: {
10367
+ p_code: string;
10368
+ };
10369
+ Returns: undefined;
10370
+ };
10371
+ mark_offer_ordered: {
10372
+ Args: {
10373
+ p_code: string;
10374
+ };
10375
+ Returns: undefined;
10376
+ };
9649
10377
  next_order_number: {
9650
10378
  Args: {
9651
10379
  p_prefix: string;
@@ -9665,6 +10393,14 @@ export declare const gatewaySchemaFn: import("@tanstack/start-client-core").Requ
9665
10393
  };
9666
10394
  Returns: string;
9667
10395
  };
10396
+ offer_recipient_matches: {
10397
+ Args: {
10398
+ _campaign_id: string;
10399
+ _customer_id: string;
10400
+ _recipient_id: string;
10401
+ };
10402
+ Returns: boolean;
10403
+ };
9668
10404
  pickstation_get_orders_raw: {
9669
10405
  Args: never;
9670
10406
  Returns: import("../integrations/supabase/types").Json;
@@ -9692,6 +10428,13 @@ export declare const gatewaySchemaFn: import("@tanstack/start-client-core").Requ
9692
10428
  };
9693
10429
  Returns: undefined;
9694
10430
  };
10431
+ promote_trade_item_key: {
10432
+ Args: {
10433
+ p_new: string;
10434
+ p_old: string;
10435
+ };
10436
+ Returns: undefined;
10437
+ };
9695
10438
  refresh_floricode_derived_code_lists: {
9696
10439
  Args: never;
9697
10440
  Returns: {
@@ -13640,6 +14383,51 @@ export declare const gatewayCodeListFn: import("@tanstack/start-client-core").Re
13640
14383
  referencedColumns: ["id"];
13641
14384
  }];
13642
14385
  };
14386
+ floriday_continuous_stock_queue: {
14387
+ Row: {
14388
+ attempts: number;
14389
+ connection_id: string;
14390
+ created_at: string;
14391
+ gateway_attempt_id: string | null;
14392
+ id: string;
14393
+ last_error: string | null;
14394
+ number_of_pieces: number;
14395
+ sent_at: string | null;
14396
+ status: string;
14397
+ trade_item_id: string;
14398
+ updated_at: string;
14399
+ user_id: string;
14400
+ };
14401
+ Insert: {
14402
+ attempts?: number;
14403
+ connection_id: string;
14404
+ created_at?: string;
14405
+ gateway_attempt_id?: string | null;
14406
+ id?: string;
14407
+ last_error?: string | null;
14408
+ number_of_pieces?: number;
14409
+ sent_at?: string | null;
14410
+ status?: string;
14411
+ trade_item_id: string;
14412
+ updated_at?: string;
14413
+ user_id: string;
14414
+ };
14415
+ Update: {
14416
+ attempts?: number;
14417
+ connection_id?: string;
14418
+ created_at?: string;
14419
+ gateway_attempt_id?: string | null;
14420
+ id?: string;
14421
+ last_error?: string | null;
14422
+ number_of_pieces?: number;
14423
+ sent_at?: string | null;
14424
+ status?: string;
14425
+ trade_item_id?: string;
14426
+ updated_at?: string;
14427
+ user_id?: string;
14428
+ };
14429
+ Relationships: [];
14430
+ };
13643
14431
  floriday_contract_trade_item_groups_cache: {
13644
14432
  Row: {
13645
14433
  connection_id: string;
@@ -15029,6 +15817,204 @@ export declare const gatewayCodeListFn: import("@tanstack/start-client-core").Re
15029
15817
  };
15030
15818
  Relationships: [];
15031
15819
  };
15820
+ local_customer_agreements: {
15821
+ Row: {
15822
+ base_price: number | null;
15823
+ created_at: string;
15824
+ currency: string;
15825
+ customer_id: string;
15826
+ id: string;
15827
+ min_quantity: number;
15828
+ net_price: number;
15829
+ notes: string | null;
15830
+ product_category_id: string | null;
15831
+ product_id: string | null;
15832
+ updated_at: string;
15833
+ valid_from: string | null;
15834
+ valid_until: string | null;
15835
+ };
15836
+ Insert: {
15837
+ base_price?: number | null;
15838
+ created_at?: string;
15839
+ currency?: string;
15840
+ customer_id: string;
15841
+ id?: string;
15842
+ min_quantity?: number;
15843
+ net_price: number;
15844
+ notes?: string | null;
15845
+ product_category_id?: string | null;
15846
+ product_id?: string | null;
15847
+ updated_at?: string;
15848
+ valid_from?: string | null;
15849
+ valid_until?: string | null;
15850
+ };
15851
+ Update: {
15852
+ base_price?: number | null;
15853
+ created_at?: string;
15854
+ currency?: string;
15855
+ customer_id?: string;
15856
+ id?: string;
15857
+ min_quantity?: number;
15858
+ net_price?: number;
15859
+ notes?: string | null;
15860
+ product_category_id?: string | null;
15861
+ product_id?: string | null;
15862
+ updated_at?: string;
15863
+ valid_from?: string | null;
15864
+ valid_until?: string | null;
15865
+ };
15866
+ Relationships: [{
15867
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
15868
+ columns: ["customer_id"];
15869
+ isOneToOne: false;
15870
+ referencedRelation: "customers";
15871
+ referencedColumns: ["id"];
15872
+ }, {
15873
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
15874
+ columns: ["product_category_id"];
15875
+ isOneToOne: false;
15876
+ referencedRelation: "product_categories";
15877
+ referencedColumns: ["id"];
15878
+ }, {
15879
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
15880
+ columns: ["product_id"];
15881
+ isOneToOne: false;
15882
+ referencedRelation: "products";
15883
+ referencedColumns: ["id"];
15884
+ }];
15885
+ };
15886
+ local_customer_price_groups: {
15887
+ Row: {
15888
+ created_at: string;
15889
+ currency: string;
15890
+ customer_id: string;
15891
+ discount_type: string;
15892
+ discount_value: number;
15893
+ id: string;
15894
+ min_quantity: number;
15895
+ notes: string | null;
15896
+ product_category_id: string | null;
15897
+ product_id: string | null;
15898
+ updated_at: string;
15899
+ valid_from: string | null;
15900
+ valid_until: string | null;
15901
+ };
15902
+ Insert: {
15903
+ created_at?: string;
15904
+ currency?: string;
15905
+ customer_id: string;
15906
+ discount_type: string;
15907
+ discount_value: number;
15908
+ id?: string;
15909
+ min_quantity?: number;
15910
+ notes?: string | null;
15911
+ product_category_id?: string | null;
15912
+ product_id?: string | null;
15913
+ updated_at?: string;
15914
+ valid_from?: string | null;
15915
+ valid_until?: string | null;
15916
+ };
15917
+ Update: {
15918
+ created_at?: string;
15919
+ currency?: string;
15920
+ customer_id?: string;
15921
+ discount_type?: string;
15922
+ discount_value?: number;
15923
+ id?: string;
15924
+ min_quantity?: number;
15925
+ notes?: string | null;
15926
+ product_category_id?: string | null;
15927
+ product_id?: string | null;
15928
+ updated_at?: string;
15929
+ valid_from?: string | null;
15930
+ valid_until?: string | null;
15931
+ };
15932
+ Relationships: [{
15933
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
15934
+ columns: ["customer_id"];
15935
+ isOneToOne: false;
15936
+ referencedRelation: "customers";
15937
+ referencedColumns: ["id"];
15938
+ }, {
15939
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
15940
+ columns: ["product_category_id"];
15941
+ isOneToOne: false;
15942
+ referencedRelation: "product_categories";
15943
+ referencedColumns: ["id"];
15944
+ }, {
15945
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
15946
+ columns: ["product_id"];
15947
+ isOneToOne: false;
15948
+ referencedRelation: "products";
15949
+ referencedColumns: ["id"];
15950
+ }];
15951
+ };
15952
+ local_customer_sales_strategies: {
15953
+ Row: {
15954
+ created_at: string;
15955
+ currency: string;
15956
+ customer_id: string;
15957
+ discount_type: string;
15958
+ discount_value: number;
15959
+ id: string;
15960
+ min_quantity: number;
15961
+ notes: string | null;
15962
+ product_category_id: string | null;
15963
+ product_id: string | null;
15964
+ updated_at: string;
15965
+ valid_from: string | null;
15966
+ valid_until: string | null;
15967
+ };
15968
+ Insert: {
15969
+ created_at?: string;
15970
+ currency?: string;
15971
+ customer_id: string;
15972
+ discount_type: string;
15973
+ discount_value: number;
15974
+ id?: string;
15975
+ min_quantity?: number;
15976
+ notes?: string | null;
15977
+ product_category_id?: string | null;
15978
+ product_id?: string | null;
15979
+ updated_at?: string;
15980
+ valid_from?: string | null;
15981
+ valid_until?: string | null;
15982
+ };
15983
+ Update: {
15984
+ created_at?: string;
15985
+ currency?: string;
15986
+ customer_id?: string;
15987
+ discount_type?: string;
15988
+ discount_value?: number;
15989
+ id?: string;
15990
+ min_quantity?: number;
15991
+ notes?: string | null;
15992
+ product_category_id?: string | null;
15993
+ product_id?: string | null;
15994
+ updated_at?: string;
15995
+ valid_from?: string | null;
15996
+ valid_until?: string | null;
15997
+ };
15998
+ Relationships: [{
15999
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
16000
+ columns: ["customer_id"];
16001
+ isOneToOne: false;
16002
+ referencedRelation: "customers";
16003
+ referencedColumns: ["id"];
16004
+ }, {
16005
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
16006
+ columns: ["product_category_id"];
16007
+ isOneToOne: false;
16008
+ referencedRelation: "product_categories";
16009
+ referencedColumns: ["id"];
16010
+ }, {
16011
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
16012
+ columns: ["product_id"];
16013
+ isOneToOne: false;
16014
+ referencedRelation: "products";
16015
+ referencedColumns: ["id"];
16016
+ }];
16017
+ };
15032
16018
  locations: {
15033
16019
  Row: {
15034
16020
  created_at: string;
@@ -15536,6 +16522,273 @@ export declare const gatewayCodeListFn: import("@tanstack/start-client-core").Re
15536
16522
  referencedColumns: ["id"];
15537
16523
  }];
15538
16524
  };
16525
+ nmbrs_component_mapping: {
16526
+ Row: {
16527
+ created_at: string;
16528
+ id: string;
16529
+ source_kind: string;
16530
+ source_value: string | null;
16531
+ updated_at: string;
16532
+ wage_code: string;
16533
+ };
16534
+ Insert: {
16535
+ created_at?: string;
16536
+ id?: string;
16537
+ source_kind: string;
16538
+ source_value?: string | null;
16539
+ updated_at?: string;
16540
+ wage_code: string;
16541
+ };
16542
+ Update: {
16543
+ created_at?: string;
16544
+ id?: string;
16545
+ source_kind?: string;
16546
+ source_value?: string | null;
16547
+ updated_at?: string;
16548
+ wage_code?: string;
16549
+ };
16550
+ Relationships: [{
16551
+ foreignKeyName: "nmbrs_component_mapping_wage_code_fkey";
16552
+ columns: ["wage_code"];
16553
+ isOneToOne: false;
16554
+ referencedRelation: "nmbrs_wage_components";
16555
+ referencedColumns: ["code"];
16556
+ }];
16557
+ };
16558
+ nmbrs_employee_mapping: {
16559
+ Row: {
16560
+ active_from: string | null;
16561
+ active_to: string | null;
16562
+ contract_hours_per_week: number | null;
16563
+ created_at: string;
16564
+ hourly_wage: number | null;
16565
+ id: string;
16566
+ monteur_id: string;
16567
+ nmbrs_company_code: string | null;
16568
+ nmbrs_employee_number: string;
16569
+ updated_at: string;
16570
+ };
16571
+ Insert: {
16572
+ active_from?: string | null;
16573
+ active_to?: string | null;
16574
+ contract_hours_per_week?: number | null;
16575
+ created_at?: string;
16576
+ hourly_wage?: number | null;
16577
+ id?: string;
16578
+ monteur_id: string;
16579
+ nmbrs_company_code?: string | null;
16580
+ nmbrs_employee_number: string;
16581
+ updated_at?: string;
16582
+ };
16583
+ Update: {
16584
+ active_from?: string | null;
16585
+ active_to?: string | null;
16586
+ contract_hours_per_week?: number | null;
16587
+ created_at?: string;
16588
+ hourly_wage?: number | null;
16589
+ id?: string;
16590
+ monteur_id?: string;
16591
+ nmbrs_company_code?: string | null;
16592
+ nmbrs_employee_number?: string;
16593
+ updated_at?: string;
16594
+ };
16595
+ Relationships: [{
16596
+ foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
16597
+ columns: ["monteur_id"];
16598
+ isOneToOne: true;
16599
+ referencedRelation: "monteurs";
16600
+ referencedColumns: ["id"];
16601
+ }];
16602
+ };
16603
+ nmbrs_export_lines: {
16604
+ Row: {
16605
+ amount: number;
16606
+ created_at: string;
16607
+ entry_date: string;
16608
+ hours: number;
16609
+ id: string;
16610
+ monteur_id: string;
16611
+ nmbrs_employee_number: string | null;
16612
+ notes: string | null;
16613
+ run_id: string;
16614
+ source_kind: string | null;
16615
+ source_ref_id: string | null;
16616
+ updated_at: string;
16617
+ wage_code: string;
16618
+ };
16619
+ Insert: {
16620
+ amount?: number;
16621
+ created_at?: string;
16622
+ entry_date: string;
16623
+ hours?: number;
16624
+ id?: string;
16625
+ monteur_id: string;
16626
+ nmbrs_employee_number?: string | null;
16627
+ notes?: string | null;
16628
+ run_id: string;
16629
+ source_kind?: string | null;
16630
+ source_ref_id?: string | null;
16631
+ updated_at?: string;
16632
+ wage_code: string;
16633
+ };
16634
+ Update: {
16635
+ amount?: number;
16636
+ created_at?: string;
16637
+ entry_date?: string;
16638
+ hours?: number;
16639
+ id?: string;
16640
+ monteur_id?: string;
16641
+ nmbrs_employee_number?: string | null;
16642
+ notes?: string | null;
16643
+ run_id?: string;
16644
+ source_kind?: string | null;
16645
+ source_ref_id?: string | null;
16646
+ updated_at?: string;
16647
+ wage_code?: string;
16648
+ };
16649
+ Relationships: [{
16650
+ foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
16651
+ columns: ["monteur_id"];
16652
+ isOneToOne: false;
16653
+ referencedRelation: "monteurs";
16654
+ referencedColumns: ["id"];
16655
+ }, {
16656
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
16657
+ columns: ["run_id"];
16658
+ isOneToOne: false;
16659
+ referencedRelation: "nmbrs_export_runs";
16660
+ referencedColumns: ["id"];
16661
+ }, {
16662
+ foreignKeyName: "nmbrs_export_lines_wage_code_fkey";
16663
+ columns: ["wage_code"];
16664
+ isOneToOne: false;
16665
+ referencedRelation: "nmbrs_wage_components";
16666
+ referencedColumns: ["code"];
16667
+ }];
16668
+ };
16669
+ nmbrs_export_runs: {
16670
+ Row: {
16671
+ created_at: string;
16672
+ file_name: string | null;
16673
+ generated_at: string;
16674
+ generated_by: string | null;
16675
+ id: string;
16676
+ notes: string | null;
16677
+ period_end: string;
16678
+ period_label: string;
16679
+ period_start: string;
16680
+ status: string;
16681
+ total_hours: number;
16682
+ total_lines: number;
16683
+ updated_at: string;
16684
+ };
16685
+ Insert: {
16686
+ created_at?: string;
16687
+ file_name?: string | null;
16688
+ generated_at?: string;
16689
+ generated_by?: string | null;
16690
+ id?: string;
16691
+ notes?: string | null;
16692
+ period_end: string;
16693
+ period_label: string;
16694
+ period_start: string;
16695
+ status?: string;
16696
+ total_hours?: number;
16697
+ total_lines?: number;
16698
+ updated_at?: string;
16699
+ };
16700
+ Update: {
16701
+ created_at?: string;
16702
+ file_name?: string | null;
16703
+ generated_at?: string;
16704
+ generated_by?: string | null;
16705
+ id?: string;
16706
+ notes?: string | null;
16707
+ period_end?: string;
16708
+ period_label?: string;
16709
+ period_start?: string;
16710
+ status?: string;
16711
+ total_hours?: number;
16712
+ total_lines?: number;
16713
+ updated_at?: string;
16714
+ };
16715
+ Relationships: [];
16716
+ };
16717
+ nmbrs_settings: {
16718
+ Row: {
16719
+ created_at: string;
16720
+ default_company_code: string | null;
16721
+ id: boolean;
16722
+ include_travel: boolean;
16723
+ overtime_threshold_daily: number;
16724
+ overtime_threshold_weekly: number;
16725
+ period_type: string;
16726
+ updated_at: string;
16727
+ updated_by: string | null;
16728
+ week_start_day: number;
16729
+ };
16730
+ Insert: {
16731
+ created_at?: string;
16732
+ default_company_code?: string | null;
16733
+ id?: boolean;
16734
+ include_travel?: boolean;
16735
+ overtime_threshold_daily?: number;
16736
+ overtime_threshold_weekly?: number;
16737
+ period_type?: string;
16738
+ updated_at?: string;
16739
+ updated_by?: string | null;
16740
+ week_start_day?: number;
16741
+ };
16742
+ Update: {
16743
+ created_at?: string;
16744
+ default_company_code?: string | null;
16745
+ id?: boolean;
16746
+ include_travel?: boolean;
16747
+ overtime_threshold_daily?: number;
16748
+ overtime_threshold_weekly?: number;
16749
+ period_type?: string;
16750
+ updated_at?: string;
16751
+ updated_by?: string | null;
16752
+ week_start_day?: number;
16753
+ };
16754
+ Relationships: [];
16755
+ };
16756
+ nmbrs_wage_components: {
16757
+ Row: {
16758
+ category: string;
16759
+ code: string;
16760
+ created_at: string;
16761
+ id: string;
16762
+ is_active: boolean;
16763
+ label: string;
16764
+ sort_order: number;
16765
+ unit: string;
16766
+ updated_at: string;
16767
+ };
16768
+ Insert: {
16769
+ category: string;
16770
+ code: string;
16771
+ created_at?: string;
16772
+ id?: string;
16773
+ is_active?: boolean;
16774
+ label: string;
16775
+ sort_order?: number;
16776
+ unit: string;
16777
+ updated_at?: string;
16778
+ };
16779
+ Update: {
16780
+ category?: string;
16781
+ code?: string;
16782
+ created_at?: string;
16783
+ id?: string;
16784
+ is_active?: boolean;
16785
+ label?: string;
16786
+ sort_order?: number;
16787
+ unit?: string;
16788
+ updated_at?: string;
16789
+ };
16790
+ Relationships: [];
16791
+ };
15539
16792
  notifications: {
15540
16793
  Row: {
15541
16794
  created_at: string;
@@ -17384,6 +18637,48 @@ export declare const gatewayCodeListFn: import("@tanstack/start-client-core").Re
17384
18637
  };
17385
18638
  Relationships: [];
17386
18639
  };
18640
+ stock_import_runs: {
18641
+ Row: {
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
+ Insert: {
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
+ Update: {
18668
+ connection_id?: string | null;
18669
+ created_at?: string;
18670
+ created_rows?: number;
18671
+ errors?: import("../integrations/supabase/types").Json;
18672
+ filename?: string | null;
18673
+ id?: string;
18674
+ mutations?: import("../integrations/supabase/types").Json;
18675
+ skipped_rows?: number;
18676
+ total_rows?: number;
18677
+ updated_rows?: number;
18678
+ user_id?: string;
18679
+ };
18680
+ Relationships: [];
18681
+ };
17387
18682
  stock_mutation_log: {
17388
18683
  Row: {
17389
18684
  connection_id: string | null;
@@ -19015,6 +20310,44 @@ export declare const gatewayCodeListFn: import("@tanstack/start-client-core").Re
19015
20310
  };
19016
20311
  Relationships: [];
19017
20312
  };
20313
+ floriday_customer_discounts: {
20314
+ Row: {
20315
+ base_price: number | null;
20316
+ buyer_organization_id: string | null;
20317
+ currency: string | null;
20318
+ discount_type: string | null;
20319
+ discount_value: number | null;
20320
+ min_quantity: number | null;
20321
+ net_price: number | null;
20322
+ product_group_id: string | null;
20323
+ raw: import("../integrations/supabase/types").Json | null;
20324
+ source: string | null;
20325
+ source_id: string | null;
20326
+ trade_item_id: string | null;
20327
+ valid_from: string | null;
20328
+ valid_until: string | null;
20329
+ };
20330
+ Relationships: [];
20331
+ };
20332
+ local_customer_discounts: {
20333
+ Row: {
20334
+ base_price: number | null;
20335
+ currency: string | null;
20336
+ customer_id: string | null;
20337
+ discount_type: string | null;
20338
+ discount_value: number | null;
20339
+ min_quantity: number | null;
20340
+ net_price: number | null;
20341
+ product_category_id: string | null;
20342
+ product_id: string | null;
20343
+ product_name: string | null;
20344
+ source: string | null;
20345
+ source_id: string | null;
20346
+ valid_from: string | null;
20347
+ valid_until: string | null;
20348
+ };
20349
+ Relationships: [];
20350
+ };
19018
20351
  manufacture_product_possible_stock_view: {
19019
20352
  Row: {
19020
20353
  component_count: number | null;
@@ -19299,6 +20632,32 @@ export declare const gatewayCodeListFn: import("@tanstack/start-client-core").Re
19299
20632
  };
19300
20633
  Returns: number;
19301
20634
  };
20635
+ afh_city_code: {
20636
+ Args: {
20637
+ _city: string;
20638
+ _country: string;
20639
+ };
20640
+ Returns: string;
20641
+ };
20642
+ afh_normalize_country: {
20643
+ Args: {
20644
+ _raw: string;
20645
+ };
20646
+ Returns: string;
20647
+ };
20648
+ afh_normalize_nl_province: {
20649
+ Args: {
20650
+ _raw: string;
20651
+ };
20652
+ Returns: string;
20653
+ };
20654
+ afh_subtract_workdays: {
20655
+ Args: {
20656
+ _date: string;
20657
+ _days: number;
20658
+ };
20659
+ Returns: string;
20660
+ };
19302
20661
  apply_stock_consumption: {
19303
20662
  Args: {
19304
20663
  p_order_id: string;
@@ -19344,12 +20703,40 @@ export declare const gatewayCodeListFn: import("@tanstack/start-client-core").Re
19344
20703
  order_number: string;
19345
20704
  }[];
19346
20705
  };
20706
+ backfill_open_order_reservations: {
20707
+ Args: never;
20708
+ Returns: {
20709
+ processed_items: number;
20710
+ }[];
20711
+ };
19347
20712
  call_exact_route: {
19348
20713
  Args: {
19349
20714
  path: string;
19350
20715
  };
19351
20716
  Returns: number;
19352
20717
  };
20718
+ check_offer_product_available_stock: {
20719
+ Args: {
20720
+ p_campaign_product_id: string;
20721
+ p_code: string;
20722
+ p_needed_qty?: number;
20723
+ p_product_name?: string;
20724
+ };
20725
+ Returns: import("../integrations/supabase/types").Json;
20726
+ };
20727
+ check_trade_item_available_stock: {
20728
+ Args: {
20729
+ p_connection_id?: string;
20730
+ p_context?: string;
20731
+ p_needed_qty?: number;
20732
+ p_order_id?: string;
20733
+ p_order_item_id?: string;
20734
+ p_owner_id?: string;
20735
+ p_product_name?: string;
20736
+ p_trade_item_key: string;
20737
+ };
20738
+ Returns: import("../integrations/supabase/types").Json;
20739
+ };
19353
20740
  cleanup_old_bookings: {
19354
20741
  Args: never;
19355
20742
  Returns: number;
@@ -19393,6 +20780,12 @@ export declare const gatewayCodeListFn: import("@tanstack/start-client-core").Re
19393
20780
  table_name: string;
19394
20781
  }[];
19395
20782
  };
20783
+ dispatch_carrier_signups_sql: {
20784
+ Args: {
20785
+ _catchup?: string;
20786
+ };
20787
+ Returns: import("../integrations/supabase/types").Json;
20788
+ };
19396
20789
  email_auth_decrypt: {
19397
20790
  Args: {
19398
20791
  cipher: string;
@@ -19428,6 +20821,12 @@ export declare const gatewayCodeListFn: import("@tanstack/start-client-core").Re
19428
20821
  status: string;
19429
20822
  }[];
19430
20823
  };
20824
+ ensure_trade_item_stock_row: {
20825
+ Args: {
20826
+ p_key: string;
20827
+ };
20828
+ Returns: undefined;
20829
+ };
19431
20830
  ensure_user_tenant: {
19432
20831
  Args: never;
19433
20832
  Returns: string;
@@ -19465,6 +20864,31 @@ export declare const gatewayCodeListFn: import("@tanstack/start-client-core").Re
19465
20864
  };
19466
20865
  Returns: boolean;
19467
20866
  };
20867
+ find_trade_item_key: {
20868
+ Args: {
20869
+ p_barcode: string;
20870
+ p_name: string;
20871
+ p_product_id: string;
20872
+ };
20873
+ Returns: string;
20874
+ };
20875
+ floriday_effective_price: {
20876
+ Args: {
20877
+ _buyer_id: string;
20878
+ _on_date?: string;
20879
+ _quantity?: number;
20880
+ _trade_item_id: string;
20881
+ };
20882
+ Returns: {
20883
+ base_price: number;
20884
+ currency: string;
20885
+ discount_type: string;
20886
+ discount_value: number;
20887
+ net_price: number;
20888
+ source: string;
20889
+ source_id: string;
20890
+ }[];
20891
+ };
19468
20892
  format_cart_number: {
19469
20893
  Args: {
19470
20894
  p_pick_date: string;
@@ -19485,6 +20909,13 @@ export declare const gatewayCodeListFn: import("@tanstack/start-client-core").Re
19485
20909
  preferred_warehouse_name: string;
19486
20910
  }[];
19487
20911
  };
20912
+ get_active_floriday_context: {
20913
+ Args: never;
20914
+ Returns: {
20915
+ connection_id: string;
20916
+ user_id: string;
20917
+ }[];
20918
+ };
19488
20919
  get_active_twinfield_public: {
19489
20920
  Args: never;
19490
20921
  Returns: {
@@ -19587,6 +21018,18 @@ export declare const gatewayCodeListFn: import("@tanstack/start-client-core").Re
19587
21018
  };
19588
21019
  Returns: import("../integrations/supabase/types").Json;
19589
21020
  };
21021
+ get_offer_recipient_by_code: {
21022
+ Args: {
21023
+ p_code: string;
21024
+ };
21025
+ Returns: {
21026
+ campaign_id: string;
21027
+ clicked_at: string;
21028
+ customer_id: string;
21029
+ id: string;
21030
+ ordered_at: string;
21031
+ }[];
21032
+ };
19590
21033
  get_or_assign_floriday_order_number: {
19591
21034
  Args: {
19592
21035
  p_floriday_id: string;
@@ -19639,6 +21082,34 @@ export declare const gatewayCodeListFn: import("@tanstack/start-client-core").Re
19639
21082
  Args: never;
19640
21083
  Returns: boolean;
19641
21084
  };
21085
+ local_effective_price: {
21086
+ Args: {
21087
+ _customer_id: string;
21088
+ _on_date?: string;
21089
+ _product_id: string;
21090
+ _quantity?: number;
21091
+ };
21092
+ Returns: {
21093
+ currency: string;
21094
+ discount_type: string;
21095
+ discount_value: number;
21096
+ net_price: number;
21097
+ source: string;
21098
+ source_id: string;
21099
+ }[];
21100
+ };
21101
+ mark_offer_clicked: {
21102
+ Args: {
21103
+ p_code: string;
21104
+ };
21105
+ Returns: undefined;
21106
+ };
21107
+ mark_offer_ordered: {
21108
+ Args: {
21109
+ p_code: string;
21110
+ };
21111
+ Returns: undefined;
21112
+ };
19642
21113
  next_order_number: {
19643
21114
  Args: {
19644
21115
  p_prefix: string;
@@ -19658,6 +21129,14 @@ export declare const gatewayCodeListFn: import("@tanstack/start-client-core").Re
19658
21129
  };
19659
21130
  Returns: string;
19660
21131
  };
21132
+ offer_recipient_matches: {
21133
+ Args: {
21134
+ _campaign_id: string;
21135
+ _customer_id: string;
21136
+ _recipient_id: string;
21137
+ };
21138
+ Returns: boolean;
21139
+ };
19661
21140
  pickstation_get_orders_raw: {
19662
21141
  Args: never;
19663
21142
  Returns: import("../integrations/supabase/types").Json;
@@ -19685,6 +21164,13 @@ export declare const gatewayCodeListFn: import("@tanstack/start-client-core").Re
19685
21164
  };
19686
21165
  Returns: undefined;
19687
21166
  };
21167
+ promote_trade_item_key: {
21168
+ Args: {
21169
+ p_new: string;
21170
+ p_old: string;
21171
+ };
21172
+ Returns: undefined;
21173
+ };
19688
21174
  refresh_floricode_derived_code_lists: {
19689
21175
  Args: never;
19690
21176
  Returns: {
@@ -23633,6 +25119,51 @@ export declare const gatewayCachedListFn: import("@tanstack/start-client-core").
23633
25119
  referencedColumns: ["id"];
23634
25120
  }];
23635
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
+ };
23636
25167
  floriday_contract_trade_item_groups_cache: {
23637
25168
  Row: {
23638
25169
  connection_id: string;
@@ -25022,6 +26553,204 @@ export declare const gatewayCachedListFn: import("@tanstack/start-client-core").
25022
26553
  };
25023
26554
  Relationships: [];
25024
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
+ };
25025
26754
  locations: {
25026
26755
  Row: {
25027
26756
  created_at: string;
@@ -25529,6 +27258,273 @@ export declare const gatewayCachedListFn: import("@tanstack/start-client-core").
25529
27258
  referencedColumns: ["id"];
25530
27259
  }];
25531
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
+ };
25532
27528
  notifications: {
25533
27529
  Row: {
25534
27530
  created_at: string;
@@ -27377,6 +29373,48 @@ export declare const gatewayCachedListFn: import("@tanstack/start-client-core").
27377
29373
  };
27378
29374
  Relationships: [];
27379
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
+ };
27380
29418
  stock_mutation_log: {
27381
29419
  Row: {
27382
29420
  connection_id: string | null;
@@ -29008,6 +31046,44 @@ export declare const gatewayCachedListFn: import("@tanstack/start-client-core").
29008
31046
  };
29009
31047
  Relationships: [];
29010
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
+ };
29011
31087
  manufacture_product_possible_stock_view: {
29012
31088
  Row: {
29013
31089
  component_count: number | null;
@@ -29292,6 +31368,32 @@ export declare const gatewayCachedListFn: import("@tanstack/start-client-core").
29292
31368
  };
29293
31369
  Returns: number;
29294
31370
  };
31371
+ afh_city_code: {
31372
+ Args: {
31373
+ _city: string;
31374
+ _country: string;
31375
+ };
31376
+ Returns: string;
31377
+ };
31378
+ afh_normalize_country: {
31379
+ Args: {
31380
+ _raw: string;
31381
+ };
31382
+ Returns: string;
31383
+ };
31384
+ afh_normalize_nl_province: {
31385
+ Args: {
31386
+ _raw: string;
31387
+ };
31388
+ Returns: string;
31389
+ };
31390
+ afh_subtract_workdays: {
31391
+ Args: {
31392
+ _date: string;
31393
+ _days: number;
31394
+ };
31395
+ Returns: string;
31396
+ };
29295
31397
  apply_stock_consumption: {
29296
31398
  Args: {
29297
31399
  p_order_id: string;
@@ -29337,12 +31439,40 @@ export declare const gatewayCachedListFn: import("@tanstack/start-client-core").
29337
31439
  order_number: string;
29338
31440
  }[];
29339
31441
  };
31442
+ backfill_open_order_reservations: {
31443
+ Args: never;
31444
+ Returns: {
31445
+ processed_items: number;
31446
+ }[];
31447
+ };
29340
31448
  call_exact_route: {
29341
31449
  Args: {
29342
31450
  path: string;
29343
31451
  };
29344
31452
  Returns: number;
29345
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
+ };
29346
31476
  cleanup_old_bookings: {
29347
31477
  Args: never;
29348
31478
  Returns: number;
@@ -29386,6 +31516,12 @@ export declare const gatewayCachedListFn: import("@tanstack/start-client-core").
29386
31516
  table_name: string;
29387
31517
  }[];
29388
31518
  };
31519
+ dispatch_carrier_signups_sql: {
31520
+ Args: {
31521
+ _catchup?: string;
31522
+ };
31523
+ Returns: import("../integrations/supabase/types").Json;
31524
+ };
29389
31525
  email_auth_decrypt: {
29390
31526
  Args: {
29391
31527
  cipher: string;
@@ -29421,6 +31557,12 @@ export declare const gatewayCachedListFn: import("@tanstack/start-client-core").
29421
31557
  status: string;
29422
31558
  }[];
29423
31559
  };
31560
+ ensure_trade_item_stock_row: {
31561
+ Args: {
31562
+ p_key: string;
31563
+ };
31564
+ Returns: undefined;
31565
+ };
29424
31566
  ensure_user_tenant: {
29425
31567
  Args: never;
29426
31568
  Returns: string;
@@ -29458,6 +31600,31 @@ export declare const gatewayCachedListFn: import("@tanstack/start-client-core").
29458
31600
  };
29459
31601
  Returns: boolean;
29460
31602
  };
31603
+ find_trade_item_key: {
31604
+ Args: {
31605
+ p_barcode: string;
31606
+ p_name: string;
31607
+ p_product_id: string;
31608
+ };
31609
+ Returns: string;
31610
+ };
31611
+ floriday_effective_price: {
31612
+ Args: {
31613
+ _buyer_id: string;
31614
+ _on_date?: string;
31615
+ _quantity?: number;
31616
+ _trade_item_id: string;
31617
+ };
31618
+ Returns: {
31619
+ base_price: number;
31620
+ currency: string;
31621
+ discount_type: string;
31622
+ discount_value: number;
31623
+ net_price: number;
31624
+ source: string;
31625
+ source_id: string;
31626
+ }[];
31627
+ };
29461
31628
  format_cart_number: {
29462
31629
  Args: {
29463
31630
  p_pick_date: string;
@@ -29478,6 +31645,13 @@ export declare const gatewayCachedListFn: import("@tanstack/start-client-core").
29478
31645
  preferred_warehouse_name: string;
29479
31646
  }[];
29480
31647
  };
31648
+ get_active_floriday_context: {
31649
+ Args: never;
31650
+ Returns: {
31651
+ connection_id: string;
31652
+ user_id: string;
31653
+ }[];
31654
+ };
29481
31655
  get_active_twinfield_public: {
29482
31656
  Args: never;
29483
31657
  Returns: {
@@ -29580,6 +31754,18 @@ export declare const gatewayCachedListFn: import("@tanstack/start-client-core").
29580
31754
  };
29581
31755
  Returns: import("../integrations/supabase/types").Json;
29582
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
+ };
29583
31769
  get_or_assign_floriday_order_number: {
29584
31770
  Args: {
29585
31771
  p_floriday_id: string;
@@ -29632,6 +31818,34 @@ export declare const gatewayCachedListFn: import("@tanstack/start-client-core").
29632
31818
  Args: never;
29633
31819
  Returns: boolean;
29634
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
+ };
29635
31849
  next_order_number: {
29636
31850
  Args: {
29637
31851
  p_prefix: string;
@@ -29651,6 +31865,14 @@ export declare const gatewayCachedListFn: import("@tanstack/start-client-core").
29651
31865
  };
29652
31866
  Returns: string;
29653
31867
  };
31868
+ offer_recipient_matches: {
31869
+ Args: {
31870
+ _campaign_id: string;
31871
+ _customer_id: string;
31872
+ _recipient_id: string;
31873
+ };
31874
+ Returns: boolean;
31875
+ };
29654
31876
  pickstation_get_orders_raw: {
29655
31877
  Args: never;
29656
31878
  Returns: import("../integrations/supabase/types").Json;
@@ -29678,6 +31900,13 @@ export declare const gatewayCachedListFn: import("@tanstack/start-client-core").
29678
31900
  };
29679
31901
  Returns: undefined;
29680
31902
  };
31903
+ promote_trade_item_key: {
31904
+ Args: {
31905
+ p_new: string;
31906
+ p_old: string;
31907
+ };
31908
+ Returns: undefined;
31909
+ };
29681
31910
  refresh_floricode_derived_code_lists: {
29682
31911
  Args: never;
29683
31912
  Returns: {
@@ -33626,6 +35855,51 @@ export declare const gatewayWriteFn: import("@tanstack/start-client-core").Requi
33626
35855
  referencedColumns: ["id"];
33627
35856
  }];
33628
35857
  };
35858
+ floriday_continuous_stock_queue: {
35859
+ Row: {
35860
+ attempts: number;
35861
+ connection_id: string;
35862
+ created_at: string;
35863
+ gateway_attempt_id: string | null;
35864
+ id: string;
35865
+ last_error: string | null;
35866
+ number_of_pieces: number;
35867
+ sent_at: string | null;
35868
+ status: string;
35869
+ trade_item_id: string;
35870
+ updated_at: string;
35871
+ user_id: string;
35872
+ };
35873
+ Insert: {
35874
+ attempts?: number;
35875
+ connection_id: string;
35876
+ created_at?: string;
35877
+ gateway_attempt_id?: string | null;
35878
+ id?: string;
35879
+ last_error?: string | null;
35880
+ number_of_pieces?: number;
35881
+ sent_at?: string | null;
35882
+ status?: string;
35883
+ trade_item_id: string;
35884
+ updated_at?: string;
35885
+ user_id: string;
35886
+ };
35887
+ Update: {
35888
+ attempts?: number;
35889
+ connection_id?: string;
35890
+ created_at?: string;
35891
+ gateway_attempt_id?: string | null;
35892
+ id?: string;
35893
+ last_error?: string | null;
35894
+ number_of_pieces?: number;
35895
+ sent_at?: string | null;
35896
+ status?: string;
35897
+ trade_item_id?: string;
35898
+ updated_at?: string;
35899
+ user_id?: string;
35900
+ };
35901
+ Relationships: [];
35902
+ };
33629
35903
  floriday_contract_trade_item_groups_cache: {
33630
35904
  Row: {
33631
35905
  connection_id: string;
@@ -35015,6 +37289,204 @@ export declare const gatewayWriteFn: import("@tanstack/start-client-core").Requi
35015
37289
  };
35016
37290
  Relationships: [];
35017
37291
  };
37292
+ local_customer_agreements: {
37293
+ Row: {
37294
+ base_price: number | null;
37295
+ created_at: string;
37296
+ currency: string;
37297
+ customer_id: string;
37298
+ id: string;
37299
+ min_quantity: number;
37300
+ net_price: number;
37301
+ notes: string | null;
37302
+ product_category_id: string | null;
37303
+ product_id: string | null;
37304
+ updated_at: string;
37305
+ valid_from: string | null;
37306
+ valid_until: string | null;
37307
+ };
37308
+ Insert: {
37309
+ base_price?: number | null;
37310
+ created_at?: string;
37311
+ currency?: string;
37312
+ customer_id: string;
37313
+ id?: string;
37314
+ min_quantity?: number;
37315
+ net_price: number;
37316
+ notes?: string | null;
37317
+ product_category_id?: string | null;
37318
+ product_id?: string | null;
37319
+ updated_at?: string;
37320
+ valid_from?: string | null;
37321
+ valid_until?: string | null;
37322
+ };
37323
+ Update: {
37324
+ base_price?: number | null;
37325
+ created_at?: string;
37326
+ currency?: string;
37327
+ customer_id?: string;
37328
+ id?: string;
37329
+ min_quantity?: number;
37330
+ net_price?: number;
37331
+ notes?: string | null;
37332
+ product_category_id?: string | null;
37333
+ product_id?: string | null;
37334
+ updated_at?: string;
37335
+ valid_from?: string | null;
37336
+ valid_until?: string | null;
37337
+ };
37338
+ Relationships: [{
37339
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
37340
+ columns: ["customer_id"];
37341
+ isOneToOne: false;
37342
+ referencedRelation: "customers";
37343
+ referencedColumns: ["id"];
37344
+ }, {
37345
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
37346
+ columns: ["product_category_id"];
37347
+ isOneToOne: false;
37348
+ referencedRelation: "product_categories";
37349
+ referencedColumns: ["id"];
37350
+ }, {
37351
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
37352
+ columns: ["product_id"];
37353
+ isOneToOne: false;
37354
+ referencedRelation: "products";
37355
+ referencedColumns: ["id"];
37356
+ }];
37357
+ };
37358
+ local_customer_price_groups: {
37359
+ Row: {
37360
+ created_at: string;
37361
+ currency: string;
37362
+ customer_id: string;
37363
+ discount_type: string;
37364
+ discount_value: number;
37365
+ id: string;
37366
+ min_quantity: number;
37367
+ notes: string | null;
37368
+ product_category_id: string | null;
37369
+ product_id: string | null;
37370
+ updated_at: string;
37371
+ valid_from: string | null;
37372
+ valid_until: string | null;
37373
+ };
37374
+ Insert: {
37375
+ created_at?: string;
37376
+ currency?: string;
37377
+ customer_id: string;
37378
+ discount_type: string;
37379
+ discount_value: number;
37380
+ id?: string;
37381
+ min_quantity?: number;
37382
+ notes?: string | null;
37383
+ product_category_id?: string | null;
37384
+ product_id?: string | null;
37385
+ updated_at?: string;
37386
+ valid_from?: string | null;
37387
+ valid_until?: string | null;
37388
+ };
37389
+ Update: {
37390
+ created_at?: string;
37391
+ currency?: string;
37392
+ customer_id?: string;
37393
+ discount_type?: string;
37394
+ discount_value?: number;
37395
+ id?: string;
37396
+ min_quantity?: number;
37397
+ notes?: string | null;
37398
+ product_category_id?: string | null;
37399
+ product_id?: string | null;
37400
+ updated_at?: string;
37401
+ valid_from?: string | null;
37402
+ valid_until?: string | null;
37403
+ };
37404
+ Relationships: [{
37405
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
37406
+ columns: ["customer_id"];
37407
+ isOneToOne: false;
37408
+ referencedRelation: "customers";
37409
+ referencedColumns: ["id"];
37410
+ }, {
37411
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
37412
+ columns: ["product_category_id"];
37413
+ isOneToOne: false;
37414
+ referencedRelation: "product_categories";
37415
+ referencedColumns: ["id"];
37416
+ }, {
37417
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
37418
+ columns: ["product_id"];
37419
+ isOneToOne: false;
37420
+ referencedRelation: "products";
37421
+ referencedColumns: ["id"];
37422
+ }];
37423
+ };
37424
+ local_customer_sales_strategies: {
37425
+ Row: {
37426
+ created_at: string;
37427
+ currency: string;
37428
+ customer_id: string;
37429
+ discount_type: string;
37430
+ discount_value: number;
37431
+ id: string;
37432
+ min_quantity: number;
37433
+ notes: string | null;
37434
+ product_category_id: string | null;
37435
+ product_id: string | null;
37436
+ updated_at: string;
37437
+ valid_from: string | null;
37438
+ valid_until: string | null;
37439
+ };
37440
+ Insert: {
37441
+ created_at?: string;
37442
+ currency?: string;
37443
+ customer_id: string;
37444
+ discount_type: string;
37445
+ discount_value: number;
37446
+ id?: string;
37447
+ min_quantity?: number;
37448
+ notes?: string | null;
37449
+ product_category_id?: string | null;
37450
+ product_id?: string | null;
37451
+ updated_at?: string;
37452
+ valid_from?: string | null;
37453
+ valid_until?: string | null;
37454
+ };
37455
+ Update: {
37456
+ created_at?: string;
37457
+ currency?: string;
37458
+ customer_id?: string;
37459
+ discount_type?: string;
37460
+ discount_value?: number;
37461
+ id?: string;
37462
+ min_quantity?: number;
37463
+ notes?: string | null;
37464
+ product_category_id?: string | null;
37465
+ product_id?: string | null;
37466
+ updated_at?: string;
37467
+ valid_from?: string | null;
37468
+ valid_until?: string | null;
37469
+ };
37470
+ Relationships: [{
37471
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
37472
+ columns: ["customer_id"];
37473
+ isOneToOne: false;
37474
+ referencedRelation: "customers";
37475
+ referencedColumns: ["id"];
37476
+ }, {
37477
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
37478
+ columns: ["product_category_id"];
37479
+ isOneToOne: false;
37480
+ referencedRelation: "product_categories";
37481
+ referencedColumns: ["id"];
37482
+ }, {
37483
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
37484
+ columns: ["product_id"];
37485
+ isOneToOne: false;
37486
+ referencedRelation: "products";
37487
+ referencedColumns: ["id"];
37488
+ }];
37489
+ };
35018
37490
  locations: {
35019
37491
  Row: {
35020
37492
  created_at: string;
@@ -35522,6 +37994,273 @@ export declare const gatewayWriteFn: import("@tanstack/start-client-core").Requi
35522
37994
  referencedColumns: ["id"];
35523
37995
  }];
35524
37996
  };
37997
+ nmbrs_component_mapping: {
37998
+ Row: {
37999
+ created_at: string;
38000
+ id: string;
38001
+ source_kind: string;
38002
+ source_value: string | null;
38003
+ updated_at: string;
38004
+ wage_code: string;
38005
+ };
38006
+ Insert: {
38007
+ created_at?: string;
38008
+ id?: string;
38009
+ source_kind: string;
38010
+ source_value?: string | null;
38011
+ updated_at?: string;
38012
+ wage_code: string;
38013
+ };
38014
+ Update: {
38015
+ created_at?: string;
38016
+ id?: string;
38017
+ source_kind?: string;
38018
+ source_value?: string | null;
38019
+ updated_at?: string;
38020
+ wage_code?: string;
38021
+ };
38022
+ Relationships: [{
38023
+ foreignKeyName: "nmbrs_component_mapping_wage_code_fkey";
38024
+ columns: ["wage_code"];
38025
+ isOneToOne: false;
38026
+ referencedRelation: "nmbrs_wage_components";
38027
+ referencedColumns: ["code"];
38028
+ }];
38029
+ };
38030
+ nmbrs_employee_mapping: {
38031
+ Row: {
38032
+ active_from: string | null;
38033
+ active_to: string | null;
38034
+ contract_hours_per_week: number | null;
38035
+ created_at: string;
38036
+ hourly_wage: number | null;
38037
+ id: string;
38038
+ monteur_id: string;
38039
+ nmbrs_company_code: string | null;
38040
+ nmbrs_employee_number: string;
38041
+ updated_at: string;
38042
+ };
38043
+ Insert: {
38044
+ active_from?: string | null;
38045
+ active_to?: string | null;
38046
+ contract_hours_per_week?: number | null;
38047
+ created_at?: string;
38048
+ hourly_wage?: number | null;
38049
+ id?: string;
38050
+ monteur_id: string;
38051
+ nmbrs_company_code?: string | null;
38052
+ nmbrs_employee_number: string;
38053
+ updated_at?: string;
38054
+ };
38055
+ Update: {
38056
+ active_from?: string | null;
38057
+ active_to?: string | null;
38058
+ contract_hours_per_week?: number | null;
38059
+ created_at?: string;
38060
+ hourly_wage?: number | null;
38061
+ id?: string;
38062
+ monteur_id?: string;
38063
+ nmbrs_company_code?: string | null;
38064
+ nmbrs_employee_number?: string;
38065
+ updated_at?: string;
38066
+ };
38067
+ Relationships: [{
38068
+ foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
38069
+ columns: ["monteur_id"];
38070
+ isOneToOne: true;
38071
+ referencedRelation: "monteurs";
38072
+ referencedColumns: ["id"];
38073
+ }];
38074
+ };
38075
+ nmbrs_export_lines: {
38076
+ Row: {
38077
+ amount: number;
38078
+ created_at: string;
38079
+ entry_date: string;
38080
+ hours: number;
38081
+ id: string;
38082
+ monteur_id: string;
38083
+ nmbrs_employee_number: string | null;
38084
+ notes: string | null;
38085
+ run_id: string;
38086
+ source_kind: string | null;
38087
+ source_ref_id: string | null;
38088
+ updated_at: string;
38089
+ wage_code: string;
38090
+ };
38091
+ Insert: {
38092
+ amount?: number;
38093
+ created_at?: string;
38094
+ entry_date: string;
38095
+ hours?: number;
38096
+ id?: string;
38097
+ monteur_id: string;
38098
+ nmbrs_employee_number?: string | null;
38099
+ notes?: string | null;
38100
+ run_id: string;
38101
+ source_kind?: string | null;
38102
+ source_ref_id?: string | null;
38103
+ updated_at?: string;
38104
+ wage_code: string;
38105
+ };
38106
+ Update: {
38107
+ amount?: number;
38108
+ created_at?: string;
38109
+ entry_date?: string;
38110
+ hours?: number;
38111
+ id?: string;
38112
+ monteur_id?: string;
38113
+ nmbrs_employee_number?: string | null;
38114
+ notes?: string | null;
38115
+ run_id?: string;
38116
+ source_kind?: string | null;
38117
+ source_ref_id?: string | null;
38118
+ updated_at?: string;
38119
+ wage_code?: string;
38120
+ };
38121
+ Relationships: [{
38122
+ foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
38123
+ columns: ["monteur_id"];
38124
+ isOneToOne: false;
38125
+ referencedRelation: "monteurs";
38126
+ referencedColumns: ["id"];
38127
+ }, {
38128
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
38129
+ columns: ["run_id"];
38130
+ isOneToOne: false;
38131
+ referencedRelation: "nmbrs_export_runs";
38132
+ referencedColumns: ["id"];
38133
+ }, {
38134
+ foreignKeyName: "nmbrs_export_lines_wage_code_fkey";
38135
+ columns: ["wage_code"];
38136
+ isOneToOne: false;
38137
+ referencedRelation: "nmbrs_wage_components";
38138
+ referencedColumns: ["code"];
38139
+ }];
38140
+ };
38141
+ nmbrs_export_runs: {
38142
+ Row: {
38143
+ created_at: string;
38144
+ file_name: string | null;
38145
+ generated_at: string;
38146
+ generated_by: string | null;
38147
+ id: string;
38148
+ notes: string | null;
38149
+ period_end: string;
38150
+ period_label: string;
38151
+ period_start: string;
38152
+ status: string;
38153
+ total_hours: number;
38154
+ total_lines: number;
38155
+ updated_at: string;
38156
+ };
38157
+ Insert: {
38158
+ created_at?: string;
38159
+ file_name?: string | null;
38160
+ generated_at?: string;
38161
+ generated_by?: string | null;
38162
+ id?: string;
38163
+ notes?: string | null;
38164
+ period_end: string;
38165
+ period_label: string;
38166
+ period_start: string;
38167
+ status?: string;
38168
+ total_hours?: number;
38169
+ total_lines?: number;
38170
+ updated_at?: string;
38171
+ };
38172
+ Update: {
38173
+ created_at?: string;
38174
+ file_name?: string | null;
38175
+ generated_at?: string;
38176
+ generated_by?: string | null;
38177
+ id?: string;
38178
+ notes?: string | null;
38179
+ period_end?: string;
38180
+ period_label?: string;
38181
+ period_start?: string;
38182
+ status?: string;
38183
+ total_hours?: number;
38184
+ total_lines?: number;
38185
+ updated_at?: string;
38186
+ };
38187
+ Relationships: [];
38188
+ };
38189
+ nmbrs_settings: {
38190
+ Row: {
38191
+ created_at: string;
38192
+ default_company_code: string | null;
38193
+ id: boolean;
38194
+ include_travel: boolean;
38195
+ overtime_threshold_daily: number;
38196
+ overtime_threshold_weekly: number;
38197
+ period_type: string;
38198
+ updated_at: string;
38199
+ updated_by: string | null;
38200
+ week_start_day: number;
38201
+ };
38202
+ Insert: {
38203
+ created_at?: string;
38204
+ default_company_code?: string | null;
38205
+ id?: boolean;
38206
+ include_travel?: boolean;
38207
+ overtime_threshold_daily?: number;
38208
+ overtime_threshold_weekly?: number;
38209
+ period_type?: string;
38210
+ updated_at?: string;
38211
+ updated_by?: string | null;
38212
+ week_start_day?: number;
38213
+ };
38214
+ Update: {
38215
+ created_at?: string;
38216
+ default_company_code?: string | null;
38217
+ id?: boolean;
38218
+ include_travel?: boolean;
38219
+ overtime_threshold_daily?: number;
38220
+ overtime_threshold_weekly?: number;
38221
+ period_type?: string;
38222
+ updated_at?: string;
38223
+ updated_by?: string | null;
38224
+ week_start_day?: number;
38225
+ };
38226
+ Relationships: [];
38227
+ };
38228
+ nmbrs_wage_components: {
38229
+ Row: {
38230
+ category: string;
38231
+ code: string;
38232
+ created_at: string;
38233
+ id: string;
38234
+ is_active: boolean;
38235
+ label: string;
38236
+ sort_order: number;
38237
+ unit: string;
38238
+ updated_at: string;
38239
+ };
38240
+ Insert: {
38241
+ category: string;
38242
+ code: string;
38243
+ created_at?: string;
38244
+ id?: string;
38245
+ is_active?: boolean;
38246
+ label: string;
38247
+ sort_order?: number;
38248
+ unit: string;
38249
+ updated_at?: string;
38250
+ };
38251
+ Update: {
38252
+ category?: string;
38253
+ code?: string;
38254
+ created_at?: string;
38255
+ id?: string;
38256
+ is_active?: boolean;
38257
+ label?: string;
38258
+ sort_order?: number;
38259
+ unit?: string;
38260
+ updated_at?: string;
38261
+ };
38262
+ Relationships: [];
38263
+ };
35525
38264
  notifications: {
35526
38265
  Row: {
35527
38266
  created_at: string;
@@ -37370,6 +40109,48 @@ export declare const gatewayWriteFn: import("@tanstack/start-client-core").Requi
37370
40109
  };
37371
40110
  Relationships: [];
37372
40111
  };
40112
+ stock_import_runs: {
40113
+ Row: {
40114
+ connection_id: string | null;
40115
+ created_at: string;
40116
+ created_rows: number;
40117
+ errors: import("../integrations/supabase/types").Json;
40118
+ filename: string | null;
40119
+ id: string;
40120
+ mutations: import("../integrations/supabase/types").Json;
40121
+ skipped_rows: number;
40122
+ total_rows: number;
40123
+ updated_rows: number;
40124
+ user_id: string;
40125
+ };
40126
+ Insert: {
40127
+ connection_id?: string | null;
40128
+ created_at?: string;
40129
+ created_rows?: number;
40130
+ errors?: import("../integrations/supabase/types").Json;
40131
+ filename?: string | null;
40132
+ id?: string;
40133
+ mutations?: import("../integrations/supabase/types").Json;
40134
+ skipped_rows?: number;
40135
+ total_rows?: number;
40136
+ updated_rows?: number;
40137
+ user_id: string;
40138
+ };
40139
+ Update: {
40140
+ connection_id?: string | null;
40141
+ created_at?: string;
40142
+ created_rows?: number;
40143
+ errors?: import("../integrations/supabase/types").Json;
40144
+ filename?: string | null;
40145
+ id?: string;
40146
+ mutations?: import("../integrations/supabase/types").Json;
40147
+ skipped_rows?: number;
40148
+ total_rows?: number;
40149
+ updated_rows?: number;
40150
+ user_id?: string;
40151
+ };
40152
+ Relationships: [];
40153
+ };
37373
40154
  stock_mutation_log: {
37374
40155
  Row: {
37375
40156
  connection_id: string | null;
@@ -39001,6 +41782,44 @@ export declare const gatewayWriteFn: import("@tanstack/start-client-core").Requi
39001
41782
  };
39002
41783
  Relationships: [];
39003
41784
  };
41785
+ floriday_customer_discounts: {
41786
+ Row: {
41787
+ base_price: number | null;
41788
+ buyer_organization_id: string | null;
41789
+ currency: string | null;
41790
+ discount_type: string | null;
41791
+ discount_value: number | null;
41792
+ min_quantity: number | null;
41793
+ net_price: number | null;
41794
+ product_group_id: string | null;
41795
+ raw: import("../integrations/supabase/types").Json | null;
41796
+ source: string | null;
41797
+ source_id: string | null;
41798
+ trade_item_id: string | null;
41799
+ valid_from: string | null;
41800
+ valid_until: string | null;
41801
+ };
41802
+ Relationships: [];
41803
+ };
41804
+ local_customer_discounts: {
41805
+ Row: {
41806
+ base_price: number | null;
41807
+ currency: string | null;
41808
+ customer_id: string | null;
41809
+ discount_type: string | null;
41810
+ discount_value: number | null;
41811
+ min_quantity: number | null;
41812
+ net_price: number | null;
41813
+ product_category_id: string | null;
41814
+ product_id: string | null;
41815
+ product_name: string | null;
41816
+ source: string | null;
41817
+ source_id: string | null;
41818
+ valid_from: string | null;
41819
+ valid_until: string | null;
41820
+ };
41821
+ Relationships: [];
41822
+ };
39004
41823
  manufacture_product_possible_stock_view: {
39005
41824
  Row: {
39006
41825
  component_count: number | null;
@@ -39285,6 +42104,32 @@ export declare const gatewayWriteFn: import("@tanstack/start-client-core").Requi
39285
42104
  };
39286
42105
  Returns: number;
39287
42106
  };
42107
+ afh_city_code: {
42108
+ Args: {
42109
+ _city: string;
42110
+ _country: string;
42111
+ };
42112
+ Returns: string;
42113
+ };
42114
+ afh_normalize_country: {
42115
+ Args: {
42116
+ _raw: string;
42117
+ };
42118
+ Returns: string;
42119
+ };
42120
+ afh_normalize_nl_province: {
42121
+ Args: {
42122
+ _raw: string;
42123
+ };
42124
+ Returns: string;
42125
+ };
42126
+ afh_subtract_workdays: {
42127
+ Args: {
42128
+ _date: string;
42129
+ _days: number;
42130
+ };
42131
+ Returns: string;
42132
+ };
39288
42133
  apply_stock_consumption: {
39289
42134
  Args: {
39290
42135
  p_order_id: string;
@@ -39330,12 +42175,40 @@ export declare const gatewayWriteFn: import("@tanstack/start-client-core").Requi
39330
42175
  order_number: string;
39331
42176
  }[];
39332
42177
  };
42178
+ backfill_open_order_reservations: {
42179
+ Args: never;
42180
+ Returns: {
42181
+ processed_items: number;
42182
+ }[];
42183
+ };
39333
42184
  call_exact_route: {
39334
42185
  Args: {
39335
42186
  path: string;
39336
42187
  };
39337
42188
  Returns: number;
39338
42189
  };
42190
+ check_offer_product_available_stock: {
42191
+ Args: {
42192
+ p_campaign_product_id: string;
42193
+ p_code: string;
42194
+ p_needed_qty?: number;
42195
+ p_product_name?: string;
42196
+ };
42197
+ Returns: import("../integrations/supabase/types").Json;
42198
+ };
42199
+ check_trade_item_available_stock: {
42200
+ Args: {
42201
+ p_connection_id?: string;
42202
+ p_context?: string;
42203
+ p_needed_qty?: number;
42204
+ p_order_id?: string;
42205
+ p_order_item_id?: string;
42206
+ p_owner_id?: string;
42207
+ p_product_name?: string;
42208
+ p_trade_item_key: string;
42209
+ };
42210
+ Returns: import("../integrations/supabase/types").Json;
42211
+ };
39339
42212
  cleanup_old_bookings: {
39340
42213
  Args: never;
39341
42214
  Returns: number;
@@ -39379,6 +42252,12 @@ export declare const gatewayWriteFn: import("@tanstack/start-client-core").Requi
39379
42252
  table_name: string;
39380
42253
  }[];
39381
42254
  };
42255
+ dispatch_carrier_signups_sql: {
42256
+ Args: {
42257
+ _catchup?: string;
42258
+ };
42259
+ Returns: import("../integrations/supabase/types").Json;
42260
+ };
39382
42261
  email_auth_decrypt: {
39383
42262
  Args: {
39384
42263
  cipher: string;
@@ -39414,6 +42293,12 @@ export declare const gatewayWriteFn: import("@tanstack/start-client-core").Requi
39414
42293
  status: string;
39415
42294
  }[];
39416
42295
  };
42296
+ ensure_trade_item_stock_row: {
42297
+ Args: {
42298
+ p_key: string;
42299
+ };
42300
+ Returns: undefined;
42301
+ };
39417
42302
  ensure_user_tenant: {
39418
42303
  Args: never;
39419
42304
  Returns: string;
@@ -39451,6 +42336,31 @@ export declare const gatewayWriteFn: import("@tanstack/start-client-core").Requi
39451
42336
  };
39452
42337
  Returns: boolean;
39453
42338
  };
42339
+ find_trade_item_key: {
42340
+ Args: {
42341
+ p_barcode: string;
42342
+ p_name: string;
42343
+ p_product_id: string;
42344
+ };
42345
+ Returns: string;
42346
+ };
42347
+ floriday_effective_price: {
42348
+ Args: {
42349
+ _buyer_id: string;
42350
+ _on_date?: string;
42351
+ _quantity?: number;
42352
+ _trade_item_id: string;
42353
+ };
42354
+ Returns: {
42355
+ base_price: number;
42356
+ currency: string;
42357
+ discount_type: string;
42358
+ discount_value: number;
42359
+ net_price: number;
42360
+ source: string;
42361
+ source_id: string;
42362
+ }[];
42363
+ };
39454
42364
  format_cart_number: {
39455
42365
  Args: {
39456
42366
  p_pick_date: string;
@@ -39471,6 +42381,13 @@ export declare const gatewayWriteFn: import("@tanstack/start-client-core").Requi
39471
42381
  preferred_warehouse_name: string;
39472
42382
  }[];
39473
42383
  };
42384
+ get_active_floriday_context: {
42385
+ Args: never;
42386
+ Returns: {
42387
+ connection_id: string;
42388
+ user_id: string;
42389
+ }[];
42390
+ };
39474
42391
  get_active_twinfield_public: {
39475
42392
  Args: never;
39476
42393
  Returns: {
@@ -39573,6 +42490,18 @@ export declare const gatewayWriteFn: import("@tanstack/start-client-core").Requi
39573
42490
  };
39574
42491
  Returns: import("../integrations/supabase/types").Json;
39575
42492
  };
42493
+ get_offer_recipient_by_code: {
42494
+ Args: {
42495
+ p_code: string;
42496
+ };
42497
+ Returns: {
42498
+ campaign_id: string;
42499
+ clicked_at: string;
42500
+ customer_id: string;
42501
+ id: string;
42502
+ ordered_at: string;
42503
+ }[];
42504
+ };
39576
42505
  get_or_assign_floriday_order_number: {
39577
42506
  Args: {
39578
42507
  p_floriday_id: string;
@@ -39625,6 +42554,34 @@ export declare const gatewayWriteFn: import("@tanstack/start-client-core").Requi
39625
42554
  Args: never;
39626
42555
  Returns: boolean;
39627
42556
  };
42557
+ local_effective_price: {
42558
+ Args: {
42559
+ _customer_id: string;
42560
+ _on_date?: string;
42561
+ _product_id: string;
42562
+ _quantity?: number;
42563
+ };
42564
+ Returns: {
42565
+ currency: string;
42566
+ discount_type: string;
42567
+ discount_value: number;
42568
+ net_price: number;
42569
+ source: string;
42570
+ source_id: string;
42571
+ }[];
42572
+ };
42573
+ mark_offer_clicked: {
42574
+ Args: {
42575
+ p_code: string;
42576
+ };
42577
+ Returns: undefined;
42578
+ };
42579
+ mark_offer_ordered: {
42580
+ Args: {
42581
+ p_code: string;
42582
+ };
42583
+ Returns: undefined;
42584
+ };
39628
42585
  next_order_number: {
39629
42586
  Args: {
39630
42587
  p_prefix: string;
@@ -39644,6 +42601,14 @@ export declare const gatewayWriteFn: import("@tanstack/start-client-core").Requi
39644
42601
  };
39645
42602
  Returns: string;
39646
42603
  };
42604
+ offer_recipient_matches: {
42605
+ Args: {
42606
+ _campaign_id: string;
42607
+ _customer_id: string;
42608
+ _recipient_id: string;
42609
+ };
42610
+ Returns: boolean;
42611
+ };
39647
42612
  pickstation_get_orders_raw: {
39648
42613
  Args: never;
39649
42614
  Returns: import("../integrations/supabase/types").Json;
@@ -39671,6 +42636,13 @@ export declare const gatewayWriteFn: import("@tanstack/start-client-core").Requi
39671
42636
  };
39672
42637
  Returns: undefined;
39673
42638
  };
42639
+ promote_trade_item_key: {
42640
+ Args: {
42641
+ p_new: string;
42642
+ p_old: string;
42643
+ };
42644
+ Returns: undefined;
42645
+ };
39674
42646
  refresh_floricode_derived_code_lists: {
39675
42647
  Args: never;
39676
42648
  Returns: {