@flowselections/mailbox-orders 1.0.14 → 1.0.16

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.
@@ -872,6 +872,126 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
872
872
  };
873
873
  Relationships: [];
874
874
  };
875
+ cao_holidays: {
876
+ Row: {
877
+ created_at: string;
878
+ description: string | null;
879
+ holiday_date: string;
880
+ id: string;
881
+ updated_at: string;
882
+ };
883
+ Insert: {
884
+ created_at?: string;
885
+ description?: string | null;
886
+ holiday_date: string;
887
+ id?: string;
888
+ updated_at?: string;
889
+ };
890
+ Update: {
891
+ created_at?: string;
892
+ description?: string | null;
893
+ holiday_date?: string;
894
+ id?: string;
895
+ updated_at?: string;
896
+ };
897
+ Relationships: [];
898
+ };
899
+ cao_settings: {
900
+ Row: {
901
+ auto_break_after_hours: number;
902
+ auto_break_minutes: number;
903
+ auto_break_unpaid: boolean;
904
+ auto_stop_after_hours: number;
905
+ callout_fee: number;
906
+ created_at: string;
907
+ daily_regular_hours: number;
908
+ default_hourly_rate: number;
909
+ id: string;
910
+ materials_markup_percent: number;
911
+ max_daily_hours: number;
912
+ max_weekly_hours: number;
913
+ meal_allowance_amount: number;
914
+ overtime_pct_178: number;
915
+ overtime_pct_189: number;
916
+ overtime_pct_212: number;
917
+ reminder_after_hours: number;
918
+ standby_evening_amount: number;
919
+ standby_weekend_amount: number;
920
+ travel_cost_per_km: number | null;
921
+ travel_cost_threshold_km: number | null;
922
+ travel_counts_as_work: boolean;
923
+ travel_hourly_rate: number;
924
+ travel_rate_per_hour: number;
925
+ travel_threshold_minutes: number;
926
+ updated_at: string;
927
+ weekend_always_212: boolean;
928
+ window_end: string;
929
+ window_start: string;
930
+ };
931
+ Insert: {
932
+ auto_break_after_hours?: number;
933
+ auto_break_minutes?: number;
934
+ auto_break_unpaid?: boolean;
935
+ auto_stop_after_hours?: number;
936
+ callout_fee?: number;
937
+ created_at?: string;
938
+ daily_regular_hours?: number;
939
+ default_hourly_rate?: number;
940
+ id?: string;
941
+ materials_markup_percent?: number;
942
+ max_daily_hours?: number;
943
+ max_weekly_hours?: number;
944
+ meal_allowance_amount?: number;
945
+ overtime_pct_178?: number;
946
+ overtime_pct_189?: number;
947
+ overtime_pct_212?: number;
948
+ reminder_after_hours?: number;
949
+ standby_evening_amount?: number;
950
+ standby_weekend_amount?: number;
951
+ travel_cost_per_km?: number | null;
952
+ travel_cost_threshold_km?: number | null;
953
+ travel_counts_as_work?: boolean;
954
+ travel_hourly_rate?: number;
955
+ travel_rate_per_hour?: number;
956
+ travel_threshold_minutes?: number;
957
+ updated_at?: string;
958
+ weekend_always_212?: boolean;
959
+ window_end?: string;
960
+ window_start?: string;
961
+ };
962
+ Update: {
963
+ auto_break_after_hours?: number;
964
+ auto_break_minutes?: number;
965
+ auto_break_unpaid?: boolean;
966
+ auto_stop_after_hours?: number;
967
+ callout_fee?: number;
968
+ created_at?: string;
969
+ daily_regular_hours?: number;
970
+ default_hourly_rate?: number;
971
+ id?: string;
972
+ materials_markup_percent?: number;
973
+ max_daily_hours?: number;
974
+ max_weekly_hours?: number;
975
+ meal_allowance_amount?: number;
976
+ overtime_pct_178?: number;
977
+ overtime_pct_189?: number;
978
+ overtime_pct_212?: number;
979
+ reminder_after_hours?: number;
980
+ standby_evening_amount?: number;
981
+ standby_weekend_amount?: number;
982
+ travel_cost_per_km?: number | null;
983
+ travel_cost_threshold_km?: number | null;
984
+ travel_counts_as_work?: boolean;
985
+ travel_hourly_rate?: number;
986
+ travel_rate_per_hour?: number;
987
+ travel_threshold_minutes?: number;
988
+ updated_at?: string;
989
+ weekend_always_212?: boolean;
990
+ window_end?: string;
991
+ window_start?: string;
992
+ };
993
+ Relationships: [];
994
+ };
875
995
  carrier_shipping_rates: {
876
996
  Row: {
877
997
  carrier_id: string;
@@ -6480,6 +6600,7 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
6480
6600
  Row: {
6481
6601
  buyer_organization_id: string | null;
6482
6602
  connection_id: string;
6603
+ controlled_at: string | null;
6483
6604
  created_at: string;
6484
6605
  data: import("./types").Json;
6485
6606
  floriday_id: string;
@@ -6491,6 +6612,7 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
6491
6612
  Insert: {
6492
6613
  buyer_organization_id?: string | null;
6493
6614
  connection_id: string;
6615
+ controlled_at?: string | null;
6494
6616
  created_at?: string;
6495
6617
  data: import("./types").Json;
6496
6618
  floriday_id: string;
@@ -6502,6 +6624,7 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
6502
6624
  Update: {
6503
6625
  buyer_organization_id?: string | null;
6504
6626
  connection_id?: string;
6627
+ controlled_at?: string | null;
6505
6628
  created_at?: string;
6506
6629
  data?: import("./types").Json;
6507
6630
  floriday_id?: string;
@@ -7403,6 +7526,54 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
7403
7526
  };
7404
7527
  Relationships: [];
7405
7528
  };
7529
+ invoice_timing_settings: {
7530
+ Row: {
7531
+ anchor: string;
7532
+ business_days_only: boolean;
7533
+ created_at: string;
7534
+ enabled: boolean;
7535
+ id: string;
7536
+ offset_days: number;
7537
+ pickup_anchor: string;
7538
+ pickup_business_days_only: boolean;
7539
+ pickup_offset_days: number;
7540
+ pickup_time_of_day: string;
7541
+ singleton: boolean;
7542
+ time_of_day: string;
7543
+ updated_at: string;
7544
+ };
7545
+ Insert: {
7546
+ anchor?: string;
7547
+ business_days_only?: boolean;
7548
+ created_at?: string;
7549
+ enabled?: boolean;
7550
+ id?: string;
7551
+ offset_days?: number;
7552
+ pickup_anchor?: string;
7553
+ pickup_business_days_only?: boolean;
7554
+ pickup_offset_days?: number;
7555
+ pickup_time_of_day?: string;
7556
+ singleton?: boolean;
7557
+ time_of_day?: string;
7558
+ updated_at?: string;
7559
+ };
7560
+ Update: {
7561
+ anchor?: string;
7562
+ business_days_only?: boolean;
7563
+ created_at?: string;
7564
+ enabled?: boolean;
7565
+ id?: string;
7566
+ offset_days?: number;
7567
+ pickup_anchor?: string;
7568
+ pickup_business_days_only?: boolean;
7569
+ pickup_offset_days?: number;
7570
+ pickup_time_of_day?: string;
7571
+ singleton?: boolean;
7572
+ time_of_day?: string;
7573
+ updated_at?: string;
7574
+ };
7575
+ Relationships: [];
7576
+ };
7406
7577
  itk_contact_persons: {
7407
7578
  Row: {
7408
7579
  created_at: string;
@@ -7715,7 +7886,6 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
7715
7886
  start_date: string;
7716
7887
  start_time: string | null;
7717
7888
  status: string;
7718
- tenant_id: string;
7719
7889
  updated_at: string;
7720
7890
  user_id: string;
7721
7891
  };
@@ -7733,7 +7903,6 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
7733
7903
  start_date: string;
7734
7904
  start_time?: string | null;
7735
7905
  status?: string;
7736
- tenant_id?: string;
7737
7906
  updated_at?: string;
7738
7907
  user_id: string;
7739
7908
  };
@@ -7751,7 +7920,6 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
7751
7920
  start_date?: string;
7752
7921
  start_time?: string | null;
7753
7922
  status?: string;
7754
- tenant_id?: string;
7755
7923
  updated_at?: string;
7756
7924
  user_id?: string;
7757
7925
  };
@@ -7759,13 +7927,13 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
7759
7927
  foreignKeyName: "leave_requests_monteur_id_fkey";
7760
7928
  columns: ["monteur_id"];
7761
7929
  isOneToOne: false;
7762
- referencedRelation: "monteurs";
7930
+ referencedRelation: "profiles";
7763
7931
  referencedColumns: ["id"];
7764
7932
  }, {
7765
7933
  foreignKeyName: "leave_requests_user_id_fkey";
7766
7934
  columns: ["user_id"];
7767
7935
  isOneToOne: false;
7768
- referencedRelation: "monteurs";
7936
+ referencedRelation: "profiles";
7769
7937
  referencedColumns: ["id"];
7770
7938
  }];
