@flowselections/admin-installatietechniek 1.0.4 → 1.0.6

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 (33) hide show
  1. package/dist-lib/components/AdminForInstallatieTechniek.d.ts.map +1 -1
  2. package/dist-lib/components/AdminForInstallatieTechniek.js +166 -9
  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 +10 -3
  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 +1126 -155
  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 +1126 -155
  18. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  19. package/dist-lib/integrations/supabase/client.server.d.ts +1126 -155
  20. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  21. package/dist-lib/integrations/supabase/types.d.ts +1148 -154
  22. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  23. package/dist-lib/integrations/supabase/types.js +3 -0
  24. package/dist-lib/lib/admin.functions.d.ts +171971 -2043
  25. package/dist-lib/lib/admin.functions.d.ts.map +1 -1
  26. package/dist-lib/lib/admin.functions.js +292 -16
  27. package/dist-lib/lib/permission-types.d.ts +7 -0
  28. package/dist-lib/lib/permission-types.d.ts.map +1 -0
  29. package/dist-lib/lib/permission-types.js +1 -0
  30. package/dist-lib/lib/permissions.server.d.ts +14 -0
  31. package/dist-lib/lib/permissions.server.d.ts.map +1 -0
  32. package/dist-lib/lib/permissions.server.js +26 -0
  33. 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;
@@ -4925,6 +5045,42 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4925
5045
  };
4926
5046
  Relationships: [];
4927
5047
  };
5048
+ facturen: {
5049
+ Row: {
5050
+ bedrag_incl_btw: number;
5051
+ created_at: string;
5052
+ datum: string;
5053
+ factuurnummer: string;
5054
+ id: string;
5055
+ klantnaam: string;
5056
+ status: string;
5057
+ updated_at: string;
5058
+ user_id: string;
5059
+ };
5060
+ Insert: {
5061
+ bedrag_incl_btw: number;
5062
+ created_at?: string;
5063
+ datum?: string;
5064
+ factuurnummer: string;
5065
+ id?: string;
5066
+ klantnaam: string;
5067
+ status?: string;
5068
+ updated_at?: string;
5069
+ user_id?: string;
5070
+ };
5071
+ Update: {
5072
+ bedrag_incl_btw?: number;
5073
+ created_at?: string;
5074
+ datum?: string;
5075
+ factuurnummer?: string;
5076
+ id?: string;
5077
+ klantnaam?: string;
5078
+ status?: string;
5079
+ updated_at?: string;
5080
+ user_id?: string;
5081
+ };
5082
+ Relationships: [];
5083
+ };
4928
5084
  floricode_connection_settings: {
4929
5085
  Row: {
4930
5086
  catalog_key: string | null;
@@ -7649,6 +7805,258 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7649
7805
  };
7650
7806
  Relationships: [];
7651
7807
  };
