@flowselections/floriday-verkoop-module 1.0.41 → 1.0.43

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 (69) hide show
  1. package/dist-lib/components/verkoop/SalesOrdersTable.d.ts +5 -2
  2. package/dist-lib/components/verkoop/SalesOrdersTable.d.ts.map +1 -1
  3. package/dist-lib/components/verkoop/SalesOrdersTable.js +27 -13
  4. package/dist-lib/components/verkoop/VerkoopOrdersPage.d.ts.map +1 -1
  5. package/dist-lib/components/verkoop/VerkoopOrdersPage.js +141 -27
  6. package/dist-lib/integrations/supabase/auth-middleware.d.ts +1428 -172
  7. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  8. package/dist-lib/integrations/supabase/client.d.ts +1428 -172
  9. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  10. package/dist-lib/integrations/supabase/client.server.d.ts +1428 -172
  11. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  12. package/dist-lib/integrations/supabase/types.d.ts +1453 -170
  13. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  14. package/dist-lib/integrations/supabase/types.js +3 -0
  15. package/dist-lib/lib/cart-lock.functions.d.ts +1428 -172
  16. package/dist-lib/lib/cart-lock.functions.d.ts.map +1 -1
  17. package/dist-lib/lib/cart-planning-settings.functions.d.ts +15224 -1408
  18. package/dist-lib/lib/cart-planning-settings.functions.d.ts.map +1 -1
  19. package/dist-lib/lib/cart-replan.functions.d.ts +4152 -384
  20. package/dist-lib/lib/cart-replan.functions.d.ts.map +1 -1
  21. package/dist-lib/lib/create-order.functions.d.ts +65255 -1978
  22. package/dist-lib/lib/create-order.functions.d.ts.map +1 -1
  23. package/dist-lib/lib/create-order.functions.js +48 -1
  24. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts +4152 -384
  25. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts.map +1 -1
  26. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts +1428 -172
  27. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts.map +1 -1
  28. package/dist-lib/lib/floriday-mirror.functions.d.ts +1428 -172
  29. package/dist-lib/lib/floriday-mirror.functions.d.ts.map +1 -1
  30. package/dist-lib/lib/floriday-mirror.functions.js +6 -1
  31. package/dist-lib/lib/floriday-public.functions.d.ts +9688 -896
  32. package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
  33. package/dist-lib/lib/floriday-writes.functions.d.ts +6920 -640
  34. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  35. package/dist-lib/lib/invoice-timing.functions.d.ts +5536 -512
  36. package/dist-lib/lib/invoice-timing.functions.d.ts.map +1 -1
  37. package/dist-lib/lib/invoice-timing.server.d.ts.map +1 -1
  38. package/dist-lib/lib/invoice-timing.server.js +1 -0
  39. package/dist-lib/lib/load-carriers.functions.d.ts +1428 -172
  40. package/dist-lib/lib/load-carriers.functions.d.ts.map +1 -1
  41. package/dist-lib/lib/logistics-engine.functions.d.ts +6920 -640
  42. package/dist-lib/lib/logistics-engine.functions.d.ts.map +1 -1
  43. package/dist-lib/lib/logistics-stock.functions.d.ts +2768 -256
  44. package/dist-lib/lib/logistics-stock.functions.d.ts.map +1 -1
  45. package/dist-lib/lib/order-addresses.functions.d.ts +1428 -172
  46. package/dist-lib/lib/order-addresses.functions.d.ts.map +1 -1
  47. package/dist-lib/lib/order-buffers.functions.d.ts +4152 -384
  48. package/dist-lib/lib/order-buffers.functions.d.ts.map +1 -1
  49. package/dist-lib/lib/order-cancel.server.d.ts +24 -0
  50. package/dist-lib/lib/order-cancel.server.d.ts.map +1 -0
  51. package/dist-lib/lib/order-cancel.server.js +130 -0
  52. package/dist-lib/lib/order-carrier.functions.d.ts +2768 -256
  53. package/dist-lib/lib/order-carrier.functions.d.ts.map +1 -1
  54. package/dist-lib/lib/order-pickup.functions.d.ts +2768 -256
  55. package/dist-lib/lib/order-pickup.functions.d.ts.map +1 -1
  56. package/dist-lib/lib/order-shipments.functions.d.ts +5536 -512
  57. package/dist-lib/lib/order-shipments.functions.d.ts.map +1 -1
  58. package/dist-lib/lib/salesorders-list.functions.d.ts +1428 -172
  59. package/dist-lib/lib/salesorders-list.functions.d.ts.map +1 -1
  60. package/dist-lib/lib/salesorders-list.server.d.ts.map +1 -1
  61. package/dist-lib/lib/salesorders-list.server.js +4 -60
  62. package/dist-lib/lib/salesorders-mapping.d.ts +6 -0
  63. package/dist-lib/lib/salesorders-mapping.d.ts.map +1 -1
  64. package/dist-lib/lib/salesorders-mapping.js +17 -0
  65. package/dist-lib/lib/salesorders.functions.d.ts +6920 -640
  66. package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
  67. package/dist-lib/lib/tradeitems.functions.d.ts +1428 -172
  68. package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
  69. package/package.json +1 -1
@@ -881,6 +881,126 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
881
881
  };
882
882
  Relationships: [];
883
883
  };
884
+ cao_holidays: {
885
+ Row: {
886
+ created_at: string;
887
+ description: string | null;
888
+ holiday_date: string;
889
+ id: string;
890
+ updated_at: string;
891
+ };
892
+ Insert: {
893
+ created_at?: string;
894
+ description?: string | null;
895
+ holiday_date: string;
896
+ id?: string;
897
+ updated_at?: string;
898
+ };
899
+ Update: {
900
+ created_at?: string;
901
+ description?: string | null;
902
+ holiday_date?: string;
903
+ id?: string;
904
+ updated_at?: string;
905
+ };
906
+ Relationships: [];
907
+ };
908
+ cao_settings: {
909
+ Row: {
910
+ auto_break_after_hours: number;
911
+ auto_break_minutes: number;
912
+ auto_break_unpaid: boolean;
913
+ auto_stop_after_hours: number;
914
+ callout_fee: number;
915
+ created_at: string;
916
+ daily_regular_hours: number;
917
+ default_hourly_rate: number;
918
+ id: string;
919
+ materials_markup_percent: number;
920
+ max_daily_hours: number;
921
+ max_weekly_hours: number;
922
+ meal_allowance_amount: number;
923
+ overtime_pct_178: number;
924
+ overtime_pct_189: number;
925
+ overtime_pct_212: number;
926
+ reminder_after_hours: number;
927
+ standby_evening_amount: number;
928
+ standby_weekend_amount: number;
929
+ travel_cost_per_km: number | null;
930
+ travel_cost_threshold_km: number | null;
931
+ travel_counts_as_work: boolean;
932
+ travel_hourly_rate: number;
933
+ travel_rate_per_hour: number;
934
+ travel_threshold_minutes: number;
935
+ updated_at: string;
936
+ weekend_always_212: boolean;
937
+ window_end: string;
938
+ window_start: string;
939
+ };
940
+ Insert: {
941
+ auto_break_after_hours?: number;
942
+ auto_break_minutes?: number;
943
+ auto_break_unpaid?: boolean;
944
+ auto_stop_after_hours?: number;
945
+ callout_fee?: number;
946
+ created_at?: string;
947
+ daily_regular_hours?: number;
948
+ default_hourly_rate?: number;
949
+ id?: string;
950
+ materials_markup_percent?: number;
951
+ max_daily_hours?: number;
952
+ max_weekly_hours?: number;
953
+ meal_allowance_amount?: number;
954
+ overtime_pct_178?: number;
955
+ overtime_pct_189?: number;
956
+ overtime_pct_212?: number;
957
+ reminder_after_hours?: number;
958
+ standby_evening_amount?: number;
959
+ standby_weekend_amount?: number;
960
+ travel_cost_per_km?: number | null;
961
+ travel_cost_threshold_km?: number | null;
962
+ travel_counts_as_work?: boolean;
963
+ travel_hourly_rate?: number;
964
+ travel_rate_per_hour?: number;
965
+ travel_threshold_minutes?: number;
966
+ updated_at?: string;
967
+ weekend_always_212?: boolean;
968
+ window_end?: string;
969
+ window_start?: string;
970
+ };
971
+ Update: {
972
+ auto_break_after_hours?: number;
973
+ auto_break_minutes?: number;
974
+ auto_break_unpaid?: boolean;
975
+ auto_stop_after_hours?: number;
976
+ callout_fee?: number;
977
+ created_at?: string;
978
+ daily_regular_hours?: number;
979
+ default_hourly_rate?: number;
980
+ id?: string;
981
+ materials_markup_percent?: number;
982
+ max_daily_hours?: number;
983
+ max_weekly_hours?: number;
984
+ meal_allowance_amount?: number;
985
+ overtime_pct_178?: number;
986
+ overtime_pct_189?: number;
987
+ overtime_pct_212?: number;
988
+ reminder_after_hours?: number;
989
+ standby_evening_amount?: number;
990
+ standby_weekend_amount?: number;
991
+ travel_cost_per_km?: number | null;
992
+ travel_cost_threshold_km?: number | null;
993
+ travel_counts_as_work?: boolean;
994
+ travel_hourly_rate?: number;
995
+ travel_rate_per_hour?: number;
996
+ travel_threshold_minutes?: number;
997
+ updated_at?: string;
998
+ weekend_always_212?: boolean;
999
+ window_end?: string;
1000
+ window_start?: string;
1001
+ };
1002
+ Relationships: [];
1003
+ };
884
1004
  carrier_shipping_rates: {
885
1005
  Row: {
886
1006
  carrier_id: string;
@@ -4934,6 +5054,42 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
4934
5054
  };
4935
5055
  Relationships: [];
4936
5056
  };
5057
+ facturen: {
5058
+ Row: {
5059
+ bedrag_incl_btw: number;
5060
+ created_at: string;
5061
+ datum: string;
5062
+ factuurnummer: string;
5063
+ id: string;
5064
+ klantnaam: string;
5065
+ status: string;
5066
+ updated_at: string;
5067
+ user_id: string;
5068
+ };
5069
+ Insert: {
5070
+ bedrag_incl_btw: number;
5071
+ created_at?: string;
5072
+ datum?: string;
5073
+ factuurnummer: string;
5074
+ id?: string;
5075
+ klantnaam: string;
5076
+ status?: string;
5077
+ updated_at?: string;
5078
+ user_id?: string;
5079
+ };
5080
+ Update: {
5081
+ bedrag_incl_btw?: number;
5082
+ created_at?: string;
5083
+ datum?: string;
5084
+ factuurnummer?: string;
5085
+ id?: string;
5086
+ klantnaam?: string;
5087
+ status?: string;
5088
+ updated_at?: string;
5089
+ user_id?: string;
5090
+ };
5091
+ Relationships: [];
5092
+ };
4937
5093
  floricode_connection_settings: {
4938
5094
  Row: {
4939
5095
  catalog_key: string | null;
@@ -7658,6 +7814,258 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
7658
7814
  };
7659
7815
  Relationships: [];
7660
7816
  };
7817
+ itk_offerte_events: {
7818
+ Row: {
7819
+ created_at: string;
7820
+ event_type: string;
7821
+ id: string;
7822
+ metadata: import("../integrations/supabase/types").Json;
7823
+ offerte_id: string;
7824
+ omschrijving: string | null;
7825
+ user_id: string | null;
7826
+ };
7827
+ Insert: {
7828
+ created_at?: string;
7829
+ event_type: string;
7830
+ id?: string;
7831
+ metadata?: import("../integrations/supabase/types").Json;
7832
+ offerte_id: string;
7833
+ omschrijving?: string | null;
7834
+ user_id?: string | null;
7835
+ };
7836
+ Update: {
7837
+ created_at?: string;
7838
+ event_type?: string;
7839
+ id?: string;
7840
+ metadata?: import("../integrations/supabase/types").Json;
7841
+ offerte_id?: string;
7842
+ omschrijving?: string | null;
7843
+ user_id?: string | null;
7844
+ };
7845
+ Relationships: [{
7846
+ foreignKeyName: "itk_offerte_events_offerte_id_fkey";
7847
+ columns: ["offerte_id"];
7848
+ isOneToOne: false;
7849
+ referencedRelation: "itk_offertes";
7850
+ referencedColumns: ["id"];
7851
+ }];
7852
+ };
7853
+ itk_offerte_regels: {
7854
+ Row: {
7855
+ created_at: string;
7856
+ id: string;
7857
+ line_total_cents: number;
7858
+ offerte_id: string;
7859
+ omschrijving: string;
7860
+ package_id: string | null;
7861
+ quantity: number;
7862
+ sort_order: number;
7863
+ source: string;
7864
+ unit_price_cents: number;
7865
+ updated_at: string;
7866
+ };
7867
+ Insert: {
7868
+ created_at?: string;
7869
+ id?: string;
7870
+ line_total_cents?: number;
7871
+ offerte_id: string;
7872
+ omschrijving?: string;
7873
+ package_id?: string | null;
7874
+ quantity?: number;
7875
+ sort_order?: number;
7876
+ source?: string;
7877
+ unit_price_cents?: number;
7878
+ updated_at?: string;
7879
+ };
7880
+ Update: {
7881
+ created_at?: string;
7882
+ id?: string;
7883
+ line_total_cents?: number;
7884
+ offerte_id?: string;
7885
+ omschrijving?: string;
7886
+ package_id?: string | null;
7887
+ quantity?: number;
7888
+ sort_order?: number;
7889
+ source?: string;
7890
+ unit_price_cents?: number;
7891
+ updated_at?: string;
7892
+ };
7893
+ Relationships: [{
7894
+ foreignKeyName: "itk_offerte_regels_offerte_id_fkey";
7895
+ columns: ["offerte_id"];
7896
+ isOneToOne: false;
7897
+ referencedRelation: "itk_offertes";
7898
+ referencedColumns: ["id"];
7899
+ }, {
7900
+ foreignKeyName: "itk_offerte_regels_package_id_fkey";
7901
+ columns: ["package_id"];
7902
+ isOneToOne: false;
7903
+ referencedRelation: "werkbon_packages";
7904
+ referencedColumns: ["id"];
7905
+ }];
7906
+ };
7907
+ itk_offerte_settings: {
7908
+ Row: {
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
+ Insert: {
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
+ Update: {
7927
+ auto_convert_binnen_mandaat?: boolean;
7928
+ created_at?: string;
7929
+ default_geldigheid_dagen?: number;
7930
+ default_vat_rate?: number;
7931
+ id?: string;
7932
+ singleton?: boolean;
7933
+ updated_at?: string;
7934
+ };
7935
+ Relationships: [];
7936
+ };
7937
+ itk_offertes: {
7938
+ Row: {
7939
+ ai_generated: boolean;
7940
+ approved_at: string | null;
7941
+ binnen_mandaat: boolean;
7942
+ contact_id: string | null;
7943
+ converted_at: string | null;
7944
+ created_at: string;
7945
+ created_by: string | null;
7946
+ customer_id: string | null;
7947
+ follow_up_werkbon_id: string | null;
7948
+ id: string;
7949
+ jaar: number;
7950
+ mandaat_restant_cents: number;
7951
+ notities: string | null;
7952
+ offerte_number: string | null;
7953
+ omschrijving: string;
7954
+ rejected_at: string | null;
7955
+ sent_at: string | null;
7956
+ source_number: string | null;
7957
+ source_ref: string | null;
7958
+ source_type: string;
7959
+ status: string;
7960
+ subtotal_cents: number;
7961
+ total_cents: number;
7962
+ updated_at: string;
7963
+ valid_until: string | null;
7964
+ vat_cents: number;
7965
+ vat_rate: number;
7966
+ viewed_at: string | null;
7967
+ volgnummer: number | null;
7968
+ werkbon_id: string | null;
7969
+ work_location_id: string | null;
7970
+ };
7971
+ Insert: {
7972
+ ai_generated?: boolean;
7973
+ approved_at?: string | null;
7974
+ binnen_mandaat?: boolean;
7975
+ contact_id?: string | null;
7976
+ converted_at?: string | null;
7977
+ created_at?: string;
7978
+ created_by?: string | null;
7979
+ customer_id?: string | null;
7980
+ follow_up_werkbon_id?: string | null;
7981
+ id?: string;
7982
+ jaar?: number;
7983
+ mandaat_restant_cents?: number;
7984
+ notities?: string | null;
7985
+ offerte_number?: string | null;
7986
+ omschrijving?: string;
7987
+ rejected_at?: string | null;
7988
+ sent_at?: string | null;
7989
+ source_number?: string | null;
7990
+ source_ref?: string | null;
7991
+ source_type?: string;
7992
+ status?: string;
7993
+ subtotal_cents?: number;
7994
+ total_cents?: number;
7995
+ updated_at?: string;
7996
+ valid_until?: string | null;
7997
+ vat_cents?: number;
7998
+ vat_rate?: number;
7999
+ viewed_at?: string | null;
8000
+ volgnummer?: number | null;
8001
+ werkbon_id?: string | null;
8002
+ work_location_id?: string | null;
8003
+ };
8004
+ Update: {
8005
+ ai_generated?: boolean;
8006
+ approved_at?: string | null;
8007
+ binnen_mandaat?: boolean;
8008
+ contact_id?: string | null;
8009
+ converted_at?: string | null;
8010
+ created_at?: string;
8011
+ created_by?: string | null;
8012
+ customer_id?: string | null;
8013
+ follow_up_werkbon_id?: string | null;
8014
+ id?: string;
8015
+ jaar?: number;
8016
+ mandaat_restant_cents?: number;
8017
+ notities?: string | null;
8018
+ offerte_number?: string | null;
8019
+ omschrijving?: string;
8020
+ rejected_at?: string | null;
8021
+ sent_at?: string | null;
8022
+ source_number?: string | null;
8023
+ source_ref?: string | null;
8024
+ source_type?: string;
8025
+ status?: string;
8026
+ subtotal_cents?: number;
8027
+ total_cents?: number;
8028
+ updated_at?: string;
8029
+ valid_until?: string | null;
8030
+ vat_cents?: number;
8031
+ vat_rate?: number;
8032
+ viewed_at?: string | null;
8033
+ volgnummer?: number | null;
8034
+ werkbon_id?: string | null;
8035
+ work_location_id?: string | null;
8036
+ };
8037
+ Relationships: [{
8038
+ foreignKeyName: "itk_offertes_contact_id_fkey";
8039
+ columns: ["contact_id"];
8040
+ isOneToOne: false;
8041
+ referencedRelation: "itk_contact_persons";
8042
+ referencedColumns: ["id"];
8043
+ }, {
8044
+ foreignKeyName: "itk_offertes_customer_id_fkey";
8045
+ columns: ["customer_id"];
8046
+ isOneToOne: false;
8047
+ referencedRelation: "itk_customers";
8048
+ referencedColumns: ["id"];
8049
+ }, {
8050
+ foreignKeyName: "itk_offertes_follow_up_werkbon_id_fkey";
8051
+ columns: ["follow_up_werkbon_id"];
8052
+ isOneToOne: false;
8053
+ referencedRelation: "werkbonnen";
8054
+ referencedColumns: ["id"];
8055
+ }, {
8056
+ foreignKeyName: "itk_offertes_werkbon_id_fkey";
8057
+ columns: ["werkbon_id"];
8058
+ isOneToOne: false;
8059
+ referencedRelation: "werkbonnen";
8060
+ referencedColumns: ["id"];
8061
+ }, {
8062
+ foreignKeyName: "itk_offertes_work_location_id_fkey";
8063
+ columns: ["work_location_id"];
8064
+ isOneToOne: false;
8065
+ referencedRelation: "itk_work_locations";
8066
+ referencedColumns: ["id"];
8067
+ }];
8068
+ };
7661
8069
  itk_work_locations: {
7662
8070
  Row: {
7663
8071
  city: string | null;
@@ -7775,7 +8183,6 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
7775
8183
  start_date: string;
7776
8184
  start_time: string | null;
7777
8185
  status: string;
7778
- tenant_id: string;
7779
8186
  updated_at: string;
7780
8187
  user_id: string;
7781
8188
  };
@@ -7793,7 +8200,6 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
7793
8200
  start_date: string;
7794
8201
  start_time?: string | null;
7795
8202
  status?: string;
7796
- tenant_id?: string;
7797
8203
  updated_at?: string;
7798
8204
  user_id: string;
7799
8205
  };
@@ -7811,7 +8217,6 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
7811
8217
  start_date?: string;
7812
8218
  start_time?: string | null;
7813
8219
  status?: string;
7814
- tenant_id?: string;
7815
8220
  updated_at?: string;
7816
8221
  user_id?: string;
7817
8222
  };
@@ -7819,13 +8224,13 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
7819
8224
  foreignKeyName: "leave_requests_monteur_id_fkey";
7820
8225
  columns: ["monteur_id"];
7821
8226
  isOneToOne: false;
7822
- referencedRelation: "monteurs";
8227
+ referencedRelation: "profiles";
7823
8228
  referencedColumns: ["id"];
7824
8229
  }, {
7825
8230
  foreignKeyName: "leave_requests_user_id_fkey";
7826
8231
  columns: ["user_id"];
7827
8232
  isOneToOne: false;
7828
- referencedRelation: "monteurs";
8233
+ referencedRelation: "profiles";
7829
8234
  referencedColumns: ["id"];
7830
8235
  }];
