@flowselections/floriday-verkoop-module 1.0.41 → 1.0.42

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 (57) hide show
  1. package/dist-lib/components/verkoop/VerkoopOrdersPage.d.ts.map +1 -1
  2. package/dist-lib/components/verkoop/VerkoopOrdersPage.js +50 -15
  3. package/dist-lib/integrations/supabase/auth-middleware.d.ts +847 -150
  4. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  5. package/dist-lib/integrations/supabase/client.d.ts +847 -150
  6. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  7. package/dist-lib/integrations/supabase/client.server.d.ts +847 -150
  8. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  9. package/dist-lib/integrations/supabase/types.d.ts +855 -153
  10. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  11. package/dist-lib/lib/cart-lock.functions.d.ts +847 -150
  12. package/dist-lib/lib/cart-lock.functions.d.ts.map +1 -1
  13. package/dist-lib/lib/cart-planning-settings.functions.d.ts +8943 -1276
  14. package/dist-lib/lib/cart-planning-settings.functions.d.ts.map +1 -1
  15. package/dist-lib/lib/cart-replan.functions.d.ts +2439 -348
  16. package/dist-lib/lib/cart-replan.functions.d.ts.map +1 -1
  17. package/dist-lib/lib/create-order.functions.d.ts +33856 -1741
  18. package/dist-lib/lib/create-order.functions.d.ts.map +1 -1
  19. package/dist-lib/lib/create-order.functions.js +30 -0
  20. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts +2439 -348
  21. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts.map +1 -1
  22. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts +847 -150
  23. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts.map +1 -1
  24. package/dist-lib/lib/floriday-mirror.functions.d.ts +847 -150
  25. package/dist-lib/lib/floriday-mirror.functions.d.ts.map +1 -1
  26. package/dist-lib/lib/floriday-public.functions.d.ts +5691 -812
  27. package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
  28. package/dist-lib/lib/floriday-writes.functions.d.ts +4065 -580
  29. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  30. package/dist-lib/lib/invoice-timing.functions.d.ts +3252 -464
  31. package/dist-lib/lib/invoice-timing.functions.d.ts.map +1 -1
  32. package/dist-lib/lib/load-carriers.functions.d.ts +847 -150
  33. package/dist-lib/lib/load-carriers.functions.d.ts.map +1 -1
  34. package/dist-lib/lib/logistics-engine.functions.d.ts +4065 -580
  35. package/dist-lib/lib/logistics-engine.functions.d.ts.map +1 -1
  36. package/dist-lib/lib/logistics-stock.functions.d.ts +1626 -232
  37. package/dist-lib/lib/logistics-stock.functions.d.ts.map +1 -1
  38. package/dist-lib/lib/order-addresses.functions.d.ts +847 -150
  39. package/dist-lib/lib/order-addresses.functions.d.ts.map +1 -1
  40. package/dist-lib/lib/order-buffers.functions.d.ts +2439 -348
  41. package/dist-lib/lib/order-buffers.functions.d.ts.map +1 -1
  42. package/dist-lib/lib/order-carrier.functions.d.ts +1626 -232
  43. package/dist-lib/lib/order-carrier.functions.d.ts.map +1 -1
  44. package/dist-lib/lib/order-pickup.functions.d.ts +1626 -232
  45. package/dist-lib/lib/order-pickup.functions.d.ts.map +1 -1
  46. package/dist-lib/lib/order-shipments.functions.d.ts +3252 -464
  47. package/dist-lib/lib/order-shipments.functions.d.ts.map +1 -1
  48. package/dist-lib/lib/salesorders-list.functions.d.ts +847 -150
  49. package/dist-lib/lib/salesorders-list.functions.d.ts.map +1 -1
  50. package/dist-lib/lib/salesorders-mapping.d.ts +6 -0
  51. package/dist-lib/lib/salesorders-mapping.d.ts.map +1 -1
  52. package/dist-lib/lib/salesorders-mapping.js +17 -0
  53. package/dist-lib/lib/salesorders.functions.d.ts +4065 -580
  54. package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
  55. package/dist-lib/lib/tradeitems.functions.d.ts +847 -150
  56. package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
  57. package/package.json +1 -1
@@ -907,6 +907,126 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
907
907
  };
908
908
  Relationships: [];
909
909
  };
910
+ cao_holidays: {
911
+ Row: {
912
+ created_at: string;
913
+ description: string | null;
914
+ holiday_date: string;
915
+ id: string;
916
+ updated_at: string;
917
+ };
918
+ Insert: {
919
+ created_at?: string;
920
+ description?: string | null;
921
+ holiday_date: string;
922
+ id?: string;
923
+ updated_at?: string;
924
+ };
925
+ Update: {
926
+ created_at?: string;
927
+ description?: string | null;
928
+ holiday_date?: string;
929
+ id?: string;
930
+ updated_at?: string;
931
+ };
932
+ Relationships: [];
933
+ };
934
+ cao_settings: {
935
+ Row: {
936
+ auto_break_after_hours: number;
937
+ auto_break_minutes: number;
938
+ auto_break_unpaid: boolean;
939
+ auto_stop_after_hours: number;
940
+ callout_fee: number;
941
+ created_at: string;
942
+ daily_regular_hours: number;
943
+ default_hourly_rate: number;
944
+ id: string;
945
+ materials_markup_percent: number;
946
+ max_daily_hours: number;
947
+ max_weekly_hours: number;
948
+ meal_allowance_amount: number;
949
+ overtime_pct_178: number;
950
+ overtime_pct_189: number;
951
+ overtime_pct_212: number;
952
+ reminder_after_hours: number;
953
+ standby_evening_amount: number;
954
+ standby_weekend_amount: number;
955
+ travel_cost_per_km: number | null;
956
+ travel_cost_threshold_km: number | null;
957
+ travel_counts_as_work: boolean;
958
+ travel_hourly_rate: number;
959
+ travel_rate_per_hour: number;
960
+ travel_threshold_minutes: number;
961
+ updated_at: string;
962
+ weekend_always_212: boolean;
963
+ window_end: string;
964
+ window_start: string;
965
+ };
966
+ Insert: {
967
+ auto_break_after_hours?: number;
968
+ auto_break_minutes?: number;
969
+ auto_break_unpaid?: boolean;
970
+ auto_stop_after_hours?: number;
971
+ callout_fee?: number;
972
+ created_at?: string;
973
+ daily_regular_hours?: number;
974
+ default_hourly_rate?: number;
975
+ id?: string;
976
+ materials_markup_percent?: number;
977
+ max_daily_hours?: number;
978
+ max_weekly_hours?: number;
979
+ meal_allowance_amount?: number;
980
+ overtime_pct_178?: number;
981
+ overtime_pct_189?: number;
982
+ overtime_pct_212?: number;
983
+ reminder_after_hours?: number;
984
+ standby_evening_amount?: number;
985
+ standby_weekend_amount?: number;
986
+ travel_cost_per_km?: number | null;
987
+ travel_cost_threshold_km?: number | null;
988
+ travel_counts_as_work?: boolean;
989
+ travel_hourly_rate?: number;
990
+ travel_rate_per_hour?: number;
991
+ travel_threshold_minutes?: number;
992
+ updated_at?: string;
993
+ weekend_always_212?: boolean;
994
+ window_end?: string;
995
+ window_start?: string;
996
+ };
997
+ Update: {
998
+ auto_break_after_hours?: number;
999
+ auto_break_minutes?: number;
1000
+ auto_break_unpaid?: boolean;
1001
+ auto_stop_after_hours?: number;
1002
+ callout_fee?: number;
1003
+ created_at?: string;
1004
+ daily_regular_hours?: number;
1005
+ default_hourly_rate?: number;
1006
+ id?: string;
1007
+ materials_markup_percent?: number;
1008
+ max_daily_hours?: number;
1009
+ max_weekly_hours?: number;
1010
+ meal_allowance_amount?: number;
1011
+ overtime_pct_178?: number;
1012
+ overtime_pct_189?: number;
1013
+ overtime_pct_212?: number;
1014
+ reminder_after_hours?: number;
1015
+ standby_evening_amount?: number;
1016
+ standby_weekend_amount?: number;
1017
+ travel_cost_per_km?: number | null;
1018
+ travel_cost_threshold_km?: number | null;
1019
+ travel_counts_as_work?: boolean;
1020
+ travel_hourly_rate?: number;
1021
+ travel_rate_per_hour?: number;
1022
+ travel_threshold_minutes?: number;
1023
+ updated_at?: string;
1024
+ weekend_always_212?: boolean;
1025
+ window_end?: string;
1026
+ window_start?: string;
1027
+ };
1028
+ Relationships: [];
1029
+ };
910
1030
  carrier_shipping_rates: {
911
1031
  Row: {
912
1032
  carrier_id: string;
@@ -7801,7 +7921,6 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
7801
7921
  start_date: string;
7802
7922
  start_time: string | null;
7803
7923
  status: string;
7804
- tenant_id: string;
7805
7924
  updated_at: string;
7806
7925
  user_id: string;
7807
7926
  };
@@ -7819,7 +7938,6 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
7819
7938
  start_date: string;
7820
7939
  start_time?: string | null;
7821
7940
  status?: string;
7822
- tenant_id?: string;
7823
7941
  updated_at?: string;
7824
7942
  user_id: string;
7825
7943
  };
@@ -7837,7 +7955,6 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
7837
7955
  start_date?: string;
7838
7956
  start_time?: string | null;
7839
7957
  status?: string;
7840
- tenant_id?: string;
7841
7958
  updated_at?: string;
7842
7959
  user_id?: string;
7843
7960
  };
@@ -7845,13 +7962,13 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
7845
7962
  foreignKeyName: "leave_requests_monteur_id_fkey";
7846
7963
  columns: ["monteur_id"];
7847
7964
  isOneToOne: false;
7848
- referencedRelation: "monteurs";
7965
+ referencedRelation: "profiles";
7849
7966
  referencedColumns: ["id"];
7850
7967
  }, {
7851
7968
  foreignKeyName: "leave_requests_user_id_fkey";
7852
7969
  columns: ["user_id"];
7853
7970
  isOneToOne: false;
7854
- referencedRelation: "monteurs";
7971
+ referencedRelation: "profiles";
7855
7972
  referencedColumns: ["id"];
7856
7973
  }];
7857
7974
  };
@@ -8719,6 +8836,45 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
8719
8836
  };
8720
8837
  Relationships: [];
8721
8838
  };
8839
+ logistics_plan_queue: {
8840
+ Row: {
8841
+ attempts: number;
8842
+ claimed_at: string | null;
8843
+ enqueued_at: string;
8844
+ error: string | null;
8845
+ id: string;
8846
+ next_attempt_at: string;
8847
+ order_id: string;
8848
+ reason: string;
8849
+ status: string;
8850
+ updated_at: string;
8851
+ };
8852
+ Insert: {
8853
+ attempts?: number;
8854
+ claimed_at?: string | null;
8855
+ enqueued_at?: string;
8856
+ error?: string | null;
8857
+ id?: string;
8858
+ next_attempt_at?: string;
8859
+ order_id: string;
8860
+ reason?: string;
8861
+ status?: string;
8862
+ updated_at?: string;
8863
+ };
8864
+ Update: {
8865
+ attempts?: number;
8866
+ claimed_at?: string | null;
8867
+ enqueued_at?: string;
8868
+ error?: string | null;
8869
+ id?: string;
8870
+ next_attempt_at?: string;
8871
+ order_id?: string;
8872
+ reason?: string;
8873
+ status?: string;
8874
+ updated_at?: string;
8875
+ };
8876
+ Relationships: [];
8877
+ };
8722
8878
  logistics_plan_runs: {
8723
8879
  Row: {
8724
8880
  created_at: string;
@@ -8794,6 +8950,24 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
8794
8950
  referencedColumns: ["id"];
8795
8951
  }];
8796
8952
  };
8953
+ logistics_plan_settings: {
8954
+ Row: {
8955
+ key: string;
8956
+ updated_at: string;
8957
+ value: string;
8958
+ };
8959
+ Insert: {
8960
+ key: string;
8961
+ updated_at?: string;
8962
+ value: string;
8963
+ };
8964
+ Update: {
8965
+ key?: string;
8966
+ updated_at?: string;
8967
+ value?: string;
8968
+ };
8969
+ Relationships: [];
8970
+ };
8797
8971
  logistics_rebuffer_state: {
8798
8972
  Row: {
8799
8973
  created_at: string;
@@ -9949,6 +10123,90 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
9949
10123
  };
9950
10124
  Relationships: [];
9951
10125
  };
10126
+ material_usage: {
10127
+ Row: {
10128
+ created_at: string;
10129
+ id: string;
10130
+ material_name: string;
10131
+ monteur_id: string | null;
10132
+ price_at_time: number;
10133
+ quantity_used: number;
10134
+ updated_at: string;
10135
+ van_inventory_id: string | null;
10136
+ work_order_id: string;
10137
+ };
10138
+ Insert: {
10139
+ created_at?: string;
10140
+ id?: string;
10141
+ material_name: string;
10142
+ monteur_id?: string | null;
10143
+ price_at_time?: number;
10144
+ quantity_used?: number;
10145
+ updated_at?: string;
10146
+ van_inventory_id?: string | null;
10147
+ work_order_id: string;
10148
+ };
10149
+ Update: {
10150
+ created_at?: string;
10151
+ id?: string;
10152
+ material_name?: string;
10153
+ monteur_id?: string | null;
10154
+ price_at_time?: number;
10155
+ quantity_used?: number;
10156
+ updated_at?: string;
10157
+ van_inventory_id?: string | null;
10158
+ work_order_id?: string;
10159
+ };
10160
+ Relationships: [{
10161
+ foreignKeyName: "material_usage_monteur_id_fkey";
10162
+ columns: ["monteur_id"];
10163
+ isOneToOne: false;
10164
+ referencedRelation: "profiles";
10165
+ referencedColumns: ["id"];
10166
+ }, {
10167
+ foreignKeyName: "material_usage_van_inventory_id_fkey";
10168
+ columns: ["van_inventory_id"];
10169
+ isOneToOne: false;
10170
+ referencedRelation: "van_inventories";
10171
+ referencedColumns: ["id"];
10172
+ }, {
10173
+ foreignKeyName: "material_usage_work_order_id_fkey";
10174
+ columns: ["work_order_id"];
10175
+ isOneToOne: false;
10176
+ referencedRelation: "work_orders";
10177
+ referencedColumns: ["id"];
10178
+ }];
10179
+ };
10180
+ module_features: {
10181
+ Row: {
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
+ Insert: {
10191
+ created_at?: string;
10192
+ feature_id: string;
10193
+ id?: string;
10194
+ is_active?: boolean;
10195
+ last_seen_at?: string;
10196
+ module_id: string;
10197
+ name: string;
10198
+ };
10199
+ Update: {
10200
+ created_at?: string;
10201
+ feature_id?: string;
10202
+ id?: string;
10203
+ is_active?: boolean;
10204
+ last_seen_at?: string;
10205
+ module_id?: string;
10206
+ name?: string;
10207
+ };
10208
+ Relationships: [];
10209
+ };
9952
10210
  module_permissions: {
9953
10211
  Row: {
9954
10212
  created_at: string;
@@ -9979,6 +10237,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
9979
10237
  module_registry: {
9980
10238
  Row: {
9981
10239
  created_at: string;
10240
+ enforce: boolean;
9982
10241
  is_active: boolean;
9983
10242
  last_seen_at: string;
9984
10243
  module_id: string;
@@ -9988,6 +10247,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
9988
10247
  };
9989
10248
  Insert: {
9990
10249
  created_at?: string;
10250
+ enforce?: boolean;
9991
10251
  is_active?: boolean;
9992
10252
  last_seen_at?: string;
9993
10253
  module_id: string;
@@ -9997,6 +10257,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
9997
10257
  };
9998
10258
  Update: {
9999
10259
  created_at?: string;
10260
+ enforce?: boolean;
10000
10261
  is_active?: boolean;
10001
10262
  last_seen_at?: string;
10002
10263
  module_id?: string;
@@ -10057,63 +10318,6 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
10057
10318
  };
10058
10319
  Relationships: [];
10059
10320
  };
10060
- monteurs: {
10061
- Row: {
10062
- avatar_url: string | null;
10063
- color: string | null;
10064
- created_at: string;
10065
- email: string | null;
10066
- id: string;
10067
- is_active: boolean;
10068
- leave_balance_hours: number;
10069
- name: string;
10070
- persnr: number | null;
10071
- phone: string | null;
10072
- role: string;
10073
- tenant_id: string;
10074
- updated_at: string;
10075
- user_id: string | null;
10076
- };
10077
- Insert: {
10078
- avatar_url?: string | null;
10079
- color?: string | null;
10080
- created_at?: string;
10081
- email?: string | null;
10082
- id?: string;
10083
- is_active?: boolean;
10084
- leave_balance_hours?: number;
10085
- name: string;
10086
- persnr?: number | null;
10087
- phone?: string | null;
10088
- role?: string;
10089
- tenant_id: string;
10090
- updated_at?: string;
10091
- user_id?: string | null;
10092
- };
10093
- Update: {
10094
- avatar_url?: string | null;
10095
- color?: string | null;
10096
- created_at?: string;
10097
- email?: string | null;
10098
- id?: string;
10099
- is_active?: boolean;
10100
- leave_balance_hours?: number;
10101
- name?: string;
10102
- persnr?: number | null;
10103
- phone?: string | null;
10104
- role?: string;
10105
- tenant_id?: string;
10106
- updated_at?: string;
10107
- user_id?: string | null;
10108
- };
10109
- Relationships: [{
10110
- foreignKeyName: "monteurs_tenant_id_fkey";
10111
- columns: ["tenant_id"];
10112
- isOneToOne: false;
10113
- referencedRelation: "tenants";
10114
- referencedColumns: ["id"];
10115
- }];
10116
- };
10117
10321
  nmbrs_component_mapping: {
10118
10322
  Row: {
10119
10323
  created_at: string;
@@ -10184,13 +10388,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
10184
10388
  nmbrs_employee_number?: string;
10185
10389
  updated_at?: string;
10186
10390
  };
10187
- Relationships: [{
10188
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
10189
- columns: ["monteur_id"];
10190
- isOneToOne: true;
10191
- referencedRelation: "monteurs";
10192
- referencedColumns: ["id"];
10193
- }];
10391
+ Relationships: [];
10194
10392
  };
10195
10393
  nmbrs_export_lines: {
10196
10394
  Row: {
@@ -10239,12 +10437,6 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
10239
10437
  wage_code?: string;
10240
10438
  };
10241
10439
  Relationships: [{
10242
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
10243
- columns: ["monteur_id"];
10244
- isOneToOne: false;
10245
- referencedRelation: "monteurs";
10246
- referencedColumns: ["id"];
10247
- }, {
10248
10440
  foreignKeyName: "nmbrs_export_lines_run_id_fkey";
10249
10441
  columns: ["run_id"];
10250
10442
  isOneToOne: false;
@@ -11072,6 +11264,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
11072
11264
  error_message: string | null;
11073
11265
  id: string;
11074
11266
  invoice_number: string | null;
11267
+ next_attempt_at: string;
11075
11268
  order_id: string;
11076
11269
  processed_at: string | null;
11077
11270
  status: string;
@@ -11083,6 +11276,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
11083
11276
  error_message?: string | null;
11084
11277
  id?: string;
11085
11278
  invoice_number?: string | null;
11279
+ next_attempt_at?: string;
11086
11280
  order_id: string;
11087
11281
  processed_at?: string | null;
11088
11282
  status?: string;
@@ -11094,6 +11288,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
11094
11288
  error_message?: string | null;
11095
11289
  id?: string;
11096
11290
  invoice_number?: string | null;
11291
+ next_attempt_at?: string;
11097
11292
  order_id?: string;
11098
11293
  processed_at?: string | null;
11099
11294
  status?: string;
@@ -12632,6 +12827,9 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
12632
12827
  created_at: string;
12633
12828
  id: string;
12634
12829
  laatst_gezien: string;
12830
+ laatste_fout: string | null;
12831
+ laatste_request_id: number | null;
12832
+ mislukte_posts: number;
12635
12833
  tick_sleutel: string;
12636
12834
  updated_at: string;
12637
12835
  };
@@ -12641,6 +12839,9 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
12641
12839
  created_at?: string;
12642
12840
  id?: string;
12643
12841
  laatst_gezien?: string;
12842
+ laatste_fout?: string | null;
12843
+ laatste_request_id?: number | null;
12844
+ mislukte_posts?: number;
12644
12845
  tick_sleutel?: string;
12645
12846
  updated_at?: string;
12646
12847
  };
@@ -12650,6 +12851,9 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
12650
12851
  created_at?: string;
12651
12852
  id?: string;
12652
12853
  laatst_gezien?: string;
12854
+ laatste_fout?: string | null;
12855
+ laatste_request_id?: number | null;
12856
+ mislukte_posts?: number;
12653
12857
  tick_sleutel?: string;
12654
12858
  updated_at?: string;
12655
12859
  };
@@ -14158,6 +14362,96 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
14158
14362
  referencedColumns: ["id"];
14159
14363
  }];
14160
14364
  };