7808
+ itk_offerte_events: {
7809
+ Row: {
7810
+ created_at: string;
7811
+ event_type: string;
7812
+ id: string;
7813
+ metadata: import("./types").Json;
7814
+ offerte_id: string;
7815
+ omschrijving: string | null;
7816
+ user_id: string | null;
7817
+ };
7818
+ Insert: {
7819
+ created_at?: string;
7820
+ event_type: string;
7821
+ id?: string;
7822
+ metadata?: import("./types").Json;
7823
+ offerte_id: string;
7824
+ omschrijving?: string | null;
7825
+ user_id?: string | null;
7826
+ };
7827
+ Update: {
7828
+ created_at?: string;
7829
+ event_type?: string;
7830
+ id?: string;
7831
+ metadata?: import("./types").Json;
7832
+ offerte_id?: string;
7833
+ omschrijving?: string | null;
7834
+ user_id?: string | null;
7835
+ };
7836
+ Relationships: [{
7837
+ foreignKeyName: "itk_offerte_events_offerte_id_fkey";
7838
+ columns: ["offerte_id"];
7839
+ isOneToOne: false;
7840
+ referencedRelation: "itk_offertes";
7841
+ referencedColumns: ["id"];
7842
+ }];
7843
+ };
7844
+ itk_offerte_regels: {
7845
+ Row: {
7846
+ created_at: string;
7847
+ id: string;
7848
+ line_total_cents: number;
7849
+ offerte_id: string;
7850
+ omschrijving: string;
7851
+ package_id: string | null;
7852
+ quantity: number;
7853
+ sort_order: number;
7854
+ source: string;
7855
+ unit_price_cents: number;
7856
+ updated_at: string;
7857
+ };
7858
+ Insert: {
7859
+ created_at?: string;
7860
+ id?: string;
7861
+ line_total_cents?: number;
7862
+ offerte_id: string;
7863
+ omschrijving?: string;
7864
+ package_id?: string | null;
7865
+ quantity?: number;
7866
+ sort_order?: number;
7867
+ source?: string;
7868
+ unit_price_cents?: number;
7869
+ updated_at?: string;
7870
+ };
7871
+ Update: {
7872
+ created_at?: string;
7873
+ id?: string;
7874
+ line_total_cents?: number;
7875
+ offerte_id?: string;
7876
+ omschrijving?: string;
7877
+ package_id?: string | null;
7878
+ quantity?: number;
7879
+ sort_order?: number;
7880
+ source?: string;
7881
+ unit_price_cents?: number;
7882
+ updated_at?: string;
7883
+ };
7884
+ Relationships: [{
7885
+ foreignKeyName: "itk_offerte_regels_offerte_id_fkey";
7886
+ columns: ["offerte_id"];
7887
+ isOneToOne: false;
7888
+ referencedRelation: "itk_offertes";
7889
+ referencedColumns: ["id"];
7890
+ }, {
7891
+ foreignKeyName: "itk_offerte_regels_package_id_fkey";
7892
+ columns: ["package_id"];
7893
+ isOneToOne: false;
7894
+ referencedRelation: "werkbon_packages";
7895
+ referencedColumns: ["id"];
7896
+ }];
7897
+ };
7898
+ itk_offerte_settings: {
7899
+ Row: {
7900
+ auto_convert_binnen_mandaat: boolean;
7901
+ created_at: string;
7902
+ default_geldigheid_dagen: number;
7903
+ default_vat_rate: number;
7904
+ id: string;
7905
+ singleton: boolean;
7906
+ updated_at: string;
7907
+ };
7908
+ Insert: {
7909
+ auto_convert_binnen_mandaat?: boolean;
7910
+ created_at?: string;
7911
+ default_geldigheid_dagen?: number;
7912
+ default_vat_rate?: number;
7913
+ id?: string;
7914
+ singleton?: boolean;
7915
+ updated_at?: string;
7916
+ };
7917
+ Update: {
7918
+ auto_convert_binnen_mandaat?: boolean;
7919
+ created_at?: string;
7920
+ default_geldigheid_dagen?: number;
7921
+ default_vat_rate?: number;
7922
+ id?: string;
7923
+ singleton?: boolean;
7924
+ updated_at?: string;
7925
+ };
7926
+ Relationships: [];
7927
+ };
7928
+ itk_offertes: {
7929
+ Row: {
7930
+ ai_generated: boolean;
7931
+ approved_at: string | null;
7932
+ binnen_mandaat: boolean;
7933
+ contact_id: string | null;
7934
+ converted_at: string | null;
7935
+ created_at: string;
7936
+ created_by: string | null;
7937
+ customer_id: string | null;
7938
+ follow_up_werkbon_id: string | null;
7939
+ id: string;
7940
+ jaar: number;
7941
+ mandaat_restant_cents: number;
7942
+ notities: string | null;
7943
+ offerte_number: string | null;
7944
+ omschrijving: string;
7945
+ rejected_at: string | null;
7946
+ sent_at: string | null;
7947
+ source_number: string | null;
7948
+ source_ref: string | null;
7949
+ source_type: string;
7950
+ status: string;
7951
+ subtotal_cents: number;
7952
+ total_cents: number;
7953
+ updated_at: string;
7954
+ valid_until: string | null;
7955
+ vat_cents: number;
7956
+ vat_rate: number;
7957
+ viewed_at: string | null;
7958
+ volgnummer: number | null;
7959
+ werkbon_id: string | null;
7960
+ work_location_id: string | null;
7961
+ };
7962
+ Insert: {
7963
+ ai_generated?: boolean;
7964
+ approved_at?: string | null;
7965
+ binnen_mandaat?: boolean;
7966
+ contact_id?: string | null;
7967
+ converted_at?: string | null;
7968
+ created_at?: string;
7969
+ created_by?: string | null;
7970
+ customer_id?: string | null;
7971
+ follow_up_werkbon_id?: string | null;
7972
+ id?: string;
7973
+ jaar?: number;
7974
+ mandaat_restant_cents?: number;
7975
+ notities?: string | null;
7976
+ offerte_number?: string | null;
7977
+ omschrijving?: string;
7978
+ rejected_at?: string | null;
7979
+ sent_at?: string | null;
7980
+ source_number?: string | null;
7981
+ source_ref?: string | null;
7982
+ source_type?: string;
7983
+ status?: string;
7984
+ subtotal_cents?: number;
7985
+ total_cents?: number;
7986
+ updated_at?: string;
7987
+ valid_until?: string | null;
7988
+ vat_cents?: number;
7989
+ vat_rate?: number;
7990
+ viewed_at?: string | null;
7991
+ volgnummer?: number | null;
7992
+ werkbon_id?: string | null;
7993
+ work_location_id?: string | null;
7994
+ };
7995
+ Update: {
7996
+ ai_generated?: boolean;
7997
+ approved_at?: string | null;
7998
+ binnen_mandaat?: boolean;
7999
+ contact_id?: string | null;
8000
+ converted_at?: string | null;
8001
+ created_at?: string;
8002
+ created_by?: string | null;
8003
+ customer_id?: string | null;
8004
+ follow_up_werkbon_id?: string | null;
8005
+ id?: string;
8006
+ jaar?: number;
8007
+ mandaat_restant_cents?: number;
8008
+ notities?: string | null;
8009
+ offerte_number?: string | null;
8010
+ omschrijving?: string;
8011
+ rejected_at?: string | null;
8012
+ sent_at?: string | null;
8013
+ source_number?: string | null;
8014
+ source_ref?: string | null;
8015
+ source_type?: string;
8016
+ status?: string;
8017
+ subtotal_cents?: number;
8018
+ total_cents?: number;
8019
+ updated_at?: string;
8020
+ valid_until?: string | null;
8021
+ vat_cents?: number;
8022
+ vat_rate?: number;
8023
+ viewed_at?: string | null;
8024
+ volgnummer?: number | null;
8025
+ werkbon_id?: string | null;
8026
+ work_location_id?: string | null;
8027
+ };
8028
+ Relationships: [{
8029
+ foreignKeyName: "itk_offertes_contact_id_fkey";
8030
+ columns: ["contact_id"];
8031
+ isOneToOne: false;
8032
+ referencedRelation: "itk_contact_persons";
8033
+ referencedColumns: ["id"];
8034
+ }, {
8035
+ foreignKeyName: "itk_offertes_customer_id_fkey";
8036
+ columns: ["customer_id"];
8037
+ isOneToOne: false;
8038
+ referencedRelation: "itk_customers";
8039
+ referencedColumns: ["id"];
8040
+ }, {
8041
+ foreignKeyName: "itk_offertes_follow_up_werkbon_id_fkey";
8042
+ columns: ["follow_up_werkbon_id"];
8043
+ isOneToOne: false;
8044
+ referencedRelation: "werkbonnen";
8045
+ referencedColumns: ["id"];
8046
+ }, {
8047
+ foreignKeyName: "itk_offertes_werkbon_id_fkey";
8048
+ columns: ["werkbon_id"];
8049
+ isOneToOne: false;
8050
+ referencedRelation: "werkbonnen";
8051
+ referencedColumns: ["id"];
8052
+ }, {
8053
+ foreignKeyName: "itk_offertes_work_location_id_fkey";
8054
+ columns: ["work_location_id"];
8055
+ isOneToOne: false;
8056
+ referencedRelation: "itk_work_locations";
8057
+ referencedColumns: ["id"];
8058
+ }];
8059
+ };
7652
8060
  itk_work_locations: {
7653
8061
  Row: {
7654
8062
  city: string | null;
@@ -7766,7 +8174,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7766
8174
  start_date: string;
7767
8175
  start_time: string | null;
7768
8176
  status: string;
7769
- tenant_id: string;
7770
8177
  updated_at: string;
7771
8178
  user_id: string;
7772
8179
  };
@@ -7784,7 +8191,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7784
8191
  start_date: string;
7785
8192
  start_time?: string | null;
7786
8193
  status?: string;
7787
- tenant_id?: string;
7788
8194
  updated_at?: string;
7789
8195
  user_id: string;
7790
8196
  };
@@ -7802,7 +8208,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7802
8208
  start_date?: string;
7803
8209
  start_time?: string | null;
7804
8210
  status?: string;
7805
- tenant_id?: string;
7806
8211
  updated_at?: string;
7807
8212
  user_id?: string;
7808
8213
  };
@@ -7810,13 +8215,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7810
8215
  foreignKeyName: "leave_requests_monteur_id_fkey";
7811
8216
  columns: ["monteur_id"];
7812
8217
  isOneToOne: false;
7813
- referencedRelation: "monteurs";
8218
+ referencedRelation: "profiles";
7814
8219
  referencedColumns: ["id"];
7815
8220
  }, {
7816
8221
  foreignKeyName: "leave_requests_user_id_fkey";
7817
8222
  columns: ["user_id"];
7818
8223
  isOneToOne: false;
7819
- referencedRelation: "monteurs";
8224
+ referencedRelation: "profiles";
7820
8225
  referencedColumns: ["id"];
7821
8226
  }];
7822
8227
  };
@@ -9971,26 +10376,137 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9971
10376
  };
9972
10377
  Relationships: [];
9973
10378
  };