7831
8236
  };
@@ -8693,6 +9098,45 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
8693
9098
  };
8694
9099
  Relationships: [];
8695
9100
  };
9101
+ logistics_plan_queue: {
9102
+ Row: {
9103
+ attempts: number;
9104
+ claimed_at: string | null;
9105
+ enqueued_at: string;
9106
+ error: string | null;
9107
+ id: string;
9108
+ next_attempt_at: string;
9109
+ order_id: string;
9110
+ reason: string;
9111
+ status: string;
9112
+ updated_at: string;
9113
+ };
9114
+ Insert: {
9115
+ attempts?: number;
9116
+ claimed_at?: string | null;
9117
+ enqueued_at?: string;
9118
+ error?: string | null;
9119
+ id?: string;
9120
+ next_attempt_at?: string;
9121
+ order_id: string;
9122
+ reason?: string;
9123
+ status?: string;
9124
+ updated_at?: string;
9125
+ };
9126
+ Update: {
9127
+ attempts?: number;
9128
+ claimed_at?: string | null;
9129
+ enqueued_at?: string;
9130
+ error?: string | null;
9131
+ id?: string;
9132
+ next_attempt_at?: string;
9133
+ order_id?: string;
9134
+ reason?: string;
9135
+ status?: string;
9136
+ updated_at?: string;
9137
+ };
9138
+ Relationships: [];
9139
+ };
8696
9140
  logistics_plan_runs: {
8697
9141
  Row: {
8698
9142
  created_at: string;
@@ -8768,6 +9212,24 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
8768
9212
  referencedColumns: ["id"];
8769
9213
  }];
8770
9214
  };
9215
+ logistics_plan_settings: {
9216
+ Row: {
9217
+ key: string;
9218
+ updated_at: string;
9219
+ value: string;
9220
+ };
9221
+ Insert: {
9222
+ key: string;
9223
+ updated_at?: string;
9224
+ value: string;
9225
+ };
9226
+ Update: {
9227
+ key?: string;
9228
+ updated_at?: string;
9229
+ value?: string;
9230
+ };
9231
+ Relationships: [];
9232
+ };
8771
9233
  logistics_rebuffer_state: {
8772
9234
  Row: {
8773
9235
  created_at: string;
@@ -9923,6 +10385,147 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
9923
10385
  };
9924
10386
  Relationships: [];
9925
10387
  };