14365
+ role_assignments: {
14366
+ Row: {
14367
+ created_at: string;
14368
+ id: string;
14369
+ role_id: string;
14370
+ user_id: string;
14371
+ };
14372
+ Insert: {
14373
+ created_at?: string;
14374
+ id?: string;
14375
+ role_id: string;
14376
+ user_id: string;
14377
+ };
14378
+ Update: {
14379
+ created_at?: string;
14380
+ id?: string;
14381
+ role_id?: string;
14382
+ user_id?: string;
14383
+ };
14384
+ Relationships: [{
14385
+ foreignKeyName: "role_assignments_role_id_fkey";
14386
+ columns: ["role_id"];
14387
+ isOneToOne: false;
14388
+ referencedRelation: "roles";
14389
+ referencedColumns: ["id"];
14390
+ }];
14391
+ };
14392
+ role_permissions: {
14393
+ Row: {
14394
+ can_edit: boolean;
14395
+ can_view: boolean;
14396
+ feature_id: string;
14397
+ id: string;
14398
+ module_id: string;
14399
+ role_id: string;
14400
+ updated_at: string;
14401
+ };
14402
+ Insert: {
14403
+ can_edit?: boolean;
14404
+ can_view?: boolean;
14405
+ feature_id?: string;
14406
+ id?: string;
14407
+ module_id: string;
14408
+ role_id: string;
14409
+ updated_at?: string;
14410
+ };
14411
+ Update: {
14412
+ can_edit?: boolean;
14413
+ can_view?: boolean;
14414
+ feature_id?: string;
14415
+ id?: string;
14416
+ module_id?: string;
14417
+ role_id?: string;
14418
+ updated_at?: string;
14419
+ };
14420
+ Relationships: [{
14421
+ foreignKeyName: "role_permissions_role_id_fkey";
14422
+ columns: ["role_id"];
14423
+ isOneToOne: false;
14424
+ referencedRelation: "roles";
14425
+ referencedColumns: ["id"];
14426
+ }];
14427
+ };
14428
+ roles: {
14429
+ Row: {
14430
+ created_at: string;
14431
+ id: string;
14432
+ is_protected: boolean;
14433
+ key: string;
14434
+ name: string;
14435
+ updated_at: string;
14436
+ };
14437
+ Insert: {
14438
+ created_at?: string;
14439
+ id?: string;
14440
+ is_protected?: boolean;
14441
+ key: string;
14442
+ name: string;
14443
+ updated_at?: string;
14444
+ };
14445
+ Update: {
14446
+ created_at?: string;
14447
+ id?: string;
14448
+ is_protected?: boolean;
14449
+ key?: string;
14450
+ name?: string;
14451
+ updated_at?: string;
14452
+ };
14453
+ Relationships: [];
14454
+ };
14161
14455
  rooms: {
14162
14456
  Row: {
14163
14457
  capacity: number;
@@ -14827,6 +15121,54 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
14827
15121
  };
14828
15122
  Relationships: [];
14829
15123
  };
15124
+ time_compensation_entries: {
15125
+ Row: {
15126
+ created_at: string;
15127
+ employee_id: string;
15128
+ entry_date: string;
15129
+ id: string;
15130
+ km: number;
15131
+ meal_allowance: number;
15132
+ notes: string | null;
15133
+ standby_evening: number;
15134
+ standby_weekend: number;
15135
+ tvt_change: number;
15136
+ updated_at: string;
15137
+ };
15138
+ Insert: {
15139
+ created_at?: string;
15140
+ employee_id: string;
15141
+ entry_date: string;
15142
+ id?: string;
15143
+ km?: number;
15144
+ meal_allowance?: number;
15145
+ notes?: string | null;
15146
+ standby_evening?: number;
15147
+ standby_weekend?: number;
15148
+ tvt_change?: number;
15149
+ updated_at?: string;
15150
+ };
15151
+ Update: {
15152
+ created_at?: string;
15153
+ employee_id?: string;
15154
+ entry_date?: string;
15155
+ id?: string;
15156
+ km?: number;
15157
+ meal_allowance?: number;
15158
+ notes?: string | null;
15159
+ standby_evening?: number;
15160
+ standby_weekend?: number;
15161
+ tvt_change?: number;
15162
+ updated_at?: string;
15163
+ };
15164
+ Relationships: [{
15165
+ foreignKeyName: "time_compensation_entries_employee_id_fkey";
15166
+ columns: ["employee_id"];
15167
+ isOneToOne: false;
15168
+ referencedRelation: "profiles";
15169
+ referencedColumns: ["id"];
15170
+ }];
15171
+ };
14830
15172
  time_entries: {
14831
15173
  Row: {
14832
15174
  created_at: string;
@@ -14861,65 +15203,170 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
14861
15203
  undertime?: number;
14862
15204
  updated_at?: string;
14863
15205
  };
15206
+ Relationships: [];
15207
+ };
15208
+ time_log_week_approvals: {
15209
+ Row: {
15210
+ approved_at: string | null;
15211
+ approved_by: string | null;
15212
+ created_at: string;
15213
+ employee_id: string;
15214
+ id: string;
15215
+ locked: boolean;
15216
+ notes: string | null;
15217
+ status: string;
15218
+ submitted_at: string | null;
15219
+ updated_at: string;
15220
+ week_start: string;
15221
+ };
15222
+ Insert: {
15223
+ approved_at?: string | null;
15224
+ approved_by?: string | null;
15225
+ created_at?: string;
15226
+ employee_id: string;
15227
+ id?: string;
15228
+ locked?: boolean;
15229
+ notes?: string | null;
15230
+ status?: string;
15231
+ submitted_at?: string | null;
15232
+ updated_at?: string;
15233
+ week_start: string;
15234
+ };
15235
+ Update: {
15236
+ approved_at?: string | null;
15237
+ approved_by?: string | null;
15238
+ created_at?: string;
15239
+ employee_id?: string;
15240
+ id?: string;
15241
+ locked?: boolean;
15242
+ notes?: string | null;
15243
+ status?: string;
15244
+ submitted_at?: string | null;
15245
+ updated_at?: string;
15246
+ week_start?: string;
15247
+ };
14864
15248
  Relationships: [{
14865
- foreignKeyName: "time_entries_employee_id_fkey";
15249
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
14866
15250
  columns: ["employee_id"];
14867
15251
  isOneToOne: false;
14868
- referencedRelation: "monteurs";
15252
+ referencedRelation: "profiles";
14869
15253
  referencedColumns: ["id"];
14870
15254
  }];
14871
15255
  };
14872
15256
  time_logs: {
14873
15257
  Row: {
15258
+ auto_stop_reason: string | null;
15259
+ auto_stopped: boolean;
14874
15260
  created_at: string;
15261
+ current_latitude: number | null;
15262
+ current_longitude: number | null;
15263
+ current_position_updated_at: string | null;
14875
15264
  employee_id: string;
15265
+ end_latitude: number | null;
15266
+ end_longitude: number | null;
14876
15267
  end_time: string | null;
15268
+ eta_distance_km: number | null;
15269
+ eta_minutes: number | null;
15270
+ eta_updated_at: string | null;
15271
+ hour_category: string | null;
14877
15272
  id: string;
15273
+ last_reminder_at: string | null;
14878
15274
  notes: string | null;
14879
15275
  overtime_hours: number;
14880
15276
  overtime_type: string | null;
14881
15277
  regular_hours: number;
15278
+ reminder_count: number;
15279
+ requires_review: boolean;
15280
+ start_latitude: number | null;
15281
+ start_longitude: number | null;
14882
15282
  start_time: string;
14883
15283
  travel_cost: number | null;
14884
15284
  travel_distance_km: number | null;
15285
+ travel_duration_min: number | null;
15286
+ travel_time_minutes: number | null;
14885
15287
  type: string;
14886
15288
  updated_at: string;
15289
+ work_order_id: string | null;
14887
15290
  };
14888
15291
  Insert: {
15292
+ auto_stop_reason?: string | null;
15293
+ auto_stopped?: boolean;
14889
15294
  created_at?: string;
15295
+ current_latitude?: number | null;
15296
+ current_longitude?: number | null;
15297
+ current_position_updated_at?: string | null;
14890
15298
  employee_id: string;
15299
+ end_latitude?: number | null;
15300
+ end_longitude?: number | null;
14891
15301
  end_time?: string | null;
15302
+ eta_distance_km?: number | null;
15303
+ eta_minutes?: number | null;
15304
+ eta_updated_at?: string | null;
15305
+ hour_category?: string | null;
14892
15306
  id?: string;
15307
+ last_reminder_at?: string | null;
14893
15308
  notes?: string | null;
14894
15309
  overtime_hours?: number;
14895
15310
  overtime_type?: string | null;
14896
15311
  regular_hours?: number;
15312
+ reminder_count?: number;
15313
+ requires_review?: boolean;
15314
+ start_latitude?: number | null;
15315
+ start_longitude?: number | null;
14897
15316
  start_time?: string;
14898
15317
  travel_cost?: number | null;
14899
15318
  travel_distance_km?: number | null;
15319
+ travel_duration_min?: number | null;
15320
+ travel_time_minutes?: number | null;
14900
15321
  type: string;
14901
15322
  updated_at?: string;
15323
+ work_order_id?: string | null;
14902
15324
  };
14903
15325
  Update: {
15326
+ auto_stop_reason?: string | null;
15327
+ auto_stopped?: boolean;
14904
15328
  created_at?: string;
15329
+ current_latitude?: number | null;
15330
+ current_longitude?: number | null;
15331
+ current_position_updated_at?: string | null;
14905
15332
  employee_id?: string;
15333
+ end_latitude?: number | null;
15334
+ end_longitude?: number | null;
14906
15335
  end_time?: string | null;
15336
+ eta_distance_km?: number | null;
15337
+ eta_minutes?: number | null;
15338
+ eta_updated_at?: string | null;
15339
+ hour_category?: string | null;
14907
15340
  id?: string;
15341
+ last_reminder_at?: string | null;
14908
15342
  notes?: string | null;
14909
15343
  overtime_hours?: number;
14910
15344
  overtime_type?: string | null;
14911
15345
  regular_hours?: number;
15346
+ reminder_count?: number;
15347
+ requires_review?: boolean;
15348
+ start_latitude?: number | null;
15349
+ start_longitude?: number | null;
14912
15350
  start_time?: string;
14913
15351
  travel_cost?: number | null;
14914
15352
  travel_distance_km?: number | null;
15353
+ travel_duration_min?: number | null;
15354
+ travel_time_minutes?: number | null;
14915
15355
  type?: string;
14916
15356
  updated_at?: string;
15357
+ work_order_id?: string | null;
14917
15358
  };
14918
15359
  Relationships: [{
14919
15360
  foreignKeyName: "time_logs_employee_id_fkey";
14920
15361
  columns: ["employee_id"];
14921
15362
  isOneToOne: false;
14922
- referencedRelation: "monteurs";
15363
+ referencedRelation: "profiles";
15364
+ referencedColumns: ["id"];
15365
+ }, {
15366
+ foreignKeyName: "time_logs_work_order_id_fkey";
15367
+ columns: ["work_order_id"];
15368
+ isOneToOne: false;
15369
+ referencedRelation: "work_orders";
14923
15370
  referencedColumns: ["id"];
14924
15371
  }];
14925
15372
  };
@@ -14958,7 +15405,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
14958
15405
  foreignKeyName: "time_off_entries_employee_id_fkey";
14959
15406
  columns: ["employee_id"];
14960
15407
  isOneToOne: false;
14961
- referencedRelation: "monteurs";
15408
+ referencedRelation: "profiles";
14962
15409
  referencedColumns: ["id"];
14963
15410
  }];
14964
15411
  };
@@ -15268,6 +15715,39 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
15268
15715
  };
15269
15716
  Relationships: [];
15270
15717
  };