7771
7939
  };
@@ -8633,6 +8801,45 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
8633
8801
  };
8634
8802
  Relationships: [];
8635
8803
  };
8804
+ logistics_plan_queue: {
8805
+ Row: {
8806
+ attempts: number;
8807
+ claimed_at: string | null;
8808
+ enqueued_at: string;
8809
+ error: string | null;
8810
+ id: string;
8811
+ next_attempt_at: string;
8812
+ order_id: string;
8813
+ reason: string;
8814
+ status: string;
8815
+ updated_at: string;
8816
+ };
8817
+ Insert: {
8818
+ attempts?: number;
8819
+ claimed_at?: string | null;
8820
+ enqueued_at?: string;
8821
+ error?: string | null;
8822
+ id?: string;
8823
+ next_attempt_at?: string;
8824
+ order_id: string;
8825
+ reason?: string;
8826
+ status?: string;
8827
+ updated_at?: string;
8828
+ };
8829
+ Update: {
8830
+ attempts?: number;
8831
+ claimed_at?: string | null;
8832
+ enqueued_at?: string;
8833
+ error?: string | null;
8834
+ id?: string;
8835
+ next_attempt_at?: string;
8836
+ order_id?: string;
8837
+ reason?: string;
8838
+ status?: string;
8839
+ updated_at?: string;
8840
+ };
8841
+ Relationships: [];
8842
+ };
8636
8843
  logistics_plan_runs: {
8637
8844
  Row: {
8638
8845
  created_at: string;
@@ -8708,6 +8915,24 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
8708
8915
  referencedColumns: ["id"];
8709
8916
  }];
8710
8917
  };
8918
+ logistics_plan_settings: {
8919
+ Row: {
8920
+ key: string;
8921
+ updated_at: string;
8922
+ value: string;
8923
+ };
8924
+ Insert: {
8925
+ key: string;
8926
+ updated_at?: string;
8927
+ value: string;
8928
+ };
8929
+ Update: {
8930
+ key?: string;
8931
+ updated_at?: string;
8932
+ value?: string;
8933
+ };
8934
+ Relationships: [];
8935
+ };
8711
8936
  logistics_rebuffer_state: {
8712
8937
  Row: {
8713
8938
  created_at: string;
@@ -9863,6 +10088,90 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
9863
10088
  };
9864
10089
  Relationships: [];
9865
10090
  };
10091
+ material_usage: {
10092
+ Row: {
10093
+ created_at: string;
10094
+ id: string;
10095
+ material_name: string;
10096
+ monteur_id: string | null;
10097
+ price_at_time: number;
10098
+ quantity_used: number;
10099
+ updated_at: string;
10100
+ van_inventory_id: string | null;
10101
+ work_order_id: string;
10102
+ };
10103
+ Insert: {
10104
+ created_at?: string;
10105
+ id?: string;
10106
+ material_name: string;
10107
+ monteur_id?: string | null;
10108
+ price_at_time?: number;
10109
+ quantity_used?: number;
10110
+ updated_at?: string;
10111
+ van_inventory_id?: string | null;
10112
+ work_order_id: string;
10113
+ };
10114
+ Update: {
10115
+ created_at?: string;
10116
+ id?: string;
10117
+ material_name?: string;
10118
+ monteur_id?: string | null;
10119
+ price_at_time?: number;
10120
+ quantity_used?: number;
10121
+ updated_at?: string;
10122
+ van_inventory_id?: string | null;
10123
+ work_order_id?: string;
10124
+ };
10125
+ Relationships: [{
10126
+ foreignKeyName: "material_usage_monteur_id_fkey";
10127
+ columns: ["monteur_id"];
10128
+ isOneToOne: false;
10129
+ referencedRelation: "profiles";
10130
+ referencedColumns: ["id"];
10131
+ }, {
10132
+ foreignKeyName: "material_usage_van_inventory_id_fkey";
10133
+ columns: ["van_inventory_id"];
10134
+ isOneToOne: false;
10135
+ referencedRelation: "van_inventories";
10136
+ referencedColumns: ["id"];
10137
+ }, {
10138
+ foreignKeyName: "material_usage_work_order_id_fkey";
10139
+ columns: ["work_order_id"];
10140
+ isOneToOne: false;
10141
+ referencedRelation: "work_orders";
10142
+ referencedColumns: ["id"];
10143
+ }];
10144
+ };
10145
+ module_features: {
10146
+ Row: {
10147
+ created_at: string;
10148
+ feature_id: string;
10149
+ id: string;
10150
+ is_active: boolean;
10151
+ last_seen_at: string;
10152
+ module_id: string;
10153
+ name: string;
10154
+ };
10155
+ Insert: {
10156
+ created_at?: string;
10157
+ feature_id: string;
10158
+ id?: string;
10159
+ is_active?: boolean;
10160
+ last_seen_at?: string;
10161
+ module_id: string;
10162
+ name: string;
10163
+ };
10164
+ Update: {
10165
+ created_at?: string;
10166
+ feature_id?: string;
10167
+ id?: string;
10168
+ is_active?: boolean;
10169
+ last_seen_at?: string;
10170
+ module_id?: string;
10171
+ name?: string;
10172
+ };
10173
+ Relationships: [];
10174
+ };
9866
10175
  module_permissions: {
9867
10176
  Row: {
9868
10177
  created_at: string;
@@ -9971,63 +10280,6 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
9971
10280
  };
9972
10281
  Relationships: [];
9973
10282
  };
