@flowselections/scan-module 1.0.2 → 1.0.3

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 (29) hide show
  1. package/dist-lib/components/ScanModulePage.d.ts.map +1 -1
  2. package/dist-lib/components/ScanModulePage.js +31 -9
  3. package/dist-lib/components/scanners/KarScannerPage.d.ts +3 -1
  4. package/dist-lib/components/scanners/KarScannerPage.d.ts.map +1 -1
  5. package/dist-lib/components/scanners/KarScannerPage.js +87 -8
  6. package/dist-lib/components/scanners/PublicScannerPage.d.ts +2 -1
  7. package/dist-lib/components/scanners/PublicScannerPage.d.ts.map +1 -1
  8. package/dist-lib/components/scanners/PublicScannerPage.js +2 -2
  9. package/dist-lib/components/scanners/ScannerBySlug.d.ts.map +1 -1
  10. package/dist-lib/components/scanners/ScannerBySlug.js +3 -2
  11. package/dist-lib/hooks/useScanners.d.ts +3 -1
  12. package/dist-lib/hooks/useScanners.d.ts.map +1 -1
  13. package/dist-lib/hooks/useScanners.js +1 -0
  14. package/dist-lib/integrations/supabase/auth-middleware.d.ts +2284 -229
  15. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  16. package/dist-lib/integrations/supabase/client.d.ts +2284 -229
  17. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  18. package/dist-lib/integrations/supabase/client.server.d.ts +2284 -229
  19. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  20. package/dist-lib/integrations/supabase/types.d.ts +2363 -292
  21. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  22. package/dist-lib/integrations/supabase/types.js +15 -1
  23. package/dist-lib/lib/scanI18n.d.ts +1 -1
  24. package/dist-lib/lib/scanI18n.d.ts.map +1 -1
  25. package/dist-lib/lib/scanI18n.js +139 -1
  26. package/dist-lib/lib/veilingbonPrint.d.ts +43 -0
  27. package/dist-lib/lib/veilingbonPrint.d.ts.map +1 -0
  28. package/dist-lib/lib/veilingbonPrint.js +124 -0
  29. package/package.json +105 -103
@@ -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;
@@ -3627,207 +3747,642 @@ export type Database = {
3627
3747
  }
3628
3748
  ];
3629
3749
  };
