@flowselections/floriday-afhandeling-module 1.0.30 → 1.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist-lib/components/afhandeling/ControlePage.d.ts.map +1 -1
  2. package/dist-lib/components/afhandeling/ControlePage.js +23 -10
  3. package/dist-lib/components/afhandeling/LeveringenPage.d.ts.map +1 -1
  4. package/dist-lib/components/afhandeling/LeveringenPage.js +7 -24
  5. package/dist-lib/components/afhandeling/PickAgendaView.d.ts.map +1 -1
  6. package/dist-lib/components/afhandeling/PickAgendaView.js +22 -24
  7. package/dist-lib/components/afhandeling/VervoerdersPage.d.ts +8 -1
  8. package/dist-lib/components/afhandeling/VervoerdersPage.d.ts.map +1 -1
  9. package/dist-lib/components/afhandeling/VervoerdersPage.js +17 -2
  10. package/dist-lib/components/afhandeling/WeekAgendaView.d.ts +5 -1
  11. package/dist-lib/components/afhandeling/WeekAgendaView.d.ts.map +1 -1
  12. package/dist-lib/components/afhandeling/WeekAgendaView.js +19 -29
  13. package/dist-lib/hooks/useEngineTasks.d.ts +2 -0
  14. package/dist-lib/hooks/useEngineTasks.d.ts.map +1 -1
  15. package/dist-lib/hooks/useEngineTasks.js +19 -4
  16. package/dist-lib/hooks/useOrderPlanning.d.ts +12 -1
  17. package/dist-lib/hooks/useOrderPlanning.d.ts.map +1 -1
  18. package/dist-lib/hooks/useOrderPlanning.js +65 -26
  19. package/dist-lib/integrations/supabase/auth-middleware.d.ts +1351 -164
  20. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  21. package/dist-lib/integrations/supabase/client.d.ts +1351 -164
  22. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  23. package/dist-lib/integrations/supabase/client.server.d.ts +1351 -164
  24. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  25. package/dist-lib/integrations/supabase/types.d.ts +1360 -168
  26. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  27. package/dist-lib/integrations/supabase/types.js +12 -1
  28. package/dist-lib/lib/afhandelingSettings.functions.d.ts +2614 -240
  29. package/dist-lib/lib/afhandelingSettings.functions.d.ts.map +1 -1
  30. package/dist-lib/lib/agendaRange.d.ts +13 -0
  31. package/dist-lib/lib/agendaRange.d.ts.map +1 -0
  32. package/dist-lib/lib/agendaRange.js +25 -0
  33. package/dist-lib/lib/carriers.functions.d.ts +6535 -600
  34. package/dist-lib/lib/carriers.functions.d.ts.map +1 -1
  35. package/dist-lib/lib/cartAssignments.functions.d.ts +6535 -600
  36. package/dist-lib/lib/cartAssignments.functions.d.ts.map +1 -1
  37. package/dist-lib/lib/cartControl.functions.d.ts +13070 -1200
  38. package/dist-lib/lib/cartControl.functions.d.ts.map +1 -1
  39. package/dist-lib/lib/floriday.functions.d.ts +1367 -166
  40. package/dist-lib/lib/floriday.functions.d.ts.map +1 -1
  41. package/dist-lib/lib/floriday.functions.js +86 -20
  42. package/dist-lib/lib/logisticsEngine/engine.d.ts +16 -3
  43. package/dist-lib/lib/logisticsEngine/engine.d.ts.map +1 -1
  44. package/dist-lib/lib/logisticsEngine/engine.js +13 -6
  45. package/package.json +2 -8
@@ -889,6 +889,126 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
889
889
  };
890
890
  Relationships: [];
891
891
  };
892
+ cao_holidays: {
893
+ Row: {
894
+ created_at: string;
895
+ description: string | null;
896
+ holiday_date: string;
897
+ id: string;
898
+ updated_at: string;
899
+ };
900
+ Insert: {
901
+ created_at?: string;
902
+ description?: string | null;
903
+ holiday_date: string;
904
+ id?: string;
905
+ updated_at?: string;
906
+ };
907
+ Update: {
908
+ created_at?: string;
909
+ description?: string | null;
910
+ holiday_date?: string;
911
+ id?: string;
912
+ updated_at?: string;
913
+ };
914
+ Relationships: [];
915
+ };
916
+ cao_settings: {
917
+ Row: {
918
+ auto_break_after_hours: number;
919
+ auto_break_minutes: number;
920
+ auto_break_unpaid: boolean;
921
+ auto_stop_after_hours: number;
922
+ callout_fee: number;
923
+ created_at: string;
924
+ daily_regular_hours: number;
925
+ default_hourly_rate: number;
926
+ id: string;
927
+ materials_markup_percent: number;
928
+ max_daily_hours: number;
929
+ max_weekly_hours: number;
930
+ meal_allowance_amount: number;
931
+ overtime_pct_178: number;
932
+ overtime_pct_189: number;
933
+ overtime_pct_212: number;
934
+ reminder_after_hours: number;
935
+ standby_evening_amount: number;
936
+ standby_weekend_amount: number;
937
+ travel_cost_per_km: number | null;
938
+ travel_cost_threshold_km: number | null;
939
+ travel_counts_as_work: boolean;
940
+ travel_hourly_rate: number;
941
+ travel_rate_per_hour: number;
942
+ travel_threshold_minutes: number;
943
+ updated_at: string;
944
+ weekend_always_212: boolean;
945
+ window_end: string;
946
+ window_start: string;
947
+ };
948
+ Insert: {
949
+ auto_break_after_hours?: number;
950
+ auto_break_minutes?: number;
951
+ auto_break_unpaid?: boolean;
952
+ auto_stop_after_hours?: number;
953
+ callout_fee?: number;
954
+ created_at?: string;
955
+ daily_regular_hours?: number;
956
+ default_hourly_rate?: number;
957
+ id?: string;
958
+ materials_markup_percent?: number;
959
+ max_daily_hours?: number;
960
+ max_weekly_hours?: number;
961
+ meal_allowance_amount?: number;
962
+ overtime_pct_178?: number;
963
+ overtime_pct_189?: number;
964
+ overtime_pct_212?: number;
965
+ reminder_after_hours?: number;
966
+ standby_evening_amount?: number;
967
+ standby_weekend_amount?: number;
968
+ travel_cost_per_km?: number | null;
969
+ travel_cost_threshold_km?: number | null;
970
+ travel_counts_as_work?: boolean;
971
+ travel_hourly_rate?: number;
972
+ travel_rate_per_hour?: number;
973
+ travel_threshold_minutes?: number;
974
+ updated_at?: string;
975
+ weekend_always_212?: boolean;
976
+ window_end?: string;
977
+ window_start?: string;
978
+ };
979
+ Update: {
980
+ auto_break_after_hours?: number;
981
+ auto_break_minutes?: number;
982
+ auto_break_unpaid?: boolean;
983
+ auto_stop_after_hours?: number;
984
+ callout_fee?: number;
985
+ created_at?: string;
986
+ daily_regular_hours?: number;
987
+ default_hourly_rate?: number;
988
+ id?: string;
989
+ materials_markup_percent?: number;
990
+ max_daily_hours?: number;
991
+ max_weekly_hours?: number;
992
+ meal_allowance_amount?: number;
993
+ overtime_pct_178?: number;
994
+ overtime_pct_189?: number;
995
+ overtime_pct_212?: number;
996
+ reminder_after_hours?: number;
997
+ standby_evening_amount?: number;
998
+ standby_weekend_amount?: number;
999
+ travel_cost_per_km?: number | null;
1000
+ travel_cost_threshold_km?: number | null;
1001
+ travel_counts_as_work?: boolean;
1002
+ travel_hourly_rate?: number;
1003
+ travel_rate_per_hour?: number;
1004
+ travel_threshold_minutes?: number;
1005
+ updated_at?: string;
1006
+ weekend_always_212?: boolean;
1007
+ window_end?: string;
1008
+ window_start?: string;
1009
+ };
1010
+ Relationships: [];
1011
+ };
892
1012
  carrier_shipping_rates: {
893
1013
  Row: {
894
1014
  carrier_id: string;
@@ -1701,7 +1821,7 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
1701
1821
  city: string | null;
1702
1822
  country: string | null;
1703
1823
  created_at: string;
1704
- customer_id: string | null;
1824
+ customer_id: string;
1705
1825
  external_key: string | null;
1706
1826
  external_provider: string | null;
1707
1827
  floriday_location_id: string | null;
@@ -1725,7 +1845,7 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
1725
1845
  city?: string | null;
1726
1846
  country?: string | null;
1727
1847
  created_at?: string;
1728
- customer_id?: string | null;
1848
+ customer_id: string;
1729
1849
  external_key?: string | null;
1730
1850
  external_provider?: string | null;
1731
1851
  floriday_location_id?: string | null;
@@ -1749,7 +1869,7 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
1749
1869
  city?: string | null;
1750
1870
  country?: string | null;
1751
1871
  created_at?: string;
1752
- customer_id?: string | null;
1872
+ customer_id?: string;
1753
1873
  external_key?: string | null;
1754
1874
  external_provider?: string | null;
1755
1875
  floriday_location_id?: string | null;
@@ -6497,6 +6617,7 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
6497
6617
  Row: {
6498
6618
  buyer_organization_id: string | null;
6499
6619
  connection_id: string;
6620
+ controlled_at: string | null;
6500
6621
  created_at: string;
6501
6622
  data: import("../integrations/supabase/types").Json;
6502
6623
  floriday_id: string;
@@ -6508,6 +6629,7 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
6508
6629
  Insert: {
6509
6630
  buyer_organization_id?: string | null;
6510
6631
  connection_id: string;
6632
+ controlled_at?: string | null;
6511
6633
  created_at?: string;
6512
6634
  data: import("../integrations/supabase/types").Json;
6513
6635
  floriday_id: string;
@@ -6519,6 +6641,7 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
6519
6641
  Update: {
6520
6642
  buyer_organization_id?: string | null;
6521
6643
  connection_id?: string;
6644
+ controlled_at?: string | null;
6522
6645
  created_at?: string;
6523
6646
  data?: import("../integrations/supabase/types").Json;
6524
6647
  floriday_id?: string;
@@ -7420,6 +7543,54 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
7420
7543
  };
7421
7544
  Relationships: [];
7422
7545
  };
7546
+ invoice_timing_settings: {
7547
+ Row: {
7548
+ anchor: string;
7549
+ business_days_only: boolean;
7550
+ created_at: string;
7551
+ enabled: boolean;
7552
+ id: string;
7553
+ offset_days: number;
7554
+ pickup_anchor: string;
7555
+ pickup_business_days_only: boolean;
7556
+ pickup_offset_days: number;
7557
+ pickup_time_of_day: string;
7558
+ singleton: boolean;
7559
+ time_of_day: string;
7560
+ updated_at: string;
7561
+ };
7562
+ Insert: {
7563
+ anchor?: string;
7564
+ business_days_only?: boolean;
7565
+ created_at?: string;
7566
+ enabled?: boolean;
7567
+ id?: string;
7568
+ offset_days?: number;
7569
+ pickup_anchor?: string;
7570
+ pickup_business_days_only?: boolean;
7571
+ pickup_offset_days?: number;
7572
+ pickup_time_of_day?: string;
7573
+ singleton?: boolean;
7574
+ time_of_day?: string;
7575
+ updated_at?: string;
7576
+ };
7577
+ Update: {
7578
+ anchor?: string;
7579
+ business_days_only?: boolean;
7580
+ created_at?: string;
7581
+ enabled?: boolean;
7582
+ id?: string;
7583
+ offset_days?: number;
7584
+ pickup_anchor?: string;
7585
+ pickup_business_days_only?: boolean;
7586
+ pickup_offset_days?: number;
7587
+ pickup_time_of_day?: string;
7588
+ singleton?: boolean;
7589
+ time_of_day?: string;
7590
+ updated_at?: string;
7591
+ };
7592
+ Relationships: [];
7593
+ };
7423
7594
  itk_contact_persons: {
7424
7595
  Row: {
7425
7596
  created_at: string;
@@ -7732,7 +7903,6 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
7732
7903
  start_date: string;
7733
7904
  start_time: string | null;
7734
7905
  status: string;
7735
- tenant_id: string;
7736
7906
  updated_at: string;
7737
7907
  user_id: string;
7738
7908
  };
@@ -7750,7 +7920,6 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
7750
7920
  start_date: string;
7751
7921
  start_time?: string | null;
7752
7922
  status?: string;
7753
- tenant_id?: string;
7754
7923
  updated_at?: string;
7755
7924
  user_id: string;
7756
7925
  };
@@ -7768,7 +7937,6 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
7768
7937
  start_date?: string;
7769
7938
  start_time?: string | null;
7770
7939
  status?: string;
7771
- tenant_id?: string;
7772
7940
  updated_at?: string;
7773
7941
  user_id?: string;
7774
7942
  };
@@ -7776,13 +7944,13 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
7776
7944
  foreignKeyName: "leave_requests_monteur_id_fkey";
7777
7945
  columns: ["monteur_id"];
7778
7946
  isOneToOne: false;
7779
- referencedRelation: "monteurs";
7947
+ referencedRelation: "profiles";
7780
7948
  referencedColumns: ["id"];
7781
7949
  }, {
7782
7950
  foreignKeyName: "leave_requests_user_id_fkey";
7783
7951
  columns: ["user_id"];
7784
7952
  isOneToOne: false;
7785
- referencedRelation: "monteurs";
7953
+ referencedRelation: "profiles";
7786
7954
  referencedColumns: ["id"];
7787
7955
  }];
7788
7956
  };
@@ -8509,6 +8677,69 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
8509
8677
  };
8510
8678
  Relationships: [];
8511
8679
  };
8680
+ logistics_floriday_pushes: {
8681
+ Row: {
8682
+ attempts: number;
8683
+ created_at: string;
8684
+ first_queued_at: string;
8685
+ fulfillment_order_id: string | null;
8686
+ id: string;
8687
+ last_error: string | null;
8688
+ last_error_at: string | null;
8689
+ last_sent_hash: string | null;
8690
+ locked_by: string | null;
8691
+ locked_until: string | null;
8692
+ next_attempt_at: string;
8693
+ order_ref: string;
8694
+ payload: import("../integrations/supabase/types").Json;
8695
+ payload_hash: string | null;
8696
+ revision: number;
8697
+ sent_at: string | null;
8698
+ status: string;
8699
+ updated_at: string;
8700
+ };
8701
+ Insert: {
8702
+ attempts?: number;
8703
+ created_at?: string;
8704
+ first_queued_at?: string;
8705
+ fulfillment_order_id?: string | null;
8706
+ id?: string;
8707
+ last_error?: string | null;
8708
+ last_error_at?: string | null;
8709
+ last_sent_hash?: string | null;
8710
+ locked_by?: string | null;
8711
+ locked_until?: string | null;
8712
+ next_attempt_at?: string;
8713
+ order_ref: string;
8714
+ payload?: import("../integrations/supabase/types").Json;
8715
+ payload_hash?: string | null;
8716
+ revision?: number;
8717
+ sent_at?: string | null;
8718
+ status?: string;
8719
+ updated_at?: string;
8720
+ };
8721
+ Update: {
8722
+ attempts?: number;
8723
+ created_at?: string;
8724
+ first_queued_at?: string;
8725
+ fulfillment_order_id?: string | null;
8726
+ id?: string;
8727
+ last_error?: string | null;
8728
+ last_error_at?: string | null;
8729
+ last_sent_hash?: string | null;
8730
+ locked_by?: string | null;
8731
+ locked_until?: string | null;
8732
+ next_attempt_at?: string;
8733
+ order_ref?: string;
8734
+ payload?: import("../integrations/supabase/types").Json;
8735
+ payload_hash?: string | null;
8736
+ revision?: number;
8737
+ sent_at?: string | null;
8738
+ status?: string;
8739
+ updated_at?: string;
8740
+ };
8741
+ Relationships: [];
8742
+ };
8512
8743
  logistics_formulas: {
8513
8744
  Row: {
8514
8745
  created_at: string;
@@ -8587,6 +8818,45 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
8587
8818
  };
8588
8819
  Relationships: [];
8589
8820
  };
8821
+ logistics_plan_queue: {
8822
+ Row: {
8823
+ attempts: number;
8824
+ claimed_at: string | null;
8825
+ enqueued_at: string;
8826
+ error: string | null;
8827
+ id: string;
8828
+ next_attempt_at: string;
8829
+ order_id: string;
8830
+ reason: string;
8831
+ status: string;
8832
+ updated_at: string;
8833
+ };
8834
+ Insert: {
8835
+ attempts?: number;
8836
+ claimed_at?: string | null;
8837
+ enqueued_at?: string;
8838
+ error?: string | null;
8839
+ id?: string;
8840
+ next_attempt_at?: string;
8841
+ order_id: string;
8842
+ reason?: string;
8843
+ status?: string;
8844
+ updated_at?: string;
8845
+ };
8846
+ Update: {
8847
+ attempts?: number;
8848
+ claimed_at?: string | null;
8849
+ enqueued_at?: string;
8850
+ error?: string | null;
8851
+ id?: string;
8852
+ next_attempt_at?: string;
8853
+ order_id?: string;
8854
+ reason?: string;
8855
+ status?: string;
8856
+ updated_at?: string;
8857
+ };
8858
+ Relationships: [];
8859
+ };
8590
8860
  logistics_plan_runs: {
8591
8861
  Row: {
8592
8862
  created_at: string;
@@ -8662,6 +8932,24 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
8662
8932
  referencedColumns: ["id"];
8663
8933
  }];
8664
8934
  };
