@flowselections/pick-schermen-kwekers 1.0.9 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist-lib/components/PickPublicPage.js +1 -1
  2. package/dist-lib/components/pick/LanguageTiles.d.ts.map +1 -1
  3. package/dist-lib/components/pick/LanguageTiles.js +3 -3
  4. package/dist-lib/components/pick/PickScherm.d.ts.map +1 -1
  5. package/dist-lib/components/pick/PickScherm.js +71 -10
  6. package/dist-lib/components/pick/QueueTable.d.ts.map +1 -1
  7. package/dist-lib/components/pick/QueueTable.js +22 -12
  8. package/dist-lib/hooks/usePickQueue.d.ts +4 -0
  9. package/dist-lib/hooks/usePickQueue.d.ts.map +1 -1
  10. package/dist-lib/hooks/usePickQueue.js +38 -7
  11. package/dist-lib/hooks/usePrintJob.d.ts.map +1 -1
  12. package/dist-lib/hooks/usePrintJob.js +13 -2
  13. package/dist-lib/integrations/supabase/auth-middleware.d.ts +1788 -311
  14. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  15. package/dist-lib/integrations/supabase/client.d.ts +1788 -311
  16. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  17. package/dist-lib/integrations/supabase/client.server.d.ts +1788 -311
  18. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  19. package/dist-lib/integrations/supabase/types.d.ts +1888 -375
  20. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  21. package/dist-lib/integrations/supabase/types.js +3 -0
  22. package/dist-lib/lib/pickApi.d.ts +11 -4
  23. package/dist-lib/lib/pickApi.d.ts.map +1 -1
  24. package/dist-lib/lib/pickApi.js +46 -17
  25. package/dist-lib/lib/pickUiText.d.ts +29 -0
  26. package/dist-lib/lib/pickUiText.d.ts.map +1 -0
  27. package/dist-lib/lib/pickUiText.js +71 -0
  28. package/package.json +2 -2
@@ -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;
@@ -2698,6 +2818,44 @@ export type Database = {
2698
2818
  };
2699
2819
  Relationships: [];
2700
2820
  };
