@flowselections/logistiek-engine 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -872,6 +872,126 @@ export declare const getFloridayConnection: 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 getFloridayConnection: 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 getFloridayConnection: 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 getFloridayConnection: 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 getFloridayConnection: 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
  };
@@ -9971,6 +10088,90 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
9971
10088
  };
9972
10089
  Relationships: [];
9973
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
+ };
9974
10175
  module_permissions: {
9975
10176
  Row: {
9976
10177
  created_at: string;
@@ -10001,6 +10202,7 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
10001
10202
  module_registry: {
10002
10203
  Row: {
10003
10204
  created_at: string;
10205
+ enforce: boolean;
10004
10206
  is_active: boolean;
10005
10207
  last_seen_at: string;
10006
10208
  module_id: string;
@@ -10010,6 +10212,7 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
10010
10212
  };
10011
10213
  Insert: {
10012
10214
  created_at?: string;
10215
+ enforce?: boolean;
10013
10216
  is_active?: boolean;
10014
10217
  last_seen_at?: string;
10015
10218
  module_id: string;
@@ -10019,6 +10222,7 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
10019
10222
  };
10020
10223
  Update: {
10021
10224
  created_at?: string;
10225
+ enforce?: boolean;
10022
10226
  is_active?: boolean;
10023
10227
  last_seen_at?: string;
10024
10228
  module_id?: string;
@@ -10079,63 +10283,6 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
10079
10283
  };
10080
10284
  Relationships: [];
10081
10285
  };
10082
- monteurs: {
10083
- Row: {
10084
- avatar_url: string | null;
10085
- color: string | null;
10086
- created_at: string;
10087
- email: string | null;
10088
- id: string;
10089
- is_active: boolean;
10090
- leave_balance_hours: number;
10091
- name: string;
10092
- persnr: number | null;
10093
- phone: string | null;
10094
- role: string;
10095
- tenant_id: string;
10096
- updated_at: string;
10097
- user_id: string | null;
10098
- };
10099
- Insert: {
10100
- avatar_url?: string | null;
10101
- color?: string | null;
10102
- created_at?: string;
10103
- email?: string | null;
10104
- id?: string;
10105
- is_active?: boolean;
10106
- leave_balance_hours?: number;
10107
- name: string;
10108
- persnr?: number | null;
10109
- phone?: string | null;
10110
- role?: string;
10111
- tenant_id: string;
10112
- updated_at?: string;
10113
- user_id?: string | null;
10114
- };
10115
- Update: {
10116
- avatar_url?: string | null;
10117
- color?: string | null;
10118
- created_at?: string;
10119
- email?: string | null;
10120
- id?: string;
10121
- is_active?: boolean;
10122
- leave_balance_hours?: number;
10123
- name?: string;
10124
- persnr?: number | null;
10125
- phone?: string | null;
10126
- role?: string;
10127
- tenant_id?: string;
10128
- updated_at?: string;
10129
- user_id?: string | null;
10130
- };
10131
- Relationships: [{
10132
- foreignKeyName: "monteurs_tenant_id_fkey";
10133
- columns: ["tenant_id"];
10134
- isOneToOne: false;
10135
- referencedRelation: "tenants";
10136
- referencedColumns: ["id"];
10137
- }];
10138
- };
10139
10286
  nmbrs_component_mapping: {
10140
10287
  Row: {
10141
10288
  created_at: string;
@@ -10206,13 +10353,7 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
10206
10353
  nmbrs_employee_number?: string;
10207
10354
  updated_at?: string;
10208
10355
  };
10209
- Relationships: [{
10210
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
10211
- columns: ["monteur_id"];
10212
- isOneToOne: true;
10213
- referencedRelation: "monteurs";
10214
- referencedColumns: ["id"];
10215
- }];
10356
+ Relationships: [];
10216
10357
  };
10217
10358
  nmbrs_export_lines: {
10218
10359
  Row: {
@@ -10261,12 +10402,6 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
10261
10402
  wage_code?: string;
10262
10403
  };
10263
10404
  Relationships: [{
10264
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
10265
- columns: ["monteur_id"];
10266
- isOneToOne: false;
10267
- referencedRelation: "monteurs";
10268
- referencedColumns: ["id"];
10269
- }, {
10270
10405
  foreignKeyName: "nmbrs_export_lines_run_id_fkey";
10271
10406
  columns: ["run_id"];
10272
10407
  isOneToOne: false;
@@ -12657,6 +12792,9 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
12657
12792
  created_at: string;
12658
12793
  id: string;
12659
12794
  laatst_gezien: string;
12795
+ laatste_fout: string | null;
12796
+ laatste_request_id: number | null;
12797
+ mislukte_posts: number;
12660
12798
  tick_sleutel: string;
12661
12799
  updated_at: string;
12662
12800
  };
@@ -12666,6 +12804,9 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
12666
12804
  created_at?: string;
12667
12805
  id?: string;
12668
12806
  laatst_gezien?: string;
12807
+ laatste_fout?: string | null;
12808
+ laatste_request_id?: number | null;
12809
+ mislukte_posts?: number;
12669
12810
  tick_sleutel?: string;
12670
12811
  updated_at?: string;
12671
12812
  };
@@ -12675,6 +12816,9 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
12675
12816
  created_at?: string;
12676
12817
  id?: string;
12677
12818
  laatst_gezien?: string;
12819
+ laatste_fout?: string | null;
12820
+ laatste_request_id?: number | null;
12821
+ mislukte_posts?: number;
12678
12822
  tick_sleutel?: string;
12679
12823
  updated_at?: string;
12680
12824
  };
@@ -14183,6 +14327,96 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
14183
14327
  referencedColumns: ["id"];
14184
14328
  }];
14185
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
+ };
14186
14420
  rooms: {
14187
14421
  Row: {
14188
14422
  capacity: number;
@@ -14852,6 +15086,54 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
14852
15086
  };
14853
15087
  Relationships: [];
14854
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
+ };
14855
15137
  time_entries: {
14856
15138
  Row: {
14857
15139
  created_at: string;
@@ -14886,65 +15168,170 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
14886
15168
  undertime?: number;
14887
15169
  updated_at?: string;
14888
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
+ };
14889
15213
  Relationships: [{
14890
- foreignKeyName: "time_entries_employee_id_fkey";
15214
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
14891
15215
  columns: ["employee_id"];
14892
15216
  isOneToOne: false;
14893
- referencedRelation: "monteurs";
15217
+ referencedRelation: "profiles";
14894
15218
  referencedColumns: ["id"];
14895
15219
  }];
14896
15220
  };
14897
15221
  time_logs: {
14898
15222
  Row: {
15223
+ auto_stop_reason: string | null;
15224
+ auto_stopped: boolean;
14899
15225
  created_at: string;
15226
+ current_latitude: number | null;
15227
+ current_longitude: number | null;
15228
+ current_position_updated_at: string | null;
14900
15229
  employee_id: string;
15230
+ end_latitude: number | null;
15231
+ end_longitude: number | null;
14901
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;
14902
15237
  id: string;
15238
+ last_reminder_at: string | null;
14903
15239
  notes: string | null;
14904
15240
  overtime_hours: number;
14905
15241
  overtime_type: string | null;
14906
15242
  regular_hours: number;
15243
+ reminder_count: number;
15244
+ requires_review: boolean;
15245
+ start_latitude: number | null;
15246
+ start_longitude: number | null;
14907
15247
  start_time: string;
14908
15248
  travel_cost: number | null;
14909
15249
  travel_distance_km: number | null;
15250
+ travel_duration_min: number | null;
15251
+ travel_time_minutes: number | null;
14910
15252
  type: string;
14911
15253
  updated_at: string;
15254
+ work_order_id: string | null;
14912
15255
  };
14913
15256
  Insert: {
15257
+ auto_stop_reason?: string | null;
15258
+ auto_stopped?: boolean;
14914
15259
  created_at?: string;
15260
+ current_latitude?: number | null;
15261
+ current_longitude?: number | null;
15262
+ current_position_updated_at?: string | null;
14915
15263
  employee_id: string;
15264
+ end_latitude?: number | null;
15265
+ end_longitude?: number | null;
14916
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;
14917
15271
  id?: string;
15272
+ last_reminder_at?: string | null;
14918
15273
  notes?: string | null;
14919
15274
  overtime_hours?: number;
14920
15275
  overtime_type?: string | null;
14921
15276
  regular_hours?: number;
15277
+ reminder_count?: number;
15278
+ requires_review?: boolean;
15279
+ start_latitude?: number | null;
15280
+ start_longitude?: number | null;
14922
15281
  start_time?: string;
14923
15282
  travel_cost?: number | null;
14924
15283
  travel_distance_km?: number | null;
15284
+ travel_duration_min?: number | null;
15285
+ travel_time_minutes?: number | null;
14925
15286
  type: string;
14926
15287
  updated_at?: string;
15288
+ work_order_id?: string | null;
14927
15289
  };
14928
15290
  Update: {
15291
+ auto_stop_reason?: string | null;
15292
+ auto_stopped?: boolean;
14929
15293
  created_at?: string;
15294
+ current_latitude?: number | null;
15295
+ current_longitude?: number | null;
15296
+ current_position_updated_at?: string | null;
14930
15297
  employee_id?: string;
15298
+ end_latitude?: number | null;
15299
+ end_longitude?: number | null;
14931
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;
14932
15305
  id?: string;
15306
+ last_reminder_at?: string | null;
14933
15307
  notes?: string | null;
14934
15308
  overtime_hours?: number;
14935
15309
  overtime_type?: string | null;
14936
15310
  regular_hours?: number;
15311
+ reminder_count?: number;
15312
+ requires_review?: boolean;
15313
+ start_latitude?: number | null;
15314
+ start_longitude?: number | null;
14937
15315
  start_time?: string;
14938
15316
  travel_cost?: number | null;
14939
15317
  travel_distance_km?: number | null;
15318
+ travel_duration_min?: number | null;
15319
+ travel_time_minutes?: number | null;
14940
15320
  type?: string;
14941
15321
  updated_at?: string;
15322
+ work_order_id?: string | null;
14942
15323
  };
14943
15324
  Relationships: [{
14944
15325
  foreignKeyName: "time_logs_employee_id_fkey";
14945
15326
  columns: ["employee_id"];
14946
15327
  isOneToOne: false;
14947
- 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";
14948
15335
  referencedColumns: ["id"];
14949
15336
  }];
14950
15337
  };
@@ -14983,7 +15370,7 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
14983
15370
  foreignKeyName: "time_off_entries_employee_id_fkey";
14984
15371
  columns: ["employee_id"];
14985
15372
  isOneToOne: false;
14986
- referencedRelation: "monteurs";
15373
+ referencedRelation: "profiles";
14987
15374
  referencedColumns: ["id"];
14988
15375
  }];
14989
15376
  };
@@ -15293,6 +15680,39 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
15293
15680
  };
15294
15681
  Relationships: [];
