@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
@@ -872,6 +872,126 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
872
872
  };
873
873
  Relationships: [];
874
874
  };
875
+ cao_holidays: {
876
+ Row: {
877
+ created_at: string;
878
+ description: string | null;
879
+ holiday_date: string;
880
+ id: string;
881
+ updated_at: string;
882
+ };
883
+ Insert: {
884
+ created_at?: string;
885
+ description?: string | null;
886
+ holiday_date: string;
887
+ id?: string;
888
+ updated_at?: string;
889
+ };
890
+ Update: {
891
+ created_at?: string;
892
+ description?: string | null;
893
+ holiday_date?: string;
894
+ id?: string;
895
+ updated_at?: string;
896
+ };
897
+ Relationships: [];
898
+ };
899
+ cao_settings: {
900
+ Row: {
901
+ auto_break_after_hours: number;
902
+ auto_break_minutes: number;
903
+ auto_break_unpaid: boolean;
904
+ auto_stop_after_hours: number;
905
+ callout_fee: number;
906
+ created_at: string;
907
+ daily_regular_hours: number;
908
+ default_hourly_rate: number;
909
+ id: string;
910
+ materials_markup_percent: number;
911
+ max_daily_hours: number;
912
+ max_weekly_hours: number;
913
+ meal_allowance_amount: number;
914
+ overtime_pct_178: number;
915
+ overtime_pct_189: number;
916
+ overtime_pct_212: number;
917
+ reminder_after_hours: number;
918
+ standby_evening_amount: number;
919
+ standby_weekend_amount: number;
920
+ travel_cost_per_km: number | null;
921
+ travel_cost_threshold_km: number | null;
922
+ travel_counts_as_work: boolean;
923
+ travel_hourly_rate: number;
924
+ travel_rate_per_hour: number;
925
+ travel_threshold_minutes: number;
926
+ updated_at: string;
927
+ weekend_always_212: boolean;
928
+ window_end: string;
929
+ window_start: string;
930
+ };
931
+ Insert: {
932
+ auto_break_after_hours?: number;
933
+ auto_break_minutes?: number;
934
+ auto_break_unpaid?: boolean;
935
+ auto_stop_after_hours?: number;
936
+ callout_fee?: number;
937
+ created_at?: string;
938
+ daily_regular_hours?: number;
939
+ default_hourly_rate?: number;
940
+ id?: string;
941
+ materials_markup_percent?: number;
942
+ max_daily_hours?: number;
943
+ max_weekly_hours?: number;
944
+ meal_allowance_amount?: number;
945
+ overtime_pct_178?: number;
946
+ overtime_pct_189?: number;
947
+ overtime_pct_212?: number;
948
+ reminder_after_hours?: number;
949
+ standby_evening_amount?: number;
950
+ standby_weekend_amount?: number;
951
+ travel_cost_per_km?: number | null;
952
+ travel_cost_threshold_km?: number | null;
953
+ travel_counts_as_work?: boolean;
954
+ travel_hourly_rate?: number;
955
+ travel_rate_per_hour?: number;
956
+ travel_threshold_minutes?: number;
957
+ updated_at?: string;
958
+ weekend_always_212?: boolean;
959
+ window_end?: string;
960
+ window_start?: string;
961
+ };
962
+ Update: {
963
+ auto_break_after_hours?: number;
964
+ auto_break_minutes?: number;
965
+ auto_break_unpaid?: boolean;
966
+ auto_stop_after_hours?: number;
967
+ callout_fee?: number;
968
+ created_at?: string;
969
+ daily_regular_hours?: number;
970
+ default_hourly_rate?: number;
971
+ id?: string;
972
+ materials_markup_percent?: number;
973
+ max_daily_hours?: number;
974
+ max_weekly_hours?: number;
975
+ meal_allowance_amount?: number;
976
+ overtime_pct_178?: number;
977
+ overtime_pct_189?: number;
978
+ overtime_pct_212?: number;
979
+ reminder_after_hours?: number;
980
+ standby_evening_amount?: number;
981
+ standby_weekend_amount?: number;
982
+ travel_cost_per_km?: number | null;
983
+ travel_cost_threshold_km?: number | null;
984
+ travel_counts_as_work?: boolean;
985
+ travel_hourly_rate?: number;
986
+ travel_rate_per_hour?: number;
987
+ travel_threshold_minutes?: number;
988
+ updated_at?: string;
989
+ weekend_always_212?: boolean;
990
+ window_end?: string;
991
+ window_start?: string;
992
+ };
993
+ Relationships: [];
994
+ };
875
995
  carrier_shipping_rates: {
876
996
  Row: {
877
997
  carrier_id: string;
@@ -7766,7 +7886,6 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
7766
7886
  start_date: string;
7767
7887
  start_time: string | null;
7768
7888
  status: string;
7769
- tenant_id: string;
7770
7889
  updated_at: string;
7771
7890
  user_id: string;
7772
7891
  };
@@ -7784,7 +7903,6 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
7784
7903
  start_date: string;
7785
7904
  start_time?: string | null;
7786
7905
  status?: string;
7787
- tenant_id?: string;
7788
7906
  updated_at?: string;
7789
7907
  user_id: string;
7790
7908
  };
@@ -7802,7 +7920,6 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
7802
7920
  start_date?: string;
7803
7921
  start_time?: string | null;
7804
7922
  status?: string;
7805
- tenant_id?: string;
7806
7923
  updated_at?: string;
7807
7924
  user_id?: string;
7808
7925
  };
@@ -7810,13 +7927,13 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
7810
7927
  foreignKeyName: "leave_requests_monteur_id_fkey";
7811
7928
  columns: ["monteur_id"];
7812
7929
  isOneToOne: false;
7813
- referencedRelation: "monteurs";
7930
+ referencedRelation: "profiles";
7814
7931
  referencedColumns: ["id"];
7815
7932
  }, {
7816
7933
  foreignKeyName: "leave_requests_user_id_fkey";
7817
7934
  columns: ["user_id"];
7818
7935
  isOneToOne: false;
7819
- referencedRelation: "monteurs";
7936
+ referencedRelation: "profiles";
7820
7937
  referencedColumns: ["id"];
7821
7938
  }];
7822
7939
  };
@@ -8684,6 +8801,45 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
8684
8801
  };
8685
8802
  Relationships: [];
8686
8803
  };
8804
+ logistics_plan_queue: {
8805
+ Row: {
8806
+ attempts: number;
8807
+ claimed_at: string | null;
8808
+ enqueued_at: string;
8809
+ error: string | null;
8810
+ id: string;
8811
+ next_attempt_at: string;
8812
+ order_id: string;
8813
+ reason: string;
8814
+ status: string;
8815
+ updated_at: string;
8816
+ };
8817
+ Insert: {
8818
+ attempts?: number;
8819
+ claimed_at?: string | null;
8820
+ enqueued_at?: string;
8821
+ error?: string | null;
8822
+ id?: string;
8823
+ next_attempt_at?: string;
8824
+ order_id: string;
8825
+ reason?: string;
8826
+ status?: string;
8827
+ updated_at?: string;
8828
+ };
8829
+ Update: {
8830
+ attempts?: number;
8831
+ claimed_at?: string | null;
8832
+ enqueued_at?: string;
8833
+ error?: string | null;
8834
+ id?: string;
8835
+ next_attempt_at?: string;
8836
+ order_id?: string;
8837
+ reason?: string;
8838
+ status?: string;
8839
+ updated_at?: string;
8840
+ };
8841
+ Relationships: [];
8842
+ };
8687
8843
  logistics_plan_runs: {
8688
8844
  Row: {
8689
8845
  created_at: string;
@@ -8759,6 +8915,24 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
8759
8915
  referencedColumns: ["id"];
8760
8916
  }];
8761
8917
  };
8918
+ logistics_plan_settings: {
8919
+ Row: {
8920
+ key: string;
8921
+ updated_at: string;
8922
+ value: string;
8923
+ };
8924
+ Insert: {
8925
+ key: string;
8926
+ updated_at?: string;
8927
+ value: string;
8928
+ };
8929
+ Update: {
8930
+ key?: string;
8931
+ updated_at?: string;
8932
+ value?: string;
8933
+ };
8934
+ Relationships: [];
8935
+ };
8762
8936
  logistics_rebuffer_state: {
8763
8937
  Row: {
8764
8938
  created_at: string;
@@ -9914,6 +10088,90 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
9914
10088
  };
9915
10089
  Relationships: [];
9916
10090
  };