3630
- exact_auth_divisions: {
3750
+ exact_auth_call_budget: {
3631
3751
  Row: {
3632
3752
  account_key: string;
3633
- company_name: string | null;
3634
- created_at: string;
3635
- division_code: number | null;
3636
- environment: Database["public"]["Enums"]["exact_env"];
3637
- id: string;
3638
- last_synced_at: string | null;
3753
+ day_count: number;
3754
+ day_date: string;
3755
+ division_code: number;
3756
+ environment: string;
3757
+ minute_count: number;
3758
+ minute_window: string;
3639
3759
  updated_at: string;
3640
3760
  };
3641
3761
  Insert: {
3642
3762
  account_key?: string;
3643
- company_name?: string | null;
3644
- created_at?: string;
3645
- division_code?: number | null;
3646
- environment: Database["public"]["Enums"]["exact_env"];
3647
- id?: string;
3648
- last_synced_at?: string | null;
3763
+ day_count?: number;
3764
+ day_date?: string;
3765
+ division_code?: number;
3766
+ environment: string;
3767
+ minute_count?: number;
3768
+ minute_window?: string;
3649
3769
  updated_at?: string;
3650
3770
  };
3651
3771
  Update: {
3652
3772
  account_key?: string;
3653
- company_name?: string | null;
3654
- created_at?: string;
3655
- division_code?: number | null;
3656
- environment?: Database["public"]["Enums"]["exact_env"];
3657
- id?: string;
3658
- last_synced_at?: string | null;
3773
+ day_count?: number;
3774
+ day_date?: string;
3775
+ division_code?: number;
3776
+ environment?: string;
3777
+ minute_count?: number;
3778
+ minute_window?: string;
3659
3779
  updated_at?: string;
3660
3780
  };
3661
3781
  Relationships: [];
3662
3782
  };
3663
- exact_bulk_operation_items: {
3664
- Row: {
3665
- attempts: number;
3666
- bulk_operation_id: string;
3667
- created_at: string;
3668
- error_message: string | null;
3669
- id: string;
3670
- invoice_cache_id: string | null;
3671
- invoice_exact_id: string | null;
3672
- processed_at: string | null;
3673
- result_data: Json | null;
3674
- status: string;
3675
- };
3676
- Insert: {
3677
- attempts?: number;
3678
- bulk_operation_id: string;
3679
- created_at?: string;
3680
- error_message?: string | null;
3681
- id?: string;
3682
- invoice_cache_id?: string | null;
3683
- invoice_exact_id?: string | null;
3684
- processed_at?: string | null;
3685
- result_data?: Json | null;
3686
- status?: string;
3687
- };
3688
- Update: {
3689
- attempts?: number;
3690
- bulk_operation_id?: string;
3691
- created_at?: string;
3692
- error_message?: string | null;
3693
- id?: string;
3694
- invoice_cache_id?: string | null;
3695
- invoice_exact_id?: string | null;
3696
- processed_at?: string | null;
3697
- result_data?: Json | null;
3698
- status?: string;
3699
- };
3700
- Relationships: [
3701
- {
3702
- foreignKeyName: "exact_bulk_operation_items_bulk_operation_id_fkey";
3703
- columns: ["bulk_operation_id"];
3704
- isOneToOne: false;
3705
- referencedRelation: "exact_bulk_operations";
3706
- referencedColumns: ["id"];
3707
- },
3708
- {
3709
- foreignKeyName: "exact_bulk_operation_items_invoice_cache_id_fkey";
3710
- columns: ["invoice_cache_id"];
3711
- isOneToOne: false;
3712
- referencedRelation: "exact_invoices_cache";
3713
- referencedColumns: ["id"];
3714
- }
3715
- ];
3716
- };
3717
- exact_bulk_operations: {
3783
+ exact_auth_customers: {
3718
3784
  Row: {
3719
- completed_at: string | null;
3720
- connection_id: string;
3785
+ account_key: string;
3786
+ address_line1: string | null;
3787
+ chamber_of_commerce: string | null;
3788
+ city: string | null;
3789
+ code: string | null;
3790
+ country: string | null;
3721
3791
  created_at: string;
3722
- created_by: string | null;
3723
- error_message: string | null;
3724
- failed_count: number | null;
3792
+ currency: string | null;
3793
+ division_code: number | null;
3794
+ email: string | null;
3795
+ environment: Database["public"]["Enums"]["exact_env"];
3796
+ exact_id: string;
3797
+ exact_modified: string | null;
3798
+ exact_timestamp: number | null;
3725
3799
  id: string;
3726
- operation_type: string;
3727
- processed_count: number | null;
3728
- result_data: Json | null;
3729
- started_at: string | null;
3730
- status: string;
3731
- total_count: number | null;
3800
+ is_active: boolean;
3801
+ name: string | null;
3802
+ phone: string | null;
3803
+ postcode: string | null;
3804
+ raw: Json | null;
3805
+ status: string | null;
3732
3806
  updated_at: string;
3807
+ vat_number: string | null;
3808
+ website: string | null;
3733
3809
  };
3734
3810
  Insert: {
3735
- completed_at?: string | null;
3736
- connection_id: string;
3811
+ account_key?: string;
3812
+ address_line1?: string | null;
3813
+ chamber_of_commerce?: string | null;
3814
+ city?: string | null;
3815
+ code?: string | null;
3816
+ country?: string | null;
3737
3817
  created_at?: string;
3738
- created_by?: string | null;
3739
- error_message?: string | null;
3740
- failed_count?: number | null;
3818
+ currency?: string | null;
3819
+ division_code?: number | null;
3820
+ email?: string | null;
3821
+ environment: Database["public"]["Enums"]["exact_env"];
3822
+ exact_id: string;
3823
+ exact_modified?: string | null;
3824
+ exact_timestamp?: number | null;
3741
3825
  id?: string;
3742
- operation_type: string;
3743
- processed_count?: number | null;
3744
- result_data?: Json | null;
3745
- started_at?: string | null;
3746
- status?: string;
3747
- total_count?: number | null;
3826
+ is_active?: boolean;
3827
+ name?: string | null;
3828
+ phone?: string | null;
3829
+ postcode?: string | null;
3830
+ raw?: Json | null;
3831
+ status?: string | null;
3748
3832
  updated_at?: string;
3833
+ vat_number?: string | null;
3834
+ website?: string | null;
3749
3835
  };
3750
3836
  Update: {
3751
- completed_at?: string | null;
3752
- connection_id?: string;
3837
+ account_key?: string;
3838
+ address_line1?: string | null;
3839
+ chamber_of_commerce?: string | null;
3840
+ city?: string | null;
3841
+ code?: string | null;
3842
+ country?: string | null;
3753
3843
  created_at?: string;
3754
- created_by?: string | null;
3755
- error_message?: string | null;
3756
- failed_count?: number | null;
3844
+ currency?: string | null;
3845
+ division_code?: number | null;
3846
+ email?: string | null;
3847
+ environment?: Database["public"]["Enums"]["exact_env"];
3848
+ exact_id?: string;
3849
+ exact_modified?: string | null;
3850
+ exact_timestamp?: number | null;
3757
3851
  id?: string;
3758
- operation_type?: string;
3759
- processed_count?: number | null;
3760
- result_data?: Json | null;
3761
- started_at?: string | null;
3762
- status?: string;
3763
- total_count?: number | null;
3852
+ is_active?: boolean;
3853
+ name?: string | null;
3854
+ phone?: string | null;
3855
+ postcode?: string | null;
3856
+ raw?: Json | null;
3857
+ status?: string | null;
3764
3858
  updated_at?: string;
3859
+ vat_number?: string | null;
3860
+ website?: string | null;
3765
3861
  };
3766
- Relationships: [
3767
- {
3768
- foreignKeyName: "exact_bulk_operations_connection_id_fkey";
3769
- columns: ["connection_id"];
3770
- isOneToOne: false;
3771
- referencedRelation: "exact_connections";
3772
- referencedColumns: ["id"];
3773
- }
3774
- ];
3862
+ Relationships: [];
3775
3863
  };
3776
- exact_connections: {
3864
+ exact_auth_divisions: {
3777
3865
  Row: {
3778
- access_token_encrypted: string;
3866
+ account_key: string;
3779
3867
  company_name: string | null;
3780
- connected_at: string;
3781
- connected_by: string | null;
3868
+ created_at: string;
3782
3869
  division_code: number | null;
3783
3870
  environment: Database["public"]["Enums"]["exact_env"];
3784
- expires_at: string;
3785
3871
  id: string;
3786
- last_error: string | null;
3787
- last_refreshed_at: string | null;
3788
- last_tested_at: string | null;
3789
- refresh_token_encrypted: string;
3790
- status: string;
3872
+ last_synced_at: string | null;
3791
3873
  updated_at: string;
3792
3874
  };
3793
3875
  Insert: {
3794
- access_token_encrypted: string;
3876
+ account_key?: string;
3795
3877
  company_name?: string | null;
3796
- connected_at?: string;
3797
- connected_by?: string | null;
3878
+ created_at?: string;
3798
3879
  division_code?: number | null;
3799
3880
  environment: Database["public"]["Enums"]["exact_env"];
3800
- expires_at: string;
3801
3881
  id?: string;
3802
- last_error?: string | null;
3803
- last_refreshed_at?: string | null;
3804
- last_tested_at?: string | null;
3805
- refresh_token_encrypted: string;
3806
- status?: string;
3882
+ last_synced_at?: string | null;
3807
3883
  updated_at?: string;
3808
3884
  };
3809
3885
  Update: {
3810
- access_token_encrypted?: string;
3886
+ account_key?: string;
3811
3887
  company_name?: string | null;
3812
- connected_at?: string;
3813
- connected_by?: string | null;
3888
+ created_at?: string;
3814
3889
  division_code?: number | null;
3815
3890
  environment?: Database["public"]["Enums"]["exact_env"];
3816
- expires_at?: string;
3817
3891
  id?: string;
3818
- last_error?: string | null;
3819
- last_refreshed_at?: string | null;
3820
- last_tested_at?: string | null;
3821
- refresh_token_encrypted?: string;
3822
- status?: string;
3892
+ last_synced_at?: string | null;
3823
3893
  updated_at?: string;
3824
3894
  };
3825
3895
  Relationships: [];
3826
3896
  };
3827
- exact_credentials: {
3897
+ exact_auth_invoice_lines: {
3828
3898
  Row: {
3829
- client_id: string;
3830
- client_secret_encrypted: string;
3899
+ account_key: string;
3900
+ amount_excl: number | null;
3901
+ created_at: string;
3902
+ description: string | null;
3903
+ discount: number | null;
3904
+ environment: Database["public"]["Enums"]["exact_env"];
3905
+ exact_id: string;
3906
+ exact_timestamp: number | null;
3907
+ id: string;
3908
+ invoice_exact_id: string;
3909
+ item_code: string | null;
3910
+ item_exact_id: string | null;
3911
+ line_number: number | null;
3912
+ quantity: number | null;
3913
+ raw: Json | null;
3914
+ unit_price: number | null;
3915
+ updated_at: string;
3916
+ vat_amount: number | null;
3917
+ vat_code: string | null;
3918
+ };
3919
+ Insert: {
3920
+ account_key?: string;
3921
+ amount_excl?: number | null;
3922
+ created_at?: string;
3923
+ description?: string | null;
3924
+ discount?: number | null;
3925
+ environment: Database["public"]["Enums"]["exact_env"];
3926
+ exact_id: string;
3927
+ exact_timestamp?: number | null;
3928
+ id?: string;
3929
+ invoice_exact_id: string;
3930
+ item_code?: string | null;
3931
+ item_exact_id?: string | null;
3932
+ line_number?: number | null;
3933
+ quantity?: number | null;
3934
+ raw?: Json | null;
3935
+ unit_price?: number | null;
3936
+ updated_at?: string;
3937
+ vat_amount?: number | null;
3938
+ vat_code?: string | null;
3939
+ };
3940
+ Update: {
3941
+ account_key?: string;
3942
+ amount_excl?: number | null;
3943
+ created_at?: string;
3944
+ description?: string | null;
3945
+ discount?: number | null;
3946
+ environment?: Database["public"]["Enums"]["exact_env"];
3947
+ exact_id?: string;
3948
+ exact_timestamp?: number | null;
3949
+ id?: string;
3950
+ invoice_exact_id?: string;
3951
+ item_code?: string | null;
3952
+ item_exact_id?: string | null;
3953
+ line_number?: number | null;
3954
+ quantity?: number | null;
3955
+ raw?: Json | null;
3956
+ unit_price?: number | null;
3957
+ updated_at?: string;
3958
+ vat_amount?: number | null;
3959
+ vat_code?: string | null;
3960
+ };
3961
+ Relationships: [];
3962
+ };
3963
+ exact_auth_invoices: {
3964
+ Row: {
3965
+ account_key: string;
3966
+ amount_excl: number | null;
3967
+ amount_incl: number | null;
3968
+ amount_open: number | null;
3969
+ created_at: string;
3970
+ currency: string | null;
3971
+ customer_code: string | null;
3972
+ customer_exact_id: string | null;
3973
+ customer_name: string | null;
3974
+ description: string | null;
3975
+ division_code: number | null;
3976
+ due_date: string | null;
3977
+ environment: Database["public"]["Enums"]["exact_env"];
3978
+ exact_id: string;
3979
+ exact_modified: string | null;
3980
+ exact_timestamp: number | null;
3981
+ id: string;
3982
+ invoice_date: string | null;
3983
+ invoice_number: string | null;
3984
+ order_number: string | null;
3985
+ paid_at: string | null;
3986
+ payment_status: string;
3987
+ raw: Json | null;
3988
+ receivable_synced_at: string | null;
3989
+ status_code: number | null;
3990
+ updated_at: string;
3991
+ };
3992
+ Insert: {
3993
+ account_key?: string;
3994
+ amount_excl?: number | null;
3995
+ amount_incl?: number | null;
3996
+ amount_open?: number | null;
3997
+ created_at?: string;
3998
+ currency?: string | null;
3999
+ customer_code?: string | null;
4000
+ customer_exact_id?: string | null;
4001
+ customer_name?: string | null;
4002
+ description?: string | null;
4003
+ division_code?: number | null;
4004
+ due_date?: string | null;
4005
+ environment: Database["public"]["Enums"]["exact_env"];
4006
+ exact_id: string;
4007
+ exact_modified?: string | null;
4008
+ exact_timestamp?: number | null;
4009
+ id?: string;
4010
+ invoice_date?: string | null;
4011
+ invoice_number?: string | null;
4012
+ order_number?: string | null;
4013
+ paid_at?: string | null;
4014
+ payment_status?: string;
4015
+ raw?: Json | null;
4016
+ receivable_synced_at?: string | null;
4017
+ status_code?: number | null;
4018
+ updated_at?: string;
4019
+ };
4020
+ Update: {
4021
+ account_key?: string;
4022
+ amount_excl?: number | null;
4023
+ amount_incl?: number | null;
4024
+ amount_open?: number | null;
4025
+ created_at?: string;
4026
+ currency?: string | null;
4027
+ customer_code?: string | null;
4028
+ customer_exact_id?: string | null;
4029
+ customer_name?: string | null;
4030
+ description?: string | null;
4031
+ division_code?: number | null;
4032
+ due_date?: string | null;
4033
+ environment?: Database["public"]["Enums"]["exact_env"];
4034
+ exact_id?: string;
4035
+ exact_modified?: string | null;
4036
+ exact_timestamp?: number | null;
4037
+ id?: string;
4038
+ invoice_date?: string | null;
4039
+ invoice_number?: string | null;
4040
+ order_number?: string | null;
4041
+ paid_at?: string | null;
4042
+ payment_status?: string;
4043
+ raw?: Json | null;
4044
+ receivable_synced_at?: string | null;
4045
+ status_code?: number | null;
4046
+ updated_at?: string;
4047
+ };
4048
+ Relationships: [];
4049
+ };
4050
+ exact_auth_items: {
4051
+ Row: {
4052
+ account_key: string;
4053
+ barcode: string | null;
4054
+ code: string | null;
4055
+ cost_price: number | null;
4056
+ created_at: string;
4057
+ description: string | null;
4058
+ division_code: number | null;
4059
+ environment: Database["public"]["Enums"]["exact_env"];
4060
+ exact_id: string;
4061
+ exact_modified: string | null;
4062
+ exact_timestamp: number | null;
4063
+ gl_account_code: string | null;
4064
+ id: string;
4065
+ is_active: boolean;
4066
+ is_sales_item: boolean | null;
4067
+ item_type: string | null;
4068
+ raw: Json | null;
4069
+ sales_price: number | null;
4070
+ unit: string | null;
4071
+ updated_at: string;
4072
+ vat_code: string | null;
4073
+ };
4074
+ Insert: {
4075
+ account_key?: string;
4076
+ barcode?: string | null;
4077
+ code?: string | null;
4078
+ cost_price?: number | null;
4079
+ created_at?: string;
4080
+ description?: string | null;
4081
+ division_code?: number | null;
4082
+ environment: Database["public"]["Enums"]["exact_env"];
4083
+ exact_id: string;
4084
+ exact_modified?: string | null;
4085
+ exact_timestamp?: number | null;
4086
+ gl_account_code?: string | null;
4087
+ id?: string;
4088
+ is_active?: boolean;
4089
+ is_sales_item?: boolean | null;
4090
+ item_type?: string | null;
4091
+ raw?: Json | null;
4092
+ sales_price?: number | null;
4093
+ unit?: string | null;
4094
+ updated_at?: string;
4095
+ vat_code?: string | null;
4096
+ };
4097
+ Update: {
4098
+ account_key?: string;
4099
+ barcode?: string | null;
4100
+ code?: string | null;
4101
+ cost_price?: number | null;
4102
+ created_at?: string;
4103
+ description?: string | null;
4104
+ division_code?: number | null;
4105
+ environment?: Database["public"]["Enums"]["exact_env"];
4106
+ exact_id?: string;
4107
+ exact_modified?: string | null;
4108
+ exact_timestamp?: number | null;
4109
+ gl_account_code?: string | null;
4110
+ id?: string;
4111
+ is_active?: boolean;
4112
+ is_sales_item?: boolean | null;
4113
+ item_type?: string | null;
4114
+ raw?: Json | null;
4115
+ sales_price?: number | null;
4116
+ unit?: string | null;
4117
+ updated_at?: string;
4118
+ vat_code?: string | null;
4119
+ };
4120
+ Relationships: [];
4121
+ };
4122
+ exact_auth_sync_log: {
4123
+ Row: {
4124
+ account_key: string;
4125
+ calls_used: number;
4126
+ created_at: string;
4127
+ domain: string;
4128
+ environment: Database["public"]["Enums"]["exact_env"];
4129
+ error: string | null;
4130
+ finished_at: string | null;
4131
+ id: string;
4132
+ ok: boolean;
4133
+ records: number;
4134
+ started_at: string;
4135
+ };
4136
+ Insert: {
4137
+ account_key?: string;
4138
+ calls_used?: number;
4139
+ created_at?: string;
4140
+ domain: string;
4141
+ environment: Database["public"]["Enums"]["exact_env"];
4142
+ error?: string | null;
4143
+ finished_at?: string | null;
4144
+ id?: string;
4145
+ ok?: boolean;
4146
+ records?: number;
4147
+ started_at?: string;
4148
+ };
4149
+ Update: {
4150
+ account_key?: string;
4151
+ calls_used?: number;
4152
+ created_at?: string;
4153
+ domain?: string;
4154
+ environment?: Database["public"]["Enums"]["exact_env"];
4155
+ error?: string | null;
4156
+ finished_at?: string | null;
4157
+ id?: string;
4158
+ ok?: boolean;
4159
+ records?: number;
4160
+ started_at?: string;
4161
+ };
4162
+ Relationships: [];
4163
+ };
4164
+ exact_auth_sync_state: {
4165
+ Row: {
4166
+ account_key: string;
4167
+ created_at: string;
4168
+ cursor_timestamp: number;
4169
+ division_code: number | null;
4170
+ domain: string;
4171
+ duration_ms: number | null;
4172
+ environment: Database["public"]["Enums"]["exact_env"];
4173
+ initial_sync_done: boolean;
4174
+ last_error: string | null;
4175
+ last_run_at: string | null;
4176
+ last_success_at: string | null;
4177
+ locked_at: string | null;
4178
+ needs_initial_sync: boolean;
4179
+ record_count: number;
4180
+ updated_at: string;
4181
+ };
4182
+ Insert: {
4183
+ account_key?: string;
4184
+ created_at?: string;
4185
+ cursor_timestamp?: number;
4186
+ division_code?: number | null;
4187
+ domain: string;
4188
+ duration_ms?: number | null;
4189
+ environment: Database["public"]["Enums"]["exact_env"];
4190
+ initial_sync_done?: boolean;
4191
+ last_error?: string | null;
4192
+ last_run_at?: string | null;
4193
+ last_success_at?: string | null;
4194
+ locked_at?: string | null;
4195
+ needs_initial_sync?: boolean;
4196
+ record_count?: number;
4197
+ updated_at?: string;
4198
+ };
4199
+ Update: {
4200
+ account_key?: string;
4201
+ created_at?: string;
4202
+ cursor_timestamp?: number;
4203
+ division_code?: number | null;
4204
+ domain?: string;
4205
+ duration_ms?: number | null;
4206
+ environment?: Database["public"]["Enums"]["exact_env"];
4207
+ initial_sync_done?: boolean;
4208
+ last_error?: string | null;
4209
+ last_run_at?: string | null;
4210
+ last_success_at?: string | null;
4211
+ locked_at?: string | null;
4212
+ needs_initial_sync?: boolean;
4213
+ record_count?: number;
4214
+ updated_at?: string;
4215
+ };
4216
+ Relationships: [];
4217
+ };
4218
+ exact_bulk_operation_items: {
4219
+ Row: {
4220
+ attempts: number;
4221
+ bulk_operation_id: string;
4222
+ created_at: string;
4223
+ error_message: string | null;
4224
+ id: string;
4225
+ invoice_cache_id: string | null;
4226
+ invoice_exact_id: string | null;
4227
+ processed_at: string | null;
4228
+ result_data: Json | null;
4229
+ status: string;
4230
+ };
4231
+ Insert: {
4232
+ attempts?: number;
4233
+ bulk_operation_id: string;
4234
+ created_at?: string;
4235
+ error_message?: string | null;
4236
+ id?: string;
4237
+ invoice_cache_id?: string | null;
4238
+ invoice_exact_id?: string | null;
4239
+ processed_at?: string | null;
4240
+ result_data?: Json | null;
4241
+ status?: string;
4242
+ };
4243
+ Update: {
4244
+ attempts?: number;
4245
+ bulk_operation_id?: string;
4246
+ created_at?: string;
4247
+ error_message?: string | null;
4248
+ id?: string;
4249
+ invoice_cache_id?: string | null;
4250
+ invoice_exact_id?: string | null;
4251
+ processed_at?: string | null;
4252
+ result_data?: Json | null;
4253
+ status?: string;
4254
+ };
4255
+ Relationships: [
4256
+ {
4257
+ foreignKeyName: "exact_bulk_operation_items_bulk_operation_id_fkey";
4258
+ columns: ["bulk_operation_id"];
4259
+ isOneToOne: false;
4260
+ referencedRelation: "exact_bulk_operations";
4261
+ referencedColumns: ["id"];
4262
+ },
4263
+ {
4264
+ foreignKeyName: "exact_bulk_operation_items_invoice_cache_id_fkey";
4265
+ columns: ["invoice_cache_id"];
4266
+ isOneToOne: false;
4267
+ referencedRelation: "exact_invoices_cache";
4268
+ referencedColumns: ["id"];
4269
+ }
4270
+ ];
4271
+ };
4272
+ exact_bulk_operations: {
4273
+ Row: {
4274
+ completed_at: string | null;
4275
+ connection_id: string;
4276
+ created_at: string;
4277
+ created_by: string | null;
4278
+ error_message: string | null;
4279
+ failed_count: number | null;
4280
+ id: string;
4281
+ operation_type: string;
4282
+ processed_count: number | null;
4283
+ result_data: Json | null;
4284
+ started_at: string | null;
4285
+ status: string;
4286
+ total_count: number | null;
4287
+ updated_at: string;
4288
+ };
4289
+ Insert: {
4290
+ completed_at?: string | null;
4291
+ connection_id: string;
4292
+ created_at?: string;
4293
+ created_by?: string | null;
4294
+ error_message?: string | null;
4295
+ failed_count?: number | null;
4296
+ id?: string;
4297
+ operation_type: string;
4298
+ processed_count?: number | null;
4299
+ result_data?: Json | null;
4300
+ started_at?: string | null;
4301
+ status?: string;
4302
+ total_count?: number | null;
4303
+ updated_at?: string;
4304
+ };
4305
+ Update: {
4306
+ completed_at?: string | null;
4307
+ connection_id?: string;
4308
+ created_at?: string;
4309
+ created_by?: string | null;
4310
+ error_message?: string | null;
4311
+ failed_count?: number | null;
4312
+ id?: string;
4313
+ operation_type?: string;
4314
+ processed_count?: number | null;
4315
+ result_data?: Json | null;
4316
+ started_at?: string | null;
4317
+ status?: string;
4318
+ total_count?: number | null;
4319
+ updated_at?: string;
4320
+ };
4321
+ Relationships: [
4322
+ {
4323
+ foreignKeyName: "exact_bulk_operations_connection_id_fkey";
4324
+ columns: ["connection_id"];
4325
+ isOneToOne: false;
4326
+ referencedRelation: "exact_connections";
4327
+ referencedColumns: ["id"];
4328
+ }
4329
+ ];
4330
+ };
4331
+ exact_connections: {
4332
+ Row: {
4333
+ access_token_encrypted: string;
4334
+ company_name: string | null;
4335
+ connected_at: string;
4336
+ connected_by: string | null;
4337
+ division_code: number | null;
4338
+ environment: Database["public"]["Enums"]["exact_env"];
4339
+ expires_at: string;
4340
+ id: string;
4341
+ last_error: string | null;
4342
+ last_refreshed_at: string | null;
4343
+ last_tested_at: string | null;
4344
+ refresh_token_encrypted: string;
4345
+ status: string;
4346
+ updated_at: string;
4347
+ };
4348
+ Insert: {
4349
+ access_token_encrypted: string;
4350
+ company_name?: string | null;
4351
+ connected_at?: string;
4352
+ connected_by?: string | null;
4353
+ division_code?: number | null;
4354
+ environment: Database["public"]["Enums"]["exact_env"];
4355
+ expires_at: string;
4356
+ id?: string;
4357
+ last_error?: string | null;
4358
+ last_refreshed_at?: string | null;
4359
+ last_tested_at?: string | null;
4360
+ refresh_token_encrypted: string;
4361
+ status?: string;
4362
+ updated_at?: string;
4363
+ };
4364
+ Update: {
4365
+ access_token_encrypted?: string;
4366
+ company_name?: string | null;
4367
+ connected_at?: string;
4368
+ connected_by?: string | null;
4369
+ division_code?: number | null;
4370
+ environment?: Database["public"]["Enums"]["exact_env"];
4371
+ expires_at?: string;
4372
+ id?: string;
4373
+ last_error?: string | null;
4374
+ last_refreshed_at?: string | null;
4375
+ last_tested_at?: string | null;
4376
+ refresh_token_encrypted?: string;
4377
+ status?: string;
4378
+ updated_at?: string;
4379
+ };
4380
+ Relationships: [];
4381
+ };
4382
+ exact_credentials: {
4383
+ Row: {
4384
+ client_id: string;
4385
+ client_secret_encrypted: string;
3831
4386
  created_at: string;
3832
4387
  environment: Database["public"]["Enums"]["exact_env"];
3833
4388
  id: string;
@@ -5398,12 +5953,17 @@ export type Database = {
5398
5953
  attempts: number;
5399
5954
  connection_id: string;
5400
5955
  created_at: string;
5956
+ desired_available: boolean | null;
5401
5957
  gateway_attempt_id: string | null;
5402
5958
  id: string;
5403
5959
  last_error: string | null;
5960
+ locked_at: string | null;
5961
+ locked_by: string | null;
5962
+ next_attempt_at: string;
5404
5963
  number_of_pieces: number;
5405
5964
  sent_at: string | null;
5406
5965
  status: string;
5966
+ superseded_by: string | null;
5407
5967
  trade_item_id: string;
5408
5968
  updated_at: string;
5409
5969
  user_id: string;
@@ -5412,12 +5972,17 @@ export type Database = {
5412
5972
  attempts?: number;
5413
5973
  connection_id: string;
5414
5974
  created_at?: string;
5975
+ desired_available?: boolean | null;
5415
5976
  gateway_attempt_id?: string | null;
5416
5977
  id?: string;
5417
5978
  last_error?: string | null;
5979
+ locked_at?: string | null;
5980
+ locked_by?: string | null;
5981
+ next_attempt_at?: string;
5418
5982
  number_of_pieces?: number;
5419
5983
  sent_at?: string | null;
5420
5984
  status?: string;
5985
+ superseded_by?: string | null;
5421
5986
  trade_item_id: string;
5422
5987
  updated_at?: string;
5423
5988
  user_id: string;
@@ -5426,12 +5991,17 @@ export type Database = {
5426
5991
  attempts?: number;
5427
5992
  connection_id?: string;
5428
5993
  created_at?: string;
5994
+ desired_available?: boolean | null;
5429
5995
  gateway_attempt_id?: string | null;
5430
5996
  id?: string;
5431
5997
  last_error?: string | null;
5998
+ locked_at?: string | null;
5999
+ locked_by?: string | null;
6000
+ next_attempt_at?: string;
5432
6001
  number_of_pieces?: number;
5433
6002
  sent_at?: string | null;
5434
6003
  status?: string;
6004
+ superseded_by?: string | null;
5435
6005
  trade_item_id?: string;
5436
6006
  updated_at?: string;
5437
6007
  user_id?: string;
@@ -6196,6 +6766,7 @@ export type Database = {
6196
6766
  Row: {
6197
6767
  buyer_organization_id: string | null;
6198
6768
  connection_id: string;
6769
+ controlled_at: string | null;
6199
6770
  created_at: string;
6200
6771
  data: Json;
6201
6772
  floriday_id: string;
@@ -6207,6 +6778,7 @@ export type Database = {
6207
6778
  Insert: {
6208
6779
  buyer_organization_id?: string | null;
6209
6780
  connection_id: string;
6781
+ controlled_at?: string | null;
6210
6782
  created_at?: string;
6211
6783
  data: Json;
6212
6784
  floriday_id: string;
@@ -6218,6 +6790,7 @@ export type Database = {
6218
6790
  Update: {
6219
6791
  buyer_organization_id?: string | null;
6220
6792
  connection_id?: string;
6793
+ controlled_at?: string | null;
6221
6794
  created_at?: string;
6222
6795
  data?: Json;
6223
6796
  floriday_id?: string;
@@ -7151,6 +7724,54 @@ export type Database = {
7151
7724
  };
7152
7725
  Relationships: [];
7153
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
+ };
7154
7775
  itk_contact_persons: {
7155
7776
  Row: {
7156
7777
  created_at: string;
@@ -7355,6 +7976,260 @@ export type Database = {
7355
7976
  };
7356
7977
  Relationships: [];
7357
7978
  };
7979
+ itk_offerte_events: {
7980
+ Row: {
7981
+ created_at: string;
7982
+ event_type: string;
7983
+ id: string;
7984
+ metadata: Json;
7985
+ offerte_id: string;
7986
+ omschrijving: string | null;
7987
+ user_id: string | null;
7988
+ };
7989
+ Insert: {
7990
+ created_at?: string;
7991
+ event_type: string;
7992
+ id?: string;
7993
+ metadata?: Json;
7994
+ offerte_id: string;
7995
+ omschrijving?: string | null;
7996
+ user_id?: string | null;
7997
+ };
7998
+ Update: {
7999
+ created_at?: string;
8000
+ event_type?: string;
8001
+ id?: string;
8002
+ metadata?: Json;
8003
+ offerte_id?: string;
8004
+ omschrijving?: string | null;
8005
+ user_id?: string | null;
8006
+ };
8007
+ Relationships: [
8008
+ {
8009
+ foreignKeyName: "itk_offerte_events_offerte_id_fkey";
8010
+ columns: ["offerte_id"];
8011
+ isOneToOne: false;
8012
+ referencedRelation: "itk_offertes";
8013
+ referencedColumns: ["id"];
8014
+ }
8015
+ ];
8016
+ };
8017
+ itk_offerte_regels: {
8018
+ Row: {
8019
+ created_at: string;
8020
+ id: string;
8021
+ line_total_cents: number;
8022
+ offerte_id: string;
8023
+ omschrijving: string;
8024
+ package_id: string | null;
8025
+ quantity: number;
8026
+ sort_order: number;
8027
+ source: string;
8028
+ unit_price_cents: number;
8029
+ updated_at: string;
8030
+ };
8031
+ Insert: {
8032
+ created_at?: string;
8033
+ id?: string;
8034
+ line_total_cents?: number;
8035
+ offerte_id: string;
8036
+ omschrijving?: string;
8037
+ package_id?: string | null;
8038
+ quantity?: number;
8039
+ sort_order?: number;
8040
+ source?: string;
8041
+ unit_price_cents?: number;
8042
+ updated_at?: string;
8043
+ };
8044
+ Update: {
8045
+ created_at?: string;
8046
+ id?: string;
8047
+ line_total_cents?: number;
8048
+ offerte_id?: string;
8049
+ omschrijving?: string;
8050
+ package_id?: string | null;
8051
+ quantity?: number;
8052
+ sort_order?: number;
8053
+ source?: string;
8054
+ unit_price_cents?: number;
8055
+ updated_at?: string;
8056
+ };
8057
+ Relationships: [
8058
+ {
8059
+ foreignKeyName: "itk_offerte_regels_offerte_id_fkey";
8060
+ columns: ["offerte_id"];
8061
+ isOneToOne: false;
8062
+ referencedRelation: "itk_offertes";
8063
+ referencedColumns: ["id"];
8064
+ },
8065
+ {
8066
+ foreignKeyName: "itk_offerte_regels_package_id_fkey";
8067
+ columns: ["package_id"];
8068
+ isOneToOne: false;
8069
+ referencedRelation: "werkbon_packages";
8070
+ referencedColumns: ["id"];
8071
+ }
8072
+ ];
8073
+ };
8074
+ itk_offerte_settings: {
8075
+ Row: {
8076
+ auto_convert_binnen_mandaat: boolean;
8077
+ created_at: string;
8078
+ default_geldigheid_dagen: number;
8079
+ default_vat_rate: number;
8080
+ id: string;
8081
+ singleton: boolean;
8082
+ updated_at: string;
8083
+ };
8084
+ Insert: {
8085
+ auto_convert_binnen_mandaat?: boolean;
8086
+ created_at?: string;
8087
+ default_geldigheid_dagen?: number;
8088
+ default_vat_rate?: number;
8089
+ id?: string;
8090
+ singleton?: boolean;
8091
+ updated_at?: string;
8092
+ };
8093
+ Update: {
8094
+ auto_convert_binnen_mandaat?: boolean;
8095
+ created_at?: string;
8096
+ default_geldigheid_dagen?: number;
8097
+ default_vat_rate?: number;
8098
+ id?: string;
8099
+ singleton?: boolean;
8100
+ updated_at?: string;
8101
+ };
8102
+ Relationships: [];
8103
+ };
8104
+ itk_offertes: {
8105
+ Row: {
8106
+ ai_generated: boolean;
8107
+ approved_at: string | null;
8108
+ binnen_mandaat: boolean;
8109
+ contact_id: string | null;
8110
+ converted_at: string | null;
8111
+ created_at: string;
8112
+ created_by: string | null;
8113
+ customer_id: string | null;
8114
+ follow_up_werkbon_id: string | null;
8115
+ id: string;
8116
+ jaar: number;
8117
+ mandaat_restant_cents: number;
8118
+ notities: string | null;
8119
+ offerte_number: string | null;
8120
+ omschrijving: string;
8121
+ rejected_at: string | null;
8122
+ sent_at: string | null;
8123
+ status: string;
8124
+ subtotal_cents: number;
8125
+ total_cents: number;
8126
+ updated_at: string;
8127
+ valid_until: string | null;
8128
+ vat_cents: number;
8129
+ vat_rate: number;
8130
+ viewed_at: string | null;
8131
+ volgnummer: number | null;
8132
+ werkbon_id: string | null;
8133
+ work_location_id: string | null;
8134
+ };
8135
+ Insert: {
8136
+ ai_generated?: boolean;
8137
+ approved_at?: string | null;
8138
+ binnen_mandaat?: boolean;
8139
+ contact_id?: string | null;
8140
+ converted_at?: string | null;
8141
+ created_at?: string;
8142
+ created_by?: string | null;
8143
+ customer_id?: string | null;
8144
+ follow_up_werkbon_id?: string | null;
8145
+ id?: string;
8146
+ jaar?: number;
8147
+ mandaat_restant_cents?: number;
8148
+ notities?: string | null;
8149
+ offerte_number?: string | null;
8150
+ omschrijving?: string;
8151
+ rejected_at?: string | null;
8152
+ sent_at?: string | null;
8153
+ status?: string;
8154
+ subtotal_cents?: number;
8155
+ total_cents?: number;
8156
+ updated_at?: string;
8157
+ valid_until?: string | null;
8158
+ vat_cents?: number;
8159
+ vat_rate?: number;
8160
+ viewed_at?: string | null;
8161
+ volgnummer?: number | null;
8162
+ werkbon_id?: string | null;
8163
+ work_location_id?: string | null;
8164
+ };
8165
+ Update: {
8166
+ ai_generated?: boolean;
8167
+ approved_at?: string | null;
8168
+ binnen_mandaat?: boolean;
8169
+ contact_id?: string | null;
8170
+ converted_at?: string | null;
8171
+ created_at?: string;
8172
+ created_by?: string | null;
8173
+ customer_id?: string | null;
8174
+ follow_up_werkbon_id?: string | null;
8175
+ id?: string;
8176
+ jaar?: number;
8177
+ mandaat_restant_cents?: number;
8178
+ notities?: string | null;
8179
+ offerte_number?: string | null;
8180
+ omschrijving?: string;
8181
+ rejected_at?: string | null;
8182
+ sent_at?: string | null;
8183
+ status?: string;
8184
+ subtotal_cents?: number;
8185
+ total_cents?: number;
8186
+ updated_at?: string;
8187
+ valid_until?: string | null;
8188
+ vat_cents?: number;
8189
+ vat_rate?: number;
8190
+ viewed_at?: string | null;
8191
+ volgnummer?: number | null;
8192
+ werkbon_id?: string | null;
8193
+ work_location_id?: string | null;
8194
+ };
8195
+ Relationships: [
8196
+ {
8197
+ foreignKeyName: "itk_offertes_contact_id_fkey";
8198
+ columns: ["contact_id"];
8199
+ isOneToOne: false;
8200
+ referencedRelation: "itk_contact_persons";
8201
+ referencedColumns: ["id"];
8202
+ },
8203
+ {
8204
+ foreignKeyName: "itk_offertes_customer_id_fkey";
8205
+ columns: ["customer_id"];
8206
+ isOneToOne: false;
8207
+ referencedRelation: "itk_customers";
8208
+ referencedColumns: ["id"];
8209
+ },
8210
+ {
8211
+ foreignKeyName: "itk_offertes_follow_up_werkbon_id_fkey";
8212
+ columns: ["follow_up_werkbon_id"];
8213
+ isOneToOne: false;
8214
+ referencedRelation: "werkbonnen";
8215
+ referencedColumns: ["id"];
8216
+ },
8217
+ {
8218
+ foreignKeyName: "itk_offertes_werkbon_id_fkey";
8219
+ columns: ["werkbon_id"];
8220
+ isOneToOne: false;
8221
+ referencedRelation: "werkbonnen";
8222
+ referencedColumns: ["id"];
8223
+ },
8224
+ {
8225
+ foreignKeyName: "itk_offertes_work_location_id_fkey";
8226
+ columns: ["work_location_id"];
8227
+ isOneToOne: false;
8228
+ referencedRelation: "itk_work_locations";
8229
+ referencedColumns: ["id"];
8230
+ }
8231
+ ];
8232
+ };
7358
8233
  itk_work_locations: {
7359
8234
  Row: {
7360
8235
  city: string | null;
@@ -7474,7 +8349,6 @@ export type Database = {
7474
8349
  start_date: string;
7475
8350
  start_time: string | null;
7476
8351
  status: string;
7477
- tenant_id: string;
7478
8352
  updated_at: string;
7479
8353
  user_id: string;
7480
8354
  };
@@ -7492,7 +8366,6 @@ export type Database = {
7492
8366
  start_date: string;
7493
8367
  start_time?: string | null;
7494
8368
  status?: string;
7495
- tenant_id?: string;
7496
8369
  updated_at?: string;
7497
8370
  user_id: string;
7498
8371
  };
@@ -7510,7 +8383,6 @@ export type Database = {
7510
8383
  start_date?: string;
7511
8384
  start_time?: string | null;
7512
8385
  status?: string;
7513
- tenant_id?: string;
7514
8386
  updated_at?: string;
7515
8387
  user_id?: string;
7516
8388
  };
@@ -7519,14 +8391,14 @@ export type Database = {
7519
8391
  foreignKeyName: "leave_requests_monteur_id_fkey";
7520
8392
  columns: ["monteur_id"];
7521
8393
  isOneToOne: false;
7522
- referencedRelation: "monteurs";
8394
+ referencedRelation: "profiles";
7523
8395
  referencedColumns: ["id"];
7524
8396
  },
7525
8397
  {
7526
8398
  foreignKeyName: "leave_requests_user_id_fkey";
7527
8399
  columns: ["user_id"];
7528
8400
  isOneToOne: false;
7529
- referencedRelation: "monteurs";
8401
+ referencedRelation: "profiles";
7530
8402
  referencedColumns: ["id"];
7531
8403
  }
7532
8404
  ];
@@ -8274,6 +9146,69 @@ export type Database = {
8274
9146
  };
8275
9147
  Relationships: [];
8276
9148
  };
9149
+ logistics_floriday_pushes: {
9150
+ Row: {
9151
+ attempts: number;
9152
+ created_at: string;
9153
+ first_queued_at: string;
9154
+ fulfillment_order_id: string | null;
9155
+ id: string;
9156
+ last_error: string | null;
9157
+ last_error_at: string | null;
9158
+ last_sent_hash: string | null;
9159
+ locked_by: string | null;
9160
+ locked_until: string | null;
9161
+ next_attempt_at: string;
9162
+ order_ref: string;
9163
+ payload: Json;
9164
+ payload_hash: string | null;
9165
+ revision: number;
9166
+ sent_at: string | null;
9167
+ status: string;
9168
+ updated_at: string;
9169
+ };
9170
+ Insert: {
9171
+ attempts?: number;
9172
+ created_at?: string;
9173
+ first_queued_at?: string;
9174
+ fulfillment_order_id?: string | null;
9175
+ id?: string;
9176
+ last_error?: string | null;
9177
+ last_error_at?: string | null;
9178
+ last_sent_hash?: string | null;
9179
+ locked_by?: string | null;
9180
+ locked_until?: string | null;
9181
+ next_attempt_at?: string;
9182
+ order_ref: string;
9183
+ payload?: Json;
9184
+ payload_hash?: string | null;
9185
+ revision?: number;
9186
+ sent_at?: string | null;
9187
+ status?: string;
9188
+ updated_at?: string;
9189
+ };
9190
+ Update: {
9191
+ attempts?: number;
9192
+ created_at?: string;
9193
+ first_queued_at?: string;
9194
+ fulfillment_order_id?: string | null;
9195
+ id?: string;
9196
+ last_error?: string | null;
9197
+ last_error_at?: string | null;
9198
+ last_sent_hash?: string | null;
9199
+ locked_by?: string | null;
9200
+ locked_until?: string | null;
9201
+ next_attempt_at?: string;
9202
+ order_ref?: string;
9203
+ payload?: Json;
9204
+ payload_hash?: string | null;
9205
+ revision?: number;
9206
+ sent_at?: string | null;
9207
+ status?: string;
9208
+ updated_at?: string;
9209
+ };
9210
+ Relationships: [];
9211
+ };
8277
9212
  logistics_formulas: {
8278
9213
  Row: {
8279
9214
  created_at: string;
@@ -8354,6 +9289,45 @@ export type Database = {
8354
9289
  };
8355
9290
  Relationships: [];
8356
9291
  };
9292
+ logistics_plan_queue: {
9293
+ Row: {
9294
+ attempts: number;
9295
+ claimed_at: string | null;
9296
+ enqueued_at: string;
9297
+ error: string | null;
9298
+ id: string;
9299
+ next_attempt_at: string;
9300
+ order_id: string;
9301
+ reason: string;
9302
+ status: string;
9303
+ updated_at: string;
9304
+ };
9305
+ Insert: {
9306
+ attempts?: number;
9307
+ claimed_at?: string | null;
9308
+ enqueued_at?: string;
9309
+ error?: string | null;
9310
+ id?: string;
9311
+ next_attempt_at?: string;
9312
+ order_id: string;
9313
+ reason?: string;
9314
+ status?: string;
9315
+ updated_at?: string;
9316
+ };
9317
+ Update: {
9318
+ attempts?: number;
9319
+ claimed_at?: string | null;
9320
+ enqueued_at?: string;
9321
+ error?: string | null;
9322
+ id?: string;
9323
+ next_attempt_at?: string;
9324
+ order_id?: string;
9325
+ reason?: string;
9326
+ status?: string;
9327
+ updated_at?: string;
9328
+ };
9329
+ Relationships: [];
9330
+ };
8357
9331
  logistics_plan_runs: {
8358
9332
  Row: {
8359
9333
  created_at: string;
@@ -8432,6 +9406,24 @@ export type Database = {
8432
9406
  }
8433
9407
  ];
8434
9408
  };
9409
+ logistics_plan_settings: {
9410
+ Row: {
9411
+ key: string;
9412
+ updated_at: string;
9413
+ value: string;
9414
+ };
9415
+ Insert: {
9416
+ key: string;
9417
+ updated_at?: string;
9418
+ value: string;
9419
+ };
9420
+ Update: {
9421
+ key?: string;
9422
+ updated_at?: string;
9423
+ value?: string;
9424
+ };
9425
+ Relationships: [];
9426
+ };
8435
9427
  logistics_rebuffer_state: {
8436
9428
  Row: {
8437
9429
  created_at: string;
@@ -8896,6 +9888,8 @@ export type Database = {
8896
9888
  };
8897
9889
  logistics_tasks: {
8898
9890
  Row: {
9891
+ attempt_log: Json;
9892
+ attempts: number;
8899
9893
  buffer_ref: string | null;
8900
9894
  claimed_at: string | null;
8901
9895
  claimed_by: string | null;
@@ -8905,6 +9899,8 @@ export type Database = {
8905
9899
  due_at: string | null;
8906
9900
  error: string | null;
8907
9901
  id: string;
9902
+ last_error: string | null;
9903
+ next_attempt_at: string | null;
8908
9904
  order_ref: string;
8909
9905
  owner_module: string;
8910
9906
  payload: Json;
@@ -8925,6 +9921,8 @@ export type Database = {
8925
9921
  user_id: string;
8926
9922
  };
8927
9923
  Insert: {
9924
+ attempt_log?: Json;
9925
+ attempts?: number;
8928
9926
  buffer_ref?: string | null;
8929
9927
  claimed_at?: string | null;
8930
9928
  claimed_by?: string | null;
@@ -8934,6 +9932,8 @@ export type Database = {
8934
9932
  due_at?: string | null;
8935
9933
  error?: string | null;
8936
9934
  id?: string;
9935
+ last_error?: string | null;
9936
+ next_attempt_at?: string | null;
8937
9937
  order_ref: string;
8938
9938
  owner_module: string;
8939
9939
  payload?: Json;
@@ -8954,6 +9954,8 @@ export type Database = {
8954
9954
  user_id?: string;
8955
9955
  };
8956
9956
  Update: {
9957
+ attempt_log?: Json;
9958
+ attempts?: number;
8957
9959
  buffer_ref?: string | null;
8958
9960
  claimed_at?: string | null;
8959
9961
  claimed_by?: string | null;
@@ -8963,6 +9965,8 @@ export type Database = {
8963
9965
  due_at?: string | null;
8964
9966
  error?: string | null;
8965
9967
  id?: string;
9968
+ last_error?: string | null;
9969
+ next_attempt_at?: string | null;
8966
9970
  order_ref?: string;
8967
9971
  owner_module?: string;
8968
9972
  payload?: Json;
@@ -9140,14 +10144,17 @@ export type Database = {
9140
10144
  };
9141
10145
  mailbox_messages: {
9142
10146
  Row: {
10147
+ attachments: Json;
9143
10148
  body_html: string | null;
9144
10149
  body_text: string | null;
10150
+ cc_recipients: Json;
9145
10151
  connection_id: string | null;
9146
10152
  created_at: string;
9147
10153
  error_message: string | null;
9148
10154
  external_id: string | null;
9149
10155
  from_email: string | null;
9150
10156
  from_name: string | null;
10157
+ has_attachments: boolean;
9151
10158
  id: string;
9152
10159
  message_id: string | null;
9153
10160
  profile_id: string | null;
@@ -9155,18 +10162,22 @@ export type Database = {
9155
10162
  received_at: string | null;
9156
10163
  status: string;
9157
10164
  subject: string | null;
10165
+ to_recipients: Json;
9158
10166
  uid: number | null;
9159
10167
  updated_at: string;
9160
10168
  };
9161
10169
  Insert: {
10170
+ attachments?: Json;
9162
10171
  body_html?: string | null;
9163
10172
  body_text?: string | null;
10173
+ cc_recipients?: Json;
9164
10174
  connection_id?: string | null;
9165
10175
  created_at?: string;
9166
10176
  error_message?: string | null;
9167
10177
  external_id?: string | null;
9168
10178
  from_email?: string | null;
9169
10179
  from_name?: string | null;
10180
+ has_attachments?: boolean;
9170
10181
  id?: string;
9171
10182
  message_id?: string | null;
9172
10183
  profile_id?: string | null;
@@ -9174,18 +10185,22 @@ export type Database = {
9174
10185
  received_at?: string | null;
9175
10186
  status?: string;
9176
10187
  subject?: string | null;
10188
+ to_recipients?: Json;
9177
10189
  uid?: number | null;
9178
10190
  updated_at?: string;
9179
10191
  };
9180
10192
  Update: {
10193
+ attachments?: Json;
9181
10194
  body_html?: string | null;
9182
10195
  body_text?: string | null;
10196
+ cc_recipients?: Json;
9183
10197
  connection_id?: string | null;
9184
10198
  created_at?: string;
9185
10199
  error_message?: string | null;
9186
10200
  external_id?: string | null;
9187
10201
  from_email?: string | null;
9188
10202
  from_name?: string | null;
10203
+ has_attachments?: boolean;
9189
10204
  id?: string;
9190
10205
  message_id?: string | null;
9191
10206
  profile_id?: string | null;
@@ -9193,6 +10208,7 @@ export type Database = {
9193
10208
  received_at?: string | null;
9194
10209
  status?: string;
9195
10210
  subject?: string | null;
10211
+ to_recipients?: Json;
9196
10212
  uid?: number | null;
9197
10213
  updated_at?: string;
9198
10214
  };
@@ -9590,6 +10606,94 @@ export type Database = {
9590
10606
  };
9591
10607
  Relationships: [];
9592
10608
  };
10609
+ material_usage: {
10610
+ Row: {
10611
+ created_at: string;
10612
+ id: string;
10613
+ material_name: string;
10614
+ monteur_id: string | null;
10615
+ price_at_time: number;
10616
+ quantity_used: number;
10617
+ updated_at: string;
10618
+ van_inventory_id: string | null;
10619
+ work_order_id: string;
10620
+ };
10621
+ Insert: {
10622
+ created_at?: string;
10623
+ id?: string;
10624
+ material_name: string;
10625
+ monteur_id?: string | null;
10626
+ price_at_time?: number;
10627
+ quantity_used?: number;
10628
+ updated_at?: string;
10629
+ van_inventory_id?: string | null;
10630
+ work_order_id: string;
10631
+ };
10632
+ Update: {
10633
+ created_at?: string;
10634
+ id?: string;
10635
+ material_name?: string;
10636
+ monteur_id?: string | null;
10637
+ price_at_time?: number;
10638
+ quantity_used?: number;
10639
+ updated_at?: string;
10640
+ van_inventory_id?: string | null;
10641
+ work_order_id?: string;
10642
+ };
10643
+ Relationships: [
10644
+ {
10645
+ foreignKeyName: "material_usage_monteur_id_fkey";
10646
+ columns: ["monteur_id"];
10647
+ isOneToOne: false;
10648
+ referencedRelation: "profiles";
10649
+ referencedColumns: ["id"];
10650
+ },
10651
+ {
10652
+ foreignKeyName: "material_usage_van_inventory_id_fkey";
10653
+ columns: ["van_inventory_id"];
10654
+ isOneToOne: false;
10655
+ referencedRelation: "van_inventories";
10656
+ referencedColumns: ["id"];
10657
+ },
10658
+ {
10659
+ foreignKeyName: "material_usage_work_order_id_fkey";
10660
+ columns: ["work_order_id"];
10661
+ isOneToOne: false;
10662
+ referencedRelation: "work_orders";
10663
+ referencedColumns: ["id"];
10664
+ }
10665
+ ];
10666
+ };
10667
+ module_features: {
10668
+ Row: {
10669
+ created_at: string;
10670
+ feature_id: string;
10671
+ id: string;
10672
+ is_active: boolean;
10673
+ last_seen_at: string;
10674
+ module_id: string;
10675
+ name: string;
10676
+ };
10677
+ Insert: {
10678
+ created_at?: string;
10679
+ feature_id: string;
10680
+ id?: string;
10681
+ is_active?: boolean;
10682
+ last_seen_at?: string;
10683
+ module_id: string;
10684
+ name: string;
10685
+ };
10686
+ Update: {
10687
+ created_at?: string;
10688
+ feature_id?: string;
10689
+ id?: string;
10690
+ is_active?: boolean;
10691
+ last_seen_at?: string;
10692
+ module_id?: string;
10693
+ name?: string;
10694
+ };
10695
+ Relationships: [];
10696
+ };
9593
10697
  module_permissions: {
9594
10698
  Row: {
9595
10699
  created_at: string;
@@ -9617,6 +10721,39 @@ export type Database = {
9617
10721
  };
9618
10722
  Relationships: [];
9619
10723
  };
10724
+ module_registry: {
10725
+ Row: {
10726
+ created_at: string;
10727
+ enforce: boolean;
10728
+ is_active: boolean;
10729
+ last_seen_at: string;
10730
+ module_id: string;
10731
+ name: string;
10732
+ shell_id: string | null;
10733
+ sort_order: number | null;
10734
+ };
10735
+ Insert: {
10736
+ created_at?: string;
10737
+ enforce?: boolean;
10738
+ is_active?: boolean;
10739
+ last_seen_at?: string;
10740
+ module_id: string;
10741
+ name: string;
10742
+ shell_id?: string | null;
10743
+ sort_order?: number | null;
10744
+ };
10745
+ Update: {
10746
+ created_at?: string;
10747
+ enforce?: boolean;
10748
+ is_active?: boolean;
10749
+ last_seen_at?: string;
10750
+ module_id?: string;
10751
+ name?: string;
10752
+ shell_id?: string | null;
10753
+ sort_order?: number | null;
10754
+ };
10755
+ Relationships: [];
10756
+ };
9620
10757
  module_runtime_config: {
9621
10758
  Row: {
9622
10759
  key: string;
@@ -9668,65 +10805,6 @@ export type Database = {
9668
10805
  };
9669
10806
  Relationships: [];
9670
10807
  };
9671
- monteurs: {
9672
- Row: {
9673
- avatar_url: string | null;
9674
- color: string | null;
9675
- created_at: string;
9676
- email: string | null;
9677
- id: string;
9678
- is_active: boolean;
9679
- leave_balance_hours: number;
9680
- name: string;
9681
- persnr: number | null;
9682
- phone: string | null;
9683
- role: string;
9684
- tenant_id: string;
9685
- updated_at: string;
9686
- user_id: string | null;
9687
- };
9688
- Insert: {
9689
- avatar_url?: string | null;
9690
- color?: string | null;
9691
- created_at?: string;
9692
- email?: string | null;
9693
- id?: string;
9694
- is_active?: boolean;
9695
- leave_balance_hours?: number;
9696
- name: string;
9697
- persnr?: number | null;
9698
- phone?: string | null;
9699
- role?: string;
9700
- tenant_id: string;
9701
- updated_at?: string;
9702
- user_id?: string | null;
9703
- };
9704
- Update: {
9705
- avatar_url?: string | null;
9706
- color?: string | null;
9707
- created_at?: string;
9708
- email?: string | null;
9709
- id?: string;
9710
- is_active?: boolean;
9711
- leave_balance_hours?: number;
9712
- name?: string;
9713
- persnr?: number | null;
9714
- phone?: string | null;
9715
- role?: string;
9716
- tenant_id?: string;
9717
- updated_at?: string;
9718
- user_id?: string | null;
9719
- };
9720
- Relationships: [
9721
- {
9722
- foreignKeyName: "monteurs_tenant_id_fkey";
9723
- columns: ["tenant_id"];
9724
- isOneToOne: false;
9725
- referencedRelation: "tenants";
9726
- referencedColumns: ["id"];
9727
- }
9728
- ];
9729
- };
9730
10808
  nmbrs_component_mapping: {
9731
10809
  Row: {
9732
10810
  created_at: string;
@@ -9799,15 +10877,7 @@ export type Database = {
9799
10877
  nmbrs_employee_number?: string;
9800
10878
  updated_at?: string;
9801
10879
  };
9802
- Relationships: [
9803
- {
9804
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
9805
- columns: ["monteur_id"];
9806
- isOneToOne: true;
9807
- referencedRelation: "monteurs";
9808
- referencedColumns: ["id"];
9809
- }
9810
- ];
10880
+ Relationships: [];
9811
10881
  };
9812
10882
  nmbrs_export_lines: {
9813
10883
  Row: {
@@ -9856,13 +10926,6 @@ export type Database = {
9856
10926
  wage_code?: string;
9857
10927
  };
9858
10928
  Relationships: [
9859
- {
9860
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
9861
- columns: ["monteur_id"];
9862
- isOneToOne: false;
9863
- referencedRelation: "monteurs";
9864
- referencedColumns: ["id"];
9865
- },
9866
10929
  {
9867
10930
  foreignKeyName: "nmbrs_export_lines_run_id_fkey";
9868
10931
  columns: ["run_id"];
@@ -10358,6 +11421,7 @@ export type Database = {
10358
11421
  };
10359
11422
  offer_settings: {
10360
11423
  Row: {
11424
+ brand_name: string | null;
10361
11425
  button_color: string;
10362
11426
  created_at: string;
10363
11427
  default_countries: string[];
@@ -10379,6 +11443,7 @@ export type Database = {
10379
11443
  updated_at: string;
10380
11444
  };
10381
11445
  Insert: {
11446
+ brand_name?: string | null;
10382
11447
  button_color?: string;
10383
11448
  created_at?: string;
10384
11449
  default_countries?: string[];
@@ -10400,6 +11465,7 @@ export type Database = {
10400
11465
  updated_at?: string;
10401
11466
  };
10402
11467
  Update: {
11468
+ brand_name?: string | null;
10403
11469
  button_color?: string;
10404
11470
  created_at?: string;
10405
11471
  default_countries?: string[];
@@ -10710,6 +11776,45 @@ export type Database = {
10710
11776
  };
10711
11777
  Relationships: [];
10712
11778
  };
11779
+ order_invoice_links: {
11780
+ Row: {
11781
+ attempts: number;
11782
+ created_at: string;
11783
+ error_message: string | null;
11784
+ id: string;
11785
+ invoice_number: string | null;
11786
+ next_attempt_at: string;
11787
+ order_id: string;
11788
+ processed_at: string | null;
11789
+ status: string;
11790
+ updated_at: string;
11791
+ };
11792
+ Insert: {
11793
+ attempts?: number;
11794
+ created_at?: string;
11795
+ error_message?: string | null;
11796
+ id?: string;
11797
+ invoice_number?: string | null;
11798
+ next_attempt_at?: string;
11799
+ order_id: string;
11800
+ processed_at?: string | null;
11801
+ status?: string;
11802
+ updated_at?: string;
11803
+ };
11804
+ Update: {
11805
+ attempts?: number;
11806
+ created_at?: string;
11807
+ error_message?: string | null;
11808
+ id?: string;
11809
+ invoice_number?: string | null;
11810
+ next_attempt_at?: string;
11811
+ order_id?: string;
11812
+ processed_at?: string | null;
11813
+ status?: string;
11814
+ updated_at?: string;
11815
+ };
11816
+ Relationships: [];
11817
+ };
10713
11818
  order_items: {
10714
11819
  Row: {
10715
11820
  crates_per_layer: number | null;
@@ -10901,6 +12006,7 @@ export type Database = {
10901
12006
  delivery_date: string | null;
10902
12007
  floriday_sales_order_id: string | null;
10903
12008
  id: string;
12009
+ invoice_due_at: string | null;
10904
12010
  is_reservation: boolean;
10905
12011
  notes: string | null;
10906
12012
  order_date: string;
@@ -10922,6 +12028,7 @@ export type Database = {
10922
12028
  delivery_date?: string | null;
10923
12029
  floriday_sales_order_id?: string | null;
10924
12030
  id?: string;
12031
+ invoice_due_at?: string | null;
10925
12032
  is_reservation?: boolean;
10926
12033
  notes?: string | null;
10927
12034
  order_date?: string;
@@ -10943,6 +12050,7 @@ export type Database = {
10943
12050
  delivery_date?: string | null;
10944
12051
  floriday_sales_order_id?: string | null;
10945
12052
  id?: string;
12053
+ invoice_due_at?: string | null;
10946
12054
  is_reservation?: boolean;
10947
12055
  notes?: string | null;
10948
12056
  order_date?: string;
@@ -12183,22 +13291,27 @@ export type Database = {
12183
13291
  created_at: string;
12184
13292
  documentnaam: string;
12185
13293
  documenttype: Database["public"]["Enums"]["doc_layout_type"];
13294
+ extern_job_id: string | null;
12186
13295
  foutmelding: string | null;
12187
13296
  gebruiker_id: string | null;
12188
13297
  gebruiker_naam: string;
12189
13298
  gestart_op: string | null;
12190
13299
  id: string;
13300
+ idempotentie_sleutel: string | null;
12191
13301
  is_herprint: boolean;
12192
13302
  kopieen: number;
12193
13303
  layout_id: string | null;
12194
13304
  opgepakt_op: string | null;
12195
13305
  paginas: number;
12196
13306
  payload: Json;
13307
+ pdf_base64: string | null;
13308
+ pdf_url: string | null;
12197
13309
  pogingen: number;
12198
13310
  printer_id: string | null;
12199
13311
  render_html: string | null;
12200
13312
  status: Database["public"]["Enums"]["print_job_status"];
12201
13313
  updated_at: string;
13314
+ volgende_poging: string | null;
12202
13315
  voltooid_op: string | null;
12203
13316
  };
12204
13317
  Insert: {
@@ -12207,22 +13320,27 @@ export type Database = {
12207
13320
  created_at?: string;
12208
13321
  documentnaam?: string;
12209
13322
  documenttype?: Database["public"]["Enums"]["doc_layout_type"];
13323
+ extern_job_id?: string | null;
12210
13324
  foutmelding?: string | null;
12211
13325
  gebruiker_id?: string | null;
12212
13326
  gebruiker_naam?: string;
12213
13327
  gestart_op?: string | null;
12214
13328
  id?: string;
13329
+ idempotentie_sleutel?: string | null;
12215
13330
  is_herprint?: boolean;
12216
13331
  kopieen?: number;
12217
13332
  layout_id?: string | null;
12218
13333
  opgepakt_op?: string | null;
12219
13334
  paginas?: number;
12220
13335
  payload?: Json;
13336
+ pdf_base64?: string | null;
13337
+ pdf_url?: string | null;
12221
13338
  pogingen?: number;
12222
13339
  printer_id?: string | null;
12223
13340
  render_html?: string | null;
12224
13341
  status?: Database["public"]["Enums"]["print_job_status"];
12225
13342
  updated_at?: string;
13343
+ volgende_poging?: string | null;
12226
13344
  voltooid_op?: string | null;
12227
13345
  };
12228
13346
  Update: {
@@ -12231,22 +13349,27 @@ export type Database = {
12231
13349
  created_at?: string;
12232
13350
  documentnaam?: string;
12233
13351
  documenttype?: Database["public"]["Enums"]["doc_layout_type"];
13352
+ extern_job_id?: string | null;
12234
13353
  foutmelding?: string | null;
12235
13354
  gebruiker_id?: string | null;
12236
13355
  gebruiker_naam?: string;
12237
13356
  gestart_op?: string | null;
12238
13357
  id?: string;
13358
+ idempotentie_sleutel?: string | null;
12239
13359
  is_herprint?: boolean;
12240
13360
  kopieen?: number;
12241
13361
  layout_id?: string | null;
12242
13362
  opgepakt_op?: string | null;
12243
13363
  paginas?: number;
12244
13364
  payload?: Json;
13365
+ pdf_base64?: string | null;
13366
+ pdf_url?: string | null;
12245
13367
  pogingen?: number;
12246
13368
  printer_id?: string | null;
12247
13369
  render_html?: string | null;
12248
13370
  status?: Database["public"]["Enums"]["print_job_status"];
12249
13371
  updated_at?: string;
13372
+ volgende_poging?: string | null;
12250
13373
  voltooid_op?: string | null;
12251
13374
  };
12252
13375
  Relationships: [
@@ -12273,6 +13396,72 @@ export type Database = {
12273
13396
  }
12274
13397
  ];
12275
13398
  };
13399
+ print_queue_runners: {
13400
+ Row: {
13401
+ actief: boolean;
13402
+ basis_url: string;
13403
+ created_at: string;
13404
+ id: string;
13405
+ laatst_gezien: string;
13406
+ laatste_fout: string | null;
13407
+ laatste_request_id: number | null;
13408
+ mislukte_posts: number;
13409
+ tick_sleutel: string;
13410
+ updated_at: string;
13411
+ };
13412
+ Insert: {
13413
+ actief?: boolean;
13414
+ basis_url: string;
13415
+ created_at?: string;
13416
+ id?: string;
13417
+ laatst_gezien?: string;
13418
+ laatste_fout?: string | null;
13419
+ laatste_request_id?: number | null;
13420
+ mislukte_posts?: number;
13421
+ tick_sleutel?: string;
13422
+ updated_at?: string;
13423
+ };
13424
+ Update: {
13425
+ actief?: boolean;
13426
+ basis_url?: string;
13427
+ created_at?: string;
13428
+ id?: string;
13429
+ laatst_gezien?: string;
13430
+ laatste_fout?: string | null;
13431
+ laatste_request_id?: number | null;
13432
+ mislukte_posts?: number;
13433
+ tick_sleutel?: string;
13434
+ updated_at?: string;
13435
+ };
13436
+ Relationships: [];
13437
+ };
13438
+ print_queue_settings: {
13439
+ Row: {
13440
+ bewaar_bestanden_dagen: number;
13441
+ bewaar_opdrachten_dagen: number;
13442
+ created_at: string;
13443
+ dubbel_venster_minuten: number;
13444
+ id: string;
13445
+ updated_at: string;
13446
+ };
13447
+ Insert: {
13448
+ bewaar_bestanden_dagen?: number;
13449
+ bewaar_opdrachten_dagen?: number;
13450
+ created_at?: string;
13451
+ dubbel_venster_minuten?: number;
13452
+ id?: string;
13453
+ updated_at?: string;
13454
+ };
13455
+ Update: {
13456
+ bewaar_bestanden_dagen?: number;
13457
+ bewaar_opdrachten_dagen?: number;
13458
+ created_at?: string;
13459
+ dubbel_venster_minuten?: number;
13460
+ id?: string;
13461
+ updated_at?: string;
13462
+ };
13463
+ Relationships: [];
13464
+ };
12276
13465
  print_rules: {
12277
13466
  Row: {
12278
13467
  actief: boolean;
@@ -12441,6 +13630,7 @@ export type Database = {
12441
13630
  agent_id: string | null;
12442
13631
  created_at: string;
12443
13632
  driver: string;
13633
+ extern_printer_id: string | null;
12444
13634
  id: string;
12445
13635
  ip_adres: string | null;
12446
13636
  laatst_gezien: string | null;
@@ -12462,6 +13652,7 @@ export type Database = {
12462
13652
  agent_id?: string | null;
12463
13653
  created_at?: string;
12464
13654
  driver?: string;
13655
+ extern_printer_id?: string | null;
12465
13656
  id?: string;
12466
13657
  ip_adres?: string | null;
12467
13658
  laatst_gezien?: string | null;
@@ -12483,6 +13674,7 @@ export type Database = {
12483
13674
  agent_id?: string | null;
12484
13675
  created_at?: string;
12485
13676
  driver?: string;
13677
+ extern_printer_id?: string | null;
12486
13678
  id?: string;
12487
13679
  ip_adres?: string | null;
12488
13680
  laatst_gezien?: string | null;
@@ -13802,6 +14994,100 @@ export type Database = {
13802
14994
  }
13803
14995
  ];
13804
14996
  };
14997
+ role_assignments: {
14998
+ Row: {
14999
+ created_at: string;
15000
+ id: string;
15001
+ role_id: string;
15002
+ user_id: string;
15003
+ };
15004
+ Insert: {
15005
+ created_at?: string;
15006
+ id?: string;
15007
+ role_id: string;
15008
+ user_id: string;
15009
+ };
15010
+ Update: {
15011
+ created_at?: string;
15012
+ id?: string;
15013
+ role_id?: string;
15014
+ user_id?: string;
15015
+ };
15016
+ Relationships: [
15017
+ {
15018
+ foreignKeyName: "role_assignments_role_id_fkey";
15019
+ columns: ["role_id"];
15020
+ isOneToOne: false;
15021
+ referencedRelation: "roles";
15022
+ referencedColumns: ["id"];
15023
+ }
15024
+ ];
15025
+ };
15026
+ role_permissions: {
15027
+ Row: {
15028
+ can_edit: boolean;
15029
+ can_view: boolean;
15030
+ feature_id: string;
15031
+ id: string;
15032
+ module_id: string;
15033
+ role_id: string;
15034
+ updated_at: string;
15035
+ };
15036
+ Insert: {
15037
+ can_edit?: boolean;
15038
+ can_view?: boolean;
15039
+ feature_id?: string;
15040
+ id?: string;
15041
+ module_id: string;
15042
+ role_id: string;
15043
+ updated_at?: string;
15044
+ };
15045
+ Update: {
15046
+ can_edit?: boolean;
15047
+ can_view?: boolean;
15048
+ feature_id?: string;
15049
+ id?: string;
15050
+ module_id?: string;
15051
+ role_id?: string;
15052
+ updated_at?: string;
15053
+ };
15054
+ Relationships: [
15055
+ {
15056
+ foreignKeyName: "role_permissions_role_id_fkey";
15057
+ columns: ["role_id"];
15058
+ isOneToOne: false;
15059
+ referencedRelation: "roles";
15060
+ referencedColumns: ["id"];
15061
+ }
15062
+ ];
15063
+ };
15064
+ roles: {
15065
+ Row: {
15066
+ created_at: string;
15067
+ id: string;
15068
+ is_protected: boolean;
15069
+ key: string;
15070
+ name: string;
15071
+ updated_at: string;
15072
+ };
15073
+ Insert: {
15074
+ created_at?: string;
15075
+ id?: string;
15076
+ is_protected?: boolean;
15077
+ key: string;
15078
+ name: string;
15079
+ updated_at?: string;
15080
+ };
15081
+ Update: {
15082
+ created_at?: string;
15083
+ id?: string;
15084
+ is_protected?: boolean;
15085
+ key?: string;
15086
+ name?: string;
15087
+ updated_at?: string;
15088
+ };
15089
+ Relationships: [];
15090
+ };
13805
15091
  rooms: {
13806
15092
  Row: {
13807
15093
  capacity: number;
@@ -14154,6 +15440,7 @@ export type Database = {
14154
15440
  type: string;
14155
15441
  updated_at: string;
14156
15442
  vereist_medewerker: boolean;
15443
+ werkplek: string | null;
14157
15444
  };
14158
15445
  Insert: {
14159
15446
  actief?: boolean;
@@ -14167,6 +15454,7 @@ export type Database = {
14167
15454
  type?: string;
14168
15455
  updated_at?: string;
14169
15456
  vereist_medewerker?: boolean;
15457
+ werkplek?: string | null;
14170
15458
  };
14171
15459
  Update: {
14172
15460
  actief?: boolean;
@@ -14180,6 +15468,7 @@ export type Database = {
14180
15468
  type?: string;
14181
15469
  updated_at?: string;
14182
15470
  vereist_medewerker?: boolean;
15471
+ werkplek?: string | null;
14183
15472
  };
14184
15473
  Relationships: [];
14185
15474
  };
@@ -14482,6 +15771,56 @@ export type Database = {
14482
15771
  };
14483
15772
  Relationships: [];
14484
15773
  };
15774
+ time_compensation_entries: {
15775
+ Row: {
15776
+ created_at: string;
15777
+ employee_id: string;
15778
+ entry_date: string;
15779
+ id: string;
15780
+ km: number;
15781
+ meal_allowance: number;
15782
+ notes: string | null;
15783
+ standby_evening: number;
15784
+ standby_weekend: number;
15785
+ tvt_change: number;
15786
+ updated_at: string;
15787
+ };
15788
+ Insert: {
15789
+ created_at?: string;
15790
+ employee_id: string;
15791
+ entry_date: string;
15792
+ id?: string;
15793
+ km?: number;
15794
+ meal_allowance?: number;
15795
+ notes?: string | null;
15796
+ standby_evening?: number;
15797
+ standby_weekend?: number;
15798
+ tvt_change?: number;
15799
+ updated_at?: string;
15800
+ };
15801
+ Update: {
15802
+ created_at?: string;
15803
+ employee_id?: string;
15804
+ entry_date?: string;
15805
+ id?: string;
15806
+ km?: number;
15807
+ meal_allowance?: number;
15808
+ notes?: string | null;
15809
+ standby_evening?: number;
15810
+ standby_weekend?: number;
15811
+ tvt_change?: number;
15812
+ updated_at?: string;
15813
+ };
15814
+ Relationships: [
15815
+ {
15816
+ foreignKeyName: "time_compensation_entries_employee_id_fkey";
15817
+ columns: ["employee_id"];
15818
+ isOneToOne: false;
15819
+ referencedRelation: "profiles";
15820
+ referencedColumns: ["id"];
15821
+ }
15822
+ ];
15823
+ };
14485
15824
  time_entries: {
14486
15825
  Row: {
14487
15826
  created_at: string;
@@ -14516,68 +15855,174 @@ export type Database = {
14516
15855
  undertime?: number;
14517
15856
  updated_at?: string;
14518
15857
  };
15858
+ Relationships: [];
15859
+ };
15860
+ time_log_week_approvals: {
15861
+ Row: {
15862
+ approved_at: string | null;
15863
+ approved_by: string | null;
15864
+ created_at: string;
15865
+ employee_id: string;
15866
+ id: string;
15867
+ locked: boolean;
15868
+ notes: string | null;
15869
+ status: string;
15870
+ submitted_at: string | null;
15871
+ updated_at: string;
15872
+ week_start: string;
15873
+ };
15874
+ Insert: {
15875
+ approved_at?: string | null;
15876
+ approved_by?: string | null;
15877
+ created_at?: string;
15878
+ employee_id: string;
15879
+ id?: string;
15880
+ locked?: boolean;
15881
+ notes?: string | null;
15882
+ status?: string;
15883
+ submitted_at?: string | null;
15884
+ updated_at?: string;
15885
+ week_start: string;
15886
+ };
15887
+ Update: {
15888
+ approved_at?: string | null;
15889
+ approved_by?: string | null;
15890
+ created_at?: string;
15891
+ employee_id?: string;
15892
+ id?: string;
15893
+ locked?: boolean;
15894
+ notes?: string | null;
15895
+ status?: string;
15896
+ submitted_at?: string | null;
15897
+ updated_at?: string;
15898
+ week_start?: string;
15899
+ };
14519
15900
  Relationships: [
14520
15901
  {
14521
- foreignKeyName: "time_entries_employee_id_fkey";
15902
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
14522
15903
  columns: ["employee_id"];
14523
15904
  isOneToOne: false;
14524
- referencedRelation: "monteurs";
15905
+ referencedRelation: "profiles";
14525
15906
  referencedColumns: ["id"];
14526
15907
  }
14527
15908
  ];
14528
15909
  };
14529
15910
  time_logs: {
14530
15911
  Row: {
15912
+ auto_stop_reason: string | null;
15913
+ auto_stopped: boolean;
14531
15914
  created_at: string;
15915
+ current_latitude: number | null;
15916
+ current_longitude: number | null;
15917
+ current_position_updated_at: string | null;
14532
15918
  employee_id: string;
15919
+ end_latitude: number | null;
15920
+ end_longitude: number | null;
14533
15921
  end_time: string | null;
15922
+ eta_distance_km: number | null;
15923
+ eta_minutes: number | null;
15924
+ eta_updated_at: string | null;
15925
+ hour_category: string | null;
14534
15926
  id: string;
15927
+ last_reminder_at: string | null;
14535
15928
  notes: string | null;
14536
15929
  overtime_hours: number;
14537
15930
  overtime_type: string | null;
14538
15931
  regular_hours: number;
15932
+ reminder_count: number;
15933
+ requires_review: boolean;
15934
+ start_latitude: number | null;
15935
+ start_longitude: number | null;
14539
15936
  start_time: string;
14540
15937
  travel_cost: number | null;
14541
15938
  travel_distance_km: number | null;
15939
+ travel_duration_min: number | null;
15940
+ travel_time_minutes: number | null;
14542
15941
  type: string;
14543
15942
  updated_at: string;
15943
+ work_order_id: string | null;
14544
15944
  };
14545
15945
  Insert: {
15946
+ auto_stop_reason?: string | null;
15947
+ auto_stopped?: boolean;
14546
15948
  created_at?: string;
15949
+ current_latitude?: number | null;
15950
+ current_longitude?: number | null;
15951
+ current_position_updated_at?: string | null;
14547
15952
  employee_id: string;
15953
+ end_latitude?: number | null;
15954
+ end_longitude?: number | null;
14548
15955
  end_time?: string | null;
15956
+ eta_distance_km?: number | null;
15957
+ eta_minutes?: number | null;
15958
+ eta_updated_at?: string | null;
15959
+ hour_category?: string | null;
14549
15960
  id?: string;
15961
+ last_reminder_at?: string | null;
14550
15962
  notes?: string | null;
14551
15963
  overtime_hours?: number;
14552
15964
  overtime_type?: string | null;
14553
15965
  regular_hours?: number;
15966
+ reminder_count?: number;
15967
+ requires_review?: boolean;
15968
+ start_latitude?: number | null;
15969
+ start_longitude?: number | null;
14554
15970
  start_time?: string;
14555
15971
  travel_cost?: number | null;
14556
15972
  travel_distance_km?: number | null;
15973
+ travel_duration_min?: number | null;
15974
+ travel_time_minutes?: number | null;
14557
15975
  type: string;
14558
15976
  updated_at?: string;
15977
+ work_order_id?: string | null;
14559
15978
  };
14560
15979
  Update: {
15980
+ auto_stop_reason?: string | null;
15981
+ auto_stopped?: boolean;
14561
15982
  created_at?: string;
15983
+ current_latitude?: number | null;
15984
+ current_longitude?: number | null;
15985
+ current_position_updated_at?: string | null;
14562
15986
  employee_id?: string;
15987
+ end_latitude?: number | null;
15988
+ end_longitude?: number | null;
14563
15989
  end_time?: string | null;
15990
+ eta_distance_km?: number | null;
15991
+ eta_minutes?: number | null;
15992
+ eta_updated_at?: string | null;
15993
+ hour_category?: string | null;
14564
15994
  id?: string;
15995
+ last_reminder_at?: string | null;
14565
15996
  notes?: string | null;
14566
15997
  overtime_hours?: number;
14567
15998
  overtime_type?: string | null;
14568
15999
  regular_hours?: number;
16000
+ reminder_count?: number;
16001
+ requires_review?: boolean;
16002
+ start_latitude?: number | null;
16003
+ start_longitude?: number | null;
14569
16004
  start_time?: string;
14570
16005
  travel_cost?: number | null;
14571
16006
  travel_distance_km?: number | null;
16007
+ travel_duration_min?: number | null;
16008
+ travel_time_minutes?: number | null;
14572
16009
  type?: string;
14573
16010
  updated_at?: string;
16011
+ work_order_id?: string | null;
14574
16012
  };
14575
16013
  Relationships: [
14576
16014
  {
14577
16015
  foreignKeyName: "time_logs_employee_id_fkey";
14578
16016
  columns: ["employee_id"];
14579
16017
  isOneToOne: false;
14580
- referencedRelation: "monteurs";
16018
+ referencedRelation: "profiles";
16019
+ referencedColumns: ["id"];
16020
+ },
16021
+ {
16022
+ foreignKeyName: "time_logs_work_order_id_fkey";
16023
+ columns: ["work_order_id"];
16024
+ isOneToOne: false;
16025
+ referencedRelation: "work_orders";
14581
16026
  referencedColumns: ["id"];
14582
16027
  }
14583
16028
  ];
@@ -14618,7 +16063,7 @@ export type Database = {
14618
16063
  foreignKeyName: "time_off_entries_employee_id_fkey";
14619
16064
  columns: ["employee_id"];
14620
16065
  isOneToOne: false;
14621
- referencedRelation: "monteurs";
16066
+ referencedRelation: "profiles";
14622
16067
  referencedColumns: ["id"];
14623
16068
  }
14624
16069
  ];
@@ -14931,6 +16376,39 @@ export type Database = {
14931
16376
  };
14932
16377
  Relationships: [];
14933
16378
  };
16379
+ twinfield_cron_locks: {
16380
+ Row: {
16381
+ created_at: string;
16382
+ heartbeat_at: string;
16383
+ job_name: string;
16384
+ last_error: string | null;
16385
+ last_finished_at: string | null;
16386
+ locked_at: string;
16387
+ run_id: string;
16388
+ updated_at: string;
16389
+ };
16390
+ Insert: {
16391
+ created_at?: string;
16392
+ heartbeat_at?: string;
16393
+ job_name: string;
16394
+ last_error?: string | null;
16395
+ last_finished_at?: string | null;
16396
+ locked_at?: string;
16397
+ run_id?: string;
16398
+ updated_at?: string;
16399
+ };
16400
+ Update: {
16401
+ created_at?: string;
16402
+ heartbeat_at?: string;
16403
+ job_name?: string;
16404
+ last_error?: string | null;
16405
+ last_finished_at?: string | null;
16406
+ locked_at?: string;
16407
+ run_id?: string;
16408
+ updated_at?: string;
16409
+ };
16410
+ Relationships: [];
16411
+ };
14934
16412
  twinfield_customers: {
14935
16413
  Row: {
14936
16414
  address: string | null;
@@ -15193,6 +16671,8 @@ export type Database = {
15193
16671
  };
15194
16672
  twinfield_invoice_settings: {
15195
16673
  Row: {
16674
+ auto_invoice_enabled: boolean;
16675
+ auto_invoice_trigger_statuses: string[];
15196
16676
  created_at: string;
15197
16677
  debtor_gl_account: string;
15198
16678
  default_credit_invoice_type: string | null;
@@ -15213,6 +16693,8 @@ export type Database = {
15213
16693
  vat_code_export: string | null;
15214
16694
  };
15215
16695
  Insert: {
16696
+ auto_invoice_enabled?: boolean;
16697
+ auto_invoice_trigger_statuses?: string[];
15216
16698
  created_at?: string;
15217
16699
  debtor_gl_account?: string;
15218
16700
  default_credit_invoice_type?: string | null;
@@ -15233,6 +16715,8 @@ export type Database = {
15233
16715
  vat_code_export?: string | null;
15234
16716
  };
15235
16717
  Update: {
16718
+ auto_invoice_enabled?: boolean;
16719
+ auto_invoice_trigger_statuses?: string[];
15236
16720
  created_at?: string;
15237
16721
  debtor_gl_account?: string;
15238
16722
  default_credit_invoice_type?: string | null;
@@ -15535,6 +17019,7 @@ export type Database = {
15535
17019
  twinfield_push_queue: {
15536
17020
  Row: {
15537
17021
  action: string;
17022
+ attempt_started_at: string | null;
15538
17023
  attempts: number;
15539
17024
  connection_id: string | null;
15540
17025
  created_at: string;
@@ -15551,6 +17036,7 @@ export type Database = {
15551
17036
  };
15552
17037
  Insert: {
15553
17038
  action?: string;
17039
+ attempt_started_at?: string | null;
15554
17040
  attempts?: number;
15555
17041
  connection_id?: string | null;
15556
17042
  created_at?: string;
@@ -15567,6 +17053,7 @@ export type Database = {
15567
17053
  };
15568
17054
  Update: {
15569
17055
  action?: string;
17056
+ attempt_started_at?: string | null;
15570
17057
  attempts?: number;
15571
17058
  connection_id?: string | null;
15572
17059
  created_at?: string;
@@ -15769,15 +17256,7 @@ export type Database = {
15769
17256
  workday_end?: string | null;
15770
17257
  workday_start?: string | null;
15771
17258
  };
15772
- Relationships: [
15773
- {
15774
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
15775
- columns: ["monteur_id"];
15776
- isOneToOne: true;
15777
- referencedRelation: "monteurs";
15778
- referencedColumns: ["id"];
15779
- }
15780
- ];
17259
+ Relationships: [];
15781
17260
  };
15782
17261
  uren_entries: {
15783
17262
  Row: {
@@ -15823,13 +17302,6 @@ export type Database = {
15823
17302
  werkbon_id?: string | null;
15824
17303
  };
15825
17304
  Relationships: [
15826
- {
15827
- foreignKeyName: "uren_entries_monteur_id_fkey";
15828
- columns: ["monteur_id"];
15829
- isOneToOne: false;
15830
- referencedRelation: "monteurs";
15831
- referencedColumns: ["id"];
15832
- },
15833
17305
  {
15834
17306
  foreignKeyName: "uren_entries_werkbon_id_fkey";
15835
17307
  columns: ["werkbon_id"];
@@ -16311,15 +17783,37 @@ export type Database = {
16311
17783
  submitted_at?: string | null;
16312
17784
  updated_at?: string;
16313
17785
  };
16314
- Relationships: [
16315
- {
16316
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
16317
- columns: ["monteur_id"];
16318
- isOneToOne: false;
16319
- referencedRelation: "monteurs";
16320
- referencedColumns: ["id"];
16321
- }
16322
- ];
17786
+ Relationships: [];
17787
+ };
17788
+ user_module_permissions: {
17789
+ Row: {
17790
+ created_at: string;
17791
+ feature_id: string;
17792
+ id: string;
17793
+ module_id: string;
17794
+ permission: string;
17795
+ updated_at: string;
17796
+ user_id: string;
17797
+ };
17798
+ Insert: {
17799
+ created_at?: string;
17800
+ feature_id?: string;
17801
+ id?: string;
17802
+ module_id: string;
17803
+ permission: string;
17804
+ updated_at?: string;
17805
+ user_id: string;
17806
+ };
17807
+ Update: {
17808
+ created_at?: string;
17809
+ feature_id?: string;
17810
+ id?: string;
17811
+ module_id?: string;
17812
+ permission?: string;
17813
+ updated_at?: string;
17814
+ user_id?: string;
17815
+ };
17816
+ Relationships: [];
16323
17817
  };
16324
17818
  user_roles: {
16325
17819
  Row: {
@@ -16350,6 +17844,53 @@ export type Database = {
16350
17844
  }
16351
17845
  ];
16352
17846
  };
17847
+ van_inventories: {
17848
+ Row: {
17849
+ barcode: string | null;
17850
+ created_at: string;
17851
+ id: string;
17852
+ monteur_id: string | null;
17853
+ price_per_unit: number;
17854
+ product_name: string;
17855
+ quantity_current: number;
17856
+ quantity_min: number;
17857
+ unit: string;
17858
+ updated_at: string;
17859
+ };
17860
+ Insert: {
17861
+ barcode?: string | null;
17862
+ created_at?: string;
17863
+ id?: string;
17864
+ monteur_id?: string | null;
17865
+ price_per_unit?: number;
17866
+ product_name: string;
17867
+ quantity_current?: number;
17868
+ quantity_min?: number;
17869
+ unit?: string;
17870
+ updated_at?: string;
17871
+ };
17872
+ Update: {
17873
+ barcode?: string | null;
17874
+ created_at?: string;
17875
+ id?: string;
17876
+ monteur_id?: string | null;
17877
+ price_per_unit?: number;
17878
+ product_name?: string;
17879
+ quantity_current?: number;
17880
+ quantity_min?: number;
17881
+ unit?: string;
17882
+ updated_at?: string;
17883
+ };
17884
+ Relationships: [
17885
+ {
17886
+ foreignKeyName: "van_inventories_monteur_id_fkey";
17887
+ columns: ["monteur_id"];
17888
+ isOneToOne: false;
17889
+ referencedRelation: "profiles";
17890
+ referencedColumns: ["id"];
17891
+ }
17892
+ ];
17893
+ };
16353
17894
  voorraad_custom_fields: {
16354
17895
  Row: {
16355
17896
  created_at: string;
@@ -17323,7 +18864,7 @@ export type Database = {
17323
18864
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
17324
18865
  columns: ["monteur_id"];
17325
18866
  isOneToOne: false;
17326
- referencedRelation: "monteurs";
18867
+ referencedRelation: "profiles";
17327
18868
  referencedColumns: ["id"];
17328
18869
  },
17329
18870
  {
@@ -17335,6 +18876,63 @@ export type Database = {
17335
18876
  }
17336
18877
  ];
17337
18878
  };
18879
+ work_order_photos: {
18880
+ Row: {
18881
+ ai_caption: string | null;
18882
+ ai_categorized_at: string | null;
18883
+ ai_labels: Json | null;
18884
+ caption: string | null;
18885
+ created_at: string;
18886
+ id: string;
18887
+ monteur_id: string | null;
18888
+ photo_type: string;
18889
+ storage_path: string;
18890
+ updated_at: string;
18891
+ work_order_id: string;
18892
+ };
18893
+ Insert: {
18894
+ ai_caption?: string | null;
18895
+ ai_categorized_at?: string | null;
18896
+ ai_labels?: Json | null;
18897
+ caption?: string | null;
18898
+ created_at?: string;
18899
+ id?: string;
18900
+ monteur_id?: string | null;
18901
+ photo_type?: string;
18902
+ storage_path: string;
18903
+ updated_at?: string;
18904
+ work_order_id: string;
18905
+ };
18906
+ Update: {
18907
+ ai_caption?: string | null;
18908
+ ai_categorized_at?: string | null;
18909
+ ai_labels?: Json | null;
18910
+ caption?: string | null;
18911
+ created_at?: string;
18912
+ id?: string;
18913
+ monteur_id?: string | null;
18914
+ photo_type?: string;
18915
+ storage_path?: string;
18916
+ updated_at?: string;
18917
+ work_order_id?: string;
18918
+ };
18919
+ Relationships: [
18920
+ {
18921
+ foreignKeyName: "work_order_photos_monteur_id_fkey";
18922
+ columns: ["monteur_id"];
18923
+ isOneToOne: false;
18924
+ referencedRelation: "profiles";
18925
+ referencedColumns: ["id"];
18926
+ },
18927
+ {
18928
+ foreignKeyName: "work_order_photos_work_order_id_fkey";
18929
+ columns: ["work_order_id"];
18930
+ isOneToOne: false;
18931
+ referencedRelation: "work_orders";
18932
+ referencedColumns: ["id"];
18933
+ }
18934
+ ];
18935
+ };
17338
18936
  work_orders: {
17339
18937
  Row: {
17340
18938
  assigned_to: string | null;
@@ -17366,7 +18964,6 @@ export type Database = {
17366
18964
  scheduled_end_time: string | null;
17367
18965
  scheduled_start_time: string | null;
17368
18966
  status: string;
17369
- tenant_id: string;
17370
18967
  total_hours_worked: number | null;
17371
18968
  total_price: number | null;
17372
18969
  travel_time_minutes: number | null;
@@ -17404,7 +19001,6 @@ export type Database = {
17404
19001
  scheduled_end_time?: string | null;
17405
19002
  scheduled_start_time?: string | null;
17406
19003
  status?: string;
17407
- tenant_id: string;
17408
19004
  total_hours_worked?: number | null;
17409
19005
  total_price?: number | null;
17410
19006
  travel_time_minutes?: number | null;
@@ -17442,7 +19038,6 @@ export type Database = {
17442
19038
  scheduled_end_time?: string | null;
17443
19039
  scheduled_start_time?: string | null;
17444
19040
  status?: string;
17445
- tenant_id?: string;
17446
19041
  total_hours_worked?: number | null;
17447
19042
  total_price?: number | null;
17448
19043
  travel_time_minutes?: number | null;
@@ -17457,13 +19052,6 @@ export type Database = {
17457
19052
  isOneToOne: false;
17458
19053
  referencedRelation: "work_orders";
17459
19054
  referencedColumns: ["id"];
17460
- },
17461
- {
17462
- foreignKeyName: "work_orders_tenant_id_fkey";
17463
- columns: ["tenant_id"];
17464
- isOneToOne: false;
17465
- referencedRelation: "tenants";
17466
- referencedColumns: ["id"];
17467
19055
  }
17468
19056
  ];
17469
19057
  };
@@ -18161,6 +19749,19 @@ export type Database = {
18161
19749
  };
18162
19750
  Returns: undefined;
18163
19751
  };
19752
+ approve_mailbox_order_proposal: {
19753
+ Args: {
19754
+ p_custom_fields: Json;
19755
+ p_customer_id: string;
19756
+ p_delivery_date: string;
19757
+ p_field_values?: Json;
19758
+ p_lines: Json;
19759
+ p_notes: string;
19760
+ p_proposal_id: string;
19761
+ p_reviewed_by: string;
19762
+ };
19763
+ Returns: Json;
19764
+ };
18164
19765
  assign_cart_numbers: {
18165
19766
  Args: {
18166
19767
  p_carts: Json;
@@ -18196,6 +19797,10 @@ export type Database = {
18196
19797
  processed_items: number;
18197
19798
  }[];
18198
19799
  };
19800
+ backfill_order_auto_invoice_queue: {
19801
+ Args: never;
19802
+ Returns: number;
19803
+ };
18199
19804
  calculate_layer_stock: {
18200
19805
  Args: {
18201
19806
  p_product_id: string;
@@ -18208,6 +19813,10 @@ export type Database = {
18208
19813
  };
18209
19814
  Returns: number;
18210
19815
  };
19816
+ can_manage_hours: {
19817
+ Args: never;
19818
+ Returns: boolean;
19819
+ };
18211
19820
  check_offer_product_available_stock: {
18212
19821
  Args: {
18213
19822
  p_campaign_product_id: string;
@@ -18230,6 +19839,125 @@ export type Database = {
18230
19839
  };
18231
19840
  Returns: Json;
18232
19841
  };
19842
+ claim_cloud_print_jobs: {
19843
+ Args: {
19844
+ _max?: number;
19845
+ };
19846
+ Returns: {
19847
+ agent_id: string | null;
19848
+ bron_job_id: string | null;
19849
+ created_at: string;
19850
+ documentnaam: string;
19851
+ documenttype: Database["public"]["Enums"]["doc_layout_type"];
19852
+ extern_job_id: string | null;
19853
+ foutmelding: string | null;
19854
+ gebruiker_id: string | null;
19855
+ gebruiker_naam: string;
19856
+ gestart_op: string | null;
19857
+ id: string;
19858
+ idempotentie_sleutel: string | null;
19859
+ is_herprint: boolean;
19860
+ kopieen: number;
19861
+ layout_id: string | null;
19862
+ opgepakt_op: string | null;
19863
+ paginas: number;
19864
+ payload: Json;
19865
+ pdf_base64: string | null;
19866
+ pdf_url: string | null;
19867
+ pogingen: number;
19868
+ printer_id: string | null;
19869
+ render_html: string | null;
19870
+ status: Database["public"]["Enums"]["print_job_status"];
19871
+ updated_at: string;
19872
+ volgende_poging: string | null;
19873
+ voltooid_op: string | null;
19874
+ }[];
19875
+ SetofOptions: {
19876
+ from: "*";
19877
+ to: "print_jobs";
19878
+ isOneToOne: false;
19879
+ isSetofReturn: true;
19880
+ };
19881
+ };
19882
+ claim_floriday_stock_queue: {
19883
+ Args: {
19884
+ p_limit?: number;
19885
+ p_worker?: string;
19886
+ };
19887
+ Returns: {
19888
+ attempts: number;
19889
+ connection_id: string;
19890
+ created_at: string;
19891
+ desired_available: boolean | null;
19892
+ gateway_attempt_id: string | null;
19893
+ id: string;
19894
+ last_error: string | null;
19895
+ locked_at: string | null;
19896
+ locked_by: string | null;
19897
+ next_attempt_at: string;
19898
+ number_of_pieces: number;
19899
+ sent_at: string | null;
19900
+ status: string;
19901
+ superseded_by: string | null;
19902
+ trade_item_id: string;
19903
+ updated_at: string;
19904
+ user_id: string;
19905
+ }[];
19906
+ SetofOptions: {
19907
+ from: "*";
19908
+ to: "floriday_continuous_stock_queue";
19909
+ isOneToOne: false;
19910
+ isSetofReturn: true;
19911
+ };
19912
+ };
19913
+ claim_logistics_tasks: {
19914
+ Args: {
19915
+ _limit?: number;
19916
+ _owner_module: string;
19917
+ _stale_minutes?: number;
19918
+ _task_type: string;
19919
+ _worker: string;
19920
+ };
19921
+ Returns: {
19922
+ attempt_log: Json;
19923
+ attempts: number;
19924
+ buffer_ref: string | null;
19925
+ claimed_at: string | null;
19926
+ claimed_by: string | null;
19927
+ completed_at: string | null;
19928
+ created_at: string;
19929
+ depends_on: string[];
19930
+ due_at: string | null;
19931
+ error: string | null;
19932
+ id: string;
19933
+ last_error: string | null;
19934
+ next_attempt_at: string | null;
19935
+ order_ref: string;
19936
+ owner_module: string;
19937
+ payload: Json;
19938
+ plan_run_id: string | null;
19939
+ planned_end: string | null;
19940
+ planned_start: string | null;
19941
+ priority: number;
19942
+ result: Json | null;
19943
+ rule_config_id: string | null;
19944
+ rule_version: number | null;
19945
+ sequence: number;
19946
+ shadow: boolean;
19947
+ started_at: string | null;
19948
+ status: string;
19949
+ strategy_id: string | null;
19950
+ task_type: string;
19951
+ updated_at: string;
19952
+ user_id: string;
19953
+ }[];
19954
+ SetofOptions: {
19955
+ from: "*";
19956
+ to: "logistics_tasks";
19957
+ isOneToOne: false;
19958
+ isSetofReturn: true;
19959
+ };
19960
+ };
18233
19961
  claim_print_jobs: {
18234
19962
  Args: {
18235
19963
  _agent_id: string;
@@ -18241,22 +19969,27 @@ export type Database = {
18241
19969
  created_at: string;
18242
19970
  documentnaam: string;
18243
19971
  documenttype: Database["public"]["Enums"]["doc_layout_type"];
19972
+ extern_job_id: string | null;
18244
19973
  foutmelding: string | null;
18245
19974
  gebruiker_id: string | null;
18246
19975
  gebruiker_naam: string;
18247
19976
  gestart_op: string | null;
18248
19977
  id: string;
19978
+ idempotentie_sleutel: string | null;
18249
19979
  is_herprint: boolean;
18250
19980
  kopieen: number;
18251
19981
  layout_id: string | null;
18252
19982
  opgepakt_op: string | null;
18253
19983
  paginas: number;
18254
19984
  payload: Json;
19985
+ pdf_base64: string | null;
19986
+ pdf_url: string | null;
18255
19987
  pogingen: number;
18256
19988
  printer_id: string | null;
18257
19989
  render_html: string | null;
18258
19990
  status: Database["public"]["Enums"]["print_job_status"];
18259
19991
  updated_at: string;
19992
+ volgende_poging: string | null;
18260
19993
  voltooid_op: string | null;
18261
19994
  }[];
18262
19995
  SetofOptions: {
@@ -18273,6 +20006,7 @@ export type Database = {
18273
20006
  };
18274
20007
  Returns: {
18275
20008
  action: string;
20009
+ attempt_started_at: string | null;
18276
20010
  attempts: number;
18277
20011
  connection_id: string | null;
18278
20012
  created_at: string;
@@ -18294,10 +20028,28 @@ export type Database = {
18294
20028
  isSetofReturn: true;
18295
20029
  };
18296
20030
  };
20031
+ cleanup_floriday_stock_queue: {
20032
+ Args: never;
20033
+ Returns: undefined;
20034
+ };
18297
20035
  cleanup_old_bookings: {
18298
20036
  Args: never;
18299
20037
  Returns: undefined;
18300
20038
  };
20039
+ cleanup_voorraad_module_history: {
20040
+ Args: never;
20041
+ Returns: undefined;
20042
+ };
20043
+ complete_floriday_stock_queue: {
20044
+ Args: {
20045
+ p_attempt_id?: string;
20046
+ p_error?: string;
20047
+ p_id: string;
20048
+ p_ok: boolean;
20049
+ p_permanent?: boolean;
20050
+ };
20051
+ Returns: undefined;
20052
+ };
18301
20053
  consume_bom_for_production: {
18302
20054
  Args: {
18303
20055
  p_connection_id: string;
@@ -18342,6 +20094,30 @@ export type Database = {
18342
20094
  agent_naam: string;
18343
20095
  }[];
18344
20096
  };
20097
+ consume_van_inventory: {
20098
+ Args: {
20099
+ p_inventory_id: string;
20100
+ p_quantity: number;
20101
+ };
20102
+ Returns: {
20103
+ barcode: string | null;
20104
+ created_at: string;
20105
+ id: string;
20106
+ monteur_id: string | null;
20107
+ price_per_unit: number;
20108
+ product_name: string;
20109
+ quantity_current: number;
20110
+ quantity_min: number;
20111
+ unit: string;
20112
+ updated_at: string;
20113
+ };
20114
+ SetofOptions: {
20115
+ from: "*";
20116
+ to: "van_inventories";
20117
+ isOneToOne: true;
20118
+ isSetofReturn: false;
20119
+ };
20120
+ };
18345
20121
  control_get_todays_carts: {
18346
20122
  Args: never;
18347
20123
  Returns: {
@@ -18409,6 +20185,20 @@ export type Database = {
18409
20185
  };
18410
20186
  Returns: Json;
18411
20187
  };
20188
+ effective_module_permission: {
20189
+ Args: {
20190
+ _module_id: string;
20191
+ _user_id: string;
20192
+ };
20193
+ Returns: string;
20194
+ } | {
20195
+ Args: {
20196
+ _feature_id: string;
20197
+ _module_id: string;
20198
+ _user_id: string;
20199
+ };
20200
+ Returns: string;
20201
+ };
18412
20202
  email_auth_decrypt: {
18413
20203
  Args: {
18414
20204
  cipher: string;
@@ -18470,6 +20260,21 @@ export type Database = {
18470
20260
  Args: never;
18471
20261
  Returns: string;
18472
20262
  };
20263
+ exact_auth_consume_calls: {
20264
+ Args: {
20265
+ _account_key: string;
20266
+ _calls?: number;
20267
+ _day_limit?: number;
20268
+ _division_code: number;
20269
+ _environment: string;
20270
+ _minute_limit?: number;
20271
+ };
20272
+ Returns: Json;
20273
+ };
20274
+ exact_auth_prune_sync_log: {
20275
+ Args: never;
20276
+ Returns: undefined;
20277
+ };
18473
20278
  exact_decrypt: {
18474
20279
  Args: {
18475
20280
  cipher: string;
@@ -18679,6 +20484,10 @@ export type Database = {
18679
20484
  };
18680
20485
  Returns: number;
18681
20486
  };
20487
+ get_offer_branding: {
20488
+ Args: never;
20489
+ Returns: Json;
20490
+ };
18682
20491
  get_offer_by_link_code: {
18683
20492
  Args: {
18684
20493
  p_code: string;
@@ -18740,12 +20549,6 @@ export type Database = {
18740
20549
  Args: never;
18741
20550
  Returns: string;
18742
20551
  };
18743
- get_work_order_tenant_id: {
18744
- Args: {
18745
- wo_id: string;
18746
- };
18747
- Returns: string;
18748
- };
18749
20552
  has_module_permission: {
18750
20553
  Args: {
18751
20554
  _min: string;
@@ -18779,6 +20582,13 @@ export type Database = {
18779
20582
  };
18780
20583
  Returns: boolean;
18781
20584
  };
20585
+ is_time_log_week_locked: {
20586
+ Args: {
20587
+ p_employee_id: string;
20588
+ p_start_time: string;
20589
+ };
20590
+ Returns: boolean;
20591
+ };
18782
20592
  is_user_admin: {
18783
20593
  Args: never;
18784
20594
  Returns: boolean;
@@ -18787,19 +20597,33 @@ export type Database = {
18787
20597
  Args: never;
18788
20598
  Returns: boolean;
18789
20599
  };
20600
+ itk_offerte_naar_werkbon: {
20601
+ Args: {
20602
+ _offerte_id: string;
20603
+ };
20604
+ Returns: string;
20605
+ };
20606
+ itk_offerte_restant_mandaat: {
20607
+ Args: {
20608
+ _exclude_offerte_id?: string;
20609
+ _werkbon_id: string;
20610
+ };
20611
+ Returns: number;
20612
+ };
18790
20613
  jwt_has_role: {
18791
20614
  Args: {
18792
20615
  _role: Database["public"]["Enums"]["app_role"];
18793
20616
  };
18794
20617
  Returns: boolean;
18795
20618
  };
18796
- list_monteurs: {
20619
+ list_medewerkers: {
18797
20620
  Args: never;
18798
20621
  Returns: {
18799
20622
  avatar_url: string;
18800
20623
  display_name: string;
18801
20624
  email: string;
18802
20625
  id: string;
20626
+ roles: string[];
18803
20627
  }[];
18804
20628
  };
18805
20629
  list_my_planning_items: {
@@ -18970,6 +20794,8 @@ export type Database = {
18970
20794
  p_worker?: string;
18971
20795
  };
18972
20796
  Returns: {
20797
+ attempt_log: Json;
20798
+ attempts: number;
18973
20799
  buffer_ref: string | null;
18974
20800
  claimed_at: string | null;
18975
20801
  claimed_by: string | null;
@@ -18979,6 +20805,8 @@ export type Database = {
18979
20805
  due_at: string | null;
18980
20806
  error: string | null;
18981
20807
  id: string;
20808
+ last_error: string | null;
20809
+ next_attempt_at: string | null;
18982
20810
  order_ref: string;
18983
20811
  owner_module: string;
18984
20812
  payload: Json;
@@ -19011,6 +20839,8 @@ export type Database = {
19011
20839
  p_worker?: string;
19012
20840
  };
19013
20841
  Returns: {
20842
+ attempt_log: Json;
20843
+ attempts: number;
19014
20844
  buffer_ref: string | null;
19015
20845
  claimed_at: string | null;
19016
20846
  claimed_by: string | null;
@@ -19020,6 +20850,8 @@ export type Database = {
19020
20850
  due_at: string | null;
19021
20851
  error: string | null;
19022
20852
  id: string;
20853
+ last_error: string | null;
20854
+ next_attempt_at: string | null;
19023
20855
  order_ref: string;
19024
20856
  owner_module: string;
19025
20857
  payload: Json;
@@ -19052,6 +20884,8 @@ export type Database = {
19052
20884
  p_task_id: string;
19053
20885
  };
19054
20886
  Returns: {
20887
+ attempt_log: Json;
20888
+ attempts: number;
19055
20889
  buffer_ref: string | null;
19056
20890
  claimed_at: string | null;
19057
20891
  claimed_by: string | null;
@@ -19061,6 +20895,8 @@ export type Database = {
19061
20895
  due_at: string | null;
19062
20896
  error: string | null;
19063
20897
  id: string;
20898
+ last_error: string | null;
20899
+ next_attempt_at: string | null;
19064
20900
  order_ref: string;
19065
20901
  owner_module: string;
19066
20902
  payload: Json;
@@ -19113,17 +20949,6 @@ export type Database = {
19113
20949
  Returns: string;
19114
20950
  };
19115
20951
  logistics_emit_event: {
19116
- Args: {
19117
- p_event_type: string;
19118
- p_idempotency_key?: string;
19119
- p_order_ref: string;
19120
- p_payload?: Json;
19121
- p_shadow?: boolean;
19122
- p_source_module: string;
19123
- p_strategy_id?: string;
19124
- };
19125
- Returns: Json;
19126
- } | {
19127
20952
  Args: {
19128
20953
  p_event_type: string;
19129
20954
  p_idempotency_key?: string;
@@ -19142,6 +20967,8 @@ export type Database = {
19142
20967
  p_task_id: string;
19143
20968
  };
19144
20969
  Returns: {
20970
+ attempt_log: Json;
20971
+ attempts: number;
19145
20972
  buffer_ref: string | null;
19146
20973
  claimed_at: string | null;
19147
20974
  claimed_by: string | null;
@@ -19151,6 +20978,8 @@ export type Database = {
19151
20978
  due_at: string | null;
19152
20979
  error: string | null;
19153
20980
  id: string;
20981
+ last_error: string | null;
20982
+ next_attempt_at: string | null;
19154
20983
  order_ref: string;
19155
20984
  owner_module: string;
19156
20985
  payload: Json;
@@ -19177,6 +21006,51 @@ export type Database = {
19177
21006
  isSetofReturn: false;
19178
21007
  };
19179
21008
  };
21009
+ logistics_floriday_claim_pushes: {
21010
+ Args: {
21011
+ _lease_seconds?: number;
21012
+ _limit?: number;
21013
+ _worker?: string;
21014
+ };
21015
+ Returns: {
21016
+ attempts: number;
21017
+ fulfillment_order_id: string;
21018
+ id: string;
21019
+ last_sent_hash: string;
21020
+ order_ref: string;
21021
+ payload: Json;
21022
+ payload_hash: string;
21023
+ revision: number;
21024
+ }[];
21025
+ };
21026
+ logistics_floriday_finish_push: {
21027
+ Args: {
21028
+ _error?: string;
21029
+ _fulfillment_order_id?: string;
21030
+ _id: string;
21031
+ _max_age_hours?: number;
21032
+ _max_attempts?: number;
21033
+ _ok: boolean;
21034
+ _permanent?: boolean;
21035
+ _revision: number;
21036
+ _sent_hash?: string;
21037
+ };
21038
+ Returns: string;
21039
+ };
21040
+ logistics_floriday_prune_pushes: {
21041
+ Args: {
21042
+ _days?: number;
21043
+ };
21044
+ Returns: number;
21045
+ };
21046
+ logistics_floriday_queue_push: {
21047
+ Args: {
21048
+ _order_ref: string;
21049
+ _payload?: Json;
21050
+ _payload_hash?: string;
21051
+ };
21052
+ Returns: string;
21053
+ };
19180
21054
  logistics_live_carriers: {
19181
21055
  Args: {
19182
21056
  p_order_ref: string;
@@ -19229,6 +21103,65 @@ export type Database = {
19229
21103
  };
19230
21104
  Returns: number;
19231
21105
  };
21106
+ logistics_plan_claim: {
21107
+ Args: {
21108
+ p_limit?: number;
21109
+ };
21110
+ Returns: {
21111
+ attempts: number;
21112
+ id: string;
21113
+ order_id: string;
21114
+ }[];
21115
+ };
21116
+ logistics_plan_enqueue: {
21117
+ Args: {
21118
+ p_order_id: string;
21119
+ p_reason?: string;
21120
+ };
21121
+ Returns: undefined;
21122
+ };
21123
+ logistics_plan_ensure_event: {
21124
+ Args: {
21125
+ p_order_id: string;
21126
+ };
21127
+ Returns: boolean;
21128
+ };
21129
+ logistics_plan_finish: {
21130
+ Args: {
21131
+ p_error?: string;
21132
+ p_id: string;
21133
+ };
21134
+ Returns: undefined;
21135
+ };
21136
+ logistics_plan_impact_orders: {
21137
+ Args: {
21138
+ p_order_id: string;
21139
+ };
21140
+ Returns: {
21141
+ buffer_id: string;
21142
+ order_id: string;
21143
+ plan_date: string;
21144
+ }[];
21145
+ };
21146
+ logistics_plan_kick: {
21147
+ Args: never;
21148
+ Returns: undefined;
21149
+ };
21150
+ logistics_plan_prune: {
21151
+ Args: never;
21152
+ Returns: number;
21153
+ };
21154
+ logistics_plan_release_stale: {
21155
+ Args: never;
21156
+ Returns: number;
21157
+ };
21158
+ logistics_plan_setting: {
21159
+ Args: {
21160
+ p_default: number;
21161
+ p_key: string;
21162
+ };
21163
+ Returns: number;
21164
+ };
19232
21165
  logistics_queue_capacity_email: {
19233
21166
  Args: {
19234
21167
  p_alert_id: string;
@@ -19467,6 +21400,14 @@ export type Database = {
19467
21400
  };
19468
21401
  Returns: undefined;
19469
21402
  };
21403
+ my_module_permissions: {
21404
+ Args: never;
21405
+ Returns: {
21406
+ feature_id: string;
21407
+ module_id: string;
21408
+ permission: string;
21409
+ }[];
21410
+ };
19470
21411
  next_manufacture_partij: {
19471
21412
  Args: {
19472
21413
  _tenant_id: string;
@@ -19517,6 +21458,13 @@ export type Database = {
19517
21458
  };
19518
21459
  Returns: boolean;
19519
21460
  };
21461
+ opruim_print_historie: {
21462
+ Args: never;
21463
+ Returns: {
21464
+ ontdaan: number;
21465
+ verwijderd: number;
21466
+ }[];
21467
+ };
19520
21468
  order_number_prefix: {
19521
21469
  Args: {
19522
21470
  p_custom_fields?: Json;
@@ -19524,6 +21472,15 @@ export type Database = {
19524
21472
  };
19525
21473
  Returns: string;
19526
21474
  };
21475
+ pick_active_printers: {
21476
+ Args: never;
21477
+ Returns: {
21478
+ id: string;
21479
+ locatie: string;
21480
+ naam: string;
21481
+ online: boolean;
21482
+ }[];
21483
+ };
19527
21484
  pick_claim_document: {
19528
21485
  Args: {
19529
21486
  _queue_item_id: string;
@@ -19710,6 +21667,52 @@ export type Database = {
19710
21667
  };
19711
21668
  Returns: undefined;
19712
21669
  };
21670
+ pick_reset_print: {
21671
+ Args: {
21672
+ _queue_item_id: string;
21673
+ _session_id: string;
21674
+ };
21675
+ Returns: {
21676
+ announced_at: string;
21677
+ assigned_user_id: string | null;
21678
+ barcode: string | null;
21679
+ cancelled_at: string | null;
21680
+ cart_count: number;
21681
+ completed_at: string | null;
21682
+ country_code: string | null;
21683
+ created_at: string;
21684
+ customer_name: string | null;
21685
+ delivery_address: string | null;
21686
+ document_number: string | null;
21687
+ document_type_id: string | null;
21688
+ due_at: string | null;
21689
+ id: string;
21690
+ is_urgent: boolean;
21691
+ line_count: number;
21692
+ order_number: string | null;
21693
+ order_type: string | null;
21694
+ payload: Json;
21695
+ print_count: number;
21696
+ print_job_id: string | null;
21697
+ printed_at: string | null;
21698
+ printed_by: string | null;
21699
+ printer_id: string | null;
21700
+ priority: number;
21701
+ reference: string | null;
21702
+ route: string | null;
21703
+ screen_id: string | null;
21704
+ station_id: string | null;
21705
+ status_id: string | null;
21706
+ updated_at: string;
21707
+ warnings: Json;
21708
+ };
21709
+ SetofOptions: {
21710
+ from: "*";
21711
+ to: "pick_queue";
21712
+ isOneToOne: true;
21713
+ isSetofReturn: false;
21714
+ };
21715
+ };
19713
21716
  pick_station_dashboard: {
19714
21717
  Args: never;
19715
21718
  Returns: {
@@ -19856,6 +21859,12 @@ export type Database = {
19856
21859
  };
19857
21860
  Returns: undefined;
19858
21861
  };
21862
+ reset_stalled_floriday_stock_queue: {
21863
+ Args: {
21864
+ p_include_failed?: boolean;
21865
+ };
21866
+ Returns: number;
21867
+ };
19859
21868
  resolve_group_allocation: {
19860
21869
  Args: {
19861
21870
  _needed: number;
@@ -19900,10 +21909,28 @@ export type Database = {
19900
21909
  };
19901
21910
  Returns: Json;
19902
21911
  };
21912
+ ruim_print_jobs_op: {
21913
+ Args: {
21914
+ _bewaar_dagen?: number;
21915
+ };
21916
+ Returns: number;
21917
+ };
19903
21918
  run_floriday_continuous_stock_sync: {
19904
21919
  Args: never;
19905
21920
  Returns: undefined;
19906
21921
  };
21922
+ run_floriday_stock_queue_process: {
21923
+ Args: never;
21924
+ Returns: undefined;
21925
+ };
21926
+ run_logistics_tasks_dispatch: {
21927
+ Args: never;
21928
+ Returns: undefined;
21929
+ };
21930
+ run_print_queue_ticks: {
21931
+ Args: never;
21932
+ Returns: number;
21933
+ };
19907
21934
  run_twinfield_queue_tick: {
19908
21935
  Args: never;
19909
21936
  Returns: undefined;
@@ -20144,6 +22171,13 @@ export type Database = {
20144
22171
  };
20145
22172
  Returns: number;
20146
22173
  };
22174
+ schedule_floriday_stock_queue_process: {
22175
+ Args: {
22176
+ p_apikey: string;
22177
+ p_url: string;
22178
+ };
22179
+ Returns: number;
22180
+ };
20147
22181
  schedule_floriday_token_refresh: {
20148
22182
  Args: {
20149
22183
  p_apikey: string;
@@ -20250,6 +22284,16 @@ export type Database = {
20250
22284
  };
20251
22285
  Returns: string[];
20252
22286
  };
22287
+ switch_time_log: {
22288
+ Args: {
22289
+ p_employee_id: string;
22290
+ p_start_lat?: number;
22291
+ p_start_lng?: number;
22292
+ p_type: string;
22293
+ p_work_order_id?: string;
22294
+ };
22295
+ Returns: Json;
22296
+ };
20253
22297
  sync_all_layer_stocks: {
20254
22298
  Args: never;
20255
22299
  Returns: undefined;
@@ -20284,6 +22328,15 @@ export type Database = {
20284
22328
  };
20285
22329
  Returns: undefined;
20286
22330
  };
22331
+ trade_item_stock_duplicates: {
22332
+ Args: never;
22333
+ Returns: {
22334
+ keys: string[];
22335
+ product_id: string;
22336
+ product_name: string;
22337
+ row_count: number;
22338
+ }[];
22339
+ };
20287
22340
  try_debtor_lock: {
20288
22341
  Args: {
20289
22342
  _group_key: string;
@@ -20291,6 +22344,24 @@ export type Database = {
20291
22344
  };
20292
22345
  Returns: boolean;
20293
22346
  };
22347
+ twinfield_cron_lock_acquire: {
22348
+ Args: {
22349
+ _job_name: string;
22350
+ _stale_seconds?: number;
22351
+ };
22352
+ Returns: boolean;
22353
+ };
22354
+ twinfield_cron_lock_release: {
22355
+ Args: {
22356
+ _error?: string;
22357
+ _job_name: string;
22358
+ };
22359
+ Returns: undefined;
22360
+ };
22361
+ twinfield_prune_push_queue: {
22362
+ Args: never;
22363
+ Returns: number;
22364
+ };
20294
22365
  twinfield_register_cron: {
20295
22366
  Args: {
20296
22367
  apikey?: string;
@@ -20333,8 +22404,8 @@ export type Database = {
20333
22404
  };
20334
22405
  Enums: {
20335
22406
  ai_import_status: "nieuw" | "verwerken" | "bevestigen" | "klaar" | "mislukt";
20336
- app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin";
20337
- doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon";
22407
+ app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie";
22408
+ doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon" | "veilingbon" | "afleverbrief" | "veilingbrief";
20338
22409
  doc_orientation: "portrait" | "landscape";
20339
22410
  exact_env: "staging" | "live";
20340
22411
  exact_push_status: "pending" | "sent" | "error";
@@ -20404,8 +22475,8 @@ export declare const Constants: {
20404
22475
  readonly public: {
20405
22476
  readonly Enums: {
20406
22477
  readonly ai_import_status: readonly ["nieuw", "verwerken", "bevestigen", "klaar", "mislukt"];
20407
- readonly app_role: readonly ["admin", "planner", "monteur", "administratie", "ai_admin"];
20408
- readonly doc_layout_type: readonly ["pakbon", "factuur", "offerte", "orderbevestiging", "etiket", "verzendlabel", "productlabel", "barcode_label", "magazijnlijst", "controlelijst", "transportdocument", "vrij", "sticker", "productiebon"];
22478
+ readonly app_role: readonly ["admin", "planner", "monteur", "administratie", "ai_admin", "manager", "warehouse", "sales", "developer", "receptie"];
22479
+ readonly doc_layout_type: readonly ["pakbon", "factuur", "offerte", "orderbevestiging", "etiket", "verzendlabel", "productlabel", "barcode_label", "magazijnlijst", "controlelijst", "transportdocument", "vrij", "sticker", "productiebon", "veilingbon", "afleverbrief", "veilingbrief"];
20409
22480
  readonly doc_orientation: readonly ["portrait", "landscape"];
20410
22481
  readonly exact_env: readonly ["staging", "live"];
20411
22482
  readonly exact_push_status: readonly ["pending", "sent", "error"];