@flowselections/logistiek-engine 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist-lib/components/LogistiekEnginePage.d.ts.map +1 -1
  2. package/dist-lib/components/LogistiekEnginePage.js +19 -4
  3. package/dist-lib/components/RuleEnginePage.d.ts +1 -1
  4. package/dist-lib/components/RuleEnginePage.d.ts.map +1 -1
  5. package/dist-lib/components/RuleEnginePage.js +22 -2
  6. package/dist-lib/components/StrategieDialog.d.ts.map +1 -1
  7. package/dist-lib/components/StrategieDialog.js +1 -1
  8. package/dist-lib/hooks/useLogistiekStrategieen.d.ts +2 -1
  9. package/dist-lib/hooks/useLogistiekStrategieen.d.ts.map +1 -1
  10. package/dist-lib/hooks/useLogistiekStrategieen.js +72 -2
  11. package/dist-lib/hooks/useRuleEngine.d.ts.map +1 -1
  12. package/dist-lib/hooks/useRuleEngine.js +3 -1
  13. package/dist-lib/integrations/supabase/auth-middleware.d.ts +1092 -121
  14. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  15. package/dist-lib/integrations/supabase/client.d.ts +1092 -121
  16. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  17. package/dist-lib/integrations/supabase/client.server.d.ts +1092 -121
  18. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  19. package/dist-lib/integrations/supabase/types.d.ts +1122 -146
  20. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  21. package/dist-lib/lib/floridayDocuments.functions.d.ts +3270 -357
  22. package/dist-lib/lib/floridayDocuments.functions.d.ts.map +1 -1
  23. package/dist-lib/lib/floridayPush.functions.d.ts +1092 -121
  24. package/dist-lib/lib/floridayPush.functions.d.ts.map +1 -1
  25. package/dist-lib/lib/handlers/logistics-tick.server.d.ts.map +1 -1
  26. package/dist-lib/lib/handlers/logistics-tick.server.js +12 -1
  27. package/dist-lib/lib/loadCarrierPlanning.functions.d.ts +5450 -595
  28. package/dist-lib/lib/loadCarrierPlanning.functions.d.ts.map +1 -1
  29. package/dist-lib/lib/logisticsRecalcJob.functions.d.ts +2180 -238
  30. package/dist-lib/lib/logisticsRecalcJob.functions.d.ts.map +1 -1
  31. package/dist-lib/lib/logisticsRecalculate.functions.d.ts +1092 -121
  32. package/dist-lib/lib/logisticsRecalculate.functions.d.ts.map +1 -1
  33. package/dist-lib/lib/modulePrompts.d.ts.map +1 -1
  34. package/dist-lib/lib/modulePrompts.js +25 -0
  35. package/dist-lib/lib/planQueue.server.d.ts +17 -0
  36. package/dist-lib/lib/planQueue.server.d.ts.map +1 -0
  37. package/dist-lib/lib/planQueue.server.js +124 -0
  38. package/package.json +1 -1
@@ -871,6 +871,126 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
871
871
  };
872
872
  Relationships: [];
873
873
  };
874
+ cao_holidays: {
875
+ Row: {
876
+ created_at: string;
877
+ description: string | null;
878
+ holiday_date: string;
879
+ id: string;
880
+ updated_at: string;
881
+ };
882
+ Insert: {
883
+ created_at?: string;
884
+ description?: string | null;
885
+ holiday_date: string;
886
+ id?: string;
887
+ updated_at?: string;
888
+ };
889
+ Update: {
890
+ created_at?: string;
891
+ description?: string | null;
892
+ holiday_date?: string;
893
+ id?: string;
894
+ updated_at?: string;
895
+ };
896
+ Relationships: [];
897
+ };
898
+ cao_settings: {
899
+ Row: {
900
+ auto_break_after_hours: number;
901
+ auto_break_minutes: number;
902
+ auto_break_unpaid: boolean;
903
+ auto_stop_after_hours: number;
904
+ callout_fee: number;
905
+ created_at: string;
906
+ daily_regular_hours: number;
907
+ default_hourly_rate: number;
908
+ id: string;
909
+ materials_markup_percent: number;
910
+ max_daily_hours: number;
911
+ max_weekly_hours: number;
912
+ meal_allowance_amount: number;
913
+ overtime_pct_178: number;
914
+ overtime_pct_189: number;
915
+ overtime_pct_212: number;
916
+ reminder_after_hours: number;
917
+ standby_evening_amount: number;
918
+ standby_weekend_amount: number;
919
+ travel_cost_per_km: number | null;
920
+ travel_cost_threshold_km: number | null;
921
+ travel_counts_as_work: boolean;
922
+ travel_hourly_rate: number;
923
+ travel_rate_per_hour: number;
924
+ travel_threshold_minutes: number;
925
+ updated_at: string;
926
+ weekend_always_212: boolean;
927
+ window_end: string;
928
+ window_start: string;
929
+ };
930
+ Insert: {
931
+ auto_break_after_hours?: number;
932
+ auto_break_minutes?: number;
933
+ auto_break_unpaid?: boolean;
934
+ auto_stop_after_hours?: number;
935
+ callout_fee?: number;
936
+ created_at?: string;
937
+ daily_regular_hours?: number;
938
+ default_hourly_rate?: number;
939
+ id?: string;
940
+ materials_markup_percent?: number;
941
+ max_daily_hours?: number;
942
+ max_weekly_hours?: number;
943
+ meal_allowance_amount?: number;
944
+ overtime_pct_178?: number;
945
+ overtime_pct_189?: number;
946
+ overtime_pct_212?: number;
947
+ reminder_after_hours?: number;
948
+ standby_evening_amount?: number;
949
+ standby_weekend_amount?: number;
950
+ travel_cost_per_km?: number | null;
951
+ travel_cost_threshold_km?: number | null;
952
+ travel_counts_as_work?: boolean;
953
+ travel_hourly_rate?: number;
954
+ travel_rate_per_hour?: number;
955
+ travel_threshold_minutes?: number;
956
+ updated_at?: string;
957
+ weekend_always_212?: boolean;
958
+ window_end?: string;
959
+ window_start?: string;
960
+ };
961
+ Update: {
962
+ auto_break_after_hours?: number;
963
+ auto_break_minutes?: number;
964
+ auto_break_unpaid?: boolean;
965
+ auto_stop_after_hours?: number;
966
+ callout_fee?: number;
967
+ created_at?: string;
968
+ daily_regular_hours?: number;
969
+ default_hourly_rate?: number;
970
+ id?: string;
971
+ materials_markup_percent?: number;
972
+ max_daily_hours?: number;
973
+ max_weekly_hours?: number;
974
+ meal_allowance_amount?: number;
975
+ overtime_pct_178?: number;
976
+ overtime_pct_189?: number;
977
+ overtime_pct_212?: number;
978
+ reminder_after_hours?: number;
979
+ standby_evening_amount?: number;
980
+ standby_weekend_amount?: number;
981
+ travel_cost_per_km?: number | null;
982
+ travel_cost_threshold_km?: number | null;
983
+ travel_counts_as_work?: boolean;
984
+ travel_hourly_rate?: number;
985
+ travel_rate_per_hour?: number;
986
+ travel_threshold_minutes?: number;
987
+ updated_at?: string;
988
+ weekend_always_212?: boolean;
989
+ window_end?: string;
990
+ window_start?: string;
991
+ };
992
+ Relationships: [];
993
+ };
874
994
  carrier_shipping_rates: {
875
995
  Row: {
876
996
  carrier_id: string;
@@ -1683,7 +1803,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
1683
1803
  city: string | null;
1684
1804
  country: string | null;
1685
1805
  created_at: string;
1686
- customer_id: string | null;
1806
+ customer_id: string;
1687
1807
  external_key: string | null;
1688
1808
  external_provider: string | null;
1689
1809
  floriday_location_id: string | null;
@@ -1707,7 +1827,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
1707
1827
  city?: string | null;
1708
1828
  country?: string | null;
1709
1829
  created_at?: string;
1710
- customer_id?: string | null;
1830
+ customer_id: string;
1711
1831
  external_key?: string | null;
1712
1832
  external_provider?: string | null;
1713
1833
  floriday_location_id?: string | null;
@@ -1731,7 +1851,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
1731
1851
  city?: string | null;
1732
1852
  country?: string | null;
1733
1853
  created_at?: string;
1734
- customer_id?: string | null;
1854
+ customer_id?: string;
1735
1855
  external_key?: string | null;
1736
1856
  external_provider?: string | null;
1737
1857
  floriday_location_id?: string | null;
@@ -6479,6 +6599,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
6479
6599
  Row: {
6480
6600
  buyer_organization_id: string | null;
6481
6601
  connection_id: string;
6602
+ controlled_at: string | null;
6482
6603
  created_at: string;
6483
6604
  data: import("./types").Json;
6484
6605
  floriday_id: string;
@@ -6490,6 +6611,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
6490
6611
  Insert: {
6491
6612
  buyer_organization_id?: string | null;
6492
6613
  connection_id: string;
6614
+ controlled_at?: string | null;
6493
6615
  created_at?: string;
6494
6616
  data: import("./types").Json;
6495
6617
  floriday_id: string;
@@ -6501,6 +6623,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
6501
6623
  Update: {
6502
6624
  buyer_organization_id?: string | null;
6503
6625
  connection_id?: string;
6626
+ controlled_at?: string | null;
6504
6627
  created_at?: string;
6505
6628
  data?: import("./types").Json;
6506
6629
  floriday_id?: string;
@@ -7402,6 +7525,54 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7402
7525
  };
7403
7526
  Relationships: [];
7404
7527
  };
7528
+ invoice_timing_settings: {
7529
+ Row: {
7530
+ anchor: string;
7531
+ business_days_only: boolean;
7532
+ created_at: string;
7533
+ enabled: boolean;
7534
+ id: string;
7535
+ offset_days: number;
7536
+ pickup_anchor: string;
7537
+ pickup_business_days_only: boolean;
7538
+ pickup_offset_days: number;
7539
+ pickup_time_of_day: string;
7540
+ singleton: boolean;
7541
+ time_of_day: string;
7542
+ updated_at: string;
7543
+ };
7544
+ Insert: {
7545
+ anchor?: string;
7546
+ business_days_only?: boolean;
7547
+ created_at?: string;
7548
+ enabled?: boolean;
7549
+ id?: string;
7550
+ offset_days?: number;
7551
+ pickup_anchor?: string;
7552
+ pickup_business_days_only?: boolean;
7553
+ pickup_offset_days?: number;
7554
+ pickup_time_of_day?: string;
7555
+ singleton?: boolean;
7556
+ time_of_day?: string;
7557
+ updated_at?: string;
7558
+ };
7559
+ Update: {
7560
+ anchor?: string;
7561
+ business_days_only?: boolean;
7562
+ created_at?: string;
7563
+ enabled?: boolean;
7564
+ id?: string;
7565
+ offset_days?: number;
7566
+ pickup_anchor?: string;
7567
+ pickup_business_days_only?: boolean;
7568
+ pickup_offset_days?: number;
7569
+ pickup_time_of_day?: string;
7570
+ singleton?: boolean;
7571
+ time_of_day?: string;
7572
+ updated_at?: string;
7573
+ };
7574
+ Relationships: [];
7575
+ };
7405
7576
  itk_contact_persons: {
7406
7577
  Row: {
7407
7578
  created_at: string;
@@ -7714,7 +7885,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7714
7885
  start_date: string;
7715
7886
  start_time: string | null;
7716
7887
  status: string;
7717
- tenant_id: string;
7718
7888
  updated_at: string;
7719
7889
  user_id: string;
7720
7890
  };
@@ -7732,7 +7902,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7732
7902
  start_date: string;
7733
7903
  start_time?: string | null;
7734
7904
  status?: string;
7735
- tenant_id?: string;
7736
7905
  updated_at?: string;
7737
7906
  user_id: string;
7738
7907
  };
@@ -7750,7 +7919,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7750
7919
  start_date?: string;
7751
7920
  start_time?: string | null;
7752
7921
  status?: string;
7753
- tenant_id?: string;
7754
7922
  updated_at?: string;
7755
7923
  user_id?: string;
7756
7924
  };
@@ -7758,13 +7926,13 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7758
7926
  foreignKeyName: "leave_requests_monteur_id_fkey";
7759
7927
  columns: ["monteur_id"];
7760
7928
  isOneToOne: false;
7761
- referencedRelation: "monteurs";
7929
+ referencedRelation: "profiles";
7762
7930
  referencedColumns: ["id"];
7763
7931
  }, {
7764
7932
  foreignKeyName: "leave_requests_user_id_fkey";
7765
7933
  columns: ["user_id"];
7766
7934
  isOneToOne: false;
7767
- referencedRelation: "monteurs";
7935
+ referencedRelation: "profiles";
7768
7936
  referencedColumns: ["id"];
7769
7937
  }];