15295
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
+ };
15296
15716
  twinfield_customers: {
15297
15717
  Row: {
15298
15718
  address: string | null;
@@ -15893,6 +16313,7 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
15893
16313
  twinfield_push_queue: {
15894
16314
  Row: {
15895
16315
  action: string;
16316
+ attempt_started_at: string | null;
15896
16317
  attempts: number;
15897
16318
  connection_id: string | null;
15898
16319
  created_at: string;
@@ -15909,6 +16330,7 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
15909
16330
  };
15910
16331
  Insert: {
15911
16332
  action?: string;
16333
+ attempt_started_at?: string | null;
15912
16334
  attempts?: number;
15913
16335
  connection_id?: string | null;
15914
16336
  created_at?: string;
@@ -15925,6 +16347,7 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
15925
16347
  };
15926
16348
  Update: {
15927
16349
  action?: string;
16350
+ attempt_started_at?: string | null;
15928
16351
  attempts?: number;
15929
16352
  connection_id?: string | null;
15930
16353
  created_at?: string;
@@ -16122,13 +16545,7 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
16122
16545
  workday_end?: string | null;
16123
16546
  workday_start?: string | null;
16124
16547
  };
16125
- Relationships: [{
16126
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
16127
- columns: ["monteur_id"];
16128
- isOneToOne: true;
16129
- referencedRelation: "monteurs";
16130
- referencedColumns: ["id"];
16131
- }];
16548
+ Relationships: [];
16132
16549
  };
16133
16550
  uren_entries: {
16134
16551
  Row: {
@@ -16174,12 +16591,6 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
16174
16591
  werkbon_id?: string | null;
16175
16592
  };
16176
16593
  Relationships: [{
16177
- foreignKeyName: "uren_entries_monteur_id_fkey";
16178
- columns: ["monteur_id"];
16179
- isOneToOne: false;
16180
- referencedRelation: "monteurs";
16181
- referencedColumns: ["id"];
16182
- }, {
16183
16594
  foreignKeyName: "uren_entries_werkbon_id_fkey";
16184
16595
  columns: ["werkbon_id"];
16185
16596
  isOneToOne: false;
@@ -16647,17 +17058,12 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
16647
17058
  submitted_at?: string | null;
16648
17059
  updated_at?: string;
16649
17060
  };
16650
- Relationships: [{
16651
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
16652
- columns: ["monteur_id"];
16653
- isOneToOne: false;
16654
- referencedRelation: "monteurs";
16655
- referencedColumns: ["id"];
16656
- }];
17061
+ Relationships: [];
16657
17062
  };
16658
17063
  user_module_permissions: {
16659
17064
  Row: {
16660
17065
  created_at: string;
17066
+ feature_id: string;
16661
17067
  id: string;
16662
17068
  module_id: string;
16663
17069
  permission: string;
@@ -16666,6 +17072,7 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
16666
17072
  };
16667
17073
  Insert: {
16668
17074
  created_at?: string;
17075
+ feature_id?: string;
16669
17076
  id?: string;
16670
17077
  module_id: string;
16671
17078
  permission: string;
@@ -16674,6 +17081,7 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
16674
17081
  };
16675
17082
  Update: {
16676
17083
  created_at?: string;
17084
+ feature_id?: string;
16677
17085
  id?: string;
16678
17086
  module_id?: string;
16679
17087
  permission?: string;
@@ -16709,6 +17117,51 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
16709
17117
  referencedColumns: ["id"];
16710
17118
  }];
16711
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
+ };
16712
17165
  voorraad_custom_fields: {
16713
17166
  Row: {
16714
17167
  created_at: string;
@@ -17659,7 +18112,7 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
17659
18112
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
17660
18113
  columns: ["monteur_id"];
17661
18114
  isOneToOne: false;
17662
- referencedRelation: "monteurs";
18115
+ referencedRelation: "profiles";
17663
18116
  referencedColumns: ["id"];
17664
18117
  }, {
17665
18118
  foreignKeyName: "work_order_monteurs_work_order_id_fkey";
@@ -17669,6 +18122,60 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
17669
18122
  referencedColumns: ["id"];
17670
18123
  }];
17671
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
+ };
17672
18179
  work_orders: {
17673
18180
  Row: {
17674
18181
  assigned_to: string | null;
@@ -17700,7 +18207,6 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
17700
18207
  scheduled_end_time: string | null;
17701
18208
  scheduled_start_time: string | null;
17702
18209
  status: string;
17703
- tenant_id: string;
17704
18210
  total_hours_worked: number | null;
17705
18211
  total_price: number | null;
17706
18212
  travel_time_minutes: number | null;
@@ -17738,7 +18244,6 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
17738
18244
  scheduled_end_time?: string | null;
17739
18245
  scheduled_start_time?: string | null;
17740
18246
  status?: string;
17741
- tenant_id: string;
17742
18247
  total_hours_worked?: number | null;
17743
18248
  total_price?: number | null;
17744
18249
  travel_time_minutes?: number | null;
@@ -17776,7 +18281,6 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
17776
18281
  scheduled_end_time?: string | null;
17777
18282
  scheduled_start_time?: string | null;
17778
18283
  status?: string;
17779
- tenant_id?: string;
17780
18284
  total_hours_worked?: number | null;
17781
18285
  total_price?: number | null;
17782
18286
  travel_time_minutes?: number | null;
@@ -17790,12 +18294,6 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
17790
18294
  isOneToOne: false;
17791
18295
  referencedRelation: "work_orders";
17792
18296
  referencedColumns: ["id"];
17793
- }, {
17794
- foreignKeyName: "work_orders_tenant_id_fkey";
17795
- columns: ["tenant_id"];
17796
- isOneToOne: false;
17797
- referencedRelation: "tenants";
17798
- referencedColumns: ["id"];
17799
18297
  }];
17800
18298
  };
17801
18299
  };
@@ -18480,6 +18978,19 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
18480
18978
  };
18481
18979
  Returns: undefined;
18482
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
+ };
18483
18994
  assign_cart_numbers: {
18484
18995
  Args: {
18485
18996
  p_carts: import("../integrations/supabase/types").Json;
@@ -18531,6 +19042,10 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
18531
19042
  };
18532
19043
  Returns: number;
18533
19044
  };
19045
+ can_manage_hours: {
19046
+ Args: never;
19047
+ Returns: boolean;
19048
+ };
18534
19049
  check_offer_product_available_stock: {
18535
19050
  Args: {
18536
19051
  p_campaign_product_id: string;
@@ -18720,6 +19235,7 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
18720
19235
  };
18721
19236
  Returns: {
18722
19237
  action: string;
19238
+ attempt_started_at: string | null;
18723
19239
  attempts: number;
18724
19240
  connection_id: string | null;
18725
19241
  created_at: string;
@@ -18807,6 +19323,30 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
18807
19323
  agent_naam: string;
18808
19324
  }[];
18809
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
+ };
18810
19350
  control_get_todays_carts: {
18811
19351
  Args: never;
18812
19352
  Returns: {
@@ -18880,6 +19420,13 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
18880
19420
  _user_id: string;
18881
19421
  };
18882
19422
  Returns: string;
19423
+ } | {
19424
+ Args: {
19425
+ _feature_id: string;
19426
+ _module_id: string;
19427
+ _user_id: string;
19428
+ };
19429
+ Returns: string;
18883
19430
  };
18884
19431
  email_auth_decrypt: {
18885
19432
  Args: {
@@ -19231,12 +19778,6 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
19231
19778
  Args: never;
19232
19779
  Returns: string;
19233
19780
  };
19234
- get_work_order_tenant_id: {
19235
- Args: {
19236
- wo_id: string;
19237
- };
19238
- Returns: string;
19239
- };
19240
19781
  has_module_permission: {
19241
19782
  Args: {
19242
19783
  _min: string;
@@ -19270,6 +19811,13 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
19270
19811
  };
19271
19812
  Returns: boolean;
19272
19813
  };
19814
+ is_time_log_week_locked: {
19815
+ Args: {
19816
+ p_employee_id: string;
19817
+ p_start_time: string;
19818
+ };
19819
+ Returns: boolean;
19820
+ };
19273
19821
  is_user_admin: {
19274
19822
  Args: never;
19275
19823
  Returns: boolean;
@@ -19284,13 +19832,14 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
19284
19832
  };
19285
19833
  Returns: boolean;
19286
19834
  };
19287
- list_monteurs: {
19835
+ list_medewerkers: {
19288
19836
  Args: never;
19289
19837
  Returns: {
19290
19838
  avatar_url: string;
19291
19839
  display_name: string;
19292
19840
  email: string;
19293
19841
  id: string;
19842
+ roles: string[];
19294
19843
  }[];
19295
19844
  };
19296
19845
  list_my_planning_items: {
@@ -20081,6 +20630,7 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
20081
20630
  my_module_permissions: {
20082
20631
  Args: never;
20083
20632
  Returns: {
20633
+ feature_id: string;
20084
20634
  module_id: string;
20085
20635
  permission: string;
20086
20636
  }[];
@@ -20961,6 +21511,16 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
20961
21511
  };
20962
21512
  Returns: string[];
20963
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
+ };
20964
21524
  sync_all_layer_stocks: {
20965
21525
  Args: never;
20966
21526
  Returns: undefined;
@@ -21011,6 +21571,24 @@ export declare const getFloridayConnection: import("@tanstack/start-client-core"
21011
21571
  };
21012
21572
  Returns: boolean;
21013
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
+ };
21014
21592
  twinfield_register_cron: {
21015
21593
  Args: {
21016
21594
  apikey?: string;
@@ -21947,6 +22525,126 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
21947
22525
  };
21948
22526
  Relationships: [];
21949
22527
  };
22528
+ cao_holidays: {
22529
+ Row: {
22530
+ created_at: string;
22531
+ description: string | null;
22532
+ holiday_date: string;
22533
+ id: string;
22534
+ updated_at: string;
22535
+ };
22536
+ Insert: {
22537
+ created_at?: string;
22538
+ description?: string | null;
22539
+ holiday_date: string;
22540
+ id?: string;
22541
+ updated_at?: string;
22542
+ };
22543
+ Update: {
22544
+ created_at?: string;
22545
+ description?: string | null;
22546
+ holiday_date?: string;
22547
+ id?: string;
22548
+ updated_at?: string;
22549
+ };
22550
+ Relationships: [];
22551
+ };
22552
+ cao_settings: {
22553
+ Row: {
22554
+ auto_break_after_hours: number;
22555
+ auto_break_minutes: number;
22556
+ auto_break_unpaid: boolean;
22557
+ auto_stop_after_hours: number;
22558
+ callout_fee: number;
22559
+ created_at: string;
22560
+ daily_regular_hours: number;
22561
+ default_hourly_rate: number;
22562
+ id: string;
22563
+ materials_markup_percent: number;
22564
+ max_daily_hours: number;
22565
+ max_weekly_hours: number;
22566
+ meal_allowance_amount: number;
22567
+ overtime_pct_178: number;
22568
+ overtime_pct_189: number;
22569
+ overtime_pct_212: number;
22570
+ reminder_after_hours: number;
22571
+ standby_evening_amount: number;
22572
+ standby_weekend_amount: number;
22573
+ travel_cost_per_km: number | null;
22574
+ travel_cost_threshold_km: number | null;
22575
+ travel_counts_as_work: boolean;
22576
+ travel_hourly_rate: number;
22577
+ travel_rate_per_hour: number;
22578
+ travel_threshold_minutes: number;
22579
+ updated_at: string;
22580
+ weekend_always_212: boolean;
22581
+ window_end: string;
22582
+ window_start: string;
22583
+ };
22584
+ Insert: {
22585
+ auto_break_after_hours?: number;
22586
+ auto_break_minutes?: number;
22587
+ auto_break_unpaid?: boolean;
22588
+ auto_stop_after_hours?: number;
22589
+ callout_fee?: number;
22590
+ created_at?: string;
22591
+ daily_regular_hours?: number;
22592
+ default_hourly_rate?: number;
22593
+ id?: string;
22594
+ materials_markup_percent?: number;
22595
+ max_daily_hours?: number;
22596
+ max_weekly_hours?: number;
22597
+ meal_allowance_amount?: number;
22598
+ overtime_pct_178?: number;
22599
+ overtime_pct_189?: number;
22600
+ overtime_pct_212?: number;
22601
+ reminder_after_hours?: number;
22602
+ standby_evening_amount?: number;
22603
+ standby_weekend_amount?: number;
22604
+ travel_cost_per_km?: number | null;
22605
+ travel_cost_threshold_km?: number | null;
22606
+ travel_counts_as_work?: boolean;
22607
+ travel_hourly_rate?: number;
22608
+ travel_rate_per_hour?: number;
22609
+ travel_threshold_minutes?: number;
22610
+ updated_at?: string;
22611
+ weekend_always_212?: boolean;
22612
+ window_end?: string;
22613
+ window_start?: string;
22614
+ };
22615
+ Update: {
22616
+ auto_break_after_hours?: number;
22617
+ auto_break_minutes?: number;
22618
+ auto_break_unpaid?: boolean;
22619
+ auto_stop_after_hours?: number;
22620
+ callout_fee?: number;
22621
+ created_at?: string;
22622
+ daily_regular_hours?: number;
22623
+ default_hourly_rate?: number;
22624
+ id?: string;
22625
+ materials_markup_percent?: number;
22626
+ max_daily_hours?: number;
22627
+ max_weekly_hours?: number;
22628
+ meal_allowance_amount?: number;
22629
+ overtime_pct_178?: number;
22630
+ overtime_pct_189?: number;
22631
+ overtime_pct_212?: number;
22632
+ reminder_after_hours?: number;
22633
+ standby_evening_amount?: number;
22634
+ standby_weekend_amount?: number;
22635
+ travel_cost_per_km?: number | null;
22636
+ travel_cost_threshold_km?: number | null;
22637
+ travel_counts_as_work?: boolean;
22638
+ travel_hourly_rate?: number;
22639
+ travel_rate_per_hour?: number;
22640
+ travel_threshold_minutes?: number;
22641
+ updated_at?: string;
22642
+ weekend_always_212?: boolean;
22643
+ window_end?: string;
22644
+ window_start?: string;
22645
+ };
22646
+ Relationships: [];
22647
+ };
21950
22648
  carrier_shipping_rates: {
21951
22649
  Row: {
21952
22650
  carrier_id: string;
@@ -28841,7 +29539,6 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
28841
29539
  start_date: string;
28842
29540
  start_time: string | null;
28843
29541
  status: string;
28844
- tenant_id: string;
28845
29542
  updated_at: string;
28846
29543
  user_id: string;
28847
29544
  };
@@ -28859,7 +29556,6 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
28859
29556
  start_date: string;
28860
29557
  start_time?: string | null;
28861
29558
  status?: string;
28862
- tenant_id?: string;
28863
29559
  updated_at?: string;
28864
29560
  user_id: string;
28865
29561
  };
@@ -28877,7 +29573,6 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
28877
29573
  start_date?: string;
28878
29574
  start_time?: string | null;
28879
29575
  status?: string;
28880
- tenant_id?: string;
28881
29576
  updated_at?: string;
28882
29577
  user_id?: string;
28883
29578
  };
@@ -28885,13 +29580,13 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
28885
29580
  foreignKeyName: "leave_requests_monteur_id_fkey";
28886
29581
  columns: ["monteur_id"];
28887
29582
  isOneToOne: false;
28888
- referencedRelation: "monteurs";
29583
+ referencedRelation: "profiles";
28889
29584
  referencedColumns: ["id"];