9974
- monteurs: {
9975
- Row: {
9976
- avatar_url: string | null;
9977
- color: string | null;
9978
- created_at: string;
9979
- email: string | null;
9980
- id: string;
9981
- is_active: boolean;
9982
- leave_balance_hours: number;
9983
- name: string;
9984
- persnr: number | null;
9985
- phone: string | null;
9986
- role: string;
9987
- tenant_id: string;
9988
- updated_at: string;
9989
- user_id: string | null;
9990
- };
9991
- Insert: {
9992
- avatar_url?: string | null;
9993
- color?: string | null;
9994
- created_at?: string;
9995
- email?: string | null;
9996
- id?: string;
9997
- is_active?: boolean;
9998
- leave_balance_hours?: number;
9999
- name: string;
10000
- persnr?: number | null;
10001
- phone?: string | null;
10002
- role?: string;
10003
- tenant_id: string;
10004
- updated_at?: string;
10005
- user_id?: string | null;
10006
- };
10007
- Update: {
10008
- avatar_url?: string | null;
10009
- color?: string | null;
10010
- created_at?: string;
10011
- email?: string | null;
10012
- id?: string;
10013
- is_active?: boolean;
10014
- leave_balance_hours?: number;
10015
- name?: string;
10016
- persnr?: number | null;
10017
- phone?: string | null;
10018
- role?: string;
10019
- tenant_id?: string;
10020
- updated_at?: string;
10021
- user_id?: string | null;
10022
- };
10023
- Relationships: [{
10024
- foreignKeyName: "monteurs_tenant_id_fkey";
10025
- columns: ["tenant_id"];
10026
- isOneToOne: false;
10027
- referencedRelation: "tenants";
10028
- referencedColumns: ["id"];
10029
- }];
10030
- };
10031
10283
  nmbrs_component_mapping: {
10032
10284
  Row: {
10033
10285
  created_at: string;
@@ -10098,13 +10350,7 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
10098
10350
  nmbrs_employee_number?: string;
10099
10351
  updated_at?: string;
10100
10352
  };
10101
- Relationships: [{
10102
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
10103
- columns: ["monteur_id"];
10104
- isOneToOne: true;
10105
- referencedRelation: "monteurs";
10106
- referencedColumns: ["id"];
10107
- }];
10353
+ Relationships: [];
10108
10354
  };
10109
10355
  nmbrs_export_lines: {
10110
10356
  Row: {
@@ -10153,12 +10399,6 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
10153
10399
  wage_code?: string;
10154
10400
  };
10155
10401
  Relationships: [{
10156
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
10157
- columns: ["monteur_id"];
10158
- isOneToOne: false;
10159
- referencedRelation: "monteurs";
10160
- referencedColumns: ["id"];
10161
- }, {
10162
10402
  foreignKeyName: "nmbrs_export_lines_run_id_fkey";
10163
10403
  columns: ["run_id"];
10164
10404
  isOneToOne: false;
@@ -10979,32 +11219,71 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
10979
11219
  };
10980
11220
  Relationships: [];
10981
11221
  };
10982
- order_items: {
11222
+ order_invoice_links: {
10983
11223
  Row: {
10984
- crates_per_layer: number | null;
11224
+ attempts: number;
10985
11225
  created_at: string;
11226
+ error_message: string | null;
10986
11227
  id: string;
10987
- layers_per_cart: number | null;
11228
+ invoice_number: string | null;
11229
+ next_attempt_at: string;
10988
11230
  order_id: string;
10989
- plants_per_crate: number | null;
10990
- product_id: string | null;
10991
- product_name: string;
10992
- quantity: number;
10993
- unit: string;
10994
- unit_price: number | null;
11231
+ processed_at: string | null;
11232
+ status: string;
11233
+ updated_at: string;
10995
11234
  };
10996
11235
  Insert: {
10997
- crates_per_layer?: number | null;
11236
+ attempts?: number;
10998
11237
  created_at?: string;
11238
+ error_message?: string | null;
10999
11239
  id?: string;
11000
- layers_per_cart?: number | null;
11240
+ invoice_number?: string | null;
11241
+ next_attempt_at?: string;
11001
11242
  order_id: string;
11002
- plants_per_crate?: number | null;
11003
- product_id?: string | null;
11004
- product_name: string;
11005
- quantity?: number;
11006
- unit?: string;
11007
- unit_price?: number | null;
11243
+ processed_at?: string | null;
11244
+ status?: string;
11245
+ updated_at?: string;
11246
+ };
11247
+ Update: {
11248
+ attempts?: number;
11249
+ created_at?: string;
11250
+ error_message?: string | null;
11251
+ id?: string;
11252
+ invoice_number?: string | null;
11253
+ next_attempt_at?: string;
11254
+ order_id?: string;
11255
+ processed_at?: string | null;
11256
+ status?: string;
11257
+ updated_at?: string;
11258
+ };
11259
+ Relationships: [];
11260
+ };
11261
+ order_items: {
11262
+ Row: {
11263
+ crates_per_layer: number | null;
11264
+ created_at: string;
11265
+ id: string;
11266
+ layers_per_cart: number | null;
11267
+ order_id: string;
11268
+ plants_per_crate: number | null;
11269
+ product_id: string | null;
11270
+ product_name: string;
11271
+ quantity: number;
11272
+ unit: string;
11273
+ unit_price: number | null;
11274
+ };
11275
+ Insert: {
11276
+ crates_per_layer?: number | null;
11277
+ created_at?: string;
11278
+ id?: string;
11279
+ layers_per_cart?: number | null;
11280
+ order_id: string;
11281
+ plants_per_crate?: number | null;
11282
+ product_id?: string | null;
11283
+ product_name: string;
11284
+ quantity?: number;
11285
+ unit?: string;
11286
+ unit_price?: number | null;
11008
11287
  };
11009
11288
  Update: {
11010
11289
  crates_per_layer?: number | null;
@@ -11161,6 +11440,7 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
11161
11440
  delivery_date: string | null;
11162
11441
  floriday_sales_order_id: string | null;
11163
11442
  id: string;
11443
+ invoice_due_at: string | null;
11164
11444
  is_reservation: boolean;
11165
11445
  notes: string | null;
11166
11446
  order_date: string;
@@ -11182,6 +11462,7 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
11182
11462
  delivery_date?: string | null;
11183
11463
  floriday_sales_order_id?: string | null;
11184
11464
  id?: string;
11465
+ invoice_due_at?: string | null;
11185
11466
  is_reservation?: boolean;
11186
11467
  notes?: string | null;
11187
11468
  order_date?: string;
@@ -11203,6 +11484,7 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
11203
11484
  delivery_date?: string | null;
11204
11485
  floriday_sales_order_id?: string | null;
11205
11486
  id?: string;
11487
+ invoice_due_at?: string | null;
11206
11488
  is_reservation?: boolean;
11207
11489
  notes?: string | null;
11208
11490
  order_date?: string;
@@ -12507,6 +12789,9 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
12507
12789
  created_at: string;
12508
12790
  id: string;
12509
12791
  laatst_gezien: string;
12792
+ laatste_fout: string | null;
12793
+ laatste_request_id: number | null;
12794
+ mislukte_posts: number;
12510
12795
  tick_sleutel: string;
12511
12796
  updated_at: string;
12512
12797
  };
@@ -12516,6 +12801,9 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
12516
12801
  created_at?: string;
12517
12802
  id?: string;
12518
12803
  laatst_gezien?: string;
12804
+ laatste_fout?: string | null;
12805
+ laatste_request_id?: number | null;
12806
+ mislukte_posts?: number;
12519
12807
  tick_sleutel?: string;
12520
12808
  updated_at?: string;
12521
12809
  };
@@ -12525,6 +12813,9 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
12525
12813
  created_at?: string;
12526
12814
  id?: string;
12527
12815
  laatst_gezien?: string;
12816
+ laatste_fout?: string | null;
12817
+ laatste_request_id?: number | null;
12818
+ mislukte_posts?: number;
12528
12819
  tick_sleutel?: string;
12529
12820
  updated_at?: string;
12530
12821
  };
@@ -14033,6 +14324,96 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
14033
14324
  referencedColumns: ["id"];
14034
14325
  }];