7770
7938
  };
@@ -8632,6 +8800,45 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
8632
8800
  };
8633
8801
  Relationships: [];
8634
8802
  };
8803
+ logistics_plan_queue: {
8804
+ Row: {
8805
+ attempts: number;
8806
+ claimed_at: string | null;
8807
+ enqueued_at: string;
8808
+ error: string | null;
8809
+ id: string;
8810
+ next_attempt_at: string;
8811
+ order_id: string;
8812
+ reason: string;
8813
+ status: string;
8814
+ updated_at: string;
8815
+ };
8816
+ Insert: {
8817
+ attempts?: number;
8818
+ claimed_at?: string | null;
8819
+ enqueued_at?: string;
8820
+ error?: string | null;
8821
+ id?: string;
8822
+ next_attempt_at?: string;
8823
+ order_id: string;
8824
+ reason?: string;
8825
+ status?: string;
8826
+ updated_at?: string;
8827
+ };
8828
+ Update: {
8829
+ attempts?: number;
8830
+ claimed_at?: string | null;
8831
+ enqueued_at?: string;
8832
+ error?: string | null;
8833
+ id?: string;
8834
+ next_attempt_at?: string;
8835
+ order_id?: string;
8836
+ reason?: string;
8837
+ status?: string;
8838
+ updated_at?: string;
8839
+ };
8840
+ Relationships: [];
8841
+ };
8635
8842
  logistics_plan_runs: {
8636
8843
  Row: {
8637
8844
  created_at: string;
@@ -8707,6 +8914,24 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
8707
8914
  referencedColumns: ["id"];
8708
8915
  }];
8709
8916
  };