9974
- module_features: {
10379
+ material_usage: {
9975
10380
  Row: {
9976
10381
  created_at: string;
9977
- feature_id: string;
9978
10382
  id: string;
9979
- is_active: boolean;
9980
- last_seen_at: string;
9981
- module_id: string;
9982
- name: string;
10383
+ material_name: string;
10384
+ monteur_id: string | null;
10385
+ price_at_time: number;
10386
+ quantity_used: number;
10387
+ updated_at: string;
10388
+ van_inventory_id: string | null;
10389
+ work_order_id: string;
9983
10390
  };
9984
10391
  Insert: {
9985
10392
  created_at?: string;
9986
- feature_id: string;
9987
10393
  id?: string;
9988
- is_active?: boolean;
9989
- last_seen_at?: string;
9990
- module_id: string;
9991
- name: string;
9992
- };
9993
- Update: {
10394
+ material_name: string;
10395
+ monteur_id?: string | null;
10396
+ price_at_time?: number;
10397
+ quantity_used?: number;
10398
+ updated_at?: string;
10399
+ van_inventory_id?: string | null;
10400
+ work_order_id: string;
10401
+ };
10402
+ Update: {
10403
+ created_at?: string;
10404
+ id?: string;
10405
+ material_name?: string;
10406
+ monteur_id?: string | null;
10407
+ price_at_time?: number;
10408
+ quantity_used?: number;
10409
+ updated_at?: string;
10410
+ van_inventory_id?: string | null;
10411
+ work_order_id?: string;
10412
+ };
10413
+ Relationships: [{
10414
+ foreignKeyName: "material_usage_monteur_id_fkey";
10415
+ columns: ["monteur_id"];
10416
+ isOneToOne: false;
10417
+ referencedRelation: "profiles";
10418
+ referencedColumns: ["id"];
10419
+ }, {
10420
+ foreignKeyName: "material_usage_van_inventory_id_fkey";
10421
+ columns: ["van_inventory_id"];
10422
+ isOneToOne: false;
10423
+ referencedRelation: "van_inventories";
10424
+ referencedColumns: ["id"];
10425
+ }, {
10426
+ foreignKeyName: "material_usage_work_order_id_fkey";
10427
+ columns: ["work_order_id"];
10428
+ isOneToOne: false;
10429
+ referencedRelation: "work_orders";
10430
+ referencedColumns: ["id"];
10431
+ }];
10432
+ };
10433
+ medewerker_details: {
10434
+ Row: {
10435
+ color: string | null;
10436
+ created_at: string;
10437
+ hours_fri: number | null;
10438
+ hours_mon: number | null;
10439
+ hours_thu: number | null;
10440
+ hours_tue: number | null;
10441
+ hours_wed: number | null;
10442
+ id: string;
10443
+ is_active: boolean;
10444
+ leave_balance_hours: number;
10445
+ persnr: string | null;
10446
+ phone: string | null;
10447
+ profile_id: string;
10448
+ updated_at: string;
10449
+ };
10450
+ Insert: {
10451
+ color?: string | null;
10452
+ created_at?: string;
10453
+ hours_fri?: number | null;
10454
+ hours_mon?: number | null;
10455
+ hours_thu?: number | null;
10456
+ hours_tue?: number | null;
10457
+ hours_wed?: number | null;
10458
+ id?: string;
10459
+ is_active?: boolean;
10460
+ leave_balance_hours?: number;
10461
+ persnr?: string | null;
10462
+ phone?: string | null;
10463
+ profile_id: string;
10464
+ updated_at?: string;
10465
+ };
10466
+ Update: {
10467
+ color?: string | null;
10468
+ created_at?: string;
10469
+ hours_fri?: number | null;
10470
+ hours_mon?: number | null;
10471
+ hours_thu?: number | null;
10472
+ hours_tue?: number | null;
10473
+ hours_wed?: number | null;
10474
+ id?: string;
10475
+ is_active?: boolean;
10476
+ leave_balance_hours?: number;
10477
+ persnr?: string | null;
10478
+ phone?: string | null;
10479
+ profile_id?: string;
10480
+ updated_at?: string;
10481
+ };
10482
+ Relationships: [{
10483
+ foreignKeyName: "medewerker_details_profile_id_fkey";
10484
+ columns: ["profile_id"];
10485
+ isOneToOne: true;
10486
+ referencedRelation: "profiles";
10487
+ referencedColumns: ["id"];
10488
+ }];
10489
+ };
10490
+ module_features: {
10491
+ Row: {
10492
+ created_at: string;
10493
+ feature_id: string;
10494
+ id: string;
10495
+ is_active: boolean;
10496
+ last_seen_at: string;
10497
+ module_id: string;
10498
+ name: string;
10499
+ };
10500
+ Insert: {
10501
+ created_at?: string;
10502
+ feature_id: string;
10503
+ id?: string;
10504
+ is_active?: boolean;
10505
+ last_seen_at?: string;
10506
+ module_id: string;
10507
+ name: string;
10508
+ };
10509
+ Update: {
9994
10510
  created_at?: string;
9995
10511
  feature_id?: string;
9996
10512
  id?: string;
@@ -10031,6 +10547,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10031
10547
  module_registry: {
10032
10548
  Row: {
10033
10549
  created_at: string;
10550
+ enforce: boolean;
10034
10551
  is_active: boolean;
10035
10552
  last_seen_at: string;
10036
10553
  module_id: string;
@@ -10040,6 +10557,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10040
10557
  };
10041
10558
  Insert: {
10042
10559
  created_at?: string;
10560
+ enforce?: boolean;
10043
10561
  is_active?: boolean;
10044
10562
  last_seen_at?: string;
10045
10563
  module_id: string;
@@ -10049,6 +10567,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10049
10567
  };
10050
10568
  Update: {
10051
10569
  created_at?: string;
10570
+ enforce?: boolean;
10052
10571
  is_active?: boolean;
10053
10572
  last_seen_at?: string;
10054
10573
  module_id?: string;
@@ -10109,63 +10628,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10109
10628
  };
10110
10629
  Relationships: [];
10111
10630
  };
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
10631
  nmbrs_component_mapping: {
10170
10632
  Row: {
10171
10633
  created_at: string;
@@ -10236,13 +10698,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10236
10698
  nmbrs_employee_number?: string;
10237
10699
  updated_at?: string;
10238
10700
  };
10239
- Relationships: [{
10240
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
10241
- columns: ["monteur_id"];
10242
- isOneToOne: true;
10243
- referencedRelation: "monteurs";
10244
- referencedColumns: ["id"];
10245
- }];
10701
+ Relationships: [];
10246
10702
  };
10247
10703
  nmbrs_export_lines: {
10248
10704
  Row: {
@@ -10291,12 +10747,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10291
10747
  wage_code?: string;
10292
10748
  };
10293
10749
  Relationships: [{
10294
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
10295
- columns: ["monteur_id"];
10296
- isOneToOne: false;
10297
- referencedRelation: "monteurs";
10298
- referencedColumns: ["id"];
10299
- }, {
10300
10750
  foreignKeyName: "nmbrs_export_lines_run_id_fkey";
10301
10751
  columns: ["run_id"];
10302
10752
  isOneToOne: false;
@@ -13436,6 +13886,66 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
13436
13886
  };
13437
13887
  Relationships: [];
13438
13888
  };
13889
+ profile_modules: {
13890
+ Row: {
13891
+ created_at: string;
13892
+ id: string;
13893
+ module_id: string;
13894
+ profile_id: string;
13895
+ };
13896
+ Insert: {
13897
+ created_at?: string;
13898
+ id?: string;
13899
+ module_id: string;
13900
+ profile_id: string;
13901
+ };
13902
+ Update: {
13903
+ created_at?: string;
13904
+ id?: string;
13905
+ module_id?: string;
13906
+ profile_id?: string;
13907
+ };
13908
+ Relationships: [{
13909
+ foreignKeyName: "profile_modules_profile_id_fkey";
13910
+ columns: ["profile_id"];
13911
+ isOneToOne: false;
13912
+ referencedRelation: "profiles_org";
13913
+ referencedColumns: ["id"];
13914
+ }];
13915
+ };
13916
+ profile_roles: {
13917
+ Row: {
13918
+ created_at: string;
13919
+ id: string;
13920
+ profile_id: string;
13921
+ role_id: string;
13922
+ };
13923
+ Insert: {
13924
+ created_at?: string;
13925
+ id?: string;
13926
+ profile_id: string;
13927
+ role_id: string;
13928
+ };
13929
+ Update: {
13930
+ created_at?: string;
13931
+ id?: string;
13932
+ profile_id?: string;
13933
+ role_id?: string;
13934
+ };
13935
+ Relationships: [{
13936
+ foreignKeyName: "profile_roles_profile_id_fkey";
13937
+ columns: ["profile_id"];
13938
+ isOneToOne: false;
13939
+ referencedRelation: "profiles_org";
13940
+ referencedColumns: ["id"];
13941
+ }, {
13942
+ foreignKeyName: "profile_roles_role_id_fkey";
13943
+ columns: ["role_id"];
13944
+ isOneToOne: false;
13945
+ referencedRelation: "roles";
13946
+ referencedColumns: ["id"];
13947
+ }];
13948
+ };
13439
13949
  profiles: {
13440
13950
  Row: {
13441
13951
  address: string | null;
@@ -13481,6 +13991,39 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
13481
13991
  referencedColumns: ["id"];
13482
13992
  }];
13483
13993
  };
13994
+ profiles_org: {
13995
+ Row: {
13996
+ created_at: string;
13997
+ id: string;
13998
+ is_default: boolean;
13999
+ name: string;
14000
+ tenant_id: string | null;
14001
+ updated_at: string;
14002
+ };
14003
+ Insert: {
14004
+ created_at?: string;
14005
+ id?: string;
14006
+ is_default?: boolean;
14007
+ name: string;
14008
+ tenant_id?: string | null;
14009
+ updated_at?: string;
14010
+ };
14011
+ Update: {
14012
+ created_at?: string;
14013
+ id?: string;
14014
+ is_default?: boolean;
14015
+ name?: string;
14016
+ tenant_id?: string | null;
14017
+ updated_at?: string;
14018
+ };
14019
+ Relationships: [{
14020
+ foreignKeyName: "profiles_org_tenant_id_fkey";
14021
+ columns: ["tenant_id"];
14022
+ isOneToOne: false;
14023
+ referencedRelation: "tenants";
14024
+ referencedColumns: ["id"];
14025
+ }];
14026
+ };
13484
14027
  projects: {
13485
14028
  Row: {
13486
14029
  contact_name: string | null;
@@ -14655,6 +15198,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
14655
15198
  type: string;
14656
15199
  updated_at: string;
14657
15200
  vereist_medewerker: boolean;
15201
+ werkplek: string | null;
14658
15202
  };
14659
15203
  Insert: {
14660
15204
  actief?: boolean;
@@ -14668,6 +15212,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
14668
15212
  type?: string;
14669
15213
  updated_at?: string;
14670
15214
  vereist_medewerker?: boolean;
15215
+ werkplek?: string | null;
14671
15216
  };
14672
15217
  Update: {
14673
15218
  actief?: boolean;
@@ -14681,9 +15226,46 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
14681
15226
  type?: string;
14682
15227
  updated_at?: string;
14683
15228
  vereist_medewerker?: boolean;
15229
+ werkplek?: string | null;
14684
15230
  };
14685
15231
  Relationships: [];
14686
15232
  };
15233
+ sick_periods: {
15234
+ Row: {
15235
+ created_at: string;
15236
+ employee_id: string;
15237
+ end_date: string | null;
15238
+ id: string;
15239
+ notes: string | null;
15240
+ start_date: string;
15241
+ updated_at: string;
15242
+ };
15243
+ Insert: {
15244
+ created_at?: string;
15245
+ employee_id: string;
15246
+ end_date?: string | null;
15247
+ id?: string;
15248
+ notes?: string | null;
15249
+ start_date: string;
15250
+ updated_at?: string;
15251
+ };
15252
+ Update: {
15253
+ created_at?: string;
15254
+ employee_id?: string;
15255
+ end_date?: string | null;
15256
+ id?: string;
15257
+ notes?: string | null;
15258
+ start_date?: string;
15259
+ updated_at?: string;
15260
+ };
15261
+ Relationships: [{
15262
+ foreignKeyName: "sick_periods_employee_id_fkey";
15263
+ columns: ["employee_id"];
15264
+ isOneToOne: false;
15265
+ referencedRelation: "profiles";
15266
+ referencedColumns: ["id"];
15267
+ }];
15268
+ };
14687
15269
  sidebar_config: {
14688
15270
  Row: {
14689
15271
  id: string;
@@ -14981,99 +15563,252 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
14981
15563
  };
14982
15564
  Relationships: [];
14983
15565
  };
14984
- time_entries: {
15566
+ time_compensation_entries: {
15567
+ Row: {
15568
+ created_at: string;
15569
+ employee_id: string;
15570
+ entry_date: string;
15571
+ id: string;
15572
+ km: number;
15573
+ meal_allowance: number;
15574
+ notes: string | null;
15575
+ standby_evening: number;
15576
+ standby_weekend: number;
15577
+ tvt_change: number;
15578
+ updated_at: string;
15579
+ };
15580
+ Insert: {
15581
+ created_at?: string;
15582
+ employee_id: string;
15583
+ entry_date: string;
15584
+ id?: string;
15585
+ km?: number;
15586
+ meal_allowance?: number;
15587
+ notes?: string | null;
15588
+ standby_evening?: number;
15589
+ standby_weekend?: number;
15590
+ tvt_change?: number;
15591
+ updated_at?: string;
15592
+ };
15593
+ Update: {
15594
+ created_at?: string;
15595
+ employee_id?: string;
15596
+ entry_date?: string;
15597
+ id?: string;
15598
+ km?: number;
15599
+ meal_allowance?: number;
15600
+ notes?: string | null;
15601
+ standby_evening?: number;
15602
+ standby_weekend?: number;
15603
+ tvt_change?: number;
15604
+ updated_at?: string;
15605
+ };
15606
+ Relationships: [{
15607
+ foreignKeyName: "time_compensation_entries_employee_id_fkey";
15608
+ columns: ["employee_id"];
15609
+ isOneToOne: false;
15610
+ referencedRelation: "profiles";
15611
+ referencedColumns: ["id"];
15612
+ }];
15613
+ };
15614
+ time_entries: {
15615
+ Row: {
15616
+ created_at: string;
15617
+ employee_id: string;
15618
+ entry_date: string;
15619
+ hours: number;
15620
+ id: string;
15621
+ notes: string | null;
15622
+ overtime: number;
15623
+ undertime: number;
15624
+ updated_at: string;
15625
+ };
15626
+ Insert: {
15627
+ created_at?: string;
15628
+ employee_id: string;
15629
+ entry_date: string;
15630
+ hours?: number;
15631
+ id?: string;
15632
+ notes?: string | null;
15633
+ overtime?: number;
15634
+ undertime?: number;
15635
+ updated_at?: string;
15636
+ };
15637
+ Update: {
15638
+ created_at?: string;
15639
+ employee_id?: string;
15640
+ entry_date?: string;
15641
+ hours?: number;
15642
+ id?: string;
15643
+ notes?: string | null;
15644
+ overtime?: number;
15645
+ undertime?: number;
15646
+ updated_at?: string;
15647
+ };
15648
+ Relationships: [];
15649
+ };
15650
+ time_log_week_approvals: {
14985
15651
  Row: {
15652
+ approved_at: string | null;
15653
+ approved_by: string | null;
14986
15654
  created_at: string;
14987
15655
  employee_id: string;
14988
- entry_date: string;
14989
- hours: number;
14990
15656
  id: string;
15657
+ locked: boolean;
14991
15658
  notes: string | null;
14992
- overtime: number;
14993
- undertime: number;
15659
+ status: string;
15660
+ submitted_at: string | null;
14994
15661
  updated_at: string;
15662
+ week_start: string;
14995
15663
  };
14996
15664
  Insert: {
15665
+ approved_at?: string | null;
15666
+ approved_by?: string | null;
14997
15667
  created_at?: string;
14998
15668
  employee_id: string;
14999
- entry_date: string;
15000
- hours?: number;
15001
15669
  id?: string;
15670
+ locked?: boolean;
15002
15671
  notes?: string | null;
15003
- overtime?: number;
15004
- undertime?: number;
15672
+ status?: string;
15673
+ submitted_at?: string | null;
15005
15674
  updated_at?: string;
15675
+ week_start: string;
15006
15676
  };
15007
15677
  Update: {
15678
+ approved_at?: string | null;
15679
+ approved_by?: string | null;
15008
15680
  created_at?: string;
15009
15681
  employee_id?: string;
15010
- entry_date?: string;
15011
- hours?: number;
15012
15682
  id?: string;
15683
+ locked?: boolean;
15013
15684
  notes?: string | null;
15014
- overtime?: number;
15015
- undertime?: number;
15685
+ status?: string;
15686
+ submitted_at?: string | null;
15016
15687
  updated_at?: string;
15688
+ week_start?: string;
15017
15689
  };
15018
15690
  Relationships: [{
15019
- foreignKeyName: "time_entries_employee_id_fkey";
15691
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
15020
15692
  columns: ["employee_id"];
15021
15693
  isOneToOne: false;
15022
- referencedRelation: "monteurs";
15694
+ referencedRelation: "profiles";
15023
15695
  referencedColumns: ["id"];
15024
15696
  }];
15025
15697
  };
15026
15698
  time_logs: {
15027
15699
  Row: {
15700
+ auto_stop_reason: string | null;
15701
+ auto_stopped: boolean;
15028
15702
  created_at: string;
15703
+ current_latitude: number | null;
15704
+ current_longitude: number | null;
15705
+ current_position_updated_at: string | null;
15029
15706
  employee_id: string;
15707
+ end_latitude: number | null;
15708
+ end_longitude: number | null;
15030
15709
  end_time: string | null;
15710
+ eta_distance_km: number | null;
15711
+ eta_minutes: number | null;
15712
+ eta_updated_at: string | null;
15713
+ hour_category: string | null;
15031
15714
  id: string;
15715
+ last_reminder_at: string | null;
15032
15716
  notes: string | null;
15033
15717
  overtime_hours: number;
15034
15718
  overtime_type: string | null;
15035
15719
  regular_hours: number;
15720
+ reminder_count: number;
15721
+ requires_review: boolean;
15722
+ start_latitude: number | null;
15723
+ start_longitude: number | null;
15036
15724
  start_time: string;
15037
15725
  travel_cost: number | null;
15038
15726
  travel_distance_km: number | null;
15727
+ travel_duration_min: number | null;
15728
+ travel_time_minutes: number | null;
15039
15729
  type: string;
15040
15730
  updated_at: string;
15731
+ work_order_id: string | null;
15041
15732
  };
15042
15733
  Insert: {
15734
+ auto_stop_reason?: string | null;
15735
+ auto_stopped?: boolean;
15043
15736
  created_at?: string;
15737
+ current_latitude?: number | null;
15738
+ current_longitude?: number | null;
15739
+ current_position_updated_at?: string | null;
15044
15740
  employee_id: string;
15741
+ end_latitude?: number | null;
15742
+ end_longitude?: number | null;
15045
15743
  end_time?: string | null;
15744
+ eta_distance_km?: number | null;
15745
+ eta_minutes?: number | null;
15746
+ eta_updated_at?: string | null;
15747
+ hour_category?: string | null;
15046
15748
  id?: string;
15749
+ last_reminder_at?: string | null;
15047
15750
  notes?: string | null;
15048
15751
  overtime_hours?: number;
15049
15752
  overtime_type?: string | null;
15050
15753
  regular_hours?: number;
15754
+ reminder_count?: number;
15755
+ requires_review?: boolean;
15756
+ start_latitude?: number | null;
15757
+ start_longitude?: number | null;
15051
15758
  start_time?: string;
15052
15759
  travel_cost?: number | null;
15053
15760
  travel_distance_km?: number | null;
15761
+ travel_duration_min?: number | null;
15762
+ travel_time_minutes?: number | null;
15054
15763
  type: string;
15055
15764
  updated_at?: string;
15765
+ work_order_id?: string | null;
15056
15766
  };
15057
15767
  Update: {
15768
+ auto_stop_reason?: string | null;
15769
+ auto_stopped?: boolean;
15058
15770
  created_at?: string;
15771
+ current_latitude?: number | null;
15772
+ current_longitude?: number | null;
15773
+ current_position_updated_at?: string | null;
15059
15774
  employee_id?: string;
15775
+ end_latitude?: number | null;
15776
+ end_longitude?: number | null;
15060
15777
  end_time?: string | null;
15778
+ eta_distance_km?: number | null;
15779
+ eta_minutes?: number | null;
15780
+ eta_updated_at?: string | null;
15781
+ hour_category?: string | null;
15061
15782
  id?: string;
15783
+ last_reminder_at?: string | null;
15062
15784
  notes?: string | null;
15063
15785
  overtime_hours?: number;
15064
15786
  overtime_type?: string | null;
15065
15787
  regular_hours?: number;
15788
+ reminder_count?: number;
15789
+ requires_review?: boolean;
15790
+ start_latitude?: number | null;
15791
+ start_longitude?: number | null;
15066
15792
  start_time?: string;
15067
15793
  travel_cost?: number | null;
15068
15794
  travel_distance_km?: number | null;
15795
+ travel_duration_min?: number | null;
15796
+ travel_time_minutes?: number | null;
15069
15797
  type?: string;
15070
15798
  updated_at?: string;
15799
+ work_order_id?: string | null;
15071
15800
  };
15072
15801
  Relationships: [{
15073
15802
  foreignKeyName: "time_logs_employee_id_fkey";
15074
15803
  columns: ["employee_id"];
15075
15804
  isOneToOne: false;
15076
- referencedRelation: "monteurs";
15805
+ referencedRelation: "profiles";
15806
+ referencedColumns: ["id"];
15807
+ }, {
15808
+ foreignKeyName: "time_logs_work_order_id_fkey";
15809
+ columns: ["work_order_id"];
15810
+ isOneToOne: false;
15811
+ referencedRelation: "work_orders";
15077
15812
  referencedColumns: ["id"];
15078
15813
  }];
15079
15814
  };
@@ -15112,7 +15847,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
15112
15847
  foreignKeyName: "time_off_entries_employee_id_fkey";
15113
15848
  columns: ["employee_id"];
15114
15849
  isOneToOne: false;
15115
- referencedRelation: "monteurs";
15850
+ referencedRelation: "profiles";
15116
15851
  referencedColumns: ["id"];
15117
15852
  }];
15118
15853
  };
@@ -15422,6 +16157,39 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
15422
16157
  };
