@flowselections/floriday-verkoop-module 1.0.40 → 1.0.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/dist-lib/components/verkoop/EngineBufferCard.d.ts.map +1 -1
  2. package/dist-lib/components/verkoop/EngineBufferCard.js +2 -2
  3. package/dist-lib/components/verkoop/InvoiceTimingSettings.d.ts +3 -0
  4. package/dist-lib/components/verkoop/InvoiceTimingSettings.d.ts.map +1 -0
  5. package/dist-lib/components/verkoop/InvoiceTimingSettings.js +54 -0
  6. package/dist-lib/components/verkoop/SalesOrdersTable.d.ts.map +1 -1
  7. package/dist-lib/components/verkoop/SalesOrdersTable.js +44 -91
  8. package/dist-lib/components/verkoop/VerkoopOrdersPage.d.ts.map +1 -1
  9. package/dist-lib/components/verkoop/VerkoopOrdersPage.js +59 -23
  10. package/dist-lib/index.d.ts +1 -0
  11. package/dist-lib/index.d.ts.map +1 -1
  12. package/dist-lib/index.js +3 -1
  13. package/dist-lib/integrations/supabase/auth-middleware.d.ts +1429 -159
  14. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  15. package/dist-lib/integrations/supabase/client.d.ts +1429 -159
  16. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  17. package/dist-lib/integrations/supabase/client.server.d.ts +1429 -159
  18. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  19. package/dist-lib/integrations/supabase/types.d.ts +1436 -161
  20. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  21. package/dist-lib/integrations/supabase/types.js +12 -1
  22. package/dist-lib/lib/cart-lock.functions.d.ts +1429 -159
  23. package/dist-lib/lib/cart-lock.functions.d.ts.map +1 -1
  24. package/dist-lib/lib/cart-planning-settings.functions.d.ts +15410 -1440
  25. package/dist-lib/lib/cart-planning-settings.functions.d.ts.map +1 -1
  26. package/dist-lib/lib/cart-replan.functions.d.ts +4290 -480
  27. package/dist-lib/lib/cart-replan.functions.d.ts.map +1 -1
  28. package/dist-lib/lib/create-order.functions.d.ts +42631 -1921
  29. package/dist-lib/lib/create-order.functions.d.ts.map +1 -1
  30. package/dist-lib/lib/create-order.functions.js +30 -0
  31. package/dist-lib/lib/cron/index.d.ts +1 -0
  32. package/dist-lib/lib/cron/index.d.ts.map +1 -1
  33. package/dist-lib/lib/cron/index.js +1 -0
  34. package/dist-lib/lib/cron/invoice-due.d.ts +4 -0
  35. package/dist-lib/lib/cron/invoice-due.d.ts.map +1 -0
  36. package/dist-lib/lib/cron/invoice-due.js +21 -0
  37. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts +4290 -480
  38. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts.map +1 -1
  39. package/dist-lib/lib/floriday-fulfillment-status.server.d.ts +28 -0
  40. package/dist-lib/lib/floriday-fulfillment-status.server.d.ts.map +1 -0
  41. package/dist-lib/lib/floriday-fulfillment-status.server.js +91 -0
  42. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts +1429 -159
  43. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts.map +1 -1
  44. package/dist-lib/lib/floriday-mirror.functions.d.ts +1429 -159
  45. package/dist-lib/lib/floriday-mirror.functions.d.ts.map +1 -1
  46. package/dist-lib/lib/floriday-mirror.functions.js +27 -4
  47. package/dist-lib/lib/floriday-public.functions.d.ts +9850 -960
  48. package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
  49. package/dist-lib/lib/floriday-writes.functions.d.ts +7070 -720
  50. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  51. package/dist-lib/lib/invoice-timing.d.ts +38 -0
  52. package/dist-lib/lib/invoice-timing.d.ts.map +1 -0
  53. package/dist-lib/lib/invoice-timing.functions.d.ts +86633 -0
  54. package/dist-lib/lib/invoice-timing.functions.d.ts.map +1 -0
  55. package/dist-lib/lib/invoice-timing.functions.js +88 -0
  56. package/dist-lib/lib/invoice-timing.js +139 -0
  57. package/dist-lib/lib/invoice-timing.server.d.ts +22 -0
  58. package/dist-lib/lib/invoice-timing.server.d.ts.map +1 -0
  59. package/dist-lib/lib/invoice-timing.server.js +154 -0
  60. package/dist-lib/lib/load-carriers.functions.d.ts +1429 -159
  61. package/dist-lib/lib/load-carriers.functions.d.ts.map +1 -1
  62. package/dist-lib/lib/logistics-engine.functions.d.ts +7072 -722
  63. package/dist-lib/lib/logistics-engine.functions.d.ts.map +1 -1
  64. package/dist-lib/lib/logistics-stock.functions.d.ts +2900 -360
  65. package/dist-lib/lib/logistics-stock.functions.d.ts.map +1 -1
  66. package/dist-lib/lib/order-addresses.functions.d.ts +1429 -159
  67. package/dist-lib/lib/order-addresses.functions.d.ts.map +1 -1
  68. package/dist-lib/lib/order-buffers.functions.d.ts +4290 -480
  69. package/dist-lib/lib/order-buffers.functions.d.ts.map +1 -1
  70. package/dist-lib/lib/order-carrier.functions.d.ts +2900 -360
  71. package/dist-lib/lib/order-carrier.functions.d.ts.map +1 -1
  72. package/dist-lib/lib/order-pickup.functions.d.ts +2900 -360
  73. package/dist-lib/lib/order-pickup.functions.d.ts.map +1 -1
  74. package/dist-lib/lib/order-shipments.functions.d.ts +5680 -600
  75. package/dist-lib/lib/order-shipments.functions.d.ts.map +1 -1
  76. package/dist-lib/lib/order-status.d.ts +33 -0
  77. package/dist-lib/lib/order-status.d.ts.map +1 -0
  78. package/dist-lib/lib/order-status.js +77 -0
  79. package/dist-lib/lib/salesorders-list.functions.d.ts +1430 -160
  80. package/dist-lib/lib/salesorders-list.functions.d.ts.map +1 -1
  81. package/dist-lib/lib/salesorders-list.functions.js +1 -1
  82. package/dist-lib/lib/salesorders-list.server.d.ts +2 -1
  83. package/dist-lib/lib/salesorders-list.server.d.ts.map +1 -1
  84. package/dist-lib/lib/salesorders-list.server.js +145 -58
  85. package/dist-lib/lib/salesorders-mapping.d.ts +19 -0
  86. package/dist-lib/lib/salesorders-mapping.d.ts.map +1 -1
  87. package/dist-lib/lib/salesorders-mapping.js +19 -7
  88. package/dist-lib/lib/salesorders.functions.d.ts +7070 -720
  89. package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
  90. package/dist-lib/lib/tradeitems.functions.d.ts +1429 -159
  91. package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
  92. package/dist-lib/lib/useSalesOrdersQuery.d.ts +2 -1
  93. package/dist-lib/lib/useSalesOrdersQuery.d.ts.map +1 -1
  94. package/package.json +10 -2
@@ -876,6 +876,126 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
876
876
  };
877
877
  Relationships: [];
878
878
  };