10091
+ material_usage: {
10092
+ Row: {
10093
+ created_at: string;
10094
+ id: string;
10095
+ material_name: string;
10096
+ monteur_id: string | null;
10097
+ price_at_time: number;
10098
+ quantity_used: number;
10099
+ updated_at: string;
10100
+ van_inventory_id: string | null;
10101
+ work_order_id: string;
10102
+ };
10103
+ Insert: {
10104
+ created_at?: string;
10105
+ id?: string;
10106
+ material_name: string;
10107
+ monteur_id?: string | null;
10108
+ price_at_time?: number;
10109
+ quantity_used?: number;
10110
+ updated_at?: string;
10111
+ van_inventory_id?: string | null;
10112
+ work_order_id: string;
10113
+ };
10114
+ Update: {
10115
+ created_at?: string;
10116
+ id?: string;
10117
+ material_name?: string;
10118
+ monteur_id?: string | null;
10119
+ price_at_time?: number;
10120
+ quantity_used?: number;
10121
+ updated_at?: string;
10122
+ van_inventory_id?: string | null;
10123
+ work_order_id?: string;
10124
+ };
10125
+ Relationships: [{
10126
+ foreignKeyName: "material_usage_monteur_id_fkey";
10127
+ columns: ["monteur_id"];
10128
+ isOneToOne: false;
10129
+ referencedRelation: "profiles";
10130
+ referencedColumns: ["id"];
10131
+ }, {
10132
+ foreignKeyName: "material_usage_van_inventory_id_fkey";
10133
+ columns: ["van_inventory_id"];
10134
+ isOneToOne: false;
10135
+ referencedRelation: "van_inventories";
10136
+ referencedColumns: ["id"];
10137
+ }, {
10138
+ foreignKeyName: "material_usage_work_order_id_fkey";
10139
+ columns: ["work_order_id"];
10140
+ isOneToOne: false;
10141
+ referencedRelation: "work_orders";
10142
+ referencedColumns: ["id"];
10143
+ }];
10144
+ };
10145
+ module_features: {
10146
+ Row: {
10147
+ created_at: string;
10148
+ feature_id: string;
10149
+ id: string;
10150
+ is_active: boolean;
10151
+ last_seen_at: string;
10152
+ module_id: string;
10153
+ name: string;
10154
+ };
10155
+ Insert: {
10156
+ created_at?: string;
10157
+ feature_id: string;
10158
+ id?: string;
10159
+ is_active?: boolean;
10160
+ last_seen_at?: string;
10161
+ module_id: string;
10162
+ name: string;
10163
+ };
10164
+ Update: {
10165
+ created_at?: string;
10166
+ feature_id?: string;
10167
+ id?: string;
10168
+ is_active?: boolean;
10169
+ last_seen_at?: string;
10170
+ module_id?: string;
10171
+ name?: string;
10172
+ };
10173
+ Relationships: [];
10174
+ };
9917
10175
  module_permissions: {
9918
10176
  Row: {
9919
10177
  created_at: string;
@@ -9944,6 +10202,7 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
9944
10202
  module_registry: {
9945
10203
  Row: {
9946
10204
  created_at: string;
10205
+ enforce: boolean;
9947
10206
  is_active: boolean;
9948
10207
  last_seen_at: string;
9949
10208
  module_id: string;
@@ -9953,6 +10212,7 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
9953
10212
  };
9954
10213
  Insert: {
9955
10214
  created_at?: string;
10215
+ enforce?: boolean;
9956
10216
  is_active?: boolean;
9957
10217
  last_seen_at?: string;
9958
10218
  module_id: string;
@@ -9962,6 +10222,7 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
9962
10222
  };
9963
10223
  Update: {
9964
10224
  created_at?: string;
10225
+ enforce?: boolean;
9965
10226
  is_active?: boolean;
9966
10227
  last_seen_at?: string;
9967
10228
  module_id?: string;
@@ -10022,63 +10283,6 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
10022
10283
  };
10023
10284
  Relationships: [];
10024
10285
  };
10025
- monteurs: {
10026
- Row: {
10027
- avatar_url: string | null;
10028
- color: string | null;
10029
- created_at: string;
10030
- email: string | null;
10031
- id: string;
10032
- is_active: boolean;
10033
- leave_balance_hours: number;
10034
- name: string;
10035
- persnr: number | null;
10036
- phone: string | null;
10037
- role: string;
10038
- tenant_id: string;
10039
- updated_at: string;
10040
- user_id: string | null;
10041
- };
10042
- Insert: {
10043
- avatar_url?: string | null;
10044
- color?: string | null;
10045
- created_at?: string;
10046
- email?: string | null;
10047
- id?: string;
10048
- is_active?: boolean;
10049
- leave_balance_hours?: number;
10050
- name: string;
10051
- persnr?: number | null;
10052
- phone?: string | null;
10053
- role?: string;
10054
- tenant_id: string;
10055
- updated_at?: string;
10056
- user_id?: string | null;
10057
- };
10058
- Update: {
10059
- avatar_url?: string | null;
10060
- color?: string | null;
10061
- created_at?: string;
10062
- email?: string | null;
10063
- id?: string;
10064
- is_active?: boolean;
10065
- leave_balance_hours?: number;
10066
- name?: string;
10067
- persnr?: number | null;
10068
- phone?: string | null;
10069
- role?: string;
10070
- tenant_id?: string;
10071
- updated_at?: string;
10072
- user_id?: string | null;
10073
- };
10074
- Relationships: [{
10075
- foreignKeyName: "monteurs_tenant_id_fkey";
10076
- columns: ["tenant_id"];
10077
- isOneToOne: false;
10078
- referencedRelation: "tenants";
10079
- referencedColumns: ["id"];
10080
- }];
10081
- };
10082
10286
  nmbrs_component_mapping: {
10083
10287
  Row: {
10084
10288
  created_at: string;
@@ -10149,13 +10353,7 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
10149
10353
  nmbrs_employee_number?: string;
10150
10354
  updated_at?: string;
10151
10355
  };
10152
- Relationships: [{
10153
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
10154
- columns: ["monteur_id"];
10155
- isOneToOne: true;
10156
- referencedRelation: "monteurs";
10157
- referencedColumns: ["id"];
10158
- }];
10356
+ Relationships: [];
10159
10357
  };
10160
10358
  nmbrs_export_lines: {
10161
10359
  Row: {
@@ -10204,12 +10402,6 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
10204
10402
  wage_code?: string;
10205
10403
  };
10206
10404
  Relationships: [{
10207
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
10208
- columns: ["monteur_id"];
10209
- isOneToOne: false;
10210
- referencedRelation: "monteurs";
10211
- referencedColumns: ["id"];
10212
- }, {
10213
10405
  foreignKeyName: "nmbrs_export_lines_run_id_fkey";
10214
10406
  columns: ["run_id"];
10215
10407
  isOneToOne: false;
@@ -11037,6 +11229,7 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
11037
11229
  error_message: string | null;
11038
11230
  id: string;
11039
11231
  invoice_number: string | null;
11232
+ next_attempt_at: string;
11040
11233
  order_id: string;
11041
11234
  processed_at: string | null;
11042
11235
  status: string;
@@ -11048,6 +11241,7 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
11048
11241
  error_message?: string | null;
11049
11242
  id?: string;
11050
11243
  invoice_number?: string | null;
11244
+ next_attempt_at?: string;
11051
11245
  order_id: string;
11052
11246
  processed_at?: string | null;
11053
11247
  status?: string;
@@ -11059,6 +11253,7 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
11059
11253
  error_message?: string | null;
11060
11254
  id?: string;
11061
11255
  invoice_number?: string | null;
11256
+ next_attempt_at?: string;
11062
11257
  order_id?: string;
11063
11258
  processed_at?: string | null;
11064
11259
  status?: string;
@@ -12597,6 +12792,9 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
12597
12792
  created_at: string;
12598
12793
  id: string;
12599
12794
  laatst_gezien: string;
12795
+ laatste_fout: string | null;
12796
+ laatste_request_id: number | null;
12797
+ mislukte_posts: number;
12600
12798
  tick_sleutel: string;
12601
12799
  updated_at: string;
12602
12800
  };
@@ -12606,6 +12804,9 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
12606
12804
  created_at?: string;
12607
12805
  id?: string;
12608
12806
  laatst_gezien?: string;
12807
+ laatste_fout?: string | null;
12808
+ laatste_request_id?: number | null;
12809
+ mislukte_posts?: number;
12609
12810
  tick_sleutel?: string;
12610
12811
  updated_at?: string;
12611
12812
  };
@@ -12615,6 +12816,9 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
12615
12816
  created_at?: string;
12616
12817
  id?: string;
12617
12818
  laatst_gezien?: string;
12819
+ laatste_fout?: string | null;
12820
+ laatste_request_id?: number | null;
12821
+ mislukte_posts?: number;
12618
12822
  tick_sleutel?: string;
12619
12823
  updated_at?: string;
12620
12824
  };
@@ -14123,6 +14327,96 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
14123
14327
  referencedColumns: ["id"];
14124
14328
  }];
14125
14329
  };
14330
+ role_assignments: {
14331
+ Row: {
14332
+ created_at: string;
14333
+ id: string;
14334
+ role_id: string;
14335
+ user_id: string;
14336
+ };
14337
+ Insert: {
14338
+ created_at?: string;
14339
+ id?: string;
14340
+ role_id: string;
14341
+ user_id: string;
14342
+ };
14343
+ Update: {
14344
+ created_at?: string;
14345
+ id?: string;
14346
+ role_id?: string;
14347
+ user_id?: string;
14348
+ };
14349
+ Relationships: [{
14350
+ foreignKeyName: "role_assignments_role_id_fkey";
14351
+ columns: ["role_id"];
14352
+ isOneToOne: false;
14353
+ referencedRelation: "roles";
14354
+ referencedColumns: ["id"];
14355
+ }];
14356
+ };
14357
+ role_permissions: {
14358
+ Row: {
14359
+ can_edit: boolean;
14360
+ can_view: boolean;
14361
+ feature_id: string;
14362
+ id: string;
14363
+ module_id: string;
14364
+ role_id: string;
14365
+ updated_at: string;
14366
+ };
14367
+ Insert: {
14368
+ can_edit?: boolean;
14369
+ can_view?: boolean;
14370
+ feature_id?: string;
14371
+ id?: string;
14372
+ module_id: string;
14373
+ role_id: string;
14374
+ updated_at?: string;
14375
+ };
14376
+ Update: {
14377
+ can_edit?: boolean;
14378
+ can_view?: boolean;
14379
+ feature_id?: string;
14380
+ id?: string;
14381
+ module_id?: string;
14382
+ role_id?: string;
14383
+ updated_at?: string;
14384
+ };
14385
+ Relationships: [{
14386
+ foreignKeyName: "role_permissions_role_id_fkey";
14387
+ columns: ["role_id"];
14388
+ isOneToOne: false;
14389
+ referencedRelation: "roles";
14390
+ referencedColumns: ["id"];
14391
+ }];
14392
+ };
14393
+ roles: {
14394
+ Row: {
14395
+ created_at: string;
14396
+ id: string;
14397
+ is_protected: boolean;
14398
+ key: string;
14399
+ name: string;
14400
+ updated_at: string;
14401
+ };
14402
+ Insert: {
14403
+ created_at?: string;
14404
+ id?: string;
14405
+ is_protected?: boolean;
14406
+ key: string;
14407
+ name: string;
14408
+ updated_at?: string;
14409
+ };
14410
+ Update: {
14411
+ created_at?: string;
14412
+ id?: string;
14413
+ is_protected?: boolean;
14414
+ key?: string;
14415
+ name?: string;
14416
+ updated_at?: string;
14417
+ };
14418
+ Relationships: [];
14419
+ };
14126
14420
  rooms: {
14127
14421
  Row: {
14128
14422
  capacity: number;
@@ -14792,6 +15086,54 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
14792
15086
  };
14793
15087
  Relationships: [];
14794
15088
  };
15089
+ time_compensation_entries: {
15090
+ Row: {
15091
+ created_at: string;
15092
+ employee_id: string;
15093
+ entry_date: string;
15094
+ id: string;
15095
+ km: number;
15096
+ meal_allowance: number;
15097
+ notes: string | null;
15098
+ standby_evening: number;
15099
+ standby_weekend: number;
15100
+ tvt_change: number;
15101
+ updated_at: string;
15102
+ };
15103
+ Insert: {
15104
+ created_at?: string;
15105
+ employee_id: string;
15106
+ entry_date: string;
15107
+ id?: string;
15108
+ km?: number;
15109
+ meal_allowance?: number;
15110
+ notes?: string | null;
15111
+ standby_evening?: number;
15112
+ standby_weekend?: number;
15113
+ tvt_change?: number;
15114
+ updated_at?: string;
15115
+ };
15116
+ Update: {
15117
+ created_at?: string;
15118
+ employee_id?: string;
15119
+ entry_date?: string;
15120
+ id?: string;
15121
+ km?: number;
15122
+ meal_allowance?: number;
15123
+ notes?: string | null;
15124
+ standby_evening?: number;
15125
+ standby_weekend?: number;
15126
+ tvt_change?: number;
15127
+ updated_at?: string;
15128
+ };
15129
+ Relationships: [{
15130
+ foreignKeyName: "time_compensation_entries_employee_id_fkey";
15131
+ columns: ["employee_id"];
15132
+ isOneToOne: false;
15133
+ referencedRelation: "profiles";
15134
+ referencedColumns: ["id"];
15135
+ }];
15136
+ };
14795
15137
  time_entries: {
14796
15138
  Row: {
14797
15139
  created_at: string;
@@ -14826,65 +15168,170 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
14826
15168
  undertime?: number;
14827
15169
  updated_at?: string;
14828
15170
  };
15171
+ Relationships: [];
15172
+ };
15173
+ time_log_week_approvals: {
15174
+ Row: {
15175
+ approved_at: string | null;
15176
+ approved_by: string | null;
15177
+ created_at: string;
15178
+ employee_id: string;
15179
+ id: string;
15180
+ locked: boolean;
15181
+ notes: string | null;
15182
+ status: string;
15183
+ submitted_at: string | null;
15184
+ updated_at: string;
15185
+ week_start: string;
15186
+ };
15187
+ Insert: {
15188
+ approved_at?: string | null;
15189
+ approved_by?: string | null;
15190
+ created_at?: string;
15191
+ employee_id: string;
15192
+ id?: string;
15193
+ locked?: boolean;
15194
+ notes?: string | null;
15195
+ status?: string;
15196
+ submitted_at?: string | null;
15197
+ updated_at?: string;
15198
+ week_start: string;
15199
+ };
15200
+ Update: {
15201
+ approved_at?: string | null;
15202
+ approved_by?: string | null;
15203
+ created_at?: string;
15204
+ employee_id?: string;
15205
+ id?: string;
15206
+ locked?: boolean;
15207
+ notes?: string | null;
15208
+ status?: string;
15209
+ submitted_at?: string | null;
15210
+ updated_at?: string;
15211
+ week_start?: string;
15212
+ };
14829
15213
  Relationships: [{
14830
- foreignKeyName: "time_entries_employee_id_fkey";
15214
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
14831
15215
  columns: ["employee_id"];
14832
15216
  isOneToOne: false;
14833
- referencedRelation: "monteurs";
15217
+ referencedRelation: "profiles";
14834
15218
  referencedColumns: ["id"];
14835
15219
  }];
14836
15220
  };