8935
+ logistics_plan_settings: {
8936
+ Row: {
8937
+ key: string;
8938
+ updated_at: string;
8939
+ value: string;
8940
+ };
8941
+ Insert: {
8942
+ key: string;
8943
+ updated_at?: string;
8944
+ value: string;
8945
+ };
8946
+ Update: {
8947
+ key?: string;
8948
+ updated_at?: string;
8949
+ value?: string;
8950
+ };
8951
+ Relationships: [];
8952
+ };
8665
8953
  logistics_rebuffer_state: {
8666
8954
  Row: {
8667
8955
  created_at: string;
@@ -9372,14 +9660,17 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
9372
9660
  };
9373
9661
  mailbox_messages: {
9374
9662
  Row: {
9663
+ attachments: import("../integrations/supabase/types").Json;
9375
9664
  body_html: string | null;
9376
9665
  body_text: string | null;
9666
+ cc_recipients: import("../integrations/supabase/types").Json;
9377
9667
  connection_id: string | null;
9378
9668
  created_at: string;
9379
9669
  error_message: string | null;
9380
9670
  external_id: string | null;
9381
9671
  from_email: string | null;
9382
9672
  from_name: string | null;
9673
+ has_attachments: boolean;
9383
9674
  id: string;
9384
9675
  message_id: string | null;
9385
9676
  profile_id: string | null;
@@ -9387,18 +9678,22 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
9387
9678
  received_at: string | null;
9388
9679
  status: string;
9389
9680
  subject: string | null;
9681
+ to_recipients: import("../integrations/supabase/types").Json;
9390
9682
  uid: number | null;
9391
9683
  updated_at: string;
9392
9684
  };
9393
9685
  Insert: {
9686
+ attachments?: import("../integrations/supabase/types").Json;
9394
9687
  body_html?: string | null;
9395
9688
  body_text?: string | null;
9689
+ cc_recipients?: import("../integrations/supabase/types").Json;
9396
9690
  connection_id?: string | null;
9397
9691
  created_at?: string;
9398
9692
  error_message?: string | null;
9399
9693
  external_id?: string | null;
9400
9694
  from_email?: string | null;
9401
9695
  from_name?: string | null;
9696
+ has_attachments?: boolean;
9402
9697
  id?: string;
9403
9698
  message_id?: string | null;
9404
9699
  profile_id?: string | null;
@@ -9406,18 +9701,22 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
9406
9701
  received_at?: string | null;
9407
9702
  status?: string;
9408
9703
  subject?: string | null;
9704
+ to_recipients?: import("../integrations/supabase/types").Json;
9409
9705
  uid?: number | null;
9410
9706
  updated_at?: string;
9411
9707
  };
9412
9708
  Update: {
9709
+ attachments?: import("../integrations/supabase/types").Json;
9413
9710
  body_html?: string | null;
9414
9711
  body_text?: string | null;
9712
+ cc_recipients?: import("../integrations/supabase/types").Json;
9415
9713
  connection_id?: string | null;
9416
9714
  created_at?: string;
9417
9715
  error_message?: string | null;
9418
9716
  external_id?: string | null;
9419
9717
  from_email?: string | null;
9420
9718
  from_name?: string | null;
9719
+ has_attachments?: boolean;
9421
9720
  id?: string;
9422
9721
  message_id?: string | null;
9423
9722
  profile_id?: string | null;
@@ -9425,6 +9724,7 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
9425
9724
  received_at?: string | null;
9426
9725
  status?: string;
9427
9726
  subject?: string | null;
9727
+ to_recipients?: import("../integrations/supabase/types").Json;
9428
9728
  uid?: number | null;
9429
9729
  updated_at?: string;
9430
9730
  };
@@ -9805,6 +10105,90 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
9805
10105
  };
9806
10106
  Relationships: [];
9807
10107
  };
10108
+ material_usage: {
10109
+ Row: {
10110
+ created_at: string;
10111
+ id: string;
10112
+ material_name: string;
10113
+ monteur_id: string | null;
10114
+ price_at_time: number;
10115
+ quantity_used: number;
10116
+ updated_at: string;
10117
+ van_inventory_id: string | null;
10118
+ work_order_id: string;
10119
+ };
10120
+ Insert: {
10121
+ created_at?: string;
10122
+ id?: string;
10123
+ material_name: string;
10124
+ monteur_id?: string | null;
10125
+ price_at_time?: number;
10126
+ quantity_used?: number;
10127
+ updated_at?: string;
10128
+ van_inventory_id?: string | null;
10129
+ work_order_id: string;
10130
+ };
10131
+ Update: {
10132
+ created_at?: string;
10133
+ id?: string;
10134
+ material_name?: string;
10135
+ monteur_id?: string | null;
10136
+ price_at_time?: number;
10137
+ quantity_used?: number;
10138
+ updated_at?: string;
10139
+ van_inventory_id?: string | null;
10140
+ work_order_id?: string;
10141
+ };
10142
+ Relationships: [{
10143
+ foreignKeyName: "material_usage_monteur_id_fkey";
10144
+ columns: ["monteur_id"];
10145
+ isOneToOne: false;
10146
+ referencedRelation: "profiles";
10147
+ referencedColumns: ["id"];
10148
+ }, {
10149
+ foreignKeyName: "material_usage_van_inventory_id_fkey";
10150
+ columns: ["van_inventory_id"];
10151
+ isOneToOne: false;
10152
+ referencedRelation: "van_inventories";
10153
+ referencedColumns: ["id"];
10154
+ }, {
10155
+ foreignKeyName: "material_usage_work_order_id_fkey";
10156
+ columns: ["work_order_id"];
10157
+ isOneToOne: false;
10158
+ referencedRelation: "work_orders";
10159
+ referencedColumns: ["id"];
10160
+ }];
10161
+ };
10162
+ module_features: {
10163
+ Row: {
10164
+ created_at: string;
10165
+ feature_id: string;
10166
+ id: string;
10167
+ is_active: boolean;
10168
+ last_seen_at: string;
10169
+ module_id: string;
10170
+ name: string;
10171
+ };
10172
+ Insert: {
10173
+ created_at?: string;
10174
+ feature_id: string;
10175
+ id?: string;
10176
+ is_active?: boolean;
10177
+ last_seen_at?: string;
10178
+ module_id: string;
10179
+ name: string;
10180
+ };
10181
+ Update: {
10182
+ created_at?: string;
10183
+ feature_id?: string;
10184
+ id?: string;
10185
+ is_active?: boolean;
10186
+ last_seen_at?: string;
10187
+ module_id?: string;
10188
+ name?: string;
10189
+ };
10190
+ Relationships: [];
10191
+ };
9808
10192
  module_permissions: {
9809
10193
  Row: {
9810
10194
  created_at: string;
@@ -9832,6 +10216,36 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
9832
10216
  };
9833
10217
  Relationships: [];
9834
10218
  };
10219
+ module_registry: {
10220
+ Row: {
10221
+ created_at: string;
10222
+ is_active: boolean;
10223
+ last_seen_at: string;
10224
+ module_id: string;
10225
+ name: string;
10226
+ shell_id: string | null;
10227
+ sort_order: number | null;
10228
+ };
10229
+ Insert: {
10230
+ created_at?: string;
10231
+ is_active?: boolean;
10232
+ last_seen_at?: string;
10233
+ module_id: string;
10234
+ name: string;
10235
+ shell_id?: string | null;
10236
+ sort_order?: number | null;
10237
+ };
10238
+ Update: {
10239
+ created_at?: string;
10240
+ is_active?: boolean;
10241
+ last_seen_at?: string;
10242
+ module_id?: string;
10243
+ name?: string;
10244
+ shell_id?: string | null;
10245
+ sort_order?: number | null;
10246
+ };
10247
+ Relationships: [];
10248
+ };
9835
10249
  module_runtime_config: {
9836
10250
  Row: {
9837
10251
  key: string;
@@ -9883,63 +10297,6 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
9883
10297
  };
9884
10298
  Relationships: [];
9885
10299
  };
9886
- monteurs: {
9887
- Row: {
9888
- avatar_url: string | null;
9889
- color: string | null;
9890
- created_at: string;
9891
- email: string | null;
9892
- id: string;
9893
- is_active: boolean;
9894
- leave_balance_hours: number;
9895
- name: string;
9896
- persnr: number | null;
9897
- phone: string | null;
9898
- role: string;
9899
- tenant_id: string;
9900
- updated_at: string;
9901
- user_id: string | null;
9902
- };
9903
- Insert: {
9904
- avatar_url?: string | null;
9905
- color?: string | null;
9906
- created_at?: string;
9907
- email?: string | null;
9908
- id?: string;
9909
- is_active?: boolean;
9910
- leave_balance_hours?: number;
9911
- name: string;
9912
- persnr?: number | null;
9913
- phone?: string | null;
9914
- role?: string;
9915
- tenant_id: string;
9916
- updated_at?: string;
9917
- user_id?: string | null;
9918
- };
9919
- Update: {
9920
- avatar_url?: string | null;
9921
- color?: string | null;
9922
- created_at?: string;
9923
- email?: string | null;
9924
- id?: string;
9925
- is_active?: boolean;
9926
- leave_balance_hours?: number;
9927
- name?: string;
9928
- persnr?: number | null;
9929
- phone?: string | null;
9930
- role?: string;
9931
- tenant_id?: string;
9932
- updated_at?: string;
9933
- user_id?: string | null;
9934
- };
9935
- Relationships: [{
9936
- foreignKeyName: "monteurs_tenant_id_fkey";
9937
- columns: ["tenant_id"];
9938
- isOneToOne: false;
9939
- referencedRelation: "tenants";
9940
- referencedColumns: ["id"];
9941
- }];
9942
- };
9943
10300
  nmbrs_component_mapping: {
9944
10301
  Row: {
9945
10302
  created_at: string;
@@ -10010,13 +10367,7 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
10010
10367
  nmbrs_employee_number?: string;
10011
10368
  updated_at?: string;
10012
10369
  };
10013
- Relationships: [{
10014
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
10015
- columns: ["monteur_id"];
10016
- isOneToOne: true;
10017
- referencedRelation: "monteurs";
10018
- referencedColumns: ["id"];
10019
- }];
10370
+ Relationships: [];
10020
10371
  };
10021
10372
  nmbrs_export_lines: {
10022
10373
  Row: {
@@ -10065,12 +10416,6 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
10065
10416
  wage_code?: string;
10066
10417
  };
10067
10418
  Relationships: [{
10068
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
10069
- columns: ["monteur_id"];
10070
- isOneToOne: false;
10071
- referencedRelation: "monteurs";
10072
- referencedColumns: ["id"];
10073
- }, {
10074
10419
  foreignKeyName: "nmbrs_export_lines_run_id_fkey";
10075
10420
  columns: ["run_id"];
10076
10421
  isOneToOne: false;
@@ -10891,6 +11236,45 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
10891
11236
  };
10892
11237
  Relationships: [];
10893
11238
  };
11239
+ order_invoice_links: {
11240
+ Row: {
11241
+ attempts: number;
11242
+ created_at: string;
11243
+ error_message: string | null;
11244
+ id: string;
11245
+ invoice_number: string | null;
11246
+ next_attempt_at: string;
11247
+ order_id: string;
11248
+ processed_at: string | null;
11249
+ status: string;
11250
+ updated_at: string;
11251
+ };
11252
+ Insert: {
11253
+ attempts?: number;
11254
+ created_at?: string;
11255
+ error_message?: string | null;
11256
+ id?: string;
11257
+ invoice_number?: string | null;
11258
+ next_attempt_at?: string;
11259
+ order_id: string;
11260
+ processed_at?: string | null;
11261
+ status?: string;
11262
+ updated_at?: string;
11263
+ };
11264
+ Update: {
11265
+ attempts?: number;
11266
+ created_at?: string;
11267
+ error_message?: string | null;
11268
+ id?: string;
11269
+ invoice_number?: string | null;
11270
+ next_attempt_at?: string;
11271
+ order_id?: string;
11272
+ processed_at?: string | null;
11273
+ status?: string;
11274
+ updated_at?: string;
11275
+ };
11276
+ Relationships: [];
11277
+ };
10894
11278
  order_items: {
10895
11279
  Row: {
10896
11280
  crates_per_layer: number | null;
@@ -11073,6 +11457,7 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
11073
11457
  delivery_date: string | null;
11074
11458
  floriday_sales_order_id: string | null;
11075
11459
  id: string;
11460
+ invoice_due_at: string | null;
11076
11461
  is_reservation: boolean;
11077
11462
  notes: string | null;
11078
11463
  order_date: string;
@@ -11094,6 +11479,7 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
11094
11479
  delivery_date?: string | null;
11095
11480
  floriday_sales_order_id?: string | null;
11096
11481
  id?: string;
11482
+ invoice_due_at?: string | null;
11097
11483
  is_reservation?: boolean;
11098
11484
  notes?: string | null;
11099
11485
  order_date?: string;
@@ -11115,6 +11501,7 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
11115
11501
  delivery_date?: string | null;
11116
11502
  floriday_sales_order_id?: string | null;
11117
11503
  id?: string;
11504
+ invoice_due_at?: string | null;
11118
11505
  is_reservation?: boolean;
11119
11506
  notes?: string | null;
11120
11507
  order_date?: string;
@@ -12311,22 +12698,27 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
12311
12698
  created_at: string;
12312
12699
  documentnaam: string;
12313
12700
  documenttype: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"];
12701
+ extern_job_id: string | null;
12314
12702
  foutmelding: string | null;
12315
12703
  gebruiker_id: string | null;
12316
12704
  gebruiker_naam: string;
12317
12705
  gestart_op: string | null;
12318
12706
  id: string;
12707
+ idempotentie_sleutel: string | null;
12319
12708
  is_herprint: boolean;
12320
12709
  kopieen: number;
12321
12710
  layout_id: string | null;
12322
12711
  opgepakt_op: string | null;
12323
12712
  paginas: number;
12324
12713
  payload: import("../integrations/supabase/types").Json;
12714
+ pdf_base64: string | null;
12715
+ pdf_url: string | null;
12325
12716
  pogingen: number;
12326
12717
  printer_id: string | null;
12327
12718
  render_html: string | null;
12328
12719
  status: import("../integrations/supabase/types").Database["public"]["Enums"]["print_job_status"];
12329
12720
  updated_at: string;
12721
+ volgende_poging: string | null;
12330
12722
  voltooid_op: string | null;
12331
12723
  };
12332
12724
  Insert: {
@@ -12335,22 +12727,27 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
12335
12727
  created_at?: string;
12336
12728
  documentnaam?: string;
12337
12729
  documenttype?: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"];
12730
+ extern_job_id?: string | null;
12338
12731
  foutmelding?: string | null;
12339
12732
  gebruiker_id?: string | null;
12340
12733
  gebruiker_naam?: string;
12341
12734
  gestart_op?: string | null;
12342
12735
  id?: string;
12736
+ idempotentie_sleutel?: string | null;
12343
12737
  is_herprint?: boolean;
12344
12738
  kopieen?: number;
12345
12739
  layout_id?: string | null;
12346
12740
  opgepakt_op?: string | null;
12347
12741
  paginas?: number;
12348
12742
  payload?: import("../integrations/supabase/types").Json;
12743
+ pdf_base64?: string | null;
12744
+ pdf_url?: string | null;
12349
12745
  pogingen?: number;
12350
12746
  printer_id?: string | null;
12351
12747
  render_html?: string | null;
12352
12748
  status?: import("../integrations/supabase/types").Database["public"]["Enums"]["print_job_status"];
12353
12749
  updated_at?: string;
12750
+ volgende_poging?: string | null;
12354
12751
  voltooid_op?: string | null;
12355
12752
  };
12356
12753
  Update: {
@@ -12359,22 +12756,27 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
12359
12756
  created_at?: string;
12360
12757
  documentnaam?: string;
12361
12758
  documenttype?: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"];
12759
+ extern_job_id?: string | null;
12362
12760
  foutmelding?: string | null;
12363
12761
  gebruiker_id?: string | null;
12364
12762
  gebruiker_naam?: string;
12365
12763
  gestart_op?: string | null;
12366
12764
  id?: string;
12765
+ idempotentie_sleutel?: string | null;
12367
12766
  is_herprint?: boolean;
12368
12767
  kopieen?: number;
12369
12768
  layout_id?: string | null;
12370
12769
  opgepakt_op?: string | null;
12371
12770
  paginas?: number;
12372
12771
  payload?: import("../integrations/supabase/types").Json;
12772
+ pdf_base64?: string | null;
12773
+ pdf_url?: string | null;
12373
12774
  pogingen?: number;
12374
12775
  printer_id?: string | null;
12375
12776
  render_html?: string | null;
12376
12777
  status?: import("../integrations/supabase/types").Database["public"]["Enums"]["print_job_status"];
12377
12778
  updated_at?: string;
12779
+ volgende_poging?: string | null;
12378
12780
  voltooid_op?: string | null;
12379
12781
  };
12380
12782
  Relationships: [{
@@ -12397,6 +12799,72 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
12397
12799
  referencedColumns: ["id"];
12398
12800
  }];
12399
12801
  };
12802
+ print_queue_runners: {
12803
+ Row: {
12804
+ actief: boolean;
12805
+ basis_url: string;
12806
+ created_at: string;
12807
+ id: string;
12808
+ laatst_gezien: string;
12809
+ laatste_fout: string | null;
12810
+ laatste_request_id: number | null;
12811
+ mislukte_posts: number;
12812
+ tick_sleutel: string;
12813
+ updated_at: string;
12814
+ };
12815
+ Insert: {
12816
+ actief?: boolean;
12817
+ basis_url: string;
12818
+ created_at?: string;
12819
+ id?: string;
12820
+ laatst_gezien?: string;
12821
+ laatste_fout?: string | null;
12822
+ laatste_request_id?: number | null;
12823
+ mislukte_posts?: number;
12824
+ tick_sleutel?: string;
12825
+ updated_at?: string;
12826
+ };
12827
+ Update: {
12828
+ actief?: boolean;
12829
+ basis_url?: string;
12830
+ created_at?: string;
12831
+ id?: string;
12832
+ laatst_gezien?: string;
12833
+ laatste_fout?: string | null;
12834
+ laatste_request_id?: number | null;
12835
+ mislukte_posts?: number;
12836
+ tick_sleutel?: string;
12837
+ updated_at?: string;
12838
+ };
12839
+ Relationships: [];
12840
+ };
12841
+ print_queue_settings: {
12842
+ Row: {
12843
+ bewaar_bestanden_dagen: number;
12844
+ bewaar_opdrachten_dagen: number;
12845
+ created_at: string;
12846
+ dubbel_venster_minuten: number;
12847
+ id: string;
12848
+ updated_at: string;
12849
+ };
12850
+ Insert: {
12851
+ bewaar_bestanden_dagen?: number;
12852
+ bewaar_opdrachten_dagen?: number;
12853
+ created_at?: string;
12854
+ dubbel_venster_minuten?: number;
12855
+ id?: string;
12856
+ updated_at?: string;
12857
+ };
12858
+ Update: {
12859
+ bewaar_bestanden_dagen?: number;
12860
+ bewaar_opdrachten_dagen?: number;
12861
+ created_at?: string;
12862
+ dubbel_venster_minuten?: number;
12863
+ id?: string;
12864
+ updated_at?: string;
12865
+ };
12866
+ Relationships: [];
12867
+ };
12400
12868
  print_rules: {
12401
12869
  Row: {
12402
12870
  actief: boolean;
@@ -12557,6 +13025,7 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
12557
13025
  agent_id: string | null;
12558
13026
  created_at: string;
12559
13027
  driver: string;
13028
+ extern_printer_id: string | null;
12560
13029
  id: string;
12561
13030
  ip_adres: string | null;
12562
13031
  laatst_gezien: string | null;
@@ -12578,6 +13047,7 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
12578
13047
  agent_id?: string | null;
12579
13048
  created_at?: string;
12580
13049
  driver?: string;
13050
+ extern_printer_id?: string | null;
12581
13051
  id?: string;
12582
13052
  ip_adres?: string | null;
12583
13053
  laatst_gezien?: string | null;
@@ -12599,6 +13069,7 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
12599
13069
  agent_id?: string | null;
12600
13070
  created_at?: string;
12601
13071
  driver?: string;
13072
+ extern_printer_id?: string | null;
12602
13073
  id?: string;
12603
13074
  ip_adres?: string | null;
12604
13075
  laatst_gezien?: string | null;
@@ -13870,6 +14341,96 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
13870
14341
  referencedColumns: ["id"];
13871
14342
  }];
13872
14343
  };