10388
+ material_usage: {
10389
+ Row: {
10390
+ created_at: string;
10391
+ id: string;
10392
+ material_name: string;
10393
+ monteur_id: string | null;
10394
+ price_at_time: number;
10395
+ quantity_used: number;
10396
+ updated_at: string;
10397
+ van_inventory_id: string | null;
10398
+ work_order_id: string;
10399
+ };
10400
+ Insert: {
10401
+ created_at?: string;
10402
+ id?: string;
10403
+ material_name: string;
10404
+ monteur_id?: string | null;
10405
+ price_at_time?: number;
10406
+ quantity_used?: number;
10407
+ updated_at?: string;
10408
+ van_inventory_id?: string | null;
10409
+ work_order_id: string;
10410
+ };
10411
+ Update: {
10412
+ created_at?: string;
10413
+ id?: string;
10414
+ material_name?: string;
10415
+ monteur_id?: string | null;
10416
+ price_at_time?: number;
10417
+ quantity_used?: number;
10418
+ updated_at?: string;
10419
+ van_inventory_id?: string | null;
10420
+ work_order_id?: string;
10421
+ };
10422
+ Relationships: [{
10423
+ foreignKeyName: "material_usage_monteur_id_fkey";
10424
+ columns: ["monteur_id"];
10425
+ isOneToOne: false;
10426
+ referencedRelation: "profiles";
10427
+ referencedColumns: ["id"];
10428
+ }, {
10429
+ foreignKeyName: "material_usage_van_inventory_id_fkey";
10430
+ columns: ["van_inventory_id"];
10431
+ isOneToOne: false;
10432
+ referencedRelation: "van_inventories";
10433
+ referencedColumns: ["id"];
10434
+ }, {
10435
+ foreignKeyName: "material_usage_work_order_id_fkey";
10436
+ columns: ["work_order_id"];
10437
+ isOneToOne: false;
10438
+ referencedRelation: "work_orders";
10439
+ referencedColumns: ["id"];
10440
+ }];
10441
+ };
10442
+ medewerker_details: {
10443
+ Row: {
10444
+ color: string | null;
10445
+ created_at: string;
10446
+ hours_fri: number | null;
10447
+ hours_mon: number | null;
10448
+ hours_thu: number | null;
10449
+ hours_tue: number | null;
10450
+ hours_wed: number | null;
10451
+ id: string;
10452
+ is_active: boolean;
10453
+ leave_balance_hours: number;
10454
+ persnr: string | null;
10455
+ phone: string | null;
10456
+ profile_id: string;
10457
+ updated_at: string;
10458
+ };
10459
+ Insert: {
10460
+ color?: string | null;
10461
+ created_at?: string;
10462
+ hours_fri?: number | null;
10463
+ hours_mon?: number | null;
10464
+ hours_thu?: number | null;
10465
+ hours_tue?: number | null;
10466
+ hours_wed?: number | null;
10467
+ id?: string;
10468
+ is_active?: boolean;
10469
+ leave_balance_hours?: number;
10470
+ persnr?: string | null;
10471
+ phone?: string | null;
10472
+ profile_id: string;
10473
+ updated_at?: string;
10474
+ };
10475
+ Update: {
10476
+ color?: string | null;
10477
+ created_at?: string;
10478
+ hours_fri?: number | null;
10479
+ hours_mon?: number | null;
10480
+ hours_thu?: number | null;
10481
+ hours_tue?: number | null;
10482
+ hours_wed?: number | null;
10483
+ id?: string;
10484
+ is_active?: boolean;
10485
+ leave_balance_hours?: number;
10486
+ persnr?: string | null;
10487
+ phone?: string | null;
10488
+ profile_id?: string;
10489
+ updated_at?: string;
10490
+ };
10491
+ Relationships: [{
10492
+ foreignKeyName: "medewerker_details_profile_id_fkey";
10493
+ columns: ["profile_id"];
10494
+ isOneToOne: true;
10495
+ referencedRelation: "profiles";
10496
+ referencedColumns: ["id"];
10497
+ }];
10498
+ };
10499
+ module_features: {
10500
+ Row: {
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
+ Insert: {
10510
+ created_at?: string;
10511
+ feature_id: string;
10512
+ id?: string;
10513
+ is_active?: boolean;
10514
+ last_seen_at?: string;
10515
+ module_id: string;
10516
+ name: string;
10517
+ };
10518
+ Update: {
10519
+ created_at?: string;
10520
+ feature_id?: string;
10521
+ id?: string;
10522
+ is_active?: boolean;
10523
+ last_seen_at?: string;
10524
+ module_id?: string;
10525
+ name?: string;
10526
+ };
10527
+ Relationships: [];
10528
+ };
9926
10529
  module_permissions: {
9927
10530
  Row: {
9928
10531
  created_at: string;
@@ -9953,6 +10556,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
9953
10556
  module_registry: {
9954
10557
  Row: {
9955
10558
  created_at: string;
10559
+ enforce: boolean;
9956
10560
  is_active: boolean;
9957
10561
  last_seen_at: string;
9958
10562
  module_id: string;
@@ -9962,6 +10566,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
9962
10566
  };
9963
10567
  Insert: {
9964
10568
  created_at?: string;
10569
+ enforce?: boolean;
9965
10570
  is_active?: boolean;
9966
10571
  last_seen_at?: string;
9967
10572
  module_id: string;
@@ -9971,6 +10576,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
9971
10576
  };
9972
10577
  Update: {
9973
10578
  created_at?: string;
10579
+ enforce?: boolean;
9974
10580
  is_active?: boolean;
9975
10581
  last_seen_at?: string;
9976
10582
  module_id?: string;
@@ -10031,63 +10637,6 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
10031
10637
  };
10032
10638
  Relationships: [];
10033
10639
  };
10034
- monteurs: {
10035
- Row: {
10036
- avatar_url: string | null;
10037
- color: string | null;
10038
- created_at: string;
10039
- email: string | null;
10040
- id: string;
10041
- is_active: boolean;
10042
- leave_balance_hours: number;
10043
- name: string;
10044
- persnr: number | null;
10045
- phone: string | null;
10046
- role: string;
10047
- tenant_id: string;
10048
- updated_at: string;
10049
- user_id: string | null;
10050
- };
10051
- Insert: {
10052
- avatar_url?: string | null;
10053
- color?: string | null;
10054
- created_at?: string;
10055
- email?: string | null;
10056
- id?: string;
10057
- is_active?: boolean;
10058
- leave_balance_hours?: number;
10059
- name: string;
10060
- persnr?: number | null;
10061
- phone?: string | null;
10062
- role?: string;
10063
- tenant_id: string;
10064
- updated_at?: string;
10065
- user_id?: string | null;
10066
- };
10067
- Update: {
10068
- avatar_url?: string | null;
10069
- color?: string | null;
10070
- created_at?: string;
10071
- email?: string | null;
10072
- id?: string;
10073
- is_active?: boolean;
10074
- leave_balance_hours?: number;
10075
- name?: string;
10076
- persnr?: number | null;
10077
- phone?: string | null;
10078
- role?: string;
10079
- tenant_id?: string;
10080
- updated_at?: string;
10081
- user_id?: string | null;
10082
- };
10083
- Relationships: [{
10084
- foreignKeyName: "monteurs_tenant_id_fkey";
10085
- columns: ["tenant_id"];
10086
- isOneToOne: false;
10087
- referencedRelation: "tenants";
10088
- referencedColumns: ["id"];
10089
- }];
10090
- };
10091
10640
  nmbrs_component_mapping: {
10092
10641
  Row: {
10093
10642
  created_at: string;
@@ -10158,13 +10707,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
10158
10707
  nmbrs_employee_number?: string;
10159
10708
  updated_at?: string;
10160
10709
  };
10161
- Relationships: [{
10162
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
10163
- columns: ["monteur_id"];
10164
- isOneToOne: true;
10165
- referencedRelation: "monteurs";
10166
- referencedColumns: ["id"];
10167
- }];
10710
+ Relationships: [];
10168
10711
  };
10169
10712
  nmbrs_export_lines: {
10170
10713
  Row: {
@@ -10213,12 +10756,6 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
10213
10756
  wage_code?: string;
10214
10757
  };
10215
10758
  Relationships: [{
10216
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
10217
- columns: ["monteur_id"];
10218
- isOneToOne: false;
10219
- referencedRelation: "monteurs";
10220
- referencedColumns: ["id"];
10221
- }, {
10222
10759
  foreignKeyName: "nmbrs_export_lines_run_id_fkey";
10223
10760
  columns: ["run_id"];
10224
10761
  isOneToOne: false;
@@ -11046,6 +11583,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
11046
11583
  error_message: string | null;
11047
11584
  id: string;
11048
11585
  invoice_number: string | null;
11586
+ next_attempt_at: string;
11049
11587
  order_id: string;
11050
11588
  processed_at: string | null;
11051
11589
  status: string;
@@ -11057,6 +11595,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
11057
11595
  error_message?: string | null;
11058
11596
  id?: string;
11059
11597
  invoice_number?: string | null;
11598
+ next_attempt_at?: string;
11060
11599
  order_id: string;
11061
11600
  processed_at?: string | null;
11062
11601
  status?: string;
@@ -11068,6 +11607,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
11068
11607
  error_message?: string | null;
11069
11608
  id?: string;
11070
11609
  invoice_number?: string | null;
11610
+ next_attempt_at?: string;
11071
11611
  order_id?: string;
11072
11612
  processed_at?: string | null;
11073
11613
  status?: string;
@@ -11249,6 +11789,8 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
11249
11789
  orders: {
11250
11790
  Row: {
11251
11791
  buffer_id: string | null;
11792
+ cancel_reason: string | null;
11793
+ cancelled_at: string | null;
11252
11794
  created_at: string;
11253
11795
  custom_fields: import("../integrations/supabase/types").Json;
11254
11796
  customer_id: string | null;
@@ -11271,6 +11813,8 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
11271
11813
  };
11272
11814
  Insert: {
11273
11815
  buffer_id?: string | null;
11816
+ cancel_reason?: string | null;
11817
+ cancelled_at?: string | null;
11274
11818
  created_at?: string;
11275
11819
  custom_fields?: import("../integrations/supabase/types").Json;
11276
11820
  customer_id?: string | null;
@@ -11293,6 +11837,8 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
11293
11837
  };
11294
11838
  Update: {
11295
11839
  buffer_id?: string | null;
11840
+ cancel_reason?: string | null;
11841
+ cancelled_at?: string | null;
11296
11842
  created_at?: string;
11297
11843
  custom_fields?: import("../integrations/supabase/types").Json;
11298
11844
  customer_id?: string | null;
@@ -12606,6 +13152,9 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
12606
13152
  created_at: string;
12607
13153
  id: string;
12608
13154
  laatst_gezien: string;
13155
+ laatste_fout: string | null;
13156
+ laatste_request_id: number | null;
13157
+ mislukte_posts: number;
12609
13158
  tick_sleutel: string;
12610
13159
  updated_at: string;
12611
13160
  };
@@ -12615,6 +13164,9 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
12615
13164
  created_at?: string;
12616
13165
  id?: string;
12617
13166
  laatst_gezien?: string;
13167
+ laatste_fout?: string | null;
13168
+ laatste_request_id?: number | null;
13169
+ mislukte_posts?: number;
12618
13170
  tick_sleutel?: string;
12619
13171
  updated_at?: string;
12620
13172
  };
@@ -12624,6 +13176,9 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
12624
13176
  created_at?: string;
12625
13177
  id?: string;
12626
13178
  laatst_gezien?: string;
13179
+ laatste_fout?: string | null;
13180
+ laatste_request_id?: number | null;
13181
+ mislukte_posts?: number;
12627
13182
  tick_sleutel?: string;
12628
13183
  updated_at?: string;
12629
13184
  };
@@ -13346,6 +13901,66 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
13346
13901
  };
13347
13902
  Relationships: [];
13348
13903
  };
13904
+ profile_modules: {
13905
+ Row: {
13906
+ created_at: string;
13907
+ id: string;
13908
+ module_id: string;
13909
+ profile_id: string;
13910
+ };
13911
+ Insert: {
13912
+ created_at?: string;
13913
+ id?: string;
13914
+ module_id: string;
13915
+ profile_id: string;
13916
+ };
13917
+ Update: {
13918
+ created_at?: string;
13919
+ id?: string;
13920
+ module_id?: string;
13921
+ profile_id?: string;
13922
+ };
13923
+ Relationships: [{
13924
+ foreignKeyName: "profile_modules_profile_id_fkey";
13925
+ columns: ["profile_id"];
13926
+ isOneToOne: false;
13927
+ referencedRelation: "profiles_org";
13928
+ referencedColumns: ["id"];
13929
+ }];
13930
+ };
13931
+ profile_roles: {
13932
+ Row: {
13933
+ created_at: string;
13934
+ id: string;
13935
+ profile_id: string;
13936
+ role_id: string;
13937
+ };
13938
+ Insert: {
13939
+ created_at?: string;
13940
+ id?: string;
13941
+ profile_id: string;
13942
+ role_id: string;
13943
+ };
13944
+ Update: {
13945
+ created_at?: string;
13946
+ id?: string;
13947
+ profile_id?: string;
13948
+ role_id?: string;
13949
+ };
13950
+ Relationships: [{
13951
+ foreignKeyName: "profile_roles_profile_id_fkey";
13952
+ columns: ["profile_id"];
13953
+ isOneToOne: false;
13954
+ referencedRelation: "profiles_org";
13955
+ referencedColumns: ["id"];
13956
+ }, {
13957
+ foreignKeyName: "profile_roles_role_id_fkey";
13958
+ columns: ["role_id"];
13959
+ isOneToOne: false;
13960
+ referencedRelation: "roles";
13961
+ referencedColumns: ["id"];
13962
+ }];
13963
+ };
13349
13964
  profiles: {
13350
13965
  Row: {
13351
13966
  address: string | null;
@@ -13391,6 +14006,39 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
13391
14006
  referencedColumns: ["id"];
13392
14007
  }];
13393
14008
  };
14009
+ profiles_org: {
14010
+ Row: {
14011
+ created_at: string;
14012
+ id: string;
14013
+ is_default: boolean;
14014
+ name: string;
14015
+ tenant_id: string | null;
14016
+ updated_at: string;
14017
+ };
14018
+ Insert: {
14019
+ created_at?: string;
14020
+ id?: string;
14021
+ is_default?: boolean;
14022
+ name: string;
14023
+ tenant_id?: string | null;
14024
+ updated_at?: string;
14025
+ };
14026
+ Update: {
14027
+ created_at?: string;
14028
+ id?: string;
14029
+ is_default?: boolean;
14030
+ name?: string;
14031
+ tenant_id?: string | null;
14032
+ updated_at?: string;
14033
+ };
14034
+ Relationships: [{
14035
+ foreignKeyName: "profiles_org_tenant_id_fkey";
14036
+ columns: ["tenant_id"];
14037
+ isOneToOne: false;
14038
+ referencedRelation: "tenants";
14039
+ referencedColumns: ["id"];
14040
+ }];
14041
+ };
13394
14042
  projects: {
13395
14043
  Row: {
13396
14044
  contact_name: string | null;
@@ -14132,6 +14780,96 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
14132
14780
  referencedColumns: ["id"];
14133
14781
  }];
14134
14782
  };
14783
+ role_assignments: {
14784
+ Row: {
14785
+ created_at: string;
14786
+ id: string;
14787
+ role_id: string;
14788
+ user_id: string;
14789
+ };
14790
+ Insert: {
14791
+ created_at?: string;
14792
+ id?: string;
14793
+ role_id: string;
14794
+ user_id: string;
14795
+ };
14796
+ Update: {
14797
+ created_at?: string;
14798
+ id?: string;
14799
+ role_id?: string;
14800
+ user_id?: string;
14801
+ };
14802
+ Relationships: [{
14803
+ foreignKeyName: "role_assignments_role_id_fkey";
14804
+ columns: ["role_id"];
14805
+ isOneToOne: false;
14806
+ referencedRelation: "roles";
14807
+ referencedColumns: ["id"];
14808
+ }];
14809
+ };
14810
+ role_permissions: {
14811
+ Row: {
14812
+ can_edit: boolean;
14813
+ can_view: boolean;
14814
+ feature_id: string;
14815
+ id: string;
14816
+ module_id: string;
14817
+ role_id: string;
14818
+ updated_at: string;
14819
+ };
14820
+ Insert: {
14821
+ can_edit?: boolean;
14822
+ can_view?: boolean;
14823
+ feature_id?: string;
14824
+ id?: string;
14825
+ module_id: string;
14826
+ role_id: string;
14827
+ updated_at?: string;
14828
+ };
14829
+ Update: {
14830
+ can_edit?: boolean;
14831
+ can_view?: boolean;
14832
+ feature_id?: string;
14833
+ id?: string;
14834
+ module_id?: string;
14835
+ role_id?: string;
14836
+ updated_at?: string;
14837
+ };
14838
+ Relationships: [{
14839
+ foreignKeyName: "role_permissions_role_id_fkey";
14840
+ columns: ["role_id"];
14841
+ isOneToOne: false;
14842
+ referencedRelation: "roles";
14843
+ referencedColumns: ["id"];
14844
+ }];
14845
+ };
14846
+ roles: {
14847
+ Row: {
14848
+ created_at: string;
14849
+ id: string;
14850
+ is_protected: boolean;
14851
+ key: string;
14852
+ name: string;
14853
+ updated_at: string;
14854
+ };
14855
+ Insert: {
14856
+ created_at?: string;
14857
+ id?: string;
14858
+ is_protected?: boolean;
14859
+ key: string;
14860
+ name: string;
14861
+ updated_at?: string;
14862
+ };
14863
+ Update: {
14864
+ created_at?: string;
14865
+ id?: string;
14866
+ is_protected?: boolean;
14867
+ key?: string;
14868
+ name?: string;
14869
+ updated_at?: string;
14870
+ };
14871
+ Relationships: [];
14872
+ };
14135
14873
  rooms: {
14136
14874
  Row: {
14137
14875
  capacity: number;
@@ -14475,6 +15213,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
14475
15213
  type: string;
14476
15214
  updated_at: string;
14477
15215
  vereist_medewerker: boolean;
15216
+ werkplek: string | null;
14478
15217
  };
14479
15218
  Insert: {
14480
15219
  actief?: boolean;
@@ -14488,6 +15227,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
14488
15227
  type?: string;
14489
15228
  updated_at?: string;
14490
15229
  vereist_medewerker?: boolean;
15230
+ werkplek?: string | null;
14491
15231
  };
14492
15232
  Update: {
14493
15233
  actief?: boolean;
@@ -14501,9 +15241,46 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
14501
15241
  type?: string;
14502
15242
  updated_at?: string;
14503
15243
  vereist_medewerker?: boolean;
15244
+ werkplek?: string | null;
14504
15245
  };
14505
15246
  Relationships: [];
14506
15247
  };
15248
+ sick_periods: {
15249
+ Row: {
15250
+ created_at: string;
15251
+ employee_id: string;
15252
+ end_date: string | null;
15253
+ id: string;
15254
+ notes: string | null;
15255
+ start_date: string;
15256
+ updated_at: string;
15257
+ };
15258
+ Insert: {
15259
+ created_at?: string;
15260
+ employee_id: string;
15261
+ end_date?: string | null;
15262
+ id?: string;
15263
+ notes?: string | null;
15264
+ start_date: string;
15265
+ updated_at?: string;
15266
+ };
15267
+ Update: {
15268
+ created_at?: string;
15269
+ employee_id?: string;
15270
+ end_date?: string | null;
15271
+ id?: string;
15272
+ notes?: string | null;
15273
+ start_date?: string;
15274
+ updated_at?: string;
15275
+ };
15276
+ Relationships: [{
15277
+ foreignKeyName: "sick_periods_employee_id_fkey";
15278
+ columns: ["employee_id"];
15279
+ isOneToOne: false;
15280
+ referencedRelation: "profiles";
15281
+ referencedColumns: ["id"];
15282
+ }];
15283
+ };
14507
15284
  sidebar_config: {
14508
15285
  Row: {
14509
15286
  id: string;
@@ -14801,6 +15578,54 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
14801
15578
  };
14802
15579
  Relationships: [];
14803
15580
  };
15581
+ time_compensation_entries: {
15582
+ Row: {
15583
+ created_at: string;
15584
+ employee_id: string;
15585
+ entry_date: string;
15586
+ id: string;
15587
+ km: number;
15588
+ meal_allowance: number;
15589
+ notes: string | null;
15590
+ standby_evening: number;
15591
+ standby_weekend: number;
15592
+ tvt_change: number;
15593
+ updated_at: string;
15594
+ };
15595
+ Insert: {
15596
+ created_at?: string;
15597
+ employee_id: string;
15598
+ entry_date: string;
15599
+ id?: string;
15600
+ km?: number;
15601
+ meal_allowance?: number;
15602
+ notes?: string | null;
15603
+ standby_evening?: number;
15604
+ standby_weekend?: number;
15605
+ tvt_change?: number;
15606
+ updated_at?: string;
15607
+ };
15608
+ Update: {
15609
+ created_at?: string;
15610
+ employee_id?: string;
15611
+ entry_date?: string;
15612
+ id?: string;
15613
+ km?: number;
15614
+ meal_allowance?: number;
15615
+ notes?: string | null;
15616
+ standby_evening?: number;
15617
+ standby_weekend?: number;
15618
+ tvt_change?: number;
15619
+ updated_at?: string;
15620
+ };
15621
+ Relationships: [{
15622
+ foreignKeyName: "time_compensation_entries_employee_id_fkey";
15623
+ columns: ["employee_id"];
15624
+ isOneToOne: false;
15625
+ referencedRelation: "profiles";
15626
+ referencedColumns: ["id"];
15627
+ }];
15628
+ };
14804
15629
  time_entries: {
14805
15630
  Row: {
14806
15631
  created_at: string;
@@ -14835,65 +15660,170 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
14835
15660
  undertime?: number;
14836
15661
  updated_at?: string;
14837
15662
  };
15663
+ Relationships: [];
15664
+ };
15665
+ time_log_week_approvals: {
15666
+ Row: {
15667
+ approved_at: string | null;
15668
+ approved_by: string | null;
15669
+ created_at: string;
15670
+ employee_id: string;
15671
+ id: string;
15672
+ locked: boolean;
15673
+ notes: string | null;
15674
+ status: string;
15675
+ submitted_at: string | null;
15676
+ updated_at: string;
15677
+ week_start: string;
15678
+ };
15679
+ Insert: {
15680
+ approved_at?: string | null;
15681
+ approved_by?: string | null;
15682
+ created_at?: string;
15683
+ employee_id: string;
15684
+ id?: string;
15685
+ locked?: boolean;
15686
+ notes?: string | null;
15687
+ status?: string;
15688
+ submitted_at?: string | null;
15689
+ updated_at?: string;
15690
+ week_start: string;
15691
+ };
15692
+ Update: {
15693
+ approved_at?: string | null;
15694
+ approved_by?: string | null;
15695
+ created_at?: string;
15696
+ employee_id?: string;
15697
+ id?: string;
15698
+ locked?: boolean;
15699
+ notes?: string | null;
15700
+ status?: string;
15701
+ submitted_at?: string | null;
15702
+ updated_at?: string;
15703
+ week_start?: string;
15704
+ };
14838
15705
  Relationships: [{
14839
- foreignKeyName: "time_entries_employee_id_fkey";
15706
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
14840
15707
  columns: ["employee_id"];
14841
15708
  isOneToOne: false;
14842
- referencedRelation: "monteurs";
15709
+ referencedRelation: "profiles";
14843
15710
  referencedColumns: ["id"];
14844
15711
  }];
14845
15712
  };
14846
15713
  time_logs: {
14847
15714
  Row: {
15715
+ auto_stop_reason: string | null;
15716
+ auto_stopped: boolean;
14848
15717
  created_at: string;
15718
+ current_latitude: number | null;
15719
+ current_longitude: number | null;
15720
+ current_position_updated_at: string | null;
14849
15721
  employee_id: string;
15722
+ end_latitude: number | null;
15723
+ end_longitude: number | null;
14850
15724
  end_time: string | null;
15725
+ eta_distance_km: number | null;
15726
+ eta_minutes: number | null;
15727
+ eta_updated_at: string | null;
15728
+ hour_category: string | null;
14851
15729
  id: string;
15730
+ last_reminder_at: string | null;
14852
15731
  notes: string | null;
14853
15732
  overtime_hours: number;
14854
15733
  overtime_type: string | null;
14855
15734
  regular_hours: number;
15735
+ reminder_count: number;
15736
+ requires_review: boolean;
15737
+ start_latitude: number | null;
15738
+ start_longitude: number | null;
14856
15739
  start_time: string;
14857
15740
  travel_cost: number | null;
14858
15741
  travel_distance_km: number | null;
15742
+ travel_duration_min: number | null;
15743
+ travel_time_minutes: number | null;
14859
15744
  type: string;
14860
15745
  updated_at: string;
15746
+ work_order_id: string | null;
14861
15747
  };
14862
15748
  Insert: {
15749
+ auto_stop_reason?: string | null;
15750
+ auto_stopped?: boolean;
14863
15751
  created_at?: string;
15752
+ current_latitude?: number | null;
15753
+ current_longitude?: number | null;
15754
+ current_position_updated_at?: string | null;
14864
15755
  employee_id: string;
15756
+ end_latitude?: number | null;
15757
+ end_longitude?: number | null;
14865
15758
  end_time?: string | null;
15759
+ eta_distance_km?: number | null;
15760
+ eta_minutes?: number | null;
15761
+ eta_updated_at?: string | null;
15762
+ hour_category?: string | null;
14866
15763
  id?: string;
15764
+ last_reminder_at?: string | null;
14867
15765
  notes?: string | null;
14868
15766
  overtime_hours?: number;
14869
15767
  overtime_type?: string | null;
14870
15768
  regular_hours?: number;
15769
+ reminder_count?: number;
15770
+ requires_review?: boolean;
15771
+ start_latitude?: number | null;
15772
+ start_longitude?: number | null;
14871
15773
  start_time?: string;
14872
15774
  travel_cost?: number | null;
14873
15775
  travel_distance_km?: number | null;
15776
+ travel_duration_min?: number | null;
15777
+ travel_time_minutes?: number | null;
14874
15778
  type: string;
14875
15779
  updated_at?: string;
15780
+ work_order_id?: string | null;
14876
15781
  };
14877
15782
  Update: {
15783
+ auto_stop_reason?: string | null;
15784
+ auto_stopped?: boolean;
14878
15785
  created_at?: string;
15786
+ current_latitude?: number | null;
15787
+ current_longitude?: number | null;
15788
+ current_position_updated_at?: string | null;
14879
15789
  employee_id?: string;
15790
+ end_latitude?: number | null;
15791
+ end_longitude?: number | null;
14880
15792
  end_time?: string | null;
15793
+ eta_distance_km?: number | null;
15794
+ eta_minutes?: number | null;
15795
+ eta_updated_at?: string | null;
15796
+ hour_category?: string | null;
14881
15797
  id?: string;
15798
+ last_reminder_at?: string | null;
14882
15799
  notes?: string | null;
14883
15800
  overtime_hours?: number;
14884
15801
  overtime_type?: string | null;
14885
15802
  regular_hours?: number;
15803
+ reminder_count?: number;
15804
+ requires_review?: boolean;
15805
+ start_latitude?: number | null;
15806
+ start_longitude?: number | null;
14886
15807
  start_time?: string;
14887
15808
  travel_cost?: number | null;
14888
15809
  travel_distance_km?: number | null;
15810
+ travel_duration_min?: number | null;
15811
+ travel_time_minutes?: number | null;
14889
15812
  type?: string;
14890
15813
  updated_at?: string;
15814
+ work_order_id?: string | null;
14891
15815
  };
14892
15816
  Relationships: [{
14893
15817
  foreignKeyName: "time_logs_employee_id_fkey";
14894
15818
  columns: ["employee_id"];
14895
15819
  isOneToOne: false;
14896
- referencedRelation: "monteurs";
15820
+ referencedRelation: "profiles";
15821
+ referencedColumns: ["id"];
15822
+ }, {
15823
+ foreignKeyName: "time_logs_work_order_id_fkey";
15824
+ columns: ["work_order_id"];
15825
+ isOneToOne: false;
15826
+ referencedRelation: "work_orders";
14897
15827
  referencedColumns: ["id"];
14898
15828
  }];
14899
15829
  };
@@ -14932,7 +15862,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
14932
15862
  foreignKeyName: "time_off_entries_employee_id_fkey";
14933
15863
  columns: ["employee_id"];
14934
15864
  isOneToOne: false;
14935
- referencedRelation: "monteurs";
15865
+ referencedRelation: "profiles";
14936
15866
  referencedColumns: ["id"];
14937
15867
  }];
14938
15868
  };
@@ -15242,6 +16172,39 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
15242
16172
  };
15243
16173
  Relationships: [];
15244
16174
  };