14837
15221
  time_logs: {
14838
15222
  Row: {
15223
+ auto_stop_reason: string | null;
15224
+ auto_stopped: boolean;
14839
15225
  created_at: string;
15226
+ current_latitude: number | null;
15227
+ current_longitude: number | null;
15228
+ current_position_updated_at: string | null;
14840
15229
  employee_id: string;
15230
+ end_latitude: number | null;
15231
+ end_longitude: number | null;
14841
15232
  end_time: string | null;
15233
+ eta_distance_km: number | null;
15234
+ eta_minutes: number | null;
15235
+ eta_updated_at: string | null;
15236
+ hour_category: string | null;
14842
15237
  id: string;
15238
+ last_reminder_at: string | null;
14843
15239
  notes: string | null;
14844
15240
  overtime_hours: number;
14845
15241
  overtime_type: string | null;
14846
15242
  regular_hours: number;
15243
+ reminder_count: number;
15244
+ requires_review: boolean;
15245
+ start_latitude: number | null;
15246
+ start_longitude: number | null;
14847
15247
  start_time: string;
14848
15248
  travel_cost: number | null;
14849
15249
  travel_distance_km: number | null;
15250
+ travel_duration_min: number | null;
15251
+ travel_time_minutes: number | null;
14850
15252
  type: string;
14851
15253
  updated_at: string;
15254
+ work_order_id: string | null;
14852
15255
  };
14853
15256
  Insert: {
15257
+ auto_stop_reason?: string | null;
15258
+ auto_stopped?: boolean;
14854
15259
  created_at?: string;
15260
+ current_latitude?: number | null;
15261
+ current_longitude?: number | null;
15262
+ current_position_updated_at?: string | null;
14855
15263
  employee_id: string;
15264
+ end_latitude?: number | null;
15265
+ end_longitude?: number | null;
14856
15266
  end_time?: string | null;
15267
+ eta_distance_km?: number | null;
15268
+ eta_minutes?: number | null;
15269
+ eta_updated_at?: string | null;
15270
+ hour_category?: string | null;
14857
15271
  id?: string;
15272
+ last_reminder_at?: string | null;
14858
15273
  notes?: string | null;
14859
15274
  overtime_hours?: number;
14860
15275
  overtime_type?: string | null;
14861
15276
  regular_hours?: number;
15277
+ reminder_count?: number;
15278
+ requires_review?: boolean;
15279
+ start_latitude?: number | null;
15280
+ start_longitude?: number | null;
14862
15281
  start_time?: string;
14863
15282
  travel_cost?: number | null;
14864
15283
  travel_distance_km?: number | null;
15284
+ travel_duration_min?: number | null;
15285
+ travel_time_minutes?: number | null;
14865
15286
  type: string;
14866
15287
  updated_at?: string;
15288
+ work_order_id?: string | null;
14867
15289
  };
14868
15290
  Update: {
15291
+ auto_stop_reason?: string | null;
15292
+ auto_stopped?: boolean;
14869
15293
  created_at?: string;
15294
+ current_latitude?: number | null;
15295
+ current_longitude?: number | null;
15296
+ current_position_updated_at?: string | null;
14870
15297
  employee_id?: string;
15298
+ end_latitude?: number | null;
15299
+ end_longitude?: number | null;
14871
15300
  end_time?: string | null;
15301
+ eta_distance_km?: number | null;
15302
+ eta_minutes?: number | null;
15303
+ eta_updated_at?: string | null;
15304
+ hour_category?: string | null;
14872
15305
  id?: string;
15306
+ last_reminder_at?: string | null;
14873
15307
  notes?: string | null;
14874
15308
  overtime_hours?: number;
14875
15309
  overtime_type?: string | null;
14876
15310
  regular_hours?: number;
15311
+ reminder_count?: number;
15312
+ requires_review?: boolean;
15313
+ start_latitude?: number | null;
15314
+ start_longitude?: number | null;
14877
15315
  start_time?: string;
14878
15316
  travel_cost?: number | null;
14879
15317
  travel_distance_km?: number | null;
15318
+ travel_duration_min?: number | null;
15319
+ travel_time_minutes?: number | null;
14880
15320
  type?: string;
14881
15321
  updated_at?: string;
15322
+ work_order_id?: string | null;
14882
15323
  };
14883
15324
  Relationships: [{
14884
15325
  foreignKeyName: "time_logs_employee_id_fkey";
14885
15326
  columns: ["employee_id"];
14886
15327
  isOneToOne: false;
14887
- referencedRelation: "monteurs";
15328
+ referencedRelation: "profiles";
15329
+ referencedColumns: ["id"];
15330
+ }, {
15331
+ foreignKeyName: "time_logs_work_order_id_fkey";
15332
+ columns: ["work_order_id"];
15333
+ isOneToOne: false;
15334
+ referencedRelation: "work_orders";
14888
15335
  referencedColumns: ["id"];
14889
15336
  }];
14890
15337
  };
@@ -14923,7 +15370,7 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
14923
15370
  foreignKeyName: "time_off_entries_employee_id_fkey";
14924
15371
  columns: ["employee_id"];
14925
15372
  isOneToOne: false;
14926
- referencedRelation: "monteurs";
15373
+ referencedRelation: "profiles";
14927
15374
  referencedColumns: ["id"];
14928
15375
  }];
14929
15376
  };
@@ -15233,6 +15680,39 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
15233
15680
  };
15234
15681
  Relationships: [];
15235
15682
  };
15683
+ twinfield_cron_locks: {
15684
+ Row: {
15685
+ created_at: string;
15686
+ heartbeat_at: string;
15687
+ job_name: string;
15688
+ last_error: string | null;
15689
+ last_finished_at: string | null;
15690
+ locked_at: string;
15691
+ run_id: string;
15692
+ updated_at: string;
15693
+ };
15694
+ Insert: {
15695
+ created_at?: string;
15696
+ heartbeat_at?: string;
15697
+ job_name: string;
15698
+ last_error?: string | null;
15699
+ last_finished_at?: string | null;
15700
+ locked_at?: string;
15701
+ run_id?: string;
15702
+ updated_at?: string;
15703
+ };
15704
+ Update: {
15705
+ created_at?: string;
15706
+ heartbeat_at?: string;
15707
+ job_name?: string;
15708
+ last_error?: string | null;
15709
+ last_finished_at?: string | null;
15710
+ locked_at?: string;
15711
+ run_id?: string;
15712
+ updated_at?: string;
15713
+ };
15714
+ Relationships: [];
15715
+ };
15236
15716
  twinfield_customers: {
15237
15717
  Row: {
15238
15718
  address: string | null;
@@ -15833,6 +16313,7 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
15833
16313
  twinfield_push_queue: {
15834
16314
  Row: {
15835
16315
  action: string;
16316
+ attempt_started_at: string | null;
15836
16317
  attempts: number;
15837
16318
  connection_id: string | null;
15838
16319
  created_at: string;
@@ -15849,6 +16330,7 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
15849
16330
  };
15850
16331
  Insert: {
15851
16332
  action?: string;
16333
+ attempt_started_at?: string | null;
15852
16334
  attempts?: number;
15853
16335
  connection_id?: string | null;
15854
16336
  created_at?: string;
@@ -15865,6 +16347,7 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
15865
16347
  };
15866
16348
  Update: {
15867
16349
  action?: string;
16350
+ attempt_started_at?: string | null;
15868
16351
  attempts?: number;
15869
16352
  connection_id?: string | null;
15870
16353
  created_at?: string;
@@ -16062,13 +16545,7 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
16062
16545
  workday_end?: string | null;
16063
16546
  workday_start?: string | null;
16064
16547
  };
16065
- Relationships: [{
16066
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
16067
- columns: ["monteur_id"];
16068
- isOneToOne: true;
16069
- referencedRelation: "monteurs";
16070
- referencedColumns: ["id"];
16071
- }];
16548
+ Relationships: [];
16072
16549
  };
16073
16550
  uren_entries: {
16074
16551
  Row: {
@@ -16114,12 +16591,6 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
16114
16591
  werkbon_id?: string | null;
16115
16592
  };
16116
16593
  Relationships: [{
16117
- foreignKeyName: "uren_entries_monteur_id_fkey";
16118
- columns: ["monteur_id"];
16119
- isOneToOne: false;
16120
- referencedRelation: "monteurs";
16121
- referencedColumns: ["id"];
16122
- }, {
16123
16594
  foreignKeyName: "uren_entries_werkbon_id_fkey";
16124
16595
  columns: ["werkbon_id"];
16125
16596
  isOneToOne: false;
@@ -16587,17 +17058,12 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
16587
17058
  submitted_at?: string | null;
16588
17059
  updated_at?: string;
16589
17060
  };
16590
- Relationships: [{
16591
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
16592
- columns: ["monteur_id"];
16593
- isOneToOne: false;
16594
- referencedRelation: "monteurs";
16595
- referencedColumns: ["id"];
16596
- }];
17061
+ Relationships: [];
16597
17062
  };
16598
17063
  user_module_permissions: {
16599
17064
  Row: {
16600
17065
  created_at: string;
17066
+ feature_id: string;
16601
17067
  id: string;
16602
17068
  module_id: string;
16603
17069
  permission: string;
@@ -16606,6 +17072,7 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
16606
17072
  };
16607
17073
  Insert: {
16608
17074
  created_at?: string;
17075
+ feature_id?: string;
16609
17076
  id?: string;
16610
17077
  module_id: string;
16611
17078
  permission: string;
@@ -16614,6 +17081,7 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
16614
17081
  };
16615
17082
  Update: {
16616
17083
  created_at?: string;
17084
+ feature_id?: string;
16617
17085
  id?: string;
16618
17086
  module_id?: string;
16619
17087
  permission?: string;
@@ -16649,6 +17117,51 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
16649
17117
  referencedColumns: ["id"];
16650
17118
  }];
16651
17119
  };
17120
+ van_inventories: {
17121
+ Row: {
17122
+ barcode: string | null;
17123
+ created_at: string;
17124
+ id: string;
17125
+ monteur_id: string | null;
17126
+ price_per_unit: number;
17127
+ product_name: string;
17128
+ quantity_current: number;
17129
+ quantity_min: number;
17130
+ unit: string;
17131
+ updated_at: string;
17132
+ };
17133
+ Insert: {
17134
+ barcode?: string | null;
17135
+ created_at?: string;
17136
+ id?: string;
17137
+ monteur_id?: string | null;
17138
+ price_per_unit?: number;
17139
+ product_name: string;
17140
+ quantity_current?: number;
17141
+ quantity_min?: number;
17142
+ unit?: string;
17143
+ updated_at?: string;
17144
+ };
17145
+ Update: {
17146
+ barcode?: string | null;
17147
+ created_at?: string;
17148
+ id?: string;
17149
+ monteur_id?: string | null;
17150
+ price_per_unit?: number;
17151
+ product_name?: string;
17152
+ quantity_current?: number;
17153
+ quantity_min?: number;
17154
+ unit?: string;
17155
+ updated_at?: string;
17156
+ };
17157
+ Relationships: [{
17158
+ foreignKeyName: "van_inventories_monteur_id_fkey";
17159
+ columns: ["monteur_id"];
17160
+ isOneToOne: false;
17161
+ referencedRelation: "profiles";
17162
+ referencedColumns: ["id"];
17163
+ }];
17164
+ };
16652
17165
  voorraad_custom_fields: {
16653
17166
  Row: {
16654
17167
  created_at: string;
@@ -17599,7 +18112,7 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
17599
18112
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
17600
18113
  columns: ["monteur_id"];
17601
18114
  isOneToOne: false;
17602
- referencedRelation: "monteurs";
18115
+ referencedRelation: "profiles";
17603
18116
  referencedColumns: ["id"];
17604
18117
  }, {
17605
18118
  foreignKeyName: "work_order_monteurs_work_order_id_fkey";
@@ -17609,6 +18122,60 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
17609
18122
  referencedColumns: ["id"];
17610
18123
  }];
17611
18124
  };
18125
+ work_order_photos: {
18126
+ Row: {
18127
+ ai_caption: string | null;
18128
+ ai_categorized_at: string | null;
18129
+ ai_labels: import("../integrations/supabase/types").Json | null;
18130
+ caption: string | null;
18131
+ created_at: string;
18132
+ id: string;
18133
+ monteur_id: string | null;
18134
+ photo_type: string;
18135
+ storage_path: string;
18136
+ updated_at: string;
18137
+ work_order_id: string;
18138
+ };
18139
+ Insert: {
18140
+ ai_caption?: string | null;
18141
+ ai_categorized_at?: string | null;
18142
+ ai_labels?: import("../integrations/supabase/types").Json | null;
18143
+ caption?: string | null;
18144
+ created_at?: string;
18145
+ id?: string;
18146
+ monteur_id?: string | null;
18147
+ photo_type?: string;
18148
+ storage_path: string;
18149
+ updated_at?: string;
18150
+ work_order_id: string;
18151
+ };
18152
+ Update: {
18153
+ ai_caption?: string | null;
18154
+ ai_categorized_at?: string | null;
18155
+ ai_labels?: import("../integrations/supabase/types").Json | null;
18156
+ caption?: string | null;
18157
+ created_at?: string;
18158
+ id?: string;
18159
+ monteur_id?: string | null;
18160
+ photo_type?: string;
18161
+ storage_path?: string;
18162
+ updated_at?: string;
18163
+ work_order_id?: string;
18164
+ };
18165
+ Relationships: [{
18166
+ foreignKeyName: "work_order_photos_monteur_id_fkey";
18167
+ columns: ["monteur_id"];
18168
+ isOneToOne: false;
18169
+ referencedRelation: "profiles";
18170
+ referencedColumns: ["id"];
18171
+ }, {
18172
+ foreignKeyName: "work_order_photos_work_order_id_fkey";
18173
+ columns: ["work_order_id"];
18174
+ isOneToOne: false;
18175
+ referencedRelation: "work_orders";
18176
+ referencedColumns: ["id"];
18177
+ }];
18178
+ };
17612
18179
  work_orders: {
17613
18180
  Row: {
17614
18181
  assigned_to: string | null;
@@ -17640,7 +18207,6 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
17640
18207
  scheduled_end_time: string | null;
17641
18208
  scheduled_start_time: string | null;
17642
18209
  status: string;
17643
- tenant_id: string;
17644
18210
  total_hours_worked: number | null;
17645
18211
  total_price: number | null;
17646
18212
  travel_time_minutes: number | null;
@@ -17678,7 +18244,6 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
17678
18244
  scheduled_end_time?: string | null;
17679
18245
  scheduled_start_time?: string | null;
17680
18246
  status?: string;
17681
- tenant_id: string;
17682
18247
  total_hours_worked?: number | null;
17683
18248
  total_price?: number | null;
17684
18249
  travel_time_minutes?: number | null;
@@ -17716,7 +18281,6 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
17716
18281
  scheduled_end_time?: string | null;
17717
18282
  scheduled_start_time?: string | null;
17718
18283
  status?: string;
17719
- tenant_id?: string;
17720
18284
  total_hours_worked?: number | null;
17721
18285
  total_price?: number | null;
17722
18286
  travel_time_minutes?: number | null;
@@ -17730,12 +18294,6 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
17730
18294
  isOneToOne: false;
17731
18295
  referencedRelation: "work_orders";
17732
18296
  referencedColumns: ["id"];
17733
- }, {
17734
- foreignKeyName: "work_orders_tenant_id_fkey";
17735
- columns: ["tenant_id"];
17736
- isOneToOne: false;
17737
- referencedRelation: "tenants";
17738
- referencedColumns: ["id"];
17739
18297
  }];
17740
18298
  };
