@flowselections/floriday-verkoop-module 1.0.41 → 1.0.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist-lib/components/verkoop/VerkoopOrdersPage.d.ts.map +1 -1
  2. package/dist-lib/components/verkoop/VerkoopOrdersPage.js +50 -15
  3. package/dist-lib/integrations/supabase/auth-middleware.d.ts +847 -150
  4. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  5. package/dist-lib/integrations/supabase/client.d.ts +847 -150
  6. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  7. package/dist-lib/integrations/supabase/client.server.d.ts +847 -150
  8. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  9. package/dist-lib/integrations/supabase/types.d.ts +855 -153
  10. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  11. package/dist-lib/lib/cart-lock.functions.d.ts +847 -150
  12. package/dist-lib/lib/cart-lock.functions.d.ts.map +1 -1
  13. package/dist-lib/lib/cart-planning-settings.functions.d.ts +8943 -1276
  14. package/dist-lib/lib/cart-planning-settings.functions.d.ts.map +1 -1
  15. package/dist-lib/lib/cart-replan.functions.d.ts +2439 -348
  16. package/dist-lib/lib/cart-replan.functions.d.ts.map +1 -1
  17. package/dist-lib/lib/create-order.functions.d.ts +33856 -1741
  18. package/dist-lib/lib/create-order.functions.d.ts.map +1 -1
  19. package/dist-lib/lib/create-order.functions.js +30 -0
  20. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts +2439 -348
  21. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts.map +1 -1
  22. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts +847 -150
  23. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts.map +1 -1
  24. package/dist-lib/lib/floriday-mirror.functions.d.ts +847 -150
  25. package/dist-lib/lib/floriday-mirror.functions.d.ts.map +1 -1
  26. package/dist-lib/lib/floriday-public.functions.d.ts +5691 -812
  27. package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
  28. package/dist-lib/lib/floriday-writes.functions.d.ts +4065 -580
  29. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  30. package/dist-lib/lib/invoice-timing.functions.d.ts +3252 -464
  31. package/dist-lib/lib/invoice-timing.functions.d.ts.map +1 -1
  32. package/dist-lib/lib/load-carriers.functions.d.ts +847 -150
  33. package/dist-lib/lib/load-carriers.functions.d.ts.map +1 -1
  34. package/dist-lib/lib/logistics-engine.functions.d.ts +4065 -580
  35. package/dist-lib/lib/logistics-engine.functions.d.ts.map +1 -1
  36. package/dist-lib/lib/logistics-stock.functions.d.ts +1626 -232
  37. package/dist-lib/lib/logistics-stock.functions.d.ts.map +1 -1
  38. package/dist-lib/lib/order-addresses.functions.d.ts +847 -150
  39. package/dist-lib/lib/order-addresses.functions.d.ts.map +1 -1
  40. package/dist-lib/lib/order-buffers.functions.d.ts +2439 -348
  41. package/dist-lib/lib/order-buffers.functions.d.ts.map +1 -1
  42. package/dist-lib/lib/order-carrier.functions.d.ts +1626 -232
  43. package/dist-lib/lib/order-carrier.functions.d.ts.map +1 -1
  44. package/dist-lib/lib/order-pickup.functions.d.ts +1626 -232
  45. package/dist-lib/lib/order-pickup.functions.d.ts.map +1 -1
  46. package/dist-lib/lib/order-shipments.functions.d.ts +3252 -464
  47. package/dist-lib/lib/order-shipments.functions.d.ts.map +1 -1
  48. package/dist-lib/lib/salesorders-list.functions.d.ts +847 -150
  49. package/dist-lib/lib/salesorders-list.functions.d.ts.map +1 -1
  50. package/dist-lib/lib/salesorders-mapping.d.ts +6 -0
  51. package/dist-lib/lib/salesorders-mapping.d.ts.map +1 -1
  52. package/dist-lib/lib/salesorders-mapping.js +17 -0
  53. package/dist-lib/lib/salesorders.functions.d.ts +4065 -580
  54. package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
  55. package/dist-lib/lib/tradeitems.functions.d.ts +847 -150
  56. package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
  57. package/package.json +1 -1
@@ -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;
@@ -7775,7 +7895,6 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
7775
7895
  start_date: string;
7776
7896
  start_time: string | null;
7777
7897
  status: string;
7778
- tenant_id: string;
7779
7898
  updated_at: string;
7780
7899
  user_id: string;
7781
7900
  };
@@ -7793,7 +7912,6 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
7793
7912
  start_date: string;
7794
7913
  start_time?: string | null;
7795
7914
  status?: string;
7796
- tenant_id?: string;
7797
7915
  updated_at?: string;
7798
7916
  user_id: string;
7799
7917
  };
@@ -7811,7 +7929,6 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
7811
7929
  start_date?: string;
7812
7930
  start_time?: string | null;
7813
7931
  status?: string;
7814
- tenant_id?: string;
7815
7932
  updated_at?: string;
7816
7933
  user_id?: string;
7817
7934
  };
@@ -7819,13 +7936,13 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
7819
7936
  foreignKeyName: "leave_requests_monteur_id_fkey";
7820
7937
  columns: ["monteur_id"];
7821
7938
  isOneToOne: false;
7822
- referencedRelation: "monteurs";
7939
+ referencedRelation: "profiles";
7823
7940
  referencedColumns: ["id"];
7824
7941
  }, {
7825
7942
  foreignKeyName: "leave_requests_user_id_fkey";
7826
7943
  columns: ["user_id"];
7827
7944
  isOneToOne: false;
7828
- referencedRelation: "monteurs";
7945
+ referencedRelation: "profiles";
7829
7946
  referencedColumns: ["id"];
7830
7947
  }];
7831
7948
  };
@@ -8693,6 +8810,45 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
8693
8810
  };
8694
8811
  Relationships: [];
8695
8812
  };
8813
+ logistics_plan_queue: {
8814
+ Row: {
8815
+ attempts: number;
8816
+ claimed_at: string | null;
8817
+ enqueued_at: string;
8818
+ error: string | null;
8819
+ id: string;
8820
+ next_attempt_at: string;
8821
+ order_id: string;
8822
+ reason: string;
8823
+ status: string;
8824
+ updated_at: string;
8825
+ };
8826
+ Insert: {
8827
+ attempts?: number;
8828
+ claimed_at?: string | null;
8829
+ enqueued_at?: string;
8830
+ error?: string | null;
8831
+ id?: string;
8832
+ next_attempt_at?: string;
8833
+ order_id: string;
8834
+ reason?: string;
8835
+ status?: string;
8836
+ updated_at?: string;
8837
+ };
8838
+ Update: {
8839
+ attempts?: number;
8840
+ claimed_at?: string | null;
8841
+ enqueued_at?: string;
8842
+ error?: string | null;
8843
+ id?: string;
8844
+ next_attempt_at?: string;
8845
+ order_id?: string;
8846
+ reason?: string;
8847
+ status?: string;
8848
+ updated_at?: string;
8849
+ };
8850
+ Relationships: [];
8851
+ };
8696
8852
  logistics_plan_runs: {
8697
8853
  Row: {
8698
8854
  created_at: string;
@@ -8768,6 +8924,24 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
8768
8924
  referencedColumns: ["id"];
8769
8925
  }];
8770
8926
  };
8927
+ logistics_plan_settings: {
8928
+ Row: {
8929
+ key: string;
8930
+ updated_at: string;
8931
+ value: string;
8932
+ };
8933
+ Insert: {
8934
+ key: string;
8935
+ updated_at?: string;
8936
+ value: string;
8937
+ };
8938
+ Update: {
8939
+ key?: string;
8940
+ updated_at?: string;
8941
+ value?: string;
8942
+ };
8943
+ Relationships: [];
8944
+ };
8771
8945
  logistics_rebuffer_state: {
8772
8946
  Row: {
8773
8947
  created_at: string;
@@ -9923,6 +10097,90 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
9923
10097
  };
9924
10098
  Relationships: [];
9925
10099
  };