879
+ cao_holidays: {
880
+ Row: {
881
+ created_at: string;
882
+ description: string | null;
883
+ holiday_date: string;
884
+ id: string;
885
+ updated_at: string;
886
+ };
887
+ Insert: {
888
+ created_at?: string;
889
+ description?: string | null;
890
+ holiday_date: string;
891
+ id?: string;
892
+ updated_at?: string;
893
+ };
894
+ Update: {
895
+ created_at?: string;
896
+ description?: string | null;
897
+ holiday_date?: string;
898
+ id?: string;
899
+ updated_at?: string;
900
+ };
901
+ Relationships: [];
902
+ };
903
+ cao_settings: {
904
+ Row: {
905
+ auto_break_after_hours: number;
906
+ auto_break_minutes: number;
907
+ auto_break_unpaid: boolean;
908
+ auto_stop_after_hours: number;
909
+ callout_fee: number;
910
+ created_at: string;
911
+ daily_regular_hours: number;
912
+ default_hourly_rate: number;
913
+ id: string;
914
+ materials_markup_percent: number;
915
+ max_daily_hours: number;
916
+ max_weekly_hours: number;
917
+ meal_allowance_amount: number;
918
+ overtime_pct_178: number;
919
+ overtime_pct_189: number;
920
+ overtime_pct_212: number;
921
+ reminder_after_hours: number;
922
+ standby_evening_amount: number;
923
+ standby_weekend_amount: number;
924
+ travel_cost_per_km: number | null;
925
+ travel_cost_threshold_km: number | null;
926
+ travel_counts_as_work: boolean;
927
+ travel_hourly_rate: number;
928
+ travel_rate_per_hour: number;
929
+ travel_threshold_minutes: number;
930
+ updated_at: string;
931
+ weekend_always_212: boolean;
932
+ window_end: string;
933
+ window_start: string;
934
+ };
935
+ Insert: {
936
+ auto_break_after_hours?: number;
937
+ auto_break_minutes?: number;
938
+ auto_break_unpaid?: boolean;
939
+ auto_stop_after_hours?: number;
940
+ callout_fee?: number;
941
+ created_at?: string;
942
+ daily_regular_hours?: number;
943
+ default_hourly_rate?: number;
944
+ id?: string;
945
+ materials_markup_percent?: number;
946
+ max_daily_hours?: number;
947
+ max_weekly_hours?: number;
948
+ meal_allowance_amount?: number;
949
+ overtime_pct_178?: number;
950
+ overtime_pct_189?: number;
951
+ overtime_pct_212?: number;
952
+ reminder_after_hours?: number;
953
+ standby_evening_amount?: number;
954
+ standby_weekend_amount?: number;
955
+ travel_cost_per_km?: number | null;
956
+ travel_cost_threshold_km?: number | null;
957
+ travel_counts_as_work?: boolean;
958
+ travel_hourly_rate?: number;
959
+ travel_rate_per_hour?: number;
960
+ travel_threshold_minutes?: number;
961
+ updated_at?: string;
962
+ weekend_always_212?: boolean;
963
+ window_end?: string;
964
+ window_start?: string;
965
+ };
966
+ Update: {
967
+ auto_break_after_hours?: number;
968
+ auto_break_minutes?: number;
969
+ auto_break_unpaid?: boolean;
970
+ auto_stop_after_hours?: number;
971
+ callout_fee?: number;
972
+ created_at?: string;
973
+ daily_regular_hours?: number;
974
+ default_hourly_rate?: number;
975
+ id?: string;
976
+ materials_markup_percent?: number;
977
+ max_daily_hours?: number;
978
+ max_weekly_hours?: number;
979
+ meal_allowance_amount?: number;
980
+ overtime_pct_178?: number;
981
+ overtime_pct_189?: number;
982
+ overtime_pct_212?: number;
983
+ reminder_after_hours?: number;
984
+ standby_evening_amount?: number;
985
+ standby_weekend_amount?: number;
986
+ travel_cost_per_km?: number | null;
987
+ travel_cost_threshold_km?: number | null;
988
+ travel_counts_as_work?: boolean;
989
+ travel_hourly_rate?: number;
990
+ travel_rate_per_hour?: number;
991
+ travel_threshold_minutes?: number;
992
+ updated_at?: string;
993
+ weekend_always_212?: boolean;
994
+ window_end?: string;
995
+ window_start?: string;
996
+ };
997
+ Relationships: [];
998
+ };
879
999
  carrier_shipping_rates: {
880
1000
  Row: {
881
1001
  carrier_id: string;
@@ -1688,7 +1808,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
1688
1808
  city: string | null;
1689
1809
  country: string | null;
1690
1810
  created_at: string;
1691
- customer_id: string | null;
1811
+ customer_id: string;
1692
1812
  external_key: string | null;
1693
1813
  external_provider: string | null;
1694
1814
  floriday_location_id: string | null;
@@ -1712,7 +1832,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
1712
1832
  city?: string | null;
1713
1833
  country?: string | null;
1714
1834
  created_at?: string;
1715
- customer_id?: string | null;
1835
+ customer_id: string;
1716
1836
  external_key?: string | null;
1717
1837
  external_provider?: string | null;
1718
1838
  floriday_location_id?: string | null;
@@ -1736,7 +1856,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
1736
1856
  city?: string | null;
1737
1857
  country?: string | null;
1738
1858
  created_at?: string;
1739
- customer_id?: string | null;
1859
+ customer_id?: string;
1740
1860
  external_key?: string | null;
1741
1861
  external_provider?: string | null;
1742
1862
  floriday_location_id?: string | null;
@@ -5699,12 +5819,17 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
5699
5819
  attempts: number;
5700
5820
  connection_id: string;
5701
5821
  created_at: string;
5822
+ desired_available: boolean | null;
5702
5823
  gateway_attempt_id: string | null;
5703
5824
  id: string;
5704
5825
  last_error: string | null;
5826
+ locked_at: string | null;
5827
+ locked_by: string | null;
5828
+ next_attempt_at: string;
5705
5829
  number_of_pieces: number;
5706
5830
  sent_at: string | null;
5707
5831
  status: string;
5832
+ superseded_by: string | null;
5708
5833
  trade_item_id: string;
5709
5834
  updated_at: string;
5710
5835
  user_id: string;
@@ -5713,12 +5838,17 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
5713
5838
  attempts?: number;
5714
5839
  connection_id: string;
5715
5840
  created_at?: string;
5841
+ desired_available?: boolean | null;
5716
5842
  gateway_attempt_id?: string | null;
5717
5843
  id?: string;
5718
5844
  last_error?: string | null;
5845
+ locked_at?: string | null;
5846
+ locked_by?: string | null;
5847
+ next_attempt_at?: string;
5719
5848
  number_of_pieces?: number;
5720
5849
  sent_at?: string | null;
5721
5850
  status?: string;
5851
+ superseded_by?: string | null;
5722
5852
  trade_item_id: string;
5723
5853
  updated_at?: string;
5724
5854
  user_id: string;
@@ -5727,12 +5857,17 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
5727
5857
  attempts?: number;
5728
5858
  connection_id?: string;
5729
5859
  created_at?: string;
5860
+ desired_available?: boolean | null;
5730
5861
  gateway_attempt_id?: string | null;
5731
5862
  id?: string;
5732
5863
  last_error?: string | null;
5864
+ locked_at?: string | null;
5865
+ locked_by?: string | null;
5866
+ next_attempt_at?: string;
5733
5867
  number_of_pieces?: number;
5734
5868
  sent_at?: string | null;
5735
5869
  status?: string;
5870
+ superseded_by?: string | null;
5736
5871
  trade_item_id?: string;
5737
5872
  updated_at?: string;
5738
5873
  user_id?: string;
@@ -6469,6 +6604,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
6469
6604
  Row: {
6470
6605
  buyer_organization_id: string | null;
6471
6606
  connection_id: string;
6607
+ controlled_at: string | null;
6472
6608
  created_at: string;
6473
6609
  data: import("../integrations/supabase/types").Json;
6474
6610
  floriday_id: string;
@@ -6480,6 +6616,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
6480
6616
  Insert: {
6481
6617
  buyer_organization_id?: string | null;
6482
6618
  connection_id: string;
6619
+ controlled_at?: string | null;
6483
6620
  created_at?: string;
6484
6621
  data: import("../integrations/supabase/types").Json;
6485
6622
  floriday_id: string;
@@ -6491,6 +6628,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
6491
6628
  Update: {
6492
6629
  buyer_organization_id?: string | null;
6493
6630
  connection_id?: string;
6631
+ controlled_at?: string | null;
6494
6632
  created_at?: string;
6495
6633
  data?: import("../integrations/supabase/types").Json;
6496
6634
  floriday_id?: string;
@@ -7392,6 +7530,54 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7392
7530
  };
7393
7531
  Relationships: [];
7394
7532
  };
7533
+ invoice_timing_settings: {
7534
+ Row: {
7535
+ anchor: string;
7536
+ business_days_only: boolean;
7537
+ created_at: string;
7538
+ enabled: boolean;
7539
+ id: string;
7540
+ offset_days: number;
7541
+ pickup_anchor: string;
7542
+ pickup_business_days_only: boolean;
7543
+ pickup_offset_days: number;
7544
+ pickup_time_of_day: string;
7545
+ singleton: boolean;
7546
+ time_of_day: string;
7547
+ updated_at: string;
7548
+ };
7549
+ Insert: {
7550
+ anchor?: string;
7551
+ business_days_only?: boolean;
7552
+ created_at?: string;
7553
+ enabled?: boolean;
7554
+ id?: string;
7555
+ offset_days?: number;
7556
+ pickup_anchor?: string;
7557
+ pickup_business_days_only?: boolean;
7558
+ pickup_offset_days?: number;
7559
+ pickup_time_of_day?: string;
7560
+ singleton?: boolean;
7561
+ time_of_day?: string;
7562
+ updated_at?: string;
7563
+ };
7564
+ Update: {
7565
+ anchor?: string;
7566
+ business_days_only?: boolean;
7567
+ created_at?: string;
7568
+ enabled?: boolean;
7569
+ id?: string;
7570
+ offset_days?: number;
7571
+ pickup_anchor?: string;
7572
+ pickup_business_days_only?: boolean;
7573
+ pickup_offset_days?: number;
7574
+ pickup_time_of_day?: string;
7575
+ singleton?: boolean;
7576
+ time_of_day?: string;
7577
+ updated_at?: string;
7578
+ };
7579
+ Relationships: [];
7580
+ };
7395
7581
  itk_contact_persons: {
7396
7582
  Row: {
7397
7583
  created_at: string;
@@ -7704,7 +7890,6 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7704
7890
  start_date: string;
7705
7891
  start_time: string | null;
7706
7892
  status: string;
7707
- tenant_id: string;
7708
7893
  updated_at: string;
7709
7894
  user_id: string;
7710
7895
  };
@@ -7722,7 +7907,6 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7722
7907
  start_date: string;
7723
7908
  start_time?: string | null;
7724
7909
  status?: string;
7725
- tenant_id?: string;
7726
7910
  updated_at?: string;
7727
7911
  user_id: string;
7728
7912
  };
@@ -7740,7 +7924,6 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7740
7924
  start_date?: string;
7741
7925
  start_time?: string | null;
7742
7926
  status?: string;
7743
- tenant_id?: string;
7744
7927
  updated_at?: string;
7745
7928
  user_id?: string;
7746
7929
  };
@@ -7748,13 +7931,13 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7748
7931
  foreignKeyName: "leave_requests_monteur_id_fkey";
7749
7932
  columns: ["monteur_id"];
7750
7933
  isOneToOne: false;
7751
- referencedRelation: "monteurs";
7934
+ referencedRelation: "profiles";
7752
7935
  referencedColumns: ["id"];
7753
7936
  }, {
7754
7937
  foreignKeyName: "leave_requests_user_id_fkey";
7755
7938
  columns: ["user_id"];
7756
7939
  isOneToOne: false;
7757
- referencedRelation: "monteurs";
7940
+ referencedRelation: "profiles";
7758
7941
  referencedColumns: ["id"];
7759
7942
  }];
7760
7943
  };
@@ -8481,6 +8664,69 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8481
8664
  };
8482
8665
  Relationships: [];
8483
8666
  };
8667
+ logistics_floriday_pushes: {
8668
+ Row: {
8669
+ attempts: number;
8670
+ created_at: string;
8671
+ first_queued_at: string;
8672
+ fulfillment_order_id: string | null;
8673
+ id: string;
8674
+ last_error: string | null;
8675
+ last_error_at: string | null;
8676
+ last_sent_hash: string | null;
8677
+ locked_by: string | null;
8678
+ locked_until: string | null;
8679
+ next_attempt_at: string;
8680
+ order_ref: string;
8681
+ payload: import("../integrations/supabase/types").Json;
8682
+ payload_hash: string | null;
8683
+ revision: number;
8684
+ sent_at: string | null;
8685
+ status: string;
8686
+ updated_at: string;
8687
+ };
8688
+ Insert: {
8689
+ attempts?: number;
8690
+ created_at?: string;
8691
+ first_queued_at?: string;
8692
+ fulfillment_order_id?: string | null;
8693
+ id?: string;
8694
+ last_error?: string | null;
8695
+ last_error_at?: string | null;
8696
+ last_sent_hash?: string | null;
8697
+ locked_by?: string | null;
8698
+ locked_until?: string | null;
8699
+ next_attempt_at?: string;
8700
+ order_ref: string;
8701
+ payload?: import("../integrations/supabase/types").Json;
8702
+ payload_hash?: string | null;
8703
+ revision?: number;
8704
+ sent_at?: string | null;
8705
+ status?: string;
8706
+ updated_at?: string;
8707
+ };
8708
+ Update: {
8709
+ attempts?: number;
8710
+ created_at?: string;
8711
+ first_queued_at?: string;
8712
+ fulfillment_order_id?: string | null;
8713
+ id?: string;
8714
+ last_error?: string | null;
8715
+ last_error_at?: string | null;
8716
+ last_sent_hash?: string | null;
8717
+ locked_by?: string | null;
8718
+ locked_until?: string | null;
8719
+ next_attempt_at?: string;
8720
+ order_ref?: string;
8721
+ payload?: import("../integrations/supabase/types").Json;
8722
+ payload_hash?: string | null;
8723
+ revision?: number;
8724
+ sent_at?: string | null;
8725
+ status?: string;
8726
+ updated_at?: string;
8727
+ };
8728
+ Relationships: [];
8729
+ };
8484
8730
  logistics_formulas: {
8485
8731
  Row: {
8486
8732
  created_at: string;
@@ -8559,6 +8805,45 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8559
8805
  };
8560
8806
  Relationships: [];
8561
8807
  };
8808
+ logistics_plan_queue: {
8809
+ Row: {
8810
+ attempts: number;
8811
+ claimed_at: string | null;
8812
+ enqueued_at: string;
8813
+ error: string | null;
8814
+ id: string;
8815
+ next_attempt_at: string;
8816
+ order_id: string;
8817
+ reason: string;
8818
+ status: string;
8819
+ updated_at: string;
8820
+ };
8821
+ Insert: {
8822
+ attempts?: number;
8823
+ claimed_at?: string | null;
8824
+ enqueued_at?: string;
8825
+ error?: string | null;
8826
+ id?: string;
8827
+ next_attempt_at?: string;
8828
+ order_id: string;
8829
+ reason?: string;
8830
+ status?: string;
8831
+ updated_at?: string;
8832
+ };
8833
+ Update: {
8834
+ attempts?: number;
8835
+ claimed_at?: string | null;
8836
+ enqueued_at?: string;
8837
+ error?: string | null;
8838
+ id?: string;
8839
+ next_attempt_at?: string;
8840
+ order_id?: string;
8841
+ reason?: string;
8842
+ status?: string;
8843
+ updated_at?: string;
8844
+ };
8845
+ Relationships: [];
8846
+ };
8562
8847
  logistics_plan_runs: {
8563
8848
  Row: {
8564
8849
  created_at: string;
@@ -8634,6 +8919,24 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8634
8919
  referencedColumns: ["id"];
8635
8920
  }];