17741
18299
  };
@@ -18420,6 +18978,19 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
18420
18978
  };
18421
18979
  Returns: undefined;
18422
18980
  };
18981
+ approve_mailbox_order_proposal: {
18982
+ Args: {
18983
+ p_custom_fields: import("../integrations/supabase/types").Json;
18984
+ p_customer_id: string;
18985
+ p_delivery_date: string;
18986
+ p_field_values?: import("../integrations/supabase/types").Json;
18987
+ p_lines: import("../integrations/supabase/types").Json;
18988
+ p_notes: string;
18989
+ p_proposal_id: string;
18990
+ p_reviewed_by: string;
18991
+ };
18992
+ Returns: import("../integrations/supabase/types").Json;
18993
+ };
18423
18994
  assign_cart_numbers: {
18424
18995
  Args: {
18425
18996
  p_carts: import("../integrations/supabase/types").Json;
@@ -18471,6 +19042,10 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
18471
19042
  };
18472
19043
  Returns: number;
18473
19044
  };
19045
+ can_manage_hours: {
19046
+ Args: never;
19047
+ Returns: boolean;
19048
+ };
18474
19049
  check_offer_product_available_stock: {
18475
19050
  Args: {
18476
19051
  p_campaign_product_id: string;
@@ -18660,6 +19235,7 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
18660
19235
  };
18661
19236
  Returns: {
18662
19237
  action: string;
19238
+ attempt_started_at: string | null;
18663
19239
  attempts: number;
18664
19240
  connection_id: string | null;
18665
19241
  created_at: string;
@@ -18747,6 +19323,30 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
18747
19323
  agent_naam: string;
18748
19324
  }[];
18749
19325
  };
19326
+ consume_van_inventory: {
19327
+ Args: {
19328
+ p_inventory_id: string;
19329
+ p_quantity: number;
19330
+ };
19331
+ Returns: {
19332
+ barcode: string | null;
19333
+ created_at: string;
19334
+ id: string;
19335
+ monteur_id: string | null;
19336
+ price_per_unit: number;
19337
+ product_name: string;
19338
+ quantity_current: number;
19339
+ quantity_min: number;
19340
+ unit: string;
19341
+ updated_at: string;
19342
+ };
19343
+ SetofOptions: {
19344
+ from: "*";
19345
+ to: "van_inventories";
19346
+ isOneToOne: true;
19347
+ isSetofReturn: false;
19348
+ };
19349
+ };
18750
19350
  control_get_todays_carts: {
18751
19351
  Args: never;
18752
19352
  Returns: {
@@ -18820,6 +19420,13 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
18820
19420
  _user_id: string;
18821
19421
  };
18822
19422
  Returns: string;
19423
+ } | {
19424
+ Args: {
19425
+ _feature_id: string;
19426
+ _module_id: string;
19427
+ _user_id: string;
19428
+ };
19429
+ Returns: string;
18823
19430
  };
18824
19431
  email_auth_decrypt: {
18825
19432
  Args: {
@@ -19171,12 +19778,6 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
19171
19778
  Args: never;
19172
19779
  Returns: string;
19173
19780
  };
19174
- get_work_order_tenant_id: {
19175
- Args: {
19176
- wo_id: string;
19177
- };
19178
- Returns: string;
19179
- };
19180
19781
  has_module_permission: {
19181
19782
  Args: {
19182
19783
  _min: string;
@@ -19210,6 +19811,13 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
19210
19811
  };
19211
19812
  Returns: boolean;
19212
19813
  };
19814
+ is_time_log_week_locked: {
19815
+ Args: {
19816
+ p_employee_id: string;
19817
+ p_start_time: string;
19818
+ };
19819
+ Returns: boolean;
19820
+ };
19213
19821
  is_user_admin: {
19214
19822
  Args: never;
19215
19823
  Returns: boolean;
@@ -19224,13 +19832,14 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
19224
19832
  };
19225
19833
  Returns: boolean;
19226
19834
  };
19227
- list_monteurs: {
19835
+ list_medewerkers: {
19228
19836
  Args: never;
19229
19837
  Returns: {
19230
19838
  avatar_url: string;
19231
19839
  display_name: string;
19232
19840
  email: string;
19233
19841
  id: string;
19842
+ roles: string[];
19234
19843
  }[];
19235
19844
  };
19236
19845
  list_my_planning_items: {
@@ -19721,6 +20330,65 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
19721
20330
  };
19722
20331
  Returns: number;
19723
20332
  };
