@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
@@ -871,6 +871,126 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
871
871
  };
872
872
  Relationships: [];
873
873
  };
874
+ cao_holidays: {
875
+ Row: {
876
+ created_at: string;
877
+ description: string | null;
878
+ holiday_date: string;
879
+ id: string;
880
+ updated_at: string;
881
+ };
882
+ Insert: {
883
+ created_at?: string;
884
+ description?: string | null;
885
+ holiday_date: string;
886
+ id?: string;
887
+ updated_at?: string;
888
+ };
889
+ Update: {
890
+ created_at?: string;
891
+ description?: string | null;
892
+ holiday_date?: string;
893
+ id?: string;
894
+ updated_at?: string;
895
+ };
896
+ Relationships: [];
897
+ };
898
+ cao_settings: {
899
+ Row: {
900
+ auto_break_after_hours: number;
901
+ auto_break_minutes: number;
902
+ auto_break_unpaid: boolean;
903
+ auto_stop_after_hours: number;
904
+ callout_fee: number;
905
+ created_at: string;
906
+ daily_regular_hours: number;
907
+ default_hourly_rate: number;
908
+ id: string;
909
+ materials_markup_percent: number;
910
+ max_daily_hours: number;
911
+ max_weekly_hours: number;
912
+ meal_allowance_amount: number;
913
+ overtime_pct_178: number;
914
+ overtime_pct_189: number;
915
+ overtime_pct_212: number;
916
+ reminder_after_hours: number;
917
+ standby_evening_amount: number;
918
+ standby_weekend_amount: number;
919
+ travel_cost_per_km: number | null;
920
+ travel_cost_threshold_km: number | null;
921
+ travel_counts_as_work: boolean;
922
+ travel_hourly_rate: number;
923
+ travel_rate_per_hour: number;
924
+ travel_threshold_minutes: number;
925
+ updated_at: string;
926
+ weekend_always_212: boolean;
927
+ window_end: string;
928
+ window_start: string;
929
+ };
930
+ Insert: {
931
+ auto_break_after_hours?: number;
932
+ auto_break_minutes?: number;
933
+ auto_break_unpaid?: boolean;
934
+ auto_stop_after_hours?: number;
935
+ callout_fee?: number;
936
+ created_at?: string;
937
+ daily_regular_hours?: number;
938
+ default_hourly_rate?: number;
939
+ id?: string;
940
+ materials_markup_percent?: number;
941
+ max_daily_hours?: number;
942
+ max_weekly_hours?: number;
943
+ meal_allowance_amount?: number;
944
+ overtime_pct_178?: number;
945
+ overtime_pct_189?: number;
946
+ overtime_pct_212?: number;
947
+ reminder_after_hours?: number;
948
+ standby_evening_amount?: number;
949
+ standby_weekend_amount?: number;
950
+ travel_cost_per_km?: number | null;
951
+ travel_cost_threshold_km?: number | null;
952
+ travel_counts_as_work?: boolean;
953
+ travel_hourly_rate?: number;
954
+ travel_rate_per_hour?: number;
955
+ travel_threshold_minutes?: number;
956
+ updated_at?: string;
957
+ weekend_always_212?: boolean;
958
+ window_end?: string;
959
+ window_start?: string;
960
+ };
961
+ Update: {
962
+ auto_break_after_hours?: number;
963
+ auto_break_minutes?: number;
964
+ auto_break_unpaid?: boolean;
965
+ auto_stop_after_hours?: number;
966
+ callout_fee?: number;
967
+ created_at?: string;
968
+ daily_regular_hours?: number;
969
+ default_hourly_rate?: number;
970
+ id?: string;
971
+ materials_markup_percent?: number;
972
+ max_daily_hours?: number;
973
+ max_weekly_hours?: number;
974
+ meal_allowance_amount?: number;
975
+ overtime_pct_178?: number;
976
+ overtime_pct_189?: number;
977
+ overtime_pct_212?: number;
978
+ reminder_after_hours?: number;
979
+ standby_evening_amount?: number;
980
+ standby_weekend_amount?: number;
981
+ travel_cost_per_km?: number | null;
982
+ travel_cost_threshold_km?: number | null;
983
+ travel_counts_as_work?: boolean;
984
+ travel_hourly_rate?: number;
985
+ travel_rate_per_hour?: number;
986
+ travel_threshold_minutes?: number;
987
+ updated_at?: string;
988
+ weekend_always_212?: boolean;
989
+ window_end?: string;
990
+ window_start?: string;
991
+ };
992
+ Relationships: [];
993
+ };
874
994
  carrier_shipping_rates: {
875
995
  Row: {
876
996
  carrier_id: string;
@@ -1683,7 +1803,7 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
1683
1803
  city: string | null;
1684
1804
  country: string | null;
1685
1805
  created_at: string;
1686
- customer_id: string | null;
1806
+ customer_id: string;
1687
1807
  external_key: string | null;
1688
1808
  external_provider: string | null;
1689
1809
  floriday_location_id: string | null;
@@ -1707,7 +1827,7 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
1707
1827
  city?: string | null;
1708
1828
  country?: string | null;
1709
1829
  created_at?: string;
1710
- customer_id?: string | null;
1830
+ customer_id: string;
1711
1831
  external_key?: string | null;
1712
1832
  external_provider?: string | null;
1713
1833
  floriday_location_id?: string | null;
@@ -1731,7 +1851,7 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
1731
1851
  city?: string | null;
1732
1852
  country?: string | null;
1733
1853
  created_at?: string;
1734
- customer_id?: string | null;
1854
+ customer_id?: string;
1735
1855
  external_key?: string | null;
1736
1856
  external_provider?: string | null;
1737
1857
  floriday_location_id?: string | null;
@@ -5694,12 +5814,17 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
5694
5814
  attempts: number;
5695
5815
  connection_id: string;
5696
5816
  created_at: string;
5817
+ desired_available: boolean | null;
5697
5818
  gateway_attempt_id: string | null;
5698
5819
  id: string;
5699
5820
  last_error: string | null;
5821
+ locked_at: string | null;
5822
+ locked_by: string | null;
5823
+ next_attempt_at: string;
5700
5824
  number_of_pieces: number;
5701
5825
  sent_at: string | null;
5702
5826
  status: string;
5827
+ superseded_by: string | null;
5703
5828
  trade_item_id: string;
5704
5829
  updated_at: string;
5705
5830
  user_id: string;
@@ -5708,12 +5833,17 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
5708
5833
  attempts?: number;
5709
5834
  connection_id: string;
5710
5835
  created_at?: string;
5836
+ desired_available?: boolean | null;
5711
5837
  gateway_attempt_id?: string | null;
5712
5838
  id?: string;
5713
5839
  last_error?: string | null;
5840
+ locked_at?: string | null;
5841
+ locked_by?: string | null;
5842
+ next_attempt_at?: string;
5714
5843
  number_of_pieces?: number;
5715
5844
  sent_at?: string | null;
5716
5845
  status?: string;
5846
+ superseded_by?: string | null;
5717
5847
  trade_item_id: string;
5718
5848
  updated_at?: string;
5719
5849
  user_id: string;
@@ -5722,12 +5852,17 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
5722
5852
  attempts?: number;
5723
5853
  connection_id?: string;
5724
5854
  created_at?: string;
5855
+ desired_available?: boolean | null;
5725
5856
  gateway_attempt_id?: string | null;
5726
5857
  id?: string;
5727
5858
  last_error?: string | null;
5859
+ locked_at?: string | null;
5860
+ locked_by?: string | null;
5861
+ next_attempt_at?: string;
5728
5862
  number_of_pieces?: number;
5729
5863
  sent_at?: string | null;
5730
5864
  status?: string;
5865
+ superseded_by?: string | null;
5731
5866
  trade_item_id?: string;
5732
5867
  updated_at?: string;
5733
5868
  user_id?: string;
@@ -6464,6 +6599,7 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
6464
6599
  Row: {
6465
6600
  buyer_organization_id: string | null;
6466
6601
  connection_id: string;
6602
+ controlled_at: string | null;
6467
6603
  created_at: string;
6468
6604
  data: import("../integrations/supabase/types").Json;
6469
6605
  floriday_id: string;
@@ -6475,6 +6611,7 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
6475
6611
  Insert: {
6476
6612
  buyer_organization_id?: string | null;
6477
6613
  connection_id: string;
6614
+ controlled_at?: string | null;
6478
6615
  created_at?: string;
6479
6616
  data: import("../integrations/supabase/types").Json;
6480
6617
  floriday_id: string;
@@ -6486,6 +6623,7 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
6486
6623
  Update: {
6487
6624
  buyer_organization_id?: string | null;
6488
6625
  connection_id?: string;
6626
+ controlled_at?: string | null;
6489
6627
  created_at?: string;
6490
6628
  data?: import("../integrations/supabase/types").Json;
6491
6629
  floriday_id?: string;
@@ -7387,6 +7525,54 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
7387
7525
  };
7388
7526
  Relationships: [];
7389
7527
  };
7528
+ invoice_timing_settings: {
7529
+ Row: {
7530
+ anchor: string;
7531
+ business_days_only: boolean;
7532
+ created_at: string;
7533
+ enabled: boolean;
7534
+ id: string;
7535
+ offset_days: number;
7536
+ pickup_anchor: string;
7537
+ pickup_business_days_only: boolean;
7538
+ pickup_offset_days: number;
7539
+ pickup_time_of_day: string;
7540
+ singleton: boolean;
7541
+ time_of_day: string;
7542
+ updated_at: string;
7543
+ };
7544
+ Insert: {
7545
+ anchor?: string;
7546
+ business_days_only?: boolean;
7547
+ created_at?: string;
7548
+ enabled?: boolean;
7549
+ id?: string;
7550
+ offset_days?: number;
7551
+ pickup_anchor?: string;
7552
+ pickup_business_days_only?: boolean;
7553
+ pickup_offset_days?: number;
7554
+ pickup_time_of_day?: string;
7555
+ singleton?: boolean;
7556
+ time_of_day?: string;
7557
+ updated_at?: string;
7558
+ };
7559
+ Update: {
7560
+ anchor?: string;
7561
+ business_days_only?: boolean;
7562
+ created_at?: string;
7563
+ enabled?: boolean;
7564
+ id?: string;
7565
+ offset_days?: number;
7566
+ pickup_anchor?: string;
7567
+ pickup_business_days_only?: boolean;
7568
+ pickup_offset_days?: number;
7569
+ pickup_time_of_day?: string;
7570
+ singleton?: boolean;
7571
+ time_of_day?: string;
7572
+ updated_at?: string;
7573
+ };
7574
+ Relationships: [];
7575
+ };
7390
7576
  itk_contact_persons: {
7391
7577
  Row: {
7392
7578
  created_at: string;
@@ -7699,7 +7885,6 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
7699
7885
  start_date: string;
7700
7886
  start_time: string | null;
7701
7887
  status: string;
7702
- tenant_id: string;
7703
7888
  updated_at: string;
7704
7889
  user_id: string;
7705
7890
  };
@@ -7717,7 +7902,6 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
7717
7902
  start_date: string;
7718
7903
  start_time?: string | null;
7719
7904
  status?: string;
7720
- tenant_id?: string;
7721
7905
  updated_at?: string;
7722
7906
  user_id: string;
7723
7907
  };
@@ -7735,7 +7919,6 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
7735
7919
  start_date?: string;
7736
7920
  start_time?: string | null;
7737
7921
  status?: string;
7738
- tenant_id?: string;
7739
7922
  updated_at?: string;
7740
7923
  user_id?: string;
7741
7924
  };
@@ -7743,13 +7926,13 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
7743
7926
  foreignKeyName: "leave_requests_monteur_id_fkey";
7744
7927
  columns: ["monteur_id"];
7745
7928
  isOneToOne: false;
7746
- referencedRelation: "monteurs";
7929
+ referencedRelation: "profiles";
7747
7930
  referencedColumns: ["id"];
7748
7931
  }, {
7749
7932
  foreignKeyName: "leave_requests_user_id_fkey";
7750
7933
  columns: ["user_id"];
7751
7934
  isOneToOne: false;
7752
- referencedRelation: "monteurs";
7935
+ referencedRelation: "profiles";
7753
7936
  referencedColumns: ["id"];
7754
7937
  }];
