@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
@@ -886,6 +886,126 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
886
886
  };
887
887
  Relationships: [];
888
888
  };
889
+ cao_holidays: {
890
+ Row: {
891
+ created_at: string;
892
+ description: string | null;
893
+ holiday_date: string;
894
+ id: string;
895
+ updated_at: string;
896
+ };
897
+ Insert: {
898
+ created_at?: string;
899
+ description?: string | null;
900
+ holiday_date: string;
901
+ id?: string;
902
+ updated_at?: string;
903
+ };
904
+ Update: {
905
+ created_at?: string;
906
+ description?: string | null;
907
+ holiday_date?: string;
908
+ id?: string;
909
+ updated_at?: string;
910
+ };
911
+ Relationships: [];
912
+ };
913
+ cao_settings: {
914
+ Row: {
915
+ auto_break_after_hours: number;
916
+ auto_break_minutes: number;
917
+ auto_break_unpaid: boolean;
918
+ auto_stop_after_hours: number;
919
+ callout_fee: number;
920
+ created_at: string;
921
+ daily_regular_hours: number;
922
+ default_hourly_rate: number;
923
+ id: string;
924
+ materials_markup_percent: number;
925
+ max_daily_hours: number;
926
+ max_weekly_hours: number;
927
+ meal_allowance_amount: number;
928
+ overtime_pct_178: number;
929
+ overtime_pct_189: number;
930
+ overtime_pct_212: number;
931
+ reminder_after_hours: number;
932
+ standby_evening_amount: number;
933
+ standby_weekend_amount: number;
934
+ travel_cost_per_km: number | null;
935
+ travel_cost_threshold_km: number | null;
936
+ travel_counts_as_work: boolean;
937
+ travel_hourly_rate: number;
938
+ travel_rate_per_hour: number;
939
+ travel_threshold_minutes: number;
940
+ updated_at: string;
941
+ weekend_always_212: boolean;
942
+ window_end: string;
943
+ window_start: string;
944
+ };
945
+ Insert: {
946
+ auto_break_after_hours?: number;
947
+ auto_break_minutes?: number;
948
+ auto_break_unpaid?: boolean;
949
+ auto_stop_after_hours?: number;
950
+ callout_fee?: number;
951
+ created_at?: string;
952
+ daily_regular_hours?: number;
953
+ default_hourly_rate?: number;
954
+ id?: string;
955
+ materials_markup_percent?: number;
956
+ max_daily_hours?: number;
957
+ max_weekly_hours?: number;
958
+ meal_allowance_amount?: number;
959
+ overtime_pct_178?: number;
960
+ overtime_pct_189?: number;
961
+ overtime_pct_212?: number;
962
+ reminder_after_hours?: number;
963
+ standby_evening_amount?: number;
964
+ standby_weekend_amount?: number;
965
+ travel_cost_per_km?: number | null;
966
+ travel_cost_threshold_km?: number | null;
967
+ travel_counts_as_work?: boolean;
968
+ travel_hourly_rate?: number;
969
+ travel_rate_per_hour?: number;
970
+ travel_threshold_minutes?: number;
971
+ updated_at?: string;
972
+ weekend_always_212?: boolean;
973
+ window_end?: string;
974
+ window_start?: string;
975
+ };
976
+ Update: {
977
+ auto_break_after_hours?: number;
978
+ auto_break_minutes?: number;
979
+ auto_break_unpaid?: boolean;
980
+ auto_stop_after_hours?: number;
981
+ callout_fee?: number;
982
+ created_at?: string;
983
+ daily_regular_hours?: number;
984
+ default_hourly_rate?: number;
985
+ id?: string;
986
+ materials_markup_percent?: number;
987
+ max_daily_hours?: number;
988
+ max_weekly_hours?: number;
989
+ meal_allowance_amount?: number;
990
+ overtime_pct_178?: number;
991
+ overtime_pct_189?: number;
992
+ overtime_pct_212?: number;
993
+ reminder_after_hours?: number;
994
+ standby_evening_amount?: number;
995
+ standby_weekend_amount?: number;
996
+ travel_cost_per_km?: number | null;
997
+ travel_cost_threshold_km?: number | null;
998
+ travel_counts_as_work?: boolean;
999
+ travel_hourly_rate?: number;
1000
+ travel_rate_per_hour?: number;
1001
+ travel_threshold_minutes?: number;
1002
+ updated_at?: string;
1003
+ weekend_always_212?: boolean;
1004
+ window_end?: string;
1005
+ window_start?: string;
1006
+ };
1007
+ Relationships: [];
1008
+ };
889
1009
  carrier_shipping_rates: {
890
1010
  Row: {
891
1011
  carrier_id: string;
@@ -7780,7 +7900,6 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
7780
7900
  start_date: string;
7781
7901
  start_time: string | null;
7782
7902
  status: string;
7783
- tenant_id: string;
7784
7903
  updated_at: string;
7785
7904
  user_id: string;
7786
7905
  };
@@ -7798,7 +7917,6 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
7798
7917
  start_date: string;
7799
7918
  start_time?: string | null;
7800
7919
  status?: string;
7801
- tenant_id?: string;
7802
7920
  updated_at?: string;
7803
7921
  user_id: string;
7804
7922
  };
@@ -7816,7 +7934,6 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
7816
7934
  start_date?: string;
7817
7935
  start_time?: string | null;
7818
7936
  status?: string;
7819
- tenant_id?: string;
7820
7937
  updated_at?: string;
7821
7938
  user_id?: string;
7822
7939
  };
@@ -7824,13 +7941,13 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
7824
7941
  foreignKeyName: "leave_requests_monteur_id_fkey";
7825
7942
  columns: ["monteur_id"];
7826
7943
  isOneToOne: false;
7827
- referencedRelation: "monteurs";
7944
+ referencedRelation: "profiles";
7828
7945
  referencedColumns: ["id"];
7829
7946
  }, {
7830
7947
  foreignKeyName: "leave_requests_user_id_fkey";
7831
7948
  columns: ["user_id"];
7832
7949
  isOneToOne: false;
7833
- referencedRelation: "monteurs";
7950
+ referencedRelation: "profiles";
7834
7951
  referencedColumns: ["id"];
7835
7952
  }];
7836
7953
  };
@@ -8698,6 +8815,45 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
8698
8815
  };
8699
8816
  Relationships: [];
8700
8817
  };
8818
+ logistics_plan_queue: {
8819
+ Row: {
8820
+ attempts: number;
8821
+ claimed_at: string | null;
8822
+ enqueued_at: string;
8823
+ error: string | null;
8824
+ id: string;
8825
+ next_attempt_at: string;
8826
+ order_id: string;
8827
+ reason: string;
8828
+ status: string;
8829
+ updated_at: string;
8830
+ };
8831
+ Insert: {
8832
+ attempts?: number;
8833
+ claimed_at?: string | null;
8834
+ enqueued_at?: string;
8835
+ error?: string | null;
8836
+ id?: string;
8837
+ next_attempt_at?: string;
8838
+ order_id: string;
8839
+ reason?: string;
8840
+ status?: string;
8841
+ updated_at?: string;
8842
+ };
8843
+ Update: {
8844
+ attempts?: number;
8845
+ claimed_at?: string | null;
8846
+ enqueued_at?: string;
8847
+ error?: string | null;
8848
+ id?: string;
8849
+ next_attempt_at?: string;
8850
+ order_id?: string;
8851
+ reason?: string;
8852
+ status?: string;
8853
+ updated_at?: string;
8854
+ };
8855
+ Relationships: [];
8856
+ };
8701
8857
  logistics_plan_runs: {
8702
8858
  Row: {
8703
8859
  created_at: string;
@@ -8773,6 +8929,24 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
8773
8929
  referencedColumns: ["id"];
8774
8930
  }];
8775
8931
  };
8932
+ logistics_plan_settings: {
8933
+ Row: {
8934
+ key: string;
8935
+ updated_at: string;
8936
+ value: string;
8937
+ };
8938
+ Insert: {
8939
+ key: string;
8940
+ updated_at?: string;
8941
+ value: string;
8942
+ };
8943
+ Update: {
8944
+ key?: string;
8945
+ updated_at?: string;
8946
+ value?: string;
8947
+ };
8948
+ Relationships: [];
8949
+ };
8776
8950
  logistics_rebuffer_state: {
8777
8951
  Row: {
8778
8952
  created_at: string;
@@ -9928,6 +10102,90 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
9928
10102
  };
9929
10103
  Relationships: [];
9930
10104
  };
10105
+ material_usage: {
10106
+ Row: {
10107
+ created_at: string;
10108
+ id: string;
10109
+ material_name: string;
10110
+ monteur_id: string | null;
10111
+ price_at_time: number;
10112
+ quantity_used: number;
10113
+ updated_at: string;
10114
+ van_inventory_id: string | null;
10115
+ work_order_id: string;
10116
+ };
10117
+ Insert: {
10118
+ created_at?: string;
10119
+ id?: string;
10120
+ material_name: string;
10121
+ monteur_id?: string | null;
10122
+ price_at_time?: number;
10123
+ quantity_used?: number;
10124
+ updated_at?: string;
10125
+ van_inventory_id?: string | null;
10126
+ work_order_id: string;
10127
+ };
10128
+ Update: {
10129
+ created_at?: string;
10130
+ id?: string;
10131
+ material_name?: string;
10132
+ monteur_id?: string | null;
10133
+ price_at_time?: number;
10134
+ quantity_used?: number;
10135
+ updated_at?: string;
10136
+ van_inventory_id?: string | null;
10137
+ work_order_id?: string;
10138
+ };
10139
+ Relationships: [{
10140
+ foreignKeyName: "material_usage_monteur_id_fkey";
10141
+ columns: ["monteur_id"];
10142
+ isOneToOne: false;
10143
+ referencedRelation: "profiles";
10144
+ referencedColumns: ["id"];
10145
+ }, {
10146
+ foreignKeyName: "material_usage_van_inventory_id_fkey";
10147
+ columns: ["van_inventory_id"];
10148
+ isOneToOne: false;
10149
+ referencedRelation: "van_inventories";
10150
+ referencedColumns: ["id"];
10151
+ }, {
10152
+ foreignKeyName: "material_usage_work_order_id_fkey";
10153
+ columns: ["work_order_id"];
10154
+ isOneToOne: false;
10155
+ referencedRelation: "work_orders";
10156
+ referencedColumns: ["id"];
10157
+ }];
10158
+ };
10159
+ module_features: {
10160
+ Row: {
10161
+ created_at: string;
10162
+ feature_id: string;
10163
+ id: string;
10164
+ is_active: boolean;
10165
+ last_seen_at: string;
10166
+ module_id: string;
10167
+ name: string;
10168
+ };
10169
+ Insert: {
10170
+ created_at?: string;
10171
+ feature_id: string;
10172
+ id?: string;
10173
+ is_active?: boolean;
10174
+ last_seen_at?: string;
10175
+ module_id: string;
10176
+ name: string;
10177
+ };
10178
+ Update: {
10179
+ created_at?: string;
10180
+ feature_id?: string;
10181
+ id?: string;
10182
+ is_active?: boolean;
10183
+ last_seen_at?: string;
10184
+ module_id?: string;
10185
+ name?: string;
10186
+ };
10187
+ Relationships: [];
10188
+ };
9931
10189
  module_permissions: {
9932
10190
  Row: {
9933
10191
  created_at: string;
@@ -9958,6 +10216,7 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
9958
10216
  module_registry: {
9959
10217
  Row: {
9960
10218
  created_at: string;
10219
+ enforce: boolean;
9961
10220
  is_active: boolean;
9962
10221
  last_seen_at: string;
9963
10222
  module_id: string;
@@ -9967,6 +10226,7 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
9967
10226
  };
9968
10227
  Insert: {
9969
10228
  created_at?: string;
10229
+ enforce?: boolean;
9970
10230
  is_active?: boolean;
9971
10231
  last_seen_at?: string;
9972
10232
  module_id: string;
@@ -9976,6 +10236,7 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
9976
10236
  };
9977
10237
  Update: {
9978
10238
  created_at?: string;
10239
+ enforce?: boolean;
9979
10240
  is_active?: boolean;
9980
10241
  last_seen_at?: string;
9981
10242
  module_id?: string;
@@ -10036,63 +10297,6 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
10036
10297
  };
10037
10298
  Relationships: [];
10038
10299
  };
10039
- monteurs: {
10040
- Row: {
10041
- avatar_url: string | null;
10042
- color: string | null;
10043
- created_at: string;
10044
- email: string | null;
10045
- id: string;
10046
- is_active: boolean;
10047
- leave_balance_hours: number;
10048
- name: string;
10049
- persnr: number | null;
10050
- phone: string | null;
10051
- role: string;
10052
- tenant_id: string;
10053
- updated_at: string;
10054
- user_id: string | null;
10055
- };
10056
- Insert: {
10057
- avatar_url?: string | null;
10058
- color?: string | null;
10059
- created_at?: string;
10060
- email?: string | null;
10061
- id?: string;
10062
- is_active?: boolean;
10063
- leave_balance_hours?: number;
10064
- name: string;
10065
- persnr?: number | null;
10066
- phone?: string | null;
10067
- role?: string;
10068
- tenant_id: string;
10069
- updated_at?: string;
10070
- user_id?: string | null;
10071
- };
10072
- Update: {
10073
- avatar_url?: string | null;
10074
- color?: string | null;
10075
- created_at?: string;
10076
- email?: string | null;
10077
- id?: string;
10078
- is_active?: boolean;
10079
- leave_balance_hours?: number;
10080
- name?: string;
10081
- persnr?: number | null;
10082
- phone?: string | null;
10083
- role?: string;
10084
- tenant_id?: string;
10085
- updated_at?: string;
10086
- user_id?: string | null;
10087
- };
10088
- Relationships: [{
10089
- foreignKeyName: "monteurs_tenant_id_fkey";
10090
- columns: ["tenant_id"];
10091
- isOneToOne: false;
10092
- referencedRelation: "tenants";
10093
- referencedColumns: ["id"];
10094
- }];
10095
- };
10096
10300
  nmbrs_component_mapping: {
10097
10301
  Row: {
10098
10302
  created_at: string;
@@ -10163,13 +10367,7 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
10163
10367
  nmbrs_employee_number?: string;
10164
10368
  updated_at?: string;
10165
10369
  };
10166
- Relationships: [{
10167
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
10168
- columns: ["monteur_id"];
10169
- isOneToOne: true;
10170
- referencedRelation: "monteurs";
10171
- referencedColumns: ["id"];
10172
- }];
10370
+ Relationships: [];
10173
10371
  };
10174
10372
  nmbrs_export_lines: {
10175
10373
  Row: {
@@ -10218,12 +10416,6 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
10218
10416
  wage_code?: string;
10219
10417
  };
10220
10418
  Relationships: [{
10221
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
10222
- columns: ["monteur_id"];
10223
- isOneToOne: false;
10224
- referencedRelation: "monteurs";
10225
- referencedColumns: ["id"];
10226
- }, {
10227
10419
  foreignKeyName: "nmbrs_export_lines_run_id_fkey";
10228
10420
  columns: ["run_id"];
10229
10421
  isOneToOne: false;
@@ -11051,6 +11243,7 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
11051
11243
  error_message: string | null;
11052
11244
  id: string;
11053
11245
  invoice_number: string | null;
11246
+ next_attempt_at: string;
11054
11247
  order_id: string;
11055
11248
  processed_at: string | null;
11056
11249
  status: string;
@@ -11062,6 +11255,7 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
11062
11255
  error_message?: string | null;
11063
11256
  id?: string;
11064
11257
  invoice_number?: string | null;
11258
+ next_attempt_at?: string;
11065
11259
  order_id: string;
11066
11260
  processed_at?: string | null;
11067
11261
  status?: string;
@@ -11073,6 +11267,7 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
11073
11267
  error_message?: string | null;
11074
11268
  id?: string;
11075
11269
  invoice_number?: string | null;
11270
+ next_attempt_at?: string;
11076
11271
  order_id?: string;
11077
11272
  processed_at?: string | null;
11078
11273
  status?: string;
@@ -12611,6 +12806,9 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
12611
12806
  created_at: string;
12612
12807
  id: string;
12613
12808
  laatst_gezien: string;
12809
+ laatste_fout: string | null;
12810
+ laatste_request_id: number | null;
12811
+ mislukte_posts: number;
12614
12812
  tick_sleutel: string;
12615
12813
  updated_at: string;
12616
12814
  };
@@ -12620,6 +12818,9 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
12620
12818
  created_at?: string;
12621
12819
  id?: string;
12622
12820
  laatst_gezien?: string;
12821
+ laatste_fout?: string | null;
12822
+ laatste_request_id?: number | null;
12823
+ mislukte_posts?: number;
12623
12824
  tick_sleutel?: string;
12624
12825
  updated_at?: string;
12625
12826
  };
@@ -12629,6 +12830,9 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
12629
12830
  created_at?: string;
12630
12831
  id?: string;
12631
12832
  laatst_gezien?: string;
12833
+ laatste_fout?: string | null;
12834
+ laatste_request_id?: number | null;
12835
+ mislukte_posts?: number;
12632
12836
  tick_sleutel?: string;
12633
12837
  updated_at?: string;
12634
12838
  };
@@ -14137,6 +14341,96 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
14137
14341
  referencedColumns: ["id"];
14138
14342
  }];
14139
14343
  };