15718
+ twinfield_cron_locks: {
15719
+ Row: {
15720
+ created_at: string;
15721
+ heartbeat_at: string;
15722
+ job_name: string;
15723
+ last_error: string | null;
15724
+ last_finished_at: string | null;
15725
+ locked_at: string;
15726
+ run_id: string;
15727
+ updated_at: string;
15728
+ };
15729
+ Insert: {
15730
+ created_at?: string;
15731
+ heartbeat_at?: string;
15732
+ job_name: string;
15733
+ last_error?: string | null;
15734
+ last_finished_at?: string | null;
15735
+ locked_at?: string;
15736
+ run_id?: string;
15737
+ updated_at?: string;
15738
+ };
15739
+ Update: {
15740
+ created_at?: string;
15741
+ heartbeat_at?: string;
15742
+ job_name?: string;
15743
+ last_error?: string | null;
15744
+ last_finished_at?: string | null;
15745
+ locked_at?: string;
15746
+ run_id?: string;
15747
+ updated_at?: string;
15748
+ };
15749
+ Relationships: [];
15750
+ };
15271
15751
  twinfield_customers: {
15272
15752
  Row: {
15273
15753
  address: string | null;
@@ -15868,6 +16348,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
15868
16348
  twinfield_push_queue: {
15869
16349
  Row: {
15870
16350
  action: string;
16351
+ attempt_started_at: string | null;
15871
16352
  attempts: number;
15872
16353
  connection_id: string | null;
15873
16354
  created_at: string;
@@ -15884,6 +16365,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
15884
16365
  };
15885
16366
  Insert: {
15886
16367
  action?: string;
16368
+ attempt_started_at?: string | null;
15887
16369
  attempts?: number;
15888
16370
  connection_id?: string | null;
15889
16371
  created_at?: string;
@@ -15900,6 +16382,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
15900
16382
  };
15901
16383
  Update: {
15902
16384
  action?: string;
16385
+ attempt_started_at?: string | null;
15903
16386
  attempts?: number;
15904
16387
  connection_id?: string | null;
15905
16388
  created_at?: string;
@@ -16097,13 +16580,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
16097
16580
  workday_end?: string | null;
16098
16581
  workday_start?: string | null;
16099
16582
  };
16100
- Relationships: [{
16101
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
16102
- columns: ["monteur_id"];
16103
- isOneToOne: true;
16104
- referencedRelation: "monteurs";
16105
- referencedColumns: ["id"];
16106
- }];
16583
+ Relationships: [];
16107
16584
  };
16108
16585
  uren_entries: {
16109
16586
  Row: {
@@ -16149,12 +16626,6 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
16149
16626
  werkbon_id?: string | null;
16150
16627
  };
16151
16628
  Relationships: [{
16152
- foreignKeyName: "uren_entries_monteur_id_fkey";
16153
- columns: ["monteur_id"];
16154
- isOneToOne: false;
16155
- referencedRelation: "monteurs";
16156
- referencedColumns: ["id"];
16157
- }, {
16158
16629
  foreignKeyName: "uren_entries_werkbon_id_fkey";
16159
16630
  columns: ["werkbon_id"];
16160
16631
  isOneToOne: false;
@@ -16622,17 +17093,12 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
16622
17093
  submitted_at?: string | null;
16623
17094
  updated_at?: string;
16624
17095
  };
16625
- Relationships: [{
16626
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
16627
- columns: ["monteur_id"];
16628
- isOneToOne: false;
16629
- referencedRelation: "monteurs";
16630
- referencedColumns: ["id"];
16631
- }];
17096
+ Relationships: [];
16632
17097
  };
16633
17098
  user_module_permissions: {
16634
17099
  Row: {
16635
17100
  created_at: string;
17101
+ feature_id: string;
16636
17102
  id: string;
16637
17103
  module_id: string;
16638
17104
  permission: string;
@@ -16641,6 +17107,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
16641
17107
  };
16642
17108
  Insert: {
16643
17109
  created_at?: string;
17110
+ feature_id?: string;
16644
17111
  id?: string;
16645
17112
  module_id: string;
16646
17113
  permission: string;
@@ -16649,6 +17116,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
16649
17116
  };
16650
17117
  Update: {
16651
17118
  created_at?: string;
17119
+ feature_id?: string;
16652
17120
  id?: string;
16653
17121
  module_id?: string;
16654
17122
  permission?: string;
@@ -16684,6 +17152,51 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
16684
17152
  referencedColumns: ["id"];
16685
17153
  }];
16686
17154
  };
17155
+ van_inventories: {
17156
+ Row: {
17157
+ barcode: string | null;
17158
+ created_at: string;
17159
+ id: string;
17160
+ monteur_id: string | null;
17161
+ price_per_unit: number;
17162
+ product_name: string;
17163
+ quantity_current: number;
17164
+ quantity_min: number;
17165
+ unit: string;
17166
+ updated_at: string;
17167
+ };
17168
+ Insert: {
17169
+ barcode?: string | null;
17170
+ created_at?: string;
17171
+ id?: string;
17172
+ monteur_id?: string | null;
17173
+ price_per_unit?: number;
17174
+ product_name: string;
17175
+ quantity_current?: number;
17176
+ quantity_min?: number;
17177
+ unit?: string;
17178
+ updated_at?: string;
17179
+ };
17180
+ Update: {
17181
+ barcode?: string | null;
17182
+ created_at?: string;
17183
+ id?: string;
17184
+ monteur_id?: string | null;
17185
+ price_per_unit?: number;
17186
+ product_name?: string;
17187
+ quantity_current?: number;
17188
+ quantity_min?: number;
17189
+ unit?: string;
17190
+ updated_at?: string;
17191
+ };
17192
+ Relationships: [{
17193
+ foreignKeyName: "van_inventories_monteur_id_fkey";
17194
+ columns: ["monteur_id"];
17195
+ isOneToOne: false;
17196
+ referencedRelation: "profiles";
17197
+ referencedColumns: ["id"];
17198
+ }];
17199
+ };
16687
17200
  voorraad_custom_fields: {
16688
17201
  Row: {
16689
17202
  created_at: string;
@@ -17634,7 +18147,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
17634
18147
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
17635
18148
  columns: ["monteur_id"];
17636
18149
  isOneToOne: false;
17637
- referencedRelation: "monteurs";
18150
+ referencedRelation: "profiles";
17638
18151
  referencedColumns: ["id"];
17639
18152
  }, {
17640
18153
  foreignKeyName: "work_order_monteurs_work_order_id_fkey";
@@ -17644,6 +18157,60 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
17644
18157
  referencedColumns: ["id"];
17645
18158
  }];
17646
18159
  };
18160
+ work_order_photos: {
18161
+ Row: {
18162
+ ai_caption: string | null;
18163
+ ai_categorized_at: string | null;
18164
+ ai_labels: import("../integrations/supabase/types").Json | null;
18165
+ caption: string | null;
18166
+ created_at: string;
18167
+ id: string;
18168
+ monteur_id: string | null;
18169
+ photo_type: string;
18170
+ storage_path: string;
18171
+ updated_at: string;
18172
+ work_order_id: string;
18173
+ };
18174
+ Insert: {
18175
+ ai_caption?: string | null;
18176
+ ai_categorized_at?: string | null;
18177
+ ai_labels?: import("../integrations/supabase/types").Json | null;
18178
+ caption?: string | null;
18179
+ created_at?: string;
18180
+ id?: string;
18181
+ monteur_id?: string | null;
18182
+ photo_type?: string;
18183
+ storage_path: string;
18184
+ updated_at?: string;
18185
+ work_order_id: string;
18186
+ };
18187
+ Update: {
18188
+ ai_caption?: string | null;
18189
+ ai_categorized_at?: string | null;
18190
+ ai_labels?: import("../integrations/supabase/types").Json | null;
18191
+ caption?: string | null;
18192
+ created_at?: string;
18193
+ id?: string;
18194
+ monteur_id?: string | null;
18195
+ photo_type?: string;
18196
+ storage_path?: string;
18197
+ updated_at?: string;
18198
+ work_order_id?: string;
18199
+ };
18200
+ Relationships: [{
18201
+ foreignKeyName: "work_order_photos_monteur_id_fkey";
18202
+ columns: ["monteur_id"];
18203
+ isOneToOne: false;
18204
+ referencedRelation: "profiles";
18205
+ referencedColumns: ["id"];
18206
+ }, {
18207
+ foreignKeyName: "work_order_photos_work_order_id_fkey";
18208
+ columns: ["work_order_id"];
18209
+ isOneToOne: false;
18210
+ referencedRelation: "work_orders";
18211
+ referencedColumns: ["id"];
18212
+ }];
18213
+ };
17647
18214
  work_orders: {
17648
18215
  Row: {
17649
18216
  assigned_to: string | null;
@@ -17675,7 +18242,6 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
17675
18242
  scheduled_end_time: string | null;
17676
18243
  scheduled_start_time: string | null;
17677
18244
  status: string;
17678
- tenant_id: string;
17679
18245
  total_hours_worked: number | null;
17680
18246
  total_price: number | null;
17681
18247
  travel_time_minutes: number | null;
@@ -17713,7 +18279,6 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
17713
18279
  scheduled_end_time?: string | null;
17714
18280
  scheduled_start_time?: string | null;
17715
18281
  status?: string;
17716
- tenant_id: string;
17717
18282
  total_hours_worked?: number | null;
17718
18283
  total_price?: number | null;
17719
18284
  travel_time_minutes?: number | null;
@@ -17751,7 +18316,6 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
17751
18316
  scheduled_end_time?: string | null;
17752
18317
  scheduled_start_time?: string | null;
17753
18318
  status?: string;
17754
- tenant_id?: string;
17755
18319
  total_hours_worked?: number | null;
17756
18320
  total_price?: number | null;
17757
18321
  travel_time_minutes?: number | null;
@@ -17765,12 +18329,6 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
17765
18329
  isOneToOne: false;
17766
18330
  referencedRelation: "work_orders";
17767
18331
  referencedColumns: ["id"];
17768
- }, {
17769
- foreignKeyName: "work_orders_tenant_id_fkey";
17770
- columns: ["tenant_id"];
17771
- isOneToOne: false;
17772
- referencedRelation: "tenants";
17773
- referencedColumns: ["id"];
17774
18332
  }];
17775
18333
  };
17776
18334
  };
@@ -18455,6 +19013,19 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
18455
19013
  };
18456
19014
  Returns: undefined;
18457
19015
  };
19016
+ approve_mailbox_order_proposal: {
19017
+ Args: {
19018
+ p_custom_fields: import("../integrations/supabase/types").Json;
19019
+ p_customer_id: string;
19020
+ p_delivery_date: string;
19021
+ p_field_values?: import("../integrations/supabase/types").Json;
19022
+ p_lines: import("../integrations/supabase/types").Json;
19023
+ p_notes: string;
19024
+ p_proposal_id: string;
19025
+ p_reviewed_by: string;
19026
+ };
19027
+ Returns: import("../integrations/supabase/types").Json;
19028
+ };
18458
19029
  assign_cart_numbers: {
18459
19030
  Args: {
18460
19031
  p_carts: import("../integrations/supabase/types").Json;
@@ -18506,6 +19077,10 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
18506
19077
  };
18507
19078
  Returns: number;
18508
19079
  };
19080
+ can_manage_hours: {
19081
+ Args: never;
19082
+ Returns: boolean;
19083
+ };
18509
19084
  check_offer_product_available_stock: {
18510
19085
  Args: {
18511
19086
  p_campaign_product_id: string;
@@ -18695,6 +19270,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
18695
19270
  };
18696
19271
  Returns: {
18697
19272
  action: string;
19273
+ attempt_started_at: string | null;
18698
19274
  attempts: number;
18699
19275
  connection_id: string | null;
18700
19276
  created_at: string;
@@ -18782,6 +19358,30 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
18782
19358
  agent_naam: string;
18783
19359
  }[];
18784
19360
  };
19361
+ consume_van_inventory: {
19362
+ Args: {
19363
+ p_inventory_id: string;
19364
+ p_quantity: number;
19365
+ };
19366
+ Returns: {
19367
+ barcode: string | null;
19368
+ created_at: string;
19369
+ id: string;
19370
+ monteur_id: string | null;
19371
+ price_per_unit: number;
19372
+ product_name: string;
19373
+ quantity_current: number;
19374
+ quantity_min: number;
19375
+ unit: string;
19376
+ updated_at: string;
19377
+ };
19378
+ SetofOptions: {
19379
+ from: "*";
19380
+ to: "van_inventories";
19381
+ isOneToOne: true;
19382
+ isSetofReturn: false;
19383
+ };
19384
+ };
18785
19385
  control_get_todays_carts: {
18786
19386
  Args: never;
18787
19387
  Returns: {
@@ -18855,6 +19455,13 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
18855
19455
  _user_id: string;
18856
19456
  };
18857
19457
  Returns: string;
19458
+ } | {
19459
+ Args: {
19460
+ _feature_id: string;
19461
+ _module_id: string;
19462
+ _user_id: string;
19463
+ };
19464
+ Returns: string;
18858
19465
  };
18859
19466
  email_auth_decrypt: {
18860
19467
  Args: {
@@ -19206,12 +19813,6 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
19206
19813
  Args: never;
19207
19814
  Returns: string;
19208
19815
  };
19209
- get_work_order_tenant_id: {
19210
- Args: {
19211
- wo_id: string;
19212
- };
19213
- Returns: string;
19214
- };
19215
19816
  has_module_permission: {
19216
19817
  Args: {
19217
19818
  _min: string;
@@ -19245,6 +19846,13 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
19245
19846
  };
19246
19847
  Returns: boolean;
19247
19848
  };
19849
+ is_time_log_week_locked: {
19850
+ Args: {
19851
+ p_employee_id: string;
19852
+ p_start_time: string;
19853
+ };
19854
+ Returns: boolean;
19855
+ };
19248
19856
  is_user_admin: {
19249
19857
  Args: never;
19250
19858
  Returns: boolean;
@@ -19259,13 +19867,14 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
19259
19867
  };
19260
19868
  Returns: boolean;
19261
19869
  };
19262
- list_monteurs: {
19870
+ list_medewerkers: {
19263
19871
  Args: never;
19264
19872
  Returns: {
19265
19873
  avatar_url: string;
19266
19874
  display_name: string;
19267
19875
  email: string;
19268
19876
  id: string;
19877
+ roles: string[];
19269
19878
  }[];
19270
19879
  };
19271
19880
  list_my_planning_items: {
@@ -19756,6 +20365,65 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
19756
20365
  };
19757
20366
  Returns: number;
19758
20367
  };
20368
+ logistics_plan_claim: {
20369
+ Args: {
20370
+ p_limit?: number;
20371
+ };
20372
+ Returns: {
20373
+ attempts: number;
20374
+ id: string;
20375
+ order_id: string;
20376
+ }[];
20377
+ };
20378
+ logistics_plan_enqueue: {
20379
+ Args: {
20380
+ p_order_id: string;
20381
+ p_reason?: string;
20382
+ };
20383
+ Returns: undefined;
20384
+ };
20385
+ logistics_plan_ensure_event: {
20386
+ Args: {
20387
+ p_order_id: string;
20388
+ };
20389
+ Returns: boolean;
20390
+ };
20391
+ logistics_plan_finish: {
20392
+ Args: {
20393
+ p_error?: string;
20394
+ p_id: string;
20395
+ };
20396
+ Returns: undefined;
20397
+ };
20398
+ logistics_plan_impact_orders: {
20399
+ Args: {
20400
+ p_order_id: string;
20401
+ };
20402
+ Returns: {
20403
+ buffer_id: string;
20404
+ order_id: string;
20405
+ plan_date: string;
20406
+ }[];
20407
+ };
20408
+ logistics_plan_kick: {
20409
+ Args: never;
20410
+ Returns: undefined;
20411
+ };
20412
+ logistics_plan_prune: {
20413
+ Args: never;
20414
+ Returns: number;
20415
+ };
20416
+ logistics_plan_release_stale: {
20417
+ Args: never;
20418
+ Returns: number;
20419
+ };
20420
+ logistics_plan_setting: {
20421
+ Args: {
20422
+ p_default: number;
20423
+ p_key: string;
20424
+ };
20425
+ Returns: number;
20426
+ };
19759
20427
  logistics_queue_capacity_email: {
19760
20428
  Args: {
19761
20429
  p_alert_id: string;
@@ -19997,6 +20665,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
19997
20665
  my_module_permissions: {
19998
20666
  Args: never;
19999
20667
  Returns: {
20668
+ feature_id: string;
20000
20669
  module_id: string;
20001
20670
  permission: string;
20002
20671
  }[];
@@ -20877,6 +21546,16 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
20877
21546
  };
20878
21547
  Returns: string[];
20879
21548
  };
21549
+ switch_time_log: {
21550
+ Args: {
21551
+ p_employee_id: string;
21552
+ p_start_lat?: number;
21553
+ p_start_lng?: number;
21554
+ p_type: string;
21555
+ p_work_order_id?: string;
21556
+ };
21557
+ Returns: import("../integrations/supabase/types").Json;
21558
+ };
20880
21559
  sync_all_layer_stocks: {
20881
21560
  Args: never;
20882
21561
  Returns: undefined;
@@ -20927,6 +21606,24 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
20927
21606
  };
20928
21607
  Returns: boolean;
20929
21608
  };
21609
+ twinfield_cron_lock_acquire: {
21610
+ Args: {
21611
+ _job_name: string;
21612
+ _stale_seconds?: number;
21613
+ };
21614
+ Returns: boolean;
21615
+ };
21616
+ twinfield_cron_lock_release: {
21617
+ Args: {
21618
+ _error?: string;
21619
+ _job_name: string;
21620
+ };
21621
+ Returns: undefined;
21622
+ };
21623
+ twinfield_prune_push_queue: {
21624
+ Args: never;
21625
+ Returns: number;
21626
+ };
20930
21627
  twinfield_register_cron: {
20931
21628
  Args: {
20932
21629
  apikey?: string;
@@ -21882,6 +22579,126 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
21882
22579
  };
21883
22580
  Relationships: [];
21884
22581
  };
22582
+ cao_holidays: {
22583
+ Row: {
22584
+ created_at: string;
22585
+ description: string | null;
22586
+ holiday_date: string;
22587
+ id: string;
22588
+ updated_at: string;
22589
+ };
22590
+ Insert: {
22591
+ created_at?: string;
22592
+ description?: string | null;
22593
+ holiday_date: string;
22594
+ id?: string;
22595
+ updated_at?: string;
22596
+ };
22597
+ Update: {
22598
+ created_at?: string;
22599
+ description?: string | null;
22600
+ holiday_date?: string;
22601
+ id?: string;
22602
+ updated_at?: string;
22603
+ };
22604
+ Relationships: [];
22605
+ };
22606
+ cao_settings: {
22607
+ Row: {
22608
+ auto_break_after_hours: number;
22609
+ auto_break_minutes: number;
22610
+ auto_break_unpaid: boolean;
22611
+ auto_stop_after_hours: number;
22612
+ callout_fee: number;
22613
+ created_at: string;
22614
+ daily_regular_hours: number;
22615
+ default_hourly_rate: number;
22616
+ id: string;
22617
+ materials_markup_percent: number;
22618
+ max_daily_hours: number;
22619
+ max_weekly_hours: number;
22620
+ meal_allowance_amount: number;
22621
+ overtime_pct_178: number;
22622
+ overtime_pct_189: number;
22623
+ overtime_pct_212: number;
22624
+ reminder_after_hours: number;
22625
+ standby_evening_amount: number;
22626
+ standby_weekend_amount: number;
22627
+ travel_cost_per_km: number | null;
22628
+ travel_cost_threshold_km: number | null;
22629
+ travel_counts_as_work: boolean;
22630
+ travel_hourly_rate: number;
22631
+ travel_rate_per_hour: number;
22632
+ travel_threshold_minutes: number;
22633
+ updated_at: string;
22634
+ weekend_always_212: boolean;
22635
+ window_end: string;
22636
+ window_start: string;
22637
+ };
22638
+ Insert: {
22639
+ auto_break_after_hours?: number;
22640
+ auto_break_minutes?: number;
22641
+ auto_break_unpaid?: boolean;
22642
+ auto_stop_after_hours?: number;
22643
+ callout_fee?: number;
22644
+ created_at?: string;
22645
+ daily_regular_hours?: number;
22646
+ default_hourly_rate?: number;
22647
+ id?: string;
22648
+ materials_markup_percent?: number;
22649
+ max_daily_hours?: number;
22650
+ max_weekly_hours?: number;
22651
+ meal_allowance_amount?: number;
22652
+ overtime_pct_178?: number;
22653
+ overtime_pct_189?: number;
22654
+ overtime_pct_212?: number;
22655
+ reminder_after_hours?: number;
22656
+ standby_evening_amount?: number;
22657
+ standby_weekend_amount?: number;
22658
+ travel_cost_per_km?: number | null;
22659
+ travel_cost_threshold_km?: number | null;
22660
+ travel_counts_as_work?: boolean;
22661
+ travel_hourly_rate?: number;
22662
+ travel_rate_per_hour?: number;
22663
+ travel_threshold_minutes?: number;
22664
+ updated_at?: string;
22665
+ weekend_always_212?: boolean;
22666
+ window_end?: string;
22667
+ window_start?: string;
22668
+ };
22669
+ Update: {
22670
+ auto_break_after_hours?: number;
22671
+ auto_break_minutes?: number;
22672
+ auto_break_unpaid?: boolean;
22673
+ auto_stop_after_hours?: number;
22674
+ callout_fee?: number;
22675
+ created_at?: string;
22676
+ daily_regular_hours?: number;
22677
+ default_hourly_rate?: number;
22678
+ id?: string;
22679
+ materials_markup_percent?: number;
22680
+ max_daily_hours?: number;
22681
+ max_weekly_hours?: number;
22682
+ meal_allowance_amount?: number;
22683
+ overtime_pct_178?: number;
22684
+ overtime_pct_189?: number;
22685
+ overtime_pct_212?: number;
22686
+ reminder_after_hours?: number;
22687
+ standby_evening_amount?: number;
22688
+ standby_weekend_amount?: number;
22689
+ travel_cost_per_km?: number | null;
22690
+ travel_cost_threshold_km?: number | null;
22691
+ travel_counts_as_work?: boolean;
22692
+ travel_hourly_rate?: number;
22693
+ travel_rate_per_hour?: number;
22694
+ travel_threshold_minutes?: number;
22695
+ updated_at?: string;
22696
+ weekend_always_212?: boolean;
22697
+ window_end?: string;
22698
+ window_start?: string;
22699
+ };
22700
+ Relationships: [];
22701
+ };
21885
22702
  carrier_shipping_rates: {
21886
22703
  Row: {
21887
22704
  carrier_id: string;
@@ -28776,7 +29593,6 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
28776
29593
  start_date: string;
28777
29594
  start_time: string | null;
28778
29595
  status: string;
28779
- tenant_id: string;
28780
29596
  updated_at: string;
28781
29597
  user_id: string;
28782
29598
  };
@@ -28794,7 +29610,6 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
28794
29610
  start_date: string;
28795
29611
  start_time?: string | null;
28796
29612
  status?: string;
28797
- tenant_id?: string;
28798
29613
  updated_at?: string;
28799
29614
  user_id: string;
28800
29615
  };