7755
7938
  };
@@ -8476,6 +8659,69 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
8476
8659
  };
8477
8660
  Relationships: [];
8478
8661
  };
8662
+ logistics_floriday_pushes: {
8663
+ Row: {
8664
+ attempts: number;
8665
+ created_at: string;
8666
+ first_queued_at: string;
8667
+ fulfillment_order_id: string | null;
8668
+ id: string;
8669
+ last_error: string | null;
8670
+ last_error_at: string | null;
8671
+ last_sent_hash: string | null;
8672
+ locked_by: string | null;
8673
+ locked_until: string | null;
8674
+ next_attempt_at: string;
8675
+ order_ref: string;
8676
+ payload: import("../integrations/supabase/types").Json;
8677
+ payload_hash: string | null;
8678
+ revision: number;
8679
+ sent_at: string | null;
8680
+ status: string;
8681
+ updated_at: string;
8682
+ };
8683
+ Insert: {
8684
+ attempts?: number;
8685
+ created_at?: string;
8686
+ first_queued_at?: string;
8687
+ fulfillment_order_id?: string | null;
8688
+ id?: string;
8689
+ last_error?: string | null;
8690
+ last_error_at?: string | null;
8691
+ last_sent_hash?: string | null;
8692
+ locked_by?: string | null;
8693
+ locked_until?: string | null;
8694
+ next_attempt_at?: string;
8695
+ order_ref: string;
8696
+ payload?: import("../integrations/supabase/types").Json;
8697
+ payload_hash?: string | null;
8698
+ revision?: number;
8699
+ sent_at?: string | null;
8700
+ status?: string;
8701
+ updated_at?: string;
8702
+ };
8703
+ Update: {
8704
+ attempts?: number;
8705
+ created_at?: string;
8706
+ first_queued_at?: string;
8707
+ fulfillment_order_id?: string | null;
8708
+ id?: string;
8709
+ last_error?: string | null;
8710
+ last_error_at?: string | null;
8711
+ last_sent_hash?: string | null;
8712
+ locked_by?: string | null;
8713
+ locked_until?: string | null;
8714
+ next_attempt_at?: string;
8715
+ order_ref?: string;
8716
+ payload?: import("../integrations/supabase/types").Json;
8717
+ payload_hash?: string | null;
8718
+ revision?: number;
8719
+ sent_at?: string | null;
8720
+ status?: string;
8721
+ updated_at?: string;
8722
+ };
8723
+ Relationships: [];
8724
+ };
8479
8725
  logistics_formulas: {
8480
8726
  Row: {
8481
8727
  created_at: string;
@@ -8554,6 +8800,45 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
8554
8800
  };
8555
8801
  Relationships: [];
8556
8802
  };
8803
+ logistics_plan_queue: {
8804
+ Row: {
8805
+ attempts: number;
8806
+ claimed_at: string | null;
8807
+ enqueued_at: string;
8808
+ error: string | null;
8809
+ id: string;
8810
+ next_attempt_at: string;
8811
+ order_id: string;
8812
+ reason: string;
8813
+ status: string;
8814
+ updated_at: string;
8815
+ };
8816
+ Insert: {
8817
+ attempts?: number;
8818
+ claimed_at?: string | null;
8819
+ enqueued_at?: string;
8820
+ error?: string | null;
8821
+ id?: string;
8822
+ next_attempt_at?: string;
8823
+ order_id: string;
8824
+ reason?: string;
8825
+ status?: string;
8826
+ updated_at?: string;
8827
+ };
8828
+ Update: {
8829
+ attempts?: number;
8830
+ claimed_at?: string | null;
8831
+ enqueued_at?: string;
8832
+ error?: string | null;
8833
+ id?: string;
8834
+ next_attempt_at?: string;
8835
+ order_id?: string;
8836
+ reason?: string;
8837
+ status?: string;
8838
+ updated_at?: string;
8839
+ };
8840
+ Relationships: [];
8841
+ };
8557
8842
  logistics_plan_runs: {
8558
8843
  Row: {
8559
8844
  created_at: string;
@@ -8629,6 +8914,24 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
8629
8914
  referencedColumns: ["id"];
8630
8915
  }];
8631
8916
  };
8917
+ logistics_plan_settings: {
8918
+ Row: {
8919
+ key: string;
8920
+ updated_at: string;
8921
+ value: string;
8922
+ };
8923
+ Insert: {
8924
+ key: string;
8925
+ updated_at?: string;
8926
+ value: string;
8927
+ };
8928
+ Update: {
8929
+ key?: string;
8930
+ updated_at?: string;
8931
+ value?: string;
8932
+ };
8933
+ Relationships: [];
8934
+ };
8632
8935
  logistics_rebuffer_state: {
8633
8936
  Row: {
8634
8937
  created_at: string;
@@ -9339,14 +9642,17 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
9339
9642
  };
9340
9643
  mailbox_messages: {
9341
9644
  Row: {
9645
+ attachments: import("../integrations/supabase/types").Json;
9342
9646
  body_html: string | null;
9343
9647
  body_text: string | null;
9648
+ cc_recipients: import("../integrations/supabase/types").Json;
9344
9649
  connection_id: string | null;
9345
9650
  created_at: string;
9346
9651
  error_message: string | null;
9347
9652
  external_id: string | null;
9348
9653
  from_email: string | null;
9349
9654
  from_name: string | null;
9655
+ has_attachments: boolean;
9350
9656
  id: string;
9351
9657
  message_id: string | null;
9352
9658
  profile_id: string | null;
@@ -9354,18 +9660,22 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
9354
9660
  received_at: string | null;
9355
9661
  status: string;
9356
9662
  subject: string | null;
9663
+ to_recipients: import("../integrations/supabase/types").Json;
9357
9664
  uid: number | null;
9358
9665
  updated_at: string;
9359
9666
  };
9360
9667
  Insert: {
9668
+ attachments?: import("../integrations/supabase/types").Json;
9361
9669
  body_html?: string | null;
9362
9670
  body_text?: string | null;
9671
+ cc_recipients?: import("../integrations/supabase/types").Json;
9363
9672
  connection_id?: string | null;
9364
9673
  created_at?: string;
9365
9674
  error_message?: string | null;
9366
9675
  external_id?: string | null;
9367
9676
  from_email?: string | null;
9368
9677
  from_name?: string | null;
9678
+ has_attachments?: boolean;
9369
9679
  id?: string;
9370
9680
  message_id?: string | null;
9371
9681
  profile_id?: string | null;
@@ -9373,18 +9683,22 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
9373
9683
  received_at?: string | null;
9374
9684
  status?: string;
9375
9685
  subject?: string | null;
9686
+ to_recipients?: import("../integrations/supabase/types").Json;
9376
9687
  uid?: number | null;
9377
9688
  updated_at?: string;
9378
9689
  };
9379
9690
  Update: {
9691
+ attachments?: import("../integrations/supabase/types").Json;
9380
9692
  body_html?: string | null;
9381
9693
  body_text?: string | null;
9694
+ cc_recipients?: import("../integrations/supabase/types").Json;
9382
9695
  connection_id?: string | null;
9383
9696
  created_at?: string;
9384
9697
  error_message?: string | null;
9385
9698
  external_id?: string | null;
9386
9699
  from_email?: string | null;
9387
9700
  from_name?: string | null;
9701
+ has_attachments?: boolean;
9388
9702
  id?: string;
9389
9703
  message_id?: string | null;
9390
9704
  profile_id?: string | null;
@@ -9392,6 +9706,7 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
9392
9706
  received_at?: string | null;
9393
9707
  status?: string;
9394
9708
  subject?: string | null;
9709
+ to_recipients?: import("../integrations/supabase/types").Json;
9395
9710
  uid?: number | null;
9396
9711
  updated_at?: string;
9397
9712
  };
@@ -9772,6 +10087,90 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
9772
10087
  };
9773
10088
  Relationships: [];
9774
10089
  };