8636
8921
  };
8922
+ logistics_plan_settings: {
8923
+ Row: {
8924
+ key: string;
8925
+ updated_at: string;
8926
+ value: string;
8927
+ };
8928
+ Insert: {
8929
+ key: string;
8930
+ updated_at?: string;
8931
+ value: string;
8932
+ };
8933
+ Update: {
8934
+ key?: string;
8935
+ updated_at?: string;
8936
+ value?: string;
8937
+ };
8938
+ Relationships: [];
8939
+ };
8637
8940
  logistics_rebuffer_state: {
8638
8941
  Row: {
8639
8942
  created_at: string;
@@ -9344,14 +9647,17 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9344
9647
  };
9345
9648
  mailbox_messages: {
9346
9649
  Row: {
9650
+ attachments: import("../integrations/supabase/types").Json;
9347
9651
  body_html: string | null;
9348
9652
  body_text: string | null;
9653
+ cc_recipients: import("../integrations/supabase/types").Json;
9349
9654
  connection_id: string | null;
9350
9655
  created_at: string;
9351
9656
  error_message: string | null;
9352
9657
  external_id: string | null;
9353
9658
  from_email: string | null;
9354
9659
  from_name: string | null;
9660
+ has_attachments: boolean;
9355
9661
  id: string;
9356
9662
  message_id: string | null;
9357
9663
  profile_id: string | null;
@@ -9359,18 +9665,22 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9359
9665
  received_at: string | null;
9360
9666
  status: string;
9361
9667
  subject: string | null;
9668
+ to_recipients: import("../integrations/supabase/types").Json;
9362
9669
  uid: number | null;
9363
9670
  updated_at: string;
9364
9671
  };
9365
9672
  Insert: {
9673
+ attachments?: import("../integrations/supabase/types").Json;
9366
9674
  body_html?: string | null;
9367
9675
  body_text?: string | null;
9676
+ cc_recipients?: import("../integrations/supabase/types").Json;
9368
9677
  connection_id?: string | null;
9369
9678
  created_at?: string;
9370
9679
  error_message?: string | null;
9371
9680
  external_id?: string | null;
9372
9681
  from_email?: string | null;
9373
9682
  from_name?: string | null;
9683
+ has_attachments?: boolean;
9374
9684
  id?: string;
9375
9685
  message_id?: string | null;
9376
9686
  profile_id?: string | null;
@@ -9378,18 +9688,22 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9378
9688
  received_at?: string | null;
9379
9689
  status?: string;
9380
9690
  subject?: string | null;
9691
+ to_recipients?: import("../integrations/supabase/types").Json;
9381
9692
  uid?: number | null;
9382
9693
  updated_at?: string;
9383
9694
  };
9384
9695
  Update: {
9696
+ attachments?: import("../integrations/supabase/types").Json;
9385
9697
  body_html?: string | null;
9386
9698
  body_text?: string | null;
9699
+ cc_recipients?: import("../integrations/supabase/types").Json;
9387
9700
  connection_id?: string | null;
9388
9701
  created_at?: string;
9389
9702
  error_message?: string | null;
9390
9703
  external_id?: string | null;
9391
9704
  from_email?: string | null;
9392
9705
  from_name?: string | null;
9706
+ has_attachments?: boolean;
9393
9707
  id?: string;
9394
9708
  message_id?: string | null;
9395
9709
  profile_id?: string | null;
@@ -9397,6 +9711,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9397
9711
  received_at?: string | null;
9398
9712
  status?: string;
9399
9713
  subject?: string | null;
9714
+ to_recipients?: import("../integrations/supabase/types").Json;
9400
9715
  uid?: number | null;
9401
9716
  updated_at?: string;
9402
9717
  };
@@ -9777,6 +10092,90 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9777
10092
  };
9778
10093
  Relationships: [];
9779
10094
  };
10095
+ material_usage: {
10096
+ Row: {
10097
+ created_at: string;
10098
+ id: string;
10099
+ material_name: string;
10100
+ monteur_id: string | null;
10101
+ price_at_time: number;
10102
+ quantity_used: number;
10103
+ updated_at: string;
10104
+ van_inventory_id: string | null;
10105
+ work_order_id: string;
10106
+ };
10107
+ Insert: {
10108
+ created_at?: string;
10109
+ id?: string;
10110
+ material_name: string;
10111
+ monteur_id?: string | null;
10112
+ price_at_time?: number;
10113
+ quantity_used?: number;
10114
+ updated_at?: string;
10115
+ van_inventory_id?: string | null;
10116
+ work_order_id: string;
10117
+ };
10118
+ Update: {
10119
+ created_at?: string;
10120
+ id?: string;
10121
+ material_name?: string;
10122
+ monteur_id?: string | null;
10123
+ price_at_time?: number;
10124
+ quantity_used?: number;
10125
+ updated_at?: string;
10126
+ van_inventory_id?: string | null;
10127
+ work_order_id?: string;
10128
+ };
10129
+ Relationships: [{
10130
+ foreignKeyName: "material_usage_monteur_id_fkey";
10131
+ columns: ["monteur_id"];
10132
+ isOneToOne: false;
10133
+ referencedRelation: "profiles";
10134
+ referencedColumns: ["id"];
10135
+ }, {
10136
+ foreignKeyName: "material_usage_van_inventory_id_fkey";
10137
+ columns: ["van_inventory_id"];
10138
+ isOneToOne: false;
10139
+ referencedRelation: "van_inventories";
10140
+ referencedColumns: ["id"];
10141
+ }, {
10142
+ foreignKeyName: "material_usage_work_order_id_fkey";
10143
+ columns: ["work_order_id"];
10144
+ isOneToOne: false;
10145
+ referencedRelation: "work_orders";
10146
+ referencedColumns: ["id"];
10147
+ }];
10148
+ };
10149
+ module_features: {
10150
+ Row: {
10151
+ created_at: string;
10152
+ feature_id: string;
10153
+ id: string;
10154
+ is_active: boolean;
10155
+ last_seen_at: string;
10156
+ module_id: string;
10157
+ name: string;
10158
+ };
10159
+ Insert: {
10160
+ created_at?: string;
10161
+ feature_id: string;
10162
+ id?: string;
10163
+ is_active?: boolean;
10164
+ last_seen_at?: string;
10165
+ module_id: string;
10166
+ name: string;
10167
+ };
10168
+ Update: {
10169
+ created_at?: string;
10170
+ feature_id?: string;
10171
+ id?: string;
10172
+ is_active?: boolean;
10173
+ last_seen_at?: string;
10174
+ module_id?: string;
10175
+ name?: string;
10176
+ };
10177
+ Relationships: [];
10178
+ };
9780
10179
  module_permissions: {
9781
10180
  Row: {
9782
10181
  created_at: string;
@@ -9804,6 +10203,39 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9804
10203
  };
9805
10204
  Relationships: [];
9806
10205
  };
10206
+ module_registry: {
10207
+ Row: {
10208
+ created_at: string;
10209
+ enforce: boolean;
10210
+ is_active: boolean;
10211
+ last_seen_at: string;
10212
+ module_id: string;
10213
+ name: string;
10214
+ shell_id: string | null;
10215
+ sort_order: number | null;
10216
+ };
10217
+ Insert: {
10218
+ created_at?: string;
10219
+ enforce?: boolean;
10220
+ is_active?: boolean;
10221
+ last_seen_at?: string;
10222
+ module_id: string;
10223
+ name: string;
10224
+ shell_id?: string | null;
10225
+ sort_order?: number | null;
10226
+ };
10227
+ Update: {
10228
+ created_at?: string;
10229
+ enforce?: boolean;
10230
+ is_active?: boolean;
10231
+ last_seen_at?: string;
10232
+ module_id?: string;
10233
+ name?: string;
10234
+ shell_id?: string | null;
10235
+ sort_order?: number | null;
10236
+ };
10237
+ Relationships: [];
10238
+ };
9807
10239
  module_runtime_config: {
9808
10240
  Row: {
9809
10241
  key: string;
@@ -9855,64 +10287,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9855
10287
  };
9856
10288
  Relationships: [];
9857
10289
  };