15423
16158
  Relationships: [];
15424
16159
  };
16160
+ twinfield_cron_locks: {
16161
+ Row: {
16162
+ created_at: string;
16163
+ heartbeat_at: string;
16164
+ job_name: string;
16165
+ last_error: string | null;
16166
+ last_finished_at: string | null;
16167
+ locked_at: string;
16168
+ run_id: string;
16169
+ updated_at: string;
16170
+ };
16171
+ Insert: {
16172
+ created_at?: string;
16173
+ heartbeat_at?: string;
16174
+ job_name: string;
16175
+ last_error?: string | null;
16176
+ last_finished_at?: string | null;
16177
+ locked_at?: string;
16178
+ run_id?: string;
16179
+ updated_at?: string;
16180
+ };
16181
+ Update: {
16182
+ created_at?: string;
16183
+ heartbeat_at?: string;
16184
+ job_name?: string;
16185
+ last_error?: string | null;
16186
+ last_finished_at?: string | null;
16187
+ locked_at?: string;
16188
+ run_id?: string;
16189
+ updated_at?: string;
16190
+ };
16191
+ Relationships: [];
16192
+ };
15425
16193
  twinfield_customers: {
15426
16194
  Row: {
15427
16195
  address: string | null;
@@ -16022,6 +16790,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
16022
16790
  twinfield_push_queue: {
16023
16791
  Row: {
16024
16792
  action: string;
16793
+ attempt_started_at: string | null;
16025
16794
  attempts: number;
16026
16795
  connection_id: string | null;
16027
16796
  created_at: string;
@@ -16038,6 +16807,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
16038
16807
  };
16039
16808
  Insert: {
16040
16809
  action?: string;
16810
+ attempt_started_at?: string | null;
16041
16811
  attempts?: number;
16042
16812
  connection_id?: string | null;
16043
16813
  created_at?: string;
@@ -16054,6 +16824,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
16054
16824
  };
16055
16825
  Update: {
16056
16826
  action?: string;
16827
+ attempt_started_at?: string | null;
16057
16828
  attempts?: number;
16058
16829
  connection_id?: string | null;
16059
16830
  created_at?: string;
@@ -16251,13 +17022,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
16251
17022
  workday_end?: string | null;
16252
17023
  workday_start?: string | null;
16253
17024
  };
16254
- Relationships: [{
16255
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
16256
- columns: ["monteur_id"];
16257
- isOneToOne: true;
16258
- referencedRelation: "monteurs";
16259
- referencedColumns: ["id"];
16260
- }];
17025
+ Relationships: [];
16261
17026
  };
16262
17027
  uren_entries: {
16263
17028
  Row: {
@@ -16303,12 +17068,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
16303
17068
  werkbon_id?: string | null;
16304
17069
  };
16305
17070
  Relationships: [{
16306
- foreignKeyName: "uren_entries_monteur_id_fkey";
16307
- columns: ["monteur_id"];
16308
- isOneToOne: false;
16309
- referencedRelation: "monteurs";
16310
- referencedColumns: ["id"];
16311
- }, {
16312
17071
  foreignKeyName: "uren_entries_werkbon_id_fkey";
16313
17072
  columns: ["werkbon_id"];
16314
17073
  isOneToOne: false;
@@ -16776,13 +17535,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
16776
17535
  submitted_at?: string | null;
16777
17536
  updated_at?: string;
16778
17537
  };
16779
- Relationships: [{
16780
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
16781
- columns: ["monteur_id"];
16782
- isOneToOne: false;
16783
- referencedRelation: "monteurs";
16784
- referencedColumns: ["id"];
16785
- }];
17538
+ Relationships: [];
16786
17539
  };
16787
17540
  user_module_permissions: {
16788
17541
  Row: {
@@ -16841,6 +17594,51 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
16841
17594
  referencedColumns: ["id"];
16842
17595
  }];
16843
17596
  };
17597
+ van_inventories: {
17598
+ Row: {
17599
+ barcode: string | null;
17600
+ created_at: string;
17601
+ id: string;
17602
+ monteur_id: string | null;
17603
+ price_per_unit: number;
17604
+ product_name: string;
17605
+ quantity_current: number;
17606
+ quantity_min: number;
17607
+ unit: string;
17608
+ updated_at: string;
17609
+ };
17610
+ Insert: {
17611
+ barcode?: string | null;
17612
+ created_at?: string;
17613
+ id?: string;
17614
+ monteur_id?: string | null;
17615
+ price_per_unit?: number;
17616
+ product_name: string;
17617
+ quantity_current?: number;
17618
+ quantity_min?: number;
17619
+ unit?: string;
17620
+ updated_at?: string;
17621
+ };
17622
+ Update: {
17623
+ barcode?: string | null;
17624
+ created_at?: string;
17625
+ id?: string;
17626
+ monteur_id?: string | null;
17627
+ price_per_unit?: number;
17628
+ product_name?: string;
17629
+ quantity_current?: number;
17630
+ quantity_min?: number;
17631
+ unit?: string;
17632
+ updated_at?: string;
17633
+ };
17634
+ Relationships: [{
17635
+ foreignKeyName: "van_inventories_monteur_id_fkey";
17636
+ columns: ["monteur_id"];
17637
+ isOneToOne: false;
17638
+ referencedRelation: "profiles";
17639
+ referencedColumns: ["id"];
17640
+ }];
17641
+ };
16844
17642
  voorraad_custom_fields: {
16845
17643
  Row: {
16846
17644
  created_at: string;
@@ -17791,7 +18589,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
17791
18589
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
17792
18590
  columns: ["monteur_id"];
17793
18591
  isOneToOne: false;
17794
- referencedRelation: "monteurs";
18592
+ referencedRelation: "profiles";
17795
18593
  referencedColumns: ["id"];
17796
18594
  }, {
17797
18595
  foreignKeyName: "work_order_monteurs_work_order_id_fkey";
@@ -17801,6 +18599,60 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
17801
18599
  referencedColumns: ["id"];
17802
18600
  }];
17803
18601
  };
18602
+ work_order_photos: {
18603
+ Row: {
18604
+ ai_caption: string | null;
18605
+ ai_categorized_at: string | null;
18606
+ ai_labels: import("./types").Json | null;
18607
+ caption: string | null;
18608
+ created_at: string;
18609
+ id: string;
18610
+ monteur_id: string | null;
18611
+ photo_type: string;
18612
+ storage_path: string;
18613
+ updated_at: string;
18614
+ work_order_id: string;
18615
+ };
18616
+ Insert: {
18617
+ ai_caption?: string | null;
18618
+ ai_categorized_at?: string | null;
18619
+ ai_labels?: import("./types").Json | null;
18620
+ caption?: string | null;
18621
+ created_at?: string;
18622
+ id?: string;
18623
+ monteur_id?: string | null;
18624
+ photo_type?: string;
18625
+ storage_path: string;
18626
+ updated_at?: string;
18627
+ work_order_id: string;
18628
+ };
18629
+ Update: {
18630
+ ai_caption?: string | null;
18631
+ ai_categorized_at?: string | null;
18632
+ ai_labels?: import("./types").Json | null;
18633
+ caption?: string | null;
18634
+ created_at?: string;
18635
+ id?: string;
18636
+ monteur_id?: string | null;
18637
+ photo_type?: string;
18638
+ storage_path?: string;
18639
+ updated_at?: string;
18640
+ work_order_id?: string;
18641
+ };
18642
+ Relationships: [{
18643
+ foreignKeyName: "work_order_photos_monteur_id_fkey";
18644
+ columns: ["monteur_id"];
18645
+ isOneToOne: false;
18646
+ referencedRelation: "profiles";
18647
+ referencedColumns: ["id"];
18648
+ }, {
18649
+ foreignKeyName: "work_order_photos_work_order_id_fkey";
18650
+ columns: ["work_order_id"];
18651
+ isOneToOne: false;
18652
+ referencedRelation: "work_orders";
18653
+ referencedColumns: ["id"];
18654
+ }];
18655
+ };
17804
18656
  work_orders: {
17805
18657
  Row: {
17806
18658
  assigned_to: string | null;
@@ -17832,7 +18684,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
17832
18684
  scheduled_end_time: string | null;
17833
18685
  scheduled_start_time: string | null;
17834
18686
  status: string;
17835
- tenant_id: string;
17836
18687
  total_hours_worked: number | null;
17837
18688
  total_price: number | null;
17838
18689
  travel_time_minutes: number | null;
@@ -17870,7 +18721,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
17870
18721
  scheduled_end_time?: string | null;
17871
18722
  scheduled_start_time?: string | null;
17872
18723
  status?: string;
17873
- tenant_id: string;
17874
18724
  total_hours_worked?: number | null;
17875
18725
  total_price?: number | null;
17876
18726
  travel_time_minutes?: number | null;
@@ -17908,7 +18758,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
17908
18758
  scheduled_end_time?: string | null;
17909
18759
  scheduled_start_time?: string | null;
17910
18760
  status?: string;
17911
- tenant_id?: string;
17912
18761
  total_hours_worked?: number | null;
17913
18762
  total_price?: number | null;
17914
18763
  travel_time_minutes?: number | null;
@@ -17922,12 +18771,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
17922
18771
  isOneToOne: false;
17923
18772
  referencedRelation: "work_orders";
17924
18773
  referencedColumns: ["id"];
17925
- }, {
17926
- foreignKeyName: "work_orders_tenant_id_fkey";
17927
- columns: ["tenant_id"];
17928
- isOneToOne: false;
17929
- referencedRelation: "tenants";
17930
- referencedColumns: ["id"];
17931
18774
  }];
17932
18775
  };