28890
29585
  }, {
28891
29586
  foreignKeyName: "leave_requests_user_id_fkey";
28892
29587
  columns: ["user_id"];
28893
29588
  isOneToOne: false;
28894
- referencedRelation: "monteurs";
29589
+ referencedRelation: "profiles";
28895
29590
  referencedColumns: ["id"];
28896
29591
  }];
28897
29592
  };
@@ -31046,6 +31741,90 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
31046
31741
  };
31047
31742
  Relationships: [];
31048
31743
  };
31744
+ material_usage: {
31745
+ Row: {
31746
+ created_at: string;
31747
+ id: string;
31748
+ material_name: string;
31749
+ monteur_id: string | null;
31750
+ price_at_time: number;
31751
+ quantity_used: number;
31752
+ updated_at: string;
31753
+ van_inventory_id: string | null;
31754
+ work_order_id: string;
31755
+ };
31756
+ Insert: {
31757
+ created_at?: string;
31758
+ id?: string;
31759
+ material_name: string;
31760
+ monteur_id?: string | null;
31761
+ price_at_time?: number;
31762
+ quantity_used?: number;
31763
+ updated_at?: string;
31764
+ van_inventory_id?: string | null;
31765
+ work_order_id: string;
31766
+ };
31767
+ Update: {
31768
+ created_at?: string;
31769
+ id?: string;
31770
+ material_name?: string;
31771
+ monteur_id?: string | null;
31772
+ price_at_time?: number;
31773
+ quantity_used?: number;
31774
+ updated_at?: string;
31775
+ van_inventory_id?: string | null;
31776
+ work_order_id?: string;
31777
+ };
31778
+ Relationships: [{
31779
+ foreignKeyName: "material_usage_monteur_id_fkey";
31780
+ columns: ["monteur_id"];
31781
+ isOneToOne: false;
31782
+ referencedRelation: "profiles";
31783
+ referencedColumns: ["id"];
31784
+ }, {
31785
+ foreignKeyName: "material_usage_van_inventory_id_fkey";
31786
+ columns: ["van_inventory_id"];
31787
+ isOneToOne: false;
31788
+ referencedRelation: "van_inventories";
31789
+ referencedColumns: ["id"];
31790
+ }, {
31791
+ foreignKeyName: "material_usage_work_order_id_fkey";
31792
+ columns: ["work_order_id"];
31793
+ isOneToOne: false;
31794
+ referencedRelation: "work_orders";
31795
+ referencedColumns: ["id"];
31796
+ }];
31797
+ };
31798
+ module_features: {
31799
+ Row: {
31800
+ created_at: string;
31801
+ feature_id: string;
31802
+ id: string;
31803
+ is_active: boolean;
31804
+ last_seen_at: string;
31805
+ module_id: string;
31806
+ name: string;
31807
+ };
31808
+ Insert: {
31809
+ created_at?: string;
31810
+ feature_id: string;
31811
+ id?: string;
31812
+ is_active?: boolean;
31813
+ last_seen_at?: string;
31814
+ module_id: string;
31815
+ name: string;
31816
+ };
31817
+ Update: {
31818
+ created_at?: string;
31819
+ feature_id?: string;
31820
+ id?: string;
31821
+ is_active?: boolean;
31822
+ last_seen_at?: string;
31823
+ module_id?: string;
31824
+ name?: string;
31825
+ };
31826
+ Relationships: [];
31827
+ };
31049
31828
  module_permissions: {
31050
31829
  Row: {
31051
31830
  created_at: string;
@@ -31076,6 +31855,7 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
31076
31855
  module_registry: {
31077
31856
  Row: {
31078
31857
  created_at: string;
31858
+ enforce: boolean;
31079
31859
  is_active: boolean;
31080
31860
  last_seen_at: string;
31081
31861
  module_id: string;
@@ -31085,6 +31865,7 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
31085
31865
  };
31086
31866
  Insert: {
31087
31867
  created_at?: string;
31868
+ enforce?: boolean;
31088
31869
  is_active?: boolean;
31089
31870
  last_seen_at?: string;
31090
31871
  module_id: string;
@@ -31094,6 +31875,7 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
31094
31875
  };
31095
31876
  Update: {
31096
31877
  created_at?: string;
31878
+ enforce?: boolean;
31097
31879
  is_active?: boolean;
31098
31880
  last_seen_at?: string;
31099
31881
  module_id?: string;
@@ -31154,63 +31936,6 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
31154
31936
  };
31155
31937
  Relationships: [];
31156
31938
  };
31157
- monteurs: {
31158
- Row: {
31159
- avatar_url: string | null;
31160
- color: string | null;
31161
- created_at: string;
31162
- email: string | null;
31163
- id: string;
31164
- is_active: boolean;
31165
- leave_balance_hours: number;
31166
- name: string;
31167
- persnr: number | null;
31168
- phone: string | null;
31169
- role: string;
31170
- tenant_id: string;
31171
- updated_at: string;
31172
- user_id: string | null;
31173
- };
31174
- Insert: {
31175
- avatar_url?: string | null;
31176
- color?: string | null;
31177
- created_at?: string;
31178
- email?: string | null;
31179
- id?: string;
31180
- is_active?: boolean;
31181
- leave_balance_hours?: number;
31182
- name: string;
31183
- persnr?: number | null;
31184
- phone?: string | null;
31185
- role?: string;
31186
- tenant_id: string;
31187
- updated_at?: string;
31188
- user_id?: string | null;
31189
- };
31190
- Update: {
31191
- avatar_url?: string | null;
31192
- color?: string | null;
31193
- created_at?: string;
31194
- email?: string | null;
31195
- id?: string;
31196
- is_active?: boolean;
31197
- leave_balance_hours?: number;
31198
- name?: string;
31199
- persnr?: number | null;
31200
- phone?: string | null;
31201
- role?: string;
31202
- tenant_id?: string;
31203
- updated_at?: string;
31204
- user_id?: string | null;
31205
- };
31206
- Relationships: [{
31207
- foreignKeyName: "monteurs_tenant_id_fkey";
31208
- columns: ["tenant_id"];
31209
- isOneToOne: false;
31210
- referencedRelation: "tenants";
31211
- referencedColumns: ["id"];
31212
- }];
31213
- };
31214
31939
  nmbrs_component_mapping: {
31215
31940
  Row: {
31216
31941
  created_at: string;
@@ -31281,13 +32006,7 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
31281
32006
  nmbrs_employee_number?: string;
31282
32007
  updated_at?: string;
31283
32008
  };
31284
- Relationships: [{
31285
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
31286
- columns: ["monteur_id"];
31287
- isOneToOne: true;
31288
- referencedRelation: "monteurs";
31289
- referencedColumns: ["id"];
31290
- }];
32009
+ Relationships: [];
31291
32010
  };
31292
32011
  nmbrs_export_lines: {
31293
32012
  Row: {
@@ -31336,12 +32055,6 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
31336
32055
  wage_code?: string;
31337
32056
  };
31338
32057
  Relationships: [{
31339
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
31340
- columns: ["monteur_id"];
31341
- isOneToOne: false;
31342
- referencedRelation: "monteurs";
31343
- referencedColumns: ["id"];
31344
- }, {
31345
32058
  foreignKeyName: "nmbrs_export_lines_run_id_fkey";
31346
32059
  columns: ["run_id"];
31347
32060
  isOneToOne: false;
@@ -33732,6 +34445,9 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
33732
34445
  created_at: string;
33733
34446
  id: string;
33734
34447
  laatst_gezien: string;
34448
+ laatste_fout: string | null;
34449
+ laatste_request_id: number | null;
34450
+ mislukte_posts: number;
33735
34451
  tick_sleutel: string;
33736
34452
  updated_at: string;
33737
34453
  };
@@ -33741,6 +34457,9 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
33741
34457
  created_at?: string;
33742
34458
  id?: string;
33743
34459
  laatst_gezien?: string;
34460
+ laatste_fout?: string | null;
34461
+ laatste_request_id?: number | null;
34462
+ mislukte_posts?: number;
33744
34463
  tick_sleutel?: string;
33745
34464
  updated_at?: string;
33746
34465
  };
@@ -33750,6 +34469,9 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
33750
34469
  created_at?: string;
33751
34470
  id?: string;
33752
34471
  laatst_gezien?: string;
34472
+ laatste_fout?: string | null;
34473
+ laatste_request_id?: number | null;
34474
+ mislukte_posts?: number;
33753
34475
  tick_sleutel?: string;
33754
34476
  updated_at?: string;
33755
34477
  };
@@ -35258,6 +35980,96 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
35258
35980
  referencedColumns: ["id"];
35259
35981
  }];
35260
35982
  };
35983
+ role_assignments: {
35984
+ Row: {
35985
+ created_at: string;
35986
+ id: string;
35987
+ role_id: string;
35988
+ user_id: string;
35989
+ };
35990
+ Insert: {
35991
+ created_at?: string;
35992
+ id?: string;
35993
+ role_id: string;
35994
+ user_id: string;
35995
+ };
35996
+ Update: {
35997
+ created_at?: string;
35998
+ id?: string;
35999
+ role_id?: string;
36000
+ user_id?: string;
36001
+ };
36002
+ Relationships: [{
36003
+ foreignKeyName: "role_assignments_role_id_fkey";
36004
+ columns: ["role_id"];
36005
+ isOneToOne: false;
36006
+ referencedRelation: "roles";
36007
+ referencedColumns: ["id"];
36008
+ }];
36009
+ };
36010
+ role_permissions: {
36011
+ Row: {
36012
+ can_edit: boolean;
36013
+ can_view: boolean;
36014
+ feature_id: string;
36015
+ id: string;
36016
+ module_id: string;
36017
+ role_id: string;
36018
+ updated_at: string;
36019
+ };
36020
+ Insert: {
36021
+ can_edit?: boolean;
36022
+ can_view?: boolean;
36023
+ feature_id?: string;
36024
+ id?: string;
36025
+ module_id: string;
36026
+ role_id: string;
36027
+ updated_at?: string;
36028
+ };
36029
+ Update: {
36030
+ can_edit?: boolean;
36031
+ can_view?: boolean;
36032
+ feature_id?: string;
36033
+ id?: string;
36034
+ module_id?: string;
36035
+ role_id?: string;
36036
+ updated_at?: string;
36037
+ };
36038
+ Relationships: [{
36039
+ foreignKeyName: "role_permissions_role_id_fkey";
36040
+ columns: ["role_id"];
36041
+ isOneToOne: false;
36042
+ referencedRelation: "roles";
36043
+ referencedColumns: ["id"];
36044
+ }];
36045
+ };
36046
+ roles: {
36047
+ Row: {
36048
+ created_at: string;
36049
+ id: string;
36050
+ is_protected: boolean;
36051
+ key: string;
36052
+ name: string;
36053
+ updated_at: string;
36054
+ };
36055
+ Insert: {
36056
+ created_at?: string;
36057
+ id?: string;
36058
+ is_protected?: boolean;
36059
+ key: string;
36060
+ name: string;
36061
+ updated_at?: string;
36062
+ };
36063
+ Update: {
36064
+ created_at?: string;
36065
+ id?: string;
36066
+ is_protected?: boolean;
36067
+ key?: string;
36068
+ name?: string;
36069
+ updated_at?: string;
36070
+ };
36071
+ Relationships: [];
36072
+ };
35261
36073
  rooms: {
35262
36074
  Row: {
35263
36075
  capacity: number;
@@ -35927,6 +36739,54 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
35927
36739
  };
35928
36740
  Relationships: [];
35929
36741
  };