14035
14326
  };
14327
+ role_assignments: {
14328
+ Row: {
14329
+ created_at: string;
14330
+ id: string;
14331
+ role_id: string;
14332
+ user_id: string;
14333
+ };
14334
+ Insert: {
14335
+ created_at?: string;
14336
+ id?: string;
14337
+ role_id: string;
14338
+ user_id: string;
14339
+ };
14340
+ Update: {
14341
+ created_at?: string;
14342
+ id?: string;
14343
+ role_id?: string;
14344
+ user_id?: string;
14345
+ };
14346
+ Relationships: [{
14347
+ foreignKeyName: "role_assignments_role_id_fkey";
14348
+ columns: ["role_id"];
14349
+ isOneToOne: false;
14350
+ referencedRelation: "roles";
14351
+ referencedColumns: ["id"];
14352
+ }];
14353
+ };
14354
+ role_permissions: {
14355
+ Row: {
14356
+ can_edit: boolean;
14357
+ can_view: boolean;
14358
+ feature_id: string;
14359
+ id: string;
14360
+ module_id: string;
14361
+ role_id: string;
14362
+ updated_at: string;
14363
+ };
14364
+ Insert: {
14365
+ can_edit?: boolean;
14366
+ can_view?: boolean;
14367
+ feature_id?: string;
14368
+ id?: string;
14369
+ module_id: string;
14370
+ role_id: string;
14371
+ updated_at?: string;
14372
+ };
14373
+ Update: {
14374
+ can_edit?: boolean;
14375
+ can_view?: boolean;
14376
+ feature_id?: string;
14377
+ id?: string;
14378
+ module_id?: string;
14379
+ role_id?: string;
14380
+ updated_at?: string;
14381
+ };
14382
+ Relationships: [{
14383
+ foreignKeyName: "role_permissions_role_id_fkey";
14384
+ columns: ["role_id"];
14385
+ isOneToOne: false;
14386
+ referencedRelation: "roles";
14387
+ referencedColumns: ["id"];
14388
+ }];
14389
+ };
14390
+ roles: {
14391
+ Row: {
14392
+ created_at: string;
14393
+ id: string;
14394
+ is_protected: boolean;
14395
+ key: string;
14396
+ name: string;
14397
+ updated_at: string;
14398
+ };
14399
+ Insert: {
14400
+ created_at?: string;
14401
+ id?: string;
14402
+ is_protected?: boolean;
14403
+ key: string;
14404
+ name: string;
14405
+ updated_at?: string;
14406
+ };
14407
+ Update: {
14408
+ created_at?: string;
14409
+ id?: string;
14410
+ is_protected?: boolean;
14411
+ key?: string;
14412
+ name?: string;
14413
+ updated_at?: string;
14414
+ };
14415
+ Relationships: [];
14416
+ };
14036
14417
  rooms: {
14037
14418
  Row: {
14038
14419
  capacity: number;
@@ -14702,6 +15083,54 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
14702
15083
  };
14703
15084
  Relationships: [];
14704
15085
  };