14344
+ role_assignments: {
14345
+ Row: {
14346
+ created_at: string;
14347
+ id: string;
14348
+ role_id: string;
14349
+ user_id: string;
14350
+ };
14351
+ Insert: {
14352
+ created_at?: string;
14353
+ id?: string;
14354
+ role_id: string;
14355
+ user_id: string;
14356
+ };
14357
+ Update: {
14358
+ created_at?: string;
14359
+ id?: string;
14360
+ role_id?: string;
14361
+ user_id?: string;
14362
+ };
14363
+ Relationships: [{
14364
+ foreignKeyName: "role_assignments_role_id_fkey";
14365
+ columns: ["role_id"];
14366
+ isOneToOne: false;
14367
+ referencedRelation: "roles";
14368
+ referencedColumns: ["id"];
14369
+ }];
14370
+ };
14371
+ role_permissions: {
14372
+ Row: {
14373
+ can_edit: boolean;
14374
+ can_view: boolean;
14375
+ feature_id: string;
14376
+ id: string;
14377
+ module_id: string;
14378
+ role_id: string;
14379
+ updated_at: string;
14380
+ };
14381
+ Insert: {
14382
+ can_edit?: boolean;
14383
+ can_view?: boolean;
14384
+ feature_id?: string;
14385
+ id?: string;
14386
+ module_id: string;
14387
+ role_id: string;
14388
+ updated_at?: string;
14389
+ };
14390
+ Update: {
14391
+ can_edit?: boolean;
14392
+ can_view?: boolean;
14393
+ feature_id?: string;
14394
+ id?: string;
14395
+ module_id?: string;
14396
+ role_id?: string;
14397
+ updated_at?: string;
14398
+ };
14399
+ Relationships: [{
14400
+ foreignKeyName: "role_permissions_role_id_fkey";
14401
+ columns: ["role_id"];
14402
+ isOneToOne: false;
14403
+ referencedRelation: "roles";
14404
+ referencedColumns: ["id"];
14405
+ }];
14406
+ };
14407
+ roles: {
14408
+ Row: {
14409
+ created_at: string;
14410
+ id: string;
14411
+ is_protected: boolean;
14412
+ key: string;
14413
+ name: string;
14414
+ updated_at: string;
14415
+ };
14416
+ Insert: {
14417
+ created_at?: string;
14418
+ id?: string;
14419
+ is_protected?: boolean;
14420
+ key: string;
14421
+ name: string;
14422
+ updated_at?: string;
14423
+ };
14424
+ Update: {
14425
+ created_at?: string;
14426
+ id?: string;
14427
+ is_protected?: boolean;
14428
+ key?: string;
14429
+ name?: string;
14430
+ updated_at?: string;
14431
+ };
14432
+ Relationships: [];
14433
+ };
14140
14434
  rooms: {
14141
14435
  Row: {
14142
14436
  capacity: number;
@@ -14806,6 +15100,54 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
14806
15100
  };
14807
15101
  Relationships: [];
14808
15102
  };
15103
+ time_compensation_entries: {
15104
+ Row: {
15105
+ created_at: string;
15106
+ employee_id: string;
15107
+ entry_date: string;
15108
+ id: string;
15109
+ km: number;
15110
+ meal_allowance: number;
15111
+ notes: string | null;
15112
+ standby_evening: number;
15113
+ standby_weekend: number;
15114
+ tvt_change: number;
15115
+ updated_at: string;
15116
+ };
15117
+ Insert: {
15118
+ created_at?: string;
15119
+ employee_id: string;
15120
+ entry_date: string;
15121
+ id?: string;
15122
+ km?: number;
15123
+ meal_allowance?: number;
15124
+ notes?: string | null;
15125
+ standby_evening?: number;
15126
+ standby_weekend?: number;
15127
+ tvt_change?: number;
15128
+ updated_at?: string;
15129
+ };
15130
+ Update: {
15131
+ created_at?: string;
15132
+ employee_id?: string;
15133
+ entry_date?: string;
15134
+ id?: string;
15135
+ km?: number;
15136
+ meal_allowance?: number;
15137
+ notes?: string | null;
15138
+ standby_evening?: number;
15139
+ standby_weekend?: number;
15140
+ tvt_change?: number;
15141
+ updated_at?: string;
15142
+ };
15143
+ Relationships: [{
15144
+ foreignKeyName: "time_compensation_entries_employee_id_fkey";
15145
+ columns: ["employee_id"];
15146
+ isOneToOne: false;
15147
+ referencedRelation: "profiles";
15148
+ referencedColumns: ["id"];
15149
+ }];
15150
+ };
14809
15151
  time_entries: {
14810
15152
  Row: {
14811
15153
  created_at: string;
@@ -14840,65 +15182,170 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
14840
15182
  undertime?: number;
14841
15183
  updated_at?: string;
14842
15184
  };
15185
+ Relationships: [];
15186
+ };
15187
+ time_log_week_approvals: {
15188
+ Row: {
15189
+ approved_at: string | null;
15190
+ approved_by: string | null;
15191
+ created_at: string;
15192
+ employee_id: string;
15193
+ id: string;
15194
+ locked: boolean;
15195
+ notes: string | null;
15196
+ status: string;
15197
+ submitted_at: string | null;
15198
+ updated_at: string;
15199
+ week_start: string;
15200
+ };
15201
+ Insert: {
15202
+ approved_at?: string | null;
15203
+ approved_by?: string | null;
15204
+ created_at?: string;
15205
+ employee_id: string;
15206
+ id?: string;
15207
+ locked?: boolean;
15208
+ notes?: string | null;
15209
+ status?: string;
15210
+ submitted_at?: string | null;
15211
+ updated_at?: string;
15212
+ week_start: string;
15213
+ };
15214
+ Update: {
15215
+ approved_at?: string | null;
15216
+ approved_by?: string | null;
15217
+ created_at?: string;
15218
+ employee_id?: string;
15219
+ id?: string;
15220
+ locked?: boolean;
15221
+ notes?: string | null;
15222
+ status?: string;
15223
+ submitted_at?: string | null;
15224
+ updated_at?: string;
15225
+ week_start?: string;
15226
+ };
14843
15227
  Relationships: [{
14844
- foreignKeyName: "time_entries_employee_id_fkey";
15228
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
14845
15229
  columns: ["employee_id"];
14846
15230
  isOneToOne: false;
14847
- referencedRelation: "monteurs";
15231
+ referencedRelation: "profiles";
14848
15232
  referencedColumns: ["id"];
14849
15233
  }];
14850
15234
  };
14851
15235
  time_logs: {
14852
15236
  Row: {
15237
+ auto_stop_reason: string | null;
15238
+ auto_stopped: boolean;
14853
15239
  created_at: string;
15240
+ current_latitude: number | null;
15241
+ current_longitude: number | null;
15242
+ current_position_updated_at: string | null;
14854
15243
  employee_id: string;
15244
+ end_latitude: number | null;
15245
+ end_longitude: number | null;
14855
15246
  end_time: string | null;
15247
+ eta_distance_km: number | null;
15248
+ eta_minutes: number | null;
15249
+ eta_updated_at: string | null;
15250
+ hour_category: string | null;
14856
15251
  id: string;
15252
+ last_reminder_at: string | null;
14857
15253
  notes: string | null;
14858
15254
  overtime_hours: number;
14859
15255
  overtime_type: string | null;
14860
15256
  regular_hours: number;
15257
+ reminder_count: number;
15258
+ requires_review: boolean;
15259
+ start_latitude: number | null;
15260
+ start_longitude: number | null;
14861
15261
  start_time: string;
14862
15262
  travel_cost: number | null;
14863
15263
  travel_distance_km: number | null;
15264
+ travel_duration_min: number | null;
15265
+ travel_time_minutes: number | null;
14864
15266
  type: string;
14865
15267
  updated_at: string;
15268
+ work_order_id: string | null;
14866
15269
  };
14867
15270
  Insert: {
15271
+ auto_stop_reason?: string | null;
15272
+ auto_stopped?: boolean;
14868
15273
  created_at?: string;
15274
+ current_latitude?: number | null;
15275
+ current_longitude?: number | null;
15276
+ current_position_updated_at?: string | null;
14869
15277
  employee_id: string;
15278
+ end_latitude?: number | null;
15279
+ end_longitude?: number | null;
14870
15280
  end_time?: string | null;
15281
+ eta_distance_km?: number | null;
15282
+ eta_minutes?: number | null;
15283
+ eta_updated_at?: string | null;
15284
+ hour_category?: string | null;
14871
15285
  id?: string;
15286
+ last_reminder_at?: string | null;
14872
15287
  notes?: string | null;
14873
15288
  overtime_hours?: number;
14874
15289
  overtime_type?: string | null;
14875
15290
  regular_hours?: number;
15291
+ reminder_count?: number;
15292
+ requires_review?: boolean;
15293
+ start_latitude?: number | null;
15294
+ start_longitude?: number | null;
14876
15295
  start_time?: string;
14877
15296
  travel_cost?: number | null;
14878
15297
  travel_distance_km?: number | null;
15298
+ travel_duration_min?: number | null;
15299
+ travel_time_minutes?: number | null;
14879
15300
  type: string;
14880
15301
  updated_at?: string;
15302
+ work_order_id?: string | null;
14881
15303
  };
14882
15304
  Update: {
15305
+ auto_stop_reason?: string | null;
15306
+ auto_stopped?: boolean;
14883
15307
  created_at?: string;
15308
+ current_latitude?: number | null;
15309
+ current_longitude?: number | null;
15310
+ current_position_updated_at?: string | null;
14884
15311
  employee_id?: string;
15312
+ end_latitude?: number | null;
15313
+ end_longitude?: number | null;
14885
15314
  end_time?: string | null;
15315
+ eta_distance_km?: number | null;
15316
+ eta_minutes?: number | null;
15317
+ eta_updated_at?: string | null;
15318
+ hour_category?: string | null;
14886
15319
  id?: string;
15320
+ last_reminder_at?: string | null;
14887
15321
  notes?: string | null;
14888
15322
  overtime_hours?: number;
14889
15323
  overtime_type?: string | null;
14890
15324
  regular_hours?: number;
15325
+ reminder_count?: number;
15326
+ requires_review?: boolean;
15327
+ start_latitude?: number | null;
15328
+ start_longitude?: number | null;
14891
15329
  start_time?: string;
14892
15330
  travel_cost?: number | null;
14893
15331
  travel_distance_km?: number | null;
15332
+ travel_duration_min?: number | null;
15333
+ travel_time_minutes?: number | null;
14894
15334
  type?: string;
14895
15335
  updated_at?: string;
15336
+ work_order_id?: string | null;
14896
15337
  };
14897
15338
  Relationships: [{
14898
15339
  foreignKeyName: "time_logs_employee_id_fkey";
14899
15340
  columns: ["employee_id"];
14900
15341
  isOneToOne: false;
14901
- referencedRelation: "monteurs";
15342
+ referencedRelation: "profiles";
15343
+ referencedColumns: ["id"];
15344
+ }, {
15345
+ foreignKeyName: "time_logs_work_order_id_fkey";
15346
+ columns: ["work_order_id"];
15347
+ isOneToOne: false;
15348
+ referencedRelation: "work_orders";
14902
15349
  referencedColumns: ["id"];
14903
15350
  }];
14904
15351
  };
@@ -14937,7 +15384,7 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
14937
15384
  foreignKeyName: "time_off_entries_employee_id_fkey";
14938
15385
  columns: ["employee_id"];
14939
15386
  isOneToOne: false;
14940
- referencedRelation: "monteurs";
15387
+ referencedRelation: "profiles";
14941
15388
  referencedColumns: ["id"];
14942
15389
  }];
14943
15390
  };
@@ -15247,6 +15694,39 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
15247
15694
  };
15248
15695
  Relationships: [];
15249
15696
  };
15697
+ twinfield_cron_locks: {
15698
+ Row: {
15699
+ created_at: string;
15700
+ heartbeat_at: string;
15701
+ job_name: string;
15702
+ last_error: string | null;
15703
+ last_finished_at: string | null;
15704
+ locked_at: string;
15705
+ run_id: string;
15706
+ updated_at: string;
15707
+ };
15708
+ Insert: {
15709
+ created_at?: string;
15710
+ heartbeat_at?: string;
15711
+ job_name: string;
15712
+ last_error?: string | null;
15713
+ last_finished_at?: string | null;
15714
+ locked_at?: string;
15715
+ run_id?: string;
15716
+ updated_at?: string;
15717
+ };
15718
+ Update: {
15719
+ created_at?: string;
15720
+ heartbeat_at?: string;
15721
+ job_name?: string;
15722
+ last_error?: string | null;
15723
+ last_finished_at?: string | null;
15724
+ locked_at?: string;
15725
+ run_id?: string;
15726
+ updated_at?: string;
15727
+ };
15728
+ Relationships: [];
15729
+ };
15250
15730
  twinfield_customers: {
15251
15731
  Row: {
15252
15732
  address: string | null;
@@ -15847,6 +16327,7 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
15847
16327
  twinfield_push_queue: {
15848
16328
  Row: {
15849
16329
  action: string;
16330
+ attempt_started_at: string | null;
15850
16331
  attempts: number;
15851
16332
  connection_id: string | null;
15852
16333
  created_at: string;
@@ -15863,6 +16344,7 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
15863
16344
  };
15864
16345
  Insert: {
15865
16346
  action?: string;
16347
+ attempt_started_at?: string | null;
15866
16348
  attempts?: number;
15867
16349
  connection_id?: string | null;
15868
16350
  created_at?: string;
@@ -15879,6 +16361,7 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
15879
16361
  };
15880
16362
  Update: {
15881
16363
  action?: string;
16364
+ attempt_started_at?: string | null;
15882
16365
  attempts?: number;
15883
16366
  connection_id?: string | null;
15884
16367
  created_at?: string;
@@ -16076,13 +16559,7 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
16076
16559
  workday_end?: string | null;
16077
16560
  workday_start?: string | null;
16078
16561
  };
16079
- Relationships: [{
16080
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
16081
- columns: ["monteur_id"];
16082
- isOneToOne: true;
16083
- referencedRelation: "monteurs";
16084
- referencedColumns: ["id"];
16085
- }];
16562
+ Relationships: [];
16086
16563
  };
16087
16564
  uren_entries: {
16088
16565
  Row: {
@@ -16128,12 +16605,6 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
16128
16605
  werkbon_id?: string | null;
16129
16606
  };
16130
16607
  Relationships: [{
16131
- foreignKeyName: "uren_entries_monteur_id_fkey";
16132
- columns: ["monteur_id"];
16133
- isOneToOne: false;
16134
- referencedRelation: "monteurs";
16135
- referencedColumns: ["id"];
16136
- }, {
16137
16608
  foreignKeyName: "uren_entries_werkbon_id_fkey";
16138
16609
  columns: ["werkbon_id"];
16139
16610
  isOneToOne: false;
@@ -16601,17 +17072,12 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
16601
17072
  submitted_at?: string | null;
16602
17073
  updated_at?: string;
16603
17074
  };
16604
- Relationships: [{
16605
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
16606
- columns: ["monteur_id"];
16607
- isOneToOne: false;
16608
- referencedRelation: "monteurs";
16609
- referencedColumns: ["id"];
16610
- }];
17075
+ Relationships: [];
16611
17076
  };
16612
17077
  user_module_permissions: {
16613
17078
  Row: {
16614
17079
  created_at: string;
17080
+ feature_id: string;
16615
17081
  id: string;
16616
17082
  module_id: string;
16617
17083
  permission: string;
@@ -16620,6 +17086,7 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
16620
17086
  };
16621
17087
  Insert: {
16622
17088
  created_at?: string;
17089
+ feature_id?: string;
16623
17090
  id?: string;
16624
17091
  module_id: string;
16625
17092
  permission: string;
@@ -16628,6 +17095,7 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
16628
17095
  };
16629
17096
  Update: {
16630
17097
  created_at?: string;
17098
+ feature_id?: string;
16631
17099
  id?: string;
16632
17100
  module_id?: string;
16633
17101
  permission?: string;
@@ -16663,6 +17131,51 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
16663
17131
  referencedColumns: ["id"];
16664
17132
  }];
16665
17133
  };
17134
+ van_inventories: {
17135
+ Row: {
17136
+ barcode: string | null;
17137
+ created_at: string;
17138
+ id: string;
17139
+ monteur_id: string | null;
17140
+ price_per_unit: number;
17141
+ product_name: string;
17142
+ quantity_current: number;
17143
+ quantity_min: number;
17144
+ unit: string;
17145
+ updated_at: string;
17146
+ };
17147
+ Insert: {
17148
+ barcode?: string | null;
17149
+ created_at?: string;
17150
+ id?: string;
17151
+ monteur_id?: string | null;
17152
+ price_per_unit?: number;
17153
+ product_name: string;
17154
+ quantity_current?: number;
17155
+ quantity_min?: number;
17156
+ unit?: string;
17157
+ updated_at?: string;
17158
+ };
17159
+ Update: {
17160
+ barcode?: string | null;
17161
+ created_at?: string;
17162
+ id?: string;
17163
+ monteur_id?: string | null;
17164
+ price_per_unit?: number;
17165
+ product_name?: string;
17166
+ quantity_current?: number;
17167
+ quantity_min?: number;
17168
+ unit?: string;
17169
+ updated_at?: string;
17170
+ };
17171
+ Relationships: [{
17172
+ foreignKeyName: "van_inventories_monteur_id_fkey";
17173
+ columns: ["monteur_id"];
17174
+ isOneToOne: false;
17175
+ referencedRelation: "profiles";
17176
+ referencedColumns: ["id"];
17177
+ }];
17178
+ };
16666
17179
  voorraad_custom_fields: {
16667
17180
  Row: {
16668
17181
  created_at: string;
@@ -17613,7 +18126,7 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
17613
18126
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
17614
18127
  columns: ["monteur_id"];
17615
18128
  isOneToOne: false;
17616
- referencedRelation: "monteurs";
18129
+ referencedRelation: "profiles";
17617
18130
  referencedColumns: ["id"];
17618
18131
  }, {
17619
18132
  foreignKeyName: "work_order_monteurs_work_order_id_fkey";
@@ -17623,6 +18136,60 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
17623
18136
  referencedColumns: ["id"];
17624
18137
  }];
17625
18138
  };
18139
+ work_order_photos: {
18140
+ Row: {
18141
+ ai_caption: string | null;
18142
+ ai_categorized_at: string | null;
18143
+ ai_labels: import("../integrations/supabase/types").Json | null;
18144
+ caption: string | null;
18145
+ created_at: string;
18146
+ id: string;
18147
+ monteur_id: string | null;
18148
+ photo_type: string;
18149
+ storage_path: string;
18150
+ updated_at: string;
18151
+ work_order_id: string;
18152
+ };
18153
+ Insert: {
18154
+ ai_caption?: string | null;
18155
+ ai_categorized_at?: string | null;
18156
+ ai_labels?: import("../integrations/supabase/types").Json | null;
18157
+ caption?: string | null;
18158
+ created_at?: string;
18159
+ id?: string;
18160
+ monteur_id?: string | null;
18161
+ photo_type?: string;
18162
+ storage_path: string;
18163
+ updated_at?: string;
18164
+ work_order_id: string;
18165
+ };
18166
+ Update: {
18167
+ ai_caption?: string | null;
18168
+ ai_categorized_at?: string | null;
18169
+ ai_labels?: import("../integrations/supabase/types").Json | null;
18170
+ caption?: string | null;
18171
+ created_at?: string;
18172
+ id?: string;
18173
+ monteur_id?: string | null;
18174
+ photo_type?: string;
18175
+ storage_path?: string;
18176
+ updated_at?: string;
18177
+ work_order_id?: string;
18178
+ };
18179
+ Relationships: [{
18180
+ foreignKeyName: "work_order_photos_monteur_id_fkey";
18181
+ columns: ["monteur_id"];
18182
+ isOneToOne: false;
18183
+ referencedRelation: "profiles";
18184
+ referencedColumns: ["id"];
18185
+ }, {
18186
+ foreignKeyName: "work_order_photos_work_order_id_fkey";
18187
+ columns: ["work_order_id"];
18188
+ isOneToOne: false;
18189
+ referencedRelation: "work_orders";
18190
+ referencedColumns: ["id"];
18191
+ }];
18192
+ };
17626
18193
  work_orders: {
17627
18194
  Row: {
17628
18195
  assigned_to: string | null;
@@ -17654,7 +18221,6 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
17654
18221
  scheduled_end_time: string | null;
17655
18222
  scheduled_start_time: string | null;
17656
18223
  status: string;
17657
- tenant_id: string;
17658
18224
  total_hours_worked: number | null;
17659
18225
  total_price: number | null;
17660
18226
  travel_time_minutes: number | null;
@@ -17692,7 +18258,6 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
17692
18258
  scheduled_end_time?: string | null;
17693
18259
  scheduled_start_time?: string | null;
17694
18260
  status?: string;
17695
- tenant_id: string;
17696
18261
  total_hours_worked?: number | null;
17697
18262
  total_price?: number | null;
17698
18263
  travel_time_minutes?: number | null;
@@ -17730,7 +18295,6 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
17730
18295
  scheduled_end_time?: string | null;
17731
18296
  scheduled_start_time?: string | null;
17732
18297
  status?: string;
17733
- tenant_id?: string;
17734
18298
  total_hours_worked?: number | null;
17735
18299
  total_price?: number | null;
17736
18300
  travel_time_minutes?: number | null;
@@ -17744,12 +18308,6 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
17744
18308
  isOneToOne: false;
17745
18309
  referencedRelation: "work_orders";
17746
18310
  referencedColumns: ["id"];
17747
- }, {
17748
- foreignKeyName: "work_orders_tenant_id_fkey";
17749
- columns: ["tenant_id"];
17750
- isOneToOne: false;
17751
- referencedRelation: "tenants";
17752
- referencedColumns: ["id"];
17753
18311
  }];
17754
18312
  };