10100
+ material_usage: {
10101
+ Row: {
10102
+ created_at: string;
10103
+ id: string;
10104
+ material_name: string;
10105
+ monteur_id: string | null;
10106
+ price_at_time: number;
10107
+ quantity_used: number;
10108
+ updated_at: string;
10109
+ van_inventory_id: string | null;
10110
+ work_order_id: string;
10111
+ };
10112
+ Insert: {
10113
+ created_at?: string;
10114
+ id?: string;
10115
+ material_name: string;
10116
+ monteur_id?: string | null;
10117
+ price_at_time?: number;
10118
+ quantity_used?: number;
10119
+ updated_at?: string;
10120
+ van_inventory_id?: string | null;
10121
+ work_order_id: string;
10122
+ };
10123
+ Update: {
10124
+ created_at?: string;
10125
+ id?: string;
10126
+ material_name?: string;
10127
+ monteur_id?: string | null;
10128
+ price_at_time?: number;
10129
+ quantity_used?: number;
10130
+ updated_at?: string;
10131
+ van_inventory_id?: string | null;
10132
+ work_order_id?: string;
10133
+ };
10134
+ Relationships: [{
10135
+ foreignKeyName: "material_usage_monteur_id_fkey";
10136
+ columns: ["monteur_id"];
10137
+ isOneToOne: false;
10138
+ referencedRelation: "profiles";
10139
+ referencedColumns: ["id"];
10140
+ }, {
10141
+ foreignKeyName: "material_usage_van_inventory_id_fkey";
10142
+ columns: ["van_inventory_id"];
10143
+ isOneToOne: false;
10144
+ referencedRelation: "van_inventories";
10145
+ referencedColumns: ["id"];
10146
+ }, {
10147
+ foreignKeyName: "material_usage_work_order_id_fkey";
10148
+ columns: ["work_order_id"];
10149
+ isOneToOne: false;
10150
+ referencedRelation: "work_orders";
10151
+ referencedColumns: ["id"];
10152
+ }];
10153
+ };
10154
+ module_features: {
10155
+ Row: {
10156
+ created_at: string;
10157
+ feature_id: string;
10158
+ id: string;
10159
+ is_active: boolean;
10160
+ last_seen_at: string;
10161
+ module_id: string;
10162
+ name: string;
10163
+ };
10164
+ Insert: {
10165
+ created_at?: string;
10166
+ feature_id: string;
10167
+ id?: string;
10168
+ is_active?: boolean;
10169
+ last_seen_at?: string;
10170
+ module_id: string;
10171
+ name: string;
10172
+ };
10173
+ Update: {
10174
+ created_at?: string;
10175
+ feature_id?: string;
10176
+ id?: string;
10177
+ is_active?: boolean;
10178
+ last_seen_at?: string;
10179
+ module_id?: string;
10180
+ name?: string;
10181
+ };
10182
+ Relationships: [];
10183
+ };
9926
10184
  module_permissions: {
9927
10185
  Row: {
9928
10186
  created_at: string;
@@ -9953,6 +10211,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
9953
10211
  module_registry: {
9954
10212
  Row: {
9955
10213
  created_at: string;
10214
+ enforce: boolean;
9956
10215
  is_active: boolean;
9957
10216
  last_seen_at: string;
9958
10217
  module_id: string;
@@ -9962,6 +10221,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
9962
10221
  };
9963
10222
  Insert: {
9964
10223
  created_at?: string;
10224
+ enforce?: boolean;
9965
10225
  is_active?: boolean;
9966
10226
  last_seen_at?: string;
9967
10227
  module_id: string;
@@ -9971,6 +10231,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
9971
10231
  };
9972
10232
  Update: {
9973
10233
  created_at?: string;
10234
+ enforce?: boolean;
9974
10235
  is_active?: boolean;
9975
10236
  last_seen_at?: string;
9976
10237
  module_id?: string;
@@ -10031,63 +10292,6 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
10031
10292
  };
10032
10293
  Relationships: [];
10033
10294
  };
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
10295
  nmbrs_component_mapping: {
10092
10296
  Row: {
10093
10297
  created_at: string;
@@ -10158,13 +10362,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
10158
10362
  nmbrs_employee_number?: string;
10159
10363
  updated_at?: string;
10160
10364
  };
10161
- Relationships: [{
10162
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
10163
- columns: ["monteur_id"];
10164
- isOneToOne: true;
10165
- referencedRelation: "monteurs";
10166
- referencedColumns: ["id"];
10167
- }];
10365
+ Relationships: [];
10168
10366
  };
10169
10367
  nmbrs_export_lines: {
10170
10368
  Row: {
@@ -10213,12 +10411,6 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
10213
10411
  wage_code?: string;
10214
10412
  };
10215
10413
  Relationships: [{
10216
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
10217
- columns: ["monteur_id"];
10218
- isOneToOne: false;
10219
- referencedRelation: "monteurs";
10220
- referencedColumns: ["id"];
10221
- }, {
10222
10414
  foreignKeyName: "nmbrs_export_lines_run_id_fkey";
10223
10415
  columns: ["run_id"];
10224
10416
  isOneToOne: false;
@@ -11046,6 +11238,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
11046
11238
  error_message: string | null;
11047
11239
  id: string;
11048
11240
  invoice_number: string | null;
11241
+ next_attempt_at: string;
11049
11242
  order_id: string;
11050
11243
  processed_at: string | null;
11051
11244
  status: string;
@@ -11057,6 +11250,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
11057
11250
  error_message?: string | null;
11058
11251
  id?: string;
11059
11252
  invoice_number?: string | null;
11253
+ next_attempt_at?: string;
11060
11254
  order_id: string;
11061
11255
  processed_at?: string | null;
11062
11256
  status?: string;
@@ -11068,6 +11262,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
11068
11262
  error_message?: string | null;
11069
11263
  id?: string;
11070
11264
  invoice_number?: string | null;
11265
+ next_attempt_at?: string;
11071
11266
  order_id?: string;
11072
11267
  processed_at?: string | null;
11073
11268
  status?: string;
@@ -12606,6 +12801,9 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
12606
12801
  created_at: string;
12607
12802
  id: string;
12608
12803
  laatst_gezien: string;
12804
+ laatste_fout: string | null;
12805
+ laatste_request_id: number | null;
12806
+ mislukte_posts: number;
12609
12807
  tick_sleutel: string;
12610
12808
  updated_at: string;
12611
12809
  };
@@ -12615,6 +12813,9 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
12615
12813
  created_at?: string;
12616
12814
  id?: string;
12617
12815
  laatst_gezien?: string;
12816
+ laatste_fout?: string | null;
12817
+ laatste_request_id?: number | null;
12818
+ mislukte_posts?: number;
12618
12819
  tick_sleutel?: string;
12619
12820
  updated_at?: string;
12620
12821
  };
@@ -12624,6 +12825,9 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
12624
12825
  created_at?: string;
12625
12826
  id?: string;
12626
12827
  laatst_gezien?: string;
12828
+ laatste_fout?: string | null;
12829
+ laatste_request_id?: number | null;
12830
+ mislukte_posts?: number;
12627
12831
  tick_sleutel?: string;
12628
12832
  updated_at?: string;
12629
12833
  };
@@ -14132,6 +14336,96 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
14132
14336
  referencedColumns: ["id"];
14133
14337
  }];
14134
14338
  };
14339
+ role_assignments: {
14340
+ Row: {
14341
+ created_at: string;
14342
+ id: string;
14343
+ role_id: string;
14344
+ user_id: string;
14345
+ };
14346
+ Insert: {
14347
+ created_at?: string;
14348
+ id?: string;
14349
+ role_id: string;
14350
+ user_id: string;
14351
+ };
14352
+ Update: {
14353
+ created_at?: string;
14354
+ id?: string;
14355
+ role_id?: string;
14356
+ user_id?: string;
14357
+ };
14358
+ Relationships: [{
14359
+ foreignKeyName: "role_assignments_role_id_fkey";
14360
+ columns: ["role_id"];
14361
+ isOneToOne: false;
14362
+ referencedRelation: "roles";
14363
+ referencedColumns: ["id"];
14364
+ }];
14365
+ };
14366
+ role_permissions: {
14367
+ Row: {
14368
+ can_edit: boolean;
14369
+ can_view: boolean;
14370
+ feature_id: string;
14371
+ id: string;
14372
+ module_id: string;
14373
+ role_id: string;
14374
+ updated_at: string;
14375
+ };
14376
+ Insert: {
14377
+ can_edit?: boolean;
14378
+ can_view?: boolean;
14379
+ feature_id?: string;
14380
+ id?: string;
14381
+ module_id: string;
14382
+ role_id: string;
14383
+ updated_at?: string;
14384
+ };
14385
+ Update: {
14386
+ can_edit?: boolean;
14387
+ can_view?: boolean;
14388
+ feature_id?: string;
14389
+ id?: string;
14390
+ module_id?: string;
14391
+ role_id?: string;
14392
+ updated_at?: string;
14393
+ };
14394
+ Relationships: [{
14395
+ foreignKeyName: "role_permissions_role_id_fkey";
14396
+ columns: ["role_id"];
14397
+ isOneToOne: false;
14398
+ referencedRelation: "roles";
14399
+ referencedColumns: ["id"];
14400
+ }];
14401
+ };
14402
+ roles: {
14403
+ Row: {
14404
+ created_at: string;
14405
+ id: string;
14406
+ is_protected: boolean;
14407
+ key: string;
14408
+ name: string;
14409
+ updated_at: string;
14410
+ };
14411
+ Insert: {
14412
+ created_at?: string;
14413
+ id?: string;
14414
+ is_protected?: boolean;
14415
+ key: string;
14416
+ name: string;
14417
+ updated_at?: string;
14418
+ };
14419
+ Update: {
14420
+ created_at?: string;
14421
+ id?: string;
14422
+ is_protected?: boolean;
14423
+ key?: string;
14424
+ name?: string;
14425
+ updated_at?: string;
14426
+ };
14427
+ Relationships: [];
14428
+ };
14135
14429
  rooms: {
14136
14430
  Row: {
14137
14431
  capacity: number;
@@ -14801,6 +15095,54 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
14801
15095
  };
14802
15096
  Relationships: [];
14803
15097
  };
15098
+ time_compensation_entries: {
15099
+ Row: {
15100
+ created_at: string;
15101
+ employee_id: string;
15102
+ entry_date: string;
15103
+ id: string;
15104
+ km: number;
15105
+ meal_allowance: number;
15106
+ notes: string | null;
15107
+ standby_evening: number;
15108
+ standby_weekend: number;
15109
+ tvt_change: number;
15110
+ updated_at: string;
15111
+ };
15112
+ Insert: {
15113
+ created_at?: string;
15114
+ employee_id: string;
15115
+ entry_date: string;
15116
+ id?: string;
15117
+ km?: number;
15118
+ meal_allowance?: number;
15119
+ notes?: string | null;
15120
+ standby_evening?: number;
15121
+ standby_weekend?: number;
15122
+ tvt_change?: number;
15123
+ updated_at?: string;
15124
+ };
15125
+ Update: {
15126
+ created_at?: string;
15127
+ employee_id?: string;
15128
+ entry_date?: string;
15129
+ id?: string;
15130
+ km?: number;
15131
+ meal_allowance?: number;
15132
+ notes?: string | null;
15133
+ standby_evening?: number;
15134
+ standby_weekend?: number;
15135
+ tvt_change?: number;
15136
+ updated_at?: string;
15137
+ };
15138
+ Relationships: [{
15139
+ foreignKeyName: "time_compensation_entries_employee_id_fkey";
15140
+ columns: ["employee_id"];
15141
+ isOneToOne: false;
15142
+ referencedRelation: "profiles";
15143
+ referencedColumns: ["id"];
15144
+ }];
15145
+ };
14804
15146
  time_entries: {
14805
15147
  Row: {
14806
15148
  created_at: string;
@@ -14835,65 +15177,170 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
14835
15177
  undertime?: number;
14836
15178
  updated_at?: string;
14837
15179
  };
15180
+ Relationships: [];
15181
+ };
15182
+ time_log_week_approvals: {
15183
+ Row: {
15184
+ approved_at: string | null;
15185
+ approved_by: string | null;
15186
+ created_at: string;
15187
+ employee_id: string;
15188
+ id: string;
15189
+ locked: boolean;
15190
+ notes: string | null;
15191
+ status: string;
15192
+ submitted_at: string | null;
15193
+ updated_at: string;
15194
+ week_start: string;
15195
+ };
15196
+ Insert: {
15197
+ approved_at?: string | null;
15198
+ approved_by?: string | null;
15199
+ created_at?: string;
15200
+ employee_id: string;
15201
+ id?: string;
15202
+ locked?: boolean;
15203
+ notes?: string | null;
15204
+ status?: string;
15205
+ submitted_at?: string | null;
15206
+ updated_at?: string;
15207
+ week_start: string;
15208
+ };
15209
+ Update: {
15210
+ approved_at?: string | null;
15211
+ approved_by?: string | null;
15212
+ created_at?: string;
15213
+ employee_id?: string;
15214
+ id?: string;
15215
+ locked?: boolean;
15216
+ notes?: string | null;
15217
+ status?: string;
15218
+ submitted_at?: string | null;
15219
+ updated_at?: string;
15220
+ week_start?: string;
15221
+ };
14838
15222
  Relationships: [{
14839
- foreignKeyName: "time_entries_employee_id_fkey";
15223
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
14840
15224
  columns: ["employee_id"];
14841
15225
  isOneToOne: false;
14842
- referencedRelation: "monteurs";
15226
+ referencedRelation: "profiles";
14843
15227
  referencedColumns: ["id"];
14844
15228
  }];
14845
15229
  };