15086
+ time_compensation_entries: {
15087
+ Row: {
15088
+ created_at: string;
15089
+ employee_id: string;
15090
+ entry_date: string;
15091
+ id: string;
15092
+ km: number;
15093
+ meal_allowance: number;
15094
+ notes: string | null;
15095
+ standby_evening: number;
15096
+ standby_weekend: number;
15097
+ tvt_change: number;
15098
+ updated_at: string;
15099
+ };
15100
+ Insert: {
15101
+ created_at?: string;
15102
+ employee_id: string;
15103
+ entry_date: string;
15104
+ id?: string;
15105
+ km?: number;
15106
+ meal_allowance?: number;
15107
+ notes?: string | null;
15108
+ standby_evening?: number;
15109
+ standby_weekend?: number;
15110
+ tvt_change?: number;
15111
+ updated_at?: string;
15112
+ };
15113
+ Update: {
15114
+ created_at?: string;
15115
+ employee_id?: string;
15116
+ entry_date?: string;
15117
+ id?: string;
15118
+ km?: number;
15119
+ meal_allowance?: number;
15120
+ notes?: string | null;
15121
+ standby_evening?: number;
15122
+ standby_weekend?: number;
15123
+ tvt_change?: number;
15124
+ updated_at?: string;
15125
+ };
15126
+ Relationships: [{
15127
+ foreignKeyName: "time_compensation_entries_employee_id_fkey";
15128
+ columns: ["employee_id"];
15129
+ isOneToOne: false;
15130
+ referencedRelation: "profiles";
15131
+ referencedColumns: ["id"];
15132
+ }];
15133
+ };
14705
15134
  time_entries: {
14706
15135
  Row: {
14707
15136
  created_at: string;
@@ -14736,65 +15165,170 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
14736
15165
  undertime?: number;
14737
15166
  updated_at?: string;
14738
15167
  };
15168
+ Relationships: [];
15169
+ };
15170
+ time_log_week_approvals: {
15171
+ Row: {
15172
+ approved_at: string | null;
15173
+ approved_by: string | null;
15174
+ created_at: string;
15175
+ employee_id: string;
15176
+ id: string;
15177
+ locked: boolean;
15178
+ notes: string | null;
15179
+ status: string;
15180
+ submitted_at: string | null;
15181
+ updated_at: string;
15182
+ week_start: string;
15183
+ };
15184
+ Insert: {
15185
+ approved_at?: string | null;
15186
+ approved_by?: string | null;
15187
+ created_at?: string;
15188
+ employee_id: string;
15189
+ id?: string;
15190
+ locked?: boolean;
15191
+ notes?: string | null;
15192
+ status?: string;
15193
+ submitted_at?: string | null;
15194
+ updated_at?: string;
15195
+ week_start: string;
15196
+ };
15197
+ Update: {
15198
+ approved_at?: string | null;
15199
+ approved_by?: string | null;
15200
+ created_at?: string;
15201
+ employee_id?: string;
15202
+ id?: string;
15203
+ locked?: boolean;
15204
+ notes?: string | null;
15205
+ status?: string;
15206
+ submitted_at?: string | null;
15207
+ updated_at?: string;
15208
+ week_start?: string;
15209
+ };
14739
15210
  Relationships: [{
14740
- foreignKeyName: "time_entries_employee_id_fkey";
15211
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
14741
15212
  columns: ["employee_id"];
14742
15213
  isOneToOne: false;
14743
- referencedRelation: "monteurs";
15214
+ referencedRelation: "profiles";
14744
15215
  referencedColumns: ["id"];
14745
15216
  }];
14746
15217
  };
14747
15218
  time_logs: {
14748
15219
  Row: {
15220
+ auto_stop_reason: string | null;
15221
+ auto_stopped: boolean;
14749
15222
  created_at: string;
15223
+ current_latitude: number | null;
15224
+ current_longitude: number | null;
15225
+ current_position_updated_at: string | null;
14750
15226
  employee_id: string;
15227
+ end_latitude: number | null;
15228
+ end_longitude: number | null;
14751
15229
  end_time: string | null;
15230
+ eta_distance_km: number | null;
15231
+ eta_minutes: number | null;
15232
+ eta_updated_at: string | null;
15233
+ hour_category: string | null;
14752
15234
  id: string;
15235
+ last_reminder_at: string | null;
14753
15236
  notes: string | null;
14754
15237
  overtime_hours: number;
14755
15238
  overtime_type: string | null;
14756
15239
  regular_hours: number;
15240
+ reminder_count: number;
15241
+ requires_review: boolean;
15242
+ start_latitude: number | null;
15243
+ start_longitude: number | null;
14757
15244
  start_time: string;
14758
15245
  travel_cost: number | null;
14759
15246
  travel_distance_km: number | null;
15247
+ travel_duration_min: number | null;
15248
+ travel_time_minutes: number | null;
14760
15249
  type: string;
14761
15250
  updated_at: string;
15251
+ work_order_id: string | null;
14762
15252
  };
14763
15253
  Insert: {
15254
+ auto_stop_reason?: string | null;
15255
+ auto_stopped?: boolean;
14764
15256
  created_at?: string;
15257
+ current_latitude?: number | null;
15258
+ current_longitude?: number | null;
15259
+ current_position_updated_at?: string | null;
14765
15260
  employee_id: string;
15261
+ end_latitude?: number | null;
15262
+ end_longitude?: number | null;
14766
15263
  end_time?: string | null;
15264
+ eta_distance_km?: number | null;
15265
+ eta_minutes?: number | null;
15266
+ eta_updated_at?: string | null;
15267
+ hour_category?: string | null;
14767
15268
  id?: string;
15269
+ last_reminder_at?: string | null;
14768
15270
  notes?: string | null;
14769
15271
  overtime_hours?: number;
14770
15272
  overtime_type?: string | null;
14771
15273
  regular_hours?: number;
15274
+ reminder_count?: number;
15275
+ requires_review?: boolean;
15276
+ start_latitude?: number | null;
15277
+ start_longitude?: number | null;
14772
15278
  start_time?: string;
14773
15279
  travel_cost?: number | null;
14774
15280
  travel_distance_km?: number | null;
15281
+ travel_duration_min?: number | null;
15282
+ travel_time_minutes?: number | null;
14775
15283
  type: string;
14776
15284
  updated_at?: string;
15285
+ work_order_id?: string | null;
14777
15286
  };
14778
15287
  Update: {
15288
+ auto_stop_reason?: string | null;
15289
+ auto_stopped?: boolean;
14779
15290
  created_at?: string;
15291
+ current_latitude?: number | null;
15292
+ current_longitude?: number | null;
15293
+ current_position_updated_at?: string | null;
14780
15294
  employee_id?: string;
15295
+ end_latitude?: number | null;
15296
+ end_longitude?: number | null;
14781
15297
  end_time?: string | null;
15298
+ eta_distance_km?: number | null;
15299
+ eta_minutes?: number | null;
15300
+ eta_updated_at?: string | null;
15301
+ hour_category?: string | null;
14782
15302
  id?: string;
15303
+ last_reminder_at?: string | null;
14783
15304
  notes?: string | null;
14784
15305
  overtime_hours?: number;
14785
15306
  overtime_type?: string | null;
14786
15307
  regular_hours?: number;
15308
+ reminder_count?: number;
15309
+ requires_review?: boolean;
15310
+ start_latitude?: number | null;
15311
+ start_longitude?: number | null;
14787
15312
  start_time?: string;
14788
15313
  travel_cost?: number | null;
14789
15314
  travel_distance_km?: number | null;
15315
+ travel_duration_min?: number | null;
15316
+ travel_time_minutes?: number | null;
14790
15317
  type?: string;
14791
15318
  updated_at?: string;
15319
+ work_order_id?: string | null;
14792
15320
  };
14793
15321
  Relationships: [{
14794
15322
  foreignKeyName: "time_logs_employee_id_fkey";
14795
15323
  columns: ["employee_id"];
14796
15324
  isOneToOne: false;
14797
- referencedRelation: "monteurs";
15325
+ referencedRelation: "profiles";
15326
+ referencedColumns: ["id"];
15327
+ }, {
15328
+ foreignKeyName: "time_logs_work_order_id_fkey";
15329
+ columns: ["work_order_id"];
15330
+ isOneToOne: false;
15331
+ referencedRelation: "work_orders";
14798
15332
  referencedColumns: ["id"];
14799
15333
  }];
14800
15334
  };