14344
+ role_assignments: {
14345
+ Row: {
14346
+ created_at: string;
14347
+ id: string;
14348
+ role_id: string;
14349
+ user_id: string;
14350
+ };
14351
+ Insert: {
14352
+ created_at?: string;
14353
+ id?: string;
14354
+ role_id: string;
14355
+ user_id: string;
14356
+ };
14357
+ Update: {
14358
+ created_at?: string;
14359
+ id?: string;
14360
+ role_id?: string;
14361
+ user_id?: string;
14362
+ };
14363
+ Relationships: [{
14364
+ foreignKeyName: "role_assignments_role_id_fkey";
14365
+ columns: ["role_id"];
14366
+ isOneToOne: false;
14367
+ referencedRelation: "roles";
14368
+ referencedColumns: ["id"];
14369
+ }];
14370
+ };
14371
+ role_permissions: {
14372
+ Row: {
14373
+ can_edit: boolean;
14374
+ can_view: boolean;
14375
+ feature_id: string;
14376
+ id: string;
14377
+ module_id: string;
14378
+ role_id: string;
14379
+ updated_at: string;
14380
+ };
14381
+ Insert: {
14382
+ can_edit?: boolean;
14383
+ can_view?: boolean;
14384
+ feature_id?: string;
14385
+ id?: string;
14386
+ module_id: string;
14387
+ role_id: string;
14388
+ updated_at?: string;
14389
+ };
14390
+ Update: {
14391
+ can_edit?: boolean;
14392
+ can_view?: boolean;
14393
+ feature_id?: string;
14394
+ id?: string;
14395
+ module_id?: string;
14396
+ role_id?: string;
14397
+ updated_at?: string;
14398
+ };
14399
+ Relationships: [{
14400
+ foreignKeyName: "role_permissions_role_id_fkey";
14401
+ columns: ["role_id"];
14402
+ isOneToOne: false;
14403
+ referencedRelation: "roles";
14404
+ referencedColumns: ["id"];
14405
+ }];
14406
+ };
14407
+ roles: {
14408
+ Row: {
14409
+ created_at: string;
14410
+ id: string;
14411
+ is_protected: boolean;
14412
+ key: string;
14413
+ name: string;
14414
+ updated_at: string;
14415
+ };
14416
+ Insert: {
14417
+ created_at?: string;
14418
+ id?: string;
14419
+ is_protected?: boolean;
14420
+ key: string;
14421
+ name: string;
14422
+ updated_at?: string;
14423
+ };
14424
+ Update: {
14425
+ created_at?: string;
14426
+ id?: string;
14427
+ is_protected?: boolean;
14428
+ key?: string;
14429
+ name?: string;
14430
+ updated_at?: string;
14431
+ };
14432
+ Relationships: [];
14433
+ };
13873
14434
  rooms: {
13874
14435
  Row: {
13875
14436
  capacity: number;
@@ -14539,6 +15100,54 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
14539
15100
  };
14540
15101
  Relationships: [];
14541
15102
  };
15103
+ time_compensation_entries: {
15104
+ Row: {
15105
+ created_at: string;
15106
+ employee_id: string;
15107
+ entry_date: string;
15108
+ id: string;
15109
+ km: number;
15110
+ meal_allowance: number;
15111
+ notes: string | null;
15112
+ standby_evening: number;
15113
+ standby_weekend: number;
15114
+ tvt_change: number;
15115
+ updated_at: string;
15116
+ };
15117
+ Insert: {
15118
+ created_at?: string;
15119
+ employee_id: string;
15120
+ entry_date: string;
15121
+ id?: string;
15122
+ km?: number;
15123
+ meal_allowance?: number;
15124
+ notes?: string | null;
15125
+ standby_evening?: number;
15126
+ standby_weekend?: number;
15127
+ tvt_change?: number;
15128
+ updated_at?: string;
15129
+ };
15130
+ Update: {
15131
+ created_at?: string;
15132
+ employee_id?: string;
15133
+ entry_date?: string;
15134
+ id?: string;
15135
+ km?: number;
15136
+ meal_allowance?: number;
15137
+ notes?: string | null;
15138
+ standby_evening?: number;
15139
+ standby_weekend?: number;
15140
+ tvt_change?: number;
15141
+ updated_at?: string;
15142
+ };
15143
+ Relationships: [{
15144
+ foreignKeyName: "time_compensation_entries_employee_id_fkey";
15145
+ columns: ["employee_id"];
15146
+ isOneToOne: false;
15147
+ referencedRelation: "profiles";
15148
+ referencedColumns: ["id"];
15149
+ }];
15150
+ };
14542
15151
  time_entries: {
14543
15152
  Row: {
14544
15153
  created_at: string;
@@ -14573,65 +15182,170 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
14573
15182
  undertime?: number;
14574
15183
  updated_at?: string;
14575
15184
  };
15185
+ Relationships: [];
15186
+ };
15187
+ time_log_week_approvals: {
15188
+ Row: {
15189
+ approved_at: string | null;
15190
+ approved_by: string | null;
15191
+ created_at: string;
15192
+ employee_id: string;
15193
+ id: string;
15194
+ locked: boolean;
15195
+ notes: string | null;
15196
+ status: string;
15197
+ submitted_at: string | null;
15198
+ updated_at: string;
15199
+ week_start: string;
15200
+ };
15201
+ Insert: {
15202
+ approved_at?: string | null;
15203
+ approved_by?: string | null;
15204
+ created_at?: string;
15205
+ employee_id: string;
15206
+ id?: string;
15207
+ locked?: boolean;
15208
+ notes?: string | null;
15209
+ status?: string;
15210
+ submitted_at?: string | null;
15211
+ updated_at?: string;
15212
+ week_start: string;
15213
+ };
15214
+ Update: {
15215
+ approved_at?: string | null;
15216
+ approved_by?: string | null;
15217
+ created_at?: string;
15218
+ employee_id?: string;
15219
+ id?: string;
15220
+ locked?: boolean;
15221
+ notes?: string | null;
15222
+ status?: string;
15223
+ submitted_at?: string | null;
15224
+ updated_at?: string;
15225
+ week_start?: string;
15226
+ };
14576
15227
  Relationships: [{
14577
- foreignKeyName: "time_entries_employee_id_fkey";
15228
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
14578
15229
  columns: ["employee_id"];
14579
15230
  isOneToOne: false;
14580
- referencedRelation: "monteurs";
15231
+ referencedRelation: "profiles";
14581
15232
  referencedColumns: ["id"];
14582
15233
  }];
14583
15234
  };
14584
15235
  time_logs: {
14585
15236
  Row: {
15237
+ auto_stop_reason: string | null;
15238
+ auto_stopped: boolean;
14586
15239
  created_at: string;
15240
+ current_latitude: number | null;
15241
+ current_longitude: number | null;
15242
+ current_position_updated_at: string | null;
14587
15243
  employee_id: string;
15244
+ end_latitude: number | null;
15245
+ end_longitude: number | null;
14588
15246
  end_time: string | null;
15247
+ eta_distance_km: number | null;
15248
+ eta_minutes: number | null;
15249
+ eta_updated_at: string | null;
15250
+ hour_category: string | null;
14589
15251
  id: string;
15252
+ last_reminder_at: string | null;
14590
15253
  notes: string | null;
14591
15254
  overtime_hours: number;
14592
15255
  overtime_type: string | null;
14593
15256
  regular_hours: number;
15257
+ reminder_count: number;
15258
+ requires_review: boolean;
15259
+ start_latitude: number | null;
15260
+ start_longitude: number | null;
14594
15261
  start_time: string;
14595
15262
  travel_cost: number | null;
14596
15263
  travel_distance_km: number | null;
15264
+ travel_duration_min: number | null;
15265
+ travel_time_minutes: number | null;
14597
15266
  type: string;
14598
15267
  updated_at: string;
15268
+ work_order_id: string | null;
14599
15269
  };
14600
15270
  Insert: {
15271
+ auto_stop_reason?: string | null;
15272
+ auto_stopped?: boolean;
14601
15273
  created_at?: string;
15274
+ current_latitude?: number | null;
15275
+ current_longitude?: number | null;
15276
+ current_position_updated_at?: string | null;
14602
15277
  employee_id: string;
15278
+ end_latitude?: number | null;
15279
+ end_longitude?: number | null;
14603
15280
  end_time?: string | null;
15281
+ eta_distance_km?: number | null;
15282
+ eta_minutes?: number | null;
15283
+ eta_updated_at?: string | null;
15284
+ hour_category?: string | null;
14604
15285
  id?: string;
15286
+ last_reminder_at?: string | null;
14605
15287
  notes?: string | null;
14606
15288
  overtime_hours?: number;
14607
15289
  overtime_type?: string | null;
14608
15290
  regular_hours?: number;
15291
+ reminder_count?: number;
15292
+ requires_review?: boolean;
15293
+ start_latitude?: number | null;
15294
+ start_longitude?: number | null;
14609
15295
  start_time?: string;
14610
15296
  travel_cost?: number | null;
14611
15297
  travel_distance_km?: number | null;
15298
+ travel_duration_min?: number | null;
15299
+ travel_time_minutes?: number | null;
14612
15300
  type: string;
14613
15301
  updated_at?: string;
15302
+ work_order_id?: string | null;
14614
15303
  };
14615
15304
  Update: {
15305
+ auto_stop_reason?: string | null;
15306
+ auto_stopped?: boolean;
14616
15307
  created_at?: string;
15308
+ current_latitude?: number | null;
15309
+ current_longitude?: number | null;
15310
+ current_position_updated_at?: string | null;
14617
15311
  employee_id?: string;
15312
+ end_latitude?: number | null;
15313
+ end_longitude?: number | null;
14618
15314
  end_time?: string | null;
15315
+ eta_distance_km?: number | null;
15316
+ eta_minutes?: number | null;
15317
+ eta_updated_at?: string | null;
15318
+ hour_category?: string | null;
14619
15319
  id?: string;
15320
+ last_reminder_at?: string | null;
14620
15321
  notes?: string | null;
14621
15322
  overtime_hours?: number;
14622
15323
  overtime_type?: string | null;
14623
15324
  regular_hours?: number;
15325
+ reminder_count?: number;
15326
+ requires_review?: boolean;
15327
+ start_latitude?: number | null;
15328
+ start_longitude?: number | null;
14624
15329
  start_time?: string;
14625
15330
  travel_cost?: number | null;
14626
15331
  travel_distance_km?: number | null;
15332
+ travel_duration_min?: number | null;
15333
+ travel_time_minutes?: number | null;
14627
15334
  type?: string;
14628
15335
  updated_at?: string;
15336
+ work_order_id?: string | null;
14629
15337
  };
14630
15338
  Relationships: [{
14631
15339
  foreignKeyName: "time_logs_employee_id_fkey";
14632
15340
  columns: ["employee_id"];
14633
15341
  isOneToOne: false;
14634
- referencedRelation: "monteurs";
15342
+ referencedRelation: "profiles";
15343
+ referencedColumns: ["id"];
15344
+ }, {
15345
+ foreignKeyName: "time_logs_work_order_id_fkey";
15346
+ columns: ["work_order_id"];
15347
+ isOneToOne: false;
15348
+ referencedRelation: "work_orders";
14635
15349
  referencedColumns: ["id"];
14636
15350
  }];
14637
15351
  };
@@ -14670,7 +15384,7 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
14670
15384
  foreignKeyName: "time_off_entries_employee_id_fkey";
14671
15385
  columns: ["employee_id"];
14672
15386
  isOneToOne: false;
14673
- referencedRelation: "monteurs";
15387
+ referencedRelation: "profiles";
14674
15388
  referencedColumns: ["id"];
14675
15389
  }];
14676
15390
  };
@@ -14980,6 +15694,39 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
14980
15694
  };
14981
15695
  Relationships: [];
14982
15696
  };
15697
+ twinfield_cron_locks: {
15698
+ Row: {
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
+ Insert: {
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
+ Update: {
15719
+ created_at?: string;
15720
+ heartbeat_at?: string;
15721
+ job_name?: string;
15722
+ last_error?: string | null;
15723
+ last_finished_at?: string | null;
15724
+ locked_at?: string;
15725
+ run_id?: string;
15726
+ updated_at?: string;
15727
+ };
15728
+ Relationships: [];
15729
+ };
14983
15730
  twinfield_customers: {
14984
15731
  Row: {
14985
15732
  address: string | null;
@@ -15234,6 +15981,8 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
15234
15981
  };
15235
15982
  twinfield_invoice_settings: {
15236
15983
  Row: {
15984
+ auto_invoice_enabled: boolean;
15985
+ auto_invoice_trigger_statuses: string[];
15237
15986
  created_at: string;
15238
15987
  debtor_gl_account: string;
15239
15988
  default_credit_invoice_type: string | null;
@@ -15254,6 +16003,8 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
15254
16003
  vat_code_export: string | null;
15255
16004
  };
15256
16005
  Insert: {
16006
+ auto_invoice_enabled?: boolean;
16007
+ auto_invoice_trigger_statuses?: string[];
15257
16008
  created_at?: string;
15258
16009
  debtor_gl_account?: string;
15259
16010
  default_credit_invoice_type?: string | null;
@@ -15274,6 +16025,8 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
15274
16025
  vat_code_export?: string | null;
15275
16026
  };
15276
16027
  Update: {
16028
+ auto_invoice_enabled?: boolean;
16029
+ auto_invoice_trigger_statuses?: string[];
15277
16030
  created_at?: string;
15278
16031
  debtor_gl_account?: string;
15279
16032
  default_credit_invoice_type?: string | null;
@@ -15574,6 +16327,7 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
15574
16327
  twinfield_push_queue: {
15575
16328
  Row: {
15576
16329
  action: string;
16330
+ attempt_started_at: string | null;
15577
16331
  attempts: number;
15578
16332
  connection_id: string | null;
15579
16333
  created_at: string;
@@ -15590,6 +16344,7 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
15590
16344
  };
15591
16345
  Insert: {
15592
16346
  action?: string;
16347
+ attempt_started_at?: string | null;
15593
16348
  attempts?: number;
15594
16349
  connection_id?: string | null;
15595
16350
  created_at?: string;
@@ -15606,6 +16361,7 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
15606
16361
  };
15607
16362
  Update: {
15608
16363
  action?: string;
16364
+ attempt_started_at?: string | null;
15609
16365
  attempts?: number;
15610
16366
  connection_id?: string | null;
15611
16367
  created_at?: string;
@@ -15803,13 +16559,7 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
15803
16559
  workday_end?: string | null;
15804
16560
  workday_start?: string | null;
15805
16561
  };
15806
- Relationships: [{
15807
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
15808
- columns: ["monteur_id"];
15809
- isOneToOne: true;
15810
- referencedRelation: "monteurs";
15811
- referencedColumns: ["id"];
15812
- }];
16562
+ Relationships: [];
15813
16563
  };
15814
16564
  uren_entries: {
15815
16565
  Row: {
@@ -15855,12 +16605,6 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
15855
16605
  werkbon_id?: string | null;
15856
16606
  };
15857
16607
  Relationships: [{
15858
- foreignKeyName: "uren_entries_monteur_id_fkey";
15859
- columns: ["monteur_id"];
15860
- isOneToOne: false;
15861
- referencedRelation: "monteurs";
15862
- referencedColumns: ["id"];
15863
- }, {
15864
16608
  foreignKeyName: "uren_entries_werkbon_id_fkey";
15865
16609
  columns: ["werkbon_id"];
15866
16610
  isOneToOne: false;
@@ -16328,13 +17072,37 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
16328
17072
  submitted_at?: string | null;
16329
17073
  updated_at?: string;
16330
17074
  };
16331
- Relationships: [{
16332
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
16333
- columns: ["monteur_id"];
16334
- isOneToOne: false;
16335
- referencedRelation: "monteurs";
16336
- referencedColumns: ["id"];
16337
- }];
17075
+ Relationships: [];
17076
+ };
17077
+ user_module_permissions: {
17078
+ Row: {
17079
+ created_at: string;
17080
+ feature_id: string;
17081
+ id: string;
17082
+ module_id: string;
17083
+ permission: string;
17084
+ updated_at: string;
17085
+ user_id: string;
17086
+ };
17087
+ Insert: {
17088
+ created_at?: string;
17089
+ feature_id?: string;
17090
+ id?: string;
17091
+ module_id: string;
17092
+ permission: string;
17093
+ updated_at?: string;
17094
+ user_id: string;
17095
+ };
17096
+ Update: {
17097
+ created_at?: string;
17098
+ feature_id?: string;
17099
+ id?: string;
17100
+ module_id?: string;
17101
+ permission?: string;
17102
+ updated_at?: string;
17103
+ user_id?: string;
17104
+ };
17105
+ Relationships: [];
16338
17106
  };
16339
17107
  user_roles: {
16340
17108
  Row: {
@@ -16363,6 +17131,51 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
16363
17131
  referencedColumns: ["id"];
16364
17132
  }];
16365
17133
  };
17134
+ van_inventories: {
17135
+ Row: {
17136
+ barcode: string | null;
17137
+ created_at: string;
17138
+ id: string;
17139
+ monteur_id: string | null;
17140
+ price_per_unit: number;
17141
+ product_name: string;
17142
+ quantity_current: number;
17143
+ quantity_min: number;
17144
+ unit: string;
17145
+ updated_at: string;
17146
+ };
17147
+ Insert: {
17148
+ barcode?: string | null;
17149
+ created_at?: string;
17150
+ id?: string;
17151
+ monteur_id?: string | null;
17152
+ price_per_unit?: number;
17153
+ product_name: string;
17154
+ quantity_current?: number;
17155
+ quantity_min?: number;
17156
+ unit?: string;
17157
+ updated_at?: string;
17158
+ };
17159
+ Update: {
17160
+ barcode?: string | null;
17161
+ created_at?: string;
17162
+ id?: string;
17163
+ monteur_id?: string | null;
17164
+ price_per_unit?: number;
17165
+ product_name?: string;
17166
+ quantity_current?: number;
17167
+ quantity_min?: number;
17168
+ unit?: string;
17169
+ updated_at?: string;
17170
+ };
17171
+ Relationships: [{
17172
+ foreignKeyName: "van_inventories_monteur_id_fkey";
17173
+ columns: ["monteur_id"];
17174
+ isOneToOne: false;
17175
+ referencedRelation: "profiles";
17176
+ referencedColumns: ["id"];
17177
+ }];
17178
+ };
16366
17179
  voorraad_custom_fields: {
16367
17180
  Row: {
16368
17181
  created_at: string;
@@ -17313,7 +18126,7 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
17313
18126
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
17314
18127
  columns: ["monteur_id"];
17315
18128
  isOneToOne: false;
17316
- referencedRelation: "monteurs";
18129
+ referencedRelation: "profiles";
17317
18130
  referencedColumns: ["id"];
17318
18131
  }, {
17319
18132
  foreignKeyName: "work_order_monteurs_work_order_id_fkey";
@@ -17323,6 +18136,60 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
17323
18136
  referencedColumns: ["id"];
17324
18137
  }];
17325
18138
  };
18139
+ work_order_photos: {
18140
+ Row: {
18141
+ ai_caption: string | null;
18142
+ ai_categorized_at: string | null;
18143
+ ai_labels: import("../integrations/supabase/types").Json | null;
18144
+ caption: string | null;
18145
+ created_at: string;
18146
+ id: string;
18147
+ monteur_id: string | null;
18148
+ photo_type: string;
18149
+ storage_path: string;
18150
+ updated_at: string;
18151
+ work_order_id: string;
18152
+ };
18153
+ Insert: {
18154
+ ai_caption?: string | null;
18155
+ ai_categorized_at?: string | null;
18156
+ ai_labels?: import("../integrations/supabase/types").Json | null;
18157
+ caption?: string | null;
18158
+ created_at?: string;
18159
+ id?: string;
18160
+ monteur_id?: string | null;
18161
+ photo_type?: string;
18162
+ storage_path: string;
18163
+ updated_at?: string;
18164
+ work_order_id: string;
18165
+ };
18166
+ Update: {
18167
+ ai_caption?: string | null;
18168
+ ai_categorized_at?: string | null;
18169
+ ai_labels?: import("../integrations/supabase/types").Json | null;
18170
+ caption?: string | null;
18171
+ created_at?: string;
18172
+ id?: string;
18173
+ monteur_id?: string | null;
18174
+ photo_type?: string;
18175
+ storage_path?: string;
18176
+ updated_at?: string;
18177
+ work_order_id?: string;
18178
+ };
18179
+ Relationships: [{
18180
+ foreignKeyName: "work_order_photos_monteur_id_fkey";
18181
+ columns: ["monteur_id"];
18182
+ isOneToOne: false;
18183
+ referencedRelation: "profiles";
18184
+ referencedColumns: ["id"];
18185
+ }, {
18186
+ foreignKeyName: "work_order_photos_work_order_id_fkey";
18187
+ columns: ["work_order_id"];
18188
+ isOneToOne: false;
18189
+ referencedRelation: "work_orders";
18190
+ referencedColumns: ["id"];
18191
+ }];
18192
+ };
17326
18193
  work_orders: {
17327
18194
  Row: {
17328
18195
  assigned_to: string | null;
@@ -17354,7 +18221,6 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
17354
18221
  scheduled_end_time: string | null;
17355
18222
  scheduled_start_time: string | null;
17356
18223
  status: string;
17357
- tenant_id: string;
17358
18224
  total_hours_worked: number | null;
17359
18225
  total_price: number | null;
17360
18226
  travel_time_minutes: number | null;
@@ -17392,7 +18258,6 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
17392
18258
  scheduled_end_time?: string | null;
17393
18259
  scheduled_start_time?: string | null;
17394
18260
  status?: string;
17395
- tenant_id: string;
17396
18261
  total_hours_worked?: number | null;
17397
18262
  total_price?: number | null;
17398
18263
  travel_time_minutes?: number | null;
@@ -17430,7 +18295,6 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
17430
18295
  scheduled_end_time?: string | null;
17431
18296
  scheduled_start_time?: string | null;
17432
18297
  status?: string;
17433
- tenant_id?: string;
17434
18298
  total_hours_worked?: number | null;
17435
18299
  total_price?: number | null;
17436
18300
  travel_time_minutes?: number | null;
@@ -17444,12 +18308,6 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
17444
18308
  isOneToOne: false;
17445
18309
  referencedRelation: "work_orders";
17446
18310
  referencedColumns: ["id"];
17447
- }, {
17448
- foreignKeyName: "work_orders_tenant_id_fkey";
17449
- columns: ["tenant_id"];
17450
- isOneToOne: false;
17451
- referencedRelation: "tenants";
17452
- referencedColumns: ["id"];
17453
18311
  }];
17454
18312
  };
17455
18313
  };
@@ -18169,6 +19027,10 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
18169
19027
  processed_items: number;
18170
19028
  }[];
18171
19029
  };