9858
- monteurs: {
9859
- Row: {
9860
- avatar_url: string | null;
9861
- color: string | null;
9862
- created_at: string;
9863
- email: string | null;
9864
- id: string;
9865
- is_active: boolean;
9866
- leave_balance_hours: number;
9867
- name: string;
9868
- persnr: number | null;
9869
- phone: string | null;
9870
- role: string;
9871
- tenant_id: string;
9872
- updated_at: string;
9873
- user_id: string | null;
9874
- };
9875
- Insert: {
9876
- avatar_url?: string | null;
9877
- color?: string | null;
9878
- created_at?: string;
9879
- email?: string | null;
9880
- id?: string;
9881
- is_active?: boolean;
9882
- leave_balance_hours?: number;
9883
- name: string;
9884
- persnr?: number | null;
9885
- phone?: string | null;
9886
- role?: string;
9887
- tenant_id: string;
9888
- updated_at?: string;
9889
- user_id?: string | null;
9890
- };
9891
- Update: {
9892
- avatar_url?: string | null;
9893
- color?: string | null;
9894
- created_at?: string;
9895
- email?: string | null;
9896
- id?: string;
9897
- is_active?: boolean;
9898
- leave_balance_hours?: number;
9899
- name?: string;
9900
- persnr?: number | null;
9901
- phone?: string | null;
9902
- role?: string;
9903
- tenant_id?: string;
9904
- updated_at?: string;
9905
- user_id?: string | null;
9906
- };
9907
- Relationships: [{
9908
- foreignKeyName: "monteurs_tenant_id_fkey";
9909
- columns: ["tenant_id"];
9910
- isOneToOne: false;
9911
- referencedRelation: "tenants";
9912
- referencedColumns: ["id"];
9913
- }];
9914
- };
9915
- nmbrs_component_mapping: {
10290
+ nmbrs_component_mapping: {
9916
10291
  Row: {
9917
10292
  created_at: string;
9918
10293
  id: string;
@@ -9982,13 +10357,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9982
10357
  nmbrs_employee_number?: string;
9983
10358
  updated_at?: string;
9984
10359
  };
9985
- Relationships: [{
9986
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
9987
- columns: ["monteur_id"];
9988
- isOneToOne: true;
9989
- referencedRelation: "monteurs";
9990
- referencedColumns: ["id"];
9991
- }];
10360
+ Relationships: [];
9992
10361
  };
9993
10362
  nmbrs_export_lines: {
9994
10363
  Row: {
@@ -10037,12 +10406,6 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10037
10406
  wage_code?: string;
10038
10407
  };
10039
10408
  Relationships: [{
10040
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
10041
- columns: ["monteur_id"];
10042
- isOneToOne: false;
10043
- referencedRelation: "monteurs";
10044
- referencedColumns: ["id"];
10045
- }, {
10046
10409
  foreignKeyName: "nmbrs_export_lines_run_id_fkey";
10047
10410
  columns: ["run_id"];
10048
10411
  isOneToOne: false;
@@ -10863,6 +11226,45 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10863
11226
  };
10864
11227
  Relationships: [];
10865
11228
  };
11229
+ order_invoice_links: {
11230
+ Row: {
11231
+ attempts: number;
11232
+ created_at: string;
11233
+ error_message: string | null;
11234
+ id: string;
11235
+ invoice_number: string | null;
11236
+ next_attempt_at: string;
11237
+ order_id: string;
11238
+ processed_at: string | null;
11239
+ status: string;
11240
+ updated_at: string;
11241
+ };
11242
+ Insert: {
11243
+ attempts?: number;
11244
+ created_at?: string;
11245
+ error_message?: string | null;
11246
+ id?: string;
11247
+ invoice_number?: string | null;
11248
+ next_attempt_at?: string;
11249
+ order_id: string;
11250
+ processed_at?: string | null;
11251
+ status?: string;
11252
+ updated_at?: string;
11253
+ };
11254
+ Update: {
11255
+ attempts?: number;
11256
+ created_at?: string;
11257
+ error_message?: string | null;
11258
+ id?: string;
11259
+ invoice_number?: string | null;
11260
+ next_attempt_at?: string;
11261
+ order_id?: string;
11262
+ processed_at?: string | null;
11263
+ status?: string;
11264
+ updated_at?: string;
11265
+ };
11266
+ Relationships: [];
11267
+ };
10866
11268
  order_items: {
10867
11269
  Row: {
10868
11270
  crates_per_layer: number | null;
@@ -11045,6 +11447,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11045
11447
  delivery_date: string | null;
11046
11448
  floriday_sales_order_id: string | null;
11047
11449
  id: string;
11450
+ invoice_due_at: string | null;
11048
11451
  is_reservation: boolean;
11049
11452
  notes: string | null;
11050
11453
  order_date: string;
@@ -11066,6 +11469,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11066
11469
  delivery_date?: string | null;
11067
11470
  floriday_sales_order_id?: string | null;
11068
11471
  id?: string;
11472
+ invoice_due_at?: string | null;
11069
11473
  is_reservation?: boolean;
11070
11474
  notes?: string | null;
11071
11475
  order_date?: string;
@@ -11087,6 +11491,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11087
11491
  delivery_date?: string | null;
11088
11492
  floriday_sales_order_id?: string | null;
11089
11493
  id?: string;
11494
+ invoice_due_at?: string | null;
11090
11495
  is_reservation?: boolean;
11091
11496
  notes?: string | null;
11092
11497
  order_date?: string;
@@ -12283,22 +12688,27 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
12283
12688
  created_at: string;
12284
12689
  documentnaam: string;
12285
12690
  documenttype: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"];
12691
+ extern_job_id: string | null;
12286
12692
  foutmelding: string | null;
12287
12693
  gebruiker_id: string | null;
12288
12694
  gebruiker_naam: string;
12289
12695
  gestart_op: string | null;
12290
12696
  id: string;
12697
+ idempotentie_sleutel: string | null;
12291
12698
  is_herprint: boolean;
12292
12699
  kopieen: number;
12293
12700
  layout_id: string | null;
12294
12701
  opgepakt_op: string | null;
12295
12702
  paginas: number;
12296
12703
  payload: import("../integrations/supabase/types").Json;
12704
+ pdf_base64: string | null;
12705
+ pdf_url: string | null;
12297
12706
  pogingen: number;
12298
12707
  printer_id: string | null;
12299
12708
  render_html: string | null;
12300
12709
  status: import("../integrations/supabase/types").Database["public"]["Enums"]["print_job_status"];
12301
12710
  updated_at: string;
12711
+ volgende_poging: string | null;
12302
12712
  voltooid_op: string | null;
12303
12713
  };
12304
12714
  Insert: {
@@ -12307,22 +12717,27 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
12307
12717
  created_at?: string;
12308
12718
  documentnaam?: string;
12309
12719
  documenttype?: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"];
12720
+ extern_job_id?: string | null;
12310
12721
  foutmelding?: string | null;
12311
12722
  gebruiker_id?: string | null;
12312
12723
  gebruiker_naam?: string;
12313
12724
  gestart_op?: string | null;
12314
12725
  id?: string;
12726
+ idempotentie_sleutel?: string | null;
12315
12727
  is_herprint?: boolean;
12316
12728
  kopieen?: number;
12317
12729
  layout_id?: string | null;
12318
12730
  opgepakt_op?: string | null;
12319
12731
  paginas?: number;
12320
12732
  payload?: import("../integrations/supabase/types").Json;
12733
+ pdf_base64?: string | null;
12734
+ pdf_url?: string | null;
12321
12735
  pogingen?: number;
12322
12736
  printer_id?: string | null;
12323
12737
  render_html?: string | null;
12324
12738
  status?: import("../integrations/supabase/types").Database["public"]["Enums"]["print_job_status"];
12325
12739
  updated_at?: string;
12740
+ volgende_poging?: string | null;
12326
12741
  voltooid_op?: string | null;
12327
12742
  };
12328
12743
  Update: {
@@ -12331,22 +12746,27 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
12331
12746
  created_at?: string;
12332
12747
  documentnaam?: string;
12333
12748
  documenttype?: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"];
12749
+ extern_job_id?: string | null;
12334
12750
  foutmelding?: string | null;
12335
12751
  gebruiker_id?: string | null;
12336
12752
  gebruiker_naam?: string;
12337
12753
  gestart_op?: string | null;
12338
12754
  id?: string;
12755
+ idempotentie_sleutel?: string | null;
12339
12756
  is_herprint?: boolean;
12340
12757
  kopieen?: number;
12341
12758
  layout_id?: string | null;
12342
12759
  opgepakt_op?: string | null;
12343
12760
  paginas?: number;
12344
12761
  payload?: import("../integrations/supabase/types").Json;
12762
+ pdf_base64?: string | null;
12763
+ pdf_url?: string | null;
12345
12764
  pogingen?: number;
12346
12765
  printer_id?: string | null;
12347
12766
  render_html?: string | null;
12348
12767
  status?: import("../integrations/supabase/types").Database["public"]["Enums"]["print_job_status"];
12349
12768
  updated_at?: string;
12769
+ volgende_poging?: string | null;
12350
12770
  voltooid_op?: string | null;
12351
12771
  };
12352
12772
  Relationships: [{
@@ -12369,6 +12789,72 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
12369
12789
  referencedColumns: ["id"];
12370
12790
  }];
12371
12791
  };
12792
+ print_queue_runners: {
12793
+ Row: {
12794
+ actief: boolean;
12795
+ basis_url: string;
12796
+ created_at: string;
12797
+ id: string;
12798
+ laatst_gezien: string;
12799
+ laatste_fout: string | null;
12800
+ laatste_request_id: number | null;
12801
+ mislukte_posts: number;
12802
+ tick_sleutel: string;
12803
+ updated_at: string;
12804
+ };
12805
+ Insert: {
12806
+ actief?: boolean;
12807
+ basis_url: string;
12808
+ created_at?: string;
12809
+ id?: string;
12810
+ laatst_gezien?: string;
12811
+ laatste_fout?: string | null;
12812
+ laatste_request_id?: number | null;
12813
+ mislukte_posts?: number;
12814
+ tick_sleutel?: string;
12815
+ updated_at?: string;
12816
+ };
12817
+ Update: {
12818
+ actief?: boolean;
12819
+ basis_url?: string;
12820
+ created_at?: string;
12821
+ id?: string;
12822
+ laatst_gezien?: string;
12823
+ laatste_fout?: string | null;
12824
+ laatste_request_id?: number | null;
12825
+ mislukte_posts?: number;
12826
+ tick_sleutel?: string;
12827
+ updated_at?: string;
12828
+ };
12829
+ Relationships: [];
12830
+ };
12831
+ print_queue_settings: {
12832
+ Row: {
12833
+ bewaar_bestanden_dagen: number;
12834
+ bewaar_opdrachten_dagen: number;
12835
+ created_at: string;
12836
+ dubbel_venster_minuten: number;
12837
+ id: string;
12838
+ updated_at: string;
12839
+ };
12840
+ Insert: {
12841
+ bewaar_bestanden_dagen?: number;
12842
+ bewaar_opdrachten_dagen?: number;
12843
+ created_at?: string;
12844
+ dubbel_venster_minuten?: number;
12845
+ id?: string;
12846
+ updated_at?: string;
12847
+ };
12848
+ Update: {
12849
+ bewaar_bestanden_dagen?: number;
12850
+ bewaar_opdrachten_dagen?: number;
12851
+ created_at?: string;
12852
+ dubbel_venster_minuten?: number;
12853
+ id?: string;
12854
+ updated_at?: string;
12855
+ };
12856
+ Relationships: [];
12857
+ };
12372
12858
  print_rules: {
12373
12859
  Row: {
12374
12860
  actief: boolean;
@@ -12529,6 +13015,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
12529
13015
  agent_id: string | null;
12530
13016
  created_at: string;
12531
13017
  driver: string;
13018
+ extern_printer_id: string | null;
12532
13019
  id: string;
12533
13020
  ip_adres: string | null;
12534
13021
  laatst_gezien: string | null;
@@ -12550,6 +13037,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
12550
13037
  agent_id?: string | null;
12551
13038
  created_at?: string;
12552
13039
  driver?: string;
13040
+ extern_printer_id?: string | null;
12553
13041
  id?: string;
12554
13042
  ip_adres?: string | null;
12555
13043
  laatst_gezien?: string | null;
@@ -12571,6 +13059,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
12571
13059
  agent_id?: string | null;
12572
13060
  created_at?: string;
12573
13061
  driver?: string;
13062
+ extern_printer_id?: string | null;
12574
13063
  id?: string;
12575
13064
  ip_adres?: string | null;
12576
13065
  laatst_gezien?: string | null;
@@ -13842,6 +14331,96 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
13842
14331
  referencedColumns: ["id"];
13843
14332
  }];
13844
14333
  };
14334
+ role_assignments: {
14335
+ Row: {
14336
+ created_at: string;
14337
+ id: string;
14338
+ role_id: string;
14339
+ user_id: string;
14340
+ };
14341
+ Insert: {
14342
+ created_at?: string;
14343
+ id?: string;
14344
+ role_id: string;
14345
+ user_id: string;
14346
+ };
14347
+ Update: {
14348
+ created_at?: string;
14349
+ id?: string;
14350
+ role_id?: string;
14351
+ user_id?: string;
14352
+ };
14353
+ Relationships: [{
14354
+ foreignKeyName: "role_assignments_role_id_fkey";
14355
+ columns: ["role_id"];
14356
+ isOneToOne: false;
14357
+ referencedRelation: "roles";
14358
+ referencedColumns: ["id"];
14359
+ }];
14360
+ };
14361
+ role_permissions: {
14362
+ Row: {
14363
+ can_edit: boolean;
14364
+ can_view: boolean;
14365
+ feature_id: string;
14366
+ id: string;
14367
+ module_id: string;
14368
+ role_id: string;
14369
+ updated_at: string;
14370
+ };
14371
+ Insert: {
14372
+ can_edit?: boolean;
14373
+ can_view?: boolean;
14374
+ feature_id?: string;
14375
+ id?: string;
14376
+ module_id: string;
14377
+ role_id: string;
14378
+ updated_at?: string;
14379
+ };
14380
+ Update: {
14381
+ can_edit?: boolean;
14382
+ can_view?: boolean;
14383
+ feature_id?: string;
14384
+ id?: string;
14385
+ module_id?: string;
14386
+ role_id?: string;
14387
+ updated_at?: string;
14388
+ };
14389
+ Relationships: [{
14390
+ foreignKeyName: "role_permissions_role_id_fkey";
14391
+ columns: ["role_id"];
14392
+ isOneToOne: false;
14393
+ referencedRelation: "roles";
14394
+ referencedColumns: ["id"];
14395
+ }];
14396
+ };
14397
+ roles: {
14398
+ Row: {
14399
+ created_at: string;
14400
+ id: string;
14401
+ is_protected: boolean;
14402
+ key: string;
14403
+ name: string;
14404
+ updated_at: string;
14405
+ };
14406
+ Insert: {
14407
+ created_at?: string;
14408
+ id?: string;
14409
+ is_protected?: boolean;
14410
+ key: string;
14411
+ name: string;
14412
+ updated_at?: string;
14413
+ };
14414
+ Update: {
14415
+ created_at?: string;
14416
+ id?: string;
14417
+ is_protected?: boolean;
14418
+ key?: string;
14419
+ name?: string;
14420
+ updated_at?: string;
14421
+ };
14422
+ Relationships: [];
14423
+ };
13845
14424
  rooms: {
13846
14425
  Row: {
13847
14426
  capacity: number;
@@ -14511,99 +15090,252 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
14511
15090
  };
14512
15091
  Relationships: [];
14513
15092
  };
14514
- time_entries: {
15093
+ time_compensation_entries: {
14515
15094
  Row: {
14516
15095
  created_at: string;
14517
15096
  employee_id: string;
14518
15097
  entry_date: string;
14519
- hours: number;
14520
15098
  id: string;
15099
+ km: number;
15100
+ meal_allowance: number;
14521
15101
  notes: string | null;
14522
- overtime: number;
14523
- undertime: number;
15102
+ standby_evening: number;
15103
+ standby_weekend: number;
15104
+ tvt_change: number;
14524
15105
  updated_at: string;
14525
15106
  };
14526
15107
  Insert: {
14527
15108
  created_at?: string;
14528
15109
  employee_id: string;
14529
15110
  entry_date: string;
14530
- hours?: number;
14531
15111
  id?: string;
15112
+ km?: number;
15113
+ meal_allowance?: number;
14532
15114
  notes?: string | null;
14533
- overtime?: number;
14534
- undertime?: number;
15115
+ standby_evening?: number;
15116
+ standby_weekend?: number;
15117
+ tvt_change?: number;
14535
15118
  updated_at?: string;
14536
15119
  };
14537
15120
  Update: {
14538
15121
  created_at?: string;
14539
15122
  employee_id?: string;
14540
15123
  entry_date?: string;
14541
- hours?: number;
14542
15124
  id?: string;
15125
+ km?: number;
15126
+ meal_allowance?: number;
14543
15127
  notes?: string | null;
14544
- overtime?: number;
14545
- undertime?: number;
15128
+ standby_evening?: number;
15129
+ standby_weekend?: number;
15130
+ tvt_change?: number;
14546
15131
  updated_at?: string;
14547
15132
  };
14548
15133
  Relationships: [{
14549
- foreignKeyName: "time_entries_employee_id_fkey";
15134
+ foreignKeyName: "time_compensation_entries_employee_id_fkey";
14550
15135
  columns: ["employee_id"];
14551
15136
  isOneToOne: false;
14552
- referencedRelation: "monteurs";
15137
+ referencedRelation: "profiles";
14553
15138
  referencedColumns: ["id"];
14554
15139
  }];
14555
15140
  };
14556
- time_logs: {
15141
+ time_entries: {
14557
15142
  Row: {
14558
15143
  created_at: string;
14559
15144
  employee_id: string;
14560
- end_time: string | null;
15145
+ entry_date: string;
15146
+ hours: number;
14561
15147
  id: string;
14562
15148
  notes: string | null;
14563
- overtime_hours: number;
14564
- overtime_type: string | null;
14565
- regular_hours: number;
14566
- start_time: string;
14567
- travel_cost: number | null;
14568
- travel_distance_km: number | null;
14569
- type: string;
15149
+ overtime: number;
15150
+ undertime: number;
14570
15151
  updated_at: string;
14571
15152
  };
14572
15153
  Insert: {
14573
15154
  created_at?: string;
14574
15155
  employee_id: string;
14575
- end_time?: string | null;
15156
+ entry_date: string;
15157
+ hours?: number;
14576
15158
  id?: string;
14577
15159
  notes?: string | null;
14578
- overtime_hours?: number;
14579
- overtime_type?: string | null;
14580
- regular_hours?: number;
14581
- start_time?: string;
14582
- travel_cost?: number | null;
14583
- travel_distance_km?: number | null;
14584
- type: string;
15160
+ overtime?: number;
15161
+ undertime?: number;
14585
15162
  updated_at?: string;
14586
15163
  };
14587
15164
  Update: {
14588
15165
  created_at?: string;
14589
15166
  employee_id?: string;
14590
- end_time?: string | null;
15167
+ entry_date?: string;
15168
+ hours?: number;
14591
15169
  id?: string;
14592
15170
  notes?: string | null;
14593
- overtime_hours?: number;
14594
- overtime_type?: string | null;
14595
- regular_hours?: number;
14596
- start_time?: string;
14597
- travel_cost?: number | null;
14598
- travel_distance_km?: number | null;
14599
- type?: string;
15171
+ overtime?: number;
15172
+ undertime?: number;
14600
15173
  updated_at?: string;
14601
15174
  };
14602
- Relationships: [{
14603
- foreignKeyName: "time_logs_employee_id_fkey";
15175
+ Relationships: [];
15176
+ };
15177
+ time_log_week_approvals: {
15178
+ Row: {
15179
+ approved_at: string | null;
15180
+ approved_by: string | null;
15181
+ created_at: string;
15182
+ employee_id: string;
15183
+ id: string;
15184
+ locked: boolean;
15185
+ notes: string | null;
15186
+ status: string;
15187
+ submitted_at: string | null;
15188
+ updated_at: string;
15189
+ week_start: string;
15190
+ };
15191
+ Insert: {
15192
+ approved_at?: string | null;
15193
+ approved_by?: string | null;
15194
+ created_at?: string;
15195
+ employee_id: string;
15196
+ id?: string;
15197
+ locked?: boolean;
15198
+ notes?: string | null;
15199
+ status?: string;
15200
+ submitted_at?: string | null;
15201
+ updated_at?: string;
15202
+ week_start: string;
15203
+ };
15204
+ Update: {
15205
+ approved_at?: string | null;
15206
+ approved_by?: string | null;
15207
+ created_at?: string;
15208
+ employee_id?: string;
15209
+ id?: string;
15210
+ locked?: boolean;
15211
+ notes?: string | null;
15212
+ status?: string;
15213
+ submitted_at?: string | null;
15214
+ updated_at?: string;
15215
+ week_start?: string;
15216
+ };
15217
+ Relationships: [{
15218
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
15219
+ columns: ["employee_id"];
15220
+ isOneToOne: false;
15221
+ referencedRelation: "profiles";
15222
+ referencedColumns: ["id"];
15223
+ }];
15224
+ };
15225
+ time_logs: {
15226
+ Row: {
15227
+ auto_stop_reason: string | null;
15228
+ auto_stopped: boolean;
15229
+ created_at: string;
15230
+ current_latitude: number | null;
15231
+ current_longitude: number | null;
15232
+ current_position_updated_at: string | null;
15233
+ employee_id: string;
15234
+ end_latitude: number | null;
15235
+ end_longitude: number | null;
15236
+ end_time: string | null;
15237
+ eta_distance_km: number | null;
15238
+ eta_minutes: number | null;
15239
+ eta_updated_at: string | null;
15240
+ hour_category: string | null;
15241
+ id: string;
15242
+ last_reminder_at: string | null;
15243
+ notes: string | null;
15244
+ overtime_hours: number;
15245
+ overtime_type: string | null;
15246
+ regular_hours: number;
15247
+ reminder_count: number;
15248
+ requires_review: boolean;
15249
+ start_latitude: number | null;
15250
+ start_longitude: number | null;
15251
+ start_time: string;
15252
+ travel_cost: number | null;
15253
+ travel_distance_km: number | null;
15254
+ travel_duration_min: number | null;
15255
+ travel_time_minutes: number | null;
15256
+ type: string;
15257
+ updated_at: string;
15258
+ work_order_id: string | null;
15259
+ };
15260
+ Insert: {
15261
+ auto_stop_reason?: string | null;
15262
+ auto_stopped?: boolean;
15263
+ created_at?: string;
15264
+ current_latitude?: number | null;
15265
+ current_longitude?: number | null;
15266
+ current_position_updated_at?: string | null;
15267
+ employee_id: string;
15268
+ end_latitude?: number | null;
15269
+ end_longitude?: number | null;
15270
+ end_time?: string | null;
15271
+ eta_distance_km?: number | null;
15272
+ eta_minutes?: number | null;
15273
+ eta_updated_at?: string | null;
15274
+ hour_category?: string | null;
15275
+ id?: string;
15276
+ last_reminder_at?: string | null;
15277
+ notes?: string | null;
15278
+ overtime_hours?: number;
15279
+ overtime_type?: string | null;
15280
+ regular_hours?: number;
15281
+ reminder_count?: number;
15282
+ requires_review?: boolean;
15283
+ start_latitude?: number | null;
15284
+ start_longitude?: number | null;
15285
+ start_time?: string;
15286
+ travel_cost?: number | null;
15287
+ travel_distance_km?: number | null;
15288
+ travel_duration_min?: number | null;
15289
+ travel_time_minutes?: number | null;
15290
+ type: string;
15291
+ updated_at?: string;
15292
+ work_order_id?: string | null;
15293
+ };
15294
+ Update: {
15295
+ auto_stop_reason?: string | null;
15296
+ auto_stopped?: boolean;
15297
+ created_at?: string;
15298
+ current_latitude?: number | null;
15299
+ current_longitude?: number | null;
15300
+ current_position_updated_at?: string | null;
15301
+ employee_id?: string;
15302
+ end_latitude?: number | null;
15303
+ end_longitude?: number | null;
15304
+ end_time?: string | null;
15305
+ eta_distance_km?: number | null;
15306
+ eta_minutes?: number | null;
15307
+ eta_updated_at?: string | null;
15308
+ hour_category?: string | null;
15309
+ id?: string;
15310
+ last_reminder_at?: string | null;
15311
+ notes?: string | null;
15312
+ overtime_hours?: number;
15313
+ overtime_type?: string | null;
15314
+ regular_hours?: number;
15315
+ reminder_count?: number;
15316
+ requires_review?: boolean;
15317
+ start_latitude?: number | null;
15318
+ start_longitude?: number | null;
15319
+ start_time?: string;
15320
+ travel_cost?: number | null;
15321
+ travel_distance_km?: number | null;
15322
+ travel_duration_min?: number | null;
15323
+ travel_time_minutes?: number | null;
15324
+ type?: string;
15325
+ updated_at?: string;
15326
+ work_order_id?: string | null;
15327
+ };
15328
+ Relationships: [{
15329
+ foreignKeyName: "time_logs_employee_id_fkey";
14604
15330
  columns: ["employee_id"];
14605
15331
  isOneToOne: false;
14606
- referencedRelation: "monteurs";
15332
+ referencedRelation: "profiles";
15333
+ referencedColumns: ["id"];
15334
+ }, {
15335
+ foreignKeyName: "time_logs_work_order_id_fkey";
15336
+ columns: ["work_order_id"];
15337
+ isOneToOne: false;
15338
+ referencedRelation: "work_orders";
14607
15339
  referencedColumns: ["id"];
14608
15340
  }];
14609
15341
  };
@@ -14642,7 +15374,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
14642
15374
  foreignKeyName: "time_off_entries_employee_id_fkey";
14643
15375
  columns: ["employee_id"];
14644
15376
  isOneToOne: false;
14645
- referencedRelation: "monteurs";
15377
+ referencedRelation: "profiles";
14646
15378
  referencedColumns: ["id"];
14647
15379
  }];
14648
15380
  };
@@ -14952,6 +15684,39 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
14952
15684
  };
14953
15685
  Relationships: [];
14954
15686
  };