16175
+ twinfield_cron_locks: {
16176
+ Row: {
16177
+ created_at: string;
16178
+ heartbeat_at: string;
16179
+ job_name: string;
16180
+ last_error: string | null;
16181
+ last_finished_at: string | null;
16182
+ locked_at: string;
16183
+ run_id: string;
16184
+ updated_at: string;
16185
+ };
16186
+ Insert: {
16187
+ created_at?: string;
16188
+ heartbeat_at?: string;
16189
+ job_name: string;
16190
+ last_error?: string | null;
16191
+ last_finished_at?: string | null;
16192
+ locked_at?: string;
16193
+ run_id?: string;
16194
+ updated_at?: string;
16195
+ };
16196
+ Update: {
16197
+ created_at?: string;
16198
+ heartbeat_at?: string;
16199
+ job_name?: string;
16200
+ last_error?: string | null;
16201
+ last_finished_at?: string | null;
16202
+ locked_at?: string;
16203
+ run_id?: string;
16204
+ updated_at?: string;
16205
+ };
16206
+ Relationships: [];
16207
+ };
15245
16208
  twinfield_customers: {
15246
16209
  Row: {
15247
16210
  address: string | null;
@@ -15842,6 +16805,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
15842
16805
  twinfield_push_queue: {
15843
16806
  Row: {
15844
16807
  action: string;
16808
+ attempt_started_at: string | null;
15845
16809
  attempts: number;
15846
16810
  connection_id: string | null;
15847
16811
  created_at: string;
@@ -15858,6 +16822,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
15858
16822
  };
15859
16823
  Insert: {
15860
16824
  action?: string;
16825
+ attempt_started_at?: string | null;
15861
16826
  attempts?: number;
15862
16827
  connection_id?: string | null;
15863
16828
  created_at?: string;
@@ -15874,6 +16839,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
15874
16839
  };
15875
16840
  Update: {
15876
16841
  action?: string;
16842
+ attempt_started_at?: string | null;
15877
16843
  attempts?: number;
15878
16844
  connection_id?: string | null;
15879
16845
  created_at?: string;
@@ -16071,13 +17037,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
16071
17037
  workday_end?: string | null;
16072
17038
  workday_start?: string | null;
16073
17039
  };
16074
- Relationships: [{
16075
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
16076
- columns: ["monteur_id"];
16077
- isOneToOne: true;
16078
- referencedRelation: "monteurs";
16079
- referencedColumns: ["id"];
16080
- }];
17040
+ Relationships: [];
16081
17041
  };
16082
17042
  uren_entries: {
16083
17043
  Row: {
@@ -16123,12 +17083,6 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
16123
17083
  werkbon_id?: string | null;
16124
17084
  };
16125
17085
  Relationships: [{
16126
- foreignKeyName: "uren_entries_monteur_id_fkey";
16127
- columns: ["monteur_id"];
16128
- isOneToOne: false;
16129
- referencedRelation: "monteurs";
16130
- referencedColumns: ["id"];
16131
- }, {
16132
17086
  foreignKeyName: "uren_entries_werkbon_id_fkey";
16133
17087
  columns: ["werkbon_id"];
16134
17088
  isOneToOne: false;
@@ -16596,17 +17550,12 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
16596
17550
  submitted_at?: string | null;
16597
17551
  updated_at?: string;
16598
17552
  };
16599
- Relationships: [{
16600
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
16601
- columns: ["monteur_id"];
16602
- isOneToOne: false;
16603
- referencedRelation: "monteurs";
16604
- referencedColumns: ["id"];
16605
- }];
17553
+ Relationships: [];
16606
17554
  };
16607
17555
  user_module_permissions: {
16608
17556
  Row: {
16609
17557
  created_at: string;
17558
+ feature_id: string;
16610
17559
  id: string;
16611
17560
  module_id: string;
16612
17561
  permission: string;
@@ -16615,6 +17564,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
16615
17564
  };
16616
17565
  Insert: {
16617
17566
  created_at?: string;
17567
+ feature_id?: string;
16618
17568
  id?: string;
16619
17569
  module_id: string;
16620
17570
  permission: string;
@@ -16623,6 +17573,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
16623
17573
  };
16624
17574
  Update: {
16625
17575
  created_at?: string;
17576
+ feature_id?: string;
16626
17577
  id?: string;
16627
17578
  module_id?: string;
16628
17579
  permission?: string;
@@ -16658,6 +17609,51 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
16658
17609
  referencedColumns: ["id"];
16659
17610
  }];
16660
17611
  };
17612
+ van_inventories: {
17613
+ Row: {
17614
+ barcode: string | null;
17615
+ created_at: string;
17616
+ id: string;
17617
+ monteur_id: string | null;
17618
+ price_per_unit: number;
17619
+ product_name: string;
17620
+ quantity_current: number;
17621
+ quantity_min: number;
17622
+ unit: string;
17623
+ updated_at: string;
17624
+ };
17625
+ Insert: {
17626
+ barcode?: string | null;
17627
+ created_at?: string;
17628
+ id?: string;
17629
+ monteur_id?: string | null;
17630
+ price_per_unit?: number;
17631
+ product_name: string;
17632
+ quantity_current?: number;
17633
+ quantity_min?: number;
17634
+ unit?: string;
17635
+ updated_at?: string;
17636
+ };
17637
+ Update: {
17638
+ barcode?: string | null;
17639
+ created_at?: string;
17640
+ id?: string;
17641
+ monteur_id?: string | null;
17642
+ price_per_unit?: number;
17643
+ product_name?: string;
17644
+ quantity_current?: number;
17645
+ quantity_min?: number;
17646
+ unit?: string;
17647
+ updated_at?: string;
17648
+ };
17649
+ Relationships: [{
17650
+ foreignKeyName: "van_inventories_monteur_id_fkey";
17651
+ columns: ["monteur_id"];
17652
+ isOneToOne: false;
17653
+ referencedRelation: "profiles";
17654
+ referencedColumns: ["id"];
17655
+ }];
17656
+ };
16661
17657
  voorraad_custom_fields: {
16662
17658
  Row: {
16663
17659
  created_at: string;
@@ -17608,7 +18604,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
17608
18604
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
17609
18605
  columns: ["monteur_id"];
17610
18606
  isOneToOne: false;
17611
- referencedRelation: "monteurs";
18607
+ referencedRelation: "profiles";
17612
18608
  referencedColumns: ["id"];
17613
18609
  }, {
17614
18610
  foreignKeyName: "work_order_monteurs_work_order_id_fkey";
@@ -17618,6 +18614,60 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
17618
18614
  referencedColumns: ["id"];
17619
18615
  }];
17620
18616
  };
18617
+ work_order_photos: {
18618
+ Row: {
18619
+ ai_caption: string | null;
18620
+ ai_categorized_at: string | null;
18621
+ ai_labels: import("../integrations/supabase/types").Json | null;
18622
+ caption: string | null;
18623
+ created_at: string;
18624
+ id: string;
18625
+ monteur_id: string | null;
18626
+ photo_type: string;
18627
+ storage_path: string;
18628
+ updated_at: string;
18629
+ work_order_id: string;
18630
+ };
18631
+ Insert: {
18632
+ ai_caption?: string | null;
18633
+ ai_categorized_at?: string | null;
18634
+ ai_labels?: import("../integrations/supabase/types").Json | null;
18635
+ caption?: string | null;
18636
+ created_at?: string;
18637
+ id?: string;
18638
+ monteur_id?: string | null;
18639
+ photo_type?: string;
18640
+ storage_path: string;
18641
+ updated_at?: string;
18642
+ work_order_id: string;
18643
+ };
18644
+ Update: {
18645
+ ai_caption?: string | null;
18646
+ ai_categorized_at?: string | null;
18647
+ ai_labels?: import("../integrations/supabase/types").Json | null;
18648
+ caption?: string | null;
18649
+ created_at?: string;
18650
+ id?: string;
18651
+ monteur_id?: string | null;
18652
+ photo_type?: string;
18653
+ storage_path?: string;
18654
+ updated_at?: string;
18655
+ work_order_id?: string;
18656
+ };
18657
+ Relationships: [{
18658
+ foreignKeyName: "work_order_photos_monteur_id_fkey";
18659
+ columns: ["monteur_id"];
18660
+ isOneToOne: false;
18661
+ referencedRelation: "profiles";
18662
+ referencedColumns: ["id"];
18663
+ }, {
18664
+ foreignKeyName: "work_order_photos_work_order_id_fkey";
18665
+ columns: ["work_order_id"];
18666
+ isOneToOne: false;
18667
+ referencedRelation: "work_orders";
18668
+ referencedColumns: ["id"];
18669
+ }];
18670
+ };
17621
18671
  work_orders: {
17622
18672
  Row: {
17623
18673
  assigned_to: string | null;
@@ -17649,7 +18699,6 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
17649
18699
  scheduled_end_time: string | null;
17650
18700
  scheduled_start_time: string | null;
17651
18701
  status: string;
17652
- tenant_id: string;
17653
18702
  total_hours_worked: number | null;
17654
18703
  total_price: number | null;
17655
18704
  travel_time_minutes: number | null;
@@ -17687,7 +18736,6 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
17687
18736
  scheduled_end_time?: string | null;
17688
18737
  scheduled_start_time?: string | null;
17689
18738
  status?: string;
17690
- tenant_id: string;
17691
18739
  total_hours_worked?: number | null;
17692
18740
  total_price?: number | null;
17693
18741
  travel_time_minutes?: number | null;
@@ -17725,7 +18773,6 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
17725
18773
  scheduled_end_time?: string | null;
17726
18774
  scheduled_start_time?: string | null;
17727
18775
  status?: string;
17728
- tenant_id?: string;
17729
18776
  total_hours_worked?: number | null;
17730
18777
  total_price?: number | null;
17731
18778
  travel_time_minutes?: number | null;
@@ -17739,12 +18786,6 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
17739
18786
  isOneToOne: false;
17740
18787
  referencedRelation: "work_orders";
17741
18788
  referencedColumns: ["id"];
17742
- }, {
17743
- foreignKeyName: "work_orders_tenant_id_fkey";
17744
- columns: ["tenant_id"];
17745
- isOneToOne: false;
17746
- referencedRelation: "tenants";
17747
- referencedColumns: ["id"];
17748
18789
  }];
17749
18790
  };
17750
18791
  };
@@ -18429,6 +19470,19 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
18429
19470
  };
18430
19471
  Returns: undefined;
18431
19472
  };
19473
+ approve_mailbox_order_proposal: {
19474
+ Args: {
19475
+ p_custom_fields: import("../integrations/supabase/types").Json;
19476
+ p_customer_id: string;
19477
+ p_delivery_date: string;
19478
+ p_field_values?: import("../integrations/supabase/types").Json;
19479
+ p_lines: import("../integrations/supabase/types").Json;
19480
+ p_notes: string;
19481
+ p_proposal_id: string;
19482
+ p_reviewed_by: string;
19483
+ };
19484
+ Returns: import("../integrations/supabase/types").Json;
19485
+ };
18432
19486
  assign_cart_numbers: {
18433
19487
  Args: {
18434
19488
  p_carts: import("../integrations/supabase/types").Json;
@@ -18480,6 +19534,10 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
18480
19534
  };
18481
19535
  Returns: number;
18482
19536
  };
19537
+ can_manage_hours: {
19538
+ Args: never;
19539
+ Returns: boolean;
19540
+ };
18483
19541
  check_offer_product_available_stock: {
18484
19542
  Args: {
18485
19543
  p_campaign_product_id: string;
@@ -18669,6 +19727,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
18669
19727
  };
18670
19728
  Returns: {
18671
19729
  action: string;
19730
+ attempt_started_at: string | null;
18672
19731
  attempts: number;
18673
19732
  connection_id: string | null;
18674
19733
  created_at: string;
@@ -18756,6 +19815,30 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
18756
19815
  agent_naam: string;
18757
19816
  }[];
18758
19817
  };
19818
+ consume_van_inventory: {
19819
+ Args: {
19820
+ p_inventory_id: string;
19821
+ p_quantity: number;
19822
+ };
19823
+ Returns: {
19824
+ barcode: string | null;
19825
+ created_at: string;
19826
+ id: string;
19827
+ monteur_id: string | null;
19828
+ price_per_unit: number;
19829
+ product_name: string;
19830
+ quantity_current: number;
19831
+ quantity_min: number;
19832
+ unit: string;
19833
+ updated_at: string;
19834
+ };
19835
+ SetofOptions: {
19836
+ from: "*";
19837
+ to: "van_inventories";
19838
+ isOneToOne: true;
19839
+ isSetofReturn: false;
19840
+ };
19841
+ };
18759
19842
  control_get_todays_carts: {
18760
19843
  Args: never;
18761
19844
  Returns: {
@@ -18829,6 +19912,13 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
18829
19912
  _user_id: string;
18830
19913
  };
18831
19914
  Returns: string;
19915
+ } | {
19916
+ Args: {
19917
+ _feature_id: string;
19918
+ _module_id: string;
19919
+ _user_id: string;
19920
+ };
19921
+ Returns: string;
18832
19922
  };
18833
19923
  email_auth_decrypt: {
18834
19924
  Args: {
@@ -18875,6 +19965,13 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
18875
19965
  };
18876
19966
  Returns: string;
18877
19967
  };
19968
+ employee_day_hours: {
19969
+ Args: {
19970
+ _day: string;
19971
+ _employee_id: string;
19972
+ };
19973
+ Returns: number;
19974
+ };
18878
19975
  enqueue_cart_replan_if_unlocked: {
18879
19976
  Args: {
18880
19977
  p_order_id: string;
@@ -19180,12 +20277,6 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
19180
20277
  Args: never;
19181
20278
  Returns: string;
19182
20279
  };
19183
- get_work_order_tenant_id: {
19184
- Args: {
19185
- wo_id: string;
19186
- };
19187
- Returns: string;
19188
- };
19189
20280
  has_module_permission: {
19190
20281
  Args: {
19191
20282
  _min: string;
@@ -19219,6 +20310,13 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
19219
20310
  };
19220
20311
  Returns: boolean;
19221
20312
  };
20313
+ is_time_log_week_locked: {
20314
+ Args: {
20315
+ p_employee_id: string;
20316
+ p_start_time: string;
20317
+ };
20318
+ Returns: boolean;
20319
+ };
19222
20320
  is_user_admin: {
19223
20321
  Args: never;
19224
20322
  Returns: boolean;
@@ -19227,19 +20325,43 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
19227
20325
  Args: never;
19228
20326
  Returns: boolean;
19229
20327
  };
20328
+ itk_offerte_naar_werkbon: {
20329
+ Args: {
20330
+ _offerte_id: string;
20331
+ };
20332
+ Returns: string;
20333
+ };
20334
+ itk_offerte_restant_mandaat: {
20335
+ Args: {
20336
+ _exclude_offerte_id?: string;
20337
+ _werkbon_id: string;
20338
+ };
20339
+ Returns: number;
20340
+ };
19230
20341
  jwt_has_role: {
19231
20342
  Args: {
19232
20343
  _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
19233
20344
  };
19234
20345
  Returns: boolean;
19235
20346
  };
19236
- list_monteurs: {
20347
+ list_medewerkers: {
19237
20348
  Args: never;
19238
20349
  Returns: {
19239
20350
  avatar_url: string;
20351
+ color: string;
19240
20352
  display_name: string;
19241
20353
  email: string;
20354
+ hours_fri: number;
20355
+ hours_mon: number;
20356
+ hours_thu: number;
20357
+ hours_tue: number;
20358
+ hours_wed: number;
19242
20359
  id: string;
20360
+ is_active: boolean;
20361
+ leave_balance_hours: number;
20362
+ persnr: string;
20363
+ phone: string;
20364
+ roles: string[];
19243
20365
  }[];
19244
20366
  };
19245
20367
  list_my_planning_items: {
@@ -19565,17 +20687,6 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
19565
20687
  Returns: string;
19566
20688
  };
19567
20689
  logistics_emit_event: {
19568
- Args: {
19569
- p_event_type: string;
19570
- p_idempotency_key?: string;
19571
- p_order_ref: string;
19572
- p_payload?: import("../integrations/supabase/types").Json;
19573
- p_shadow?: boolean;
19574
- p_source_module: string;
19575
- p_strategy_id?: string;
19576
- };
19577
- Returns: import("../integrations/supabase/types").Json;
19578
- } | {
19579
20690
  Args: {
19580
20691
  p_event_type: string;
19581
20692
  p_idempotency_key?: string;
@@ -19730,6 +20841,65 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
19730
20841
  };
19731
20842
  Returns: number;
19732
20843
  };
20844
+ logistics_plan_claim: {
20845
+ Args: {
20846
+ p_limit?: number;
20847
+ };
20848
+ Returns: {
20849
+ attempts: number;
20850
+ id: string;
20851
+ order_id: string;
20852
+ }[];
20853
+ };
20854
+ logistics_plan_enqueue: {
20855
+ Args: {
20856
+ p_order_id: string;
20857
+ p_reason?: string;
20858
+ };
20859
+ Returns: undefined;
20860
+ };
20861
+ logistics_plan_ensure_event: {
20862
+ Args: {
20863
+ p_order_id: string;
20864
+ };
20865
+ Returns: boolean;
20866
+ };
20867
+ logistics_plan_finish: {
20868
+ Args: {
20869
+ p_error?: string;
20870
+ p_id: string;
20871
+ };
20872
+ Returns: undefined;
20873
+ };
20874
+ logistics_plan_impact_orders: {
20875
+ Args: {
20876
+ p_order_id: string;
20877
+ };
20878
+ Returns: {
20879
+ buffer_id: string;
20880
+ order_id: string;
20881
+ plan_date: string;
20882
+ }[];
20883
+ };
20884
+ logistics_plan_kick: {
20885
+ Args: never;
20886
+ Returns: undefined;
20887
+ };
20888
+ logistics_plan_prune: {
20889
+ Args: never;
20890
+ Returns: number;
20891
+ };
20892
+ logistics_plan_release_stale: {
20893
+ Args: never;
20894
+ Returns: number;
20895
+ };
20896
+ logistics_plan_setting: {
20897
+ Args: {
20898
+ p_default: number;
20899
+ p_key: string;
20900
+ };
20901
+ Returns: number;
20902
+ };
19733
20903
  logistics_queue_capacity_email: {
19734
20904
  Args: {
19735
20905
  p_alert_id: string;
@@ -19971,6 +21141,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
19971
21141
  my_module_permissions: {
19972
21142
  Args: never;
19973
21143
  Returns: {
21144
+ feature_id: string;
19974
21145
  module_id: string;
19975
21146
  permission: string;
19976
21147
  }[];
@@ -20360,6 +21531,37 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
20360
21531
  };
20361
21532
  Returns: undefined;
20362
21533
  };
21534
+ quote_create_from_source: {
21535
+ Args: {
21536
+ _payload?: import("../integrations/supabase/types").Json;
21537
+ _source_id: string;
21538
+ _source_type: string;
21539
+ };
21540
+ Returns: string;
21541
+ };
21542
+ quote_get_billable_lines: {
21543
+ Args: {
21544
+ _quotation_id: string;
21545
+ };
21546
+ Returns: import("../integrations/supabase/types").Json;
21547
+ };
21548
+ quote_get_summary: {
21549
+ Args: {
21550
+ _quotation_id: string;
21551
+ };
21552
+ Returns: import("../integrations/supabase/types").Json;
21553
+ };
21554
+ quote_list_packages: {
21555
+ Args: never;
21556
+ Returns: import("../integrations/supabase/types").Json;
21557
+ };
21558
+ quote_list_sources: {
21559
+ Args: {
21560
+ _limit?: number;
21561
+ _source_type?: string;
21562
+ };
21563
+ Returns: import("../integrations/supabase/types").Json;
21564
+ };
20363
21565
  recompute_all_reserved_stock: {
20364
21566
  Args: never;
20365
21567
  Returns: undefined;
@@ -20851,6 +22053,16 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
20851
22053
  };
20852
22054
  Returns: string[];
20853
22055
  };
22056
+ switch_time_log: {
22057
+ Args: {
22058
+ p_employee_id: string;
22059
+ p_start_lat?: number;
22060
+ p_start_lng?: number;
22061
+ p_type: string;
22062
+ p_work_order_id?: string;
22063
+ };
22064
+ Returns: import("../integrations/supabase/types").Json;
22065
+ };
20854
22066
  sync_all_layer_stocks: {
20855
22067
  Args: never;
20856
22068
  Returns: undefined;
@@ -20885,6 +22097,12 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
20885
22097
  };
20886
22098
  Returns: undefined;
20887
22099
  };
22100
+ sync_sick_time_off: {
22101
+ Args: {
22102
+ _period_id: string;
22103
+ };
22104
+ Returns: number;
22105
+ };
20888
22106
  trade_item_stock_duplicates: {
20889
22107
  Args: never;
20890
22108
  Returns: {
@@ -20901,6 +22119,24 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
20901
22119
  };
20902
22120
  Returns: boolean;
20903
22121
  };
22122
+ twinfield_cron_lock_acquire: {
22123
+ Args: {
22124
+ _job_name: string;
22125
+ _stale_seconds?: number;
22126
+ };
22127
+ Returns: boolean;
22128
+ };
22129
+ twinfield_cron_lock_release: {
22130
+ Args: {
22131
+ _error?: string;
22132
+ _job_name: string;
22133
+ };
22134
+ Returns: undefined;
22135
+ };
22136
+ twinfield_prune_push_queue: {
22137
+ Args: never;
22138
+ Returns: number;
22139
+ };
20904
22140
  twinfield_register_cron: {
20905
22141
  Args: {
20906
22142
  apikey?: string;
@@ -20940,11 +22176,31 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
20940
22176
  Args: never;
20941
22177
  Returns: string;
20942
22178
  };
22179
+ wo_create_from_source: {
22180
+ Args: {
22181
+ _payload?: import("../integrations/supabase/types").Json;
22182
+ _source_id: string;
22183
+ _source_type: string;
22184
+ };
22185
+ Returns: string;
22186
+ };
22187
+ wo_get_billable_lines: {
22188
+ Args: {
22189
+ _work_order_id: string;
22190
+ };
22191
+ Returns: import("../integrations/supabase/types").Json;
22192
+ };
22193
+ wo_get_summary: {
22194
+ Args: {
22195
+ _work_order_id: string;
22196
+ };
22197
+ Returns: import("../integrations/supabase/types").Json;
22198
+ };
20943
22199
  };
20944
22200
  Enums: {
20945
22201
  ai_import_status: "nieuw" | "verwerken" | "bevestigen" | "klaar" | "mislukt";
20946
22202
  app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie";
20947
- doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon";
22203
+ doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon" | "veilingbon" | "afleverbrief" | "veilingbrief";
20948
22204
  doc_orientation: "portrait" | "landscape";
20949
22205
  exact_env: "staging" | "live";
20950
22206
  exact_push_status: "pending" | "sent" | "error";
@@ -21848,6 +23104,126 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
21848
23104
  };
21849
23105
  Relationships: [];
21850
23106
  };