17933
18776
  };
@@ -18612,6 +19455,19 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
18612
19455
  };
18613
19456
  Returns: undefined;
18614
19457
  };
19458
+ approve_mailbox_order_proposal: {
19459
+ Args: {
19460
+ p_custom_fields: import("./types").Json;
19461
+ p_customer_id: string;
19462
+ p_delivery_date: string;
19463
+ p_field_values?: import("./types").Json;
19464
+ p_lines: import("./types").Json;
19465
+ p_notes: string;
19466
+ p_proposal_id: string;
19467
+ p_reviewed_by: string;
19468
+ };
19469
+ Returns: import("./types").Json;
19470
+ };
18615
19471
  assign_cart_numbers: {
18616
19472
  Args: {
18617
19473
  p_carts: import("./types").Json;
@@ -18663,6 +19519,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
18663
19519
  };
18664
19520
  Returns: number;
18665
19521
  };
19522
+ can_manage_hours: {
19523
+ Args: never;
19524
+ Returns: boolean;
19525
+ };
18666
19526
  check_offer_product_available_stock: {
18667
19527
  Args: {
18668
19528
  p_campaign_product_id: string;
@@ -18852,6 +19712,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
18852
19712
  };
18853
19713
  Returns: {
18854
19714
  action: string;
19715
+ attempt_started_at: string | null;
18855
19716
  attempts: number;
18856
19717
  connection_id: string | null;
18857
19718
  created_at: string;
@@ -18939,6 +19800,30 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
18939
19800
  agent_naam: string;
18940
19801
  }[];
18941
19802
  };