17755
18313
  };
@@ -18434,6 +18992,19 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
18434
18992
  };
18435
18993
  Returns: undefined;
18436
18994
  };
18995
+ approve_mailbox_order_proposal: {
18996
+ Args: {
18997
+ p_custom_fields: import("../integrations/supabase/types").Json;
18998
+ p_customer_id: string;
18999
+ p_delivery_date: string;
19000
+ p_field_values?: import("../integrations/supabase/types").Json;
19001
+ p_lines: import("../integrations/supabase/types").Json;
19002
+ p_notes: string;
19003
+ p_proposal_id: string;
19004
+ p_reviewed_by: string;
19005
+ };
19006
+ Returns: import("../integrations/supabase/types").Json;
19007
+ };
18437
19008
  assign_cart_numbers: {
18438
19009
  Args: {
18439
19010
  p_carts: import("../integrations/supabase/types").Json;
@@ -18485,6 +19056,10 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
18485
19056
  };
18486
19057
  Returns: number;
18487
19058
  };
19059
+ can_manage_hours: {
19060
+ Args: never;
19061
+ Returns: boolean;
19062
+ };
18488
19063
  check_offer_product_available_stock: {
18489
19064
  Args: {
18490
19065
  p_campaign_product_id: string;
@@ -18674,6 +19249,7 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
18674
19249
  };
18675
19250
  Returns: {
18676
19251
  action: string;
19252
+ attempt_started_at: string | null;
18677
19253
  attempts: number;
18678
19254
  connection_id: string | null;
18679
19255
  created_at: string;
@@ -18761,6 +19337,30 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
18761
19337
  agent_naam: string;
18762
19338
  }[];
18763
19339
  };
19340
+ consume_van_inventory: {
19341
+ Args: {
19342
+ p_inventory_id: string;
19343
+ p_quantity: number;
19344
+ };
19345
+ Returns: {
19346
+ barcode: string | null;
19347
+ created_at: string;
19348
+ id: string;
19349
+ monteur_id: string | null;
19350
+ price_per_unit: number;
19351
+ product_name: string;
19352
+ quantity_current: number;
19353
+ quantity_min: number;
19354
+ unit: string;
19355
+ updated_at: string;
19356
+ };
19357
+ SetofOptions: {
19358
+ from: "*";
19359
+ to: "van_inventories";
19360
+ isOneToOne: true;
19361
+ isSetofReturn: false;
19362
+ };
19363
+ };
18764
19364
  control_get_todays_carts: {
18765
19365
  Args: never;
18766
19366
  Returns: {
@@ -18834,6 +19434,13 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
18834
19434
  _user_id: string;
18835
19435
  };
18836
19436
  Returns: string;
19437
+ } | {
19438
+ Args: {
19439
+ _feature_id: string;
19440
+ _module_id: string;
19441
+ _user_id: string;
19442
+ };
19443
+ Returns: string;
18837
19444
  };
18838
19445
  email_auth_decrypt: {
18839
19446
  Args: {
@@ -19185,12 +19792,6 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
19185
19792
  Args: never;
19186
19793
  Returns: string;
19187
19794
  };
19188
- get_work_order_tenant_id: {
19189
- Args: {
19190
- wo_id: string;
19191
- };
19192
- Returns: string;
19193
- };
19194
19795
  has_module_permission: {
19195
19796
  Args: {
19196
19797
  _min: string;
@@ -19224,6 +19825,13 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
19224
19825
  };
19225
19826
  Returns: boolean;
19226
19827
  };
19828
+ is_time_log_week_locked: {
19829
+ Args: {
19830
+ p_employee_id: string;
19831
+ p_start_time: string;
19832
+ };
19833
+ Returns: boolean;
19834
+ };
19227
19835
  is_user_admin: {
19228
19836
  Args: never;
19229
19837
  Returns: boolean;
@@ -19238,13 +19846,14 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
19238
19846
  };
19239
19847
  Returns: boolean;
19240
19848
  };
19241
- list_monteurs: {
19849
+ list_medewerkers: {
19242
19850
  Args: never;
19243
19851
  Returns: {
19244
19852
  avatar_url: string;
19245
19853
  display_name: string;
19246
19854
  email: string;
19247
19855
  id: string;
19856
+ roles: string[];
19248
19857
  }[];
19249
19858
  };
19250
19859
  list_my_planning_items: {
@@ -19735,6 +20344,65 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
19735
20344
  };
19736
20345
  Returns: number;
19737
20346
  };
20347
+ logistics_plan_claim: {
20348
+ Args: {
20349
+ p_limit?: number;
20350
+ };
20351
+ Returns: {
20352
+ attempts: number;
20353
+ id: string;
20354
+ order_id: string;
20355
+ }[];
20356
+ };
20357
+ logistics_plan_enqueue: {
20358
+ Args: {
20359
+ p_order_id: string;
20360
+ p_reason?: string;
20361
+ };
20362
+ Returns: undefined;
20363
+ };
20364
+ logistics_plan_ensure_event: {
20365
+ Args: {
20366
+ p_order_id: string;
20367
+ };
20368
+ Returns: boolean;
20369
+ };
20370
+ logistics_plan_finish: {
20371
+ Args: {
20372
+ p_error?: string;
20373
+ p_id: string;
20374
+ };
20375
+ Returns: undefined;
20376
+ };
20377
+ logistics_plan_impact_orders: {
20378
+ Args: {
20379
+ p_order_id: string;
20380
+ };
20381
+ Returns: {
20382
+ buffer_id: string;
20383
+ order_id: string;
20384
+ plan_date: string;
20385
+ }[];
20386
+ };
20387
+ logistics_plan_kick: {
20388
+ Args: never;
20389
+ Returns: undefined;
20390
+ };
20391
+ logistics_plan_prune: {
20392
+ Args: never;
20393
+ Returns: number;
20394
+ };
20395
+ logistics_plan_release_stale: {
20396
+ Args: never;
20397
+ Returns: number;
20398
+ };
20399
+ logistics_plan_setting: {
20400
+ Args: {
20401
+ p_default: number;
20402
+ p_key: string;
20403
+ };
20404
+ Returns: number;
20405
+ };
19738
20406
  logistics_queue_capacity_email: {
19739
20407
  Args: {
19740
20408
  p_alert_id: string;
@@ -19976,6 +20644,7 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
19976
20644
  my_module_permissions: {
19977
20645
  Args: never;
19978
20646
  Returns: {
20647
+ feature_id: string;
19979
20648
  module_id: string;
19980
20649
  permission: string;
19981
20650
  }[];
@@ -20856,6 +21525,16 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
20856
21525
  };
20857
21526
  Returns: string[];
20858
21527
  };
21528
+ switch_time_log: {
21529
+ Args: {
21530
+ p_employee_id: string;
21531
+ p_start_lat?: number;
21532
+ p_start_lng?: number;
21533
+ p_type: string;
21534
+ p_work_order_id?: string;
21535
+ };
21536
+ Returns: import("../integrations/supabase/types").Json;
21537
+ };
20859
21538
  sync_all_layer_stocks: {
20860
21539
  Args: never;
20861
21540
  Returns: undefined;
@@ -20906,6 +21585,24 @@ export declare const rebufferAllOrders: import("@tanstack/start-client-core").Op
20906
21585
  };
20907
21586
  Returns: boolean;
20908
21587
  };
21588
+ twinfield_cron_lock_acquire: {
21589
+ Args: {
21590
+ _job_name: string;
21591
+ _stale_seconds?: number;
21592
+ };
21593
+ Returns: boolean;
21594
+ };
21595
+ twinfield_cron_lock_release: {
21596
+ Args: {
21597
+ _error?: string;
21598
+ _job_name: string;
21599
+ };
21600
+ Returns: undefined;
21601
+ };
21602
+ twinfield_prune_push_queue: {
21603
+ Args: never;
21604
+ Returns: number;
21605
+ };
20909
21606
  twinfield_register_cron: {
20910
21607
  Args: {
20911
21608
  apikey?: string;
@@ -21845,6 +22542,126 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
21845
22542
  };
21846
22543
  Relationships: [];
21847
22544
  };
22545
+ cao_holidays: {
22546
+ Row: {
22547
+ created_at: string;
22548
+ description: string | null;
22549
+ holiday_date: string;
22550
+ id: string;
22551
+ updated_at: string;
22552
+ };
22553
+ Insert: {
22554
+ created_at?: string;
22555
+ description?: string | null;
22556
+ holiday_date: string;
22557
+ id?: string;
22558
+ updated_at?: string;
22559
+ };
22560
+ Update: {
22561
+ created_at?: string;
22562
+ description?: string | null;
22563
+ holiday_date?: string;
22564
+ id?: string;
22565
+ updated_at?: string;
22566
+ };
22567
+ Relationships: [];
22568
+ };
22569
+ cao_settings: {
22570
+ Row: {
22571
+ auto_break_after_hours: number;
22572
+ auto_break_minutes: number;
22573
+ auto_break_unpaid: boolean;
22574
+ auto_stop_after_hours: number;
22575
+ callout_fee: number;
22576
+ created_at: string;
22577
+ daily_regular_hours: number;
22578
+ default_hourly_rate: number;
22579
+ id: string;
22580
+ materials_markup_percent: number;
22581
+ max_daily_hours: number;
22582
+ max_weekly_hours: number;
22583
+ meal_allowance_amount: number;
22584
+ overtime_pct_178: number;
22585
+ overtime_pct_189: number;
22586
+ overtime_pct_212: number;
22587
+ reminder_after_hours: number;
22588
+ standby_evening_amount: number;
22589
+ standby_weekend_amount: number;
22590
+ travel_cost_per_km: number | null;
22591
+ travel_cost_threshold_km: number | null;
22592
+ travel_counts_as_work: boolean;
22593
+ travel_hourly_rate: number;
22594
+ travel_rate_per_hour: number;
22595
+ travel_threshold_minutes: number;
22596
+ updated_at: string;
22597
+ weekend_always_212: boolean;
22598
+ window_end: string;
22599
+ window_start: string;
22600
+ };
22601
+ Insert: {
22602
+ auto_break_after_hours?: number;
22603
+ auto_break_minutes?: number;
22604
+ auto_break_unpaid?: boolean;
22605
+ auto_stop_after_hours?: number;
22606
+ callout_fee?: number;
22607
+ created_at?: string;
22608
+ daily_regular_hours?: number;
22609
+ default_hourly_rate?: number;
22610
+ id?: string;
22611
+ materials_markup_percent?: number;
22612
+ max_daily_hours?: number;
22613
+ max_weekly_hours?: number;
22614
+ meal_allowance_amount?: number;
22615
+ overtime_pct_178?: number;
22616
+ overtime_pct_189?: number;
22617
+ overtime_pct_212?: number;
22618
+ reminder_after_hours?: number;
22619
+ standby_evening_amount?: number;
22620
+ standby_weekend_amount?: number;
22621
+ travel_cost_per_km?: number | null;
22622
+ travel_cost_threshold_km?: number | null;
22623
+ travel_counts_as_work?: boolean;
22624
+ travel_hourly_rate?: number;
22625
+ travel_rate_per_hour?: number;
22626
+ travel_threshold_minutes?: number;
22627
+ updated_at?: string;
22628
+ weekend_always_212?: boolean;
22629
+ window_end?: string;
22630
+ window_start?: string;
22631
+ };
22632
+ Update: {
22633
+ auto_break_after_hours?: number;
22634
+ auto_break_minutes?: number;
22635
+ auto_break_unpaid?: boolean;
22636
+ auto_stop_after_hours?: number;
22637
+ callout_fee?: number;
22638
+ created_at?: string;
22639
+ daily_regular_hours?: number;
22640
+ default_hourly_rate?: number;
22641
+ id?: string;
22642
+ materials_markup_percent?: number;
22643
+ max_daily_hours?: number;
22644
+ max_weekly_hours?: number;
22645
+ meal_allowance_amount?: number;
22646
+ overtime_pct_178?: number;
22647
+ overtime_pct_189?: number;
22648
+ overtime_pct_212?: number;
22649
+ reminder_after_hours?: number;
22650
+ standby_evening_amount?: number;
22651
+ standby_weekend_amount?: number;
22652
+ travel_cost_per_km?: number | null;
22653
+ travel_cost_threshold_km?: number | null;
22654
+ travel_counts_as_work?: boolean;
22655
+ travel_hourly_rate?: number;
22656
+ travel_rate_per_hour?: number;
22657
+ travel_threshold_minutes?: number;
22658
+ updated_at?: string;
22659
+ weekend_always_212?: boolean;
22660
+ window_end?: string;
22661
+ window_start?: string;
22662
+ };
22663
+ Relationships: [];
22664
+ };
21848
22665
  carrier_shipping_rates: {
21849
22666
  Row: {
21850
22667
  carrier_id: string;
@@ -28739,7 +29556,6 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
28739
29556
  start_date: string;
28740
29557
  start_time: string | null;
28741
29558
  status: string;
28742
- tenant_id: string;
28743
29559
  updated_at: string;
28744
29560
  user_id: string;
28745
29561
  };
@@ -28757,7 +29573,6 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
28757
29573
  start_date: string;
28758
29574
  start_time?: string | null;
28759
29575
  status?: string;
28760
- tenant_id?: string;
28761
29576
  updated_at?: string;
28762
29577
  user_id: string;
28763
29578
  };
@@ -28775,7 +29590,6 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
28775
29590
  start_date?: string;
28776
29591
  start_time?: string | null;
28777
29592
  status?: string;
28778
- tenant_id?: string;
28779
29593
  updated_at?: string;
28780
29594
  user_id?: string;
28781
29595
  };
@@ -28783,13 +29597,13 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
28783
29597
  foreignKeyName: "leave_requests_monteur_id_fkey";
28784
29598
  columns: ["monteur_id"];
28785
29599
  isOneToOne: false;
28786
- referencedRelation: "monteurs";
29600
+ referencedRelation: "profiles";
28787
29601
  referencedColumns: ["id"];