10090
+ material_usage: {
10091
+ Row: {
10092
+ created_at: string;
10093
+ id: string;
10094
+ material_name: string;
10095
+ monteur_id: string | null;
10096
+ price_at_time: number;
10097
+ quantity_used: number;
10098
+ updated_at: string;
10099
+ van_inventory_id: string | null;
10100
+ work_order_id: string;
10101
+ };
10102
+ Insert: {
10103
+ created_at?: string;
10104
+ id?: string;
10105
+ material_name: string;
10106
+ monteur_id?: string | null;
10107
+ price_at_time?: number;
10108
+ quantity_used?: number;
10109
+ updated_at?: string;
10110
+ van_inventory_id?: string | null;
10111
+ work_order_id: string;
10112
+ };
10113
+ Update: {
10114
+ created_at?: string;
10115
+ id?: string;
10116
+ material_name?: string;
10117
+ monteur_id?: string | null;
10118
+ price_at_time?: number;
10119
+ quantity_used?: number;
10120
+ updated_at?: string;
10121
+ van_inventory_id?: string | null;
10122
+ work_order_id?: string;
10123
+ };
10124
+ Relationships: [{
10125
+ foreignKeyName: "material_usage_monteur_id_fkey";
10126
+ columns: ["monteur_id"];
10127
+ isOneToOne: false;
10128
+ referencedRelation: "profiles";
10129
+ referencedColumns: ["id"];
10130
+ }, {
10131
+ foreignKeyName: "material_usage_van_inventory_id_fkey";
10132
+ columns: ["van_inventory_id"];
10133
+ isOneToOne: false;
10134
+ referencedRelation: "van_inventories";
10135
+ referencedColumns: ["id"];
10136
+ }, {
10137
+ foreignKeyName: "material_usage_work_order_id_fkey";
10138
+ columns: ["work_order_id"];
10139
+ isOneToOne: false;
10140
+ referencedRelation: "work_orders";
10141
+ referencedColumns: ["id"];
10142
+ }];
10143
+ };
10144
+ module_features: {
10145
+ Row: {
10146
+ created_at: string;
10147
+ feature_id: string;
10148
+ id: string;
10149
+ is_active: boolean;
10150
+ last_seen_at: string;
10151
+ module_id: string;
10152
+ name: string;
10153
+ };
10154
+ Insert: {
10155
+ created_at?: string;
10156
+ feature_id: string;
10157
+ id?: string;
10158
+ is_active?: boolean;
10159
+ last_seen_at?: string;
10160
+ module_id: string;
10161
+ name: string;
10162
+ };
10163
+ Update: {
10164
+ created_at?: string;
10165
+ feature_id?: string;
10166
+ id?: string;
10167
+ is_active?: boolean;
10168
+ last_seen_at?: string;
10169
+ module_id?: string;
10170
+ name?: string;
10171
+ };
10172
+ Relationships: [];
10173
+ };
9775
10174
  module_permissions: {
9776
10175
  Row: {
9777
10176
  created_at: string;
@@ -9799,6 +10198,39 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
9799
10198
  };
9800
10199
  Relationships: [];
9801
10200
  };
10201
+ module_registry: {
10202
+ Row: {
10203
+ created_at: string;
10204
+ enforce: boolean;
10205
+ is_active: boolean;
10206
+ last_seen_at: string;
10207
+ module_id: string;
10208
+ name: string;
10209
+ shell_id: string | null;
10210
+ sort_order: number | null;
10211
+ };
10212
+ Insert: {
10213
+ created_at?: string;
10214
+ enforce?: boolean;
10215
+ is_active?: boolean;
10216
+ last_seen_at?: string;
10217
+ module_id: string;
10218
+ name: string;
10219
+ shell_id?: string | null;
10220
+ sort_order?: number | null;
10221
+ };
10222
+ Update: {
10223
+ created_at?: string;
10224
+ enforce?: boolean;
10225
+ is_active?: boolean;
10226
+ last_seen_at?: string;
10227
+ module_id?: string;
10228
+ name?: string;
10229
+ shell_id?: string | null;
10230
+ sort_order?: number | null;
10231
+ };
10232
+ Relationships: [];
10233
+ };
9802
10234
  module_runtime_config: {
9803
10235
  Row: {
9804
10236
  key: string;
@@ -9850,64 +10282,7 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
9850
10282
  };
9851
10283
  Relationships: [];
9852
10284
  };