23107
+ cao_holidays: {
23108
+ Row: {
23109
+ created_at: string;
23110
+ description: string | null;
23111
+ holiday_date: string;
23112
+ id: string;
23113
+ updated_at: string;
23114
+ };
23115
+ Insert: {
23116
+ created_at?: string;
23117
+ description?: string | null;
23118
+ holiday_date: string;
23119
+ id?: string;
23120
+ updated_at?: string;
23121
+ };
23122
+ Update: {
23123
+ created_at?: string;
23124
+ description?: string | null;
23125
+ holiday_date?: string;
23126
+ id?: string;
23127
+ updated_at?: string;
23128
+ };
23129
+ Relationships: [];
23130
+ };
23131
+ cao_settings: {
23132
+ Row: {
23133
+ auto_break_after_hours: number;
23134
+ auto_break_minutes: number;
23135
+ auto_break_unpaid: boolean;
23136
+ auto_stop_after_hours: number;
23137
+ callout_fee: number;
23138
+ created_at: string;
23139
+ daily_regular_hours: number;
23140
+ default_hourly_rate: number;
23141
+ id: string;
23142
+ materials_markup_percent: number;
23143
+ max_daily_hours: number;
23144
+ max_weekly_hours: number;
23145
+ meal_allowance_amount: number;
23146
+ overtime_pct_178: number;
23147
+ overtime_pct_189: number;
23148
+ overtime_pct_212: number;
23149
+ reminder_after_hours: number;
23150
+ standby_evening_amount: number;
23151
+ standby_weekend_amount: number;
23152
+ travel_cost_per_km: number | null;
23153
+ travel_cost_threshold_km: number | null;
23154
+ travel_counts_as_work: boolean;
23155
+ travel_hourly_rate: number;
23156
+ travel_rate_per_hour: number;
23157
+ travel_threshold_minutes: number;
23158
+ updated_at: string;
23159
+ weekend_always_212: boolean;
23160
+ window_end: string;
23161
+ window_start: string;
23162
+ };
23163
+ Insert: {
23164
+ auto_break_after_hours?: number;
23165
+ auto_break_minutes?: number;
23166
+ auto_break_unpaid?: boolean;
23167
+ auto_stop_after_hours?: number;
23168
+ callout_fee?: number;
23169
+ created_at?: string;
23170
+ daily_regular_hours?: number;
23171
+ default_hourly_rate?: number;
23172
+ id?: string;
23173
+ materials_markup_percent?: number;
23174
+ max_daily_hours?: number;
23175
+ max_weekly_hours?: number;
23176
+ meal_allowance_amount?: number;
23177
+ overtime_pct_178?: number;
23178
+ overtime_pct_189?: number;
23179
+ overtime_pct_212?: number;
23180
+ reminder_after_hours?: number;
23181
+ standby_evening_amount?: number;
23182
+ standby_weekend_amount?: number;
23183
+ travel_cost_per_km?: number | null;
23184
+ travel_cost_threshold_km?: number | null;
23185
+ travel_counts_as_work?: boolean;
23186
+ travel_hourly_rate?: number;
23187
+ travel_rate_per_hour?: number;
23188
+ travel_threshold_minutes?: number;
23189
+ updated_at?: string;
23190
+ weekend_always_212?: boolean;
23191
+ window_end?: string;
23192
+ window_start?: string;
23193
+ };
23194
+ Update: {
23195
+ auto_break_after_hours?: number;
23196
+ auto_break_minutes?: number;
23197
+ auto_break_unpaid?: boolean;
23198
+ auto_stop_after_hours?: number;
23199
+ callout_fee?: number;
23200
+ created_at?: string;
23201
+ daily_regular_hours?: number;
23202
+ default_hourly_rate?: number;
23203
+ id?: string;
23204
+ materials_markup_percent?: number;
23205
+ max_daily_hours?: number;
23206
+ max_weekly_hours?: number;
23207
+ meal_allowance_amount?: number;
23208
+ overtime_pct_178?: number;
23209
+ overtime_pct_189?: number;
23210
+ overtime_pct_212?: number;
23211
+ reminder_after_hours?: number;
23212
+ standby_evening_amount?: number;
23213
+ standby_weekend_amount?: number;
23214
+ travel_cost_per_km?: number | null;
23215
+ travel_cost_threshold_km?: number | null;
23216
+ travel_counts_as_work?: boolean;
23217
+ travel_hourly_rate?: number;
23218
+ travel_rate_per_hour?: number;
23219
+ travel_threshold_minutes?: number;
23220
+ updated_at?: string;
23221
+ weekend_always_212?: boolean;
23222
+ window_end?: string;
23223
+ window_start?: string;
23224
+ };
23225
+ Relationships: [];
23226
+ };
21851
23227
  carrier_shipping_rates: {
21852
23228
  Row: {
21853
23229
  carrier_id: string;
@@ -25901,6 +27277,42 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
25901
27277
  };
25902
27278
  Relationships: [];
25903
27279
  };
27280
+ facturen: {
27281
+ Row: {
27282
+ bedrag_incl_btw: number;
27283
+ created_at: string;
27284
+ datum: string;
27285
+ factuurnummer: string;
27286
+ id: string;
27287
+ klantnaam: string;
27288
+ status: string;
27289
+ updated_at: string;
27290
+ user_id: string;
27291
+ };
27292
+ Insert: {
27293
+ bedrag_incl_btw: number;
27294
+ created_at?: string;
27295
+ datum?: string;
27296
+ factuurnummer: string;
27297
+ id?: string;
27298
+ klantnaam: string;
27299
+ status?: string;
27300
+ updated_at?: string;
27301
+ user_id?: string;
27302
+ };
27303
+ Update: {
27304
+ bedrag_incl_btw?: number;
27305
+ created_at?: string;
27306
+ datum?: string;
27307
+ factuurnummer?: string;
27308
+ id?: string;
27309
+ klantnaam?: string;
27310
+ status?: string;
27311
+ updated_at?: string;
27312
+ user_id?: string;
27313
+ };
27314
+ Relationships: [];
27315
+ };
25904
27316
  floricode_connection_settings: {
25905
27317
  Row: {
25906
27318
  catalog_key: string | null;
@@ -28625,6 +30037,258 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
28625
30037
  };
28626
30038
  Relationships: [];
28627
30039
  };
30040
+ itk_offerte_events: {
30041
+ Row: {
30042
+ created_at: string;
30043
+ event_type: string;
30044
+ id: string;
30045
+ metadata: import("../integrations/supabase/types").Json;
30046
+ offerte_id: string;
30047
+ omschrijving: string | null;
30048
+ user_id: string | null;
30049
+ };
30050
+ Insert: {
30051
+ created_at?: string;
30052
+ event_type: string;
30053
+ id?: string;
30054
+ metadata?: import("../integrations/supabase/types").Json;
30055
+ offerte_id: string;
30056
+ omschrijving?: string | null;
30057
+ user_id?: string | null;
30058
+ };
30059
+ Update: {
30060
+ created_at?: string;
30061
+ event_type?: string;
30062
+ id?: string;
30063
+ metadata?: import("../integrations/supabase/types").Json;
30064
+ offerte_id?: string;
30065
+ omschrijving?: string | null;
30066
+ user_id?: string | null;
30067
+ };
30068
+ Relationships: [{
30069
+ foreignKeyName: "itk_offerte_events_offerte_id_fkey";
30070
+ columns: ["offerte_id"];
30071
+ isOneToOne: false;
30072
+ referencedRelation: "itk_offertes";
30073
+ referencedColumns: ["id"];
30074
+ }];
30075
+ };
30076
+ itk_offerte_regels: {
30077
+ Row: {
30078
+ created_at: string;
30079
+ id: string;
30080
+ line_total_cents: number;
30081
+ offerte_id: string;
30082
+ omschrijving: string;
30083
+ package_id: string | null;
30084
+ quantity: number;
30085
+ sort_order: number;
30086
+ source: string;
30087
+ unit_price_cents: number;
30088
+ updated_at: string;
30089
+ };
30090
+ Insert: {
30091
+ created_at?: string;
30092
+ id?: string;
30093
+ line_total_cents?: number;
30094
+ offerte_id: string;
30095
+ omschrijving?: string;
30096
+ package_id?: string | null;
30097
+ quantity?: number;
30098
+ sort_order?: number;
30099
+ source?: string;
30100
+ unit_price_cents?: number;
30101
+ updated_at?: string;
30102
+ };
30103
+ Update: {
30104
+ created_at?: string;
30105
+ id?: string;
30106
+ line_total_cents?: number;
30107
+ offerte_id?: string;
30108
+ omschrijving?: string;
30109
+ package_id?: string | null;
30110
+ quantity?: number;
30111
+ sort_order?: number;
30112
+ source?: string;
30113
+ unit_price_cents?: number;
30114
+ updated_at?: string;
30115
+ };
30116
+ Relationships: [{
30117
+ foreignKeyName: "itk_offerte_regels_offerte_id_fkey";
30118
+ columns: ["offerte_id"];
30119
+ isOneToOne: false;
30120
+ referencedRelation: "itk_offertes";
30121
+ referencedColumns: ["id"];
30122
+ }, {
30123
+ foreignKeyName: "itk_offerte_regels_package_id_fkey";
30124
+ columns: ["package_id"];
30125
+ isOneToOne: false;
30126
+ referencedRelation: "werkbon_packages";
30127
+ referencedColumns: ["id"];
30128
+ }];
30129
+ };
30130
+ itk_offerte_settings: {
30131
+ Row: {
30132
+ auto_convert_binnen_mandaat: boolean;
30133
+ created_at: string;
30134
+ default_geldigheid_dagen: number;
30135
+ default_vat_rate: number;
30136
+ id: string;
30137
+ singleton: boolean;
30138
+ updated_at: string;
30139
+ };
30140
+ Insert: {
30141
+ auto_convert_binnen_mandaat?: boolean;
30142
+ created_at?: string;
30143
+ default_geldigheid_dagen?: number;
30144
+ default_vat_rate?: number;
30145
+ id?: string;
30146
+ singleton?: boolean;
30147
+ updated_at?: string;
30148
+ };
30149
+ Update: {
30150
+ auto_convert_binnen_mandaat?: boolean;
30151
+ created_at?: string;
30152
+ default_geldigheid_dagen?: number;
30153
+ default_vat_rate?: number;
30154
+ id?: string;
30155
+ singleton?: boolean;
30156
+ updated_at?: string;
30157
+ };
30158
+ Relationships: [];
30159
+ };
30160
+ itk_offertes: {
30161
+ Row: {
30162
+ ai_generated: boolean;
30163
+ approved_at: string | null;
30164
+ binnen_mandaat: boolean;
30165
+ contact_id: string | null;
30166
+ converted_at: string | null;
30167
+ created_at: string;
30168
+ created_by: string | null;
30169
+ customer_id: string | null;
30170
+ follow_up_werkbon_id: string | null;
30171
+ id: string;
30172
+ jaar: number;
30173
+ mandaat_restant_cents: number;
30174
+ notities: string | null;
30175
+ offerte_number: string | null;
30176
+ omschrijving: string;
30177
+ rejected_at: string | null;
30178
+ sent_at: string | null;
30179
+ source_number: string | null;
30180
+ source_ref: string | null;
30181
+ source_type: string;
30182
+ status: string;
30183
+ subtotal_cents: number;
30184
+ total_cents: number;
30185
+ updated_at: string;
30186
+ valid_until: string | null;
30187
+ vat_cents: number;
30188
+ vat_rate: number;
30189
+ viewed_at: string | null;
30190
+ volgnummer: number | null;
30191
+ werkbon_id: string | null;
30192
+ work_location_id: string | null;
30193
+ };
30194
+ Insert: {
30195
+ ai_generated?: boolean;
30196
+ approved_at?: string | null;
30197
+ binnen_mandaat?: boolean;
30198
+ contact_id?: string | null;
30199
+ converted_at?: string | null;
30200
+ created_at?: string;
30201
+ created_by?: string | null;
30202
+ customer_id?: string | null;
30203
+ follow_up_werkbon_id?: string | null;
30204
+ id?: string;
30205
+ jaar?: number;
30206
+ mandaat_restant_cents?: number;
30207
+ notities?: string | null;
30208
+ offerte_number?: string | null;
30209
+ omschrijving?: string;
30210
+ rejected_at?: string | null;
30211
+ sent_at?: string | null;
30212
+ source_number?: string | null;
30213
+ source_ref?: string | null;
30214
+ source_type?: string;
30215
+ status?: string;
30216
+ subtotal_cents?: number;
30217
+ total_cents?: number;
30218
+ updated_at?: string;
30219
+ valid_until?: string | null;
30220
+ vat_cents?: number;
30221
+ vat_rate?: number;
30222
+ viewed_at?: string | null;
30223
+ volgnummer?: number | null;
30224
+ werkbon_id?: string | null;
30225
+ work_location_id?: string | null;
30226
+ };
30227
+ Update: {
30228
+ ai_generated?: boolean;
30229
+ approved_at?: string | null;
30230
+ binnen_mandaat?: boolean;
30231
+ contact_id?: string | null;
30232
+ converted_at?: string | null;
30233
+ created_at?: string;
30234
+ created_by?: string | null;
30235
+ customer_id?: string | null;
30236
+ follow_up_werkbon_id?: string | null;
30237
+ id?: string;
30238
+ jaar?: number;
30239
+ mandaat_restant_cents?: number;
30240
+ notities?: string | null;
30241
+ offerte_number?: string | null;
30242
+ omschrijving?: string;
30243
+ rejected_at?: string | null;
30244
+ sent_at?: string | null;
30245
+ source_number?: string | null;
30246
+ source_ref?: string | null;
30247
+ source_type?: string;
30248
+ status?: string;
30249
+ subtotal_cents?: number;
30250
+ total_cents?: number;
30251
+ updated_at?: string;
30252
+ valid_until?: string | null;
30253
+ vat_cents?: number;
30254
+ vat_rate?: number;
30255
+ viewed_at?: string | null;
30256
+ volgnummer?: number | null;
30257
+ werkbon_id?: string | null;
30258
+ work_location_id?: string | null;
30259
+ };
30260
+ Relationships: [{
30261
+ foreignKeyName: "itk_offertes_contact_id_fkey";
30262
+ columns: ["contact_id"];
30263
+ isOneToOne: false;
30264
+ referencedRelation: "itk_contact_persons";
30265
+ referencedColumns: ["id"];
30266
+ }, {
30267
+ foreignKeyName: "itk_offertes_customer_id_fkey";
30268
+ columns: ["customer_id"];
30269
+ isOneToOne: false;
30270
+ referencedRelation: "itk_customers";
30271
+ referencedColumns: ["id"];
30272
+ }, {
30273
+ foreignKeyName: "itk_offertes_follow_up_werkbon_id_fkey";
30274
+ columns: ["follow_up_werkbon_id"];
30275
+ isOneToOne: false;
30276
+ referencedRelation: "werkbonnen";
30277
+ referencedColumns: ["id"];
30278
+ }, {
30279
+ foreignKeyName: "itk_offertes_werkbon_id_fkey";
30280
+ columns: ["werkbon_id"];
30281
+ isOneToOne: false;
30282
+ referencedRelation: "werkbonnen";
30283
+ referencedColumns: ["id"];
30284
+ }, {
30285
+ foreignKeyName: "itk_offertes_work_location_id_fkey";
30286
+ columns: ["work_location_id"];
30287
+ isOneToOne: false;
30288
+ referencedRelation: "itk_work_locations";
30289
+ referencedColumns: ["id"];
30290
+ }];
30291
+ };
28628
30292
  itk_work_locations: {
28629
30293
  Row: {
28630
30294
  city: string | null;
@@ -28742,7 +30406,6 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
28742
30406
  start_date: string;
28743
30407
  start_time: string | null;
28744
30408
  status: string;
28745
- tenant_id: string;
28746
30409
  updated_at: string;
28747
30410
  user_id: string;
28748
30411
  };
@@ -28760,7 +30423,6 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
28760
30423
  start_date: string;
28761
30424
  start_time?: string | null;
28762
30425
  status?: string;
28763
- tenant_id?: string;
28764
30426
  updated_at?: string;
28765
30427
  user_id: string;
28766
30428
  };
@@ -28778,7 +30440,6 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
28778
30440
  start_date?: string;
28779
30441
  start_time?: string | null;
28780
30442
  status?: string;
28781
- tenant_id?: string;
28782
30443
  updated_at?: string;
