@flowselections/floriday-verkoop-module 1.0.40 → 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 (94) hide show
  1. package/dist-lib/components/verkoop/EngineBufferCard.d.ts.map +1 -1
  2. package/dist-lib/components/verkoop/EngineBufferCard.js +2 -2
  3. package/dist-lib/components/verkoop/InvoiceTimingSettings.d.ts +3 -0
  4. package/dist-lib/components/verkoop/InvoiceTimingSettings.d.ts.map +1 -0
  5. package/dist-lib/components/verkoop/InvoiceTimingSettings.js +54 -0
  6. package/dist-lib/components/verkoop/SalesOrdersTable.d.ts.map +1 -1
  7. package/dist-lib/components/verkoop/SalesOrdersTable.js +44 -91
  8. package/dist-lib/components/verkoop/VerkoopOrdersPage.d.ts.map +1 -1
  9. package/dist-lib/components/verkoop/VerkoopOrdersPage.js +59 -23
  10. package/dist-lib/index.d.ts +1 -0
  11. package/dist-lib/index.d.ts.map +1 -1
  12. package/dist-lib/index.js +3 -1
  13. package/dist-lib/integrations/supabase/auth-middleware.d.ts +1429 -159
  14. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  15. package/dist-lib/integrations/supabase/client.d.ts +1429 -159
  16. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  17. package/dist-lib/integrations/supabase/client.server.d.ts +1429 -159
  18. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  19. package/dist-lib/integrations/supabase/types.d.ts +1436 -161
  20. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  21. package/dist-lib/integrations/supabase/types.js +12 -1
  22. package/dist-lib/lib/cart-lock.functions.d.ts +1429 -159
  23. package/dist-lib/lib/cart-lock.functions.d.ts.map +1 -1
  24. package/dist-lib/lib/cart-planning-settings.functions.d.ts +15410 -1440
  25. package/dist-lib/lib/cart-planning-settings.functions.d.ts.map +1 -1
  26. package/dist-lib/lib/cart-replan.functions.d.ts +4290 -480
  27. package/dist-lib/lib/cart-replan.functions.d.ts.map +1 -1
  28. package/dist-lib/lib/create-order.functions.d.ts +42631 -1921
  29. package/dist-lib/lib/create-order.functions.d.ts.map +1 -1
  30. package/dist-lib/lib/create-order.functions.js +30 -0
  31. package/dist-lib/lib/cron/index.d.ts +1 -0
  32. package/dist-lib/lib/cron/index.d.ts.map +1 -1
  33. package/dist-lib/lib/cron/index.js +1 -0
  34. package/dist-lib/lib/cron/invoice-due.d.ts +4 -0
  35. package/dist-lib/lib/cron/invoice-due.d.ts.map +1 -0
  36. package/dist-lib/lib/cron/invoice-due.js +21 -0
  37. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts +4290 -480
  38. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts.map +1 -1
  39. package/dist-lib/lib/floriday-fulfillment-status.server.d.ts +28 -0
  40. package/dist-lib/lib/floriday-fulfillment-status.server.d.ts.map +1 -0
  41. package/dist-lib/lib/floriday-fulfillment-status.server.js +91 -0
  42. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts +1429 -159
  43. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts.map +1 -1
  44. package/dist-lib/lib/floriday-mirror.functions.d.ts +1429 -159
  45. package/dist-lib/lib/floriday-mirror.functions.d.ts.map +1 -1
  46. package/dist-lib/lib/floriday-mirror.functions.js +27 -4
  47. package/dist-lib/lib/floriday-public.functions.d.ts +9850 -960
  48. package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
  49. package/dist-lib/lib/floriday-writes.functions.d.ts +7070 -720
  50. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  51. package/dist-lib/lib/invoice-timing.d.ts +38 -0
  52. package/dist-lib/lib/invoice-timing.d.ts.map +1 -0
  53. package/dist-lib/lib/invoice-timing.functions.d.ts +86633 -0
  54. package/dist-lib/lib/invoice-timing.functions.d.ts.map +1 -0
  55. package/dist-lib/lib/invoice-timing.functions.js +88 -0
  56. package/dist-lib/lib/invoice-timing.js +139 -0
  57. package/dist-lib/lib/invoice-timing.server.d.ts +22 -0
  58. package/dist-lib/lib/invoice-timing.server.d.ts.map +1 -0
  59. package/dist-lib/lib/invoice-timing.server.js +154 -0
  60. package/dist-lib/lib/load-carriers.functions.d.ts +1429 -159
  61. package/dist-lib/lib/load-carriers.functions.d.ts.map +1 -1
  62. package/dist-lib/lib/logistics-engine.functions.d.ts +7072 -722
  63. package/dist-lib/lib/logistics-engine.functions.d.ts.map +1 -1
  64. package/dist-lib/lib/logistics-stock.functions.d.ts +2900 -360
  65. package/dist-lib/lib/logistics-stock.functions.d.ts.map +1 -1
  66. package/dist-lib/lib/order-addresses.functions.d.ts +1429 -159
  67. package/dist-lib/lib/order-addresses.functions.d.ts.map +1 -1
  68. package/dist-lib/lib/order-buffers.functions.d.ts +4290 -480
  69. package/dist-lib/lib/order-buffers.functions.d.ts.map +1 -1
  70. package/dist-lib/lib/order-carrier.functions.d.ts +2900 -360
  71. package/dist-lib/lib/order-carrier.functions.d.ts.map +1 -1
  72. package/dist-lib/lib/order-pickup.functions.d.ts +2900 -360
  73. package/dist-lib/lib/order-pickup.functions.d.ts.map +1 -1
  74. package/dist-lib/lib/order-shipments.functions.d.ts +5680 -600
  75. package/dist-lib/lib/order-shipments.functions.d.ts.map +1 -1
  76. package/dist-lib/lib/order-status.d.ts +33 -0
  77. package/dist-lib/lib/order-status.d.ts.map +1 -0
  78. package/dist-lib/lib/order-status.js +77 -0
  79. package/dist-lib/lib/salesorders-list.functions.d.ts +1430 -160
  80. package/dist-lib/lib/salesorders-list.functions.d.ts.map +1 -1
  81. package/dist-lib/lib/salesorders-list.functions.js +1 -1
  82. package/dist-lib/lib/salesorders-list.server.d.ts +2 -1
  83. package/dist-lib/lib/salesorders-list.server.d.ts.map +1 -1
  84. package/dist-lib/lib/salesorders-list.server.js +145 -58
  85. package/dist-lib/lib/salesorders-mapping.d.ts +19 -0
  86. package/dist-lib/lib/salesorders-mapping.d.ts.map +1 -1
  87. package/dist-lib/lib/salesorders-mapping.js +19 -7
  88. package/dist-lib/lib/salesorders.functions.d.ts +7070 -720
  89. package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
  90. package/dist-lib/lib/tradeitems.functions.d.ts +1429 -159
  91. package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
  92. package/dist-lib/lib/useSalesOrdersQuery.d.ts +2 -1
  93. package/dist-lib/lib/useSalesOrdersQuery.d.ts.map +1 -1
  94. package/package.json +10 -2
@@ -895,6 +895,126 @@ export type Database = {
895
895
  };
896
896
  Relationships: [];
897
897
  };
