@flowselections/floriday-afhandeling-module 1.0.11 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist-lib/components/afhandeling/ControleLijstPrint.d.ts.map +1 -1
  2. package/dist-lib/components/afhandeling/ControleLijstPrint.js +63 -2
  3. package/dist-lib/components/afhandeling/ControlePage.d.ts +3 -1
  4. package/dist-lib/components/afhandeling/ControlePage.d.ts.map +1 -1
  5. package/dist-lib/components/afhandeling/ControlePage.js +6 -2
  6. package/dist-lib/components/pickstation/KioskControle.d.ts +2 -0
  7. package/dist-lib/components/pickstation/KioskControle.d.ts.map +1 -0
  8. package/dist-lib/components/pickstation/KioskControle.js +7 -0
  9. package/dist-lib/components/pickstation/PickstationPage.d.ts +2 -0
  10. package/dist-lib/components/pickstation/PickstationPage.d.ts.map +1 -0
  11. package/dist-lib/components/pickstation/PickstationPage.js +217 -0
  12. package/dist-lib/index.d.ts +2 -0
  13. package/dist-lib/index.d.ts.map +1 -1
  14. package/dist-lib/index.js +2 -0
  15. package/dist-lib/integrations/supabase/auth-middleware.d.ts +885 -60
  16. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  17. package/dist-lib/integrations/supabase/client.d.ts +885 -60
  18. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  19. package/dist-lib/integrations/supabase/client.server.d.ts +885 -60
  20. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  21. package/dist-lib/integrations/supabase/types.d.ts +907 -62
  22. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  23. package/dist-lib/lib/afhandelingSettings.functions.d.ts +1767 -117
  24. package/dist-lib/lib/afhandelingSettings.functions.d.ts.map +1 -1
  25. package/dist-lib/lib/carriers.functions.d.ts +4125 -0
  26. package/dist-lib/lib/carriers.functions.d.ts.map +1 -1
  27. package/dist-lib/lib/cartAssignments.functions.d.ts +4125 -0
  28. package/dist-lib/lib/cartAssignments.functions.d.ts.map +1 -1
  29. package/dist-lib/lib/cartControl.functions.d.ts +8253 -0
  30. package/dist-lib/lib/cartControl.functions.d.ts.map +1 -1
  31. package/dist-lib/lib/cartControl.functions.js +3 -0
  32. package/dist-lib/lib/floriday.functions.d.ts +885 -60
  33. package/dist-lib/lib/floriday.functions.d.ts.map +1 -1
  34. package/dist-lib/lib/pickstationOrders.server.d.ts.map +1 -1
  35. package/dist-lib/lib/pickstationOrders.server.js +1 -0
  36. package/dist-lib/lib/pickstationTypes.d.ts +2 -0
  37. package/dist-lib/lib/pickstationTypes.d.ts.map +1 -1
  38. package/package.json +20 -1