8917
+ logistics_plan_settings: {
8918
+ Row: {
8919
+ key: string;
8920
+ updated_at: string;
8921
+ value: string;
8922
+ };
8923
+ Insert: {
8924
+ key: string;
8925
+ updated_at?: string;
8926
+ value: string;
8927
+ };
8928
+ Update: {
8929
+ key?: string;
8930
+ updated_at?: string;
8931
+ value?: string;
8932
+ };
8933
+ Relationships: [];
8934
+ };
8710
8935
  logistics_rebuffer_state: {
8711
8936
  Row: {
8712
8937
  created_at: string;
@@ -9417,14 +9642,17 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9417
9642
  };
9418
9643
  mailbox_messages: {
9419
9644
  Row: {
9645
+ attachments: import("./types").Json;
9420
9646
  body_html: string | null;
9421
9647
  body_text: string | null;
9648
+ cc_recipients: import("./types").Json;
9422
9649
  connection_id: string | null;
9423
9650
  created_at: string;
9424
9651
  error_message: string | null;
9425
9652
  external_id: string | null;
9426
9653
  from_email: string | null;
9427
9654
  from_name: string | null;
9655
+ has_attachments: boolean;
9428
9656
  id: string;
9429
9657
  message_id: string | null;
9430
9658
  profile_id: string | null;
@@ -9432,18 +9660,22 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9432
9660
  received_at: string | null;
9433
9661
  status: string;
9434
9662
  subject: string | null;
9663
+ to_recipients: import("./types").Json;
9435
9664
  uid: number | null;
9436
9665
  updated_at: string;
9437
9666
  };
9438
9667
  Insert: {
9668
+ attachments?: import("./types").Json;
9439
9669
  body_html?: string | null;
9440
9670
  body_text?: string | null;
9671
+ cc_recipients?: import("./types").Json;
9441
9672
  connection_id?: string | null;
9442
9673
  created_at?: string;
9443
9674
  error_message?: string | null;
9444
9675
  external_id?: string | null;
9445
9676
  from_email?: string | null;
9446
9677
  from_name?: string | null;
9678
+ has_attachments?: boolean;
9447
9679
  id?: string;
9448
9680
  message_id?: string | null;
9449
9681
  profile_id?: string | null;
@@ -9451,18 +9683,22 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9451
9683
  received_at?: string | null;
9452
9684
  status?: string;
9453
9685
  subject?: string | null;
9686
+ to_recipients?: import("./types").Json;
9454
9687
  uid?: number | null;
9455
9688
  updated_at?: string;
9456
9689
  };
9457
9690
  Update: {
9691
+ attachments?: import("./types").Json;
9458
9692
  body_html?: string | null;
9459
9693
  body_text?: string | null;
9694
+ cc_recipients?: import("./types").Json;
9460
9695
  connection_id?: string | null;
9461
9696
  created_at?: string;
9462
9697
  error_message?: string | null;
9463
9698
  external_id?: string | null;
9464
9699
  from_email?: string | null;
9465
9700
  from_name?: string | null;
9701
+ has_attachments?: boolean;
9466
9702
  id?: string;
9467
9703
  message_id?: string | null;
9468
9704
  profile_id?: string | null;
@@ -9470,6 +9706,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9470
9706
  received_at?: string | null;
9471
9707
  status?: string;
9472
9708
  subject?: string | null;
9709
+ to_recipients?: import("./types").Json;
9473
9710
  uid?: number | null;
9474
9711
  updated_at?: string;
9475
9712
  };
@@ -9850,6 +10087,90 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9850
10087
  };
9851
10088
  Relationships: [];
9852
10089
  };
10090
+ material_usage: {
10091
+ Row: {
10092
+ created_at: string;
10093
+ id: string;
10094
+ material_name: string;
10095
+ monteur_id: string | null;
10096
+ price_at_time: number;
10097
+ quantity_used: number;
10098
+ updated_at: string;
10099
+ van_inventory_id: string | null;
10100
+ work_order_id: string;
10101
+ };
10102
+ Insert: {
10103
+ created_at?: string;
10104
+ id?: string;
10105
+ material_name: string;
10106
+ monteur_id?: string | null;
10107
+ price_at_time?: number;
10108
+ quantity_used?: number;
10109
+ updated_at?: string;
10110
+ van_inventory_id?: string | null;
10111
+ work_order_id: string;
10112
+ };
10113
+ Update: {
10114
+ created_at?: string;
10115
+ id?: string;
10116
+ material_name?: string;
10117
+ monteur_id?: string | null;
10118
+ price_at_time?: number;
10119
+ quantity_used?: number;
10120
+ updated_at?: string;
10121
+ van_inventory_id?: string | null;
10122
+ work_order_id?: string;
10123
+ };
10124
+ Relationships: [{
10125
+ foreignKeyName: "material_usage_monteur_id_fkey";
10126
+ columns: ["monteur_id"];
10127
+ isOneToOne: false;
10128
+ referencedRelation: "profiles";
10129
+ referencedColumns: ["id"];
10130
+ }, {
10131
+ foreignKeyName: "material_usage_van_inventory_id_fkey";
10132
+ columns: ["van_inventory_id"];
10133
+ isOneToOne: false;
10134
+ referencedRelation: "van_inventories";
10135
+ referencedColumns: ["id"];
10136
+ }, {
10137
+ foreignKeyName: "material_usage_work_order_id_fkey";
10138
+ columns: ["work_order_id"];
10139
+ isOneToOne: false;
10140
+ referencedRelation: "work_orders";
10141
+ referencedColumns: ["id"];
10142
+ }];
10143
+ };
10144
+ module_features: {
10145
+ Row: {
10146
+ created_at: string;
10147
+ feature_id: string;
10148
+ id: string;
10149
+ is_active: boolean;
10150
+ last_seen_at: string;
10151
+ module_id: string;
10152
+ name: string;
10153
+ };
10154
+ Insert: {
10155
+ created_at?: string;
10156
+ feature_id: string;
10157
+ id?: string;
10158
+ is_active?: boolean;
10159
+ last_seen_at?: string;
10160
+ module_id: string;
10161
+ name: string;
10162
+ };
10163
+ Update: {
10164
+ created_at?: string;
10165
+ feature_id?: string;
10166
+ id?: string;
10167
+ is_active?: boolean;
10168
+ last_seen_at?: string;
10169
+ module_id?: string;
10170
+ name?: string;
10171
+ };
10172
+ Relationships: [];
10173
+ };
9853
10174
  module_permissions: {
9854
10175
  Row: {
9855
10176
  created_at: string;
@@ -9877,6 +10198,39 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9877
10198
  };
9878
10199
  Relationships: [];
9879
10200
  };
10201
+ module_registry: {
10202
+ Row: {
10203
+ created_at: string;
10204
+ enforce: boolean;
10205
+ is_active: boolean;
10206
+ last_seen_at: string;
10207
+ module_id: string;
10208
+ name: string;
10209
+ shell_id: string | null;
10210
+ sort_order: number | null;
10211
+ };
10212
+ Insert: {
10213
+ created_at?: string;
10214
+ enforce?: boolean;
10215
+ is_active?: boolean;
10216
+ last_seen_at?: string;
10217
+ module_id: string;
10218
+ name: string;
10219
+ shell_id?: string | null;
10220
+ sort_order?: number | null;
10221
+ };
10222
+ Update: {
10223
+ created_at?: string;
10224
+ enforce?: boolean;
10225
+ is_active?: boolean;
10226
+ last_seen_at?: string;
10227
+ module_id?: string;
10228
+ name?: string;
10229
+ shell_id?: string | null;
10230
+ sort_order?: number | null;
10231
+ };
10232
+ Relationships: [];
10233
+ };
9880
10234
  module_runtime_config: {
9881
10235
  Row: {
9882
10236
  key: string;
@@ -9928,63 +10282,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9928
10282
  };
9929
10283
  Relationships: [];
9930
10284
  };
9931
- monteurs: {
9932
- Row: {
9933
- avatar_url: string | null;
9934
- color: string | null;
9935
- created_at: string;
9936
- email: string | null;
9937
- id: string;
9938
- is_active: boolean;
9939
- leave_balance_hours: number;
9940
- name: string;
9941
- persnr: number | null;
9942
- phone: string | null;
9943
- role: string;
9944
- tenant_id: string;
9945
- updated_at: string;
9946
- user_id: string | null;
9947
- };
9948
- Insert: {
9949
- avatar_url?: string | null;
9950
- color?: string | null;
9951
- created_at?: string;
9952
- email?: string | null;
9953
- id?: string;
9954
- is_active?: boolean;
9955
- leave_balance_hours?: number;
9956
- name: string;
9957
- persnr?: number | null;
9958
- phone?: string | null;
9959
- role?: string;
9960
- tenant_id: string;
9961
- updated_at?: string;
9962
- user_id?: string | null;
9963
- };
9964
- Update: {
9965
- avatar_url?: string | null;
9966
- color?: string | null;
9967
- created_at?: string;
9968
- email?: string | null;
9969
- id?: string;
9970
- is_active?: boolean;
9971
- leave_balance_hours?: number;
9972
- name?: string;
9973
- persnr?: number | null;
9974
- phone?: string | null;
9975
- role?: string;
9976
- tenant_id?: string;
9977
- updated_at?: string;
9978
- user_id?: string | null;
9979
- };
9980
- Relationships: [{
9981
- foreignKeyName: "monteurs_tenant_id_fkey";
9982
- columns: ["tenant_id"];
9983
- isOneToOne: false;
9984
- referencedRelation: "tenants";
9985
- referencedColumns: ["id"];
9986
- }];
9987
- };
9988
10285
  nmbrs_component_mapping: {
9989
10286
  Row: {
9990
10287
  created_at: string;
@@ -10055,13 +10352,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10055
10352
  nmbrs_employee_number?: string;
10056
10353
  updated_at?: string;
10057
10354
  };
10058
- Relationships: [{
10059
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
10060
- columns: ["monteur_id"];
10061
- isOneToOne: true;
10062
- referencedRelation: "monteurs";
10063
- referencedColumns: ["id"];
10064
- }];
10355
+ Relationships: [];
10065
10356
  };