36742
+ time_compensation_entries: {
36743
+ Row: {
36744
+ created_at: string;
36745
+ employee_id: string;
36746
+ entry_date: string;
36747
+ id: string;
36748
+ km: number;
36749
+ meal_allowance: number;
36750
+ notes: string | null;
36751
+ standby_evening: number;
36752
+ standby_weekend: number;
36753
+ tvt_change: number;
36754
+ updated_at: string;
36755
+ };
36756
+ Insert: {
36757
+ created_at?: string;
36758
+ employee_id: string;
36759
+ entry_date: string;
36760
+ id?: string;
36761
+ km?: number;
36762
+ meal_allowance?: number;
36763
+ notes?: string | null;
36764
+ standby_evening?: number;
36765
+ standby_weekend?: number;
36766
+ tvt_change?: number;
36767
+ updated_at?: string;
36768
+ };
36769
+ Update: {
36770
+ created_at?: string;
36771
+ employee_id?: string;
36772
+ entry_date?: string;
36773
+ id?: string;
36774
+ km?: number;
36775
+ meal_allowance?: number;
36776
+ notes?: string | null;
36777
+ standby_evening?: number;
36778
+ standby_weekend?: number;
36779
+ tvt_change?: number;
36780
+ updated_at?: string;
36781
+ };
36782
+ Relationships: [{
36783
+ foreignKeyName: "time_compensation_entries_employee_id_fkey";
36784
+ columns: ["employee_id"];
36785
+ isOneToOne: false;
36786
+ referencedRelation: "profiles";
36787
+ referencedColumns: ["id"];
36788
+ }];
36789
+ };
35930
36790
  time_entries: {
35931
36791
  Row: {
35932
36792
  created_at: string;
@@ -35961,65 +36821,170 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
35961
36821
  undertime?: number;
35962
36822
  updated_at?: string;
35963
36823
  };
36824
+ Relationships: [];
36825
+ };
36826
+ time_log_week_approvals: {
36827
+ Row: {
36828
+ approved_at: string | null;
36829
+ approved_by: string | null;
36830
+ created_at: string;
36831
+ employee_id: string;
36832
+ id: string;
36833
+ locked: boolean;
36834
+ notes: string | null;
36835
+ status: string;
36836
+ submitted_at: string | null;
36837
+ updated_at: string;
36838
+ week_start: string;
36839
+ };
36840
+ Insert: {
36841
+ approved_at?: string | null;
36842
+ approved_by?: string | null;
36843
+ created_at?: string;
36844
+ employee_id: string;
36845
+ id?: string;
36846
+ locked?: boolean;
36847
+ notes?: string | null;
36848
+ status?: string;
36849
+ submitted_at?: string | null;
36850
+ updated_at?: string;
36851
+ week_start: string;
36852
+ };
36853
+ Update: {
36854
+ approved_at?: string | null;
36855
+ approved_by?: string | null;
36856
+ created_at?: string;
36857
+ employee_id?: string;
36858
+ id?: string;
36859
+ locked?: boolean;
36860
+ notes?: string | null;
36861
+ status?: string;
36862
+ submitted_at?: string | null;
36863
+ updated_at?: string;
36864
+ week_start?: string;
36865
+ };
35964
36866
  Relationships: [{
35965
- foreignKeyName: "time_entries_employee_id_fkey";
36867
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
35966
36868
  columns: ["employee_id"];
35967
36869
  isOneToOne: false;
35968
- referencedRelation: "monteurs";
36870
+ referencedRelation: "profiles";
35969
36871
  referencedColumns: ["id"];
35970
36872
  }];
35971
36873
  };
35972
36874
  time_logs: {
35973
36875
  Row: {
36876
+ auto_stop_reason: string | null;
36877
+ auto_stopped: boolean;
35974
36878
  created_at: string;
36879
+ current_latitude: number | null;
36880
+ current_longitude: number | null;
36881
+ current_position_updated_at: string | null;
35975
36882
  employee_id: string;
36883
+ end_latitude: number | null;
36884
+ end_longitude: number | null;
35976
36885
  end_time: string | null;
36886
+ eta_distance_km: number | null;
36887
+ eta_minutes: number | null;
36888
+ eta_updated_at: string | null;
36889
+ hour_category: string | null;
35977
36890
  id: string;
36891
+ last_reminder_at: string | null;
35978
36892
  notes: string | null;
35979
36893
  overtime_hours: number;
35980
36894
  overtime_type: string | null;
35981
36895
  regular_hours: number;
36896
+ reminder_count: number;
36897
+ requires_review: boolean;
36898
+ start_latitude: number | null;
36899
+ start_longitude: number | null;
35982
36900
  start_time: string;
35983
36901
  travel_cost: number | null;
35984
36902
  travel_distance_km: number | null;
36903
+ travel_duration_min: number | null;
36904
+ travel_time_minutes: number | null;
35985
36905
  type: string;
35986
36906
  updated_at: string;
36907
+ work_order_id: string | null;
35987
36908
  };
35988
36909
  Insert: {
36910
+ auto_stop_reason?: string | null;
36911
+ auto_stopped?: boolean;
35989
36912
  created_at?: string;
36913
+ current_latitude?: number | null;
36914
+ current_longitude?: number | null;
36915
+ current_position_updated_at?: string | null;
35990
36916
  employee_id: string;
36917
+ end_latitude?: number | null;
36918
+ end_longitude?: number | null;
35991
36919
  end_time?: string | null;
36920
+ eta_distance_km?: number | null;
36921
+ eta_minutes?: number | null;
36922
+ eta_updated_at?: string | null;
36923
+ hour_category?: string | null;
35992
36924
  id?: string;
36925
+ last_reminder_at?: string | null;
35993
36926
  notes?: string | null;
35994
36927
  overtime_hours?: number;
35995
36928
  overtime_type?: string | null;
35996
36929
  regular_hours?: number;
36930
+ reminder_count?: number;
36931
+ requires_review?: boolean;
36932
+ start_latitude?: number | null;
36933
+ start_longitude?: number | null;
35997
36934
  start_time?: string;
35998
36935
  travel_cost?: number | null;
35999
36936
  travel_distance_km?: number | null;
36937
+ travel_duration_min?: number | null;
36938
+ travel_time_minutes?: number | null;
36000
36939
  type: string;
36001
36940
  updated_at?: string;
36941
+ work_order_id?: string | null;
36002
36942
  };
36003
36943
  Update: {
36944
+ auto_stop_reason?: string | null;
36945
+ auto_stopped?: boolean;
36004
36946
  created_at?: string;
36947
+ current_latitude?: number | null;
36948
+ current_longitude?: number | null;
36949
+ current_position_updated_at?: string | null;
36005
36950
  employee_id?: string;
36951
+ end_latitude?: number | null;
36952
+ end_longitude?: number | null;
36006
36953
  end_time?: string | null;
36954
+ eta_distance_km?: number | null;
36955
+ eta_minutes?: number | null;
36956
+ eta_updated_at?: string | null;
36957
+ hour_category?: string | null;
36007
36958
  id?: string;
36959
+ last_reminder_at?: string | null;
36008
36960
  notes?: string | null;
36009
36961
  overtime_hours?: number;
36010
36962
  overtime_type?: string | null;
36011
36963
  regular_hours?: number;
36964
+ reminder_count?: number;
36965
+ requires_review?: boolean;
36966
+ start_latitude?: number | null;
36967
+ start_longitude?: number | null;
36012
36968
  start_time?: string;
36013
36969
  travel_cost?: number | null;
36014
36970
  travel_distance_km?: number | null;
36971
+ travel_duration_min?: number | null;
36972
+ travel_time_minutes?: number | null;
36015
36973
  type?: string;
36016
36974
  updated_at?: string;
36975
+ work_order_id?: string | null;
36017
36976
  };
36018
36977
  Relationships: [{
36019
36978
  foreignKeyName: "time_logs_employee_id_fkey";
36020
36979
  columns: ["employee_id"];
36021
36980
  isOneToOne: false;
36022
- referencedRelation: "monteurs";
36981
+ referencedRelation: "profiles";
36982
+ referencedColumns: ["id"];
36983
+ }, {
36984
+ foreignKeyName: "time_logs_work_order_id_fkey";
36985
+ columns: ["work_order_id"];
36986
+ isOneToOne: false;
36987
+ referencedRelation: "work_orders";
36023
36988
  referencedColumns: ["id"];
36024
36989
  }];
36025
36990
  };
@@ -36058,7 +37023,7 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
36058
37023
  foreignKeyName: "time_off_entries_employee_id_fkey";
36059
37024
  columns: ["employee_id"];
36060
37025
  isOneToOne: false;
36061
- referencedRelation: "monteurs";
37026
+ referencedRelation: "profiles";
36062
37027
  referencedColumns: ["id"];
36063
37028
  }];
36064
37029
  };
@@ -36368,6 +37333,39 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
36368
37333
  };
36369
37334
  Relationships: [];
36370
37335
  };
37336
+ twinfield_cron_locks: {
37337
+ Row: {
37338
+ created_at: string;
37339
+ heartbeat_at: string;
37340
+ job_name: string;
37341
+ last_error: string | null;
37342
+ last_finished_at: string | null;
37343
+ locked_at: string;
37344
+ run_id: string;
37345
+ updated_at: string;
37346
+ };
37347
+ Insert: {
37348
+ created_at?: string;
37349
+ heartbeat_at?: string;
37350
+ job_name: string;
37351
+ last_error?: string | null;
37352
+ last_finished_at?: string | null;
37353
+ locked_at?: string;
37354
+ run_id?: string;
37355
+ updated_at?: string;
37356
+ };
37357
+ Update: {
37358
+ created_at?: string;
37359
+ heartbeat_at?: string;
37360
+ job_name?: string;
37361
+ last_error?: string | null;
37362
+ last_finished_at?: string | null;
37363
+ locked_at?: string;
37364
+ run_id?: string;
37365
+ updated_at?: string;
37366
+ };
37367
+ Relationships: [];
37368
+ };
36371
37369
  twinfield_customers: {
36372
37370
  Row: {
36373
37371
  address: string | null;
@@ -36968,6 +37966,7 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
36968
37966
  twinfield_push_queue: {
36969
37967
  Row: {
36970
37968
  action: string;
37969
+ attempt_started_at: string | null;
36971
37970
  attempts: number;
36972
37971
  connection_id: string | null;
36973
37972
  created_at: string;
@@ -36984,6 +37983,7 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
36984
37983
  };
36985
37984
  Insert: {
36986
37985
  action?: string;
37986
+ attempt_started_at?: string | null;
36987
37987
  attempts?: number;
36988
37988
  connection_id?: string | null;
36989
37989
  created_at?: string;
@@ -37000,6 +38000,7 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
37000
38000
  };
37001
38001
  Update: {
37002
38002
  action?: string;
38003
+ attempt_started_at?: string | null;
37003
38004
  attempts?: number;
37004
38005
  connection_id?: string | null;
37005
38006
  created_at?: string;
@@ -37197,13 +38198,7 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
37197
38198
  workday_end?: string | null;
37198
38199
  workday_start?: string | null;
37199
38200
  };
37200
- Relationships: [{
37201
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
37202
- columns: ["monteur_id"];
37203
- isOneToOne: true;
37204
- referencedRelation: "monteurs";
37205
- referencedColumns: ["id"];
37206
- }];
38201
+ Relationships: [];
37207
38202
  };
37208
38203
  uren_entries: {
37209
38204
  Row: {
@@ -37249,12 +38244,6 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
37249
38244
  werkbon_id?: string | null;
37250
38245
  };
37251
38246
  Relationships: [{
37252
- foreignKeyName: "uren_entries_monteur_id_fkey";
37253
- columns: ["monteur_id"];
37254
- isOneToOne: false;
37255
- referencedRelation: "monteurs";
37256
- referencedColumns: ["id"];
37257
- }, {
37258
38247
  foreignKeyName: "uren_entries_werkbon_id_fkey";
37259
38248
  columns: ["werkbon_id"];
37260
38249
  isOneToOne: false;
@@ -37722,17 +38711,12 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
37722
38711
  submitted_at?: string | null;
37723
38712
  updated_at?: string;
37724
38713
  };
37725
- Relationships: [{
37726
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
37727
- columns: ["monteur_id"];
37728
- isOneToOne: false;
37729
- referencedRelation: "monteurs";
37730
- referencedColumns: ["id"];
37731
- }];
38714
+ Relationships: [];
37732
38715
  };
37733
38716
  user_module_permissions: {
37734
38717
  Row: {
37735
38718
  created_at: string;
38719
+ feature_id: string;
37736
38720
  id: string;
37737
38721
  module_id: string;
37738
38722
  permission: string;
@@ -37741,6 +38725,7 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
37741
38725
  };
37742
38726
  Insert: {
37743
38727
  created_at?: string;
38728
+ feature_id?: string;
37744
38729
  id?: string;
37745
38730
  module_id: string;
37746
38731
  permission: string;
@@ -37749,6 +38734,7 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
37749
38734
  };
37750
38735
  Update: {
37751
38736
  created_at?: string;
38737
+ feature_id?: string;
37752
38738
  id?: string;
37753
38739
  module_id?: string;
37754
38740
  permission?: string;
@@ -37784,6 +38770,51 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
37784
38770
  referencedColumns: ["id"];
37785
38771
  }];
37786
38772
  };
38773
+ van_inventories: {
38774
+ Row: {
38775
+ barcode: string | null;
38776
+ created_at: string;
38777
+ id: string;
38778
+ monteur_id: string | null;
38779
+ price_per_unit: number;
38780
+ product_name: string;
38781
+ quantity_current: number;
38782
+ quantity_min: number;
38783
+ unit: string;
38784
+ updated_at: string;
38785
+ };
38786
+ Insert: {
38787
+ barcode?: string | null;
38788
+ created_at?: string;
38789
+ id?: string;
38790
+ monteur_id?: string | null;
38791
+ price_per_unit?: number;
38792
+ product_name: string;
38793
+ quantity_current?: number;
38794
+ quantity_min?: number;
38795
+ unit?: string;
38796
+ updated_at?: string;
38797
+ };
38798
+ Update: {
38799
+ barcode?: string | null;
38800
+ created_at?: string;
38801
+ id?: string;
38802
+ monteur_id?: string | null;
38803
+ price_per_unit?: number;
38804
+ product_name?: string;
38805
+ quantity_current?: number;
38806
+ quantity_min?: number;
38807
+ unit?: string;
38808
+ updated_at?: string;
38809
+ };
38810
+ Relationships: [{
38811
+ foreignKeyName: "van_inventories_monteur_id_fkey";
38812
+ columns: ["monteur_id"];
38813
+ isOneToOne: false;
38814
+ referencedRelation: "profiles";
38815
+ referencedColumns: ["id"];
38816
+ }];
38817
+ };
37787
38818
  voorraad_custom_fields: {
37788
38819
  Row: {
37789
38820
  created_at: string;
@@ -38734,7 +39765,7 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
38734
39765
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
38735
39766
  columns: ["monteur_id"];
38736
39767
  isOneToOne: false;
38737
- referencedRelation: "monteurs";
39768
+ referencedRelation: "profiles";
38738
39769
  referencedColumns: ["id"];
38739
39770
  }, {
38740
39771
  foreignKeyName: "work_order_monteurs_work_order_id_fkey";
@@ -38744,6 +39775,60 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
38744
39775
  referencedColumns: ["id"];
38745
39776
  }];
38746
39777
  };
39778
+ work_order_photos: {
39779
+ Row: {
39780
+ ai_caption: string | null;
39781
+ ai_categorized_at: string | null;
39782
+ ai_labels: import("../integrations/supabase/types").Json | null;
39783
+ caption: string | null;
39784
+ created_at: string;
39785
+ id: string;
39786
+ monteur_id: string | null;
39787
+ photo_type: string;
39788
+ storage_path: string;
39789
+ updated_at: string;
39790
+ work_order_id: string;
39791
+ };
39792
+ Insert: {
39793
+ ai_caption?: string | null;
39794
+ ai_categorized_at?: string | null;
39795
+ ai_labels?: import("../integrations/supabase/types").Json | null;
39796
+ caption?: string | null;
39797
+ created_at?: string;
39798
+ id?: string;
39799
+ monteur_id?: string | null;
39800
+ photo_type?: string;
39801
+ storage_path: string;
39802
+ updated_at?: string;
39803
+ work_order_id: string;
39804
+ };
39805
+ Update: {
39806
+ ai_caption?: string | null;
39807
+ ai_categorized_at?: string | null;
39808
+ ai_labels?: import("../integrations/supabase/types").Json | null;
39809
+ caption?: string | null;
39810
+ created_at?: string;
39811
+ id?: string;
39812
+ monteur_id?: string | null;
39813
+ photo_type?: string;
39814
+ storage_path?: string;
39815
+ updated_at?: string;
39816
+ work_order_id?: string;
39817
+ };
39818
+ Relationships: [{
39819
+ foreignKeyName: "work_order_photos_monteur_id_fkey";
39820
+ columns: ["monteur_id"];
39821
+ isOneToOne: false;
39822
+ referencedRelation: "profiles";
39823
+ referencedColumns: ["id"];
39824
+ }, {
39825
+ foreignKeyName: "work_order_photos_work_order_id_fkey";
39826
+ columns: ["work_order_id"];
39827
+ isOneToOne: false;
39828
+ referencedRelation: "work_orders";
39829
+ referencedColumns: ["id"];
39830
+ }];
39831
+ };
38747
39832
  work_orders: {
38748
39833
  Row: {
38749
39834
  assigned_to: string | null;
@@ -38775,7 +39860,6 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
38775
39860
  scheduled_end_time: string | null;
38776
39861
  scheduled_start_time: string | null;
38777
39862
  status: string;
38778
- tenant_id: string;
38779
39863
  total_hours_worked: number | null;
38780
39864
  total_price: number | null;
38781
39865
  travel_time_minutes: number | null;
@@ -38813,7 +39897,6 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
38813
39897
  scheduled_end_time?: string | null;
38814
39898
  scheduled_start_time?: string | null;
38815
39899
  status?: string;
38816
- tenant_id: string;
38817
39900
  total_hours_worked?: number | null;
38818
39901
  total_price?: number | null;
38819
39902
  travel_time_minutes?: number | null;
@@ -38851,7 +39934,6 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
38851
39934
  scheduled_end_time?: string | null;
38852
39935
  scheduled_start_time?: string | null;
38853
39936
  status?: string;
38854
- tenant_id?: string;
38855
39937
  total_hours_worked?: number | null;
38856
39938
  total_price?: number | null;
38857
39939
  travel_time_minutes?: number | null;
@@ -38865,12 +39947,6 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
38865
39947
  isOneToOne: false;
38866
39948
  referencedRelation: "work_orders";
38867
39949
  referencedColumns: ["id"];
38868
- }, {
38869
- foreignKeyName: "work_orders_tenant_id_fkey";
38870
- columns: ["tenant_id"];
38871
- isOneToOne: false;
38872
- referencedRelation: "tenants";
38873
- referencedColumns: ["id"];
38874
39950
  }];
38875
39951
  };
