@flowselections/logistiek-engine 1.0.6 → 1.0.8

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/LogistiekEnginePage.d.ts.map +1 -1
  2. package/dist-lib/components/LogistiekEnginePage.js +19 -4
  3. package/dist-lib/components/RuleEnginePage.d.ts +1 -1
  4. package/dist-lib/components/RuleEnginePage.d.ts.map +1 -1
  5. package/dist-lib/components/RuleEnginePage.js +22 -2
  6. package/dist-lib/components/StrategieDialog.d.ts.map +1 -1
  7. package/dist-lib/components/StrategieDialog.js +1 -1
  8. package/dist-lib/hooks/useLogistiekStrategieen.d.ts +2 -1
  9. package/dist-lib/hooks/useLogistiekStrategieen.d.ts.map +1 -1
  10. package/dist-lib/hooks/useLogistiekStrategieen.js +72 -2
  11. package/dist-lib/hooks/useRuleEngine.d.ts.map +1 -1
  12. package/dist-lib/hooks/useRuleEngine.js +3 -1
  13. package/dist-lib/integrations/supabase/auth-middleware.d.ts +1092 -121
  14. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  15. package/dist-lib/integrations/supabase/client.d.ts +1092 -121
  16. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  17. package/dist-lib/integrations/supabase/client.server.d.ts +1092 -121
  18. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  19. package/dist-lib/integrations/supabase/types.d.ts +1122 -146
  20. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  21. package/dist-lib/lib/floridayDocuments.functions.d.ts +3270 -357
  22. package/dist-lib/lib/floridayDocuments.functions.d.ts.map +1 -1
  23. package/dist-lib/lib/floridayPush.functions.d.ts +1092 -121
  24. package/dist-lib/lib/floridayPush.functions.d.ts.map +1 -1
  25. package/dist-lib/lib/handlers/logistics-tick.server.d.ts.map +1 -1
  26. package/dist-lib/lib/handlers/logistics-tick.server.js +12 -1
  27. package/dist-lib/lib/loadCarrierPlanning.functions.d.ts +5450 -595
  28. package/dist-lib/lib/loadCarrierPlanning.functions.d.ts.map +1 -1
  29. package/dist-lib/lib/logisticsRecalcJob.functions.d.ts +2180 -238
  30. package/dist-lib/lib/logisticsRecalcJob.functions.d.ts.map +1 -1
  31. package/dist-lib/lib/logisticsRecalculate.functions.d.ts +1092 -121
  32. package/dist-lib/lib/logisticsRecalculate.functions.d.ts.map +1 -1
  33. package/dist-lib/lib/modulePrompts.d.ts.map +1 -1
  34. package/dist-lib/lib/modulePrompts.js +25 -0
  35. package/dist-lib/lib/planQueue.server.d.ts +17 -0
  36. package/dist-lib/lib/planQueue.server.d.ts.map +1 -0
  37. package/dist-lib/lib/planQueue.server.js +124 -0
  38. package/package.json +1 -1
@@ -876,6 +876,126 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
876
876
  };
877
877
  Relationships: [];
878
878
  };
879
+ cao_holidays: {
880
+ Row: {
881
+ created_at: string;
882
+ description: string | null;
883
+ holiday_date: string;
884
+ id: string;
885
+ updated_at: string;
886
+ };
887
+ Insert: {
888
+ created_at?: string;
889
+ description?: string | null;
890
+ holiday_date: string;
891
+ id?: string;
892
+ updated_at?: string;
893
+ };
894
+ Update: {
895
+ created_at?: string;
896
+ description?: string | null;
897
+ holiday_date?: string;
898
+ id?: string;
899
+ updated_at?: string;
900
+ };
901
+ Relationships: [];
902
+ };
903
+ cao_settings: {
904
+ Row: {
905
+ auto_break_after_hours: number;
906
+ auto_break_minutes: number;
907
+ auto_break_unpaid: boolean;
908
+ auto_stop_after_hours: number;
909
+ callout_fee: number;
910
+ created_at: string;
911
+ daily_regular_hours: number;
912
+ default_hourly_rate: number;
913
+ id: string;
914
+ materials_markup_percent: number;
915
+ max_daily_hours: number;
916
+ max_weekly_hours: number;
917
+ meal_allowance_amount: number;
918
+ overtime_pct_178: number;
919
+ overtime_pct_189: number;
920
+ overtime_pct_212: number;
921
+ reminder_after_hours: number;
922
+ standby_evening_amount: number;
923
+ standby_weekend_amount: number;
924
+ travel_cost_per_km: number | null;
925
+ travel_cost_threshold_km: number | null;
926
+ travel_counts_as_work: boolean;
927
+ travel_hourly_rate: number;
928
+ travel_rate_per_hour: number;
929
+ travel_threshold_minutes: number;
930
+ updated_at: string;
931
+ weekend_always_212: boolean;
932
+ window_end: string;
933
+ window_start: string;
934
+ };
935
+ Insert: {
936
+ auto_break_after_hours?: number;
937
+ auto_break_minutes?: number;
938
+ auto_break_unpaid?: boolean;
939
+ auto_stop_after_hours?: number;
940
+ callout_fee?: number;
941
+ created_at?: string;
942
+ daily_regular_hours?: number;
943
+ default_hourly_rate?: number;
944
+ id?: string;
945
+ materials_markup_percent?: number;
946
+ max_daily_hours?: number;
947
+ max_weekly_hours?: number;
948
+ meal_allowance_amount?: number;
949
+ overtime_pct_178?: number;
950
+ overtime_pct_189?: number;
951
+ overtime_pct_212?: number;
952
+ reminder_after_hours?: number;
953
+ standby_evening_amount?: number;
954
+ standby_weekend_amount?: number;
955
+ travel_cost_per_km?: number | null;
956
+ travel_cost_threshold_km?: number | null;
957
+ travel_counts_as_work?: boolean;
958
+ travel_hourly_rate?: number;
959
+ travel_rate_per_hour?: number;
960
+ travel_threshold_minutes?: number;
961
+ updated_at?: string;
962
+ weekend_always_212?: boolean;
963
+ window_end?: string;
964
+ window_start?: string;
965
+ };
966
+ Update: {
967
+ auto_break_after_hours?: number;
968
+ auto_break_minutes?: number;
969
+ auto_break_unpaid?: boolean;
970
+ auto_stop_after_hours?: number;
971
+ callout_fee?: number;
972
+ created_at?: string;
973
+ daily_regular_hours?: number;
974
+ default_hourly_rate?: number;
975
+ id?: string;
976
+ materials_markup_percent?: number;
977
+ max_daily_hours?: number;
978
+ max_weekly_hours?: number;
979
+ meal_allowance_amount?: number;
980
+ overtime_pct_178?: number;
981
+ overtime_pct_189?: number;
982
+ overtime_pct_212?: number;
983
+ reminder_after_hours?: number;
984
+ standby_evening_amount?: number;
985
+ standby_weekend_amount?: number;
986
+ travel_cost_per_km?: number | null;
987
+ travel_cost_threshold_km?: number | null;
988
+ travel_counts_as_work?: boolean;
989
+ travel_hourly_rate?: number;
990
+ travel_rate_per_hour?: number;
991
+ travel_threshold_minutes?: number;
992
+ updated_at?: string;
993
+ weekend_always_212?: boolean;
994
+ window_end?: string;
995
+ window_start?: string;
996
+ };
997
+ Relationships: [];
998
+ };
879
999
  carrier_shipping_rates: {
880
1000
  Row: {
881
1001
  carrier_id: string;
@@ -1688,7 +1808,7 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
1688
1808
  city: string | null;
1689
1809
  country: string | null;
1690
1810
  created_at: string;
1691
- customer_id: string | null;
1811
+ customer_id: string;
1692
1812
  external_key: string | null;
1693
1813
  external_provider: string | null;
1694
1814
  floriday_location_id: string | null;
@@ -1712,7 +1832,7 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
1712
1832
  city?: string | null;
1713
1833
  country?: string | null;
1714
1834
  created_at?: string;
1715
- customer_id?: string | null;
1835
+ customer_id: string;
1716
1836
  external_key?: string | null;
1717
1837
  external_provider?: string | null;
1718
1838
  floriday_location_id?: string | null;
@@ -1736,7 +1856,7 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
1736
1856
  city?: string | null;
1737
1857
  country?: string | null;
1738
1858
  created_at?: string;
1739
- customer_id?: string | null;
1859
+ customer_id?: string;
1740
1860
  external_key?: string | null;
1741
1861
  external_provider?: string | null;
1742
1862
  floriday_location_id?: string | null;
@@ -6484,6 +6604,7 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
6484
6604
  Row: {
6485
6605
  buyer_organization_id: string | null;
6486
6606
  connection_id: string;
6607
+ controlled_at: string | null;
6487
6608
  created_at: string;
6488
6609
  data: import("../integrations/supabase/types").Json;
6489
6610
  floriday_id: string;
@@ -6495,6 +6616,7 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
6495
6616
  Insert: {
6496
6617
  buyer_organization_id?: string | null;
6497
6618
  connection_id: string;
6619
+ controlled_at?: string | null;
6498
6620
  created_at?: string;
6499
6621
  data: import("../integrations/supabase/types").Json;
6500
6622
  floriday_id: string;
@@ -6506,6 +6628,7 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
6506
6628
  Update: {
6507
6629
  buyer_organization_id?: string | null;
6508
6630
  connection_id?: string;
6631
+ controlled_at?: string | null;
6509
6632
  created_at?: string;
6510
6633
  data?: import("../integrations/supabase/types").Json;
6511
6634
  floriday_id?: string;
@@ -7407,6 +7530,54 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
7407
7530
  };
7408
7531
  Relationships: [];
7409
7532
  };
7533
+ invoice_timing_settings: {
7534
+ Row: {
7535
+ anchor: string;
7536
+ business_days_only: boolean;
7537
+ created_at: string;
7538
+ enabled: boolean;
7539
+ id: string;
7540
+ offset_days: number;
7541
+ pickup_anchor: string;
7542
+ pickup_business_days_only: boolean;
7543
+ pickup_offset_days: number;
7544
+ pickup_time_of_day: string;
7545
+ singleton: boolean;
7546
+ time_of_day: string;
7547
+ updated_at: string;
7548
+ };
7549
+ Insert: {
7550
+ anchor?: string;
7551
+ business_days_only?: boolean;
7552
+ created_at?: string;
7553
+ enabled?: boolean;
7554
+ id?: string;
7555
+ offset_days?: number;
7556
+ pickup_anchor?: string;
7557
+ pickup_business_days_only?: boolean;
7558
+ pickup_offset_days?: number;
7559
+ pickup_time_of_day?: string;
7560
+ singleton?: boolean;
7561
+ time_of_day?: string;
7562
+ updated_at?: string;
7563
+ };
7564
+ Update: {
7565
+ anchor?: string;
7566
+ business_days_only?: boolean;
7567
+ created_at?: string;
7568
+ enabled?: boolean;
7569
+ id?: string;
7570
+ offset_days?: number;
7571
+ pickup_anchor?: string;
7572
+ pickup_business_days_only?: boolean;
7573
+ pickup_offset_days?: number;
7574
+ pickup_time_of_day?: string;
7575
+ singleton?: boolean;
7576
+ time_of_day?: string;
7577
+ updated_at?: string;
7578
+ };
7579
+ Relationships: [];
7580
+ };
7410
7581
  itk_contact_persons: {
7411
7582
  Row: {
7412
7583
  created_at: string;
@@ -7719,7 +7890,6 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
7719
7890
  start_date: string;
7720
7891
  start_time: string | null;
7721
7892
  status: string;
7722
- tenant_id: string;
7723
7893
  updated_at: string;
7724
7894
  user_id: string;
7725
7895
  };
@@ -7737,7 +7907,6 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
7737
7907
  start_date: string;
7738
7908
  start_time?: string | null;
7739
7909
  status?: string;
7740
- tenant_id?: string;
7741
7910
  updated_at?: string;
7742
7911
  user_id: string;
7743
7912
  };
@@ -7755,7 +7924,6 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
7755
7924
  start_date?: string;
7756
7925
  start_time?: string | null;
7757
7926
  status?: string;
7758
- tenant_id?: string;
7759
7927
  updated_at?: string;
7760
7928
  user_id?: string;
7761
7929
  };
@@ -7763,13 +7931,13 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
7763
7931
  foreignKeyName: "leave_requests_monteur_id_fkey";
7764
7932
  columns: ["monteur_id"];
7765
7933
  isOneToOne: false;
7766
- referencedRelation: "monteurs";
7934
+ referencedRelation: "profiles";
7767
7935
  referencedColumns: ["id"];
7768
7936
  }, {
7769
7937
  foreignKeyName: "leave_requests_user_id_fkey";
7770
7938
  columns: ["user_id"];
7771
7939
  isOneToOne: false;
7772
- referencedRelation: "monteurs";
7940
+ referencedRelation: "profiles";
7773
7941
  referencedColumns: ["id"];
7774
7942
  }];