@@ -14833,7 +15367,7 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
14833
15367
  foreignKeyName: "time_off_entries_employee_id_fkey";
14834
15368
  columns: ["employee_id"];
14835
15369
  isOneToOne: false;
14836
- referencedRelation: "monteurs";
15370
+ referencedRelation: "profiles";
14837
15371
  referencedColumns: ["id"];
14838
15372
  }];
14839
15373
  };
@@ -15143,6 +15677,39 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
15143
15677
  };
15144
15678
  Relationships: [];
15145
15679
  };
15680
+ twinfield_cron_locks: {
15681
+ Row: {
15682
+ created_at: string;
15683
+ heartbeat_at: string;
15684
+ job_name: string;
15685
+ last_error: string | null;
15686
+ last_finished_at: string | null;
15687
+ locked_at: string;
15688
+ run_id: string;
15689
+ updated_at: string;
15690
+ };
15691
+ Insert: {
15692
+ created_at?: string;
15693
+ heartbeat_at?: string;
15694
+ job_name: string;
15695
+ last_error?: string | null;
15696
+ last_finished_at?: string | null;
15697
+ locked_at?: string;
15698
+ run_id?: string;
15699
+ updated_at?: string;
15700
+ };
15701
+ Update: {
15702
+ created_at?: string;
15703
+ heartbeat_at?: string;
15704
+ job_name?: string;
15705
+ last_error?: string | null;
15706
+ last_finished_at?: string | null;
15707
+ locked_at?: string;
15708
+ run_id?: string;
15709
+ updated_at?: string;
15710
+ };
15711
+ Relationships: [];
15712
+ };
15146
15713
  twinfield_customers: {
15147
15714
  Row: {
15148
15715
  address: string | null;
@@ -15397,6 +15964,8 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
15397
15964
  };
15398
15965
  twinfield_invoice_settings: {
15399
15966
  Row: {
15967
+ auto_invoice_enabled: boolean;
15968
+ auto_invoice_trigger_statuses: string[];
15400
15969
  created_at: string;
15401
15970
  debtor_gl_account: string;
15402
15971
  default_credit_invoice_type: string | null;
@@ -15417,6 +15986,8 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
15417
15986
  vat_code_export: string | null;
15418
15987
  };
15419
15988
  Insert: {
15989
+ auto_invoice_enabled?: boolean;
15990
+ auto_invoice_trigger_statuses?: string[];
15420
15991
  created_at?: string;
15421
15992
  debtor_gl_account?: string;
15422
15993
  default_credit_invoice_type?: string | null;
@@ -15437,6 +16008,8 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
15437
16008
  vat_code_export?: string | null;
15438
16009
  };
15439
16010
  Update: {
16011
+ auto_invoice_enabled?: boolean;
16012
+ auto_invoice_trigger_statuses?: string[];
15440
16013
  created_at?: string;
15441
16014
  debtor_gl_account?: string;
15442
16015
  default_credit_invoice_type?: string | null;
@@ -15737,6 +16310,7 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
15737
16310
  twinfield_push_queue: {
15738
16311
  Row: {
15739
16312
  action: string;
16313
+ attempt_started_at: string | null;
15740
16314
  attempts: number;
15741
16315
  connection_id: string | null;
15742
16316
  created_at: string;
@@ -15753,6 +16327,7 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
15753
16327
  };
15754
16328
  Insert: {
15755
16329
  action?: string;
16330
+ attempt_started_at?: string | null;
15756
16331
  attempts?: number;
15757
16332
  connection_id?: string | null;
15758
16333
  created_at?: string;
@@ -15769,6 +16344,7 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
15769
16344
  };
15770
16345
  Update: {
15771
16346
  action?: string;
16347
+ attempt_started_at?: string | null;
15772
16348
  attempts?: number;
15773
16349
  connection_id?: string | null;
15774
16350
  created_at?: string;
@@ -15966,13 +16542,7 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
15966
16542
  workday_end?: string | null;
15967
16543
  workday_start?: string | null;
15968
16544
  };
15969
- Relationships: [{
15970
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
15971
- columns: ["monteur_id"];
15972
- isOneToOne: true;
15973
- referencedRelation: "monteurs";
15974
- referencedColumns: ["id"];
15975
- }];
16545
+ Relationships: [];
15976
16546
  };
15977
16547
  uren_entries: {
15978
16548
  Row: {
@@ -16018,12 +16588,6 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
16018
16588
  werkbon_id?: string | null;
16019
16589
  };
16020
16590
  Relationships: [{
16021
- foreignKeyName: "uren_entries_monteur_id_fkey";
16022
- columns: ["monteur_id"];
16023
- isOneToOne: false;
16024
- referencedRelation: "monteurs";
16025
- referencedColumns: ["id"];
16026
- }, {
16027
16591
  foreignKeyName: "uren_entries_werkbon_id_fkey";
16028
16592
  columns: ["werkbon_id"];
16029
16593
  isOneToOne: false;
@@ -16491,17 +17055,12 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
16491
17055
  submitted_at?: string | null;
16492
17056
  updated_at?: string;
16493
17057
  };
16494
- Relationships: [{
16495
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
16496
- columns: ["monteur_id"];
16497
- isOneToOne: false;
16498
- referencedRelation: "monteurs";
16499
- referencedColumns: ["id"];
16500
- }];
17058
+ Relationships: [];
16501
17059
  };
16502
17060
  user_module_permissions: {
16503
17061
  Row: {
16504
17062
  created_at: string;
17063
+ feature_id: string;
16505
17064
  id: string;
16506
17065
  module_id: string;
16507
17066
  permission: string;
@@ -16510,6 +17069,7 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
16510
17069
  };
16511
17070
  Insert: {
16512
17071
  created_at?: string;
17072
+ feature_id?: string;
16513
17073
  id?: string;
16514
17074
  module_id: string;
16515
17075
  permission: string;
@@ -16518,6 +17078,7 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
16518
17078
  };
16519
17079
  Update: {
16520
17080
  created_at?: string;
17081
+ feature_id?: string;
16521
17082
  id?: string;
16522
17083
  module_id?: string;
16523
17084
  permission?: string;
@@ -16553,6 +17114,51 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
16553
17114
  referencedColumns: ["id"];
16554
17115
  }];
16555
17116
  };
17117
+ van_inventories: {
17118
+ Row: {
17119
+ barcode: string | null;
17120
+ created_at: string;
17121
+ id: string;
17122
+ monteur_id: string | null;
17123
+ price_per_unit: number;
17124
+ product_name: string;
17125
+ quantity_current: number;
17126
+ quantity_min: number;
17127
+ unit: string;
17128
+ updated_at: string;
17129
+ };
17130
+ Insert: {
17131
+ barcode?: string | null;
17132
+ created_at?: string;
17133
+ id?: string;
17134
+ monteur_id?: string | null;
17135
+ price_per_unit?: number;
17136
+ product_name: string;
17137
+ quantity_current?: number;
17138
+ quantity_min?: number;
17139
+ unit?: string;
17140
+ updated_at?: string;
17141
+ };
17142
+ Update: {
17143
+ barcode?: string | null;
17144
+ created_at?: string;
17145
+ id?: string;
17146
+ monteur_id?: string | null;
17147
+ price_per_unit?: number;
17148
+ product_name?: string;
17149
+ quantity_current?: number;
17150
+ quantity_min?: number;
17151
+ unit?: string;
17152
+ updated_at?: string;
17153
+ };
17154
+ Relationships: [{
17155
+ foreignKeyName: "van_inventories_monteur_id_fkey";
17156
+ columns: ["monteur_id"];
17157
+ isOneToOne: false;
17158
+ referencedRelation: "profiles";
17159
+ referencedColumns: ["id"];
17160
+ }];
17161
+ };
16556
17162
  voorraad_custom_fields: {
16557
17163
  Row: {
16558
17164
  created_at: string;
@@ -17503,7 +18109,7 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
17503
18109
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
17504
18110
  columns: ["monteur_id"];
17505
18111
  isOneToOne: false;
17506
- referencedRelation: "monteurs";
18112
+ referencedRelation: "profiles";
17507
18113
  referencedColumns: ["id"];
17508
18114
  }, {
17509
18115
  foreignKeyName: "work_order_monteurs_work_order_id_fkey";
@@ -17513,6 +18119,60 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
17513
18119
  referencedColumns: ["id"];
17514
18120
  }];
17515
18121
  };
18122
+ work_order_photos: {
18123
+ Row: {
18124
+ ai_caption: string | null;
18125
+ ai_categorized_at: string | null;
18126
+ ai_labels: import("./types").Json | null;
18127
+ caption: string | null;
18128
+ created_at: string;
18129
+ id: string;
18130
+ monteur_id: string | null;
18131
+ photo_type: string;
18132
+ storage_path: string;
18133
+ updated_at: string;
18134
+ work_order_id: string;
18135
+ };
18136
+ Insert: {
18137
+ ai_caption?: string | null;
18138
+ ai_categorized_at?: string | null;
18139
+ ai_labels?: import("./types").Json | null;
18140
+ caption?: string | null;
18141
+ created_at?: string;
18142
+ id?: string;
18143
+ monteur_id?: string | null;
18144
+ photo_type?: string;
18145
+ storage_path: string;
18146
+ updated_at?: string;
18147
+ work_order_id: string;
18148
+ };
18149
+ Update: {
18150
+ ai_caption?: string | null;
18151
+ ai_categorized_at?: string | null;
18152
+ ai_labels?: import("./types").Json | null;
18153
+ caption?: string | null;
18154
+ created_at?: string;
18155
+ id?: string;
18156
+ monteur_id?: string | null;
18157
+ photo_type?: string;
18158
+ storage_path?: string;
18159
+ updated_at?: string;
18160
+ work_order_id?: string;
18161
+ };
18162
+ Relationships: [{
18163
+ foreignKeyName: "work_order_photos_monteur_id_fkey";
18164
+ columns: ["monteur_id"];
18165
+ isOneToOne: false;
18166
+ referencedRelation: "profiles";
18167
+ referencedColumns: ["id"];
18168
+ }, {
18169
+ foreignKeyName: "work_order_photos_work_order_id_fkey";
18170
+ columns: ["work_order_id"];
18171
+ isOneToOne: false;
18172
+ referencedRelation: "work_orders";
18173
+ referencedColumns: ["id"];
18174
+ }];
18175
+ };
17516
18176
  work_orders: {
17517
18177
  Row: {
17518
18178
  assigned_to: string | null;
@@ -17544,7 +18204,6 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
17544
18204
  scheduled_end_time: string | null;
17545
18205
  scheduled_start_time: string | null;
17546
18206
  status: string;
17547
- tenant_id: string;
17548
18207
  total_hours_worked: number | null;
17549
18208
  total_price: number | null;
17550
18209
  travel_time_minutes: number | null;
@@ -17582,7 +18241,6 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
17582
18241
  scheduled_end_time?: string | null;
17583
18242
  scheduled_start_time?: string | null;
17584
18243
  status?: string;
17585
- tenant_id: string;
17586
18244
  total_hours_worked?: number | null;
17587
18245
  total_price?: number | null;
17588
18246
  travel_time_minutes?: number | null;
@@ -17620,7 +18278,6 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
17620
18278
  scheduled_end_time?: string | null;
17621
18279
  scheduled_start_time?: string | null;
17622
18280
  status?: string;
17623
- tenant_id?: string;
17624
18281
  total_hours_worked?: number | null;
17625
18282
  total_price?: number | null;
17626
18283
  travel_time_minutes?: number | null;
@@ -17634,12 +18291,6 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
17634
18291
  isOneToOne: false;
17635
18292
  referencedRelation: "work_orders";
17636
18293
  referencedColumns: ["id"];
17637
- }, {
17638
- foreignKeyName: "work_orders_tenant_id_fkey";
17639
- columns: ["tenant_id"];
17640
- isOneToOne: false;
17641
- referencedRelation: "tenants";
17642
- referencedColumns: ["id"];
17643
18294
  }];
17644
18295
  };
17645
18296
  };