14846
15230
  time_logs: {
14847
15231
  Row: {
15232
+ auto_stop_reason: string | null;
15233
+ auto_stopped: boolean;
14848
15234
  created_at: string;
15235
+ current_latitude: number | null;
15236
+ current_longitude: number | null;
15237
+ current_position_updated_at: string | null;
14849
15238
  employee_id: string;
15239
+ end_latitude: number | null;
15240
+ end_longitude: number | null;
14850
15241
  end_time: string | null;
15242
+ eta_distance_km: number | null;
15243
+ eta_minutes: number | null;
15244
+ eta_updated_at: string | null;
15245
+ hour_category: string | null;
14851
15246
  id: string;
15247
+ last_reminder_at: string | null;
14852
15248
  notes: string | null;
14853
15249
  overtime_hours: number;
14854
15250
  overtime_type: string | null;
14855
15251
  regular_hours: number;
15252
+ reminder_count: number;
15253
+ requires_review: boolean;
15254
+ start_latitude: number | null;
15255
+ start_longitude: number | null;
14856
15256
  start_time: string;
14857
15257
  travel_cost: number | null;
14858
15258
  travel_distance_km: number | null;
15259
+ travel_duration_min: number | null;
15260
+ travel_time_minutes: number | null;
14859
15261
  type: string;
14860
15262
  updated_at: string;
15263
+ work_order_id: string | null;
14861
15264
  };
14862
15265
  Insert: {
15266
+ auto_stop_reason?: string | null;
15267
+ auto_stopped?: boolean;
14863
15268
  created_at?: string;
15269
+ current_latitude?: number | null;
15270
+ current_longitude?: number | null;
15271
+ current_position_updated_at?: string | null;
14864
15272
  employee_id: string;
15273
+ end_latitude?: number | null;
15274
+ end_longitude?: number | null;
14865
15275
  end_time?: string | null;
15276
+ eta_distance_km?: number | null;
15277
+ eta_minutes?: number | null;
15278
+ eta_updated_at?: string | null;
15279
+ hour_category?: string | null;
14866
15280
  id?: string;
15281
+ last_reminder_at?: string | null;
14867
15282
  notes?: string | null;
14868
15283
  overtime_hours?: number;
14869
15284
  overtime_type?: string | null;
14870
15285
  regular_hours?: number;
15286
+ reminder_count?: number;
15287
+ requires_review?: boolean;
15288
+ start_latitude?: number | null;
15289
+ start_longitude?: number | null;
14871
15290
  start_time?: string;
14872
15291
  travel_cost?: number | null;
14873
15292
  travel_distance_km?: number | null;
15293
+ travel_duration_min?: number | null;
15294
+ travel_time_minutes?: number | null;
14874
15295
  type: string;
14875
15296
  updated_at?: string;
15297
+ work_order_id?: string | null;
14876
15298
  };
14877
15299
  Update: {
15300
+ auto_stop_reason?: string | null;
15301
+ auto_stopped?: boolean;
14878
15302
  created_at?: string;
15303
+ current_latitude?: number | null;
15304
+ current_longitude?: number | null;
15305
+ current_position_updated_at?: string | null;
14879
15306
  employee_id?: string;
15307
+ end_latitude?: number | null;
15308
+ end_longitude?: number | null;
14880
15309
  end_time?: string | null;
15310
+ eta_distance_km?: number | null;
15311
+ eta_minutes?: number | null;
15312
+ eta_updated_at?: string | null;
15313
+ hour_category?: string | null;
14881
15314
  id?: string;
15315
+ last_reminder_at?: string | null;
14882
15316
  notes?: string | null;
14883
15317
  overtime_hours?: number;
14884
15318
  overtime_type?: string | null;
14885
15319
  regular_hours?: number;
15320
+ reminder_count?: number;
15321
+ requires_review?: boolean;
15322
+ start_latitude?: number | null;
15323
+ start_longitude?: number | null;
14886
15324
  start_time?: string;
14887
15325
  travel_cost?: number | null;
14888
15326
  travel_distance_km?: number | null;
15327
+ travel_duration_min?: number | null;
15328
+ travel_time_minutes?: number | null;
14889
15329
  type?: string;
14890
15330
  updated_at?: string;
15331
+ work_order_id?: string | null;
14891
15332
  };
14892
15333
  Relationships: [{
14893
15334
  foreignKeyName: "time_logs_employee_id_fkey";
14894
15335
  columns: ["employee_id"];
14895
15336
  isOneToOne: false;
14896
- referencedRelation: "monteurs";
15337
+ referencedRelation: "profiles";
15338
+ referencedColumns: ["id"];
15339
+ }, {
15340
+ foreignKeyName: "time_logs_work_order_id_fkey";
15341
+ columns: ["work_order_id"];
15342
+ isOneToOne: false;
15343
+ referencedRelation: "work_orders";
14897
15344
  referencedColumns: ["id"];
14898
15345
  }];
14899
15346
  };
@@ -14932,7 +15379,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
14932
15379
  foreignKeyName: "time_off_entries_employee_id_fkey";
14933
15380
  columns: ["employee_id"];
14934
15381
  isOneToOne: false;
14935
- referencedRelation: "monteurs";
15382
+ referencedRelation: "profiles";
14936
15383
  referencedColumns: ["id"];
14937
15384
  }];
14938
15385
  };
@@ -15242,6 +15689,39 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
15242
15689
  };
15243
15690
  Relationships: [];
15244
15691
  };
15692
+ twinfield_cron_locks: {
15693
+ Row: {
15694
+ created_at: string;
15695
+ heartbeat_at: string;
15696
+ job_name: string;
15697
+ last_error: string | null;
15698
+ last_finished_at: string | null;
15699
+ locked_at: string;
15700
+ run_id: string;
15701
+ updated_at: string;
15702
+ };
15703
+ Insert: {
15704
+ created_at?: string;
15705
+ heartbeat_at?: string;
15706
+ job_name: string;
15707
+ last_error?: string | null;
15708
+ last_finished_at?: string | null;
15709
+ locked_at?: string;
15710
+ run_id?: string;
15711
+ updated_at?: string;
15712
+ };
15713
+ Update: {
15714
+ created_at?: string;
15715
+ heartbeat_at?: string;
15716
+ job_name?: string;
15717
+ last_error?: string | null;
15718
+ last_finished_at?: string | null;
15719
+ locked_at?: string;
15720
+ run_id?: string;
15721
+ updated_at?: string;
15722
+ };
15723
+ Relationships: [];
15724
+ };
15245
15725
  twinfield_customers: {
15246
15726
  Row: {
15247
15727
  address: string | null;
@@ -15842,6 +16322,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
15842
16322
  twinfield_push_queue: {
15843
16323
  Row: {
15844
16324
  action: string;
16325
+ attempt_started_at: string | null;
15845
16326
  attempts: number;
15846
16327
  connection_id: string | null;
15847
16328
  created_at: string;
@@ -15858,6 +16339,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
15858
16339
  };
15859
16340
  Insert: {
15860
16341
  action?: string;
16342
+ attempt_started_at?: string | null;
15861
16343
  attempts?: number;
15862
16344
  connection_id?: string | null;
15863
16345
  created_at?: string;
@@ -15874,6 +16356,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
15874
16356
  };
15875
16357
  Update: {
15876
16358
  action?: string;
16359
+ attempt_started_at?: string | null;
15877
16360
  attempts?: number;
15878
16361
  connection_id?: string | null;
15879
16362
  created_at?: string;
@@ -16071,13 +16554,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
16071
16554
  workday_end?: string | null;
16072
16555
  workday_start?: string | null;
16073
16556
  };
16074
- Relationships: [{
16075
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
16076
- columns: ["monteur_id"];
16077
- isOneToOne: true;
16078
- referencedRelation: "monteurs";
16079
- referencedColumns: ["id"];
16080
- }];
16557
+ Relationships: [];
16081
16558
  };
16082
16559
  uren_entries: {
16083
16560
  Row: {
@@ -16123,12 +16600,6 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
16123
16600
  werkbon_id?: string | null;
16124
16601
  };
16125
16602
  Relationships: [{
16126
- foreignKeyName: "uren_entries_monteur_id_fkey";
16127
- columns: ["monteur_id"];
16128
- isOneToOne: false;
16129
- referencedRelation: "monteurs";
16130
- referencedColumns: ["id"];
16131
- }, {
16132
16603
  foreignKeyName: "uren_entries_werkbon_id_fkey";
16133
16604
  columns: ["werkbon_id"];
16134
16605
  isOneToOne: false;
@@ -16596,17 +17067,12 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
16596
17067
  submitted_at?: string | null;
16597
17068
  updated_at?: string;
16598
17069
  };
16599
- Relationships: [{
16600
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
16601
- columns: ["monteur_id"];
16602
- isOneToOne: false;
16603
- referencedRelation: "monteurs";
16604
- referencedColumns: ["id"];
16605
- }];
17070
+ Relationships: [];
16606
17071
  };
16607
17072
  user_module_permissions: {
16608
17073
  Row: {
16609
17074
  created_at: string;
17075
+ feature_id: string;
16610
17076
  id: string;
16611
17077
  module_id: string;
16612
17078
  permission: string;
@@ -16615,6 +17081,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
16615
17081
  };
16616
17082
  Insert: {
16617
17083
  created_at?: string;
17084
+ feature_id?: string;
16618
17085
  id?: string;
16619
17086
  module_id: string;
16620
17087
  permission: string;
@@ -16623,6 +17090,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
16623
17090
  };
16624
17091
  Update: {
16625
17092
  created_at?: string;
17093
+ feature_id?: string;
16626
17094
  id?: string;
16627
17095
  module_id?: string;
16628
17096
  permission?: string;
@@ -16658,6 +17126,51 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
16658
17126
  referencedColumns: ["id"];
16659
17127
  }];
16660
17128
  };
17129
+ van_inventories: {
17130
+ Row: {
17131
+ barcode: string | null;
17132
+ created_at: string;
17133
+ id: string;
17134
+ monteur_id: string | null;
17135
+ price_per_unit: number;
17136
+ product_name: string;
17137
+ quantity_current: number;
17138
+ quantity_min: number;
17139
+ unit: string;
17140
+ updated_at: string;
17141
+ };
17142
+ Insert: {
17143
+ barcode?: string | null;
17144
+ created_at?: string;
17145
+ id?: string;
17146
+ monteur_id?: string | null;
17147
+ price_per_unit?: number;
17148
+ product_name: string;
17149
+ quantity_current?: number;
17150
+ quantity_min?: number;
17151
+ unit?: string;
17152
+ updated_at?: string;
17153
+ };
17154
+ Update: {
17155
+ barcode?: string | null;
17156
+ created_at?: string;
17157
+ id?: string;
17158
+ monteur_id?: string | null;
17159
+ price_per_unit?: number;
17160
+ product_name?: string;
17161
+ quantity_current?: number;
17162
+ quantity_min?: number;
17163
+ unit?: string;
17164
+ updated_at?: string;
17165
+ };
17166
+ Relationships: [{
17167
+ foreignKeyName: "van_inventories_monteur_id_fkey";
17168
+ columns: ["monteur_id"];
17169
+ isOneToOne: false;
17170
+ referencedRelation: "profiles";
17171
+ referencedColumns: ["id"];
17172
+ }];
17173
+ };
16661
17174
  voorraad_custom_fields: {
16662
17175
  Row: {
16663
17176
  created_at: string;
@@ -17608,7 +18121,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
17608
18121
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
17609
18122
  columns: ["monteur_id"];
17610
18123
  isOneToOne: false;
17611
- referencedRelation: "monteurs";
18124
+ referencedRelation: "profiles";
17612
18125
  referencedColumns: ["id"];
17613
18126
  }, {
17614
18127
  foreignKeyName: "work_order_monteurs_work_order_id_fkey";
@@ -17618,6 +18131,60 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
17618
18131
  referencedColumns: ["id"];
17619
18132
  }];
17620
18133
  };
18134
+ work_order_photos: {
18135
+ Row: {
18136
+ ai_caption: string | null;
18137
+ ai_categorized_at: string | null;
18138
+ ai_labels: import("../integrations/supabase/types").Json | null;
18139
+ caption: string | null;
18140
+ created_at: string;
18141
+ id: string;
18142
+ monteur_id: string | null;
18143
+ photo_type: string;
18144
+ storage_path: string;
18145
+ updated_at: string;
18146
+ work_order_id: string;
18147
+ };
18148
+ Insert: {
18149
+ ai_caption?: string | null;
18150
+ ai_categorized_at?: string | null;
18151
+ ai_labels?: import("../integrations/supabase/types").Json | null;
18152
+ caption?: string | null;
18153
+ created_at?: string;
18154
+ id?: string;
18155
+ monteur_id?: string | null;
18156
+ photo_type?: string;
18157
+ storage_path: string;
18158
+ updated_at?: string;
18159
+ work_order_id: string;
18160
+ };
18161
+ Update: {
18162
+ ai_caption?: string | null;
18163
+ ai_categorized_at?: string | null;
18164
+ ai_labels?: import("../integrations/supabase/types").Json | null;
18165
+ caption?: string | null;
18166
+ created_at?: string;
18167
+ id?: string;
18168
+ monteur_id?: string | null;
18169
+ photo_type?: string;
18170
+ storage_path?: string;
18171
+ updated_at?: string;
18172
+ work_order_id?: string;
18173
+ };
18174
+ Relationships: [{
18175
+ foreignKeyName: "work_order_photos_monteur_id_fkey";
18176
+ columns: ["monteur_id"];
18177
+ isOneToOne: false;
18178
+ referencedRelation: "profiles";
18179
+ referencedColumns: ["id"];
18180
+ }, {
18181
+ foreignKeyName: "work_order_photos_work_order_id_fkey";
18182
+ columns: ["work_order_id"];
18183
+ isOneToOne: false;
18184
+ referencedRelation: "work_orders";
18185
+ referencedColumns: ["id"];
18186
+ }];
18187
+ };
17621
18188
  work_orders: {
17622
18189
  Row: {
17623
18190
  assigned_to: string | null;
@@ -17649,7 +18216,6 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
17649
18216
  scheduled_end_time: string | null;
17650
18217
  scheduled_start_time: string | null;
17651
18218
  status: string;
17652
- tenant_id: string;
17653
18219
  total_hours_worked: number | null;
17654
18220
  total_price: number | null;
17655
18221
  travel_time_minutes: number | null;
@@ -17687,7 +18253,6 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
17687
18253
  scheduled_end_time?: string | null;
17688
18254
  scheduled_start_time?: string | null;
17689
18255
  status?: string;
17690
- tenant_id: string;
17691
18256
  total_hours_worked?: number | null;
17692
18257
  total_price?: number | null;
17693
18258
  travel_time_minutes?: number | null;
@@ -17725,7 +18290,6 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
17725
18290
  scheduled_end_time?: string | null;
17726
18291
  scheduled_start_time?: string | null;
17727
18292
  status?: string;
17728
- tenant_id?: string;
17729
18293
  total_hours_worked?: number | null;
17730
18294
  total_price?: number | null;
17731
18295
  travel_time_minutes?: number | null;
@@ -17739,12 +18303,6 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
17739
18303
  isOneToOne: false;
17740
18304
  referencedRelation: "work_orders";
17741
18305
  referencedColumns: ["id"];
17742
- }, {
17743
- foreignKeyName: "work_orders_tenant_id_fkey";
17744
- columns: ["tenant_id"];
17745
- isOneToOne: false;
17746
- referencedRelation: "tenants";
17747
- referencedColumns: ["id"];
17748
18306
  }];
17749
18307
  };