28788
29602
  }, {
28789
29603
  foreignKeyName: "leave_requests_user_id_fkey";
28790
29604
  columns: ["user_id"];
28791
29605
  isOneToOne: false;
28792
- referencedRelation: "monteurs";
29606
+ referencedRelation: "profiles";
28793
29607
  referencedColumns: ["id"];
28794
29608
  }];
28795
29609
  };
@@ -29657,6 +30471,45 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
29657
30471
  };
29658
30472
  Relationships: [];
29659
30473
  };
30474
+ logistics_plan_queue: {
30475
+ Row: {
30476
+ attempts: number;
30477
+ claimed_at: string | null;
30478
+ enqueued_at: string;
30479
+ error: string | null;
30480
+ id: string;
30481
+ next_attempt_at: string;
30482
+ order_id: string;
30483
+ reason: string;
30484
+ status: string;
30485
+ updated_at: string;
30486
+ };
30487
+ Insert: {
30488
+ attempts?: number;
30489
+ claimed_at?: string | null;
30490
+ enqueued_at?: string;
30491
+ error?: string | null;
30492
+ id?: string;
30493
+ next_attempt_at?: string;
30494
+ order_id: string;
30495
+ reason?: string;
30496
+ status?: string;
30497
+ updated_at?: string;
30498
+ };
30499
+ Update: {
30500
+ attempts?: number;
30501
+ claimed_at?: string | null;
30502
+ enqueued_at?: string;
30503
+ error?: string | null;
30504
+ id?: string;
30505
+ next_attempt_at?: string;
30506
+ order_id?: string;
30507
+ reason?: string;
30508
+ status?: string;
30509
+ updated_at?: string;
30510
+ };
30511
+ Relationships: [];
30512
+ };
29660
30513
  logistics_plan_runs: {
29661
30514
  Row: {
29662
30515
  created_at: string;
@@ -29732,6 +30585,24 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
29732
30585
  referencedColumns: ["id"];
29733
30586
  }];
29734
30587
  };
30588
+ logistics_plan_settings: {
30589
+ Row: {
30590
+ key: string;
30591
+ updated_at: string;
30592
+ value: string;
30593
+ };
30594
+ Insert: {
30595
+ key: string;
30596
+ updated_at?: string;
30597
+ value: string;
30598
+ };
30599
+ Update: {
30600
+ key?: string;
30601
+ updated_at?: string;
30602
+ value?: string;
30603
+ };
30604
+ Relationships: [];
30605
+ };
29735
30606
  logistics_rebuffer_state: {
29736
30607
  Row: {
29737
30608
  created_at: string;
@@ -30887,6 +31758,90 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
30887
31758
  };
30888
31759
  Relationships: [];
30889
31760
  };
31761
+ material_usage: {
31762
+ Row: {
31763
+ created_at: string;
31764
+ id: string;
31765
+ material_name: string;
31766
+ monteur_id: string | null;
31767
+ price_at_time: number;
31768
+ quantity_used: number;
31769
+ updated_at: string;
31770
+ van_inventory_id: string | null;
31771
+ work_order_id: string;
31772
+ };
31773
+ Insert: {
31774
+ created_at?: string;
31775
+ id?: string;
31776
+ material_name: string;
31777
+ monteur_id?: string | null;
31778
+ price_at_time?: number;
31779
+ quantity_used?: number;
31780
+ updated_at?: string;
31781
+ van_inventory_id?: string | null;
31782
+ work_order_id: string;
31783
+ };
31784
+ Update: {
31785
+ created_at?: string;
31786
+ id?: string;
31787
+ material_name?: string;
31788
+ monteur_id?: string | null;
31789
+ price_at_time?: number;
31790
+ quantity_used?: number;
31791
+ updated_at?: string;
31792
+ van_inventory_id?: string | null;
31793
+ work_order_id?: string;
31794
+ };
31795
+ Relationships: [{
31796
+ foreignKeyName: "material_usage_monteur_id_fkey";
31797
+ columns: ["monteur_id"];
31798
+ isOneToOne: false;
31799
+ referencedRelation: "profiles";
31800
+ referencedColumns: ["id"];
31801
+ }, {
31802
+ foreignKeyName: "material_usage_van_inventory_id_fkey";
31803
+ columns: ["van_inventory_id"];
31804
+ isOneToOne: false;
31805
+ referencedRelation: "van_inventories";
31806
+ referencedColumns: ["id"];
31807
+ }, {
31808
+ foreignKeyName: "material_usage_work_order_id_fkey";
31809
+ columns: ["work_order_id"];
31810
+ isOneToOne: false;
31811
+ referencedRelation: "work_orders";
31812
+ referencedColumns: ["id"];
31813
+ }];
31814
+ };
31815
+ module_features: {
31816
+ Row: {
31817
+ created_at: string;
31818
+ feature_id: string;
31819
+ id: string;
31820
+ is_active: boolean;
31821
+ last_seen_at: string;
31822
+ module_id: string;
31823
+ name: string;
31824
+ };
31825
+ Insert: {
31826
+ created_at?: string;
31827
+ feature_id: string;
31828
+ id?: string;
31829
+ is_active?: boolean;
31830
+ last_seen_at?: string;
31831
+ module_id: string;
31832
+ name: string;
31833
+ };
31834
+ Update: {
31835
+ created_at?: string;
31836
+ feature_id?: string;
31837
+ id?: string;
31838
+ is_active?: boolean;
31839
+ last_seen_at?: string;
31840
+ module_id?: string;
31841
+ name?: string;
31842
+ };
31843
+ Relationships: [];
31844
+ };
30890
31845
  module_permissions: {
30891
31846
  Row: {
30892
31847
  created_at: string;
@@ -30917,6 +31872,7 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
30917
31872
  module_registry: {
30918
31873
  Row: {
30919
31874
  created_at: string;
31875
+ enforce: boolean;
30920
31876
  is_active: boolean;
30921
31877
  last_seen_at: string;
30922
31878
  module_id: string;
@@ -30926,6 +31882,7 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
30926
31882
  };
30927
31883
  Insert: {
30928
31884
  created_at?: string;
31885
+ enforce?: boolean;
30929
31886
  is_active?: boolean;
30930
31887
  last_seen_at?: string;
30931
31888
  module_id: string;
@@ -30935,6 +31892,7 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
30935
31892
  };
30936
31893
  Update: {
30937
31894
  created_at?: string;
31895
+ enforce?: boolean;
30938
31896
  is_active?: boolean;
30939
31897
  last_seen_at?: string;
30940
31898
  module_id?: string;
@@ -30995,63 +31953,6 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
30995
31953
  };
30996
31954
  Relationships: [];
30997
31955
  };
30998
- monteurs: {
30999
- Row: {
31000
- avatar_url: string | null;
31001
- color: string | null;
31002
- created_at: string;
31003
- email: string | null;
31004
- id: string;
31005
- is_active: boolean;
31006
- leave_balance_hours: number;
31007
- name: string;
31008
- persnr: number | null;
31009
- phone: string | null;
31010
- role: string;
31011
- tenant_id: string;
31012
- updated_at: string;
31013
- user_id: string | null;
31014
- };
31015
- Insert: {
31016
- avatar_url?: string | null;
31017
- color?: string | null;
31018
- created_at?: string;
31019
- email?: string | null;
31020
- id?: string;
31021
- is_active?: boolean;
31022
- leave_balance_hours?: number;
31023
- name: string;
31024
- persnr?: number | null;
31025
- phone?: string | null;
31026
- role?: string;
31027
- tenant_id: string;
31028
- updated_at?: string;
31029
- user_id?: string | null;
31030
- };
31031
- Update: {
31032
- avatar_url?: string | null;
31033
- color?: string | null;
31034
- created_at?: string;
31035
- email?: string | null;
31036
- id?: string;
31037
- is_active?: boolean;
31038
- leave_balance_hours?: number;
31039
- name?: string;
31040
- persnr?: number | null;
31041
- phone?: string | null;
31042
- role?: string;
31043
- tenant_id?: string;
31044
- updated_at?: string;
31045
- user_id?: string | null;
31046
- };
31047
- Relationships: [{
31048
- foreignKeyName: "monteurs_tenant_id_fkey";
31049
- columns: ["tenant_id"];
31050
- isOneToOne: false;
31051
- referencedRelation: "tenants";
31052
- referencedColumns: ["id"];
31053
- }];
31054
- };
31055
31956
  nmbrs_component_mapping: {
31056
31957
  Row: {
31057
31958
  created_at: string;
@@ -31122,13 +32023,7 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
31122
32023
  nmbrs_employee_number?: string;
31123
32024
  updated_at?: string;
31124
32025
  };
31125
- Relationships: [{
31126
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
31127
- columns: ["monteur_id"];
31128
- isOneToOne: true;
31129
- referencedRelation: "monteurs";
31130
- referencedColumns: ["id"];
31131
- }];
32026
+ Relationships: [];
31132
32027
  };
31133
32028
  nmbrs_export_lines: {
31134
32029
  Row: {
@@ -31177,12 +32072,6 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
31177
32072
  wage_code?: string;
31178
32073
  };
31179
32074
  Relationships: [{
31180
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
31181
- columns: ["monteur_id"];
31182
- isOneToOne: false;
31183
- referencedRelation: "monteurs";
31184
- referencedColumns: ["id"];
31185
- }, {
31186
32075
  foreignKeyName: "nmbrs_export_lines_run_id_fkey";
31187
32076
  columns: ["run_id"];
31188
32077
  isOneToOne: false;
@@ -32010,6 +32899,7 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
32010
32899
  error_message: string | null;
32011
32900
  id: string;
32012
32901
  invoice_number: string | null;
32902
+ next_attempt_at: string;
32013
32903
  order_id: string;
32014
32904
  processed_at: string | null;
32015
32905
  status: string;
@@ -32021,6 +32911,7 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
32021
32911
  error_message?: string | null;
32022
32912
  id?: string;
32023
32913
  invoice_number?: string | null;
32914
+ next_attempt_at?: string;
32024
32915
  order_id: string;
32025
32916
  processed_at?: string | null;
32026
32917
  status?: string;
@@ -32032,6 +32923,7 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
32032
32923
  error_message?: string | null;
32033
32924
  id?: string;
32034
32925
  invoice_number?: string | null;
32926
+ next_attempt_at?: string;
32035
32927
  order_id?: string;
32036
32928
  processed_at?: string | null;
32037
32929
  status?: string;
@@ -33570,6 +34462,9 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
33570
34462
  created_at: string;
33571
34463
  id: string;
33572
34464
  laatst_gezien: string;
34465
+ laatste_fout: string | null;
34466
+ laatste_request_id: number | null;
34467
+ mislukte_posts: number;
33573
34468
  tick_sleutel: string;
33574
34469
  updated_at: string;
33575
34470
  };
@@ -33579,6 +34474,9 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
33579
34474
  created_at?: string;
33580
34475
  id?: string;
33581
34476
  laatst_gezien?: string;
34477
+ laatste_fout?: string | null;
34478
+ laatste_request_id?: number | null;
34479
+ mislukte_posts?: number;
33582
34480
  tick_sleutel?: string;
33583
34481
  updated_at?: string;
33584
34482
  };
@@ -33588,6 +34486,9 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
33588
34486
  created_at?: string;
33589
34487
  id?: string;
33590
34488
  laatst_gezien?: string;
34489
+ laatste_fout?: string | null;
34490
+ laatste_request_id?: number | null;
34491
+ mislukte_posts?: number;
33591
34492
  tick_sleutel?: string;
33592
34493
  updated_at?: string;
33593
34494
  };
@@ -35096,6 +35997,96 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
35096
35997
  referencedColumns: ["id"];
35097
35998
  }];
35098
35999
  };
36000
+ role_assignments: {
36001
+ Row: {
36002
+ created_at: string;
36003
+ id: string;
36004
+ role_id: string;
36005
+ user_id: string;
36006
+ };
36007
+ Insert: {
36008
+ created_at?: string;
36009
+ id?: string;
36010
+ role_id: string;
36011
+ user_id: string;
36012
+ };
36013
+ Update: {
36014
+ created_at?: string;
36015
+ id?: string;
36016
+ role_id?: string;
36017
+ user_id?: string;
36018
+ };
36019
+ Relationships: [{
36020
+ foreignKeyName: "role_assignments_role_id_fkey";
36021
+ columns: ["role_id"];
36022
+ isOneToOne: false;
36023
+ referencedRelation: "roles";
36024
+ referencedColumns: ["id"];
36025
+ }];
36026
+ };
36027
+ role_permissions: {
36028
+ Row: {
36029
+ can_edit: boolean;
36030
+ can_view: boolean;
36031
+ feature_id: string;
36032
+ id: string;
36033
+ module_id: string;
36034
+ role_id: string;
36035
+ updated_at: string;
36036
+ };
36037
+ Insert: {
36038
+ can_edit?: boolean;
36039
+ can_view?: boolean;
36040
+ feature_id?: string;
36041
+ id?: string;
36042
+ module_id: string;
36043
+ role_id: string;
36044
+ updated_at?: string;
36045
+ };
36046
+ Update: {
36047
+ can_edit?: boolean;
36048
+ can_view?: boolean;
36049
+ feature_id?: string;
36050
+ id?: string;
36051
+ module_id?: string;
36052
+ role_id?: string;
36053
+ updated_at?: string;
36054
+ };
36055
+ Relationships: [{
36056
+ foreignKeyName: "role_permissions_role_id_fkey";
36057
+ columns: ["role_id"];
36058
+ isOneToOne: false;
36059
+ referencedRelation: "roles";
36060
+ referencedColumns: ["id"];
36061
+ }];
36062
+ };
36063
+ roles: {
36064
+ Row: {
36065
+ created_at: string;
36066
+ id: string;
36067
+ is_protected: boolean;
36068
+ key: string;
36069
+ name: string;
36070
+ updated_at: string;
36071
+ };
36072
+ Insert: {
36073
+ created_at?: string;
36074
+ id?: string;
36075
+ is_protected?: boolean;
36076
+ key: string;
36077
+ name: string;
36078
+ updated_at?: string;
36079
+ };
36080
+ Update: {
36081
+ created_at?: string;
36082
+ id?: string;
36083
+ is_protected?: boolean;
36084
+ key?: string;
36085
+ name?: string;
36086
+ updated_at?: string;
36087
+ };
36088
+ Relationships: [];
36089
+ };
35099
36090
  rooms: {
35100
36091
  Row: {
35101
36092
  capacity: number;
@@ -35765,6 +36756,54 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
35765
36756
  };
35766
36757
  Relationships: [];
35767
36758
  };
36759
+ time_compensation_entries: {
36760
+ Row: {
36761
+ created_at: string;
36762
+ employee_id: string;
36763
+ entry_date: string;
36764
+ id: string;
36765
+ km: number;
36766
+ meal_allowance: number;
36767
+ notes: string | null;
36768
+ standby_evening: number;
36769
+ standby_weekend: number;
36770
+ tvt_change: number;
36771
+ updated_at: string;
36772
+ };
36773
+ Insert: {
36774
+ created_at?: string;
36775
+ employee_id: string;
36776
+ entry_date: string;
36777
+ id?: string;
36778
+ km?: number;
36779
+ meal_allowance?: number;
36780
+ notes?: string | null;
36781
+ standby_evening?: number;
36782
+ standby_weekend?: number;
36783
+ tvt_change?: number;
36784
+ updated_at?: string;
36785
+ };
36786
+ Update: {
36787
+ created_at?: string;
36788
+ employee_id?: string;
36789
+ entry_date?: string;
36790
+ id?: string;
36791
+ km?: number;
36792
+ meal_allowance?: number;
36793
+ notes?: string | null;
36794
+ standby_evening?: number;
36795
+ standby_weekend?: number;
36796
+ tvt_change?: number;
36797
+ updated_at?: string;
36798
+ };
36799
+ Relationships: [{
36800
+ foreignKeyName: "time_compensation_entries_employee_id_fkey";
36801
+ columns: ["employee_id"];
36802
+ isOneToOne: false;
36803
+ referencedRelation: "profiles";
36804
+ referencedColumns: ["id"];
36805
+ }];
36806
+ };
35768
36807
  time_entries: {
35769
36808
  Row: {
35770
36809
  created_at: string;
@@ -35799,65 +36838,170 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
35799
36838
  undertime?: number;
35800
36839
  updated_at?: string;
35801
36840
  };
36841
+ Relationships: [];
36842
+ };
36843
+ time_log_week_approvals: {
36844
+ Row: {
36845
+ approved_at: string | null;
36846
+ approved_by: string | null;
36847
+ created_at: string;
36848
+ employee_id: string;
36849
+ id: string;
36850
+ locked: boolean;
36851
+ notes: string | null;
36852
+ status: string;
36853
+ submitted_at: string | null;
36854
+ updated_at: string;
36855
+ week_start: string;
36856
+ };
36857
+ Insert: {
36858
+ approved_at?: string | null;
36859
+ approved_by?: string | null;
36860
+ created_at?: string;
36861
+ employee_id: string;
36862
+ id?: string;
36863
+ locked?: boolean;
36864
+ notes?: string | null;
36865
+ status?: string;
36866
+ submitted_at?: string | null;
36867
+ updated_at?: string;
36868
+ week_start: string;
36869
+ };
36870
+ Update: {
36871
+ approved_at?: string | null;
36872
+ approved_by?: string | null;
36873
+ created_at?: string;
36874
+ employee_id?: string;
36875
+ id?: string;
36876
+ locked?: boolean;
36877
+ notes?: string | null;
36878
+ status?: string;
36879
+ submitted_at?: string | null;
36880
+ updated_at?: string;
36881
+ week_start?: string;
36882
+ };
35802
36883
  Relationships: [{
35803
- foreignKeyName: "time_entries_employee_id_fkey";
36884
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
35804
36885
  columns: ["employee_id"];
35805
36886
  isOneToOne: false;
35806
- referencedRelation: "monteurs";
36887
+ referencedRelation: "profiles";
35807
36888
  referencedColumns: ["id"];
35808
36889
  }];
35809
36890
  };