2821
+ document_bronregels: {
2822
+ Row: {
2823
+ bron: string;
2824
+ created_at: string;
2825
+ documenttype: string;
2826
+ herkomst: string;
2827
+ id: string;
2828
+ layout_id: string | null;
2829
+ updated_at: string;
2830
+ };
2831
+ Insert: {
2832
+ bron?: string;
2833
+ created_at?: string;
2834
+ documenttype: string;
2835
+ herkomst: string;
2836
+ id?: string;
2837
+ layout_id?: string | null;
2838
+ updated_at?: string;
2839
+ };
2840
+ Update: {
2841
+ bron?: string;
2842
+ created_at?: string;
2843
+ documenttype?: string;
2844
+ herkomst?: string;
2845
+ id?: string;
2846
+ layout_id?: string | null;
2847
+ updated_at?: string;
2848
+ };
2849
+ Relationships: [
2850
+ {
2851
+ foreignKeyName: "document_bronregels_layout_id_fkey";
2852
+ columns: ["layout_id"];
2853
+ isOneToOne: false;
2854
+ referencedRelation: "document_layouts";
2855
+ referencedColumns: ["id"];
2856
+ }
2857
+ ];
2858
+ };
2701
2859
  document_formaat_printers: {
2702
2860
  Row: {
2703
2861
  created_at: string;
@@ -2988,6 +3146,7 @@ export type Database = {
2988
3146
  Row: {
2989
3147
  actief: boolean;
2990
3148
  breedte_mm: number;
3149
+ bron: string;
2991
3150
  config: Json;
2992
3151
  created_at: string;
2993
3152
  created_by: string | null;
@@ -3005,12 +3164,14 @@ export type Database = {
3005
3164
  orientatie: Database["public"]["Enums"]["doc_orientation"];
3006
3165
  page_settings: Json;
3007
3166
  papierformaat: string;
3167
+ systeem: boolean;
3008
3168
  thumbnail_url: string | null;
3009
3169
  updated_at: string;
3010
3170
  };
3011
3171
  Insert: {
3012
3172
  actief?: boolean;
3013
3173
  breedte_mm?: number;
3174
+ bron?: string;
3014
3175
  config?: Json;
3015
3176
  created_at?: string;
3016
3177
  created_by?: string | null;
@@ -3028,12 +3189,14 @@ export type Database = {
3028
3189
  orientatie?: Database["public"]["Enums"]["doc_orientation"];
3029
3190
  page_settings?: Json;
3030
3191
  papierformaat?: string;
3192
+ systeem?: boolean;
3031
3193
  thumbnail_url?: string | null;
3032
3194
  updated_at?: string;
3033
3195
  };
3034
3196
  Update: {
3035
3197
  actief?: boolean;
3036
3198
  breedte_mm?: number;
3199
+ bron?: string;
3037
3200
  config?: Json;
3038
3201
  created_at?: string;
3039
3202
  created_by?: string | null;
@@ -3051,11 +3214,50 @@ export type Database = {
3051
3214
  orientatie?: Database["public"]["Enums"]["doc_orientation"];
3052
3215
  page_settings?: Json;
3053
3216
  papierformaat?: string;
3217
+ systeem?: boolean;
3054
3218
  thumbnail_url?: string | null;
3055
3219
  updated_at?: string;
3056
3220
  };
3057
3221
  Relationships: [];
3058
3222
  };
3223
+ document_werkplek_printers: {
3224
+ Row: {
3225
+ created_at: string;
3226
+ documenttype: string;
3227
+ id: string;
3228
+ papierformaat: string | null;
3229
+ printer_id: string | null;
3230
+ updated_at: string;
3231
+ werkplek: string;
3232
+ };
3233
+ Insert: {
3234
+ created_at?: string;
3235
+ documenttype: string;
3236
+ id?: string;
3237
+ papierformaat?: string | null;
3238
+ printer_id?: string | null;
3239
+ updated_at?: string;
3240
+ werkplek: string;
3241
+ };
3242
+ Update: {
3243
+ created_at?: string;
3244
+ documenttype?: string;
3245
+ id?: string;
3246
+ papierformaat?: string | null;
3247
+ printer_id?: string | null;
3248
+ updated_at?: string;
3249
+ werkplek?: string;
3250
+ };
3251
+ Relationships: [
3252
+ {
3253
+ foreignKeyName: "document_werkplek_printers_printer_id_fkey";
3254
+ columns: ["printer_id"];
3255
+ isOneToOne: false;
3256
+ referencedRelation: "printers";
3257
+ referencedColumns: ["id"];
3258
+ }
3259
+ ];
3260
+ };
3059
3261
  email_auth_connections: {
3060
3262
  Row: {
3061
3263
  access_token_encrypted: string | null;
@@ -7422,8 +7624,66 @@ export type Database = {
7422
7624
  };
7423
7625
  Relationships: [];
7424
7626
  };
7627
+ invoice_items: {
7628
+ Row: {
7629
+ created_at: string;
7630
+ description: string;
7631
+ id: string;
7632
+ invoice_id: string;
7633
+ kind: string;
7634
+ quantity: number;
7635
+ sort_order: number;
7636
+ source_line_ref: string | null;
7637
+ total_cents: number;
7638
+ unit: string;
7639
+ unit_price_cents: number;
7640
+ };
7641
+ Insert: {
7642
+ created_at?: string;
7643
+ description?: string;
7644
+ id?: string;
7645
+ invoice_id: string;
7646
+ kind?: string;
7647
+ quantity?: number;
7648
+ sort_order?: number;
7649
+ source_line_ref?: string | null;
7650
+ total_cents?: number;
7651
+ unit?: string;
7652
+ unit_price_cents?: number;
7653
+ };
7654
+ Update: {
7655
+ created_at?: string;
7656
+ description?: string;
7657
+ id?: string;
7658
+ invoice_id?: string;
7659
+ kind?: string;
7660
+ quantity?: number;
7661
+ sort_order?: number;
7662
+ source_line_ref?: string | null;
7663
+ total_cents?: number;
7664
+ unit?: string;
7665
+ unit_price_cents?: number;
7666
+ };
7667
+ Relationships: [
7668
+ {
7669
+ foreignKeyName: "invoice_items_invoice_id_fkey";
7670
+ columns: ["invoice_id"];
7671
+ isOneToOne: false;
7672
+ referencedRelation: "invoices";
7673
+ referencedColumns: ["id"];
7674
+ },
7675
+ {
7676
+ foreignKeyName: "invoice_items_invoice_id_fkey";
7677
+ columns: ["invoice_id"];
7678
+ isOneToOne: false;
7679
+ referencedRelation: "uren_facturen";
7680
+ referencedColumns: ["id"];
7681
+ }
7682
+ ];
7683
+ };
7425
7684
  invoice_post_idempotency: {
7426
7685
  Row: {
7686
+ administration_code: string;
7427
7687
  client_request_id: string;
7428
7688
  completed_at: string | null;
7429
7689
  created_at: string;
@@ -7433,6 +7693,7 @@ export type Database = {
7433
7693
  user_id: string;
7434
7694
  };
7435
7695
  Insert: {
7696
+ administration_code?: string;
7436
7697
  client_request_id: string;
7437
7698
  completed_at?: string | null;
7438
7699
  created_at?: string;
@@ -7442,6 +7703,7 @@ export type Database = {
7442
7703
  user_id: string;
7443
7704
  };
7444
7705
  Update: {
7706
+ administration_code?: string;
7445
7707
  client_request_id?: string;
7446
7708
  completed_at?: string | null;
7447
7709
  created_at?: string;
@@ -7652,6 +7914,77 @@ export type Database = {
7652
7914
  };
7653
7915
  Relationships: [];
7654
7916
  };
7917
+ invoices: {
7918
+ Row: {
7919
+ created_at: string;
7920
+ created_by: string | null;
7921
+ customer_id: string | null;
7922
+ customer_name: string | null;
7923
+ due_date: string | null;
7924
+ id: string;
7925
+ invoice_date: string;
7926
+ invoice_number: string | null;
7927
+ note: string | null;
7928
+ source_number: string | null;
7929
+ source_ref: string | null;
7930
+ source_type: string;
7931
+ status: string;
7932
+ subtotal_cents: number;
7933
+ total_cents: number;
7934
+ updated_at: string;
7935
+ vat_cents: number;
7936
+ vat_rate: number;
7937
+ };
7938
+ Insert: {
7939
+ created_at?: string;
7940
+ created_by?: string | null;
7941
+ customer_id?: string | null;
7942
+ customer_name?: string | null;
7943
+ due_date?: string | null;
7944
+ id?: string;
7945
+ invoice_date?: string;
7946
+ invoice_number?: string | null;
7947
+ note?: string | null;
7948
+ source_number?: string | null;
7949
+ source_ref?: string | null;
7950
+ source_type?: string;
7951
+ status?: string;
7952
+ subtotal_cents?: number;
7953
+ total_cents?: number;
7954
+ updated_at?: string;
7955
+ vat_cents?: number;
7956
+ vat_rate?: number;
7957
+ };
7958
+ Update: {
7959
+ created_at?: string;
7960
+ created_by?: string | null;
7961
+ customer_id?: string | null;
7962
+ customer_name?: string | null;
7963
+ due_date?: string | null;
7964
+ id?: string;
7965
+ invoice_date?: string;
7966
+ invoice_number?: string | null;
7967
+ note?: string | null;
7968
+ source_number?: string | null;
7969
+ source_ref?: string | null;
7970
+ source_type?: string;
7971
+ status?: string;
7972
+ subtotal_cents?: number;
7973
+ total_cents?: number;
7974
+ updated_at?: string;
7975
+ vat_cents?: number;
7976
+ vat_rate?: number;
7977
+ };
7978
+ Relationships: [
7979
+ {
7980
+ foreignKeyName: "invoices_customer_id_fkey";
7981
+ columns: ["customer_id"];
7982
+ isOneToOne: false;
7983
+ referencedRelation: "itk_customers";
7984
+ referencedColumns: ["id"];
7985
+ }
7986
+ ];
7987
+ };
7655
7988
  itk_contact_persons: {
7656
7989
  Row: {
7657
7990
  created_at: string;
@@ -7856,72 +8189,335 @@ export type Database = {
7856
8189
  };
7857
8190
  Relationships: [];
7858
8191
  };
7859
- itk_work_locations: {
8192
+ itk_offerte_events: {
7860
8193
  Row: {
7861
- city: string | null;
7862
8194
  created_at: string;
7863
- customer_id: string;
8195
+ event_type: string;
7864
8196
  id: string;
7865
- instructions: string | null;
7866
- label: string;
7867
- latitude: number | null;
7868
- longitude: number | null;
7869
- postcode: string | null;
7870
- street: string | null;
7871
- updated_at: string;
8197
+ metadata: Json;
8198
+ offerte_id: string;
8199
+ omschrijving: string | null;
8200
+ user_id: string | null;
7872
8201
  };
7873
8202
  Insert: {
7874
- city?: string | null;
7875
8203
  created_at?: string;
7876
- customer_id: string;
8204
+ event_type: string;
7877
8205
  id?: string;
7878
- instructions?: string | null;
7879
- label: string;
7880
- latitude?: number | null;
7881
- longitude?: number | null;
7882
- postcode?: string | null;
7883
- street?: string | null;
7884
- updated_at?: string;
8206
+ metadata?: Json;
8207
+ offerte_id: string;
8208
+ omschrijving?: string | null;
8209
+ user_id?: string | null;
7885
8210
  };
7886
8211
  Update: {
7887
- city?: string | null;
7888
8212
  created_at?: string;
7889
- customer_id?: string;
8213
+ event_type?: string;
7890
8214
  id?: string;
7891
- instructions?: string | null;
7892
- label?: string;
7893
- latitude?: number | null;
7894
- longitude?: number | null;
7895
- postcode?: string | null;
7896
- street?: string | null;
7897
- updated_at?: string;
8215
+ metadata?: Json;
8216
+ offerte_id?: string;
8217
+ omschrijving?: string | null;
8218
+ user_id?: string | null;
7898
8219
  };
7899
8220
  Relationships: [
7900
8221
  {
7901
- foreignKeyName: "itk_work_locations_customer_id_fkey";
7902
- columns: ["customer_id"];
8222
+ foreignKeyName: "itk_offerte_events_offerte_id_fkey";
8223
+ columns: ["offerte_id"];
7903
8224
  isOneToOne: false;
7904
- referencedRelation: "itk_customers";
8225
+ referencedRelation: "itk_offertes";
7905
8226
  referencedColumns: ["id"];
7906
8227
  }
7907
8228
  ];
7908
8229
  };
7909
- layout_logos: {
8230
+ itk_offerte_regels: {
7910
8231
  Row: {
7911
- bestand_url: string;
7912
- bestandsgrootte: number;
7913
- bestandspad: string | null;
7914
- bestandstype: string;
7915
- breedte: number;
7916
- categorie: string;
7917
8232
  created_at: string;
7918
- hash: string | null;
7919
- hoogte: number;
7920
8233
  id: string;
7921
- is_standaard: boolean;
7922
- naam: string;
8234
+ line_total_cents: number;
8235
+ offerte_id: string;
7923
8236
  omschrijving: string;
7924
- transparant: boolean;
8237
+ package_id: string | null;
8238
+ quantity: number;
8239
+ sort_order: number;
8240
+ source: string;
8241
+ unit_price_cents: number;
8242
+ updated_at: string;
8243
+ };
8244
+ Insert: {
8245
+ created_at?: string;
8246
+ id?: string;
8247
+ line_total_cents?: number;
8248
+ offerte_id: string;
8249
+ omschrijving?: string;
8250
+ package_id?: string | null;
8251
+ quantity?: number;
8252
+ sort_order?: number;
8253
+ source?: string;
8254
+ unit_price_cents?: number;
8255
+ updated_at?: string;
8256
+ };
8257
+ Update: {
8258
+ created_at?: string;
8259
+ id?: string;
8260
+ line_total_cents?: number;
8261
+ offerte_id?: string;
8262
+ omschrijving?: string;
8263
+ package_id?: string | null;
8264
+ quantity?: number;
8265
+ sort_order?: number;
8266
+ source?: string;
8267
+ unit_price_cents?: number;
8268
+ updated_at?: string;
8269
+ };
8270
+ Relationships: [
8271
+ {
8272
+ foreignKeyName: "itk_offerte_regels_offerte_id_fkey";
8273
+ columns: ["offerte_id"];
8274
+ isOneToOne: false;
8275
+ referencedRelation: "itk_offertes";
8276
+ referencedColumns: ["id"];
8277
+ },
8278
+ {
8279
+ foreignKeyName: "itk_offerte_regels_package_id_fkey";
8280
+ columns: ["package_id"];
8281
+ isOneToOne: false;
8282
+ referencedRelation: "werkbon_packages";
8283
+ referencedColumns: ["id"];
8284
+ }
8285
+ ];
8286
+ };
8287
+ itk_offerte_settings: {
8288
+ Row: {
8289
+ auto_convert_binnen_mandaat: boolean;
8290
+ created_at: string;
8291
+ default_geldigheid_dagen: number;
8292
+ default_vat_rate: number;
8293
+ id: string;
8294
+ singleton: boolean;
8295
+ updated_at: string;
8296
+ };
8297
+ Insert: {
8298
+ auto_convert_binnen_mandaat?: boolean;
8299
+ created_at?: string;
8300
+ default_geldigheid_dagen?: number;
8301
+ default_vat_rate?: number;
8302
+ id?: string;
8303
+ singleton?: boolean;
8304
+ updated_at?: string;
8305
+ };
8306
+ Update: {
8307
+ auto_convert_binnen_mandaat?: boolean;
8308
+ created_at?: string;
8309
+ default_geldigheid_dagen?: number;
8310
+ default_vat_rate?: number;
8311
+ id?: string;
8312
+ singleton?: boolean;
8313
+ updated_at?: string;
8314
+ };
8315
+ Relationships: [];
8316
+ };
8317
+ itk_offertes: {
8318
+ Row: {
8319
+ ai_generated: boolean;
8320
+ approved_at: string | null;
8321
+ binnen_mandaat: boolean;
8322
+ contact_id: string | null;
8323
+ converted_at: string | null;
8324
+ created_at: string;
8325
+ created_by: string | null;
8326
+ customer_id: string | null;
8327
+ follow_up_werkbon_id: string | null;
8328
+ id: string;
8329
+ jaar: number;
8330
+ mandaat_restant_cents: number;
8331
+ notities: string | null;
8332
+ offerte_number: string | null;
8333
+ omschrijving: string;
8334
+ rejected_at: string | null;
8335
+ sent_at: string | null;
8336
+ source_number: string | null;
8337
+ source_ref: string | null;
8338
+ source_type: string;
8339
+ status: string;
8340
+ subtotal_cents: number;
8341
+ total_cents: number;
8342
+ updated_at: string;
8343
+ valid_until: string | null;
8344
+ vat_cents: number;
8345
+ vat_rate: number;
8346
+ viewed_at: string | null;
8347
+ volgnummer: number | null;
8348
+ werkbon_id: string | null;
8349
+ work_location_id: string | null;
8350
+ };
8351
+ Insert: {
8352
+ ai_generated?: boolean;
8353
+ approved_at?: string | null;
8354
+ binnen_mandaat?: boolean;
8355
+ contact_id?: string | null;
8356
+ converted_at?: string | null;
8357
+ created_at?: string;
8358
+ created_by?: string | null;
8359
+ customer_id?: string | null;
8360
+ follow_up_werkbon_id?: string | null;
8361
+ id?: string;
8362
+ jaar?: number;
8363
+ mandaat_restant_cents?: number;
8364
+ notities?: string | null;
8365
+ offerte_number?: string | null;
8366
+ omschrijving?: string;
8367
+ rejected_at?: string | null;
8368
+ sent_at?: string | null;
8369
+ source_number?: string | null;
8370
+ source_ref?: string | null;
8371
+ source_type?: string;
8372
+ status?: string;
8373
+ subtotal_cents?: number;
8374
+ total_cents?: number;
8375
+ updated_at?: string;
8376
+ valid_until?: string | null;
8377
+ vat_cents?: number;
8378
+ vat_rate?: number;
8379
+ viewed_at?: string | null;
8380
+ volgnummer?: number | null;
8381
+ werkbon_id?: string | null;
8382
+ work_location_id?: string | null;
8383
+ };
8384
+ Update: {
8385
+ ai_generated?: boolean;
8386
+ approved_at?: string | null;
8387
+ binnen_mandaat?: boolean;
8388
+ contact_id?: string | null;
8389
+ converted_at?: string | null;
8390
+ created_at?: string;
8391
+ created_by?: string | null;
8392
+ customer_id?: string | null;
8393
+ follow_up_werkbon_id?: string | null;
8394
+ id?: string;
8395
+ jaar?: number;
8396
+ mandaat_restant_cents?: number;
8397
+ notities?: string | null;
8398
+ offerte_number?: string | null;
8399
+ omschrijving?: string;
8400
+ rejected_at?: string | null;
8401
+ sent_at?: string | null;
8402
+ source_number?: string | null;
8403
+ source_ref?: string | null;
8404
+ source_type?: string;
8405
+ status?: string;
8406
+ subtotal_cents?: number;
8407
+ total_cents?: number;
8408
+ updated_at?: string;
8409
+ valid_until?: string | null;
8410
+ vat_cents?: number;
8411
+ vat_rate?: number;
8412
+ viewed_at?: string | null;
8413
+ volgnummer?: number | null;
8414
+ werkbon_id?: string | null;
8415
+ work_location_id?: string | null;
8416
+ };
8417
+ Relationships: [
8418
+ {
8419
+ foreignKeyName: "itk_offertes_contact_id_fkey";
8420
+ columns: ["contact_id"];
8421
+ isOneToOne: false;
8422
+ referencedRelation: "itk_contact_persons";
8423
+ referencedColumns: ["id"];
8424
+ },
8425
+ {
8426
+ foreignKeyName: "itk_offertes_customer_id_fkey";
8427
+ columns: ["customer_id"];
8428
+ isOneToOne: false;
8429
+ referencedRelation: "itk_customers";
8430
+ referencedColumns: ["id"];
8431
+ },
8432
+ {
8433
+ foreignKeyName: "itk_offertes_follow_up_werkbon_id_fkey";
8434
+ columns: ["follow_up_werkbon_id"];
8435
+ isOneToOne: false;
8436
+ referencedRelation: "werkbonnen";
8437
+ referencedColumns: ["id"];
8438
+ },
8439
+ {
8440
+ foreignKeyName: "itk_offertes_werkbon_id_fkey";
8441
+ columns: ["werkbon_id"];
8442
+ isOneToOne: false;
8443
+ referencedRelation: "werkbonnen";
8444
+ referencedColumns: ["id"];
8445
+ },
8446
+ {
8447
+ foreignKeyName: "itk_offertes_work_location_id_fkey";
8448
+ columns: ["work_location_id"];
8449
+ isOneToOne: false;
8450
+ referencedRelation: "itk_work_locations";
8451
+ referencedColumns: ["id"];
8452
+ }
8453
+ ];
8454
+ };
8455
+ itk_work_locations: {
8456
+ Row: {
8457
+ city: string | null;
8458
+ created_at: string;
8459
+ customer_id: string;
8460
+ id: string;
8461
+ instructions: string | null;
8462
+ label: string;
8463
+ latitude: number | null;
8464
+ longitude: number | null;
8465
+ postcode: string | null;
8466
+ street: string | null;
8467
+ updated_at: string;
8468
+ };
8469
+ Insert: {
8470
+ city?: string | null;
8471
+ created_at?: string;
8472
+ customer_id: string;
8473
+ id?: string;
8474
+ instructions?: string | null;
8475
+ label: string;
8476
+ latitude?: number | null;
8477
+ longitude?: number | null;
8478
+ postcode?: string | null;
8479
+ street?: string | null;
8480
+ updated_at?: string;
8481
+ };
8482
+ Update: {
8483
+ city?: string | null;
8484
+ created_at?: string;
8485
+ customer_id?: string;
8486
+ id?: string;
8487
+ instructions?: string | null;
8488
+ label?: string;
8489
+ latitude?: number | null;
8490
+ longitude?: number | null;
8491
+ postcode?: string | null;
8492
+ street?: string | null;
8493
+ updated_at?: string;
8494
+ };
8495
+ Relationships: [
8496
+ {
8497
+ foreignKeyName: "itk_work_locations_customer_id_fkey";
8498
+ columns: ["customer_id"];
8499
+ isOneToOne: false;
8500
+ referencedRelation: "itk_customers";
8501
+ referencedColumns: ["id"];
8502
+ }
8503
+ ];
8504
+ };
8505
+ layout_logos: {
8506
+ Row: {
8507
+ bestand_url: string;
8508
+ bestandsgrootte: number;
8509
+ bestandspad: string | null;
8510
+ bestandstype: string;
8511
+ breedte: number;
8512
+ categorie: string;
8513
+ created_at: string;
8514
+ hash: string | null;
8515
+ hoogte: number;
8516
+ id: string;
8517
+ is_standaard: boolean;
8518
+ naam: string;
8519
+ omschrijving: string;
8520
+ transparant: boolean;
7925
8521
  updated_at: string;
7926
8522
  };
7927
8523
  Insert: {
@@ -7975,7 +8571,6 @@ export type Database = {
7975
8571
  start_date: string;
7976
8572
  start_time: string | null;
7977
8573
  status: string;
7978
- tenant_id: string;
7979
8574
  updated_at: string;
7980
8575
  user_id: string;
7981
8576
  };
@@ -7993,7 +8588,6 @@ export type Database = {
7993
8588
  start_date: string;
7994
8589
  start_time?: string | null;
7995
8590
  status?: string;
7996
- tenant_id?: string;
7997
8591
  updated_at?: string;
7998
8592
  user_id: string;
7999
8593
  };
@@ -8011,7 +8605,6 @@ export type Database = {
8011
8605
  start_date?: string;
8012
8606
  start_time?: string | null;
8013
8607
  status?: string;
8014
- tenant_id?: string;
8015
8608
  updated_at?: string;
8016
8609
  user_id?: string;
8017
8610
  };
@@ -8020,14 +8613,14 @@ export type Database = {
8020
8613
  foreignKeyName: "leave_requests_monteur_id_fkey";
8021
8614
  columns: ["monteur_id"];
8022
8615
  isOneToOne: false;
8023
- referencedRelation: "monteurs";
8616
+ referencedRelation: "profiles";
8024
8617
  referencedColumns: ["id"];
8025
8618
  },
8026
8619
  {
8027
8620
  foreignKeyName: "leave_requests_user_id_fkey";
8028
8621
  columns: ["user_id"];
8029
8622
  isOneToOne: false;
8030
- referencedRelation: "monteurs";
8623
+ referencedRelation: "profiles";
8031
8624
  referencedColumns: ["id"];
8032
8625
  }
8033
8626
  ];
@@ -10235,47 +10828,198 @@ export type Database = {
10235
10828
  };
10236
10829
  Relationships: [];
10237
10830
  };
10238
- module_permissions: {
10831
+ material_usage: {
10239
10832
  Row: {
10240
10833
  created_at: string;
10241
10834
  id: string;
10242
- module_id: string;
10243
- permission: string;
10244
- role: Database["public"]["Enums"]["app_role"];
10835
+ material_name: string;
10836
+ monteur_id: string | null;
10837
+ price_at_time: number;
10838
+ quantity_used: number;
10245
10839
  updated_at: string;
10840
+ van_inventory_id: string | null;
10841
+ work_order_id: string;
10246
10842
  };
10247
10843
  Insert: {
10248
10844
  created_at?: string;
10249
10845
  id?: string;
10250
- module_id: string;
10251
- permission: string;
10252
- role: Database["public"]["Enums"]["app_role"];
10846
+ material_name: string;
10847
+ monteur_id?: string | null;
10848
+ price_at_time?: number;
10849
+ quantity_used?: number;
10253
10850
  updated_at?: string;
10851
+ van_inventory_id?: string | null;
10852
+ work_order_id: string;
10254
10853
  };
10255
10854
  Update: {
10256
10855
  created_at?: string;
10257
10856
  id?: string;
10258
- module_id?: string;
10259
- permission?: string;
10260
- role?: Database["public"]["Enums"]["app_role"];
10857
+ material_name?: string;
10858
+ monteur_id?: string | null;
10859
+ price_at_time?: number;
10860
+ quantity_used?: number;
10261
10861
  updated_at?: string;
10862
+ van_inventory_id?: string | null;
10863
+ work_order_id?: string;
10262
10864
  };
10263
- Relationships: [];
10264
- };
10265
- module_registry: {
10266
- Row: {
10267
- created_at: string;
10268
- is_active: boolean;
10269
- last_seen_at: string;
10270
- module_id: string;
10271
- name: string;
10272
- shell_id: string | null;
10273
- sort_order: number | null;
10274
- };
10275
- Insert: {
10276
- created_at?: string;
10277
- is_active?: boolean;
10865
+ Relationships: [
10866
+ {
10867
+ foreignKeyName: "material_usage_monteur_id_fkey";
10868
+ columns: ["monteur_id"];
10869
+ isOneToOne: false;
10870
+ referencedRelation: "profiles";
10871
+ referencedColumns: ["id"];
10872
+ },
10873
+ {
10874
+ foreignKeyName: "material_usage_van_inventory_id_fkey";
10875
+ columns: ["van_inventory_id"];
10876
+ isOneToOne: false;
10877
+ referencedRelation: "van_inventories";
10878
+ referencedColumns: ["id"];
10879
+ },
10880
+ {
10881
+ foreignKeyName: "material_usage_work_order_id_fkey";
10882
+ columns: ["work_order_id"];
10883
+ isOneToOne: false;
10884
+ referencedRelation: "work_orders";
10885
+ referencedColumns: ["id"];
10886
+ }
10887
+ ];
10888
+ };
10889
+ medewerker_details: {
10890
+ Row: {
10891
+ color: string | null;
10892
+ created_at: string;
10893
+ hours_fri: number | null;
10894
+ hours_mon: number | null;
10895
+ hours_thu: number | null;
10896
+ hours_tue: number | null;
10897
+ hours_wed: number | null;
10898
+ id: string;
10899
+ is_active: boolean;
10900
+ leave_balance_hours: number;
10901
+ persnr: string | null;
10902
+ phone: string | null;
10903
+ profile_id: string;
10904
+ updated_at: string;
10905
+ };
10906
+ Insert: {
10907
+ color?: string | null;
10908
+ created_at?: string;
10909
+ hours_fri?: number | null;
10910
+ hours_mon?: number | null;
10911
+ hours_thu?: number | null;
10912
+ hours_tue?: number | null;
10913
+ hours_wed?: number | null;
10914
+ id?: string;
10915
+ is_active?: boolean;
10916
+ leave_balance_hours?: number;
10917
+ persnr?: string | null;
10918
+ phone?: string | null;
10919
+ profile_id: string;
10920
+ updated_at?: string;
10921
+ };
10922
+ Update: {
10923
+ color?: string | null;
10924
+ created_at?: string;
10925
+ hours_fri?: number | null;
10926
+ hours_mon?: number | null;
10927
+ hours_thu?: number | null;
10928
+ hours_tue?: number | null;
10929
+ hours_wed?: number | null;
10930
+ id?: string;
10931
+ is_active?: boolean;
10932
+ leave_balance_hours?: number;
10933
+ persnr?: string | null;
10934
+ phone?: string | null;
10935
+ profile_id?: string;
10936
+ updated_at?: string;
10937
+ };
10938
+ Relationships: [
10939
+ {
10940
+ foreignKeyName: "medewerker_details_profile_id_fkey";
10941
+ columns: ["profile_id"];
10942
+ isOneToOne: true;
10943
+ referencedRelation: "profiles";
10944
+ referencedColumns: ["id"];
10945
+ }
10946
+ ];
10947
+ };
10948
+ module_features: {
10949
+ Row: {
10950
+ created_at: string;
10951
+ feature_id: string;
10952
+ id: string;
10953
+ is_active: boolean;
10954
+ last_seen_at: string;
10955
+ module_id: string;
10956
+ name: string;
10957
+ };
10958
+ Insert: {
10959
+ created_at?: string;
10960
+ feature_id: string;
10961
+ id?: string;
10962
+ is_active?: boolean;
10963
+ last_seen_at?: string;
10964
+ module_id: string;
10965
+ name: string;
10966
+ };
10967
+ Update: {
10968
+ created_at?: string;
10969
+ feature_id?: string;
10970
+ id?: string;
10971
+ is_active?: boolean;
10972
+ last_seen_at?: string;
10973
+ module_id?: string;
10974
+ name?: string;
10975
+ };
10976
+ Relationships: [];
10977
+ };
10978
+ module_permissions: {
10979
+ Row: {
10980
+ created_at: string;
10981
+ id: string;
10982
+ module_id: string;
10983
+ permission: string;
10984
+ role: Database["public"]["Enums"]["app_role"];
10985
+ updated_at: string;
10986
+ };
10987
+ Insert: {
10988
+ created_at?: string;
10989
+ id?: string;
10990
+ module_id: string;
10991
+ permission: string;
10992
+ role: Database["public"]["Enums"]["app_role"];
10993
+ updated_at?: string;
10994
+ };
10995
+ Update: {
10996
+ created_at?: string;
10997
+ id?: string;
10998
+ module_id?: string;
10999
+ permission?: string;
11000
+ role?: Database["public"]["Enums"]["app_role"];
11001
+ updated_at?: string;
11002
+ };
11003
+ Relationships: [];
11004
+ };
11005
+ module_registry: {
11006
+ Row: {
11007
+ created_at: string;
11008
+ enforce: boolean;
11009
+ is_active: boolean;
11010
+ last_seen_at: string;
11011
+ missing_count: number;
11012
+ module_id: string;
11013
+ name: string;
11014
+ shell_id: string | null;
11015
+ sort_order: number | null;
11016
+ };
11017
+ Insert: {
11018
+ created_at?: string;
11019
+ enforce?: boolean;
11020
+ is_active?: boolean;
10278
11021
  last_seen_at?: string;
11022
+ missing_count?: number;
10279
11023
  module_id: string;
10280
11024
  name: string;
10281
11025
  shell_id?: string | null;
@@ -10283,8 +11027,10 @@ export type Database = {
10283
11027
  };
10284
11028
  Update: {
10285
11029
  created_at?: string;
11030
+ enforce?: boolean;
10286
11031
  is_active?: boolean;
10287
11032
  last_seen_at?: string;
11033
+ missing_count?: number;
10288
11034
  module_id?: string;
10289
11035
  name?: string;
10290
11036
  shell_id?: string | null;
@@ -10343,65 +11089,6 @@ export type Database = {
10343
11089
  };
10344
11090
  Relationships: [];
10345
11091
  };
10346
- monteurs: {
10347
- Row: {
10348
- avatar_url: string | null;
10349
- color: string | null;
10350
- created_at: string;
10351
- email: string | null;
10352
- id: string;
10353
- is_active: boolean;
10354
- leave_balance_hours: number;
10355
- name: string;
10356
- persnr: number | null;
10357
- phone: string | null;
10358
- role: string;
10359
- tenant_id: string;
10360
- updated_at: string;
10361
- user_id: string | null;
10362
- };
10363
- Insert: {
10364
- avatar_url?: string | null;
10365
- color?: string | null;
10366
- created_at?: string;
10367
- email?: string | null;
10368
- id?: string;
10369
- is_active?: boolean;
10370
- leave_balance_hours?: number;
10371
- name: string;
10372
- persnr?: number | null;
10373
- phone?: string | null;
10374
- role?: string;
10375
- tenant_id: string;
10376
- updated_at?: string;
10377
- user_id?: string | null;
10378
- };
10379
- Update: {
10380
- avatar_url?: string | null;
10381
- color?: string | null;
10382
- created_at?: string;
10383
- email?: string | null;
10384
- id?: string;
10385
- is_active?: boolean;
10386
- leave_balance_hours?: number;
10387
- name?: string;
10388
- persnr?: number | null;
10389
- phone?: string | null;
10390
- role?: string;
10391
- tenant_id?: string;
10392
- updated_at?: string;
10393
- user_id?: string | null;
10394
- };
10395
- Relationships: [
10396
- {
10397
- foreignKeyName: "monteurs_tenant_id_fkey";
10398
- columns: ["tenant_id"];
10399
- isOneToOne: false;
10400
- referencedRelation: "tenants";
10401
- referencedColumns: ["id"];
10402
- }
10403
- ];
10404
- };
10405
11092
  nmbrs_component_mapping: {
10406
11093
  Row: {
10407
11094
  created_at: string;
@@ -10474,15 +11161,7 @@ export type Database = {
10474
11161
  nmbrs_employee_number?: string;
10475
11162
  updated_at?: string;
10476
11163
  };
10477
- Relationships: [
10478
- {
10479
- foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
10480
- columns: ["monteur_id"];
10481
- isOneToOne: true;
10482
- referencedRelation: "monteurs";
10483
- referencedColumns: ["id"];
10484
- }
10485
- ];
11164
+ Relationships: [];
10486
11165
  };
10487
11166
  nmbrs_export_lines: {
10488
11167
  Row: {
@@ -10531,13 +11210,6 @@ export type Database = {
10531
11210
  wage_code?: string;
10532
11211
  };
10533
11212
  Relationships: [
10534
- {
10535
- foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
10536
- columns: ["monteur_id"];
10537
- isOneToOne: false;
10538
- referencedRelation: "monteurs";
10539
- referencedColumns: ["id"];
10540
- },
10541
11213
  {
10542
11214
  foreignKeyName: "nmbrs_export_lines_run_id_fkey";
10543
11215
  columns: ["run_id"];
@@ -11390,6 +12062,7 @@ export type Database = {
11390
12062
  };
11391
12063
  order_invoice_links: {
11392
12064
  Row: {
12065
+ administration_code: string | null;
11393
12066
  attempts: number;
11394
12067
  created_at: string;
11395
12068
  error_message: string | null;
@@ -11402,6 +12075,7 @@ export type Database = {
11402
12075
  updated_at: string;
11403
12076
  };
11404
12077
  Insert: {
12078
+ administration_code?: string | null;
11405
12079
  attempts?: number;
11406
12080
  created_at?: string;
11407
12081
  error_message?: string | null;
@@ -11414,6 +12088,7 @@ export type Database = {
11414
12088
  updated_at?: string;
11415
12089
  };
11416
12090
  Update: {
12091
+ administration_code?: string | null;
11417
12092
  attempts?: number;
11418
12093
  created_at?: string;
11419
12094
  error_message?: string | null;
@@ -11610,6 +12285,8 @@ export type Database = {
11610
12285
  orders: {
11611
12286
  Row: {
11612
12287
  buffer_id: string | null;
12288
+ cancel_reason: string | null;
12289
+ cancelled_at: string | null;
11613
12290
  created_at: string;
11614
12291
  custom_fields: Json;
11615
12292
  customer_id: string | null;
@@ -11632,6 +12309,8 @@ export type Database = {
11632
12309
  };
11633
12310
  Insert: {
11634
12311
  buffer_id?: string | null;
12312
+ cancel_reason?: string | null;
12313
+ cancelled_at?: string | null;
11635
12314
  created_at?: string;
11636
12315
  custom_fields?: Json;
11637
12316
  customer_id?: string | null;
@@ -11654,6 +12333,8 @@ export type Database = {
11654
12333
  };
11655
12334
  Update: {
11656
12335
  buffer_id?: string | null;
12336
+ cancel_reason?: string | null;
12337
+ cancelled_at?: string | null;
11657
12338
  created_at?: string;
11658
12339
  custom_fields?: Json;
11659
12340
  customer_id?: string | null;
@@ -12617,6 +13298,27 @@ export type Database = {
12617
13298
  }
12618
13299
  ];
12619
13300
  };
13301
+ pick_sync_state: {
13302
+ Row: {
13303
+ id: boolean;
13304
+ last_cleanup_at: string | null;
13305
+ last_sync_at: string | null;
13306
+ updated_at: string;
13307
+ };
13308
+ Insert: {
13309
+ id?: boolean;
13310
+ last_cleanup_at?: string | null;
13311
+ last_sync_at?: string | null;
13312
+ updated_at?: string;
13313
+ };
13314
+ Update: {
13315
+ id?: boolean;
13316
+ last_cleanup_at?: string | null;
13317
+ last_sync_at?: string | null;
13318
+ updated_at?: string;
13319
+ };
13320
+ Relationships: [];
13321
+ };
12620
13322
  pick_task_document_types: {
12621
13323
  Row: {
12622
13324
  created_at: string;
@@ -12908,6 +13610,7 @@ export type Database = {
12908
13610
  gebruiker_id: string | null;
12909
13611
  gebruiker_naam: string;
12910
13612
  gestart_op: string | null;
13613
+ herkomst: string | null;
12911
13614
  id: string;
12912
13615
  idempotentie_sleutel: string | null;
12913
13616
  is_herprint: boolean;
@@ -12937,6 +13640,7 @@ export type Database = {
12937
13640
  gebruiker_id?: string | null;
12938
13641
  gebruiker_naam?: string;
12939
13642
  gestart_op?: string | null;
13643
+ herkomst?: string | null;
12940
13644
  id?: string;
12941
13645
  idempotentie_sleutel?: string | null;
12942
13646
  is_herprint?: boolean;
@@ -12966,6 +13670,7 @@ export type Database = {
12966
13670
  gebruiker_id?: string | null;
12967
13671
  gebruiker_naam?: string;
12968
13672
  gestart_op?: string | null;
13673
+ herkomst?: string | null;
12969
13674
  id?: string;
12970
13675
  idempotentie_sleutel?: string | null;
12971
13676
  is_herprint?: boolean;
@@ -13015,6 +13720,9 @@ export type Database = {
13015
13720
  created_at: string;
13016
13721
  id: string;
13017
13722
  laatst_gezien: string;
13723
+ laatste_fout: string | null;
13724
+ laatste_request_id: number | null;
13725
+ mislukte_posts: number;
13018
13726
  tick_sleutel: string;
13019
13727
  updated_at: string;
13020
13728
  };
@@ -13024,6 +13732,9 @@ export type Database = {
13024
13732
  created_at?: string;
13025
13733
  id?: string;
13026
13734
  laatst_gezien?: string;
13735
+ laatste_fout?: string | null;
13736
+ laatste_request_id?: number | null;
13737
+ mislukte_posts?: number;
13027
13738
  tick_sleutel?: string;
13028
13739
  updated_at?: string;
13029
13740
  };
@@ -13033,6 +13744,9 @@ export type Database = {
13033
13744
  created_at?: string;
13034
13745
  id?: string;
13035
13746
  laatst_gezien?: string;
13747
+ laatste_fout?: string | null;
13748
+ laatste_request_id?: number | null;
13749
+ mislukte_posts?: number;
13036
13750
  tick_sleutel?: string;
13037
13751
  updated_at?: string;
13038
13752
  };
@@ -13779,68 +14493,168 @@ export type Database = {
13779
14493
  };
13780
14494
  Relationships: [];
13781
14495
  };
13782
- profiles: {
14496
+ profile_modules: {
13783
14497
  Row: {
13784
- address: string | null;
13785
- avatar_url: string | null;
13786
14498
  created_at: string;
13787
- display_name: string | null;
13788
- email: string | null;
13789
14499
  id: string;
13790
- is_superadmin: boolean;
13791
- notification_preferences: Json;
13792
- tenant_id: string | null;
13793
- updated_at: string;
14500
+ module_id: string;
14501
+ profile_id: string;
13794
14502
  };
13795
14503
  Insert: {
13796
- address?: string | null;
13797
- avatar_url?: string | null;
13798
14504
  created_at?: string;
13799
- display_name?: string | null;
13800
- email?: string | null;
13801
- id: string;
13802
- is_superadmin?: boolean;
13803
- notification_preferences?: Json;
13804
- tenant_id?: string | null;
13805
- updated_at?: string;
14505
+ id?: string;
14506
+ module_id: string;
14507
+ profile_id: string;
13806
14508
  };
13807
14509
  Update: {
13808
- address?: string | null;
13809
- avatar_url?: string | null;
13810
14510
  created_at?: string;
13811
- display_name?: string | null;
13812
- email?: string | null;
13813
14511
  id?: string;
13814
- is_superadmin?: boolean;
13815
- notification_preferences?: Json;
13816
- tenant_id?: string | null;
13817
- updated_at?: string;
14512
+ module_id?: string;
14513
+ profile_id?: string;
13818
14514
  };
13819
14515
  Relationships: [
13820
14516
  {
13821
- foreignKeyName: "profiles_tenant_id_fkey";
13822
- columns: ["tenant_id"];
14517
+ foreignKeyName: "profile_modules_profile_id_fkey";
14518
+ columns: ["profile_id"];
13823
14519
  isOneToOne: false;
13824
- referencedRelation: "tenants";
14520
+ referencedRelation: "profiles_org";
13825
14521
  referencedColumns: ["id"];
13826
14522
  }
13827
14523
  ];
13828
14524
  };
13829
- projects: {
14525
+ profile_roles: {
13830
14526
  Row: {
13831
- contact_name: string | null;
13832
14527
  created_at: string;
13833
- email: string | null;
13834
14528
  id: string;
13835
- name: string;
13836
- notes: string | null;
13837
- order_value: number;
13838
- package_id: string | null;
13839
- package_name: string | null;
13840
- phone: string | null;
13841
- prospect_id: string | null;
13842
- status: string;
13843
- updated_at: string;
14529
+ profile_id: string;
14530
+ role_id: string;
14531
+ };
14532
+ Insert: {
14533
+ created_at?: string;
14534
+ id?: string;
14535
+ profile_id: string;
14536
+ role_id: string;
14537
+ };
14538
+ Update: {
14539
+ created_at?: string;
14540
+ id?: string;
14541
+ profile_id?: string;
14542
+ role_id?: string;
14543
+ };
14544
+ Relationships: [
14545
+ {
14546
+ foreignKeyName: "profile_roles_profile_id_fkey";
14547
+ columns: ["profile_id"];
14548
+ isOneToOne: false;
14549
+ referencedRelation: "profiles_org";
14550
+ referencedColumns: ["id"];
14551
+ },
14552
+ {
14553
+ foreignKeyName: "profile_roles_role_id_fkey";
14554
+ columns: ["role_id"];
14555
+ isOneToOne: false;
14556
+ referencedRelation: "roles";
14557
+ referencedColumns: ["id"];
14558
+ }
14559
+ ];
14560
+ };
14561
+ profiles: {
14562
+ Row: {
14563
+ address: string | null;
14564
+ avatar_url: string | null;
14565
+ created_at: string;
14566
+ display_name: string | null;
14567
+ email: string | null;
14568
+ id: string;
14569
+ is_superadmin: boolean;
14570
+ notification_preferences: Json;
14571
+ tenant_id: string | null;
14572
+ updated_at: string;
14573
+ };
14574
+ Insert: {
14575
+ address?: string | null;
14576
+ avatar_url?: string | null;
14577
+ created_at?: string;
14578
+ display_name?: string | null;
14579
+ email?: string | null;
14580
+ id: string;
14581
+ is_superadmin?: boolean;
14582
+ notification_preferences?: Json;
14583
+ tenant_id?: string | null;
14584
+ updated_at?: string;
14585
+ };
14586
+ Update: {
14587
+ address?: string | null;
14588
+ avatar_url?: string | null;
14589
+ created_at?: string;
14590
+ display_name?: string | null;
14591
+ email?: string | null;
14592
+ id?: string;
14593
+ is_superadmin?: boolean;
14594
+ notification_preferences?: Json;
14595
+ tenant_id?: string | null;
14596
+ updated_at?: string;
14597
+ };
14598
+ Relationships: [
14599
+ {
14600
+ foreignKeyName: "profiles_tenant_id_fkey";
14601
+ columns: ["tenant_id"];
14602
+ isOneToOne: false;
14603
+ referencedRelation: "tenants";
14604
+ referencedColumns: ["id"];
14605
+ }
14606
+ ];
14607
+ };
14608
+ profiles_org: {
14609
+ Row: {
14610
+ created_at: string;
14611
+ id: string;
14612
+ is_default: boolean;
14613
+ name: string;
14614
+ tenant_id: string | null;
14615
+ updated_at: string;
14616
+ };
14617
+ Insert: {
14618
+ created_at?: string;
14619
+ id?: string;
14620
+ is_default?: boolean;
14621
+ name: string;
14622
+ tenant_id?: string | null;
14623
+ updated_at?: string;
14624
+ };
14625
+ Update: {
14626
+ created_at?: string;
14627
+ id?: string;
14628
+ is_default?: boolean;
14629
+ name?: string;
14630
+ tenant_id?: string | null;
14631
+ updated_at?: string;
14632
+ };
14633
+ Relationships: [
14634
+ {
14635
+ foreignKeyName: "profiles_org_tenant_id_fkey";
14636
+ columns: ["tenant_id"];
14637
+ isOneToOne: false;
14638
+ referencedRelation: "tenants";
14639
+ referencedColumns: ["id"];
14640
+ }
14641
+ ];
14642
+ };
14643
+ projects: {
14644
+ Row: {
14645
+ contact_name: string | null;
14646
+ created_at: string;
14647
+ email: string | null;
14648
+ id: string;
14649
+ name: string;
14650
+ notes: string | null;
14651
+ order_value: number;
14652
+ package_id: string | null;
14653
+ package_name: string | null;
14654
+ phone: string | null;
14655
+ prospect_id: string | null;
14656
+ status: string;
14657
+ updated_at: string;
13844
14658
  };
13845
14659
  Insert: {
13846
14660
  contact_name?: string | null;
@@ -14597,6 +15411,100 @@ export type Database = {
14597
15411
  }
14598
15412
  ];
14599
15413
  };
15414
+ role_assignments: {
15415
+ Row: {
15416
+ created_at: string;
15417
+ id: string;
15418
+ role_id: string;
15419
+ user_id: string;
15420
+ };
15421
+ Insert: {
15422
+ created_at?: string;
15423
+ id?: string;
15424
+ role_id: string;
15425
+ user_id: string;
15426
+ };
15427
+ Update: {
15428
+ created_at?: string;
15429
+ id?: string;
15430
+ role_id?: string;
15431
+ user_id?: string;
15432
+ };
15433
+ Relationships: [
15434
+ {
15435
+ foreignKeyName: "role_assignments_role_id_fkey";
15436
+ columns: ["role_id"];
15437
+ isOneToOne: false;
15438
+ referencedRelation: "roles";
15439
+ referencedColumns: ["id"];
15440
+ }
15441
+ ];
15442
+ };
15443
+ role_permissions: {
15444
+ Row: {
15445
+ can_edit: boolean;
15446
+ can_view: boolean;
15447
+ feature_id: string;
15448
+ id: string;
15449
+ module_id: string;
15450
+ role_id: string;
15451
+ updated_at: string;
15452
+ };
15453
+ Insert: {
15454
+ can_edit?: boolean;
15455
+ can_view?: boolean;
15456
+ feature_id?: string;
15457
+ id?: string;
15458
+ module_id: string;
15459
+ role_id: string;
15460
+ updated_at?: string;
15461
+ };
15462
+ Update: {
15463
+ can_edit?: boolean;
15464
+ can_view?: boolean;
15465
+ feature_id?: string;
15466
+ id?: string;
15467
+ module_id?: string;
15468
+ role_id?: string;
15469
+ updated_at?: string;
15470
+ };
15471
+ Relationships: [
15472
+ {
15473
+ foreignKeyName: "role_permissions_role_id_fkey";
15474
+ columns: ["role_id"];
15475
+ isOneToOne: false;
15476
+ referencedRelation: "roles";
15477
+ referencedColumns: ["id"];
15478
+ }
15479
+ ];
15480
+ };
15481
+ roles: {
15482
+ Row: {
15483
+ created_at: string;
15484
+ id: string;
15485
+ is_protected: boolean;
15486
+ key: string;
15487
+ name: string;
15488
+ updated_at: string;
15489
+ };
15490
+ Insert: {
15491
+ created_at?: string;
15492
+ id?: string;
15493
+ is_protected?: boolean;
15494
+ key: string;
15495
+ name: string;
15496
+ updated_at?: string;
15497
+ };
15498
+ Update: {
15499
+ created_at?: string;
15500
+ id?: string;
15501
+ is_protected?: boolean;
15502
+ key?: string;
15503
+ name?: string;
15504
+ updated_at?: string;
15505
+ };
15506
+ Relationships: [];
15507
+ };
14600
15508
  rooms: {
14601
15509
  Row: {
14602
15510
  capacity: number;
@@ -14949,6 +15857,7 @@ export type Database = {
14949
15857
  type: string;
14950
15858
  updated_at: string;
14951
15859
  vereist_medewerker: boolean;
15860
+ werkplek: string | null;
14952
15861
  };
14953
15862
  Insert: {
14954
15863
  actief?: boolean;
@@ -14962,6 +15871,7 @@ export type Database = {
14962
15871
  type?: string;
14963
15872
  updated_at?: string;
14964
15873
  vereist_medewerker?: boolean;
15874
+ werkplek?: string | null;
14965
15875
  };
14966
15876
  Update: {
14967
15877
  actief?: boolean;
@@ -14975,9 +15885,48 @@ export type Database = {
14975
15885
  type?: string;
14976
15886
  updated_at?: string;
14977
15887
  vereist_medewerker?: boolean;
15888
+ werkplek?: string | null;
14978
15889
  };
14979
15890
  Relationships: [];
14980
15891
  };
15892
+ sick_periods: {
15893
+ Row: {
15894
+ created_at: string;
15895
+ employee_id: string;
15896
+ end_date: string | null;
15897
+ id: string;
15898
+ notes: string | null;
15899
+ start_date: string;
15900
+ updated_at: string;
15901
+ };
15902
+ Insert: {
15903
+ created_at?: string;
15904
+ employee_id: string;
15905
+ end_date?: string | null;
15906
+ id?: string;
15907
+ notes?: string | null;
15908
+ start_date: string;
15909
+ updated_at?: string;
15910
+ };
15911
+ Update: {
15912
+ created_at?: string;
15913
+ employee_id?: string;
15914
+ end_date?: string | null;
15915
+ id?: string;
15916
+ notes?: string | null;
15917
+ start_date?: string;
15918
+ updated_at?: string;
15919
+ };
15920
+ Relationships: [
15921
+ {
15922
+ foreignKeyName: "sick_periods_employee_id_fkey";
15923
+ columns: ["employee_id"];
15924
+ isOneToOne: false;
15925
+ referencedRelation: "profiles";
15926
+ referencedColumns: ["id"];
15927
+ }
15928
+ ];
15929
+ };
14981
15930
  sidebar_config: {
14982
15931
  Row: {
14983
15932
  id: string;
@@ -15277,6 +16226,56 @@ export type Database = {
15277
16226
  };
15278
16227
  Relationships: [];
15279
16228
  };
16229
+ time_compensation_entries: {
16230
+ Row: {
16231
+ created_at: string;
16232
+ employee_id: string;
16233
+ entry_date: string;
16234
+ id: string;
16235
+ km: number;
16236
+ meal_allowance: number;
16237
+ notes: string | null;
16238
+ standby_evening: number;
16239
+ standby_weekend: number;
16240
+ tvt_change: number;
16241
+ updated_at: string;
16242
+ };
16243
+ Insert: {
16244
+ created_at?: string;
16245
+ employee_id: string;
16246
+ entry_date: string;
16247
+ id?: string;
16248
+ km?: number;
16249
+ meal_allowance?: number;
16250
+ notes?: string | null;
16251
+ standby_evening?: number;
16252
+ standby_weekend?: number;
16253
+ tvt_change?: number;
16254
+ updated_at?: string;
16255
+ };
16256
+ Update: {
16257
+ created_at?: string;
16258
+ employee_id?: string;
16259
+ entry_date?: string;
16260
+ id?: string;
16261
+ km?: number;
16262
+ meal_allowance?: number;
16263
+ notes?: string | null;
16264
+ standby_evening?: number;
16265
+ standby_weekend?: number;
16266
+ tvt_change?: number;
16267
+ updated_at?: string;
16268
+ };
16269
+ Relationships: [
16270
+ {
16271
+ foreignKeyName: "time_compensation_entries_employee_id_fkey";
16272
+ columns: ["employee_id"];
16273
+ isOneToOne: false;
16274
+ referencedRelation: "profiles";
16275
+ referencedColumns: ["id"];
16276
+ }
16277
+ ];
16278
+ };
15280
16279
  time_entries: {
15281
16280
  Row: {
15282
16281
  created_at: string;
@@ -15311,68 +16310,174 @@ export type Database = {
15311
16310
  undertime?: number;
15312
16311
  updated_at?: string;
15313
16312
  };
16313
+ Relationships: [];
16314
+ };
16315
+ time_log_week_approvals: {
16316
+ Row: {
16317
+ approved_at: string | null;
16318
+ approved_by: string | null;
16319
+ created_at: string;
16320
+ employee_id: string;
16321
+ id: string;
16322
+ locked: boolean;
16323
+ notes: string | null;
16324
+ status: string;
16325
+ submitted_at: string | null;
16326
+ updated_at: string;
16327
+ week_start: string;
16328
+ };
16329
+ Insert: {
16330
+ approved_at?: string | null;
16331
+ approved_by?: string | null;
16332
+ created_at?: string;
16333
+ employee_id: string;
16334
+ id?: string;
16335
+ locked?: boolean;
16336
+ notes?: string | null;
16337
+ status?: string;
16338
+ submitted_at?: string | null;
16339
+ updated_at?: string;
16340
+ week_start: string;
16341
+ };
16342
+ Update: {
16343
+ approved_at?: string | null;
16344
+ approved_by?: string | null;
16345
+ created_at?: string;
16346
+ employee_id?: string;
16347
+ id?: string;
16348
+ locked?: boolean;
16349
+ notes?: string | null;
16350
+ status?: string;
16351
+ submitted_at?: string | null;
16352
+ updated_at?: string;
16353
+ week_start?: string;
16354
+ };
15314
16355
  Relationships: [
15315
16356
  {
15316
- foreignKeyName: "time_entries_employee_id_fkey";
16357
+ foreignKeyName: "time_log_week_approvals_employee_id_fkey";
15317
16358
  columns: ["employee_id"];
15318
16359
  isOneToOne: false;
15319
- referencedRelation: "monteurs";
16360
+ referencedRelation: "profiles";
15320
16361
  referencedColumns: ["id"];
15321
16362
  }
15322
16363
  ];
15323
16364
  };
15324
16365
  time_logs: {
15325
16366
  Row: {
16367
+ auto_stop_reason: string | null;
16368
+ auto_stopped: boolean;
15326
16369
  created_at: string;
16370
+ current_latitude: number | null;
16371
+ current_longitude: number | null;
16372
+ current_position_updated_at: string | null;
15327
16373
  employee_id: string;
16374
+ end_latitude: number | null;
16375
+ end_longitude: number | null;
15328
16376
  end_time: string | null;
16377
+ eta_distance_km: number | null;
16378
+ eta_minutes: number | null;
16379
+ eta_updated_at: string | null;
16380
+ hour_category: string | null;
15329
16381
  id: string;
16382
+ last_reminder_at: string | null;
15330
16383
  notes: string | null;
15331
16384
  overtime_hours: number;
15332
16385
  overtime_type: string | null;
15333
16386
  regular_hours: number;
16387
+ reminder_count: number;
16388
+ requires_review: boolean;
16389
+ start_latitude: number | null;
16390
+ start_longitude: number | null;
15334
16391
  start_time: string;
15335
16392
  travel_cost: number | null;
15336
16393
  travel_distance_km: number | null;
16394
+ travel_duration_min: number | null;
16395
+ travel_time_minutes: number | null;
15337
16396
  type: string;
15338
16397
  updated_at: string;
16398
+ work_order_id: string | null;
15339
16399
  };
15340
16400
  Insert: {
16401
+ auto_stop_reason?: string | null;
16402
+ auto_stopped?: boolean;
15341
16403
  created_at?: string;
16404
+ current_latitude?: number | null;
16405
+ current_longitude?: number | null;
16406
+ current_position_updated_at?: string | null;
15342
16407
  employee_id: string;
16408
+ end_latitude?: number | null;
16409
+ end_longitude?: number | null;
15343
16410
  end_time?: string | null;
16411
+ eta_distance_km?: number | null;
16412
+ eta_minutes?: number | null;
16413
+ eta_updated_at?: string | null;
16414
+ hour_category?: string | null;
15344
16415
  id?: string;
16416
+ last_reminder_at?: string | null;
15345
16417
  notes?: string | null;
15346
16418
  overtime_hours?: number;
15347
16419
  overtime_type?: string | null;
15348
16420
  regular_hours?: number;
16421
+ reminder_count?: number;
16422
+ requires_review?: boolean;
16423
+ start_latitude?: number | null;
16424
+ start_longitude?: number | null;
15349
16425
  start_time?: string;
15350
16426
  travel_cost?: number | null;
15351
16427
  travel_distance_km?: number | null;
16428
+ travel_duration_min?: number | null;
16429
+ travel_time_minutes?: number | null;
15352
16430
  type: string;
15353
16431
  updated_at?: string;
16432
+ work_order_id?: string | null;
15354
16433
  };
15355
16434
  Update: {
16435
+ auto_stop_reason?: string | null;
16436
+ auto_stopped?: boolean;
15356
16437
  created_at?: string;
16438
+ current_latitude?: number | null;
16439
+ current_longitude?: number | null;
16440
+ current_position_updated_at?: string | null;
15357
16441
  employee_id?: string;
16442
+ end_latitude?: number | null;
16443
+ end_longitude?: number | null;
15358
16444
  end_time?: string | null;
16445
+ eta_distance_km?: number | null;
16446
+ eta_minutes?: number | null;
16447
+ eta_updated_at?: string | null;
16448
+ hour_category?: string | null;
15359
16449
  id?: string;
16450
+ last_reminder_at?: string | null;
15360
16451
  notes?: string | null;
15361
16452
  overtime_hours?: number;
15362
16453
  overtime_type?: string | null;
15363
16454
  regular_hours?: number;
16455
+ reminder_count?: number;
16456
+ requires_review?: boolean;
16457
+ start_latitude?: number | null;
16458
+ start_longitude?: number | null;
15364
16459
  start_time?: string;
15365
16460
  travel_cost?: number | null;
15366
16461
  travel_distance_km?: number | null;
16462
+ travel_duration_min?: number | null;
16463
+ travel_time_minutes?: number | null;
15367
16464
  type?: string;
15368
16465
  updated_at?: string;
16466
+ work_order_id?: string | null;
15369
16467
  };
15370
16468
  Relationships: [
15371
16469
  {
15372
16470
  foreignKeyName: "time_logs_employee_id_fkey";
15373
16471
  columns: ["employee_id"];
15374
16472
  isOneToOne: false;
15375
- referencedRelation: "monteurs";
16473
+ referencedRelation: "profiles";
16474
+ referencedColumns: ["id"];
16475
+ },
16476
+ {
16477
+ foreignKeyName: "time_logs_work_order_id_fkey";
16478
+ columns: ["work_order_id"];
16479
+ isOneToOne: false;
16480
+ referencedRelation: "work_orders";
15376
16481
  referencedColumns: ["id"];
15377
16482
  }
15378
16483
  ];
@@ -15413,7 +16518,7 @@ export type Database = {
15413
16518
  foreignKeyName: "time_off_entries_employee_id_fkey";
15414
16519
  columns: ["employee_id"];
15415
16520
  isOneToOne: false;
15416
- referencedRelation: "monteurs";
16521
+ referencedRelation: "profiles";
15417
16522
  referencedColumns: ["id"];
15418
16523
  }
15419
16524
  ];
@@ -15665,12 +16770,16 @@ export type Database = {
15665
16770
  company_name: string | null;
15666
16771
  connected_at: string | null;
15667
16772
  created_at: string;
16773
+ disconnected_at: string | null;
15668
16774
  environment: string;
15669
16775
  id: string;
16776
+ initial_sync_completed_at: string | null;
16777
+ initial_sync_started_at: string | null;
15670
16778
  is_active: boolean;
15671
16779
  label: string | null;
15672
16780
  office_code: string | null;
15673
16781
  redirect_uri: string | null;
16782
+ superseded_at: string | null;
15674
16783
  updated_at: string;
15675
16784
  user_id: string;
15676
16785
  };
@@ -15681,12 +16790,16 @@ export type Database = {
15681
16790
  company_name?: string | null;
15682
16791
  connected_at?: string | null;
15683
16792
  created_at?: string;
16793
+ disconnected_at?: string | null;
15684
16794
  environment: string;
15685
16795
  id?: string;
16796
+ initial_sync_completed_at?: string | null;
16797
+ initial_sync_started_at?: string | null;
15686
16798
  is_active?: boolean;
15687
16799
  label?: string | null;
15688
16800
  office_code?: string | null;
15689
16801
  redirect_uri?: string | null;
16802
+ superseded_at?: string | null;
15690
16803
  updated_at?: string;
15691
16804
  user_id: string;
15692
16805
  };
@@ -15697,12 +16810,16 @@ export type Database = {
15697
16810
  company_name?: string | null;
15698
16811
  connected_at?: string | null;
15699
16812
  created_at?: string;
16813
+ disconnected_at?: string | null;
15700
16814
  environment?: string;
15701
16815
  id?: string;
16816
+ initial_sync_completed_at?: string | null;
16817
+ initial_sync_started_at?: string | null;
15702
16818
  is_active?: boolean;
15703
16819
  label?: string | null;
15704
16820
  office_code?: string | null;
15705
16821
  redirect_uri?: string | null;
16822
+ superseded_at?: string | null;
15706
16823
  updated_at?: string;
15707
16824
  user_id?: string;
15708
16825
  };
@@ -15726,9 +16843,43 @@ export type Database = {
15726
16843
  };
15727
16844
  Relationships: [];
15728
16845
  };
16846
+ twinfield_cron_locks: {
16847
+ Row: {
16848
+ created_at: string;
16849
+ heartbeat_at: string;
16850
+ job_name: string;
16851
+ last_error: string | null;
16852
+ last_finished_at: string | null;
16853
+ locked_at: string;
16854
+ run_id: string;
16855
+ updated_at: string;
16856
+ };
16857
+ Insert: {
16858
+ created_at?: string;
16859
+ heartbeat_at?: string;
16860
+ job_name: string;
16861
+ last_error?: string | null;
16862
+ last_finished_at?: string | null;
16863
+ locked_at?: string;
16864
+ run_id?: string;
16865
+ updated_at?: string;
16866
+ };
16867
+ Update: {
16868
+ created_at?: string;
16869
+ heartbeat_at?: string;
16870
+ job_name?: string;
16871
+ last_error?: string | null;
16872
+ last_finished_at?: string | null;
16873
+ locked_at?: string;
16874
+ run_id?: string;
16875
+ updated_at?: string;
16876
+ };
16877
+ Relationships: [];
16878
+ };
15729
16879
  twinfield_customers: {
15730
16880
  Row: {
15731
16881
  address: string | null;
16882
+ administration_code: string;
15732
16883
  city: string | null;
15733
16884
  country: string | null;
15734
16885
  created_at: string;
@@ -15748,6 +16899,7 @@ export type Database = {
15748
16899
  };
15749
16900
  Insert: {
15750
16901
  address?: string | null;
16902
+ administration_code?: string;
15751
16903
  city?: string | null;
15752
16904
  country?: string | null;
15753
16905
  created_at?: string;
@@ -15767,6 +16919,7 @@ export type Database = {
15767
16919
  };
15768
16920
  Update: {
15769
16921
  address?: string | null;
16922
+ administration_code?: string;
15770
16923
  city?: string | null;
15771
16924
  country?: string | null;
15772
16925
  created_at?: string;
@@ -15988,7 +17141,9 @@ export type Database = {
15988
17141
  };
15989
17142
  twinfield_invoice_settings: {
15990
17143
  Row: {
17144
+ administration_code: string | null;
15991
17145
  auto_invoice_enabled: boolean;
17146
+ auto_invoice_start_date: string | null;
15992
17147
  auto_invoice_trigger_statuses: string[];
15993
17148
  created_at: string;
15994
17149
  debtor_gl_account: string;
@@ -16002,15 +17157,19 @@ export type Database = {
16002
17157
  invoice_enabled_fo: boolean;
16003
17158
  invoice_enabled_ho: boolean;
16004
17159
  invoice_enabled_mo: boolean;
17160
+ needs_review: boolean;
16005
17161
  payment_gl_account: string;
16006
17162
  payment_journal_code: string;
17163
+ settings_confirmed_at: string | null;
16007
17164
  updated_at: string;
16008
17165
  user_id: string;
16009
17166
  vat_code_eu_reverse: string | null;
16010
17167
  vat_code_export: string | null;
16011
17168
  };
16012
17169
  Insert: {
17170
+ administration_code?: string | null;
16013
17171
  auto_invoice_enabled?: boolean;
17172
+ auto_invoice_start_date?: string | null;
16014
17173
  auto_invoice_trigger_statuses?: string[];
16015
17174
  created_at?: string;
16016
17175
  debtor_gl_account?: string;
@@ -16024,15 +17183,19 @@ export type Database = {
16024
17183
  invoice_enabled_fo?: boolean;
16025
17184
  invoice_enabled_ho?: boolean;
16026
17185
  invoice_enabled_mo?: boolean;
17186
+ needs_review?: boolean;
16027
17187
  payment_gl_account?: string;
16028
17188
  payment_journal_code?: string;
17189
+ settings_confirmed_at?: string | null;
16029
17190
  updated_at?: string;
16030
17191
  user_id: string;
16031
17192
  vat_code_eu_reverse?: string | null;
16032
17193
  vat_code_export?: string | null;
16033
17194
  };
16034
17195
  Update: {
17196
+ administration_code?: string | null;
16035
17197
  auto_invoice_enabled?: boolean;
17198
+ auto_invoice_start_date?: string | null;
16036
17199
  auto_invoice_trigger_statuses?: string[];
16037
17200
  created_at?: string;
16038
17201
  debtor_gl_account?: string;
@@ -16046,8 +17209,10 @@ export type Database = {
16046
17209
  invoice_enabled_fo?: boolean;
16047
17210
  invoice_enabled_ho?: boolean;
16048
17211
  invoice_enabled_mo?: boolean;
17212
+ needs_review?: boolean;
16049
17213
  payment_gl_account?: string;
16050
17214
  payment_journal_code?: string;
17215
+ settings_confirmed_at?: string | null;
16051
17216
  updated_at?: string;
16052
17217
  user_id?: string;
16053
17218
  vat_code_eu_reverse?: string | null;
@@ -16336,6 +17501,7 @@ export type Database = {
16336
17501
  twinfield_push_queue: {
16337
17502
  Row: {
16338
17503
  action: string;
17504
+ attempt_started_at: string | null;
16339
17505
  attempts: number;
16340
17506
  connection_id: string | null;
16341
17507
  created_at: string;
@@ -16352,6 +17518,7 @@ export type Database = {
16352
17518
  };
16353
17519
  Insert: {
16354
17520
  action?: string;
17521
+ attempt_started_at?: string | null;
16355
17522
  attempts?: number;
16356
17523
  connection_id?: string | null;
16357
17524
  created_at?: string;
@@ -16368,6 +17535,7 @@ export type Database = {
16368
17535
  };
16369
17536
  Update: {
16370
17537
  action?: string;
17538
+ attempt_started_at?: string | null;
16371
17539
  attempts?: number;
16372
17540
  connection_id?: string | null;
16373
17541
  created_at?: string;
@@ -16564,21 +17732,13 @@ export type Database = {
16564
17732
  include_travel?: boolean | null;
16565
17733
  monteur_id?: string;
16566
17734
  ov02_percentage?: number | null;
16567
- ov03_percentage?: number | null;
16568
- updated_at?: string;
16569
- weekly_threshold_hours?: number | null;
16570
- workday_end?: string | null;
16571
- workday_start?: string | null;
16572
- };
16573
- Relationships: [
16574
- {
16575
- foreignKeyName: "uren_cao_profiles_monteur_id_fkey";
16576
- columns: ["monteur_id"];
16577
- isOneToOne: true;
16578
- referencedRelation: "monteurs";
16579
- referencedColumns: ["id"];
16580
- }
16581
- ];
17735
+ ov03_percentage?: number | null;
17736
+ updated_at?: string;
17737
+ weekly_threshold_hours?: number | null;
17738
+ workday_end?: string | null;
17739
+ workday_start?: string | null;
17740
+ };
17741
+ Relationships: [];
16582
17742
  };
16583
17743
  uren_entries: {
16584
17744
  Row: {
@@ -16624,13 +17784,6 @@ export type Database = {
16624
17784
  werkbon_id?: string | null;
16625
17785
  };
16626
17786
  Relationships: [
16627
- {
16628
- foreignKeyName: "uren_entries_monteur_id_fkey";
16629
- columns: ["monteur_id"];
16630
- isOneToOne: false;
16631
- referencedRelation: "monteurs";
16632
- referencedColumns: ["id"];
16633
- },
16634
17787
  {
16635
17788
  foreignKeyName: "uren_entries_werkbon_id_fkey";
16636
17789
  columns: ["werkbon_id"];
@@ -16673,119 +17826,6 @@ export type Database = {
16673
17826
  };
16674
17827
  Relationships: [];
16675
17828
  };
16676
- uren_facturen: {
16677
- Row: {
16678
- created_at: string;
16679
- created_by: string | null;
16680
- customer_id: string | null;
16681
- customer_name: string | null;
16682
- id: string;
16683
- invoice_number: string | null;
16684
- note: string | null;
16685
- status: string;
16686
- total_excl_cents: number;
16687
- total_incl_cents: number;
16688
- updated_at: string;
16689
- vat_cents: number;
16690
- vat_percentage: number;
16691
- werkbon_id: string | null;
16692
- };
16693
- Insert: {
16694
- created_at?: string;
16695
- created_by?: string | null;
16696
- customer_id?: string | null;
16697
- customer_name?: string | null;
16698
- id?: string;
16699
- invoice_number?: string | null;
16700
- note?: string | null;
16701
- status?: string;
16702
- total_excl_cents?: number;
16703
- total_incl_cents?: number;
16704
- updated_at?: string;
16705
- vat_cents?: number;
16706
- vat_percentage?: number;
16707
- werkbon_id?: string | null;
16708
- };
16709
- Update: {
16710
- created_at?: string;
16711
- created_by?: string | null;
16712
- customer_id?: string | null;
16713
- customer_name?: string | null;
16714
- id?: string;
16715
- invoice_number?: string | null;
16716
- note?: string | null;
16717
- status?: string;
16718
- total_excl_cents?: number;
16719
- total_incl_cents?: number;
16720
- updated_at?: string;
16721
- vat_cents?: number;
16722
- vat_percentage?: number;
16723
- werkbon_id?: string | null;
16724
- };
16725
- Relationships: [
16726
- {
16727
- foreignKeyName: "uren_facturen_customer_id_fkey";
16728
- columns: ["customer_id"];
16729
- isOneToOne: false;
16730
- referencedRelation: "itk_customers";
16731
- referencedColumns: ["id"];
16732
- },
16733
- {
16734
- foreignKeyName: "uren_facturen_werkbon_id_fkey";
16735
- columns: ["werkbon_id"];
16736
- isOneToOne: true;
16737
- referencedRelation: "werkbonnen";
16738
- referencedColumns: ["id"];
16739
- }
16740
- ];
16741
- };
16742
- uren_factuur_regels: {
16743
- Row: {
16744
- created_at: string;
16745
- description: string;
16746
- factuur_id: string;
16747
- id: string;
16748
- kind: string | null;
16749
- quantity: number;
16750
- sort_order: number;
16751
- total_cents: number;
16752
- unit: string;
16753
- unit_price_cents: number;
16754
- };
16755
- Insert: {
16756
- created_at?: string;
16757
- description: string;
16758
- factuur_id: string;
16759
- id?: string;
16760
- kind?: string | null;
16761
- quantity?: number;
16762
- sort_order?: number;
16763
- total_cents?: number;
16764
- unit?: string;
16765
- unit_price_cents?: number;
16766
- };
16767
- Update: {
16768
- created_at?: string;
16769
- description?: string;
16770
- factuur_id?: string;
16771
- id?: string;
16772
- kind?: string | null;
16773
- quantity?: number;
16774
- sort_order?: number;
16775
- total_cents?: number;
16776
- unit?: string;
16777
- unit_price_cents?: number;
16778
- };
16779
- Relationships: [
16780
- {
16781
- foreignKeyName: "uren_factuur_regels_factuur_id_fkey";
16782
- columns: ["factuur_id"];
16783
- isOneToOne: false;
16784
- referencedRelation: "uren_facturen";
16785
- referencedColumns: ["id"];
16786
- }
16787
- ];
16788
- };
16789
17829
  uren_offerte_regels: {
16790
17830
  Row: {
16791
17831
  created_at: string;
@@ -17112,19 +18152,12 @@ export type Database = {
17112
18152
  submitted_at?: string | null;
17113
18153
  updated_at?: string;
17114
18154
  };
17115
- Relationships: [
17116
- {
17117
- foreignKeyName: "uren_weekstaten_monteur_id_fkey";
17118
- columns: ["monteur_id"];
17119
- isOneToOne: false;
17120
- referencedRelation: "monteurs";
17121
- referencedColumns: ["id"];
17122
- }
17123
- ];
18155
+ Relationships: [];
17124
18156
  };
17125
18157
  user_module_permissions: {
17126
18158
  Row: {
17127
18159
  created_at: string;
18160
+ feature_id: string;
17128
18161
  id: string;
17129
18162
  module_id: string;
17130
18163
  permission: string;
@@ -17133,6 +18166,7 @@ export type Database = {
17133
18166
  };
17134
18167
  Insert: {
17135
18168
  created_at?: string;
18169
+ feature_id?: string;
17136
18170
  id?: string;
17137
18171
  module_id: string;
17138
18172
  permission: string;
@@ -17141,6 +18175,7 @@ export type Database = {
17141
18175
  };
17142
18176
  Update: {
17143
18177
  created_at?: string;
18178
+ feature_id?: string;
17144
18179
  id?: string;
17145
18180
  module_id?: string;
17146
18181
  permission?: string;
@@ -17178,6 +18213,53 @@ export type Database = {
17178
18213
  }
17179
18214
  ];
17180
18215
  };
18216
+ van_inventories: {
18217
+ Row: {
18218
+ barcode: string | null;
18219
+ created_at: string;
18220
+ id: string;
18221
+ monteur_id: string | null;
18222
+ price_per_unit: number;
18223
+ product_name: string;
18224
+ quantity_current: number;
18225
+ quantity_min: number;
18226
+ unit: string;
18227
+ updated_at: string;
18228
+ };
18229
+ Insert: {
18230
+ barcode?: string | null;
18231
+ created_at?: string;
18232
+ id?: string;
18233
+ monteur_id?: string | null;
18234
+ price_per_unit?: number;
18235
+ product_name: string;
18236
+ quantity_current?: number;
18237
+ quantity_min?: number;
18238
+ unit?: string;
18239
+ updated_at?: string;
18240
+ };
18241
+ Update: {
18242
+ barcode?: string | null;
18243
+ created_at?: string;
18244
+ id?: string;
18245
+ monteur_id?: string | null;
18246
+ price_per_unit?: number;
18247
+ product_name?: string;
18248
+ quantity_current?: number;
18249
+ quantity_min?: number;
18250
+ unit?: string;
18251
+ updated_at?: string;
18252
+ };
18253
+ Relationships: [
18254
+ {
18255
+ foreignKeyName: "van_inventories_monteur_id_fkey";
18256
+ columns: ["monteur_id"];
18257
+ isOneToOne: false;
18258
+ referencedRelation: "profiles";
18259
+ referencedColumns: ["id"];
18260
+ }
18261
+ ];
18262
+ };
17181
18263
  voorraad_custom_fields: {
17182
18264
  Row: {
17183
18265
  created_at: string;
@@ -18151,7 +19233,7 @@ export type Database = {
18151
19233
  foreignKeyName: "work_order_monteurs_monteur_id_fkey";
18152
19234
  columns: ["monteur_id"];
18153
19235
  isOneToOne: false;
18154
- referencedRelation: "monteurs";
19236
+ referencedRelation: "profiles";
18155
19237
  referencedColumns: ["id"];
18156
19238
  },
18157
19239
  {
@@ -18163,6 +19245,63 @@ export type Database = {
18163
19245
  }
18164
19246
  ];
18165
19247
  };
19248
+ work_order_photos: {
19249
+ Row: {
19250
+ ai_caption: string | null;
19251
+ ai_categorized_at: string | null;
19252
+ ai_labels: Json | null;
19253
+ caption: string | null;
19254
+ created_at: string;
19255
+ id: string;
19256
+ monteur_id: string | null;
19257
+ photo_type: string;
19258
+ storage_path: string;
19259
+ updated_at: string;
19260
+ work_order_id: string;
19261
+ };
19262
+ Insert: {
19263
+ ai_caption?: string | null;
19264
+ ai_categorized_at?: string | null;
19265
+ ai_labels?: Json | null;
19266
+ caption?: string | null;
19267
+ created_at?: string;
19268
+ id?: string;
19269
+ monteur_id?: string | null;
19270
+ photo_type?: string;
19271
+ storage_path: string;
19272
+ updated_at?: string;
19273
+ work_order_id: string;
19274
+ };
19275
+ Update: {
19276
+ ai_caption?: string | null;
19277
+ ai_categorized_at?: string | null;
19278
+ ai_labels?: Json | null;
19279
+ caption?: string | null;
19280
+ created_at?: string;
19281
+ id?: string;
19282
+ monteur_id?: string | null;
19283
+ photo_type?: string;
19284
+ storage_path?: string;
19285
+ updated_at?: string;
19286
+ work_order_id?: string;
19287
+ };
19288
+ Relationships: [
19289
+ {
19290
+ foreignKeyName: "work_order_photos_monteur_id_fkey";
19291
+ columns: ["monteur_id"];
19292
+ isOneToOne: false;
19293
+ referencedRelation: "profiles";
19294
+ referencedColumns: ["id"];
19295
+ },
19296
+ {
19297
+ foreignKeyName: "work_order_photos_work_order_id_fkey";
19298
+ columns: ["work_order_id"];
19299
+ isOneToOne: false;
19300
+ referencedRelation: "work_orders";
19301
+ referencedColumns: ["id"];
19302
+ }
19303
+ ];
19304
+ };
18166
19305
  work_orders: {
18167
19306
  Row: {
18168
19307
  assigned_to: string | null;
@@ -18194,7 +19333,6 @@ export type Database = {
18194
19333
  scheduled_end_time: string | null;
18195
19334
  scheduled_start_time: string | null;
18196
19335
  status: string;
18197
- tenant_id: string;
18198
19336
  total_hours_worked: number | null;
18199
19337
  total_price: number | null;
18200
19338
  travel_time_minutes: number | null;
@@ -18232,7 +19370,6 @@ export type Database = {
18232
19370
  scheduled_end_time?: string | null;
18233
19371
  scheduled_start_time?: string | null;
18234
19372
  status?: string;
18235
- tenant_id: string;
18236
19373
  total_hours_worked?: number | null;
18237
19374
  total_price?: number | null;
18238
19375
  travel_time_minutes?: number | null;
@@ -18270,7 +19407,6 @@ export type Database = {
18270
19407
  scheduled_end_time?: string | null;
18271
19408
  scheduled_start_time?: string | null;
18272
19409
  status?: string;
18273
- tenant_id?: string;
18274
19410
  total_hours_worked?: number | null;
18275
19411
  total_price?: number | null;
18276
19412
  travel_time_minutes?: number | null;
@@ -18285,13 +19421,6 @@ export type Database = {
18285
19421
  isOneToOne: false;
18286
19422
  referencedRelation: "work_orders";
18287
19423
  referencedColumns: ["id"];
18288
- },
18289
- {
18290
- foreignKeyName: "work_orders_tenant_id_fkey";
18291
- columns: ["tenant_id"];
18292
- isOneToOne: false;
18293
- referencedRelation: "tenants";
18294
- referencedColumns: ["id"];
18295
19424
  }
18296
19425
  ];
18297
19426
  };
@@ -18564,20 +19693,133 @@ export type Database = {
18564
19693
  };
18565
19694
  Relationships: [
18566
19695
  {
18567
- foreignKeyName: "product_group_items_product_group_id_fkey";
18568
- columns: ["product_group_id"];
19696
+ foreignKeyName: "product_group_items_product_group_id_fkey";
19697
+ columns: ["product_group_id"];
19698
+ isOneToOne: false;
19699
+ referencedRelation: "product_groups";
19700
+ referencedColumns: ["id"];
19701
+ }
19702
+ ];
19703
+ };
19704
+ trade_item_stock_view: {
19705
+ Row: {
19706
+ stock: number | null;
19707
+ trade_item_id: string | null;
19708
+ };
19709
+ Relationships: [];
19710
+ };
19711
+ uren_facturen: {
19712
+ Row: {
19713
+ created_at: string | null;
19714
+ created_by: string | null;
19715
+ customer_id: string | null;
19716
+ customer_name: string | null;
19717
+ id: string | null;
19718
+ invoice_number: string | null;
19719
+ note: string | null;
19720
+ status: string | null;
19721
+ total_excl_cents: number | null;
19722
+ total_incl_cents: number | null;
19723
+ updated_at: string | null;
19724
+ vat_cents: number | null;
19725
+ vat_percentage: number | null;
19726
+ werkbon_id: string | null;
19727
+ };
19728
+ Insert: {
19729
+ created_at?: string | null;
19730
+ created_by?: string | null;
19731
+ customer_id?: string | null;
19732
+ customer_name?: string | null;
19733
+ id?: string | null;
19734
+ invoice_number?: string | null;
19735
+ note?: string | null;
19736
+ status?: string | null;
19737
+ total_excl_cents?: number | null;
19738
+ total_incl_cents?: number | null;
19739
+ updated_at?: string | null;
19740
+ vat_cents?: number | null;
19741
+ vat_percentage?: number | null;
19742
+ werkbon_id?: never;
19743
+ };
19744
+ Update: {
19745
+ created_at?: string | null;
19746
+ created_by?: string | null;
19747
+ customer_id?: string | null;
19748
+ customer_name?: string | null;
19749
+ id?: string | null;
19750
+ invoice_number?: string | null;
19751
+ note?: string | null;
19752
+ status?: string | null;
19753
+ total_excl_cents?: number | null;
19754
+ total_incl_cents?: number | null;
19755
+ updated_at?: string | null;
19756
+ vat_cents?: number | null;
19757
+ vat_percentage?: number | null;
19758
+ werkbon_id?: never;
19759
+ };
19760
+ Relationships: [
19761
+ {
19762
+ foreignKeyName: "invoices_customer_id_fkey";
19763
+ columns: ["customer_id"];
18569
19764
  isOneToOne: false;
18570
- referencedRelation: "product_groups";
19765
+ referencedRelation: "itk_customers";
18571
19766
  referencedColumns: ["id"];
18572
19767
  }
18573
19768
  ];
18574
19769
  };
18575
- trade_item_stock_view: {
19770
+ uren_factuur_regels: {
18576
19771
  Row: {
18577
- stock: number | null;
18578
- trade_item_id: string | null;
19772
+ created_at: string | null;
19773
+ description: string | null;
19774
+ factuur_id: string | null;
19775
+ id: string | null;
19776
+ kind: string | null;
19777
+ quantity: number | null;
19778
+ sort_order: number | null;
19779
+ total_cents: number | null;
19780
+ unit: string | null;
19781
+ unit_price_cents: number | null;
18579
19782
  };
18580
- Relationships: [];
19783
+ Insert: {
19784
+ created_at?: string | null;
19785
+ description?: string | null;
19786
+ factuur_id?: string | null;
19787
+ id?: string | null;
19788
+ kind?: string | null;
19789
+ quantity?: number | null;
19790
+ sort_order?: number | null;
19791
+ total_cents?: number | null;
19792
+ unit?: string | null;
19793
+ unit_price_cents?: number | null;
19794
+ };
19795
+ Update: {
19796
+ created_at?: string | null;
19797
+ description?: string | null;
19798
+ factuur_id?: string | null;
19799
+ id?: string | null;
19800
+ kind?: string | null;
19801
+ quantity?: number | null;
19802
+ sort_order?: number | null;
19803
+ total_cents?: number | null;
19804
+ unit?: string | null;
19805
+ unit_price_cents?: number | null;
19806
+ };
19807
+ Relationships: [
19808
+ {
19809
+ foreignKeyName: "invoice_items_invoice_id_fkey";
19810
+ columns: ["factuur_id"];
19811
+ isOneToOne: false;
19812
+ referencedRelation: "invoices";
19813
+ referencedColumns: ["id"];
19814
+ },
19815
+ {
19816
+ foreignKeyName: "invoice_items_invoice_id_fkey";
19817
+ columns: ["factuur_id"];
19818
+ isOneToOne: false;
19819
+ referencedRelation: "uren_facturen";
19820
+ referencedColumns: ["id"];
19821
+ }
19822
+ ];
18581
19823
  };
18582
19824
  v_external_customers_exact: {
18583
19825
  Row: {
@@ -18989,6 +20231,19 @@ export type Database = {
18989
20231
  };
18990
20232
  Returns: undefined;
18991
20233
  };
20234
+ approve_mailbox_order_proposal: {
20235
+ Args: {
20236
+ p_custom_fields: Json;
20237
+ p_customer_id: string;
20238
+ p_delivery_date: string;
20239
+ p_field_values?: Json;
20240
+ p_lines: Json;
20241
+ p_notes: string;
20242
+ p_proposal_id: string;
20243
+ p_reviewed_by: string;
20244
+ };
20245
+ Returns: Json;
20246
+ };
18992
20247
  assign_cart_numbers: {
18993
20248
  Args: {
18994
20249
  p_carts: Json;
@@ -19040,6 +20295,10 @@ export type Database = {
19040
20295
  };
19041
20296
  Returns: number;
19042
20297
  };
20298
+ can_manage_hours: {
20299
+ Args: never;
20300
+ Returns: boolean;
20301
+ };
19043
20302
  check_offer_product_available_stock: {
19044
20303
  Args: {
19045
20304
  p_campaign_product_id: string;
@@ -19077,6 +20336,7 @@ export type Database = {
19077
20336
  gebruiker_id: string | null;
19078
20337
  gebruiker_naam: string;
19079
20338
  gestart_op: string | null;
20339
+ herkomst: string | null;
19080
20340
  id: string;
19081
20341
  idempotentie_sleutel: string | null;
19082
20342
  is_herprint: boolean;
@@ -19197,6 +20457,7 @@ export type Database = {
19197
20457
  gebruiker_id: string | null;
19198
20458
  gebruiker_naam: string;
19199
20459
  gestart_op: string | null;
20460
+ herkomst: string | null;
19200
20461
  id: string;
19201
20462
  idempotentie_sleutel: string | null;
19202
20463
  is_herprint: boolean;
@@ -19229,6 +20490,7 @@ export type Database = {
19229
20490
  };
19230
20491
  Returns: {
19231
20492
  action: string;
20493
+ attempt_started_at: string | null;
19232
20494
  attempts: number;
19233
20495
  connection_id: string | null;
19234
20496
  created_at: string;
@@ -19316,6 +20578,30 @@ export type Database = {
19316
20578
  agent_naam: string;
19317
20579
  }[];
19318
20580
  };
20581
+ consume_van_inventory: {
20582
+ Args: {
20583
+ p_inventory_id: string;
20584
+ p_quantity: number;
20585
+ };
20586
+ Returns: {
20587
+ barcode: string | null;
20588
+ created_at: string;
20589
+ id: string;
20590
+ monteur_id: string | null;
20591
+ price_per_unit: number;
20592
+ product_name: string;
20593
+ quantity_current: number;
20594
+ quantity_min: number;
20595
+ unit: string;
20596
+ updated_at: string;
20597
+ };
20598
+ SetofOptions: {
20599
+ from: "*";
20600
+ to: "van_inventories";
20601
+ isOneToOne: true;
20602
+ isSetofReturn: false;
20603
+ };
20604
+ };
19319
20605
  control_get_todays_carts: {
19320
20606
  Args: never;
19321
20607
  Returns: {
@@ -19389,6 +20675,13 @@ export type Database = {
19389
20675
  _user_id: string;
19390
20676
  };
19391
20677
  Returns: string;
20678
+ } | {
20679
+ Args: {
20680
+ _feature_id: string;
20681
+ _module_id: string;
20682
+ _user_id: string;
20683
+ };
20684
+ Returns: string;
19392
20685
  };
19393
20686
  email_auth_decrypt: {
19394
20687
  Args: {
@@ -19435,6 +20728,13 @@ export type Database = {
19435
20728
  };
19436
20729
  Returns: string;
19437
20730
  };
20731
+ employee_day_hours: {
20732
+ Args: {
20733
+ _day: string;
20734
+ _employee_id: string;
20735
+ };
20736
+ Returns: number;
20737
+ };
19438
20738
  enqueue_cart_replan_if_unlocked: {
19439
20739
  Args: {
19440
20740
  p_order_id: string;
@@ -19740,12 +21040,6 @@ export type Database = {
19740
21040
  Args: never;
19741
21041
  Returns: string;
19742
21042
  };
19743
- get_work_order_tenant_id: {
19744
- Args: {
19745
- wo_id: string;
19746
- };
19747
- Returns: string;
19748
- };
19749
21043
  has_module_permission: {
19750
21044
  Args: {
19751
21045
  _min: string;
@@ -19765,6 +21059,46 @@ export type Database = {
19765
21059
  Args: never;
19766
21060
  Returns: boolean;
19767
21061
  };
21062
+ invoice_create_from_source: {
21063
+ Args: {
21064
+ _payload?: Json;
21065
+ _source_id: string;
21066
+ _source_type: string;
21067
+ };
21068
+ Returns: Json;
21069
+ };
21070
+ invoice_get_billable_lines: {
21071
+ Args: {
21072
+ _invoice_id: string;
21073
+ };
21074
+ Returns: Json;
21075
+ };
21076
+ invoice_get_for_source: {
21077
+ Args: {
21078
+ _source_id: string;
21079
+ _source_type: string;
21080
+ };
21081
+ Returns: Json;
21082
+ };
21083
+ invoice_get_summary: {
21084
+ Args: {
21085
+ _invoice_id: string;
21086
+ };
21087
+ Returns: Json;
21088
+ };
21089
+ invoice_list_sources: {
21090
+ Args: {
21091
+ _limit?: number;
21092
+ _source_type?: string;
21093
+ };
21094
+ Returns: Json;
21095
+ };
21096
+ invoice_recalc_totals: {
21097
+ Args: {
21098
+ _invoice_id: string;
21099
+ };
21100
+ Returns: Json;
21101
+ };
19768
21102
  is_authenticated: {
19769
21103
  Args: never;
19770
21104
  Returns: boolean;
@@ -19779,6 +21113,13 @@ export type Database = {
19779
21113
  };
19780
21114
  Returns: boolean;
19781
21115
  };
21116
+ is_time_log_week_locked: {
21117
+ Args: {
21118
+ p_employee_id: string;
21119
+ p_start_time: string;
21120
+ };
21121
+ Returns: boolean;
21122
+ };
19782
21123
  is_user_admin: {
19783
21124
  Args: never;
19784
21125
  Returns: boolean;
@@ -19787,12 +21128,59 @@ export type Database = {
19787
21128
  Args: never;
19788
21129
  Returns: boolean;
19789
21130
  };
21131
+ itk_offerte_naar_werkbon: {
21132
+ Args: {
21133
+ _offerte_id: string;
21134
+ };
21135
+ Returns: string;
21136
+ };
21137
+ itk_offerte_restant_mandaat: {
21138
+ Args: {
21139
+ _exclude_offerte_id?: string;
21140
+ _werkbon_id: string;
21141
+ };
21142
+ Returns: number;
21143
+ };
19790
21144
  jwt_has_role: {
19791
21145
  Args: {
19792
21146
  _role: Database["public"]["Enums"]["app_role"];
19793
21147
  };
19794
21148
  Returns: boolean;
19795
21149
  };
21150
+ list_medewerkers: {
21151
+ Args: never;
21152
+ Returns: {
21153
+ avatar_url: string;
21154
+ color: string;
21155
+ display_name: string;
21156
+ email: string;
21157
+ hours_fri: number;
21158
+ hours_mon: number;
21159
+ hours_thu: number;
21160
+ hours_tue: number;
21161
+ hours_wed: number;
21162
+ id: string;
21163
+ is_active: boolean;
21164
+ leave_balance_hours: number;
21165
+ persnr: string;
21166
+ phone: string;
21167
+ roles: string[];
21168
+ }[];
21169
+ };
21170
+ list_monteur_absences: {
21171
+ Args: {
21172
+ _from: string;
21173
+ _to: string;
21174
+ };
21175
+ Returns: {
21176
+ absence_date: string;
21177
+ end_time: string;
21178
+ full_day: boolean;
21179
+ kind: string;
21180
+ monteur_id: string;
21181
+ start_time: string;
21182
+ }[];
21183
+ };
19796
21184
  list_monteurs: {
19797
21185
  Args: never;
19798
21186
  Returns: {
@@ -20125,17 +21513,6 @@ export type Database = {
20125
21513
  Returns: string;
20126
21514
  };
20127
21515
  logistics_emit_event: {
20128
- Args: {
20129
- p_event_type: string;
20130
- p_idempotency_key?: string;
20131
- p_order_ref: string;
20132
- p_payload?: Json;
20133
- p_shadow?: boolean;
20134
- p_source_module: string;
20135
- p_strategy_id?: string;
20136
- };
20137
- Returns: Json;
20138
- } | {
20139
21516
  Args: {
20140
21517
  p_event_type: string;
20141
21518
  p_idempotency_key?: string;
@@ -20590,6 +21967,7 @@ export type Database = {
20590
21967
  my_module_permissions: {
20591
21968
  Args: never;
20592
21969
  Returns: {
21970
+ feature_id: string;
20593
21971
  module_id: string;
20594
21972
  permission: string;
20595
21973
  }[];
@@ -20765,6 +22143,13 @@ export type Database = {
20765
22143
  isSetofReturn: false;
20766
22144
  };
20767
22145
  };
22146
+ pick_cleanup_maintenance: {
22147
+ Args: {
22148
+ _heartbeat_hours?: number;
22149
+ _log_days?: number;
22150
+ };
22151
+ Returns: Json;
22152
+ };
20768
22153
  pick_complete_print: {
20769
22154
  Args: {
20770
22155
  _printer_id: string;
@@ -20816,6 +22201,14 @@ export type Database = {
20816
22201
  Args: never;
20817
22202
  Returns: string;
20818
22203
  };
22204
+ pick_day_counts: {
22205
+ Args: {
22206
+ _pick_day?: string;
22207
+ _screen_id?: string;
22208
+ _station_id?: string;
22209
+ };
22210
+ Returns: Json;
22211
+ };
20819
22212
  pick_document_layout_data: {
20820
22213
  Args: {
20821
22214
  _layout_id: string;
@@ -20853,6 +22246,14 @@ export type Database = {
20853
22246
  };
20854
22247
  Returns: undefined;
20855
22248
  };
22249
+ pick_reprint_document: {
22250
+ Args: {
22251
+ _queue_item_id: string;
22252
+ _session_id: string;
22253
+ _throttle_seconds?: number;
22254
+ };
22255
+ Returns: string;
22256
+ };
20856
22257
  pick_reset_print: {
20857
22258
  Args: {
20858
22259
  _queue_item_id: string;
@@ -20918,6 +22319,12 @@ export type Database = {
20918
22319
  };
20919
22320
  Returns: string;
20920
22321
  };
22322
+ pick_sync_queue_throttled: {
22323
+ Args: {
22324
+ _min_seconds?: number;
22325
+ };
22326
+ Returns: Json;
22327
+ };
20921
22328
  pickstation_get_orders_raw: {
20922
22329
  Args: never;
20923
22330
  Returns: Json;
@@ -20979,6 +22386,37 @@ export type Database = {
20979
22386
  };
20980
22387
  Returns: undefined;
20981
22388
  };
22389
+ quote_create_from_source: {
22390
+ Args: {
22391
+ _payload?: Json;
22392
+ _source_id: string;
22393
+ _source_type: string;
22394
+ };
22395
+ Returns: string;
22396
+ };
22397
+ quote_get_billable_lines: {
22398
+ Args: {
22399
+ _quotation_id: string;
22400
+ };
22401
+ Returns: Json;
22402
+ };
22403
+ quote_get_summary: {
22404
+ Args: {
22405
+ _quotation_id: string;
22406
+ };
22407
+ Returns: Json;
22408
+ };
22409
+ quote_list_packages: {
22410
+ Args: never;
22411
+ Returns: Json;
22412
+ };
22413
+ quote_list_sources: {
22414
+ Args: {
22415
+ _limit?: number;
22416
+ _source_type?: string;
22417
+ };
22418
+ Returns: Json;
22419
+ };
20982
22420
  recompute_all_reserved_stock: {
20983
22421
  Args: never;
20984
22422
  Returns: undefined;
@@ -21032,6 +22470,12 @@ export type Database = {
21032
22470
  };
21033
22471
  Returns: boolean;
21034
22472
  };
22473
+ release_stale_order_invoice_links: {
22474
+ Args: {
22475
+ _minutes?: number;
22476
+ };
22477
+ Returns: number;
22478
+ };
21035
22479
  reorder_customer_price_groups: {
21036
22480
  Args: {
21037
22481
  _ids: string[];
@@ -21470,6 +22914,16 @@ export type Database = {
21470
22914
  };
21471
22915
  Returns: string[];
21472
22916
  };
22917
+ switch_time_log: {
22918
+ Args: {
22919
+ p_employee_id: string;
22920
+ p_start_lat?: number;
22921
+ p_start_lng?: number;
22922
+ p_type: string;
22923
+ p_work_order_id?: string;
22924
+ };
22925
+ Returns: Json;
22926
+ };
21473
22927
  sync_all_layer_stocks: {
21474
22928
  Args: never;
21475
22929
  Returns: undefined;
@@ -21504,6 +22958,12 @@ export type Database = {
21504
22958
  };
21505
22959
  Returns: undefined;
21506
22960
  };
22961
+ sync_sick_time_off: {
22962
+ Args: {
22963
+ _period_id: string;
22964
+ };
22965
+ Returns: number;
22966
+ };
21507
22967
  trade_item_stock_duplicates: {
21508
22968
  Args: never;
21509
22969
  Returns: {
@@ -21520,6 +22980,38 @@ export type Database = {
21520
22980
  };
21521
22981
  Returns: boolean;
21522
22982
  };
22983
+ twinfield_cron_lock_acquire: {
22984
+ Args: {
22985
+ _job_name: string;
22986
+ _stale_seconds?: number;
22987
+ };
22988
+ Returns: boolean;
22989
+ };
22990
+ twinfield_cron_lock_release: {
22991
+ Args: {
22992
+ _error?: string;
22993
+ _job_name: string;
22994
+ };
22995
+ Returns: undefined;
22996
+ };
22997
+ twinfield_deactivate_connection: {
22998
+ Args: {
22999
+ p_connection_id: string;
23000
+ p_user_id: string;
23001
+ };
23002
+ Returns: Json;
23003
+ };
23004
+ twinfield_handle_administration_change: {
23005
+ Args: {
23006
+ _administration_code: string;
23007
+ _user_id: string;
23008
+ };
23009
+ Returns: undefined;
23010
+ };
23011
+ twinfield_prune_push_queue: {
23012
+ Args: never;
23013
+ Returns: number;
23014
+ };
21523
23015
  twinfield_register_cron: {
21524
23016
  Args: {
21525
23017
  apikey?: string;
@@ -21535,10 +23027,11 @@ export type Database = {
21535
23027
  p_company_name?: string;
21536
23028
  p_environment: string;
21537
23029
  p_office_code?: string;
23030
+ p_reset_sync?: boolean;
21538
23031
  p_status?: string;
21539
23032
  p_user_id: string;
21540
23033
  };
21541
- Returns: string;
23034
+ Returns: Json;
21542
23035
  };
21543
23036
  upsert_auto_fulfillment_log: {
21544
23037
  Args: {
@@ -21559,11 +23052,31 @@ export type Database = {
21559
23052
  Args: never;
21560
23053
  Returns: string;
21561
23054
  };
23055
+ wo_create_from_source: {
23056
+ Args: {
23057
+ _payload?: Json;
23058
+ _source_id: string;
23059
+ _source_type: string;
23060
+ };
23061
+ Returns: string;
23062
+ };
23063
+ wo_get_billable_lines: {
23064
+ Args: {
23065
+ _work_order_id: string;
23066
+ };
23067
+ Returns: Json;
23068
+ };
23069
+ wo_get_summary: {
23070
+ Args: {
23071
+ _work_order_id: string;
23072
+ };
23073
+ Returns: Json;
23074
+ };
21562
23075
  };
21563
23076
  Enums: {
21564
23077
  ai_import_status: "nieuw" | "verwerken" | "bevestigen" | "klaar" | "mislukt";
21565
23078
  app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie";
21566
- doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon";
23079
+ doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon" | "veilingbon" | "afleverbrief" | "veilingbrief";
21567
23080
  doc_orientation: "portrait" | "landscape";
21568
23081
  exact_env: "staging" | "live";
21569
23082
  exact_push_status: "pending" | "sent" | "error";
@@ -21634,7 +23147,7 @@ export declare const Constants: {
21634
23147
  readonly Enums: {
21635
23148
  readonly ai_import_status: readonly ["nieuw", "verwerken", "bevestigen", "klaar", "mislukt"];
21636
23149
  readonly app_role: readonly ["admin", "planner", "monteur", "administratie", "ai_admin", "manager", "warehouse", "sales", "developer", "receptie"];
21637
- readonly doc_layout_type: readonly ["pakbon", "factuur", "offerte", "orderbevestiging", "etiket", "verzendlabel", "productlabel", "barcode_label", "magazijnlijst", "controlelijst", "transportdocument", "vrij", "sticker", "productiebon"];
23150
+ readonly doc_layout_type: readonly ["pakbon", "factuur", "offerte", "orderbevestiging", "etiket", "verzendlabel", "productlabel", "barcode_label", "magazijnlijst", "controlelijst", "transportdocument", "vrij", "sticker", "productiebon", "veilingbon", "afleverbrief", "veilingbrief"];
21638
23151
  readonly doc_orientation: readonly ["portrait", "landscape"];
21639
23152
  readonly exact_env: readonly ["staging", "live"];
21640
23153
  readonly exact_push_status: readonly ["pending", "sent", "error"];