10066
10357
  nmbrs_export_lines: {
10067
10358
  Row: {
@@ -10110,14 +10401,8 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10110
10401
  wage_code?: string;
10111
10402
  };
10112
10403
  Relationships: [{
10113
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
10114
- columns: ["monteur_id"];
10115
- isOneToOne: false;
10116
- referencedRelation: "monteurs";
10117
- referencedColumns: ["id"];
10118
- }, {
10119
- foreignKeyName: "nmbrs_export_lines_run_id_fkey";
10120
- columns: ["run_id"];
10404
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
10405
+ columns: ["run_id"];
10121
10406
  isOneToOne: false;
10122
10407
  referencedRelation: "nmbrs_export_runs";
10123
10408
  referencedColumns: ["id"];
@@ -10936,6 +11221,45 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10936
11221
  };
10937
11222
  Relationships: [];
10938
11223
  };
11224
+ order_invoice_links: {
11225
+ Row: {
11226
+ attempts: number;
11227
+ created_at: string;
11228
+ error_message: string | null;
11229
+ id: string;
11230
+ invoice_number: string | null;
11231
+ next_attempt_at: string;
11232
+ order_id: string;
11233
+ processed_at: string | null;
11234
+ status: string;
11235
+ updated_at: string;
11236
+ };
11237
+ Insert: {
11238
+ attempts?: number;
11239
+ created_at?: string;
11240
+ error_message?: string | null;
11241
+ id?: string;
11242
+ invoice_number?: string | null;
11243
+ next_attempt_at?: string;
11244
+ order_id: string;
11245
+ processed_at?: string | null;
11246
+ status?: string;
11247
+ updated_at?: string;
11248
+ };
11249
+ Update: {
11250
+ attempts?: number;
11251
+ created_at?: string;
11252
+ error_message?: string | null;
11253
+ id?: string;
11254
+ invoice_number?: string | null;
11255
+ next_attempt_at?: string;
11256
+ order_id?: string;
11257
+ processed_at?: string | null;
11258
+ status?: string;
11259
+ updated_at?: string;
11260
+ };
11261
+ Relationships: [];
11262
+ };
10939
11263
  order_items: {
10940
11264
  Row: {
10941
11265
  crates_per_layer: number | null;
@@ -11118,6 +11442,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11118
11442
  delivery_date: string | null;
11119
11443
  floriday_sales_order_id: string | null;
11120
11444
  id: string;
11445
+ invoice_due_at: string | null;
11121
11446
  is_reservation: boolean;
11122
11447
  notes: string | null;
11123
11448
  order_date: string;
@@ -11139,6 +11464,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11139
11464
  delivery_date?: string | null;
11140
11465
  floriday_sales_order_id?: string | null;
11141
11466
  id?: string;
11467
+ invoice_due_at?: string | null;
11142
11468
  is_reservation?: boolean;
11143
11469
  notes?: string | null;
11144
11470
  order_date?: string;
@@ -11160,6 +11486,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11160
11486
  delivery_date?: string | null;
11161
11487
  floriday_sales_order_id?: string | null;
11162
11488
  id?: string;
11489
+ invoice_due_at?: string | null;
11163
11490
  is_reservation?: boolean;
11164
11491
  notes?: string | null;
11165
11492
  order_date?: string;
@@ -12457,6 +12784,72 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
12457
12784
  referencedColumns: ["id"];
12458
12785
  }];
12459
12786
  };
12787
+ print_queue_runners: {
12788
+ Row: {
12789
+ actief: boolean;
12790
+ basis_url: string;
12791
+ created_at: string;
12792
+ id: string;
12793
+ laatst_gezien: string;
12794
+ laatste_fout: string | null;
12795
+ laatste_request_id: number | null;
12796
+ mislukte_posts: number;
12797
+ tick_sleutel: string;
12798
+ updated_at: string;
12799
+ };
12800
+ Insert: {
12801
+ actief?: boolean;
12802
+ basis_url: string;
12803
+ created_at?: string;
12804
+ id?: string;
12805
+ laatst_gezien?: string;
12806
+ laatste_fout?: string | null;
12807
+ laatste_request_id?: number | null;
12808
+ mislukte_posts?: number;
12809
+ tick_sleutel?: string;
12810
+ updated_at?: string;
12811
+ };
12812
+ Update: {
12813
+ actief?: boolean;
12814
+ basis_url?: string;
12815
+ created_at?: string;
12816
+ id?: string;
12817
+ laatst_gezien?: string;
12818
+ laatste_fout?: string | null;
12819
+ laatste_request_id?: number | null;
12820
+ mislukte_posts?: number;
12821
+ tick_sleutel?: string;
12822
+ updated_at?: string;
12823
+ };
12824
+ Relationships: [];
12825
+ };
12826
+ print_queue_settings: {
12827
+ Row: {
12828
+ bewaar_bestanden_dagen: number;
12829
+ bewaar_opdrachten_dagen: number;
12830
+ created_at: string;
12831
+ dubbel_venster_minuten: number;
12832
+ id: string;
12833
+ updated_at: string;
12834
+ };
12835
+ Insert: {
12836
+ bewaar_bestanden_dagen?: number;
12837
+ bewaar_opdrachten_dagen?: number;
12838
+ created_at?: string;
12839
+ dubbel_venster_minuten?: number;
12840
+ id?: string;
12841
+ updated_at?: string;
12842
+ };
12843
+ Update: {
12844
+ bewaar_bestanden_dagen?: number;
12845
+ bewaar_opdrachten_dagen?: number;
12846
+ created_at?: string;
12847
+ dubbel_venster_minuten?: number;
12848
+ id?: string;
12849
+ updated_at?: string;
12850
+ };
12851
+ Relationships: [];
12852
+ };
12460
12853
  print_rules: {
12461
12854
  Row: {
12462
12855
  actief: boolean;
@@ -13933,6 +14326,96 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
13933
14326
  referencedColumns: ["id"];
13934
14327
  }];
13935
14328
  };
14329
+ role_assignments: {
14330
+ Row: {
14331
+ created_at: string;
14332
+ id: string;
14333
+ role_id: string;
14334
+ user_id: string;
14335
+ };
14336
+ Insert: {
14337
+ created_at?: string;
14338
+ id?: string;
14339
+ role_id: string;
14340
+ user_id: string;
14341
+ };
14342
+ Update: {
14343
+ created_at?: string;
14344
+ id?: string;
14345
+ role_id?: string;
14346
+ user_id?: string;
14347
+ };
14348
+ Relationships: [{
14349
+ foreignKeyName: "role_assignments_role_id_fkey";
14350
+ columns: ["role_id"];
14351
+ isOneToOne: false;
14352
+ referencedRelation: "roles";
14353
+ referencedColumns: ["id"];
14354
+ }];
14355
+ };
14356
+ role_permissions: {
14357
+ Row: {
14358
+ can_edit: boolean;
14359
+ can_view: boolean;
14360
+ feature_id: string;
14361
+ id: string;
14362
+ module_id: string;
14363
+ role_id: string;
14364
+ updated_at: string;
14365
+ };
14366
+ Insert: {
14367
+ can_edit?: boolean;
14368
+ can_view?: boolean;
14369
+ feature_id?: string;
14370
+ id?: string;
14371
+ module_id: string;
14372
+ role_id: string;
14373
+ updated_at?: string;
14374
+ };
14375
+ Update: {
14376
+ can_edit?: boolean;
14377
+ can_view?: boolean;
14378
+ feature_id?: string;
14379
+ id?: string;
14380
+ module_id?: string;
14381
+ role_id?: string;
14382
+ updated_at?: string;
14383
+ };
14384
+ Relationships: [{
14385
+ foreignKeyName: "role_permissions_role_id_fkey";
14386
+ columns: ["role_id"];
14387
+ isOneToOne: false;
14388
+ referencedRelation: "roles";
14389
+ referencedColumns: ["id"];
14390
+ }];
14391
+ };
14392
+ roles: {
14393
+ Row: {
14394
+ created_at: string;
14395
+ id: string;
14396
+ is_protected: boolean;
14397
+ key: string;
14398
+ name: string;
14399
+ updated_at: string;
14400
+ };
14401
+ Insert: {
14402
+ created_at?: string;
14403
+ id?: string;
14404
+ is_protected?: boolean;
14405
+ key: string;
14406
+ name: string;
14407
+ updated_at?: string;
14408
+ };
14409
+ Update: {
14410
+ created_at?: string;
14411
+ id?: string;
14412
+ is_protected?: boolean;
14413
+ key?: string;
14414
+ name?: string;
14415
+ updated_at?: string;
14416
+ };
14417
+ Relationships: [];
14418
+ };
13936
14419
  rooms: {
13937
14420
  Row: {
13938
14421
  capacity: number;
@@ -14602,6 +15085,54 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
14602
15085
  };
14603
15086
  Relationships: [];
14604
15087
  };