38876
39952
  };
@@ -39555,6 +40631,19 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
39555
40631
  };
39556
40632
  Returns: undefined;
39557
40633
  };
40634
+ approve_mailbox_order_proposal: {
40635
+ Args: {
40636
+ p_custom_fields: import("../integrations/supabase/types").Json;
40637
+ p_customer_id: string;
40638
+ p_delivery_date: string;
40639
+ p_field_values?: import("../integrations/supabase/types").Json;
40640
+ p_lines: import("../integrations/supabase/types").Json;
40641
+ p_notes: string;
40642
+ p_proposal_id: string;
40643
+ p_reviewed_by: string;
40644
+ };
40645
+ Returns: import("../integrations/supabase/types").Json;
40646
+ };
39558
40647
  assign_cart_numbers: {
39559
40648
  Args: {
39560
40649
  p_carts: import("../integrations/supabase/types").Json;
@@ -39606,6 +40695,10 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
39606
40695
  };
39607
40696
  Returns: number;
39608
40697
  };
40698
+ can_manage_hours: {
40699
+ Args: never;
40700
+ Returns: boolean;
40701
+ };
39609
40702
  check_offer_product_available_stock: {
39610
40703
  Args: {
39611
40704
  p_campaign_product_id: string;
@@ -39795,6 +40888,7 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
39795
40888
  };
39796
40889
  Returns: {
39797
40890
  action: string;
40891
+ attempt_started_at: string | null;
39798
40892
  attempts: number;
39799
40893
  connection_id: string | null;
39800
40894
  created_at: string;
@@ -39882,6 +40976,30 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
39882
40976
  agent_naam: string;
39883
40977
  }[];
39884
40978
  };
40979
+ consume_van_inventory: {
40980
+ Args: {
40981
+ p_inventory_id: string;
40982
+ p_quantity: number;
40983
+ };
40984
+ Returns: {
40985
+ barcode: string | null;
40986
+ created_at: string;
40987
+ id: string;
40988
+ monteur_id: string | null;
40989
+ price_per_unit: number;
40990
+ product_name: string;
40991
+ quantity_current: number;
40992
+ quantity_min: number;
40993
+ unit: string;
40994
+ updated_at: string;
40995
+ };
40996
+ SetofOptions: {
40997
+ from: "*";
40998
+ to: "van_inventories";
40999
+ isOneToOne: true;
41000
+ isSetofReturn: false;
41001
+ };
41002
+ };
39885
41003
  control_get_todays_carts: {
39886
41004
  Args: never;
39887
41005
  Returns: {
@@ -39955,6 +41073,13 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
39955
41073
  _user_id: string;
39956
41074
  };
39957
41075
  Returns: string;
41076
+ } | {
41077
+ Args: {
41078
+ _feature_id: string;
41079
+ _module_id: string;
41080
+ _user_id: string;
41081
+ };
41082
+ Returns: string;
39958
41083
  };
39959
41084
  email_auth_decrypt: {
39960
41085
  Args: {
@@ -40306,12 +41431,6 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
40306
41431
  Args: never;
40307
41432
  Returns: string;
40308
41433
  };
40309
- get_work_order_tenant_id: {
40310
- Args: {
40311
- wo_id: string;
40312
- };
40313
- Returns: string;
40314
- };
40315
41434
  has_module_permission: {
40316
41435
  Args: {
40317
41436
  _min: string;
@@ -40345,6 +41464,13 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
40345
41464
  };
40346
41465
  Returns: boolean;
40347
41466
  };
41467
+ is_time_log_week_locked: {
41468
+ Args: {
41469
+ p_employee_id: string;
41470
+ p_start_time: string;
41471
+ };
41472
+ Returns: boolean;
41473
+ };
40348
41474
  is_user_admin: {
40349
41475
  Args: never;
40350
41476
  Returns: boolean;
@@ -40359,13 +41485,14 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
40359
41485
  };
40360
41486
  Returns: boolean;
40361
41487
  };
40362
- list_monteurs: {
41488
+ list_medewerkers: {
40363
41489
  Args: never;
40364
41490
  Returns: {
40365
41491
  avatar_url: string;
40366
41492
  display_name: string;
40367
41493
  email: string;
40368
41494
  id: string;
41495
+ roles: string[];
40369
41496
  }[];
40370
41497
  };
40371
41498
  list_my_planning_items: {
@@ -41156,6 +42283,7 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
41156
42283
  my_module_permissions: {
41157
42284
  Args: never;
41158
42285
  Returns: {
42286
+ feature_id: string;
41159
42287
  module_id: string;
41160
42288
  permission: string;
41161
42289
  }[];
@@ -42036,6 +43164,16 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
42036
43164
  };
42037
43165
  Returns: string[];
42038
43166
  };
43167
+ switch_time_log: {
43168
+ Args: {
43169
+ p_employee_id: string;
43170
+ p_start_lat?: number;
43171
+ p_start_lng?: number;
43172
+ p_type: string;
43173
+ p_work_order_id?: string;
43174
+ };
43175
+ Returns: import("../integrations/supabase/types").Json;
43176
+ };
42039
43177
  sync_all_layer_stocks: {
42040
43178
  Args: never;
42041
43179
  Returns: undefined;
@@ -42086,6 +43224,24 @@ export declare const fetchLogisticsDocument: import("@tanstack/start-client-core
42086
43224
  };
42087
43225
  Returns: boolean;
42088
43226
  };
43227
+ twinfield_cron_lock_acquire: {
43228
+ Args: {
43229
+ _job_name: string;
43230
+ _stale_seconds?: number;
43231
+ };
43232
+ Returns: boolean;
43233
+ };
43234
+ twinfield_cron_lock_release: {
43235
+ Args: {
43236
+ _error?: string;
43237
+ _job_name: string;
43238
+ };
43239
+ Returns: undefined;
43240
+ };
43241
+ twinfield_prune_push_queue: {
43242
+ Args: never;
43243
+ Returns: number;
43244
+ };
42089
43245
  twinfield_register_cron: {
42090
43246
  Args: {
42091
43247
  apikey?: string;
@@ -43055,6 +44211,126 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
43055
44211
  };
43056
44212
  Relationships: [];
43057
44213
  };
44214
+ cao_holidays: {
44215
+ Row: {
44216
+ created_at: string;
44217
+ description: string | null;
44218
+ holiday_date: string;
44219
+ id: string;
44220
+ updated_at: string;
44221
+ };
44222
+ Insert: {
44223
+ created_at?: string;
44224
+ description?: string | null;
44225
+ holiday_date: string;
44226
+ id?: string;
44227
+ updated_at?: string;
44228
+ };
44229
+ Update: {
44230
+ created_at?: string;
44231
+ description?: string | null;
44232
+ holiday_date?: string;
44233
+ id?: string;
44234
+ updated_at?: string;
44235
+ };
44236
+ Relationships: [];
44237
+ };
44238
+ cao_settings: {
44239
+ Row: {
44240
+ auto_break_after_hours: number;
44241
+ auto_break_minutes: number;
44242
+ auto_break_unpaid: boolean;
44243
+ auto_stop_after_hours: number;
44244
+ callout_fee: number;
44245
+ created_at: string;
44246
+ daily_regular_hours: number;
44247
+ default_hourly_rate: number;
44248
+ id: string;
44249
+ materials_markup_percent: number;
44250
+ max_daily_hours: number;
44251
+ max_weekly_hours: number;
44252
+ meal_allowance_amount: number;
44253
+ overtime_pct_178: number;
44254
+ overtime_pct_189: number;
44255
+ overtime_pct_212: number;
44256
+ reminder_after_hours: number;
44257
+ standby_evening_amount: number;
44258
+ standby_weekend_amount: number;
44259
+ travel_cost_per_km: number | null;
44260
+ travel_cost_threshold_km: number | null;
44261
+ travel_counts_as_work: boolean;
44262
+ travel_hourly_rate: number;
44263
+ travel_rate_per_hour: number;
44264
+ travel_threshold_minutes: number;
44265
+ updated_at: string;
44266
+ weekend_always_212: boolean;
44267
+ window_end: string;
44268
+ window_start: string;
44269
+ };
44270
+ Insert: {
44271
+ auto_break_after_hours?: number;
44272
+ auto_break_minutes?: number;
44273
+ auto_break_unpaid?: boolean;
44274
+ auto_stop_after_hours?: number;
44275
+ callout_fee?: number;
44276
+ created_at?: string;
44277
+ daily_regular_hours?: number;
44278
+ default_hourly_rate?: number;
44279
+ id?: string;
44280
+ materials_markup_percent?: number;
44281
+ max_daily_hours?: number;
44282
+ max_weekly_hours?: number;
44283
+ meal_allowance_amount?: number;
44284
+ overtime_pct_178?: number;
44285
+ overtime_pct_189?: number;
44286
+ overtime_pct_212?: number;
44287
+ reminder_after_hours?: number;
44288
+ standby_evening_amount?: number;
44289
+ standby_weekend_amount?: number;
44290
+ travel_cost_per_km?: number | null;
44291
+ travel_cost_threshold_km?: number | null;
44292
+ travel_counts_as_work?: boolean;
44293
+ travel_hourly_rate?: number;
44294
+ travel_rate_per_hour?: number;
44295
+ travel_threshold_minutes?: number;
44296
+ updated_at?: string;
44297
+ weekend_always_212?: boolean;
44298
+ window_end?: string;
44299
+ window_start?: string;
44300
+ };
44301
+ Update: {
44302
+ auto_break_after_hours?: number;
44303
+ auto_break_minutes?: number;
44304
+ auto_break_unpaid?: boolean;
44305
+ auto_stop_after_hours?: number;
44306
+ callout_fee?: number;
44307
+ created_at?: string;
44308
+ daily_regular_hours?: number;
44309
+ default_hourly_rate?: number;
44310
+ id?: string;
44311
+ materials_markup_percent?: number;
44312
+ max_daily_hours?: number;
44313
+ max_weekly_hours?: number;
44314
+ meal_allowance_amount?: number;
44315
+ overtime_pct_178?: number;
44316
+ overtime_pct_189?: number;
44317
+ overtime_pct_212?: number;
44318
+ reminder_after_hours?: number;
44319
+ standby_evening_amount?: number;
44320
+ standby_weekend_amount?: number;
44321
+ travel_cost_per_km?: number | null;
44322
+ travel_cost_threshold_km?: number | null;
44323
+ travel_counts_as_work?: boolean;
44324
+ travel_hourly_rate?: number;
44325
+ travel_rate_per_hour?: number;
44326
+ travel_threshold_minutes?: number;
44327
+ updated_at?: string;
44328
+ weekend_always_212?: boolean;
44329
+ window_end?: string;
44330
+ window_start?: string;
44331
+ };
44332
+ Relationships: [];
44333
+ };
43058
44334
  carrier_shipping_rates: {
43059
44335
  Row: {
43060
44336
  carrier_id: string;
@@ -49949,7 +51225,6 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
49949
51225
  start_date: string;
49950
51226
  start_time: string | null;
49951
51227
  status: string;
49952
- tenant_id: string;
49953
51228
  updated_at: string;
49954
51229
  user_id: string;
49955
51230
  };
@@ -49967,7 +51242,6 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
49967
51242
  start_date: string;
49968
51243
  start_time?: string | null;
49969
51244
  status?: string;
49970
- tenant_id?: string;
49971
51245
  updated_at?: string;
49972
51246
  user_id: string;
49973
51247
  };
@@ -49985,7 +51259,6 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
49985
51259
  start_date?: string;
49986
51260
  start_time?: string | null;
49987
51261
  status?: string;
49988
- tenant_id?: string;
49989
51262
  updated_at?: string;
49990
51263
  user_id?: string;
49991
51264
  };