20333
+ logistics_plan_claim: {
20334
+ Args: {
20335
+ p_limit?: number;
20336
+ };
20337
+ Returns: {
20338
+ attempts: number;
20339
+ id: string;
20340
+ order_id: string;
20341
+ }[];
20342
+ };
20343
+ logistics_plan_enqueue: {
20344
+ Args: {
20345
+ p_order_id: string;
20346
+ p_reason?: string;
20347
+ };
20348
+ Returns: undefined;
20349
+ };
20350
+ logistics_plan_ensure_event: {
20351
+ Args: {
20352
+ p_order_id: string;
20353
+ };
20354
+ Returns: boolean;
20355
+ };
20356
+ logistics_plan_finish: {
20357
+ Args: {
20358
+ p_error?: string;
20359
+ p_id: string;
20360
+ };
20361
+ Returns: undefined;
20362
+ };
20363
+ logistics_plan_impact_orders: {
20364
+ Args: {
20365
+ p_order_id: string;
20366
+ };
20367
+ Returns: {
20368
+ buffer_id: string;
20369
+ order_id: string;
20370
+ plan_date: string;
20371
+ }[];
20372
+ };
20373
+ logistics_plan_kick: {
20374
+ Args: never;
20375
+ Returns: undefined;
20376
+ };
20377
+ logistics_plan_prune: {
20378
+ Args: never;
20379
+ Returns: number;
20380
+ };
20381
+ logistics_plan_release_stale: {
20382
+ Args: never;
20383
+ Returns: number;
20384
+ };
20385
+ logistics_plan_setting: {
20386
+ Args: {
20387
+ p_default: number;
20388
+ p_key: string;
20389
+ };
20390
+ Returns: number;
20391
+ };
19724
20392
  logistics_queue_capacity_email: {
19725
20393
  Args: {
19726
20394
  p_alert_id: string;
@@ -19962,6 +20630,7 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
19962
20630
  my_module_permissions: {
19963
20631
  Args: never;
19964
20632
  Returns: {
20633
+ feature_id: string;
19965
20634
  module_id: string;
19966
20635
  permission: string;
19967
20636
  }[];
@@ -20842,6 +21511,16 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
20842
21511
  };
20843
21512
  Returns: string[];
20844
21513
  };
21514
+ switch_time_log: {
21515
+ Args: {
21516
+ p_employee_id: string;
21517
+ p_start_lat?: number;
21518
+ p_start_lng?: number;
21519
+ p_type: string;
21520
+ p_work_order_id?: string;
21521
+ };
21522
+ Returns: import("../integrations/supabase/types").Json;
21523
+ };
20845
21524
  sync_all_layer_stocks: {
20846
21525
  Args: never;
20847
21526
  Returns: undefined;
@@ -20892,6 +21571,24 @@ export declare const checkOrderStockAllowed: import("@tanstack/start-client-core
20892
21571
  };
20893
21572
  Returns: boolean;
20894
21573
  };
21574
+ twinfield_cron_lock_acquire: {
21575
+ Args: {
21576
+ _job_name: string;
21577
+ _stale_seconds?: number;
21578
+ };
21579
+ Returns: boolean;
21580
+ };
21581
+ twinfield_cron_lock_release: {
21582
+ Args: {
21583
+ _error?: string;
21584
+ _job_name: string;
21585
+ };
21586
+ Returns: undefined;
21587
+ };
21588
+ twinfield_prune_push_queue: {
21589
+ Args: never;
21590
+ Returns: number;
21591
+ };
20895
21592
  twinfield_register_cron: {
20896
21593
  Args: {
20897
21594
  apikey?: string;
@@ -21834,6 +22531,126 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
21834
22531
  };
21835
22532
  Relationships: [];
21836
22533
  };
22534
+ cao_holidays: {
22535
+ Row: {
22536
+ created_at: string;
22537
+ description: string | null;
22538
+ holiday_date: string;
22539
+ id: string;
22540
+ updated_at: string;
22541
+ };
22542
+ Insert: {
22543
+ created_at?: string;
22544
+ description?: string | null;
22545
+ holiday_date: string;
22546
+ id?: string;
22547
+ updated_at?: string;
22548
+ };
22549
+ Update: {
22550
+ created_at?: string;
22551
+ description?: string | null;
22552
+ holiday_date?: string;
22553
+ id?: string;
22554
+ updated_at?: string;
22555
+ };
22556
+ Relationships: [];
22557
+ };
22558
+ cao_settings: {
22559
+ Row: {
22560
+ auto_break_after_hours: number;
22561
+ auto_break_minutes: number;
22562
+ auto_break_unpaid: boolean;
22563
+ auto_stop_after_hours: number;
22564
+ callout_fee: number;
22565
+ created_at: string;
22566
+ daily_regular_hours: number;
22567
+ default_hourly_rate: number;
22568
+ id: string;
22569
+ materials_markup_percent: number;
22570
+ max_daily_hours: number;
22571
+ max_weekly_hours: number;
22572
+ meal_allowance_amount: number;
22573
+ overtime_pct_178: number;
22574
+ overtime_pct_189: number;
22575
+ overtime_pct_212: number;
22576
+ reminder_after_hours: number;
22577
+ standby_evening_amount: number;
22578
+ standby_weekend_amount: number;
22579
+ travel_cost_per_km: number | null;
22580
+ travel_cost_threshold_km: number | null;
22581
+ travel_counts_as_work: boolean;
22582
+ travel_hourly_rate: number;
22583
+ travel_rate_per_hour: number;
22584
+ travel_threshold_minutes: number;
22585
+ updated_at: string;
22586
+ weekend_always_212: boolean;
22587
+ window_end: string;
22588
+ window_start: string;
22589
+ };
22590
+ Insert: {
22591
+ auto_break_after_hours?: number;
22592
+ auto_break_minutes?: number;
22593
+ auto_break_unpaid?: boolean;
22594
+ auto_stop_after_hours?: number;
22595
+ callout_fee?: number;
22596
+ created_at?: string;
22597
+ daily_regular_hours?: number;
22598
+ default_hourly_rate?: number;
22599
+ id?: string;
22600
+ materials_markup_percent?: number;
22601
+ max_daily_hours?: number;
22602
+ max_weekly_hours?: number;
22603
+ meal_allowance_amount?: number;
22604
+ overtime_pct_178?: number;
22605
+ overtime_pct_189?: number;
22606
+ overtime_pct_212?: number;
22607
+ reminder_after_hours?: number;
22608
+ standby_evening_amount?: number;
22609
+ standby_weekend_amount?: number;
22610
+ travel_cost_per_km?: number | null;
22611
+ travel_cost_threshold_km?: number | null;
22612
+ travel_counts_as_work?: boolean;
22613
+ travel_hourly_rate?: number;
22614
+ travel_rate_per_hour?: number;
22615
+ travel_threshold_minutes?: number;
22616
+ updated_at?: string;
22617
+ weekend_always_212?: boolean;
22618
+ window_end?: string;
22619
+ window_start?: string;
22620
+ };
22621
+ Update: {
22622
+ auto_break_after_hours?: number;
22623
+ auto_break_minutes?: number;
22624
+ auto_break_unpaid?: boolean;
22625
+ auto_stop_after_hours?: number;
22626
+ callout_fee?: number;
22627
+ created_at?: string;
22628
+ daily_regular_hours?: number;
22629
+ default_hourly_rate?: number;
22630
+ id?: string;
22631
+ materials_markup_percent?: number;
22632
+ max_daily_hours?: number;
22633
+ max_weekly_hours?: number;
22634
+ meal_allowance_amount?: number;
22635
+ overtime_pct_178?: number;
22636
+ overtime_pct_189?: number;
22637
+ overtime_pct_212?: number;
22638
+ reminder_after_hours?: number;
22639
+ standby_evening_amount?: number;
22640
+ standby_weekend_amount?: number;
22641
+ travel_cost_per_km?: number | null;
22642
+ travel_cost_threshold_km?: number | null;
22643
+ travel_counts_as_work?: boolean;
22644
+ travel_hourly_rate?: number;
22645
+ travel_rate_per_hour?: number;
22646
+ travel_threshold_minutes?: number;
22647
+ updated_at?: string;
22648
+ weekend_always_212?: boolean;
22649
+ window_end?: string;
22650
+ window_start?: string;
22651
+ };
22652
+ Relationships: [];
22653
+ };
21837
22654
  carrier_shipping_rates: {
21838
22655
  Row: {
21839
22656
  carrier_id: string;
@@ -28728,7 +29545,6 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
28728
29545
  start_date: string;
28729
29546
  start_time: string | null;
28730
29547
  status: string;
28731
- tenant_id: string;
28732
29548
  updated_at: string;
28733
29549
  user_id: string;
28734
29550
  };
@@ -28746,7 +29562,6 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
28746
29562
  start_date: string;
28747
29563
  start_time?: string | null;
28748
29564
  status?: string;
28749
- tenant_id?: string;
28750
29565
  updated_at?: string;
28751
29566
  user_id: string;
28752
29567
  };
@@ -28764,7 +29579,6 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
28764
29579
  start_date?: string;
28765
29580
  start_time?: string | null;
28766
29581
  status?: string;
28767
- tenant_id?: string;
28768
29582
  updated_at?: string;
28769
29583
  user_id?: string;
28770
29584
  };
@@ -28772,13 +29586,13 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
28772
29586
  foreignKeyName: "leave_requests_monteur_id_fkey";
28773
29587
  columns: ["monteur_id"];
28774
29588
  isOneToOne: false;
28775
- referencedRelation: "monteurs";
29589
+ referencedRelation: "profiles";
28776
29590
  referencedColumns: ["id"];
28777
29591
  }, {
28778
29592
  foreignKeyName: "leave_requests_user_id_fkey";
28779
29593
  columns: ["user_id"];
28780
29594
  isOneToOne: false;
28781
- referencedRelation: "monteurs";
29595
+ referencedRelation: "profiles";
28782
29596
  referencedColumns: ["id"];
28783
29597
  }];
28784
29598
  };
@@ -29646,6 +30460,45 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
29646
30460
  };
29647
30461
  Relationships: [];
29648
30462
  };
30463
+ logistics_plan_queue: {
30464
+ Row: {
30465
+ attempts: number;
30466
+ claimed_at: string | null;
30467
+ enqueued_at: string;
30468
+ error: string | null;
30469
+ id: string;
30470
+ next_attempt_at: string;
30471
+ order_id: string;
30472
+ reason: string;
30473
+ status: string;
30474
+ updated_at: string;
30475
+ };
30476
+ Insert: {
30477
+ attempts?: number;
30478
+ claimed_at?: string | null;
30479
+ enqueued_at?: string;
30480
+ error?: string | null;
30481
+ id?: string;
30482
+ next_attempt_at?: string;
30483
+ order_id: string;
30484
+ reason?: string;
30485
+ status?: string;
30486
+ updated_at?: string;
30487
+ };
30488
+ Update: {
30489
+ attempts?: number;
30490
+ claimed_at?: string | null;
30491
+ enqueued_at?: string;
30492
+ error?: string | null;
30493
+ id?: string;
30494
+ next_attempt_at?: string;
30495
+ order_id?: string;
30496
+ reason?: string;
30497
+ status?: string;
30498
+ updated_at?: string;
30499
+ };
30500
+ Relationships: [];
30501
+ };
29649
30502
  logistics_plan_runs: {
29650
30503
  Row: {
29651
30504
  created_at: string;
@@ -29721,6 +30574,24 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
29721
30574
  referencedColumns: ["id"];
29722
30575
  }];
29723
30576
  };
30577
+ logistics_plan_settings: {
30578
+ Row: {
30579
+ key: string;
30580
+ updated_at: string;
30581
+ value: string;
30582
+ };
30583
+ Insert: {
30584
+ key: string;
30585
+ updated_at?: string;
30586
+ value: string;
30587
+ };
30588
+ Update: {
30589
+ key?: string;
30590
+ updated_at?: string;
30591
+ value?: string;
30592
+ };
30593
+ Relationships: [];
30594
+ };
29724
30595
  logistics_rebuffer_state: {
29725
30596
  Row: {
29726
30597
  created_at: string;
@@ -30876,6 +31747,90 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
30876
31747
  };
30877
31748
  Relationships: [];
30878
31749
  };