@@ -28812,7 +29627,6 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
28812
29627
  start_date?: string;
28813
29628
  start_time?: string | null;
28814
29629
  status?: string;
28815
- tenant_id?: string;
28816
29630
  updated_at?: string;
28817
29631
  user_id?: string;
28818
29632
  };
@@ -28820,13 +29634,13 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
28820
29634
  foreignKeyName: "leave_requests_monteur_id_fkey";
28821
29635
  columns: ["monteur_id"];
28822
29636
  isOneToOne: false;
28823
- referencedRelation: "monteurs";
29637
+ referencedRelation: "profiles";
28824
29638
  referencedColumns: ["id"];
28825
29639
  }, {
28826
29640
  foreignKeyName: "leave_requests_user_id_fkey";
28827
29641
  columns: ["user_id"];
28828
29642
  isOneToOne: false;
28829
- referencedRelation: "monteurs";
29643
+ referencedRelation: "profiles";
28830
29644
  referencedColumns: ["id"];
28831
29645
  }];
28832
29646
  };
@@ -29694,6 +30508,45 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
29694
30508
  };
29695
30509
  Relationships: [];
29696
30510
  };
30511
+ logistics_plan_queue: {
30512
+ Row: {
30513
+ attempts: number;
30514
+ claimed_at: string | null;
30515
+ enqueued_at: string;
30516
+ error: string | null;
30517
+ id: string;
30518
+ next_attempt_at: string;
30519
+ order_id: string;
30520
+ reason: string;
30521
+ status: string;
30522
+ updated_at: string;
30523
+ };
30524
+ Insert: {
30525
+ attempts?: number;
30526
+ claimed_at?: string | null;
30527
+ enqueued_at?: string;
30528
+ error?: string | null;
30529
+ id?: string;
30530
+ next_attempt_at?: string;
30531
+ order_id: string;
30532
+ reason?: string;
30533
+ status?: string;
30534
+ updated_at?: string;
30535
+ };
30536
+ Update: {
30537
+ attempts?: number;
30538
+ claimed_at?: string | null;
30539
+ enqueued_at?: string;
30540
+ error?: string | null;
30541
+ id?: string;
30542
+ next_attempt_at?: string;
30543
+ order_id?: string;
30544
+ reason?: string;
30545
+ status?: string;
30546
+ updated_at?: string;
30547
+ };
30548
+ Relationships: [];
30549
+ };
29697
30550
  logistics_plan_runs: {
29698
30551
  Row: {
29699
30552
  created_at: string;
@@ -29769,6 +30622,24 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
29769
30622
  referencedColumns: ["id"];
29770
30623
  }];
29771
30624
  };
30625
+ logistics_plan_settings: {
30626
+ Row: {
30627
+ key: string;
30628
+ updated_at: string;
30629
+ value: string;
30630
+ };
30631
+ Insert: {
30632
+ key: string;
30633
+ updated_at?: string;
30634
+ value: string;
30635
+ };
30636
+ Update: {
30637
+ key?: string;
30638
+ updated_at?: string;
30639
+ value?: string;
30640
+ };
30641
+ Relationships: [];
30642
+ };
29772
30643
  logistics_rebuffer_state: {
29773
30644
  Row: {
29774
30645
  created_at: string;
@@ -30924,6 +31795,90 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
30924
31795
  };
30925
31796
  Relationships: [];
30926
31797
  };
31798
+ material_usage: {
31799
+ Row: {
31800
+ created_at: string;
31801
+ id: string;
31802
+ material_name: string;
31803
+ monteur_id: string | null;
31804
+ price_at_time: number;
31805
+ quantity_used: number;
31806
+ updated_at: string;
31807
+ van_inventory_id: string | null;
31808
+ work_order_id: string;
31809
+ };
31810
+ Insert: {
31811
+ created_at?: string;
31812
+ id?: string;
31813
+ material_name: string;
31814
+ monteur_id?: string | null;
31815
+ price_at_time?: number;
31816
+ quantity_used?: number;
31817
+ updated_at?: string;
31818
+ van_inventory_id?: string | null;
31819
+ work_order_id: string;
31820
+ };
31821
+ Update: {
31822
+ created_at?: string;
31823
+ id?: string;
31824
+ material_name?: string;
31825
+ monteur_id?: string | null;
31826
+ price_at_time?: number;
31827
+ quantity_used?: number;
31828
+ updated_at?: string;
31829
+ van_inventory_id?: string | null;
31830
+ work_order_id?: string;
31831
+ };
31832
+ Relationships: [{
31833
+ foreignKeyName: "material_usage_monteur_id_fkey";
31834
+ columns: ["monteur_id"];
31835
+ isOneToOne: false;
31836
+ referencedRelation: "profiles";
31837
+ referencedColumns: ["id"];
31838
+ }, {
31839
+ foreignKeyName: "material_usage_van_inventory_id_fkey";
31840
+ columns: ["van_inventory_id"];
31841
+ isOneToOne: false;
31842
+ referencedRelation: "van_inventories";
31843
+ referencedColumns: ["id"];
31844
+ }, {
31845
+ foreignKeyName: "material_usage_work_order_id_fkey";
31846
+ columns: ["work_order_id"];
31847
+ isOneToOne: false;
31848
+ referencedRelation: "work_orders";
31849
+ referencedColumns: ["id"];
31850
+ }];
31851
+ };
31852
+ module_features: {
31853
+ Row: {
31854
+ created_at: string;
31855
+ feature_id: string;
31856
+ id: string;
31857
+ is_active: boolean;
31858
+ last_seen_at: string;
31859
+ module_id: string;
31860
+ name: string;
31861
+ };
31862
+ Insert: {
31863
+ created_at?: string;
31864
+ feature_id: string;
31865
+ id?: string;
31866
+ is_active?: boolean;
31867
+ last_seen_at?: string;
31868
+ module_id: string;
31869
+ name: string;
31870
+ };
31871
+ Update: {
31872
+ created_at?: string;
31873
+ feature_id?: string;
31874
+ id?: string;
31875
+ is_active?: boolean;
31876
+ last_seen_at?: string;
31877
+ module_id?: string;
31878
+ name?: string;
31879
+ };
31880
+ Relationships: [];
31881
+ };
30927
31882
  module_permissions: {
30928
31883
  Row: {
30929
31884
  created_at: string;
@@ -30954,6 +31909,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
30954
31909
  module_registry: {
30955
31910
  Row: {
30956
31911
  created_at: string;
31912
+ enforce: boolean;
30957
31913
  is_active: boolean;
30958
31914
  last_seen_at: string;
30959
31915
  module_id: string;
@@ -30963,6 +31919,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
30963
31919
  };
30964
31920
  Insert: {
30965
31921
  created_at?: string;
31922
+ enforce?: boolean;
30966
31923
  is_active?: boolean;
30967
31924
  last_seen_at?: string;
30968
31925
  module_id: string;
@@ -30972,6 +31929,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
30972
31929
  };
30973
31930
  Update: {
30974
31931
  created_at?: string;
31932
+ enforce?: boolean;
30975
31933
  is_active?: boolean;
30976
31934
  last_seen_at?: string;
30977
31935
  module_id?: string;
@@ -31032,63 +31990,6 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
31032
31990
  };
31033
31991
  Relationships: [];
31034
31992
  };
31035
- monteurs: {
31036
- Row: {
31037
- avatar_url: string | null;
31038
- color: string | null;
31039
- created_at: string;
31040
- email: string | null;
31041
- id: string;
31042
- is_active: boolean;
31043
- leave_balance_hours: number;
31044
- name: string;
31045
- persnr: number | null;
31046
- phone: string | null;
31047
- role: string;
31048
- tenant_id: string;
31049
- updated_at: string;
31050
- user_id: string | null;
31051
- };
31052
- Insert: {
31053
- avatar_url?: string | null;
31054
- color?: string | null;
31055
- created_at?: string;
31056
- email?: string | null;
31057
- id?: string;
31058
- is_active?: boolean;
31059
- leave_balance_hours?: number;
31060
- name: string;
31061
- persnr?: number | null;
31062
- phone?: string | null;
31063
- role?: string;
31064
- tenant_id: string;
31065
- updated_at?: string;
31066
- user_id?: string | null;
31067
- };
31068
- Update: {
31069
- avatar_url?: string | null;
31070
- color?: string | null;
31071
- created_at?: string;
31072
- email?: string | null;
31073
- id?: string;
31074
- is_active?: boolean;
31075
- leave_balance_hours?: number;
31076
- name?: string;
31077
- persnr?: number | null;
31078
- phone?: string | null;
31079
- role?: string;
31080
- tenant_id?: string;
31081
- updated_at?: string;
31082
- user_id?: string | null;
31083
- };
31084
- Relationships: [{
31085
- foreignKeyName: "monteurs_tenant_id_fkey";
31086
- columns: ["tenant_id"];
31087
- isOneToOne: false;
31088
- referencedRelation: "tenants";
31089
- referencedColumns: ["id"];
31090
- }];
31091
- };
31092
31993
  nmbrs_component_mapping: {
31093
31994
  Row: {
31094
31995
  created_at: string;
@@ -31159,13 +32060,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
31159
32060
  nmbrs_employee_number?: string;
31160
32061
  updated_at?: string;
31161
32062
  };
31162
- Relationships: [{
31163
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
31164
- columns: ["monteur_id"];
31165
- isOneToOne: true;
31166
- referencedRelation: "monteurs";
31167
- referencedColumns: ["id"];
31168
- }];
32063
+ Relationships: [];
31169
32064
  };
31170
32065
  nmbrs_export_lines: {
31171
32066
  Row: {
@@ -31214,12 +32109,6 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
31214
32109
  wage_code?: string;
31215
32110
  };
31216
32111
  Relationships: [{
31217
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
31218
- columns: ["monteur_id"];
31219
- isOneToOne: false;
31220
- referencedRelation: "monteurs";
31221
- referencedColumns: ["id"];
31222
- }, {
31223
32112
  foreignKeyName: "nmbrs_export_lines_run_id_fkey";
31224
32113
  columns: ["run_id"];
31225
32114
  isOneToOne: false;
@@ -32047,6 +32936,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
32047
32936
  error_message: string | null;
32048
32937
  id: string;
32049
32938
  invoice_number: string | null;
32939
+ next_attempt_at: string;
32050
32940
  order_id: string;
32051
32941
  processed_at: string | null;
32052
32942
  status: string;
@@ -32058,6 +32948,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
32058
32948
  error_message?: string | null;
32059
32949
  id?: string;
32060
32950
  invoice_number?: string | null;
32951
+ next_attempt_at?: string;
32061
32952
  order_id: string;
32062
32953
  processed_at?: string | null;
32063
32954
  status?: string;
@@ -32069,6 +32960,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
32069
32960
  error_message?: string | null;
32070
32961
  id?: string;
32071
32962
  invoice_number?: string | null;
32963
+ next_attempt_at?: string;
32072
32964
  order_id?: string;
32073
32965
  processed_at?: string | null;
32074
32966
  status?: string;
@@ -33607,6 +34499,9 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
33607
34499
  created_at: string;
33608
34500
  id: string;
33609
34501
  laatst_gezien: string;
34502
+ laatste_fout: string | null;
34503
+ laatste_request_id: number | null;
34504
+ mislukte_posts: number;
33610
34505
  tick_sleutel: string;
33611
34506
  updated_at: string;
33612
34507
  };
@@ -33616,6 +34511,9 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
33616
34511
  created_at?: string;
33617
34512
  id?: string;
33618
34513
  laatst_gezien?: string;
34514
+ laatste_fout?: string | null;
34515
+ laatste_request_id?: number | null;
34516
+ mislukte_posts?: number;
33619
34517
  tick_sleutel?: string;
33620
34518
  updated_at?: string;
33621
34519
  };
@@ -33625,6 +34523,9 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
33625
34523
  created_at?: string;
33626
34524
  id?: string;
33627
34525
  laatst_gezien?: string;
34526
+ laatste_fout?: string | null;
34527
+ laatste_request_id?: number | null;
34528
+ mislukte_posts?: number;
33628
34529
  tick_sleutel?: string;
33629
34530
  updated_at?: string;
33630
34531
  };
@@ -35133,6 +36034,96 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
35133
36034
  referencedColumns: ["id"];
35134
36035
  }];
35135
36036
  };
36037
+ role_assignments: {
36038
+ Row: {
36039
+ created_at: string;
36040
+ id: string;
36041
+ role_id: string;
36042
+ user_id: string;
36043
+ };
36044
+ Insert: {
36045
+ created_at?: string;
36046
+ id?: string;
36047
+ role_id: string;
36048
+ user_id: string;
36049
+ };
36050
+ Update: {
36051
+ created_at?: string;
36052
+ id?: string;
36053
+ role_id?: string;
36054
+ user_id?: string;
36055
+ };
36056
+ Relationships: [{
36057
+ foreignKeyName: "role_assignments_role_id_fkey";
36058
+ columns: ["role_id"];
36059
+ isOneToOne: false;
36060
+ referencedRelation: "roles";
36061
+ referencedColumns: ["id"];
36062
+ }];
36063
+ };
36064
+ role_permissions: {
36065
+ Row: {
36066
+ can_edit: boolean;
36067
+ can_view: boolean;
36068
+ feature_id: string;
36069
+ id: string;
36070
+ module_id: string;
36071
+ role_id: string;
36072
+ updated_at: string;
36073
+ };
36074
+ Insert: {
36075
+ can_edit?: boolean;
36076
+ can_view?: boolean;
36077
+ feature_id?: string;
36078
+ id?: string;
36079
+ module_id: string;
36080
+ role_id: string;
36081
+ updated_at?: string;
36082
+ };
36083
+ Update: {
36084
+ can_edit?: boolean;
36085
+ can_view?: boolean;
36086
+ feature_id?: string;
36087
+ id?: string;
36088
+ module_id?: string;
36089
+ role_id?: string;
36090
+ updated_at?: string;
36091
+ };
36092
+ Relationships: [{
36093
+ foreignKeyName: "role_permissions_role_id_fkey";
36094
+ columns: ["role_id"];
36095
+ isOneToOne: false;
36096
+ referencedRelation: "roles";
36097
+ referencedColumns: ["id"];
36098
+ }];
36099
+ };
36100
+ roles: {
36101
+ Row: {
36102
+ created_at: string;
36103
+ id: string;
36104
+ is_protected: boolean;
36105
+ key: string;
36106
+ name: string;
36107
+ updated_at: string;
36108
+ };
36109
+ Insert: {
36110
+ created_at?: string;
36111
+ id?: string;
36112
+ is_protected?: boolean;
36113
+ key: string;
36114
+ name: string;
36115
+ updated_at?: string;
36116
+ };
36117
+ Update: {
36118
+ created_at?: string;
36119
+ id?: string;
36120
+ is_protected?: boolean;
36121
+ key?: string;
36122
+ name?: string;
36123
+ updated_at?: string;
36124
+ };
36125
+ Relationships: [];
36126
+ };
35136
36127
  rooms: {
35137
36128
  Row: {
35138
36129
  capacity: number;
@@ -35802,6 +36793,54 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
35802
36793
  };
35803
36794
  Relationships: [];
35804
36795
  };