@@ -49993,13 +51266,13 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
49993
51266
  foreignKeyName: "leave_requests_monteur_id_fkey";
49994
51267
  columns: ["monteur_id"];
49995
51268
  isOneToOne: false;
49996
- referencedRelation: "monteurs";
51269
+ referencedRelation: "profiles";
49997
51270
  referencedColumns: ["id"];
49998
51271
  }, {
49999
51272
  foreignKeyName: "leave_requests_user_id_fkey";
50000
51273
  columns: ["user_id"];
50001
51274
  isOneToOne: false;
50002
- referencedRelation: "monteurs";
51275
+ referencedRelation: "profiles";
50003
51276
  referencedColumns: ["id"];
50004
51277
  }];
50005
51278
  };
@@ -52154,6 +53427,90 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
52154
53427
  };
52155
53428
  Relationships: [];
52156
53429
  };
53430
+ material_usage: {
53431
+ Row: {
53432
+ created_at: string;
53433
+ id: string;
53434
+ material_name: string;
53435
+ monteur_id: string | null;
53436
+ price_at_time: number;
53437
+ quantity_used: number;
53438
+ updated_at: string;
53439
+ van_inventory_id: string | null;
53440
+ work_order_id: string;
53441
+ };
53442
+ Insert: {
53443
+ created_at?: string;
53444
+ id?: string;
53445
+ material_name: string;
53446
+ monteur_id?: string | null;
53447
+ price_at_time?: number;
53448
+ quantity_used?: number;
53449
+ updated_at?: string;
53450
+ van_inventory_id?: string | null;
53451
+ work_order_id: string;
53452
+ };
53453
+ Update: {
53454
+ created_at?: string;
53455
+ id?: string;
53456
+ material_name?: string;
53457
+ monteur_id?: string | null;
53458
+ price_at_time?: number;
53459
+ quantity_used?: number;
53460
+ updated_at?: string;
53461
+ van_inventory_id?: string | null;
53462
+ work_order_id?: string;
53463
+ };
53464
+ Relationships: [{
53465
+ foreignKeyName: "material_usage_monteur_id_fkey";
53466
+ columns: ["monteur_id"];
53467
+ isOneToOne: false;
53468
+ referencedRelation: "profiles";
53469
+ referencedColumns: ["id"];
53470
+ }, {
53471
+ foreignKeyName: "material_usage_van_inventory_id_fkey";
53472
+ columns: ["van_inventory_id"];
53473
+ isOneToOne: false;
53474
+ referencedRelation: "van_inventories";
53475
+ referencedColumns: ["id"];
53476
+ }, {
53477
+ foreignKeyName: "material_usage_work_order_id_fkey";
53478
+ columns: ["work_order_id"];
53479
+ isOneToOne: false;
53480
+ referencedRelation: "work_orders";
53481
+ referencedColumns: ["id"];
53482
+ }];
53483
+ };
53484
+ module_features: {
53485
+ Row: {
53486
+ created_at: string;
53487
+ feature_id: string;
53488
+ id: string;
53489
+ is_active: boolean;
53490
+ last_seen_at: string;
53491
+ module_id: string;
53492
+ name: string;
53493
+ };
53494
+ Insert: {
53495
+ created_at?: string;
53496
+ feature_id: string;
53497
+ id?: string;
53498
+ is_active?: boolean;
53499
+ last_seen_at?: string;
53500
+ module_id: string;
53501
+ name: string;
53502
+ };
53503
+ Update: {
53504
+ created_at?: string;
53505
+ feature_id?: string;
53506
+ id?: string;
53507
+ is_active?: boolean;
53508
+ last_seen_at?: string;
53509
+ module_id?: string;
53510
+ name?: string;
53511
+ };
53512
+ Relationships: [];
53513
+ };
52157
53514
  module_permissions: {
52158
53515
  Row: {
52159
53516
  created_at: string;
@@ -52184,6 +53541,7 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
52184
53541
  module_registry: {
52185
53542
  Row: {
52186
53543
  created_at: string;
53544
+ enforce: boolean;
52187
53545
  is_active: boolean;
52188
53546
  last_seen_at: string;
52189
53547
  module_id: string;
@@ -52193,6 +53551,7 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
52193
53551
  };
52194
53552
  Insert: {
52195
53553
  created_at?: string;
53554
+ enforce?: boolean;
52196
53555
  is_active?: boolean;
52197
53556
  last_seen_at?: string;
52198
53557
  module_id: string;
@@ -52202,6 +53561,7 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
52202
53561
  };
52203
53562
  Update: {
52204
53563
  created_at?: string;
53564
+ enforce?: boolean;
52205
53565
  is_active?: boolean;
52206
53566
  last_seen_at?: string;
52207
53567
  module_id?: string;
@@ -52262,63 +53622,6 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
52262
53622
  };
52263
53623
  Relationships: [];
52264
53624
  };
52265
- monteurs: {
52266
- Row: {
52267
- avatar_url: string | null;
52268
- color: string | null;
52269
- created_at: string;
52270
- email: string | null;
52271
- id: string;
52272
- is_active: boolean;
52273
- leave_balance_hours: number;
52274
- name: string;
52275
- persnr: number | null;
52276
- phone: string | null;
52277
- role: string;
52278
- tenant_id: string;
52279
- updated_at: string;
52280
- user_id: string | null;
52281
- };
52282
- Insert: {
52283
- avatar_url?: string | null;
52284
- color?: string | null;
52285
- created_at?: string;
52286
- email?: string | null;
52287
- id?: string;
52288
- is_active?: boolean;
52289
- leave_balance_hours?: number;
52290
- name: string;
52291
- persnr?: number | null;
52292
- phone?: string | null;
52293
- role?: string;
52294
- tenant_id: string;
52295
- updated_at?: string;
52296
- user_id?: string | null;
52297
- };
52298
- Update: {
52299
- avatar_url?: string | null;
52300
- color?: string | null;
52301
- created_at?: string;
52302
- email?: string | null;
52303
- id?: string;
52304
- is_active?: boolean;
52305
- leave_balance_hours?: number;
52306
- name?: string;
52307
- persnr?: number | null;
52308
- phone?: string | null;
52309
- role?: string;
52310
- tenant_id?: string;
52311
- updated_at?: string;
52312
- user_id?: string | null;
52313
- };
52314
- Relationships: [{
52315
- foreignKeyName: "monteurs_tenant_id_fkey";
52316
- columns: ["tenant_id"];
52317
- isOneToOne: false;
52318
- referencedRelation: "tenants";
52319
- referencedColumns: ["id"];
52320
- }];
52321
- };
52322
53625
  nmbrs_component_mapping: {
52323
53626
  Row: {
52324
53627
  created_at: string;
@@ -52389,13 +53692,7 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
52389
53692
  nmbrs_employee_number?: string;
52390
53693
  updated_at?: string;
52391
53694
  };
52392
- Relationships: [{
52393
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
52394
- columns: ["monteur_id"];
52395
- isOneToOne: true;
52396
- referencedRelation: "monteurs";
52397
- referencedColumns: ["id"];
52398
- }];
53695
+ Relationships: [];
52399
53696
  };
52400
53697
  nmbrs_export_lines: {
52401
53698
  Row: {
@@ -52444,12 +53741,6 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
52444
53741
  wage_code?: string;
52445
53742
  };
52446
53743
  Relationships: [{
52447
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
52448
- columns: ["monteur_id"];
52449
- isOneToOne: false;
52450
- referencedRelation: "monteurs";
52451
- referencedColumns: ["id"];
52452
- }, {
52453
53744
  foreignKeyName: "nmbrs_export_lines_run_id_fkey";
52454
53745
  columns: ["run_id"];
52455
53746
  isOneToOne: false;
@@ -54840,6 +56131,9 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
54840
56131
  created_at: string;
54841
56132
  id: string;
54842
56133
  laatst_gezien: string;
56134
+ laatste_fout: string | null;
56135
+ laatste_request_id: number | null;
56136
+ mislukte_posts: number;
54843
56137
  tick_sleutel: string;
54844
56138
  updated_at: string;
54845
56139
  };
@@ -54849,6 +56143,9 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
54849
56143
  created_at?: string;
54850
56144
  id?: string;
54851
56145
  laatst_gezien?: string;
56146
+ laatste_fout?: string | null;
56147
+ laatste_request_id?: number | null;
56148
+ mislukte_posts?: number;
54852
56149
  tick_sleutel?: string;
54853
56150
  updated_at?: string;
54854
56151
  };
@@ -54858,6 +56155,9 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
54858
56155
  created_at?: string;
54859
56156
  id?: string;
54860
56157
  laatst_gezien?: string;
56158
+ laatste_fout?: string | null;
56159
+ laatste_request_id?: number | null;
56160
+ mislukte_posts?: number;
54861
56161
  tick_sleutel?: string;
54862
56162
  updated_at?: string;
54863
56163
  };
@@ -56366,6 +57666,96 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
56366
57666
  referencedColumns: ["id"];
56367
57667
  }];
56368
57668
  };
57669
+ role_assignments: {
57670
+ Row: {
57671
+ created_at: string;
57672
+ id: string;
57673
+ role_id: string;
57674
+ user_id: string;
57675
+ };
57676
+ Insert: {
57677
+ created_at?: string;
57678
+ id?: string;
57679
+ role_id: string;
57680
+ user_id: string;
57681
+ };
57682
+ Update: {
57683
+ created_at?: string;
57684
+ id?: string;
57685
+ role_id?: string;
57686
+ user_id?: string;
57687
+ };
57688
+ Relationships: [{
57689
+ foreignKeyName: "role_assignments_role_id_fkey";
57690
+ columns: ["role_id"];
57691
+ isOneToOne: false;
57692
+ referencedRelation: "roles";
57693
+ referencedColumns: ["id"];
57694
+ }];
57695
+ };
57696
+ role_permissions: {
57697
+ Row: {
57698
+ can_edit: boolean;
57699
+ can_view: boolean;
57700
+ feature_id: string;
57701
+ id: string;
57702
+ module_id: string;
57703
+ role_id: string;
57704
+ updated_at: string;
57705
+ };
57706
+ Insert: {
57707
+ can_edit?: boolean;
57708
+ can_view?: boolean;
57709
+ feature_id?: string;
57710
+ id?: string;
57711
+ module_id: string;
57712
+ role_id: string;
57713
+ updated_at?: string;
57714
+ };
57715
+ Update: {
57716
+ can_edit?: boolean;
57717
+ can_view?: boolean;
57718
+ feature_id?: string;
57719
+ id?: string;
57720
+ module_id?: string;
57721
+ role_id?: string;
57722
+ updated_at?: string;
57723
+ };
57724
+ Relationships: [{
57725
+ foreignKeyName: "role_permissions_role_id_fkey";
57726
+ columns: ["role_id"];
57727
+ isOneToOne: false;
57728
+ referencedRelation: "roles";
57729
+ referencedColumns: ["id"];
57730
+ }];
57731
+ };
57732
+ roles: {
57733
+ Row: {
57734
+ created_at: string;
57735
+ id: string;
57736
+ is_protected: boolean;
57737
+ key: string;
57738
+ name: string;
57739
+ updated_at: string;
57740
+ };
57741
+ Insert: {
57742
+ created_at?: string;
57743
+ id?: string;
57744
+ is_protected?: boolean;
57745
+ key: string;
57746
+ name: string;
57747
+ updated_at?: string;
57748
+ };
57749
+ Update: {
57750
+ created_at?: string;
57751
+ id?: string;
57752
+ is_protected?: boolean;
57753
+ key?: string;
57754
+ name?: string;
57755
+ updated_at?: string;
57756
+ };
57757
+ Relationships: [];
57758
+ };
56369
57759
  rooms: {
56370
57760
  Row: {
56371
57761
  capacity: number;
@@ -57035,6 +58425,54 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
57035
58425
  };
57036
58426
  Relationships: [];
57037
58427
  };