@@ -730,6 +730,7 @@ export type Database = {
730
730
  notes: string | null;
731
731
  performed_at: string;
732
732
  rescheduled_count: number;
733
+ stock_consumed_at: string | null;
733
734
  total_carts: number;
734
735
  updated_at: string;
735
736
  user_id: string;
@@ -743,6 +744,7 @@ export type Database = {
743
744
  notes?: string | null;
744
745
  performed_at?: string;
745
746
  rescheduled_count?: number;
747
+ stock_consumed_at?: string | null;
746
748
  total_carts?: number;
747
749
  updated_at?: string;
748
750
  user_id: string;
@@ -756,6 +758,7 @@ export type Database = {
756
758
  notes?: string | null;
757
759
  performed_at?: string;
758
760
  rescheduled_count?: number;
761
+ stock_consumed_at?: string | null;
759
762
  total_carts?: number;
760
763
  updated_at?: string;
761
764
  user_id?: string;
@@ -3716,6 +3719,51 @@ export type Database = {
3716
3719
  }
3717
3720
  ];
3718
3721
  };
3722
+ floriday_continuous_stock_queue: {
3723
+ Row: {
3724
+ attempts: number;
3725
+ connection_id: string;
3726
+ created_at: string;
3727
+ gateway_attempt_id: string | null;
3728
+ id: string;
3729
+ last_error: string | null;
3730
+ number_of_pieces: number;
3731
+ sent_at: string | null;
3732
+ status: string;
3733
+ trade_item_id: string;
3734
+ updated_at: string;
3735
+ user_id: string;
3736
+ };
3737
+ Insert: {
3738
+ attempts?: number;
3739
+ connection_id: string;
3740
+ created_at?: string;
3741
+ gateway_attempt_id?: string | null;
3742
+ id?: string;
3743
+ last_error?: string | null;
3744
+ number_of_pieces?: number;
3745
+ sent_at?: string | null;
3746
+ status?: string;
3747
+ trade_item_id: string;
3748
+ updated_at?: string;
3749
+ user_id: string;
3750
+ };
3751
+ Update: {
3752
+ attempts?: number;
3753
+ connection_id?: string;
3754
+ created_at?: string;
3755
+ gateway_attempt_id?: string | null;
3756
+ id?: string;
3757
+ last_error?: string | null;
3758
+ number_of_pieces?: number;
3759
+ sent_at?: string | null;
3760
+ status?: string;
3761
+ trade_item_id?: string;
3762
+ updated_at?: string;
3763
+ user_id?: string;
3764
+ };
3765
+ Relationships: [];
3766
+ };
3719
3767
  floriday_contract_trade_item_groups_cache: {
3720
3768
  Row: {
3721
3769
  connection_id: string;
@@ -5159,6 +5207,216 @@ export type Database = {
5159
5207
  };
5160
5208
  Relationships: [];
5161
5209
  };
5210
+ local_customer_agreements: {
5211
+ Row: {
5212
+ base_price: number | null;
5213
+ created_at: string;
5214
+ currency: string;
5215
+ customer_id: string;
5216
+ id: string;
5217
+ min_quantity: number;
5218
+ net_price: number;
5219
+ notes: string | null;
5220
+ product_category_id: string | null;
5221
+ product_id: string | null;
5222
+ updated_at: string;
5223
+ valid_from: string | null;
5224
+ valid_until: string | null;
5225
+ };
5226
+ Insert: {
5227
+ base_price?: number | null;
5228
+ created_at?: string;
5229
+ currency?: string;
5230
+ customer_id: string;
5231
+ id?: string;
5232
+ min_quantity?: number;
5233
+ net_price: number;
5234
+ notes?: string | null;
5235
+ product_category_id?: string | null;
5236
+ product_id?: string | null;
5237
+ updated_at?: string;
5238
+ valid_from?: string | null;
5239
+ valid_until?: string | null;
5240
+ };
5241
+ Update: {
5242
+ base_price?: number | null;
5243
+ created_at?: string;
5244
+ currency?: string;
5245
+ customer_id?: string;
5246
+ id?: string;
5247
+ min_quantity?: number;
5248
+ net_price?: number;
5249
+ notes?: string | null;
5250
+ product_category_id?: string | null;
5251
+ product_id?: string | null;
5252
+ updated_at?: string;
5253
+ valid_from?: string | null;
5254
+ valid_until?: string | null;
5255
+ };
5256
+ Relationships: [
5257
+ {
5258
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
5259
+ columns: ["customer_id"];
5260
+ isOneToOne: false;
5261
+ referencedRelation: "customers";
5262
+ referencedColumns: ["id"];
5263
+ },
5264
+ {
5265
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
5266
+ columns: ["product_category_id"];
5267
+ isOneToOne: false;
5268
+ referencedRelation: "product_categories";
5269
+ referencedColumns: ["id"];
5270
+ },
5271
+ {
5272
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
5273
+ columns: ["product_id"];
5274
+ isOneToOne: false;
5275
+ referencedRelation: "products";
5276
+ referencedColumns: ["id"];
5277
+ }
5278
+ ];
5279
+ };
5280
+ local_customer_price_groups: {
5281
+ Row: {
5282
+ created_at: string;
5283
+ currency: string;
5284
+ customer_id: string;
5285
+ discount_type: string;
5286
+ discount_value: number;
5287
+ id: string;
5288
+ min_quantity: number;
5289
+ notes: string | null;
5290
+ product_category_id: string | null;
5291
+ product_id: string | null;
5292
+ updated_at: string;
5293
+ valid_from: string | null;
5294
+ valid_until: string | null;
5295
+ };
5296
+ Insert: {
5297
+ created_at?: string;
5298
+ currency?: string;
5299
+ customer_id: string;
5300
+ discount_type: string;
5301
+ discount_value: number;
5302
+ id?: string;
5303
+ min_quantity?: number;
5304
+ notes?: string | null;
5305
+ product_category_id?: string | null;
5306
+ product_id?: string | null;
5307
+ updated_at?: string;
5308
+ valid_from?: string | null;
5309
+ valid_until?: string | null;
5310
+ };
5311
+ Update: {
5312
+ created_at?: string;
5313
+ currency?: string;
5314
+ customer_id?: string;
5315
+ discount_type?: string;
5316
+ discount_value?: number;
5317
+ id?: string;
5318
+ min_quantity?: number;
5319
+ notes?: string | null;
5320
+ product_category_id?: string | null;
5321
+ product_id?: string | null;
5322
+ updated_at?: string;
5323
+ valid_from?: string | null;
5324
+ valid_until?: string | null;
5325
+ };
5326
+ Relationships: [
5327
+ {
5328
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
5329
+ columns: ["customer_id"];
5330
+ isOneToOne: false;
5331
+ referencedRelation: "customers";
5332
+ referencedColumns: ["id"];
5333
+ },
5334
+ {
5335
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
5336
+ columns: ["product_category_id"];
5337
+ isOneToOne: false;
5338
+ referencedRelation: "product_categories";
5339
+ referencedColumns: ["id"];
5340
+ },
5341
+ {
5342
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
5343
+ columns: ["product_id"];
5344
+ isOneToOne: false;
5345
+ referencedRelation: "products";
5346
+ referencedColumns: ["id"];
5347
+ }
5348
+ ];
5349
+ };
5350
+ local_customer_sales_strategies: {
5351
+ Row: {
5352
+ created_at: string;
5353
+ currency: string;
5354
+ customer_id: string;
5355
+ discount_type: string;
5356
+ discount_value: number;
5357
+ id: string;
5358
+ min_quantity: number;
5359
+ notes: string | null;
5360
+ product_category_id: string | null;
5361
+ product_id: string | null;
5362
+ updated_at: string;
5363
+ valid_from: string | null;
5364
+ valid_until: string | null;
5365
+ };
5366
+ Insert: {
5367
+ created_at?: string;
5368
+ currency?: string;
5369
+ customer_id: string;
5370
+ discount_type: string;
5371
+ discount_value: number;
5372
+ id?: string;
5373
+ min_quantity?: number;
5374
+ notes?: string | null;
5375
+ product_category_id?: string | null;
5376
+ product_id?: string | null;
5377
+ updated_at?: string;
5378
+ valid_from?: string | null;
5379
+ valid_until?: string | null;
5380
+ };
5381
+ Update: {
5382
+ created_at?: string;
5383
+ currency?: string;
5384
+ customer_id?: string;
5385
+ discount_type?: string;
5386
+ discount_value?: number;
5387
+ id?: string;
5388
+ min_quantity?: number;
5389
+ notes?: string | null;
5390
+ product_category_id?: string | null;
5391
+ product_id?: string | null;
5392
+ updated_at?: string;
5393
+ valid_from?: string | null;
5394
+ valid_until?: string | null;
5395
+ };
5396
+ Relationships: [
5397
+ {
5398
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
5399
+ columns: ["customer_id"];
5400
+ isOneToOne: false;
5401
+ referencedRelation: "customers";
5402
+ referencedColumns: ["id"];
5403
+ },
5404
+ {
5405
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
5406
+ columns: ["product_category_id"];
5407
+ isOneToOne: false;
5408
+ referencedRelation: "product_categories";
5409
+ referencedColumns: ["id"];
5410
+ },
5411
+ {
5412
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
5413
+ columns: ["product_id"];
5414
+ isOneToOne: false;
5415
+ referencedRelation: "products";
5416
+ referencedColumns: ["id"];
5417
+ }
5418
+ ];
5419
+ };
5162
5420
  locations: {
5163
5421
  Row: {
5164
5422
  created_at: string;
@@ -5590,100 +5848,375 @@ export type Database = {
5590
5848
  }
5591
5849
  ];
5592
5850
  };
5593
- manufacture_products: {
5851
+ manufacture_products: {
5852
+ Row: {
5853
+ created_at: string;
5854
+ description: string | null;
5855
+ id: string;
5856
+ is_active: boolean;
5857
+ name: string;
5858
+ produced_stock: number;
5859
+ product_code: string;
5860
+ tenant_id: string;
5861
+ updated_at: string;
5862
+ };
5863
+ Insert: {
5864
+ created_at?: string;
5865
+ description?: string | null;
5866
+ id?: string;
5867
+ is_active?: boolean;
5868
+ name: string;
5869
+ produced_stock?: number;
5870
+ product_code: string;
5871
+ tenant_id: string;
5872
+ updated_at?: string;
5873
+ };
5874
+ Update: {
5875
+ created_at?: string;
5876
+ description?: string | null;
5877
+ id?: string;
5878
+ is_active?: boolean;
5879
+ name?: string;
5880
+ produced_stock?: number;
5881
+ product_code?: string;
5882
+ tenant_id?: string;
5883
+ updated_at?: string;
5884
+ };
5885
+ Relationships: [];
5886
+ };
5887
+ monteurs: {
5888
+ Row: {
5889
+ avatar_url: string | null;
5890
+ color: string | null;
5891
+ created_at: string;
5892
+ email: string | null;
5893
+ id: string;
5894
+ is_active: boolean;
5895
+ leave_balance_hours: number;
5896
+ name: string;
5897
+ persnr: number | null;
5898
+ phone: string | null;
5899
+ role: string;
5900
+ tenant_id: string;
5901
+ updated_at: string;
5902
+ user_id: string | null;
5903
+ };
5904
+ Insert: {
5905
+ avatar_url?: string | null;
5906
+ color?: string | null;
5907
+ created_at?: string;
5908
+ email?: string | null;
5909
+ id?: string;
5910
+ is_active?: boolean;
5911
+ leave_balance_hours?: number;
5912
+ name: string;
5913
+ persnr?: number | null;
5914
+ phone?: string | null;
5915
+ role?: string;
5916
+ tenant_id: string;
5917
+ updated_at?: string;
5918
+ user_id?: string | null;
5919
+ };
5920
+ Update: {
5921
+ avatar_url?: string | null;
5922
+ color?: string | null;
5923
+ created_at?: string;
5924
+ email?: string | null;
5925
+ id?: string;
5926
+ is_active?: boolean;
5927
+ leave_balance_hours?: number;
5928
+ name?: string;
5929
+ persnr?: number | null;
5930
+ phone?: string | null;
5931
+ role?: string;
5932
+ tenant_id?: string;
5933
+ updated_at?: string;
5934
+ user_id?: string | null;
5935
+ };
5936
+ Relationships: [
5937
+ {
5938
+ foreignKeyName: "monteurs_tenant_id_fkey";
5939
+ columns: ["tenant_id"];
5940
+ isOneToOne: false;
5941
+ referencedRelation: "tenants";
5942
+ referencedColumns: ["id"];
5943
+ }
5944
+ ];
5945
+ };
5946
+ nmbrs_component_mapping: {
5947
+ Row: {
5948
+ created_at: string;
5949
+ id: string;
5950
+ source_kind: string;
5951
+ source_value: string | null;
5952
+ updated_at: string;
5953
+ wage_code: string;
5954
+ };
5955
+ Insert: {
5956
+ created_at?: string;
5957
+ id?: string;
5958
+ source_kind: string;
5959
+ source_value?: string | null;
5960
+ updated_at?: string;
5961
+ wage_code: string;
5962
+ };
5963
+ Update: {
5964
+ created_at?: string;
5965
+ id?: string;
5966
+ source_kind?: string;
5967
+ source_value?: string | null;
5968
+ updated_at?: string;
5969
+ wage_code?: string;
5970
+ };
5971
+ Relationships: [
5972
+ {
5973
+ foreignKeyName: "nmbrs_component_mapping_wage_code_fkey";
5974
+ columns: ["wage_code"];
5975
+ isOneToOne: false;
5976
+ referencedRelation: "nmbrs_wage_components";
5977
+ referencedColumns: ["code"];
5978
+ }
5979
+ ];
5980
+ };
5981
+ nmbrs_employee_mapping: {
5982
+ Row: {
5983
+ active_from: string | null;
5984
+ active_to: string | null;
5985
+ contract_hours_per_week: number | null;
5986
+ created_at: string;
5987
+ hourly_wage: number | null;
5988
+ id: string;
5989
+ monteur_id: string;
5990
+ nmbrs_company_code: string | null;
5991
+ nmbrs_employee_number: string;
5992
+ updated_at: string;
5993
+ };
5994
+ Insert: {
5995
+ active_from?: string | null;
5996
+ active_to?: string | null;
5997
+ contract_hours_per_week?: number | null;
5998
+ created_at?: string;
5999
+ hourly_wage?: number | null;
6000
+ id?: string;
6001
+ monteur_id: string;
6002
+ nmbrs_company_code?: string | null;
6003
+ nmbrs_employee_number: string;
6004
+ updated_at?: string;
6005
+ };
6006
+ Update: {
6007
+ active_from?: string | null;
6008
+ active_to?: string | null;
6009
+ contract_hours_per_week?: number | null;
6010
+ created_at?: string;
6011
+ hourly_wage?: number | null;
6012
+ id?: string;
6013
+ monteur_id?: string;
6014
+ nmbrs_company_code?: string | null;
6015
+ nmbrs_employee_number?: string;
6016
+ updated_at?: string;
6017
+ };
6018
+ Relationships: [
6019
+ {
6020
+ foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
6021
+ columns: ["monteur_id"];
6022
+ isOneToOne: true;
6023
+ referencedRelation: "monteurs";
6024
+ referencedColumns: ["id"];
6025
+ }
6026
+ ];
6027
+ };
6028
+ nmbrs_export_lines: {
6029
+ Row: {
6030
+ amount: number;
6031
+ created_at: string;
6032
+ entry_date: string;
6033
+ hours: number;
6034
+ id: string;
6035
+ monteur_id: string;
6036
+ nmbrs_employee_number: string | null;
6037
+ notes: string | null;
6038
+ run_id: string;
6039
+ source_kind: string | null;
6040
+ source_ref_id: string | null;
6041
+ updated_at: string;
6042
+ wage_code: string;
6043
+ };
6044
+ Insert: {
6045
+ amount?: number;
6046
+ created_at?: string;
6047
+ entry_date: string;
6048
+ hours?: number;
6049
+ id?: string;
6050
+ monteur_id: string;
6051
+ nmbrs_employee_number?: string | null;
6052
+ notes?: string | null;
6053
+ run_id: string;
6054
+ source_kind?: string | null;
6055
+ source_ref_id?: string | null;
6056
+ updated_at?: string;
6057
+ wage_code: string;
6058
+ };
6059
+ Update: {
6060
+ amount?: number;
6061
+ created_at?: string;
6062
+ entry_date?: string;
6063
+ hours?: number;
6064
+ id?: string;
6065
+ monteur_id?: string;
6066
+ nmbrs_employee_number?: string | null;
6067
+ notes?: string | null;
6068
+ run_id?: string;
6069
+ source_kind?: string | null;
6070
+ source_ref_id?: string | null;
6071
+ updated_at?: string;
6072
+ wage_code?: string;
6073
+ };
6074
+ Relationships: [
6075
+ {
6076
+ foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
6077
+ columns: ["monteur_id"];
6078
+ isOneToOne: false;
6079
+ referencedRelation: "monteurs";
6080
+ referencedColumns: ["id"];
6081
+ },
6082
+ {
6083
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
6084
+ columns: ["run_id"];
6085
+ isOneToOne: false;
6086
+ referencedRelation: "nmbrs_export_runs";
6087
+ referencedColumns: ["id"];
6088
+ },
6089
+ {
6090
+ foreignKeyName: "nmbrs_export_lines_wage_code_fkey";
6091
+ columns: ["wage_code"];
6092
+ isOneToOne: false;
6093
+ referencedRelation: "nmbrs_wage_components";
6094
+ referencedColumns: ["code"];
6095
+ }
6096
+ ];
6097
+ };
6098
+ nmbrs_export_runs: {
6099
+ Row: {
6100
+ created_at: string;
6101
+ file_name: string | null;
6102
+ generated_at: string;
6103
+ generated_by: string | null;
6104
+ id: string;
6105
+ notes: string | null;
6106
+ period_end: string;
6107
+ period_label: string;
6108
+ period_start: string;
6109
+ status: string;
6110
+ total_hours: number;
6111
+ total_lines: number;
6112
+ updated_at: string;
6113
+ };
6114
+ Insert: {
6115
+ created_at?: string;
6116
+ file_name?: string | null;
6117
+ generated_at?: string;
6118
+ generated_by?: string | null;
6119
+ id?: string;
6120
+ notes?: string | null;
6121
+ period_end: string;
6122
+ period_label: string;
6123
+ period_start: string;
6124
+ status?: string;
6125
+ total_hours?: number;
6126
+ total_lines?: number;
6127
+ updated_at?: string;
6128
+ };
6129
+ Update: {
6130
+ created_at?: string;
6131
+ file_name?: string | null;
6132
+ generated_at?: string;
6133
+ generated_by?: string | null;
6134
+ id?: string;
6135
+ notes?: string | null;
6136
+ period_end?: string;
6137
+ period_label?: string;
6138
+ period_start?: string;
6139
+ status?: string;
6140
+ total_hours?: number;
6141
+ total_lines?: number;
6142
+ updated_at?: string;
6143
+ };
6144
+ Relationships: [];
6145
+ };
6146
+ nmbrs_settings: {
5594
6147
  Row: {
5595
6148
  created_at: string;
5596
- description: string | null;
5597
- id: string;
5598
- is_active: boolean;
5599
- name: string;
5600
- produced_stock: number;
5601
- product_code: string;
5602
- tenant_id: string;
6149
+ default_company_code: string | null;
6150
+ id: boolean;
6151
+ include_travel: boolean;
6152
+ overtime_threshold_daily: number;
6153
+ overtime_threshold_weekly: number;
6154
+ period_type: string;
5603
6155
  updated_at: string;
6156
+ updated_by: string | null;
6157
+ week_start_day: number;
5604
6158
  };
5605
6159
  Insert: {
5606
6160
  created_at?: string;
5607
- description?: string | null;
5608
- id?: string;
5609
- is_active?: boolean;
5610
- name: string;
5611
- produced_stock?: number;
5612
- product_code: string;
5613
- tenant_id: string;
6161
+ default_company_code?: string | null;
6162
+ id?: boolean;
6163
+ include_travel?: boolean;
6164
+ overtime_threshold_daily?: number;
6165
+ overtime_threshold_weekly?: number;
6166
+ period_type?: string;
5614
6167
  updated_at?: string;
6168
+ updated_by?: string | null;
6169
+ week_start_day?: number;
5615
6170
  };
5616
6171
  Update: {
5617
6172
  created_at?: string;
5618
- description?: string | null;
5619
- id?: string;
5620
- is_active?: boolean;
5621
- name?: string;
5622
- produced_stock?: number;
5623
- product_code?: string;
5624
- tenant_id?: string;
6173
+ default_company_code?: string | null;
6174
+ id?: boolean;
6175
+ include_travel?: boolean;
6176
+ overtime_threshold_daily?: number;
6177
+ overtime_threshold_weekly?: number;
6178
+ period_type?: string;
5625
6179
  updated_at?: string;
6180
+ updated_by?: string | null;
6181
+ week_start_day?: number;
5626
6182
  };
5627
6183
  Relationships: [];
5628
6184
  };
5629
- monteurs: {
6185
+ nmbrs_wage_components: {
5630
6186
  Row: {
5631
- avatar_url: string | null;
5632
- color: string | null;
6187
+ category: string;
6188
+ code: string;
5633
6189
  created_at: string;
5634
- email: string | null;
5635
6190
  id: string;
5636
6191
  is_active: boolean;
5637
- leave_balance_hours: number;
5638
- name: string;
5639
- persnr: number | null;
5640
- phone: string | null;
5641
- role: string;
5642
- tenant_id: string;
6192
+ label: string;
6193
+ sort_order: number;
6194
+ unit: string;
5643
6195
  updated_at: string;
5644
- user_id: string | null;
5645
6196
  };
5646
6197
  Insert: {
5647
- avatar_url?: string | null;
5648
- color?: string | null;
6198
+ category: string;
6199
+ code: string;
5649
6200
  created_at?: string;
5650
- email?: string | null;
5651
6201
  id?: string;
5652
6202
  is_active?: boolean;
5653
- leave_balance_hours?: number;
5654
- name: string;
5655
- persnr?: number | null;
5656
- phone?: string | null;
5657
- role?: string;
5658
- tenant_id: string;
6203
+ label: string;
6204
+ sort_order?: number;
6205
+ unit: string;
5659
6206
  updated_at?: string;
5660
- user_id?: string | null;
5661
6207
  };
5662
6208
  Update: {
5663
- avatar_url?: string | null;
5664
- color?: string | null;
6209
+ category?: string;
6210
+ code?: string;
5665
6211
  created_at?: string;
5666
- email?: string | null;
5667
6212
  id?: string;
5668
6213
  is_active?: boolean;
5669
- leave_balance_hours?: number;
5670
- name?: string;
5671
- persnr?: number | null;
5672
- phone?: string | null;
5673
- role?: string;
5674
- tenant_id?: string;
6214
+ label?: string;
6215
+ sort_order?: number;
6216
+ unit?: string;
5675
6217
  updated_at?: string;
5676
- user_id?: string | null;
5677
6218
  };
5678
- Relationships: [
5679
- {
5680
- foreignKeyName: "monteurs_tenant_id_fkey";
5681
- columns: ["tenant_id"];
5682
- isOneToOne: false;
5683
- referencedRelation: "tenants";
5684
- referencedColumns: ["id"];
5685
- }
5686
- ];
6219
+ Relationships: [];
5687
6220
  };
5688
6221
  notifications: {
5689
6222
  Row: {
@@ -6699,6 +7232,7 @@ export type Database = {
6699
7232
  purchase_price: number | null;
6700
7233
  quantity: number;
6701
7234
  sale_price: number | null;
7235
+ trade_item_key: string | null;
6702
7236
  unit: string;
6703
7237
  updated_at: string;
6704
7238
  weight: string | null;
@@ -6721,6 +7255,7 @@ export type Database = {
6721
7255
  purchase_price?: number | null;
6722
7256
  quantity?: number;
6723
7257
  sale_price?: number | null;
7258
+ trade_item_key?: string | null;
6724
7259
  unit?: string;
6725
7260
  updated_at?: string;
6726
7261
  weight?: string | null;
@@ -6743,6 +7278,7 @@ export type Database = {
6743
7278
  purchase_price?: number | null;
6744
7279
  quantity?: number;
6745
7280
  sale_price?: number | null;
7281
+ trade_item_key?: string | null;
6746
7282
  unit?: string;
6747
7283
  updated_at?: string;
6748
7284
  weight?: string | null;
@@ -7594,6 +8130,102 @@ export type Database = {
7594
8130
  };
7595
8131
  Relationships: [];
7596
8132
  };
8133
+ stock_import_runs: {
8134
+ Row: {
8135
+ connection_id: string | null;
8136
+ created_at: string;
8137
+ created_rows: number;
8138
+ errors: Json;
8139
+ filename: string | null;
8140
+ id: string;
8141
+ mutations: Json;
8142
+ skipped_rows: number;
8143
+ total_rows: number;
8144
+ updated_rows: number;
8145
+ user_id: string;
8146
+ };
8147
+ Insert: {
8148
+ connection_id?: string | null;
8149
+ created_at?: string;
8150
+ created_rows?: number;
8151
+ errors?: Json;
8152
+ filename?: string | null;
8153
+ id?: string;
8154
+ mutations?: Json;
8155
+ skipped_rows?: number;
8156
+ total_rows?: number;
8157
+ updated_rows?: number;
8158
+ user_id: string;
8159
+ };
8160
+ Update: {
8161
+ connection_id?: string | null;
8162
+ created_at?: string;
8163
+ created_rows?: number;
8164
+ errors?: Json;
8165
+ filename?: string | null;
8166
+ id?: string;
8167
+ mutations?: Json;
8168
+ skipped_rows?: number;
8169
+ total_rows?: number;
8170
+ updated_rows?: number;
8171
+ user_id?: string;
8172
+ };
8173
+ Relationships: [];
8174
+ };
8175
+ stock_mutation_log: {
8176
+ Row: {
8177
+ connection_id: string | null;
8178
+ created_at: string;
8179
+ created_by: string | null;
8180
+ id: string;
8181
+ mutation_type: string;
8182
+ order_id: string | null;
8183
+ order_item_id: string | null;
8184
+ order_source: string | null;
8185
+ physical_after: number | null;
8186
+ physical_before: number | null;
8187
+ qty_delta: number;
8188
+ reason: string | null;
8189
+ reserved_after: number | null;
8190
+ reserved_before: number | null;
8191
+ trade_item_key: string;
8192
+ };
8193
+ Insert: {
8194
+ connection_id?: string | null;
8195
+ created_at?: string;
8196
+ created_by?: string | null;
8197
+ id?: string;
8198
+ mutation_type: string;
8199
+ order_id?: string | null;
8200
+ order_item_id?: string | null;
8201
+ order_source?: string | null;
8202
+ physical_after?: number | null;
8203
+ physical_before?: number | null;
8204
+ qty_delta: number;
8205
+ reason?: string | null;
8206
+ reserved_after?: number | null;
8207
+ reserved_before?: number | null;
8208
+ trade_item_key: string;
8209
+ };
8210
+ Update: {
8211
+ connection_id?: string | null;
8212
+ created_at?: string;
8213
+ created_by?: string | null;
8214
+ id?: string;
8215
+ mutation_type?: string;
8216
+ order_id?: string | null;
8217
+ order_item_id?: string | null;
8218
+ order_source?: string | null;
8219
+ physical_after?: number | null;
8220
+ physical_before?: number | null;
8221
+ qty_delta?: number;
8222
+ reason?: string | null;
8223
+ reserved_after?: number | null;
8224
+ reserved_before?: number | null;
8225
+ trade_item_key?: string;
8226
+ };
8227
+ Relationships: [];
8228
+ };
7597
8229
  supplier_products: {
7598
8230
  Row: {
7599
8231
  article_number: string | null;
@@ -9201,6 +9833,44 @@ export type Database = {
9201
9833
  };
9202
9834
  Relationships: [];
9203
9835
  };
9836
+ floriday_customer_discounts: {
9837
+ Row: {
9838
+ base_price: number | null;
9839
+ buyer_organization_id: string | null;
9840
+ currency: string | null;
9841
+ discount_type: string | null;
9842
+ discount_value: number | null;
9843
+ min_quantity: number | null;
9844
+ net_price: number | null;
9845
+ product_group_id: string | null;
9846
+ raw: Json | null;
9847
+ source: string | null;
9848
+ source_id: string | null;
9849
+ trade_item_id: string | null;
9850
+ valid_from: string | null;
9851
+ valid_until: string | null;
9852
+ };
9853
+ Relationships: [];
9854
+ };
9855
+ local_customer_discounts: {
9856
+ Row: {
9857
+ base_price: number | null;
9858
+ currency: string | null;
9859
+ customer_id: string | null;
9860
+ discount_type: string | null;
9861
+ discount_value: number | null;
9862
+ min_quantity: number | null;
9863
+ net_price: number | null;
9864
+ product_category_id: string | null;
9865
+ product_id: string | null;
9866
+ product_name: string | null;
9867
+ source: string | null;
9868
+ source_id: string | null;
9869
+ valid_from: string | null;
9870
+ valid_until: string | null;
9871
+ };
9872
+ Relationships: [];
9873
+ };
9204
9874
  manufacture_product_possible_stock_view: {
9205
9875
  Row: {
9206
9876
  component_count: number | null;
@@ -9497,6 +10167,54 @@ export type Database = {
9497
10167
  };
9498
10168
  Returns: number;
9499
10169
  };
10170
+ afh_city_code: {
10171
+ Args: {
10172
+ _city: string;
10173
+ _country: string;
10174
+ };
10175
+ Returns: string;
10176
+ };
10177
+ afh_normalize_country: {
10178
+ Args: {
10179
+ _raw: string;
10180
+ };
10181
+ Returns: string;
10182
+ };
10183
+ afh_normalize_nl_province: {
10184
+ Args: {
10185
+ _raw: string;
10186
+ };
10187
+ Returns: string;
10188
+ };
10189
+ afh_subtract_workdays: {
10190
+ Args: {
10191
+ _date: string;
10192
+ _days: number;
10193
+ };
10194
+ Returns: string;
10195
+ };
10196
+ apply_stock_consumption: {
10197
+ Args: {
10198
+ p_order_id: string;
10199
+ p_order_item_id: string;
10200
+ p_qty: number;
10201
+ p_reason: string;
10202
+ p_source: string;
10203
+ p_trade_item_key: string;
10204
+ };
10205
+ Returns: undefined;
10206
+ };
10207
+ apply_stock_reservation: {
10208
+ Args: {
10209
+ p_order_id: string;
10210
+ p_order_item_id: string;
10211
+ p_qty: number;
10212
+ p_reason: string;
10213
+ p_source: string;
10214
+ p_trade_item_key: string;
10215
+ };
10216
+ Returns: undefined;
10217
+ };
9500
10218
  assign_cart_numbers: {
9501
10219
  Args: {
9502
10220
  p_carts: Json;
@@ -9520,12 +10238,40 @@ export type Database = {
9520
10238
  order_number: string;
9521
10239
  }[];
9522
10240
  };
10241
+ backfill_open_order_reservations: {
10242
+ Args: never;
10243
+ Returns: {
10244
+ processed_items: number;
10245
+ }[];
10246
+ };
9523
10247
  call_exact_route: {
9524
10248
  Args: {
9525
10249
  path: string;
9526
10250
  };
9527
10251
  Returns: number;
9528
10252
  };
10253
+ check_offer_product_available_stock: {
10254
+ Args: {
10255
+ p_campaign_product_id: string;
10256
+ p_code: string;
10257
+ p_needed_qty?: number;
10258
+ p_product_name?: string;
10259
+ };
10260
+ Returns: Json;
10261
+ };
10262
+ check_trade_item_available_stock: {
10263
+ Args: {
10264
+ p_connection_id?: string;
10265
+ p_context?: string;
10266
+ p_needed_qty?: number;
10267
+ p_order_id?: string;
10268
+ p_order_item_id?: string;
10269
+ p_owner_id?: string;
10270
+ p_product_name?: string;
10271
+ p_trade_item_key: string;
10272
+ };
10273
+ Returns: Json;
10274
+ };
9529
10275
  cleanup_old_bookings: {
9530
10276
  Args: never;
9531
10277
  Returns: number;
@@ -9569,6 +10315,12 @@ export type Database = {
9569
10315
  table_name: string;
9570
10316
  }[];
9571
10317
  };
10318
+ dispatch_carrier_signups_sql: {
10319
+ Args: {
10320
+ _catchup?: string;
10321
+ };
10322
+ Returns: Json;
10323
+ };
9572
10324
  email_auth_decrypt: {
9573
10325
  Args: {
9574
10326
  cipher: string;
@@ -9604,6 +10356,12 @@ export type Database = {
9604
10356
  status: string;
9605
10357
  }[];
9606
10358
  };
10359
+ ensure_trade_item_stock_row: {
10360
+ Args: {
10361
+ p_key: string;
10362
+ };
10363
+ Returns: undefined;
10364
+ };
9607
10365
  ensure_user_tenant: {
9608
10366
  Args: never;
9609
10367
  Returns: string;
@@ -9641,6 +10399,31 @@ export type Database = {
9641
10399
  };
9642
10400
  Returns: boolean;
9643
10401
  };
10402
+ find_trade_item_key: {
10403
+ Args: {
10404
+ p_barcode: string;
10405
+ p_name: string;
10406
+ p_product_id: string;
10407
+ };
10408
+ Returns: string;
10409
+ };
10410
+ floriday_effective_price: {
10411
+ Args: {
10412
+ _buyer_id: string;
10413
+ _on_date?: string;
10414
+ _quantity?: number;
10415
+ _trade_item_id: string;
10416
+ };
10417
+ Returns: {
10418
+ base_price: number;
10419
+ currency: string;
10420
+ discount_type: string;
10421
+ discount_value: number;
10422
+ net_price: number;
10423
+ source: string;
10424
+ source_id: string;
10425
+ }[];
10426
+ };
9644
10427
  format_cart_number: {
9645
10428
  Args: {
9646
10429
  p_pick_date: string;
@@ -9661,6 +10444,13 @@ export type Database = {
9661
10444
  preferred_warehouse_name: string;
9662
10445
  }[];
9663
10446
  };
10447
+ get_active_floriday_context: {
10448
+ Args: never;
10449
+ Returns: {
10450
+ connection_id: string;
10451
+ user_id: string;
10452
+ }[];
10453
+ };
9664
10454
  get_active_twinfield_public: {
9665
10455
  Args: never;
9666
10456
  Returns: {
@@ -9763,6 +10553,18 @@ export type Database = {
9763
10553
  };
9764
10554
  Returns: Json;
9765
10555
  };
10556
+ get_offer_recipient_by_code: {
10557
+ Args: {
10558
+ p_code: string;
10559
+ };
10560
+ Returns: {
10561
+ campaign_id: string;
10562
+ clicked_at: string;
10563
+ customer_id: string;
10564
+ id: string;
10565
+ ordered_at: string;
10566
+ }[];
10567
+ };
9766
10568
  get_or_assign_floriday_order_number: {
9767
10569
  Args: {
9768
10570
  p_floriday_id: string;
@@ -9815,6 +10617,34 @@ export type Database = {
9815
10617
  Args: never;
9816
10618
  Returns: boolean;
9817
10619
  };
10620
+ local_effective_price: {
10621
+ Args: {
10622
+ _customer_id: string;
10623
+ _on_date?: string;
10624
+ _product_id: string;
10625
+ _quantity?: number;
10626
+ };
10627
+ Returns: {
10628
+ currency: string;
10629
+ discount_type: string;
10630
+ discount_value: number;
10631
+ net_price: number;
10632
+ source: string;
10633
+ source_id: string;
10634
+ }[];
10635
+ };
10636
+ mark_offer_clicked: {
10637
+ Args: {
10638
+ p_code: string;
10639
+ };
10640
+ Returns: undefined;
10641
+ };
10642
+ mark_offer_ordered: {
10643
+ Args: {
10644
+ p_code: string;
10645
+ };
10646
+ Returns: undefined;
10647
+ };
9818
10648
  next_order_number: {
9819
10649
  Args: {
9820
10650
  p_prefix: string;
@@ -9834,6 +10664,14 @@ export type Database = {
9834
10664
  };
9835
10665
  Returns: string;
9836
10666
  };
10667
+ offer_recipient_matches: {
10668
+ Args: {
10669
+ _campaign_id: string;
10670
+ _customer_id: string;
10671
+ _recipient_id: string;
10672
+ };
10673
+ Returns: boolean;
10674
+ };
9837
10675
  pickstation_get_orders_raw: {
9838
10676
  Args: never;
9839
10677
  Returns: Json;
@@ -9861,6 +10699,13 @@ export type Database = {
9861
10699
  };
9862
10700
  Returns: undefined;
9863
10701
  };
10702
+ promote_trade_item_key: {
10703
+ Args: {
10704
+ p_new: string;
10705
+ p_old: string;
10706
+ };
10707
+ Returns: undefined;
10708
+ };
9864
10709
  refresh_floricode_derived_code_lists: {
9865
10710
  Args: never;
9866
10711
  Returns: {