19803
+ consume_van_inventory: {
19804
+ Args: {
19805
+ p_inventory_id: string;
19806
+ p_quantity: number;
19807
+ };
19808
+ Returns: {
19809
+ barcode: string | null;
19810
+ created_at: string;
19811
+ id: string;
19812
+ monteur_id: string | null;
19813
+ price_per_unit: number;
19814
+ product_name: string;
19815
+ quantity_current: number;
19816
+ quantity_min: number;
19817
+ unit: string;
19818
+ updated_at: string;
19819
+ };
19820
+ SetofOptions: {
19821
+ from: "*";
19822
+ to: "van_inventories";
19823
+ isOneToOne: true;
19824
+ isSetofReturn: false;
19825
+ };
19826
+ };
18942
19827
  control_get_todays_carts: {
18943
19828
  Args: never;
18944
19829
  Returns: {
@@ -19014,7 +19899,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
19014
19899
  Returns: string;
19015
19900
  } | {
19016
19901
  Args: {
19017
- _feature_id?: string;
19902
+ _feature_id: string;
19018
19903
  _module_id: string;
19019
19904
  _user_id: string;
19020
19905
  };
@@ -19065,6 +19950,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
19065
19950
  };
19066
19951
  Returns: string;
19067
19952
  };
19953
+ employee_day_hours: {
19954
+ Args: {
19955
+ _day: string;
19956
+ _employee_id: string;
19957
+ };
19958
+ Returns: number;
19959
+ };
19068
19960
  enqueue_cart_replan_if_unlocked: {
19069
19961
  Args: {
19070
19962
  p_order_id: string;
@@ -19370,12 +20262,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
19370
20262
  Args: never;
19371
20263
  Returns: string;
19372
20264
  };
19373
- get_work_order_tenant_id: {
19374
- Args: {
19375
- wo_id: string;
19376
- };
19377
- Returns: string;
19378
- };
19379
20265
  has_module_permission: {
19380
20266
  Args: {
19381
20267
  _min: string;
@@ -19409,6 +20295,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
19409
20295
  };
19410
20296
  Returns: boolean;
19411
20297
  };
20298
+ is_time_log_week_locked: {
20299
+ Args: {
20300
+ p_employee_id: string;
20301
+ p_start_time: string;
20302
+ };
20303
+ Returns: boolean;
20304
+ };
19412
20305
  is_user_admin: {
19413
20306
  Args: never;
19414
20307
  Returns: boolean;
@@ -19417,19 +20310,43 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
19417
20310
  Args: never;
19418
20311
  Returns: boolean;
19419
20312
  };
20313
+ itk_offerte_naar_werkbon: {
20314
+ Args: {
20315
+ _offerte_id: string;
20316
+ };
20317
+ Returns: string;
20318
+ };
20319
+ itk_offerte_restant_mandaat: {
20320
+ Args: {
20321
+ _exclude_offerte_id?: string;
20322
+ _werkbon_id: string;
20323
+ };
20324
+ Returns: number;
20325
+ };
19420
20326
  jwt_has_role: {
19421
20327
  Args: {
19422
20328
  _role: Database["public"]["Enums"]["app_role"];
19423
20329
  };
19424
20330
  Returns: boolean;
19425
20331
  };
19426
- list_monteurs: {
20332
+ list_medewerkers: {
19427
20333
  Args: never;
19428
20334
  Returns: {
19429
20335
  avatar_url: string;
20336
+ color: string;
19430
20337
  display_name: string;
19431
20338
  email: string;
20339
+ hours_fri: number;
20340
+ hours_mon: number;
20341
+ hours_thu: number;
20342
+ hours_tue: number;
20343
+ hours_wed: number;
19432
20344
  id: string;
20345
+ is_active: boolean;
20346
+ leave_balance_hours: number;
20347
+ persnr: string;
20348
+ phone: string;
20349
+ roles: string[];
19433
20350
  }[];
19434
20351
  };
19435
20352
  list_my_planning_items: {
@@ -19755,17 +20672,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
19755
20672
  Returns: string;
19756
20673
  };
19757
20674
  logistics_emit_event: {
19758
- Args: {
19759
- p_event_type: string;
19760
- p_idempotency_key?: string;
19761
- p_order_ref: string;
19762
- p_payload?: import("./types").Json;
19763
- p_shadow?: boolean;
19764
- p_source_module: string;
19765
- p_strategy_id?: string;
19766
- };
19767
- Returns: import("./types").Json;
19768
- } | {
19769
20675
  Args: {
19770
20676
  p_event_type: string;
19771
20677
  p_idempotency_key?: string;
@@ -20610,6 +21516,37 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
20610
21516
  };
20611
21517
  Returns: undefined;
20612
21518
  };
21519
+ quote_create_from_source: {
21520
+ Args: {
21521
+ _payload?: import("./types").Json;
21522
+ _source_id: string;
21523
+ _source_type: string;
21524
+ };
21525
+ Returns: string;
21526
+ };
21527
+ quote_get_billable_lines: {
21528
+ Args: {
21529
+ _quotation_id: string;
21530
+ };
21531
+ Returns: import("./types").Json;
21532
+ };
21533
+ quote_get_summary: {
21534
+ Args: {
21535
+ _quotation_id: string;
21536
+ };
21537
+ Returns: import("./types").Json;
21538
+ };
21539
+ quote_list_packages: {
21540
+ Args: never;
21541
+ Returns: import("./types").Json;
21542
+ };
21543
+ quote_list_sources: {
21544
+ Args: {
21545
+ _limit?: number;
21546
+ _source_type?: string;
21547
+ };
21548
+ Returns: import("./types").Json;
21549
+ };
20613
21550
  recompute_all_reserved_stock: {
20614
21551
  Args: never;
20615
21552
  Returns: undefined;
@@ -21101,6 +22038,16 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
21101
22038
  };
21102
22039
  Returns: string[];
21103
22040
  };
22041
+ switch_time_log: {
22042
+ Args: {
22043
+ p_employee_id: string;
22044
+ p_start_lat?: number;
22045
+ p_start_lng?: number;
22046
+ p_type: string;
22047
+ p_work_order_id?: string;
22048
+ };
22049
+ Returns: import("./types").Json;
22050
+ };
21104
22051
  sync_all_layer_stocks: {
21105
22052
  Args: never;
21106
22053
  Returns: undefined;
@@ -21135,6 +22082,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
21135
22082
  };
21136
22083
  Returns: undefined;
21137
22084
  };
