@flowselections/admin-installatietechniek 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist-lib/components/AdminForInstallatieTechniek.d.ts.map +1 -1
  2. package/dist-lib/components/AdminForInstallatieTechniek.js +15 -4
  3. package/dist-lib/components/ModuleAccessGuard.d.ts +15 -0
  4. package/dist-lib/components/ModuleAccessGuard.d.ts.map +1 -0
  5. package/dist-lib/components/ModuleAccessGuard.js +40 -0
  6. package/dist-lib/hooks/useModulePermission.d.ts +8 -2
  7. package/dist-lib/hooks/useModulePermission.d.ts.map +1 -1
  8. package/dist-lib/hooks/useModulePermission.js +26 -23
  9. package/dist-lib/index.d.ts +2 -0
  10. package/dist-lib/index.d.ts.map +1 -1
  11. package/dist-lib/index.js +2 -0
  12. package/dist-lib/integrations/supabase/auth-attacher.d.ts.map +1 -1
  13. package/dist-lib/integrations/supabase/auth-attacher.js +5 -1
  14. package/dist-lib/integrations/supabase/auth-middleware.d.ts +555 -117
  15. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  16. package/dist-lib/integrations/supabase/auth-middleware.js +21 -7
  17. package/dist-lib/integrations/supabase/client.d.ts +555 -117
  18. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  19. package/dist-lib/integrations/supabase/client.server.d.ts +555 -117
  20. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  21. package/dist-lib/integrations/supabase/types.d.ts +567 -128
  22. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  23. package/dist-lib/lib/admin.functions.d.ts +30013 -1785
  24. package/dist-lib/lib/admin.functions.d.ts.map +1 -1
  25. package/dist-lib/lib/admin.functions.js +19 -1
  26. package/dist-lib/lib/permissions.server.d.ts +14 -0
  27. package/dist-lib/lib/permissions.server.d.ts.map +1 -0
  28. package/dist-lib/lib/permissions.server.js +26 -0
  29. package/package.json +87 -87