15687
+ twinfield_cron_locks: {
15688
+ Row: {
15689
+ created_at: string;
15690
+ heartbeat_at: string;
15691
+ job_name: string;
15692
+ last_error: string | null;
15693
+ last_finished_at: string | null;
15694
+ locked_at: string;
15695
+ run_id: string;
15696
+ updated_at: string;
15697
+ };
15698
+ Insert: {
15699
+ created_at?: string;
15700
+ heartbeat_at?: string;
15701
+ job_name: string;
15702
+ last_error?: string | null;
15703
+ last_finished_at?: string | null;
15704
+ locked_at?: string;
15705
+ run_id?: string;
15706
+ updated_at?: string;
15707
+ };
15708
+ Update: {
15709
+ created_at?: string;
15710
+ heartbeat_at?: string;
15711
+ job_name?: string;
15712
+ last_error?: string | null;
15713
+ last_finished_at?: string | null;
15714
+ locked_at?: string;
15715
+ run_id?: string;
15716
+ updated_at?: string;
15717
+ };
15718
+ Relationships: [];
15719
+ };
14955
15720
  twinfield_customers: {
14956
15721
  Row: {
14957
15722
  address: string | null;
@@ -15206,6 +15971,8 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
15206
15971
  };
15207
15972
  twinfield_invoice_settings: {
15208
15973
  Row: {
15974
+ auto_invoice_enabled: boolean;
15975
+ auto_invoice_trigger_statuses: string[];
15209
15976
  created_at: string;
15210
15977
  debtor_gl_account: string;
15211
15978
  default_credit_invoice_type: string | null;
@@ -15226,6 +15993,8 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
15226
15993
  vat_code_export: string | null;
15227
15994
  };
15228
15995
  Insert: {
15996
+ auto_invoice_enabled?: boolean;
15997
+ auto_invoice_trigger_statuses?: string[];
15229
15998
  created_at?: string;
15230
15999
  debtor_gl_account?: string;
15231
16000
  default_credit_invoice_type?: string | null;
@@ -15246,6 +16015,8 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
15246
16015
  vat_code_export?: string | null;
15247
16016
  };
15248
16017
  Update: {
16018
+ auto_invoice_enabled?: boolean;
16019
+ auto_invoice_trigger_statuses?: string[];
15249
16020
  created_at?: string;
15250
16021
  debtor_gl_account?: string;
15251
16022
  default_credit_invoice_type?: string | null;
@@ -15546,6 +16317,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
15546
16317
  twinfield_push_queue: {
15547
16318
  Row: {
15548
16319
  action: string;
16320
+ attempt_started_at: string | null;
15549
16321
  attempts: number;
15550
16322
  connection_id: string | null;
15551
16323
  created_at: string;
@@ -15562,6 +16334,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
15562
16334
  };
15563
16335
  Insert: {
15564
16336
  action?: string;
16337
+ attempt_started_at?: string | null;
15565
16338
  attempts?: number;
15566
16339
  connection_id?: string | null;
15567
16340
  created_at?: string;
@@ -15578,6 +16351,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
15578
16351
  };
15579
16352
  Update: {
15580
16353
  action?: string;
16354
+ attempt_started_at?: string | null;
15581
16355
  attempts?: number;
15582
16356
  connection_id?: string | null;
15583
16357
  created_at?: string;
@@ -15775,13 +16549,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
15775
16549
  workday_end?: string | null;
15776
16550
  workday_start?: string | null;
15777
16551
  };
15778
- Relationships: [{
15779
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
15780
- columns: ["monteur_id"];
15781
- isOneToOne: true;
15782
- referencedRelation: "monteurs";
15783
- referencedColumns: ["id"];
15784
- }];
16552
+ Relationships: [];
15785
16553
  };
15786
16554
  uren_entries: {
15787
16555
  Row: {
@@ -15827,12 +16595,6 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
15827
16595
  werkbon_id?: string | null;
15828
16596
  };
15829
16597
  Relationships: [{
15830
- foreignKeyName: "uren_entries_monteur_id_fkey";
15831
- columns: ["monteur_id"];
15832
- isOneToOne: false;
15833
- referencedRelation: "monteurs";
15834
- referencedColumns: ["id"];
15835
- }, {
15836
16598
  foreignKeyName: "uren_entries_werkbon_id_fkey";
15837
16599
  columns: ["werkbon_id"];
15838
16600
  isOneToOne: false;
@@ -16300,13 +17062,37 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
16300
17062
  submitted_at?: string | null;
16301
17063
  updated_at?: string;
16302
17064
  };
16303
- Relationships: [{
16304
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
16305
- columns: ["monteur_id"];
16306
- isOneToOne: false;
16307
- referencedRelation: "monteurs";
16308
- referencedColumns: ["id"];
16309
- }];
17065
+ Relationships: [];
17066
+ };
17067
+ user_module_permissions: {
17068
+ Row: {
17069
+ created_at: string;
17070
+ feature_id: string;
17071
+ id: string;
17072
+ module_id: string;
17073
+ permission: string;
17074
+ updated_at: string;
17075
+ user_id: string;
17076
+ };
17077
+ Insert: {
17078
+ created_at?: string;
17079
+ feature_id?: string;
17080
+ id?: string;
17081
+ module_id: string;
17082
+ permission: string;
17083
+ updated_at?: string;
17084
+ user_id: string;
17085
+ };
17086
+ Update: {
17087
+ created_at?: string;
17088
+ feature_id?: string;
17089
+ id?: string;
17090
+ module_id?: string;
17091
+ permission?: string;
17092
+ updated_at?: string;
17093
+ user_id?: string;
17094
+ };
17095
+ Relationships: [];
16310
17096
  };
16311
17097
  user_roles: {
16312
17098
  Row: {
@@ -16335,6 +17121,51 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
16335
17121
  referencedColumns: ["id"];
16336
17122
  }];
16337
17123
  };
17124
+ van_inventories: {
17125
+ Row: {
17126
+ barcode: string | null;
17127
+ created_at: string;
17128
+ id: string;
17129
+ monteur_id: string | null;
17130
+ price_per_unit: number;
17131
+ product_name: string;
17132
+ quantity_current: number;
17133
+ quantity_min: number;
17134
+ unit: string;
17135
+ updated_at: string;
17136
+ };
17137
+ Insert: {
17138
+ barcode?: string | null;
17139
+ created_at?: string;
17140
+ id?: string;
17141
+ monteur_id?: string | null;
17142
+ price_per_unit?: number;
17143
+ product_name: string;
17144
+ quantity_current?: number;
17145
+ quantity_min?: number;
17146
+ unit?: string;
17147
+ updated_at?: string;
17148
+ };
17149
+ Update: {
17150
+ barcode?: string | null;
17151
+ created_at?: string;
17152
+ id?: string;
17153
+ monteur_id?: string | null;
17154
+ price_per_unit?: number;
17155
+ product_name?: string;
17156
+ quantity_current?: number;
17157
+ quantity_min?: number;
17158
+ unit?: string;
17159
+ updated_at?: string;
17160
+ };
17161
+ Relationships: [{
17162
+ foreignKeyName: "van_inventories_monteur_id_fkey";
17163
+ columns: ["monteur_id"];
17164
+ isOneToOne: false;
17165
+ referencedRelation: "profiles";
17166
+ referencedColumns: ["id"];
17167
+ }];
17168
+ };
16338
17169
  voorraad_custom_fields: {
16339
17170
  Row: {
16340
17171
  created_at: string;
@@ -17285,7 +18116,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
17285
18116
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
17286
18117
  columns: ["monteur_id"];
17287
18118
  isOneToOne: false;
17288
- referencedRelation: "monteurs";
18119
+ referencedRelation: "profiles";
17289
18120
  referencedColumns: ["id"];
17290
18121
  }, {
17291
18122
  foreignKeyName: "work_order_monteurs_work_order_id_fkey";
@@ -17295,6 +18126,60 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
17295
18126
  referencedColumns: ["id"];
17296
18127
  }];
17297
18128
  };
18129
+ work_order_photos: {
18130
+ Row: {
18131
+ ai_caption: string | null;
18132
+ ai_categorized_at: string | null;
18133
+ ai_labels: import("../integrations/supabase/types").Json | null;
18134
+ caption: string | null;
18135
+ created_at: string;
18136
+ id: string;
18137
+ monteur_id: string | null;
18138
+ photo_type: string;
18139
+ storage_path: string;
18140
+ updated_at: string;
18141
+ work_order_id: string;
18142
+ };
18143
+ Insert: {
18144
+ ai_caption?: string | null;
18145
+ ai_categorized_at?: string | null;
18146
+ ai_labels?: import("../integrations/supabase/types").Json | null;
18147
+ caption?: string | null;
18148
+ created_at?: string;
18149
+ id?: string;
18150
+ monteur_id?: string | null;
18151
+ photo_type?: string;
18152
+ storage_path: string;
18153
+ updated_at?: string;
18154
+ work_order_id: string;
18155
+ };
18156
+ Update: {
18157
+ ai_caption?: string | null;
18158
+ ai_categorized_at?: string | null;
18159
+ ai_labels?: import("../integrations/supabase/types").Json | null;
18160
+ caption?: string | null;
18161
+ created_at?: string;
18162
+ id?: string;
18163
+ monteur_id?: string | null;
18164
+ photo_type?: string;
18165
+ storage_path?: string;
18166
+ updated_at?: string;
18167
+ work_order_id?: string;
18168
+ };
18169
+ Relationships: [{
18170
+ foreignKeyName: "work_order_photos_monteur_id_fkey";
18171
+ columns: ["monteur_id"];
18172
+ isOneToOne: false;
18173
+ referencedRelation: "profiles";
18174
+ referencedColumns: ["id"];
18175
+ }, {
18176
+ foreignKeyName: "work_order_photos_work_order_id_fkey";
18177
+ columns: ["work_order_id"];
18178
+ isOneToOne: false;
18179
+ referencedRelation: "work_orders";
18180
+ referencedColumns: ["id"];
18181
+ }];
18182
+ };
17298
18183
  work_orders: {
17299
18184
  Row: {
17300
18185
  assigned_to: string | null;
@@ -17326,7 +18211,6 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
17326
18211
  scheduled_end_time: string | null;
17327
18212
  scheduled_start_time: string | null;
17328
18213
  status: string;
17329
- tenant_id: string;
17330
18214
  total_hours_worked: number | null;
17331
18215
  total_price: number | null;
17332
18216
  travel_time_minutes: number | null;
@@ -17364,7 +18248,6 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
17364
18248
  scheduled_end_time?: string | null;
17365
18249
  scheduled_start_time?: string | null;
17366
18250
  status?: string;
17367
- tenant_id: string;
17368
18251
  total_hours_worked?: number | null;
17369
18252
  total_price?: number | null;
17370
18253
  travel_time_minutes?: number | null;
@@ -17402,7 +18285,6 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
17402
18285
  scheduled_end_time?: string | null;
17403
18286
  scheduled_start_time?: string | null;
17404
18287
  status?: string;
17405
- tenant_id?: string;
17406
18288
  total_hours_worked?: number | null;
17407
18289
  total_price?: number | null;
17408
18290
  travel_time_minutes?: number | null;
@@ -17416,12 +18298,6 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
17416
18298
  isOneToOne: false;
17417
18299
  referencedRelation: "work_orders";
17418
18300
  referencedColumns: ["id"];
17419
- }, {
17420
- foreignKeyName: "work_orders_tenant_id_fkey";
17421
- columns: ["tenant_id"];
17422
- isOneToOne: false;
17423
- referencedRelation: "tenants";
17424
- referencedColumns: ["id"];
17425
18301
  }];
17426
18302
  };
17427
18303
  };