31750
+ material_usage: {
31751
+ Row: {
31752
+ created_at: string;
31753
+ id: string;
31754
+ material_name: string;
31755
+ monteur_id: string | null;
31756
+ price_at_time: number;
31757
+ quantity_used: number;
31758
+ updated_at: string;
31759
+ van_inventory_id: string | null;
31760
+ work_order_id: string;
31761
+ };
31762
+ Insert: {
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
+ Update: {
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
+ Relationships: [{
31785
+ foreignKeyName: "material_usage_monteur_id_fkey";
31786
+ columns: ["monteur_id"];
31787
+ isOneToOne: false;
31788
+ referencedRelation: "profiles";
31789
+ referencedColumns: ["id"];
31790
+ }, {
31791
+ foreignKeyName: "material_usage_van_inventory_id_fkey";
31792
+ columns: ["van_inventory_id"];
31793
+ isOneToOne: false;
31794
+ referencedRelation: "van_inventories";
31795
+ referencedColumns: ["id"];
31796
+ }, {
31797
+ foreignKeyName: "material_usage_work_order_id_fkey";
31798
+ columns: ["work_order_id"];
31799
+ isOneToOne: false;
31800
+ referencedRelation: "work_orders";
31801
+ referencedColumns: ["id"];
31802
+ }];
31803
+ };
31804
+ module_features: {
31805
+ Row: {
31806
+ created_at: string;
31807
+ feature_id: string;
31808
+ id: string;
31809
+ is_active: boolean;
31810
+ last_seen_at: string;
31811
+ module_id: string;
31812
+ name: string;
31813
+ };
31814
+ Insert: {
31815
+ created_at?: string;
31816
+ feature_id: string;
31817
+ id?: string;
31818
+ is_active?: boolean;
31819
+ last_seen_at?: string;
31820
+ module_id: string;
31821
+ name: string;
31822
+ };
31823
+ Update: {
31824
+ created_at?: string;
31825
+ feature_id?: string;
31826
+ id?: string;
31827
+ is_active?: boolean;
31828
+ last_seen_at?: string;
31829
+ module_id?: string;
31830
+ name?: string;
31831
+ };
31832
+ Relationships: [];
31833
+ };
30879
31834
  module_permissions: {
30880
31835
  Row: {
30881
31836
  created_at: string;
@@ -30906,6 +31861,7 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
30906
31861
  module_registry: {
30907
31862
  Row: {
30908
31863
  created_at: string;
31864
+ enforce: boolean;
30909
31865
  is_active: boolean;
30910
31866
  last_seen_at: string;
30911
31867
  module_id: string;
@@ -30915,6 +31871,7 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
30915
31871
  };
30916
31872
  Insert: {
30917
31873
  created_at?: string;
31874
+ enforce?: boolean;
30918
31875
  is_active?: boolean;
30919
31876
  last_seen_at?: string;
30920
31877
  module_id: string;
@@ -30924,6 +31881,7 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
30924
31881
  };
30925
31882
  Update: {
30926
31883
  created_at?: string;
31884
+ enforce?: boolean;
30927
31885
  is_active?: boolean;
30928
31886
  last_seen_at?: string;
30929
31887
  module_id?: string;
@@ -30984,63 +31942,6 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
30984
31942
  };
30985
31943
  Relationships: [];
30986
31944
  };
30987
- monteurs: {
30988
- Row: {
30989
- avatar_url: string | null;
30990
- color: string | null;
30991
- created_at: string;
30992
- email: string | null;
30993
- id: string;
30994
- is_active: boolean;
30995
- leave_balance_hours: number;
30996
- name: string;
30997
- persnr: number | null;
30998
- phone: string | null;
30999
- role: string;
31000
- tenant_id: string;
31001
- updated_at: string;
31002
- user_id: string | null;
31003
- };
31004
- Insert: {
31005
- avatar_url?: string | null;
31006
- color?: string | null;
31007
- created_at?: string;
31008
- email?: string | null;
31009
- id?: string;
31010
- is_active?: boolean;
31011
- leave_balance_hours?: number;
31012
- name: string;
31013
- persnr?: number | null;
31014
- phone?: string | null;
31015
- role?: string;
31016
- tenant_id: string;
31017
- updated_at?: string;
31018
- user_id?: string | null;
31019
- };
31020
- Update: {
31021
- avatar_url?: string | null;
31022
- color?: string | null;
31023
- created_at?: string;
31024
- email?: string | null;
31025
- id?: string;
31026
- is_active?: boolean;
31027
- leave_balance_hours?: number;
31028
- name?: string;
31029
- persnr?: number | null;
31030
- phone?: string | null;
31031
- role?: string;
31032
- tenant_id?: string;
31033
- updated_at?: string;
31034
- user_id?: string | null;
31035
- };
31036
- Relationships: [{
31037
- foreignKeyName: "monteurs_tenant_id_fkey";
31038
- columns: ["tenant_id"];
31039
- isOneToOne: false;
31040
- referencedRelation: "tenants";
31041
- referencedColumns: ["id"];
31042
- }];
31043
- };
31044
31945
  nmbrs_component_mapping: {
31045
31946
  Row: {
31046
31947
  created_at: string;
@@ -31111,13 +32012,7 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
31111
32012
  nmbrs_employee_number?: string;
31112
32013
  updated_at?: string;
31113
32014
  };
31114
- Relationships: [{
31115
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
31116
- columns: ["monteur_id"];
31117
- isOneToOne: true;
31118
- referencedRelation: "monteurs";
31119
- referencedColumns: ["id"];
31120
- }];
32015
+ Relationships: [];
31121
32016
  };
31122
32017
  nmbrs_export_lines: {
31123
32018
  Row: {
@@ -31166,12 +32061,6 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
31166
32061
  wage_code?: string;
31167
32062
  };
31168
32063
  Relationships: [{
31169
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
31170
- columns: ["monteur_id"];
31171
- isOneToOne: false;
31172
- referencedRelation: "monteurs";
31173
- referencedColumns: ["id"];
31174
- }, {
31175
32064
  foreignKeyName: "nmbrs_export_lines_run_id_fkey";
31176
32065
  columns: ["run_id"];
31177
32066
  isOneToOne: false;
@@ -31999,6 +32888,7 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
31999
32888
  error_message: string | null;
32000
32889
  id: string;
32001
32890
  invoice_number: string | null;
32891
+ next_attempt_at: string;
32002
32892
  order_id: string;
32003
32893
  processed_at: string | null;
32004
32894
  status: string;
@@ -32010,6 +32900,7 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
32010
32900
  error_message?: string | null;
32011
32901
  id?: string;
32012
32902
  invoice_number?: string | null;
32903
+ next_attempt_at?: string;
32013
32904
  order_id: string;
32014
32905
  processed_at?: string | null;
32015
32906
  status?: string;
@@ -32021,6 +32912,7 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
32021
32912
  error_message?: string | null;
32022
32913
  id?: string;
32023
32914
  invoice_number?: string | null;
32915
+ next_attempt_at?: string;
32024
32916
  order_id?: string;
32025
32917
  processed_at?: string | null;
32026
32918
  status?: string;
@@ -33559,6 +34451,9 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
33559
34451
  created_at: string;
33560
34452
  id: string;
33561
34453
  laatst_gezien: string;
34454
+ laatste_fout: string | null;
34455
+ laatste_request_id: number | null;
34456
+ mislukte_posts: number;
33562
34457
  tick_sleutel: string;
33563
34458
  updated_at: string;
33564
34459
  };
@@ -33568,6 +34463,9 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
33568
34463
  created_at?: string;
33569
34464
  id?: string;
33570
34465
  laatst_gezien?: string;
34466
+ laatste_fout?: string | null;
34467
+ laatste_request_id?: number | null;
34468
+ mislukte_posts?: number;
33571
34469
  tick_sleutel?: string;
33572
34470
  updated_at?: string;
33573
34471
  };
@@ -33577,6 +34475,9 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
33577
34475
  created_at?: string;
33578
34476
  id?: string;
33579
34477
  laatst_gezien?: string;
34478
+ laatste_fout?: string | null;
34479
+ laatste_request_id?: number | null;
34480
+ mislukte_posts?: number;
33580
34481
  tick_sleutel?: string;
33581
34482
  updated_at?: string;
33582
34483
  };
@@ -35085,6 +35986,96 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
35085
35986
  referencedColumns: ["id"];
35086
35987
  }];
35087
35988
  };
35989
+ role_assignments: {
35990
+ Row: {
35991
+ created_at: string;
35992
+ id: string;
35993
+ role_id: string;
35994
+ user_id: string;
35995
+ };
35996
+ Insert: {
35997
+ created_at?: string;
35998
+ id?: string;
35999
+ role_id: string;
36000
+ user_id: string;
36001
+ };
36002
+ Update: {
36003
+ created_at?: string;
36004
+ id?: string;
36005
+ role_id?: string;
36006
+ user_id?: string;
36007
+ };
36008
+ Relationships: [{
36009
+ foreignKeyName: "role_assignments_role_id_fkey";
36010
+ columns: ["role_id"];
36011
+ isOneToOne: false;
36012
+ referencedRelation: "roles";
36013
+ referencedColumns: ["id"];
36014
+ }];
36015
+ };
36016
+ role_permissions: {
36017
+ Row: {
36018
+ can_edit: boolean;
36019
+ can_view: boolean;
36020
+ feature_id: string;
36021
+ id: string;
36022
+ module_id: string;
36023
+ role_id: string;
36024
+ updated_at: string;
36025
+ };
36026
+ Insert: {
36027
+ can_edit?: boolean;
36028
+ can_view?: boolean;
36029
+ feature_id?: string;
36030
+ id?: string;
36031
+ module_id: string;
36032
+ role_id: string;
36033
+ updated_at?: string;
36034
+ };
36035
+ Update: {
36036
+ can_edit?: boolean;
36037
+ can_view?: boolean;
36038
+ feature_id?: string;
36039
+ id?: string;
36040
+ module_id?: string;
36041
+ role_id?: string;
36042
+ updated_at?: string;
36043
+ };
36044
+ Relationships: [{
36045
+ foreignKeyName: "role_permissions_role_id_fkey";
36046
+ columns: ["role_id"];
36047
+ isOneToOne: false;
36048
+ referencedRelation: "roles";
36049
+ referencedColumns: ["id"];
36050
+ }];
36051
+ };
36052
+ roles: {
36053
+ Row: {
36054
+ created_at: string;
36055
+ id: string;
36056
+ is_protected: boolean;
36057
+ key: string;
36058
+ name: string;
36059
+ updated_at: string;
36060
+ };
36061
+ Insert: {
36062
+ created_at?: string;
36063
+ id?: string;
36064
+ is_protected?: boolean;
36065
+ key: string;
36066
+ name: string;
36067
+ updated_at?: string;
36068
+ };
36069
+ Update: {
36070
+ created_at?: string;
36071
+ id?: string;
36072
+ is_protected?: boolean;
36073
+ key?: string;
36074
+ name?: string;
36075
+ updated_at?: string;
36076
+ };
36077
+ Relationships: [];
36078
+ };
35088
36079
  rooms: {
35089
36080
  Row: {
35090
36081
  capacity: number;
@@ -35754,6 +36745,54 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
35754
36745
  };
35755
36746
  Relationships: [];
35756
36747
  };
36748
+ time_compensation_entries: {
36749
+ Row: {
36750
+ created_at: string;
36751
+ employee_id: string;
36752
+ entry_date: string;
36753
+ id: string;
36754
+ km: number;
36755
+ meal_allowance: number;
36756
+ notes: string | null;
36757
+ standby_evening: number;
36758
+ standby_weekend: number;
36759
+ tvt_change: number;
36760
+ updated_at: string;
36761
+ };
36762
+ Insert: {
36763
+ created_at?: string;
36764
+ employee_id: string;
36765
+ entry_date: string;
36766
+ id?: string;
36767
+ km?: number;
36768
+ meal_allowance?: number;
36769
+ notes?: string | null;
36770
+ standby_evening?: number;
36771
+ standby_weekend?: number;
36772
+ tvt_change?: number;
36773
+ updated_at?: string;
36774
+ };
36775
+ Update: {
36776
+ created_at?: string;
36777
+ employee_id?: string;
36778
+ entry_date?: string;
36779
+ id?: string;
36780
+ km?: number;
36781
+ meal_allowance?: number;
36782
+ notes?: string | null;
36783
+ standby_evening?: number;
36784
+ standby_weekend?: number;
36785
+ tvt_change?: number;
36786
+ updated_at?: string;
36787
+ };
36788
+ Relationships: [{
36789
+ foreignKeyName: "time_compensation_entries_employee_id_fkey";
36790
+ columns: ["employee_id"];
36791
+ isOneToOne: false;
36792
+ referencedRelation: "profiles";
36793
+ referencedColumns: ["id"];
36794
+ }];
36795
+ };
35757
36796
  time_entries: {
35758
36797
  Row: {
35759
36798
  created_at: string;
@@ -35788,65 +36827,170 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
35788
36827
  undertime?: number;
35789
36828
  updated_at?: string;
35790
36829
  };
36830
+ Relationships: [];
36831
+ };
36832
+ time_log_week_approvals: {
36833
+ Row: {
36834
+ approved_at: string | null;
36835
+ approved_by: string | null;
36836
+ created_at: string;
36837
+ employee_id: string;
36838
+ id: string;
36839
+ locked: boolean;
36840
+ notes: string | null;
36841
+ status: string;
36842
+ submitted_at: string | null;
36843
+ updated_at: string;
36844
+ week_start: string;
36845
+ };
36846
+ Insert: {
36847
+ approved_at?: string | null;
36848
+ approved_by?: string | null;
36849
+ created_at?: string;
36850
+ employee_id: string;
36851
+ id?: string;
36852
+ locked?: boolean;
36853
+ notes?: string | null;
36854
+ status?: string;
36855
+ submitted_at?: string | null;
36856
+ updated_at?: string;
36857
+ week_start: string;
36858
+ };
36859
+ Update: {
36860
+ approved_at?: string | null;
36861
+ approved_by?: string | null;
36862
+ created_at?: string;
36863
+ employee_id?: string;
36864
+ id?: string;
36865
+ locked?: boolean;
36866
+ notes?: string | null;
36867
+ status?: string;
36868
+ submitted_at?: string | null;
36869
+ updated_at?: string;
36870
+ week_start?: string;
36871
+ };
35791
36872
  Relationships: [{
35792
- foreignKeyName: "time_entries_employee_id_fkey";
36873
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
35793
36874
  columns: ["employee_id"];
35794
36875
  isOneToOne: false;
35795
- referencedRelation: "monteurs";
36876
+ referencedRelation: "profiles";
35796
36877
  referencedColumns: ["id"];
35797
36878
  }];
35798
36879
  };
35799
36880
  time_logs: {
35800
36881
  Row: {
36882
+ auto_stop_reason: string | null;
36883
+ auto_stopped: boolean;
35801
36884
  created_at: string;
36885
+ current_latitude: number | null;
36886
+ current_longitude: number | null;
36887
+ current_position_updated_at: string | null;
35802
36888
  employee_id: string;
36889
+ end_latitude: number | null;
36890
+ end_longitude: number | null;
35803
36891
  end_time: string | null;
36892
+ eta_distance_km: number | null;
36893
+ eta_minutes: number | null;
36894
+ eta_updated_at: string | null;
36895
+ hour_category: string | null;
35804
36896
  id: string;
36897
+ last_reminder_at: string | null;
35805
36898
  notes: string | null;
35806
36899
  overtime_hours: number;
35807
36900
  overtime_type: string | null;
35808
36901
  regular_hours: number;
36902
+ reminder_count: number;
36903
+ requires_review: boolean;
36904
+ start_latitude: number | null;
36905
+ start_longitude: number | null;
35809
36906
  start_time: string;
35810
36907
  travel_cost: number | null;
35811
36908
  travel_distance_km: number | null;
36909
+ travel_duration_min: number | null;
36910
+ travel_time_minutes: number | null;
35812
36911
  type: string;
35813
36912
  updated_at: string;
36913
+ work_order_id: string | null;
35814
36914
  };
35815
36915
  Insert: {
36916
+ auto_stop_reason?: string | null;
36917
+ auto_stopped?: boolean;
35816
36918
  created_at?: string;
36919
+ current_latitude?: number | null;
36920
+ current_longitude?: number | null;
36921
+ current_position_updated_at?: string | null;
35817
36922
  employee_id: string;
36923
+ end_latitude?: number | null;
36924
+ end_longitude?: number | null;
35818
36925
  end_time?: string | null;
36926
+ eta_distance_km?: number | null;
36927
+ eta_minutes?: number | null;
36928
+ eta_updated_at?: string | null;
36929
+ hour_category?: string | null;
35819
36930
  id?: string;
36931
+ last_reminder_at?: string | null;
35820
36932
  notes?: string | null;
35821
36933
  overtime_hours?: number;
35822
36934
  overtime_type?: string | null;
35823
36935
  regular_hours?: number;
36936
+ reminder_count?: number;
36937
+ requires_review?: boolean;
36938
+ start_latitude?: number | null;
36939
+ start_longitude?: number | null;
35824
36940
  start_time?: string;
35825
36941
  travel_cost?: number | null;
35826
36942
  travel_distance_km?: number | null;
36943
+ travel_duration_min?: number | null;
36944
+ travel_time_minutes?: number | null;
35827
36945
  type: string;
35828
36946
  updated_at?: string;
36947
+ work_order_id?: string | null;
35829
36948
  };
35830
36949
  Update: {
36950
+ auto_stop_reason?: string | null;
36951
+ auto_stopped?: boolean;
35831
36952
  created_at?: string;
36953
+ current_latitude?: number | null;
36954
+ current_longitude?: number | null;
36955
+ current_position_updated_at?: string | null;
35832
36956
  employee_id?: string;
36957
+ end_latitude?: number | null;
36958
+ end_longitude?: number | null;
35833
36959
  end_time?: string | null;
36960
+ eta_distance_km?: number | null;
36961
+ eta_minutes?: number | null;
36962
+ eta_updated_at?: string | null;
36963
+ hour_category?: string | null;
35834
36964
  id?: string;
36965
+ last_reminder_at?: string | null;
35835
36966
  notes?: string | null;
35836
36967
  overtime_hours?: number;
35837
36968
  overtime_type?: string | null;
35838
36969
  regular_hours?: number;
36970
+ reminder_count?: number;
36971
+ requires_review?: boolean;
36972
+ start_latitude?: number | null;
36973
+ start_longitude?: number | null;
35839
36974
  start_time?: string;
35840
36975
  travel_cost?: number | null;
35841
36976
  travel_distance_km?: number | null;
36977
+ travel_duration_min?: number | null;
36978
+ travel_time_minutes?: number | null;
35842
36979
  type?: string;
35843
36980
  updated_at?: string;
36981
+ work_order_id?: string | null;
35844
36982
  };
35845
36983
  Relationships: [{
35846
36984
  foreignKeyName: "time_logs_employee_id_fkey";
35847
36985
  columns: ["employee_id"];
35848
36986
  isOneToOne: false;
35849
- referencedRelation: "monteurs";
36987
+ referencedRelation: "profiles";
36988
+ referencedColumns: ["id"];
36989
+ }, {
36990
+ foreignKeyName: "time_logs_work_order_id_fkey";
36991
+ columns: ["work_order_id"];
36992
+ isOneToOne: false;
36993
+ referencedRelation: "work_orders";
35850
36994
  referencedColumns: ["id"];
35851
36995
  }];
35852
36996
  };
@@ -35885,7 +37029,7 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
35885
37029
  foreignKeyName: "time_off_entries_employee_id_fkey";
35886
37030
  columns: ["employee_id"];
35887
37031
  isOneToOne: false;
35888
- referencedRelation: "monteurs";
37032
+ referencedRelation: "profiles";
35889
37033
  referencedColumns: ["id"];
35890
37034
  }];
