@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.
@@ -895,6 +895,126 @@ export type Database = {
895
895
  };
896
896
  Relationships: [];
897
897
  };
898
+ cao_holidays: {
899
+ Row: {
900
+ created_at: string;
901
+ description: string | null;
902
+ holiday_date: string;
903
+ id: string;
904
+ updated_at: string;
905
+ };
906
+ Insert: {
907
+ created_at?: string;
908
+ description?: string | null;
909
+ holiday_date: string;
910
+ id?: string;
911
+ updated_at?: string;
912
+ };
913
+ Update: {
914
+ created_at?: string;
915
+ description?: string | null;
916
+ holiday_date?: string;
917
+ id?: string;
918
+ updated_at?: string;
919
+ };
920
+ Relationships: [];
921
+ };
922
+ cao_settings: {
923
+ Row: {
924
+ auto_break_after_hours: number;
925
+ auto_break_minutes: number;
926
+ auto_break_unpaid: boolean;
927
+ auto_stop_after_hours: number;
928
+ callout_fee: number;
929
+ created_at: string;
930
+ daily_regular_hours: number;
931
+ default_hourly_rate: number;
932
+ id: string;
933
+ materials_markup_percent: number;
934
+ max_daily_hours: number;
935
+ max_weekly_hours: number;
936
+ meal_allowance_amount: number;
937
+ overtime_pct_178: number;
938
+ overtime_pct_189: number;
939
+ overtime_pct_212: number;
940
+ reminder_after_hours: number;
941
+ standby_evening_amount: number;
942
+ standby_weekend_amount: number;
943
+ travel_cost_per_km: number | null;
944
+ travel_cost_threshold_km: number | null;
945
+ travel_counts_as_work: boolean;
946
+ travel_hourly_rate: number;
947
+ travel_rate_per_hour: number;
948
+ travel_threshold_minutes: number;
949
+ updated_at: string;
950
+ weekend_always_212: boolean;
951
+ window_end: string;
952
+ window_start: string;
953
+ };
954
+ Insert: {
955
+ auto_break_after_hours?: number;
956
+ auto_break_minutes?: number;
957
+ auto_break_unpaid?: boolean;
958
+ auto_stop_after_hours?: number;
959
+ callout_fee?: number;
960
+ created_at?: string;
961
+ daily_regular_hours?: number;
962
+ default_hourly_rate?: number;
963
+ id?: string;
964
+ materials_markup_percent?: number;
965
+ max_daily_hours?: number;
966
+ max_weekly_hours?: number;
967
+ meal_allowance_amount?: number;
968
+ overtime_pct_178?: number;
969
+ overtime_pct_189?: number;
970
+ overtime_pct_212?: number;
971
+ reminder_after_hours?: number;
972
+ standby_evening_amount?: number;
973
+ standby_weekend_amount?: number;
974
+ travel_cost_per_km?: number | null;
975
+ travel_cost_threshold_km?: number | null;
976
+ travel_counts_as_work?: boolean;
977
+ travel_hourly_rate?: number;
978
+ travel_rate_per_hour?: number;
979
+ travel_threshold_minutes?: number;
980
+ updated_at?: string;
981
+ weekend_always_212?: boolean;
982
+ window_end?: string;
983
+ window_start?: string;
984
+ };
985
+ Update: {
986
+ auto_break_after_hours?: number;
987
+ auto_break_minutes?: number;
988
+ auto_break_unpaid?: boolean;
989
+ auto_stop_after_hours?: number;
990
+ callout_fee?: number;
991
+ created_at?: string;
992
+ daily_regular_hours?: number;
993
+ default_hourly_rate?: number;
994
+ id?: string;
995
+ materials_markup_percent?: number;
996
+ max_daily_hours?: number;
997
+ max_weekly_hours?: number;
998
+ meal_allowance_amount?: number;
999
+ overtime_pct_178?: number;
1000
+ overtime_pct_189?: number;
1001
+ overtime_pct_212?: number;
1002
+ reminder_after_hours?: number;
1003
+ standby_evening_amount?: number;
1004
+ standby_weekend_amount?: number;
1005
+ travel_cost_per_km?: number | null;
1006
+ travel_cost_threshold_km?: number | null;
1007
+ travel_counts_as_work?: boolean;
1008
+ travel_hourly_rate?: number;
1009
+ travel_rate_per_hour?: number;
1010
+ travel_threshold_minutes?: number;
1011
+ updated_at?: string;
1012
+ weekend_always_212?: boolean;
1013
+ window_end?: string;
1014
+ window_start?: string;
1015
+ };
1016
+ Relationships: [];
1017
+ };
898
1018
  carrier_shipping_rates: {
899
1019
  Row: {
900
1020
  carrier_id: string;
@@ -6646,6 +6766,7 @@ export type Database = {
6646
6766
  Row: {
6647
6767
  buyer_organization_id: string | null;
6648
6768
  connection_id: string;
6769
+ controlled_at: string | null;
6649
6770
  created_at: string;
6650
6771
  data: Json;
6651
6772
  floriday_id: string;
@@ -6657,6 +6778,7 @@ export type Database = {
6657
6778
  Insert: {
6658
6779
  buyer_organization_id?: string | null;
6659
6780
  connection_id: string;
6781
+ controlled_at?: string | null;
6660
6782
  created_at?: string;
6661
6783
  data: Json;
6662
6784
  floriday_id: string;
@@ -6668,6 +6790,7 @@ export type Database = {
6668
6790
  Update: {
6669
6791
  buyer_organization_id?: string | null;
6670
6792
  connection_id?: string;
6793
+ controlled_at?: string | null;
6671
6794
  created_at?: string;
6672
6795
  data?: Json;
6673
6796
  floriday_id?: string;
@@ -7601,6 +7724,54 @@ export type Database = {
7601
7724
  };
7602
7725
  Relationships: [];
7603
7726
  };
7727
+ invoice_timing_settings: {
7728
+ Row: {
7729
+ anchor: string;
7730
+ business_days_only: boolean;
7731
+ created_at: string;
7732
+ enabled: boolean;
7733
+ id: string;
7734
+ offset_days: number;
7735
+ pickup_anchor: string;
7736
+ pickup_business_days_only: boolean;
7737
+ pickup_offset_days: number;
7738
+ pickup_time_of_day: string;
7739
+ singleton: boolean;
7740
+ time_of_day: string;
7741
+ updated_at: string;
7742
+ };
7743
+ Insert: {
7744
+ anchor?: string;
7745
+ business_days_only?: boolean;
7746
+ created_at?: string;
7747
+ enabled?: boolean;
7748
+ id?: string;
7749
+ offset_days?: number;
7750
+ pickup_anchor?: string;
7751
+ pickup_business_days_only?: boolean;
7752
+ pickup_offset_days?: number;
7753
+ pickup_time_of_day?: string;
7754
+ singleton?: boolean;
7755
+ time_of_day?: string;
7756
+ updated_at?: string;
7757
+ };
7758
+ Update: {
7759
+ anchor?: string;
7760
+ business_days_only?: boolean;
7761
+ created_at?: string;
7762
+ enabled?: boolean;
7763
+ id?: string;
7764
+ offset_days?: number;
7765
+ pickup_anchor?: string;
7766
+ pickup_business_days_only?: boolean;
7767
+ pickup_offset_days?: number;
7768
+ pickup_time_of_day?: string;
7769
+ singleton?: boolean;
7770
+ time_of_day?: string;
7771
+ updated_at?: string;
7772
+ };
7773
+ Relationships: [];
7774
+ };
7604
7775
  itk_contact_persons: {
7605
7776
  Row: {
7606
7777
  created_at: string;
@@ -7924,7 +8095,6 @@ export type Database = {
7924
8095
  start_date: string;
7925
8096
  start_time: string | null;
7926
8097
  status: string;
7927
- tenant_id: string;
7928
8098
  updated_at: string;
7929
8099
  user_id: string;
7930
8100
  };
@@ -7942,7 +8112,6 @@ export type Database = {
7942
8112
  start_date: string;
7943
8113
  start_time?: string | null;
7944
8114
  status?: string;
7945
- tenant_id?: string;
7946
8115
  updated_at?: string;
7947
8116
  user_id: string;
7948
8117
  };
@@ -7960,7 +8129,6 @@ export type Database = {
7960
8129
  start_date?: string;
7961
8130
  start_time?: string | null;
7962
8131
  status?: string;
7963
- tenant_id?: string;
7964
8132
  updated_at?: string;
7965
8133
  user_id?: string;
7966
8134
  };
@@ -7969,14 +8137,14 @@ export type Database = {
7969
8137
  foreignKeyName: "leave_requests_monteur_id_fkey";
7970
8138
  columns: ["monteur_id"];
7971
8139
  isOneToOne: false;
7972
- referencedRelation: "monteurs";
8140
+ referencedRelation: "profiles";
7973
8141
  referencedColumns: ["id"];
7974
8142
  },
7975
8143
  {
7976
8144
  foreignKeyName: "leave_requests_user_id_fkey";
7977
8145
  columns: ["user_id"];
7978
8146
  isOneToOne: false;
7979
- referencedRelation: "monteurs";
8147
+ referencedRelation: "profiles";
7980
8148
  referencedColumns: ["id"];
7981
8149
  }
7982
8150
  ];
@@ -8867,6 +9035,45 @@ export type Database = {
8867
9035
  };
8868
9036
  Relationships: [];
8869
9037
  };
9038
+ logistics_plan_queue: {
9039
+ Row: {
9040
+ attempts: number;
9041
+ claimed_at: string | null;
9042
+ enqueued_at: string;
9043
+ error: string | null;
9044
+ id: string;
9045
+ next_attempt_at: string;
9046
+ order_id: string;
9047
+ reason: string;
9048
+ status: string;
9049
+ updated_at: string;
9050
+ };
9051
+ Insert: {
9052
+ attempts?: number;
9053
+ claimed_at?: string | null;
9054
+ enqueued_at?: string;
9055
+ error?: string | null;
9056
+ id?: string;
9057
+ next_attempt_at?: string;
9058
+ order_id: string;
9059
+ reason?: string;
9060
+ status?: string;
9061
+ updated_at?: string;
9062
+ };
9063
+ Update: {
9064
+ attempts?: number;
9065
+ claimed_at?: string | null;
9066
+ enqueued_at?: string;
9067
+ error?: string | null;
9068
+ id?: string;
9069
+ next_attempt_at?: string;
9070
+ order_id?: string;
9071
+ reason?: string;
9072
+ status?: string;
9073
+ updated_at?: string;
9074
+ };
9075
+ Relationships: [];
9076
+ };
8870
9077
  logistics_plan_runs: {
8871
9078
  Row: {
8872
9079
  created_at: string;
@@ -8945,6 +9152,24 @@ export type Database = {
8945
9152
  }
8946
9153
  ];
8947
9154
  };
9155
+ logistics_plan_settings: {
9156
+ Row: {
9157
+ key: string;
9158
+ updated_at: string;
9159
+ value: string;
9160
+ };
9161
+ Insert: {
9162
+ key: string;
9163
+ updated_at?: string;
9164
+ value: string;
9165
+ };
9166
+ Update: {
9167
+ key?: string;
9168
+ updated_at?: string;
9169
+ value?: string;
9170
+ };
9171
+ Relationships: [];
9172
+ };
8948
9173
  logistics_rebuffer_state: {
8949
9174
  Row: {
8950
9175
  created_at: string;
@@ -10127,6 +10352,94 @@ export type Database = {
10127
10352
  };
10128
10353
  Relationships: [];
10129
10354
  };
10355
+ material_usage: {
10356
+ Row: {
10357
+ created_at: string;
10358
+ id: string;
10359
+ material_name: string;
10360
+ monteur_id: string | null;
10361
+ price_at_time: number;
10362
+ quantity_used: number;
10363
+ updated_at: string;
10364
+ van_inventory_id: string | null;
10365
+ work_order_id: string;
10366
+ };
10367
+ Insert: {
10368
+ created_at?: string;
10369
+ id?: string;
10370
+ material_name: string;
10371
+ monteur_id?: string | null;
10372
+ price_at_time?: number;
10373
+ quantity_used?: number;
10374
+ updated_at?: string;
10375
+ van_inventory_id?: string | null;
10376
+ work_order_id: string;
10377
+ };
10378
+ Update: {
10379
+ created_at?: string;
10380
+ id?: string;
10381
+ material_name?: string;
10382
+ monteur_id?: string | null;
10383
+ price_at_time?: number;
10384
+ quantity_used?: number;
10385
+ updated_at?: string;
10386
+ van_inventory_id?: string | null;
10387
+ work_order_id?: string;
10388
+ };
10389
+ Relationships: [
10390
+ {
10391
+ foreignKeyName: "material_usage_monteur_id_fkey";
10392
+ columns: ["monteur_id"];
10393
+ isOneToOne: false;
10394
+ referencedRelation: "profiles";
10395
+ referencedColumns: ["id"];
10396
+ },
10397
+ {
10398
+ foreignKeyName: "material_usage_van_inventory_id_fkey";
10399
+ columns: ["van_inventory_id"];
10400
+ isOneToOne: false;
10401
+ referencedRelation: "van_inventories";
10402
+ referencedColumns: ["id"];
10403
+ },
10404
+ {
10405
+ foreignKeyName: "material_usage_work_order_id_fkey";
10406
+ columns: ["work_order_id"];
10407
+ isOneToOne: false;
10408
+ referencedRelation: "work_orders";
10409
+ referencedColumns: ["id"];
10410
+ }
10411
+ ];
10412
+ };
10413
+ module_features: {
10414
+ Row: {
10415
+ created_at: string;
10416
+ feature_id: string;
10417
+ id: string;
10418
+ is_active: boolean;
10419
+ last_seen_at: string;
10420
+ module_id: string;
10421
+ name: string;
10422
+ };
10423
+ Insert: {
10424
+ created_at?: string;
10425
+ feature_id: string;
10426
+ id?: string;
10427
+ is_active?: boolean;
10428
+ last_seen_at?: string;
10429
+ module_id: string;
10430
+ name: string;
10431
+ };
10432
+ Update: {
10433
+ created_at?: string;
10434
+ feature_id?: string;
10435
+ id?: string;
10436
+ is_active?: boolean;
10437
+ last_seen_at?: string;
10438
+ module_id?: string;
10439
+ name?: string;
10440
+ };
10441
+ Relationships: [];
10442
+ };
10130
10443
  module_permissions: {
10131
10444
  Row: {
10132
10445
  created_at: string;
@@ -10235,65 +10548,6 @@ export type Database = {
10235
10548
  };
10236
10549
  Relationships: [];
10237
10550
  };
10238
- monteurs: {
10239
- Row: {
10240
- avatar_url: string | null;
10241
- color: string | null;
10242
- created_at: string;
10243
- email: string | null;
10244
- id: string;
10245
- is_active: boolean;
10246
- leave_balance_hours: number;
10247
- name: string;
10248
- persnr: number | null;
10249
- phone: string | null;
10250
- role: string;
10251
- tenant_id: string;
10252
- updated_at: string;
10253
- user_id: string | null;
10254
- };
10255
- Insert: {
10256
- avatar_url?: string | null;
10257
- color?: string | null;
10258
- created_at?: string;
10259
- email?: string | null;
10260
- id?: string;
10261
- is_active?: boolean;
10262
- leave_balance_hours?: number;
10263
- name: string;
10264
- persnr?: number | null;
10265
- phone?: string | null;
10266
- role?: string;
10267
- tenant_id: string;
10268
- updated_at?: string;
10269
- user_id?: string | null;
10270
- };
10271
- Update: {
10272
- avatar_url?: string | null;
10273
- color?: string | null;
10274
- created_at?: string;
10275
- email?: string | null;
10276
- id?: string;
10277
- is_active?: boolean;
10278
- leave_balance_hours?: number;
10279
- name?: string;
10280
- persnr?: number | null;
10281
- phone?: string | null;
10282
- role?: string;
10283
- tenant_id?: string;
10284
- updated_at?: string;
10285
- user_id?: string | null;
10286
- };
10287
- Relationships: [
10288
- {
10289
- foreignKeyName: "monteurs_tenant_id_fkey";
10290
- columns: ["tenant_id"];
10291
- isOneToOne: false;
10292
- referencedRelation: "tenants";
10293
- referencedColumns: ["id"];
10294
- }
10295
- ];
10296
- };
10297
10551
  nmbrs_component_mapping: {
10298
10552
  Row: {
10299
10553
  created_at: string;
@@ -10366,15 +10620,7 @@ export type Database = {
10366
10620
  nmbrs_employee_number?: string;
10367
10621
  updated_at?: string;
10368
10622
  };
10369
- Relationships: [
10370
- {
10371
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
10372
- columns: ["monteur_id"];
10373
- isOneToOne: true;
10374
- referencedRelation: "monteurs";
10375
- referencedColumns: ["id"];
10376
- }
10377
- ];
10623
+ Relationships: [];
10378
10624
  };
10379
10625
  nmbrs_export_lines: {
10380
10626
  Row: {
@@ -10423,13 +10669,6 @@ export type Database = {
10423
10669
  wage_code?: string;
10424
10670
  };
10425
10671
  Relationships: [
10426
- {
10427
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
10428
- columns: ["monteur_id"];
10429
- isOneToOne: false;
10430
- referencedRelation: "monteurs";
10431
- referencedColumns: ["id"];
10432
- },
10433
10672
  {
10434
10673
  foreignKeyName: "nmbrs_export_lines_run_id_fkey";
10435
10674
  columns: ["run_id"];
@@ -11280,22 +11519,61 @@ export type Database = {
11280
11519
  };
11281
11520
  Relationships: [];
11282
11521
  };
11283
- order_items: {
11522
+ order_invoice_links: {
11284
11523
  Row: {
11285
- crates_per_layer: number | null;
11524
+ attempts: number;
11286
11525
  created_at: string;
11526
+ error_message: string | null;
11287
11527
  id: string;
11288
- layers_per_cart: number | null;
11528
+ invoice_number: string | null;
11529
+ next_attempt_at: string;
11289
11530
  order_id: string;
11290
- plants_per_crate: number | null;
11291
- product_id: string | null;
11292
- product_name: string;
11293
- quantity: number;
11294
- unit: string;
11295
- unit_price: number | null;
11531
+ processed_at: string | null;
11532
+ status: string;
11533
+ updated_at: string;
11296
11534
  };
11297
11535
  Insert: {
11298
- crates_per_layer?: number | null;
11536
+ attempts?: number;
11537
+ created_at?: string;
11538
+ error_message?: string | null;
11539
+ id?: string;
11540
+ invoice_number?: string | null;
11541
+ next_attempt_at?: string;
11542
+ order_id: string;
11543
+ processed_at?: string | null;
11544
+ status?: string;
11545
+ updated_at?: string;
11546
+ };
11547
+ Update: {
11548
+ attempts?: number;
11549
+ created_at?: string;
11550
+ error_message?: string | null;
11551
+ id?: string;
11552
+ invoice_number?: string | null;
11553
+ next_attempt_at?: string;
11554
+ order_id?: string;
11555
+ processed_at?: string | null;
11556
+ status?: string;
11557
+ updated_at?: string;
11558
+ };
11559
+ Relationships: [];
11560
+ };
11561
+ order_items: {
11562
+ Row: {
11563
+ crates_per_layer: number | null;
11564
+ created_at: string;
11565
+ id: string;
11566
+ layers_per_cart: number | null;
11567
+ order_id: string;
11568
+ plants_per_crate: number | null;
11569
+ product_id: string | null;
11570
+ product_name: string;
11571
+ quantity: number;
11572
+ unit: string;
11573
+ unit_price: number | null;
11574
+ };
11575
+ Insert: {
11576
+ crates_per_layer?: number | null;
11299
11577
  created_at?: string;
11300
11578
  id?: string;
11301
11579
  layers_per_cart?: number | null;
@@ -11471,6 +11749,7 @@ export type Database = {
11471
11749
  delivery_date: string | null;
11472
11750
  floriday_sales_order_id: string | null;
11473
11751
  id: string;
11752
+ invoice_due_at: string | null;
11474
11753
  is_reservation: boolean;
11475
11754
  notes: string | null;
11476
11755
  order_date: string;
@@ -11492,6 +11771,7 @@ export type Database = {
11492
11771
  delivery_date?: string | null;
11493
11772
  floriday_sales_order_id?: string | null;
11494
11773
  id?: string;
11774
+ invoice_due_at?: string | null;
11495
11775
  is_reservation?: boolean;
11496
11776
  notes?: string | null;
11497
11777
  order_date?: string;
@@ -11513,6 +11793,7 @@ export type Database = {
11513
11793
  delivery_date?: string | null;
11514
11794
  floriday_sales_order_id?: string | null;
11515
11795
  id?: string;
11796
+ invoice_due_at?: string | null;
11516
11797
  is_reservation?: boolean;
11517
11798
  notes?: string | null;
11518
11799
  order_date?: string;
@@ -12865,6 +13146,9 @@ export type Database = {
12865
13146
  created_at: string;
12866
13147
  id: string;
12867
13148
  laatst_gezien: string;
13149
+ laatste_fout: string | null;
13150
+ laatste_request_id: number | null;
13151
+ mislukte_posts: number;
12868
13152
  tick_sleutel: string;
12869
13153
  updated_at: string;
12870
13154
  };
@@ -12874,6 +13158,9 @@ export type Database = {
12874
13158
  created_at?: string;
12875
13159
  id?: string;
12876
13160
  laatst_gezien?: string;
13161
+ laatste_fout?: string | null;
13162
+ laatste_request_id?: number | null;
13163
+ mislukte_posts?: number;
12877
13164
  tick_sleutel?: string;
12878
13165
  updated_at?: string;
12879
13166
  };
@@ -12883,6 +13170,9 @@ export type Database = {
12883
13170
  created_at?: string;
12884
13171
  id?: string;
12885
13172
  laatst_gezien?: string;
13173
+ laatste_fout?: string | null;
13174
+ laatste_request_id?: number | null;
13175
+ mislukte_posts?: number;
12886
13176
  tick_sleutel?: string;
12887
13177
  updated_at?: string;
12888
13178
  };
@@ -14447,6 +14737,100 @@ export type Database = {
14447
14737
  }
14448
14738
  ];
14449
14739
  };
14740
+ role_assignments: {
14741
+ Row: {
14742
+ created_at: string;
14743
+ id: string;
14744
+ role_id: string;
14745
+ user_id: string;
14746
+ };
14747
+ Insert: {
14748
+ created_at?: string;
14749
+ id?: string;
14750
+ role_id: string;
14751
+ user_id: string;
14752
+ };
14753
+ Update: {
14754
+ created_at?: string;
14755
+ id?: string;
14756
+ role_id?: string;
14757
+ user_id?: string;
14758
+ };
14759
+ Relationships: [
14760
+ {
14761
+ foreignKeyName: "role_assignments_role_id_fkey";
14762
+ columns: ["role_id"];
14763
+ isOneToOne: false;
14764
+ referencedRelation: "roles";
14765
+ referencedColumns: ["id"];
14766
+ }
14767
+ ];
14768
+ };
14769
+ role_permissions: {
14770
+ Row: {
14771
+ can_edit: boolean;
14772
+ can_view: boolean;
14773
+ feature_id: string;
14774
+ id: string;
14775
+ module_id: string;
14776
+ role_id: string;
14777
+ updated_at: string;
14778
+ };
14779
+ Insert: {
14780
+ can_edit?: boolean;
14781
+ can_view?: boolean;
14782
+ feature_id?: string;
14783
+ id?: string;
14784
+ module_id: string;
14785
+ role_id: string;
14786
+ updated_at?: string;
14787
+ };
14788
+ Update: {
14789
+ can_edit?: boolean;
14790
+ can_view?: boolean;
14791
+ feature_id?: string;
14792
+ id?: string;
14793
+ module_id?: string;
14794
+ role_id?: string;
14795
+ updated_at?: string;
14796
+ };
14797
+ Relationships: [
14798
+ {
14799
+ foreignKeyName: "role_permissions_role_id_fkey";
14800
+ columns: ["role_id"];
14801
+ isOneToOne: false;
14802
+ referencedRelation: "roles";
14803
+ referencedColumns: ["id"];
14804
+ }
14805
+ ];
14806
+ };
14807
+ roles: {
14808
+ Row: {
14809
+ created_at: string;
14810
+ id: string;
14811
+ is_protected: boolean;
14812
+ key: string;
14813
+ name: string;
14814
+ updated_at: string;
14815
+ };
14816
+ Insert: {
14817
+ created_at?: string;
14818
+ id?: string;
14819
+ is_protected?: boolean;
14820
+ key: string;
14821
+ name: string;
14822
+ updated_at?: string;
14823
+ };
14824
+ Update: {
14825
+ created_at?: string;
14826
+ id?: string;
14827
+ is_protected?: boolean;
14828
+ key?: string;
14829
+ name?: string;
14830
+ updated_at?: string;
14831
+ };
14832
+ Relationships: [];
14833
+ };
14450
14834
  rooms: {
14451
14835
  Row: {
14452
14836
  capacity: number;
@@ -15127,6 +15511,56 @@ export type Database = {
15127
15511
  };
15128
15512
  Relationships: [];
15129
15513
  };
15514
+ time_compensation_entries: {
15515
+ Row: {
15516
+ created_at: string;
15517
+ employee_id: string;
15518
+ entry_date: string;
15519
+ id: string;
15520
+ km: number;
15521
+ meal_allowance: number;
15522
+ notes: string | null;
15523
+ standby_evening: number;
15524
+ standby_weekend: number;
15525
+ tvt_change: number;
15526
+ updated_at: string;
15527
+ };
15528
+ Insert: {
15529
+ created_at?: string;
15530
+ employee_id: string;
15531
+ entry_date: string;
15532
+ id?: string;
15533
+ km?: number;
15534
+ meal_allowance?: number;
15535
+ notes?: string | null;
15536
+ standby_evening?: number;
15537
+ standby_weekend?: number;
15538
+ tvt_change?: number;
15539
+ updated_at?: string;
15540
+ };
15541
+ Update: {
15542
+ created_at?: string;
15543
+ employee_id?: string;
15544
+ entry_date?: string;
15545
+ id?: string;
15546
+ km?: number;
15547
+ meal_allowance?: number;
15548
+ notes?: string | null;
15549
+ standby_evening?: number;
15550
+ standby_weekend?: number;
15551
+ tvt_change?: number;
15552
+ updated_at?: string;
15553
+ };
15554
+ Relationships: [
15555
+ {
15556
+ foreignKeyName: "time_compensation_entries_employee_id_fkey";
15557
+ columns: ["employee_id"];
15558
+ isOneToOne: false;
15559
+ referencedRelation: "profiles";
15560
+ referencedColumns: ["id"];
15561
+ }
15562
+ ];
15563
+ };
15130
15564
  time_entries: {
15131
15565
  Row: {
15132
15566
  created_at: string;
@@ -15161,68 +15595,174 @@ export type Database = {
15161
15595
  undertime?: number;
15162
15596
  updated_at?: string;
15163
15597
  };
15598
+ Relationships: [];
15599
+ };
15600
+ time_log_week_approvals: {
15601
+ Row: {
15602
+ approved_at: string | null;
15603
+ approved_by: string | null;
15604
+ created_at: string;
15605
+ employee_id: string;
15606
+ id: string;
15607
+ locked: boolean;
15608
+ notes: string | null;
15609
+ status: string;
15610
+ submitted_at: string | null;
15611
+ updated_at: string;
15612
+ week_start: string;
15613
+ };
15614
+ Insert: {
15615
+ approved_at?: string | null;
15616
+ approved_by?: string | null;
15617
+ created_at?: string;
15618
+ employee_id: string;
15619
+ id?: string;
15620
+ locked?: boolean;
15621
+ notes?: string | null;
15622
+ status?: string;
15623
+ submitted_at?: string | null;
15624
+ updated_at?: string;
15625
+ week_start: string;
15626
+ };
15627
+ Update: {
15628
+ approved_at?: string | null;
15629
+ approved_by?: string | null;
15630
+ created_at?: string;
15631
+ employee_id?: string;
15632
+ id?: string;
15633
+ locked?: boolean;
15634
+ notes?: string | null;
15635
+ status?: string;
15636
+ submitted_at?: string | null;
15637
+ updated_at?: string;
15638
+ week_start?: string;
15639
+ };
15164
15640
  Relationships: [
15165
15641
  {
15166
- foreignKeyName: "time_entries_employee_id_fkey";
15642
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
15167
15643
  columns: ["employee_id"];
15168
15644
  isOneToOne: false;
15169
- referencedRelation: "monteurs";
15645
+ referencedRelation: "profiles";
15170
15646
  referencedColumns: ["id"];
15171
15647
  }
15172
15648
  ];
15173
15649
  };
15174
15650
  time_logs: {
15175
15651
  Row: {
15652
+ auto_stop_reason: string | null;
15653
+ auto_stopped: boolean;
15176
15654
  created_at: string;
15655
+ current_latitude: number | null;
15656
+ current_longitude: number | null;
15657
+ current_position_updated_at: string | null;
15177
15658
  employee_id: string;
15659
+ end_latitude: number | null;
15660
+ end_longitude: number | null;
15178
15661
  end_time: string | null;
15662
+ eta_distance_km: number | null;
15663
+ eta_minutes: number | null;
15664
+ eta_updated_at: string | null;
15665
+ hour_category: string | null;
15179
15666
  id: string;
15667
+ last_reminder_at: string | null;
15180
15668
  notes: string | null;
15181
15669
  overtime_hours: number;
15182
15670
  overtime_type: string | null;
15183
15671
  regular_hours: number;
15672
+ reminder_count: number;
15673
+ requires_review: boolean;
15674
+ start_latitude: number | null;
15675
+ start_longitude: number | null;
15184
15676
  start_time: string;
15185
15677
  travel_cost: number | null;
15186
15678
  travel_distance_km: number | null;
15679
+ travel_duration_min: number | null;
15680
+ travel_time_minutes: number | null;
15187
15681
  type: string;
15188
15682
  updated_at: string;
15683
+ work_order_id: string | null;
15189
15684
  };
15190
15685
  Insert: {
15686
+ auto_stop_reason?: string | null;
15687
+ auto_stopped?: boolean;
15191
15688
  created_at?: string;
15689
+ current_latitude?: number | null;
15690
+ current_longitude?: number | null;
15691
+ current_position_updated_at?: string | null;
15192
15692
  employee_id: string;
15693
+ end_latitude?: number | null;
15694
+ end_longitude?: number | null;
15193
15695
  end_time?: string | null;
15696
+ eta_distance_km?: number | null;
15697
+ eta_minutes?: number | null;
15698
+ eta_updated_at?: string | null;
15699
+ hour_category?: string | null;
15194
15700
  id?: string;
15701
+ last_reminder_at?: string | null;
15195
15702
  notes?: string | null;
15196
15703
  overtime_hours?: number;
15197
15704
  overtime_type?: string | null;
15198
15705
  regular_hours?: number;
15706
+ reminder_count?: number;
15707
+ requires_review?: boolean;
15708
+ start_latitude?: number | null;
15709
+ start_longitude?: number | null;
15199
15710
  start_time?: string;
15200
15711
  travel_cost?: number | null;
15201
15712
  travel_distance_km?: number | null;
15713
+ travel_duration_min?: number | null;
15714
+ travel_time_minutes?: number | null;
15202
15715
  type: string;
15203
15716
  updated_at?: string;
15717
+ work_order_id?: string | null;
15204
15718
  };
15205
15719
  Update: {
15720
+ auto_stop_reason?: string | null;
15721
+ auto_stopped?: boolean;
15206
15722
  created_at?: string;
15723
+ current_latitude?: number | null;
15724
+ current_longitude?: number | null;
15725
+ current_position_updated_at?: string | null;
15207
15726
  employee_id?: string;
15727
+ end_latitude?: number | null;
15728
+ end_longitude?: number | null;
15208
15729
  end_time?: string | null;
15730
+ eta_distance_km?: number | null;
15731
+ eta_minutes?: number | null;
15732
+ eta_updated_at?: string | null;
15733
+ hour_category?: string | null;
15209
15734
  id?: string;
15735
+ last_reminder_at?: string | null;
15210
15736
  notes?: string | null;
15211
15737
  overtime_hours?: number;
15212
15738
  overtime_type?: string | null;
15213
15739
  regular_hours?: number;
15740
+ reminder_count?: number;
15741
+ requires_review?: boolean;
15742
+ start_latitude?: number | null;
15743
+ start_longitude?: number | null;
15214
15744
  start_time?: string;
15215
15745
  travel_cost?: number | null;
15216
15746
  travel_distance_km?: number | null;
15747
+ travel_duration_min?: number | null;
15748
+ travel_time_minutes?: number | null;
15217
15749
  type?: string;
15218
15750
  updated_at?: string;
15751
+ work_order_id?: string | null;
15219
15752
  };
15220
15753
  Relationships: [
15221
15754
  {
15222
15755
  foreignKeyName: "time_logs_employee_id_fkey";
15223
15756
  columns: ["employee_id"];
15224
15757
  isOneToOne: false;
15225
- referencedRelation: "monteurs";
15758
+ referencedRelation: "profiles";
15759
+ referencedColumns: ["id"];
15760
+ },
15761
+ {
15762
+ foreignKeyName: "time_logs_work_order_id_fkey";
15763
+ columns: ["work_order_id"];
15764
+ isOneToOne: false;
15765
+ referencedRelation: "work_orders";
15226
15766
  referencedColumns: ["id"];
15227
15767
  }
15228
15768
  ];
@@ -15263,7 +15803,7 @@ export type Database = {
15263
15803
  foreignKeyName: "time_off_entries_employee_id_fkey";
15264
15804
  columns: ["employee_id"];
15265
15805
  isOneToOne: false;
15266
- referencedRelation: "monteurs";
15806
+ referencedRelation: "profiles";
15267
15807
  referencedColumns: ["id"];
15268
15808
  }
15269
15809
  ];
@@ -15576,6 +16116,39 @@ export type Database = {
15576
16116
  };
15577
16117
  Relationships: [];
15578
16118
  };
16119
+ twinfield_cron_locks: {
16120
+ Row: {
16121
+ created_at: string;
16122
+ heartbeat_at: string;
16123
+ job_name: string;
16124
+ last_error: string | null;
16125
+ last_finished_at: string | null;
16126
+ locked_at: string;
16127
+ run_id: string;
16128
+ updated_at: string;
16129
+ };
16130
+ Insert: {
16131
+ created_at?: string;
16132
+ heartbeat_at?: string;
16133
+ job_name: string;
16134
+ last_error?: string | null;
16135
+ last_finished_at?: string | null;
16136
+ locked_at?: string;
16137
+ run_id?: string;
16138
+ updated_at?: string;
16139
+ };
16140
+ Update: {
16141
+ created_at?: string;
16142
+ heartbeat_at?: string;
16143
+ job_name?: string;
16144
+ last_error?: string | null;
16145
+ last_finished_at?: string | null;
16146
+ locked_at?: string;
16147
+ run_id?: string;
16148
+ updated_at?: string;
16149
+ };
16150
+ Relationships: [];
16151
+ };
15579
16152
  twinfield_customers: {
15580
16153
  Row: {
15581
16154
  address: string | null;
@@ -15838,6 +16411,8 @@ export type Database = {
15838
16411
  };
15839
16412
  twinfield_invoice_settings: {
15840
16413
  Row: {
16414
+ auto_invoice_enabled: boolean;
16415
+ auto_invoice_trigger_statuses: string[];
15841
16416
  created_at: string;
15842
16417
  debtor_gl_account: string;
15843
16418
  default_credit_invoice_type: string | null;
@@ -15858,6 +16433,8 @@ export type Database = {
15858
16433
  vat_code_export: string | null;
15859
16434
  };
15860
16435
  Insert: {
16436
+ auto_invoice_enabled?: boolean;
16437
+ auto_invoice_trigger_statuses?: string[];
15861
16438
  created_at?: string;
15862
16439
  debtor_gl_account?: string;
15863
16440
  default_credit_invoice_type?: string | null;
@@ -15878,6 +16455,8 @@ export type Database = {
15878
16455
  vat_code_export?: string | null;
15879
16456
  };
15880
16457
  Update: {
16458
+ auto_invoice_enabled?: boolean;
16459
+ auto_invoice_trigger_statuses?: string[];
15881
16460
  created_at?: string;
15882
16461
  debtor_gl_account?: string;
15883
16462
  default_credit_invoice_type?: string | null;
@@ -16180,6 +16759,7 @@ export type Database = {
16180
16759
  twinfield_push_queue: {
16181
16760
  Row: {
16182
16761
  action: string;
16762
+ attempt_started_at: string | null;
16183
16763
  attempts: number;
16184
16764
  connection_id: string | null;
16185
16765
  created_at: string;
@@ -16196,6 +16776,7 @@ export type Database = {
16196
16776
  };
16197
16777
  Insert: {
16198
16778
  action?: string;
16779
+ attempt_started_at?: string | null;
16199
16780
  attempts?: number;
16200
16781
  connection_id?: string | null;
16201
16782
  created_at?: string;
@@ -16212,6 +16793,7 @@ export type Database = {
16212
16793
  };
16213
16794
  Update: {
16214
16795
  action?: string;
16796
+ attempt_started_at?: string | null;
16215
16797
  attempts?: number;
16216
16798
  connection_id?: string | null;
16217
16799
  created_at?: string;
@@ -16414,15 +16996,7 @@ export type Database = {
16414
16996
  workday_end?: string | null;
16415
16997
  workday_start?: string | null;
16416
16998
  };
16417
- Relationships: [
16418
- {
16419
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
16420
- columns: ["monteur_id"];
16421
- isOneToOne: true;
16422
- referencedRelation: "monteurs";
16423
- referencedColumns: ["id"];
16424
- }
16425
- ];
16999
+ Relationships: [];
16426
17000
  };
16427
17001
  uren_entries: {
16428
17002
  Row: {
@@ -16468,13 +17042,6 @@ export type Database = {
16468
17042
  werkbon_id?: string | null;
16469
17043
  };
16470
17044
  Relationships: [
16471
- {
16472
- foreignKeyName: "uren_entries_monteur_id_fkey";
16473
- columns: ["monteur_id"];
16474
- isOneToOne: false;
16475
- referencedRelation: "monteurs";
16476
- referencedColumns: ["id"];
16477
- },
16478
17045
  {
16479
17046
  foreignKeyName: "uren_entries_werkbon_id_fkey";
16480
17047
  columns: ["werkbon_id"];
@@ -16956,19 +17523,12 @@ export type Database = {
16956
17523
  submitted_at?: string | null;
16957
17524
  updated_at?: string;
16958
17525
  };
16959
- Relationships: [
16960
- {
16961
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
16962
- columns: ["monteur_id"];
16963
- isOneToOne: false;
16964
- referencedRelation: "monteurs";
16965
- referencedColumns: ["id"];
16966
- }
16967
- ];
17526
+ Relationships: [];
16968
17527
  };
16969
17528
  user_module_permissions: {
16970
17529
  Row: {
16971
17530
  created_at: string;
17531
+ feature_id: string;
16972
17532
  id: string;
16973
17533
  module_id: string;
16974
17534
  permission: string;
@@ -16977,6 +17537,7 @@ export type Database = {
16977
17537
  };
16978
17538
  Insert: {
16979
17539
  created_at?: string;
17540
+ feature_id?: string;
16980
17541
  id?: string;
16981
17542
  module_id: string;
16982
17543
  permission: string;
@@ -16985,6 +17546,7 @@ export type Database = {
16985
17546
  };
16986
17547
  Update: {
16987
17548
  created_at?: string;
17549
+ feature_id?: string;
16988
17550
  id?: string;
16989
17551
  module_id?: string;
16990
17552
  permission?: string;
@@ -17022,6 +17584,53 @@ export type Database = {
17022
17584
  }
17023
17585
  ];
17024
17586
  };
17587
+ van_inventories: {
17588
+ Row: {
17589
+ barcode: string | null;
17590
+ created_at: string;
17591
+ id: string;
17592
+ monteur_id: string | null;
17593
+ price_per_unit: number;
17594
+ product_name: string;
17595
+ quantity_current: number;
17596
+ quantity_min: number;
17597
+ unit: string;
17598
+ updated_at: string;
17599
+ };
17600
+ Insert: {
17601
+ barcode?: string | null;
17602
+ created_at?: string;
17603
+ id?: string;
17604
+ monteur_id?: string | null;
17605
+ price_per_unit?: number;
17606
+ product_name: string;
17607
+ quantity_current?: number;
17608
+ quantity_min?: number;
17609
+ unit?: string;
17610
+ updated_at?: string;
17611
+ };
17612
+ Update: {
17613
+ barcode?: string | null;
17614
+ created_at?: string;
17615
+ id?: string;
17616
+ monteur_id?: string | null;
17617
+ price_per_unit?: number;
17618
+ product_name?: string;
17619
+ quantity_current?: number;
17620
+ quantity_min?: number;
17621
+ unit?: string;
17622
+ updated_at?: string;
17623
+ };
17624
+ Relationships: [
17625
+ {
17626
+ foreignKeyName: "van_inventories_monteur_id_fkey";
17627
+ columns: ["monteur_id"];
17628
+ isOneToOne: false;
17629
+ referencedRelation: "profiles";
17630
+ referencedColumns: ["id"];
17631
+ }
17632
+ ];
17633
+ };
17025
17634
  voorraad_custom_fields: {
17026
17635
  Row: {
17027
17636
  created_at: string;
@@ -17995,7 +18604,7 @@ export type Database = {
17995
18604
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
17996
18605
  columns: ["monteur_id"];
17997
18606
  isOneToOne: false;
17998
- referencedRelation: "monteurs";
18607
+ referencedRelation: "profiles";
17999
18608
  referencedColumns: ["id"];
18000
18609
  },
18001
18610
  {
@@ -18007,6 +18616,63 @@ export type Database = {
18007
18616
  }
18008
18617
  ];
18009
18618
  };
18619
+ work_order_photos: {
18620
+ Row: {
18621
+ ai_caption: string | null;
18622
+ ai_categorized_at: string | null;
18623
+ ai_labels: Json | null;
18624
+ caption: string | null;
18625
+ created_at: string;
18626
+ id: string;
18627
+ monteur_id: string | null;
18628
+ photo_type: string;
18629
+ storage_path: string;
18630
+ updated_at: string;
18631
+ work_order_id: string;
18632
+ };
18633
+ Insert: {
18634
+ ai_caption?: string | null;
18635
+ ai_categorized_at?: string | null;
18636
+ ai_labels?: Json | null;
18637
+ caption?: string | null;
18638
+ created_at?: string;
18639
+ id?: string;
18640
+ monteur_id?: string | null;
18641
+ photo_type?: string;
18642
+ storage_path: string;
18643
+ updated_at?: string;
18644
+ work_order_id: string;
18645
+ };
18646
+ Update: {
18647
+ ai_caption?: string | null;
18648
+ ai_categorized_at?: string | null;
18649
+ ai_labels?: Json | null;
18650
+ caption?: string | null;
18651
+ created_at?: string;
18652
+ id?: string;
18653
+ monteur_id?: string | null;
18654
+ photo_type?: string;
18655
+ storage_path?: string;
18656
+ updated_at?: string;
18657
+ work_order_id?: string;
18658
+ };
18659
+ Relationships: [
18660
+ {
18661
+ foreignKeyName: "work_order_photos_monteur_id_fkey";
18662
+ columns: ["monteur_id"];
18663
+ isOneToOne: false;
18664
+ referencedRelation: "profiles";
18665
+ referencedColumns: ["id"];
18666
+ },
18667
+ {
18668
+ foreignKeyName: "work_order_photos_work_order_id_fkey";
18669
+ columns: ["work_order_id"];
18670
+ isOneToOne: false;
18671
+ referencedRelation: "work_orders";
18672
+ referencedColumns: ["id"];
18673
+ }
18674
+ ];
18675
+ };
18010
18676
  work_orders: {
18011
18677
  Row: {
18012
18678
  assigned_to: string | null;
@@ -18038,7 +18704,6 @@ export type Database = {
18038
18704
  scheduled_end_time: string | null;
18039
18705
  scheduled_start_time: string | null;
18040
18706
  status: string;
18041
- tenant_id: string;
18042
18707
  total_hours_worked: number | null;
18043
18708
  total_price: number | null;
18044
18709
  travel_time_minutes: number | null;
@@ -18076,7 +18741,6 @@ export type Database = {
18076
18741
  scheduled_end_time?: string | null;
18077
18742
  scheduled_start_time?: string | null;
18078
18743
  status?: string;
18079
- tenant_id: string;
18080
18744
  total_hours_worked?: number | null;
18081
18745
  total_price?: number | null;
18082
18746
  travel_time_minutes?: number | null;
@@ -18114,7 +18778,6 @@ export type Database = {
18114
18778
  scheduled_end_time?: string | null;
18115
18779
  scheduled_start_time?: string | null;
18116
18780
  status?: string;
18117
- tenant_id?: string;
18118
18781
  total_hours_worked?: number | null;
18119
18782
  total_price?: number | null;
18120
18783
  travel_time_minutes?: number | null;
@@ -18129,13 +18792,6 @@ export type Database = {
18129
18792
  isOneToOne: false;
18130
18793
  referencedRelation: "work_orders";
18131
18794
  referencedColumns: ["id"];
18132
- },
18133
- {
18134
- foreignKeyName: "work_orders_tenant_id_fkey";
18135
- columns: ["tenant_id"];
18136
- isOneToOne: false;
18137
- referencedRelation: "tenants";
18138
- referencedColumns: ["id"];
18139
18795
  }
18140
18796
  ];
18141
18797
  };
@@ -18833,6 +19489,19 @@ export type Database = {
18833
19489
  };
18834
19490
  Returns: undefined;
18835
19491
  };
19492
+ approve_mailbox_order_proposal: {
19493
+ Args: {
19494
+ p_custom_fields: Json;
19495
+ p_customer_id: string;
19496
+ p_delivery_date: string;
19497
+ p_field_values?: Json;
19498
+ p_lines: Json;
19499
+ p_notes: string;
19500
+ p_proposal_id: string;
19501
+ p_reviewed_by: string;
19502
+ };
19503
+ Returns: Json;
19504
+ };
18836
19505
  assign_cart_numbers: {
18837
19506
  Args: {
18838
19507
  p_carts: Json;
@@ -18868,6 +19537,10 @@ export type Database = {
18868
19537
  processed_items: number;
18869
19538
  }[];
18870
19539
  };
19540
+ backfill_order_auto_invoice_queue: {
19541
+ Args: never;
19542
+ Returns: number;
19543
+ };
18871
19544
  calculate_layer_stock: {
18872
19545
  Args: {
18873
19546
  p_product_id: string;
@@ -18880,6 +19553,10 @@ export type Database = {
18880
19553
  };
18881
19554
  Returns: number;
18882
19555
  };
19556
+ can_manage_hours: {
19557
+ Args: never;
19558
+ Returns: boolean;
19559
+ };
18883
19560
  check_offer_product_available_stock: {
18884
19561
  Args: {
18885
19562
  p_campaign_product_id: string;
@@ -19069,6 +19746,7 @@ export type Database = {
19069
19746
  };
19070
19747
  Returns: {
19071
19748
  action: string;
19749
+ attempt_started_at: string | null;
19072
19750
  attempts: number;
19073
19751
  connection_id: string | null;
19074
19752
  created_at: string;
@@ -19156,6 +19834,30 @@ export type Database = {
19156
19834
  agent_naam: string;
19157
19835
  }[];
19158
19836
  };
19837
+ consume_van_inventory: {
19838
+ Args: {
19839
+ p_inventory_id: string;
19840
+ p_quantity: number;
19841
+ };
19842
+ Returns: {
19843
+ barcode: string | null;
19844
+ created_at: string;
19845
+ id: string;
19846
+ monteur_id: string | null;
19847
+ price_per_unit: number;
19848
+ product_name: string;
19849
+ quantity_current: number;
19850
+ quantity_min: number;
19851
+ unit: string;
19852
+ updated_at: string;
19853
+ };
19854
+ SetofOptions: {
19855
+ from: "*";
19856
+ to: "van_inventories";
19857
+ isOneToOne: true;
19858
+ isSetofReturn: false;
19859
+ };
19860
+ };
19159
19861
  control_get_todays_carts: {
19160
19862
  Args: never;
19161
19863
  Returns: {
@@ -19229,6 +19931,13 @@ export type Database = {
19229
19931
  _user_id: string;
19230
19932
  };
19231
19933
  Returns: string;
19934
+ } | {
19935
+ Args: {
19936
+ _feature_id?: string;
19937
+ _module_id: string;
19938
+ _user_id: string;
19939
+ };
19940
+ Returns: string;
19232
19941
  };
19233
19942
  email_auth_decrypt: {
19234
19943
  Args: {
@@ -19580,12 +20289,6 @@ export type Database = {
19580
20289
  Args: never;
19581
20290
  Returns: string;
19582
20291
  };
19583
- get_work_order_tenant_id: {
19584
- Args: {
19585
- wo_id: string;
19586
- };
19587
- Returns: string;
19588
- };
19589
20292
  has_module_permission: {
19590
20293
  Args: {
19591
20294
  _min: string;
@@ -19619,6 +20322,13 @@ export type Database = {
19619
20322
  };
19620
20323
  Returns: boolean;
19621
20324
  };
20325
+ is_time_log_week_locked: {
20326
+ Args: {
20327
+ p_employee_id: string;
20328
+ p_start_time: string;
20329
+ };
20330
+ Returns: boolean;
20331
+ };
19622
20332
  is_user_admin: {
19623
20333
  Args: never;
19624
20334
  Returns: boolean;
@@ -19633,13 +20343,14 @@ export type Database = {
19633
20343
  };
19634
20344
  Returns: boolean;
19635
20345
  };
19636
- list_monteurs: {
20346
+ list_medewerkers: {
19637
20347
  Args: never;
19638
20348
  Returns: {
19639
20349
  avatar_url: string;
19640
20350
  display_name: string;
19641
20351
  email: string;
19642
20352
  id: string;
20353
+ roles: string[];
19643
20354
  }[];
19644
20355
  };
19645
20356
  list_my_planning_items: {
@@ -20130,6 +20841,65 @@ export type Database = {
20130
20841
  };
20131
20842
  Returns: number;
20132
20843
  };
20844
+ logistics_plan_claim: {
20845
+ Args: {
20846
+ p_limit?: number;
20847
+ };
20848
+ Returns: {
20849
+ attempts: number;
20850
+ id: string;
20851
+ order_id: string;
20852
+ }[];
20853
+ };
20854
+ logistics_plan_enqueue: {
20855
+ Args: {
20856
+ p_order_id: string;
20857
+ p_reason?: string;
20858
+ };
20859
+ Returns: undefined;
20860
+ };
20861
+ logistics_plan_ensure_event: {
20862
+ Args: {
20863
+ p_order_id: string;
20864
+ };
20865
+ Returns: boolean;
20866
+ };
20867
+ logistics_plan_finish: {
20868
+ Args: {
20869
+ p_error?: string;
20870
+ p_id: string;
20871
+ };
20872
+ Returns: undefined;
20873
+ };
20874
+ logistics_plan_impact_orders: {
20875
+ Args: {
20876
+ p_order_id: string;
20877
+ };
20878
+ Returns: {
20879
+ buffer_id: string;
20880
+ order_id: string;
20881
+ plan_date: string;
20882
+ }[];
20883
+ };
20884
+ logistics_plan_kick: {
20885
+ Args: never;
20886
+ Returns: undefined;
20887
+ };
20888
+ logistics_plan_prune: {
20889
+ Args: never;
20890
+ Returns: number;
20891
+ };
20892
+ logistics_plan_release_stale: {
20893
+ Args: never;
20894
+ Returns: number;
20895
+ };
20896
+ logistics_plan_setting: {
20897
+ Args: {
20898
+ p_default: number;
20899
+ p_key: string;
20900
+ };
20901
+ Returns: number;
20902
+ };
20133
20903
  logistics_queue_capacity_email: {
20134
20904
  Args: {
20135
20905
  p_alert_id: string;
@@ -20371,6 +21141,7 @@ export type Database = {
20371
21141
  my_module_permissions: {
20372
21142
  Args: never;
20373
21143
  Returns: {
21144
+ feature_id: string;
20374
21145
  module_id: string;
20375
21146
  permission: string;
20376
21147
  }[];
@@ -21251,6 +22022,16 @@ export type Database = {
21251
22022
  };
21252
22023
  Returns: string[];
21253
22024
  };
22025
+ switch_time_log: {
22026
+ Args: {
22027
+ p_employee_id: string;
22028
+ p_start_lat?: number;
22029
+ p_start_lng?: number;
22030
+ p_type: string;
22031
+ p_work_order_id?: string;
22032
+ };
22033
+ Returns: Json;
22034
+ };
21254
22035
  sync_all_layer_stocks: {
21255
22036
  Args: never;
21256
22037
  Returns: undefined;
@@ -21301,6 +22082,24 @@ export type Database = {
21301
22082
  };
21302
22083
  Returns: boolean;
21303
22084
  };
22085
+ twinfield_cron_lock_acquire: {
22086
+ Args: {
22087
+ _job_name: string;
22088
+ _stale_seconds?: number;
22089
+ };
22090
+ Returns: boolean;
22091
+ };
22092
+ twinfield_cron_lock_release: {
22093
+ Args: {
22094
+ _error?: string;
22095
+ _job_name: string;
22096
+ };
22097
+ Returns: undefined;
22098
+ };
22099
+ twinfield_prune_push_queue: {
22100
+ Args: never;
22101
+ Returns: number;
22102
+ };
21304
22103
  twinfield_register_cron: {
21305
22104
  Args: {
21306
22105
  apikey?: string;