7775
7943
  };
@@ -8637,6 +8805,45 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
8637
8805
  };
8638
8806
  Relationships: [];
8639
8807
  };
8808
+ logistics_plan_queue: {
8809
+ Row: {
8810
+ attempts: number;
8811
+ claimed_at: string | null;
8812
+ enqueued_at: string;
8813
+ error: string | null;
8814
+ id: string;
8815
+ next_attempt_at: string;
8816
+ order_id: string;
8817
+ reason: string;
8818
+ status: string;
8819
+ updated_at: string;
8820
+ };
8821
+ Insert: {
8822
+ attempts?: number;
8823
+ claimed_at?: string | null;
8824
+ enqueued_at?: string;
8825
+ error?: string | null;
8826
+ id?: string;
8827
+ next_attempt_at?: string;
8828
+ order_id: string;
8829
+ reason?: string;
8830
+ status?: string;
8831
+ updated_at?: string;
8832
+ };
8833
+ Update: {
8834
+ attempts?: number;
8835
+ claimed_at?: string | null;
8836
+ enqueued_at?: string;
8837
+ error?: string | null;
8838
+ id?: string;
8839
+ next_attempt_at?: string;
8840
+ order_id?: string;
8841
+ reason?: string;
8842
+ status?: string;
8843
+ updated_at?: string;
8844
+ };
8845
+ Relationships: [];
8846
+ };
8640
8847
  logistics_plan_runs: {
8641
8848
  Row: {
8642
8849
  created_at: string;
@@ -8712,6 +8919,24 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
8712
8919
  referencedColumns: ["id"];
8713
8920
  }];
8714
8921
  };