22085
+ sync_sick_time_off: {
22086
+ Args: {
22087
+ _period_id: string;
22088
+ };
22089
+ Returns: number;
22090
+ };
21138
22091
  trade_item_stock_duplicates: {
21139
22092
  Args: never;
21140
22093
  Returns: {
@@ -21151,6 +22104,24 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
21151
22104
  };
21152
22105
  Returns: boolean;
21153
22106
  };
22107
+ twinfield_cron_lock_acquire: {
22108
+ Args: {
22109
+ _job_name: string;
22110
+ _stale_seconds?: number;
22111
+ };
22112
+ Returns: boolean;
22113
+ };
22114
+ twinfield_cron_lock_release: {
22115
+ Args: {
22116
+ _error?: string;
22117
+ _job_name: string;
22118
+ };
22119
+ Returns: undefined;
22120
+ };
22121
+ twinfield_prune_push_queue: {
22122
+ Args: never;
22123
+ Returns: number;
22124
+ };
21154
22125
  twinfield_register_cron: {
21155
22126
  Args: {
21156
22127
  apikey?: string;
@@ -21194,7 +22165,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
21194
22165
  Enums: {
21195
22166
  ai_import_status: "nieuw" | "verwerken" | "bevestigen" | "klaar" | "mislukt";
21196
22167
  app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie";
21197
- doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon";
22168
+ doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon" | "veilingbon" | "afleverbrief" | "veilingbrief";
21198
22169
  doc_orientation: "portrait" | "landscape";
21199
22170
  exact_env: "staging" | "live";
21200
22171
  exact_push_status: "pending" | "sent" | "error";