35810
36891
  time_logs: {
35811
36892
  Row: {
36893
+ auto_stop_reason: string | null;
36894
+ auto_stopped: boolean;
35812
36895
  created_at: string;
36896
+ current_latitude: number | null;
36897
+ current_longitude: number | null;
36898
+ current_position_updated_at: string | null;
35813
36899
  employee_id: string;
36900
+ end_latitude: number | null;
36901
+ end_longitude: number | null;
35814
36902
  end_time: string | null;
36903
+ eta_distance_km: number | null;
36904
+ eta_minutes: number | null;
36905
+ eta_updated_at: string | null;
36906
+ hour_category: string | null;
35815
36907
  id: string;
36908
+ last_reminder_at: string | null;
35816
36909
  notes: string | null;
35817
36910
  overtime_hours: number;
35818
36911
  overtime_type: string | null;
35819
36912
  regular_hours: number;
36913
+ reminder_count: number;
36914
+ requires_review: boolean;
36915
+ start_latitude: number | null;
36916
+ start_longitude: number | null;
35820
36917
  start_time: string;
35821
36918
  travel_cost: number | null;
35822
36919
  travel_distance_km: number | null;
36920
+ travel_duration_min: number | null;
36921
+ travel_time_minutes: number | null;
35823
36922
  type: string;
35824
36923
  updated_at: string;
36924
+ work_order_id: string | null;
35825
36925
  };
35826
36926
  Insert: {
36927
+ auto_stop_reason?: string | null;
36928
+ auto_stopped?: boolean;
35827
36929
  created_at?: string;
36930
+ current_latitude?: number | null;
36931
+ current_longitude?: number | null;
36932
+ current_position_updated_at?: string | null;
35828
36933
  employee_id: string;
36934
+ end_latitude?: number | null;
36935
+ end_longitude?: number | null;
35829
36936
  end_time?: string | null;
36937
+ eta_distance_km?: number | null;
36938
+ eta_minutes?: number | null;
36939
+ eta_updated_at?: string | null;
36940
+ hour_category?: string | null;
35830
36941
  id?: string;
36942
+ last_reminder_at?: string | null;
35831
36943
  notes?: string | null;
35832
36944
  overtime_hours?: number;
35833
36945
  overtime_type?: string | null;
35834
36946
  regular_hours?: number;
36947
+ reminder_count?: number;
36948
+ requires_review?: boolean;
36949
+ start_latitude?: number | null;
36950
+ start_longitude?: number | null;
35835
36951
  start_time?: string;
35836
36952
  travel_cost?: number | null;
35837
36953
  travel_distance_km?: number | null;
36954
+ travel_duration_min?: number | null;
36955
+ travel_time_minutes?: number | null;
35838
36956
  type: string;
35839
36957
  updated_at?: string;
36958
+ work_order_id?: string | null;
35840
36959
  };
35841
36960
  Update: {
36961
+ auto_stop_reason?: string | null;
36962
+ auto_stopped?: boolean;
35842
36963
  created_at?: string;
36964
+ current_latitude?: number | null;
36965
+ current_longitude?: number | null;
36966
+ current_position_updated_at?: string | null;
35843
36967
  employee_id?: string;
36968
+ end_latitude?: number | null;
36969
+ end_longitude?: number | null;
35844
36970
  end_time?: string | null;
36971
+ eta_distance_km?: number | null;
36972
+ eta_minutes?: number | null;
36973
+ eta_updated_at?: string | null;
36974
+ hour_category?: string | null;
35845
36975
  id?: string;
36976
+ last_reminder_at?: string | null;
35846
36977
  notes?: string | null;
35847
36978
  overtime_hours?: number;
35848
36979
  overtime_type?: string | null;
35849
36980
  regular_hours?: number;
36981
+ reminder_count?: number;
36982
+ requires_review?: boolean;
36983
+ start_latitude?: number | null;
36984
+ start_longitude?: number | null;
35850
36985
  start_time?: string;
35851
36986
  travel_cost?: number | null;
35852
36987
  travel_distance_km?: number | null;
36988
+ travel_duration_min?: number | null;
36989
+ travel_time_minutes?: number | null;
35853
36990
  type?: string;
35854
36991
  updated_at?: string;
36992
+ work_order_id?: string | null;
35855
36993
  };
35856
36994
  Relationships: [{
35857
36995
  foreignKeyName: "time_logs_employee_id_fkey";
35858
36996
  columns: ["employee_id"];
35859
36997
  isOneToOne: false;
35860
- referencedRelation: "monteurs";
36998
+ referencedRelation: "profiles";
36999
+ referencedColumns: ["id"];
37000
+ }, {
37001
+ foreignKeyName: "time_logs_work_order_id_fkey";
37002
+ columns: ["work_order_id"];
37003
+ isOneToOne: false;
37004
+ referencedRelation: "work_orders";
35861
37005
  referencedColumns: ["id"];
35862
37006
  }];
35863
37007
  };
@@ -35896,7 +37040,7 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
35896
37040
  foreignKeyName: "time_off_entries_employee_id_fkey";
35897
37041
  columns: ["employee_id"];
35898
37042
  isOneToOne: false;
35899
- referencedRelation: "monteurs";
37043
+ referencedRelation: "profiles";
35900
37044
  referencedColumns: ["id"];
35901
37045
  }];
35902
37046
  };
@@ -36206,6 +37350,39 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
36206
37350
  };
36207
37351
  Relationships: [];
36208
37352
  };
37353
+ twinfield_cron_locks: {
37354
+ Row: {
37355
+ created_at: string;
37356
+ heartbeat_at: string;
37357
+ job_name: string;
37358
+ last_error: string | null;
37359
+ last_finished_at: string | null;
37360
+ locked_at: string;
37361
+ run_id: string;
37362
+ updated_at: string;
37363
+ };
37364
+ Insert: {
37365
+ created_at?: string;
37366
+ heartbeat_at?: string;
37367
+ job_name: string;
37368
+ last_error?: string | null;
37369
+ last_finished_at?: string | null;
37370
+ locked_at?: string;
37371
+ run_id?: string;
37372
+ updated_at?: string;
37373
+ };
37374
+ Update: {
37375
+ created_at?: string;
37376
+ heartbeat_at?: string;
37377
+ job_name?: string;
37378
+ last_error?: string | null;
37379
+ last_finished_at?: string | null;
37380
+ locked_at?: string;
37381
+ run_id?: string;
37382
+ updated_at?: string;
37383
+ };
37384
+ Relationships: [];
37385
+ };
36209
37386
  twinfield_customers: {
36210
37387
  Row: {
36211
37388
  address: string | null;
@@ -36806,6 +37983,7 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
36806
37983
  twinfield_push_queue: {
36807
37984
  Row: {
36808
37985
  action: string;
37986
+ attempt_started_at: string | null;
36809
37987
  attempts: number;
36810
37988
  connection_id: string | null;
36811
37989
  created_at: string;
@@ -36822,6 +38000,7 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
36822
38000
  };
36823
38001
  Insert: {
36824
38002
  action?: string;
38003
+ attempt_started_at?: string | null;
36825
38004
  attempts?: number;
36826
38005
  connection_id?: string | null;
36827
38006
  created_at?: string;
@@ -36838,6 +38017,7 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
36838
38017
  };
36839
38018
  Update: {
36840
38019
  action?: string;
38020
+ attempt_started_at?: string | null;
36841
38021
  attempts?: number;
36842
38022
  connection_id?: string | null;
36843
38023
  created_at?: string;
@@ -37035,13 +38215,7 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
37035
38215
  workday_end?: string | null;
37036
38216
  workday_start?: string | null;
37037
38217
  };
37038
- Relationships: [{
37039
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
37040
- columns: ["monteur_id"];
37041
- isOneToOne: true;
37042
- referencedRelation: "monteurs";
37043
- referencedColumns: ["id"];
37044
- }];
38218
+ Relationships: [];
37045
38219
  };
37046
38220
  uren_entries: {
37047
38221
  Row: {
@@ -37087,12 +38261,6 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
37087
38261
  werkbon_id?: string | null;
37088
38262
  };
37089
38263
  Relationships: [{
37090
- foreignKeyName: "uren_entries_monteur_id_fkey";
37091
- columns: ["monteur_id"];
37092
- isOneToOne: false;
37093
- referencedRelation: "monteurs";
37094
- referencedColumns: ["id"];
37095
- }, {
37096
38264
  foreignKeyName: "uren_entries_werkbon_id_fkey";
37097
38265
  columns: ["werkbon_id"];
37098
38266
  isOneToOne: false;
@@ -37560,17 +38728,12 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
37560
38728
  submitted_at?: string | null;
37561
38729
  updated_at?: string;
37562
38730
  };
37563
- Relationships: [{
37564
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
37565
- columns: ["monteur_id"];
37566
- isOneToOne: false;
37567
- referencedRelation: "monteurs";
37568
- referencedColumns: ["id"];
37569
- }];
38731
+ Relationships: [];
37570
38732
  };
37571
38733
  user_module_permissions: {
37572
38734
  Row: {
37573
38735
  created_at: string;
38736
+ feature_id: string;
37574
38737
  id: string;
37575
38738
  module_id: string;
37576
38739
  permission: string;
@@ -37579,6 +38742,7 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
37579
38742
  };
37580
38743
  Insert: {
37581
38744
  created_at?: string;
38745
+ feature_id?: string;
37582
38746
  id?: string;
37583
38747
  module_id: string;
37584
38748
  permission: string;
@@ -37587,6 +38751,7 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
37587
38751
  };
37588
38752
  Update: {
37589
38753
  created_at?: string;
38754
+ feature_id?: string;
37590
38755
  id?: string;
37591
38756
  module_id?: string;
37592
38757
  permission?: string;
@@ -37622,6 +38787,51 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
37622
38787
  referencedColumns: ["id"];
37623
38788
  }];
37624
38789
  };
38790
+ van_inventories: {
38791
+ Row: {
38792
+ barcode: string | null;
38793
+ created_at: string;
38794
+ id: string;
38795
+ monteur_id: string | null;
38796
+ price_per_unit: number;
38797
+ product_name: string;
38798
+ quantity_current: number;
38799
+ quantity_min: number;
38800
+ unit: string;
38801
+ updated_at: string;
38802
+ };
38803
+ Insert: {
38804
+ barcode?: string | null;
38805
+ created_at?: string;
38806
+ id?: string;
38807
+ monteur_id?: string | null;
38808
+ price_per_unit?: number;
38809
+ product_name: string;
38810
+ quantity_current?: number;
38811
+ quantity_min?: number;
38812
+ unit?: string;
38813
+ updated_at?: string;
38814
+ };
38815
+ Update: {
38816
+ barcode?: string | null;
38817
+ created_at?: string;
38818
+ id?: string;
38819
+ monteur_id?: string | null;
38820
+ price_per_unit?: number;
38821
+ product_name?: string;
38822
+ quantity_current?: number;
38823
+ quantity_min?: number;
38824
+ unit?: string;
38825
+ updated_at?: string;
38826
+ };
38827
+ Relationships: [{
38828
+ foreignKeyName: "van_inventories_monteur_id_fkey";
38829
+ columns: ["monteur_id"];
38830
+ isOneToOne: false;
38831
+ referencedRelation: "profiles";
38832
+ referencedColumns: ["id"];
38833
+ }];
38834
+ };
37625
38835
  voorraad_custom_fields: {
37626
38836
  Row: {
37627
38837
  created_at: string;
@@ -38572,7 +39782,7 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
38572
39782
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
38573
39783
  columns: ["monteur_id"];
38574
39784
  isOneToOne: false;
38575
- referencedRelation: "monteurs";
39785
+ referencedRelation: "profiles";
38576
39786
  referencedColumns: ["id"];
38577
39787
  }, {
38578
39788
  foreignKeyName: "work_order_monteurs_work_order_id_fkey";
@@ -38582,6 +39792,60 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
38582
39792
  referencedColumns: ["id"];
38583
39793
  }];
38584
39794
  };
39795
+ work_order_photos: {
39796
+ Row: {
39797
+ ai_caption: string | null;
39798
+ ai_categorized_at: string | null;
39799
+ ai_labels: import("../integrations/supabase/types").Json | null;
39800
+ caption: string | null;
39801
+ created_at: string;
39802
+ id: string;
39803
+ monteur_id: string | null;
39804
+ photo_type: string;
39805
+ storage_path: string;
39806
+ updated_at: string;
39807
+ work_order_id: string;
39808
+ };
39809
+ Insert: {
39810
+ ai_caption?: string | null;
39811
+ ai_categorized_at?: string | null;
39812
+ ai_labels?: import("../integrations/supabase/types").Json | null;
39813
+ caption?: string | null;
39814
+ created_at?: string;
39815
+ id?: string;
39816
+ monteur_id?: string | null;
39817
+ photo_type?: string;
39818
+ storage_path: string;
39819
+ updated_at?: string;
39820
+ work_order_id: string;
39821
+ };
39822
+ Update: {
39823
+ ai_caption?: string | null;
39824
+ ai_categorized_at?: string | null;
39825
+ ai_labels?: import("../integrations/supabase/types").Json | null;
39826
+ caption?: string | null;
39827
+ created_at?: string;
39828
+ id?: string;
39829
+ monteur_id?: string | null;
39830
+ photo_type?: string;
39831
+ storage_path?: string;
39832
+ updated_at?: string;
39833
+ work_order_id?: string;
39834
+ };
39835
+ Relationships: [{
39836
+ foreignKeyName: "work_order_photos_monteur_id_fkey";
39837
+ columns: ["monteur_id"];
39838
+ isOneToOne: false;
39839
+ referencedRelation: "profiles";
39840
+ referencedColumns: ["id"];
39841
+ }, {
39842
+ foreignKeyName: "work_order_photos_work_order_id_fkey";
39843
+ columns: ["work_order_id"];
39844
+ isOneToOne: false;
39845
+ referencedRelation: "work_orders";
39846
+ referencedColumns: ["id"];
39847
+ }];
39848
+ };
38585
39849
  work_orders: {
38586
39850
  Row: {
38587
39851
  assigned_to: string | null;
@@ -38613,7 +39877,6 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
38613
39877
  scheduled_end_time: string | null;
38614
39878
  scheduled_start_time: string | null;
38615
39879
  status: string;
38616
- tenant_id: string;
38617
39880
  total_hours_worked: number | null;
38618
39881
  total_price: number | null;
38619
39882
  travel_time_minutes: number | null;
@@ -38651,7 +39914,6 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
38651
39914
  scheduled_end_time?: string | null;
38652
39915
  scheduled_start_time?: string | null;
38653
39916
  status?: string;
38654
- tenant_id: string;
38655
39917
  total_hours_worked?: number | null;
38656
39918
  total_price?: number | null;
38657
39919
  travel_time_minutes?: number | null;
@@ -38689,7 +39951,6 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
38689
39951
  scheduled_end_time?: string | null;
38690
39952
  scheduled_start_time?: string | null;
38691
39953
  status?: string;
38692
- tenant_id?: string;
38693
39954
  total_hours_worked?: number | null;
38694
39955
  total_price?: number | null;
38695
39956
  travel_time_minutes?: number | null;
@@ -38703,12 +39964,6 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
38703
39964
  isOneToOne: false;
38704
39965
  referencedRelation: "work_orders";
38705
39966
  referencedColumns: ["id"];
38706
- }, {
38707
- foreignKeyName: "work_orders_tenant_id_fkey";
38708
- columns: ["tenant_id"];
38709
- isOneToOne: false;
38710
- referencedRelation: "tenants";
38711
- referencedColumns: ["id"];
38712
39967
  }];
38713
39968
  };
38714
39969
  };
@@ -39393,6 +40648,19 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
39393
40648
  };
39394
40649
  Returns: undefined;
39395
40650
  };
40651
+ approve_mailbox_order_proposal: {
40652
+ Args: {
40653
+ p_custom_fields: import("../integrations/supabase/types").Json;
40654
+ p_customer_id: string;
40655
+ p_delivery_date: string;
40656
+ p_field_values?: import("../integrations/supabase/types").Json;
40657
+ p_lines: import("../integrations/supabase/types").Json;
40658
+ p_notes: string;
40659
+ p_proposal_id: string;
40660
+ p_reviewed_by: string;
40661
+ };
40662
+ Returns: import("../integrations/supabase/types").Json;
40663
+ };
39396
40664
  assign_cart_numbers: {
39397
40665
  Args: {
39398
40666
  p_carts: import("../integrations/supabase/types").Json;
@@ -39444,6 +40712,10 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
39444
40712
  };
39445
40713
  Returns: number;
39446
40714
  };
40715
+ can_manage_hours: {
40716
+ Args: never;
40717
+ Returns: boolean;
40718
+ };
39447
40719
  check_offer_product_available_stock: {
39448
40720
  Args: {
39449
40721
  p_campaign_product_id: string;
@@ -39633,6 +40905,7 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
39633
40905
  };
39634
40906
  Returns: {
39635
40907
  action: string;
40908
+ attempt_started_at: string | null;
39636
40909
  attempts: number;
39637
40910
  connection_id: string | null;
39638
40911
  created_at: string;
@@ -39720,6 +40993,30 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
39720
40993
  agent_naam: string;
39721
40994
  }[];
39722
40995
  };