36796
+ time_compensation_entries: {
36797
+ Row: {
36798
+ created_at: string;
36799
+ employee_id: string;
36800
+ entry_date: string;
36801
+ id: string;
36802
+ km: number;
36803
+ meal_allowance: number;
36804
+ notes: string | null;
36805
+ standby_evening: number;
36806
+ standby_weekend: number;
36807
+ tvt_change: number;
36808
+ updated_at: string;
36809
+ };
36810
+ Insert: {
36811
+ created_at?: string;
36812
+ employee_id: string;
36813
+ entry_date: string;
36814
+ id?: string;
36815
+ km?: number;
36816
+ meal_allowance?: number;
36817
+ notes?: string | null;
36818
+ standby_evening?: number;
36819
+ standby_weekend?: number;
36820
+ tvt_change?: number;
36821
+ updated_at?: string;
36822
+ };
36823
+ Update: {
36824
+ created_at?: string;
36825
+ employee_id?: string;
36826
+ entry_date?: string;
36827
+ id?: string;
36828
+ km?: number;
36829
+ meal_allowance?: number;
36830
+ notes?: string | null;
36831
+ standby_evening?: number;
36832
+ standby_weekend?: number;
36833
+ tvt_change?: number;
36834
+ updated_at?: string;
36835
+ };
36836
+ Relationships: [{
36837
+ foreignKeyName: "time_compensation_entries_employee_id_fkey";
36838
+ columns: ["employee_id"];
36839
+ isOneToOne: false;
36840
+ referencedRelation: "profiles";
36841
+ referencedColumns: ["id"];
36842
+ }];
36843
+ };
35805
36844
  time_entries: {
35806
36845
  Row: {
35807
36846
  created_at: string;
@@ -35836,65 +36875,170 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
35836
36875
  undertime?: number;
35837
36876
  updated_at?: string;
35838
36877
  };
36878
+ Relationships: [];
36879
+ };
36880
+ time_log_week_approvals: {
36881
+ Row: {
36882
+ approved_at: string | null;
36883
+ approved_by: string | null;
36884
+ created_at: string;
36885
+ employee_id: string;
36886
+ id: string;
36887
+ locked: boolean;
36888
+ notes: string | null;
36889
+ status: string;
36890
+ submitted_at: string | null;
36891
+ updated_at: string;
36892
+ week_start: string;
36893
+ };
36894
+ Insert: {
36895
+ approved_at?: string | null;
36896
+ approved_by?: string | null;
36897
+ created_at?: string;
36898
+ employee_id: string;
36899
+ id?: string;
36900
+ locked?: boolean;
36901
+ notes?: string | null;
36902
+ status?: string;
36903
+ submitted_at?: string | null;
36904
+ updated_at?: string;
36905
+ week_start: string;
36906
+ };
36907
+ Update: {
36908
+ approved_at?: string | null;
36909
+ approved_by?: string | null;
36910
+ created_at?: string;
36911
+ employee_id?: string;
36912
+ id?: string;
36913
+ locked?: boolean;
36914
+ notes?: string | null;
36915
+ status?: string;
36916
+ submitted_at?: string | null;
36917
+ updated_at?: string;
36918
+ week_start?: string;
36919
+ };
35839
36920
  Relationships: [{
35840
- foreignKeyName: "time_entries_employee_id_fkey";
36921
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
35841
36922
  columns: ["employee_id"];
35842
36923
  isOneToOne: false;
35843
- referencedRelation: "monteurs";
36924
+ referencedRelation: "profiles";
35844
36925
  referencedColumns: ["id"];
35845
36926
  }];
35846
36927
  };
35847
36928
  time_logs: {
35848
36929
  Row: {
36930
+ auto_stop_reason: string | null;
36931
+ auto_stopped: boolean;
35849
36932
  created_at: string;
36933
+ current_latitude: number | null;
36934
+ current_longitude: number | null;
36935
+ current_position_updated_at: string | null;
35850
36936
  employee_id: string;
36937
+ end_latitude: number | null;
36938
+ end_longitude: number | null;
35851
36939
  end_time: string | null;
36940
+ eta_distance_km: number | null;
36941
+ eta_minutes: number | null;
36942
+ eta_updated_at: string | null;
36943
+ hour_category: string | null;
35852
36944
  id: string;
36945
+ last_reminder_at: string | null;
35853
36946
  notes: string | null;
35854
36947
  overtime_hours: number;
35855
36948
  overtime_type: string | null;
35856
36949
  regular_hours: number;
36950
+ reminder_count: number;
36951
+ requires_review: boolean;
36952
+ start_latitude: number | null;
36953
+ start_longitude: number | null;
35857
36954
  start_time: string;
35858
36955
  travel_cost: number | null;
35859
36956
  travel_distance_km: number | null;
36957
+ travel_duration_min: number | null;
36958
+ travel_time_minutes: number | null;
35860
36959
  type: string;
35861
36960
  updated_at: string;
36961
+ work_order_id: string | null;
35862
36962
  };
35863
36963
  Insert: {
36964
+ auto_stop_reason?: string | null;
36965
+ auto_stopped?: boolean;
35864
36966
  created_at?: string;
36967
+ current_latitude?: number | null;
36968
+ current_longitude?: number | null;
36969
+ current_position_updated_at?: string | null;
35865
36970
  employee_id: string;
36971
+ end_latitude?: number | null;
36972
+ end_longitude?: number | null;
35866
36973
  end_time?: string | null;
36974
+ eta_distance_km?: number | null;
36975
+ eta_minutes?: number | null;
36976
+ eta_updated_at?: string | null;
36977
+ hour_category?: string | null;
35867
36978
  id?: string;
36979
+ last_reminder_at?: string | null;
35868
36980
  notes?: string | null;
35869
36981
  overtime_hours?: number;
35870
36982
  overtime_type?: string | null;
35871
36983
  regular_hours?: number;
36984
+ reminder_count?: number;
36985
+ requires_review?: boolean;
36986
+ start_latitude?: number | null;
36987
+ start_longitude?: number | null;
35872
36988
  start_time?: string;
35873
36989
  travel_cost?: number | null;
35874
36990
  travel_distance_km?: number | null;
36991
+ travel_duration_min?: number | null;
36992
+ travel_time_minutes?: number | null;
35875
36993
  type: string;
35876
36994
  updated_at?: string;
36995
+ work_order_id?: string | null;
35877
36996
  };
35878
36997
  Update: {
36998
+ auto_stop_reason?: string | null;
36999
+ auto_stopped?: boolean;
35879
37000
  created_at?: string;
37001
+ current_latitude?: number | null;
37002
+ current_longitude?: number | null;
37003
+ current_position_updated_at?: string | null;
35880
37004
  employee_id?: string;
37005
+ end_latitude?: number | null;
37006
+ end_longitude?: number | null;
35881
37007
  end_time?: string | null;
37008
+ eta_distance_km?: number | null;
37009
+ eta_minutes?: number | null;
37010
+ eta_updated_at?: string | null;
37011
+ hour_category?: string | null;
35882
37012
  id?: string;
37013
+ last_reminder_at?: string | null;
35883
37014
  notes?: string | null;
35884
37015
  overtime_hours?: number;
35885
37016
  overtime_type?: string | null;
35886
37017
  regular_hours?: number;
37018
+ reminder_count?: number;
37019
+ requires_review?: boolean;
37020
+ start_latitude?: number | null;
37021
+ start_longitude?: number | null;
35887
37022
  start_time?: string;
35888
37023
  travel_cost?: number | null;
35889
37024
  travel_distance_km?: number | null;
37025
+ travel_duration_min?: number | null;
37026
+ travel_time_minutes?: number | null;
35890
37027
  type?: string;
35891
37028
  updated_at?: string;
37029
+ work_order_id?: string | null;
35892
37030
  };
35893
37031
  Relationships: [{
35894
37032
  foreignKeyName: "time_logs_employee_id_fkey";
35895
37033
  columns: ["employee_id"];
35896
37034
  isOneToOne: false;
35897
- referencedRelation: "monteurs";
37035
+ referencedRelation: "profiles";
37036
+ referencedColumns: ["id"];
37037
+ }, {
37038
+ foreignKeyName: "time_logs_work_order_id_fkey";
37039
+ columns: ["work_order_id"];
37040
+ isOneToOne: false;
37041
+ referencedRelation: "work_orders";
35898
37042
  referencedColumns: ["id"];
35899
37043
  }];
35900
37044
  };
@@ -35933,7 +37077,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
35933
37077
  foreignKeyName: "time_off_entries_employee_id_fkey";
35934
37078
  columns: ["employee_id"];
35935
37079
  isOneToOne: false;
35936
- referencedRelation: "monteurs";
37080
+ referencedRelation: "profiles";
35937
37081
  referencedColumns: ["id"];
35938
37082
  }];
35939
37083
  };
@@ -36243,6 +37387,39 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
36243
37387
  };
36244
37388
  Relationships: [];
36245
37389
  };
37390
+ twinfield_cron_locks: {
37391
+ Row: {
37392
+ created_at: string;
37393
+ heartbeat_at: string;
37394
+ job_name: string;
37395
+ last_error: string | null;
37396
+ last_finished_at: string | null;
37397
+ locked_at: string;
37398
+ run_id: string;
37399
+ updated_at: string;
37400
+ };
37401
+ Insert: {
37402
+ created_at?: string;
37403
+ heartbeat_at?: string;
37404
+ job_name: string;
37405
+ last_error?: string | null;
37406
+ last_finished_at?: string | null;
37407
+ locked_at?: string;
37408
+ run_id?: string;
37409
+ updated_at?: string;
37410
+ };
37411
+ Update: {
37412
+ created_at?: string;
37413
+ heartbeat_at?: string;
37414
+ job_name?: string;
37415
+ last_error?: string | null;
37416
+ last_finished_at?: string | null;
37417
+ locked_at?: string;
37418
+ run_id?: string;
37419
+ updated_at?: string;
37420
+ };
37421
+ Relationships: [];
37422
+ };
36246
37423
  twinfield_customers: {
36247
37424
  Row: {
36248
37425
  address: string | null;
@@ -36843,6 +38020,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
36843
38020
  twinfield_push_queue: {
36844
38021
  Row: {
36845
38022
  action: string;
38023
+ attempt_started_at: string | null;
36846
38024
  attempts: number;
36847
38025
  connection_id: string | null;
36848
38026
  created_at: string;
@@ -36859,6 +38037,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
36859
38037
  };
36860
38038
  Insert: {
36861
38039
  action?: string;
38040
+ attempt_started_at?: string | null;
36862
38041
  attempts?: number;
36863
38042
  connection_id?: string | null;
36864
38043
  created_at?: string;
@@ -36875,6 +38054,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
36875
38054
  };
36876
38055
  Update: {
36877
38056
  action?: string;
38057
+ attempt_started_at?: string | null;
36878
38058
  attempts?: number;
36879
38059
  connection_id?: string | null;
36880
38060
  created_at?: string;
@@ -37072,13 +38252,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
37072
38252
  workday_end?: string | null;
37073
38253
  workday_start?: string | null;
37074
38254
  };
37075
- Relationships: [{
37076
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
37077
- columns: ["monteur_id"];
37078
- isOneToOne: true;
37079
- referencedRelation: "monteurs";
37080
- referencedColumns: ["id"];
37081
- }];
38255
+ Relationships: [];
37082
38256
  };
37083
38257
  uren_entries: {
37084
38258
  Row: {
@@ -37124,12 +38298,6 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
37124
38298
  werkbon_id?: string | null;
37125
38299
  };
37126
38300
  Relationships: [{
37127
- foreignKeyName: "uren_entries_monteur_id_fkey";
37128
- columns: ["monteur_id"];
37129
- isOneToOne: false;
37130
- referencedRelation: "monteurs";
37131
- referencedColumns: ["id"];
37132
- }, {
37133
38301
  foreignKeyName: "uren_entries_werkbon_id_fkey";
37134
38302
  columns: ["werkbon_id"];
37135
38303
  isOneToOne: false;
@@ -37597,17 +38765,12 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
37597
38765
  submitted_at?: string | null;
37598
38766
  updated_at?: string;
37599
38767
  };
37600
- Relationships: [{
37601
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
37602
- columns: ["monteur_id"];
37603
- isOneToOne: false;
37604
- referencedRelation: "monteurs";
37605
- referencedColumns: ["id"];
37606
- }];
38768
+ Relationships: [];
37607
38769
  };
37608
38770
  user_module_permissions: {
37609
38771
  Row: {
37610
38772
  created_at: string;
38773
+ feature_id: string;
37611
38774
  id: string;
37612
38775
  module_id: string;
37613
38776
  permission: string;
@@ -37616,6 +38779,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
37616
38779
  };
37617
38780
  Insert: {
37618
38781
  created_at?: string;
38782
+ feature_id?: string;
37619
38783
  id?: string;
37620
38784
  module_id: string;
37621
38785
  permission: string;
@@ -37624,6 +38788,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
37624
38788
  };
37625
38789
  Update: {
37626
38790
  created_at?: string;
38791
+ feature_id?: string;
37627
38792
  id?: string;
37628
38793
  module_id?: string;
37629
38794
  permission?: string;
@@ -37659,6 +38824,51 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
37659
38824
  referencedColumns: ["id"];
37660
38825
  }];
37661
38826
  };
38827
+ van_inventories: {
38828
+ Row: {
38829
+ barcode: string | null;
38830
+ created_at: string;
38831
+ id: string;
38832
+ monteur_id: string | null;
38833
+ price_per_unit: number;
38834
+ product_name: string;
38835
+ quantity_current: number;
38836
+ quantity_min: number;
38837
+ unit: string;
38838
+ updated_at: string;
38839
+ };
38840
+ Insert: {
38841
+ barcode?: string | null;
38842
+ created_at?: string;
38843
+ id?: string;
38844
+ monteur_id?: string | null;
38845
+ price_per_unit?: number;
38846
+ product_name: string;
38847
+ quantity_current?: number;
38848
+ quantity_min?: number;
38849
+ unit?: string;
38850
+ updated_at?: string;
38851
+ };
38852
+ Update: {
38853
+ barcode?: string | null;
38854
+ created_at?: string;
38855
+ id?: string;
38856
+ monteur_id?: string | null;
38857
+ price_per_unit?: number;
38858
+ product_name?: string;
38859
+ quantity_current?: number;
38860
+ quantity_min?: number;
38861
+ unit?: string;
38862
+ updated_at?: string;
38863
+ };
38864
+ Relationships: [{
38865
+ foreignKeyName: "van_inventories_monteur_id_fkey";
38866
+ columns: ["monteur_id"];
38867
+ isOneToOne: false;
38868
+ referencedRelation: "profiles";
38869
+ referencedColumns: ["id"];
38870
+ }];
38871
+ };
37662
38872
  voorraad_custom_fields: {
37663
38873
  Row: {
37664
38874
  created_at: string;
@@ -38609,7 +39819,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
38609
39819
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
38610
39820
  columns: ["monteur_id"];
38611
39821
  isOneToOne: false;
38612
- referencedRelation: "monteurs";
39822
+ referencedRelation: "profiles";
38613
39823
  referencedColumns: ["id"];
38614
39824
  }, {
38615
39825
  foreignKeyName: "work_order_monteurs_work_order_id_fkey";
@@ -38619,6 +39829,60 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
38619
39829
  referencedColumns: ["id"];
38620
39830
  }];
38621
39831
  };
39832
+ work_order_photos: {
39833
+ Row: {
39834
+ ai_caption: string | null;
39835
+ ai_categorized_at: string | null;
39836
+ ai_labels: import("../integrations/supabase/types").Json | null;
39837
+ caption: string | null;
39838
+ created_at: string;
39839
+ id: string;
39840
+ monteur_id: string | null;
39841
+ photo_type: string;
39842
+ storage_path: string;
39843
+ updated_at: string;
39844
+ work_order_id: string;
39845
+ };
39846
+ Insert: {
39847
+ ai_caption?: string | null;
39848
+ ai_categorized_at?: string | null;
39849
+ ai_labels?: import("../integrations/supabase/types").Json | null;
39850
+ caption?: string | null;
39851
+ created_at?: string;
39852
+ id?: string;
39853
+ monteur_id?: string | null;
39854
+ photo_type?: string;
39855
+ storage_path: string;
39856
+ updated_at?: string;
39857
+ work_order_id: string;
39858
+ };
39859
+ Update: {
39860
+ ai_caption?: string | null;
39861
+ ai_categorized_at?: string | null;
39862
+ ai_labels?: import("../integrations/supabase/types").Json | null;
39863
+ caption?: string | null;
39864
+ created_at?: string;
39865
+ id?: string;
39866
+ monteur_id?: string | null;
39867
+ photo_type?: string;
39868
+ storage_path?: string;
39869
+ updated_at?: string;
39870
+ work_order_id?: string;
39871
+ };
39872
+ Relationships: [{
39873
+ foreignKeyName: "work_order_photos_monteur_id_fkey";
39874
+ columns: ["monteur_id"];
39875
+ isOneToOne: false;
39876
+ referencedRelation: "profiles";
39877
+ referencedColumns: ["id"];
39878
+ }, {
39879
+ foreignKeyName: "work_order_photos_work_order_id_fkey";
39880
+ columns: ["work_order_id"];
39881
+ isOneToOne: false;
39882
+ referencedRelation: "work_orders";
39883
+ referencedColumns: ["id"];
39884
+ }];
39885
+ };
38622
39886
  work_orders: {
38623
39887
  Row: {
38624
39888
  assigned_to: string | null;
@@ -38650,7 +39914,6 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
38650
39914
  scheduled_end_time: string | null;
38651
39915
  scheduled_start_time: string | null;
38652
39916
  status: string;
38653
- tenant_id: string;
38654
39917
  total_hours_worked: number | null;
38655
39918
  total_price: number | null;
38656
39919
  travel_time_minutes: number | null;
@@ -38688,7 +39951,6 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
38688
39951
  scheduled_end_time?: string | null;
38689
39952
  scheduled_start_time?: string | null;
38690
39953
  status?: string;
38691
- tenant_id: string;
38692
39954
  total_hours_worked?: number | null;
38693
39955
  total_price?: number | null;
38694
39956
  travel_time_minutes?: number | null;
@@ -38726,7 +39988,6 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
38726
39988
  scheduled_end_time?: string | null;
38727
39989
  scheduled_start_time?: string | null;
38728
39990
  status?: string;
38729
- tenant_id?: string;
38730
39991
  total_hours_worked?: number | null;
38731
39992
  total_price?: number | null;
38732
39993
  travel_time_minutes?: number | null;
@@ -38740,12 +40001,6 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
38740
40001
  isOneToOne: false;
38741
40002
  referencedRelation: "work_orders";
38742
40003
  referencedColumns: ["id"];
38743
- }, {
38744
- foreignKeyName: "work_orders_tenant_id_fkey";
38745
- columns: ["tenant_id"];
38746
- isOneToOne: false;
38747
- referencedRelation: "tenants";
38748
- referencedColumns: ["id"];
38749
40004
  }];
38750
40005
  };
38751
40006
  };
@@ -39430,6 +40685,19 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
39430
40685
  };
39431
40686
  Returns: undefined;
39432
40687
  };
40688
+ approve_mailbox_order_proposal: {
40689
+ Args: {
40690
+ p_custom_fields: import("../integrations/supabase/types").Json;
40691
+ p_customer_id: string;
40692
+ p_delivery_date: string;
40693
+ p_field_values?: import("../integrations/supabase/types").Json;
40694
+ p_lines: import("../integrations/supabase/types").Json;
40695
+ p_notes: string;
40696
+ p_proposal_id: string;
40697
+ p_reviewed_by: string;
40698
+ };
40699
+ Returns: import("../integrations/supabase/types").Json;
40700
+ };
39433
40701
  assign_cart_numbers: {
39434
40702
  Args: {
39435
40703
  p_carts: import("../integrations/supabase/types").Json;
@@ -39481,6 +40749,10 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
39481
40749
  };
39482
40750
  Returns: number;
39483
40751
  };