28783
30444
  user_id?: string;
28784
30445
  };
@@ -28786,13 +30447,13 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
28786
30447
  foreignKeyName: "leave_requests_monteur_id_fkey";
28787
30448
  columns: ["monteur_id"];
28788
30449
  isOneToOne: false;
28789
- referencedRelation: "monteurs";
30450
+ referencedRelation: "profiles";
28790
30451
  referencedColumns: ["id"];
28791
30452
  }, {
28792
30453
  foreignKeyName: "leave_requests_user_id_fkey";
28793
30454
  columns: ["user_id"];
28794
30455
  isOneToOne: false;
28795
- referencedRelation: "monteurs";
30456
+ referencedRelation: "profiles";
28796
30457
  referencedColumns: ["id"];
28797
30458
  }];
28798
30459
  };
@@ -29660,6 +31321,45 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
29660
31321
  };
29661
31322
  Relationships: [];
29662
31323
  };
31324
+ logistics_plan_queue: {
31325
+ Row: {
31326
+ attempts: number;
31327
+ claimed_at: string | null;
31328
+ enqueued_at: string;
31329
+ error: string | null;
31330
+ id: string;
31331
+ next_attempt_at: string;
31332
+ order_id: string;
31333
+ reason: string;
31334
+ status: string;
31335
+ updated_at: string;
31336
+ };
31337
+ Insert: {
31338
+ attempts?: number;
31339
+ claimed_at?: string | null;
31340
+ enqueued_at?: string;
31341
+ error?: string | null;
31342
+ id?: string;
31343
+ next_attempt_at?: string;
31344
+ order_id: string;
31345
+ reason?: string;
31346
+ status?: string;
31347
+ updated_at?: string;
31348
+ };
31349
+ Update: {
31350
+ attempts?: number;
31351
+ claimed_at?: string | null;
31352
+ enqueued_at?: string;
31353
+ error?: string | null;
31354
+ id?: string;
31355
+ next_attempt_at?: string;
31356
+ order_id?: string;
31357
+ reason?: string;
31358
+ status?: string;
31359
+ updated_at?: string;
31360
+ };
31361
+ Relationships: [];
31362
+ };
29663
31363
  logistics_plan_runs: {
29664
31364
  Row: {
29665
31365
  created_at: string;
@@ -29735,6 +31435,24 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
29735
31435
  referencedColumns: ["id"];
29736
31436
  }];
29737
31437
  };
31438
+ logistics_plan_settings: {
31439
+ Row: {
31440
+ key: string;
31441
+ updated_at: string;
31442
+ value: string;
31443
+ };
31444
+ Insert: {
31445
+ key: string;
31446
+ updated_at?: string;
31447
+ value: string;
31448
+ };
31449
+ Update: {
31450
+ key?: string;
31451
+ updated_at?: string;
31452
+ value?: string;
31453
+ };
31454
+ Relationships: [];
31455
+ };
29738
31456
  logistics_rebuffer_state: {
29739
31457
  Row: {
29740
31458
  created_at: string;
@@ -30890,6 +32608,147 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
30890
32608
  };
30891
32609
  Relationships: [];
30892
32610
  };
32611
+ material_usage: {
32612
+ Row: {
32613
+ created_at: string;
32614
+ id: string;
32615
+ material_name: string;
32616
+ monteur_id: string | null;
32617
+ price_at_time: number;
32618
+ quantity_used: number;
32619
+ updated_at: string;
32620
+ van_inventory_id: string | null;
32621
+ work_order_id: string;
32622
+ };
32623
+ Insert: {
32624
+ created_at?: string;
32625
+ id?: string;
32626
+ material_name: string;
32627
+ monteur_id?: string | null;
32628
+ price_at_time?: number;
32629
+ quantity_used?: number;
32630
+ updated_at?: string;
32631
+ van_inventory_id?: string | null;
32632
+ work_order_id: string;
32633
+ };
32634
+ Update: {
32635
+ created_at?: string;
32636
+ id?: string;
32637
+ material_name?: string;
32638
+ monteur_id?: string | null;
32639
+ price_at_time?: number;
32640
+ quantity_used?: number;
32641
+ updated_at?: string;
32642
+ van_inventory_id?: string | null;
32643
+ work_order_id?: string;
32644
+ };
32645
+ Relationships: [{
32646
+ foreignKeyName: "material_usage_monteur_id_fkey";
32647
+ columns: ["monteur_id"];
32648
+ isOneToOne: false;
32649
+ referencedRelation: "profiles";
32650
+ referencedColumns: ["id"];
32651
+ }, {
32652
+ foreignKeyName: "material_usage_van_inventory_id_fkey";
32653
+ columns: ["van_inventory_id"];
32654
+ isOneToOne: false;
32655
+ referencedRelation: "van_inventories";
32656
+ referencedColumns: ["id"];
32657
+ }, {
32658
+ foreignKeyName: "material_usage_work_order_id_fkey";
32659
+ columns: ["work_order_id"];
32660
+ isOneToOne: false;
32661
+ referencedRelation: "work_orders";
32662
+ referencedColumns: ["id"];
32663
+ }];
32664
+ };
32665
+ medewerker_details: {
32666
+ Row: {
32667
+ color: string | null;
32668
+ created_at: string;
32669
+ hours_fri: number | null;
32670
+ hours_mon: number | null;
32671
+ hours_thu: number | null;
32672
+ hours_tue: number | null;
32673
+ hours_wed: number | null;
32674
+ id: string;
32675
+ is_active: boolean;
32676
+ leave_balance_hours: number;
32677
+ persnr: string | null;
32678
+ phone: string | null;
32679
+ profile_id: string;
32680
+ updated_at: string;
32681
+ };
32682
+ Insert: {
32683
+ color?: string | null;
32684
+ created_at?: string;
32685
+ hours_fri?: number | null;
32686
+ hours_mon?: number | null;
32687
+ hours_thu?: number | null;
32688
+ hours_tue?: number | null;
32689
+ hours_wed?: number | null;
32690
+ id?: string;
32691
+ is_active?: boolean;
32692
+ leave_balance_hours?: number;
32693
+ persnr?: string | null;
32694
+ phone?: string | null;
32695
+ profile_id: string;
32696
+ updated_at?: string;
32697
+ };
32698
+ Update: {
32699
+ color?: string | null;
32700
+ created_at?: string;
32701
+ hours_fri?: number | null;
32702
+ hours_mon?: number | null;
32703
+ hours_thu?: number | null;
32704
+ hours_tue?: number | null;
32705
+ hours_wed?: number | null;
32706
+ id?: string;
32707
+ is_active?: boolean;
32708
+ leave_balance_hours?: number;
32709
+ persnr?: string | null;
32710
+ phone?: string | null;
32711
+ profile_id?: string;
32712
+ updated_at?: string;
32713
+ };
32714
+ Relationships: [{
32715
+ foreignKeyName: "medewerker_details_profile_id_fkey";
32716
+ columns: ["profile_id"];
32717
+ isOneToOne: true;
32718
+ referencedRelation: "profiles";
32719
+ referencedColumns: ["id"];
32720
+ }];
32721
+ };
32722
+ module_features: {
32723
+ Row: {
32724
+ created_at: string;
32725
+ feature_id: string;
32726
+ id: string;
32727
+ is_active: boolean;
32728
+ last_seen_at: string;
32729
+ module_id: string;
32730
+ name: string;
32731
+ };
32732
+ Insert: {
32733
+ created_at?: string;
32734
+ feature_id: string;
32735
+ id?: string;
32736
+ is_active?: boolean;
32737
+ last_seen_at?: string;
32738
+ module_id: string;
32739
+ name: string;
32740
+ };
32741
+ Update: {
32742
+ created_at?: string;
32743
+ feature_id?: string;
32744
+ id?: string;
32745
+ is_active?: boolean;
32746
+ last_seen_at?: string;
32747
+ module_id?: string;
32748
+ name?: string;
32749
+ };
32750
+ Relationships: [];
32751
+ };
30893
32752
  module_permissions: {
30894
32753
  Row: {
30895
32754
  created_at: string;
@@ -30920,6 +32779,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
30920
32779
  module_registry: {
30921
32780
  Row: {
30922
32781
  created_at: string;
32782
+ enforce: boolean;
30923
32783
  is_active: boolean;
30924
32784
  last_seen_at: string;
30925
32785
  module_id: string;
@@ -30929,6 +32789,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
30929
32789
  };
30930
32790
  Insert: {
30931
32791
  created_at?: string;
32792
+ enforce?: boolean;
30932
32793
  is_active?: boolean;
30933
32794
  last_seen_at?: string;
30934
32795
  module_id: string;
@@ -30938,6 +32799,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
30938
32799
  };
30939
32800
  Update: {
30940
32801
  created_at?: string;
32802
+ enforce?: boolean;
30941
32803
  is_active?: boolean;
30942
32804
  last_seen_at?: string;
30943
32805
  module_id?: string;
@@ -30998,63 +32860,6 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
30998
32860
  };
30999
32861
  Relationships: [];
31000
32862
  };
31001
- monteurs: {
31002
- Row: {
31003
- avatar_url: string | null;
31004
- color: string | null;
31005
- created_at: string;
31006
- email: string | null;
31007
- id: string;
31008
- is_active: boolean;
31009
- leave_balance_hours: number;
31010
- name: string;
31011
- persnr: number | null;
31012
- phone: string | null;
31013
- role: string;
31014
- tenant_id: string;
31015
- updated_at: string;
31016
- user_id: string | null;
31017
- };
31018
- Insert: {
31019
- avatar_url?: string | null;
31020
- color?: string | null;
31021
- created_at?: string;
31022
- email?: string | null;
31023
- id?: string;
31024
- is_active?: boolean;
31025
- leave_balance_hours?: number;
31026
- name: string;
31027
- persnr?: number | null;
31028
- phone?: string | null;
31029
- role?: string;
31030
- tenant_id: string;
31031
- updated_at?: string;
31032
- user_id?: string | null;
31033
- };
31034
- Update: {
31035
- avatar_url?: string | null;
31036
- color?: string | null;
31037
- created_at?: string;
31038
- email?: string | null;
31039
- id?: string;
31040
- is_active?: boolean;
31041
- leave_balance_hours?: number;
31042
- name?: string;
31043
- persnr?: number | null;
31044
- phone?: string | null;
31045
- role?: string;
31046
- tenant_id?: string;
31047
- updated_at?: string;
31048
- user_id?: string | null;
31049
- };
31050
- Relationships: [{
31051
- foreignKeyName: "monteurs_tenant_id_fkey";
31052
- columns: ["tenant_id"];
31053
- isOneToOne: false;
31054
- referencedRelation: "tenants";
31055
- referencedColumns: ["id"];
31056
- }];
31057
- };
31058
32863
  nmbrs_component_mapping: {
31059
32864
  Row: {
31060
32865
  created_at: string;
@@ -31125,13 +32930,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
31125
32930
  nmbrs_employee_number?: string;
31126
32931
  updated_at?: string;
31127
32932
  };
31128
- Relationships: [{
31129
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
31130
- columns: ["monteur_id"];
31131
- isOneToOne: true;
31132
- referencedRelation: "monteurs";
31133
- referencedColumns: ["id"];
31134
- }];
32933
+ Relationships: [];
31135
32934
  };
31136
32935
  nmbrs_export_lines: {
31137
32936
  Row: {
@@ -31180,12 +32979,6 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
31180
32979
  wage_code?: string;
31181
32980
  };
31182
32981
  Relationships: [{
31183
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
31184
- columns: ["monteur_id"];
31185
- isOneToOne: false;
31186
- referencedRelation: "monteurs";
31187
- referencedColumns: ["id"];
31188
- }, {
31189
32982
  foreignKeyName: "nmbrs_export_lines_run_id_fkey";
31190
32983
  columns: ["run_id"];
31191
32984
  isOneToOne: false;
@@ -32013,6 +33806,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
32013
33806
  error_message: string | null;
32014
33807
  id: string;
32015
33808
  invoice_number: string | null;
33809
+ next_attempt_at: string;
32016
33810
  order_id: string;
32017
33811
  processed_at: string | null;
32018
33812
  status: string;
@@ -32024,6 +33818,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
32024
33818
  error_message?: string | null;
32025
33819
  id?: string;
32026
33820
  invoice_number?: string | null;
33821
+ next_attempt_at?: string;
32027
33822
  order_id: string;
32028
33823
  processed_at?: string | null;
32029
33824
  status?: string;
@@ -32035,6 +33830,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
32035
33830
  error_message?: string | null;
32036
33831
  id?: string;
32037
33832
  invoice_number?: string | null;
33833
+ next_attempt_at?: string;
32038
33834
  order_id?: string;
32039
33835
  processed_at?: string | null;
32040
33836
  status?: string;
@@ -32216,6 +34012,8 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
32216
34012
  orders: {
32217
34013
  Row: {
32218
34014
  buffer_id: string | null;
34015
+ cancel_reason: string | null;
34016
+ cancelled_at: string | null;
32219
34017
  created_at: string;
32220
34018
  custom_fields: import("../integrations/supabase/types").Json;
32221
34019
  customer_id: string | null;
@@ -32238,6 +34036,8 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
32238
34036
  };
32239
34037
  Insert: {
32240
34038
  buffer_id?: string | null;
34039
+ cancel_reason?: string | null;
34040
+ cancelled_at?: string | null;
32241
34041
  created_at?: string;
32242
34042
  custom_fields?: import("../integrations/supabase/types").Json;
32243
34043
  customer_id?: string | null;
@@ -32260,6 +34060,8 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
32260
34060
  };
32261
34061
  Update: {
32262
34062
  buffer_id?: string | null;
34063
+ cancel_reason?: string | null;
34064
+ cancelled_at?: string | null;
32263
34065
  created_at?: string;
32264
34066
  custom_fields?: import("../integrations/supabase/types").Json;
32265
34067
  customer_id?: string | null;
@@ -33573,6 +35375,9 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
33573
35375
  created_at: string;
33574
35376
  id: string;
33575
35377
  laatst_gezien: string;
35378
+ laatste_fout: string | null;
35379
+ laatste_request_id: number | null;
35380
+ mislukte_posts: number;
33576
35381
  tick_sleutel: string;
33577
35382
  updated_at: string;
33578
35383
  };
@@ -33582,6 +35387,9 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
33582
35387
  created_at?: string;
33583
35388
  id?: string;
33584
35389
  laatst_gezien?: string;
35390
+ laatste_fout?: string | null;
35391
+ laatste_request_id?: number | null;
35392
+ mislukte_posts?: number;
33585
35393
  tick_sleutel?: string;
33586
35394
  updated_at?: string;
33587
35395
  };
@@ -33591,6 +35399,9 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
33591
35399
  created_at?: string;
33592
35400
  id?: string;
33593
35401
  laatst_gezien?: string;
35402
+ laatste_fout?: string | null;
35403
+ laatste_request_id?: number | null;
35404
+ mislukte_posts?: number;
33594
35405
  tick_sleutel?: string;
33595
35406
  updated_at?: string;
33596
35407
  };
@@ -34313,6 +36124,66 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
34313
36124
  };
34314
36125
  Relationships: [];
34315
36126
  };
36127
+ profile_modules: {
36128
+ Row: {
36129
+ created_at: string;
36130
+ id: string;
36131
+ module_id: string;
36132
+ profile_id: string;
36133
+ };
36134
+ Insert: {
36135
+ created_at?: string;
36136
+ id?: string;
36137
+ module_id: string;
36138
+ profile_id: string;
36139
+ };
36140
+ Update: {
36141
+ created_at?: string;
36142
+ id?: string;
36143
+ module_id?: string;
36144
+ profile_id?: string;
36145
+ };
36146
+ Relationships: [{
36147
+ foreignKeyName: "profile_modules_profile_id_fkey";
36148
+ columns: ["profile_id"];
36149
+ isOneToOne: false;
36150
+ referencedRelation: "profiles_org";
36151
+ referencedColumns: ["id"];
36152
+ }];
36153
+ };
36154
+ profile_roles: {
36155
+ Row: {
36156
+ created_at: string;
36157
+ id: string;
36158
+ profile_id: string;
36159
+ role_id: string;
36160
+ };
36161
+ Insert: {
36162
+ created_at?: string;
36163
+ id?: string;
36164
+ profile_id: string;
36165
+ role_id: string;
36166
+ };
36167
+ Update: {
36168
+ created_at?: string;
36169
+ id?: string;
36170
+ profile_id?: string;
36171
+ role_id?: string;
36172
+ };
36173
+ Relationships: [{
36174
+ foreignKeyName: "profile_roles_profile_id_fkey";
36175
+ columns: ["profile_id"];
36176
+ isOneToOne: false;
36177
+ referencedRelation: "profiles_org";
36178
+ referencedColumns: ["id"];
36179
+ }, {
36180
+ foreignKeyName: "profile_roles_role_id_fkey";
36181
+ columns: ["role_id"];
36182
+ isOneToOne: false;
36183
+ referencedRelation: "roles";
36184
+ referencedColumns: ["id"];
36185
+ }];
36186
+ };
34316
36187
  profiles: {
34317
36188
  Row: {
34318
36189
  address: string | null;
@@ -34358,6 +36229,39 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
34358
36229
  referencedColumns: ["id"];
34359
36230
  }];
34360
36231
  };
36232
+ profiles_org: {
36233
+ Row: {
36234
+ created_at: string;
36235
+ id: string;
36236
+ is_default: boolean;
36237
+ name: string;
36238
+ tenant_id: string | null;
36239
+ updated_at: string;
36240
+ };
36241
+ Insert: {
36242
+ created_at?: string;
36243
+ id?: string;
36244
+ is_default?: boolean;
36245
+ name: string;
36246
+ tenant_id?: string | null;
36247
+ updated_at?: string;
36248
+ };
36249
+ Update: {
36250
+ created_at?: string;
36251
+ id?: string;
36252
+ is_default?: boolean;
36253
+ name?: string;
36254
+ tenant_id?: string | null;
36255
+ updated_at?: string;
36256
+ };
36257
+ Relationships: [{
36258
+ foreignKeyName: "profiles_org_tenant_id_fkey";
36259
+ columns: ["tenant_id"];
36260
+ isOneToOne: false;
36261
+ referencedRelation: "tenants";
36262
+ referencedColumns: ["id"];
36263
+ }];
36264
+ };
34361
36265
  projects: {
34362
36266
  Row: {
34363
36267
  contact_name: string | null;
@@ -35099,6 +37003,96 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
35099
37003
  referencedColumns: ["id"];
35100
37004
  }];
35101
37005
  };