40996
+ consume_van_inventory: {
40997
+ Args: {
40998
+ p_inventory_id: string;
40999
+ p_quantity: number;
41000
+ };
41001
+ Returns: {
41002
+ barcode: string | null;
41003
+ created_at: string;
41004
+ id: string;
41005
+ monteur_id: string | null;
41006
+ price_per_unit: number;
41007
+ product_name: string;
41008
+ quantity_current: number;
41009
+ quantity_min: number;
41010
+ unit: string;
41011
+ updated_at: string;
41012
+ };
41013
+ SetofOptions: {
41014
+ from: "*";
41015
+ to: "van_inventories";
41016
+ isOneToOne: true;
41017
+ isSetofReturn: false;
41018
+ };
41019
+ };
39723
41020
  control_get_todays_carts: {
39724
41021
  Args: never;
39725
41022
  Returns: {
@@ -39793,6 +41090,13 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
39793
41090
  _user_id: string;
39794
41091
  };
39795
41092
  Returns: string;
41093
+ } | {
41094
+ Args: {
41095
+ _feature_id: string;
41096
+ _module_id: string;
41097
+ _user_id: string;
41098
+ };
41099
+ Returns: string;
39796
41100
  };
39797
41101
  email_auth_decrypt: {
39798
41102
  Args: {
@@ -40144,12 +41448,6 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
40144
41448
  Args: never;
40145
41449
  Returns: string;
40146
41450
  };
40147
- get_work_order_tenant_id: {
40148
- Args: {
40149
- wo_id: string;
40150
- };
40151
- Returns: string;
40152
- };
40153
41451
  has_module_permission: {
40154
41452
  Args: {
40155
41453
  _min: string;
@@ -40183,6 +41481,13 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
40183
41481
  };
40184
41482
  Returns: boolean;
40185
41483
  };
41484
+ is_time_log_week_locked: {
41485
+ Args: {
41486
+ p_employee_id: string;
41487
+ p_start_time: string;
41488
+ };
41489
+ Returns: boolean;
41490
+ };
40186
41491
  is_user_admin: {
40187
41492
  Args: never;
40188
41493
  Returns: boolean;
@@ -40197,13 +41502,14 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
40197
41502
  };
40198
41503
  Returns: boolean;
40199
41504
  };
40200
- list_monteurs: {
41505
+ list_medewerkers: {
40201
41506
  Args: never;
40202
41507
  Returns: {
40203
41508
  avatar_url: string;
40204
41509
  display_name: string;
40205
41510
  email: string;
40206
41511
  id: string;
41512
+ roles: string[];
40207
41513
  }[];
40208
41514
  };
40209
41515
  list_my_planning_items: {
@@ -40694,6 +42000,65 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
40694
42000
  };
40695
42001
  Returns: number;
40696
42002
  };
42003
+ logistics_plan_claim: {
42004
+ Args: {
42005
+ p_limit?: number;
42006
+ };
42007
+ Returns: {
42008
+ attempts: number;
42009
+ id: string;
42010
+ order_id: string;
42011
+ }[];
42012
+ };
42013
+ logistics_plan_enqueue: {
42014
+ Args: {
42015
+ p_order_id: string;
42016
+ p_reason?: string;
42017
+ };
42018
+ Returns: undefined;
42019
+ };
42020
+ logistics_plan_ensure_event: {
42021
+ Args: {
42022
+ p_order_id: string;
42023
+ };
42024
+ Returns: boolean;
42025
+ };
42026
+ logistics_plan_finish: {
42027
+ Args: {
42028
+ p_error?: string;
42029
+ p_id: string;
42030
+ };
42031
+ Returns: undefined;
42032
+ };
42033
+ logistics_plan_impact_orders: {
42034
+ Args: {
42035
+ p_order_id: string;
42036
+ };
42037
+ Returns: {
42038
+ buffer_id: string;
42039
+ order_id: string;
42040
+ plan_date: string;
42041
+ }[];
42042
+ };
42043
+ logistics_plan_kick: {
42044
+ Args: never;
42045
+ Returns: undefined;
42046
+ };
42047
+ logistics_plan_prune: {
42048
+ Args: never;
42049
+ Returns: number;
42050
+ };
42051
+ logistics_plan_release_stale: {
42052
+ Args: never;
42053
+ Returns: number;
42054
+ };
42055
+ logistics_plan_setting: {
42056
+ Args: {
42057
+ p_default: number;
42058
+ p_key: string;
42059
+ };
42060
+ Returns: number;
42061
+ };
40697
42062
  logistics_queue_capacity_email: {
40698
42063
  Args: {
40699
42064
  p_alert_id: string;
@@ -40935,6 +42300,7 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
40935
42300
  my_module_permissions: {
40936
42301
  Args: never;
40937
42302
  Returns: {
42303
+ feature_id: string;
40938
42304
  module_id: string;
40939
42305
  permission: string;
40940
42306
  }[];
@@ -41815,6 +43181,16 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
41815
43181
  };
41816
43182
  Returns: string[];
41817
43183
  };
43184
+ switch_time_log: {
43185
+ Args: {
43186
+ p_employee_id: string;
43187
+ p_start_lat?: number;
43188
+ p_start_lng?: number;
43189
+ p_type: string;
43190
+ p_work_order_id?: string;
43191
+ };
43192
+ Returns: import("../integrations/supabase/types").Json;
43193
+ };
41818
43194
  sync_all_layer_stocks: {
41819
43195
  Args: never;
41820
43196
  Returns: undefined;
@@ -41865,6 +43241,24 @@ export declare const resolveBufferForOrder: import("@tanstack/start-client-core"
41865
43241
  };
41866
43242
  Returns: boolean;
41867
43243
  };
43244
+ twinfield_cron_lock_acquire: {
43245
+ Args: {
43246
+ _job_name: string;
43247
+ _stale_seconds?: number;
43248
+ };
43249
+ Returns: boolean;
43250
+ };
43251
+ twinfield_cron_lock_release: {
43252
+ Args: {
43253
+ _error?: string;
43254
+ _job_name: string;
43255
+ };
43256
+ Returns: undefined;
43257
+ };
43258
+ twinfield_prune_push_queue: {
43259
+ Args: never;
43260
+ Returns: number;
43261
+ };
41868
43262
  twinfield_register_cron: {
41869
43263
  Args: {
41870
43264
  apikey?: string;
@@ -42805,6 +44199,126 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
42805
44199
  };
42806
44200
  Relationships: [];
42807
44201
  };
44202
+ cao_holidays: {
44203
+ Row: {
44204
+ created_at: string;
44205
+ description: string | null;
44206
+ holiday_date: string;
44207
+ id: string;
44208
+ updated_at: string;
44209
+ };
44210
+ Insert: {
44211
+ created_at?: string;
44212
+ description?: string | null;
44213
+ holiday_date: string;
44214
+ id?: string;
44215
+ updated_at?: string;
44216
+ };
44217
+ Update: {
44218
+ created_at?: string;
44219
+ description?: string | null;
44220
+ holiday_date?: string;
44221
+ id?: string;
44222
+ updated_at?: string;
44223
+ };
44224
+ Relationships: [];
44225
+ };
44226
+ cao_settings: {
44227
+ Row: {
44228
+ auto_break_after_hours: number;
44229
+ auto_break_minutes: number;
44230
+ auto_break_unpaid: boolean;
44231
+ auto_stop_after_hours: number;
44232
+ callout_fee: number;
44233
+ created_at: string;
44234
+ daily_regular_hours: number;
44235
+ default_hourly_rate: number;
44236
+ id: string;
44237
+ materials_markup_percent: number;
44238
+ max_daily_hours: number;
44239
+ max_weekly_hours: number;
44240
+ meal_allowance_amount: number;
44241
+ overtime_pct_178: number;
44242
+ overtime_pct_189: number;
44243
+ overtime_pct_212: number;
44244
+ reminder_after_hours: number;
44245
+ standby_evening_amount: number;
44246
+ standby_weekend_amount: number;
44247
+ travel_cost_per_km: number | null;
44248
+ travel_cost_threshold_km: number | null;
44249
+ travel_counts_as_work: boolean;
44250
+ travel_hourly_rate: number;
44251
+ travel_rate_per_hour: number;
44252
+ travel_threshold_minutes: number;
44253
+ updated_at: string;
44254
+ weekend_always_212: boolean;
44255
+ window_end: string;
44256
+ window_start: string;
44257
+ };
44258
+ Insert: {
44259
+ auto_break_after_hours?: number;
44260
+ auto_break_minutes?: number;
44261
+ auto_break_unpaid?: boolean;
44262
+ auto_stop_after_hours?: number;
44263
+ callout_fee?: number;
44264
+ created_at?: string;
44265
+ daily_regular_hours?: number;
44266
+ default_hourly_rate?: number;
44267
+ id?: string;
44268
+ materials_markup_percent?: number;
44269
+ max_daily_hours?: number;
44270
+ max_weekly_hours?: number;
44271
+ meal_allowance_amount?: number;
44272
+ overtime_pct_178?: number;
44273
+ overtime_pct_189?: number;
44274
+ overtime_pct_212?: number;
44275
+ reminder_after_hours?: number;
44276
+ standby_evening_amount?: number;
44277
+ standby_weekend_amount?: number;
44278
+ travel_cost_per_km?: number | null;
44279
+ travel_cost_threshold_km?: number | null;
44280
+ travel_counts_as_work?: boolean;
44281
+ travel_hourly_rate?: number;
44282
+ travel_rate_per_hour?: number;
44283
+ travel_threshold_minutes?: number;
44284
+ updated_at?: string;
44285
+ weekend_always_212?: boolean;
44286
+ window_end?: string;
44287
+ window_start?: string;
44288
+ };
44289
+ Update: {
44290
+ auto_break_after_hours?: number;
44291
+ auto_break_minutes?: number;
44292
+ auto_break_unpaid?: boolean;
44293
+ auto_stop_after_hours?: number;
44294
+ callout_fee?: number;
44295
+ created_at?: string;
44296
+ daily_regular_hours?: number;
44297
+ default_hourly_rate?: number;
44298
+ id?: string;
44299
+ materials_markup_percent?: number;
44300
+ max_daily_hours?: number;
44301
+ max_weekly_hours?: number;
44302
+ meal_allowance_amount?: number;
44303
+ overtime_pct_178?: number;
44304
+ overtime_pct_189?: number;
44305
+ overtime_pct_212?: number;
44306
+ reminder_after_hours?: number;
44307
+ standby_evening_amount?: number;
44308
+ standby_weekend_amount?: number;
44309
+ travel_cost_per_km?: number | null;
44310
+ travel_cost_threshold_km?: number | null;
44311
+ travel_counts_as_work?: boolean;
44312
+ travel_hourly_rate?: number;
44313
+ travel_rate_per_hour?: number;
44314
+ travel_threshold_minutes?: number;
44315
+ updated_at?: string;
44316
+ weekend_always_212?: boolean;
44317
+ window_end?: string;
44318
+ window_start?: string;
44319
+ };
44320
+ Relationships: [];
44321
+ };
42808
44322
  carrier_shipping_rates: {
42809
44323
  Row: {
42810
44324
  carrier_id: string;
@@ -49699,7 +51213,6 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
49699
51213
  start_date: string;
49700
51214
  start_time: string | null;
49701
51215
  status: string;
49702
- tenant_id: string;
49703
51216
  updated_at: string;
49704
51217
  user_id: string;
49705
51218
  };
@@ -49717,7 +51230,6 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
49717
51230
  start_date: string;
49718
51231
  start_time?: string | null;
49719
51232
  status?: string;
49720
- tenant_id?: string;
49721
51233
  updated_at?: string;
49722
51234
  user_id: string;
49723
51235
  };
@@ -49735,7 +51247,6 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
49735
51247
  start_date?: string;
49736
51248
  start_time?: string | null;
49737
51249
  status?: string;
49738
- tenant_id?: string;
49739
51250
  updated_at?: string;
49740
51251
  user_id?: string;
49741
51252
  };
@@ -49743,13 +51254,13 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
49743
51254
  foreignKeyName: "leave_requests_monteur_id_fkey";
49744
51255
  columns: ["monteur_id"];
49745
51256
  isOneToOne: false;
49746
- referencedRelation: "monteurs";
51257
+ referencedRelation: "profiles";
49747
51258
  referencedColumns: ["id"];
49748
51259
  }, {
49749
51260
  foreignKeyName: "leave_requests_user_id_fkey";
49750
51261
  columns: ["user_id"];
49751
51262
  isOneToOne: false;
49752
- referencedRelation: "monteurs";
51263
+ referencedRelation: "profiles";
49753
51264
  referencedColumns: ["id"];
49754
51265
  }];
49755
51266
  };
@@ -50617,6 +52128,45 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
50617
52128
  };
50618
52129
  Relationships: [];
50619
52130
  };
52131
+ logistics_plan_queue: {
52132
+ Row: {
52133
+ attempts: number;
52134
+ claimed_at: string | null;
52135
+ enqueued_at: string;
52136
+ error: string | null;
52137
+ id: string;
52138
+ next_attempt_at: string;
52139
+ order_id: string;
52140
+ reason: string;
52141
+ status: string;
52142
+ updated_at: string;
52143
+ };
52144
+ Insert: {
52145
+ attempts?: number;
52146
+ claimed_at?: string | null;
52147
+ enqueued_at?: string;
52148
+ error?: string | null;
52149
+ id?: string;
52150
+ next_attempt_at?: string;
52151
+ order_id: string;
52152
+ reason?: string;
52153
+ status?: string;
52154
+ updated_at?: string;
52155
+ };
52156
+ Update: {
52157
+ attempts?: number;
52158
+ claimed_at?: string | null;
52159
+ enqueued_at?: string;
52160
+ error?: string | null;
52161
+ id?: string;
52162
+ next_attempt_at?: string;
52163
+ order_id?: string;
52164
+ reason?: string;
52165
+ status?: string;
52166
+ updated_at?: string;
52167
+ };
52168
+ Relationships: [];
52169
+ };
50620
52170
  logistics_plan_runs: {
50621
52171
  Row: {
50622
52172
  created_at: string;
@@ -50692,6 +52242,24 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
50692
52242
  referencedColumns: ["id"];
50693
52243
  }];
50694
52244
  };
52245
+ logistics_plan_settings: {
52246
+ Row: {
52247
+ key: string;
52248
+ updated_at: string;
52249
+ value: string;
52250
+ };
52251
+ Insert: {
52252
+ key: string;
52253
+ updated_at?: string;
52254
+ value: string;
52255
+ };
52256
+ Update: {
52257
+ key?: string;
52258
+ updated_at?: string;
52259
+ value?: string;
52260
+ };
52261
+ Relationships: [];
52262
+ };
50695
52263
  logistics_rebuffer_state: {
50696
52264
  Row: {
50697
52265
  created_at: string;
@@ -51847,6 +53415,90 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
51847
53415
  };
51848
53416
  Relationships: [];
51849
53417
  };