40752
+ can_manage_hours: {
40753
+ Args: never;
40754
+ Returns: boolean;
40755
+ };
39484
40756
  check_offer_product_available_stock: {
39485
40757
  Args: {
39486
40758
  p_campaign_product_id: string;
@@ -39670,6 +40942,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
39670
40942
  };
39671
40943
  Returns: {
39672
40944
  action: string;
40945
+ attempt_started_at: string | null;
39673
40946
  attempts: number;
39674
40947
  connection_id: string | null;
39675
40948
  created_at: string;
@@ -39757,6 +41030,30 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
39757
41030
  agent_naam: string;
39758
41031
  }[];
39759
41032
  };
41033
+ consume_van_inventory: {
41034
+ Args: {
41035
+ p_inventory_id: string;
41036
+ p_quantity: number;
41037
+ };
41038
+ Returns: {
41039
+ barcode: string | null;
41040
+ created_at: string;
41041
+ id: string;
41042
+ monteur_id: string | null;
41043
+ price_per_unit: number;
41044
+ product_name: string;
41045
+ quantity_current: number;
41046
+ quantity_min: number;
41047
+ unit: string;
41048
+ updated_at: string;
41049
+ };
41050
+ SetofOptions: {
41051
+ from: "*";
41052
+ to: "van_inventories";
41053
+ isOneToOne: true;
41054
+ isSetofReturn: false;
41055
+ };
41056
+ };
39760
41057
  control_get_todays_carts: {
39761
41058
  Args: never;
39762
41059
  Returns: {
@@ -39830,6 +41127,13 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
39830
41127
  _user_id: string;
39831
41128
  };
39832
41129
  Returns: string;
41130
+ } | {
41131
+ Args: {
41132
+ _feature_id: string;
41133
+ _module_id: string;
41134
+ _user_id: string;
41135
+ };
41136
+ Returns: string;
39833
41137
  };
39834
41138
  email_auth_decrypt: {
39835
41139
  Args: {
@@ -40181,12 +41485,6 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
40181
41485
  Args: never;
40182
41486
  Returns: string;
40183
41487
  };
40184
- get_work_order_tenant_id: {
40185
- Args: {
40186
- wo_id: string;
40187
- };
40188
- Returns: string;
40189
- };
40190
41488
  has_module_permission: {
40191
41489
  Args: {
40192
41490
  _min: string;
@@ -40220,6 +41518,13 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
40220
41518
  };
40221
41519
  Returns: boolean;
40222
41520
  };
41521
+ is_time_log_week_locked: {
41522
+ Args: {
41523
+ p_employee_id: string;
41524
+ p_start_time: string;
41525
+ };
41526
+ Returns: boolean;
41527
+ };
40223
41528
  is_user_admin: {
40224
41529
  Args: never;
40225
41530
  Returns: boolean;
@@ -40234,13 +41539,14 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
40234
41539
  };
40235
41540
  Returns: boolean;
40236
41541
  };
40237
- list_monteurs: {
41542
+ list_medewerkers: {
40238
41543
  Args: never;
40239
41544
  Returns: {
40240
41545
  avatar_url: string;
40241
41546
  display_name: string;
40242
41547
  email: string;
40243
41548
  id: string;
41549
+ roles: string[];
40244
41550
  }[];
40245
41551
  };
40246
41552
  list_my_planning_items: {
@@ -40731,6 +42037,65 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
40731
42037
  };
40732
42038
  Returns: number;
40733
42039
  };
42040
+ logistics_plan_claim: {
42041
+ Args: {
42042
+ p_limit?: number;
42043
+ };
42044
+ Returns: {
42045
+ attempts: number;
42046
+ id: string;
42047
+ order_id: string;
42048
+ }[];
42049
+ };
42050
+ logistics_plan_enqueue: {
42051
+ Args: {
42052
+ p_order_id: string;
42053
+ p_reason?: string;
42054
+ };
42055
+ Returns: undefined;
42056
+ };
42057
+ logistics_plan_ensure_event: {
42058
+ Args: {
42059
+ p_order_id: string;
42060
+ };
42061
+ Returns: boolean;
42062
+ };
42063
+ logistics_plan_finish: {
42064
+ Args: {
42065
+ p_error?: string;
42066
+ p_id: string;
42067
+ };
42068
+ Returns: undefined;
42069
+ };
42070
+ logistics_plan_impact_orders: {
42071
+ Args: {
42072
+ p_order_id: string;
42073
+ };
42074
+ Returns: {
42075
+ buffer_id: string;
42076
+ order_id: string;
42077
+ plan_date: string;
42078
+ }[];
42079
+ };
42080
+ logistics_plan_kick: {
42081
+ Args: never;
42082
+ Returns: undefined;
42083
+ };
42084
+ logistics_plan_prune: {
42085
+ Args: never;
42086
+ Returns: number;
42087
+ };
42088
+ logistics_plan_release_stale: {
42089
+ Args: never;
42090
+ Returns: number;
42091
+ };
42092
+ logistics_plan_setting: {
42093
+ Args: {
42094
+ p_default: number;
42095
+ p_key: string;
42096
+ };
42097
+ Returns: number;
42098
+ };
40734
42099
  logistics_queue_capacity_email: {
40735
42100
  Args: {
40736
42101
  p_alert_id: string;
@@ -40972,6 +42337,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
40972
42337
  my_module_permissions: {
40973
42338
  Args: never;
40974
42339
  Returns: {
42340
+ feature_id: string;
40975
42341
  module_id: string;
40976
42342
  permission: string;
40977
42343
  }[];
@@ -41852,6 +43218,16 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
41852
43218
  };
41853
43219
  Returns: string[];
41854
43220
  };
43221
+ switch_time_log: {
43222
+ Args: {
43223
+ p_employee_id: string;
43224
+ p_start_lat?: number;
43225
+ p_start_lng?: number;
43226
+ p_type: string;
43227
+ p_work_order_id?: string;
43228
+ };
43229
+ Returns: import("../integrations/supabase/types").Json;
43230
+ };
41855
43231
  sync_all_layer_stocks: {
41856
43232
  Args: never;
41857
43233
  Returns: undefined;
@@ -41902,6 +43278,24 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
41902
43278
  };
41903
43279
  Returns: boolean;
41904
43280
  };
43281
+ twinfield_cron_lock_acquire: {
43282
+ Args: {
43283
+ _job_name: string;
43284
+ _stale_seconds?: number;
43285
+ };
43286
+ Returns: boolean;
43287
+ };
43288
+ twinfield_cron_lock_release: {
43289
+ Args: {
43290
+ _error?: string;
43291
+ _job_name: string;
43292
+ };
43293
+ Returns: undefined;
43294
+ };
43295
+ twinfield_prune_push_queue: {
43296
+ Args: never;
43297
+ Returns: number;
43298
+ };
41905
43299
  twinfield_register_cron: {
41906
43300
  Args: {
41907
43301
  apikey?: string;
@@ -42865,6 +44259,126 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
42865
44259
  };
42866
44260
  Relationships: [];
42867
44261
  };
44262
+ cao_holidays: {
44263
+ Row: {
44264
+ created_at: string;
44265
+ description: string | null;
44266
+ holiday_date: string;
44267
+ id: string;
44268
+ updated_at: string;
44269
+ };
44270
+ Insert: {
44271
+ created_at?: string;
44272
+ description?: string | null;
44273
+ holiday_date: string;
44274
+ id?: string;
44275
+ updated_at?: string;
44276
+ };
44277
+ Update: {
44278
+ created_at?: string;
44279
+ description?: string | null;
44280
+ holiday_date?: string;
44281
+ id?: string;
44282
+ updated_at?: string;
44283
+ };
44284
+ Relationships: [];
44285
+ };
44286
+ cao_settings: {
44287
+ Row: {
44288
+ auto_break_after_hours: number;
44289
+ auto_break_minutes: number;
44290
+ auto_break_unpaid: boolean;
44291
+ auto_stop_after_hours: number;
44292
+ callout_fee: number;
44293
+ created_at: string;
44294
+ daily_regular_hours: number;
44295
+ default_hourly_rate: number;
44296
+ id: string;
44297
+ materials_markup_percent: number;
44298
+ max_daily_hours: number;
44299
+ max_weekly_hours: number;
44300
+ meal_allowance_amount: number;
44301
+ overtime_pct_178: number;
44302
+ overtime_pct_189: number;
44303
+ overtime_pct_212: number;
44304
+ reminder_after_hours: number;
44305
+ standby_evening_amount: number;
44306
+ standby_weekend_amount: number;
44307
+ travel_cost_per_km: number | null;
44308
+ travel_cost_threshold_km: number | null;
44309
+ travel_counts_as_work: boolean;
44310
+ travel_hourly_rate: number;
44311
+ travel_rate_per_hour: number;
44312
+ travel_threshold_minutes: number;
44313
+ updated_at: string;
44314
+ weekend_always_212: boolean;
44315
+ window_end: string;
44316
+ window_start: string;
44317
+ };
44318
+ Insert: {
44319
+ auto_break_after_hours?: number;
44320
+ auto_break_minutes?: number;
44321
+ auto_break_unpaid?: boolean;
44322
+ auto_stop_after_hours?: number;
44323
+ callout_fee?: number;
44324
+ created_at?: string;
44325
+ daily_regular_hours?: number;
44326
+ default_hourly_rate?: number;
44327
+ id?: string;
44328
+ materials_markup_percent?: number;
44329
+ max_daily_hours?: number;
44330
+ max_weekly_hours?: number;
44331
+ meal_allowance_amount?: number;
44332
+ overtime_pct_178?: number;
44333
+ overtime_pct_189?: number;
44334
+ overtime_pct_212?: number;
44335
+ reminder_after_hours?: number;
44336
+ standby_evening_amount?: number;
44337
+ standby_weekend_amount?: number;
44338
+ travel_cost_per_km?: number | null;
44339
+ travel_cost_threshold_km?: number | null;
44340
+ travel_counts_as_work?: boolean;
44341
+ travel_hourly_rate?: number;
44342
+ travel_rate_per_hour?: number;
44343
+ travel_threshold_minutes?: number;
44344
+ updated_at?: string;
44345
+ weekend_always_212?: boolean;
44346
+ window_end?: string;
44347
+ window_start?: string;
44348
+ };
44349
+ Update: {
44350
+ auto_break_after_hours?: number;
44351
+ auto_break_minutes?: number;
44352
+ auto_break_unpaid?: boolean;
44353
+ auto_stop_after_hours?: number;
44354
+ callout_fee?: number;
44355
+ created_at?: string;
44356
+ daily_regular_hours?: number;
44357
+ default_hourly_rate?: number;
44358
+ id?: string;
44359
+ materials_markup_percent?: number;
44360
+ max_daily_hours?: number;
44361
+ max_weekly_hours?: number;
44362
+ meal_allowance_amount?: number;
44363
+ overtime_pct_178?: number;
44364
+ overtime_pct_189?: number;
44365
+ overtime_pct_212?: number;
44366
+ reminder_after_hours?: number;
44367
+ standby_evening_amount?: number;
44368
+ standby_weekend_amount?: number;
44369
+ travel_cost_per_km?: number | null;
44370
+ travel_cost_threshold_km?: number | null;
44371
+ travel_counts_as_work?: boolean;
44372
+ travel_hourly_rate?: number;
44373
+ travel_rate_per_hour?: number;
44374
+ travel_threshold_minutes?: number;
44375
+ updated_at?: string;
44376
+ weekend_always_212?: boolean;
44377
+ window_end?: string;
44378
+ window_start?: string;
44379
+ };
44380
+ Relationships: [];
44381
+ };
42868
44382
  carrier_shipping_rates: {
42869
44383
  Row: {
42870
44384
  carrier_id: string;
@@ -49759,7 +51273,6 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
49759
51273
  start_date: string;
49760
51274
  start_time: string | null;
49761
51275
  status: string;
49762
- tenant_id: string;
49763
51276
  updated_at: string;
49764
51277
  user_id: string;
49765
51278
  };
@@ -49777,7 +51290,6 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
49777
51290
  start_date: string;
49778
51291
  start_time?: string | null;
49779
51292
  status?: string;
49780
- tenant_id?: string;
49781
51293
  updated_at?: string;
49782
51294
  user_id: string;
49783
51295
  };
@@ -49795,7 +51307,6 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
49795
51307
  start_date?: string;
49796
51308
  start_time?: string | null;
49797
51309
  status?: string;
49798
- tenant_id?: string;
49799
51310
  updated_at?: string;
49800
51311
  user_id?: string;
49801
51312
  };
@@ -49803,13 +51314,13 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
49803
51314
  foreignKeyName: "leave_requests_monteur_id_fkey";
49804
51315
  columns: ["monteur_id"];
49805
51316
  isOneToOne: false;
49806
- referencedRelation: "monteurs";
51317
+ referencedRelation: "profiles";
49807
51318
  referencedColumns: ["id"];
49808
51319
  }, {
49809
51320
  foreignKeyName: "leave_requests_user_id_fkey";
49810
51321
  columns: ["user_id"];
49811
51322
  isOneToOne: false;
49812
- referencedRelation: "monteurs";
51323
+ referencedRelation: "profiles";
49813
51324
  referencedColumns: ["id"];
49814
51325
  }];
49815
51326
  };
@@ -50677,6 +52188,45 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
50677
52188
  };
50678
52189
  Relationships: [];
50679
52190
  };
52191
+ logistics_plan_queue: {
52192
+ Row: {
52193
+ attempts: number;
52194
+ claimed_at: string | null;
52195
+ enqueued_at: string;
52196
+ error: string | null;
52197
+ id: string;
52198
+ next_attempt_at: string;
52199
+ order_id: string;
52200
+ reason: string;
52201
+ status: string;
52202
+ updated_at: string;
52203
+ };
52204
+ Insert: {
52205
+ attempts?: number;
52206
+ claimed_at?: string | null;
52207
+ enqueued_at?: string;
52208
+ error?: string | null;
52209
+ id?: string;
52210
+ next_attempt_at?: string;
52211
+ order_id: string;
52212
+ reason?: string;
52213
+ status?: string;
52214
+ updated_at?: string;
52215
+ };
52216
+ Update: {
52217
+ attempts?: number;
52218
+ claimed_at?: string | null;
52219
+ enqueued_at?: string;
52220
+ error?: string | null;
52221
+ id?: string;
52222
+ next_attempt_at?: string;
52223
+ order_id?: string;
52224
+ reason?: string;
52225
+ status?: string;
52226
+ updated_at?: string;
52227
+ };
52228
+ Relationships: [];
52229
+ };
50680
52230
  logistics_plan_runs: {
50681
52231
  Row: {
50682
52232
  created_at: string;
@@ -50752,6 +52302,24 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
50752
52302
  referencedColumns: ["id"];
50753
52303
  }];
50754
52304
  };
52305
+ logistics_plan_settings: {
52306
+ Row: {
52307
+ key: string;
52308
+ updated_at: string;
52309
+ value: string;
52310
+ };
52311
+ Insert: {
52312
+ key: string;
52313
+ updated_at?: string;
52314
+ value: string;
52315
+ };
52316
+ Update: {
52317
+ key?: string;
52318
+ updated_at?: string;
52319
+ value?: string;
52320
+ };
52321
+ Relationships: [];
52322
+ };
50755
52323
  logistics_rebuffer_state: {
50756
52324
  Row: {
50757
52325
  created_at: string;
@@ -51907,6 +53475,90 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
51907
53475
  };
51908
53476
  Relationships: [];
51909
53477
  };