19030
+ backfill_order_auto_invoice_queue: {
19031
+ Args: never;
19032
+ Returns: number;
19033
+ };
18172
19034
  calculate_layer_stock: {
18173
19035
  Args: {
18174
19036
  p_product_id: string;
@@ -18181,6 +19043,10 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
18181
19043
  };
18182
19044
  Returns: number;
18183
19045
  };
19046
+ can_manage_hours: {
19047
+ Args: never;
19048
+ Returns: boolean;
19049
+ };
18184
19050
  check_offer_product_available_stock: {
18185
19051
  Args: {
18186
19052
  p_campaign_product_id: string;
@@ -18203,6 +19069,46 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
18203
19069
  };
18204
19070
  Returns: import("../integrations/supabase/types").Json;
18205
19071
  };
19072
+ claim_cloud_print_jobs: {
19073
+ Args: {
19074
+ _max?: number;
19075
+ };
19076
+ Returns: {
19077
+ agent_id: string | null;
19078
+ bron_job_id: string | null;
19079
+ created_at: string;
19080
+ documentnaam: string;
19081
+ documenttype: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"];
19082
+ extern_job_id: string | null;
19083
+ foutmelding: string | null;
19084
+ gebruiker_id: string | null;
19085
+ gebruiker_naam: string;
19086
+ gestart_op: string | null;
19087
+ id: string;
19088
+ idempotentie_sleutel: string | null;
19089
+ is_herprint: boolean;
19090
+ kopieen: number;
19091
+ layout_id: string | null;
19092
+ opgepakt_op: string | null;
19093
+ paginas: number;
19094
+ payload: import("../integrations/supabase/types").Json;
19095
+ pdf_base64: string | null;
19096
+ pdf_url: string | null;
19097
+ pogingen: number;
19098
+ printer_id: string | null;
19099
+ render_html: string | null;
19100
+ status: import("../integrations/supabase/types").Database["public"]["Enums"]["print_job_status"];
19101
+ updated_at: string;
19102
+ volgende_poging: string | null;
19103
+ voltooid_op: string | null;
19104
+ }[];
19105
+ SetofOptions: {
19106
+ from: "*";
19107
+ to: "print_jobs";
19108
+ isOneToOne: false;
19109
+ isSetofReturn: true;
19110
+ };
19111
+ };
18206
19112
  claim_floriday_stock_queue: {
18207
19113
  Args: {
18208
19114
  p_limit?: number;
@@ -18293,22 +19199,27 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
18293
19199
  created_at: string;
18294
19200
  documentnaam: string;
18295
19201
  documenttype: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"];
19202
+ extern_job_id: string | null;
18296
19203
  foutmelding: string | null;
18297
19204
  gebruiker_id: string | null;
18298
19205
  gebruiker_naam: string;
18299
19206
  gestart_op: string | null;
18300
19207
  id: string;
19208
+ idempotentie_sleutel: string | null;
18301
19209
  is_herprint: boolean;
18302
19210
  kopieen: number;
18303
19211
  layout_id: string | null;
18304
19212
  opgepakt_op: string | null;
18305
19213
  paginas: number;
18306
19214
  payload: import("../integrations/supabase/types").Json;
19215
+ pdf_base64: string | null;
19216
+ pdf_url: string | null;
18307
19217
  pogingen: number;
18308
19218
  printer_id: string | null;
18309
19219
  render_html: string | null;
18310
19220
  status: import("../integrations/supabase/types").Database["public"]["Enums"]["print_job_status"];
18311
19221
  updated_at: string;
19222
+ volgende_poging: string | null;
18312
19223
  voltooid_op: string | null;
18313
19224
  }[];
18314
19225
  SetofOptions: {
@@ -18325,6 +19236,7 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
18325
19236
  };
18326
19237
  Returns: {
18327
19238
  action: string;
19239
+ attempt_started_at: string | null;
18328
19240
  attempts: number;
18329
19241
  connection_id: string | null;
18330
19242
  created_at: string;
@@ -18354,6 +19266,10 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
18354
19266
  Args: never;
18355
19267
  Returns: undefined;
18356
19268
  };
19269
+ cleanup_voorraad_module_history: {
19270
+ Args: never;
19271
+ Returns: undefined;
19272
+ };
18357
19273
  complete_floriday_stock_queue: {
18358
19274
  Args: {
18359
19275
  p_attempt_id?: string;
@@ -18408,6 +19324,30 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
18408
19324
  agent_naam: string;
18409
19325
  }[];
18410
19326
  };
19327
+ consume_van_inventory: {
19328
+ Args: {
19329
+ p_inventory_id: string;
19330
+ p_quantity: number;
19331
+ };
19332
+ Returns: {
19333
+ barcode: string | null;
19334
+ created_at: string;
19335
+ id: string;
19336
+ monteur_id: string | null;
19337
+ price_per_unit: number;
19338
+ product_name: string;
19339
+ quantity_current: number;
19340
+ quantity_min: number;
19341
+ unit: string;
19342
+ updated_at: string;
19343
+ };
19344
+ SetofOptions: {
19345
+ from: "*";
19346
+ to: "van_inventories";
19347
+ isOneToOne: true;
19348
+ isSetofReturn: false;
19349
+ };
19350
+ };
18411
19351
  control_get_todays_carts: {
18412
19352
  Args: never;
18413
19353
  Returns: {
@@ -18475,6 +19415,20 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
18475
19415
  };
18476
19416
  Returns: import("../integrations/supabase/types").Json;
18477
19417
  };
19418
+ effective_module_permission: {
19419
+ Args: {
19420
+ _module_id: string;
19421
+ _user_id: string;
19422
+ };
19423
+ Returns: string;
19424
+ } | {
19425
+ Args: {
19426
+ _feature_id?: string;
19427
+ _module_id: string;
19428
+ _user_id: string;
19429
+ };
19430
+ Returns: string;
19431
+ };
18478
19432
  email_auth_decrypt: {
18479
19433
  Args: {
18480
19434
  cipher: string;
@@ -18825,12 +19779,6 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
18825
19779
  Args: never;
18826
19780
  Returns: string;
18827
19781
  };
18828
- get_work_order_tenant_id: {
18829
- Args: {
18830
- wo_id: string;
18831
- };
18832
- Returns: string;
18833
- };
18834
19782
  has_module_permission: {
18835
19783
  Args: {
18836
19784
  _min: string;
@@ -18864,6 +19812,13 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
18864
19812
  };
18865
19813
  Returns: boolean;
18866
19814
  };
19815
+ is_time_log_week_locked: {
19816
+ Args: {
19817
+ p_employee_id: string;
19818
+ p_start_time: string;
19819
+ };
19820
+ Returns: boolean;
19821
+ };
18867
19822
  is_user_admin: {
18868
19823
  Args: never;
18869
19824
  Returns: boolean;
@@ -18878,13 +19833,14 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
18878
19833
  };
18879
19834
  Returns: boolean;
18880
19835
  };
18881
- list_monteurs: {
19836
+ list_medewerkers: {
18882
19837
  Args: never;
18883
19838
  Returns: {
18884
19839
  avatar_url: string;
18885
19840
  display_name: string;
18886
19841
  email: string;
18887
19842
  id: string;
19843
+ roles: string[];
18888
19844
  }[];
18889
19845
  };
18890
19846
  list_my_planning_items: {
@@ -19278,6 +20234,51 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
19278
20234
  isSetofReturn: false;
19279
20235
  };
19280
20236
  };
20237
+ logistics_floriday_claim_pushes: {
20238
+ Args: {
20239
+ _lease_seconds?: number;
20240
+ _limit?: number;
20241
+ _worker?: string;
20242
+ };
20243
+ Returns: {
20244
+ attempts: number;
20245
+ fulfillment_order_id: string;
20246
+ id: string;
20247
+ last_sent_hash: string;
20248
+ order_ref: string;
20249
+ payload: import("../integrations/supabase/types").Json;
20250
+ payload_hash: string;
20251
+ revision: number;
20252
+ }[];
20253
+ };
20254
+ logistics_floriday_finish_push: {
20255
+ Args: {
20256
+ _error?: string;
20257
+ _fulfillment_order_id?: string;
20258
+ _id: string;
20259
+ _max_age_hours?: number;
20260
+ _max_attempts?: number;
20261
+ _ok: boolean;
20262
+ _permanent?: boolean;
20263
+ _revision: number;
20264
+ _sent_hash?: string;
20265
+ };
20266
+ Returns: string;
20267
+ };
20268
+ logistics_floriday_prune_pushes: {
20269
+ Args: {
20270
+ _days?: number;
20271
+ };
20272
+ Returns: number;
20273
+ };
20274
+ logistics_floriday_queue_push: {
20275
+ Args: {
20276
+ _order_ref: string;
20277
+ _payload?: import("../integrations/supabase/types").Json;
20278
+ _payload_hash?: string;
20279
+ };
20280
+ Returns: string;
20281
+ };
19281
20282
  logistics_live_carriers: {
19282
20283
  Args: {
19283
20284
  p_order_ref: string;
@@ -19330,6 +20331,65 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
19330
20331
  };
19331
20332
  Returns: number;
19332
20333
  };
20334
+ logistics_plan_claim: {
20335
+ Args: {
20336
+ p_limit?: number;
20337
+ };
20338
+ Returns: {
20339
+ attempts: number;
20340
+ id: string;
20341
+ order_id: string;
20342
+ }[];
20343
+ };
20344
+ logistics_plan_enqueue: {
20345
+ Args: {
20346
+ p_order_id: string;
20347
+ p_reason?: string;
20348
+ };
20349
+ Returns: undefined;
20350
+ };
20351
+ logistics_plan_ensure_event: {
20352
+ Args: {
20353
+ p_order_id: string;
20354
+ };
20355
+ Returns: boolean;
20356
+ };
20357
+ logistics_plan_finish: {
20358
+ Args: {
20359
+ p_error?: string;
20360
+ p_id: string;
20361
+ };
20362
+ Returns: undefined;
20363
+ };
20364
+ logistics_plan_impact_orders: {
20365
+ Args: {
20366
+ p_order_id: string;
20367
+ };
20368
+ Returns: {
20369
+ buffer_id: string;
20370
+ order_id: string;
20371
+ plan_date: string;
20372
+ }[];
20373
+ };
20374
+ logistics_plan_kick: {
20375
+ Args: never;
20376
+ Returns: undefined;
20377
+ };
20378
+ logistics_plan_prune: {
20379
+ Args: never;
20380
+ Returns: number;
20381
+ };
20382
+ logistics_plan_release_stale: {
20383
+ Args: never;
20384
+ Returns: number;
20385
+ };
20386
+ logistics_plan_setting: {
20387
+ Args: {
20388
+ p_default: number;
20389
+ p_key: string;
20390
+ };
20391
+ Returns: number;
20392
+ };
19333
20393
  logistics_queue_capacity_email: {
19334
20394
  Args: {
19335
20395
  p_alert_id: string;
@@ -19568,6 +20628,14 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
19568
20628
  };
19569
20629
  Returns: undefined;
19570
20630
  };
20631
+ my_module_permissions: {
20632
+ Args: never;
20633
+ Returns: {
20634
+ feature_id: string;
20635
+ module_id: string;
20636
+ permission: string;
20637
+ }[];
20638
+ };
19571
20639
  next_manufacture_partij: {
19572
20640
  Args: {
19573
20641
  _tenant_id: string;
@@ -19618,6 +20686,13 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
19618
20686
  };
19619
20687
  Returns: boolean;
19620
20688
  };
20689
+ opruim_print_historie: {
20690
+ Args: never;
20691
+ Returns: {
20692
+ ontdaan: number;
20693
+ verwijderd: number;
20694
+ }[];
20695
+ };
19621
20696
  order_number_prefix: {
19622
20697
  Args: {
19623
20698
  p_custom_fields?: import("../integrations/supabase/types").Json;
@@ -19625,6 +20700,15 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
19625
20700
  };
19626
20701
  Returns: string;
19627
20702
  };
20703
+ pick_active_printers: {
20704
+ Args: never;
20705
+ Returns: {
20706
+ id: string;
20707
+ locatie: string;
20708
+ naam: string;
20709
+ online: boolean;
20710
+ }[];
20711
+ };
19628
20712
  pick_claim_document: {
19629
20713
  Args: {
19630
20714
  _queue_item_id: string;
@@ -19811,6 +20895,52 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
19811
20895
  };
19812
20896
  Returns: undefined;
19813
20897
  };
20898
+ pick_reset_print: {
20899
+ Args: {
20900
+ _queue_item_id: string;
20901
+ _session_id: string;
20902
+ };
20903
+ Returns: {
20904
+ announced_at: string;
20905
+ assigned_user_id: string | null;
20906
+ barcode: string | null;
20907
+ cancelled_at: string | null;
20908
+ cart_count: number;
20909
+ completed_at: string | null;
20910
+ country_code: string | null;
20911
+ created_at: string;
20912
+ customer_name: string | null;
20913
+ delivery_address: string | null;
20914
+ document_number: string | null;
20915
+ document_type_id: string | null;
20916
+ due_at: string | null;
20917
+ id: string;
20918
+ is_urgent: boolean;
20919
+ line_count: number;
20920
+ order_number: string | null;
20921
+ order_type: string | null;
20922
+ payload: import("../integrations/supabase/types").Json;
20923
+ print_count: number;
20924
+ print_job_id: string | null;
20925
+ printed_at: string | null;
20926
+ printed_by: string | null;
20927
+ printer_id: string | null;
20928
+ priority: number;
20929
+ reference: string | null;
20930
+ route: string | null;
20931
+ screen_id: string | null;
20932
+ station_id: string | null;
20933
+ status_id: string | null;
20934
+ updated_at: string;
20935
+ warnings: import("../integrations/supabase/types").Json;
20936
+ };
20937
+ SetofOptions: {
20938
+ from: "*";
20939
+ to: "pick_queue";
20940
+ isOneToOne: true;
20941
+ isSetofReturn: false;
20942
+ };
20943
+ };
19814
20944
  pick_station_dashboard: {
19815
20945
  Args: never;
19816
20946
  Returns: {
@@ -19957,6 +21087,12 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
19957
21087
  };
19958
21088
  Returns: undefined;
19959
21089
  };
21090
+ reset_stalled_floriday_stock_queue: {
21091
+ Args: {
21092
+ p_include_failed?: boolean;
21093
+ };
21094
+ Returns: number;
21095
+ };
19960
21096
  resolve_group_allocation: {
19961
21097
  Args: {
19962
21098
  _needed: number;
@@ -20001,14 +21137,28 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
20001
21137
  };
20002
21138
  Returns: import("../integrations/supabase/types").Json;
20003
21139
  };
21140
+ ruim_print_jobs_op: {
21141
+ Args: {
21142
+ _bewaar_dagen?: number;
21143
+ };
21144
+ Returns: number;
21145
+ };
20004
21146
  run_floriday_continuous_stock_sync: {
20005
21147
  Args: never;
20006
21148
  Returns: undefined;
20007
21149
  };
21150
+ run_floriday_stock_queue_process: {
21151
+ Args: never;
21152
+ Returns: undefined;
21153
+ };
20008
21154
  run_logistics_tasks_dispatch: {
20009
21155
  Args: never;
20010
21156
  Returns: undefined;
20011
21157
  };
21158
+ run_print_queue_ticks: {
21159
+ Args: never;
21160
+ Returns: number;
21161
+ };
20012
21162
  run_twinfield_queue_tick: {
20013
21163
  Args: never;
20014
21164
  Returns: undefined;
@@ -20362,6 +21512,16 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
20362
21512
  };
20363
21513
  Returns: string[];
20364
21514
  };
21515
+ switch_time_log: {
21516
+ Args: {
21517
+ p_employee_id: string;
21518
+ p_start_lat?: number;
21519
+ p_start_lng?: number;
21520
+ p_type: string;
21521
+ p_work_order_id?: string;
21522
+ };
21523
+ Returns: import("../integrations/supabase/types").Json;
21524
+ };
20365
21525
  sync_all_layer_stocks: {
20366
21526
  Args: never;
20367
21527
  Returns: undefined;
@@ -20396,6 +21556,15 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
20396
21556
  };
20397
21557
  Returns: undefined;
20398
21558
  };
21559
+ trade_item_stock_duplicates: {
21560
+ Args: never;
21561
+ Returns: {
21562
+ keys: string[];
21563
+ product_id: string;
21564
+ product_name: string;
21565
+ row_count: number;
21566
+ }[];
21567
+ };
20399
21568
  try_debtor_lock: {
20400
21569
  Args: {
20401
21570
  _group_key: string;
@@ -20403,6 +21572,24 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
20403
21572
  };
20404
21573
  Returns: boolean;
20405
21574
  };