17750
18308
  };
@@ -18429,6 +18987,19 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
18429
18987
  };
18430
18988
  Returns: undefined;
18431
18989
  };
18990
+ approve_mailbox_order_proposal: {
18991
+ Args: {
18992
+ p_custom_fields: import("../integrations/supabase/types").Json;
18993
+ p_customer_id: string;
18994
+ p_delivery_date: string;
18995
+ p_field_values?: import("../integrations/supabase/types").Json;
18996
+ p_lines: import("../integrations/supabase/types").Json;
18997
+ p_notes: string;
18998
+ p_proposal_id: string;
18999
+ p_reviewed_by: string;
19000
+ };
19001
+ Returns: import("../integrations/supabase/types").Json;
19002
+ };
18432
19003
  assign_cart_numbers: {
18433
19004
  Args: {
18434
19005
  p_carts: import("../integrations/supabase/types").Json;
@@ -18480,6 +19051,10 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
18480
19051
  };
18481
19052
  Returns: number;
18482
19053
  };
19054
+ can_manage_hours: {
19055
+ Args: never;
19056
+ Returns: boolean;
19057
+ };
18483
19058
  check_offer_product_available_stock: {
18484
19059
  Args: {
18485
19060
  p_campaign_product_id: string;
@@ -18669,6 +19244,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
18669
19244
  };
18670
19245
  Returns: {
18671
19246
  action: string;
19247
+ attempt_started_at: string | null;
18672
19248
  attempts: number;
18673
19249
  connection_id: string | null;
18674
19250
  created_at: string;
@@ -18756,6 +19332,30 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
18756
19332
  agent_naam: string;
18757
19333
  }[];
18758
19334
  };
19335
+ consume_van_inventory: {
19336
+ Args: {
19337
+ p_inventory_id: string;
19338
+ p_quantity: number;
19339
+ };
19340
+ Returns: {
19341
+ barcode: string | null;
19342
+ created_at: string;
19343
+ id: string;
19344
+ monteur_id: string | null;
19345
+ price_per_unit: number;
19346
+ product_name: string;
19347
+ quantity_current: number;
19348
+ quantity_min: number;
19349
+ unit: string;
19350
+ updated_at: string;
19351
+ };
19352
+ SetofOptions: {
19353
+ from: "*";
19354
+ to: "van_inventories";
19355
+ isOneToOne: true;
19356
+ isSetofReturn: false;
19357
+ };
19358
+ };
18759
19359
  control_get_todays_carts: {
18760
19360
  Args: never;
18761
19361
  Returns: {
@@ -18829,6 +19429,13 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
18829
19429
  _user_id: string;
18830
19430
  };
18831
19431
  Returns: string;
19432
+ } | {
19433
+ Args: {
19434
+ _feature_id: string;
19435
+ _module_id: string;
19436
+ _user_id: string;
19437
+ };
19438
+ Returns: string;
18832
19439
  };
18833
19440
  email_auth_decrypt: {
18834
19441
  Args: {
@@ -19180,12 +19787,6 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
19180
19787
  Args: never;
19181
19788
  Returns: string;
19182
19789
  };
19183
- get_work_order_tenant_id: {
19184
- Args: {
19185
- wo_id: string;
19186
- };
19187
- Returns: string;
19188
- };
19189
19790
  has_module_permission: {
19190
19791
  Args: {
19191
19792
  _min: string;
@@ -19219,6 +19820,13 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
19219
19820
  };
19220
19821
  Returns: boolean;
19221
19822
  };
19823
+ is_time_log_week_locked: {
19824
+ Args: {
19825
+ p_employee_id: string;
19826
+ p_start_time: string;
19827
+ };
19828
+ Returns: boolean;
19829
+ };
19222
19830
  is_user_admin: {
19223
19831
  Args: never;
19224
19832
  Returns: boolean;
@@ -19233,13 +19841,14 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
19233
19841
  };
19234
19842
  Returns: boolean;
19235
19843
  };
19236
- list_monteurs: {
19844
+ list_medewerkers: {
19237
19845
  Args: never;
19238
19846
  Returns: {
19239
19847
  avatar_url: string;
19240
19848
  display_name: string;
19241
19849
  email: string;
19242
19850
  id: string;
19851
+ roles: string[];
19243
19852
  }[];
19244
19853
  };
19245
19854
  list_my_planning_items: {
@@ -19730,6 +20339,65 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
19730
20339
  };
19731
20340
  Returns: number;
19732
20341
  };
20342
+ logistics_plan_claim: {
20343
+ Args: {
20344
+ p_limit?: number;
20345
+ };
20346
+ Returns: {
20347
+ attempts: number;
20348
+ id: string;
20349
+ order_id: string;
20350
+ }[];
20351
+ };
20352
+ logistics_plan_enqueue: {
20353
+ Args: {
20354
+ p_order_id: string;
20355
+ p_reason?: string;
20356
+ };
20357
+ Returns: undefined;
20358
+ };
20359
+ logistics_plan_ensure_event: {
20360
+ Args: {
20361
+ p_order_id: string;
20362
+ };
20363
+ Returns: boolean;
20364
+ };
20365
+ logistics_plan_finish: {
20366
+ Args: {
20367
+ p_error?: string;
20368
+ p_id: string;
20369
+ };
20370
+ Returns: undefined;
20371
+ };
20372
+ logistics_plan_impact_orders: {
20373
+ Args: {
20374
+ p_order_id: string;
20375
+ };
20376
+ Returns: {
20377
+ buffer_id: string;
20378
+ order_id: string;
20379
+ plan_date: string;
20380
+ }[];
20381
+ };
20382
+ logistics_plan_kick: {
20383
+ Args: never;
20384
+ Returns: undefined;
20385
+ };
20386
+ logistics_plan_prune: {
20387
+ Args: never;
20388
+ Returns: number;
20389
+ };
20390
+ logistics_plan_release_stale: {
20391
+ Args: never;
20392
+ Returns: number;
20393
+ };
20394
+ logistics_plan_setting: {
20395
+ Args: {
20396
+ p_default: number;
20397
+ p_key: string;
20398
+ };
20399
+ Returns: number;
20400
+ };
19733
20401
  logistics_queue_capacity_email: {
19734
20402
  Args: {
19735
20403
  p_alert_id: string;
@@ -19971,6 +20639,7 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
19971
20639
  my_module_permissions: {
19972
20640
  Args: never;
19973
20641
  Returns: {
20642
+ feature_id: string;
19974
20643
  module_id: string;
19975
20644
  permission: string;
19976
20645
  }[];
@@ -20851,6 +21520,16 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
20851
21520
  };
20852
21521
  Returns: string[];
20853
21522
  };
21523
+ switch_time_log: {
21524
+ Args: {
21525
+ p_employee_id: string;
21526
+ p_start_lat?: number;
21527
+ p_start_lng?: number;
21528
+ p_type: string;
21529
+ p_work_order_id?: string;
21530
+ };
21531
+ Returns: import("../integrations/supabase/types").Json;
21532
+ };
20854
21533
  sync_all_layer_stocks: {
20855
21534
  Args: never;
20856
21535
  Returns: undefined;
@@ -20901,6 +21580,24 @@ export declare const getOrderPickupMoment: import("@tanstack/start-client-core")
20901
21580
  };
20902
21581
  Returns: boolean;
20903
21582
  };
21583
+ twinfield_cron_lock_acquire: {
21584
+ Args: {
21585
+ _job_name: string;
21586
+ _stale_seconds?: number;
21587
+ };
21588
+ Returns: boolean;
21589
+ };
21590
+ twinfield_cron_lock_release: {
21591
+ Args: {
21592
+ _error?: string;
21593
+ _job_name: string;
21594
+ };
21595
+ Returns: undefined;
21596
+ };
21597
+ twinfield_prune_push_queue: {
21598
+ Args: never;
21599
+ Returns: number;
21600
+ };
20904
21601
  twinfield_register_cron: {
20905
21602
  Args: {
20906
21603
  apikey?: string;
@@ -21848,6 +22545,126 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
21848
22545
  };
21849
22546
  Relationships: [];
21850
22547
  };