53478
+ material_usage: {
53479
+ Row: {
53480
+ created_at: string;
53481
+ id: string;
53482
+ material_name: string;
53483
+ monteur_id: string | null;
53484
+ price_at_time: number;
53485
+ quantity_used: number;
53486
+ updated_at: string;
53487
+ van_inventory_id: string | null;
53488
+ work_order_id: string;
53489
+ };
53490
+ Insert: {
53491
+ created_at?: string;
53492
+ id?: string;
53493
+ material_name: string;
53494
+ monteur_id?: string | null;
53495
+ price_at_time?: number;
53496
+ quantity_used?: number;
53497
+ updated_at?: string;
53498
+ van_inventory_id?: string | null;
53499
+ work_order_id: string;
53500
+ };
53501
+ Update: {
53502
+ created_at?: string;
53503
+ id?: string;
53504
+ material_name?: string;
53505
+ monteur_id?: string | null;
53506
+ price_at_time?: number;
53507
+ quantity_used?: number;
53508
+ updated_at?: string;
53509
+ van_inventory_id?: string | null;
53510
+ work_order_id?: string;
53511
+ };
53512
+ Relationships: [{
53513
+ foreignKeyName: "material_usage_monteur_id_fkey";
53514
+ columns: ["monteur_id"];
53515
+ isOneToOne: false;
53516
+ referencedRelation: "profiles";
53517
+ referencedColumns: ["id"];
53518
+ }, {
53519
+ foreignKeyName: "material_usage_van_inventory_id_fkey";
53520
+ columns: ["van_inventory_id"];
53521
+ isOneToOne: false;
53522
+ referencedRelation: "van_inventories";
53523
+ referencedColumns: ["id"];
53524
+ }, {
53525
+ foreignKeyName: "material_usage_work_order_id_fkey";
53526
+ columns: ["work_order_id"];
53527
+ isOneToOne: false;
53528
+ referencedRelation: "work_orders";
53529
+ referencedColumns: ["id"];
53530
+ }];
53531
+ };
53532
+ module_features: {
53533
+ Row: {
53534
+ created_at: string;
53535
+ feature_id: string;
53536
+ id: string;
53537
+ is_active: boolean;
53538
+ last_seen_at: string;
53539
+ module_id: string;
53540
+ name: string;
53541
+ };
53542
+ Insert: {
53543
+ created_at?: string;
53544
+ feature_id: string;
53545
+ id?: string;
53546
+ is_active?: boolean;
53547
+ last_seen_at?: string;
53548
+ module_id: string;
53549
+ name: string;
53550
+ };
53551
+ Update: {
53552
+ created_at?: string;
53553
+ feature_id?: string;
53554
+ id?: string;
53555
+ is_active?: boolean;
53556
+ last_seen_at?: string;
53557
+ module_id?: string;
53558
+ name?: string;
53559
+ };
53560
+ Relationships: [];
53561
+ };
51910
53562
  module_permissions: {
51911
53563
  Row: {
51912
53564
  created_at: string;
@@ -51937,6 +53589,7 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
51937
53589
  module_registry: {
51938
53590
  Row: {
51939
53591
  created_at: string;
53592
+ enforce: boolean;
51940
53593
  is_active: boolean;
51941
53594
  last_seen_at: string;
51942
53595
  module_id: string;
@@ -51946,6 +53599,7 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
51946
53599
  };
51947
53600
  Insert: {
51948
53601
  created_at?: string;
53602
+ enforce?: boolean;
51949
53603
  is_active?: boolean;
51950
53604
  last_seen_at?: string;
51951
53605
  module_id: string;
@@ -51955,6 +53609,7 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
51955
53609
  };
51956
53610
  Update: {
51957
53611
  created_at?: string;
53612
+ enforce?: boolean;
51958
53613
  is_active?: boolean;
51959
53614
  last_seen_at?: string;
51960
53615
  module_id?: string;
@@ -52015,63 +53670,6 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
52015
53670
  };
52016
53671
  Relationships: [];
52017
53672
  };
52018
- monteurs: {
52019
- Row: {
52020
- avatar_url: string | null;
52021
- color: string | null;
52022
- created_at: string;
52023
- email: string | null;
52024
- id: string;
52025
- is_active: boolean;
52026
- leave_balance_hours: number;
52027
- name: string;
52028
- persnr: number | null;
52029
- phone: string | null;
52030
- role: string;
52031
- tenant_id: string;
52032
- updated_at: string;
52033
- user_id: string | null;
52034
- };
52035
- Insert: {
52036
- avatar_url?: string | null;
52037
- color?: string | null;
52038
- created_at?: string;
52039
- email?: string | null;
52040
- id?: string;
52041
- is_active?: boolean;
52042
- leave_balance_hours?: number;
52043
- name: string;
52044
- persnr?: number | null;
52045
- phone?: string | null;
52046
- role?: string;
52047
- tenant_id: string;
52048
- updated_at?: string;
52049
- user_id?: string | null;
52050
- };
52051
- Update: {
52052
- avatar_url?: string | null;
52053
- color?: string | null;
52054
- created_at?: string;
52055
- email?: string | null;
52056
- id?: string;
52057
- is_active?: boolean;
52058
- leave_balance_hours?: number;
52059
- name?: string;
52060
- persnr?: number | null;
52061
- phone?: string | null;
52062
- role?: string;
52063
- tenant_id?: string;
52064
- updated_at?: string;
52065
- user_id?: string | null;
52066
- };
52067
- Relationships: [{
52068
- foreignKeyName: "monteurs_tenant_id_fkey";
52069
- columns: ["tenant_id"];
52070
- isOneToOne: false;
52071
- referencedRelation: "tenants";
52072
- referencedColumns: ["id"];
52073
- }];
52074
- };
52075
53673
  nmbrs_component_mapping: {
52076
53674
  Row: {
52077
53675
  created_at: string;
@@ -52142,13 +53740,7 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
52142
53740
  nmbrs_employee_number?: string;
52143
53741
  updated_at?: string;
52144
53742
  };
52145
- Relationships: [{
52146
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
52147
- columns: ["monteur_id"];
52148
- isOneToOne: true;
52149
- referencedRelation: "monteurs";
52150
- referencedColumns: ["id"];
52151
- }];
53743
+ Relationships: [];
52152
53744
  };
52153
53745
  nmbrs_export_lines: {
52154
53746
  Row: {
@@ -52197,12 +53789,6 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
52197
53789
  wage_code?: string;
52198
53790
  };
52199
53791
  Relationships: [{
52200
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
52201
- columns: ["monteur_id"];
52202
- isOneToOne: false;
52203
- referencedRelation: "monteurs";
52204
- referencedColumns: ["id"];
52205
- }, {
52206
53792
  foreignKeyName: "nmbrs_export_lines_run_id_fkey";
52207
53793
  columns: ["run_id"];
52208
53794
  isOneToOne: false;
@@ -53030,6 +54616,7 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
53030
54616
  error_message: string | null;
53031
54617
  id: string;
53032
54618
  invoice_number: string | null;
54619
+ next_attempt_at: string;
53033
54620
  order_id: string;
53034
54621
  processed_at: string | null;
53035
54622
  status: string;
@@ -53041,6 +54628,7 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
53041
54628
  error_message?: string | null;
53042
54629
  id?: string;
53043
54630
  invoice_number?: string | null;
54631
+ next_attempt_at?: string;
53044
54632
  order_id: string;
53045
54633
  processed_at?: string | null;
53046
54634
  status?: string;
@@ -53052,6 +54640,7 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
53052
54640
  error_message?: string | null;
53053
54641
  id?: string;
53054
54642
  invoice_number?: string | null;
54643
+ next_attempt_at?: string;
53055
54644
  order_id?: string;
53056
54645
  processed_at?: string | null;
53057
54646
  status?: string;
@@ -54590,6 +56179,9 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
54590
56179
  created_at: string;
54591
56180
  id: string;
54592
56181
  laatst_gezien: string;
56182
+ laatste_fout: string | null;
56183
+ laatste_request_id: number | null;
56184
+ mislukte_posts: number;
54593
56185
  tick_sleutel: string;
54594
56186
  updated_at: string;
54595
56187
  };
@@ -54599,6 +56191,9 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
54599
56191
  created_at?: string;
54600
56192
  id?: string;
54601
56193
  laatst_gezien?: string;
56194
+ laatste_fout?: string | null;
56195
+ laatste_request_id?: number | null;
56196
+ mislukte_posts?: number;
54602
56197
  tick_sleutel?: string;
54603
56198
  updated_at?: string;
54604
56199
  };
@@ -54608,6 +56203,9 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
54608
56203
  created_at?: string;
54609
56204
  id?: string;
54610
56205
  laatst_gezien?: string;
56206
+ laatste_fout?: string | null;
56207
+ laatste_request_id?: number | null;
56208
+ mislukte_posts?: number;
54611
56209
  tick_sleutel?: string;
54612
56210
  updated_at?: string;
54613
56211
  };
@@ -56116,6 +57714,96 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
56116
57714
  referencedColumns: ["id"];
56117
57715
  }];
56118
57716
  };
57717
+ role_assignments: {
57718
+ Row: {
57719
+ created_at: string;
57720
+ id: string;
57721
+ role_id: string;
57722
+ user_id: string;
57723
+ };
57724
+ Insert: {
57725
+ created_at?: string;
57726
+ id?: string;
57727
+ role_id: string;
57728
+ user_id: string;
57729
+ };
57730
+ Update: {
57731
+ created_at?: string;
57732
+ id?: string;
57733
+ role_id?: string;
57734
+ user_id?: string;
57735
+ };
57736
+ Relationships: [{
57737
+ foreignKeyName: "role_assignments_role_id_fkey";
57738
+ columns: ["role_id"];
57739
+ isOneToOne: false;
57740
+ referencedRelation: "roles";
57741
+ referencedColumns: ["id"];
57742
+ }];
57743
+ };
57744
+ role_permissions: {
57745
+ Row: {
57746
+ can_edit: boolean;
57747
+ can_view: boolean;
57748
+ feature_id: string;
57749
+ id: string;
57750
+ module_id: string;
57751
+ role_id: string;
57752
+ updated_at: string;
57753
+ };
57754
+ Insert: {
57755
+ can_edit?: boolean;
57756
+ can_view?: boolean;
57757
+ feature_id?: string;
57758
+ id?: string;
57759
+ module_id: string;
57760
+ role_id: string;
57761
+ updated_at?: string;
57762
+ };
57763
+ Update: {
57764
+ can_edit?: boolean;
57765
+ can_view?: boolean;
57766
+ feature_id?: string;
57767
+ id?: string;
57768
+ module_id?: string;
57769
+ role_id?: string;
57770
+ updated_at?: string;
57771
+ };
57772
+ Relationships: [{
57773
+ foreignKeyName: "role_permissions_role_id_fkey";
57774
+ columns: ["role_id"];
57775
+ isOneToOne: false;
57776
+ referencedRelation: "roles";
57777
+ referencedColumns: ["id"];
57778
+ }];
57779
+ };
57780
+ roles: {
57781
+ Row: {
57782
+ created_at: string;
57783
+ id: string;
57784
+ is_protected: boolean;
57785
+ key: string;
57786
+ name: string;
57787
+ updated_at: string;
57788
+ };
57789
+ Insert: {
57790
+ created_at?: string;
57791
+ id?: string;
57792
+ is_protected?: boolean;
57793
+ key: string;
57794
+ name: string;
57795
+ updated_at?: string;
57796
+ };
57797
+ Update: {
57798
+ created_at?: string;
57799
+ id?: string;
57800
+ is_protected?: boolean;
57801
+ key?: string;
57802
+ name?: string;
57803
+ updated_at?: string;
57804
+ };
57805
+ Relationships: [];
57806
+ };
56119
57807
  rooms: {
56120
57808
  Row: {
56121
57809
  capacity: number;
@@ -56785,6 +58473,54 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
56785
58473
  };
56786
58474
  Relationships: [];
56787
58475
  };
58476
+ time_compensation_entries: {
58477
+ Row: {
58478
+ created_at: string;
58479
+ employee_id: string;
58480
+ entry_date: string;
58481
+ id: string;
58482
+ km: number;
58483
+ meal_allowance: number;
58484
+ notes: string | null;
58485
+ standby_evening: number;
58486
+ standby_weekend: number;
58487
+ tvt_change: number;
58488
+ updated_at: string;
58489
+ };
58490
+ Insert: {
58491
+ created_at?: string;
58492
+ employee_id: string;
58493
+ entry_date: string;
58494
+ id?: string;
58495
+ km?: number;
58496
+ meal_allowance?: number;
58497
+ notes?: string | null;
58498
+ standby_evening?: number;
58499
+ standby_weekend?: number;
58500
+ tvt_change?: number;
58501
+ updated_at?: string;
58502
+ };
58503
+ Update: {
58504
+ created_at?: string;
58505
+ employee_id?: string;
58506
+ entry_date?: string;
58507
+ id?: string;
58508
+ km?: number;
58509
+ meal_allowance?: number;
58510
+ notes?: string | null;
58511
+ standby_evening?: number;
58512
+ standby_weekend?: number;
58513
+ tvt_change?: number;
58514
+ updated_at?: string;
58515
+ };
58516
+ Relationships: [{
58517
+ foreignKeyName: "time_compensation_entries_employee_id_fkey";
58518
+ columns: ["employee_id"];
58519
+ isOneToOne: false;
58520
+ referencedRelation: "profiles";
58521
+ referencedColumns: ["id"];
58522
+ }];
58523
+ };
56788
58524
  time_entries: {
56789
58525
  Row: {
56790
58526
  created_at: string;
@@ -56819,65 +58555,170 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
56819
58555
  undertime?: number;
56820
58556
  updated_at?: string;
56821
58557
  };
58558
+ Relationships: [];
58559
+ };
58560
+ time_log_week_approvals: {
58561
+ Row: {
58562
+ approved_at: string | null;
58563
+ approved_by: string | null;
58564
+ created_at: string;
58565
+ employee_id: string;
58566
+ id: string;
58567
+ locked: boolean;
58568
+ notes: string | null;
58569
+ status: string;
58570
+ submitted_at: string | null;
58571
+ updated_at: string;
58572
+ week_start: string;
58573
+ };
58574
+ Insert: {
58575
+ approved_at?: string | null;
58576
+ approved_by?: string | null;
58577
+ created_at?: string;
58578
+ employee_id: string;
58579
+ id?: string;
58580
+ locked?: boolean;
58581
+ notes?: string | null;
58582
+ status?: string;
58583
+ submitted_at?: string | null;
58584
+ updated_at?: string;
58585
+ week_start: string;
58586
+ };
58587
+ Update: {
58588
+ approved_at?: string | null;
58589
+ approved_by?: string | null;
58590
+ created_at?: string;
58591
+ employee_id?: string;
58592
+ id?: string;
58593
+ locked?: boolean;
58594
+ notes?: string | null;
58595
+ status?: string;
58596
+ submitted_at?: string | null;
58597
+ updated_at?: string;
58598
+ week_start?: string;
58599
+ };
56822
58600
  Relationships: [{
56823
- foreignKeyName: "time_entries_employee_id_fkey";
58601
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
56824
58602
  columns: ["employee_id"];
56825
58603
  isOneToOne: false;
56826
- referencedRelation: "monteurs";
58604
+ referencedRelation: "profiles";
56827
58605
  referencedColumns: ["id"];
56828
58606
  }];
56829
58607
  };
56830
58608
  time_logs: {
56831
58609
  Row: {
58610
+ auto_stop_reason: string | null;
58611
+ auto_stopped: boolean;
56832
58612
  created_at: string;
58613
+ current_latitude: number | null;
58614
+ current_longitude: number | null;
58615
+ current_position_updated_at: string | null;
56833
58616
  employee_id: string;
58617
+ end_latitude: number | null;
58618
+ end_longitude: number | null;
56834
58619
  end_time: string | null;
58620
+ eta_distance_km: number | null;
58621
+ eta_minutes: number | null;
58622
+ eta_updated_at: string | null;
58623
+ hour_category: string | null;
56835
58624
  id: string;
58625
+ last_reminder_at: string | null;
56836
58626
  notes: string | null;
56837
58627
  overtime_hours: number;
56838
58628
  overtime_type: string | null;
56839
58629
  regular_hours: number;
58630
+ reminder_count: number;
58631
+ requires_review: boolean;
58632
+ start_latitude: number | null;
58633
+ start_longitude: number | null;
56840
58634
  start_time: string;
56841
58635
  travel_cost: number | null;
56842
58636
  travel_distance_km: number | null;
58637
+ travel_duration_min: number | null;
58638
+ travel_time_minutes: number | null;
56843
58639
  type: string;
56844
58640
  updated_at: string;
58641
+ work_order_id: string | null;
56845
58642
  };
56846
58643
  Insert: {
58644
+ auto_stop_reason?: string | null;
58645
+ auto_stopped?: boolean;
56847
58646
  created_at?: string;
58647
+ current_latitude?: number | null;
58648
+ current_longitude?: number | null;
58649
+ current_position_updated_at?: string | null;
56848
58650
  employee_id: string;
58651
+ end_latitude?: number | null;
58652
+ end_longitude?: number | null;
56849
58653
  end_time?: string | null;
58654
+ eta_distance_km?: number | null;
58655
+ eta_minutes?: number | null;
58656
+ eta_updated_at?: string | null;
58657
+ hour_category?: string | null;
56850
58658
  id?: string;
58659
+ last_reminder_at?: string | null;
56851
58660
  notes?: string | null;
56852
58661
  overtime_hours?: number;
56853
58662
  overtime_type?: string | null;
56854
58663
  regular_hours?: number;
58664
+ reminder_count?: number;
58665
+ requires_review?: boolean;
58666
+ start_latitude?: number | null;
58667
+ start_longitude?: number | null;
56855
58668
  start_time?: string;
56856
58669
  travel_cost?: number | null;
56857
58670
  travel_distance_km?: number | null;
58671
+ travel_duration_min?: number | null;
58672
+ travel_time_minutes?: number | null;
56858
58673
  type: string;
56859
58674
  updated_at?: string;
58675
+ work_order_id?: string | null;
56860
58676
  };
56861
58677
  Update: {
58678
+ auto_stop_reason?: string | null;
58679
+ auto_stopped?: boolean;
56862
58680
  created_at?: string;
58681
+ current_latitude?: number | null;
58682
+ current_longitude?: number | null;
58683
+ current_position_updated_at?: string | null;
56863
58684
  employee_id?: string;
58685
+ end_latitude?: number | null;
58686
+ end_longitude?: number | null;
56864
58687
  end_time?: string | null;
58688
+ eta_distance_km?: number | null;
58689
+ eta_minutes?: number | null;
58690
+ eta_updated_at?: string | null;
58691
+ hour_category?: string | null;
56865
58692
  id?: string;
58693
+ last_reminder_at?: string | null;
56866
58694
  notes?: string | null;
56867
58695
  overtime_hours?: number;
56868
58696
  overtime_type?: string | null;
56869
58697
  regular_hours?: number;
58698
+ reminder_count?: number;
58699
+ requires_review?: boolean;
58700
+ start_latitude?: number | null;
58701
+ start_longitude?: number | null;
56870
58702
  start_time?: string;
56871
58703
  travel_cost?: number | null;
56872
58704
  travel_distance_km?: number | null;
58705
+ travel_duration_min?: number | null;
58706
+ travel_time_minutes?: number | null;
56873
58707
  type?: string;
56874
58708
  updated_at?: string;
58709
+ work_order_id?: string | null;
56875
58710
  };
56876
58711
  Relationships: [{
56877
58712
  foreignKeyName: "time_logs_employee_id_fkey";
56878
58713
  columns: ["employee_id"];
56879
58714
  isOneToOne: false;
56880
- referencedRelation: "monteurs";
58715
+ referencedRelation: "profiles";
58716
+ referencedColumns: ["id"];
58717
+ }, {
58718
+ foreignKeyName: "time_logs_work_order_id_fkey";
58719
+ columns: ["work_order_id"];
58720
+ isOneToOne: false;
58721
+ referencedRelation: "work_orders";
56881
58722
  referencedColumns: ["id"];
56882
58723
  }];
56883
58724
  };
@@ -56916,7 +58757,7 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
56916
58757
  foreignKeyName: "time_off_entries_employee_id_fkey";
56917
58758
  columns: ["employee_id"];
56918
58759
  isOneToOne: false;
56919
- referencedRelation: "monteurs";
58760
+ referencedRelation: "profiles";
56920
58761
  referencedColumns: ["id"];