21575
+ twinfield_cron_lock_acquire: {
21576
+ Args: {
21577
+ _job_name: string;
21578
+ _stale_seconds?: number;
21579
+ };
21580
+ Returns: boolean;
21581
+ };
21582
+ twinfield_cron_lock_release: {
21583
+ Args: {
21584
+ _error?: string;
21585
+ _job_name: string;
21586
+ };
21587
+ Returns: undefined;
21588
+ };
21589
+ twinfield_prune_push_queue: {
21590
+ Args: never;
21591
+ Returns: number;
21592
+ };
20406
21593
  twinfield_register_cron: {
20407
21594
  Args: {
20408
21595
  apikey?: string;
@@ -20445,7 +21632,7 @@ export declare const getAfhandelingSettings: import("@tanstack/start-client-core
20445
21632
  };
20446
21633
  Enums: {
20447
21634
  ai_import_status: "nieuw" | "verwerken" | "bevestigen" | "klaar" | "mislukt";
20448
- app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin";
21635
+ app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie";
20449
21636
  doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon";
20450
21637
  doc_orientation: "portrait" | "landscape";
20451
21638
  exact_env: "staging" | "live";
@@ -21338,6 +22525,126 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
21338
22525
  };
21339
22526
  Relationships: [];
21340
22527
  };
22528
+ cao_holidays: {
22529
+ Row: {
22530
+ created_at: string;
22531
+ description: string | null;
22532
+ holiday_date: string;
22533
+ id: string;
22534
+ updated_at: string;
22535
+ };
22536
+ Insert: {
22537
+ created_at?: string;
22538
+ description?: string | null;
22539
+ holiday_date: string;
22540
+ id?: string;
22541
+ updated_at?: string;
22542
+ };
22543
+ Update: {
22544
+ created_at?: string;
22545
+ description?: string | null;
22546
+ holiday_date?: string;
22547
+ id?: string;
22548
+ updated_at?: string;
22549
+ };
22550
+ Relationships: [];
22551
+ };
22552
+ cao_settings: {
22553
+ Row: {
22554
+ auto_break_after_hours: number;
22555
+ auto_break_minutes: number;
22556
+ auto_break_unpaid: boolean;
22557
+ auto_stop_after_hours: number;
22558
+ callout_fee: number;
22559
+ created_at: string;
22560
+ daily_regular_hours: number;
22561
+ default_hourly_rate: number;
22562
+ id: string;
22563
+ materials_markup_percent: number;
22564
+ max_daily_hours: number;
22565
+ max_weekly_hours: number;
22566
+ meal_allowance_amount: number;
22567
+ overtime_pct_178: number;
22568
+ overtime_pct_189: number;
22569
+ overtime_pct_212: number;
22570
+ reminder_after_hours: number;
22571
+ standby_evening_amount: number;
22572
+ standby_weekend_amount: number;
22573
+ travel_cost_per_km: number | null;
22574
+ travel_cost_threshold_km: number | null;
22575
+ travel_counts_as_work: boolean;
22576
+ travel_hourly_rate: number;
22577
+ travel_rate_per_hour: number;
22578
+ travel_threshold_minutes: number;
22579
+ updated_at: string;
22580
+ weekend_always_212: boolean;
22581
+ window_end: string;
22582
+ window_start: string;
22583
+ };
22584
+ Insert: {
22585
+ auto_break_after_hours?: number;
22586
+ auto_break_minutes?: number;
22587
+ auto_break_unpaid?: boolean;
22588
+ auto_stop_after_hours?: number;
22589
+ callout_fee?: number;
22590
+ created_at?: string;
22591
+ daily_regular_hours?: number;
22592
+ default_hourly_rate?: number;
22593
+ id?: string;
22594
+ materials_markup_percent?: number;
22595
+ max_daily_hours?: number;
22596
+ max_weekly_hours?: number;
22597
+ meal_allowance_amount?: number;
22598
+ overtime_pct_178?: number;
22599
+ overtime_pct_189?: number;
22600
+ overtime_pct_212?: number;
22601
+ reminder_after_hours?: number;
22602
+ standby_evening_amount?: number;
22603
+ standby_weekend_amount?: number;
22604
+ travel_cost_per_km?: number | null;
22605
+ travel_cost_threshold_km?: number | null;
22606
+ travel_counts_as_work?: boolean;
22607
+ travel_hourly_rate?: number;
22608
+ travel_rate_per_hour?: number;
22609
+ travel_threshold_minutes?: number;
22610
+ updated_at?: string;
22611
+ weekend_always_212?: boolean;
22612
+ window_end?: string;
22613
+ window_start?: string;
22614
+ };
22615
+ Update: {
22616
+ auto_break_after_hours?: number;
22617
+ auto_break_minutes?: number;
22618
+ auto_break_unpaid?: boolean;
22619
+ auto_stop_after_hours?: number;
22620
+ callout_fee?: number;
22621
+ created_at?: string;
22622
+ daily_regular_hours?: number;
22623
+ default_hourly_rate?: number;
22624
+ id?: string;
22625
+ materials_markup_percent?: number;
22626
+ max_daily_hours?: number;
22627
+ max_weekly_hours?: number;
22628
+ meal_allowance_amount?: number;
22629
+ overtime_pct_178?: number;
22630
+ overtime_pct_189?: number;
22631
+ overtime_pct_212?: number;
22632
+ reminder_after_hours?: number;
22633
+ standby_evening_amount?: number;
22634
+ standby_weekend_amount?: number;
22635
+ travel_cost_per_km?: number | null;
22636
+ travel_cost_threshold_km?: number | null;
22637
+ travel_counts_as_work?: boolean;
22638
+ travel_hourly_rate?: number;
22639
+ travel_rate_per_hour?: number;
22640
+ travel_threshold_minutes?: number;
22641
+ updated_at?: string;
22642
+ weekend_always_212?: boolean;
22643
+ window_end?: string;
22644
+ window_start?: string;
22645
+ };
22646
+ Relationships: [];
22647
+ };
21341
22648
  carrier_shipping_rates: {
21342
22649
  Row: {
21343
22650
  carrier_id: string;
@@ -22150,7 +23457,7 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
22150
23457
  city: string | null;
22151
23458
  country: string | null;
22152
23459
  created_at: string;
22153
- customer_id: string | null;
23460
+ customer_id: string;
22154
23461
  external_key: string | null;
22155
23462
  external_provider: string | null;
22156
23463
  floriday_location_id: string | null;
@@ -22174,7 +23481,7 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
22174
23481
  city?: string | null;
22175
23482
  country?: string | null;
22176
23483
  created_at?: string;
22177
- customer_id?: string | null;
23484
+ customer_id: string;
22178
23485
  external_key?: string | null;
22179
23486
  external_provider?: string | null;
22180
23487
  floriday_location_id?: string | null;
@@ -22198,7 +23505,7 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
22198
23505
  city?: string | null;
22199
23506
  country?: string | null;
22200
23507
  created_at?: string;
22201
- customer_id?: string | null;
23508
+ customer_id?: string;
22202
23509
  external_key?: string | null;
22203
23510
  external_provider?: string | null;
22204
23511
  floriday_location_id?: string | null;
@@ -26946,6 +28253,7 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
26946
28253
  Row: {
26947
28254
  buyer_organization_id: string | null;
26948
28255
  connection_id: string;
28256
+ controlled_at: string | null;
26949
28257
  created_at: string;
26950
28258
  data: import("../integrations/supabase/types").Json;
26951
28259
  floriday_id: string;
@@ -26957,6 +28265,7 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
26957
28265
  Insert: {
26958
28266
  buyer_organization_id?: string | null;
26959
28267
  connection_id: string;
28268
+ controlled_at?: string | null;
26960
28269
  created_at?: string;
26961
28270
  data: import("../integrations/supabase/types").Json;
26962
28271
  floriday_id: string;
@@ -26968,6 +28277,7 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
26968
28277
  Update: {
26969
28278
  buyer_organization_id?: string | null;
26970
28279
  connection_id?: string;
28280
+ controlled_at?: string | null;
26971
28281
  created_at?: string;
26972
28282
  data?: import("../integrations/supabase/types").Json;
26973
28283
  floriday_id?: string;
@@ -27869,6 +29179,54 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
27869
29179
  };
27870
29180
  Relationships: [];
27871
29181
  };
29182
+ invoice_timing_settings: {
29183
+ Row: {
29184
+ anchor: string;
29185
+ business_days_only: boolean;
29186
+ created_at: string;
29187
+ enabled: boolean;
29188
+ id: string;
29189
+ offset_days: number;
29190
+ pickup_anchor: string;
29191
+ pickup_business_days_only: boolean;
29192
+ pickup_offset_days: number;
29193
+ pickup_time_of_day: string;
29194
+ singleton: boolean;
29195
+ time_of_day: string;
29196
+ updated_at: string;
29197
+ };
29198
+ Insert: {
29199
+ anchor?: string;
29200
+ business_days_only?: boolean;
29201
+ created_at?: string;
29202
+ enabled?: boolean;
29203
+ id?: string;
29204
+ offset_days?: number;
29205
+ pickup_anchor?: string;
29206
+ pickup_business_days_only?: boolean;
29207
+ pickup_offset_days?: number;
29208
+ pickup_time_of_day?: string;
29209
+ singleton?: boolean;
29210
+ time_of_day?: string;
29211
+ updated_at?: string;
29212
+ };
29213
+ Update: {
29214
+ anchor?: string;
29215
+ business_days_only?: boolean;
29216
+ created_at?: string;
29217
+ enabled?: boolean;
29218
+ id?: string;
29219
+ offset_days?: number;
29220
+ pickup_anchor?: string;
29221
+ pickup_business_days_only?: boolean;
29222
+ pickup_offset_days?: number;
29223
+ pickup_time_of_day?: string;
29224
+ singleton?: boolean;
29225
+ time_of_day?: string;
29226
+ updated_at?: string;
29227
+ };
29228
+ Relationships: [];
29229
+ };
27872
29230
  itk_contact_persons: {
27873
29231
  Row: {
27874
29232
  created_at: string;
@@ -28181,7 +29539,6 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
28181
29539
  start_date: string;
28182
29540
  start_time: string | null;
28183
29541
  status: string;
28184
- tenant_id: string;
28185
29542
  updated_at: string;
28186
29543
  user_id: string;
28187
29544
  };
@@ -28199,7 +29556,6 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
28199
29556
  start_date: string;
28200
29557
  start_time?: string | null;
28201
29558
  status?: string;
28202
- tenant_id?: string;
28203
29559
  updated_at?: string;
28204
29560
  user_id: string;
28205
29561
  };
@@ -28217,7 +29573,6 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
28217
29573
  start_date?: string;
28218
29574
  start_time?: string | null;
28219
29575
  status?: string;
28220
- tenant_id?: string;
28221
29576
  updated_at?: string;
28222
29577
  user_id?: string;
28223
29578
  };
@@ -28225,13 +29580,13 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
28225
29580
  foreignKeyName: "leave_requests_monteur_id_fkey";
28226
29581
  columns: ["monteur_id"];
28227
29582
  isOneToOne: false;
28228
- referencedRelation: "monteurs";
29583
+ referencedRelation: "profiles";
28229
29584
  referencedColumns: ["id"];
28230
29585
  }, {
28231
29586
  foreignKeyName: "leave_requests_user_id_fkey";
28232
29587
  columns: ["user_id"];
28233
29588
  isOneToOne: false;
28234
- referencedRelation: "monteurs";
29589
+ referencedRelation: "profiles";
28235
29590
  referencedColumns: ["id"];
28236
29591
  }];
28237
29592
  };
@@ -28958,6 +30313,69 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
28958
30313
  };
28959
30314
  Relationships: [];
28960
30315
  };
30316
+ logistics_floriday_pushes: {
30317
+ Row: {
30318
+ attempts: number;
30319
+ created_at: string;
30320
+ first_queued_at: string;
30321
+ fulfillment_order_id: string | null;
30322
+ id: string;
30323
+ last_error: string | null;
30324
+ last_error_at: string | null;
30325
+ last_sent_hash: string | null;
30326
+ locked_by: string | null;
30327
+ locked_until: string | null;
30328
+ next_attempt_at: string;
30329
+ order_ref: string;
30330
+ payload: import("../integrations/supabase/types").Json;
30331
+ payload_hash: string | null;
30332
+ revision: number;
30333
+ sent_at: string | null;
30334
+ status: string;
30335
+ updated_at: string;
30336
+ };
30337
+ Insert: {
30338
+ attempts?: number;
30339
+ created_at?: string;
30340
+ first_queued_at?: string;
30341
+ fulfillment_order_id?: string | null;
30342
+ id?: string;
30343
+ last_error?: string | null;
30344
+ last_error_at?: string | null;
30345
+ last_sent_hash?: string | null;
30346
+ locked_by?: string | null;
30347
+ locked_until?: string | null;
30348
+ next_attempt_at?: string;
30349
+ order_ref: string;
30350
+ payload?: import("../integrations/supabase/types").Json;
30351
+ payload_hash?: string | null;
30352
+ revision?: number;
30353
+ sent_at?: string | null;
30354
+ status?: string;
30355
+ updated_at?: string;
30356
+ };
30357
+ Update: {
30358
+ attempts?: number;
30359
+ created_at?: string;
30360
+ first_queued_at?: string;
30361
+ fulfillment_order_id?: string | null;
30362
+ id?: string;
30363
+ last_error?: string | null;
30364
+ last_error_at?: string | null;
30365
+ last_sent_hash?: string | null;
30366
+ locked_by?: string | null;
30367
+ locked_until?: string | null;
30368
+ next_attempt_at?: string;
30369
+ order_ref?: string;
30370
+ payload?: import("../integrations/supabase/types").Json;
30371
+ payload_hash?: string | null;
30372
+ revision?: number;
30373
+ sent_at?: string | null;
30374
+ status?: string;
30375
+ updated_at?: string;
30376
+ };
30377
+ Relationships: [];
30378
+ };
28961
30379
  logistics_formulas: {
28962
30380
  Row: {
28963
30381
  created_at: string;
@@ -29036,6 +30454,45 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
29036
30454
  };
29037
30455
  Relationships: [];
29038
30456
  };
30457
+ logistics_plan_queue: {
30458
+ Row: {
30459
+ attempts: number;
30460
+ claimed_at: string | null;
30461
+ enqueued_at: string;
30462
+ error: string | null;
30463
+ id: string;
30464
+ next_attempt_at: string;
30465
+ order_id: string;
30466
+ reason: string;
30467
+ status: string;
30468
+ updated_at: string;
30469
+ };
30470
+ Insert: {
30471
+ attempts?: number;
30472
+ claimed_at?: string | null;
30473
+ enqueued_at?: string;
30474
+ error?: string | null;
30475
+ id?: string;
30476
+ next_attempt_at?: string;
30477
+ order_id: string;
30478
+ reason?: string;
30479
+ status?: string;
30480
+ updated_at?: string;
30481
+ };
30482
+ Update: {
30483
+ attempts?: number;
30484
+ claimed_at?: string | null;
30485
+ enqueued_at?: string;
30486
+ error?: string | null;
30487
+ id?: string;
30488
+ next_attempt_at?: string;
30489
+ order_id?: string;
30490
+ reason?: string;
30491
+ status?: string;
30492
+ updated_at?: string;
30493
+ };
30494
+ Relationships: [];
30495
+ };
29039
30496
  logistics_plan_runs: {
29040
30497
  Row: {
29041
30498
  created_at: string;
@@ -29111,6 +30568,24 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
29111
30568
  referencedColumns: ["id"];
29112
30569
  }];
29113
30570
  };
30571
+ logistics_plan_settings: {
30572
+ Row: {
30573
+ key: string;
30574
+ updated_at: string;
30575
+ value: string;
30576
+ };
30577
+ Insert: {
30578
+ key: string;
30579
+ updated_at?: string;
30580
+ value: string;
30581
+ };
30582
+ Update: {
30583
+ key?: string;
30584
+ updated_at?: string;
30585
+ value?: string;
30586
+ };
30587
+ Relationships: [];
30588
+ };
29114
30589
  logistics_rebuffer_state: {
29115
30590
  Row: {
29116
30591
  created_at: string;
@@ -29821,14 +31296,17 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
29821
31296
  };
29822
31297
  mailbox_messages: {
29823
31298
  Row: {
31299
+ attachments: import("../integrations/supabase/types").Json;
29824
31300
  body_html: string | null;
29825
31301
  body_text: string | null;
31302
+ cc_recipients: import("../integrations/supabase/types").Json;
29826
31303
  connection_id: string | null;
29827
31304
  created_at: string;
29828
31305
  error_message: string | null;
29829
31306
  external_id: string | null;
29830
31307
  from_email: string | null;
29831
31308
  from_name: string | null;
31309
+ has_attachments: boolean;
29832
31310
  id: string;
29833
31311
  message_id: string | null;
29834
31312
  profile_id: string | null;
@@ -29836,18 +31314,22 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
29836
31314
  received_at: string | null;
29837
31315
  status: string;
29838
31316
  subject: string | null;
31317
+ to_recipients: import("../integrations/supabase/types").Json;
29839
31318
  uid: number | null;
29840
31319
  updated_at: string;
29841
31320
  };
29842
31321
  Insert: {
31322
+ attachments?: import("../integrations/supabase/types").Json;
29843
31323
  body_html?: string | null;
29844
31324
  body_text?: string | null;
31325
+ cc_recipients?: import("../integrations/supabase/types").Json;
29845
31326
  connection_id?: string | null;
29846
31327
  created_at?: string;
29847
31328
  error_message?: string | null;
29848
31329
  external_id?: string | null;
29849
31330
  from_email?: string | null;
29850
31331
  from_name?: string | null;
31332
+ has_attachments?: boolean;
29851
31333
  id?: string;
29852
31334
  message_id?: string | null;
29853
31335
  profile_id?: string | null;
@@ -29855,18 +31337,22 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
29855
31337
  received_at?: string | null;
29856
31338
  status?: string;
29857
31339
  subject?: string | null;
31340
+ to_recipients?: import("../integrations/supabase/types").Json;
29858
31341
  uid?: number | null;
29859
31342
  updated_at?: string;
29860
31343
  };
29861
31344
  Update: {
31345
+ attachments?: import("../integrations/supabase/types").Json;
29862
31346
  body_html?: string | null;
29863
31347
  body_text?: string | null;
31348
+ cc_recipients?: import("../integrations/supabase/types").Json;
29864
31349
  connection_id?: string | null;
29865
31350
  created_at?: string;
29866
31351
  error_message?: string | null;
29867
31352
  external_id?: string | null;
29868
31353
  from_email?: string | null;
29869
31354
  from_name?: string | null;
31355
+ has_attachments?: boolean;
29870
31356
  id?: string;
29871
31357
  message_id?: string | null;
29872
31358
  profile_id?: string | null;
@@ -29874,6 +31360,7 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
29874
31360
  received_at?: string | null;
29875
31361
  status?: string;
29876
31362
  subject?: string | null;
31363
+ to_recipients?: import("../integrations/supabase/types").Json;
29877
31364
  uid?: number | null;
29878
31365
  updated_at?: string;
29879
31366
  };
@@ -30254,6 +31741,90 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
30254
31741
  };
30255
31742
  Relationships: [];
30256
31743
  };