898
+ cao_holidays: {
899
+ Row: {
900
+ created_at: string;
901
+ description: string | null;
902
+ holiday_date: string;
903
+ id: string;
904
+ updated_at: string;
905
+ };
906
+ Insert: {
907
+ created_at?: string;
908
+ description?: string | null;
909
+ holiday_date: string;
910
+ id?: string;
911
+ updated_at?: string;
912
+ };
913
+ Update: {
914
+ created_at?: string;
915
+ description?: string | null;
916
+ holiday_date?: string;
917
+ id?: string;
918
+ updated_at?: string;
919
+ };
920
+ Relationships: [];
921
+ };
922
+ cao_settings: {
923
+ Row: {
924
+ auto_break_after_hours: number;
925
+ auto_break_minutes: number;
926
+ auto_break_unpaid: boolean;
927
+ auto_stop_after_hours: number;
928
+ callout_fee: number;
929
+ created_at: string;
930
+ daily_regular_hours: number;
931
+ default_hourly_rate: number;
932
+ id: string;
933
+ materials_markup_percent: number;
934
+ max_daily_hours: number;
935
+ max_weekly_hours: number;
936
+ meal_allowance_amount: number;
937
+ overtime_pct_178: number;
938
+ overtime_pct_189: number;
939
+ overtime_pct_212: number;
940
+ reminder_after_hours: number;
941
+ standby_evening_amount: number;
942
+ standby_weekend_amount: number;
943
+ travel_cost_per_km: number | null;
944
+ travel_cost_threshold_km: number | null;
945
+ travel_counts_as_work: boolean;
946
+ travel_hourly_rate: number;
947
+ travel_rate_per_hour: number;
948
+ travel_threshold_minutes: number;
949
+ updated_at: string;
950
+ weekend_always_212: boolean;
951
+ window_end: string;
952
+ window_start: string;
953
+ };
954
+ Insert: {
955
+ auto_break_after_hours?: number;
956
+ auto_break_minutes?: number;
957
+ auto_break_unpaid?: boolean;
958
+ auto_stop_after_hours?: number;
959
+ callout_fee?: number;
960
+ created_at?: string;
961
+ daily_regular_hours?: number;
962
+ default_hourly_rate?: number;
963
+ id?: string;
964
+ materials_markup_percent?: number;
965
+ max_daily_hours?: number;
966
+ max_weekly_hours?: number;
967
+ meal_allowance_amount?: number;
968
+ overtime_pct_178?: number;
969
+ overtime_pct_189?: number;
970
+ overtime_pct_212?: number;
971
+ reminder_after_hours?: number;
972
+ standby_evening_amount?: number;
973
+ standby_weekend_amount?: number;
974
+ travel_cost_per_km?: number | null;
975
+ travel_cost_threshold_km?: number | null;
976
+ travel_counts_as_work?: boolean;
977
+ travel_hourly_rate?: number;
978
+ travel_rate_per_hour?: number;
979
+ travel_threshold_minutes?: number;
980
+ updated_at?: string;
981
+ weekend_always_212?: boolean;
982
+ window_end?: string;
983
+ window_start?: string;
984
+ };
985
+ Update: {
986
+ auto_break_after_hours?: number;
987
+ auto_break_minutes?: number;
988
+ auto_break_unpaid?: boolean;
989
+ auto_stop_after_hours?: number;
990
+ callout_fee?: number;
991
+ created_at?: string;
992
+ daily_regular_hours?: number;
993
+ default_hourly_rate?: number;
994
+ id?: string;
995
+ materials_markup_percent?: number;
996
+ max_daily_hours?: number;
997
+ max_weekly_hours?: number;
998
+ meal_allowance_amount?: number;
999
+ overtime_pct_178?: number;
1000
+ overtime_pct_189?: number;
1001
+ overtime_pct_212?: number;
1002
+ reminder_after_hours?: number;
1003
+ standby_evening_amount?: number;
1004
+ standby_weekend_amount?: number;
1005
+ travel_cost_per_km?: number | null;
1006
+ travel_cost_threshold_km?: number | null;
1007
+ travel_counts_as_work?: boolean;
1008
+ travel_hourly_rate?: number;
1009
+ travel_rate_per_hour?: number;
1010
+ travel_threshold_minutes?: number;
1011
+ updated_at?: string;
1012
+ weekend_always_212?: boolean;
1013
+ window_end?: string;
1014
+ window_start?: string;
1015
+ };
1016
+ Relationships: [];
1017
+ };
898
1018
  carrier_shipping_rates: {
899
1019
  Row: {
900
1020
  carrier_id: string;
@@ -1719,7 +1839,7 @@ export type Database = {
1719
1839
  city: string | null;
1720
1840
  country: string | null;
1721
1841
  created_at: string;
1722
- customer_id: string | null;
1842
+ customer_id: string;
1723
1843
  external_key: string | null;
1724
1844
  external_provider: string | null;
1725
1845
  floriday_location_id: string | null;
@@ -1743,7 +1863,7 @@ export type Database = {
1743
1863
  city?: string | null;
1744
1864
  country?: string | null;
1745
1865
  created_at?: string;
1746
- customer_id?: string | null;
1866
+ customer_id: string;
1747
1867
  external_key?: string | null;
1748
1868
  external_provider?: string | null;
1749
1869
  floriday_location_id?: string | null;
@@ -1767,7 +1887,7 @@ export type Database = {
1767
1887
  city?: string | null;
1768
1888
  country?: string | null;
1769
1889
  created_at?: string;
1770
- customer_id?: string | null;
1890
+ customer_id?: string;
1771
1891
  external_key?: string | null;
1772
1892
  external_provider?: string | null;
1773
1893
  floriday_location_id?: string | null;
@@ -5833,12 +5953,17 @@ export type Database = {
5833
5953
  attempts: number;
5834
5954
  connection_id: string;
5835
5955
  created_at: string;
5956
+ desired_available: boolean | null;
5836
5957
  gateway_attempt_id: string | null;
5837
5958
  id: string;
5838
5959
  last_error: string | null;
5960
+ locked_at: string | null;
5961
+ locked_by: string | null;
5962
+ next_attempt_at: string;
5839
5963
  number_of_pieces: number;
5840
5964
  sent_at: string | null;
5841
5965
  status: string;
5966
+ superseded_by: string | null;
5842
5967
  trade_item_id: string;
5843
5968
  updated_at: string;
5844
5969
  user_id: string;
@@ -5847,12 +5972,17 @@ export type Database = {
5847
5972
  attempts?: number;
5848
5973
  connection_id: string;
5849
5974
  created_at?: string;
5975
+ desired_available?: boolean | null;
5850
5976
  gateway_attempt_id?: string | null;
5851
5977
  id?: string;
5852
5978
  last_error?: string | null;
5979
+ locked_at?: string | null;
5980
+ locked_by?: string | null;
5981
+ next_attempt_at?: string;
5853
5982
  number_of_pieces?: number;
5854
5983
  sent_at?: string | null;
5855
5984
  status?: string;
5985
+ superseded_by?: string | null;
5856
5986
  trade_item_id: string;
5857
5987
  updated_at?: string;
5858
5988
  user_id: string;
@@ -5861,12 +5991,17 @@ export type Database = {
5861
5991
  attempts?: number;
5862
5992
  connection_id?: string;
5863
5993
  created_at?: string;
5994
+ desired_available?: boolean | null;
5864
5995
  gateway_attempt_id?: string | null;
5865
5996
  id?: string;
5866
5997
  last_error?: string | null;
5998
+ locked_at?: string | null;
5999
+ locked_by?: string | null;
6000
+ next_attempt_at?: string;
5867
6001
  number_of_pieces?: number;
5868
6002
  sent_at?: string | null;
5869
6003
  status?: string;
6004
+ superseded_by?: string | null;
5870
6005
  trade_item_id?: string;
5871
6006
  updated_at?: string;
5872
6007
  user_id?: string;
@@ -6631,6 +6766,7 @@ export type Database = {
6631
6766
  Row: {
6632
6767
  buyer_organization_id: string | null;
6633
6768
  connection_id: string;
6769
+ controlled_at: string | null;
6634
6770
  created_at: string;
6635
6771
  data: Json;
6636
6772
  floriday_id: string;
@@ -6642,6 +6778,7 @@ export type Database = {
6642
6778
  Insert: {
6643
6779
  buyer_organization_id?: string | null;
6644
6780
  connection_id: string;
6781
+ controlled_at?: string | null;
6645
6782
  created_at?: string;
6646
6783
  data: Json;
6647
6784
  floriday_id: string;
@@ -6653,6 +6790,7 @@ export type Database = {
6653
6790
  Update: {
6654
6791
  buyer_organization_id?: string | null;
6655
6792
  connection_id?: string;
6793
+ controlled_at?: string | null;
6656
6794
  created_at?: string;
6657
6795
  data?: Json;
6658
6796
  floriday_id?: string;
@@ -7586,6 +7724,54 @@ export type Database = {
7586
7724
  };
7587
7725
  Relationships: [];
7588
7726
  };
7727
+ invoice_timing_settings: {
7728
+ Row: {
7729
+ anchor: string;
7730
+ business_days_only: boolean;
7731
+ created_at: string;
7732
+ enabled: boolean;
7733
+ id: string;
7734
+ offset_days: number;
7735
+ pickup_anchor: string;
7736
+ pickup_business_days_only: boolean;
7737
+ pickup_offset_days: number;
7738
+ pickup_time_of_day: string;
7739
+ singleton: boolean;
7740
+ time_of_day: string;
7741
+ updated_at: string;
7742
+ };
7743
+ Insert: {
7744
+ anchor?: string;
7745
+ business_days_only?: boolean;
7746
+ created_at?: string;
7747
+ enabled?: boolean;
7748
+ id?: string;
7749
+ offset_days?: number;
7750
+ pickup_anchor?: string;
7751
+ pickup_business_days_only?: boolean;
7752
+ pickup_offset_days?: number;
7753
+ pickup_time_of_day?: string;
7754
+ singleton?: boolean;
7755
+ time_of_day?: string;
7756
+ updated_at?: string;
7757
+ };
7758
+ Update: {
7759
+ anchor?: string;
7760
+ business_days_only?: boolean;
7761
+ created_at?: string;
7762
+ enabled?: boolean;
7763
+ id?: string;
7764
+ offset_days?: number;
7765
+ pickup_anchor?: string;
7766
+ pickup_business_days_only?: boolean;
7767
+ pickup_offset_days?: number;
7768
+ pickup_time_of_day?: string;
7769
+ singleton?: boolean;
7770
+ time_of_day?: string;
7771
+ updated_at?: string;
7772
+ };
7773
+ Relationships: [];
7774
+ };
7589
7775
  itk_contact_persons: {
7590
7776
  Row: {
7591
7777
  created_at: string;
@@ -7909,7 +8095,6 @@ export type Database = {
7909
8095
  start_date: string;
7910
8096
  start_time: string | null;
7911
8097
  status: string;
7912
- tenant_id: string;
7913
8098
  updated_at: string;
7914
8099
  user_id: string;
7915
8100
  };
@@ -7927,7 +8112,6 @@ export type Database = {
7927
8112
  start_date: string;
7928
8113
  start_time?: string | null;
7929
8114
  status?: string;
7930
- tenant_id?: string;
7931
8115
  updated_at?: string;
7932
8116
  user_id: string;
7933
8117
  };
@@ -7945,7 +8129,6 @@ export type Database = {
7945
8129
  start_date?: string;
7946
8130
  start_time?: string | null;
7947
8131
  status?: string;
7948
- tenant_id?: string;
7949
8132
  updated_at?: string;
7950
8133
  user_id?: string;
7951
8134
  };
@@ -7954,14 +8137,14 @@ export type Database = {
7954
8137
  foreignKeyName: "leave_requests_monteur_id_fkey";
7955
8138
  columns: ["monteur_id"];
7956
8139
  isOneToOne: false;
7957
- referencedRelation: "monteurs";
8140
+ referencedRelation: "profiles";
7958
8141
  referencedColumns: ["id"];
7959
8142
  },
7960
8143
  {
7961
8144
  foreignKeyName: "leave_requests_user_id_fkey";
7962
8145
  columns: ["user_id"];
7963
8146
  isOneToOne: false;
7964
- referencedRelation: "monteurs";
8147
+ referencedRelation: "profiles";
7965
8148
  referencedColumns: ["id"];
7966
8149
  }
7967
8150
  ];
@@ -8709,6 +8892,69 @@ export type Database = {
8709
8892
  };
8710
8893
  Relationships: [];
8711
8894
  };
8895
+ logistics_floriday_pushes: {
8896
+ Row: {
8897
+ attempts: number;
8898
+ created_at: string;
8899
+ first_queued_at: string;
8900
+ fulfillment_order_id: string | null;
8901
+ id: string;
8902
+ last_error: string | null;
8903
+ last_error_at: string | null;
8904
+ last_sent_hash: string | null;
8905
+ locked_by: string | null;
8906
+ locked_until: string | null;
8907
+ next_attempt_at: string;
8908
+ order_ref: string;
8909
+ payload: Json;
8910
+ payload_hash: string | null;
8911
+ revision: number;
8912
+ sent_at: string | null;
8913
+ status: string;
8914
+ updated_at: string;
8915
+ };
8916
+ Insert: {
8917
+ attempts?: number;
8918
+ created_at?: string;
8919
+ first_queued_at?: string;
8920
+ fulfillment_order_id?: string | null;
8921
+ id?: string;
8922
+ last_error?: string | null;
8923
+ last_error_at?: string | null;
8924
+ last_sent_hash?: string | null;
8925
+ locked_by?: string | null;
8926
+ locked_until?: string | null;
8927
+ next_attempt_at?: string;
8928
+ order_ref: string;
8929
+ payload?: Json;
8930
+ payload_hash?: string | null;
8931
+ revision?: number;
8932
+ sent_at?: string | null;
8933
+ status?: string;
8934
+ updated_at?: string;
8935
+ };
8936
+ Update: {
8937
+ attempts?: number;
8938
+ created_at?: string;
8939
+ first_queued_at?: string;
8940
+ fulfillment_order_id?: string | null;
8941
+ id?: string;
8942
+ last_error?: string | null;
8943
+ last_error_at?: string | null;
8944
+ last_sent_hash?: string | null;
8945
+ locked_by?: string | null;
8946
+ locked_until?: string | null;
8947
+ next_attempt_at?: string;
8948
+ order_ref?: string;
8949
+ payload?: Json;
8950
+ payload_hash?: string | null;
8951
+ revision?: number;
8952
+ sent_at?: string | null;
8953
+ status?: string;
8954
+ updated_at?: string;
8955
+ };
8956
+ Relationships: [];
8957
+ };
8712
8958
  logistics_formulas: {
8713
8959
  Row: {
8714
8960
  created_at: string;
@@ -8789,6 +9035,45 @@ export type Database = {
8789
9035
  };
8790
9036
  Relationships: [];
8791
9037
  };
9038
+ logistics_plan_queue: {
9039
+ Row: {
9040
+ attempts: number;
9041
+ claimed_at: string | null;
9042
+ enqueued_at: string;
9043
+ error: string | null;
9044
+ id: string;
9045
+ next_attempt_at: string;
9046
+ order_id: string;
9047
+ reason: string;
9048
+ status: string;
9049
+ updated_at: string;
9050
+ };
9051
+ Insert: {
9052
+ attempts?: number;
9053
+ claimed_at?: string | null;
9054
+ enqueued_at?: string;
9055
+ error?: string | null;
9056
+ id?: string;
9057
+ next_attempt_at?: string;
9058
+ order_id: string;
9059
+ reason?: string;
9060
+ status?: string;
9061
+ updated_at?: string;
9062
+ };
9063
+ Update: {
9064
+ attempts?: number;
9065
+ claimed_at?: string | null;
9066
+ enqueued_at?: string;
9067
+ error?: string | null;
9068
+ id?: string;
9069
+ next_attempt_at?: string;
9070
+ order_id?: string;
9071
+ reason?: string;
9072
+ status?: string;
9073
+ updated_at?: string;
9074
+ };
9075
+ Relationships: [];
9076
+ };
8792
9077
  logistics_plan_runs: {
8793
9078
  Row: {
8794
9079
  created_at: string;
@@ -8867,6 +9152,24 @@ export type Database = {
8867
9152
  }
8868
9153
  ];
8869
9154
  };
9155
+ logistics_plan_settings: {
9156
+ Row: {
9157
+ key: string;
9158
+ updated_at: string;
9159
+ value: string;
9160
+ };
9161
+ Insert: {
9162
+ key: string;
9163
+ updated_at?: string;
9164
+ value: string;
9165
+ };
9166
+ Update: {
9167
+ key?: string;
9168
+ updated_at?: string;
9169
+ value?: string;
9170
+ };
9171
+ Relationships: [];
9172
+ };
8870
9173
  logistics_rebuffer_state: {
8871
9174
  Row: {
8872
9175
  created_at: string;
@@ -9587,14 +9890,17 @@ export type Database = {
9587
9890
  };
9588
9891
  mailbox_messages: {
9589
9892
  Row: {
9893
+ attachments: Json;
9590
9894
  body_html: string | null;
9591
9895
  body_text: string | null;
9896
+ cc_recipients: Json;
9592
9897
  connection_id: string | null;
9593
9898
  created_at: string;
9594
9899
  error_message: string | null;
9595
9900
  external_id: string | null;
9596
9901
  from_email: string | null;
9597
9902
  from_name: string | null;
9903
+ has_attachments: boolean;
9598
9904
  id: string;
9599
9905
  message_id: string | null;
9600
9906
  profile_id: string | null;
@@ -9602,18 +9908,22 @@ export type Database = {
9602
9908
  received_at: string | null;
9603
9909
  status: string;
9604
9910
  subject: string | null;
9911
+ to_recipients: Json;
9605
9912
  uid: number | null;
9606
9913
  updated_at: string;
9607
9914
  };
9608
9915
  Insert: {
9916
+ attachments?: Json;
9609
9917
  body_html?: string | null;
9610
9918
  body_text?: string | null;
9919
+ cc_recipients?: Json;
9611
9920
  connection_id?: string | null;
9612
9921
  created_at?: string;
9613
9922
  error_message?: string | null;
9614
9923
  external_id?: string | null;
9615
9924
  from_email?: string | null;
9616
9925
  from_name?: string | null;
9926
+ has_attachments?: boolean;
9617
9927
  id?: string;
9618
9928
  message_id?: string | null;
9619
9929
  profile_id?: string | null;
@@ -9621,18 +9931,22 @@ export type Database = {
9621
9931
  received_at?: string | null;
9622
9932
  status?: string;
9623
9933
  subject?: string | null;
9934
+ to_recipients?: Json;
9624
9935
  uid?: number | null;
9625
9936
  updated_at?: string;
9626
9937
  };
9627
9938
  Update: {
9939
+ attachments?: Json;
9628
9940
  body_html?: string | null;
9629
9941
  body_text?: string | null;
9942
+ cc_recipients?: Json;
9630
9943
  connection_id?: string | null;
9631
9944
  created_at?: string;
9632
9945
  error_message?: string | null;
9633
9946
  external_id?: string | null;
9634
9947
  from_email?: string | null;
9635
9948
  from_name?: string | null;
9949
+ has_attachments?: boolean;
9636
9950
  id?: string;
9637
9951
  message_id?: string | null;
9638
9952
  profile_id?: string | null;
@@ -9640,6 +9954,7 @@ export type Database = {
9640
9954
  received_at?: string | null;
9641
9955
  status?: string;
9642
9956
  subject?: string | null;
9957
+ to_recipients?: Json;
9643
9958
  uid?: number | null;
9644
9959
  updated_at?: string;
9645
9960
  };
@@ -10037,142 +10352,204 @@ export type Database = {
10037
10352
  };
10038
10353
  Relationships: [];
10039
10354
  };
10040
- module_permissions: {
10355
+ material_usage: {
10041
10356
  Row: {
10042
10357
  created_at: string;
10043
10358
  id: string;
10044
- module_id: string;
10045
- permission: string;
10046
- role: Database["public"]["Enums"]["app_role"];
10359
+ material_name: string;
10360
+ monteur_id: string | null;
10361
+ price_at_time: number;
10362
+ quantity_used: number;
10047
10363
  updated_at: string;
10364
+ van_inventory_id: string | null;
10365
+ work_order_id: string;
10048
10366
  };
10049
10367
  Insert: {
10050
10368
  created_at?: string;
10051
10369
  id?: string;
10052
- module_id: string;
10053
- permission: string;
10054
- role: Database["public"]["Enums"]["app_role"];
10370
+ material_name: string;
10371
+ monteur_id?: string | null;
10372
+ price_at_time?: number;
10373
+ quantity_used?: number;
10055
10374
  updated_at?: string;
10375
+ van_inventory_id?: string | null;
10376
+ work_order_id: string;
10056
10377
  };
10057
10378
  Update: {
10058
10379
  created_at?: string;
10059
10380
  id?: string;
10060
- module_id?: string;
10061
- permission?: string;
10062
- role?: Database["public"]["Enums"]["app_role"];
10381
+ material_name?: string;
10382
+ monteur_id?: string | null;
10383
+ price_at_time?: number;
10384
+ quantity_used?: number;
10063
10385
  updated_at?: string;
10386
+ van_inventory_id?: string | null;
10387
+ work_order_id?: string;
10064
10388
  };
10065
- Relationships: [];
10389
+ Relationships: [
10390
+ {
10391
+ foreignKeyName: "material_usage_monteur_id_fkey";
10392
+ columns: ["monteur_id"];
10393
+ isOneToOne: false;
10394
+ referencedRelation: "profiles";
10395
+ referencedColumns: ["id"];
10396
+ },
10397
+ {
10398
+ foreignKeyName: "material_usage_van_inventory_id_fkey";
10399
+ columns: ["van_inventory_id"];
10400
+ isOneToOne: false;
10401
+ referencedRelation: "van_inventories";
10402
+ referencedColumns: ["id"];
10403
+ },
10404
+ {
10405
+ foreignKeyName: "material_usage_work_order_id_fkey";
10406
+ columns: ["work_order_id"];
10407
+ isOneToOne: false;
10408
+ referencedRelation: "work_orders";
10409
+ referencedColumns: ["id"];
10410
+ }
10411
+ ];
10066
10412
  };
10067
- module_runtime_config: {
10413
+ module_features: {
10068
10414
  Row: {
10069
- key: string;
10070
- updated_at: string;
10071
- value: string;
10415
+ created_at: string;
10416
+ feature_id: string;
10417
+ id: string;
10418
+ is_active: boolean;
10419
+ last_seen_at: string;
10420
+ module_id: string;
10421
+ name: string;
10072
10422
  };
10073
10423
  Insert: {
10074
- key: string;
10075
- updated_at?: string;
10076
- value: string;
10424
+ created_at?: string;
10425
+ feature_id: string;
10426
+ id?: string;
10427
+ is_active?: boolean;
10428
+ last_seen_at?: string;
10429
+ module_id: string;
10430
+ name: string;
10077
10431
  };
10078
10432
  Update: {
10079
- key?: string;
10080
- updated_at?: string;
10081
- value?: string;
10433
+ created_at?: string;
10434
+ feature_id?: string;
10435
+ id?: string;
10436
+ is_active?: boolean;
10437
+ last_seen_at?: string;
10438
+ module_id?: string;
10439
+ name?: string;
10082
10440
  };
10083
10441
  Relationships: [];
10084
10442
  };
10085
- modules: {
10443
+ module_permissions: {
10086
10444
  Row: {
10087
10445
  created_at: string;
10088
- description: string | null;
10089
10446
  id: string;
10090
- is_active: boolean;
10091
- last_seen_at: string | null;
10092
- module_key: string;
10093
- module_name: string;
10447
+ module_id: string;
10448
+ permission: string;
10449
+ role: Database["public"]["Enums"]["app_role"];
10094
10450
  updated_at: string;
10095
10451
  };
10096
10452
  Insert: {
10097
10453
  created_at?: string;
10098
- description?: string | null;
10099
10454
  id?: string;
10100
- is_active?: boolean;
10101
- last_seen_at?: string | null;
10102
- module_key: string;
10103
- module_name: string;
10455
+ module_id: string;
10456
+ permission: string;
10457
+ role: Database["public"]["Enums"]["app_role"];
10104
10458
  updated_at?: string;
10105
10459
  };
10106
10460
  Update: {
10107
10461
  created_at?: string;
10108
- description?: string | null;
10109
10462
  id?: string;
10110
- is_active?: boolean;
10111
- last_seen_at?: string | null;
10112
- module_key?: string;
10113
- module_name?: string;
10114
- updated_at?: string;
10115
- };
10463
+ module_id?: string;
10464
+ permission?: string;
10465
+ role?: Database["public"]["Enums"]["app_role"];
10466
+ updated_at?: string;
10467
+ };
10116
10468
  Relationships: [];
10117
10469
  };
10118
- monteurs: {
10470
+ module_registry: {
10119
10471
  Row: {
10120
- avatar_url: string | null;
10121
- color: string | null;
10122
10472
  created_at: string;
10123
- email: string | null;
10124
- id: string;
10473
+ enforce: boolean;
10125
10474
  is_active: boolean;
10126
- leave_balance_hours: number;
10475
+ last_seen_at: string;
10476
+ module_id: string;
10127
10477
  name: string;
10128
- persnr: number | null;
10129
- phone: string | null;
10130
- role: string;
10131
- tenant_id: string;
10478
+ shell_id: string | null;
10479
+ sort_order: number | null;
10480
+ };
10481
+ Insert: {
10482
+ created_at?: string;
10483
+ enforce?: boolean;
10484
+ is_active?: boolean;
10485
+ last_seen_at?: string;
10486
+ module_id: string;
10487
+ name: string;
10488
+ shell_id?: string | null;
10489
+ sort_order?: number | null;
10490
+ };
10491
+ Update: {
10492
+ created_at?: string;
10493
+ enforce?: boolean;
10494
+ is_active?: boolean;
10495
+ last_seen_at?: string;
10496
+ module_id?: string;
10497
+ name?: string;
10498
+ shell_id?: string | null;
10499
+ sort_order?: number | null;
10500
+ };
10501
+ Relationships: [];
10502
+ };
10503
+ module_runtime_config: {
10504
+ Row: {
10505
+ key: string;
10506
+ updated_at: string;
10507
+ value: string;
10508
+ };
10509
+ Insert: {
10510
+ key: string;
10511
+ updated_at?: string;
10512
+ value: string;
10513
+ };
10514
+ Update: {
10515
+ key?: string;
10516
+ updated_at?: string;
10517
+ value?: string;
10518
+ };
10519
+ Relationships: [];
10520
+ };
10521
+ modules: {
10522
+ Row: {
10523
+ created_at: string;
10524
+ description: string | null;
10525
+ id: string;
10526
+ is_active: boolean;
10527
+ last_seen_at: string | null;
10528
+ module_key: string;
10529
+ module_name: string;
10132
10530
  updated_at: string;
10133
- user_id: string | null;
10134
10531
  };
10135
10532
  Insert: {
10136
- avatar_url?: string | null;
10137
- color?: string | null;
10138
10533
  created_at?: string;
10139
- email?: string | null;
10534
+ description?: string | null;
10140
10535
  id?: string;
10141
10536
  is_active?: boolean;
10142
- leave_balance_hours?: number;
10143
- name: string;
10144
- persnr?: number | null;
10145
- phone?: string | null;
10146
- role?: string;
10147
- tenant_id: string;
10537
+ last_seen_at?: string | null;
10538
+ module_key: string;
10539
+ module_name: string;
10148
10540
  updated_at?: string;
10149
- user_id?: string | null;
10150
10541
  };
10151
10542
  Update: {
10152
- avatar_url?: string | null;
10153
- color?: string | null;
10154
10543
  created_at?: string;
10155
- email?: string | null;
10544
+ description?: string | null;
10156
10545
  id?: string;
10157
10546
  is_active?: boolean;
10158
- leave_balance_hours?: number;
10159
- name?: string;
10160
- persnr?: number | null;
10161
- phone?: string | null;
10162
- role?: string;
10163
- tenant_id?: string;
10547
+ last_seen_at?: string | null;
10548
+ module_key?: string;
10549
+ module_name?: string;
10164
10550
  updated_at?: string;
10165
- user_id?: string | null;
10166
10551
  };
10167
- Relationships: [
10168
- {
10169
- foreignKeyName: "monteurs_tenant_id_fkey";
10170
- columns: ["tenant_id"];
10171
- isOneToOne: false;
10172
- referencedRelation: "tenants";
10173
- referencedColumns: ["id"];
10174
- }
10175
- ];
10552
+ Relationships: [];
10176
10553
  };
10177
10554
  nmbrs_component_mapping: {
10178
10555
  Row: {
@@ -10246,15 +10623,7 @@ export type Database = {
10246
10623
  nmbrs_employee_number?: string;
10247
10624
  updated_at?: string;
10248
10625
  };
10249
- Relationships: [
10250
- {
10251
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
10252
- columns: ["monteur_id"];
10253
- isOneToOne: true;
10254
- referencedRelation: "monteurs";
10255
- referencedColumns: ["id"];
10256
- }
10257
- ];
10626
+ Relationships: [];
10258
10627
  };
10259
10628
  nmbrs_export_lines: {
10260
10629
  Row: {
@@ -10303,13 +10672,6 @@ export type Database = {
10303
10672
  wage_code?: string;
10304
10673
  };
10305
10674
  Relationships: [
10306
- {
10307
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
10308
- columns: ["monteur_id"];
10309
- isOneToOne: false;
10310
- referencedRelation: "monteurs";
10311
- referencedColumns: ["id"];
10312
- },
10313
10675
  {
10314
10676
  foreignKeyName: "nmbrs_export_lines_run_id_fkey";
10315
10677
  columns: ["run_id"];
@@ -11160,6 +11522,45 @@ export type Database = {
11160
11522
  };
11161
11523
  Relationships: [];
11162
11524
  };
11525
+ order_invoice_links: {
11526
+ Row: {
11527
+ attempts: number;
11528
+ created_at: string;
11529
+ error_message: string | null;
11530
+ id: string;
11531
+ invoice_number: string | null;
11532
+ next_attempt_at: string;
11533
+ order_id: string;
11534
+ processed_at: string | null;
11535
+ status: string;
11536
+ updated_at: string;
11537
+ };
11538
+ Insert: {
11539
+ attempts?: number;
11540
+ created_at?: string;
11541
+ error_message?: string | null;
11542
+ id?: string;
11543
+ invoice_number?: string | null;
11544
+ next_attempt_at?: string;
11545
+ order_id: string;
11546
+ processed_at?: string | null;
11547
+ status?: string;
11548
+ updated_at?: string;
11549
+ };
11550
+ Update: {
11551
+ attempts?: number;
11552
+ created_at?: string;
11553
+ error_message?: string | null;
11554
+ id?: string;
11555
+ invoice_number?: string | null;
11556
+ next_attempt_at?: string;
11557
+ order_id?: string;
11558
+ processed_at?: string | null;
11559
+ status?: string;
11560
+ updated_at?: string;
11561
+ };
11562
+ Relationships: [];
11563
+ };
11163
11564
  order_items: {
11164
11565
  Row: {
11165
11566
  crates_per_layer: number | null;
@@ -11351,6 +11752,7 @@ export type Database = {
11351
11752
  delivery_date: string | null;
11352
11753
  floriday_sales_order_id: string | null;
11353
11754
  id: string;
11755
+ invoice_due_at: string | null;
11354
11756
  is_reservation: boolean;
11355
11757
  notes: string | null;
11356
11758
  order_date: string;
@@ -11372,6 +11774,7 @@ export type Database = {
11372
11774
  delivery_date?: string | null;
11373
11775
  floriday_sales_order_id?: string | null;
11374
11776
  id?: string;
11777
+ invoice_due_at?: string | null;
11375
11778
  is_reservation?: boolean;
11376
11779
  notes?: string | null;
11377
11780
  order_date?: string;
@@ -11393,6 +11796,7 @@ export type Database = {
11393
11796
  delivery_date?: string | null;
11394
11797
  floriday_sales_order_id?: string | null;
11395
11798
  id?: string;
11799
+ invoice_due_at?: string | null;
11396
11800
  is_reservation?: boolean;
11397
11801
  notes?: string | null;
11398
11802
  order_date?: string;
@@ -12633,22 +13037,27 @@ export type Database = {
12633
13037
  created_at: string;
12634
13038
  documentnaam: string;
12635
13039
  documenttype: Database["public"]["Enums"]["doc_layout_type"];
13040
+ extern_job_id: string | null;
12636
13041
  foutmelding: string | null;
12637
13042
  gebruiker_id: string | null;
12638
13043
  gebruiker_naam: string;
12639
13044
  gestart_op: string | null;
12640
13045
  id: string;
13046
+ idempotentie_sleutel: string | null;
12641
13047
  is_herprint: boolean;
12642
13048
  kopieen: number;
12643
13049
  layout_id: string | null;
12644
13050
  opgepakt_op: string | null;
12645
13051
  paginas: number;
12646
13052
  payload: Json;
13053
+ pdf_base64: string | null;
13054
+ pdf_url: string | null;
12647
13055
  pogingen: number;
12648
13056
  printer_id: string | null;
12649
13057
  render_html: string | null;
12650
13058
  status: Database["public"]["Enums"]["print_job_status"];
12651
13059
  updated_at: string;
13060
+ volgende_poging: string | null;
12652
13061
  voltooid_op: string | null;
12653
13062
  };
12654
13063
  Insert: {
@@ -12657,22 +13066,27 @@ export type Database = {
12657
13066
  created_at?: string;
12658
13067
  documentnaam?: string;
12659
13068
  documenttype?: Database["public"]["Enums"]["doc_layout_type"];
13069
+ extern_job_id?: string | null;
12660
13070
  foutmelding?: string | null;
12661
13071
  gebruiker_id?: string | null;
12662
13072
  gebruiker_naam?: string;
12663
13073
  gestart_op?: string | null;
12664
13074
  id?: string;
13075
+ idempotentie_sleutel?: string | null;
12665
13076
  is_herprint?: boolean;
12666
13077
  kopieen?: number;
12667
13078
  layout_id?: string | null;
12668
13079
  opgepakt_op?: string | null;
12669
13080
  paginas?: number;
12670
13081
  payload?: Json;
13082
+ pdf_base64?: string | null;
13083
+ pdf_url?: string | null;
12671
13084
  pogingen?: number;
12672
13085
  printer_id?: string | null;
12673
13086
  render_html?: string | null;
12674
13087
  status?: Database["public"]["Enums"]["print_job_status"];
12675
13088
  updated_at?: string;
13089
+ volgende_poging?: string | null;
12676
13090
  voltooid_op?: string | null;
12677
13091
  };
12678
13092
  Update: {
@@ -12681,22 +13095,27 @@ export type Database = {
12681
13095
  created_at?: string;
12682
13096
  documentnaam?: string;
12683
13097
  documenttype?: Database["public"]["Enums"]["doc_layout_type"];
13098
+ extern_job_id?: string | null;
12684
13099
  foutmelding?: string | null;
12685
13100
  gebruiker_id?: string | null;
12686
13101
  gebruiker_naam?: string;
12687
13102
  gestart_op?: string | null;
12688
13103
  id?: string;
13104
+ idempotentie_sleutel?: string | null;
12689
13105
  is_herprint?: boolean;
12690
13106
  kopieen?: number;
12691
13107
  layout_id?: string | null;
12692
13108
  opgepakt_op?: string | null;
12693
13109
  paginas?: number;
12694
13110
  payload?: Json;
13111
+ pdf_base64?: string | null;
13112
+ pdf_url?: string | null;
12695
13113
  pogingen?: number;
12696
13114
  printer_id?: string | null;
12697
13115
  render_html?: string | null;
12698
13116
  status?: Database["public"]["Enums"]["print_job_status"];
12699
13117
  updated_at?: string;
13118
+ volgende_poging?: string | null;
12700
13119
  voltooid_op?: string | null;
12701
13120
  };
12702
13121
  Relationships: [
@@ -12723,6 +13142,72 @@ export type Database = {
12723
13142
  }
12724
13143
  ];
12725
13144
  };
13145
+ print_queue_runners: {
13146
+ Row: {
13147
+ actief: boolean;
13148
+ basis_url: string;
13149
+ created_at: string;
13150
+ id: string;
13151
+ laatst_gezien: string;
13152
+ laatste_fout: string | null;
13153
+ laatste_request_id: number | null;
13154
+ mislukte_posts: number;
13155
+ tick_sleutel: string;
13156
+ updated_at: string;
13157
+ };
13158
+ Insert: {
13159
+ actief?: boolean;
13160
+ basis_url: string;
13161
+ created_at?: string;
13162
+ id?: string;
13163
+ laatst_gezien?: string;
13164
+ laatste_fout?: string | null;
13165
+ laatste_request_id?: number | null;
13166
+ mislukte_posts?: number;
13167
+ tick_sleutel?: string;
13168
+ updated_at?: string;
13169
+ };
13170
+ Update: {
13171
+ actief?: boolean;
13172
+ basis_url?: string;
13173
+ created_at?: string;
13174
+ id?: string;
13175
+ laatst_gezien?: string;
13176
+ laatste_fout?: string | null;
13177
+ laatste_request_id?: number | null;
13178
+ mislukte_posts?: number;
13179
+ tick_sleutel?: string;
13180
+ updated_at?: string;
13181
+ };
13182
+ Relationships: [];
13183
+ };
13184
+ print_queue_settings: {
13185
+ Row: {
13186
+ bewaar_bestanden_dagen: number;
13187
+ bewaar_opdrachten_dagen: number;
13188
+ created_at: string;
13189
+ dubbel_venster_minuten: number;
13190
+ id: string;
13191
+ updated_at: string;
13192
+ };
13193
+ Insert: {
13194
+ bewaar_bestanden_dagen?: number;
13195
+ bewaar_opdrachten_dagen?: number;
13196
+ created_at?: string;
13197
+ dubbel_venster_minuten?: number;
13198
+ id?: string;
13199
+ updated_at?: string;
13200
+ };
13201
+ Update: {
13202
+ bewaar_bestanden_dagen?: number;
13203
+ bewaar_opdrachten_dagen?: number;
13204
+ created_at?: string;
13205
+ dubbel_venster_minuten?: number;
13206
+ id?: string;
13207
+ updated_at?: string;
13208
+ };
13209
+ Relationships: [];
13210
+ };
12726
13211
  print_rules: {
12727
13212
  Row: {
12728
13213
  actief: boolean;
@@ -12891,6 +13376,7 @@ export type Database = {
12891
13376
  agent_id: string | null;
12892
13377
  created_at: string;
12893
13378
  driver: string;
13379
+ extern_printer_id: string | null;
12894
13380
  id: string;
12895
13381
  ip_adres: string | null;
12896
13382
  laatst_gezien: string | null;
@@ -12912,6 +13398,7 @@ export type Database = {
12912
13398
  agent_id?: string | null;
12913
13399
  created_at?: string;
12914
13400
  driver?: string;
13401
+ extern_printer_id?: string | null;
12915
13402
  id?: string;
12916
13403
  ip_adres?: string | null;
12917
13404
  laatst_gezien?: string | null;
@@ -12933,6 +13420,7 @@ export type Database = {
12933
13420
  agent_id?: string | null;
12934
13421
  created_at?: string;
12935
13422
  driver?: string;
13423
+ extern_printer_id?: string | null;
12936
13424
  id?: string;
12937
13425
  ip_adres?: string | null;
12938
13426
  laatst_gezien?: string | null;
@@ -14252,6 +14740,100 @@ export type Database = {
14252
14740
  }
14253
14741
  ];
14254
14742
  };
14743
+ role_assignments: {
14744
+ Row: {
14745
+ created_at: string;
14746
+ id: string;
14747
+ role_id: string;
14748
+ user_id: string;
14749
+ };
14750
+ Insert: {
14751
+ created_at?: string;
14752
+ id?: string;
14753
+ role_id: string;
14754
+ user_id: string;
14755
+ };
14756
+ Update: {
14757
+ created_at?: string;
14758
+ id?: string;
14759
+ role_id?: string;
14760
+ user_id?: string;
14761
+ };
14762
+ Relationships: [
14763
+ {
14764
+ foreignKeyName: "role_assignments_role_id_fkey";
14765
+ columns: ["role_id"];
14766
+ isOneToOne: false;
14767
+ referencedRelation: "roles";
14768
+ referencedColumns: ["id"];
14769
+ }
14770
+ ];
14771
+ };
14772
+ role_permissions: {
14773
+ Row: {
14774
+ can_edit: boolean;
14775
+ can_view: boolean;
14776
+ feature_id: string;
14777
+ id: string;
14778
+ module_id: string;
14779
+ role_id: string;
14780
+ updated_at: string;
14781
+ };
14782
+ Insert: {
14783
+ can_edit?: boolean;
14784
+ can_view?: boolean;
14785
+ feature_id?: string;
14786
+ id?: string;
14787
+ module_id: string;
14788
+ role_id: string;
14789
+ updated_at?: string;
14790
+ };
14791
+ Update: {
14792
+ can_edit?: boolean;
14793
+ can_view?: boolean;
14794
+ feature_id?: string;
14795
+ id?: string;
14796
+ module_id?: string;
14797
+ role_id?: string;
14798
+ updated_at?: string;
14799
+ };
14800
+ Relationships: [
14801
+ {
14802
+ foreignKeyName: "role_permissions_role_id_fkey";
14803
+ columns: ["role_id"];
14804
+ isOneToOne: false;
14805
+ referencedRelation: "roles";
14806
+ referencedColumns: ["id"];
14807
+ }
14808
+ ];
14809
+ };
14810
+ roles: {
14811
+ Row: {
14812
+ created_at: string;
14813
+ id: string;
14814
+ is_protected: boolean;
14815
+ key: string;
14816
+ name: string;
14817
+ updated_at: string;
14818
+ };
14819
+ Insert: {
14820
+ created_at?: string;
14821
+ id?: string;
14822
+ is_protected?: boolean;
14823
+ key: string;
14824
+ name: string;
14825
+ updated_at?: string;
14826
+ };
14827
+ Update: {
14828
+ created_at?: string;
14829
+ id?: string;
14830
+ is_protected?: boolean;
14831
+ key?: string;
14832
+ name?: string;
14833
+ updated_at?: string;
14834
+ };
14835
+ Relationships: [];
14836
+ };
14255
14837
  rooms: {
14256
14838
  Row: {
14257
14839
  capacity: number;
@@ -14932,6 +15514,56 @@ export type Database = {
14932
15514
  };
14933
15515
  Relationships: [];
14934
15516
  };
15517
+ time_compensation_entries: {
15518
+ Row: {
15519
+ created_at: string;
15520
+ employee_id: string;
15521
+ entry_date: string;
15522
+ id: string;
15523
+ km: number;
15524
+ meal_allowance: number;
15525
+ notes: string | null;
15526
+ standby_evening: number;
15527
+ standby_weekend: number;
15528
+ tvt_change: number;
15529
+ updated_at: string;
15530
+ };
15531
+ Insert: {
15532
+ created_at?: string;
15533
+ employee_id: string;
15534
+ entry_date: string;
15535
+ id?: string;
15536
+ km?: number;
15537
+ meal_allowance?: number;
15538
+ notes?: string | null;
15539
+ standby_evening?: number;
15540
+ standby_weekend?: number;
15541
+ tvt_change?: number;
15542
+ updated_at?: string;
15543
+ };
15544
+ Update: {
15545
+ created_at?: string;
15546
+ employee_id?: string;
15547
+ entry_date?: string;
15548
+ id?: string;
15549
+ km?: number;
15550
+ meal_allowance?: number;
15551
+ notes?: string | null;
15552
+ standby_evening?: number;
15553
+ standby_weekend?: number;
15554
+ tvt_change?: number;
15555
+ updated_at?: string;
15556
+ };
15557
+ Relationships: [
15558
+ {
15559
+ foreignKeyName: "time_compensation_entries_employee_id_fkey";
15560
+ columns: ["employee_id"];
15561
+ isOneToOne: false;
15562
+ referencedRelation: "profiles";
15563
+ referencedColumns: ["id"];
15564
+ }
15565
+ ];
15566
+ };
14935
15567
  time_entries: {
14936
15568
  Row: {
14937
15569
  created_at: string;
@@ -14966,68 +15598,174 @@ export type Database = {
14966
15598
  undertime?: number;
14967
15599
  updated_at?: string;
14968
15600
  };
15601
+ Relationships: [];
15602
+ };
15603
+ time_log_week_approvals: {
15604
+ Row: {
15605
+ approved_at: string | null;
15606
+ approved_by: string | null;
15607
+ created_at: string;
15608
+ employee_id: string;
15609
+ id: string;
15610
+ locked: boolean;
15611
+ notes: string | null;
15612
+ status: string;
15613
+ submitted_at: string | null;
15614
+ updated_at: string;
15615
+ week_start: string;
15616
+ };
15617
+ Insert: {
15618
+ approved_at?: string | null;
15619
+ approved_by?: string | null;
15620
+ created_at?: string;
15621
+ employee_id: string;
15622
+ id?: string;
15623
+ locked?: boolean;
15624
+ notes?: string | null;
15625
+ status?: string;
15626
+ submitted_at?: string | null;
15627
+ updated_at?: string;
15628
+ week_start: string;
15629
+ };
15630
+ Update: {
15631
+ approved_at?: string | null;
15632
+ approved_by?: string | null;
15633
+ created_at?: string;
15634
+ employee_id?: string;
15635
+ id?: string;
15636
+ locked?: boolean;
15637
+ notes?: string | null;
15638
+ status?: string;
15639
+ submitted_at?: string | null;
15640
+ updated_at?: string;
15641
+ week_start?: string;
15642
+ };
14969
15643
  Relationships: [
14970
15644
  {
14971
- foreignKeyName: "time_entries_employee_id_fkey";
15645
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
14972
15646
  columns: ["employee_id"];
14973
15647
  isOneToOne: false;
14974
- referencedRelation: "monteurs";
15648
+ referencedRelation: "profiles";
14975
15649
  referencedColumns: ["id"];
14976
15650
  }
14977
15651
  ];
14978
15652
  };
14979
15653
  time_logs: {
14980
15654
  Row: {
15655
+ auto_stop_reason: string | null;
15656
+ auto_stopped: boolean;
14981
15657
  created_at: string;
15658
+ current_latitude: number | null;
15659
+ current_longitude: number | null;
15660
+ current_position_updated_at: string | null;
14982
15661
  employee_id: string;
15662
+ end_latitude: number | null;
15663
+ end_longitude: number | null;
14983
15664
  end_time: string | null;
15665
+ eta_distance_km: number | null;
15666
+ eta_minutes: number | null;
15667
+ eta_updated_at: string | null;
15668
+ hour_category: string | null;
14984
15669
  id: string;
15670
+ last_reminder_at: string | null;
14985
15671
  notes: string | null;
14986
15672
  overtime_hours: number;
14987
15673
  overtime_type: string | null;
14988
15674
  regular_hours: number;
15675
+ reminder_count: number;
15676
+ requires_review: boolean;
15677
+ start_latitude: number | null;
15678
+ start_longitude: number | null;
14989
15679
  start_time: string;
14990
15680
  travel_cost: number | null;
14991
15681
  travel_distance_km: number | null;
15682
+ travel_duration_min: number | null;
15683
+ travel_time_minutes: number | null;
14992
15684
  type: string;
14993
15685
  updated_at: string;
15686
+ work_order_id: string | null;
14994
15687
  };
14995
15688
  Insert: {
15689
+ auto_stop_reason?: string | null;
15690
+ auto_stopped?: boolean;
14996
15691
  created_at?: string;
15692
+ current_latitude?: number | null;
15693
+ current_longitude?: number | null;
15694
+ current_position_updated_at?: string | null;
14997
15695
  employee_id: string;
15696
+ end_latitude?: number | null;
15697
+ end_longitude?: number | null;
14998
15698
  end_time?: string | null;
15699
+ eta_distance_km?: number | null;
15700
+ eta_minutes?: number | null;
15701
+ eta_updated_at?: string | null;
15702
+ hour_category?: string | null;
14999
15703
  id?: string;
15704
+ last_reminder_at?: string | null;
15000
15705
  notes?: string | null;
15001
15706
  overtime_hours?: number;
15002
15707
  overtime_type?: string | null;
15003
15708
  regular_hours?: number;
15709
+ reminder_count?: number;
15710
+ requires_review?: boolean;
15711
+ start_latitude?: number | null;
15712
+ start_longitude?: number | null;
15004
15713
  start_time?: string;
15005
15714
  travel_cost?: number | null;
15006
15715
  travel_distance_km?: number | null;
15716
+ travel_duration_min?: number | null;
15717
+ travel_time_minutes?: number | null;
15007
15718
  type: string;
15008
15719
  updated_at?: string;
15720
+ work_order_id?: string | null;
15009
15721
  };
15010
15722
  Update: {
15723
+ auto_stop_reason?: string | null;
15724
+ auto_stopped?: boolean;
15011
15725
  created_at?: string;
15726
+ current_latitude?: number | null;
15727
+ current_longitude?: number | null;
15728
+ current_position_updated_at?: string | null;
15012
15729
  employee_id?: string;
15730
+ end_latitude?: number | null;
15731
+ end_longitude?: number | null;
15013
15732
  end_time?: string | null;
15733
+ eta_distance_km?: number | null;
15734
+ eta_minutes?: number | null;
15735
+ eta_updated_at?: string | null;
15736
+ hour_category?: string | null;
15014
15737
  id?: string;
15738
+ last_reminder_at?: string | null;
15015
15739
  notes?: string | null;
15016
15740
  overtime_hours?: number;
15017
15741
  overtime_type?: string | null;
15018
15742
  regular_hours?: number;
15743
+ reminder_count?: number;
15744
+ requires_review?: boolean;
15745
+ start_latitude?: number | null;
15746
+ start_longitude?: number | null;
15019
15747
  start_time?: string;
15020
15748
  travel_cost?: number | null;
15021
15749
  travel_distance_km?: number | null;
15750
+ travel_duration_min?: number | null;
15751
+ travel_time_minutes?: number | null;
15022
15752
  type?: string;
15023
15753
  updated_at?: string;
15754
+ work_order_id?: string | null;
15024
15755
  };
15025
15756
  Relationships: [
15026
15757
  {
15027
15758
  foreignKeyName: "time_logs_employee_id_fkey";
15028
15759
  columns: ["employee_id"];
15029
15760
  isOneToOne: false;
15030
- referencedRelation: "monteurs";
15761
+ referencedRelation: "profiles";
15762
+ referencedColumns: ["id"];
15763
+ },
15764
+ {
15765
+ foreignKeyName: "time_logs_work_order_id_fkey";
15766
+ columns: ["work_order_id"];
15767
+ isOneToOne: false;
15768
+ referencedRelation: "work_orders";
15031
15769
  referencedColumns: ["id"];
15032
15770
  }
15033
15771
  ];
@@ -15068,7 +15806,7 @@ export type Database = {
15068
15806
  foreignKeyName: "time_off_entries_employee_id_fkey";
15069
15807
  columns: ["employee_id"];
15070
15808
  isOneToOne: false;
15071
- referencedRelation: "monteurs";
15809
+ referencedRelation: "profiles";
15072
15810
  referencedColumns: ["id"];
15073
15811
  }
15074
15812
  ];
@@ -15381,6 +16119,39 @@ export type Database = {
15381
16119
  };
15382
16120
  Relationships: [];
15383
16121
  };
16122
+ twinfield_cron_locks: {
16123
+ Row: {
16124
+ created_at: string;
16125
+ heartbeat_at: string;
16126
+ job_name: string;
16127
+ last_error: string | null;
16128
+ last_finished_at: string | null;
16129
+ locked_at: string;
16130
+ run_id: string;
16131
+ updated_at: string;
16132
+ };
16133
+ Insert: {
16134
+ created_at?: string;
16135
+ heartbeat_at?: string;
16136
+ job_name: string;
16137
+ last_error?: string | null;
16138
+ last_finished_at?: string | null;
16139
+ locked_at?: string;
16140
+ run_id?: string;
16141
+ updated_at?: string;
16142
+ };
16143
+ Update: {
16144
+ created_at?: string;
16145
+ heartbeat_at?: string;
16146
+ job_name?: string;
16147
+ last_error?: string | null;
16148
+ last_finished_at?: string | null;
16149
+ locked_at?: string;
16150
+ run_id?: string;
16151
+ updated_at?: string;
16152
+ };
16153
+ Relationships: [];
16154
+ };
15384
16155
  twinfield_customers: {
15385
16156
  Row: {
15386
16157
  address: string | null;
@@ -15643,6 +16414,8 @@ export type Database = {
15643
16414
  };
15644
16415
  twinfield_invoice_settings: {
15645
16416
  Row: {
16417
+ auto_invoice_enabled: boolean;
16418
+ auto_invoice_trigger_statuses: string[];
15646
16419
  created_at: string;
15647
16420
  debtor_gl_account: string;
15648
16421
  default_credit_invoice_type: string | null;
@@ -15663,6 +16436,8 @@ export type Database = {
15663
16436
  vat_code_export: string | null;
15664
16437
  };
15665
16438
  Insert: {
16439
+ auto_invoice_enabled?: boolean;
16440
+ auto_invoice_trigger_statuses?: string[];
15666
16441
  created_at?: string;
15667
16442
  debtor_gl_account?: string;
15668
16443
  default_credit_invoice_type?: string | null;
@@ -15683,6 +16458,8 @@ export type Database = {
15683
16458
  vat_code_export?: string | null;
15684
16459
  };
15685
16460
  Update: {
16461
+ auto_invoice_enabled?: boolean;
16462
+ auto_invoice_trigger_statuses?: string[];
15686
16463
  created_at?: string;
15687
16464
  debtor_gl_account?: string;
15688
16465
  default_credit_invoice_type?: string | null;
@@ -15985,6 +16762,7 @@ export type Database = {
15985
16762
  twinfield_push_queue: {
15986
16763
  Row: {
15987
16764
  action: string;
16765
+ attempt_started_at: string | null;
15988
16766
  attempts: number;
15989
16767
  connection_id: string | null;
15990
16768
  created_at: string;
@@ -16001,6 +16779,7 @@ export type Database = {
16001
16779
  };
16002
16780
  Insert: {
16003
16781
  action?: string;
16782
+ attempt_started_at?: string | null;
16004
16783
  attempts?: number;
16005
16784
  connection_id?: string | null;
16006
16785
  created_at?: string;
@@ -16017,6 +16796,7 @@ export type Database = {
16017
16796
  };
16018
16797
  Update: {
16019
16798
  action?: string;
16799
+ attempt_started_at?: string | null;
16020
16800
  attempts?: number;
16021
16801
  connection_id?: string | null;
16022
16802
  created_at?: string;
@@ -16219,15 +16999,7 @@ export type Database = {
16219
16999
  workday_end?: string | null;
16220
17000
  workday_start?: string | null;
16221
17001
  };
16222
- Relationships: [
16223
- {
16224
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
16225
- columns: ["monteur_id"];
16226
- isOneToOne: true;
16227
- referencedRelation: "monteurs";
16228
- referencedColumns: ["id"];
16229
- }
16230
- ];
17002
+ Relationships: [];
16231
17003
  };
16232
17004
  uren_entries: {
16233
17005
  Row: {
@@ -16273,13 +17045,6 @@ export type Database = {
16273
17045
  werkbon_id?: string | null;
16274
17046
  };
16275
17047
  Relationships: [
16276
- {
16277
- foreignKeyName: "uren_entries_monteur_id_fkey";
16278
- columns: ["monteur_id"];
16279
- isOneToOne: false;
16280
- referencedRelation: "monteurs";
16281
- referencedColumns: ["id"];
16282
- },
16283
17048
  {
16284
17049
  foreignKeyName: "uren_entries_werkbon_id_fkey";
16285
17050
  columns: ["werkbon_id"];
@@ -16761,15 +17526,37 @@ export type Database = {
16761
17526
  submitted_at?: string | null;
16762
17527
  updated_at?: string;
16763
17528
  };
16764
- Relationships: [
16765
- {
16766
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
16767
- columns: ["monteur_id"];
16768
- isOneToOne: false;
16769
- referencedRelation: "monteurs";
16770
- referencedColumns: ["id"];
16771
- }
16772
- ];
17529
+ Relationships: [];
17530
+ };
17531
+ user_module_permissions: {
17532
+ Row: {
17533
+ created_at: string;
17534
+ feature_id: string;
17535
+ id: string;
17536
+ module_id: string;
17537
+ permission: string;
17538
+ updated_at: string;
17539
+ user_id: string;
17540
+ };
17541
+ Insert: {
17542
+ created_at?: string;
17543
+ feature_id?: string;
17544
+ id?: string;
17545
+ module_id: string;
17546
+ permission: string;
17547
+ updated_at?: string;
17548
+ user_id: string;
17549
+ };
17550
+ Update: {
17551
+ created_at?: string;
17552
+ feature_id?: string;
17553
+ id?: string;
17554
+ module_id?: string;
17555
+ permission?: string;
17556
+ updated_at?: string;
17557
+ user_id?: string;
17558
+ };
17559
+ Relationships: [];
16773
17560
  };
16774
17561
  user_roles: {
16775
17562
  Row: {
@@ -16800,6 +17587,53 @@ export type Database = {
16800
17587
  }
16801
17588
  ];
16802
17589
  };
17590
+ van_inventories: {
17591
+ Row: {
17592
+ barcode: string | null;
17593
+ created_at: string;
17594
+ id: string;
17595
+ monteur_id: string | null;
17596
+ price_per_unit: number;
17597
+ product_name: string;
17598
+ quantity_current: number;
17599
+ quantity_min: number;
17600
+ unit: string;
17601
+ updated_at: string;
17602
+ };
17603
+ Insert: {
17604
+ barcode?: string | null;
17605
+ created_at?: string;
17606
+ id?: string;
17607
+ monteur_id?: string | null;
17608
+ price_per_unit?: number;
17609
+ product_name: string;
17610
+ quantity_current?: number;
17611
+ quantity_min?: number;
17612
+ unit?: string;
17613
+ updated_at?: string;
17614
+ };
17615
+ Update: {
17616
+ barcode?: string | null;
17617
+ created_at?: string;
17618
+ id?: string;
17619
+ monteur_id?: string | null;
17620
+ price_per_unit?: number;
17621
+ product_name?: string;
17622
+ quantity_current?: number;
17623
+ quantity_min?: number;
17624
+ unit?: string;
17625
+ updated_at?: string;
17626
+ };
17627
+ Relationships: [
17628
+ {
17629
+ foreignKeyName: "van_inventories_monteur_id_fkey";
17630
+ columns: ["monteur_id"];
17631
+ isOneToOne: false;
17632
+ referencedRelation: "profiles";
17633
+ referencedColumns: ["id"];
17634
+ }
17635
+ ];
17636
+ };
16803
17637
  voorraad_custom_fields: {
16804
17638
  Row: {
16805
17639
  created_at: string;
@@ -17773,7 +18607,7 @@ export type Database = {
17773
18607
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
17774
18608
  columns: ["monteur_id"];
17775
18609
  isOneToOne: false;
17776
- referencedRelation: "monteurs";
18610
+ referencedRelation: "profiles";
17777
18611
  referencedColumns: ["id"];
17778
18612
  },
17779
18613
  {
@@ -17785,6 +18619,63 @@ export type Database = {
17785
18619
  }
17786
18620
  ];
17787
18621
  };
18622
+ work_order_photos: {
18623
+ Row: {
18624
+ ai_caption: string | null;
18625
+ ai_categorized_at: string | null;
18626
+ ai_labels: Json | null;
18627
+ caption: string | null;
18628
+ created_at: string;
18629
+ id: string;
18630
+ monteur_id: string | null;
18631
+ photo_type: string;
18632
+ storage_path: string;
18633
+ updated_at: string;
18634
+ work_order_id: string;
18635
+ };
18636
+ Insert: {
18637
+ ai_caption?: string | null;
18638
+ ai_categorized_at?: string | null;
18639
+ ai_labels?: Json | null;
18640
+ caption?: string | null;
18641
+ created_at?: string;
18642
+ id?: string;
18643
+ monteur_id?: string | null;
18644
+ photo_type?: string;
18645
+ storage_path: string;
18646
+ updated_at?: string;
18647
+ work_order_id: string;
18648
+ };
18649
+ Update: {
18650
+ ai_caption?: string | null;
18651
+ ai_categorized_at?: string | null;
18652
+ ai_labels?: Json | null;
18653
+ caption?: string | null;
18654
+ created_at?: string;
18655
+ id?: string;
18656
+ monteur_id?: string | null;
18657
+ photo_type?: string;
18658
+ storage_path?: string;
18659
+ updated_at?: string;
18660
+ work_order_id?: string;
18661
+ };
18662
+ Relationships: [
18663
+ {
18664
+ foreignKeyName: "work_order_photos_monteur_id_fkey";
18665
+ columns: ["monteur_id"];
18666
+ isOneToOne: false;
18667
+ referencedRelation: "profiles";
18668
+ referencedColumns: ["id"];
18669
+ },
18670
+ {
18671
+ foreignKeyName: "work_order_photos_work_order_id_fkey";
18672
+ columns: ["work_order_id"];
18673
+ isOneToOne: false;
18674
+ referencedRelation: "work_orders";
18675
+ referencedColumns: ["id"];
18676
+ }
18677
+ ];
18678
+ };
17788
18679
  work_orders: {
17789
18680
  Row: {
17790
18681
  assigned_to: string | null;
@@ -17816,7 +18707,6 @@ export type Database = {
17816
18707
  scheduled_end_time: string | null;
17817
18708
  scheduled_start_time: string | null;
17818
18709
  status: string;
17819
- tenant_id: string;
17820
18710
  total_hours_worked: number | null;
17821
18711
  total_price: number | null;
17822
18712
  travel_time_minutes: number | null;
@@ -17854,7 +18744,6 @@ export type Database = {
17854
18744
  scheduled_end_time?: string | null;
17855
18745
  scheduled_start_time?: string | null;
17856
18746
  status?: string;
17857
- tenant_id: string;
17858
18747
  total_hours_worked?: number | null;
17859
18748
  total_price?: number | null;
17860
18749
  travel_time_minutes?: number | null;
@@ -17892,7 +18781,6 @@ export type Database = {
17892
18781
  scheduled_end_time?: string | null;
17893
18782
  scheduled_start_time?: string | null;
17894
18783
  status?: string;
17895
- tenant_id?: string;
17896
18784
  total_hours_worked?: number | null;
17897
18785
  total_price?: number | null;
17898
18786
  travel_time_minutes?: number | null;
@@ -17907,13 +18795,6 @@ export type Database = {
17907
18795
  isOneToOne: false;
17908
18796
  referencedRelation: "work_orders";
17909
18797
  referencedColumns: ["id"];
17910
- },
17911
- {
17912
- foreignKeyName: "work_orders_tenant_id_fkey";
17913
- columns: ["tenant_id"];
17914
- isOneToOne: false;
17915
- referencedRelation: "tenants";
17916
- referencedColumns: ["id"];
17917
18798
  }
17918
18799
  ];
17919
18800
  };
@@ -18611,6 +19492,19 @@ export type Database = {
18611
19492
  };
18612
19493
  Returns: undefined;
18613
19494
  };
19495
+ approve_mailbox_order_proposal: {
19496
+ Args: {
19497
+ p_custom_fields: Json;
19498
+ p_customer_id: string;
19499
+ p_delivery_date: string;
19500
+ p_field_values?: Json;
19501
+ p_lines: Json;
19502
+ p_notes: string;
19503
+ p_proposal_id: string;
19504
+ p_reviewed_by: string;
19505
+ };
19506
+ Returns: Json;
19507
+ };
18614
19508
  assign_cart_numbers: {
18615
19509
  Args: {
18616
19510
  p_carts: Json;
@@ -18646,6 +19540,10 @@ export type Database = {
18646
19540
  processed_items: number;
18647
19541
  }[];
18648
19542
  };
19543
+ backfill_order_auto_invoice_queue: {
19544
+ Args: never;
19545
+ Returns: number;
19546
+ };
18649
19547
  calculate_layer_stock: {
18650
19548
  Args: {
18651
19549
  p_product_id: string;
@@ -18658,6 +19556,10 @@ export type Database = {
18658
19556
  };
18659
19557
  Returns: number;
18660
19558
  };
19559
+ can_manage_hours: {
19560
+ Args: never;
19561
+ Returns: boolean;
19562
+ };
18661
19563
  check_offer_product_available_stock: {
18662
19564
  Args: {
18663
19565
  p_campaign_product_id: string;
@@ -18680,18 +19582,89 @@ export type Database = {
18680
19582
  };
18681
19583
  Returns: Json;
18682
19584
  };
18683
- claim_logistics_tasks: {
19585
+ claim_cloud_print_jobs: {
18684
19586
  Args: {
18685
- _limit?: number;
18686
- _owner_module: string;
18687
- _stale_minutes?: number;
18688
- _task_type: string;
18689
- _worker: string;
19587
+ _max?: number;
18690
19588
  };
18691
19589
  Returns: {
18692
- attempt_log: Json;
18693
- attempts: number;
18694
- buffer_ref: string | null;
19590
+ agent_id: string | null;
19591
+ bron_job_id: string | null;
19592
+ created_at: string;
19593
+ documentnaam: string;
19594
+ documenttype: Database["public"]["Enums"]["doc_layout_type"];
19595
+ extern_job_id: string | null;
19596
+ foutmelding: string | null;
19597
+ gebruiker_id: string | null;
19598
+ gebruiker_naam: string;
19599
+ gestart_op: string | null;
19600
+ id: string;
19601
+ idempotentie_sleutel: string | null;
19602
+ is_herprint: boolean;
19603
+ kopieen: number;
19604
+ layout_id: string | null;
19605
+ opgepakt_op: string | null;
19606
+ paginas: number;
19607
+ payload: Json;
19608
+ pdf_base64: string | null;
19609
+ pdf_url: string | null;
19610
+ pogingen: number;
19611
+ printer_id: string | null;
19612
+ render_html: string | null;
19613
+ status: Database["public"]["Enums"]["print_job_status"];
19614
+ updated_at: string;
19615
+ volgende_poging: string | null;
19616
+ voltooid_op: string | null;
19617
+ }[];
19618
+ SetofOptions: {
19619
+ from: "*";
19620
+ to: "print_jobs";
19621
+ isOneToOne: false;
19622
+ isSetofReturn: true;
19623
+ };
19624
+ };
19625
+ claim_floriday_stock_queue: {
19626
+ Args: {
19627
+ p_limit?: number;
19628
+ p_worker?: string;
19629
+ };
19630
+ Returns: {
19631
+ attempts: number;
19632
+ connection_id: string;
19633
+ created_at: string;
19634
+ desired_available: boolean | null;
19635
+ gateway_attempt_id: string | null;
19636
+ id: string;
19637
+ last_error: string | null;
19638
+ locked_at: string | null;
19639
+ locked_by: string | null;
19640
+ next_attempt_at: string;
19641
+ number_of_pieces: number;
19642
+ sent_at: string | null;
19643
+ status: string;
19644
+ superseded_by: string | null;
19645
+ trade_item_id: string;
19646
+ updated_at: string;
19647
+ user_id: string;
19648
+ }[];
19649
+ SetofOptions: {
19650
+ from: "*";
19651
+ to: "floriday_continuous_stock_queue";
19652
+ isOneToOne: false;
19653
+ isSetofReturn: true;
19654
+ };
19655
+ };
19656
+ claim_logistics_tasks: {
19657
+ Args: {
19658
+ _limit?: number;
19659
+ _owner_module: string;
19660
+ _stale_minutes?: number;
19661
+ _task_type: string;
19662
+ _worker: string;
19663
+ };
19664
+ Returns: {
19665
+ attempt_log: Json;
19666
+ attempts: number;
19667
+ buffer_ref: string | null;
18695
19668
  claimed_at: string | null;
18696
19669
  claimed_by: string | null;
18697
19670
  completed_at: string | null;
@@ -18739,22 +19712,27 @@ export type Database = {
18739
19712
  created_at: string;
18740
19713
  documentnaam: string;
18741
19714
  documenttype: Database["public"]["Enums"]["doc_layout_type"];
19715
+ extern_job_id: string | null;
18742
19716
  foutmelding: string | null;
18743
19717
  gebruiker_id: string | null;
18744
19718
  gebruiker_naam: string;
18745
19719
  gestart_op: string | null;
18746
19720
  id: string;
19721
+ idempotentie_sleutel: string | null;
18747
19722
  is_herprint: boolean;
18748
19723
  kopieen: number;
18749
19724
  layout_id: string | null;
18750
19725
  opgepakt_op: string | null;
18751
19726
  paginas: number;
18752
19727
  payload: Json;
19728
+ pdf_base64: string | null;
19729
+ pdf_url: string | null;
18753
19730
  pogingen: number;
18754
19731
  printer_id: string | null;
18755
19732
  render_html: string | null;
18756
19733
  status: Database["public"]["Enums"]["print_job_status"];
18757
19734
  updated_at: string;
19735
+ volgende_poging: string | null;
18758
19736
  voltooid_op: string | null;
18759
19737
  }[];
18760
19738
  SetofOptions: {
@@ -18771,6 +19749,7 @@ export type Database = {
18771
19749
  };
18772
19750
  Returns: {
18773
19751
  action: string;
19752
+ attempt_started_at: string | null;
18774
19753
  attempts: number;
18775
19754
  connection_id: string | null;
18776
19755
  created_at: string;
@@ -18792,10 +19771,28 @@ export type Database = {
18792
19771
  isSetofReturn: true;
18793
19772
  };
18794
19773
  };
19774
+ cleanup_floriday_stock_queue: {
19775
+ Args: never;
19776
+ Returns: undefined;
19777
+ };
18795
19778
  cleanup_old_bookings: {
18796
19779
  Args: never;
18797
19780
  Returns: undefined;
18798
19781
  };
19782
+ cleanup_voorraad_module_history: {
19783
+ Args: never;
19784
+ Returns: undefined;
19785
+ };
19786
+ complete_floriday_stock_queue: {
19787
+ Args: {
19788
+ p_attempt_id?: string;
19789
+ p_error?: string;
19790
+ p_id: string;
19791
+ p_ok: boolean;
19792
+ p_permanent?: boolean;
19793
+ };
19794
+ Returns: undefined;
19795
+ };
18799
19796
  consume_bom_for_production: {
18800
19797
  Args: {
18801
19798
  p_connection_id: string;
@@ -18840,6 +19837,30 @@ export type Database = {
18840
19837
  agent_naam: string;
18841
19838
  }[];
18842
19839
  };
19840
+ consume_van_inventory: {
19841
+ Args: {
19842
+ p_inventory_id: string;
19843
+ p_quantity: number;
19844
+ };
19845
+ Returns: {
19846
+ barcode: string | null;
19847
+ created_at: string;
19848
+ id: string;
19849
+ monteur_id: string | null;
19850
+ price_per_unit: number;
19851
+ product_name: string;
19852
+ quantity_current: number;
19853
+ quantity_min: number;
19854
+ unit: string;
19855
+ updated_at: string;
19856
+ };
19857
+ SetofOptions: {
19858
+ from: "*";
19859
+ to: "van_inventories";
19860
+ isOneToOne: true;
19861
+ isSetofReturn: false;
19862
+ };
19863
+ };
18843
19864
  control_get_todays_carts: {
18844
19865
  Args: never;
18845
19866
  Returns: {
@@ -18907,6 +19928,20 @@ export type Database = {
18907
19928
  };
18908
19929
  Returns: Json;
18909
19930
  };
19931
+ effective_module_permission: {
19932
+ Args: {
19933
+ _module_id: string;
19934
+ _user_id: string;
19935
+ };
19936
+ Returns: string;
19937
+ } | {
19938
+ Args: {
19939
+ _feature_id: string;
19940
+ _module_id: string;
19941
+ _user_id: string;
19942
+ };
19943
+ Returns: string;
19944
+ };
18910
19945
  email_auth_decrypt: {
18911
19946
  Args: {
18912
19947
  cipher: string;
@@ -19257,12 +20292,6 @@ export type Database = {
19257
20292
  Args: never;
19258
20293
  Returns: string;
19259
20294
  };
19260
- get_work_order_tenant_id: {
19261
- Args: {
19262
- wo_id: string;
19263
- };
19264
- Returns: string;
19265
- };
19266
20295
  has_module_permission: {
19267
20296
  Args: {
19268
20297
  _min: string;
@@ -19296,6 +20325,13 @@ export type Database = {
19296
20325
  };
19297
20326
  Returns: boolean;
19298
20327
  };
20328
+ is_time_log_week_locked: {
20329
+ Args: {
20330
+ p_employee_id: string;
20331
+ p_start_time: string;
20332
+ };
20333
+ Returns: boolean;
20334
+ };
19299
20335
  is_user_admin: {
19300
20336
  Args: never;
19301
20337
  Returns: boolean;
@@ -19310,13 +20346,14 @@ export type Database = {
19310
20346
  };
19311
20347
  Returns: boolean;
19312
20348
  };
19313
- list_monteurs: {
20349
+ list_medewerkers: {
19314
20350
  Args: never;
19315
20351
  Returns: {
19316
20352
  avatar_url: string;
19317
20353
  display_name: string;
19318
20354
  email: string;
19319
20355
  id: string;
20356
+ roles: string[];
19320
20357
  }[];
19321
20358
  };
19322
20359
  list_my_planning_items: {
@@ -19710,6 +20747,51 @@ export type Database = {
19710
20747
  isSetofReturn: false;
19711
20748
  };
19712
20749
  };
20750
+ logistics_floriday_claim_pushes: {
20751
+ Args: {
20752
+ _lease_seconds?: number;
20753
+ _limit?: number;
20754
+ _worker?: string;
20755
+ };
20756
+ Returns: {
20757
+ attempts: number;
20758
+ fulfillment_order_id: string;
20759
+ id: string;
20760
+ last_sent_hash: string;
20761
+ order_ref: string;
20762
+ payload: Json;
20763
+ payload_hash: string;
20764
+ revision: number;
20765
+ }[];
20766
+ };
20767
+ logistics_floriday_finish_push: {
20768
+ Args: {
20769
+ _error?: string;
20770
+ _fulfillment_order_id?: string;
20771
+ _id: string;
20772
+ _max_age_hours?: number;
20773
+ _max_attempts?: number;
20774
+ _ok: boolean;
20775
+ _permanent?: boolean;
20776
+ _revision: number;
20777
+ _sent_hash?: string;
20778
+ };
20779
+ Returns: string;
20780
+ };
20781
+ logistics_floriday_prune_pushes: {
20782
+ Args: {
20783
+ _days?: number;
20784
+ };
20785
+ Returns: number;
20786
+ };
20787
+ logistics_floriday_queue_push: {
20788
+ Args: {
20789
+ _order_ref: string;
20790
+ _payload?: Json;
20791
+ _payload_hash?: string;
20792
+ };
20793
+ Returns: string;
20794
+ };
19713
20795
  logistics_live_carriers: {
19714
20796
  Args: {
19715
20797
  p_order_ref: string;
@@ -19762,6 +20844,65 @@ export type Database = {
19762
20844
  };
19763
20845
  Returns: number;
19764
20846
  };
20847
+ logistics_plan_claim: {
20848
+ Args: {
20849
+ p_limit?: number;
20850
+ };
20851
+ Returns: {
20852
+ attempts: number;
20853
+ id: string;
20854
+ order_id: string;
20855
+ }[];
20856
+ };
20857
+ logistics_plan_enqueue: {
20858
+ Args: {
20859
+ p_order_id: string;
20860
+ p_reason?: string;
20861
+ };
20862
+ Returns: undefined;
20863
+ };
20864
+ logistics_plan_ensure_event: {
20865
+ Args: {
20866
+ p_order_id: string;
20867
+ };
20868
+ Returns: boolean;
20869
+ };
20870
+ logistics_plan_finish: {
20871
+ Args: {
20872
+ p_error?: string;
20873
+ p_id: string;
20874
+ };
20875
+ Returns: undefined;
20876
+ };
20877
+ logistics_plan_impact_orders: {
20878
+ Args: {
20879
+ p_order_id: string;
20880
+ };
20881
+ Returns: {
20882
+ buffer_id: string;
20883
+ order_id: string;
20884
+ plan_date: string;
20885
+ }[];
20886
+ };
20887
+ logistics_plan_kick: {
20888
+ Args: never;
20889
+ Returns: undefined;
20890
+ };
20891
+ logistics_plan_prune: {
20892
+ Args: never;
20893
+ Returns: number;
20894
+ };
20895
+ logistics_plan_release_stale: {
20896
+ Args: never;
20897
+ Returns: number;
20898
+ };
20899
+ logistics_plan_setting: {
20900
+ Args: {
20901
+ p_default: number;
20902
+ p_key: string;
20903
+ };
20904
+ Returns: number;
20905
+ };
19765
20906
  logistics_queue_capacity_email: {
19766
20907
  Args: {
19767
20908
  p_alert_id: string;
@@ -20000,6 +21141,14 @@ export type Database = {
20000
21141
  };
20001
21142
  Returns: undefined;
20002
21143
  };
21144
+ my_module_permissions: {
21145
+ Args: never;
21146
+ Returns: {
21147
+ feature_id: string;
21148
+ module_id: string;
21149
+ permission: string;
21150
+ }[];
21151
+ };
20003
21152
  next_manufacture_partij: {
20004
21153
  Args: {
20005
21154
  _tenant_id: string;
@@ -20050,6 +21199,13 @@ export type Database = {
20050
21199
  };
20051
21200
  Returns: boolean;
20052
21201
  };
21202
+ opruim_print_historie: {
21203
+ Args: never;
21204
+ Returns: {
21205
+ ontdaan: number;
21206
+ verwijderd: number;
21207
+ }[];
21208
+ };
20053
21209
  order_number_prefix: {
20054
21210
  Args: {
20055
21211
  p_custom_fields?: Json;
@@ -20057,6 +21213,15 @@ export type Database = {
20057
21213
  };
20058
21214
  Returns: string;
20059
21215
  };
21216
+ pick_active_printers: {
21217
+ Args: never;
21218
+ Returns: {
21219
+ id: string;
21220
+ locatie: string;
21221
+ naam: string;
21222
+ online: boolean;
21223
+ }[];
21224
+ };
20060
21225
  pick_claim_document: {
20061
21226
  Args: {
20062
21227
  _queue_item_id: string;
@@ -20243,6 +21408,52 @@ export type Database = {
20243
21408
  };
20244
21409
  Returns: undefined;
20245
21410
  };
21411
+ pick_reset_print: {
21412
+ Args: {
21413
+ _queue_item_id: string;
21414
+ _session_id: string;
21415
+ };
21416
+ Returns: {
21417
+ announced_at: string;
21418
+ assigned_user_id: string | null;
21419
+ barcode: string | null;
21420
+ cancelled_at: string | null;
21421
+ cart_count: number;
21422
+ completed_at: string | null;
21423
+ country_code: string | null;
21424
+ created_at: string;
21425
+ customer_name: string | null;
21426
+ delivery_address: string | null;
21427
+ document_number: string | null;
21428
+ document_type_id: string | null;
21429
+ due_at: string | null;
21430
+ id: string;
21431
+ is_urgent: boolean;
21432
+ line_count: number;
21433
+ order_number: string | null;
21434
+ order_type: string | null;
21435
+ payload: Json;
21436
+ print_count: number;
21437
+ print_job_id: string | null;
21438
+ printed_at: string | null;
21439
+ printed_by: string | null;
21440
+ printer_id: string | null;
21441
+ priority: number;
21442
+ reference: string | null;
21443
+ route: string | null;
21444
+ screen_id: string | null;
21445
+ station_id: string | null;
21446
+ status_id: string | null;
21447
+ updated_at: string;
21448
+ warnings: Json;
21449
+ };
21450
+ SetofOptions: {
21451
+ from: "*";
21452
+ to: "pick_queue";
21453
+ isOneToOne: true;
21454
+ isSetofReturn: false;
21455
+ };
21456
+ };
20246
21457
  pick_station_dashboard: {
20247
21458
  Args: never;
20248
21459
  Returns: {
@@ -20389,6 +21600,12 @@ export type Database = {
20389
21600
  };
20390
21601
  Returns: undefined;
20391
21602
  };
21603
+ reset_stalled_floriday_stock_queue: {
21604
+ Args: {
21605
+ p_include_failed?: boolean;
21606
+ };
21607
+ Returns: number;
21608
+ };
20392
21609
  resolve_group_allocation: {
20393
21610
  Args: {
20394
21611
  _needed: number;
@@ -20433,14 +21650,28 @@ export type Database = {
20433
21650
  };
20434
21651
  Returns: Json;
20435
21652
  };
21653
+ ruim_print_jobs_op: {
21654
+ Args: {
21655
+ _bewaar_dagen?: number;
21656
+ };
21657
+ Returns: number;
21658
+ };
20436
21659
  run_floriday_continuous_stock_sync: {
20437
21660
  Args: never;
20438
21661
  Returns: undefined;
20439
21662
  };
21663
+ run_floriday_stock_queue_process: {
21664
+ Args: never;
21665
+ Returns: undefined;
21666
+ };
20440
21667
  run_logistics_tasks_dispatch: {
20441
21668
  Args: never;
20442
21669
  Returns: undefined;
20443
21670
  };
21671
+ run_print_queue_ticks: {
21672
+ Args: never;
21673
+ Returns: number;
21674
+ };
20444
21675
  run_twinfield_queue_tick: {
20445
21676
  Args: never;
20446
21677
  Returns: undefined;
@@ -20681,6 +21912,13 @@ export type Database = {
20681
21912
  };
20682
21913
  Returns: number;
20683
21914
  };
21915
+ schedule_floriday_stock_queue_process: {
21916
+ Args: {
21917
+ p_apikey: string;
21918
+ p_url: string;
21919
+ };
21920
+ Returns: number;
21921
+ };
20684
21922
  schedule_floriday_token_refresh: {
20685
21923
  Args: {
20686
21924
  p_apikey: string;
@@ -20787,6 +22025,16 @@ export type Database = {
20787
22025
  };
20788
22026
  Returns: string[];
20789
22027
  };
22028
+ switch_time_log: {
22029
+ Args: {
22030
+ p_employee_id: string;
22031
+ p_start_lat?: number;
22032
+ p_start_lng?: number;
22033
+ p_type: string;
22034
+ p_work_order_id?: string;
22035
+ };
22036
+ Returns: Json;
22037
+ };
20790
22038
  sync_all_layer_stocks: {
20791
22039
  Args: never;
20792
22040
  Returns: undefined;
@@ -20821,6 +22069,15 @@ export type Database = {
20821
22069
  };
20822
22070
  Returns: undefined;
20823
22071
  };
22072
+ trade_item_stock_duplicates: {
22073
+ Args: never;
22074
+ Returns: {
22075
+ keys: string[];
22076
+ product_id: string;
22077
+ product_name: string;
22078
+ row_count: number;
22079
+ }[];
22080
+ };
20824
22081
  try_debtor_lock: {
20825
22082
  Args: {
20826
22083
  _group_key: string;
@@ -20828,6 +22085,24 @@ export type Database = {
20828
22085
  };
20829
22086
  Returns: boolean;
20830
22087
  };
22088
+ twinfield_cron_lock_acquire: {
22089
+ Args: {
22090
+ _job_name: string;
22091
+ _stale_seconds?: number;
22092
+ };
22093
+ Returns: boolean;
22094
+ };
22095
+ twinfield_cron_lock_release: {
22096
+ Args: {
22097
+ _error?: string;
22098
+ _job_name: string;
22099
+ };
22100
+ Returns: undefined;
22101
+ };
22102
+ twinfield_prune_push_queue: {
22103
+ Args: never;
22104
+ Returns: number;
22105
+ };
20831
22106
  twinfield_register_cron: {
20832
22107
  Args: {
20833
22108
  apikey?: string;
@@ -20870,7 +22145,7 @@ export type Database = {
20870
22145
  };
20871
22146
  Enums: {
20872
22147
  ai_import_status: "nieuw" | "verwerken" | "bevestigen" | "klaar" | "mislukt";
20873
- app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin";
22148
+ app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie";
20874
22149
  doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon";
20875
22150
  doc_orientation: "portrait" | "landscape";
20876
22151
  exact_env: "staging" | "live";
@@ -20941,7 +22216,7 @@ export declare const Constants: {
20941
22216
  readonly public: {
20942
22217
  readonly Enums: {
20943
22218
  readonly ai_import_status: readonly ["nieuw", "verwerken", "bevestigen", "klaar", "mislukt"];
20944
- readonly app_role: readonly ["admin", "planner", "monteur", "administratie", "ai_admin"];
22219
+ readonly app_role: readonly ["admin", "planner", "monteur", "administratie", "ai_admin", "manager", "warehouse", "sales", "developer", "receptie"];
20945
22220
  readonly doc_layout_type: readonly ["pakbon", "factuur", "offerte", "orderbevestiging", "etiket", "verzendlabel", "productlabel", "barcode_label", "magazijnlijst", "controlelijst", "transportdocument", "vrij", "sticker", "productiebon"];
20946
22221
  readonly doc_orientation: readonly ["portrait", "landscape"];
20947
22222
  readonly exact_env: readonly ["staging", "live"];