@@ -872,6 +872,126 @@ export declare const requireSupabaseAuth: 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 requireSupabaseAuth: 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 requireSupabaseAuth: 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 requireSupabaseAuth: 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 requireSupabaseAuth: 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,60 @@ export declare const requireSupabaseAuth: 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
+ };
9974
10145
  module_features: {
9975
10146
  Row: {
9976
10147
  created_at: string;
@@ -10031,6 +10202,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10031
10202
  module_registry: {
10032
10203
  Row: {
10033
10204
  created_at: string;
10205
+ enforce: boolean;
10034
10206
  is_active: boolean;
10035
10207
  last_seen_at: string;
10036
10208
  module_id: string;
@@ -10040,6 +10212,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10040
10212
  };
10041
10213
  Insert: {
10042
10214
  created_at?: string;
10215
+ enforce?: boolean;
10043
10216
  is_active?: boolean;
10044
10217
  last_seen_at?: string;
10045
10218
  module_id: string;
@@ -10049,6 +10222,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10049
10222
  };
10050
10223
  Update: {
10051
10224
  created_at?: string;
10225
+ enforce?: boolean;
10052
10226
  is_active?: boolean;
10053
10227
  last_seen_at?: string;
10054
10228
  module_id?: string;
@@ -10109,63 +10283,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10109
10283
  };
10110
10284
  Relationships: [];
10111
10285
  };
10112
- monteurs: {
10113
- Row: {
10114
- avatar_url: string | null;
10115
- color: string | null;
10116
- created_at: string;
10117
- email: string | null;
10118
- id: string;
10119
- is_active: boolean;
10120
- leave_balance_hours: number;
10121
- name: string;
10122
- persnr: number | null;
10123
- phone: string | null;
10124
- role: string;
10125
- tenant_id: string;
10126
- updated_at: string;
10127
- user_id: string | null;
10128
- };
10129
- Insert: {
10130
- avatar_url?: string | null;
10131
- color?: string | null;
10132
- created_at?: string;
10133
- email?: string | null;
10134
- id?: string;
10135
- is_active?: boolean;
10136
- leave_balance_hours?: number;
10137
- name: string;
10138
- persnr?: number | null;
10139
- phone?: string | null;
10140
- role?: string;
10141
- tenant_id: string;
10142
- updated_at?: string;
10143
- user_id?: string | null;
10144
- };
10145
- Update: {
10146
- avatar_url?: string | null;
10147
- color?: string | null;
10148
- created_at?: string;
10149
- email?: string | null;
10150
- id?: string;
10151
- is_active?: boolean;
10152
- leave_balance_hours?: number;
10153
- name?: string;
10154
- persnr?: number | null;
10155
- phone?: string | null;
10156
- role?: string;
10157
- tenant_id?: string;
10158
- updated_at?: string;
10159
- user_id?: string | null;
10160
- };
10161
- Relationships: [{
10162
- foreignKeyName: "monteurs_tenant_id_fkey";
10163
- columns: ["tenant_id"];
10164
- isOneToOne: false;
10165
- referencedRelation: "tenants";
10166
- referencedColumns: ["id"];
10167
- }];
10168
- };
10169
10286
  nmbrs_component_mapping: {
10170
10287
  Row: {
10171
10288
  created_at: string;
@@ -10236,13 +10353,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10236
10353
  nmbrs_employee_number?: string;
10237
10354
  updated_at?: string;
10238
10355
  };
10239
- Relationships: [{
10240
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
10241
- columns: ["monteur_id"];
10242
- isOneToOne: true;
10243
- referencedRelation: "monteurs";
10244
- referencedColumns: ["id"];
10245
- }];
10356
+ Relationships: [];
10246
10357
  };
10247
10358
  nmbrs_export_lines: {
10248
10359
  Row: {
@@ -10291,12 +10402,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10291
10402
  wage_code?: string;
10292
10403
  };
10293
10404
  Relationships: [{
10294
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
10295
- columns: ["monteur_id"];
10296
- isOneToOne: false;
10297
- referencedRelation: "monteurs";
10298
- referencedColumns: ["id"];
10299
- }, {
10300
10405
  foreignKeyName: "nmbrs_export_lines_run_id_fkey";
10301
10406
  columns: ["run_id"];
10302
10407
  isOneToOne: false;
@@ -14981,6 +15086,54 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
14981
15086
  };
14982
15087
  Relationships: [];
14983
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
+ };
14984
15137
  time_entries: {
14985
15138
  Row: {
14986
15139
  created_at: string;
@@ -15015,65 +15168,170 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
15015
15168
  undertime?: number;
15016
15169
  updated_at?: string;
15017
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
+ };
15018
15213
  Relationships: [{
15019
- foreignKeyName: "time_entries_employee_id_fkey";
15214
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
15020
15215
  columns: ["employee_id"];
15021
15216
  isOneToOne: false;
15022
- referencedRelation: "monteurs";
15217
+ referencedRelation: "profiles";
15023
15218
  referencedColumns: ["id"];
15024
15219
  }];
15025
15220
  };
15026
15221
  time_logs: {
15027
15222
  Row: {
15223
+ auto_stop_reason: string | null;
15224
+ auto_stopped: boolean;
15028
15225
  created_at: string;
15226
+ current_latitude: number | null;
15227
+ current_longitude: number | null;
15228
+ current_position_updated_at: string | null;
15029
15229
  employee_id: string;
15230
+ end_latitude: number | null;
15231
+ end_longitude: number | null;
15030
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;
15031
15237
  id: string;
15238
+ last_reminder_at: string | null;
15032
15239
  notes: string | null;
15033
15240
  overtime_hours: number;
15034
15241
  overtime_type: string | null;
15035
15242
  regular_hours: number;
15243
+ reminder_count: number;
15244
+ requires_review: boolean;
15245
+ start_latitude: number | null;
15246
+ start_longitude: number | null;
15036
15247
  start_time: string;
15037
15248
  travel_cost: number | null;
15038
15249
  travel_distance_km: number | null;
15250
+ travel_duration_min: number | null;
15251
+ travel_time_minutes: number | null;
15039
15252
  type: string;
15040
15253
  updated_at: string;
15254
+ work_order_id: string | null;
15041
15255
  };
15042
15256
  Insert: {
15257
+ auto_stop_reason?: string | null;
15258
+ auto_stopped?: boolean;
15043
15259
  created_at?: string;
15260
+ current_latitude?: number | null;
15261
+ current_longitude?: number | null;
15262
+ current_position_updated_at?: string | null;
15044
15263
  employee_id: string;
15264
+ end_latitude?: number | null;
15265
+ end_longitude?: number | null;
15045
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;
15046
15271
  id?: string;
15272
+ last_reminder_at?: string | null;
15047
15273
  notes?: string | null;
15048
15274
  overtime_hours?: number;
15049
15275
  overtime_type?: string | null;
15050
15276
  regular_hours?: number;
15277
+ reminder_count?: number;
15278
+ requires_review?: boolean;
15279
+ start_latitude?: number | null;
15280
+ start_longitude?: number | null;
15051
15281
  start_time?: string;
15052
15282
  travel_cost?: number | null;
15053
15283
  travel_distance_km?: number | null;
15284
+ travel_duration_min?: number | null;
15285
+ travel_time_minutes?: number | null;
15054
15286
  type: string;
15055
15287
  updated_at?: string;
15288
+ work_order_id?: string | null;
15056
15289
  };
15057
15290
  Update: {
15291
+ auto_stop_reason?: string | null;
15292
+ auto_stopped?: boolean;
15058
15293
  created_at?: string;
15294
+ current_latitude?: number | null;
15295
+ current_longitude?: number | null;
15296
+ current_position_updated_at?: string | null;
15059
15297
  employee_id?: string;
15298
+ end_latitude?: number | null;
15299
+ end_longitude?: number | null;
15060
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;
15061
15305
  id?: string;
15306
+ last_reminder_at?: string | null;
15062
15307
  notes?: string | null;
15063
15308
  overtime_hours?: number;
15064
15309
  overtime_type?: string | null;
15065
15310
  regular_hours?: number;
15311
+ reminder_count?: number;
15312
+ requires_review?: boolean;
15313
+ start_latitude?: number | null;
15314
+ start_longitude?: number | null;
15066
15315
  start_time?: string;
15067
15316
  travel_cost?: number | null;
15068
15317
  travel_distance_km?: number | null;
15318
+ travel_duration_min?: number | null;
15319
+ travel_time_minutes?: number | null;
15069
15320
  type?: string;
15070
15321
  updated_at?: string;
15322
+ work_order_id?: string | null;
15071
15323
  };
15072
15324
  Relationships: [{
15073
15325
  foreignKeyName: "time_logs_employee_id_fkey";
15074
15326
  columns: ["employee_id"];
15075
15327
  isOneToOne: false;
15076
- 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";
15077
15335
  referencedColumns: ["id"];
15078
15336
  }];
15079
15337
  };
@@ -15112,7 +15370,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
15112
15370
  foreignKeyName: "time_off_entries_employee_id_fkey";
15113
15371
  columns: ["employee_id"];
15114
15372
  isOneToOne: false;
15115
- referencedRelation: "monteurs";
15373
+ referencedRelation: "profiles";
15116
15374
  referencedColumns: ["id"];
15117
15375
  }];
15118
15376
  };