22548
+ cao_holidays: {
22549
+ Row: {
22550
+ created_at: string;
22551
+ description: string | null;
22552
+ holiday_date: string;
22553
+ id: string;
22554
+ updated_at: string;
22555
+ };
22556
+ Insert: {
22557
+ created_at?: string;
22558
+ description?: string | null;
22559
+ holiday_date: string;
22560
+ id?: string;
22561
+ updated_at?: string;
22562
+ };
22563
+ Update: {
22564
+ created_at?: string;
22565
+ description?: string | null;
22566
+ holiday_date?: string;
22567
+ id?: string;
22568
+ updated_at?: string;
22569
+ };
22570
+ Relationships: [];
22571
+ };
22572
+ cao_settings: {
22573
+ Row: {
22574
+ auto_break_after_hours: number;
22575
+ auto_break_minutes: number;
22576
+ auto_break_unpaid: boolean;
22577
+ auto_stop_after_hours: number;
22578
+ callout_fee: number;
22579
+ created_at: string;
22580
+ daily_regular_hours: number;
22581
+ default_hourly_rate: number;
22582
+ id: string;
22583
+ materials_markup_percent: number;
22584
+ max_daily_hours: number;
22585
+ max_weekly_hours: number;
22586
+ meal_allowance_amount: number;
22587
+ overtime_pct_178: number;
22588
+ overtime_pct_189: number;
22589
+ overtime_pct_212: number;
22590
+ reminder_after_hours: number;
22591
+ standby_evening_amount: number;
22592
+ standby_weekend_amount: number;
22593
+ travel_cost_per_km: number | null;
22594
+ travel_cost_threshold_km: number | null;
22595
+ travel_counts_as_work: boolean;
22596
+ travel_hourly_rate: number;
22597
+ travel_rate_per_hour: number;
22598
+ travel_threshold_minutes: number;
22599
+ updated_at: string;
22600
+ weekend_always_212: boolean;
22601
+ window_end: string;
22602
+ window_start: string;
22603
+ };
22604
+ Insert: {
22605
+ auto_break_after_hours?: number;
22606
+ auto_break_minutes?: number;
22607
+ auto_break_unpaid?: boolean;
22608
+ auto_stop_after_hours?: number;
22609
+ callout_fee?: number;
22610
+ created_at?: string;
22611
+ daily_regular_hours?: number;
22612
+ default_hourly_rate?: number;
22613
+ id?: string;
22614
+ materials_markup_percent?: number;
22615
+ max_daily_hours?: number;
22616
+ max_weekly_hours?: number;
22617
+ meal_allowance_amount?: number;
22618
+ overtime_pct_178?: number;
22619
+ overtime_pct_189?: number;
22620
+ overtime_pct_212?: number;
22621
+ reminder_after_hours?: number;
22622
+ standby_evening_amount?: number;
22623
+ standby_weekend_amount?: number;
22624
+ travel_cost_per_km?: number | null;
22625
+ travel_cost_threshold_km?: number | null;
22626
+ travel_counts_as_work?: boolean;
22627
+ travel_hourly_rate?: number;
22628
+ travel_rate_per_hour?: number;
22629
+ travel_threshold_minutes?: number;
22630
+ updated_at?: string;
22631
+ weekend_always_212?: boolean;
22632
+ window_end?: string;
22633
+ window_start?: string;
22634
+ };
22635
+ Update: {
22636
+ auto_break_after_hours?: number;
22637
+ auto_break_minutes?: number;
22638
+ auto_break_unpaid?: boolean;
22639
+ auto_stop_after_hours?: number;
22640
+ callout_fee?: number;
22641
+ created_at?: string;
22642
+ daily_regular_hours?: number;
22643
+ default_hourly_rate?: number;
22644
+ id?: string;
22645
+ materials_markup_percent?: number;
22646
+ max_daily_hours?: number;
22647
+ max_weekly_hours?: number;
22648
+ meal_allowance_amount?: number;
22649
+ overtime_pct_178?: number;
22650
+ overtime_pct_189?: number;
22651
+ overtime_pct_212?: number;
22652
+ reminder_after_hours?: number;
22653
+ standby_evening_amount?: number;
22654
+ standby_weekend_amount?: number;
22655
+ travel_cost_per_km?: number | null;
22656
+ travel_cost_threshold_km?: number | null;
22657
+ travel_counts_as_work?: boolean;
22658
+ travel_hourly_rate?: number;
22659
+ travel_rate_per_hour?: number;
22660
+ travel_threshold_minutes?: number;
22661
+ updated_at?: string;
22662
+ weekend_always_212?: boolean;
22663
+ window_end?: string;
22664
+ window_start?: string;
22665
+ };
22666
+ Relationships: [];
22667
+ };
21851
22668
  carrier_shipping_rates: {
21852
22669
  Row: {
21853
22670
  carrier_id: string;
@@ -28742,7 +29559,6 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
28742
29559
  start_date: string;
28743
29560
  start_time: string | null;
28744
29561
  status: string;
28745
- tenant_id: string;
28746
29562
  updated_at: string;
28747
29563
  user_id: string;
28748
29564
  };
@@ -28760,7 +29576,6 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
28760
29576
  start_date: string;
28761
29577
  start_time?: string | null;
28762
29578
  status?: string;
28763
- tenant_id?: string;
28764
29579
  updated_at?: string;
28765
29580
  user_id: string;
28766
29581
  };
@@ -28778,7 +29593,6 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
28778
29593
  start_date?: string;
28779
29594
  start_time?: string | null;
28780
29595
  status?: string;
28781
- tenant_id?: string;
28782
29596
  updated_at?: string;
28783
29597
  user_id?: string;
28784
29598
  };
@@ -28786,13 +29600,13 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
28786
29600
  foreignKeyName: "leave_requests_monteur_id_fkey";
28787
29601
  columns: ["monteur_id"];
28788
29602
  isOneToOne: false;
28789
- referencedRelation: "monteurs";
29603
+ referencedRelation: "profiles";
28790
29604
  referencedColumns: ["id"];
28791
29605
  }, {
28792
29606
  foreignKeyName: "leave_requests_user_id_fkey";
28793
29607
  columns: ["user_id"];
28794
29608
  isOneToOne: false;
28795
- referencedRelation: "monteurs";
29609
+ referencedRelation: "profiles";
28796
29610
  referencedColumns: ["id"];
28797
29611
  }];
28798
29612
  };
@@ -29660,6 +30474,45 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
29660
30474
  };
29661
30475
  Relationships: [];
29662
30476
  };
30477
+ logistics_plan_queue: {
30478
+ Row: {
30479
+ attempts: number;
30480
+ claimed_at: string | null;
30481
+ enqueued_at: string;
30482
+ error: string | null;
30483
+ id: string;
30484
+ next_attempt_at: string;
30485
+ order_id: string;
30486
+ reason: string;
30487
+ status: string;
30488
+ updated_at: string;
30489
+ };
30490
+ Insert: {
30491
+ attempts?: number;
30492
+ claimed_at?: string | null;
30493
+ enqueued_at?: string;
30494
+ error?: string | null;
30495
+ id?: string;
30496
+ next_attempt_at?: string;
30497
+ order_id: string;
30498
+ reason?: string;
30499
+ status?: string;
30500
+ updated_at?: string;
30501
+ };
30502
+ Update: {
30503
+ attempts?: number;
30504
+ claimed_at?: string | null;
30505
+ enqueued_at?: string;
30506
+ error?: string | null;
30507
+ id?: string;
30508
+ next_attempt_at?: string;
30509
+ order_id?: string;
30510
+ reason?: string;
30511
+ status?: string;
30512
+ updated_at?: string;
30513
+ };
30514
+ Relationships: [];
30515
+ };
29663
30516
  logistics_plan_runs: {
29664
30517
  Row: {
29665
30518
  created_at: string;
@@ -29735,6 +30588,24 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
29735
30588
  referencedColumns: ["id"];
29736
30589
  }];
29737
30590
  };
30591
+ logistics_plan_settings: {
30592
+ Row: {
30593
+ key: string;
30594
+ updated_at: string;
30595
+ value: string;
30596
+ };
30597
+ Insert: {
30598
+ key: string;
30599
+ updated_at?: string;
30600
+ value: string;
30601
+ };
30602
+ Update: {
30603
+ key?: string;
30604
+ updated_at?: string;
30605
+ value?: string;
30606
+ };
30607
+ Relationships: [];
30608
+ };
29738
30609
  logistics_rebuffer_state: {
29739
30610
  Row: {
29740
30611
  created_at: string;
@@ -30890,6 +31761,90 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
30890
31761
  };
30891
31762
  Relationships: [];
30892
31763
  };