37006
+ role_assignments: {
37007
+ Row: {
37008
+ created_at: string;
37009
+ id: string;
37010
+ role_id: string;
37011
+ user_id: string;
37012
+ };
37013
+ Insert: {
37014
+ created_at?: string;
37015
+ id?: string;
37016
+ role_id: string;
37017
+ user_id: string;
37018
+ };
37019
+ Update: {
37020
+ created_at?: string;
37021
+ id?: string;
37022
+ role_id?: string;
37023
+ user_id?: string;
37024
+ };
37025
+ Relationships: [{
37026
+ foreignKeyName: "role_assignments_role_id_fkey";
37027
+ columns: ["role_id"];
37028
+ isOneToOne: false;
37029
+ referencedRelation: "roles";
37030
+ referencedColumns: ["id"];
37031
+ }];
37032
+ };
37033
+ role_permissions: {
37034
+ Row: {
37035
+ can_edit: boolean;
37036
+ can_view: boolean;
37037
+ feature_id: string;
37038
+ id: string;
37039
+ module_id: string;
37040
+ role_id: string;
37041
+ updated_at: string;
37042
+ };
37043
+ Insert: {
37044
+ can_edit?: boolean;
37045
+ can_view?: boolean;
37046
+ feature_id?: string;
37047
+ id?: string;
37048
+ module_id: string;
37049
+ role_id: string;
37050
+ updated_at?: string;
37051
+ };
37052
+ Update: {
37053
+ can_edit?: boolean;
37054
+ can_view?: boolean;
37055
+ feature_id?: string;
37056
+ id?: string;
37057
+ module_id?: string;
37058
+ role_id?: string;
37059
+ updated_at?: string;
37060
+ };
37061
+ Relationships: [{
37062
+ foreignKeyName: "role_permissions_role_id_fkey";
37063
+ columns: ["role_id"];
37064
+ isOneToOne: false;
37065
+ referencedRelation: "roles";
37066
+ referencedColumns: ["id"];
37067
+ }];
37068
+ };
37069
+ roles: {
37070
+ Row: {
37071
+ created_at: string;
37072
+ id: string;
37073
+ is_protected: boolean;
37074
+ key: string;
37075
+ name: string;
37076
+ updated_at: string;
37077
+ };
37078
+ Insert: {
37079
+ created_at?: string;
37080
+ id?: string;
37081
+ is_protected?: boolean;
37082
+ key: string;
37083
+ name: string;
37084
+ updated_at?: string;
37085
+ };
37086
+ Update: {
37087
+ created_at?: string;
37088
+ id?: string;
37089
+ is_protected?: boolean;
37090
+ key?: string;
37091
+ name?: string;
37092
+ updated_at?: string;
37093
+ };
37094
+ Relationships: [];
37095
+ };
35102
37096
  rooms: {
35103
37097
  Row: {
35104
37098
  capacity: number;
@@ -35442,6 +37436,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
35442
37436
  type: string;
35443
37437
  updated_at: string;
35444
37438
  vereist_medewerker: boolean;
37439
+ werkplek: string | null;
35445
37440
  };
35446
37441
  Insert: {
35447
37442
  actief?: boolean;
@@ -35455,6 +37450,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
35455
37450
  type?: string;
35456
37451
  updated_at?: string;
35457
37452
  vereist_medewerker?: boolean;
37453
+ werkplek?: string | null;
35458
37454
  };
35459
37455
  Update: {
35460
37456
  actief?: boolean;
@@ -35468,9 +37464,46 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
35468
37464
  type?: string;
35469
37465
  updated_at?: string;
35470
37466
  vereist_medewerker?: boolean;
37467
+ werkplek?: string | null;
35471
37468
  };
35472
37469
  Relationships: [];
35473
37470
  };
37471
+ sick_periods: {
37472
+ Row: {
37473
+ created_at: string;
37474
+ employee_id: string;
37475
+ end_date: string | null;
37476
+ id: string;
37477
+ notes: string | null;
37478
+ start_date: string;
37479
+ updated_at: string;
37480
+ };
37481
+ Insert: {
37482
+ created_at?: string;
37483
+ employee_id: string;
37484
+ end_date?: string | null;
37485
+ id?: string;
37486
+ notes?: string | null;
37487
+ start_date: string;
37488
+ updated_at?: string;
37489
+ };
37490
+ Update: {
37491
+ created_at?: string;
37492
+ employee_id?: string;
37493
+ end_date?: string | null;
37494
+ id?: string;
37495
+ notes?: string | null;
37496
+ start_date?: string;
37497
+ updated_at?: string;
37498
+ };
37499
+ Relationships: [{
37500
+ foreignKeyName: "sick_periods_employee_id_fkey";
37501
+ columns: ["employee_id"];
37502
+ isOneToOne: false;
37503
+ referencedRelation: "profiles";
37504
+ referencedColumns: ["id"];
37505
+ }];
37506
+ };
35474
37507
  sidebar_config: {
35475
37508
  Row: {
35476
37509
  id: string;
@@ -35768,6 +37801,54 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
35768
37801
  };
35769
37802
  Relationships: [];
35770
37803
  };
37804
+ time_compensation_entries: {
37805
+ Row: {
37806
+ created_at: string;
37807
+ employee_id: string;
37808
+ entry_date: string;
37809
+ id: string;
37810
+ km: number;
37811
+ meal_allowance: number;
37812
+ notes: string | null;
37813
+ standby_evening: number;
37814
+ standby_weekend: number;
37815
+ tvt_change: number;
37816
+ updated_at: string;
37817
+ };
37818
+ Insert: {
37819
+ created_at?: string;
37820
+ employee_id: string;
37821
+ entry_date: string;
37822
+ id?: string;
37823
+ km?: number;
37824
+ meal_allowance?: number;
37825
+ notes?: string | null;
37826
+ standby_evening?: number;
37827
+ standby_weekend?: number;
37828
+ tvt_change?: number;
37829
+ updated_at?: string;
37830
+ };
37831
+ Update: {
37832
+ created_at?: string;
37833
+ employee_id?: string;
37834
+ entry_date?: string;
37835
+ id?: string;
37836
+ km?: number;
37837
+ meal_allowance?: number;
37838
+ notes?: string | null;
37839
+ standby_evening?: number;
37840
+ standby_weekend?: number;
37841
+ tvt_change?: number;
37842
+ updated_at?: string;
37843
+ };
37844
+ Relationships: [{
37845
+ foreignKeyName: "time_compensation_entries_employee_id_fkey";
37846
+ columns: ["employee_id"];
37847
+ isOneToOne: false;
37848
+ referencedRelation: "profiles";
37849
+ referencedColumns: ["id"];
37850
+ }];
37851
+ };
35771
37852
  time_entries: {
35772
37853
  Row: {
35773
37854
  created_at: string;
@@ -35802,65 +37883,170 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
35802
37883
  undertime?: number;
35803
37884
  updated_at?: string;
35804
37885
  };
37886
+ Relationships: [];
37887
+ };
37888
+ time_log_week_approvals: {
37889
+ Row: {
37890
+ approved_at: string | null;
37891
+ approved_by: string | null;
37892
+ created_at: string;
37893
+ employee_id: string;
37894
+ id: string;
37895
+ locked: boolean;
37896
+ notes: string | null;
37897
+ status: string;
37898
+ submitted_at: string | null;
37899
+ updated_at: string;
37900
+ week_start: string;
37901
+ };
37902
+ Insert: {
37903
+ approved_at?: string | null;
37904
+ approved_by?: string | null;
37905
+ created_at?: string;
37906
+ employee_id: string;
37907
+ id?: string;
37908
+ locked?: boolean;
37909
+ notes?: string | null;
37910
+ status?: string;
37911
+ submitted_at?: string | null;
37912
+ updated_at?: string;
37913
+ week_start: string;
37914
+ };
37915
+ Update: {
37916
+ approved_at?: string | null;
37917
+ approved_by?: string | null;
37918
+ created_at?: string;
37919
+ employee_id?: string;
37920
+ id?: string;
37921
+ locked?: boolean;
37922
+ notes?: string | null;
37923
+ status?: string;
37924
+ submitted_at?: string | null;
37925
+ updated_at?: string;
37926
+ week_start?: string;
37927
+ };
35805
37928
  Relationships: [{
35806
- foreignKeyName: "time_entries_employee_id_fkey";
37929
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
35807
37930
  columns: ["employee_id"];
35808
37931
  isOneToOne: false;
35809
- referencedRelation: "monteurs";
37932
+ referencedRelation: "profiles";
35810
37933
  referencedColumns: ["id"];
35811
37934
  }];
35812
37935
  };
35813
37936
  time_logs: {
35814
37937
  Row: {
37938
+ auto_stop_reason: string | null;
37939
+ auto_stopped: boolean;
35815
37940
  created_at: string;
37941
+ current_latitude: number | null;
37942
+ current_longitude: number | null;
37943
+ current_position_updated_at: string | null;
35816
37944
  employee_id: string;
37945
+ end_latitude: number | null;
37946
+ end_longitude: number | null;
35817
37947
  end_time: string | null;
37948
+ eta_distance_km: number | null;
37949
+ eta_minutes: number | null;
37950
+ eta_updated_at: string | null;
37951
+ hour_category: string | null;
35818
37952
  id: string;
37953
+ last_reminder_at: string | null;
35819
37954
  notes: string | null;
35820
37955
  overtime_hours: number;
35821
37956
  overtime_type: string | null;
35822
37957
  regular_hours: number;
37958
+ reminder_count: number;
37959
+ requires_review: boolean;
37960
+ start_latitude: number | null;
37961
+ start_longitude: number | null;
35823
37962
  start_time: string;
35824
37963
  travel_cost: number | null;
35825
37964
  travel_distance_km: number | null;
37965
+ travel_duration_min: number | null;
37966
+ travel_time_minutes: number | null;
35826
37967
  type: string;
35827
37968
  updated_at: string;
37969
+ work_order_id: string | null;
35828
37970
  };
35829
37971
  Insert: {
37972
+ auto_stop_reason?: string | null;
37973
+ auto_stopped?: boolean;
35830
37974
  created_at?: string;
37975
+ current_latitude?: number | null;
37976
+ current_longitude?: number | null;
37977
+ current_position_updated_at?: string | null;
35831
37978
  employee_id: string;
37979
+ end_latitude?: number | null;
37980
+ end_longitude?: number | null;
35832
37981
  end_time?: string | null;
37982
+ eta_distance_km?: number | null;
37983
+ eta_minutes?: number | null;
37984
+ eta_updated_at?: string | null;
37985
+ hour_category?: string | null;
35833
37986
  id?: string;
37987
+ last_reminder_at?: string | null;
35834
37988
  notes?: string | null;
35835
37989
  overtime_hours?: number;
35836
37990
  overtime_type?: string | null;
35837
37991
  regular_hours?: number;
37992
+ reminder_count?: number;
37993
+ requires_review?: boolean;
37994
+ start_latitude?: number | null;
37995
+ start_longitude?: number | null;
35838
37996
  start_time?: string;
35839
37997
  travel_cost?: number | null;
35840
37998
  travel_distance_km?: number | null;
37999
+ travel_duration_min?: number | null;
38000
+ travel_time_minutes?: number | null;
35841
38001
  type: string;
35842
38002
  updated_at?: string;
38003
+ work_order_id?: string | null;
35843
38004
  };
35844
38005
  Update: {
38006
+ auto_stop_reason?: string | null;
38007
+ auto_stopped?: boolean;
35845
38008
  created_at?: string;
38009
+ current_latitude?: number | null;
38010
+ current_longitude?: number | null;
38011
+ current_position_updated_at?: string | null;
35846
38012
  employee_id?: string;
38013
+ end_latitude?: number | null;
38014
+ end_longitude?: number | null;
35847
38015
  end_time?: string | null;
38016
+ eta_distance_km?: number | null;
38017
+ eta_minutes?: number | null;
38018
+ eta_updated_at?: string | null;
38019
+ hour_category?: string | null;
35848
38020
  id?: string;
38021
+ last_reminder_at?: string | null;
35849
38022
  notes?: string | null;
35850
38023
  overtime_hours?: number;
35851
38024
  overtime_type?: string | null;
35852
38025
  regular_hours?: number;
38026
+ reminder_count?: number;
38027
+ requires_review?: boolean;
38028
+ start_latitude?: number | null;
38029
+ start_longitude?: number | null;
35853
38030
  start_time?: string;
35854
38031
  travel_cost?: number | null;
35855
38032
  travel_distance_km?: number | null;
38033
+ travel_duration_min?: number | null;
38034
+ travel_time_minutes?: number | null;
35856
38035
  type?: string;
35857
38036
  updated_at?: string;
38037
+ work_order_id?: string | null;
35858
38038
  };
35859
38039
  Relationships: [{
35860
38040
  foreignKeyName: "time_logs_employee_id_fkey";
35861
38041
  columns: ["employee_id"];
35862
38042
  isOneToOne: false;
35863
- referencedRelation: "monteurs";
38043
+ referencedRelation: "profiles";
38044
+ referencedColumns: ["id"];
38045
+ }, {
38046
+ foreignKeyName: "time_logs_work_order_id_fkey";
38047
+ columns: ["work_order_id"];
38048
+ isOneToOne: false;
38049
+ referencedRelation: "work_orders";
35864
38050
  referencedColumns: ["id"];
35865
38051
  }];
35866
38052
  };
@@ -35899,7 +38085,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
35899
38085
  foreignKeyName: "time_off_entries_employee_id_fkey";
35900
38086
  columns: ["employee_id"];
35901
38087
  isOneToOne: false;
35902
- referencedRelation: "monteurs";
38088
+ referencedRelation: "profiles";
35903
38089
  referencedColumns: ["id"];
35904
38090
  }];
35905
38091
  };
@@ -36209,6 +38395,39 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
36209
38395
  };
36210
38396
  Relationships: [];
36211
38397
  };