58428
+ time_compensation_entries: {
58429
+ Row: {
58430
+ created_at: string;
58431
+ employee_id: string;
58432
+ entry_date: string;
58433
+ id: string;
58434
+ km: number;
58435
+ meal_allowance: number;
58436
+ notes: string | null;
58437
+ standby_evening: number;
58438
+ standby_weekend: number;
58439
+ tvt_change: number;
58440
+ updated_at: string;
58441
+ };
58442
+ Insert: {
58443
+ created_at?: string;
58444
+ employee_id: string;
58445
+ entry_date: string;
58446
+ id?: string;
58447
+ km?: number;
58448
+ meal_allowance?: number;
58449
+ notes?: string | null;
58450
+ standby_evening?: number;
58451
+ standby_weekend?: number;
58452
+ tvt_change?: number;
58453
+ updated_at?: string;
58454
+ };
58455
+ Update: {
58456
+ created_at?: string;
58457
+ employee_id?: string;
58458
+ entry_date?: string;
58459
+ id?: string;
58460
+ km?: number;
58461
+ meal_allowance?: number;
58462
+ notes?: string | null;
58463
+ standby_evening?: number;
58464
+ standby_weekend?: number;
58465
+ tvt_change?: number;
58466
+ updated_at?: string;
58467
+ };
58468
+ Relationships: [{
58469
+ foreignKeyName: "time_compensation_entries_employee_id_fkey";
58470
+ columns: ["employee_id"];
58471
+ isOneToOne: false;
58472
+ referencedRelation: "profiles";
58473
+ referencedColumns: ["id"];
58474
+ }];
58475
+ };
57038
58476
  time_entries: {
57039
58477
  Row: {
57040
58478
  created_at: string;
@@ -57069,65 +58507,170 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
57069
58507
  undertime?: number;
57070
58508
  updated_at?: string;
57071
58509
  };
58510
+ Relationships: [];
58511
+ };
58512
+ time_log_week_approvals: {
58513
+ Row: {
58514
+ approved_at: string | null;
58515
+ approved_by: string | null;
58516
+ created_at: string;
58517
+ employee_id: string;
58518
+ id: string;
58519
+ locked: boolean;
58520
+ notes: string | null;
58521
+ status: string;
58522
+ submitted_at: string | null;
58523
+ updated_at: string;
58524
+ week_start: string;
58525
+ };
58526
+ Insert: {
58527
+ approved_at?: string | null;
58528
+ approved_by?: string | null;
58529
+ created_at?: string;
58530
+ employee_id: string;
58531
+ id?: string;
58532
+ locked?: boolean;
58533
+ notes?: string | null;
58534
+ status?: string;
58535
+ submitted_at?: string | null;
58536
+ updated_at?: string;
58537
+ week_start: string;
58538
+ };
58539
+ Update: {
58540
+ approved_at?: string | null;
58541
+ approved_by?: string | null;
58542
+ created_at?: string;
58543
+ employee_id?: string;
58544
+ id?: string;
58545
+ locked?: boolean;
58546
+ notes?: string | null;
58547
+ status?: string;
58548
+ submitted_at?: string | null;
58549
+ updated_at?: string;
58550
+ week_start?: string;
58551
+ };
57072
58552
  Relationships: [{
57073
- foreignKeyName: "time_entries_employee_id_fkey";
58553
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
57074
58554
  columns: ["employee_id"];
57075
58555
  isOneToOne: false;
57076
- referencedRelation: "monteurs";
58556
+ referencedRelation: "profiles";
57077
58557
  referencedColumns: ["id"];
57078
58558
  }];
57079
58559
  };
57080
58560
  time_logs: {
57081
58561
  Row: {
58562
+ auto_stop_reason: string | null;
58563
+ auto_stopped: boolean;
57082
58564
  created_at: string;
58565
+ current_latitude: number | null;
58566
+ current_longitude: number | null;
58567
+ current_position_updated_at: string | null;
57083
58568
  employee_id: string;
58569
+ end_latitude: number | null;
58570
+ end_longitude: number | null;
57084
58571
  end_time: string | null;
58572
+ eta_distance_km: number | null;
58573
+ eta_minutes: number | null;
58574
+ eta_updated_at: string | null;
58575
+ hour_category: string | null;
57085
58576
  id: string;
58577
+ last_reminder_at: string | null;
57086
58578
  notes: string | null;
57087
58579
  overtime_hours: number;
57088
58580
  overtime_type: string | null;
57089
58581
  regular_hours: number;
58582
+ reminder_count: number;
58583
+ requires_review: boolean;
58584
+ start_latitude: number | null;
58585
+ start_longitude: number | null;
57090
58586
  start_time: string;
57091
58587
  travel_cost: number | null;
57092
58588
  travel_distance_km: number | null;
58589
+ travel_duration_min: number | null;
58590
+ travel_time_minutes: number | null;
57093
58591
  type: string;
57094
58592
  updated_at: string;
58593
+ work_order_id: string | null;
57095
58594
  };
57096
58595
  Insert: {
58596
+ auto_stop_reason?: string | null;
58597
+ auto_stopped?: boolean;
57097
58598
  created_at?: string;
58599
+ current_latitude?: number | null;
58600
+ current_longitude?: number | null;
58601
+ current_position_updated_at?: string | null;
57098
58602
  employee_id: string;
58603
+ end_latitude?: number | null;
58604
+ end_longitude?: number | null;
57099
58605
  end_time?: string | null;
58606
+ eta_distance_km?: number | null;
58607
+ eta_minutes?: number | null;
58608
+ eta_updated_at?: string | null;
58609
+ hour_category?: string | null;
57100
58610
  id?: string;
58611
+ last_reminder_at?: string | null;
57101
58612
  notes?: string | null;
57102
58613
  overtime_hours?: number;
57103
58614
  overtime_type?: string | null;
57104
58615
  regular_hours?: number;
58616
+ reminder_count?: number;
58617
+ requires_review?: boolean;
58618
+ start_latitude?: number | null;
58619
+ start_longitude?: number | null;
57105
58620
  start_time?: string;
57106
58621
  travel_cost?: number | null;
57107
58622
  travel_distance_km?: number | null;
58623
+ travel_duration_min?: number | null;
58624
+ travel_time_minutes?: number | null;
57108
58625
  type: string;
57109
58626
  updated_at?: string;
58627
+ work_order_id?: string | null;
57110
58628
  };
57111
58629
  Update: {
58630
+ auto_stop_reason?: string | null;
58631
+ auto_stopped?: boolean;
57112
58632
  created_at?: string;
58633
+ current_latitude?: number | null;
58634
+ current_longitude?: number | null;
58635
+ current_position_updated_at?: string | null;
57113
58636
  employee_id?: string;
58637
+ end_latitude?: number | null;
58638
+ end_longitude?: number | null;
57114
58639
  end_time?: string | null;
58640
+ eta_distance_km?: number | null;
58641
+ eta_minutes?: number | null;
58642
+ eta_updated_at?: string | null;
58643
+ hour_category?: string | null;
57115
58644
  id?: string;
58645
+ last_reminder_at?: string | null;
57116
58646
  notes?: string | null;
57117
58647
  overtime_hours?: number;
57118
58648
  overtime_type?: string | null;
57119
58649
  regular_hours?: number;
58650
+ reminder_count?: number;
58651
+ requires_review?: boolean;
58652
+ start_latitude?: number | null;
58653
+ start_longitude?: number | null;
57120
58654
  start_time?: string;
57121
58655
  travel_cost?: number | null;
57122
58656
  travel_distance_km?: number | null;
58657
+ travel_duration_min?: number | null;
58658
+ travel_time_minutes?: number | null;
57123
58659
  type?: string;
57124
58660
  updated_at?: string;
58661
+ work_order_id?: string | null;
57125
58662
  };
57126
58663
  Relationships: [{
57127
58664
  foreignKeyName: "time_logs_employee_id_fkey";
57128
58665
  columns: ["employee_id"];
57129
58666
  isOneToOne: false;
57130
- referencedRelation: "monteurs";
58667
+ referencedRelation: "profiles";
58668
+ referencedColumns: ["id"];
58669
+ }, {
58670
+ foreignKeyName: "time_logs_work_order_id_fkey";
58671
+ columns: ["work_order_id"];
58672
+ isOneToOne: false;
58673
+ referencedRelation: "work_orders";
57131
58674
  referencedColumns: ["id"];
57132
58675
  }];
57133
58676
  };
@@ -57166,7 +58709,7 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
57166
58709
  foreignKeyName: "time_off_entries_employee_id_fkey";
57167
58710
  columns: ["employee_id"];
57168
58711
  isOneToOne: false;
57169
- referencedRelation: "monteurs";
58712
+ referencedRelation: "profiles";
57170
58713
  referencedColumns: ["id"];
57171
58714
  }];
57172
58715
  };
@@ -57476,6 +59019,39 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
57476
59019
  };
57477
59020
  Relationships: [];
57478
59021
  };