@@ -18106,6 +18982,19 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
18106
18982
  };
18107
18983
  Returns: undefined;
18108
18984
  };
18985
+ approve_mailbox_order_proposal: {
18986
+ Args: {
18987
+ p_custom_fields: import("../integrations/supabase/types").Json;
18988
+ p_customer_id: string;
18989
+ p_delivery_date: string;
18990
+ p_field_values?: import("../integrations/supabase/types").Json;
18991
+ p_lines: import("../integrations/supabase/types").Json;
18992
+ p_notes: string;
18993
+ p_proposal_id: string;
18994
+ p_reviewed_by: string;
18995
+ };
18996
+ Returns: import("../integrations/supabase/types").Json;
18997
+ };
18109
18998
  assign_cart_numbers: {
18110
18999
  Args: {
18111
19000
  p_carts: import("../integrations/supabase/types").Json;
@@ -18141,6 +19030,10 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
18141
19030
  processed_items: number;
18142
19031
  }[];
18143
19032
  };
19033
+ backfill_order_auto_invoice_queue: {
19034
+ Args: never;
19035
+ Returns: number;
19036
+ };
18144
19037
  calculate_layer_stock: {
18145
19038
  Args: {
18146
19039
  p_product_id: string;
@@ -18153,6 +19046,10 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
18153
19046
  };
18154
19047
  Returns: number;
18155
19048
  };