8922
+ logistics_plan_settings: {
8923
+ Row: {
8924
+ key: string;
8925
+ updated_at: string;
8926
+ value: string;
8927
+ };
8928
+ Insert: {
8929
+ key: string;
8930
+ updated_at?: string;
8931
+ value: string;
8932
+ };
8933
+ Update: {
8934
+ key?: string;
8935
+ updated_at?: string;
8936
+ value?: string;
8937
+ };
8938
+ Relationships: [];
8939
+ };
8715
8940
  logistics_rebuffer_state: {
8716
8941
  Row: {
8717
8942
  created_at: string;
@@ -9422,14 +9647,17 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
9422
9647
  };
9423
9648
  mailbox_messages: {
9424
9649
  Row: {
9650
+ attachments: import("../integrations/supabase/types").Json;
9425
9651
  body_html: string | null;
9426
9652
  body_text: string | null;
9653
+ cc_recipients: import("../integrations/supabase/types").Json;
9427
9654
  connection_id: string | null;
9428
9655
  created_at: string;
9429
9656
  error_message: string | null;
9430
9657
  external_id: string | null;
9431
9658
  from_email: string | null;
9432
9659
  from_name: string | null;
9660
+ has_attachments: boolean;
9433
9661
  id: string;
9434
9662
  message_id: string | null;
9435
9663
  profile_id: string | null;
@@ -9437,18 +9665,22 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
9437
9665
  received_at: string | null;
9438
9666
  status: string;
9439
9667
  subject: string | null;
9668
+ to_recipients: import("../integrations/supabase/types").Json;
9440
9669
  uid: number | null;
9441
9670
  updated_at: string;
9442
9671
  };
9443
9672
  Insert: {
9673
+ attachments?: import("../integrations/supabase/types").Json;
9444
9674
  body_html?: string | null;
9445
9675
  body_text?: string | null;
9676
+ cc_recipients?: import("../integrations/supabase/types").Json;
9446
9677
  connection_id?: string | null;
9447
9678
  created_at?: string;
9448
9679
  error_message?: string | null;
9449
9680
  external_id?: string | null;
9450
9681
  from_email?: string | null;
9451
9682
  from_name?: string | null;
9683
+ has_attachments?: boolean;
9452
9684
  id?: string;
9453
9685
  message_id?: string | null;
9454
9686
  profile_id?: string | null;
@@ -9456,18 +9688,22 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
9456
9688
  received_at?: string | null;
9457
9689
  status?: string;
9458
9690
  subject?: string | null;
9691
+ to_recipients?: import("../integrations/supabase/types").Json;
9459
9692
  uid?: number | null;
9460
9693
  updated_at?: string;
9461
9694
  };
9462
9695
  Update: {
9696
+ attachments?: import("../integrations/supabase/types").Json;
9463
9697
  body_html?: string | null;
9464
9698
  body_text?: string | null;
9699
+ cc_recipients?: import("../integrations/supabase/types").Json;
9465
9700
  connection_id?: string | null;
9466
9701
  created_at?: string;
9467
9702
  error_message?: string | null;
9468
9703
  external_id?: string | null;
9469
9704
  from_email?: string | null;
9470
9705
  from_name?: string | null;
9706
+ has_attachments?: boolean;
9471
9707
  id?: string;
9472
9708
  message_id?: string | null;
9473
9709
  profile_id?: string | null;
@@ -9475,6 +9711,7 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
9475
9711
  received_at?: string | null;
9476
9712
  status?: string;
9477
9713
  subject?: string | null;
9714
+ to_recipients?: import("../integrations/supabase/types").Json;
9478
9715
  uid?: number | null;
9479
9716
  updated_at?: string;
9480
9717
  };
@@ -9855,6 +10092,90 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
9855
10092
  };
9856
10093
  Relationships: [];
9857
10094
  };
10095
+ material_usage: {
10096
+ Row: {
10097
+ created_at: string;
10098
+ id: string;
10099
+ material_name: string;
10100
+ monteur_id: string | null;
10101
+ price_at_time: number;
10102
+ quantity_used: number;
10103
+ updated_at: string;
10104
+ van_inventory_id: string | null;
10105
+ work_order_id: string;
10106
+ };
10107
+ Insert: {
10108
+ created_at?: string;
10109
+ id?: string;
10110
+ material_name: string;
10111
+ monteur_id?: string | null;
10112
+ price_at_time?: number;
10113
+ quantity_used?: number;
10114
+ updated_at?: string;
10115
+ van_inventory_id?: string | null;
10116
+ work_order_id: string;
10117
+ };
10118
+ Update: {
10119
+ created_at?: string;
10120
+ id?: string;
10121
+ material_name?: string;
10122
+ monteur_id?: string | null;
10123
+ price_at_time?: number;
10124
+ quantity_used?: number;
10125
+ updated_at?: string;
10126
+ van_inventory_id?: string | null;
10127
+ work_order_id?: string;
10128
+ };
10129
+ Relationships: [{
10130
+ foreignKeyName: "material_usage_monteur_id_fkey";
10131
+ columns: ["monteur_id"];
10132
+ isOneToOne: false;
10133
+ referencedRelation: "profiles";
10134
+ referencedColumns: ["id"];
10135
+ }, {
10136
+ foreignKeyName: "material_usage_van_inventory_id_fkey";
10137
+ columns: ["van_inventory_id"];
10138
+ isOneToOne: false;
10139
+ referencedRelation: "van_inventories";
10140
+ referencedColumns: ["id"];
10141
+ }, {
10142
+ foreignKeyName: "material_usage_work_order_id_fkey";
10143
+ columns: ["work_order_id"];
10144
+ isOneToOne: false;
10145
+ referencedRelation: "work_orders";
10146
+ referencedColumns: ["id"];
10147
+ }];
10148
+ };
10149
+ module_features: {
10150
+ Row: {
10151
+ created_at: string;
10152
+ feature_id: string;
10153
+ id: string;
10154
+ is_active: boolean;
10155
+ last_seen_at: string;
10156
+ module_id: string;
10157
+ name: string;
10158
+ };
10159
+ Insert: {
10160
+ created_at?: string;
10161
+ feature_id: string;
10162
+ id?: string;
10163
+ is_active?: boolean;
10164
+ last_seen_at?: string;
10165
+ module_id: string;
10166
+ name: string;
10167
+ };
10168
+ Update: {
10169
+ created_at?: string;
10170
+ feature_id?: string;
10171
+ id?: string;
10172
+ is_active?: boolean;
10173
+ last_seen_at?: string;
10174
+ module_id?: string;
10175
+ name?: string;
10176
+ };
10177
+ Relationships: [];
10178
+ };
9858
10179
  module_permissions: {
9859
10180
  Row: {
9860
10181
  created_at: string;
@@ -9882,6 +10203,39 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
9882
10203
  };
9883
10204
  Relationships: [];
9884
10205
  };
10206
+ module_registry: {
10207
+ Row: {
10208
+ created_at: string;
10209
+ enforce: boolean;
10210
+ is_active: boolean;
10211
+ last_seen_at: string;
10212
+ module_id: string;
10213
+ name: string;
10214
+ shell_id: string | null;
10215
+ sort_order: number | null;
10216
+ };
10217
+ Insert: {
10218
+ created_at?: string;
10219
+ enforce?: boolean;
10220
+ is_active?: boolean;
10221
+ last_seen_at?: string;
10222
+ module_id: string;
10223
+ name: string;
10224
+ shell_id?: string | null;
10225
+ sort_order?: number | null;
10226
+ };
10227
+ Update: {
10228
+ created_at?: string;
10229
+ enforce?: boolean;
10230
+ is_active?: boolean;
10231
+ last_seen_at?: string;
10232
+ module_id?: string;
10233
+ name?: string;
10234
+ shell_id?: string | null;
10235
+ sort_order?: number | null;
10236
+ };
10237
+ Relationships: [];
10238
+ };
9885
10239
  module_runtime_config: {
9886
10240
  Row: {
9887
10241
  key: string;
@@ -9933,63 +10287,6 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
9933
10287
  };
9934
10288
  Relationships: [];
9935
10289
  };
9936
- monteurs: {
9937
- Row: {
9938
- avatar_url: string | null;
9939
- color: string | null;
9940
- created_at: string;
9941
- email: string | null;
9942
- id: string;
9943
- is_active: boolean;
9944
- leave_balance_hours: number;
9945
- name: string;
9946
- persnr: number | null;
9947
- phone: string | null;
9948
- role: string;
9949
- tenant_id: string;
9950
- updated_at: string;
9951
- user_id: string | null;
9952
- };
9953
- Insert: {
9954
- avatar_url?: string | null;
9955
- color?: string | null;
9956
- created_at?: string;
9957
- email?: string | null;
9958
- id?: string;
9959
- is_active?: boolean;
9960
- leave_balance_hours?: number;
9961
- name: string;
9962
- persnr?: number | null;
9963
- phone?: string | null;
9964
- role?: string;
9965
- tenant_id: string;
9966
- updated_at?: string;
9967
- user_id?: string | null;
9968
- };
9969
- Update: {
9970
- avatar_url?: string | null;
9971
- color?: string | null;
9972
- created_at?: string;
9973
- email?: string | null;
9974
- id?: string;
9975
- is_active?: boolean;
9976
- leave_balance_hours?: number;
9977
- name?: string;
9978
- persnr?: number | null;
9979
- phone?: string | null;
9980
- role?: string;
9981
- tenant_id?: string;
9982
- updated_at?: string;
9983
- user_id?: string | null;
9984
- };
9985
- Relationships: [{
9986
- foreignKeyName: "monteurs_tenant_id_fkey";
9987
- columns: ["tenant_id"];
9988
- isOneToOne: false;
9989
- referencedRelation: "tenants";
9990
- referencedColumns: ["id"];
9991
- }];
9992
- };
9993
10290
  nmbrs_component_mapping: {
9994
10291
  Row: {
9995
10292
  created_at: string;
@@ -10060,13 +10357,7 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
10060
10357
  nmbrs_employee_number?: string;
10061
10358
  updated_at?: string;
10062
10359
  };
10063
- Relationships: [{
10064
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
10065
- columns: ["monteur_id"];
10066
- isOneToOne: true;
10067
- referencedRelation: "monteurs";
10068
- referencedColumns: ["id"];
10069
- }];
10360
+ Relationships: [];
10070
10361
  };