9853
- monteurs: {
9854
- Row: {
9855
- avatar_url: string | null;
9856
- color: string | null;
9857
- created_at: string;
9858
- email: string | null;
9859
- id: string;
9860
- is_active: boolean;
9861
- leave_balance_hours: number;
9862
- name: string;
9863
- persnr: number | null;
9864
- phone: string | null;
9865
- role: string;
9866
- tenant_id: string;
9867
- updated_at: string;
9868
- user_id: string | null;
9869
- };
9870
- Insert: {
9871
- avatar_url?: string | null;
9872
- color?: string | null;
9873
- created_at?: string;
9874
- email?: string | null;
9875
- id?: string;
9876
- is_active?: boolean;
9877
- leave_balance_hours?: number;
9878
- name: string;
9879
- persnr?: number | null;
9880
- phone?: string | null;
9881
- role?: string;
9882
- tenant_id: string;
9883
- updated_at?: string;
9884
- user_id?: string | null;
9885
- };
9886
- Update: {
9887
- avatar_url?: string | null;
9888
- color?: string | null;
9889
- created_at?: string;
9890
- email?: string | null;
9891
- id?: string;
9892
- is_active?: boolean;
9893
- leave_balance_hours?: number;
9894
- name?: string;
9895
- persnr?: number | null;
9896
- phone?: string | null;
9897
- role?: string;
9898
- tenant_id?: string;
9899
- updated_at?: string;
9900
- user_id?: string | null;
9901
- };
9902
- Relationships: [{
9903
- foreignKeyName: "monteurs_tenant_id_fkey";
9904
- columns: ["tenant_id"];
9905
- isOneToOne: false;
9906
- referencedRelation: "tenants";
9907
- referencedColumns: ["id"];
9908
- }];
9909
- };
9910
- nmbrs_component_mapping: {
10285
+ nmbrs_component_mapping: {
9911
10286
  Row: {
9912
10287
  created_at: string;
9913
10288
  id: string;
@@ -9977,13 +10352,7 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
9977
10352
  nmbrs_employee_number?: string;
9978
10353
  updated_at?: string;
9979
10354
  };
9980
- Relationships: [{
9981
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
9982
- columns: ["monteur_id"];
9983
- isOneToOne: true;
9984
- referencedRelation: "monteurs";
9985
- referencedColumns: ["id"];
9986
- }];
10355
+ Relationships: [];
9987
10356
  };
9988
10357
  nmbrs_export_lines: {
9989
10358
  Row: {
@@ -10032,12 +10401,6 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
10032
10401
  wage_code?: string;
10033
10402
  };
10034
10403
  Relationships: [{
10035
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
10036
- columns: ["monteur_id"];
10037
- isOneToOne: false;
10038
- referencedRelation: "monteurs";
10039
- referencedColumns: ["id"];
10040
- }, {
10041
10404
  foreignKeyName: "nmbrs_export_lines_run_id_fkey";
10042
10405
  columns: ["run_id"];
10043
10406
  isOneToOne: false;
@@ -10858,6 +11221,45 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
10858
11221
  };
10859
11222
  Relationships: [];
10860
11223
  };
11224
+ order_invoice_links: {
11225
+ Row: {
11226
+ attempts: number;
11227
+ created_at: string;
11228
+ error_message: string | null;
11229
+ id: string;
11230
+ invoice_number: string | null;
11231
+ next_attempt_at: string;
11232
+ order_id: string;
11233
+ processed_at: string | null;
11234
+ status: string;
11235
+ updated_at: string;
11236
+ };
11237
+ Insert: {
11238
+ attempts?: number;
11239
+ created_at?: string;
11240
+ error_message?: string | null;
11241
+ id?: string;
11242
+ invoice_number?: string | null;
11243
+ next_attempt_at?: string;
11244
+ order_id: string;
11245
+ processed_at?: string | null;
11246
+ status?: string;
11247
+ updated_at?: string;
11248
+ };
11249
+ Update: {
11250
+ attempts?: number;
11251
+ created_at?: string;
11252
+ error_message?: string | null;
11253
+ id?: string;
11254
+ invoice_number?: string | null;
11255
+ next_attempt_at?: string;
11256
+ order_id?: string;
11257
+ processed_at?: string | null;
11258
+ status?: string;
11259
+ updated_at?: string;
11260
+ };
11261
+ Relationships: [];
11262
+ };
10861
11263
  order_items: {
10862
11264
  Row: {
10863
11265
  crates_per_layer: number | null;
@@ -11040,6 +11442,7 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
11040
11442
  delivery_date: string | null;
11041
11443
  floriday_sales_order_id: string | null;
11042
11444
  id: string;
11445
+ invoice_due_at: string | null;
11043
11446
  is_reservation: boolean;
11044
11447
  notes: string | null;
11045
11448
  order_date: string;
@@ -11061,6 +11464,7 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
11061
11464
  delivery_date?: string | null;
11062
11465
  floriday_sales_order_id?: string | null;
11063
11466
  id?: string;
11467
+ invoice_due_at?: string | null;
11064
11468
  is_reservation?: boolean;
11065
11469
  notes?: string | null;
11066
11470
  order_date?: string;
@@ -11082,6 +11486,7 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
11082
11486
  delivery_date?: string | null;
11083
11487
  floriday_sales_order_id?: string | null;
11084
11488
  id?: string;
11489
+ invoice_due_at?: string | null;
11085
11490
  is_reservation?: boolean;
11086
11491
  notes?: string | null;
11087
11492
  order_date?: string;
@@ -12278,22 +12683,27 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
12278
12683
  created_at: string;
12279
12684
  documentnaam: string;
12280
12685
  documenttype: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"];
12686
+ extern_job_id: string | null;
12281
12687
  foutmelding: string | null;
12282
12688
  gebruiker_id: string | null;
12283
12689
  gebruiker_naam: string;
12284
12690
  gestart_op: string | null;
12285
12691
  id: string;
12692
+ idempotentie_sleutel: string | null;
12286
12693
  is_herprint: boolean;
12287
12694
  kopieen: number;
12288
12695
  layout_id: string | null;
12289
12696
  opgepakt_op: string | null;
12290
12697
  paginas: number;
12291
12698
  payload: import("../integrations/supabase/types").Json;
12699
+ pdf_base64: string | null;
12700
+ pdf_url: string | null;
12292
12701
  pogingen: number;
12293
12702
  printer_id: string | null;
12294
12703
  render_html: string | null;
12295
12704
  status: import("../integrations/supabase/types").Database["public"]["Enums"]["print_job_status"];
12296
12705
  updated_at: string;
12706
+ volgende_poging: string | null;
12297
12707
  voltooid_op: string | null;
12298
12708
  };
12299
12709
  Insert: {
@@ -12302,22 +12712,27 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
12302
12712
  created_at?: string;
12303
12713
  documentnaam?: string;
12304
12714
  documenttype?: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"];
12715
+ extern_job_id?: string | null;
12305
12716
  foutmelding?: string | null;
12306
12717
  gebruiker_id?: string | null;
12307
12718
  gebruiker_naam?: string;
12308
12719
  gestart_op?: string | null;
12309
12720
  id?: string;
12721
+ idempotentie_sleutel?: string | null;
12310
12722
  is_herprint?: boolean;
12311
12723
  kopieen?: number;
12312
12724
  layout_id?: string | null;
12313
12725
  opgepakt_op?: string | null;
12314
12726
  paginas?: number;
12315
12727
  payload?: import("../integrations/supabase/types").Json;
12728
+ pdf_base64?: string | null;
12729
+ pdf_url?: string | null;
12316
12730
  pogingen?: number;
12317
12731
  printer_id?: string | null;
12318
12732
  render_html?: string | null;
12319
12733
  status?: import("../integrations/supabase/types").Database["public"]["Enums"]["print_job_status"];
12320
12734
  updated_at?: string;
12735
+ volgende_poging?: string | null;
12321
12736
  voltooid_op?: string | null;
12322
12737
  };
12323
12738
  Update: {
@@ -12326,22 +12741,27 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
12326
12741
  created_at?: string;
12327
12742
  documentnaam?: string;
12328
12743
  documenttype?: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"];
12744
+ extern_job_id?: string | null;
12329
12745
  foutmelding?: string | null;
12330
12746
  gebruiker_id?: string | null;
12331
12747
  gebruiker_naam?: string;
12332
12748
  gestart_op?: string | null;
12333
12749
  id?: string;
12750
+ idempotentie_sleutel?: string | null;
12334
12751
  is_herprint?: boolean;
12335
12752
  kopieen?: number;
12336
12753
  layout_id?: string | null;
12337
12754
  opgepakt_op?: string | null;
12338
12755
  paginas?: number;
12339
12756
  payload?: import("../integrations/supabase/types").Json;
12757
+ pdf_base64?: string | null;
12758
+ pdf_url?: string | null;
12340
12759
  pogingen?: number;
12341
12760
  printer_id?: string | null;
12342
12761
  render_html?: string | null;
12343
12762
  status?: import("../integrations/supabase/types").Database["public"]["Enums"]["print_job_status"];
12344
12763
  updated_at?: string;
12764
+ volgende_poging?: string | null;
12345
12765
  voltooid_op?: string | null;
12346
12766
  };
12347
12767
  Relationships: [{
@@ -12364,6 +12784,72 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
12364
12784
  referencedColumns: ["id"];
12365
12785
  }];
12366
12786
  };
12787
+ print_queue_runners: {
12788
+ Row: {
12789
+ actief: boolean;
12790
+ basis_url: string;
12791
+ created_at: string;
12792
+ id: string;
12793
+ laatst_gezien: string;
12794
+ laatste_fout: string | null;
12795
+ laatste_request_id: number | null;
12796
+ mislukte_posts: number;
12797
+ tick_sleutel: string;
12798
+ updated_at: string;
12799
+ };
12800
+ Insert: {
12801
+ actief?: boolean;
12802
+ basis_url: string;
12803
+ created_at?: string;
12804
+ id?: string;
12805
+ laatst_gezien?: string;
12806
+ laatste_fout?: string | null;
12807
+ laatste_request_id?: number | null;
12808
+ mislukte_posts?: number;
12809
+ tick_sleutel?: string;
12810
+ updated_at?: string;
12811
+ };
12812
+ Update: {
12813
+ actief?: boolean;
12814
+ basis_url?: string;
12815
+ created_at?: string;
12816
+ id?: string;
12817
+ laatst_gezien?: string;
12818
+ laatste_fout?: string | null;
12819
+ laatste_request_id?: number | null;
12820
+ mislukte_posts?: number;
12821
+ tick_sleutel?: string;
12822
+ updated_at?: string;
12823
+ };
12824
+ Relationships: [];
12825
+ };
12826
+ print_queue_settings: {
12827
+ Row: {
12828
+ bewaar_bestanden_dagen: number;
12829
+ bewaar_opdrachten_dagen: number;
12830
+ created_at: string;
12831
+ dubbel_venster_minuten: number;
12832
+ id: string;
12833
+ updated_at: string;
12834
+ };
12835
+ Insert: {
12836
+ bewaar_bestanden_dagen?: number;
12837
+ bewaar_opdrachten_dagen?: number;
12838
+ created_at?: string;
12839
+ dubbel_venster_minuten?: number;
12840
+ id?: string;
12841
+ updated_at?: string;
12842
+ };
12843
+ Update: {
12844
+ bewaar_bestanden_dagen?: number;
12845
+ bewaar_opdrachten_dagen?: number;
12846
+ created_at?: string;
12847
+ dubbel_venster_minuten?: number;
12848
+ id?: string;
12849
+ updated_at?: string;
12850
+ };
12851
+ Relationships: [];
12852
+ };
12367
12853
  print_rules: {
12368
12854
  Row: {
12369
12855
  actief: boolean;
@@ -12524,6 +13010,7 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
12524
13010
  agent_id: string | null;
12525
13011
  created_at: string;
12526
13012
  driver: string;
13013
+ extern_printer_id: string | null;
12527
13014
  id: string;
12528
13015
  ip_adres: string | null;
12529
13016
  laatst_gezien: string | null;
@@ -12545,6 +13032,7 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
12545
13032
  agent_id?: string | null;
12546
13033
  created_at?: string;
12547
13034
  driver?: string;
13035
+ extern_printer_id?: string | null;
12548
13036
  id?: string;
12549
13037
  ip_adres?: string | null;
12550
13038
  laatst_gezien?: string | null;
@@ -12566,6 +13054,7 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
12566
13054
  agent_id?: string | null;
12567
13055
  created_at?: string;
12568
13056
  driver?: string;
13057
+ extern_printer_id?: string | null;
12569
13058
  id?: string;
12570
13059
  ip_adres?: string | null;
12571
13060
  laatst_gezien?: string | null;
@@ -13837,6 +14326,96 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
13837
14326
  referencedColumns: ["id"];
13838
14327
  }];
13839
14328
  };
14329
+ role_assignments: {
14330
+ Row: {
14331
+ created_at: string;
14332
+ id: string;
14333
+ role_id: string;
14334
+ user_id: string;
14335
+ };
14336
+ Insert: {
14337
+ created_at?: string;
14338
+ id?: string;
14339
+ role_id: string;
14340
+ user_id: string;
14341
+ };
14342
+ Update: {
14343
+ created_at?: string;
14344
+ id?: string;
14345
+ role_id?: string;
14346
+ user_id?: string;
14347
+ };
14348
+ Relationships: [{
14349
+ foreignKeyName: "role_assignments_role_id_fkey";
14350
+ columns: ["role_id"];
14351
+ isOneToOne: false;
14352
+ referencedRelation: "roles";
14353
+ referencedColumns: ["id"];
14354
+ }];
14355
+ };
14356
+ role_permissions: {
14357
+ Row: {
14358
+ can_edit: boolean;
14359
+ can_view: boolean;
14360
+ feature_id: string;
14361
+ id: string;
14362
+ module_id: string;
14363
+ role_id: string;
14364
+ updated_at: string;
14365
+ };
14366
+ Insert: {
14367
+ can_edit?: boolean;
14368
+ can_view?: boolean;
14369
+ feature_id?: string;
14370
+ id?: string;
14371
+ module_id: string;
14372
+ role_id: string;
14373
+ updated_at?: string;
14374
+ };
14375
+ Update: {
14376
+ can_edit?: boolean;
14377
+ can_view?: boolean;
14378
+ feature_id?: string;
14379
+ id?: string;
14380
+ module_id?: string;
14381
+ role_id?: string;
14382
+ updated_at?: string;
14383
+ };
14384
+ Relationships: [{
14385
+ foreignKeyName: "role_permissions_role_id_fkey";
14386
+ columns: ["role_id"];
14387
+ isOneToOne: false;
14388
+ referencedRelation: "roles";
14389
+ referencedColumns: ["id"];
14390
+ }];
14391
+ };
14392
+ roles: {
14393
+ Row: {
14394
+ created_at: string;
14395
+ id: string;
14396
+ is_protected: boolean;
14397
+ key: string;
14398
+ name: string;
14399
+ updated_at: string;
14400
+ };
14401
+ Insert: {
14402
+ created_at?: string;
14403
+ id?: string;
14404
+ is_protected?: boolean;
14405
+ key: string;
14406
+ name: string;
14407
+ updated_at?: string;
14408
+ };
14409
+ Update: {
14410
+ created_at?: string;
14411
+ id?: string;
14412
+ is_protected?: boolean;
14413
+ key?: string;
14414
+ name?: string;
14415
+ updated_at?: string;
14416
+ };
14417
+ Relationships: [];
14418
+ };
13840
14419
  rooms: {
13841
14420
  Row: {
13842
14421
  capacity: number;
@@ -14506,99 +15085,252 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
14506
15085
  };
14507
15086
  Relationships: [];
14508
15087
  };
14509
- time_entries: {
15088
+ time_compensation_entries: {
14510
15089
  Row: {
14511
15090
  created_at: string;
14512
15091
  employee_id: string;
14513
15092
  entry_date: string;
14514
- hours: number;
14515
15093
  id: string;
15094
+ km: number;
15095
+ meal_allowance: number;
14516
15096
  notes: string | null;
14517
- overtime: number;
14518
- undertime: number;
15097
+ standby_evening: number;
15098
+ standby_weekend: number;
15099
+ tvt_change: number;
14519
15100
  updated_at: string;
14520
15101
  };
14521
15102
  Insert: {
14522
15103
  created_at?: string;
14523
15104
  employee_id: string;
14524
15105
  entry_date: string;
14525
- hours?: number;
14526
15106
  id?: string;
15107
+ km?: number;
15108
+ meal_allowance?: number;
14527
15109
  notes?: string | null;
14528
- overtime?: number;
14529
- undertime?: number;
15110
+ standby_evening?: number;
15111
+ standby_weekend?: number;
15112
+ tvt_change?: number;
14530
15113
  updated_at?: string;
14531
15114
  };
14532
15115
  Update: {
14533
15116
  created_at?: string;
14534
15117
  employee_id?: string;
14535
15118
  entry_date?: string;
14536
- hours?: number;
14537
15119
  id?: string;
15120
+ km?: number;
15121
+ meal_allowance?: number;
14538
15122
  notes?: string | null;
14539
- overtime?: number;
14540
- undertime?: number;
15123
+ standby_evening?: number;
15124
+ standby_weekend?: number;
15125
+ tvt_change?: number;
14541
15126
  updated_at?: string;
14542
15127
  };
14543
15128
  Relationships: [{
14544
- foreignKeyName: "time_entries_employee_id_fkey";
15129
+ foreignKeyName: "time_compensation_entries_employee_id_fkey";
14545
15130
  columns: ["employee_id"];
14546
15131
  isOneToOne: false;
14547
- referencedRelation: "monteurs";
15132
+ referencedRelation: "profiles";
14548
15133
  referencedColumns: ["id"];
14549
15134
  }];
14550
15135
  };
14551
- time_logs: {
15136
+ time_entries: {
14552
15137
  Row: {
14553
15138
  created_at: string;
14554
15139
  employee_id: string;
14555
- end_time: string | null;
15140
+ entry_date: string;
15141
+ hours: number;
14556
15142
  id: string;
14557
15143
  notes: string | null;
14558
- overtime_hours: number;
14559
- overtime_type: string | null;
14560
- regular_hours: number;
14561
- start_time: string;
14562
- travel_cost: number | null;
14563
- travel_distance_km: number | null;
14564
- type: string;
15144
+ overtime: number;
15145
+ undertime: number;
14565
15146
  updated_at: string;
14566
15147
  };
14567
15148
  Insert: {
14568
15149
  created_at?: string;
14569
15150
  employee_id: string;
14570
- end_time?: string | null;
15151
+ entry_date: string;
15152
+ hours?: number;
14571
15153
  id?: string;
14572
15154
  notes?: string | null;
14573
- overtime_hours?: number;
14574
- overtime_type?: string | null;
14575
- regular_hours?: number;
14576
- start_time?: string;
14577
- travel_cost?: number | null;
14578
- travel_distance_km?: number | null;
14579
- type: string;
15155
+ overtime?: number;
15156
+ undertime?: number;
14580
15157
  updated_at?: string;
14581
15158
  };
14582
15159
  Update: {
14583
15160
  created_at?: string;
14584
15161
  employee_id?: string;
14585
- end_time?: string | null;
15162
+ entry_date?: string;
15163
+ hours?: number;
14586
15164
  id?: string;
14587
15165
  notes?: string | null;
14588
- overtime_hours?: number;
14589
- overtime_type?: string | null;
14590
- regular_hours?: number;
14591
- start_time?: string;
14592
- travel_cost?: number | null;
14593
- travel_distance_km?: number | null;
14594
- type?: string;
15166
+ overtime?: number;
15167
+ undertime?: number;
14595
15168
  updated_at?: string;
14596
15169
  };
14597
- Relationships: [{
14598
- foreignKeyName: "time_logs_employee_id_fkey";
15170
+ Relationships: [];
15171
+ };
15172
+ time_log_week_approvals: {
15173
+ Row: {
15174
+ approved_at: string | null;
15175
+ approved_by: string | null;
15176
+ created_at: string;
15177
+ employee_id: string;
15178
+ id: string;
15179
+ locked: boolean;
15180
+ notes: string | null;
15181
+ status: string;
15182
+ submitted_at: string | null;
15183
+ updated_at: string;
15184
+ week_start: string;
15185
+ };
15186
+ Insert: {
15187
+ approved_at?: string | null;
15188
+ approved_by?: string | null;
15189
+ created_at?: string;
15190
+ employee_id: string;
15191
+ id?: string;
15192
+ locked?: boolean;
15193
+ notes?: string | null;
15194
+ status?: string;
15195
+ submitted_at?: string | null;
15196
+ updated_at?: string;
15197
+ week_start: string;
15198
+ };
15199
+ Update: {
15200
+ approved_at?: string | null;
15201
+ approved_by?: string | null;
15202
+ created_at?: string;
15203
+ employee_id?: string;
15204
+ id?: string;
15205
+ locked?: boolean;
15206
+ notes?: string | null;
15207
+ status?: string;
15208
+ submitted_at?: string | null;
15209
+ updated_at?: string;
15210
+ week_start?: string;
15211
+ };
15212
+ Relationships: [{
15213
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
15214
+ columns: ["employee_id"];
15215
+ isOneToOne: false;
15216
+ referencedRelation: "profiles";
15217
+ referencedColumns: ["id"];
15218
+ }];
15219
+ };
15220
+ time_logs: {
15221
+ Row: {
15222
+ auto_stop_reason: string | null;
15223
+ auto_stopped: boolean;
15224
+ created_at: string;
15225
+ current_latitude: number | null;
15226
+ current_longitude: number | null;
15227
+ current_position_updated_at: string | null;
15228
+ employee_id: string;
15229
+ end_latitude: number | null;
15230
+ end_longitude: number | null;
15231
+ end_time: string | null;
15232
+ eta_distance_km: number | null;
15233
+ eta_minutes: number | null;
15234
+ eta_updated_at: string | null;
15235
+ hour_category: string | null;
15236
+ id: string;
15237
+ last_reminder_at: string | null;
15238
+ notes: string | null;
15239
+ overtime_hours: number;
15240
+ overtime_type: string | null;
15241
+ regular_hours: number;
15242
+ reminder_count: number;
15243
+ requires_review: boolean;
15244
+ start_latitude: number | null;
15245
+ start_longitude: number | null;
15246
+ start_time: string;
15247
+ travel_cost: number | null;
15248
+ travel_distance_km: number | null;
15249
+ travel_duration_min: number | null;
15250
+ travel_time_minutes: number | null;
15251
+ type: string;
15252
+ updated_at: string;
15253
+ work_order_id: string | null;
15254
+ };
15255
+ Insert: {
15256
+ auto_stop_reason?: string | null;
15257
+ auto_stopped?: boolean;
15258
+ created_at?: string;
15259
+ current_latitude?: number | null;
15260
+ current_longitude?: number | null;
15261
+ current_position_updated_at?: string | null;
15262
+ employee_id: string;
15263
+ end_latitude?: number | null;
15264
+ end_longitude?: number | null;
15265
+ end_time?: string | null;
15266
+ eta_distance_km?: number | null;
15267
+ eta_minutes?: number | null;
15268
+ eta_updated_at?: string | null;
15269
+ hour_category?: string | null;
15270
+ id?: string;
15271
+ last_reminder_at?: string | null;
15272
+ notes?: string | null;
15273
+ overtime_hours?: number;
15274
+ overtime_type?: string | null;
15275
+ regular_hours?: number;
15276
+ reminder_count?: number;
15277
+ requires_review?: boolean;
15278
+ start_latitude?: number | null;
15279
+ start_longitude?: number | null;
15280
+ start_time?: string;
15281
+ travel_cost?: number | null;
15282
+ travel_distance_km?: number | null;
15283
+ travel_duration_min?: number | null;
15284
+ travel_time_minutes?: number | null;
15285
+ type: string;
15286
+ updated_at?: string;
15287
+ work_order_id?: string | null;
15288
+ };
15289
+ Update: {
15290
+ auto_stop_reason?: string | null;
15291
+ auto_stopped?: boolean;
15292
+ created_at?: string;
15293
+ current_latitude?: number | null;
15294
+ current_longitude?: number | null;
15295
+ current_position_updated_at?: string | null;
15296
+ employee_id?: string;
15297
+ end_latitude?: number | null;
15298
+ end_longitude?: number | null;
15299
+ end_time?: string | null;
15300
+ eta_distance_km?: number | null;
15301
+ eta_minutes?: number | null;
15302
+ eta_updated_at?: string | null;
15303
+ hour_category?: string | null;
15304
+ id?: string;
15305
+ last_reminder_at?: string | null;
15306
+ notes?: string | null;
15307
+ overtime_hours?: number;
15308
+ overtime_type?: string | null;
15309
+ regular_hours?: number;
15310
+ reminder_count?: number;
15311
+ requires_review?: boolean;
15312
+ start_latitude?: number | null;
15313
+ start_longitude?: number | null;
15314
+ start_time?: string;
15315
+ travel_cost?: number | null;
15316
+ travel_distance_km?: number | null;
15317
+ travel_duration_min?: number | null;
15318
+ travel_time_minutes?: number | null;
15319
+ type?: string;
15320
+ updated_at?: string;
15321
+ work_order_id?: string | null;
15322
+ };
15323
+ Relationships: [{
15324
+ foreignKeyName: "time_logs_employee_id_fkey";
14599
15325
  columns: ["employee_id"];
14600
15326
  isOneToOne: false;
14601
- referencedRelation: "monteurs";
15327
+ referencedRelation: "profiles";
15328
+ referencedColumns: ["id"];
15329
+ }, {
15330
+ foreignKeyName: "time_logs_work_order_id_fkey";
15331
+ columns: ["work_order_id"];
15332
+ isOneToOne: false;
15333
+ referencedRelation: "work_orders";
14602
15334
  referencedColumns: ["id"];
14603
15335
  }];
14604
15336
  };
@@ -14637,7 +15369,7 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
14637
15369
  foreignKeyName: "time_off_entries_employee_id_fkey";
14638
15370
  columns: ["employee_id"];
14639
15371
  isOneToOne: false;
14640
- referencedRelation: "monteurs";
15372
+ referencedRelation: "profiles";
14641
15373
  referencedColumns: ["id"];
14642
15374
  }];
14643
15375
  };
@@ -14947,6 +15679,39 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
14947
15679
  };
14948
15680
  Relationships: [];
14949
15681
  };