38398
+ twinfield_cron_locks: {
38399
+ Row: {
38400
+ created_at: string;
38401
+ heartbeat_at: string;
38402
+ job_name: string;
38403
+ last_error: string | null;
38404
+ last_finished_at: string | null;
38405
+ locked_at: string;
38406
+ run_id: string;
38407
+ updated_at: string;
38408
+ };
38409
+ Insert: {
38410
+ created_at?: string;
38411
+ heartbeat_at?: string;
38412
+ job_name: string;
38413
+ last_error?: string | null;
38414
+ last_finished_at?: string | null;
38415
+ locked_at?: string;
38416
+ run_id?: string;
38417
+ updated_at?: string;
38418
+ };
38419
+ Update: {
38420
+ created_at?: string;
38421
+ heartbeat_at?: string;
38422
+ job_name?: string;
38423
+ last_error?: string | null;
38424
+ last_finished_at?: string | null;
38425
+ locked_at?: string;
38426
+ run_id?: string;
38427
+ updated_at?: string;
38428
+ };
38429
+ Relationships: [];
38430
+ };
36212
38431
  twinfield_customers: {
36213
38432
  Row: {
36214
38433
  address: string | null;
@@ -36809,6 +39028,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
36809
39028
  twinfield_push_queue: {
36810
39029
  Row: {
36811
39030
  action: string;
39031
+ attempt_started_at: string | null;
36812
39032
  attempts: number;
36813
39033
  connection_id: string | null;
36814
39034
  created_at: string;
@@ -36825,6 +39045,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
36825
39045
  };
36826
39046
  Insert: {
36827
39047
  action?: string;
39048
+ attempt_started_at?: string | null;
36828
39049
  attempts?: number;
36829
39050
  connection_id?: string | null;
36830
39051
  created_at?: string;
@@ -36841,6 +39062,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
36841
39062
  };
36842
39063
  Update: {
36843
39064
  action?: string;
39065
+ attempt_started_at?: string | null;
36844
39066
  attempts?: number;
36845
39067
  connection_id?: string | null;
36846
39068
  created_at?: string;
@@ -37038,13 +39260,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
37038
39260
  workday_end?: string | null;
37039
39261
  workday_start?: string | null;
37040
39262
  };
37041
- Relationships: [{
37042
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
37043
- columns: ["monteur_id"];
37044
- isOneToOne: true;
37045
- referencedRelation: "monteurs";
37046
- referencedColumns: ["id"];
37047
- }];
39263
+ Relationships: [];
37048
39264
  };
37049
39265
  uren_entries: {
37050
39266
  Row: {
@@ -37090,12 +39306,6 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
37090
39306
  werkbon_id?: string | null;
37091
39307
  };
37092
39308
  Relationships: [{
37093
- foreignKeyName: "uren_entries_monteur_id_fkey";
37094
- columns: ["monteur_id"];
37095
- isOneToOne: false;
37096
- referencedRelation: "monteurs";
37097
- referencedColumns: ["id"];
37098
- }, {
37099
39309
  foreignKeyName: "uren_entries_werkbon_id_fkey";
37100
39310
  columns: ["werkbon_id"];
37101
39311
  isOneToOne: false;
@@ -37563,17 +39773,12 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
37563
39773
  submitted_at?: string | null;
37564
39774
  updated_at?: string;
37565
39775
  };
37566
- Relationships: [{
37567
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
37568
- columns: ["monteur_id"];
37569
- isOneToOne: false;
37570
- referencedRelation: "monteurs";
37571
- referencedColumns: ["id"];
37572
- }];
39776
+ Relationships: [];
37573
39777
  };
37574
39778
  user_module_permissions: {
37575
39779
  Row: {
37576
39780
  created_at: string;
39781
+ feature_id: string;
37577
39782
  id: string;
37578
39783
  module_id: string;
37579
39784
  permission: string;
@@ -37582,6 +39787,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
37582
39787
  };
37583
39788
  Insert: {
37584
39789
  created_at?: string;
39790
+ feature_id?: string;
37585
39791
  id?: string;
37586
39792
  module_id: string;
37587
39793
  permission: string;
@@ -37590,6 +39796,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
37590
39796
  };
37591
39797
  Update: {
37592
39798
  created_at?: string;
39799
+ feature_id?: string;
37593
39800
  id?: string;
37594
39801
  module_id?: string;
37595
39802
  permission?: string;
@@ -37625,6 +39832,51 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
37625
39832
  referencedColumns: ["id"];
37626
39833
  }];
37627
39834
  };
39835
+ van_inventories: {
39836
+ Row: {
39837
+ barcode: string | null;
39838
+ created_at: string;
39839
+ id: string;
39840
+ monteur_id: string | null;
39841
+ price_per_unit: number;
39842
+ product_name: string;
39843
+ quantity_current: number;
39844
+ quantity_min: number;
39845
+ unit: string;
39846
+ updated_at: string;
39847
+ };
39848
+ Insert: {
39849
+ barcode?: string | null;
39850
+ created_at?: string;
39851
+ id?: string;
39852
+ monteur_id?: string | null;
39853
+ price_per_unit?: number;
39854
+ product_name: string;
39855
+ quantity_current?: number;
39856
+ quantity_min?: number;
39857
+ unit?: string;
39858
+ updated_at?: string;
39859
+ };
39860
+ Update: {
39861
+ barcode?: string | null;
39862
+ created_at?: string;
39863
+ id?: string;
39864
+ monteur_id?: string | null;
39865
+ price_per_unit?: number;
39866
+ product_name?: string;
39867
+ quantity_current?: number;
39868
+ quantity_min?: number;
39869
+ unit?: string;
39870
+ updated_at?: string;
39871
+ };
39872
+ Relationships: [{
39873
+ foreignKeyName: "van_inventories_monteur_id_fkey";
39874
+ columns: ["monteur_id"];
39875
+ isOneToOne: false;
39876
+ referencedRelation: "profiles";
39877
+ referencedColumns: ["id"];
39878
+ }];
39879
+ };
37628
39880
  voorraad_custom_fields: {
37629
39881
  Row: {
37630
39882
  created_at: string;
@@ -38575,7 +40827,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
38575
40827
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
38576
40828
  columns: ["monteur_id"];
38577
40829
  isOneToOne: false;
38578
- referencedRelation: "monteurs";
40830
+ referencedRelation: "profiles";
38579
40831
  referencedColumns: ["id"];
38580
40832
  }, {
38581
40833
  foreignKeyName: "work_order_monteurs_work_order_id_fkey";
@@ -38585,6 +40837,60 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
38585
40837
  referencedColumns: ["id"];
38586
40838
  }];
38587
40839
  };
40840
+ work_order_photos: {
40841
+ Row: {
40842
+ ai_caption: string | null;
40843
+ ai_categorized_at: string | null;
40844
+ ai_labels: import("../integrations/supabase/types").Json | null;
40845
+ caption: string | null;
40846
+ created_at: string;
40847
+ id: string;
40848
+ monteur_id: string | null;
40849
+ photo_type: string;
40850
+ storage_path: string;
40851
+ updated_at: string;
40852
+ work_order_id: string;
40853
+ };
40854
+ Insert: {
40855
+ ai_caption?: string | null;
40856
+ ai_categorized_at?: string | null;
40857
+ ai_labels?: import("../integrations/supabase/types").Json | null;
40858
+ caption?: string | null;
40859
+ created_at?: string;
40860
+ id?: string;
40861
+ monteur_id?: string | null;
40862
+ photo_type?: string;
40863
+ storage_path: string;
40864
+ updated_at?: string;
40865
+ work_order_id: string;
40866
+ };
40867
+ Update: {
40868
+ ai_caption?: string | null;
40869
+ ai_categorized_at?: string | null;
40870
+ ai_labels?: import("../integrations/supabase/types").Json | null;
40871
+ caption?: string | null;
40872
+ created_at?: string;
40873
+ id?: string;
40874
+ monteur_id?: string | null;
40875
+ photo_type?: string;
40876
+ storage_path?: string;
40877
+ updated_at?: string;
40878
+ work_order_id?: string;
40879
+ };
40880
+ Relationships: [{
40881
+ foreignKeyName: "work_order_photos_monteur_id_fkey";
40882
+ columns: ["monteur_id"];
40883
+ isOneToOne: false;
40884
+ referencedRelation: "profiles";
40885
+ referencedColumns: ["id"];
40886
+ }, {
40887
+ foreignKeyName: "work_order_photos_work_order_id_fkey";
40888
+ columns: ["work_order_id"];
40889
+ isOneToOne: false;
40890
+ referencedRelation: "work_orders";
40891
+ referencedColumns: ["id"];
40892
+ }];
40893
+ };
38588
40894
  work_orders: {
38589
40895
  Row: {
38590
40896
  assigned_to: string | null;
@@ -38616,7 +40922,6 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
38616
40922
  scheduled_end_time: string | null;
38617
40923
  scheduled_start_time: string | null;
38618
40924
  status: string;
38619
- tenant_id: string;
38620
40925
  total_hours_worked: number | null;
38621
40926
  total_price: number | null;
38622
40927
  travel_time_minutes: number | null;
@@ -38654,7 +40959,6 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
38654
40959
  scheduled_end_time?: string | null;
38655
40960
  scheduled_start_time?: string | null;
38656
40961
  status?: string;
38657
- tenant_id: string;
38658
40962
  total_hours_worked?: number | null;
38659
40963
  total_price?: number | null;
38660
40964
  travel_time_minutes?: number | null;
@@ -38692,7 +40996,6 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
38692
40996
  scheduled_end_time?: string | null;
38693
40997
  scheduled_start_time?: string | null;
38694
40998
  status?: string;
38695
- tenant_id?: string;
38696
40999
  total_hours_worked?: number | null;
38697
41000
  total_price?: number | null;
38698
41001
  travel_time_minutes?: number | null;
@@ -38706,12 +41009,6 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
38706
41009
  isOneToOne: false;
38707
41010
  referencedRelation: "work_orders";
38708
41011
  referencedColumns: ["id"];
38709
- }, {
38710
- foreignKeyName: "work_orders_tenant_id_fkey";
38711
- columns: ["tenant_id"];
38712
- isOneToOne: false;
38713
- referencedRelation: "tenants";
38714
- referencedColumns: ["id"];
38715
41012
  }];
38716
41013
  };
38717
41014
  };
@@ -39396,6 +41693,19 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
39396
41693
  };
39397
41694
  Returns: undefined;
39398
41695
  };
41696
+ approve_mailbox_order_proposal: {
41697
+ Args: {
41698
+ p_custom_fields: import("../integrations/supabase/types").Json;
41699
+ p_customer_id: string;
41700
+ p_delivery_date: string;
41701
+ p_field_values?: import("../integrations/supabase/types").Json;
41702
+ p_lines: import("../integrations/supabase/types").Json;
41703
+ p_notes: string;
41704
+ p_proposal_id: string;
41705
+ p_reviewed_by: string;
41706
+ };
41707
+ Returns: import("../integrations/supabase/types").Json;
41708
+ };
39399
41709
  assign_cart_numbers: {
39400
41710
  Args: {
39401
41711
  p_carts: import("../integrations/supabase/types").Json;
@@ -39447,6 +41757,10 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
39447
41757
  };
39448
41758
  Returns: number;
39449
41759
  };
41760
+ can_manage_hours: {
41761
+ Args: never;
41762
+ Returns: boolean;
41763
+ };
39450
41764
  check_offer_product_available_stock: {
39451
41765
  Args: {
39452
41766
  p_campaign_product_id: string;
@@ -39636,6 +41950,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
39636
41950
  };
39637
41951
  Returns: {
39638
41952
  action: string;
41953
+ attempt_started_at: string | null;
39639
41954
  attempts: number;
39640
41955
  connection_id: string | null;
39641
41956
  created_at: string;
@@ -39723,6 +42038,30 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
39723
42038
  agent_naam: string;
39724
42039
  }[];
39725
42040
  };
42041
+ consume_van_inventory: {
42042
+ Args: {
42043
+ p_inventory_id: string;
42044
+ p_quantity: number;
42045
+ };
42046
+ Returns: {
42047
+ barcode: string | null;
42048
+ created_at: string;
42049
+ id: string;
42050
+ monteur_id: string | null;
42051
+ price_per_unit: number;
42052
+ product_name: string;
42053
+ quantity_current: number;
42054
+ quantity_min: number;
42055
+ unit: string;
42056
+ updated_at: string;
42057
+ };
42058
+ SetofOptions: {
42059
+ from: "*";
42060
+ to: "van_inventories";
42061
+ isOneToOne: true;
42062
+ isSetofReturn: false;
42063
+ };
42064
+ };
39726
42065
  control_get_todays_carts: {
39727
42066
  Args: never;
39728
42067
  Returns: {
@@ -39796,6 +42135,13 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
39796
42135
  _user_id: string;
39797
42136
  };
39798
42137
  Returns: string;
42138
+ } | {
42139
+ Args: {
42140
+ _feature_id: string;
42141
+ _module_id: string;
42142
+ _user_id: string;
42143
+ };
42144
+ Returns: string;
39799
42145
  };
39800
42146
  email_auth_decrypt: {
39801
42147
  Args: {
@@ -39842,6 +42188,13 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
39842
42188
  };
39843
42189
  Returns: string;
39844
42190
  };
42191
+ employee_day_hours: {
42192
+ Args: {
42193
+ _day: string;
42194
+ _employee_id: string;
42195
+ };
42196
+ Returns: number;
42197
+ };
39845
42198
  enqueue_cart_replan_if_unlocked: {
39846
42199
  Args: {
39847
42200
  p_order_id: string;
@@ -40147,12 +42500,6 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
40147
42500
  Args: never;
40148
42501
  Returns: string;
40149
42502
  };
40150
- get_work_order_tenant_id: {
40151
- Args: {
40152
- wo_id: string;
40153
- };
40154
- Returns: string;
40155
- };
40156
42503
  has_module_permission: {
40157
42504
  Args: {
40158
42505
  _min: string;
@@ -40186,6 +42533,13 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
40186
42533
  };
40187
42534
  Returns: boolean;
40188
42535
  };
42536
+ is_time_log_week_locked: {
42537
+ Args: {
42538
+ p_employee_id: string;
42539
+ p_start_time: string;
42540
+ };
42541
+ Returns: boolean;
42542
+ };
40189
42543
  is_user_admin: {
40190
42544
  Args: never;
40191
42545
  Returns: boolean;
@@ -40194,19 +42548,43 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
40194
42548
  Args: never;
40195
42549
  Returns: boolean;
40196
42550
  };
42551
+ itk_offerte_naar_werkbon: {
42552
+ Args: {
42553
+ _offerte_id: string;
42554
+ };
42555
+ Returns: string;
42556
+ };
42557
+ itk_offerte_restant_mandaat: {
42558
+ Args: {
42559
+ _exclude_offerte_id?: string;
42560
+ _werkbon_id: string;
42561
+ };
42562
+ Returns: number;
42563
+ };
40197
42564
  jwt_has_role: {
40198
42565
  Args: {
40199
42566
  _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
40200
42567
  };
40201
42568
  Returns: boolean;
40202
42569
  };
40203
- list_monteurs: {
42570
+ list_medewerkers: {
40204
42571
  Args: never;
40205
42572
  Returns: {
40206
42573
  avatar_url: string;
42574
+ color: string;
40207
42575
  display_name: string;
40208
42576
  email: string;
42577
+ hours_fri: number;
42578
+ hours_mon: number;
42579
+ hours_thu: number;
42580
+ hours_tue: number;
42581
+ hours_wed: number;
40209
42582
  id: string;
42583
+ is_active: boolean;
42584
+ leave_balance_hours: number;
42585
+ persnr: string;
42586
+ phone: string;
42587
+ roles: string[];
40210
42588
  }[];
40211
42589
  };
40212
42590
  list_my_planning_items: {
@@ -40532,17 +42910,6 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
40532
42910
  Returns: string;
40533
42911
  };
40534
42912
  logistics_emit_event: {
40535
- Args: {
40536
- p_event_type: string;
40537
- p_idempotency_key?: string;
40538
- p_order_ref: string;
40539
- p_payload?: import("../integrations/supabase/types").Json;
40540
- p_shadow?: boolean;
40541
- p_source_module: string;
40542
- p_strategy_id?: string;
40543
- };
40544
- Returns: import("../integrations/supabase/types").Json;
40545
- } | {
40546
42913
  Args: {
40547
42914
  p_event_type: string;
40548
42915
  p_idempotency_key?: string;
@@ -40697,6 +43064,65 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
40697
43064
  };
40698
43065
  Returns: number;
40699
43066
  };
43067
+ logistics_plan_claim: {
43068
+ Args: {
43069
+ p_limit?: number;
43070
+ };
43071
+ Returns: {
43072
+ attempts: number;
43073
+ id: string;
43074
+ order_id: string;
43075
+ }[];
43076
+ };
43077
+ logistics_plan_enqueue: {
43078
+ Args: {
43079
+ p_order_id: string;
43080
+ p_reason?: string;
43081
+ };
43082
+ Returns: undefined;
43083
+ };
43084
+ logistics_plan_ensure_event: {
43085
+ Args: {
43086
+ p_order_id: string;
43087
+ };
43088
+ Returns: boolean;
43089
+ };
43090
+ logistics_plan_finish: {
43091
+ Args: {
43092
+ p_error?: string;
43093
+ p_id: string;
43094
+ };
43095
+ Returns: undefined;
43096
+ };
43097
+ logistics_plan_impact_orders: {
43098
+ Args: {
43099
+ p_order_id: string;
43100
+ };
43101
+ Returns: {
43102
+ buffer_id: string;
43103
+ order_id: string;
43104
+ plan_date: string;
43105
+ }[];
43106
+ };
43107
+ logistics_plan_kick: {
43108
+ Args: never;
43109
+ Returns: undefined;
43110
+ };
43111
+ logistics_plan_prune: {
43112
+ Args: never;
43113
+ Returns: number;
43114
+ };
43115
+ logistics_plan_release_stale: {
43116
+ Args: never;
43117
+ Returns: number;
43118
+ };
43119
+ logistics_plan_setting: {
43120
+ Args: {
43121
+ p_default: number;
43122
+ p_key: string;
43123
+ };
43124
+ Returns: number;
43125
+ };
40700
43126
  logistics_queue_capacity_email: {
40701
43127
  Args: {
40702
43128
  p_alert_id: string;
@@ -40938,6 +43364,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
40938
43364
  my_module_permissions: {
40939
43365
  Args: never;
40940
43366
  Returns: {
43367
+ feature_id: string;
40941
43368
  module_id: string;
40942
43369
  permission: string;
40943
43370
  }[];
@@ -41327,6 +43754,37 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
41327
43754
  };
41328
43755
  Returns: undefined;
41329
43756
  };
43757
+ quote_create_from_source: {
43758
+ Args: {
43759
+ _payload?: import("../integrations/supabase/types").Json;
43760
+ _source_id: string;
43761
+ _source_type: string;
43762
+ };
43763
+ Returns: string;
43764
+ };
43765
+ quote_get_billable_lines: {
43766
+ Args: {
43767
+ _quotation_id: string;
43768
+ };
43769
+ Returns: import("../integrations/supabase/types").Json;
43770
+ };
43771
+ quote_get_summary: {
43772
+ Args: {
43773
+ _quotation_id: string;
43774
+ };
43775
+ Returns: import("../integrations/supabase/types").Json;
43776
+ };
43777
+ quote_list_packages: {
43778
+ Args: never;
43779
+ Returns: import("../integrations/supabase/types").Json;
43780
+ };
43781
+ quote_list_sources: {
43782
+ Args: {
43783
+ _limit?: number;
43784
+ _source_type?: string;
43785
+ };
43786
+ Returns: import("../integrations/supabase/types").Json;
43787
+ };
41330
43788
  recompute_all_reserved_stock: {
41331
43789
  Args: never;
41332
43790
  Returns: undefined;
@@ -41818,6 +44276,16 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
41818
44276
  };
41819
44277
  Returns: string[];
41820
44278
  };
44279
+ switch_time_log: {
44280
+ Args: {
44281
+ p_employee_id: string;
44282
+ p_start_lat?: number;
44283
+ p_start_lng?: number;
44284
+ p_type: string;
44285
+ p_work_order_id?: string;
44286
+ };
44287
+ Returns: import("../integrations/supabase/types").Json;
44288
+ };
41821
44289
  sync_all_layer_stocks: {
41822
44290
  Args: never;
41823
44291
  Returns: undefined;
@@ -41852,6 +44320,12 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
41852
44320
  };
41853
44321
  Returns: undefined;
41854
44322
  };
44323
+ sync_sick_time_off: {
44324
+ Args: {
44325
+ _period_id: string;
44326
+ };
44327
+ Returns: number;
44328
+ };
41855
44329
  trade_item_stock_duplicates: {
41856
44330
  Args: never;
41857
44331
  Returns: {
@@ -41868,6 +44342,24 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
41868
44342
  };
41869
44343
  Returns: boolean;
41870
44344
  };
44345
+ twinfield_cron_lock_acquire: {
44346
+ Args: {
44347
+ _job_name: string;
44348
+ _stale_seconds?: number;
44349
+ };
44350
+ Returns: boolean;
44351
+ };
44352
+ twinfield_cron_lock_release: {
44353
+ Args: {
44354
+ _error?: string;
44355
+ _job_name: string;
44356
+ };
44357
+ Returns: undefined;
44358
+ };
44359
+ twinfield_prune_push_queue: {
44360
+ Args: never;
44361
+ Returns: number;
44362
+ };
41871
44363
  twinfield_register_cron: {
41872
44364
  Args: {
41873
44365
  apikey?: string;
@@ -41907,11 +44399,31 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
41907
44399
  Args: never;
41908
44400
  Returns: string;
41909
44401
  };
44402
+ wo_create_from_source: {
44403
+ Args: {
44404
+ _payload?: import("../integrations/supabase/types").Json;
44405
+ _source_id: string;
44406
+ _source_type: string;
44407
+ };
44408
+ Returns: string;
44409
+ };
44410
+ wo_get_billable_lines: {
44411
+ Args: {
44412
+ _work_order_id: string;
44413
+ };
44414
+ Returns: import("../integrations/supabase/types").Json;
44415
+ };
44416
+ wo_get_summary: {
44417
+ Args: {
44418
+ _work_order_id: string;
44419
+ };
44420
+ Returns: import("../integrations/supabase/types").Json;
44421
+ };
41910
44422
  };
41911
44423
  Enums: {
41912
44424
  ai_import_status: "nieuw" | "verwerken" | "bevestigen" | "klaar" | "mislukt";
41913
44425
  app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie";
41914
- doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon";
44426
+ doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon" | "veilingbon" | "afleverbrief" | "veilingbrief";
41915
44427
  doc_orientation: "portrait" | "landscape";
41916
44428
  exact_env: "staging" | "live";
41917
44429
  exact_push_status: "pending" | "sent" | "error";