10071
10362
  nmbrs_export_lines: {
10072
10363
  Row: {
@@ -10115,14 +10406,8 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
10115
10406
  wage_code?: string;
10116
10407
  };
10117
10408
  Relationships: [{
10118
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
10119
- columns: ["monteur_id"];
10120
- isOneToOne: false;
10121
- referencedRelation: "monteurs";
10122
- referencedColumns: ["id"];
10123
- }, {
10124
- foreignKeyName: "nmbrs_export_lines_run_id_fkey";
10125
- columns: ["run_id"];
10409
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
10410
+ columns: ["run_id"];
10126
10411
  isOneToOne: false;
10127
10412
  referencedRelation: "nmbrs_export_runs";
10128
10413
  referencedColumns: ["id"];
@@ -10941,6 +11226,45 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
10941
11226
  };
10942
11227
  Relationships: [];
10943
11228
  };
11229
+ order_invoice_links: {
11230
+ Row: {
11231
+ attempts: number;
11232
+ created_at: string;
11233
+ error_message: string | null;
11234
+ id: string;
11235
+ invoice_number: string | null;
11236
+ next_attempt_at: string;
11237
+ order_id: string;
11238
+ processed_at: string | null;
11239
+ status: string;
11240
+ updated_at: string;
11241
+ };
11242
+ Insert: {
11243
+ attempts?: number;
11244
+ created_at?: string;
11245
+ error_message?: string | null;
11246
+ id?: string;
11247
+ invoice_number?: string | null;
11248
+ next_attempt_at?: string;
11249
+ order_id: string;
11250
+ processed_at?: string | null;
11251
+ status?: string;
11252
+ updated_at?: string;
11253
+ };
11254
+ Update: {
11255
+ attempts?: number;
11256
+ created_at?: string;
11257
+ error_message?: string | null;
11258
+ id?: string;
11259
+ invoice_number?: string | null;
11260
+ next_attempt_at?: string;
11261
+ order_id?: string;
11262
+ processed_at?: string | null;
11263
+ status?: string;
11264
+ updated_at?: string;
11265
+ };
11266
+ Relationships: [];
11267
+ };
10944
11268
  order_items: {
10945
11269
  Row: {
10946
11270
  crates_per_layer: number | null;
@@ -11123,6 +11447,7 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
11123
11447
  delivery_date: string | null;
11124
11448
  floriday_sales_order_id: string | null;
11125
11449
  id: string;
11450
+ invoice_due_at: string | null;
11126
11451
  is_reservation: boolean;
11127
11452
  notes: string | null;
11128
11453
  order_date: string;
@@ -11144,6 +11469,7 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
11144
11469
  delivery_date?: string | null;
11145
11470
  floriday_sales_order_id?: string | null;
11146
11471
  id?: string;
11472
+ invoice_due_at?: string | null;
11147
11473
  is_reservation?: boolean;
11148
11474
  notes?: string | null;
11149
11475
  order_date?: string;
@@ -11165,6 +11491,7 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
11165
11491
  delivery_date?: string | null;
11166
11492
  floriday_sales_order_id?: string | null;
11167
11493
  id?: string;
11494
+ invoice_due_at?: string | null;
11168
11495
  is_reservation?: boolean;
11169
11496
  notes?: string | null;
11170
11497
  order_date?: string;
@@ -12462,6 +12789,72 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
12462
12789
  referencedColumns: ["id"];
12463
12790
  }];
12464
12791
  };
12792
+ print_queue_runners: {
12793
+ Row: {
12794
+ actief: boolean;
12795
+ basis_url: string;
12796
+ created_at: string;
12797
+ id: string;
12798
+ laatst_gezien: string;
12799
+ laatste_fout: string | null;
12800
+ laatste_request_id: number | null;
12801
+ mislukte_posts: number;
12802
+ tick_sleutel: string;
12803
+ updated_at: string;
12804
+ };
12805
+ Insert: {
12806
+ actief?: boolean;
12807
+ basis_url: string;
12808
+ created_at?: string;
12809
+ id?: string;
12810
+ laatst_gezien?: string;
12811
+ laatste_fout?: string | null;
12812
+ laatste_request_id?: number | null;
12813
+ mislukte_posts?: number;
12814
+ tick_sleutel?: string;
12815
+ updated_at?: string;
12816
+ };
12817
+ Update: {
12818
+ actief?: boolean;
12819
+ basis_url?: string;
12820
+ created_at?: string;
12821
+ id?: string;
12822
+ laatst_gezien?: string;
12823
+ laatste_fout?: string | null;
12824
+ laatste_request_id?: number | null;
12825
+ mislukte_posts?: number;
12826
+ tick_sleutel?: string;
12827
+ updated_at?: string;
12828
+ };
12829
+ Relationships: [];
12830
+ };
12831
+ print_queue_settings: {
12832
+ Row: {
12833
+ bewaar_bestanden_dagen: number;
12834
+ bewaar_opdrachten_dagen: number;
12835
+ created_at: string;
12836
+ dubbel_venster_minuten: number;
12837
+ id: string;
12838
+ updated_at: string;
12839
+ };
12840
+ Insert: {
12841
+ bewaar_bestanden_dagen?: number;
12842
+ bewaar_opdrachten_dagen?: number;
12843
+ created_at?: string;
12844
+ dubbel_venster_minuten?: number;
12845
+ id?: string;
12846
+ updated_at?: string;
12847
+ };
12848
+ Update: {
12849
+ bewaar_bestanden_dagen?: number;
12850
+ bewaar_opdrachten_dagen?: number;
12851
+ created_at?: string;
12852
+ dubbel_venster_minuten?: number;
12853
+ id?: string;
12854
+ updated_at?: string;
12855
+ };
12856
+ Relationships: [];
12857
+ };
12465
12858
  print_rules: {
12466
12859
  Row: {
12467
12860
  actief: boolean;
@@ -13938,6 +14331,96 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
13938
14331
  referencedColumns: ["id"];
13939
14332
  }];
13940
14333
  };
14334
+ role_assignments: {
14335
+ Row: {
14336
+ created_at: string;
14337
+ id: string;
14338
+ role_id: string;
14339
+ user_id: string;
14340
+ };
14341
+ Insert: {
14342
+ created_at?: string;
14343
+ id?: string;
14344
+ role_id: string;
14345
+ user_id: string;
14346
+ };
14347
+ Update: {
14348
+ created_at?: string;
14349
+ id?: string;
14350
+ role_id?: string;
14351
+ user_id?: string;
14352
+ };
14353
+ Relationships: [{
14354
+ foreignKeyName: "role_assignments_role_id_fkey";
14355
+ columns: ["role_id"];
14356
+ isOneToOne: false;
14357
+ referencedRelation: "roles";
14358
+ referencedColumns: ["id"];
14359
+ }];
14360
+ };
14361
+ role_permissions: {
14362
+ Row: {
14363
+ can_edit: boolean;
14364
+ can_view: boolean;
14365
+ feature_id: string;
14366
+ id: string;
14367
+ module_id: string;
14368
+ role_id: string;
14369
+ updated_at: string;
14370
+ };
14371
+ Insert: {
14372
+ can_edit?: boolean;
14373
+ can_view?: boolean;
14374
+ feature_id?: string;
14375
+ id?: string;
14376
+ module_id: string;
14377
+ role_id: string;
14378
+ updated_at?: string;
14379
+ };
14380
+ Update: {
14381
+ can_edit?: boolean;
14382
+ can_view?: boolean;
14383
+ feature_id?: string;
14384
+ id?: string;
14385
+ module_id?: string;
14386
+ role_id?: string;
14387
+ updated_at?: string;
14388
+ };
14389
+ Relationships: [{
14390
+ foreignKeyName: "role_permissions_role_id_fkey";
14391
+ columns: ["role_id"];
14392
+ isOneToOne: false;
14393
+ referencedRelation: "roles";
14394
+ referencedColumns: ["id"];
14395
+ }];
14396
+ };
14397
+ roles: {
14398
+ Row: {
14399
+ created_at: string;
14400
+ id: string;
14401
+ is_protected: boolean;
14402
+ key: string;
14403
+ name: string;
14404
+ updated_at: string;
14405
+ };
14406
+ Insert: {
14407
+ created_at?: string;
14408
+ id?: string;
14409
+ is_protected?: boolean;
14410
+ key: string;
14411
+ name: string;
14412
+ updated_at?: string;
14413
+ };
14414
+ Update: {
14415
+ created_at?: string;
14416
+ id?: string;
14417
+ is_protected?: boolean;
14418
+ key?: string;
14419
+ name?: string;
14420
+ updated_at?: string;
14421
+ };
14422
+ Relationships: [];
14423
+ };
13941
14424
  rooms: {
13942
14425
  Row: {
13943
14426
  capacity: number;
@@ -14607,6 +15090,54 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
14607
15090
  };
14608
15091
  Relationships: [];
14609
15092
  };