59022
+ twinfield_cron_locks: {
59023
+ Row: {
59024
+ created_at: string;
59025
+ heartbeat_at: string;
59026
+ job_name: string;
59027
+ last_error: string | null;
59028
+ last_finished_at: string | null;
59029
+ locked_at: string;
59030
+ run_id: string;
59031
+ updated_at: string;
59032
+ };
59033
+ Insert: {
59034
+ created_at?: string;
59035
+ heartbeat_at?: string;
59036
+ job_name: string;
59037
+ last_error?: string | null;
59038
+ last_finished_at?: string | null;
59039
+ locked_at?: string;
59040
+ run_id?: string;
59041
+ updated_at?: string;
59042
+ };
59043
+ Update: {
59044
+ created_at?: string;
59045
+ heartbeat_at?: string;
59046
+ job_name?: string;
59047
+ last_error?: string | null;
59048
+ last_finished_at?: string | null;
59049
+ locked_at?: string;
59050
+ run_id?: string;
59051
+ updated_at?: string;
59052
+ };
59053
+ Relationships: [];
59054
+ };
57479
59055
  twinfield_customers: {
57480
59056
  Row: {
57481
59057
  address: string | null;
@@ -58076,6 +59652,7 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
58076
59652
  twinfield_push_queue: {
58077
59653
  Row: {
58078
59654
  action: string;
59655
+ attempt_started_at: string | null;
58079
59656
  attempts: number;
58080
59657
  connection_id: string | null;
58081
59658
  created_at: string;
@@ -58092,6 +59669,7 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
58092
59669
  };
58093
59670
  Insert: {
58094
59671
  action?: string;
59672
+ attempt_started_at?: string | null;
58095
59673
  attempts?: number;
58096
59674
  connection_id?: string | null;
58097
59675
  created_at?: string;
@@ -58108,6 +59686,7 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
58108
59686
  };
58109
59687
  Update: {
58110
59688
  action?: string;
59689
+ attempt_started_at?: string | null;
58111
59690
  attempts?: number;
58112
59691
  connection_id?: string | null;
58113
59692
  created_at?: string;
@@ -58305,13 +59884,7 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
58305
59884
  workday_end?: string | null;
58306
59885
  workday_start?: string | null;
58307
59886
  };
58308
- Relationships: [{
58309
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
58310
- columns: ["monteur_id"];
58311
- isOneToOne: true;
58312
- referencedRelation: "monteurs";
58313
- referencedColumns: ["id"];
58314
- }];
59887
+ Relationships: [];
58315
59888
  };
58316
59889
  uren_entries: {
58317
59890
  Row: {
@@ -58357,12 +59930,6 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
58357
59930
  werkbon_id?: string | null;
58358
59931
  };
58359
59932
  Relationships: [{
58360
- foreignKeyName: "uren_entries_monteur_id_fkey";
58361
- columns: ["monteur_id"];
58362
- isOneToOne: false;
58363
- referencedRelation: "monteurs";
58364
- referencedColumns: ["id"];
58365
- }, {
58366
59933
  foreignKeyName: "uren_entries_werkbon_id_fkey";
58367
59934
  columns: ["werkbon_id"];
58368
59935
  isOneToOne: false;
@@ -58830,17 +60397,12 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
58830
60397
  submitted_at?: string | null;
58831
60398
  updated_at?: string;
58832
60399
  };
58833
- Relationships: [{
58834
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
58835
- columns: ["monteur_id"];
58836
- isOneToOne: false;
58837
- referencedRelation: "monteurs";
58838
- referencedColumns: ["id"];
58839
- }];
60400
+ Relationships: [];
58840
60401
  };
58841
60402
  user_module_permissions: {
58842
60403
  Row: {
58843
60404
  created_at: string;
60405
+ feature_id: string;
58844
60406
  id: string;
58845
60407
  module_id: string;
58846
60408
  permission: string;
@@ -58849,6 +60411,7 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
58849
60411
  };
58850
60412
  Insert: {
58851
60413
  created_at?: string;
60414
+ feature_id?: string;
58852
60415
  id?: string;
58853
60416
  module_id: string;
58854
60417
  permission: string;
@@ -58857,6 +60420,7 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
58857
60420
  };
58858
60421
  Update: {
58859
60422
  created_at?: string;
60423
+ feature_id?: string;
58860
60424
  id?: string;
58861
60425
  module_id?: string;
58862
60426
  permission?: string;
@@ -58892,6 +60456,51 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
58892
60456
  referencedColumns: ["id"];
58893
60457
  }];
58894
60458
  };
60459
+ van_inventories: {
60460
+ Row: {
60461
+ barcode: string | null;
60462
+ created_at: string;
60463
+ id: string;
60464
+ monteur_id: string | null;
60465
+ price_per_unit: number;
60466
+ product_name: string;
60467
+ quantity_current: number;
60468
+ quantity_min: number;
60469
+ unit: string;
60470
+ updated_at: string;
60471
+ };
60472
+ Insert: {
60473
+ barcode?: string | null;
60474
+ created_at?: string;
60475
+ id?: string;
60476
+ monteur_id?: string | null;
60477
+ price_per_unit?: number;
60478
+ product_name: string;
60479
+ quantity_current?: number;
60480
+ quantity_min?: number;
60481
+ unit?: string;
60482
+ updated_at?: string;
60483
+ };
60484
+ Update: {
60485
+ barcode?: string | null;
60486
+ created_at?: string;
60487
+ id?: string;
60488
+ monteur_id?: string | null;
60489
+ price_per_unit?: number;
60490
+ product_name?: string;
60491
+ quantity_current?: number;
60492
+ quantity_min?: number;
60493
+ unit?: string;
60494
+ updated_at?: string;
60495
+ };
60496
+ Relationships: [{
60497
+ foreignKeyName: "van_inventories_monteur_id_fkey";
60498
+ columns: ["monteur_id"];
60499
+ isOneToOne: false;
60500
+ referencedRelation: "profiles";
60501
+ referencedColumns: ["id"];
60502
+ }];
60503
+ };
58895
60504
  voorraad_custom_fields: {
58896
60505
  Row: {
58897
60506
  created_at: string;
@@ -59842,7 +61451,7 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
59842
61451
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
59843
61452
  columns: ["monteur_id"];
59844
61453
  isOneToOne: false;
59845
- referencedRelation: "monteurs";
61454
+ referencedRelation: "profiles";
59846
61455
  referencedColumns: ["id"];
59847
61456
  }, {
59848
61457
  foreignKeyName: "work_order_monteurs_work_order_id_fkey";
@@ -59852,6 +61461,60 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
59852
61461
  referencedColumns: ["id"];
59853
61462
  }];
59854
61463
  };
61464
+ work_order_photos: {
61465
+ Row: {
61466
+ ai_caption: string | null;
61467
+ ai_categorized_at: string | null;
61468
+ ai_labels: import("../integrations/supabase/types").Json | null;
61469
+ caption: string | null;
61470
+ created_at: string;
61471
+ id: string;
61472
+ monteur_id: string | null;
61473
+ photo_type: string;
61474
+ storage_path: string;
61475
+ updated_at: string;
61476
+ work_order_id: string;
61477
+ };
61478
+ Insert: {
61479
+ ai_caption?: string | null;
61480
+ ai_categorized_at?: string | null;
61481
+ ai_labels?: import("../integrations/supabase/types").Json | null;
61482
+ caption?: string | null;
61483
+ created_at?: string;
61484
+ id?: string;
61485
+ monteur_id?: string | null;
61486
+ photo_type?: string;
61487
+ storage_path: string;
61488
+ updated_at?: string;
61489
+ work_order_id: string;
61490
+ };
61491
+ Update: {
61492
+ ai_caption?: string | null;
61493
+ ai_categorized_at?: string | null;
61494
+ ai_labels?: import("../integrations/supabase/types").Json | null;
61495
+ caption?: string | null;
61496
+ created_at?: string;
61497
+ id?: string;
61498
+ monteur_id?: string | null;
61499
+ photo_type?: string;
61500
+ storage_path?: string;
61501
+ updated_at?: string;
61502
+ work_order_id?: string;
61503
+ };
61504
+ Relationships: [{
61505
+ foreignKeyName: "work_order_photos_monteur_id_fkey";
61506
+ columns: ["monteur_id"];
61507
+ isOneToOne: false;
61508
+ referencedRelation: "profiles";
61509
+ referencedColumns: ["id"];
61510
+ }, {
61511
+ foreignKeyName: "work_order_photos_work_order_id_fkey";
61512
+ columns: ["work_order_id"];
61513
+ isOneToOne: false;
61514
+ referencedRelation: "work_orders";
61515
+ referencedColumns: ["id"];
61516
+ }];
61517
+ };
59855
61518
  work_orders: {
59856
61519
  Row: {
59857
61520
  assigned_to: string | null;
@@ -59883,7 +61546,6 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
59883
61546
  scheduled_end_time: string | null;
59884
61547
  scheduled_start_time: string | null;
59885
61548
  status: string;
59886
- tenant_id: string;
59887
61549
  total_hours_worked: number | null;
59888
61550
  total_price: number | null;
59889
61551
  travel_time_minutes: number | null;
@@ -59921,7 +61583,6 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
59921
61583
  scheduled_end_time?: string | null;
59922
61584
  scheduled_start_time?: string | null;
59923
61585
  status?: string;
59924
- tenant_id: string;
59925
61586
  total_hours_worked?: number | null;
59926
61587
  total_price?: number | null;
59927
61588
  travel_time_minutes?: number | null;
@@ -59959,7 +61620,6 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
59959
61620
  scheduled_end_time?: string | null;
59960
61621
  scheduled_start_time?: string | null;
59961
61622
  status?: string;
59962
- tenant_id?: string;
59963
61623
  total_hours_worked?: number | null;
59964
61624
  total_price?: number | null;
59965
61625
  travel_time_minutes?: number | null;
@@ -59973,12 +61633,6 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
59973
61633
  isOneToOne: false;
59974
61634
  referencedRelation: "work_orders";
59975
61635
  referencedColumns: ["id"];
59976
- }, {
59977
- foreignKeyName: "work_orders_tenant_id_fkey";
59978
- columns: ["tenant_id"];
59979
- isOneToOne: false;
59980
- referencedRelation: "tenants";
59981
- referencedColumns: ["id"];
59982
61636
  }];
59983
61637
  };
59984
61638
  };
@@ -60663,6 +62317,19 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
60663
62317
  };
60664
62318
  Returns: undefined;
60665
62319
  };
62320
+ approve_mailbox_order_proposal: {
62321
+ Args: {
62322
+ p_custom_fields: import("../integrations/supabase/types").Json;
62323
+ p_customer_id: string;
62324
+ p_delivery_date: string;
62325
+ p_field_values?: import("../integrations/supabase/types").Json;
62326
+ p_lines: import("../integrations/supabase/types").Json;
62327
+ p_notes: string;
62328
+ p_proposal_id: string;
62329
+ p_reviewed_by: string;
62330
+ };
62331
+ Returns: import("../integrations/supabase/types").Json;
62332
+ };
60666
62333
  assign_cart_numbers: {
60667
62334
  Args: {
60668
62335
  p_carts: import("../integrations/supabase/types").Json;
@@ -60714,6 +62381,10 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
60714
62381
  };
60715
62382
  Returns: number;
60716
62383
  };
62384
+ can_manage_hours: {
62385
+ Args: never;
62386
+ Returns: boolean;
62387
+ };
60717
62388
  check_offer_product_available_stock: {
60718
62389
  Args: {
60719
62390
  p_campaign_product_id: string;
@@ -60903,6 +62574,7 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
60903
62574
  };
60904
62575
  Returns: {
60905
62576
  action: string;
62577
+ attempt_started_at: string | null;
60906
62578
  attempts: number;
60907
62579
  connection_id: string | null;
60908
62580
  created_at: string;
@@ -60990,6 +62662,30 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
60990
62662
  agent_naam: string;
60991
62663
  }[];
60992
62664
  };
62665
+ consume_van_inventory: {
62666
+ Args: {
62667
+ p_inventory_id: string;
62668
+ p_quantity: number;
62669
+ };
62670
+ Returns: {
62671
+ barcode: string | null;
62672
+ created_at: string;
62673
+ id: string;
62674
+ monteur_id: string | null;
62675
+ price_per_unit: number;
62676
+ product_name: string;
62677
+ quantity_current: number;
62678
+ quantity_min: number;
62679
+ unit: string;
62680
+ updated_at: string;
62681
+ };
62682
+ SetofOptions: {
62683
+ from: "*";
62684
+ to: "van_inventories";
62685
+ isOneToOne: true;
62686
+ isSetofReturn: false;
62687
+ };
62688
+ };
60993
62689
  control_get_todays_carts: {
60994
62690
  Args: never;
60995
62691
  Returns: {
@@ -61063,6 +62759,13 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
61063
62759
  _user_id: string;
61064
62760
  };
61065
62761
  Returns: string;
62762
+ } | {
62763
+ Args: {
62764
+ _feature_id: string;
62765
+ _module_id: string;
62766
+ _user_id: string;
62767
+ };
62768
+ Returns: string;
61066
62769
  };
61067
62770
  email_auth_decrypt: {
61068
62771
  Args: {
@@ -61414,12 +63117,6 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
61414
63117
  Args: never;
61415
63118
  Returns: string;
61416
63119
  };
61417
- get_work_order_tenant_id: {
61418
- Args: {
61419
- wo_id: string;
61420
- };
61421
- Returns: string;
61422
- };
61423
63120
  has_module_permission: {
61424
63121
  Args: {
61425
63122
  _min: string;
@@ -61453,6 +63150,13 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
61453
63150
  };
61454
63151
  Returns: boolean;
61455
63152
  };
63153
+ is_time_log_week_locked: {
63154
+ Args: {
63155
+ p_employee_id: string;
63156
+ p_start_time: string;
63157
+ };
63158
+ Returns: boolean;
63159
+ };
61456
63160
  is_user_admin: {
61457
63161
  Args: never;
61458
63162
  Returns: boolean;
@@ -61467,13 +63171,14 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
61467
63171
  };
61468
63172
  Returns: boolean;
61469
63173
  };
61470
- list_monteurs: {
63174
+ list_medewerkers: {
61471
63175
  Args: never;
61472
63176
  Returns: {
61473
63177
  avatar_url: string;
61474
63178
  display_name: string;
61475
63179
  email: string;
61476
63180
  id: string;
63181
+ roles: string[];
61477
63182
  }[];
61478
63183
  };
61479
63184
  list_my_planning_items: {
@@ -62264,6 +63969,7 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
62264
63969
  my_module_permissions: {
62265
63970
  Args: never;
62266
63971
  Returns: {
63972
+ feature_id: string;
62267
63973
  module_id: string;
62268
63974
  permission: string;
62269
63975
  }[];
@@ -63144,6 +64850,16 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
63144
64850
  };
63145
64851
  Returns: string[];
63146
64852
  };
64853
+ switch_time_log: {
64854
+ Args: {
64855
+ p_employee_id: string;
64856
+ p_start_lat?: number;
64857
+ p_start_lng?: number;
64858
+ p_type: string;
64859
+ p_work_order_id?: string;
64860
+ };
64861
+ Returns: import("../integrations/supabase/types").Json;
64862
+ };
63147
64863
  sync_all_layer_stocks: {
63148
64864
  Args: never;
63149
64865
  Returns: undefined;
@@ -63194,6 +64910,24 @@ export declare const fetchMergedLogisticsDocuments: import("@tanstack/start-clie
63194
64910
  };
63195
64911
  Returns: boolean;
63196
64912
  };
64913
+ twinfield_cron_lock_acquire: {
64914
+ Args: {
64915
+ _job_name: string;
64916
+ _stale_seconds?: number;
64917
+ };
64918
+ Returns: boolean;
64919
+ };
64920
+ twinfield_cron_lock_release: {
64921
+ Args: {
64922
+ _error?: string;
64923
+ _job_name: string;
64924
+ };
64925
+ Returns: undefined;
64926
+ };
64927
+ twinfield_prune_push_queue: {
64928
+ Args: never;
64929
+ Returns: number;
64930
+ };
63197
64931
  twinfield_register_cron: {
63198
64932
  Args: {
63199
64933
  apikey?: string;