35891
37035
  };
@@ -36195,6 +37339,39 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
36195
37339
  };
36196
37340
  Relationships: [];
36197
37341
  };
37342
+ twinfield_cron_locks: {
37343
+ Row: {
37344
+ created_at: string;
37345
+ heartbeat_at: string;
37346
+ job_name: string;
37347
+ last_error: string | null;
37348
+ last_finished_at: string | null;
37349
+ locked_at: string;
37350
+ run_id: string;
37351
+ updated_at: string;
37352
+ };
37353
+ Insert: {
37354
+ created_at?: string;
37355
+ heartbeat_at?: string;
37356
+ job_name: string;
37357
+ last_error?: string | null;
37358
+ last_finished_at?: string | null;
37359
+ locked_at?: string;
37360
+ run_id?: string;
37361
+ updated_at?: string;
37362
+ };
37363
+ Update: {
37364
+ created_at?: string;
37365
+ heartbeat_at?: string;
37366
+ job_name?: string;
37367
+ last_error?: string | null;
37368
+ last_finished_at?: string | null;
37369
+ locked_at?: string;
37370
+ run_id?: string;
37371
+ updated_at?: string;
37372
+ };
37373
+ Relationships: [];
37374
+ };
36198
37375
  twinfield_customers: {
36199
37376
  Row: {
36200
37377
  address: string | null;
@@ -36795,6 +37972,7 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
36795
37972
  twinfield_push_queue: {
36796
37973
  Row: {
36797
37974
  action: string;
37975
+ attempt_started_at: string | null;
36798
37976
  attempts: number;
36799
37977
  connection_id: string | null;
36800
37978
  created_at: string;
@@ -36811,6 +37989,7 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
36811
37989
  };
36812
37990
  Insert: {
36813
37991
  action?: string;
37992
+ attempt_started_at?: string | null;
36814
37993
  attempts?: number;
36815
37994
  connection_id?: string | null;
36816
37995
  created_at?: string;
@@ -36827,6 +38006,7 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
36827
38006
  };
36828
38007
  Update: {
36829
38008
  action?: string;
38009
+ attempt_started_at?: string | null;
36830
38010
  attempts?: number;
36831
38011
  connection_id?: string | null;
36832
38012
  created_at?: string;
@@ -37024,13 +38204,7 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
37024
38204
  workday_end?: string | null;
37025
38205
  workday_start?: string | null;
37026
38206
  };
37027
- Relationships: [{
37028
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
37029
- columns: ["monteur_id"];
37030
- isOneToOne: true;
37031
- referencedRelation: "monteurs";
37032
- referencedColumns: ["id"];
37033
- }];
38207
+ Relationships: [];
37034
38208
  };
37035
38209
  uren_entries: {
37036
38210
  Row: {
@@ -37076,12 +38250,6 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
37076
38250
  werkbon_id?: string | null;
37077
38251
  };
37078
38252
  Relationships: [{
37079
- foreignKeyName: "uren_entries_monteur_id_fkey";
37080
- columns: ["monteur_id"];
37081
- isOneToOne: false;
37082
- referencedRelation: "monteurs";
37083
- referencedColumns: ["id"];
37084
- }, {
37085
38253
  foreignKeyName: "uren_entries_werkbon_id_fkey";
37086
38254
  columns: ["werkbon_id"];
37087
38255
  isOneToOne: false;
@@ -37549,17 +38717,12 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
37549
38717
  submitted_at?: string | null;
37550
38718
  updated_at?: string;
37551
38719
  };
37552
- Relationships: [{
37553
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
37554
- columns: ["monteur_id"];
37555
- isOneToOne: false;
37556
- referencedRelation: "monteurs";
37557
- referencedColumns: ["id"];
37558
- }];
38720
+ Relationships: [];
37559
38721
  };
37560
38722
  user_module_permissions: {
37561
38723
  Row: {
37562
38724
  created_at: string;
38725
+ feature_id: string;
37563
38726
  id: string;
37564
38727
  module_id: string;
37565
38728
  permission: string;
@@ -37568,6 +38731,7 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
37568
38731
  };
37569
38732
  Insert: {
37570
38733
  created_at?: string;
38734
+ feature_id?: string;
37571
38735
  id?: string;
37572
38736
  module_id: string;
37573
38737
  permission: string;
@@ -37576,6 +38740,7 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
37576
38740
  };
37577
38741
  Update: {
37578
38742
  created_at?: string;
38743
+ feature_id?: string;
37579
38744
  id?: string;
37580
38745
  module_id?: string;
37581
38746
  permission?: string;
@@ -37611,6 +38776,51 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
37611
38776
  referencedColumns: ["id"];
37612
38777
  }];
37613
38778
  };
38779
+ van_inventories: {
38780
+ Row: {
38781
+ barcode: string | null;
38782
+ created_at: string;
38783
+ id: string;
38784
+ monteur_id: string | null;
38785
+ price_per_unit: number;
38786
+ product_name: string;
38787
+ quantity_current: number;
38788
+ quantity_min: number;
38789
+ unit: string;
38790
+ updated_at: string;
38791
+ };
38792
+ Insert: {
38793
+ barcode?: string | null;
38794
+ created_at?: string;
38795
+ id?: string;
38796
+ monteur_id?: string | null;
38797
+ price_per_unit?: number;
38798
+ product_name: string;
38799
+ quantity_current?: number;
38800
+ quantity_min?: number;
38801
+ unit?: string;
38802
+ updated_at?: string;
38803
+ };
38804
+ Update: {
38805
+ barcode?: string | null;
38806
+ created_at?: string;
38807
+ id?: string;
38808
+ monteur_id?: string | null;
38809
+ price_per_unit?: number;
38810
+ product_name?: string;
38811
+ quantity_current?: number;
38812
+ quantity_min?: number;
38813
+ unit?: string;
38814
+ updated_at?: string;
38815
+ };
38816
+ Relationships: [{
38817
+ foreignKeyName: "van_inventories_monteur_id_fkey";
38818
+ columns: ["monteur_id"];
38819
+ isOneToOne: false;
38820
+ referencedRelation: "profiles";
38821
+ referencedColumns: ["id"];
38822
+ }];
38823
+ };
37614
38824
  voorraad_custom_fields: {
37615
38825
  Row: {
37616
38826
  created_at: string;
@@ -38561,7 +39771,7 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
38561
39771
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
38562
39772
  columns: ["monteur_id"];
38563
39773
  isOneToOne: false;
38564
- referencedRelation: "monteurs";
39774
+ referencedRelation: "profiles";
38565
39775
  referencedColumns: ["id"];
38566
39776
  }, {
38567
39777
  foreignKeyName: "work_order_monteurs_work_order_id_fkey";
@@ -38571,6 +39781,60 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
38571
39781
  referencedColumns: ["id"];
38572
39782
  }];
38573
39783
  };
39784
+ work_order_photos: {
39785
+ Row: {
39786
+ ai_caption: string | null;
39787
+ ai_categorized_at: string | null;
39788
+ ai_labels: import("../integrations/supabase/types").Json | null;
39789
+ caption: string | null;
39790
+ created_at: string;
39791
+ id: string;
39792
+ monteur_id: string | null;
39793
+ photo_type: string;
39794
+ storage_path: string;
39795
+ updated_at: string;
39796
+ work_order_id: string;
39797
+ };
39798
+ Insert: {
39799
+ ai_caption?: string | null;
39800
+ ai_categorized_at?: string | null;
39801
+ ai_labels?: import("../integrations/supabase/types").Json | null;
39802
+ caption?: string | null;
39803
+ created_at?: string;
39804
+ id?: string;
39805
+ monteur_id?: string | null;
39806
+ photo_type?: string;
39807
+ storage_path: string;
39808
+ updated_at?: string;
39809
+ work_order_id: string;
39810
+ };
39811
+ Update: {
39812
+ ai_caption?: string | null;
39813
+ ai_categorized_at?: string | null;
39814
+ ai_labels?: import("../integrations/supabase/types").Json | null;
39815
+ caption?: string | null;
39816
+ created_at?: string;
39817
+ id?: string;
39818
+ monteur_id?: string | null;
39819
+ photo_type?: string;
39820
+ storage_path?: string;
39821
+ updated_at?: string;
39822
+ work_order_id?: string;
39823
+ };
39824
+ Relationships: [{
39825
+ foreignKeyName: "work_order_photos_monteur_id_fkey";
39826
+ columns: ["monteur_id"];
39827
+ isOneToOne: false;
39828
+ referencedRelation: "profiles";
39829
+ referencedColumns: ["id"];
39830
+ }, {
39831
+ foreignKeyName: "work_order_photos_work_order_id_fkey";
39832
+ columns: ["work_order_id"];
39833
+ isOneToOne: false;
39834
+ referencedRelation: "work_orders";
39835
+ referencedColumns: ["id"];
39836
+ }];
39837
+ };
38574
39838
  work_orders: {
38575
39839
  Row: {
38576
39840
  assigned_to: string | null;
@@ -38602,7 +39866,6 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
38602
39866
  scheduled_end_time: string | null;
38603
39867
  scheduled_start_time: string | null;
38604
39868
  status: string;
38605
- tenant_id: string;
38606
39869
  total_hours_worked: number | null;
38607
39870
  total_price: number | null;
38608
39871
  travel_time_minutes: number | null;
@@ -38640,7 +39903,6 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
38640
39903
  scheduled_end_time?: string | null;
38641
39904
  scheduled_start_time?: string | null;
38642
39905
  status?: string;
38643
- tenant_id: string;
38644
39906
  total_hours_worked?: number | null;
38645
39907
  total_price?: number | null;
38646
39908
  travel_time_minutes?: number | null;
@@ -38678,7 +39940,6 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
38678
39940
  scheduled_end_time?: string | null;
38679
39941
  scheduled_start_time?: string | null;
38680
39942
  status?: string;
38681
- tenant_id?: string;
38682
39943
  total_hours_worked?: number | null;
38683
39944
  total_price?: number | null;
38684
39945
  travel_time_minutes?: number | null;
@@ -38692,12 +39953,6 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
38692
39953
  isOneToOne: false;
38693
39954
  referencedRelation: "work_orders";
38694
39955
  referencedColumns: ["id"];
38695
- }, {
38696
- foreignKeyName: "work_orders_tenant_id_fkey";
38697
- columns: ["tenant_id"];
38698
- isOneToOne: false;
38699
- referencedRelation: "tenants";
38700
- referencedColumns: ["id"];
38701
39956
  }];
38702
39957
  };