15088
+ time_compensation_entries: {
15089
+ Row: {
15090
+ created_at: string;
15091
+ employee_id: string;
15092
+ entry_date: string;
15093
+ id: string;
15094
+ km: number;
15095
+ meal_allowance: number;
15096
+ notes: string | null;
15097
+ standby_evening: number;
15098
+ standby_weekend: number;
15099
+ tvt_change: number;
15100
+ updated_at: string;
15101
+ };
15102
+ Insert: {
15103
+ created_at?: string;
15104
+ employee_id: string;
15105
+ entry_date: string;
15106
+ id?: string;
15107
+ km?: number;
15108
+ meal_allowance?: number;
15109
+ notes?: string | null;
15110
+ standby_evening?: number;
15111
+ standby_weekend?: number;
15112
+ tvt_change?: number;
15113
+ updated_at?: string;
15114
+ };
15115
+ Update: {
15116
+ created_at?: string;
15117
+ employee_id?: string;
15118
+ entry_date?: string;
15119
+ id?: string;
15120
+ km?: number;
15121
+ meal_allowance?: number;
15122
+ notes?: string | null;
15123
+ standby_evening?: number;
15124
+ standby_weekend?: number;
15125
+ tvt_change?: number;
15126
+ updated_at?: string;
15127
+ };
15128
+ Relationships: [{
15129
+ foreignKeyName: "time_compensation_entries_employee_id_fkey";
15130
+ columns: ["employee_id"];
15131
+ isOneToOne: false;
15132
+ referencedRelation: "profiles";
15133
+ referencedColumns: ["id"];
15134
+ }];
15135
+ };
14605
15136
  time_entries: {
14606
15137
  Row: {
14607
15138
  created_at: string;
@@ -14636,65 +15167,170 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
14636
15167
  undertime?: number;
14637
15168
  updated_at?: string;
14638
15169
  };
15170
+ Relationships: [];
15171
+ };
15172
+ time_log_week_approvals: {
15173
+ Row: {
15174
+ approved_at: string | null;
15175
+ approved_by: string | null;
15176
+ created_at: string;
15177
+ employee_id: string;
15178
+ id: string;
15179
+ locked: boolean;
15180
+ notes: string | null;
15181
+ status: string;
15182
+ submitted_at: string | null;
15183
+ updated_at: string;
15184
+ week_start: string;
15185
+ };
15186
+ Insert: {
15187
+ approved_at?: string | null;
15188
+ approved_by?: string | null;
15189
+ created_at?: string;
15190
+ employee_id: string;
15191
+ id?: string;
15192
+ locked?: boolean;
15193
+ notes?: string | null;
15194
+ status?: string;
15195
+ submitted_at?: string | null;
15196
+ updated_at?: string;
15197
+ week_start: string;
15198
+ };
15199
+ Update: {
15200
+ approved_at?: string | null;
15201
+ approved_by?: string | null;
15202
+ created_at?: string;
15203
+ employee_id?: string;
15204
+ id?: string;
15205
+ locked?: boolean;
15206
+ notes?: string | null;
15207
+ status?: string;
15208
+ submitted_at?: string | null;
15209
+ updated_at?: string;
15210
+ week_start?: string;
15211
+ };
14639
15212
  Relationships: [{
14640
- foreignKeyName: "time_entries_employee_id_fkey";
15213
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
14641
15214
  columns: ["employee_id"];
14642
15215
  isOneToOne: false;
14643
- referencedRelation: "monteurs";
15216
+ referencedRelation: "profiles";
14644
15217
  referencedColumns: ["id"];
14645
15218
  }];
14646
15219
  };
14647
15220
  time_logs: {
14648
15221
  Row: {
15222
+ auto_stop_reason: string | null;
15223
+ auto_stopped: boolean;
14649
15224
  created_at: string;
15225
+ current_latitude: number | null;
15226
+ current_longitude: number | null;
15227
+ current_position_updated_at: string | null;
14650
15228
  employee_id: string;
15229
+ end_latitude: number | null;
15230
+ end_longitude: number | null;
14651
15231
  end_time: string | null;
15232
+ eta_distance_km: number | null;
15233
+ eta_minutes: number | null;
15234
+ eta_updated_at: string | null;
15235
+ hour_category: string | null;
14652
15236
  id: string;
15237
+ last_reminder_at: string | null;
14653
15238
  notes: string | null;
14654
15239
  overtime_hours: number;
14655
15240
  overtime_type: string | null;
14656
15241
  regular_hours: number;
15242
+ reminder_count: number;
15243
+ requires_review: boolean;
15244
+ start_latitude: number | null;
15245
+ start_longitude: number | null;
14657
15246
  start_time: string;
14658
15247
  travel_cost: number | null;
14659
15248
  travel_distance_km: number | null;
15249
+ travel_duration_min: number | null;
15250
+ travel_time_minutes: number | null;
14660
15251
  type: string;
14661
15252
  updated_at: string;
15253
+ work_order_id: string | null;
14662
15254
  };
14663
15255
  Insert: {
15256
+ auto_stop_reason?: string | null;
15257
+ auto_stopped?: boolean;
14664
15258
  created_at?: string;
15259
+ current_latitude?: number | null;
15260
+ current_longitude?: number | null;
15261
+ current_position_updated_at?: string | null;
14665
15262
  employee_id: string;
15263
+ end_latitude?: number | null;
15264
+ end_longitude?: number | null;
14666
15265
  end_time?: string | null;
15266
+ eta_distance_km?: number | null;
15267
+ eta_minutes?: number | null;
15268
+ eta_updated_at?: string | null;
15269
+ hour_category?: string | null;
14667
15270
  id?: string;
15271
+ last_reminder_at?: string | null;
14668
15272
  notes?: string | null;
14669
15273
  overtime_hours?: number;
14670
15274
  overtime_type?: string | null;
14671
15275
  regular_hours?: number;
15276
+ reminder_count?: number;
15277
+ requires_review?: boolean;
15278
+ start_latitude?: number | null;
15279
+ start_longitude?: number | null;
14672
15280
  start_time?: string;
14673
15281
  travel_cost?: number | null;
14674
15282
  travel_distance_km?: number | null;
15283
+ travel_duration_min?: number | null;
15284
+ travel_time_minutes?: number | null;
14675
15285
  type: string;
14676
15286
  updated_at?: string;
15287
+ work_order_id?: string | null;
14677
15288
  };
14678
15289
  Update: {
15290
+ auto_stop_reason?: string | null;
15291
+ auto_stopped?: boolean;
14679
15292
  created_at?: string;
15293
+ current_latitude?: number | null;
15294
+ current_longitude?: number | null;
15295
+ current_position_updated_at?: string | null;
14680
15296
  employee_id?: string;
15297
+ end_latitude?: number | null;
15298
+ end_longitude?: number | null;
14681
15299
  end_time?: string | null;
15300
+ eta_distance_km?: number | null;
15301
+ eta_minutes?: number | null;
15302
+ eta_updated_at?: string | null;
15303
+ hour_category?: string | null;
14682
15304
  id?: string;
15305
+ last_reminder_at?: string | null;
14683
15306
  notes?: string | null;
14684
15307
  overtime_hours?: number;
14685
15308
  overtime_type?: string | null;
14686
15309
  regular_hours?: number;
15310
+ reminder_count?: number;
15311
+ requires_review?: boolean;
15312
+ start_latitude?: number | null;
15313
+ start_longitude?: number | null;
14687
15314
  start_time?: string;
14688
15315
  travel_cost?: number | null;
14689
15316
  travel_distance_km?: number | null;
15317
+ travel_duration_min?: number | null;
15318
+ travel_time_minutes?: number | null;
14690
15319
  type?: string;
14691
15320
  updated_at?: string;
15321
+ work_order_id?: string | null;
14692
15322
  };
14693
15323
  Relationships: [{
14694
15324
  foreignKeyName: "time_logs_employee_id_fkey";
14695
15325
  columns: ["employee_id"];
14696
15326
  isOneToOne: false;
14697
- referencedRelation: "monteurs";
15327
+ referencedRelation: "profiles";
15328
+ referencedColumns: ["id"];
15329
+ }, {
15330
+ foreignKeyName: "time_logs_work_order_id_fkey";
15331
+ columns: ["work_order_id"];
15332
+ isOneToOne: false;
15333
+ referencedRelation: "work_orders";
14698
15334
  referencedColumns: ["id"];
14699
15335
  }];
14700
15336
  };