15682
+ twinfield_cron_locks: {
15683
+ Row: {
15684
+ created_at: string;
15685
+ heartbeat_at: string;
15686
+ job_name: string;
15687
+ last_error: string | null;
15688
+ last_finished_at: string | null;
15689
+ locked_at: string;
15690
+ run_id: string;
15691
+ updated_at: string;
15692
+ };
15693
+ Insert: {
15694
+ created_at?: string;
15695
+ heartbeat_at?: string;
15696
+ job_name: string;
15697
+ last_error?: string | null;
15698
+ last_finished_at?: string | null;
15699
+ locked_at?: string;
15700
+ run_id?: string;
15701
+ updated_at?: string;
15702
+ };
15703
+ Update: {
15704
+ created_at?: string;
15705
+ heartbeat_at?: string;
15706
+ job_name?: string;
15707
+ last_error?: string | null;
15708
+ last_finished_at?: string | null;
15709
+ locked_at?: string;
15710
+ run_id?: string;
15711
+ updated_at?: string;
15712
+ };
15713
+ Relationships: [];
15714
+ };
14950
15715
  twinfield_customers: {
14951
15716
  Row: {
14952
15717
  address: string | null;
@@ -15201,6 +15966,8 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
15201
15966
  };
15202
15967
  twinfield_invoice_settings: {
15203
15968
  Row: {
15969
+ auto_invoice_enabled: boolean;
15970
+ auto_invoice_trigger_statuses: string[];
15204
15971
  created_at: string;
15205
15972
  debtor_gl_account: string;
15206
15973
  default_credit_invoice_type: string | null;
@@ -15221,6 +15988,8 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
15221
15988
  vat_code_export: string | null;
15222
15989
  };
15223
15990
  Insert: {
15991
+ auto_invoice_enabled?: boolean;
15992
+ auto_invoice_trigger_statuses?: string[];
15224
15993
  created_at?: string;
15225
15994
  debtor_gl_account?: string;
15226
15995
  default_credit_invoice_type?: string | null;
@@ -15241,6 +16010,8 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
15241
16010
  vat_code_export?: string | null;
15242
16011
  };
15243
16012
  Update: {
16013
+ auto_invoice_enabled?: boolean;
16014
+ auto_invoice_trigger_statuses?: string[];
15244
16015
  created_at?: string;
15245
16016
  debtor_gl_account?: string;
15246
16017
  default_credit_invoice_type?: string | null;
@@ -15541,6 +16312,7 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
15541
16312
  twinfield_push_queue: {
15542
16313
  Row: {
15543
16314
  action: string;
16315
+ attempt_started_at: string | null;
15544
16316
  attempts: number;
15545
16317
  connection_id: string | null;
15546
16318
  created_at: string;
@@ -15557,6 +16329,7 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
15557
16329
  };
15558
16330
  Insert: {
15559
16331
  action?: string;
16332
+ attempt_started_at?: string | null;
15560
16333
  attempts?: number;
15561
16334
  connection_id?: string | null;
15562
16335
  created_at?: string;
@@ -15573,6 +16346,7 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
15573
16346
  };
15574
16347
  Update: {
15575
16348
  action?: string;
16349
+ attempt_started_at?: string | null;
15576
16350
  attempts?: number;
15577
16351
  connection_id?: string | null;
15578
16352
  created_at?: string;
@@ -15770,13 +16544,7 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
15770
16544
  workday_end?: string | null;
15771
16545
  workday_start?: string | null;
15772
16546
  };
15773
- Relationships: [{
15774
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
15775
- columns: ["monteur_id"];
15776
- isOneToOne: true;
15777
- referencedRelation: "monteurs";
15778
- referencedColumns: ["id"];
15779
- }];
16547
+ Relationships: [];
15780
16548
  };
15781
16549
  uren_entries: {
15782
16550
  Row: {
@@ -15822,12 +16590,6 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
15822
16590
  werkbon_id?: string | null;
15823
16591
  };
15824
16592
  Relationships: [{
15825
- foreignKeyName: "uren_entries_monteur_id_fkey";
15826
- columns: ["monteur_id"];
15827
- isOneToOne: false;
15828
- referencedRelation: "monteurs";
15829
- referencedColumns: ["id"];
15830
- }, {
15831
16593
  foreignKeyName: "uren_entries_werkbon_id_fkey";
15832
16594
  columns: ["werkbon_id"];
15833
16595
  isOneToOne: false;
@@ -16295,13 +17057,37 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
16295
17057
  submitted_at?: string | null;
16296
17058
  updated_at?: string;
16297
17059
  };
16298
- Relationships: [{
16299
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
16300
- columns: ["monteur_id"];
16301
- isOneToOne: false;
16302
- referencedRelation: "monteurs";
16303
- referencedColumns: ["id"];
16304
- }];
17060
+ Relationships: [];
17061
+ };
17062
+ user_module_permissions: {
17063
+ Row: {
17064
+ created_at: string;
17065
+ feature_id: string;
17066
+ id: string;
17067
+ module_id: string;
17068
+ permission: string;
17069
+ updated_at: string;
17070
+ user_id: string;
17071
+ };
17072
+ Insert: {
17073
+ created_at?: string;
17074
+ feature_id?: string;
17075
+ id?: string;
17076
+ module_id: string;
17077
+ permission: string;
17078
+ updated_at?: string;
17079
+ user_id: string;
17080
+ };
17081
+ Update: {
17082
+ created_at?: string;
17083
+ feature_id?: string;
17084
+ id?: string;
17085
+ module_id?: string;
17086
+ permission?: string;
17087
+ updated_at?: string;
17088
+ user_id?: string;
17089
+ };
17090
+ Relationships: [];
16305
17091
  };
16306
17092
  user_roles: {
16307
17093
  Row: {
@@ -16330,6 +17116,51 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
16330
17116
  referencedColumns: ["id"];
16331
17117
  }];
16332
17118
  };
17119
+ van_inventories: {
17120
+ Row: {
17121
+ barcode: string | null;
17122
+ created_at: string;
17123
+ id: string;
17124
+ monteur_id: string | null;
17125
+ price_per_unit: number;
17126
+ product_name: string;
17127
+ quantity_current: number;
17128
+ quantity_min: number;
17129
+ unit: string;
17130
+ updated_at: string;
17131
+ };
17132
+ Insert: {
17133
+ barcode?: string | null;
17134
+ created_at?: string;
17135
+ id?: string;
17136
+ monteur_id?: string | null;
17137
+ price_per_unit?: number;
17138
+ product_name: string;
17139
+ quantity_current?: number;
17140
+ quantity_min?: number;
17141
+ unit?: string;
17142
+ updated_at?: string;
17143
+ };
17144
+ Update: {
17145
+ barcode?: string | null;
17146
+ created_at?: string;
17147
+ id?: string;
17148
+ monteur_id?: string | null;
17149
+ price_per_unit?: number;
17150
+ product_name?: string;
17151
+ quantity_current?: number;
17152
+ quantity_min?: number;
17153
+ unit?: string;
17154
+ updated_at?: string;
17155
+ };
17156
+ Relationships: [{
17157
+ foreignKeyName: "van_inventories_monteur_id_fkey";
17158
+ columns: ["monteur_id"];
17159
+ isOneToOne: false;
17160
+ referencedRelation: "profiles";
17161
+ referencedColumns: ["id"];
17162
+ }];
17163
+ };
16333
17164
  voorraad_custom_fields: {
16334
17165
  Row: {
16335
17166
  created_at: string;
@@ -17280,7 +18111,7 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
17280
18111
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
17281
18112
  columns: ["monteur_id"];
17282
18113
  isOneToOne: false;
17283
- referencedRelation: "monteurs";
18114
+ referencedRelation: "profiles";
17284
18115
  referencedColumns: ["id"];
17285
18116
  }, {
17286
18117
  foreignKeyName: "work_order_monteurs_work_order_id_fkey";
@@ -17290,6 +18121,60 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
17290
18121
  referencedColumns: ["id"];
17291
18122
  }];
17292
18123
  };
18124
+ work_order_photos: {
18125
+ Row: {
18126
+ ai_caption: string | null;
18127
+ ai_categorized_at: string | null;
18128
+ ai_labels: import("../integrations/supabase/types").Json | null;
18129
+ caption: string | null;
18130
+ created_at: string;
18131
+ id: string;
18132
+ monteur_id: string | null;
18133
+ photo_type: string;
18134
+ storage_path: string;
18135
+ updated_at: string;
18136
+ work_order_id: string;
18137
+ };
18138
+ Insert: {
18139
+ ai_caption?: string | null;
18140
+ ai_categorized_at?: string | null;
18141
+ ai_labels?: import("../integrations/supabase/types").Json | null;
18142
+ caption?: string | null;
18143
+ created_at?: string;
18144
+ id?: string;
18145
+ monteur_id?: string | null;
18146
+ photo_type?: string;
18147
+ storage_path: string;
18148
+ updated_at?: string;
18149
+ work_order_id: string;
18150
+ };
18151
+ Update: {
18152
+ ai_caption?: string | null;
18153
+ ai_categorized_at?: string | null;
18154
+ ai_labels?: import("../integrations/supabase/types").Json | null;
18155
+ caption?: string | null;
18156
+ created_at?: string;
18157
+ id?: string;
18158
+ monteur_id?: string | null;
18159
+ photo_type?: string;
18160
+ storage_path?: string;
18161
+ updated_at?: string;
18162
+ work_order_id?: string;
18163
+ };
18164
+ Relationships: [{
18165
+ foreignKeyName: "work_order_photos_monteur_id_fkey";
18166
+ columns: ["monteur_id"];
18167
+ isOneToOne: false;
18168
+ referencedRelation: "profiles";
18169
+ referencedColumns: ["id"];
18170
+ }, {
18171
+ foreignKeyName: "work_order_photos_work_order_id_fkey";
18172
+ columns: ["work_order_id"];
18173
+ isOneToOne: false;
18174
+ referencedRelation: "work_orders";
18175
+ referencedColumns: ["id"];
18176
+ }];
18177
+ };
17293
18178
  work_orders: {
17294
18179
  Row: {
17295
18180
  assigned_to: string | null;
@@ -17321,7 +18206,6 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
17321
18206
  scheduled_end_time: string | null;
17322
18207
  scheduled_start_time: string | null;
17323
18208
  status: string;
17324
- tenant_id: string;
17325
18209
  total_hours_worked: number | null;
17326
18210
  total_price: number | null;
17327
18211
  travel_time_minutes: number | null;
@@ -17359,7 +18243,6 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
17359
18243
  scheduled_end_time?: string | null;
17360
18244
  scheduled_start_time?: string | null;
17361
18245
  status?: string;
17362
- tenant_id: string;
17363
18246
  total_hours_worked?: number | null;
17364
18247
  total_price?: number | null;
17365
18248
  travel_time_minutes?: number | null;
@@ -17397,7 +18280,6 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
17397
18280
  scheduled_end_time?: string | null;
17398
18281
  scheduled_start_time?: string | null;
17399
18282
  status?: string;
17400
- tenant_id?: string;
17401
18283
  total_hours_worked?: number | null;
17402
18284
  total_price?: number | null;
17403
18285
  travel_time_minutes?: number | null;
@@ -17411,12 +18293,6 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
17411
18293
  isOneToOne: false;
17412
18294
  referencedRelation: "work_orders";
17413
18295
  referencedColumns: ["id"];
17414
- }, {
17415
- foreignKeyName: "work_orders_tenant_id_fkey";
17416
- columns: ["tenant_id"];
17417
- isOneToOne: false;
17418
- referencedRelation: "tenants";
17419
- referencedColumns: ["id"];
17420
18296
  }];
17421
18297
  };
17422
18298
  };