@@ -15422,6 +15680,39 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
15422
15680
  };
15423
15681
  Relationships: [];
15424
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
+ };
15425
15716
  twinfield_customers: {
15426
15717
  Row: {
15427
15718
  address: string | null;
@@ -16022,6 +16313,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
16022
16313
  twinfield_push_queue: {
16023
16314
  Row: {
16024
16315
  action: string;
16316
+ attempt_started_at: string | null;
16025
16317
  attempts: number;
16026
16318
  connection_id: string | null;
16027
16319
  created_at: string;
@@ -16038,6 +16330,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
16038
16330
  };
16039
16331
  Insert: {
16040
16332
  action?: string;
16333
+ attempt_started_at?: string | null;
16041
16334
  attempts?: number;
16042
16335
  connection_id?: string | null;
16043
16336
  created_at?: string;
@@ -16054,6 +16347,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
16054
16347
  };
16055
16348
  Update: {
16056
16349
  action?: string;
16350
+ attempt_started_at?: string | null;
16057
16351
  attempts?: number;
16058
16352
  connection_id?: string | null;
16059
16353
  created_at?: string;
@@ -16251,13 +16545,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
16251
16545
  workday_end?: string | null;
16252
16546
  workday_start?: string | null;
16253
16547
  };
16254
- Relationships: [{
16255
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
16256
- columns: ["monteur_id"];
16257
- isOneToOne: true;
16258
- referencedRelation: "monteurs";
16259
- referencedColumns: ["id"];
16260
- }];
16548
+ Relationships: [];
16261
16549
  };
16262
16550
  uren_entries: {
16263
16551
  Row: {
@@ -16303,12 +16591,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
16303
16591
  werkbon_id?: string | null;
16304
16592
  };
16305
16593
  Relationships: [{
16306
- foreignKeyName: "uren_entries_monteur_id_fkey";
16307
- columns: ["monteur_id"];
16308
- isOneToOne: false;
16309
- referencedRelation: "monteurs";
16310
- referencedColumns: ["id"];
16311
- }, {
16312
16594
  foreignKeyName: "uren_entries_werkbon_id_fkey";
16313
16595
  columns: ["werkbon_id"];
16314
16596
  isOneToOne: false;
@@ -16776,13 +17058,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
16776
17058
  submitted_at?: string | null;
16777
17059
  updated_at?: string;
16778
17060
  };
16779
- Relationships: [{
16780
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
16781
- columns: ["monteur_id"];
16782
- isOneToOne: false;
16783
- referencedRelation: "monteurs";
16784
- referencedColumns: ["id"];
16785
- }];
17061
+ Relationships: [];
16786
17062
  };
16787
17063
  user_module_permissions: {
16788
17064
  Row: {
@@ -16841,6 +17117,51 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
16841
17117
  referencedColumns: ["id"];
16842
17118
  }];
16843
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
+ };
16844
17165
  voorraad_custom_fields: {
16845
17166
  Row: {
16846
17167
  created_at: string;
@@ -17791,7 +18112,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
17791
18112
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
17792
18113
  columns: ["monteur_id"];
17793
18114
  isOneToOne: false;
17794
- referencedRelation: "monteurs";
18115
+ referencedRelation: "profiles";
17795
18116
  referencedColumns: ["id"];
17796
18117
  }, {
17797
18118
  foreignKeyName: "work_order_monteurs_work_order_id_fkey";
@@ -17801,6 +18122,60 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
17801
18122
  referencedColumns: ["id"];
17802
18123
  }];
17803
18124
  };
18125
+ work_order_photos: {
18126
+ Row: {
18127
+ ai_caption: string | null;
18128
+ ai_categorized_at: string | null;
18129
+ ai_labels: import("./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("./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("./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
+ };
17804
18179
  work_orders: {
17805
18180
  Row: {
17806
18181
  assigned_to: string | null;
@@ -17832,7 +18207,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
17832
18207
  scheduled_end_time: string | null;
17833
18208
  scheduled_start_time: string | null;
17834
18209
  status: string;
17835
- tenant_id: string;
17836
18210
  total_hours_worked: number | null;
17837
18211
  total_price: number | null;
17838
18212
  travel_time_minutes: number | null;
@@ -17870,7 +18244,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
17870
18244
  scheduled_end_time?: string | null;
17871
18245
  scheduled_start_time?: string | null;
17872
18246
  status?: string;
17873
- tenant_id: string;
17874
18247
  total_hours_worked?: number | null;
17875
18248
  total_price?: number | null;
17876
18249
  travel_time_minutes?: number | null;
@@ -17908,7 +18281,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
17908
18281
  scheduled_end_time?: string | null;
17909
18282
  scheduled_start_time?: string | null;
17910
18283
  status?: string;
17911
- tenant_id?: string;
17912
18284
  total_hours_worked?: number | null;
17913
18285
  total_price?: number | null;
17914
18286
  travel_time_minutes?: number | null;
@@ -17922,12 +18294,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
17922
18294
  isOneToOne: false;
17923
18295
  referencedRelation: "work_orders";
17924
18296
  referencedColumns: ["id"];
17925
- }, {
17926
- foreignKeyName: "work_orders_tenant_id_fkey";
17927
- columns: ["tenant_id"];
17928
- isOneToOne: false;
17929
- referencedRelation: "tenants";
17930
- referencedColumns: ["id"];
17931
18297
  }];
17932
18298
  };
17933
18299
  };
@@ -18612,6 +18978,19 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
18612
18978
  };
18613
18979
  Returns: undefined;
18614
18980
  };