31764
+ material_usage: {
31765
+ Row: {
31766
+ created_at: string;
31767
+ id: string;
31768
+ material_name: string;
31769
+ monteur_id: string | null;
31770
+ price_at_time: number;
31771
+ quantity_used: number;
31772
+ updated_at: string;
31773
+ van_inventory_id: string | null;
31774
+ work_order_id: string;
31775
+ };
31776
+ Insert: {
31777
+ created_at?: string;
31778
+ id?: string;
31779
+ material_name: string;
31780
+ monteur_id?: string | null;
31781
+ price_at_time?: number;
31782
+ quantity_used?: number;
31783
+ updated_at?: string;
31784
+ van_inventory_id?: string | null;
31785
+ work_order_id: string;
31786
+ };
31787
+ Update: {
31788
+ created_at?: string;
31789
+ id?: string;
31790
+ material_name?: string;
31791
+ monteur_id?: string | null;
31792
+ price_at_time?: number;
31793
+ quantity_used?: number;
31794
+ updated_at?: string;
31795
+ van_inventory_id?: string | null;
31796
+ work_order_id?: string;
31797
+ };
31798
+ Relationships: [{
31799
+ foreignKeyName: "material_usage_monteur_id_fkey";
31800
+ columns: ["monteur_id"];
31801
+ isOneToOne: false;
31802
+ referencedRelation: "profiles";
31803
+ referencedColumns: ["id"];
31804
+ }, {
31805
+ foreignKeyName: "material_usage_van_inventory_id_fkey";
31806
+ columns: ["van_inventory_id"];
31807
+ isOneToOne: false;
31808
+ referencedRelation: "van_inventories";
31809
+ referencedColumns: ["id"];
31810
+ }, {
31811
+ foreignKeyName: "material_usage_work_order_id_fkey";
31812
+ columns: ["work_order_id"];
31813
+ isOneToOne: false;
31814
+ referencedRelation: "work_orders";
31815
+ referencedColumns: ["id"];
31816
+ }];
31817
+ };
31818
+ module_features: {
31819
+ Row: {
31820
+ created_at: string;
31821
+ feature_id: string;
31822
+ id: string;
31823
+ is_active: boolean;
31824
+ last_seen_at: string;
31825
+ module_id: string;
31826
+ name: string;
31827
+ };
31828
+ Insert: {
31829
+ created_at?: string;
31830
+ feature_id: string;
31831
+ id?: string;
31832
+ is_active?: boolean;
31833
+ last_seen_at?: string;
31834
+ module_id: string;
31835
+ name: string;
31836
+ };
31837
+ Update: {
31838
+ created_at?: string;
31839
+ feature_id?: string;
31840
+ id?: string;
31841
+ is_active?: boolean;
31842
+ last_seen_at?: string;
31843
+ module_id?: string;
31844
+ name?: string;
31845
+ };
31846
+ Relationships: [];
31847
+ };
30893
31848
  module_permissions: {
30894
31849
  Row: {
30895
31850
  created_at: string;
@@ -30920,6 +31875,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
30920
31875
  module_registry: {
30921
31876
  Row: {
30922
31877
  created_at: string;
31878
+ enforce: boolean;
30923
31879
  is_active: boolean;
30924
31880
  last_seen_at: string;
30925
31881
  module_id: string;
@@ -30929,6 +31885,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
30929
31885
  };
30930
31886
  Insert: {
30931
31887
  created_at?: string;
31888
+ enforce?: boolean;
30932
31889
  is_active?: boolean;
30933
31890
  last_seen_at?: string;
30934
31891
  module_id: string;
@@ -30938,6 +31895,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
30938
31895
  };
30939
31896
  Update: {
30940
31897
  created_at?: string;
31898
+ enforce?: boolean;
30941
31899
  is_active?: boolean;
30942
31900
  last_seen_at?: string;
30943
31901
  module_id?: string;
@@ -30998,63 +31956,6 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
30998
31956
  };
30999
31957
  Relationships: [];
31000
31958
  };
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
31959
  nmbrs_component_mapping: {
31059
31960
  Row: {
31060
31961
  created_at: string;
@@ -31125,13 +32026,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
31125
32026
  nmbrs_employee_number?: string;
31126
32027
  updated_at?: string;
31127
32028
  };
31128
- Relationships: [{
31129
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
31130
- columns: ["monteur_id"];
31131
- isOneToOne: true;
31132
- referencedRelation: "monteurs";
31133
- referencedColumns: ["id"];
31134
- }];
32029
+ Relationships: [];
31135
32030
  };
31136
32031
  nmbrs_export_lines: {
31137
32032
  Row: {
@@ -31180,12 +32075,6 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
31180
32075
  wage_code?: string;
31181
32076
  };
31182
32077
  Relationships: [{
31183
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
31184
- columns: ["monteur_id"];
31185
- isOneToOne: false;
31186
- referencedRelation: "monteurs";
31187
- referencedColumns: ["id"];
31188
- }, {
31189
32078
  foreignKeyName: "nmbrs_export_lines_run_id_fkey";
31190
32079
  columns: ["run_id"];
31191
32080
  isOneToOne: false;
@@ -32013,6 +32902,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
32013
32902
  error_message: string | null;
32014
32903
  id: string;
32015
32904
  invoice_number: string | null;
32905
+ next_attempt_at: string;
32016
32906
  order_id: string;
32017
32907
  processed_at: string | null;
32018
32908
  status: string;
@@ -32024,6 +32914,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
32024
32914
  error_message?: string | null;
32025
32915
  id?: string;
32026
32916
  invoice_number?: string | null;
32917
+ next_attempt_at?: string;
32027
32918
  order_id: string;
32028
32919
  processed_at?: string | null;
32029
32920
  status?: string;
@@ -32035,6 +32926,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
32035
32926
  error_message?: string | null;
32036
32927
  id?: string;
32037
32928
  invoice_number?: string | null;
32929
+ next_attempt_at?: string;
32038
32930
  order_id?: string;
32039
32931
  processed_at?: string | null;
32040
32932
  status?: string;
@@ -33573,6 +34465,9 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
33573
34465
  created_at: string;
33574
34466
  id: string;
33575
34467
  laatst_gezien: string;
34468
+ laatste_fout: string | null;
34469
+ laatste_request_id: number | null;
34470
+ mislukte_posts: number;
33576
34471
  tick_sleutel: string;
33577
34472
  updated_at: string;
33578
34473
  };
@@ -33582,6 +34477,9 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
33582
34477
  created_at?: string;
33583
34478
  id?: string;
33584
34479
  laatst_gezien?: string;
34480
+ laatste_fout?: string | null;
34481
+ laatste_request_id?: number | null;
34482
+ mislukte_posts?: number;
33585
34483
  tick_sleutel?: string;
33586
34484
  updated_at?: string;
33587
34485
  };
@@ -33591,6 +34489,9 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
33591
34489
  created_at?: string;
33592
34490
  id?: string;
33593
34491
  laatst_gezien?: string;
34492
+ laatste_fout?: string | null;
34493
+ laatste_request_id?: number | null;
34494
+ mislukte_posts?: number;
33594
34495
  tick_sleutel?: string;
33595
34496
  updated_at?: string;
33596
34497
  };
@@ -35099,6 +36000,96 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
35099
36000
  referencedColumns: ["id"];
35100
36001
  }];
35101
36002
  };
36003
+ role_assignments: {
36004
+ Row: {
36005
+ created_at: string;
36006
+ id: string;
36007
+ role_id: string;
36008
+ user_id: string;
36009
+ };
36010
+ Insert: {
36011
+ created_at?: string;
36012
+ id?: string;
36013
+ role_id: string;
36014
+ user_id: string;
36015
+ };
36016
+ Update: {
36017
+ created_at?: string;
36018
+ id?: string;
36019
+ role_id?: string;
36020
+ user_id?: string;
36021
+ };
36022
+ Relationships: [{
36023
+ foreignKeyName: "role_assignments_role_id_fkey";
36024
+ columns: ["role_id"];
36025
+ isOneToOne: false;
36026
+ referencedRelation: "roles";
36027
+ referencedColumns: ["id"];
36028
+ }];
36029
+ };
36030
+ role_permissions: {
36031
+ Row: {
36032
+ can_edit: boolean;
36033
+ can_view: boolean;
36034
+ feature_id: string;
36035
+ id: string;
36036
+ module_id: string;
36037
+ role_id: string;
36038
+ updated_at: string;
36039
+ };
36040
+ Insert: {
36041
+ can_edit?: boolean;
36042
+ can_view?: boolean;
36043
+ feature_id?: string;
36044
+ id?: string;
36045
+ module_id: string;
36046
+ role_id: string;
36047
+ updated_at?: string;
36048
+ };
36049
+ Update: {
36050
+ can_edit?: boolean;
36051
+ can_view?: boolean;
36052
+ feature_id?: string;
36053
+ id?: string;
36054
+ module_id?: string;
36055
+ role_id?: string;
36056
+ updated_at?: string;
36057
+ };
36058
+ Relationships: [{
36059
+ foreignKeyName: "role_permissions_role_id_fkey";
36060
+ columns: ["role_id"];
36061
+ isOneToOne: false;
36062
+ referencedRelation: "roles";
36063
+ referencedColumns: ["id"];
36064
+ }];
36065
+ };
36066
+ roles: {
36067
+ Row: {
36068
+ created_at: string;
36069
+ id: string;
36070
+ is_protected: boolean;
36071
+ key: string;
36072
+ name: string;
36073
+ updated_at: string;
36074
+ };
36075
+ Insert: {
36076
+ created_at?: string;
36077
+ id?: string;
36078
+ is_protected?: boolean;
36079
+ key: string;
36080
+ name: string;
36081
+ updated_at?: string;
36082
+ };
36083
+ Update: {
36084
+ created_at?: string;
36085
+ id?: string;
36086
+ is_protected?: boolean;
36087
+ key?: string;
36088
+ name?: string;
36089
+ updated_at?: string;
36090
+ };
36091
+ Relationships: [];
36092
+ };
35102
36093
  rooms: {
35103
36094
  Row: {
35104
36095
  capacity: number;
@@ -35768,6 +36759,54 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
35768
36759
  };
35769
36760
  Relationships: [];
35770
36761
  };
36762
+ time_compensation_entries: {
36763
+ Row: {
36764
+ created_at: string;
36765
+ employee_id: string;
36766
+ entry_date: string;
36767
+ id: string;
36768
+ km: number;
36769
+ meal_allowance: number;
36770
+ notes: string | null;
36771
+ standby_evening: number;
36772
+ standby_weekend: number;
36773
+ tvt_change: number;
36774
+ updated_at: string;
36775
+ };
36776
+ Insert: {
36777
+ created_at?: string;
36778
+ employee_id: string;
36779
+ entry_date: string;
36780
+ id?: string;
36781
+ km?: number;
36782
+ meal_allowance?: number;
36783
+ notes?: string | null;
36784
+ standby_evening?: number;
36785
+ standby_weekend?: number;
36786
+ tvt_change?: number;
36787
+ updated_at?: string;
36788
+ };
36789
+ Update: {
36790
+ created_at?: string;
36791
+ employee_id?: string;
36792
+ entry_date?: string;
36793
+ id?: string;
36794
+ km?: number;
36795
+ meal_allowance?: number;
36796
+ notes?: string | null;
36797
+ standby_evening?: number;
36798
+ standby_weekend?: number;
36799
+ tvt_change?: number;
36800
+ updated_at?: string;
36801
+ };
36802
+ Relationships: [{
36803
+ foreignKeyName: "time_compensation_entries_employee_id_fkey";
36804
+ columns: ["employee_id"];
36805
+ isOneToOne: false;
36806
+ referencedRelation: "profiles";
36807
+ referencedColumns: ["id"];
36808
+ }];
36809
+ };
35771
36810
  time_entries: {
35772
36811
  Row: {
35773
36812
  created_at: string;
@@ -35802,65 +36841,170 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
35802
36841
  undertime?: number;
35803
36842
  updated_at?: string;
35804
36843
  };
36844
+ Relationships: [];
36845
+ };
36846
+ time_log_week_approvals: {
36847
+ Row: {
36848
+ approved_at: string | null;
36849
+ approved_by: string | null;
36850
+ created_at: string;
36851
+ employee_id: string;
36852
+ id: string;
36853
+ locked: boolean;
36854
+ notes: string | null;
36855
+ status: string;
36856
+ submitted_at: string | null;
36857
+ updated_at: string;
36858
+ week_start: string;
36859
+ };
36860
+ Insert: {
36861
+ approved_at?: string | null;
36862
+ approved_by?: string | null;
36863
+ created_at?: string;
36864
+ employee_id: string;
36865
+ id?: string;
36866
+ locked?: boolean;
36867
+ notes?: string | null;
36868
+ status?: string;
36869
+ submitted_at?: string | null;
36870
+ updated_at?: string;
36871
+ week_start: string;
36872
+ };
36873
+ Update: {
36874
+ approved_at?: string | null;
36875
+ approved_by?: string | null;
36876
+ created_at?: string;
36877
+ employee_id?: string;
36878
+ id?: string;
36879
+ locked?: boolean;
36880
+ notes?: string | null;
36881
+ status?: string;
36882
+ submitted_at?: string | null;
36883
+ updated_at?: string;
36884
+ week_start?: string;
36885
+ };
35805
36886
  Relationships: [{
35806
- foreignKeyName: "time_entries_employee_id_fkey";
36887
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
35807
36888
  columns: ["employee_id"];
35808
36889
  isOneToOne: false;
35809
- referencedRelation: "monteurs";
36890
+ referencedRelation: "profiles";
35810
36891
  referencedColumns: ["id"];
35811
36892
  }];
35812
36893
  };