@@ -14733,7 +15369,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
14733
15369
  foreignKeyName: "time_off_entries_employee_id_fkey";
14734
15370
  columns: ["employee_id"];
14735
15371
  isOneToOne: false;
14736
- referencedRelation: "monteurs";
15372
+ referencedRelation: "profiles";
14737
15373
  referencedColumns: ["id"];
14738
15374
  }];
14739
15375
  };
@@ -15043,6 +15679,39 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
15043
15679
  };
15044
15680
  Relationships: [];
15045
15681
  };
15682
+ twinfield_cron_locks: {
15683
+ Row: {
15684
+ created_at: string;
15685
+ heartbeat_at: string;
15686
+ job_name: string;
15687
+ last_error: string | null;
15688
+ last_finished_at: string | null;
15689
+ locked_at: string;
15690
+ run_id: string;
15691
+ updated_at: string;
15692
+ };
15693
+ Insert: {
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
+ Update: {
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
+ Relationships: [];
15714
+ };
15046
15715
  twinfield_customers: {
15047
15716
  Row: {
15048
15717
  address: string | null;
@@ -15297,6 +15966,8 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
15297
15966
  };
15298
15967
  twinfield_invoice_settings: {
15299
15968
  Row: {
15969
+ auto_invoice_enabled: boolean;
15970
+ auto_invoice_trigger_statuses: string[];
15300
15971
  created_at: string;
15301
15972
  debtor_gl_account: string;
15302
15973
  default_credit_invoice_type: string | null;
@@ -15317,6 +15988,8 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
15317
15988
  vat_code_export: string | null;
15318
15989
  };
15319
15990
  Insert: {
15991
+ auto_invoice_enabled?: boolean;
15992
+ auto_invoice_trigger_statuses?: string[];
15320
15993
  created_at?: string;
15321
15994
  debtor_gl_account?: string;
15322
15995
  default_credit_invoice_type?: string | null;
@@ -15337,6 +16010,8 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
15337
16010
  vat_code_export?: string | null;
15338
16011
  };
15339
16012
  Update: {
16013
+ auto_invoice_enabled?: boolean;
16014
+ auto_invoice_trigger_statuses?: string[];
15340
16015
  created_at?: string;
15341
16016
  debtor_gl_account?: string;
15342
16017
  default_credit_invoice_type?: string | null;
@@ -15637,6 +16312,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
15637
16312
  twinfield_push_queue: {
15638
16313
  Row: {
15639
16314
  action: string;
16315
+ attempt_started_at: string | null;
15640
16316
  attempts: number;
15641
16317
  connection_id: string | null;
15642
16318
  created_at: string;
@@ -15653,6 +16329,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
15653
16329
  };
15654
16330
  Insert: {
15655
16331
  action?: string;
16332
+ attempt_started_at?: string | null;
15656
16333
  attempts?: number;
15657
16334
  connection_id?: string | null;
15658
16335
  created_at?: string;
@@ -15669,6 +16346,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
15669
16346
  };
15670
16347
  Update: {
15671
16348
  action?: string;
16349
+ attempt_started_at?: string | null;
15672
16350
  attempts?: number;
15673
16351
  connection_id?: string | null;
15674
16352
  created_at?: string;
@@ -15866,13 +16544,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
15866
16544
  workday_end?: string | null;
15867
16545
  workday_start?: string | null;
15868
16546
  };
15869
- Relationships: [{
15870
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
15871
- columns: ["monteur_id"];
15872
- isOneToOne: true;
15873
- referencedRelation: "monteurs";
15874
- referencedColumns: ["id"];
15875
- }];
16547
+ Relationships: [];
15876
16548
  };
15877
16549
  uren_entries: {
15878
16550
  Row: {
@@ -15918,12 +16590,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
15918
16590
  werkbon_id?: string | null;
15919
16591
  };
15920
16592
  Relationships: [{
15921
- foreignKeyName: "uren_entries_monteur_id_fkey";
15922
- columns: ["monteur_id"];
15923
- isOneToOne: false;
15924
- referencedRelation: "monteurs";
15925
- referencedColumns: ["id"];
15926
- }, {
15927
16593
  foreignKeyName: "uren_entries_werkbon_id_fkey";
15928
16594
  columns: ["werkbon_id"];
15929
16595
  isOneToOne: false;
@@ -16391,13 +17057,37 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
16391
17057
  submitted_at?: string | null;
16392
17058
  updated_at?: string;
16393
17059
  };
16394
- Relationships: [{
16395
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
16396
- columns: ["monteur_id"];
16397
- isOneToOne: false;
16398
- referencedRelation: "monteurs";
16399
- referencedColumns: ["id"];
16400
- }];
17060
+ Relationships: [];
17061
+ };
17062
+ user_module_permissions: {
17063
+ Row: {
17064
+ created_at: string;
17065
+ feature_id: string;
17066
+ id: string;
17067
+ module_id: string;
17068
+ permission: string;
17069
+ updated_at: string;
17070
+ user_id: string;
17071
+ };
17072
+ Insert: {
17073
+ created_at?: string;
17074
+ feature_id?: string;
17075
+ id?: string;
17076
+ module_id: string;
17077
+ permission: string;
17078
+ updated_at?: string;
17079
+ user_id: string;
17080
+ };
17081
+ Update: {
17082
+ created_at?: string;
17083
+ feature_id?: string;
17084
+ id?: string;
17085
+ module_id?: string;
17086
+ permission?: string;
17087
+ updated_at?: string;
17088
+ user_id?: string;
17089
+ };
17090
+ Relationships: [];
16401
17091
  };
16402
17092
  user_roles: {
16403
17093
  Row: {
@@ -16426,6 +17116,51 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
16426
17116
  referencedColumns: ["id"];
16427
17117
  }];
16428
17118
  };
17119
+ van_inventories: {
17120
+ Row: {
17121
+ barcode: string | null;
17122
+ created_at: string;
17123
+ id: string;
17124
+ monteur_id: string | null;
17125
+ price_per_unit: number;
17126
+ product_name: string;
17127
+ quantity_current: number;
17128
+ quantity_min: number;
17129
+ unit: string;
17130
+ updated_at: string;
17131
+ };
17132
+ Insert: {
17133
+ barcode?: string | null;
17134
+ created_at?: string;
17135
+ id?: string;
17136
+ monteur_id?: string | null;
17137
+ price_per_unit?: number;
17138
+ product_name: string;
17139
+ quantity_current?: number;
17140
+ quantity_min?: number;
17141
+ unit?: string;
17142
+ updated_at?: string;
17143
+ };
17144
+ Update: {
17145
+ barcode?: string | null;
17146
+ created_at?: string;
17147
+ id?: string;
17148
+ monteur_id?: string | null;
17149
+ price_per_unit?: number;
17150
+ product_name?: string;
17151
+ quantity_current?: number;
17152
+ quantity_min?: number;
17153
+ unit?: string;
17154
+ updated_at?: string;
17155
+ };
17156
+ Relationships: [{
17157
+ foreignKeyName: "van_inventories_monteur_id_fkey";
17158
+ columns: ["monteur_id"];
17159
+ isOneToOne: false;
17160
+ referencedRelation: "profiles";
17161
+ referencedColumns: ["id"];
17162
+ }];
17163
+ };
16429
17164
  voorraad_custom_fields: {
16430
17165
  Row: {
16431
17166
  created_at: string;
@@ -17376,7 +18111,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
17376
18111
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
17377
18112
  columns: ["monteur_id"];
17378
18113
  isOneToOne: false;
17379
- referencedRelation: "monteurs";
18114
+ referencedRelation: "profiles";
17380
18115
  referencedColumns: ["id"];
17381
18116
  }, {
17382
18117
  foreignKeyName: "work_order_monteurs_work_order_id_fkey";
@@ -17386,6 +18121,60 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
17386
18121
  referencedColumns: ["id"];
17387
18122
  }];
17388
18123
  };
18124
+ work_order_photos: {
18125
+ Row: {
18126
+ ai_caption: string | null;
18127
+ ai_categorized_at: string | null;
18128
+ ai_labels: import("./types").Json | null;
18129
+ caption: string | null;
18130
+ created_at: string;
18131
+ id: string;
18132
+ monteur_id: string | null;
18133
+ photo_type: string;
18134
+ storage_path: string;
18135
+ updated_at: string;
18136
+ work_order_id: string;
18137
+ };
18138
+ Insert: {
18139
+ ai_caption?: string | null;
18140
+ ai_categorized_at?: string | null;
18141
+ ai_labels?: import("./types").Json | null;
18142
+ caption?: string | null;
18143
+ created_at?: string;
18144
+ id?: string;
18145
+ monteur_id?: string | null;
18146
+ photo_type?: string;
18147
+ storage_path: string;
18148
+ updated_at?: string;
18149
+ work_order_id: string;
18150
+ };
18151
+ Update: {
18152
+ ai_caption?: string | null;
18153
+ ai_categorized_at?: string | null;
18154
+ ai_labels?: import("./types").Json | null;
18155
+ caption?: string | null;
18156
+ created_at?: string;
18157
+ id?: string;
18158
+ monteur_id?: string | null;
18159
+ photo_type?: string;
18160
+ storage_path?: string;
18161
+ updated_at?: string;
18162
+ work_order_id?: string;
18163
+ };
18164
+ Relationships: [{
18165
+ foreignKeyName: "work_order_photos_monteur_id_fkey";
18166
+ columns: ["monteur_id"];
18167
+ isOneToOne: false;
18168
+ referencedRelation: "profiles";
18169
+ referencedColumns: ["id"];
18170
+ }, {
18171
+ foreignKeyName: "work_order_photos_work_order_id_fkey";
18172
+ columns: ["work_order_id"];
18173
+ isOneToOne: false;
18174
+ referencedRelation: "work_orders";
18175
+ referencedColumns: ["id"];
18176
+ }];
18177
+ };
17389
18178
  work_orders: {
17390
18179
  Row: {
17391
18180
  assigned_to: string | null;
@@ -17417,7 +18206,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
17417
18206
  scheduled_end_time: string | null;
17418
18207
  scheduled_start_time: string | null;
17419
18208
  status: string;
17420
- tenant_id: string;
17421
18209
  total_hours_worked: number | null;
17422
18210
  total_price: number | null;
17423
18211
  travel_time_minutes: number | null;
@@ -17455,7 +18243,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
17455
18243
  scheduled_end_time?: string | null;
17456
18244
  scheduled_start_time?: string | null;
17457
18245
  status?: string;
17458
- tenant_id: string;
17459
18246
  total_hours_worked?: number | null;
17460
18247
  total_price?: number | null;
17461
18248
  travel_time_minutes?: number | null;
@@ -17493,7 +18280,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
17493
18280
  scheduled_end_time?: string | null;
17494
18281
  scheduled_start_time?: string | null;
17495
18282
  status?: string;
17496
- tenant_id?: string;
17497
18283
  total_hours_worked?: number | null;
17498
18284
  total_price?: number | null;
17499
18285
  travel_time_minutes?: number | null;
@@ -17507,12 +18293,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
17507
18293
  isOneToOne: false;
17508
18294
  referencedRelation: "work_orders";
17509
18295
  referencedColumns: ["id"];
17510
- }, {
17511
- foreignKeyName: "work_orders_tenant_id_fkey";
17512
- columns: ["tenant_id"];
17513
- isOneToOne: false;
17514
- referencedRelation: "tenants";
17515
- referencedColumns: ["id"];
17516
18296
  }];
17517
18297
  };
17518
18298
  };
@@ -18197,6 +18977,19 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
18197
18977
  };
18198
18978
  Returns: undefined;
18199
18979
  };