15093
+ time_compensation_entries: {
15094
+ Row: {
15095
+ created_at: string;
15096
+ employee_id: string;
15097
+ entry_date: string;
15098
+ id: string;
15099
+ km: number;
15100
+ meal_allowance: number;
15101
+ notes: string | null;
15102
+ standby_evening: number;
15103
+ standby_weekend: number;
15104
+ tvt_change: number;
15105
+ updated_at: string;
15106
+ };
15107
+ Insert: {
15108
+ created_at?: string;
15109
+ employee_id: string;
15110
+ entry_date: string;
15111
+ id?: string;
15112
+ km?: number;
15113
+ meal_allowance?: number;
15114
+ notes?: string | null;
15115
+ standby_evening?: number;
15116
+ standby_weekend?: number;
15117
+ tvt_change?: number;
15118
+ updated_at?: string;
15119
+ };
15120
+ Update: {
15121
+ created_at?: string;
15122
+ employee_id?: string;
15123
+ entry_date?: string;
15124
+ id?: string;
15125
+ km?: number;
15126
+ meal_allowance?: number;
15127
+ notes?: string | null;
15128
+ standby_evening?: number;
15129
+ standby_weekend?: number;
15130
+ tvt_change?: number;
15131
+ updated_at?: string;
15132
+ };
15133
+ Relationships: [{
15134
+ foreignKeyName: "time_compensation_entries_employee_id_fkey";
15135
+ columns: ["employee_id"];
15136
+ isOneToOne: false;
15137
+ referencedRelation: "profiles";
15138
+ referencedColumns: ["id"];
15139
+ }];
15140
+ };
14610
15141
  time_entries: {
14611
15142
  Row: {
14612
15143
  created_at: string;
@@ -14641,65 +15172,170 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
14641
15172
  undertime?: number;
14642
15173
  updated_at?: string;
14643
15174
  };
15175
+ Relationships: [];
15176
+ };
15177
+ time_log_week_approvals: {
15178
+ Row: {
15179
+ approved_at: string | null;
15180
+ approved_by: string | null;
15181
+ created_at: string;
15182
+ employee_id: string;
15183
+ id: string;
15184
+ locked: boolean;
15185
+ notes: string | null;
15186
+ status: string;
15187
+ submitted_at: string | null;
15188
+ updated_at: string;
15189
+ week_start: string;
15190
+ };
15191
+ Insert: {
15192
+ approved_at?: string | null;
15193
+ approved_by?: string | null;
15194
+ created_at?: string;
15195
+ employee_id: string;
15196
+ id?: string;
15197
+ locked?: boolean;
15198
+ notes?: string | null;
15199
+ status?: string;
15200
+ submitted_at?: string | null;
15201
+ updated_at?: string;
15202
+ week_start: string;
15203
+ };
15204
+ Update: {
15205
+ approved_at?: string | null;
15206
+ approved_by?: string | null;
15207
+ created_at?: string;
15208
+ employee_id?: string;
15209
+ id?: string;
15210
+ locked?: boolean;
15211
+ notes?: string | null;
15212
+ status?: string;
15213
+ submitted_at?: string | null;
15214
+ updated_at?: string;
15215
+ week_start?: string;
15216
+ };
14644
15217
  Relationships: [{
14645
- foreignKeyName: "time_entries_employee_id_fkey";
15218
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
14646
15219
  columns: ["employee_id"];
14647
15220
  isOneToOne: false;
14648
- referencedRelation: "monteurs";
15221
+ referencedRelation: "profiles";
14649
15222
  referencedColumns: ["id"];
14650
15223
  }];
14651
15224
  };
14652
15225
  time_logs: {
14653
15226
  Row: {
15227
+ auto_stop_reason: string | null;
15228
+ auto_stopped: boolean;
14654
15229
  created_at: string;
15230
+ current_latitude: number | null;
15231
+ current_longitude: number | null;
15232
+ current_position_updated_at: string | null;
14655
15233
  employee_id: string;
15234
+ end_latitude: number | null;
15235
+ end_longitude: number | null;
14656
15236
  end_time: string | null;
15237
+ eta_distance_km: number | null;
15238
+ eta_minutes: number | null;
15239
+ eta_updated_at: string | null;
15240
+ hour_category: string | null;
14657
15241
  id: string;
15242
+ last_reminder_at: string | null;
14658
15243
  notes: string | null;
14659
15244
  overtime_hours: number;
14660
15245
  overtime_type: string | null;
14661
15246
  regular_hours: number;
15247
+ reminder_count: number;
15248
+ requires_review: boolean;
15249
+ start_latitude: number | null;
15250
+ start_longitude: number | null;
14662
15251
  start_time: string;
14663
15252
  travel_cost: number | null;
14664
15253
  travel_distance_km: number | null;
15254
+ travel_duration_min: number | null;
15255
+ travel_time_minutes: number | null;
14665
15256
  type: string;
14666
15257
  updated_at: string;
15258
+ work_order_id: string | null;
14667
15259
  };
14668
15260
  Insert: {
15261
+ auto_stop_reason?: string | null;
15262
+ auto_stopped?: boolean;
14669
15263
  created_at?: string;
15264
+ current_latitude?: number | null;
15265
+ current_longitude?: number | null;
15266
+ current_position_updated_at?: string | null;
14670
15267
  employee_id: string;
15268
+ end_latitude?: number | null;
15269
+ end_longitude?: number | null;
14671
15270
  end_time?: string | null;
15271
+ eta_distance_km?: number | null;
15272
+ eta_minutes?: number | null;
15273
+ eta_updated_at?: string | null;
15274
+ hour_category?: string | null;
14672
15275
  id?: string;
15276
+ last_reminder_at?: string | null;
14673
15277
  notes?: string | null;
14674
15278
  overtime_hours?: number;
14675
15279
  overtime_type?: string | null;
14676
15280
  regular_hours?: number;
15281
+ reminder_count?: number;
15282
+ requires_review?: boolean;
15283
+ start_latitude?: number | null;
15284
+ start_longitude?: number | null;
14677
15285
  start_time?: string;
14678
15286
  travel_cost?: number | null;
14679
15287
  travel_distance_km?: number | null;
15288
+ travel_duration_min?: number | null;
15289
+ travel_time_minutes?: number | null;
14680
15290
  type: string;
14681
15291
  updated_at?: string;
15292
+ work_order_id?: string | null;
14682
15293
  };
14683
15294
  Update: {
15295
+ auto_stop_reason?: string | null;
15296
+ auto_stopped?: boolean;
14684
15297
  created_at?: string;
15298
+ current_latitude?: number | null;
15299
+ current_longitude?: number | null;
15300
+ current_position_updated_at?: string | null;
14685
15301
  employee_id?: string;
15302
+ end_latitude?: number | null;
15303
+ end_longitude?: number | null;
14686
15304
  end_time?: string | null;
15305
+ eta_distance_km?: number | null;
15306
+ eta_minutes?: number | null;
15307
+ eta_updated_at?: string | null;
15308
+ hour_category?: string | null;
14687
15309
  id?: string;
15310
+ last_reminder_at?: string | null;
14688
15311
  notes?: string | null;
14689
15312
  overtime_hours?: number;
14690
15313
  overtime_type?: string | null;
14691
15314
  regular_hours?: number;
15315
+ reminder_count?: number;
15316
+ requires_review?: boolean;
15317
+ start_latitude?: number | null;
15318
+ start_longitude?: number | null;
14692
15319
  start_time?: string;
14693
15320
  travel_cost?: number | null;
14694
15321
  travel_distance_km?: number | null;
15322
+ travel_duration_min?: number | null;
15323
+ travel_time_minutes?: number | null;
14695
15324
  type?: string;
14696
15325
  updated_at?: string;
15326
+ work_order_id?: string | null;
14697
15327
  };
14698
15328
  Relationships: [{
14699
15329
  foreignKeyName: "time_logs_employee_id_fkey";
14700
15330
  columns: ["employee_id"];
14701
15331
  isOneToOne: false;
14702
- referencedRelation: "monteurs";
15332
+ referencedRelation: "profiles";
15333
+ referencedColumns: ["id"];
15334
+ }, {
15335
+ foreignKeyName: "time_logs_work_order_id_fkey";
15336
+ columns: ["work_order_id"];
15337
+ isOneToOne: false;
15338
+ referencedRelation: "work_orders";
14703
15339
  referencedColumns: ["id"];
14704
15340
  }];
14705
15341
  };