31744
+ material_usage: {
31745
+ Row: {
31746
+ created_at: string;
31747
+ id: string;
31748
+ material_name: string;
31749
+ monteur_id: string | null;
31750
+ price_at_time: number;
31751
+ quantity_used: number;
31752
+ updated_at: string;
31753
+ van_inventory_id: string | null;
31754
+ work_order_id: string;
31755
+ };
31756
+ Insert: {
31757
+ created_at?: string;
31758
+ id?: string;
31759
+ material_name: string;
31760
+ monteur_id?: string | null;
31761
+ price_at_time?: number;
31762
+ quantity_used?: number;
31763
+ updated_at?: string;
31764
+ van_inventory_id?: string | null;
31765
+ work_order_id: string;
31766
+ };
31767
+ Update: {
31768
+ created_at?: string;
31769
+ id?: string;
31770
+ material_name?: string;
31771
+ monteur_id?: string | null;
31772
+ price_at_time?: number;
31773
+ quantity_used?: number;
31774
+ updated_at?: string;
31775
+ van_inventory_id?: string | null;
31776
+ work_order_id?: string;
31777
+ };
31778
+ Relationships: [{
31779
+ foreignKeyName: "material_usage_monteur_id_fkey";
31780
+ columns: ["monteur_id"];
31781
+ isOneToOne: false;
31782
+ referencedRelation: "profiles";
31783
+ referencedColumns: ["id"];
31784
+ }, {
31785
+ foreignKeyName: "material_usage_van_inventory_id_fkey";
31786
+ columns: ["van_inventory_id"];
31787
+ isOneToOne: false;
31788
+ referencedRelation: "van_inventories";
31789
+ referencedColumns: ["id"];
31790
+ }, {
31791
+ foreignKeyName: "material_usage_work_order_id_fkey";
31792
+ columns: ["work_order_id"];
31793
+ isOneToOne: false;
31794
+ referencedRelation: "work_orders";
31795
+ referencedColumns: ["id"];
31796
+ }];
31797
+ };
31798
+ module_features: {
31799
+ Row: {
31800
+ created_at: string;
31801
+ feature_id: string;
31802
+ id: string;
31803
+ is_active: boolean;
31804
+ last_seen_at: string;
31805
+ module_id: string;
31806
+ name: string;
31807
+ };
31808
+ Insert: {
31809
+ created_at?: string;
31810
+ feature_id: string;
31811
+ id?: string;
31812
+ is_active?: boolean;
31813
+ last_seen_at?: string;
31814
+ module_id: string;
31815
+ name: string;
31816
+ };
31817
+ Update: {
31818
+ created_at?: string;
31819
+ feature_id?: string;
31820
+ id?: string;
31821
+ is_active?: boolean;
31822
+ last_seen_at?: string;
31823
+ module_id?: string;
31824
+ name?: string;
31825
+ };
31826
+ Relationships: [];
31827
+ };
30257
31828
  module_permissions: {
30258
31829
  Row: {
30259
31830
  created_at: string;
@@ -30281,6 +31852,36 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
30281
31852
  };
30282
31853
  Relationships: [];
30283
31854
  };
31855
+ module_registry: {
31856
+ Row: {
31857
+ created_at: string;
31858
+ is_active: boolean;
31859
+ last_seen_at: string;
31860
+ module_id: string;
31861
+ name: string;
31862
+ shell_id: string | null;
31863
+ sort_order: number | null;
31864
+ };
31865
+ Insert: {
31866
+ created_at?: string;
31867
+ is_active?: boolean;
31868
+ last_seen_at?: string;
31869
+ module_id: string;
31870
+ name: string;
31871
+ shell_id?: string | null;
31872
+ sort_order?: number | null;
31873
+ };
31874
+ Update: {
31875
+ created_at?: string;
31876
+ is_active?: boolean;
31877
+ last_seen_at?: string;
31878
+ module_id?: string;
31879
+ name?: string;
31880
+ shell_id?: string | null;
31881
+ sort_order?: number | null;
31882
+ };
31883
+ Relationships: [];
31884
+ };
30284
31885
  module_runtime_config: {
30285
31886
  Row: {
30286
31887
  key: string;
@@ -30332,63 +31933,6 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
30332
31933
  };
30333
31934
  Relationships: [];
30334
31935
  };
30335
- monteurs: {
30336
- Row: {
30337
- avatar_url: string | null;
30338
- color: string | null;
30339
- created_at: string;
30340
- email: string | null;
30341
- id: string;
30342
- is_active: boolean;
30343
- leave_balance_hours: number;
30344
- name: string;
30345
- persnr: number | null;
30346
- phone: string | null;
30347
- role: string;
30348
- tenant_id: string;
30349
- updated_at: string;
30350
- user_id: string | null;
30351
- };
30352
- Insert: {
30353
- avatar_url?: string | null;
30354
- color?: string | null;
30355
- created_at?: string;
30356
- email?: string | null;
30357
- id?: string;
30358
- is_active?: boolean;
30359
- leave_balance_hours?: number;
30360
- name: string;
30361
- persnr?: number | null;
30362
- phone?: string | null;
30363
- role?: string;
30364
- tenant_id: string;
30365
- updated_at?: string;
30366
- user_id?: string | null;
30367
- };
30368
- Update: {
30369
- avatar_url?: string | null;
30370
- color?: string | null;
30371
- created_at?: string;
30372
- email?: string | null;
30373
- id?: string;
30374
- is_active?: boolean;
30375
- leave_balance_hours?: number;
30376
- name?: string;
30377
- persnr?: number | null;
30378
- phone?: string | null;
30379
- role?: string;
30380
- tenant_id?: string;
30381
- updated_at?: string;
30382
- user_id?: string | null;
30383
- };
30384
- Relationships: [{
30385
- foreignKeyName: "monteurs_tenant_id_fkey";
30386
- columns: ["tenant_id"];
30387
- isOneToOne: false;
30388
- referencedRelation: "tenants";
30389
- referencedColumns: ["id"];
30390
- }];
30391
- };
30392
31936
  nmbrs_component_mapping: {
30393
31937
  Row: {
30394
31938
  created_at: string;
@@ -30459,13 +32003,7 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
30459
32003
  nmbrs_employee_number?: string;
30460
32004
  updated_at?: string;
30461
32005
  };
30462
- Relationships: [{
30463
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
30464
- columns: ["monteur_id"];
30465
- isOneToOne: true;
30466
- referencedRelation: "monteurs";
30467
- referencedColumns: ["id"];
30468
- }];
32006
+ Relationships: [];
30469
32007
  };
30470
32008
  nmbrs_export_lines: {
30471
32009
  Row: {
@@ -30514,12 +32052,6 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
30514
32052
  wage_code?: string;
30515
32053
  };
30516
32054
  Relationships: [{
30517
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
30518
- columns: ["monteur_id"];
30519
- isOneToOne: false;
30520
- referencedRelation: "monteurs";
30521
- referencedColumns: ["id"];
30522
- }, {
30523
32055
  foreignKeyName: "nmbrs_export_lines_run_id_fkey";
30524
32056
  columns: ["run_id"];
30525
32057
  isOneToOne: false;
@@ -31340,6 +32872,45 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
31340
32872
  };
31341
32873
  Relationships: [];
31342
32874
  };
32875
+ order_invoice_links: {
32876
+ Row: {
32877
+ attempts: number;
32878
+ created_at: string;
32879
+ error_message: string | null;
32880
+ id: string;
32881
+ invoice_number: string | null;
32882
+ next_attempt_at: string;
32883
+ order_id: string;
32884
+ processed_at: string | null;
32885
+ status: string;
32886
+ updated_at: string;
32887
+ };
32888
+ Insert: {
32889
+ attempts?: number;
32890
+ created_at?: string;
32891
+ error_message?: string | null;
32892
+ id?: string;
32893
+ invoice_number?: string | null;
32894
+ next_attempt_at?: string;
32895
+ order_id: string;
32896
+ processed_at?: string | null;
32897
+ status?: string;
32898
+ updated_at?: string;
32899
+ };
32900
+ Update: {
32901
+ attempts?: number;
32902
+ created_at?: string;
32903
+ error_message?: string | null;
32904
+ id?: string;
32905
+ invoice_number?: string | null;
32906
+ next_attempt_at?: string;
32907
+ order_id?: string;
32908
+ processed_at?: string | null;
32909
+ status?: string;
32910
+ updated_at?: string;
32911
+ };
32912
+ Relationships: [];
32913
+ };
31343
32914
  order_items: {
31344
32915
  Row: {
31345
32916
  crates_per_layer: number | null;
@@ -31522,6 +33093,7 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
31522
33093
  delivery_date: string | null;
31523
33094
  floriday_sales_order_id: string | null;
31524
33095
  id: string;
33096
+ invoice_due_at: string | null;
31525
33097
  is_reservation: boolean;
31526
33098
  notes: string | null;
31527
33099
  order_date: string;
@@ -31543,6 +33115,7 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
31543
33115
  delivery_date?: string | null;
31544
33116
  floriday_sales_order_id?: string | null;
31545
33117
  id?: string;
33118
+ invoice_due_at?: string | null;
31546
33119
  is_reservation?: boolean;
31547
33120
  notes?: string | null;
31548
33121
  order_date?: string;
@@ -31564,6 +33137,7 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
31564
33137
  delivery_date?: string | null;
31565
33138
  floriday_sales_order_id?: string | null;
31566
33139
  id?: string;
33140
+ invoice_due_at?: string | null;
31567
33141
  is_reservation?: boolean;
31568
33142
  notes?: string | null;
31569
33143
  order_date?: string;
@@ -32760,22 +34334,27 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
32760
34334
  created_at: string;
32761
34335
  documentnaam: string;
32762
34336
  documenttype: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"];
34337
+ extern_job_id: string | null;
32763
34338
  foutmelding: string | null;
32764
34339
  gebruiker_id: string | null;
32765
34340
  gebruiker_naam: string;
32766
34341
  gestart_op: string | null;
32767
34342
  id: string;
34343
+ idempotentie_sleutel: string | null;
32768
34344
  is_herprint: boolean;
32769
34345
  kopieen: number;
32770
34346
  layout_id: string | null;
32771
34347
  opgepakt_op: string | null;
32772
34348
  paginas: number;
32773
34349
  payload: import("../integrations/supabase/types").Json;
34350
+ pdf_base64: string | null;
34351
+ pdf_url: string | null;
32774
34352
  pogingen: number;
32775
34353
  printer_id: string | null;
32776
34354
  render_html: string | null;
32777
34355
  status: import("../integrations/supabase/types").Database["public"]["Enums"]["print_job_status"];
32778
34356
  updated_at: string;
34357
+ volgende_poging: string | null;
32779
34358
  voltooid_op: string | null;
32780
34359
  };
32781
34360
  Insert: {
@@ -32784,22 +34363,27 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
32784
34363
  created_at?: string;
32785
34364
  documentnaam?: string;
32786
34365
  documenttype?: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"];
34366
+ extern_job_id?: string | null;
32787
34367
  foutmelding?: string | null;
32788
34368
  gebruiker_id?: string | null;
32789
34369
  gebruiker_naam?: string;
32790
34370
  gestart_op?: string | null;
32791
34371
  id?: string;
34372
+ idempotentie_sleutel?: string | null;
32792
34373
  is_herprint?: boolean;
32793
34374
  kopieen?: number;
32794
34375
  layout_id?: string | null;
32795
34376
  opgepakt_op?: string | null;
32796
34377
  paginas?: number;
32797
34378
  payload?: import("../integrations/supabase/types").Json;
34379
+ pdf_base64?: string | null;
34380
+ pdf_url?: string | null;
32798
34381
  pogingen?: number;
32799
34382
  printer_id?: string | null;
32800
34383
  render_html?: string | null;
32801
34384
  status?: import("../integrations/supabase/types").Database["public"]["Enums"]["print_job_status"];
32802
34385
  updated_at?: string;
34386
+ volgende_poging?: string | null;
32803
34387
  voltooid_op?: string | null;
32804
34388
  };
32805
34389
  Update: {
@@ -32808,22 +34392,27 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
32808
34392
  created_at?: string;
32809
34393
  documentnaam?: string;
32810
34394
  documenttype?: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"];
34395
+ extern_job_id?: string | null;
32811
34396
  foutmelding?: string | null;
32812
34397
  gebruiker_id?: string | null;
32813
34398
  gebruiker_naam?: string;
32814
34399
  gestart_op?: string | null;
32815
34400
  id?: string;
34401
+ idempotentie_sleutel?: string | null;
32816
34402
  is_herprint?: boolean;
32817
34403
  kopieen?: number;
32818
34404
  layout_id?: string | null;
32819
34405
  opgepakt_op?: string | null;
32820
34406
  paginas?: number;
32821
34407
  payload?: import("../integrations/supabase/types").Json;
34408
+ pdf_base64?: string | null;
34409
+ pdf_url?: string | null;
32822
34410
  pogingen?: number;
32823
34411
  printer_id?: string | null;
32824
34412
  render_html?: string | null;
32825
34413
  status?: import("../integrations/supabase/types").Database["public"]["Enums"]["print_job_status"];
32826
34414
  updated_at?: string;
34415
+ volgende_poging?: string | null;
32827
34416
  voltooid_op?: string | null;
32828
34417
  };
32829
34418
  Relationships: [{
@@ -32846,6 +34435,72 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
32846
34435
  referencedColumns: ["id"];
32847
34436
  }];
32848
34437
  };
34438
+ print_queue_runners: {
34439
+ Row: {
34440
+ actief: boolean;
34441
+ basis_url: string;
34442
+ created_at: string;
34443
+ id: string;
34444
+ laatst_gezien: string;
34445
+ laatste_fout: string | null;
34446
+ laatste_request_id: number | null;
34447
+ mislukte_posts: number;
34448
+ tick_sleutel: string;
34449
+ updated_at: string;
34450
+ };
34451
+ Insert: {
34452
+ actief?: boolean;
34453
+ basis_url: string;
34454
+ created_at?: string;
34455
+ id?: string;
34456
+ laatst_gezien?: string;
34457
+ laatste_fout?: string | null;
34458
+ laatste_request_id?: number | null;
34459
+ mislukte_posts?: number;
34460
+ tick_sleutel?: string;
34461
+ updated_at?: string;
34462
+ };
34463
+ Update: {
34464
+ actief?: boolean;
34465
+ basis_url?: string;
34466
+ created_at?: string;
34467
+ id?: string;
34468
+ laatst_gezien?: string;
34469
+ laatste_fout?: string | null;
34470
+ laatste_request_id?: number | null;
34471
+ mislukte_posts?: number;
34472
+ tick_sleutel?: string;
34473
+ updated_at?: string;
34474
+ };
34475
+ Relationships: [];
34476
+ };
34477
+ print_queue_settings: {
34478
+ Row: {
34479
+ bewaar_bestanden_dagen: number;
34480
+ bewaar_opdrachten_dagen: number;
34481
+ created_at: string;
34482
+ dubbel_venster_minuten: number;
34483
+ id: string;
34484
+ updated_at: string;
34485
+ };
34486
+ Insert: {
34487
+ bewaar_bestanden_dagen?: number;
34488
+ bewaar_opdrachten_dagen?: number;
34489
+ created_at?: string;
34490
+ dubbel_venster_minuten?: number;
34491
+ id?: string;
34492
+ updated_at?: string;
34493
+ };
34494
+ Update: {
34495
+ bewaar_bestanden_dagen?: number;
34496
+ bewaar_opdrachten_dagen?: number;
34497
+ created_at?: string;
34498
+ dubbel_venster_minuten?: number;
34499
+ id?: string;
34500
+ updated_at?: string;
34501
+ };
34502
+ Relationships: [];
34503
+ };
32849
34504
  print_rules: {
32850
34505
  Row: {
32851
34506
  actief: boolean;
@@ -33006,6 +34661,7 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
33006
34661
  agent_id: string | null;
33007
34662
  created_at: string;
33008
34663
  driver: string;
34664
+ extern_printer_id: string | null;
33009
34665
  id: string;
33010
34666
  ip_adres: string | null;
33011
34667
  laatst_gezien: string | null;
@@ -33027,6 +34683,7 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
33027
34683
  agent_id?: string | null;
33028
34684
  created_at?: string;
33029
34685
  driver?: string;
34686
+ extern_printer_id?: string | null;
33030
34687
  id?: string;
33031
34688
  ip_adres?: string | null;
33032
34689
  laatst_gezien?: string | null;
@@ -33048,6 +34705,7 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
33048
34705
  agent_id?: string | null;
33049
34706
  created_at?: string;
33050
34707
  driver?: string;
34708
+ extern_printer_id?: string | null;
33051
34709
  id?: string;
33052
34710
  ip_adres?: string | null;
33053
34711
  laatst_gezien?: string | null;
@@ -34319,6 +35977,96 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
34319
35977
  referencedColumns: ["id"];
34320
35978
  }];
34321
35979
  };
35980
+ role_assignments: {
35981
+ Row: {
35982
+ created_at: string;
35983
+ id: string;
35984
+ role_id: string;
35985
+ user_id: string;
35986
+ };
35987
+ Insert: {
35988
+ created_at?: string;
35989
+ id?: string;
35990
+ role_id: string;
35991
+ user_id: string;
35992
+ };
35993
+ Update: {
35994
+ created_at?: string;
35995
+ id?: string;
35996
+ role_id?: string;
35997
+ user_id?: string;
35998
+ };
35999
+ Relationships: [{
36000
+ foreignKeyName: "role_assignments_role_id_fkey";
36001
+ columns: ["role_id"];
36002
+ isOneToOne: false;
36003
+ referencedRelation: "roles";
36004
+ referencedColumns: ["id"];
36005
+ }];
36006
+ };
36007
+ role_permissions: {
36008
+ Row: {
36009
+ can_edit: boolean;
36010
+ can_view: boolean;
36011
+ feature_id: string;
36012
+ id: string;
36013
+ module_id: string;
36014
+ role_id: string;
36015
+ updated_at: string;
36016
+ };
36017
+ Insert: {
36018
+ can_edit?: boolean;
36019
+ can_view?: boolean;
36020
+ feature_id?: string;
36021
+ id?: string;
36022
+ module_id: string;
36023
+ role_id: string;
36024
+ updated_at?: string;
36025
+ };
36026
+ Update: {
36027
+ can_edit?: boolean;
36028
+ can_view?: boolean;
36029
+ feature_id?: string;
36030
+ id?: string;
36031
+ module_id?: string;
36032
+ role_id?: string;
36033
+ updated_at?: string;
36034
+ };
36035
+ Relationships: [{
36036
+ foreignKeyName: "role_permissions_role_id_fkey";
36037
+ columns: ["role_id"];
36038
+ isOneToOne: false;
36039
+ referencedRelation: "roles";
36040
+ referencedColumns: ["id"];
36041
+ }];
36042
+ };
36043
+ roles: {
36044
+ Row: {
36045
+ created_at: string;
36046
+ id: string;
36047
+ is_protected: boolean;
36048
+ key: string;
36049
+ name: string;
36050
+ updated_at: string;
36051
+ };
36052
+ Insert: {
36053
+ created_at?: string;
36054
+ id?: string;
36055
+ is_protected?: boolean;
36056
+ key: string;
36057
+ name: string;
36058
+ updated_at?: string;
36059
+ };
36060
+ Update: {
36061
+ created_at?: string;
36062
+ id?: string;
36063
+ is_protected?: boolean;
36064
+ key?: string;
36065
+ name?: string;
36066
+ updated_at?: string;
36067
+ };
36068
+ Relationships: [];
36069
+ };
34322
36070
  rooms: {
34323
36071
  Row: {
34324
36072
  capacity: number;
@@ -34988,6 +36736,54 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
34988
36736
  };
34989
36737
  Relationships: [];
34990
36738
  };