18980
+ approve_mailbox_order_proposal: {
18981
+ Args: {
18982
+ p_custom_fields: import("./types").Json;
18983
+ p_customer_id: string;
18984
+ p_delivery_date: string;
18985
+ p_field_values?: import("./types").Json;
18986
+ p_lines: import("./types").Json;
18987
+ p_notes: string;
18988
+ p_proposal_id: string;
18989
+ p_reviewed_by: string;
18990
+ };
18991
+ Returns: import("./types").Json;
18992
+ };
18200
18993
  assign_cart_numbers: {
18201
18994
  Args: {
18202
18995
  p_carts: import("./types").Json;
@@ -18232,6 +19025,10 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
18232
19025
  processed_items: number;
18233
19026
  }[];
18234
19027
  };
19028
+ backfill_order_auto_invoice_queue: {
19029
+ Args: never;
19030
+ Returns: number;
19031
+ };
18235
19032
  calculate_layer_stock: {
18236
19033
  Args: {
18237
19034
  p_product_id: string;
@@ -18244,6 +19041,10 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
18244
19041
  };
18245
19042
  Returns: number;
18246
19043
  };
19044
+ can_manage_hours: {
19045
+ Args: never;
19046
+ Returns: boolean;
19047
+ };
18247
19048
  check_offer_product_available_stock: {
18248
19049
  Args: {
18249
19050
  p_campaign_product_id: string;
@@ -18433,6 +19234,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
18433
19234
  };
18434
19235
  Returns: {
18435
19236
  action: string;
19237
+ attempt_started_at: string | null;
18436
19238
  attempts: number;
18437
19239
  connection_id: string | null;
18438
19240
  created_at: string;
@@ -18462,6 +19264,10 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
18462
19264
  Args: never;
18463
19265
  Returns: undefined;
18464
19266
  };
19267
+ cleanup_voorraad_module_history: {
19268
+ Args: never;
19269
+ Returns: undefined;
19270
+ };
18465
19271
  complete_floriday_stock_queue: {
18466
19272
  Args: {
18467
19273
  p_attempt_id?: string;
@@ -18516,6 +19322,30 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
18516
19322
  agent_naam: string;
18517
19323
  }[];
18518
19324
  };
19325
+ consume_van_inventory: {
19326
+ Args: {
19327
+ p_inventory_id: string;
19328
+ p_quantity: number;
19329
+ };
19330
+ Returns: {
19331
+ barcode: string | null;
19332
+ created_at: string;
19333
+ id: string;
19334
+ monteur_id: string | null;
19335
+ price_per_unit: number;
19336
+ product_name: string;
19337
+ quantity_current: number;
19338
+ quantity_min: number;
19339
+ unit: string;
19340
+ updated_at: string;
19341
+ };
19342
+ SetofOptions: {
19343
+ from: "*";
19344
+ to: "van_inventories";
19345
+ isOneToOne: true;
19346
+ isSetofReturn: false;
19347
+ };
19348
+ };
18519
19349
  control_get_todays_carts: {
18520
19350
  Args: never;
18521
19351
  Returns: {
@@ -18583,6 +19413,20 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
18583
19413
  };
18584
19414
  Returns: import("./types").Json;
18585
19415
  };
19416
+ effective_module_permission: {
19417
+ Args: {
19418
+ _module_id: string;
19419
+ _user_id: string;
19420
+ };
19421
+ Returns: string;
19422
+ } | {
19423
+ Args: {
19424
+ _feature_id: string;
19425
+ _module_id: string;
19426
+ _user_id: string;
19427
+ };
19428
+ Returns: string;
19429
+ };
18586
19430
  email_auth_decrypt: {
18587
19431
  Args: {
18588
19432
  cipher: string;
@@ -18933,12 +19777,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
18933
19777
  Args: never;
18934
19778
  Returns: string;
18935
19779
  };
18936
- get_work_order_tenant_id: {
18937
- Args: {
18938
- wo_id: string;
18939
- };
18940
- Returns: string;
18941
- };
18942
19780
  has_module_permission: {
18943
19781
  Args: {
18944
19782
  _min: string;
@@ -18972,6 +19810,13 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
18972
19810
  };
18973
19811
  Returns: boolean;
18974
19812
  };
19813
+ is_time_log_week_locked: {
19814
+ Args: {
19815
+ p_employee_id: string;
19816
+ p_start_time: string;
19817
+ };
19818
+ Returns: boolean;
19819
+ };
18975
19820
  is_user_admin: {
18976
19821
  Args: never;
18977
19822
  Returns: boolean;
@@ -18986,13 +19831,14 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
18986
19831
  };
18987
19832
  Returns: boolean;
18988
19833
  };
18989
- list_monteurs: {
19834
+ list_medewerkers: {
18990
19835
  Args: never;
18991
19836
  Returns: {
18992
19837
  avatar_url: string;
18993
19838
  display_name: string;
18994
19839
  email: string;
18995
19840
  id: string;
19841
+ roles: string[];
18996
19842
  }[];
18997
19843
  };
18998
19844
  list_my_planning_items: {
@@ -19483,6 +20329,65 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
19483
20329
  };
19484
20330
  Returns: number;
19485
20331
  };
20332
+ logistics_plan_claim: {
20333
+ Args: {
20334
+ p_limit?: number;
20335
+ };
20336
+ Returns: {
20337
+ attempts: number;
20338
+ id: string;
20339
+ order_id: string;
20340
+ }[];
20341
+ };
20342
+ logistics_plan_enqueue: {
20343
+ Args: {
20344
+ p_order_id: string;
20345
+ p_reason?: string;
20346
+ };
20347
+ Returns: undefined;
20348
+ };
20349
+ logistics_plan_ensure_event: {
20350
+ Args: {
20351
+ p_order_id: string;
20352
+ };
20353
+ Returns: boolean;
20354
+ };
20355
+ logistics_plan_finish: {
20356
+ Args: {
20357
+ p_error?: string;
20358
+ p_id: string;
20359
+ };
20360
+ Returns: undefined;
20361
+ };
20362
+ logistics_plan_impact_orders: {
20363
+ Args: {
20364
+ p_order_id: string;
20365
+ };
20366
+ Returns: {
20367
+ buffer_id: string;
20368
+ order_id: string;
20369
+ plan_date: string;
20370
+ }[];
20371
+ };
20372
+ logistics_plan_kick: {
20373
+ Args: never;
20374
+ Returns: undefined;
20375
+ };
20376
+ logistics_plan_prune: {
20377
+ Args: never;
20378
+ Returns: number;
20379
+ };
20380
+ logistics_plan_release_stale: {
20381
+ Args: never;
20382
+ Returns: number;
20383
+ };
20384
+ logistics_plan_setting: {
20385
+ Args: {
20386
+ p_default: number;
20387
+ p_key: string;
20388
+ };
20389
+ Returns: number;
20390
+ };
19486
20391
  logistics_queue_capacity_email: {
19487
20392
  Args: {
19488
20393
  p_alert_id: string;
@@ -19721,6 +20626,14 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
19721
20626
  };
19722
20627
  Returns: undefined;
19723
20628
  };
20629
+ my_module_permissions: {
20630
+ Args: never;
20631
+ Returns: {
20632
+ feature_id: string;
20633
+ module_id: string;
20634
+ permission: string;
20635
+ }[];
20636
+ };
19724
20637
  next_manufacture_partij: {
19725
20638
  Args: {
19726
20639
  _tenant_id: string;
@@ -19771,6 +20684,13 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
19771
20684
  };
19772
20685
  Returns: boolean;
19773
20686
  };
20687
+ opruim_print_historie: {
20688
+ Args: never;
20689
+ Returns: {
20690
+ ontdaan: number;
20691
+ verwijderd: number;
20692
+ }[];
20693
+ };
19774
20694
  order_number_prefix: {
19775
20695
  Args: {
19776
20696
  p_custom_fields?: import("./types").Json;
@@ -20165,6 +21085,12 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
20165
21085
  };
20166
21086
  Returns: undefined;
20167
21087
  };
21088
+ reset_stalled_floriday_stock_queue: {
21089
+ Args: {
21090
+ p_include_failed?: boolean;
21091
+ };
21092
+ Returns: number;
21093
+ };
20168
21094
  resolve_group_allocation: {
20169
21095
  Args: {
20170
21096
  _needed: number;
@@ -20219,10 +21145,18 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
20219
21145
  Args: never;
20220
21146
  Returns: undefined;
20221
21147
  };
21148
+ run_floriday_stock_queue_process: {
21149
+ Args: never;
21150
+ Returns: undefined;
21151
+ };
20222
21152
  run_logistics_tasks_dispatch: {
20223
21153
  Args: never;
20224
21154
  Returns: undefined;
20225
21155
  };
21156
+ run_print_queue_ticks: {
21157
+ Args: never;
21158
+ Returns: number;
21159
+ };
20226
21160
  run_twinfield_queue_tick: {
20227
21161
  Args: never;
20228
21162
  Returns: undefined;
@@ -20576,6 +21510,16 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
20576
21510
  };
20577
21511
  Returns: string[];
20578
21512
  };
21513
+ switch_time_log: {
21514
+ Args: {
21515
+ p_employee_id: string;
21516
+ p_start_lat?: number;
21517
+ p_start_lng?: number;
21518
+ p_type: string;
21519
+ p_work_order_id?: string;
21520
+ };
21521
+ Returns: import("./types").Json;
21522
+ };
20579
21523
  sync_all_layer_stocks: {
20580
21524
  Args: never;
20581
21525
  Returns: undefined;
@@ -20610,6 +21554,15 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
20610
21554
  };
20611
21555
  Returns: undefined;
20612
21556
  };
21557
+ trade_item_stock_duplicates: {
21558
+ Args: never;
21559
+ Returns: {
21560
+ keys: string[];
21561
+ product_id: string;
21562
+ product_name: string;
21563
+ row_count: number;
21564
+ }[];
21565
+ };
20613
21566
  try_debtor_lock: {
20614
21567
  Args: {
20615
21568
  _group_key: string;
@@ -20617,6 +21570,24 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
20617
21570
  };
20618
21571
  Returns: boolean;
20619
21572
  };
21573
+ twinfield_cron_lock_acquire: {
21574
+ Args: {
21575
+ _job_name: string;
21576
+ _stale_seconds?: number;
21577
+ };
21578
+ Returns: boolean;
21579
+ };
21580
+ twinfield_cron_lock_release: {
21581
+ Args: {
21582
+ _error?: string;
21583
+ _job_name: string;
21584
+ };
21585
+ Returns: undefined;
21586
+ };
21587
+ twinfield_prune_push_queue: {
21588
+ Args: never;
21589
+ Returns: number;
21590
+ };
20620
21591
  twinfield_register_cron: {
20621
21592
  Args: {
20622
21593
  apikey?: string;