@@ -14738,7 +15374,7 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
14738
15374
  foreignKeyName: "time_off_entries_employee_id_fkey";
14739
15375
  columns: ["employee_id"];
14740
15376
  isOneToOne: false;
14741
- referencedRelation: "monteurs";
15377
+ referencedRelation: "profiles";
14742
15378
  referencedColumns: ["id"];
14743
15379
  }];
14744
15380
  };
@@ -15048,6 +15684,39 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
15048
15684
  };
15049
15685
  Relationships: [];
15050
15686
  };
15687
+ twinfield_cron_locks: {
15688
+ Row: {
15689
+ created_at: string;
15690
+ heartbeat_at: string;
15691
+ job_name: string;
15692
+ last_error: string | null;
15693
+ last_finished_at: string | null;
15694
+ locked_at: string;
15695
+ run_id: string;
15696
+ updated_at: string;
15697
+ };
15698
+ Insert: {
15699
+ created_at?: string;
15700
+ heartbeat_at?: string;
15701
+ job_name: string;
15702
+ last_error?: string | null;
15703
+ last_finished_at?: string | null;
15704
+ locked_at?: string;
15705
+ run_id?: string;
15706
+ updated_at?: string;
15707
+ };
15708
+ Update: {
15709
+ created_at?: string;
15710
+ heartbeat_at?: string;
15711
+ job_name?: string;
15712
+ last_error?: string | null;
15713
+ last_finished_at?: string | null;
15714
+ locked_at?: string;
15715
+ run_id?: string;
15716
+ updated_at?: string;
15717
+ };
15718
+ Relationships: [];
15719
+ };
15051
15720
  twinfield_customers: {
15052
15721
  Row: {
15053
15722
  address: string | null;
@@ -15302,6 +15971,8 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
15302
15971
  };
15303
15972
  twinfield_invoice_settings: {
15304
15973
  Row: {
15974
+ auto_invoice_enabled: boolean;
15975
+ auto_invoice_trigger_statuses: string[];
15305
15976
  created_at: string;
15306
15977
  debtor_gl_account: string;
15307
15978
  default_credit_invoice_type: string | null;
@@ -15322,6 +15993,8 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
15322
15993
  vat_code_export: string | null;
15323
15994
  };
15324
15995
  Insert: {
15996
+ auto_invoice_enabled?: boolean;
15997
+ auto_invoice_trigger_statuses?: string[];
15325
15998
  created_at?: string;
15326
15999
  debtor_gl_account?: string;
15327
16000
  default_credit_invoice_type?: string | null;
@@ -15342,6 +16015,8 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
15342
16015
  vat_code_export?: string | null;
15343
16016
  };
15344
16017
  Update: {
16018
+ auto_invoice_enabled?: boolean;
16019
+ auto_invoice_trigger_statuses?: string[];
15345
16020
  created_at?: string;
15346
16021
  debtor_gl_account?: string;
15347
16022
  default_credit_invoice_type?: string | null;
@@ -15642,6 +16317,7 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
15642
16317
  twinfield_push_queue: {
15643
16318
  Row: {
15644
16319
  action: string;
16320
+ attempt_started_at: string | null;
15645
16321
  attempts: number;
15646
16322
  connection_id: string | null;
15647
16323
  created_at: string;
@@ -15658,6 +16334,7 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
15658
16334
  };
15659
16335
  Insert: {
15660
16336
  action?: string;
16337
+ attempt_started_at?: string | null;
15661
16338
  attempts?: number;
15662
16339
  connection_id?: string | null;
15663
16340
  created_at?: string;
@@ -15674,6 +16351,7 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
15674
16351
  };
15675
16352
  Update: {
15676
16353
  action?: string;
16354
+ attempt_started_at?: string | null;
15677
16355
  attempts?: number;
15678
16356
  connection_id?: string | null;
15679
16357
  created_at?: string;
@@ -15871,13 +16549,7 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
15871
16549
  workday_end?: string | null;
15872
16550
  workday_start?: string | null;
15873
16551
  };
15874
- Relationships: [{
15875
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
15876
- columns: ["monteur_id"];
15877
- isOneToOne: true;
15878
- referencedRelation: "monteurs";
15879
- referencedColumns: ["id"];
15880
- }];
16552
+ Relationships: [];
15881
16553
  };
15882
16554
  uren_entries: {
15883
16555
  Row: {
@@ -15923,12 +16595,6 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
15923
16595
  werkbon_id?: string | null;
15924
16596
  };
15925
16597
  Relationships: [{
15926
- foreignKeyName: "uren_entries_monteur_id_fkey";
15927
- columns: ["monteur_id"];
15928
- isOneToOne: false;
15929
- referencedRelation: "monteurs";
15930
- referencedColumns: ["id"];
15931
- }, {
15932
16598
  foreignKeyName: "uren_entries_werkbon_id_fkey";
15933
16599
  columns: ["werkbon_id"];
15934
16600
  isOneToOne: false;
@@ -16396,13 +17062,37 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
16396
17062
  submitted_at?: string | null;
16397
17063
  updated_at?: string;
16398
17064
  };
16399
- Relationships: [{
16400
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
16401
- columns: ["monteur_id"];
16402
- isOneToOne: false;
16403
- referencedRelation: "monteurs";
16404
- referencedColumns: ["id"];
16405
- }];
17065
+ Relationships: [];
17066
+ };
17067
+ user_module_permissions: {
17068
+ Row: {
17069
+ created_at: string;
17070
+ feature_id: string;
17071
+ id: string;
17072
+ module_id: string;
17073
+ permission: string;
17074
+ updated_at: string;
17075
+ user_id: string;
17076
+ };
17077
+ Insert: {
17078
+ created_at?: string;
17079
+ feature_id?: string;
17080
+ id?: string;
17081
+ module_id: string;
17082
+ permission: string;
17083
+ updated_at?: string;
17084
+ user_id: string;
17085
+ };
17086
+ Update: {
17087
+ created_at?: string;
17088
+ feature_id?: string;
17089
+ id?: string;
17090
+ module_id?: string;
17091
+ permission?: string;
17092
+ updated_at?: string;
17093
+ user_id?: string;
17094
+ };
17095
+ Relationships: [];
16406
17096
  };
16407
17097
  user_roles: {
16408
17098
  Row: {
@@ -16431,6 +17121,51 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
16431
17121
  referencedColumns: ["id"];
16432
17122
  }];
16433
17123
  };
17124
+ van_inventories: {
17125
+ Row: {
17126
+ barcode: string | null;
17127
+ created_at: string;
17128
+ id: string;
17129
+ monteur_id: string | null;
17130
+ price_per_unit: number;
17131
+ product_name: string;
17132
+ quantity_current: number;
17133
+ quantity_min: number;
17134
+ unit: string;
17135
+ updated_at: string;
17136
+ };
17137
+ Insert: {
17138
+ barcode?: string | null;
17139
+ created_at?: string;
17140
+ id?: string;
17141
+ monteur_id?: string | null;
17142
+ price_per_unit?: number;
17143
+ product_name: string;
17144
+ quantity_current?: number;
17145
+ quantity_min?: number;
17146
+ unit?: string;
17147
+ updated_at?: string;
17148
+ };
17149
+ Update: {
17150
+ barcode?: string | null;
17151
+ created_at?: string;
17152
+ id?: string;
17153
+ monteur_id?: string | null;
17154
+ price_per_unit?: number;
17155
+ product_name?: string;
17156
+ quantity_current?: number;
17157
+ quantity_min?: number;
17158
+ unit?: string;
17159
+ updated_at?: string;
17160
+ };
17161
+ Relationships: [{
17162
+ foreignKeyName: "van_inventories_monteur_id_fkey";
17163
+ columns: ["monteur_id"];
17164
+ isOneToOne: false;
17165
+ referencedRelation: "profiles";
17166
+ referencedColumns: ["id"];
17167
+ }];
17168
+ };
16434
17169
  voorraad_custom_fields: {
16435
17170
  Row: {
16436
17171
  created_at: string;
@@ -17381,7 +18116,7 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
17381
18116
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
17382
18117
  columns: ["monteur_id"];
17383
18118
  isOneToOne: false;
17384
- referencedRelation: "monteurs";
18119
+ referencedRelation: "profiles";
17385
18120
  referencedColumns: ["id"];
17386
18121
  }, {
17387
18122
  foreignKeyName: "work_order_monteurs_work_order_id_fkey";
@@ -17391,6 +18126,60 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
17391
18126
  referencedColumns: ["id"];
17392
18127
  }];
17393
18128
  };
18129
+ work_order_photos: {
18130
+ Row: {
18131
+ ai_caption: string | null;
18132
+ ai_categorized_at: string | null;
18133
+ ai_labels: import("../integrations/supabase/types").Json | null;
18134
+ caption: string | null;
18135
+ created_at: string;
18136
+ id: string;
18137
+ monteur_id: string | null;
18138
+ photo_type: string;
18139
+ storage_path: string;
18140
+ updated_at: string;
18141
+ work_order_id: string;
18142
+ };
18143
+ Insert: {
18144
+ ai_caption?: string | null;
18145
+ ai_categorized_at?: string | null;
18146
+ ai_labels?: import("../integrations/supabase/types").Json | null;
18147
+ caption?: string | null;
18148
+ created_at?: string;
18149
+ id?: string;
18150
+ monteur_id?: string | null;
18151
+ photo_type?: string;
18152
+ storage_path: string;
18153
+ updated_at?: string;
18154
+ work_order_id: string;
18155
+ };
18156
+ Update: {
18157
+ ai_caption?: string | null;
18158
+ ai_categorized_at?: string | null;
18159
+ ai_labels?: import("../integrations/supabase/types").Json | null;
18160
+ caption?: string | null;
18161
+ created_at?: string;
18162
+ id?: string;
18163
+ monteur_id?: string | null;
18164
+ photo_type?: string;
18165
+ storage_path?: string;
18166
+ updated_at?: string;
18167
+ work_order_id?: string;
18168
+ };
18169
+ Relationships: [{
18170
+ foreignKeyName: "work_order_photos_monteur_id_fkey";
18171
+ columns: ["monteur_id"];
18172
+ isOneToOne: false;
18173
+ referencedRelation: "profiles";
18174
+ referencedColumns: ["id"];
18175
+ }, {
18176
+ foreignKeyName: "work_order_photos_work_order_id_fkey";
18177
+ columns: ["work_order_id"];
18178
+ isOneToOne: false;
18179
+ referencedRelation: "work_orders";
18180
+ referencedColumns: ["id"];
18181
+ }];
18182
+ };
17394
18183
  work_orders: {
17395
18184
  Row: {
17396
18185
  assigned_to: string | null;
@@ -17422,7 +18211,6 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
17422
18211
  scheduled_end_time: string | null;
17423
18212
  scheduled_start_time: string | null;
17424
18213
  status: string;
17425
- tenant_id: string;
17426
18214
  total_hours_worked: number | null;
17427
18215
  total_price: number | null;
17428
18216
  travel_time_minutes: number | null;
@@ -17460,7 +18248,6 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
17460
18248
  scheduled_end_time?: string | null;
17461
18249
  scheduled_start_time?: string | null;
17462
18250
  status?: string;
17463
- tenant_id: string;
17464
18251
  total_hours_worked?: number | null;
17465
18252
  total_price?: number | null;
17466
18253
  travel_time_minutes?: number | null;
@@ -17498,7 +18285,6 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
17498
18285
  scheduled_end_time?: string | null;
17499
18286
  scheduled_start_time?: string | null;
17500
18287
  status?: string;
17501
- tenant_id?: string;
17502
18288
  total_hours_worked?: number | null;
17503
18289
  total_price?: number | null;
17504
18290
  travel_time_minutes?: number | null;
@@ -17512,12 +18298,6 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
17512
18298
  isOneToOne: false;
17513
18299
  referencedRelation: "work_orders";
17514
18300
  referencedColumns: ["id"];
17515
- }, {
17516
- foreignKeyName: "work_orders_tenant_id_fkey";
17517
- columns: ["tenant_id"];
17518
- isOneToOne: false;
17519
- referencedRelation: "tenants";
17520
- referencedColumns: ["id"];
17521
18301
  }];
17522
18302
  };
17523
18303
  };