@@ -18101,6 +18977,19 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
18101
18977
  };
18102
18978
  Returns: undefined;
18103
18979
  };
18980
+ approve_mailbox_order_proposal: {
18981
+ Args: {
18982
+ p_custom_fields: import("../integrations/supabase/types").Json;
18983
+ p_customer_id: string;
18984
+ p_delivery_date: string;
18985
+ p_field_values?: import("../integrations/supabase/types").Json;
18986
+ p_lines: import("../integrations/supabase/types").Json;
18987
+ p_notes: string;
18988
+ p_proposal_id: string;
18989
+ p_reviewed_by: string;
18990
+ };
18991
+ Returns: import("../integrations/supabase/types").Json;
18992
+ };
18104
18993
  assign_cart_numbers: {
18105
18994
  Args: {
18106
18995
  p_carts: import("../integrations/supabase/types").Json;
@@ -18136,6 +19025,10 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
18136
19025
  processed_items: number;
18137
19026
  }[];
18138
19027
  };
19028
+ backfill_order_auto_invoice_queue: {
19029
+ Args: never;
19030
+ Returns: number;
19031
+ };
18139
19032
  calculate_layer_stock: {
18140
19033
  Args: {
18141
19034
  p_product_id: string;
@@ -18148,6 +19041,10 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
18148
19041
  };
18149
19042
  Returns: number;
18150
19043
  };