56921
58762
  }];
56922
58763
  };
@@ -57226,6 +59067,39 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
57226
59067
  };
57227
59068
  Relationships: [];
57228
59069
  };
59070
+ twinfield_cron_locks: {
59071
+ Row: {
59072
+ created_at: string;
59073
+ heartbeat_at: string;
59074
+ job_name: string;
59075
+ last_error: string | null;
59076
+ last_finished_at: string | null;
59077
+ locked_at: string;
59078
+ run_id: string;
59079
+ updated_at: string;
59080
+ };
59081
+ Insert: {
59082
+ created_at?: string;
59083
+ heartbeat_at?: string;
59084
+ job_name: string;
59085
+ last_error?: string | null;
59086
+ last_finished_at?: string | null;
59087
+ locked_at?: string;
59088
+ run_id?: string;
59089
+ updated_at?: string;
59090
+ };
59091
+ Update: {
59092
+ created_at?: string;
59093
+ heartbeat_at?: string;
59094
+ job_name?: string;
59095
+ last_error?: string | null;
59096
+ last_finished_at?: string | null;
59097
+ locked_at?: string;
59098
+ run_id?: string;
59099
+ updated_at?: string;
59100
+ };
59101
+ Relationships: [];
59102
+ };
57229
59103
  twinfield_customers: {
57230
59104
  Row: {
57231
59105
  address: string | null;
@@ -57826,6 +59700,7 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
57826
59700
  twinfield_push_queue: {
57827
59701
  Row: {
57828
59702
  action: string;
59703
+ attempt_started_at: string | null;
57829
59704
  attempts: number;
57830
59705
  connection_id: string | null;
57831
59706
  created_at: string;
@@ -57842,6 +59717,7 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
57842
59717
  };
57843
59718
  Insert: {
57844
59719
  action?: string;
59720
+ attempt_started_at?: string | null;
57845
59721
  attempts?: number;
57846
59722
  connection_id?: string | null;
57847
59723
  created_at?: string;
@@ -57858,6 +59734,7 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
57858
59734
  };
57859
59735
  Update: {
57860
59736
  action?: string;
59737
+ attempt_started_at?: string | null;
57861
59738
  attempts?: number;
57862
59739
  connection_id?: string | null;
57863
59740
  created_at?: string;
@@ -58055,13 +59932,7 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
58055
59932
  workday_end?: string | null;
58056
59933
  workday_start?: string | null;
58057
59934
  };
58058
- Relationships: [{
58059
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
58060
- columns: ["monteur_id"];
58061
- isOneToOne: true;
58062
- referencedRelation: "monteurs";
58063
- referencedColumns: ["id"];
58064
- }];
59935
+ Relationships: [];
58065
59936
  };
58066
59937
  uren_entries: {
58067
59938
  Row: {
@@ -58107,12 +59978,6 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
58107
59978
  werkbon_id?: string | null;
58108
59979
  };
58109
59980
  Relationships: [{
58110
- foreignKeyName: "uren_entries_monteur_id_fkey";
58111
- columns: ["monteur_id"];
58112
- isOneToOne: false;
58113
- referencedRelation: "monteurs";
58114
- referencedColumns: ["id"];
58115
- }, {
58116
59981
  foreignKeyName: "uren_entries_werkbon_id_fkey";
58117
59982
  columns: ["werkbon_id"];
58118
59983
  isOneToOne: false;
@@ -58580,17 +60445,12 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
58580
60445
  submitted_at?: string | null;
58581
60446
  updated_at?: string;
58582
60447
  };
58583
- Relationships: [{
58584
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
58585
- columns: ["monteur_id"];
58586
- isOneToOne: false;
58587
- referencedRelation: "monteurs";
58588
- referencedColumns: ["id"];
58589
- }];
60448
+ Relationships: [];
58590
60449
  };
58591
60450
  user_module_permissions: {
58592
60451
  Row: {
58593
60452
  created_at: string;
60453
+ feature_id: string;
58594
60454
  id: string;
58595
60455
  module_id: string;
58596
60456
  permission: string;
@@ -58599,6 +60459,7 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
58599
60459
  };
58600
60460
  Insert: {
58601
60461
  created_at?: string;
60462
+ feature_id?: string;
58602
60463
  id?: string;
58603
60464
  module_id: string;
58604
60465
  permission: string;
@@ -58607,6 +60468,7 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
58607
60468
  };
58608
60469
  Update: {
58609
60470
  created_at?: string;
60471
+ feature_id?: string;
58610
60472
  id?: string;
58611
60473
  module_id?: string;
58612
60474
  permission?: string;
@@ -58642,6 +60504,51 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
58642
60504
  referencedColumns: ["id"];
58643
60505
  }];
58644
60506
  };
60507
+ van_inventories: {
60508
+ Row: {
60509
+ barcode: string | null;
60510
+ created_at: string;
60511
+ id: string;
60512
+ monteur_id: string | null;
60513
+ price_per_unit: number;
60514
+ product_name: string;
60515
+ quantity_current: number;
60516
+ quantity_min: number;
60517
+ unit: string;
60518
+ updated_at: string;
60519
+ };
60520
+ Insert: {
60521
+ barcode?: string | null;
60522
+ created_at?: string;
60523
+ id?: string;
60524
+ monteur_id?: string | null;
60525
+ price_per_unit?: number;
60526
+ product_name: string;
60527
+ quantity_current?: number;
60528
+ quantity_min?: number;
60529
+ unit?: string;
60530
+ updated_at?: string;
60531
+ };
60532
+ Update: {
60533
+ barcode?: string | null;
60534
+ created_at?: string;
60535
+ id?: string;
60536
+ monteur_id?: string | null;
60537
+ price_per_unit?: number;
60538
+ product_name?: string;
60539
+ quantity_current?: number;
60540
+ quantity_min?: number;
60541
+ unit?: string;
60542
+ updated_at?: string;
60543
+ };
60544
+ Relationships: [{
60545
+ foreignKeyName: "van_inventories_monteur_id_fkey";
60546
+ columns: ["monteur_id"];
60547
+ isOneToOne: false;
60548
+ referencedRelation: "profiles";
60549
+ referencedColumns: ["id"];
60550
+ }];
60551
+ };
58645
60552
  voorraad_custom_fields: {
58646
60553
  Row: {
58647
60554
  created_at: string;
@@ -59592,7 +61499,7 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
59592
61499
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
59593
61500
  columns: ["monteur_id"];
59594
61501
  isOneToOne: false;
59595
- referencedRelation: "monteurs";
61502
+ referencedRelation: "profiles";
59596
61503
  referencedColumns: ["id"];
59597
61504
  }, {
59598
61505
  foreignKeyName: "work_order_monteurs_work_order_id_fkey";
@@ -59602,6 +61509,60 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
59602
61509
  referencedColumns: ["id"];
59603
61510
  }];
59604
61511
  };
61512
+ work_order_photos: {
61513
+ Row: {
61514
+ ai_caption: string | null;
61515
+ ai_categorized_at: string | null;
61516
+ ai_labels: import("../integrations/supabase/types").Json | null;
61517
+ caption: string | null;
61518
+ created_at: string;
61519
+ id: string;
61520
+ monteur_id: string | null;
61521
+ photo_type: string;
61522
+ storage_path: string;
61523
+ updated_at: string;
61524
+ work_order_id: string;
61525
+ };
61526
+ Insert: {
61527
+ ai_caption?: string | null;
61528
+ ai_categorized_at?: string | null;
61529
+ ai_labels?: import("../integrations/supabase/types").Json | null;
61530
+ caption?: string | null;
61531
+ created_at?: string;
61532
+ id?: string;
61533
+ monteur_id?: string | null;
61534
+ photo_type?: string;
61535
+ storage_path: string;
61536
+ updated_at?: string;
61537
+ work_order_id: string;
61538
+ };
61539
+ Update: {
61540
+ ai_caption?: string | null;
61541
+ ai_categorized_at?: string | null;
61542
+ ai_labels?: import("../integrations/supabase/types").Json | null;
61543
+ caption?: string | null;
61544
+ created_at?: string;
61545
+ id?: string;
61546
+ monteur_id?: string | null;
61547
+ photo_type?: string;
61548
+ storage_path?: string;
61549
+ updated_at?: string;
61550
+ work_order_id?: string;
61551
+ };
61552
+ Relationships: [{
61553
+ foreignKeyName: "work_order_photos_monteur_id_fkey";
61554
+ columns: ["monteur_id"];
61555
+ isOneToOne: false;
61556
+ referencedRelation: "profiles";
61557
+ referencedColumns: ["id"];
61558
+ }, {
61559
+ foreignKeyName: "work_order_photos_work_order_id_fkey";
61560
+ columns: ["work_order_id"];
61561
+ isOneToOne: false;
61562
+ referencedRelation: "work_orders";
61563
+ referencedColumns: ["id"];
61564
+ }];
61565
+ };
59605
61566
  work_orders: {
59606
61567
  Row: {
59607
61568
  assigned_to: string | null;
@@ -59633,7 +61594,6 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
59633
61594
  scheduled_end_time: string | null;
59634
61595
  scheduled_start_time: string | null;
59635
61596
  status: string;
59636
- tenant_id: string;
59637
61597
  total_hours_worked: number | null;
59638
61598
  total_price: number | null;
59639
61599
  travel_time_minutes: number | null;
@@ -59671,7 +61631,6 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
59671
61631
  scheduled_end_time?: string | null;
59672
61632
  scheduled_start_time?: string | null;
59673
61633
  status?: string;
59674
- tenant_id: string;
59675
61634
  total_hours_worked?: number | null;
59676
61635
  total_price?: number | null;
59677
61636
  travel_time_minutes?: number | null;
@@ -59709,7 +61668,6 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
59709
61668
  scheduled_end_time?: string | null;
59710
61669
  scheduled_start_time?: string | null;
59711
61670
  status?: string;
59712
- tenant_id?: string;
59713
61671
  total_hours_worked?: number | null;
59714
61672
  total_price?: number | null;
59715
61673
  travel_time_minutes?: number | null;
@@ -59723,12 +61681,6 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
59723
61681
  isOneToOne: false;
59724
61682
  referencedRelation: "work_orders";
59725
61683
  referencedColumns: ["id"];
59726
- }, {
59727
- foreignKeyName: "work_orders_tenant_id_fkey";
59728
- columns: ["tenant_id"];
59729
- isOneToOne: false;
59730
- referencedRelation: "tenants";
59731
- referencedColumns: ["id"];
59732
61684
  }];
59733
61685
  };
59734
61686
  };
@@ -60413,6 +62365,19 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
60413
62365
  };
60414
62366
  Returns: undefined;
60415
62367
  };
62368
+ approve_mailbox_order_proposal: {
62369
+ Args: {
62370
+ p_custom_fields: import("../integrations/supabase/types").Json;
62371
+ p_customer_id: string;
62372
+ p_delivery_date: string;
62373
+ p_field_values?: import("../integrations/supabase/types").Json;
62374
+ p_lines: import("../integrations/supabase/types").Json;
62375
+ p_notes: string;
62376
+ p_proposal_id: string;
62377
+ p_reviewed_by: string;
62378
+ };
62379
+ Returns: import("../integrations/supabase/types").Json;
62380
+ };
60416
62381
  assign_cart_numbers: {
60417
62382
  Args: {
60418
62383
  p_carts: import("../integrations/supabase/types").Json;
@@ -60464,6 +62429,10 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
60464
62429
  };
60465
62430
  Returns: number;
60466
62431
  };
62432
+ can_manage_hours: {
62433
+ Args: never;
62434
+ Returns: boolean;
62435
+ };
60467
62436
  check_offer_product_available_stock: {
60468
62437
  Args: {
60469
62438
  p_campaign_product_id: string;
@@ -60653,6 +62622,7 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
60653
62622
  };
60654
62623
  Returns: {
60655
62624
  action: string;
62625
+ attempt_started_at: string | null;
60656
62626
  attempts: number;
60657
62627
  connection_id: string | null;
60658
62628
  created_at: string;
@@ -60740,6 +62710,30 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
60740
62710
  agent_naam: string;
60741
62711
  }[];
60742
62712
  };
62713
+ consume_van_inventory: {
62714
+ Args: {
62715
+ p_inventory_id: string;
62716
+ p_quantity: number;
62717
+ };
62718
+ Returns: {
62719
+ barcode: string | null;
62720
+ created_at: string;
62721
+ id: string;
62722
+ monteur_id: string | null;
62723
+ price_per_unit: number;
62724
+ product_name: string;
62725
+ quantity_current: number;
62726
+ quantity_min: number;
62727
+ unit: string;
62728
+ updated_at: string;
62729
+ };
62730
+ SetofOptions: {
62731
+ from: "*";
62732
+ to: "van_inventories";
62733
+ isOneToOne: true;
62734
+ isSetofReturn: false;
62735
+ };
62736
+ };
60743
62737
  control_get_todays_carts: {
60744
62738
  Args: never;
60745
62739
  Returns: {
@@ -60813,6 +62807,13 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
60813
62807
  _user_id: string;
60814
62808
  };
60815
62809
  Returns: string;
62810
+ } | {
62811
+ Args: {
62812
+ _feature_id: string;
62813
+ _module_id: string;
62814
+ _user_id: string;
62815
+ };
62816
+ Returns: string;
60816
62817
  };
60817
62818
  email_auth_decrypt: {
60818
62819
  Args: {
@@ -61164,12 +63165,6 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
61164
63165
  Args: never;
61165
63166
  Returns: string;
61166
63167
  };
61167
- get_work_order_tenant_id: {
61168
- Args: {
61169
- wo_id: string;
61170
- };
61171
- Returns: string;
61172
- };
61173
63168
  has_module_permission: {
61174
63169
  Args: {
61175
63170
  _min: string;
@@ -61203,6 +63198,13 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
61203
63198
  };
61204
63199
  Returns: boolean;
61205
63200
  };
63201
+ is_time_log_week_locked: {
63202
+ Args: {
63203
+ p_employee_id: string;
63204
+ p_start_time: string;
63205
+ };
63206
+ Returns: boolean;
63207
+ };
61206
63208
  is_user_admin: {
61207
63209
  Args: never;
61208
63210
  Returns: boolean;
@@ -61217,13 +63219,14 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
61217
63219
  };
61218
63220
  Returns: boolean;
61219
63221
  };
61220
- list_monteurs: {
63222
+ list_medewerkers: {
61221
63223
  Args: never;
61222
63224
  Returns: {
61223
63225
  avatar_url: string;
61224
63226
  display_name: string;
61225
63227
  email: string;
61226
63228
  id: string;
63229
+ roles: string[];
61227
63230
  }[];
61228
63231
  };
61229
63232
  list_my_planning_items: {
@@ -61714,6 +63717,65 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
61714
63717
  };
61715
63718
  Returns: number;
61716
63719
  };
63720
+ logistics_plan_claim: {
63721
+ Args: {
63722
+ p_limit?: number;
63723
+ };
63724
+ Returns: {
63725
+ attempts: number;
63726
+ id: string;
63727
+ order_id: string;
63728
+ }[];
63729
+ };
63730
+ logistics_plan_enqueue: {
63731
+ Args: {
63732
+ p_order_id: string;
63733
+ p_reason?: string;
63734
+ };
63735
+ Returns: undefined;
63736
+ };
63737
+ logistics_plan_ensure_event: {
63738
+ Args: {
63739
+ p_order_id: string;
63740
+ };
63741
+ Returns: boolean;
63742
+ };
63743
+ logistics_plan_finish: {
63744
+ Args: {
63745
+ p_error?: string;
63746
+ p_id: string;
63747
+ };
63748
+ Returns: undefined;
63749
+ };
63750
+ logistics_plan_impact_orders: {
63751
+ Args: {
63752
+ p_order_id: string;
63753
+ };
63754
+ Returns: {
63755
+ buffer_id: string;
63756
+ order_id: string;
63757
+ plan_date: string;
63758
+ }[];
63759
+ };
63760
+ logistics_plan_kick: {
63761
+ Args: never;
63762
+ Returns: undefined;
63763
+ };
63764
+ logistics_plan_prune: {
63765
+ Args: never;
63766
+ Returns: number;
63767
+ };
63768
+ logistics_plan_release_stale: {
63769
+ Args: never;
63770
+ Returns: number;
63771
+ };
63772
+ logistics_plan_setting: {
63773
+ Args: {
63774
+ p_default: number;
63775
+ p_key: string;
63776
+ };
63777
+ Returns: number;
63778
+ };
61717
63779
  logistics_queue_capacity_email: {
61718
63780
  Args: {
61719
63781
  p_alert_id: string;
@@ -61955,6 +64017,7 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
61955
64017
  my_module_permissions: {
61956
64018
  Args: never;
61957
64019
  Returns: {
64020
+ feature_id: string;
61958
64021
  module_id: string;
61959
64022
  permission: string;
61960
64023
  }[];
@@ -62835,6 +64898,16 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
62835
64898
  };
62836
64899
  Returns: string[];
62837
64900
  };
64901
+ switch_time_log: {
64902
+ Args: {
64903
+ p_employee_id: string;
64904
+ p_start_lat?: number;
64905
+ p_start_lng?: number;
64906
+ p_type: string;
64907
+ p_work_order_id?: string;
64908
+ };
64909
+ Returns: import("../integrations/supabase/types").Json;
64910
+ };
62838
64911
  sync_all_layer_stocks: {
62839
64912
  Args: never;
62840
64913
  Returns: undefined;
@@ -62885,6 +64958,24 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
62885
64958
  };
62886
64959
  Returns: boolean;
62887
64960
  };
64961
+ twinfield_cron_lock_acquire: {
64962
+ Args: {
64963
+ _job_name: string;
64964
+ _stale_seconds?: number;
64965
+ };
64966
+ Returns: boolean;
64967
+ };
64968
+ twinfield_cron_lock_release: {
64969
+ Args: {
64970
+ _error?: string;
64971
+ _job_name: string;
64972
+ };
64973
+ Returns: undefined;
64974
+ };
64975
+ twinfield_prune_push_queue: {
64976
+ Args: never;
64977
+ Returns: number;
64978
+ };
62888
64979
  twinfield_register_cron: {
62889
64980
  Args: {
62890
64981
  apikey?: string;