19049
+ can_manage_hours: {
19050
+ Args: never;
19051
+ Returns: boolean;
19052
+ };
18156
19053
  check_offer_product_available_stock: {
18157
19054
  Args: {
18158
19055
  p_campaign_product_id: string;
@@ -18175,7 +19072,78 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
18175
19072
  };
18176
19073
  Returns: import("../integrations/supabase/types").Json;
18177
19074
  };
18178
- claim_logistics_tasks: {
19075
+ claim_cloud_print_jobs: {
19076
+ Args: {
19077
+ _max?: number;
19078
+ };
19079
+ Returns: {
19080
+ agent_id: string | null;
19081
+ bron_job_id: string | null;
19082
+ created_at: string;
19083
+ documentnaam: string;
19084
+ documenttype: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"];
19085
+ extern_job_id: string | null;
19086
+ foutmelding: string | null;
19087
+ gebruiker_id: string | null;
19088
+ gebruiker_naam: string;
19089
+ gestart_op: string | null;
19090
+ id: string;
19091
+ idempotentie_sleutel: string | null;
19092
+ is_herprint: boolean;
19093
+ kopieen: number;
19094
+ layout_id: string | null;
19095
+ opgepakt_op: string | null;
19096
+ paginas: number;
19097
+ payload: import("../integrations/supabase/types").Json;
19098
+ pdf_base64: string | null;
19099
+ pdf_url: string | null;
19100
+ pogingen: number;
19101
+ printer_id: string | null;
19102
+ render_html: string | null;
19103
+ status: import("../integrations/supabase/types").Database["public"]["Enums"]["print_job_status"];
19104
+ updated_at: string;
19105
+ volgende_poging: string | null;
19106
+ voltooid_op: string | null;
19107
+ }[];
19108
+ SetofOptions: {
19109
+ from: "*";
19110
+ to: "print_jobs";
19111
+ isOneToOne: false;
19112
+ isSetofReturn: true;
19113
+ };
19114
+ };
19115
+ claim_floriday_stock_queue: {
19116
+ Args: {
19117
+ p_limit?: number;
19118
+ p_worker?: string;
19119
+ };
19120
+ Returns: {
19121
+ attempts: number;
19122
+ connection_id: string;
19123
+ created_at: string;
19124
+ desired_available: boolean | null;
19125
+ gateway_attempt_id: string | null;
19126
+ id: string;
19127
+ last_error: string | null;
19128
+ locked_at: string | null;
19129
+ locked_by: string | null;
19130
+ next_attempt_at: string;
19131
+ number_of_pieces: number;
19132
+ sent_at: string | null;
19133
+ status: string;
19134
+ superseded_by: string | null;
19135
+ trade_item_id: string;
19136
+ updated_at: string;
19137
+ user_id: string;
19138
+ }[];
19139
+ SetofOptions: {
19140
+ from: "*";
19141
+ to: "floriday_continuous_stock_queue";
19142
+ isOneToOne: false;
19143
+ isSetofReturn: true;
19144
+ };
19145
+ };
19146
+ claim_logistics_tasks: {
18179
19147
  Args: {
18180
19148
  _limit?: number;
18181
19149
  _owner_module: string;
@@ -18234,22 +19202,27 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
18234
19202
  created_at: string;
18235
19203
  documentnaam: string;
18236
19204
  documenttype: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"];
19205
+ extern_job_id: string | null;
18237
19206
  foutmelding: string | null;
18238
19207
  gebruiker_id: string | null;
18239
19208
  gebruiker_naam: string;
18240
19209
  gestart_op: string | null;
18241
19210
  id: string;
19211
+ idempotentie_sleutel: string | null;
18242
19212
  is_herprint: boolean;
18243
19213
  kopieen: number;
18244
19214
  layout_id: string | null;
18245
19215
  opgepakt_op: string | null;
18246
19216
  paginas: number;
18247
19217
  payload: import("../integrations/supabase/types").Json;
19218
+ pdf_base64: string | null;
19219
+ pdf_url: string | null;
18248
19220
  pogingen: number;
18249
19221
  printer_id: string | null;
18250
19222
  render_html: string | null;
18251
19223
  status: import("../integrations/supabase/types").Database["public"]["Enums"]["print_job_status"];
18252
19224
  updated_at: string;
19225
+ volgende_poging: string | null;
18253
19226
  voltooid_op: string | null;
18254
19227
  }[];
18255
19228
  SetofOptions: {
@@ -18266,6 +19239,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
18266
19239
  };
18267
19240
  Returns: {
18268
19241
  action: string;
19242
+ attempt_started_at: string | null;
18269
19243
  attempts: number;
18270
19244
  connection_id: string | null;
18271
19245
  created_at: string;
@@ -18287,10 +19261,28 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
18287
19261
  isSetofReturn: true;
18288
19262
  };
18289
19263
  };
19264
+ cleanup_floriday_stock_queue: {
19265
+ Args: never;
19266
+ Returns: undefined;
19267
+ };
18290
19268
  cleanup_old_bookings: {
18291
19269
  Args: never;
18292
19270
  Returns: undefined;
18293
19271
  };
19272
+ cleanup_voorraad_module_history: {
19273
+ Args: never;
19274
+ Returns: undefined;
19275
+ };
19276
+ complete_floriday_stock_queue: {
19277
+ Args: {
19278
+ p_attempt_id?: string;
19279
+ p_error?: string;
19280
+ p_id: string;
19281
+ p_ok: boolean;
19282
+ p_permanent?: boolean;
19283
+ };
19284
+ Returns: undefined;
19285
+ };
18294
19286
  consume_bom_for_production: {
18295
19287
  Args: {
18296
19288
  p_connection_id: string;
@@ -18335,6 +19327,30 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
18335
19327
  agent_naam: string;
18336
19328
  }[];
18337
19329
  };
19330
+ consume_van_inventory: {
19331
+ Args: {
19332
+ p_inventory_id: string;
19333
+ p_quantity: number;
19334
+ };
19335
+ Returns: {
19336
+ barcode: string | null;
19337
+ created_at: string;
19338
+ id: string;
19339
+ monteur_id: string | null;
19340
+ price_per_unit: number;
19341
+ product_name: string;
19342
+ quantity_current: number;
19343
+ quantity_min: number;
19344
+ unit: string;
19345
+ updated_at: string;
19346
+ };
19347
+ SetofOptions: {
19348
+ from: "*";
19349
+ to: "van_inventories";
19350
+ isOneToOne: true;
19351
+ isSetofReturn: false;
19352
+ };
19353
+ };
18338
19354
  control_get_todays_carts: {
18339
19355
  Args: never;
18340
19356
  Returns: {
@@ -18402,6 +19418,20 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
18402
19418
  };
18403
19419
  Returns: import("../integrations/supabase/types").Json;
18404
19420
  };
19421
+ effective_module_permission: {
19422
+ Args: {
19423
+ _module_id: string;
19424
+ _user_id: string;
19425
+ };
19426
+ Returns: string;
19427
+ } | {
19428
+ Args: {
19429
+ _feature_id: string;
19430
+ _module_id: string;
19431
+ _user_id: string;
19432
+ };
19433
+ Returns: string;
19434
+ };
18405
19435
  email_auth_decrypt: {
18406
19436
  Args: {
18407
19437
  cipher: string;
@@ -18752,12 +19782,6 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
18752
19782
  Args: never;
18753
19783
  Returns: string;
18754
19784
  };
18755
- get_work_order_tenant_id: {
18756
- Args: {
18757
- wo_id: string;
18758
- };
18759
- Returns: string;
18760
- };
18761
19785
  has_module_permission: {
18762
19786
  Args: {
18763
19787
  _min: string;
@@ -18791,6 +19815,13 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
18791
19815
  };
18792
19816
  Returns: boolean;
18793
19817
  };
19818
+ is_time_log_week_locked: {
19819
+ Args: {
19820
+ p_employee_id: string;
19821
+ p_start_time: string;
19822
+ };
19823
+ Returns: boolean;
19824
+ };
18794
19825
  is_user_admin: {
18795
19826
  Args: never;
18796
19827
  Returns: boolean;
@@ -18805,13 +19836,14 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
18805
19836
  };
18806
19837
  Returns: boolean;
18807
19838
  };
18808
- list_monteurs: {
19839
+ list_medewerkers: {
18809
19840
  Args: never;
18810
19841
  Returns: {
18811
19842
  avatar_url: string;
18812
19843
  display_name: string;
18813
19844
  email: string;
18814
19845
  id: string;
19846
+ roles: string[];
18815
19847
  }[];
18816
19848
  };
18817
19849
  list_my_planning_items: {
@@ -19205,6 +20237,51 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
19205
20237
  isSetofReturn: false;
19206
20238
  };
19207
20239
  };
20240
+ logistics_floriday_claim_pushes: {
20241
+ Args: {
20242
+ _lease_seconds?: number;
20243
+ _limit?: number;
20244
+ _worker?: string;
20245
+ };
20246
+ Returns: {
20247
+ attempts: number;
20248
+ fulfillment_order_id: string;
20249
+ id: string;
20250
+ last_sent_hash: string;
20251
+ order_ref: string;
20252
+ payload: import("../integrations/supabase/types").Json;
20253
+ payload_hash: string;
20254
+ revision: number;
20255
+ }[];
20256
+ };
20257
+ logistics_floriday_finish_push: {
20258
+ Args: {
20259
+ _error?: string;
20260
+ _fulfillment_order_id?: string;
20261
+ _id: string;
20262
+ _max_age_hours?: number;
20263
+ _max_attempts?: number;
20264
+ _ok: boolean;
20265
+ _permanent?: boolean;
20266
+ _revision: number;
20267
+ _sent_hash?: string;
20268
+ };
20269
+ Returns: string;
20270
+ };
20271
+ logistics_floriday_prune_pushes: {
20272
+ Args: {
20273
+ _days?: number;
20274
+ };
20275
+ Returns: number;
20276
+ };
20277
+ logistics_floriday_queue_push: {
20278
+ Args: {
20279
+ _order_ref: string;
20280
+ _payload?: import("../integrations/supabase/types").Json;
20281
+ _payload_hash?: string;
20282
+ };
20283
+ Returns: string;
20284
+ };
19208
20285
  logistics_live_carriers: {
19209
20286
  Args: {
19210
20287
  p_order_ref: string;
@@ -19257,6 +20334,65 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
19257
20334
  };
19258
20335
  Returns: number;
19259
20336
  };
20337
+ logistics_plan_claim: {
20338
+ Args: {
20339
+ p_limit?: number;
20340
+ };
20341
+ Returns: {
20342
+ attempts: number;
20343
+ id: string;
20344
+ order_id: string;
20345
+ }[];
20346
+ };
20347
+ logistics_plan_enqueue: {
20348
+ Args: {
20349
+ p_order_id: string;
20350
+ p_reason?: string;
20351
+ };
20352
+ Returns: undefined;
20353
+ };
20354
+ logistics_plan_ensure_event: {
20355
+ Args: {
20356
+ p_order_id: string;
20357
+ };
20358
+ Returns: boolean;
20359
+ };
20360
+ logistics_plan_finish: {
20361
+ Args: {
20362
+ p_error?: string;
20363
+ p_id: string;
20364
+ };
20365
+ Returns: undefined;
20366
+ };
20367
+ logistics_plan_impact_orders: {
20368
+ Args: {
20369
+ p_order_id: string;
20370
+ };
20371
+ Returns: {
20372
+ buffer_id: string;
20373
+ order_id: string;
20374
+ plan_date: string;
20375
+ }[];
20376
+ };
20377
+ logistics_plan_kick: {
20378
+ Args: never;
20379
+ Returns: undefined;
20380
+ };
20381
+ logistics_plan_prune: {
20382
+ Args: never;
20383
+ Returns: number;
20384
+ };
20385
+ logistics_plan_release_stale: {
20386
+ Args: never;
20387
+ Returns: number;
20388
+ };
20389
+ logistics_plan_setting: {
20390
+ Args: {
20391
+ p_default: number;
20392
+ p_key: string;
20393
+ };
20394
+ Returns: number;
20395
+ };
19260
20396
  logistics_queue_capacity_email: {
19261
20397
  Args: {
19262
20398
  p_alert_id: string;
@@ -19495,6 +20631,14 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
19495
20631
  };
19496
20632
  Returns: undefined;
19497
20633
  };
20634
+ my_module_permissions: {
20635
+ Args: never;
20636
+ Returns: {
20637
+ feature_id: string;
20638
+ module_id: string;
20639
+ permission: string;
20640
+ }[];
20641
+ };
19498
20642
  next_manufacture_partij: {
19499
20643
  Args: {
19500
20644
  _tenant_id: string;
@@ -19545,6 +20689,13 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
19545
20689
  };
19546
20690
  Returns: boolean;
19547
20691
  };
20692
+ opruim_print_historie: {
20693
+ Args: never;
20694
+ Returns: {
20695
+ ontdaan: number;
20696
+ verwijderd: number;
20697
+ }[];
20698
+ };
19548
20699
  order_number_prefix: {
19549
20700
  Args: {
19550
20701
  p_custom_fields?: import("../integrations/supabase/types").Json;
@@ -19552,6 +20703,15 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
19552
20703
  };
19553
20704
  Returns: string;
19554
20705
  };
20706
+ pick_active_printers: {
20707
+ Args: never;
20708
+ Returns: {
20709
+ id: string;
20710
+ locatie: string;
20711
+ naam: string;
20712
+ online: boolean;
20713
+ }[];
20714
+ };
19555
20715
  pick_claim_document: {
19556
20716
  Args: {
19557
20717
  _queue_item_id: string;
@@ -19738,6 +20898,52 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
19738
20898
  };
19739
20899
  Returns: undefined;
19740
20900
  };
20901
+ pick_reset_print: {
20902
+ Args: {
20903
+ _queue_item_id: string;
20904
+ _session_id: string;
20905
+ };
20906
+ Returns: {
20907
+ announced_at: string;
20908
+ assigned_user_id: string | null;
20909
+ barcode: string | null;
20910
+ cancelled_at: string | null;
20911
+ cart_count: number;
20912
+ completed_at: string | null;
20913
+ country_code: string | null;
20914
+ created_at: string;
20915
+ customer_name: string | null;
20916
+ delivery_address: string | null;
20917
+ document_number: string | null;
20918
+ document_type_id: string | null;
20919
+ due_at: string | null;
20920
+ id: string;
20921
+ is_urgent: boolean;
20922
+ line_count: number;
20923
+ order_number: string | null;
20924
+ order_type: string | null;
20925
+ payload: import("../integrations/supabase/types").Json;
20926
+ print_count: number;
20927
+ print_job_id: string | null;
20928
+ printed_at: string | null;
20929
+ printed_by: string | null;
20930
+ printer_id: string | null;
20931
+ priority: number;
20932
+ reference: string | null;
20933
+ route: string | null;
20934
+ screen_id: string | null;
20935
+ station_id: string | null;
20936
+ status_id: string | null;
20937
+ updated_at: string;
20938
+ warnings: import("../integrations/supabase/types").Json;
20939
+ };
20940
+ SetofOptions: {
20941
+ from: "*";
20942
+ to: "pick_queue";
20943
+ isOneToOne: true;
20944
+ isSetofReturn: false;
20945
+ };
20946
+ };
19741
20947
  pick_station_dashboard: {
19742
20948
  Args: never;
19743
20949
  Returns: {
@@ -19884,6 +21090,12 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
19884
21090
  };
19885
21091
  Returns: undefined;
19886
21092
  };
21093
+ reset_stalled_floriday_stock_queue: {
21094
+ Args: {
21095
+ p_include_failed?: boolean;
21096
+ };
21097
+ Returns: number;
21098
+ };
19887
21099
  resolve_group_allocation: {
19888
21100
  Args: {
19889
21101
  _needed: number;
@@ -19928,14 +21140,28 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
19928
21140
  };
19929
21141
  Returns: import("../integrations/supabase/types").Json;
19930
21142
  };
21143
+ ruim_print_jobs_op: {
21144
+ Args: {
21145
+ _bewaar_dagen?: number;
21146
+ };
21147
+ Returns: number;
21148
+ };
19931
21149
  run_floriday_continuous_stock_sync: {
19932
21150
  Args: never;
19933
21151
  Returns: undefined;
19934
21152
  };
21153
+ run_floriday_stock_queue_process: {
21154
+ Args: never;
21155
+ Returns: undefined;
21156
+ };
19935
21157
  run_logistics_tasks_dispatch: {
19936
21158
  Args: never;
19937
21159
  Returns: undefined;
19938
21160
  };
21161
+ run_print_queue_ticks: {
21162
+ Args: never;
21163
+ Returns: number;
21164
+ };
19939
21165
  run_twinfield_queue_tick: {
19940
21166
  Args: never;
19941
21167
  Returns: undefined;
@@ -20176,6 +21402,13 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
20176
21402
  };
20177
21403
  Returns: number;
20178
21404
  };