19044
+ can_manage_hours: {
19045
+ Args: never;
19046
+ Returns: boolean;
19047
+ };
18151
19048
  check_offer_product_available_stock: {
18152
19049
  Args: {
18153
19050
  p_campaign_product_id: string;
@@ -18170,7 +19067,78 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
18170
19067
  };
18171
19068
  Returns: import("../integrations/supabase/types").Json;
18172
19069
  };
18173
- claim_logistics_tasks: {
19070
+ claim_cloud_print_jobs: {
19071
+ Args: {
19072
+ _max?: number;
19073
+ };
19074
+ Returns: {
19075
+ agent_id: string | null;
19076
+ bron_job_id: string | null;
19077
+ created_at: string;
19078
+ documentnaam: string;
19079
+ documenttype: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"];
19080
+ extern_job_id: string | null;
19081
+ foutmelding: string | null;
19082
+ gebruiker_id: string | null;
19083
+ gebruiker_naam: string;
19084
+ gestart_op: string | null;
19085
+ id: string;
19086
+ idempotentie_sleutel: string | null;
19087
+ is_herprint: boolean;
19088
+ kopieen: number;
19089
+ layout_id: string | null;
19090
+ opgepakt_op: string | null;
19091
+ paginas: number;
19092
+ payload: import("../integrations/supabase/types").Json;
19093
+ pdf_base64: string | null;
19094
+ pdf_url: string | null;
19095
+ pogingen: number;
19096
+ printer_id: string | null;
19097
+ render_html: string | null;
19098
+ status: import("../integrations/supabase/types").Database["public"]["Enums"]["print_job_status"];
19099
+ updated_at: string;
19100
+ volgende_poging: string | null;
19101
+ voltooid_op: string | null;
19102
+ }[];
19103
+ SetofOptions: {
19104
+ from: "*";
19105
+ to: "print_jobs";
19106
+ isOneToOne: false;
19107
+ isSetofReturn: true;
19108
+ };
19109
+ };
19110
+ claim_floriday_stock_queue: {
19111
+ Args: {
19112
+ p_limit?: number;
19113
+ p_worker?: string;
19114
+ };
19115
+ Returns: {
19116
+ attempts: number;
19117
+ connection_id: string;
19118
+ created_at: string;
19119
+ desired_available: boolean | null;
19120
+ gateway_attempt_id: string | null;
19121
+ id: string;
19122
+ last_error: string | null;
19123
+ locked_at: string | null;
19124
+ locked_by: string | null;
19125
+ next_attempt_at: string;
19126
+ number_of_pieces: number;
19127
+ sent_at: string | null;
19128
+ status: string;
19129
+ superseded_by: string | null;
19130
+ trade_item_id: string;
19131
+ updated_at: string;
19132
+ user_id: string;
19133
+ }[];
19134
+ SetofOptions: {
19135
+ from: "*";
19136
+ to: "floriday_continuous_stock_queue";
19137
+ isOneToOne: false;
19138
+ isSetofReturn: true;
19139
+ };
19140
+ };
19141
+ claim_logistics_tasks: {
18174
19142
  Args: {
18175
19143
  _limit?: number;
18176
19144
  _owner_module: string;
@@ -18229,22 +19197,27 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
18229
19197
  created_at: string;
18230
19198
  documentnaam: string;
18231
19199
  documenttype: import("../integrations/supabase/types").Database["public"]["Enums"]["doc_layout_type"];
19200
+ extern_job_id: string | null;
18232
19201
  foutmelding: string | null;
18233
19202
  gebruiker_id: string | null;
18234
19203
  gebruiker_naam: string;
18235
19204
  gestart_op: string | null;
18236
19205
  id: string;
19206
+ idempotentie_sleutel: string | null;
18237
19207
  is_herprint: boolean;
18238
19208
  kopieen: number;
18239
19209
  layout_id: string | null;
18240
19210
  opgepakt_op: string | null;
18241
19211
  paginas: number;
18242
19212
  payload: import("../integrations/supabase/types").Json;
19213
+ pdf_base64: string | null;
19214
+ pdf_url: string | null;
18243
19215
  pogingen: number;
18244
19216
  printer_id: string | null;
18245
19217
  render_html: string | null;
18246
19218
  status: import("../integrations/supabase/types").Database["public"]["Enums"]["print_job_status"];
18247
19219
  updated_at: string;
19220
+ volgende_poging: string | null;
18248
19221
  voltooid_op: string | null;
18249
19222
  }[];
18250
19223
  SetofOptions: {
@@ -18261,6 +19234,7 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
18261
19234
  };
18262
19235
  Returns: {
18263
19236
  action: string;
19237
+ attempt_started_at: string | null;
18264
19238
  attempts: number;
18265
19239
  connection_id: string | null;
18266
19240
  created_at: string;
@@ -18282,10 +19256,28 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
18282
19256
  isSetofReturn: true;
18283
19257
  };
18284
19258
  };
19259
+ cleanup_floriday_stock_queue: {
19260
+ Args: never;
19261
+ Returns: undefined;
19262
+ };
18285
19263
  cleanup_old_bookings: {
18286
19264
  Args: never;
18287
19265
  Returns: undefined;
18288
19266
  };
19267
+ cleanup_voorraad_module_history: {
19268
+ Args: never;
19269
+ Returns: undefined;
19270
+ };
19271
+ complete_floriday_stock_queue: {
19272
+ Args: {
19273
+ p_attempt_id?: string;
19274
+ p_error?: string;
19275
+ p_id: string;
19276
+ p_ok: boolean;
19277
+ p_permanent?: boolean;
19278
+ };
19279
+ Returns: undefined;
19280
+ };
18289
19281
  consume_bom_for_production: {
18290
19282
  Args: {
18291
19283
  p_connection_id: string;
@@ -18330,6 +19322,30 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
18330
19322
  agent_naam: string;
18331
19323
  }[];
18332
19324
  };
19325
+ consume_van_inventory: {
19326
+ Args: {
19327
+ p_inventory_id: string;
19328
+ p_quantity: number;
19329
+ };
19330
+ Returns: {
19331
+ barcode: string | null;
19332
+ created_at: string;
19333
+ id: string;
19334
+ monteur_id: string | null;
19335
+ price_per_unit: number;
19336
+ product_name: string;
19337
+ quantity_current: number;
19338
+ quantity_min: number;
19339
+ unit: string;
19340
+ updated_at: string;
19341
+ };
19342
+ SetofOptions: {
19343
+ from: "*";
19344
+ to: "van_inventories";
19345
+ isOneToOne: true;
19346
+ isSetofReturn: false;
19347
+ };
19348
+ };
18333
19349
  control_get_todays_carts: {
18334
19350
  Args: never;
18335
19351
  Returns: {
@@ -18397,6 +19413,20 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
18397
19413
  };
18398
19414
  Returns: import("../integrations/supabase/types").Json;
18399
19415
  };
19416
+ effective_module_permission: {
19417
+ Args: {
19418
+ _module_id: string;
19419
+ _user_id: string;
19420
+ };
19421
+ Returns: string;
19422
+ } | {
19423
+ Args: {
19424
+ _feature_id: string;
19425
+ _module_id: string;
19426
+ _user_id: string;
19427
+ };
19428
+ Returns: string;
19429
+ };
18400
19430
  email_auth_decrypt: {
18401
19431
  Args: {
18402
19432
  cipher: string;
@@ -18747,12 +19777,6 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
18747
19777
  Args: never;
18748
19778
  Returns: string;
18749
19779
  };
18750
- get_work_order_tenant_id: {
18751
- Args: {
18752
- wo_id: string;
18753
- };
18754
- Returns: string;
18755
- };
18756
19780
  has_module_permission: {
18757
19781
  Args: {
18758
19782
  _min: string;
@@ -18786,6 +19810,13 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
18786
19810
  };
18787
19811
  Returns: boolean;
18788
19812
  };
19813
+ is_time_log_week_locked: {
19814
+ Args: {
19815
+ p_employee_id: string;
19816
+ p_start_time: string;
19817
+ };
19818
+ Returns: boolean;
19819
+ };
18789
19820
  is_user_admin: {
18790
19821
  Args: never;
18791
19822
  Returns: boolean;
@@ -18800,13 +19831,14 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
18800
19831
  };
18801
19832
  Returns: boolean;
18802
19833
  };
18803
- list_monteurs: {
19834
+ list_medewerkers: {
18804
19835
  Args: never;
18805
19836
  Returns: {
18806
19837
  avatar_url: string;
18807
19838
  display_name: string;
18808
19839
  email: string;
18809
19840
  id: string;
19841
+ roles: string[];
18810
19842
  }[];
18811
19843
  };
18812
19844
  list_my_planning_items: {
@@ -19200,6 +20232,51 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
19200
20232
  isSetofReturn: false;
19201
20233
  };
19202
20234
  };
20235
+ logistics_floriday_claim_pushes: {
20236
+ Args: {
20237
+ _lease_seconds?: number;
20238
+ _limit?: number;
20239
+ _worker?: string;
20240
+ };
20241
+ Returns: {
20242
+ attempts: number;
20243
+ fulfillment_order_id: string;
20244
+ id: string;
20245
+ last_sent_hash: string;
20246
+ order_ref: string;
20247
+ payload: import("../integrations/supabase/types").Json;
20248
+ payload_hash: string;
20249
+ revision: number;
20250
+ }[];
20251
+ };
20252
+ logistics_floriday_finish_push: {
20253
+ Args: {
20254
+ _error?: string;
20255
+ _fulfillment_order_id?: string;
20256
+ _id: string;
20257
+ _max_age_hours?: number;
20258
+ _max_attempts?: number;
20259
+ _ok: boolean;
20260
+ _permanent?: boolean;
20261
+ _revision: number;
20262
+ _sent_hash?: string;
20263
+ };
20264
+ Returns: string;
20265
+ };
20266
+ logistics_floriday_prune_pushes: {
20267
+ Args: {
20268
+ _days?: number;
20269
+ };
20270
+ Returns: number;
20271
+ };
20272
+ logistics_floriday_queue_push: {
20273
+ Args: {
20274
+ _order_ref: string;
20275
+ _payload?: import("../integrations/supabase/types").Json;
20276
+ _payload_hash?: string;
20277
+ };
20278
+ Returns: string;
20279
+ };
19203
20280
  logistics_live_carriers: {
19204
20281
  Args: {
19205
20282
  p_order_ref: string;
@@ -19252,6 +20329,65 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
19252
20329
  };
19253
20330
  Returns: number;
19254
20331
  };
20332
+ logistics_plan_claim: {
20333
+ Args: {
20334
+ p_limit?: number;
20335
+ };
20336
+ Returns: {
20337
+ attempts: number;
20338
+ id: string;
20339
+ order_id: string;
20340
+ }[];
20341
+ };
20342
+ logistics_plan_enqueue: {
20343
+ Args: {
20344
+ p_order_id: string;
20345
+ p_reason?: string;
20346
+ };
20347
+ Returns: undefined;
20348
+ };
20349
+ logistics_plan_ensure_event: {
20350
+ Args: {
20351
+ p_order_id: string;
20352
+ };
20353
+ Returns: boolean;
20354
+ };
20355
+ logistics_plan_finish: {
20356
+ Args: {
20357
+ p_error?: string;
20358
+ p_id: string;
20359
+ };
20360
+ Returns: undefined;
20361
+ };
20362
+ logistics_plan_impact_orders: {
20363
+ Args: {
20364
+ p_order_id: string;
20365
+ };
20366
+ Returns: {
20367
+ buffer_id: string;
20368
+ order_id: string;
20369
+ plan_date: string;
20370
+ }[];
20371
+ };
20372
+ logistics_plan_kick: {
20373
+ Args: never;
20374
+ Returns: undefined;
20375
+ };
20376
+ logistics_plan_prune: {
20377
+ Args: never;
20378
+ Returns: number;
20379
+ };
20380
+ logistics_plan_release_stale: {
20381
+ Args: never;
20382
+ Returns: number;
20383
+ };
20384
+ logistics_plan_setting: {
20385
+ Args: {
20386
+ p_default: number;
20387
+ p_key: string;
20388
+ };
20389
+ Returns: number;
20390
+ };
19255
20391
  logistics_queue_capacity_email: {
19256
20392
  Args: {
19257
20393
  p_alert_id: string;
@@ -19490,6 +20626,14 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
19490
20626
  };
19491
20627
  Returns: undefined;
19492
20628
  };
20629
+ my_module_permissions: {
20630
+ Args: never;
20631
+ Returns: {
20632
+ feature_id: string;
20633
+ module_id: string;
20634
+ permission: string;
20635
+ }[];
20636
+ };
19493
20637
  next_manufacture_partij: {
19494
20638
  Args: {
19495
20639
  _tenant_id: string;
@@ -19540,6 +20684,13 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
19540
20684
  };
19541
20685
  Returns: boolean;
19542
20686
  };
20687
+ opruim_print_historie: {
20688
+ Args: never;
20689
+ Returns: {
20690
+ ontdaan: number;
20691
+ verwijderd: number;
20692
+ }[];
20693
+ };
19543
20694
  order_number_prefix: {
19544
20695
  Args: {
19545
20696
  p_custom_fields?: import("../integrations/supabase/types").Json;
@@ -19547,6 +20698,15 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
19547
20698
  };
19548
20699
  Returns: string;
19549
20700
  };
20701
+ pick_active_printers: {
20702
+ Args: never;
20703
+ Returns: {
20704
+ id: string;
20705
+ locatie: string;
20706
+ naam: string;
20707
+ online: boolean;
20708
+ }[];
20709
+ };
19550
20710
  pick_claim_document: {
19551
20711
  Args: {
19552
20712
  _queue_item_id: string;
@@ -19733,6 +20893,52 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
19733
20893
  };
19734
20894
  Returns: undefined;
19735
20895
  };
20896
+ pick_reset_print: {
20897
+ Args: {
20898
+ _queue_item_id: string;
20899
+ _session_id: string;
20900
+ };
20901
+ Returns: {
20902
+ announced_at: string;
20903
+ assigned_user_id: string | null;
20904
+ barcode: string | null;
20905
+ cancelled_at: string | null;
20906
+ cart_count: number;
20907
+ completed_at: string | null;
20908
+ country_code: string | null;
20909
+ created_at: string;
20910
+ customer_name: string | null;
20911
+ delivery_address: string | null;
20912
+ document_number: string | null;
20913
+ document_type_id: string | null;
20914
+ due_at: string | null;
20915
+ id: string;
20916
+ is_urgent: boolean;
20917
+ line_count: number;
20918
+ order_number: string | null;
20919
+ order_type: string | null;
20920
+ payload: import("../integrations/supabase/types").Json;
20921
+ print_count: number;
20922
+ print_job_id: string | null;
20923
+ printed_at: string | null;
20924
+ printed_by: string | null;
20925
+ printer_id: string | null;
20926
+ priority: number;
20927
+ reference: string | null;
20928
+ route: string | null;
20929
+ screen_id: string | null;
20930
+ station_id: string | null;
20931
+ status_id: string | null;
20932
+ updated_at: string;
20933
+ warnings: import("../integrations/supabase/types").Json;
20934
+ };
20935
+ SetofOptions: {
20936
+ from: "*";
20937
+ to: "pick_queue";
20938
+ isOneToOne: true;
20939
+ isSetofReturn: false;
20940
+ };
20941
+ };
19736
20942
  pick_station_dashboard: {
19737
20943
  Args: never;
19738
20944
  Returns: {
@@ -19879,6 +21085,12 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
19879
21085
  };
19880
21086
  Returns: undefined;
19881
21087
  };
21088
+ reset_stalled_floriday_stock_queue: {
21089
+ Args: {
21090
+ p_include_failed?: boolean;
21091
+ };
21092
+ Returns: number;
21093
+ };
19882
21094
  resolve_group_allocation: {
19883
21095
  Args: {
19884
21096
  _needed: number;
@@ -19923,14 +21135,28 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
19923
21135
  };
19924
21136
  Returns: import("../integrations/supabase/types").Json;
19925
21137
  };
21138
+ ruim_print_jobs_op: {
21139
+ Args: {
21140
+ _bewaar_dagen?: number;
21141
+ };
21142
+ Returns: number;
21143
+ };
19926
21144
  run_floriday_continuous_stock_sync: {
19927
21145
  Args: never;
19928
21146
  Returns: undefined;
19929
21147
  };
21148
+ run_floriday_stock_queue_process: {
21149
+ Args: never;
21150
+ Returns: undefined;
21151
+ };
19930
21152
  run_logistics_tasks_dispatch: {
19931
21153
  Args: never;
19932
21154
  Returns: undefined;
19933
21155
  };
21156
+ run_print_queue_ticks: {
21157
+ Args: never;
21158
+ Returns: number;
21159
+ };
19934
21160
  run_twinfield_queue_tick: {
19935
21161
  Args: never;
19936
21162
  Returns: undefined;
@@ -20171,6 +21397,13 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
20171
21397
  };
20172
21398
  Returns: number;
20173
21399
  };