36739
+ time_compensation_entries: {
36740
+ Row: {
36741
+ created_at: string;
36742
+ employee_id: string;
36743
+ entry_date: string;
36744
+ id: string;
36745
+ km: number;
36746
+ meal_allowance: number;
36747
+ notes: string | null;
36748
+ standby_evening: number;
36749
+ standby_weekend: number;
36750
+ tvt_change: number;
36751
+ updated_at: string;
36752
+ };
36753
+ Insert: {
36754
+ created_at?: string;
36755
+ employee_id: string;
36756
+ entry_date: string;
36757
+ id?: string;
36758
+ km?: number;
36759
+ meal_allowance?: number;
36760
+ notes?: string | null;
36761
+ standby_evening?: number;
36762
+ standby_weekend?: number;
36763
+ tvt_change?: number;
36764
+ updated_at?: string;
36765
+ };
36766
+ Update: {
36767
+ created_at?: string;
36768
+ employee_id?: string;
36769
+ entry_date?: string;
36770
+ id?: string;
36771
+ km?: number;
36772
+ meal_allowance?: number;
36773
+ notes?: string | null;
36774
+ standby_evening?: number;
36775
+ standby_weekend?: number;
36776
+ tvt_change?: number;
36777
+ updated_at?: string;
36778
+ };
36779
+ Relationships: [{
36780
+ foreignKeyName: "time_compensation_entries_employee_id_fkey";
36781
+ columns: ["employee_id"];
36782
+ isOneToOne: false;
36783
+ referencedRelation: "profiles";
36784
+ referencedColumns: ["id"];
36785
+ }];
36786
+ };
34991
36787
  time_entries: {
34992
36788
  Row: {
34993
36789
  created_at: string;
@@ -35022,65 +36818,170 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
35022
36818
  undertime?: number;
35023
36819
  updated_at?: string;
35024
36820
  };
36821
+ Relationships: [];
36822
+ };
36823
+ time_log_week_approvals: {
36824
+ Row: {
36825
+ approved_at: string | null;
36826
+ approved_by: string | null;
36827
+ created_at: string;
36828
+ employee_id: string;
36829
+ id: string;
36830
+ locked: boolean;
36831
+ notes: string | null;
36832
+ status: string;
36833
+ submitted_at: string | null;
36834
+ updated_at: string;
36835
+ week_start: string;
36836
+ };
36837
+ Insert: {
36838
+ approved_at?: string | null;
36839
+ approved_by?: string | null;
36840
+ created_at?: string;
36841
+ employee_id: string;
36842
+ id?: string;
36843
+ locked?: boolean;
36844
+ notes?: string | null;
36845
+ status?: string;
36846
+ submitted_at?: string | null;
36847
+ updated_at?: string;
36848
+ week_start: string;
36849
+ };
36850
+ Update: {
36851
+ approved_at?: string | null;
36852
+ approved_by?: string | null;
36853
+ created_at?: string;
36854
+ employee_id?: string;
36855
+ id?: string;
36856
+ locked?: boolean;
36857
+ notes?: string | null;
36858
+ status?: string;
36859
+ submitted_at?: string | null;
36860
+ updated_at?: string;
36861
+ week_start?: string;
36862
+ };
35025
36863
  Relationships: [{
35026
- foreignKeyName: "time_entries_employee_id_fkey";
36864
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
35027
36865
  columns: ["employee_id"];
35028
36866
  isOneToOne: false;
35029
- referencedRelation: "monteurs";
36867
+ referencedRelation: "profiles";
35030
36868
  referencedColumns: ["id"];
35031
36869
  }];
35032
36870
  };
35033
36871
  time_logs: {
35034
36872
  Row: {
36873
+ auto_stop_reason: string | null;
36874
+ auto_stopped: boolean;
35035
36875
  created_at: string;
36876
+ current_latitude: number | null;
36877
+ current_longitude: number | null;
36878
+ current_position_updated_at: string | null;
35036
36879
  employee_id: string;
36880
+ end_latitude: number | null;
36881
+ end_longitude: number | null;
35037
36882
  end_time: string | null;
36883
+ eta_distance_km: number | null;
36884
+ eta_minutes: number | null;
36885
+ eta_updated_at: string | null;
36886
+ hour_category: string | null;
35038
36887
  id: string;
36888
+ last_reminder_at: string | null;
35039
36889
  notes: string | null;
35040
36890
  overtime_hours: number;
35041
36891
  overtime_type: string | null;
35042
36892
  regular_hours: number;
36893
+ reminder_count: number;
36894
+ requires_review: boolean;
36895
+ start_latitude: number | null;
36896
+ start_longitude: number | null;
35043
36897
  start_time: string;
35044
36898
  travel_cost: number | null;
35045
36899
  travel_distance_km: number | null;
36900
+ travel_duration_min: number | null;
36901
+ travel_time_minutes: number | null;
35046
36902
  type: string;
35047
36903
  updated_at: string;
36904
+ work_order_id: string | null;
35048
36905
  };
35049
36906
  Insert: {
36907
+ auto_stop_reason?: string | null;
36908
+ auto_stopped?: boolean;
35050
36909
  created_at?: string;
36910
+ current_latitude?: number | null;
36911
+ current_longitude?: number | null;
36912
+ current_position_updated_at?: string | null;
35051
36913
  employee_id: string;
36914
+ end_latitude?: number | null;
36915
+ end_longitude?: number | null;
35052
36916
  end_time?: string | null;
36917
+ eta_distance_km?: number | null;
36918
+ eta_minutes?: number | null;
36919
+ eta_updated_at?: string | null;
36920
+ hour_category?: string | null;
35053
36921
  id?: string;
36922
+ last_reminder_at?: string | null;
35054
36923
  notes?: string | null;
35055
36924
  overtime_hours?: number;
35056
36925
  overtime_type?: string | null;
35057
36926
  regular_hours?: number;
36927
+ reminder_count?: number;
36928
+ requires_review?: boolean;
36929
+ start_latitude?: number | null;
36930
+ start_longitude?: number | null;
35058
36931
  start_time?: string;
35059
36932
  travel_cost?: number | null;
35060
36933
  travel_distance_km?: number | null;
36934
+ travel_duration_min?: number | null;
36935
+ travel_time_minutes?: number | null;
35061
36936
  type: string;
35062
36937
  updated_at?: string;
36938
+ work_order_id?: string | null;
35063
36939
  };
35064
36940
  Update: {
36941
+ auto_stop_reason?: string | null;
36942
+ auto_stopped?: boolean;
35065
36943
  created_at?: string;
36944
+ current_latitude?: number | null;
36945
+ current_longitude?: number | null;
36946
+ current_position_updated_at?: string | null;
35066
36947
  employee_id?: string;
36948
+ end_latitude?: number | null;
36949
+ end_longitude?: number | null;
35067
36950
  end_time?: string | null;
36951
+ eta_distance_km?: number | null;
36952
+ eta_minutes?: number | null;
36953
+ eta_updated_at?: string | null;
36954
+ hour_category?: string | null;
35068
36955
  id?: string;
36956
+ last_reminder_at?: string | null;
35069
36957
  notes?: string | null;
35070
36958
  overtime_hours?: number;
35071
36959
  overtime_type?: string | null;
35072
36960
  regular_hours?: number;
36961
+ reminder_count?: number;
36962
+ requires_review?: boolean;
36963
+ start_latitude?: number | null;
36964
+ start_longitude?: number | null;
35073
36965
  start_time?: string;
35074
36966
  travel_cost?: number | null;
35075
36967
  travel_distance_km?: number | null;
36968
+ travel_duration_min?: number | null;
36969
+ travel_time_minutes?: number | null;
35076
36970
  type?: string;
35077
36971
  updated_at?: string;
36972
+ work_order_id?: string | null;
35078
36973
  };
35079
36974
  Relationships: [{
35080
36975
  foreignKeyName: "time_logs_employee_id_fkey";
35081
36976
  columns: ["employee_id"];
35082
36977
  isOneToOne: false;
35083
- referencedRelation: "monteurs";
36978
+ referencedRelation: "profiles";
36979
+ referencedColumns: ["id"];
36980
+ }, {
36981
+ foreignKeyName: "time_logs_work_order_id_fkey";
36982
+ columns: ["work_order_id"];
36983
+ isOneToOne: false;
36984
+ referencedRelation: "work_orders";
35084
36985
  referencedColumns: ["id"];
35085
36986
  }];
35086
36987
  };
@@ -35119,7 +37020,7 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
35119
37020
  foreignKeyName: "time_off_entries_employee_id_fkey";
35120
37021
  columns: ["employee_id"];
35121
37022
  isOneToOne: false;
35122
- referencedRelation: "monteurs";
37023
+ referencedRelation: "profiles";
35123
37024
  referencedColumns: ["id"];
35124
37025
  }];
35125
37026
  };
@@ -35429,6 +37330,39 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
35429
37330
  };
35430
37331
  Relationships: [];
35431
37332
  };
37333
+ twinfield_cron_locks: {
37334
+ Row: {
37335
+ created_at: string;
37336
+ heartbeat_at: string;
37337
+ job_name: string;
37338
+ last_error: string | null;
37339
+ last_finished_at: string | null;
37340
+ locked_at: string;
37341
+ run_id: string;
37342
+ updated_at: string;
37343
+ };
37344
+ Insert: {
37345
+ created_at?: string;
37346
+ heartbeat_at?: string;
37347
+ job_name: string;
37348
+ last_error?: string | null;
37349
+ last_finished_at?: string | null;
37350
+ locked_at?: string;
37351
+ run_id?: string;
37352
+ updated_at?: string;
37353
+ };
37354
+ Update: {
37355
+ created_at?: string;
37356
+ heartbeat_at?: string;
37357
+ job_name?: string;
37358
+ last_error?: string | null;
37359
+ last_finished_at?: string | null;
37360
+ locked_at?: string;
37361
+ run_id?: string;
37362
+ updated_at?: string;
37363
+ };
37364
+ Relationships: [];
37365
+ };
35432
37366
  twinfield_customers: {
35433
37367
  Row: {
35434
37368
  address: string | null;
@@ -35683,6 +37617,8 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
35683
37617
  };
35684
37618
  twinfield_invoice_settings: {
35685
37619
  Row: {
37620
+ auto_invoice_enabled: boolean;
37621
+ auto_invoice_trigger_statuses: string[];
35686
37622
  created_at: string;
35687
37623
  debtor_gl_account: string;
35688
37624
  default_credit_invoice_type: string | null;
@@ -35703,6 +37639,8 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
35703
37639
  vat_code_export: string | null;
35704
37640
  };
35705
37641
  Insert: {
37642
+ auto_invoice_enabled?: boolean;
37643
+ auto_invoice_trigger_statuses?: string[];
35706
37644
  created_at?: string;
35707
37645
  debtor_gl_account?: string;
35708
37646
  default_credit_invoice_type?: string | null;
@@ -35723,6 +37661,8 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
35723
37661
  vat_code_export?: string | null;
35724
37662
  };
35725
37663
  Update: {
37664
+ auto_invoice_enabled?: boolean;
37665
+ auto_invoice_trigger_statuses?: string[];
35726
37666
  created_at?: string;
35727
37667
  debtor_gl_account?: string;
35728
37668
  default_credit_invoice_type?: string | null;
@@ -36023,6 +37963,7 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
36023
37963
  twinfield_push_queue: {
36024
37964
  Row: {
36025
37965
  action: string;
37966
+ attempt_started_at: string | null;
36026
37967
  attempts: number;
36027
37968
  connection_id: string | null;
36028
37969
  created_at: string;
@@ -36039,6 +37980,7 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
36039
37980
  };
36040
37981
  Insert: {
36041
37982
  action?: string;
37983
+ attempt_started_at?: string | null;
36042
37984
  attempts?: number;
36043
37985
  connection_id?: string | null;
36044
37986
  created_at?: string;
@@ -36055,6 +37997,7 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
36055
37997
  };
36056
37998
  Update: {
36057
37999
  action?: string;
38000
+ attempt_started_at?: string | null;
36058
38001
  attempts?: number;
36059
38002
  connection_id?: string | null;
36060
38003
  created_at?: string;
@@ -36252,13 +38195,7 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
36252
38195
  workday_end?: string | null;
36253
38196
  workday_start?: string | null;
36254
38197
  };
36255
- Relationships: [{
36256
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
36257
- columns: ["monteur_id"];
36258
- isOneToOne: true;
36259
- referencedRelation: "monteurs";
36260
- referencedColumns: ["id"];
36261
- }];
38198
+ Relationships: [];
36262
38199
  };
36263
38200
  uren_entries: {
36264
38201
  Row: {
@@ -36304,12 +38241,6 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
36304
38241
  werkbon_id?: string | null;
36305
38242
  };
36306
38243
  Relationships: [{
36307
- foreignKeyName: "uren_entries_monteur_id_fkey";
36308
- columns: ["monteur_id"];
36309
- isOneToOne: false;
36310
- referencedRelation: "monteurs";
36311
- referencedColumns: ["id"];
36312
- }, {
36313
38244
  foreignKeyName: "uren_entries_werkbon_id_fkey";
36314
38245
  columns: ["werkbon_id"];
36315
38246
  isOneToOne: false;
@@ -36777,13 +38708,37 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
36777
38708
  submitted_at?: string | null;
36778
38709
  updated_at?: string;
36779
38710
  };
36780
- Relationships: [{
36781
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
36782
- columns: ["monteur_id"];
36783
- isOneToOne: false;
36784
- referencedRelation: "monteurs";
36785
- referencedColumns: ["id"];
36786
- }];
38711
+ Relationships: [];
38712
+ };
38713
+ user_module_permissions: {
38714
+ Row: {
38715
+ created_at: string;
38716
+ feature_id: string;
38717
+ id: string;
38718
+ module_id: string;
38719
+ permission: string;
38720
+ updated_at: string;
38721
+ user_id: string;
38722
+ };
38723
+ Insert: {
38724
+ created_at?: string;
38725
+ feature_id?: string;
38726
+ id?: string;
38727
+ module_id: string;
38728
+ permission: string;
38729
+ updated_at?: string;
38730
+ user_id: string;
38731
+ };
38732
+ Update: {
38733
+ created_at?: string;
38734
+ feature_id?: string;
38735
+ id?: string;
38736
+ module_id?: string;
38737
+ permission?: string;
38738
+ updated_at?: string;
38739
+ user_id?: string;
38740
+ };
38741
+ Relationships: [];
36787
38742
  };
36788
38743
  user_roles: {
36789
38744
  Row: {
@@ -36812,6 +38767,51 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
36812
38767
  referencedColumns: ["id"];
36813
38768
  }];
36814
38769
  };
38770
+ van_inventories: {
38771
+ Row: {
38772
+ barcode: string | null;
38773
+ created_at: string;
38774
+ id: string;
38775
+ monteur_id: string | null;
38776
+ price_per_unit: number;
38777
+ product_name: string;
38778
+ quantity_current: number;
38779
+ quantity_min: number;
38780
+ unit: string;
38781
+ updated_at: string;
38782
+ };
38783
+ Insert: {
38784
+ barcode?: string | null;
38785
+ created_at?: string;
38786
+ id?: string;
38787
+ monteur_id?: string | null;
38788
+ price_per_unit?: number;
38789
+ product_name: string;
38790
+ quantity_current?: number;
38791
+ quantity_min?: number;
38792
+ unit?: string;
38793
+ updated_at?: string;
38794
+ };
38795
+ Update: {
38796
+ barcode?: string | null;
38797
+ created_at?: string;
38798
+ id?: string;
38799
+ monteur_id?: string | null;
38800
+ price_per_unit?: number;
38801
+ product_name?: string;
38802
+ quantity_current?: number;
38803
+ quantity_min?: number;
38804
+ unit?: string;
38805
+ updated_at?: string;
38806
+ };
38807
+ Relationships: [{
38808
+ foreignKeyName: "van_inventories_monteur_id_fkey";
38809
+ columns: ["monteur_id"];
38810
+ isOneToOne: false;
38811
+ referencedRelation: "profiles";
38812
+ referencedColumns: ["id"];
38813
+ }];
38814
+ };
36815
38815
  voorraad_custom_fields: {
36816
38816
  Row: {
36817
38817
  created_at: string;
@@ -37762,7 +39762,7 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
37762
39762
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
37763
39763
  columns: ["monteur_id"];
37764
39764
  isOneToOne: false;
37765
- referencedRelation: "monteurs";
39765
+ referencedRelation: "profiles";
37766
39766
  referencedColumns: ["id"];
37767
39767
  }, {
37768
39768
  foreignKeyName: "work_order_monteurs_work_order_id_fkey";
@@ -37772,6 +39772,60 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
37772
39772
  referencedColumns: ["id"];
37773
39773
  }];
37774
39774
  };
39775
+ work_order_photos: {
39776
+ Row: {
39777
+ ai_caption: string | null;
39778
+ ai_categorized_at: string | null;
39779
+ ai_labels: import("../integrations/supabase/types").Json | null;
39780
+ caption: string | null;
39781
+ created_at: string;
39782
+ id: string;
39783
+ monteur_id: string | null;
39784
+ photo_type: string;
39785
+ storage_path: string;
39786
+ updated_at: string;
39787
+ work_order_id: string;
39788
+ };
39789
+ Insert: {
39790
+ ai_caption?: string | null;
39791
+ ai_categorized_at?: string | null;
39792
+ ai_labels?: import("../integrations/supabase/types").Json | null;
39793
+ caption?: string | null;
39794
+ created_at?: string;
39795
+ id?: string;
39796
+ monteur_id?: string | null;
39797
+ photo_type?: string;
39798
+ storage_path: string;
39799
+ updated_at?: string;
39800
+ work_order_id: string;
39801
+ };
39802
+ Update: {
39803
+ ai_caption?: string | null;
39804
+ ai_categorized_at?: string | null;
39805
+ ai_labels?: import("../integrations/supabase/types").Json | null;
39806
+ caption?: string | null;
39807
+ created_at?: string;
39808
+ id?: string;
39809
+ monteur_id?: string | null;
39810
+ photo_type?: string;
39811
+ storage_path?: string;
39812
+ updated_at?: string;
39813
+ work_order_id?: string;
39814
+ };
39815
+ Relationships: [{
39816
+ foreignKeyName: "work_order_photos_monteur_id_fkey";
39817
+ columns: ["monteur_id"];
39818
+ isOneToOne: false;
39819
+ referencedRelation: "profiles";
39820
+ referencedColumns: ["id"];
39821
+ }, {
39822
+ foreignKeyName: "work_order_photos_work_order_id_fkey";
39823
+ columns: ["work_order_id"];
39824
+ isOneToOne: false;
39825
+ referencedRelation: "work_orders";
39826
+ referencedColumns: ["id"];
39827
+ }];
39828
+ };
37775
39829
  work_orders: {
37776
39830
  Row: {
37777
39831
  assigned_to: string | null;
@@ -37803,7 +39857,6 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
37803
39857
  scheduled_end_time: string | null;
37804
39858
  scheduled_start_time: string | null;
37805
39859
  status: string;
37806
- tenant_id: string;
37807
39860
  total_hours_worked: number | null;
37808
39861
  total_price: number | null;
37809
39862
  travel_time_minutes: number | null;
@@ -37841,7 +39894,6 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
37841
39894
  scheduled_end_time?: string | null;
37842
39895
  scheduled_start_time?: string | null;
37843
39896
  status?: string;
37844
- tenant_id: string;
37845
39897
  total_hours_worked?: number | null;
37846
39898
  total_price?: number | null;
37847
39899
  travel_time_minutes?: number | null;
@@ -37879,7 +39931,6 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
37879
39931
  scheduled_end_time?: string | null;
37880
39932
  scheduled_start_time?: string | null;
37881
39933
  status?: string;
37882
- tenant_id?: string;
37883
39934
  total_hours_worked?: number | null;
37884
39935
  total_price?: number | null;
37885
39936
  travel_time_minutes?: number | null;
@@ -37893,12 +39944,6 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
37893
39944
  isOneToOne: false;
37894
39945
  referencedRelation: "work_orders";
37895
39946
  referencedColumns: ["id"];
37896
- }, {
37897
- foreignKeyName: "work_orders_tenant_id_fkey";
37898
- columns: ["tenant_id"];
37899
- isOneToOne: false;
37900
- referencedRelation: "tenants";
37901
- referencedColumns: ["id"];
37902
39947
  }];
37903
39948
  };
37904
39949
  };