@@ -18324,6 +18975,19 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
18324
18975
  };
18325
18976
  Returns: undefined;
18326
18977
  };
18978
+ approve_mailbox_order_proposal: {
18979
+ Args: {
18980
+ p_custom_fields: import("./types").Json;
18981
+ p_customer_id: string;
18982
+ p_delivery_date: string;
18983
+ p_field_values?: import("./types").Json;
18984
+ p_lines: import("./types").Json;
18985
+ p_notes: string;
18986
+ p_proposal_id: string;
18987
+ p_reviewed_by: string;
18988
+ };
18989
+ Returns: import("./types").Json;
18990
+ };
18327
18991
  assign_cart_numbers: {
18328
18992
  Args: {
18329
18993
  p_carts: import("./types").Json;
@@ -18359,6 +19023,10 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
18359
19023
  processed_items: number;
18360
19024
  }[];
18361
19025
  };
19026
+ backfill_order_auto_invoice_queue: {
19027
+ Args: never;
19028
+ Returns: number;
19029
+ };
18362
19030
  calculate_layer_stock: {
18363
19031
  Args: {
18364
19032
  p_product_id: string;
@@ -18371,6 +19039,10 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
18371
19039
  };
18372
19040
  Returns: number;
18373
19041
  };
19042
+ can_manage_hours: {
19043
+ Args: never;
19044
+ Returns: boolean;
19045
+ };
18374
19046
  check_offer_product_available_stock: {
18375
19047
  Args: {
18376
19048
  p_campaign_product_id: string;
@@ -18560,6 +19232,7 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
18560
19232
  };
18561
19233
  Returns: {
18562
19234
  action: string;
19235
+ attempt_started_at: string | null;
18563
19236
  attempts: number;
18564
19237
  connection_id: string | null;
18565
19238
  created_at: string;
@@ -18647,6 +19320,30 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
18647
19320
  agent_naam: string;
18648
19321
  }[];
18649
19322
  };