21400
+ schedule_floriday_stock_queue_process: {
21401
+ Args: {
21402
+ p_apikey: string;
21403
+ p_url: string;
21404
+ };
21405
+ Returns: number;
21406
+ };
20174
21407
  schedule_floriday_token_refresh: {
20175
21408
  Args: {
20176
21409
  p_apikey: string;
@@ -20277,6 +21510,16 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
20277
21510
  };
20278
21511
  Returns: string[];
20279
21512
  };
21513
+ switch_time_log: {
21514
+ Args: {
21515
+ p_employee_id: string;
21516
+ p_start_lat?: number;
21517
+ p_start_lng?: number;
21518
+ p_type: string;
21519
+ p_work_order_id?: string;
21520
+ };
21521
+ Returns: import("../integrations/supabase/types").Json;
21522
+ };
20280
21523
  sync_all_layer_stocks: {
20281
21524
  Args: never;
20282
21525
  Returns: undefined;
@@ -20311,6 +21554,15 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
20311
21554
  };
20312
21555
  Returns: undefined;
20313
21556
  };
21557
+ trade_item_stock_duplicates: {
21558
+ Args: never;
21559
+ Returns: {
21560
+ keys: string[];
21561
+ product_id: string;
21562
+ product_name: string;
21563
+ row_count: number;
21564
+ }[];
21565
+ };
20314
21566
  try_debtor_lock: {
20315
21567
  Args: {
20316
21568
  _group_key: string;
@@ -20318,6 +21570,24 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
20318
21570
  };
20319
21571
  Returns: boolean;
20320
21572
  };
21573
+ twinfield_cron_lock_acquire: {
21574
+ Args: {
21575
+ _job_name: string;
21576
+ _stale_seconds?: number;
21577
+ };
21578
+ Returns: boolean;
21579
+ };
21580
+ twinfield_cron_lock_release: {
21581
+ Args: {
21582
+ _error?: string;
21583
+ _job_name: string;
21584
+ };
21585
+ Returns: undefined;
21586
+ };
21587
+ twinfield_prune_push_queue: {
21588
+ Args: never;
21589
+ Returns: number;
21590
+ };
20321
21591
  twinfield_register_cron: {
20322
21592
  Args: {
20323
21593
  apikey?: string;
@@ -20360,7 +21630,7 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
20360
21630
  };
20361
21631
  Enums: {
20362
21632
  ai_import_status: "nieuw" | "verwerken" | "bevestigen" | "klaar" | "mislukt";
20363
- app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin";
21633
+ app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie";
20364
21634
  doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon";
20365
21635
  doc_orientation: "portrait" | "landscape";
20366
21636
  exact_env: "staging" | "live";
@@ -20381,7 +21651,7 @@ export declare const listSalesOrders: import("@tanstack/start-client-core").Opti
20381
21651
  claims: import("@supabase/auth-js").User;
20382
21652
  }, undefined, undefined, undefined>], (input: unknown) => {
20383
21653
  dateField: "ordered" | "delivery";
20384
- tab: "cancelled" | "shipped" | "invoiced" | "open" | "all";
21654
+ tab: "picked" | "shipped" | "incoming" | "topick" | "cancelled" | "all";
20385
21655
  page: number;
20386
21656
  pageSize: number;
20387
21657
  since?: string | undefined;