@@ -38618,6 +40663,10 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
38618
40663
  processed_items: number;
38619
40664
  }[];
38620
40665
  };
40666
+ backfill_order_auto_invoice_queue: {
40667
+ Args: never;
40668
+ Returns: number;
40669
+ };
38621
40670
  calculate_layer_stock: {
38622
40671
  Args: {
38623
40672
  p_product_id: string;
@@ -38630,6 +40679,10 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
38630
40679
  };
38631
40680
  Returns: number;
38632
40681
  };
40682
+ can_manage_hours: {
40683
+ Args: never;
40684
+ Returns: boolean;
40685
+ };
38633
40686
  check_offer_product_available_stock: {
38634
40687
  Args: {
38635
40688
  p_campaign_product_id: string;
@@ -38652,6 +40705,46 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
38652
40705
  };
38653
40706
  Returns: import("../integrations/supabase/types").Json;
38654
40707
  };
40708
+ claim_cloud_print_jobs: {
40709
+ Args: {
40710
+ _max?: number;
40711
+ };
40712
+ Returns: {
40713
+ agent_id: string | null;
40714
+ bron_job_id: string | null;
40715
+ created_at: string;
40716
+ documentnaam: string;
40717
+ documenttype: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"];
40718
+ extern_job_id: string | null;
40719
+ foutmelding: string | null;
40720
+ gebruiker_id: string | null;
40721
+ gebruiker_naam: string;
40722
+ gestart_op: string | null;
40723
+ id: string;
40724
+ idempotentie_sleutel: string | null;
40725
+ is_herprint: boolean;
40726
+ kopieen: number;
40727
+ layout_id: string | null;
40728
+ opgepakt_op: string | null;
40729
+ paginas: number;
40730
+ payload: import("../integrations/supabase/types").Json;
40731
+ pdf_base64: string | null;
40732
+ pdf_url: string | null;
40733
+ pogingen: number;
40734
+ printer_id: string | null;
40735
+ render_html: string | null;
40736
+ status: import("../integrations/supabase/types").Database["public"]["Enums"]["print_job_status"];
40737
+ updated_at: string;
40738
+ volgende_poging: string | null;
40739
+ voltooid_op: string | null;
40740
+ }[];
40741
+ SetofOptions: {
40742
+ from: "*";
40743
+ to: "print_jobs";
40744
+ isOneToOne: false;
40745
+ isSetofReturn: true;
40746
+ };
40747
+ };
38655
40748
  claim_floriday_stock_queue: {
38656
40749
  Args: {
38657
40750
  p_limit?: number;
@@ -38742,22 +40835,27 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
38742
40835
  created_at: string;
38743
40836
  documentnaam: string;
38744
40837
  documenttype: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"];
40838
+ extern_job_id: string | null;
38745
40839
  foutmelding: string | null;
38746
40840
  gebruiker_id: string | null;
38747
40841
  gebruiker_naam: string;
38748
40842
  gestart_op: string | null;
38749
40843
  id: string;
40844
+ idempotentie_sleutel: string | null;
38750
40845
  is_herprint: boolean;
38751
40846
  kopieen: number;
38752
40847
  layout_id: string | null;
38753
40848
  opgepakt_op: string | null;
38754
40849
  paginas: number;
38755
40850
  payload: import("../integrations/supabase/types").Json;
40851
+ pdf_base64: string | null;
40852
+ pdf_url: string | null;
38756
40853
  pogingen: number;
38757
40854
  printer_id: string | null;
38758
40855
  render_html: string | null;
38759
40856
  status: import("../integrations/supabase/types").Database["public"]["Enums"]["print_job_status"];
38760
40857
  updated_at: string;
40858
+ volgende_poging: string | null;
38761
40859
  voltooid_op: string | null;
38762
40860
  }[];
38763
40861
  SetofOptions: {
@@ -38774,6 +40872,7 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
38774
40872
  };
38775
40873
  Returns: {
38776
40874
  action: string;
40875
+ attempt_started_at: string | null;
38777
40876
  attempts: number;
38778
40877
  connection_id: string | null;
38779
40878
  created_at: string;
@@ -38803,6 +40902,10 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
38803
40902
  Args: never;
38804
40903
  Returns: undefined;
38805
40904
  };
40905
+ cleanup_voorraad_module_history: {
40906
+ Args: never;
40907
+ Returns: undefined;
40908
+ };
38806
40909
  complete_floriday_stock_queue: {
38807
40910
  Args: {
38808
40911
  p_attempt_id?: string;
@@ -38857,6 +40960,30 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
38857
40960
  agent_naam: string;
38858
40961
  }[];
38859
40962
  };
40963
+ consume_van_inventory: {
40964
+ Args: {
40965
+ p_inventory_id: string;
40966
+ p_quantity: number;
40967
+ };
40968
+ Returns: {
40969
+ barcode: string | null;
40970
+ created_at: string;
40971
+ id: string;
40972
+ monteur_id: string | null;
40973
+ price_per_unit: number;
40974
+ product_name: string;
40975
+ quantity_current: number;
40976
+ quantity_min: number;
40977
+ unit: string;
40978
+ updated_at: string;
40979
+ };
40980
+ SetofOptions: {
40981
+ from: "*";
40982
+ to: "van_inventories";
40983
+ isOneToOne: true;
40984
+ isSetofReturn: false;
40985
+ };
40986
+ };
38860
40987
  control_get_todays_carts: {
38861
40988
  Args: never;
38862
40989
  Returns: {
@@ -38924,6 +41051,20 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
38924
41051
  };
38925
41052
  Returns: import("../integrations/supabase/types").Json;
38926
41053
  };
41054
+ effective_module_permission: {
41055
+ Args: {
41056
+ _module_id: string;
41057
+ _user_id: string;
41058
+ };
41059
+ Returns: string;
41060
+ } | {
41061
+ Args: {
41062
+ _feature_id?: string;
41063
+ _module_id: string;
41064
+ _user_id: string;
41065
+ };
41066
+ Returns: string;
41067
+ };
38927
41068
  email_auth_decrypt: {
38928
41069
  Args: {
38929
41070
  cipher: string;
@@ -39274,12 +41415,6 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
39274
41415
  Args: never;
39275
41416
  Returns: string;
39276
41417
  };
39277
- get_work_order_tenant_id: {
39278
- Args: {
39279
- wo_id: string;
39280
- };
39281
- Returns: string;
39282
- };
39283
41418
  has_module_permission: {
39284
41419
  Args: {
39285
41420
  _min: string;
@@ -39313,6 +41448,13 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
39313
41448
  };
39314
41449
  Returns: boolean;
39315
41450
  };
41451
+ is_time_log_week_locked: {
41452
+ Args: {
41453
+ p_employee_id: string;
41454
+ p_start_time: string;
41455
+ };
41456
+ Returns: boolean;
41457
+ };
39316
41458
  is_user_admin: {
39317
41459
  Args: never;
39318
41460
  Returns: boolean;
@@ -39327,13 +41469,14 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
39327
41469
  };
39328
41470
  Returns: boolean;
39329
41471
  };
39330
- list_monteurs: {
41472
+ list_medewerkers: {
39331
41473
  Args: never;
39332
41474
  Returns: {
39333
41475
  avatar_url: string;
39334
41476
  display_name: string;
39335
41477
  email: string;
39336
41478
  id: string;
41479
+ roles: string[];
39337
41480
  }[];
39338
41481
  };
39339
41482
  list_my_planning_items: {
@@ -39727,6 +41870,51 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
39727
41870
  isSetofReturn: false;
39728
41871
  };
39729
41872
  };
41873
+ logistics_floriday_claim_pushes: {
41874
+ Args: {
41875
+ _lease_seconds?: number;
41876
+ _limit?: number;
41877
+ _worker?: string;
41878
+ };
41879
+ Returns: {
41880
+ attempts: number;
41881
+ fulfillment_order_id: string;
41882
+ id: string;
41883
+ last_sent_hash: string;
41884
+ order_ref: string;
41885
+ payload: import("../integrations/supabase/types").Json;
41886
+ payload_hash: string;
41887
+ revision: number;
41888
+ }[];
41889
+ };
41890
+ logistics_floriday_finish_push: {
41891
+ Args: {
41892
+ _error?: string;
41893
+ _fulfillment_order_id?: string;
41894
+ _id: string;
41895
+ _max_age_hours?: number;
41896
+ _max_attempts?: number;
41897
+ _ok: boolean;
41898
+ _permanent?: boolean;
41899
+ _revision: number;
41900
+ _sent_hash?: string;
41901
+ };
41902
+ Returns: string;
41903
+ };
41904
+ logistics_floriday_prune_pushes: {
41905
+ Args: {
41906
+ _days?: number;
41907
+ };
41908
+ Returns: number;
41909
+ };
41910
+ logistics_floriday_queue_push: {
41911
+ Args: {
41912
+ _order_ref: string;
41913
+ _payload?: import("../integrations/supabase/types").Json;
41914
+ _payload_hash?: string;
41915
+ };
41916
+ Returns: string;
41917
+ };
39730
41918
  logistics_live_carriers: {
39731
41919
  Args: {
39732
41920
  p_order_ref: string;
@@ -39779,6 +41967,65 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
39779
41967
  };
39780
41968
  Returns: number;
39781
41969
  };
41970
+ logistics_plan_claim: {
41971
+ Args: {
41972
+ p_limit?: number;
41973
+ };
41974
+ Returns: {
41975
+ attempts: number;
41976
+ id: string;
41977
+ order_id: string;
41978
+ }[];
41979
+ };
41980
+ logistics_plan_enqueue: {
41981
+ Args: {
41982
+ p_order_id: string;
41983
+ p_reason?: string;
41984
+ };
41985
+ Returns: undefined;
41986
+ };
41987
+ logistics_plan_ensure_event: {
41988
+ Args: {
41989
+ p_order_id: string;
41990
+ };
41991
+ Returns: boolean;
41992
+ };
41993
+ logistics_plan_finish: {
41994
+ Args: {
41995
+ p_error?: string;
41996
+ p_id: string;
41997
+ };
41998
+ Returns: undefined;
41999
+ };
42000
+ logistics_plan_impact_orders: {
42001
+ Args: {
42002
+ p_order_id: string;
42003
+ };
42004
+ Returns: {
42005
+ buffer_id: string;
42006
+ order_id: string;
42007
+ plan_date: string;
42008
+ }[];
42009
+ };
42010
+ logistics_plan_kick: {
42011
+ Args: never;
42012
+ Returns: undefined;
42013
+ };
42014
+ logistics_plan_prune: {
42015
+ Args: never;
42016
+ Returns: number;
42017
+ };
42018
+ logistics_plan_release_stale: {
42019
+ Args: never;
42020
+ Returns: number;
42021
+ };
42022
+ logistics_plan_setting: {
42023
+ Args: {
42024
+ p_default: number;
42025
+ p_key: string;
42026
+ };
42027
+ Returns: number;
42028
+ };
39782
42029
  logistics_queue_capacity_email: {
39783
42030
  Args: {
39784
42031
  p_alert_id: string;
@@ -40017,6 +42264,14 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
40017
42264
  };
40018
42265
  Returns: undefined;
40019
42266
  };
42267
+ my_module_permissions: {
42268
+ Args: never;
42269
+ Returns: {
42270
+ feature_id: string;
42271
+ module_id: string;
42272
+ permission: string;
42273
+ }[];
42274
+ };
40020
42275
  next_manufacture_partij: {
40021
42276
  Args: {
40022
42277
  _tenant_id: string;
@@ -40067,6 +42322,13 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
40067
42322
  };
40068
42323
  Returns: boolean;
40069
42324
  };
42325
+ opruim_print_historie: {
42326
+ Args: never;
42327
+ Returns: {
42328
+ ontdaan: number;
42329
+ verwijderd: number;
42330
+ }[];
42331
+ };
40070
42332
  order_number_prefix: {
40071
42333
  Args: {
40072
42334
  p_custom_fields?: import("../integrations/supabase/types").Json;
@@ -40074,6 +42336,15 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
40074
42336
  };
40075
42337
  Returns: string;
40076
42338
  };
42339
+ pick_active_printers: {
42340
+ Args: never;
42341
+ Returns: {
42342
+ id: string;
42343
+ locatie: string;
42344
+ naam: string;
42345
+ online: boolean;
42346
+ }[];
42347
+ };
40077
42348
  pick_claim_document: {
40078
42349
  Args: {
40079
42350
  _queue_item_id: string;
@@ -40260,6 +42531,52 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
40260
42531
  };
40261
42532
  Returns: undefined;
40262
42533
  };
42534
+ pick_reset_print: {
42535
+ Args: {
42536
+ _queue_item_id: string;
42537
+ _session_id: string;
42538
+ };
42539
+ Returns: {
42540
+ announced_at: string;
42541
+ assigned_user_id: string | null;
42542
+ barcode: string | null;
42543
+ cancelled_at: string | null;
42544
+ cart_count: number;
42545
+ completed_at: string | null;
42546
+ country_code: string | null;
42547
+ created_at: string;
42548
+ customer_name: string | null;
42549
+ delivery_address: string | null;
42550
+ document_number: string | null;
42551
+ document_type_id: string | null;
42552
+ due_at: string | null;
42553
+ id: string;
42554
+ is_urgent: boolean;
42555
+ line_count: number;
42556
+ order_number: string | null;
42557
+ order_type: string | null;
42558
+ payload: import("../integrations/supabase/types").Json;
42559
+ print_count: number;
42560
+ print_job_id: string | null;
42561
+ printed_at: string | null;
42562
+ printed_by: string | null;
42563
+ printer_id: string | null;
42564
+ priority: number;
42565
+ reference: string | null;
42566
+ route: string | null;
42567
+ screen_id: string | null;
42568
+ station_id: string | null;
42569
+ status_id: string | null;
42570
+ updated_at: string;
42571
+ warnings: import("../integrations/supabase/types").Json;
42572
+ };
42573
+ SetofOptions: {
42574
+ from: "*";
42575
+ to: "pick_queue";
42576
+ isOneToOne: true;
42577
+ isSetofReturn: false;
42578
+ };
42579
+ };
40263
42580
  pick_station_dashboard: {
40264
42581
  Args: never;
40265
42582
  Returns: {
@@ -40406,6 +42723,12 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
40406
42723
  };
40407
42724
  Returns: undefined;
40408
42725
  };
42726
+ reset_stalled_floriday_stock_queue: {
42727
+ Args: {
42728
+ p_include_failed?: boolean;
42729
+ };
42730
+ Returns: number;
42731
+ };
40409
42732
  resolve_group_allocation: {
40410
42733
  Args: {
40411
42734
  _needed: number;
@@ -40450,14 +42773,28 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
40450
42773
  };
40451
42774
  Returns: import("../integrations/supabase/types").Json;
40452
42775
  };
42776
+ ruim_print_jobs_op: {
42777
+ Args: {
42778
+ _bewaar_dagen?: number;
42779
+ };
42780
+ Returns: number;
42781
+ };
40453
42782
  run_floriday_continuous_stock_sync: {
40454
42783
  Args: never;
40455
42784
  Returns: undefined;
40456
42785
  };
42786
+ run_floriday_stock_queue_process: {
42787
+ Args: never;
42788
+ Returns: undefined;
42789
+ };
40457
42790
  run_logistics_tasks_dispatch: {
40458
42791
  Args: never;
40459
42792
  Returns: undefined;
40460
42793
  };
42794
+ run_print_queue_ticks: {
42795
+ Args: never;
42796
+ Returns: number;
42797
+ };
40461
42798
  run_twinfield_queue_tick: {
40462
42799
  Args: never;
40463
42800
  Returns: undefined;
@@ -40811,6 +43148,16 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
40811
43148
  };
40812
43149
  Returns: string[];
40813
43150
  };
43151
+ switch_time_log: {
43152
+ Args: {
43153
+ p_employee_id: string;
43154
+ p_start_lat?: number;
43155
+ p_start_lng?: number;
43156
+ p_type: string;
43157
+ p_work_order_id?: string;
43158
+ };
43159
+ Returns: import("../integrations/supabase/types").Json;
43160
+ };
40814
43161
  sync_all_layer_stocks: {
40815
43162
  Args: never;
40816
43163
  Returns: undefined;
@@ -40845,6 +43192,15 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
40845
43192
  };
40846
43193
  Returns: undefined;
40847
43194
  };
43195
+ trade_item_stock_duplicates: {
43196
+ Args: never;
43197
+ Returns: {
43198
+ keys: string[];
43199
+ product_id: string;
43200
+ product_name: string;
43201
+ row_count: number;
43202
+ }[];
43203
+ };
40848
43204
  try_debtor_lock: {
40849
43205
  Args: {
40850
43206
  _group_key: string;
@@ -40852,6 +43208,24 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
40852
43208
  };
40853
43209
  Returns: boolean;
40854
43210
  };
43211
+ twinfield_cron_lock_acquire: {
43212
+ Args: {
43213
+ _job_name: string;
43214
+ _stale_seconds?: number;
43215
+ };
43216
+ Returns: boolean;
43217
+ };
43218
+ twinfield_cron_lock_release: {
43219
+ Args: {
43220
+ _error?: string;
43221
+ _job_name: string;
43222
+ };
43223
+ Returns: undefined;
43224
+ };
43225
+ twinfield_prune_push_queue: {
43226
+ Args: never;
43227
+ Returns: number;
43228
+ };
40855
43229
  twinfield_register_cron: {
40856
43230
  Args: {
40857
43231
  apikey?: string;
@@ -40894,7 +43268,7 @@ export declare const updateAfhandelingSettings: import("@tanstack/start-client-c
40894
43268
  };
40895
43269
  Enums: {
40896
43270
  ai_import_status: "nieuw" | "verwerken" | "bevestigen" | "klaar" | "mislukt";
40897
- app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin";
43271
+ app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie";
40898
43272
  doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon";
40899
43273
  doc_orientation: "portrait" | "landscape";
40900
43274
  exact_env: "staging" | "live";