@@ -18202,6 +18982,19 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
18202
18982
  };
18203
18983
  Returns: undefined;
18204
18984
  };
18985
+ approve_mailbox_order_proposal: {
18986
+ Args: {
18987
+ p_custom_fields: import("../integrations/supabase/types").Json;
18988
+ p_customer_id: string;
18989
+ p_delivery_date: string;
18990
+ p_field_values?: import("../integrations/supabase/types").Json;
18991
+ p_lines: import("../integrations/supabase/types").Json;
18992
+ p_notes: string;
18993
+ p_proposal_id: string;
18994
+ p_reviewed_by: string;
18995
+ };
18996
+ Returns: import("../integrations/supabase/types").Json;
18997
+ };
18205
18998
  assign_cart_numbers: {
18206
18999
  Args: {
18207
19000
  p_carts: import("../integrations/supabase/types").Json;
@@ -18237,6 +19030,10 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
18237
19030
  processed_items: number;
18238
19031
  }[];
18239
19032
  };
19033
+ backfill_order_auto_invoice_queue: {
19034
+ Args: never;
19035
+ Returns: number;
19036
+ };
18240
19037
  calculate_layer_stock: {
18241
19038
  Args: {
18242
19039
  p_product_id: string;
@@ -18249,6 +19046,10 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
18249
19046
  };
18250
19047
  Returns: number;
18251
19048
  };