18981
+ approve_mailbox_order_proposal: {
18982
+ Args: {
18983
+ p_custom_fields: import("./types").Json;
18984
+ p_customer_id: string;
18985
+ p_delivery_date: string;
18986
+ p_field_values?: import("./types").Json;
18987
+ p_lines: import("./types").Json;
18988
+ p_notes: string;
18989
+ p_proposal_id: string;
18990
+ p_reviewed_by: string;
18991
+ };
18992
+ Returns: import("./types").Json;
18993
+ };
18615
18994
  assign_cart_numbers: {
18616
18995
  Args: {
18617
18996
  p_carts: import("./types").Json;
@@ -18663,6 +19042,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
18663
19042
  };
18664
19043
  Returns: number;
18665
19044
  };
19045
+ can_manage_hours: {
19046
+ Args: never;
19047
+ Returns: boolean;
19048
+ };
18666
19049
  check_offer_product_available_stock: {
18667
19050
  Args: {
18668
19051
  p_campaign_product_id: string;
@@ -18852,6 +19235,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
18852
19235
  };
18853
19236
  Returns: {
18854
19237
  action: string;
19238
+ attempt_started_at: string | null;
18855
19239
  attempts: number;
18856
19240
  connection_id: string | null;
18857
19241
  created_at: string;
@@ -18939,6 +19323,30 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
18939
19323
  agent_naam: string;
18940
19324
  }[];
18941
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
+ };
18942
19350
  control_get_todays_carts: {
18943
19351
  Args: never;
18944
19352
  Returns: {
@@ -19014,7 +19422,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
19014
19422
  Returns: string;
19015
19423
  } | {
19016
19424
  Args: {
19017
- _feature_id?: string;
19425
+ _feature_id: string;
19018
19426
  _module_id: string;
19019
19427
  _user_id: string;
19020
19428
  };
@@ -19370,12 +19778,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
19370
19778
  Args: never;
19371
19779
  Returns: string;
19372
19780
  };
19373
- get_work_order_tenant_id: {
19374
- Args: {
19375
- wo_id: string;
19376
- };
19377
- Returns: string;
19378
- };
19379
19781
  has_module_permission: {
19380
19782
  Args: {
19381
19783
  _min: string;
@@ -19409,6 +19811,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
19409
19811
  };
19410
19812
  Returns: boolean;
19411
19813
  };
19814
+ is_time_log_week_locked: {
19815
+ Args: {
19816
+ p_employee_id: string;
19817
+ p_start_time: string;
19818
+ };
19819
+ Returns: boolean;
19820
+ };
19412
19821
  is_user_admin: {
19413
19822
  Args: never;
19414
19823
  Returns: boolean;
@@ -19423,13 +19832,14 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
19423
19832
  };
19424
19833
  Returns: boolean;
19425
19834
  };
19426
- list_monteurs: {
19835
+ list_medewerkers: {
19427
19836
  Args: never;
19428
19837
  Returns: {
19429
19838
  avatar_url: string;
19430
19839
  display_name: string;
19431
19840
  email: string;
19432
19841
  id: string;
19842
+ roles: string[];
19433
19843
  }[];
19434
19844
  };
19435
19845
  list_my_planning_items: {
@@ -21101,6 +21511,16 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
21101
21511
  };
21102
21512
  Returns: string[];
21103
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("./types").Json;
21523
+ };
21104
21524
  sync_all_layer_stocks: {
21105
21525
  Args: never;
21106
21526
  Returns: undefined;
@@ -21151,6 +21571,24 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
21151
21571
  };
21152
21572
  Returns: boolean;
21153
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
+ };
21154
21592
  twinfield_register_cron: {
21155
21593
  Args: {
21156
21594
  apikey?: string;