35813
36894
  time_logs: {
35814
36895
  Row: {
36896
+ auto_stop_reason: string | null;
36897
+ auto_stopped: boolean;
35815
36898
  created_at: string;
36899
+ current_latitude: number | null;
36900
+ current_longitude: number | null;
36901
+ current_position_updated_at: string | null;
35816
36902
  employee_id: string;
36903
+ end_latitude: number | null;
36904
+ end_longitude: number | null;
35817
36905
  end_time: string | null;
36906
+ eta_distance_km: number | null;
36907
+ eta_minutes: number | null;
36908
+ eta_updated_at: string | null;
36909
+ hour_category: string | null;
35818
36910
  id: string;
36911
+ last_reminder_at: string | null;
35819
36912
  notes: string | null;
35820
36913
  overtime_hours: number;
35821
36914
  overtime_type: string | null;
35822
36915
  regular_hours: number;
36916
+ reminder_count: number;
36917
+ requires_review: boolean;
36918
+ start_latitude: number | null;
36919
+ start_longitude: number | null;
35823
36920
  start_time: string;
35824
36921
  travel_cost: number | null;
35825
36922
  travel_distance_km: number | null;
36923
+ travel_duration_min: number | null;
36924
+ travel_time_minutes: number | null;
35826
36925
  type: string;
35827
36926
  updated_at: string;
36927
+ work_order_id: string | null;
35828
36928
  };
35829
36929
  Insert: {
36930
+ auto_stop_reason?: string | null;
36931
+ auto_stopped?: boolean;
35830
36932
  created_at?: string;
36933
+ current_latitude?: number | null;
36934
+ current_longitude?: number | null;
36935
+ current_position_updated_at?: string | null;
35831
36936
  employee_id: string;
36937
+ end_latitude?: number | null;
36938
+ end_longitude?: number | null;
35832
36939
  end_time?: string | null;
36940
+ eta_distance_km?: number | null;
36941
+ eta_minutes?: number | null;
36942
+ eta_updated_at?: string | null;
36943
+ hour_category?: string | null;
35833
36944
  id?: string;
36945
+ last_reminder_at?: string | null;
35834
36946
  notes?: string | null;
35835
36947
  overtime_hours?: number;
35836
36948
  overtime_type?: string | null;
35837
36949
  regular_hours?: number;
36950
+ reminder_count?: number;
36951
+ requires_review?: boolean;
36952
+ start_latitude?: number | null;
36953
+ start_longitude?: number | null;
35838
36954
  start_time?: string;
35839
36955
  travel_cost?: number | null;
35840
36956
  travel_distance_km?: number | null;
36957
+ travel_duration_min?: number | null;
36958
+ travel_time_minutes?: number | null;
35841
36959
  type: string;
35842
36960
  updated_at?: string;
36961
+ work_order_id?: string | null;
35843
36962
  };
35844
36963
  Update: {
36964
+ auto_stop_reason?: string | null;
36965
+ auto_stopped?: boolean;
35845
36966
  created_at?: string;
36967
+ current_latitude?: number | null;
36968
+ current_longitude?: number | null;
36969
+ current_position_updated_at?: string | null;
35846
36970
  employee_id?: string;
36971
+ end_latitude?: number | null;
36972
+ end_longitude?: number | null;
35847
36973
  end_time?: string | null;
36974
+ eta_distance_km?: number | null;
36975
+ eta_minutes?: number | null;
36976
+ eta_updated_at?: string | null;
36977
+ hour_category?: string | null;
35848
36978
  id?: string;
36979
+ last_reminder_at?: string | null;
35849
36980
  notes?: string | null;
35850
36981
  overtime_hours?: number;
35851
36982
  overtime_type?: string | null;
35852
36983
  regular_hours?: number;
36984
+ reminder_count?: number;
36985
+ requires_review?: boolean;
36986
+ start_latitude?: number | null;
36987
+ start_longitude?: number | null;
35853
36988
  start_time?: string;
35854
36989
  travel_cost?: number | null;
35855
36990
  travel_distance_km?: number | null;
36991
+ travel_duration_min?: number | null;
36992
+ travel_time_minutes?: number | null;
35856
36993
  type?: string;
35857
36994
  updated_at?: string;
36995
+ work_order_id?: string | null;
35858
36996
  };
35859
36997
  Relationships: [{
35860
36998
  foreignKeyName: "time_logs_employee_id_fkey";
35861
36999
  columns: ["employee_id"];
35862
37000
  isOneToOne: false;
35863
- referencedRelation: "monteurs";
37001
+ referencedRelation: "profiles";
37002
+ referencedColumns: ["id"];
37003
+ }, {
37004
+ foreignKeyName: "time_logs_work_order_id_fkey";
37005
+ columns: ["work_order_id"];
37006
+ isOneToOne: false;
37007
+ referencedRelation: "work_orders";
35864
37008
  referencedColumns: ["id"];
35865
37009
  }];
35866
37010
  };
@@ -35899,7 +37043,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
35899
37043
  foreignKeyName: "time_off_entries_employee_id_fkey";
35900
37044
  columns: ["employee_id"];
35901
37045
  isOneToOne: false;
35902
- referencedRelation: "monteurs";
37046
+ referencedRelation: "profiles";
35903
37047
  referencedColumns: ["id"];
35904
37048
  }];
35905
37049
  };
@@ -36209,6 +37353,39 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
36209
37353
  };
36210
37354
  Relationships: [];
36211
37355
  };
37356
+ twinfield_cron_locks: {
37357
+ Row: {
37358
+ created_at: string;
37359
+ heartbeat_at: string;
37360
+ job_name: string;
37361
+ last_error: string | null;
37362
+ last_finished_at: string | null;
37363
+ locked_at: string;
37364
+ run_id: string;
37365
+ updated_at: string;
37366
+ };
37367
+ Insert: {
37368
+ created_at?: string;
37369
+ heartbeat_at?: string;
37370
+ job_name: string;
37371
+ last_error?: string | null;
37372
+ last_finished_at?: string | null;
37373
+ locked_at?: string;
37374
+ run_id?: string;
37375
+ updated_at?: string;
37376
+ };
37377
+ Update: {
37378
+ created_at?: string;
37379
+ heartbeat_at?: string;
37380
+ job_name?: string;
37381
+ last_error?: string | null;
37382
+ last_finished_at?: string | null;
37383
+ locked_at?: string;
37384
+ run_id?: string;
37385
+ updated_at?: string;
37386
+ };
37387
+ Relationships: [];
37388
+ };
36212
37389
  twinfield_customers: {
36213
37390
  Row: {
36214
37391
  address: string | null;
@@ -36809,6 +37986,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
36809
37986
  twinfield_push_queue: {
36810
37987
  Row: {
36811
37988
  action: string;
37989
+ attempt_started_at: string | null;
36812
37990
  attempts: number;
36813
37991
  connection_id: string | null;
36814
37992
  created_at: string;
@@ -36825,6 +38003,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
36825
38003
  };
36826
38004
  Insert: {
36827
38005
  action?: string;
38006
+ attempt_started_at?: string | null;
36828
38007
  attempts?: number;
36829
38008
  connection_id?: string | null;
36830
38009
  created_at?: string;
@@ -36841,6 +38020,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
36841
38020
  };
36842
38021
  Update: {
36843
38022
  action?: string;
38023
+ attempt_started_at?: string | null;
36844
38024
  attempts?: number;
36845
38025
  connection_id?: string | null;
36846
38026
  created_at?: string;
@@ -37038,13 +38218,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
37038
38218
  workday_end?: string | null;
37039
38219
  workday_start?: string | null;
37040
38220
  };
37041
- Relationships: [{
37042
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
37043
- columns: ["monteur_id"];
37044
- isOneToOne: true;
37045
- referencedRelation: "monteurs";
37046
- referencedColumns: ["id"];
37047
- }];
38221
+ Relationships: [];
37048
38222
  };
37049
38223
  uren_entries: {
37050
38224
  Row: {
@@ -37090,12 +38264,6 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
37090
38264
  werkbon_id?: string | null;
37091
38265
  };
37092
38266
  Relationships: [{
37093
- foreignKeyName: "uren_entries_monteur_id_fkey";
37094
- columns: ["monteur_id"];
37095
- isOneToOne: false;
37096
- referencedRelation: "monteurs";
37097
- referencedColumns: ["id"];
37098
- }, {
37099
38267
  foreignKeyName: "uren_entries_werkbon_id_fkey";
37100
38268
  columns: ["werkbon_id"];
37101
38269
  isOneToOne: false;
@@ -37563,17 +38731,12 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
37563
38731
  submitted_at?: string | null;
37564
38732
  updated_at?: string;
37565
38733
  };
37566
- Relationships: [{
37567
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
37568
- columns: ["monteur_id"];
37569
- isOneToOne: false;
37570
- referencedRelation: "monteurs";
37571
- referencedColumns: ["id"];
37572
- }];
38734
+ Relationships: [];
37573
38735
  };
37574
38736
  user_module_permissions: {
37575
38737
  Row: {
37576
38738
  created_at: string;
38739
+ feature_id: string;
37577
38740
  id: string;
37578
38741
  module_id: string;
37579
38742
  permission: string;
@@ -37582,6 +38745,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
37582
38745
  };
37583
38746
  Insert: {
37584
38747
  created_at?: string;
38748
+ feature_id?: string;
37585
38749
  id?: string;
37586
38750
  module_id: string;
37587
38751
  permission: string;
@@ -37590,6 +38754,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
37590
38754
  };
37591
38755
  Update: {
37592
38756
  created_at?: string;
38757
+ feature_id?: string;
37593
38758
  id?: string;
37594
38759
  module_id?: string;
37595
38760
  permission?: string;
@@ -37625,6 +38790,51 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
37625
38790
  referencedColumns: ["id"];
37626
38791
  }];
37627
38792
  };
38793
+ van_inventories: {
38794
+ Row: {
38795
+ barcode: string | null;
38796
+ created_at: string;
38797
+ id: string;
38798
+ monteur_id: string | null;
38799
+ price_per_unit: number;
38800
+ product_name: string;
38801
+ quantity_current: number;
38802
+ quantity_min: number;
38803
+ unit: string;
38804
+ updated_at: string;
38805
+ };
38806
+ Insert: {
38807
+ barcode?: string | null;
38808
+ created_at?: string;
38809
+ id?: string;
38810
+ monteur_id?: string | null;
38811
+ price_per_unit?: number;
38812
+ product_name: string;
38813
+ quantity_current?: number;
38814
+ quantity_min?: number;
38815
+ unit?: string;
38816
+ updated_at?: string;
38817
+ };
38818
+ Update: {
38819
+ barcode?: string | null;
38820
+ created_at?: string;
38821
+ id?: string;
38822
+ monteur_id?: string | null;
38823
+ price_per_unit?: number;
38824
+ product_name?: string;
38825
+ quantity_current?: number;
38826
+ quantity_min?: number;
38827
+ unit?: string;
38828
+ updated_at?: string;
38829
+ };
38830
+ Relationships: [{
38831
+ foreignKeyName: "van_inventories_monteur_id_fkey";
38832
+ columns: ["monteur_id"];
38833
+ isOneToOne: false;
38834
+ referencedRelation: "profiles";
38835
+ referencedColumns: ["id"];
38836
+ }];
38837
+ };
37628
38838
  voorraad_custom_fields: {
37629
38839
  Row: {
37630
38840
  created_at: string;
@@ -38575,7 +39785,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
38575
39785
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
38576
39786
  columns: ["monteur_id"];
38577
39787
  isOneToOne: false;
38578
- referencedRelation: "monteurs";
39788
+ referencedRelation: "profiles";
38579
39789
  referencedColumns: ["id"];
38580
39790
  }, {
38581
39791
  foreignKeyName: "work_order_monteurs_work_order_id_fkey";
@@ -38585,6 +39795,60 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
38585
39795
  referencedColumns: ["id"];
38586
39796
  }];
38587
39797
  };
39798
+ work_order_photos: {
39799
+ Row: {
39800
+ ai_caption: string | null;
39801
+ ai_categorized_at: string | null;
39802
+ ai_labels: import("../integrations/supabase/types").Json | null;
39803
+ caption: string | null;
39804
+ created_at: string;
39805
+ id: string;
39806
+ monteur_id: string | null;
39807
+ photo_type: string;
39808
+ storage_path: string;
39809
+ updated_at: string;
39810
+ work_order_id: string;
39811
+ };
39812
+ Insert: {
39813
+ ai_caption?: string | null;
39814
+ ai_categorized_at?: string | null;
39815
+ ai_labels?: import("../integrations/supabase/types").Json | null;
39816
+ caption?: string | null;
39817
+ created_at?: string;
39818
+ id?: string;
39819
+ monteur_id?: string | null;
39820
+ photo_type?: string;
39821
+ storage_path: string;
39822
+ updated_at?: string;
39823
+ work_order_id: string;
39824
+ };
39825
+ Update: {
39826
+ ai_caption?: string | null;
39827
+ ai_categorized_at?: string | null;
39828
+ ai_labels?: import("../integrations/supabase/types").Json | null;
39829
+ caption?: string | null;
39830
+ created_at?: string;
39831
+ id?: string;
39832
+ monteur_id?: string | null;
39833
+ photo_type?: string;
39834
+ storage_path?: string;
39835
+ updated_at?: string;
39836
+ work_order_id?: string;
39837
+ };
39838
+ Relationships: [{
39839
+ foreignKeyName: "work_order_photos_monteur_id_fkey";
39840
+ columns: ["monteur_id"];
39841
+ isOneToOne: false;
39842
+ referencedRelation: "profiles";
39843
+ referencedColumns: ["id"];
39844
+ }, {
39845
+ foreignKeyName: "work_order_photos_work_order_id_fkey";
39846
+ columns: ["work_order_id"];
39847
+ isOneToOne: false;
39848
+ referencedRelation: "work_orders";
39849
+ referencedColumns: ["id"];
39850
+ }];
39851
+ };
38588
39852
  work_orders: {
38589
39853
  Row: {
38590
39854
  assigned_to: string | null;
@@ -38616,7 +39880,6 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
38616
39880
  scheduled_end_time: string | null;
38617
39881
  scheduled_start_time: string | null;
38618
39882
  status: string;
38619
- tenant_id: string;
38620
39883
  total_hours_worked: number | null;
38621
39884
  total_price: number | null;
38622
39885
  travel_time_minutes: number | null;
@@ -38654,7 +39917,6 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
38654
39917
  scheduled_end_time?: string | null;
38655
39918
  scheduled_start_time?: string | null;
38656
39919
  status?: string;
38657
- tenant_id: string;
38658
39920
  total_hours_worked?: number | null;
38659
39921
  total_price?: number | null;
38660
39922
  travel_time_minutes?: number | null;
@@ -38692,7 +39954,6 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
38692
39954
  scheduled_end_time?: string | null;
38693
39955
  scheduled_start_time?: string | null;
38694
39956
  status?: string;
38695
- tenant_id?: string;
38696
39957
  total_hours_worked?: number | null;
38697
39958
  total_price?: number | null;
38698
39959
  travel_time_minutes?: number | null;
@@ -38706,12 +39967,6 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
38706
39967
  isOneToOne: false;
38707
39968
  referencedRelation: "work_orders";
38708
39969
  referencedColumns: ["id"];
38709
- }, {
38710
- foreignKeyName: "work_orders_tenant_id_fkey";
38711
- columns: ["tenant_id"];
38712
- isOneToOne: false;
38713
- referencedRelation: "tenants";
38714
- referencedColumns: ["id"];
38715
39970
  }];
38716
39971
  };