53418
+ material_usage: {
53419
+ Row: {
53420
+ created_at: string;
53421
+ id: string;
53422
+ material_name: string;
53423
+ monteur_id: string | null;
53424
+ price_at_time: number;
53425
+ quantity_used: number;
53426
+ updated_at: string;
53427
+ van_inventory_id: string | null;
53428
+ work_order_id: string;
53429
+ };
53430
+ Insert: {
53431
+ created_at?: string;
53432
+ id?: string;
53433
+ material_name: string;
53434
+ monteur_id?: string | null;
53435
+ price_at_time?: number;
53436
+ quantity_used?: number;
53437
+ updated_at?: string;
53438
+ van_inventory_id?: string | null;
53439
+ work_order_id: string;
53440
+ };
53441
+ Update: {
53442
+ created_at?: string;
53443
+ id?: string;
53444
+ material_name?: string;
53445
+ monteur_id?: string | null;
53446
+ price_at_time?: number;
53447
+ quantity_used?: number;
53448
+ updated_at?: string;
53449
+ van_inventory_id?: string | null;
53450
+ work_order_id?: string;
53451
+ };
53452
+ Relationships: [{
53453
+ foreignKeyName: "material_usage_monteur_id_fkey";
53454
+ columns: ["monteur_id"];
53455
+ isOneToOne: false;
53456
+ referencedRelation: "profiles";
53457
+ referencedColumns: ["id"];
53458
+ }, {
53459
+ foreignKeyName: "material_usage_van_inventory_id_fkey";
53460
+ columns: ["van_inventory_id"];
53461
+ isOneToOne: false;
53462
+ referencedRelation: "van_inventories";
53463
+ referencedColumns: ["id"];
53464
+ }, {
53465
+ foreignKeyName: "material_usage_work_order_id_fkey";
53466
+ columns: ["work_order_id"];
53467
+ isOneToOne: false;
53468
+ referencedRelation: "work_orders";
53469
+ referencedColumns: ["id"];
53470
+ }];
53471
+ };
53472
+ module_features: {
53473
+ Row: {
53474
+ created_at: string;
53475
+ feature_id: string;
53476
+ id: string;
53477
+ is_active: boolean;
53478
+ last_seen_at: string;
53479
+ module_id: string;
53480
+ name: string;
53481
+ };
53482
+ Insert: {
53483
+ created_at?: string;
53484
+ feature_id: string;
53485
+ id?: string;
53486
+ is_active?: boolean;
53487
+ last_seen_at?: string;
53488
+ module_id: string;
53489
+ name: string;
53490
+ };
53491
+ Update: {
53492
+ created_at?: string;
53493
+ feature_id?: string;
53494
+ id?: string;
53495
+ is_active?: boolean;
53496
+ last_seen_at?: string;
53497
+ module_id?: string;
53498
+ name?: string;
53499
+ };
53500
+ Relationships: [];
53501
+ };
51850
53502
  module_permissions: {
51851
53503
  Row: {
51852
53504
  created_at: string;
@@ -51877,6 +53529,7 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
51877
53529
  module_registry: {
51878
53530
  Row: {
51879
53531
  created_at: string;
53532
+ enforce: boolean;
51880
53533
  is_active: boolean;
51881
53534
  last_seen_at: string;
51882
53535
  module_id: string;
@@ -51886,6 +53539,7 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
51886
53539
  };
51887
53540
  Insert: {
51888
53541
  created_at?: string;
53542
+ enforce?: boolean;
51889
53543
  is_active?: boolean;
51890
53544
  last_seen_at?: string;
51891
53545
  module_id: string;
@@ -51895,6 +53549,7 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
51895
53549
  };
51896
53550
  Update: {
51897
53551
  created_at?: string;
53552
+ enforce?: boolean;
51898
53553
  is_active?: boolean;
51899
53554
  last_seen_at?: string;
51900
53555
  module_id?: string;
@@ -51955,63 +53610,6 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
51955
53610
  };
51956
53611
  Relationships: [];
51957
53612
  };
51958
- monteurs: {
51959
- Row: {
51960
- avatar_url: string | null;
51961
- color: string | null;
51962
- created_at: string;
51963
- email: string | null;
51964
- id: string;
51965
- is_active: boolean;
51966
- leave_balance_hours: number;
51967
- name: string;
51968
- persnr: number | null;
51969
- phone: string | null;
51970
- role: string;
51971
- tenant_id: string;
51972
- updated_at: string;
51973
- user_id: string | null;
51974
- };
51975
- Insert: {
51976
- avatar_url?: string | null;
51977
- color?: string | null;
51978
- created_at?: string;
51979
- email?: string | null;
51980
- id?: string;
51981
- is_active?: boolean;
51982
- leave_balance_hours?: number;
51983
- name: string;
51984
- persnr?: number | null;
51985
- phone?: string | null;
51986
- role?: string;
51987
- tenant_id: string;
51988
- updated_at?: string;
51989
- user_id?: string | null;
51990
- };
51991
- Update: {
51992
- avatar_url?: string | null;
51993
- color?: string | null;
51994
- created_at?: string;
51995
- email?: string | null;
51996
- id?: string;
51997
- is_active?: boolean;
51998
- leave_balance_hours?: number;
51999
- name?: string;
52000
- persnr?: number | null;
52001
- phone?: string | null;
52002
- role?: string;
52003
- tenant_id?: string;
52004
- updated_at?: string;
52005
- user_id?: string | null;
52006
- };
52007
- Relationships: [{
52008
- foreignKeyName: "monteurs_tenant_id_fkey";
52009
- columns: ["tenant_id"];
52010
- isOneToOne: false;
52011
- referencedRelation: "tenants";
52012
- referencedColumns: ["id"];
52013
- }];
52014
- };
52015
53613
  nmbrs_component_mapping: {
52016
53614
  Row: {
52017
53615
  created_at: string;
@@ -52082,13 +53680,7 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
52082
53680
  nmbrs_employee_number?: string;
52083
53681
  updated_at?: string;
52084
53682
  };
52085
- Relationships: [{
52086
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
52087
- columns: ["monteur_id"];
52088
- isOneToOne: true;
52089
- referencedRelation: "monteurs";
52090
- referencedColumns: ["id"];
52091
- }];
53683
+ Relationships: [];
52092
53684
  };
52093
53685
  nmbrs_export_lines: {
52094
53686
  Row: {
@@ -52137,12 +53729,6 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
52137
53729
  wage_code?: string;
52138
53730
  };
52139
53731
  Relationships: [{
52140
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
52141
- columns: ["monteur_id"];
52142
- isOneToOne: false;
52143
- referencedRelation: "monteurs";
52144
- referencedColumns: ["id"];
52145
- }, {
52146
53732
  foreignKeyName: "nmbrs_export_lines_run_id_fkey";
52147
53733
  columns: ["run_id"];
52148
53734
  isOneToOne: false;
@@ -52970,6 +54556,7 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
52970
54556
  error_message: string | null;
52971
54557
  id: string;
52972
54558
  invoice_number: string | null;
54559
+ next_attempt_at: string;
52973
54560
  order_id: string;
52974
54561
  processed_at: string | null;
52975
54562
  status: string;
@@ -52981,6 +54568,7 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
52981
54568
  error_message?: string | null;
52982
54569
  id?: string;
52983
54570
  invoice_number?: string | null;
54571
+ next_attempt_at?: string;
52984
54572
  order_id: string;
52985
54573
  processed_at?: string | null;
52986
54574
  status?: string;
@@ -52992,6 +54580,7 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
52992
54580
  error_message?: string | null;
52993
54581
  id?: string;
52994
54582
  invoice_number?: string | null;
54583
+ next_attempt_at?: string;
52995
54584
  order_id?: string;
52996
54585
  processed_at?: string | null;
52997
54586
  status?: string;
@@ -54530,6 +56119,9 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
54530
56119
  created_at: string;
54531
56120
  id: string;
54532
56121
  laatst_gezien: string;
56122
+ laatste_fout: string | null;
56123
+ laatste_request_id: number | null;
56124
+ mislukte_posts: number;
54533
56125
  tick_sleutel: string;
54534
56126
  updated_at: string;
54535
56127
  };
@@ -54539,6 +56131,9 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
54539
56131
  created_at?: string;
54540
56132
  id?: string;
54541
56133
  laatst_gezien?: string;
56134
+ laatste_fout?: string | null;
56135
+ laatste_request_id?: number | null;
56136
+ mislukte_posts?: number;
54542
56137
  tick_sleutel?: string;
54543
56138
  updated_at?: string;
54544
56139
  };
@@ -54548,6 +56143,9 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
54548
56143
  created_at?: string;
54549
56144
  id?: string;
54550
56145
  laatst_gezien?: string;
56146
+ laatste_fout?: string | null;
56147
+ laatste_request_id?: number | null;
56148
+ mislukte_posts?: number;
54551
56149
  tick_sleutel?: string;
54552
56150
  updated_at?: string;
54553
56151
  };
@@ -56056,6 +57654,96 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
56056
57654
  referencedColumns: ["id"];
56057
57655
  }];
56058
57656
  };
57657
+ role_assignments: {
57658
+ Row: {
57659
+ created_at: string;
57660
+ id: string;
57661
+ role_id: string;
57662
+ user_id: string;
57663
+ };
57664
+ Insert: {
57665
+ created_at?: string;
57666
+ id?: string;
57667
+ role_id: string;
57668
+ user_id: string;
57669
+ };
57670
+ Update: {
57671
+ created_at?: string;
57672
+ id?: string;
57673
+ role_id?: string;
57674
+ user_id?: string;
57675
+ };
57676
+ Relationships: [{
57677
+ foreignKeyName: "role_assignments_role_id_fkey";
57678
+ columns: ["role_id"];
57679
+ isOneToOne: false;
57680
+ referencedRelation: "roles";
57681
+ referencedColumns: ["id"];
57682
+ }];
57683
+ };
57684
+ role_permissions: {
57685
+ Row: {
57686
+ can_edit: boolean;
57687
+ can_view: boolean;
57688
+ feature_id: string;
57689
+ id: string;
57690
+ module_id: string;
57691
+ role_id: string;
57692
+ updated_at: string;
57693
+ };
57694
+ Insert: {
57695
+ can_edit?: boolean;
57696
+ can_view?: boolean;
57697
+ feature_id?: string;
57698
+ id?: string;
57699
+ module_id: string;
57700
+ role_id: string;
57701
+ updated_at?: string;
57702
+ };
57703
+ Update: {
57704
+ can_edit?: boolean;
57705
+ can_view?: boolean;
57706
+ feature_id?: string;
57707
+ id?: string;
57708
+ module_id?: string;
57709
+ role_id?: string;
57710
+ updated_at?: string;
57711
+ };
57712
+ Relationships: [{
57713
+ foreignKeyName: "role_permissions_role_id_fkey";
57714
+ columns: ["role_id"];
57715
+ isOneToOne: false;
57716
+ referencedRelation: "roles";
57717
+ referencedColumns: ["id"];
57718
+ }];
57719
+ };
57720
+ roles: {
57721
+ Row: {
57722
+ created_at: string;
57723
+ id: string;
57724
+ is_protected: boolean;
57725
+ key: string;
57726
+ name: string;
57727
+ updated_at: string;
57728
+ };
57729
+ Insert: {
57730
+ created_at?: string;
57731
+ id?: string;
57732
+ is_protected?: boolean;
57733
+ key: string;
57734
+ name: string;
57735
+ updated_at?: string;
57736
+ };
57737
+ Update: {
57738
+ created_at?: string;
57739
+ id?: string;
57740
+ is_protected?: boolean;
57741
+ key?: string;
57742
+ name?: string;
57743
+ updated_at?: string;
57744
+ };
57745
+ Relationships: [];
57746
+ };
56059
57747
  rooms: {
56060
57748
  Row: {
56061
57749
  capacity: number;
@@ -56725,6 +58413,54 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
56725
58413
  };
56726
58414
  Relationships: [];
56727
58415
  };
58416
+ time_compensation_entries: {
58417
+ Row: {
58418
+ created_at: string;
58419
+ employee_id: string;
58420
+ entry_date: string;
58421
+ id: string;
58422
+ km: number;
58423
+ meal_allowance: number;
58424
+ notes: string | null;
58425
+ standby_evening: number;
58426
+ standby_weekend: number;
58427
+ tvt_change: number;
58428
+ updated_at: string;
58429
+ };
58430
+ Insert: {
58431
+ created_at?: string;
58432
+ employee_id: string;
58433
+ entry_date: string;
58434
+ id?: string;
58435
+ km?: number;
58436
+ meal_allowance?: number;
58437
+ notes?: string | null;
58438
+ standby_evening?: number;
58439
+ standby_weekend?: number;
58440
+ tvt_change?: number;
58441
+ updated_at?: string;
58442
+ };
58443
+ Update: {
58444
+ created_at?: string;
58445
+ employee_id?: string;
58446
+ entry_date?: string;
58447
+ id?: string;
58448
+ km?: number;
58449
+ meal_allowance?: number;
58450
+ notes?: string | null;
58451
+ standby_evening?: number;
58452
+ standby_weekend?: number;
58453
+ tvt_change?: number;
58454
+ updated_at?: string;
58455
+ };
58456
+ Relationships: [{
58457
+ foreignKeyName: "time_compensation_entries_employee_id_fkey";
58458
+ columns: ["employee_id"];
58459
+ isOneToOne: false;
58460
+ referencedRelation: "profiles";
58461
+ referencedColumns: ["id"];
58462
+ }];
58463
+ };
56728
58464
  time_entries: {
56729
58465
  Row: {
56730
58466
  created_at: string;
@@ -56759,65 +58495,170 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
56759
58495
  undertime?: number;
56760
58496
  updated_at?: string;
56761
58497
  };
58498
+ Relationships: [];
58499
+ };
58500
+ time_log_week_approvals: {
58501
+ Row: {
58502
+ approved_at: string | null;
58503
+ approved_by: string | null;
58504
+ created_at: string;
58505
+ employee_id: string;
58506
+ id: string;
58507
+ locked: boolean;
58508
+ notes: string | null;
58509
+ status: string;
58510
+ submitted_at: string | null;
58511
+ updated_at: string;
58512
+ week_start: string;
58513
+ };
58514
+ Insert: {
58515
+ approved_at?: string | null;
58516
+ approved_by?: string | null;
58517
+ created_at?: string;
58518
+ employee_id: string;
58519
+ id?: string;
58520
+ locked?: boolean;
58521
+ notes?: string | null;
58522
+ status?: string;
58523
+ submitted_at?: string | null;
58524
+ updated_at?: string;
58525
+ week_start: string;
58526
+ };
58527
+ Update: {
58528
+ approved_at?: string | null;
58529
+ approved_by?: string | null;
58530
+ created_at?: string;
58531
+ employee_id?: string;
58532
+ id?: string;
58533
+ locked?: boolean;
58534
+ notes?: string | null;
58535
+ status?: string;
58536
+ submitted_at?: string | null;
58537
+ updated_at?: string;
58538
+ week_start?: string;
58539
+ };
56762
58540
  Relationships: [{
56763
- foreignKeyName: "time_entries_employee_id_fkey";
58541
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
56764
58542
  columns: ["employee_id"];
56765
58543
  isOneToOne: false;
56766
- referencedRelation: "monteurs";
58544
+ referencedRelation: "profiles";
56767
58545
  referencedColumns: ["id"];
56768
58546
  }];
56769
58547
  };
56770
58548
  time_logs: {
56771
58549
  Row: {
58550
+ auto_stop_reason: string | null;
58551
+ auto_stopped: boolean;
56772
58552
  created_at: string;
58553
+ current_latitude: number | null;
58554
+ current_longitude: number | null;
58555
+ current_position_updated_at: string | null;
56773
58556
  employee_id: string;
58557
+ end_latitude: number | null;
58558
+ end_longitude: number | null;
56774
58559
  end_time: string | null;
58560
+ eta_distance_km: number | null;
58561
+ eta_minutes: number | null;
58562
+ eta_updated_at: string | null;
58563
+ hour_category: string | null;
56775
58564
  id: string;
58565
+ last_reminder_at: string | null;
56776
58566
  notes: string | null;
56777
58567
  overtime_hours: number;
56778
58568
  overtime_type: string | null;
56779
58569
  regular_hours: number;
58570
+ reminder_count: number;
58571
+ requires_review: boolean;
58572
+ start_latitude: number | null;
58573
+ start_longitude: number | null;
56780
58574
  start_time: string;
56781
58575
  travel_cost: number | null;
56782
58576
  travel_distance_km: number | null;
58577
+ travel_duration_min: number | null;
58578
+ travel_time_minutes: number | null;
56783
58579
  type: string;
56784
58580
  updated_at: string;
58581
+ work_order_id: string | null;
56785
58582
  };
56786
58583
  Insert: {
58584
+ auto_stop_reason?: string | null;
58585
+ auto_stopped?: boolean;
56787
58586
  created_at?: string;
58587
+ current_latitude?: number | null;
58588
+ current_longitude?: number | null;
58589
+ current_position_updated_at?: string | null;
56788
58590
  employee_id: string;
58591
+ end_latitude?: number | null;
58592
+ end_longitude?: number | null;
56789
58593
  end_time?: string | null;
58594
+ eta_distance_km?: number | null;
58595
+ eta_minutes?: number | null;
58596
+ eta_updated_at?: string | null;
58597
+ hour_category?: string | null;
56790
58598
  id?: string;
58599
+ last_reminder_at?: string | null;
56791
58600
  notes?: string | null;
56792
58601
  overtime_hours?: number;
56793
58602
  overtime_type?: string | null;
56794
58603
  regular_hours?: number;
58604
+ reminder_count?: number;
58605
+ requires_review?: boolean;
58606
+ start_latitude?: number | null;
58607
+ start_longitude?: number | null;
56795
58608
  start_time?: string;
56796
58609
  travel_cost?: number | null;
56797
58610
  travel_distance_km?: number | null;
58611
+ travel_duration_min?: number | null;
58612
+ travel_time_minutes?: number | null;
56798
58613
  type: string;
56799
58614
  updated_at?: string;
58615
+ work_order_id?: string | null;
56800
58616
  };
56801
58617
  Update: {
58618
+ auto_stop_reason?: string | null;
58619
+ auto_stopped?: boolean;
56802
58620
  created_at?: string;
58621
+ current_latitude?: number | null;
58622
+ current_longitude?: number | null;
58623
+ current_position_updated_at?: string | null;
56803
58624
  employee_id?: string;
58625
+ end_latitude?: number | null;
58626
+ end_longitude?: number | null;
56804
58627
  end_time?: string | null;
58628
+ eta_distance_km?: number | null;
58629
+ eta_minutes?: number | null;
58630
+ eta_updated_at?: string | null;
58631
+ hour_category?: string | null;
56805
58632
  id?: string;
58633
+ last_reminder_at?: string | null;
56806
58634
  notes?: string | null;
56807
58635
  overtime_hours?: number;
56808
58636
  overtime_type?: string | null;
56809
58637
  regular_hours?: number;
58638
+ reminder_count?: number;
58639
+ requires_review?: boolean;
58640
+ start_latitude?: number | null;
58641
+ start_longitude?: number | null;
56810
58642
  start_time?: string;
56811
58643
  travel_cost?: number | null;
56812
58644
  travel_distance_km?: number | null;
58645
+ travel_duration_min?: number | null;
58646
+ travel_time_minutes?: number | null;
56813
58647
  type?: string;
56814
58648
  updated_at?: string;
58649
+ work_order_id?: string | null;
56815
58650
  };
56816
58651
  Relationships: [{
56817
58652
  foreignKeyName: "time_logs_employee_id_fkey";
56818
58653
  columns: ["employee_id"];
56819
58654
  isOneToOne: false;
56820
- referencedRelation: "monteurs";
58655
+ referencedRelation: "profiles";
58656
+ referencedColumns: ["id"];
58657
+ }, {
58658
+ foreignKeyName: "time_logs_work_order_id_fkey";
58659
+ columns: ["work_order_id"];
58660
+ isOneToOne: false;
58661
+ referencedRelation: "work_orders";
56821
58662
  referencedColumns: ["id"];
56822
58663
  }];
56823
58664
  };
@@ -56856,7 +58697,7 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
56856
58697
  foreignKeyName: "time_off_entries_employee_id_fkey";
56857
58698
  columns: ["employee_id"];
56858
58699
  isOneToOne: false;
56859
- referencedRelation: "monteurs";
58700
+ referencedRelation: "profiles";
56860
58701
  referencedColumns: ["id"];
56861
58702
  }];
56862
58703
  };
@@ -57166,6 +59007,39 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
57166
59007
  };
57167
59008
  Relationships: [];
57168
59009
  };