19049
+ can_manage_hours: {
19050
+ Args: never;
19051
+ Returns: boolean;
19052
+ };
18252
19053
  check_offer_product_available_stock: {
18253
19054
  Args: {
18254
19055
  p_campaign_product_id: string;
@@ -18438,6 +19239,7 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
18438
19239
  };
18439
19240
  Returns: {
18440
19241
  action: string;
19242
+ attempt_started_at: string | null;
18441
19243
  attempts: number;
18442
19244
  connection_id: string | null;
18443
19245
  created_at: string;
@@ -18467,6 +19269,10 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
18467
19269
  Args: never;
18468
19270
  Returns: undefined;
18469
19271
  };
19272
+ cleanup_voorraad_module_history: {
19273
+ Args: never;
19274
+ Returns: undefined;
19275
+ };
18470
19276
  complete_floriday_stock_queue: {
18471
19277
  Args: {
18472
19278
  p_attempt_id?: string;
@@ -18521,6 +19327,30 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
18521
19327
  agent_naam: string;
18522
19328
  }[];
18523
19329
  };
19330
+ consume_van_inventory: {
19331
+ Args: {
19332
+ p_inventory_id: string;
19333
+ p_quantity: number;
19334
+ };
19335
+ Returns: {
19336
+ barcode: string | null;
19337
+ created_at: string;
19338
+ id: string;
19339
+ monteur_id: string | null;
19340
+ price_per_unit: number;
19341
+ product_name: string;
19342
+ quantity_current: number;
19343
+ quantity_min: number;
19344
+ unit: string;
19345
+ updated_at: string;
19346
+ };
19347
+ SetofOptions: {
19348
+ from: "*";
19349
+ to: "van_inventories";
19350
+ isOneToOne: true;
19351
+ isSetofReturn: false;
19352
+ };
19353
+ };
18524
19354
  control_get_todays_carts: {
18525
19355
  Args: never;
18526
19356
  Returns: {
@@ -18588,6 +19418,20 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
18588
19418
  };
18589
19419
  Returns: import("../integrations/supabase/types").Json;
18590
19420
  };
19421
+ effective_module_permission: {
19422
+ Args: {
19423
+ _module_id: string;
19424
+ _user_id: string;
19425
+ };
19426
+ Returns: string;
19427
+ } | {
19428
+ Args: {
19429
+ _feature_id: string;
19430
+ _module_id: string;
19431
+ _user_id: string;
19432
+ };
19433
+ Returns: string;
19434
+ };
18591
19435
  email_auth_decrypt: {
18592
19436
  Args: {
18593
19437
  cipher: string;
@@ -18938,12 +19782,6 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
18938
19782
  Args: never;
18939
19783
  Returns: string;
18940
19784
  };
18941
- get_work_order_tenant_id: {
18942
- Args: {
18943
- wo_id: string;
18944
- };
18945
- Returns: string;
18946
- };
18947
19785
  has_module_permission: {
18948
19786
  Args: {
18949
19787
  _min: string;
@@ -18977,6 +19815,13 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
18977
19815
  };
18978
19816
  Returns: boolean;
18979
19817
  };
19818
+ is_time_log_week_locked: {
19819
+ Args: {
19820
+ p_employee_id: string;
19821
+ p_start_time: string;
19822
+ };
19823
+ Returns: boolean;
19824
+ };
18980
19825
  is_user_admin: {
18981
19826
  Args: never;
18982
19827
  Returns: boolean;
@@ -18991,13 +19836,14 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
18991
19836
  };
18992
19837
  Returns: boolean;
18993
19838
  };
18994
- list_monteurs: {
19839
+ list_medewerkers: {
18995
19840
  Args: never;
18996
19841
  Returns: {
18997
19842
  avatar_url: string;
18998
19843
  display_name: string;
18999
19844
  email: string;
19000
19845
  id: string;
19846
+ roles: string[];
19001
19847
  }[];
19002
19848
  };
19003
19849
  list_my_planning_items: {
@@ -19488,6 +20334,65 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
19488
20334
  };
19489
20335
  Returns: number;
19490
20336
  };
20337
+ logistics_plan_claim: {
20338
+ Args: {
20339
+ p_limit?: number;
20340
+ };
20341
+ Returns: {
20342
+ attempts: number;
20343
+ id: string;
20344
+ order_id: string;
20345
+ }[];
20346
+ };
20347
+ logistics_plan_enqueue: {
20348
+ Args: {
20349
+ p_order_id: string;
20350
+ p_reason?: string;
20351
+ };
20352
+ Returns: undefined;
20353
+ };
20354
+ logistics_plan_ensure_event: {
20355
+ Args: {
20356
+ p_order_id: string;
20357
+ };
20358
+ Returns: boolean;
20359
+ };
20360
+ logistics_plan_finish: {
20361
+ Args: {
20362
+ p_error?: string;
20363
+ p_id: string;
20364
+ };
20365
+ Returns: undefined;
20366
+ };
20367
+ logistics_plan_impact_orders: {
20368
+ Args: {
20369
+ p_order_id: string;
20370
+ };
20371
+ Returns: {
20372
+ buffer_id: string;
20373
+ order_id: string;
20374
+ plan_date: string;
20375
+ }[];
20376
+ };
20377
+ logistics_plan_kick: {
20378
+ Args: never;
20379
+ Returns: undefined;
20380
+ };
20381
+ logistics_plan_prune: {
20382
+ Args: never;
20383
+ Returns: number;
20384
+ };
20385
+ logistics_plan_release_stale: {
20386
+ Args: never;
20387
+ Returns: number;
20388
+ };
20389
+ logistics_plan_setting: {
20390
+ Args: {
20391
+ p_default: number;
20392
+ p_key: string;
20393
+ };
20394
+ Returns: number;
20395
+ };
19491
20396
  logistics_queue_capacity_email: {
19492
20397
  Args: {
19493
20398
  p_alert_id: string;
@@ -19726,6 +20631,14 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
19726
20631
  };
19727
20632
  Returns: undefined;
19728
20633
  };
20634
+ my_module_permissions: {
20635
+ Args: never;
20636
+ Returns: {
20637
+ feature_id: string;
20638
+ module_id: string;
20639
+ permission: string;
20640
+ }[];
20641
+ };
19729
20642
  next_manufacture_partij: {
19730
20643
  Args: {
19731
20644
  _tenant_id: string;
@@ -19776,6 +20689,13 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
19776
20689
  };
19777
20690
  Returns: boolean;
19778
20691
  };
20692
+ opruim_print_historie: {
20693
+ Args: never;
20694
+ Returns: {
20695
+ ontdaan: number;
20696
+ verwijderd: number;
20697
+ }[];
20698
+ };
19779
20699
  order_number_prefix: {
19780
20700
  Args: {
19781
20701
  p_custom_fields?: import("../integrations/supabase/types").Json;
@@ -20170,6 +21090,12 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
20170
21090
  };
20171
21091
  Returns: undefined;
20172
21092
  };
21093
+ reset_stalled_floriday_stock_queue: {
21094
+ Args: {
21095
+ p_include_failed?: boolean;
21096
+ };
21097
+ Returns: number;
21098
+ };
20173
21099
  resolve_group_allocation: {
20174
21100
  Args: {
20175
21101
  _needed: number;
@@ -20224,10 +21150,18 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
20224
21150
  Args: never;
20225
21151
  Returns: undefined;
20226
21152
  };
21153
+ run_floriday_stock_queue_process: {
21154
+ Args: never;
21155
+ Returns: undefined;
21156
+ };
20227
21157
  run_logistics_tasks_dispatch: {
20228
21158
  Args: never;
20229
21159
  Returns: undefined;
20230
21160
  };
21161
+ run_print_queue_ticks: {
21162
+ Args: never;
21163
+ Returns: number;
21164
+ };
20231
21165
  run_twinfield_queue_tick: {
20232
21166
  Args: never;
20233
21167
  Returns: undefined;
@@ -20581,6 +21515,16 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
20581
21515
  };
20582
21516
  Returns: string[];
20583
21517
  };
21518
+ switch_time_log: {
21519
+ Args: {
21520
+ p_employee_id: string;
21521
+ p_start_lat?: number;
21522
+ p_start_lng?: number;
21523
+ p_type: string;
21524
+ p_work_order_id?: string;
21525
+ };
21526
+ Returns: import("../integrations/supabase/types").Json;
21527
+ };
20584
21528
  sync_all_layer_stocks: {
20585
21529
  Args: never;
20586
21530
  Returns: undefined;
@@ -20615,6 +21559,15 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
20615
21559
  };
20616
21560
  Returns: undefined;
20617
21561
  };
21562
+ trade_item_stock_duplicates: {
21563
+ Args: never;
21564
+ Returns: {
21565
+ keys: string[];
21566
+ product_id: string;
21567
+ product_name: string;
21568
+ row_count: number;
21569
+ }[];
21570
+ };
20618
21571
  try_debtor_lock: {
20619
21572
  Args: {
20620
21573
  _group_key: string;
@@ -20622,6 +21575,24 @@ export declare const recalculateLogistics: import("@tanstack/start-client-core")
20622
21575
  };
20623
21576
  Returns: boolean;
20624
21577
  };
21578
+ twinfield_cron_lock_acquire: {
21579
+ Args: {
21580
+ _job_name: string;
21581
+ _stale_seconds?: number;
21582
+ };
21583
+ Returns: boolean;
21584
+ };
21585
+ twinfield_cron_lock_release: {
21586
+ Args: {
21587
+ _error?: string;
21588
+ _job_name: string;
21589
+ };
21590
+ Returns: undefined;
21591
+ };
21592
+ twinfield_prune_push_queue: {
21593
+ Args: never;
21594
+ Returns: number;
21595
+ };
20625
21596
  twinfield_register_cron: {
20626
21597
  Args: {
20627
21598
  apikey?: string;