21405
+ schedule_floriday_stock_queue_process: {
21406
+ Args: {
21407
+ p_apikey: string;
21408
+ p_url: string;
21409
+ };
21410
+ Returns: number;
21411
+ };
20179
21412
  schedule_floriday_token_refresh: {
20180
21413
  Args: {
20181
21414
  p_apikey: string;
@@ -20282,6 +21515,16 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
20282
21515
  };
20283
21516
  Returns: string[];
20284
21517
  };
21518
+ switch_time_log: {
21519
+ Args: {
21520
+ p_employee_id: string;
21521
+ p_start_lat?: number;
21522
+ p_start_lng?: number;
21523
+ p_type: string;
21524
+ p_work_order_id?: string;
21525
+ };
21526
+ Returns: import("../integrations/supabase/types").Json;
21527
+ };
20285
21528
  sync_all_layer_stocks: {
20286
21529
  Args: never;
20287
21530
  Returns: undefined;
@@ -20316,6 +21559,15 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
20316
21559
  };
20317
21560
  Returns: undefined;
20318
21561
  };
21562
+ trade_item_stock_duplicates: {
21563
+ Args: never;
21564
+ Returns: {
21565
+ keys: string[];
21566
+ product_id: string;
21567
+ product_name: string;
21568
+ row_count: number;
21569
+ }[];
21570
+ };
20319
21571
  try_debtor_lock: {
20320
21572
  Args: {
20321
21573
  _group_key: string;
@@ -20323,6 +21575,24 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
20323
21575
  };
20324
21576
  Returns: boolean;
20325
21577
  };
21578
+ twinfield_cron_lock_acquire: {
21579
+ Args: {
21580
+ _job_name: string;
21581
+ _stale_seconds?: number;
21582
+ };
21583
+ Returns: boolean;
21584
+ };
21585
+ twinfield_cron_lock_release: {
21586
+ Args: {
21587
+ _error?: string;
21588
+ _job_name: string;
21589
+ };
21590
+ Returns: undefined;
21591
+ };
21592
+ twinfield_prune_push_queue: {
21593
+ Args: never;
21594
+ Returns: number;
21595
+ };
20326
21596
  twinfield_register_cron: {
20327
21597
  Args: {
20328
21598
  apikey?: string;
@@ -20365,7 +21635,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
20365
21635
  };
20366
21636
  Enums: {
20367
21637
  ai_import_status: "nieuw" | "verwerken" | "bevestigen" | "klaar" | "mislukt";
20368
- app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin";
21638
+ app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie";
20369
21639
  doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon";
20370
21640
  doc_orientation: "portrait" | "landscape";
20371
21641
  exact_env: "staging" | "live";