59010
+ twinfield_cron_locks: {
59011
+ Row: {
59012
+ created_at: string;
59013
+ heartbeat_at: string;
59014
+ job_name: string;
59015
+ last_error: string | null;
59016
+ last_finished_at: string | null;
59017
+ locked_at: string;
59018
+ run_id: string;
59019
+ updated_at: string;
59020
+ };
59021
+ Insert: {
59022
+ created_at?: string;
59023
+ heartbeat_at?: string;
59024
+ job_name: string;
59025
+ last_error?: string | null;
59026
+ last_finished_at?: string | null;
59027
+ locked_at?: string;
59028
+ run_id?: string;
59029
+ updated_at?: string;
59030
+ };
59031
+ Update: {
59032
+ created_at?: string;
59033
+ heartbeat_at?: string;
59034
+ job_name?: string;
59035
+ last_error?: string | null;
59036
+ last_finished_at?: string | null;
59037
+ locked_at?: string;
59038
+ run_id?: string;
59039
+ updated_at?: string;
59040
+ };
59041
+ Relationships: [];
59042
+ };
57169
59043
  twinfield_customers: {
57170
59044
  Row: {
57171
59045
  address: string | null;
@@ -57766,6 +59640,7 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
57766
59640
  twinfield_push_queue: {
57767
59641
  Row: {
57768
59642
  action: string;
59643
+ attempt_started_at: string | null;
57769
59644
  attempts: number;
57770
59645
  connection_id: string | null;
57771
59646
  created_at: string;
@@ -57782,6 +59657,7 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
57782
59657
  };
57783
59658
  Insert: {
57784
59659
  action?: string;
59660
+ attempt_started_at?: string | null;
57785
59661
  attempts?: number;
57786
59662
  connection_id?: string | null;
57787
59663
  created_at?: string;
@@ -57798,6 +59674,7 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
57798
59674
  };
57799
59675
  Update: {
57800
59676
  action?: string;
59677
+ attempt_started_at?: string | null;
57801
59678
  attempts?: number;
57802
59679
  connection_id?: string | null;
57803
59680
  created_at?: string;
@@ -57995,13 +59872,7 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
57995
59872
  workday_end?: string | null;
57996
59873
  workday_start?: string | null;
57997
59874
  };
57998
- Relationships: [{
57999
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
58000
- columns: ["monteur_id"];
58001
- isOneToOne: true;
58002
- referencedRelation: "monteurs";
58003
- referencedColumns: ["id"];
58004
- }];
59875
+ Relationships: [];
58005
59876
  };
58006
59877
  uren_entries: {
58007
59878
  Row: {
@@ -58047,12 +59918,6 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
58047
59918
  werkbon_id?: string | null;
58048
59919
  };
58049
59920
  Relationships: [{
58050
- foreignKeyName: "uren_entries_monteur_id_fkey";
58051
- columns: ["monteur_id"];
58052
- isOneToOne: false;
58053
- referencedRelation: "monteurs";
58054
- referencedColumns: ["id"];
58055
- }, {
58056
59921
  foreignKeyName: "uren_entries_werkbon_id_fkey";
58057
59922
  columns: ["werkbon_id"];
58058
59923
  isOneToOne: false;
@@ -58520,17 +60385,12 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
58520
60385
  submitted_at?: string | null;
58521
60386
  updated_at?: string;
58522
60387
  };
58523
- Relationships: [{
58524
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
58525
- columns: ["monteur_id"];
58526
- isOneToOne: false;
58527
- referencedRelation: "monteurs";
58528
- referencedColumns: ["id"];
58529
- }];
60388
+ Relationships: [];
58530
60389
  };
58531
60390
  user_module_permissions: {
58532
60391
  Row: {
58533
60392
  created_at: string;
60393
+ feature_id: string;
58534
60394
  id: string;
58535
60395
  module_id: string;
58536
60396
  permission: string;
@@ -58539,6 +60399,7 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
58539
60399
  };
58540
60400
  Insert: {
58541
60401
  created_at?: string;
60402
+ feature_id?: string;
58542
60403
  id?: string;
58543
60404
  module_id: string;
58544
60405
  permission: string;
@@ -58547,6 +60408,7 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
58547
60408
  };
58548
60409
  Update: {
58549
60410
  created_at?: string;
60411
+ feature_id?: string;
58550
60412
  id?: string;
58551
60413
  module_id?: string;
58552
60414
  permission?: string;
@@ -58582,6 +60444,51 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
58582
60444
  referencedColumns: ["id"];
58583
60445
  }];
58584
60446
  };
60447
+ van_inventories: {
60448
+ Row: {
60449
+ barcode: string | null;
60450
+ created_at: string;
60451
+ id: string;
60452
+ monteur_id: string | null;
60453
+ price_per_unit: number;
60454
+ product_name: string;
60455
+ quantity_current: number;
60456
+ quantity_min: number;
60457
+ unit: string;
60458
+ updated_at: string;
60459
+ };
60460
+ Insert: {
60461
+ barcode?: string | null;
60462
+ created_at?: string;
60463
+ id?: string;
60464
+ monteur_id?: string | null;
60465
+ price_per_unit?: number;
60466
+ product_name: string;
60467
+ quantity_current?: number;
60468
+ quantity_min?: number;
60469
+ unit?: string;
60470
+ updated_at?: string;
60471
+ };
60472
+ Update: {
60473
+ barcode?: string | null;
60474
+ created_at?: string;
60475
+ id?: string;
60476
+ monteur_id?: string | null;
60477
+ price_per_unit?: number;
60478
+ product_name?: string;
60479
+ quantity_current?: number;
60480
+ quantity_min?: number;
60481
+ unit?: string;
60482
+ updated_at?: string;
60483
+ };
60484
+ Relationships: [{
60485
+ foreignKeyName: "van_inventories_monteur_id_fkey";
60486
+ columns: ["monteur_id"];
60487
+ isOneToOne: false;
60488
+ referencedRelation: "profiles";
60489
+ referencedColumns: ["id"];
60490
+ }];
60491
+ };
58585
60492
  voorraad_custom_fields: {
58586
60493
  Row: {
58587
60494
  created_at: string;
@@ -59532,7 +61439,7 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
59532
61439
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
59533
61440
  columns: ["monteur_id"];
59534
61441
  isOneToOne: false;
59535
- referencedRelation: "monteurs";
61442
+ referencedRelation: "profiles";
59536
61443
  referencedColumns: ["id"];
59537
61444
  }, {
59538
61445
  foreignKeyName: "work_order_monteurs_work_order_id_fkey";
@@ -59542,6 +61449,60 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
59542
61449
  referencedColumns: ["id"];
59543
61450
  }];
59544
61451
  };
61452
+ work_order_photos: {
61453
+ Row: {
61454
+ ai_caption: string | null;
61455
+ ai_categorized_at: string | null;
61456
+ ai_labels: import("../integrations/supabase/types").Json | null;
61457
+ caption: string | null;
61458
+ created_at: string;
61459
+ id: string;
61460
+ monteur_id: string | null;
61461
+ photo_type: string;
61462
+ storage_path: string;
61463
+ updated_at: string;
61464
+ work_order_id: string;
61465
+ };
61466
+ Insert: {
61467
+ ai_caption?: string | null;
61468
+ ai_categorized_at?: string | null;
61469
+ ai_labels?: import("../integrations/supabase/types").Json | null;
61470
+ caption?: string | null;
61471
+ created_at?: string;
61472
+ id?: string;
61473
+ monteur_id?: string | null;
61474
+ photo_type?: string;
61475
+ storage_path: string;
61476
+ updated_at?: string;
61477
+ work_order_id: string;
61478
+ };
61479
+ Update: {
61480
+ ai_caption?: string | null;
61481
+ ai_categorized_at?: string | null;
61482
+ ai_labels?: import("../integrations/supabase/types").Json | null;
61483
+ caption?: string | null;
61484
+ created_at?: string;
61485
+ id?: string;
61486
+ monteur_id?: string | null;
61487
+ photo_type?: string;
61488
+ storage_path?: string;
61489
+ updated_at?: string;
61490
+ work_order_id?: string;
61491
+ };
61492
+ Relationships: [{
61493
+ foreignKeyName: "work_order_photos_monteur_id_fkey";
61494
+ columns: ["monteur_id"];
61495
+ isOneToOne: false;
61496
+ referencedRelation: "profiles";
61497
+ referencedColumns: ["id"];
61498
+ }, {
61499
+ foreignKeyName: "work_order_photos_work_order_id_fkey";
61500
+ columns: ["work_order_id"];
61501
+ isOneToOne: false;
61502
+ referencedRelation: "work_orders";
61503
+ referencedColumns: ["id"];
61504
+ }];
61505
+ };
59545
61506
  work_orders: {
59546
61507
  Row: {
59547
61508
  assigned_to: string | null;
@@ -59573,7 +61534,6 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
59573
61534
  scheduled_end_time: string | null;
59574
61535
  scheduled_start_time: string | null;
59575
61536
  status: string;
59576
- tenant_id: string;
59577
61537
  total_hours_worked: number | null;
59578
61538
  total_price: number | null;
59579
61539
  travel_time_minutes: number | null;
@@ -59611,7 +61571,6 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
59611
61571
  scheduled_end_time?: string | null;
59612
61572
  scheduled_start_time?: string | null;
59613
61573
  status?: string;
59614
- tenant_id: string;
59615
61574
  total_hours_worked?: number | null;
59616
61575
  total_price?: number | null;
59617
61576
  travel_time_minutes?: number | null;
@@ -59649,7 +61608,6 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
59649
61608
  scheduled_end_time?: string | null;
59650
61609
  scheduled_start_time?: string | null;
59651
61610
  status?: string;
59652
- tenant_id?: string;
59653
61611
  total_hours_worked?: number | null;
59654
61612
  total_price?: number | null;
59655
61613
  travel_time_minutes?: number | null;
@@ -59663,12 +61621,6 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
59663
61621
  isOneToOne: false;
59664
61622
  referencedRelation: "work_orders";
59665
61623
  referencedColumns: ["id"];
59666
- }, {
59667
- foreignKeyName: "work_orders_tenant_id_fkey";
59668
- columns: ["tenant_id"];
59669
- isOneToOne: false;
59670
- referencedRelation: "tenants";
59671
- referencedColumns: ["id"];
59672
61624
  }];
59673
61625
  };
59674
61626
  };
@@ -60353,6 +62305,19 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
60353
62305
  };
60354
62306
  Returns: undefined;
60355
62307
  };
62308
+ approve_mailbox_order_proposal: {
62309
+ Args: {
62310
+ p_custom_fields: import("../integrations/supabase/types").Json;
62311
+ p_customer_id: string;
62312
+ p_delivery_date: string;
62313
+ p_field_values?: import("../integrations/supabase/types").Json;
62314
+ p_lines: import("../integrations/supabase/types").Json;
62315
+ p_notes: string;
62316
+ p_proposal_id: string;
62317
+ p_reviewed_by: string;
62318
+ };
62319
+ Returns: import("../integrations/supabase/types").Json;
62320
+ };
60356
62321
  assign_cart_numbers: {
60357
62322
  Args: {
60358
62323
  p_carts: import("../integrations/supabase/types").Json;
@@ -60404,6 +62369,10 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
60404
62369
  };
60405
62370
  Returns: number;
60406
62371
  };
62372
+ can_manage_hours: {
62373
+ Args: never;
62374
+ Returns: boolean;
62375
+ };
60407
62376
  check_offer_product_available_stock: {
60408
62377
  Args: {
60409
62378
  p_campaign_product_id: string;
@@ -60593,6 +62562,7 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
60593
62562
  };
60594
62563
  Returns: {
60595
62564
  action: string;
62565
+ attempt_started_at: string | null;
60596
62566
  attempts: number;
60597
62567
  connection_id: string | null;
60598
62568
  created_at: string;
@@ -60680,6 +62650,30 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
60680
62650
  agent_naam: string;
60681
62651
  }[];
60682
62652
  };
62653
+ consume_van_inventory: {
62654
+ Args: {
62655
+ p_inventory_id: string;
62656
+ p_quantity: number;
62657
+ };
62658
+ Returns: {
62659
+ barcode: string | null;
62660
+ created_at: string;
62661
+ id: string;
62662
+ monteur_id: string | null;
62663
+ price_per_unit: number;
62664
+ product_name: string;
62665
+ quantity_current: number;
62666
+ quantity_min: number;
62667
+ unit: string;
62668
+ updated_at: string;
62669
+ };
62670
+ SetofOptions: {
62671
+ from: "*";
62672
+ to: "van_inventories";
62673
+ isOneToOne: true;
62674
+ isSetofReturn: false;
62675
+ };
62676
+ };
60683
62677
  control_get_todays_carts: {
60684
62678
  Args: never;
60685
62679
  Returns: {
@@ -60753,6 +62747,13 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
60753
62747
  _user_id: string;
60754
62748
  };
60755
62749
  Returns: string;
62750
+ } | {
62751
+ Args: {
62752
+ _feature_id: string;
62753
+ _module_id: string;
62754
+ _user_id: string;
62755
+ };
62756
+ Returns: string;
60756
62757
  };
60757
62758
  email_auth_decrypt: {
60758
62759
  Args: {
@@ -61104,12 +63105,6 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
61104
63105
  Args: never;
61105
63106
  Returns: string;
61106
63107
  };
61107
- get_work_order_tenant_id: {
61108
- Args: {
61109
- wo_id: string;
61110
- };
61111
- Returns: string;
61112
- };
61113
63108
  has_module_permission: {
61114
63109
  Args: {
61115
63110
  _min: string;
@@ -61143,6 +63138,13 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
61143
63138
  };
61144
63139
  Returns: boolean;
61145
63140
  };
63141
+ is_time_log_week_locked: {
63142
+ Args: {
63143
+ p_employee_id: string;
63144
+ p_start_time: string;
63145
+ };
63146
+ Returns: boolean;
63147
+ };
61146
63148
  is_user_admin: {
61147
63149
  Args: never;
61148
63150
  Returns: boolean;
@@ -61157,13 +63159,14 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
61157
63159
  };
61158
63160
  Returns: boolean;
61159
63161
  };
61160
- list_monteurs: {
63162
+ list_medewerkers: {
61161
63163
  Args: never;
61162
63164
  Returns: {
61163
63165
  avatar_url: string;
61164
63166
  display_name: string;
61165
63167
  email: string;
61166
63168
  id: string;
63169
+ roles: string[];
61167
63170
  }[];
61168
63171
  };
61169
63172
  list_my_planning_items: {
@@ -61654,6 +63657,65 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
61654
63657
  };
61655
63658
  Returns: number;
61656
63659
  };
63660
+ logistics_plan_claim: {
63661
+ Args: {
63662
+ p_limit?: number;
63663
+ };
63664
+ Returns: {
63665
+ attempts: number;
63666
+ id: string;
63667
+ order_id: string;
63668
+ }[];
63669
+ };
63670
+ logistics_plan_enqueue: {
63671
+ Args: {
63672
+ p_order_id: string;
63673
+ p_reason?: string;
63674
+ };
63675
+ Returns: undefined;
63676
+ };
63677
+ logistics_plan_ensure_event: {
63678
+ Args: {
63679
+ p_order_id: string;
63680
+ };
63681
+ Returns: boolean;
63682
+ };
63683
+ logistics_plan_finish: {
63684
+ Args: {
63685
+ p_error?: string;
63686
+ p_id: string;
63687
+ };
63688
+ Returns: undefined;
63689
+ };
63690
+ logistics_plan_impact_orders: {
63691
+ Args: {
63692
+ p_order_id: string;
63693
+ };
63694
+ Returns: {
63695
+ buffer_id: string;
63696
+ order_id: string;
63697
+ plan_date: string;
63698
+ }[];
63699
+ };
63700
+ logistics_plan_kick: {
63701
+ Args: never;
63702
+ Returns: undefined;
63703
+ };
63704
+ logistics_plan_prune: {
63705
+ Args: never;
63706
+ Returns: number;
63707
+ };
63708
+ logistics_plan_release_stale: {
63709
+ Args: never;
63710
+ Returns: number;
63711
+ };
63712
+ logistics_plan_setting: {
63713
+ Args: {
63714
+ p_default: number;
63715
+ p_key: string;
63716
+ };
63717
+ Returns: number;
63718
+ };
61657
63719
  logistics_queue_capacity_email: {
61658
63720
  Args: {
61659
63721
  p_alert_id: string;
@@ -61895,6 +63957,7 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
61895
63957
  my_module_permissions: {
61896
63958
  Args: never;
61897
63959
  Returns: {
63960
+ feature_id: string;
61898
63961
  module_id: string;
61899
63962
  permission: string;
61900
63963
  }[];
@@ -62775,6 +64838,16 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
62775
64838
  };
62776
64839
  Returns: string[];
62777
64840
  };
64841
+ switch_time_log: {
64842
+ Args: {
64843
+ p_employee_id: string;
64844
+ p_start_lat?: number;
64845
+ p_start_lng?: number;
64846
+ p_type: string;
64847
+ p_work_order_id?: string;
64848
+ };
64849
+ Returns: import("../integrations/supabase/types").Json;
64850
+ };
62778
64851
  sync_all_layer_stocks: {
62779
64852
  Args: never;
62780
64853
  Returns: undefined;
@@ -62825,6 +64898,24 @@ export declare const listOrdersInBufferOfOrder: import("@tanstack/start-client-c
62825
64898
  };
62826
64899
  Returns: boolean;
62827
64900
  };
64901
+ twinfield_cron_lock_acquire: {
64902
+ Args: {
64903
+ _job_name: string;
64904
+ _stale_seconds?: number;
64905
+ };
64906
+ Returns: boolean;
64907
+ };
64908
+ twinfield_cron_lock_release: {
64909
+ Args: {
64910
+ _error?: string;
64911
+ _job_name: string;
64912
+ };
64913
+ Returns: undefined;
64914
+ };
64915
+ twinfield_prune_push_queue: {
64916
+ Args: never;
64917
+ Returns: number;
64918
+ };
62828
64919
  twinfield_register_cron: {
62829
64920
  Args: {
62830
64921
  apikey?: string;