38717
39972
  };
@@ -39396,6 +40651,19 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
39396
40651
  };
39397
40652
  Returns: undefined;
39398
40653
  };
40654
+ approve_mailbox_order_proposal: {
40655
+ Args: {
40656
+ p_custom_fields: import("../integrations/supabase/types").Json;
40657
+ p_customer_id: string;
40658
+ p_delivery_date: string;
40659
+ p_field_values?: import("../integrations/supabase/types").Json;
40660
+ p_lines: import("../integrations/supabase/types").Json;
40661
+ p_notes: string;
40662
+ p_proposal_id: string;
40663
+ p_reviewed_by: string;
40664
+ };
40665
+ Returns: import("../integrations/supabase/types").Json;
40666
+ };
39399
40667
  assign_cart_numbers: {
39400
40668
  Args: {
39401
40669
  p_carts: import("../integrations/supabase/types").Json;
@@ -39447,6 +40715,10 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
39447
40715
  };
39448
40716
  Returns: number;
39449
40717
  };
40718
+ can_manage_hours: {
40719
+ Args: never;
40720
+ Returns: boolean;
40721
+ };
39450
40722
  check_offer_product_available_stock: {
39451
40723
  Args: {
39452
40724
  p_campaign_product_id: string;
@@ -39636,6 +40908,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
39636
40908
  };
39637
40909
  Returns: {
39638
40910
  action: string;
40911
+ attempt_started_at: string | null;
39639
40912
  attempts: number;
39640
40913
  connection_id: string | null;
39641
40914
  created_at: string;
@@ -39723,6 +40996,30 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
39723
40996
  agent_naam: string;
39724
40997
  }[];
39725
40998
  };
40999
+ consume_van_inventory: {
41000
+ Args: {
41001
+ p_inventory_id: string;
41002
+ p_quantity: number;
41003
+ };
41004
+ Returns: {
41005
+ barcode: string | null;
41006
+ created_at: string;
41007
+ id: string;
41008
+ monteur_id: string | null;
41009
+ price_per_unit: number;
41010
+ product_name: string;
41011
+ quantity_current: number;
41012
+ quantity_min: number;
41013
+ unit: string;
41014
+ updated_at: string;
41015
+ };
41016
+ SetofOptions: {
41017
+ from: "*";
41018
+ to: "van_inventories";
41019
+ isOneToOne: true;
41020
+ isSetofReturn: false;
41021
+ };
41022
+ };
39726
41023
  control_get_todays_carts: {
39727
41024
  Args: never;
39728
41025
  Returns: {
@@ -39796,6 +41093,13 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
39796
41093
  _user_id: string;
39797
41094
  };
39798
41095
  Returns: string;
41096
+ } | {
41097
+ Args: {
41098
+ _feature_id: string;
41099
+ _module_id: string;
41100
+ _user_id: string;
41101
+ };
41102
+ Returns: string;
39799
41103
  };
39800
41104
  email_auth_decrypt: {
39801
41105
  Args: {
@@ -40147,12 +41451,6 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
40147
41451
  Args: never;
40148
41452
  Returns: string;
40149
41453
  };
40150
- get_work_order_tenant_id: {
40151
- Args: {
40152
- wo_id: string;
40153
- };
40154
- Returns: string;
40155
- };
40156
41454
  has_module_permission: {
40157
41455
  Args: {
40158
41456
  _min: string;
@@ -40186,6 +41484,13 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
40186
41484
  };
40187
41485
  Returns: boolean;
40188
41486
  };
41487
+ is_time_log_week_locked: {
41488
+ Args: {
41489
+ p_employee_id: string;
41490
+ p_start_time: string;
41491
+ };
41492
+ Returns: boolean;
41493
+ };
40189
41494
  is_user_admin: {
40190
41495
  Args: never;
40191
41496
  Returns: boolean;
@@ -40200,13 +41505,14 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
40200
41505
  };
40201
41506
  Returns: boolean;
40202
41507
  };
40203
- list_monteurs: {
41508
+ list_medewerkers: {
40204
41509
  Args: never;
40205
41510
  Returns: {
40206
41511
  avatar_url: string;
40207
41512
  display_name: string;
40208
41513
  email: string;
40209
41514
  id: string;
41515
+ roles: string[];
40210
41516
  }[];
40211
41517
  };
40212
41518
  list_my_planning_items: {
@@ -40697,6 +42003,65 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
40697
42003
  };
40698
42004
  Returns: number;
40699
42005
  };
42006
+ logistics_plan_claim: {
42007
+ Args: {
42008
+ p_limit?: number;
42009
+ };
42010
+ Returns: {
42011
+ attempts: number;
42012
+ id: string;
42013
+ order_id: string;
42014
+ }[];
42015
+ };
42016
+ logistics_plan_enqueue: {
42017
+ Args: {
42018
+ p_order_id: string;
42019
+ p_reason?: string;
42020
+ };
42021
+ Returns: undefined;
42022
+ };
42023
+ logistics_plan_ensure_event: {
42024
+ Args: {
42025
+ p_order_id: string;
42026
+ };
42027
+ Returns: boolean;
42028
+ };
42029
+ logistics_plan_finish: {
42030
+ Args: {
42031
+ p_error?: string;
42032
+ p_id: string;
42033
+ };
42034
+ Returns: undefined;
42035
+ };
42036
+ logistics_plan_impact_orders: {
42037
+ Args: {
42038
+ p_order_id: string;
42039
+ };
42040
+ Returns: {
42041
+ buffer_id: string;
42042
+ order_id: string;
42043
+ plan_date: string;
42044
+ }[];
42045
+ };
42046
+ logistics_plan_kick: {
42047
+ Args: never;
42048
+ Returns: undefined;
42049
+ };
42050
+ logistics_plan_prune: {
42051
+ Args: never;
42052
+ Returns: number;
42053
+ };
42054
+ logistics_plan_release_stale: {
42055
+ Args: never;
42056
+ Returns: number;
42057
+ };
42058
+ logistics_plan_setting: {
42059
+ Args: {
42060
+ p_default: number;
42061
+ p_key: string;
42062
+ };
42063
+ Returns: number;
42064
+ };
40700
42065
  logistics_queue_capacity_email: {
40701
42066
  Args: {
40702
42067
  p_alert_id: string;
@@ -40938,6 +42303,7 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
40938
42303
  my_module_permissions: {
40939
42304
  Args: never;
40940
42305
  Returns: {
42306
+ feature_id: string;
40941
42307
  module_id: string;
40942
42308
  permission: string;
40943
42309
  }[];
@@ -41818,6 +43184,16 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
41818
43184
  };
41819
43185
  Returns: string[];
41820
43186
  };
43187
+ switch_time_log: {
43188
+ Args: {
43189
+ p_employee_id: string;
43190
+ p_start_lat?: number;
43191
+ p_start_lng?: number;
43192
+ p_type: string;
43193
+ p_work_order_id?: string;
43194
+ };
43195
+ Returns: import("../integrations/supabase/types").Json;
43196
+ };
41821
43197
  sync_all_layer_stocks: {
41822
43198
  Args: never;
41823
43199
  Returns: undefined;
@@ -41868,6 +43244,24 @@ export declare const setOrderPickupMoment: import("@tanstack/start-client-core")
41868
43244
  };
41869
43245
  Returns: boolean;
41870
43246
  };
43247
+ twinfield_cron_lock_acquire: {
43248
+ Args: {
43249
+ _job_name: string;
43250
+ _stale_seconds?: number;
43251
+ };
43252
+ Returns: boolean;
43253
+ };
43254
+ twinfield_cron_lock_release: {
43255
+ Args: {
43256
+ _error?: string;
43257
+ _job_name: string;
43258
+ };
43259
+ Returns: undefined;
43260
+ };
43261
+ twinfield_prune_push_queue: {
43262
+ Args: never;
43263
+ Returns: number;
43264
+ };
41871
43265
  twinfield_register_cron: {
41872
43266
  Args: {
41873
43267
  apikey?: string;