19323
+ consume_van_inventory: {
19324
+ Args: {
19325
+ p_inventory_id: string;
19326
+ p_quantity: number;
19327
+ };
19328
+ Returns: {
19329
+ barcode: string | null;
19330
+ created_at: string;
19331
+ id: string;
19332
+ monteur_id: string | null;
19333
+ price_per_unit: number;
19334
+ product_name: string;
19335
+ quantity_current: number;
19336
+ quantity_min: number;
19337
+ unit: string;
19338
+ updated_at: string;
19339
+ };
19340
+ SetofOptions: {
19341
+ from: "*";
19342
+ to: "van_inventories";
19343
+ isOneToOne: true;
19344
+ isSetofReturn: false;
19345
+ };
19346
+ };
18650
19347
  control_get_todays_carts: {
18651
19348
  Args: never;
18652
19349
  Returns: {
@@ -18720,6 +19417,13 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
18720
19417
  _user_id: string;
18721
19418
  };
18722
19419
  Returns: string;
19420
+ } | {
19421
+ Args: {
19422
+ _feature_id?: string;
19423
+ _module_id: string;
19424
+ _user_id: string;
19425
+ };
19426
+ Returns: string;
18723
19427
  };
18724
19428
  email_auth_decrypt: {
18725
19429
  Args: {
@@ -19071,12 +19775,6 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
19071
19775
  Args: never;
19072
19776
  Returns: string;
19073
19777
  };
19074
- get_work_order_tenant_id: {
19075
- Args: {
19076
- wo_id: string;
19077
- };
19078
- Returns: string;
19079
- };
19080
19778
  has_module_permission: {
19081
19779
  Args: {
19082
19780
  _min: string;
@@ -19110,6 +19808,13 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
19110
19808
  };
19111
19809
  Returns: boolean;
19112
19810
  };
19811
+ is_time_log_week_locked: {
19812
+ Args: {
19813
+ p_employee_id: string;
19814
+ p_start_time: string;
19815
+ };
19816
+ Returns: boolean;
19817
+ };
19113
19818
  is_user_admin: {
19114
19819
  Args: never;
19115
19820
  Returns: boolean;
@@ -19124,13 +19829,14 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
19124
19829
  };
19125
19830
  Returns: boolean;
19126
19831
  };
19127
- list_monteurs: {
19832
+ list_medewerkers: {
19128
19833
  Args: never;
19129
19834
  Returns: {
19130
19835
  avatar_url: string;
19131
19836
  display_name: string;
19132
19837
  email: string;
19133
19838
  id: string;
19839
+ roles: string[];
19134
19840
  }[];
19135
19841
  };
19136
19842
  list_my_planning_items: {
@@ -19621,6 +20327,65 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
19621
20327
  };
19622
20328
  Returns: number;
19623
20329
  };
20330
+ logistics_plan_claim: {
20331
+ Args: {
20332
+ p_limit?: number;
20333
+ };
20334
+ Returns: {
20335
+ attempts: number;
20336
+ id: string;
20337
+ order_id: string;
20338
+ }[];
20339
+ };
20340
+ logistics_plan_enqueue: {
20341
+ Args: {
20342
+ p_order_id: string;
20343
+ p_reason?: string;
20344
+ };
20345
+ Returns: undefined;
20346
+ };
20347
+ logistics_plan_ensure_event: {
20348
+ Args: {
20349
+ p_order_id: string;
20350
+ };
20351
+ Returns: boolean;
20352
+ };
20353
+ logistics_plan_finish: {
20354
+ Args: {
20355
+ p_error?: string;
20356
+ p_id: string;
20357
+ };
20358
+ Returns: undefined;
20359
+ };
20360
+ logistics_plan_impact_orders: {
20361
+ Args: {
20362
+ p_order_id: string;
20363
+ };
20364
+ Returns: {
20365
+ buffer_id: string;
20366
+ order_id: string;
20367
+ plan_date: string;
20368
+ }[];
20369
+ };
20370
+ logistics_plan_kick: {
20371
+ Args: never;
20372
+ Returns: undefined;
20373
+ };
20374
+ logistics_plan_prune: {
20375
+ Args: never;
20376
+ Returns: number;
20377
+ };
20378
+ logistics_plan_release_stale: {
20379
+ Args: never;
20380
+ Returns: number;
20381
+ };
20382
+ logistics_plan_setting: {
20383
+ Args: {
20384
+ p_default: number;
20385
+ p_key: string;
20386
+ };
20387
+ Returns: number;
20388
+ };
19624
20389
  logistics_queue_capacity_email: {
19625
20390
  Args: {
19626
20391
  p_alert_id: string;
@@ -19862,6 +20627,7 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
19862
20627
  my_module_permissions: {
19863
20628
  Args: never;
19864
20629
  Returns: {
20630
+ feature_id: string;
19865
20631
  module_id: string;
19866
20632
  permission: string;
19867
20633
  }[];
@@ -20742,6 +21508,16 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
20742
21508
  };
20743
21509
  Returns: string[];
20744
21510
  };
21511
+ switch_time_log: {
21512
+ Args: {
21513
+ p_employee_id: string;
21514
+ p_start_lat?: number;
21515
+ p_start_lng?: number;
21516
+ p_type: string;
21517
+ p_work_order_id?: string;
21518
+ };
21519
+ Returns: import("./types").Json;
21520
+ };
20745
21521
  sync_all_layer_stocks: {
20746
21522
  Args: never;
20747
21523
  Returns: undefined;
@@ -20792,6 +21568,24 @@ export declare const supabaseAdmin: SupabaseClient<Database, "public", "public",
20792
21568
  };
20793
21569
  Returns: boolean;
20794
21570
  };
21571
+ twinfield_cron_lock_acquire: {
21572
+ Args: {
21573
+ _job_name: string;
21574
+ _stale_seconds?: number;
21575
+ };
21576
+ Returns: boolean;
21577
+ };
21578
+ twinfield_cron_lock_release: {
21579
+ Args: {
21580
+ _error?: string;
21581
+ _job_name: string;
21582
+ };
21583
+ Returns: undefined;
21584
+ };
21585
+ twinfield_prune_push_queue: {
21586
+ Args: never;
21587
+ Returns: number;
21588
+ };
20795
21589
  twinfield_register_cron: {
20796
21590
  Args: {
20797
21591
  apikey?: string;