38703
39958
  };
@@ -39382,6 +40637,19 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
39382
40637
  };
39383
40638
  Returns: undefined;
39384
40639
  };
40640
+ approve_mailbox_order_proposal: {
40641
+ Args: {
40642
+ p_custom_fields: import("../integrations/supabase/types").Json;
40643
+ p_customer_id: string;
40644
+ p_delivery_date: string;
40645
+ p_field_values?: import("../integrations/supabase/types").Json;
40646
+ p_lines: import("../integrations/supabase/types").Json;
40647
+ p_notes: string;
40648
+ p_proposal_id: string;
40649
+ p_reviewed_by: string;
40650
+ };
40651
+ Returns: import("../integrations/supabase/types").Json;
40652
+ };
39385
40653
  assign_cart_numbers: {
39386
40654
  Args: {
39387
40655
  p_carts: import("../integrations/supabase/types").Json;
@@ -39433,6 +40701,10 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
39433
40701
  };
39434
40702
  Returns: number;
39435
40703
  };
40704
+ can_manage_hours: {
40705
+ Args: never;
40706
+ Returns: boolean;
40707
+ };
39436
40708
  check_offer_product_available_stock: {
39437
40709
  Args: {
39438
40710
  p_campaign_product_id: string;
@@ -39622,6 +40894,7 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
39622
40894
  };
39623
40895
  Returns: {
39624
40896
  action: string;
40897
+ attempt_started_at: string | null;
39625
40898
  attempts: number;
39626
40899
  connection_id: string | null;
39627
40900
  created_at: string;
@@ -39709,6 +40982,30 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
39709
40982
  agent_naam: string;
39710
40983
  }[];
39711
40984
  };
40985
+ consume_van_inventory: {
40986
+ Args: {
40987
+ p_inventory_id: string;
40988
+ p_quantity: number;
40989
+ };
40990
+ Returns: {
40991
+ barcode: string | null;
40992
+ created_at: string;
40993
+ id: string;
40994
+ monteur_id: string | null;
40995
+ price_per_unit: number;
40996
+ product_name: string;
40997
+ quantity_current: number;
40998
+ quantity_min: number;
40999
+ unit: string;
41000
+ updated_at: string;
41001
+ };
41002
+ SetofOptions: {
41003
+ from: "*";
41004
+ to: "van_inventories";
41005
+ isOneToOne: true;
41006
+ isSetofReturn: false;
41007
+ };
41008
+ };
39712
41009
  control_get_todays_carts: {
39713
41010
  Args: never;
39714
41011
  Returns: {
@@ -39782,6 +41079,13 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
39782
41079
  _user_id: string;
39783
41080
  };
39784
41081
  Returns: string;
41082
+ } | {
41083
+ Args: {
41084
+ _feature_id: string;
41085
+ _module_id: string;
41086
+ _user_id: string;
41087
+ };
41088
+ Returns: string;
39785
41089
  };
39786
41090
  email_auth_decrypt: {
39787
41091
  Args: {
@@ -40133,12 +41437,6 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
40133
41437
  Args: never;
40134
41438
  Returns: string;
40135
41439
  };
40136
- get_work_order_tenant_id: {
40137
- Args: {
40138
- wo_id: string;
40139
- };
40140
- Returns: string;
40141
- };
40142
41440
  has_module_permission: {
40143
41441
  Args: {
40144
41442
  _min: string;
@@ -40172,6 +41470,13 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
40172
41470
  };
40173
41471
  Returns: boolean;
40174
41472
  };
41473
+ is_time_log_week_locked: {
41474
+ Args: {
41475
+ p_employee_id: string;
41476
+ p_start_time: string;
41477
+ };
41478
+ Returns: boolean;
41479
+ };
40175
41480
  is_user_admin: {
40176
41481
  Args: never;
40177
41482
  Returns: boolean;
@@ -40186,13 +41491,14 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
40186
41491
  };
40187
41492
  Returns: boolean;
40188
41493
  };
40189
- list_monteurs: {
41494
+ list_medewerkers: {
40190
41495
  Args: never;
40191
41496
  Returns: {
40192
41497
  avatar_url: string;
40193
41498
  display_name: string;
40194
41499
  email: string;
40195
41500
  id: string;
41501
+ roles: string[];
40196
41502
  }[];
40197
41503
  };
40198
41504
  list_my_planning_items: {
@@ -40683,6 +41989,65 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
40683
41989
  };
40684
41990
  Returns: number;
40685
41991
  };
41992
+ logistics_plan_claim: {
41993
+ Args: {
41994
+ p_limit?: number;
41995
+ };
41996
+ Returns: {
41997
+ attempts: number;
41998
+ id: string;
41999
+ order_id: string;
42000
+ }[];
42001
+ };
42002
+ logistics_plan_enqueue: {
42003
+ Args: {
42004
+ p_order_id: string;
42005
+ p_reason?: string;
42006
+ };
42007
+ Returns: undefined;
42008
+ };
42009
+ logistics_plan_ensure_event: {
42010
+ Args: {
42011
+ p_order_id: string;
42012
+ };
42013
+ Returns: boolean;
42014
+ };
42015
+ logistics_plan_finish: {
42016
+ Args: {
42017
+ p_error?: string;
42018
+ p_id: string;
42019
+ };
42020
+ Returns: undefined;
42021
+ };
42022
+ logistics_plan_impact_orders: {
42023
+ Args: {
42024
+ p_order_id: string;
42025
+ };
42026
+ Returns: {
42027
+ buffer_id: string;
42028
+ order_id: string;
42029
+ plan_date: string;
42030
+ }[];
42031
+ };
42032
+ logistics_plan_kick: {
42033
+ Args: never;
42034
+ Returns: undefined;
42035
+ };
42036
+ logistics_plan_prune: {
42037
+ Args: never;
42038
+ Returns: number;
42039
+ };
42040
+ logistics_plan_release_stale: {
42041
+ Args: never;
42042
+ Returns: number;
42043
+ };
42044
+ logistics_plan_setting: {
42045
+ Args: {
42046
+ p_default: number;
42047
+ p_key: string;
42048
+ };
42049
+ Returns: number;
42050
+ };
40686
42051
  logistics_queue_capacity_email: {
40687
42052
  Args: {
40688
42053
  p_alert_id: string;
@@ -40924,6 +42289,7 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
40924
42289
  my_module_permissions: {
40925
42290
  Args: never;
40926
42291
  Returns: {
42292
+ feature_id: string;
40927
42293
  module_id: string;
40928
42294
  permission: string;
40929
42295
  }[];
@@ -41804,6 +43170,16 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
41804
43170
  };
41805
43171
  Returns: string[];
41806
43172
  };
43173
+ switch_time_log: {
43174
+ Args: {
43175
+ p_employee_id: string;
43176
+ p_start_lat?: number;
43177
+ p_start_lng?: number;
43178
+ p_type: string;
43179
+ p_work_order_id?: string;
43180
+ };
43181
+ Returns: import("../integrations/supabase/types").Json;
43182
+ };
41807
43183
  sync_all_layer_stocks: {
41808
43184
  Args: never;
41809
43185
  Returns: undefined;
@@ -41854,6 +43230,24 @@ export declare const getBackorderAllowed: import("@tanstack/start-client-core").
41854
43230
  };
41855
43231
  Returns: boolean;
41856
43232
  };
43233
+ twinfield_cron_lock_acquire: {
43234
+ Args: {
43235
+ _job_name: string;
43236
+ _stale_seconds?: number;
43237
+ };
43238
+ Returns: boolean;
43239
+ };
43240
+ twinfield_cron_lock_release: {
43241
+ Args: {
43242
+ _error?: string;
43243
+ _job_name: string;
43244
+ };
43245
+ Returns: undefined;
43246
+ };
43247
+ twinfield_prune_push_queue: {
43248
+ Args: never;
43249
+ Returns: number;
43250
+ };
41857
43251
  twinfield_register_cron: {
41858
43252
  Args: {
41859
43253
  apikey?: string;