@flowselections/admin-installatietechniek 1.0.5 → 1.0.7

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 (27) hide show
  1. package/dist-lib/components/AdminForInstallatieTechniek.d.ts.map +1 -1
  2. package/dist-lib/components/AdminForInstallatieTechniek.js +265 -21
  3. package/dist-lib/hooks/useModulePermission.d.ts +2 -1
  4. package/dist-lib/hooks/useModulePermission.d.ts.map +1 -1
  5. package/dist-lib/index.d.ts +5 -4
  6. package/dist-lib/index.d.ts.map +1 -1
  7. package/dist-lib/index.js +3 -3
  8. package/dist-lib/integrations/supabase/auth-attacher.d.ts.map +1 -1
  9. package/dist-lib/integrations/supabase/auth-attacher.js +11 -1
  10. package/dist-lib/integrations/supabase/auth-middleware.d.ts +841 -155
  11. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  12. package/dist-lib/integrations/supabase/client.d.ts +841 -155
  13. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  14. package/dist-lib/integrations/supabase/client.server.d.ts +841 -155
  15. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  16. package/dist-lib/integrations/supabase/types.d.ts +870 -157
  17. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  18. package/dist-lib/integrations/supabase/types.js +3 -0
  19. package/dist-lib/lib/admin.functions.d.ts +146927 -1852
  20. package/dist-lib/lib/admin.functions.d.ts.map +1 -1
  21. package/dist-lib/lib/admin.functions.js +446 -25
  22. package/dist-lib/lib/permission-types.d.ts +7 -0
  23. package/dist-lib/lib/permission-types.d.ts.map +1 -0
  24. package/dist-lib/lib/permission-types.js +1 -0
  25. package/dist-lib/lib/permissions.server.d.ts +1 -1
  26. package/dist-lib/lib/permissions.server.d.ts.map +1 -1
  27. package/package.json +3 -3
@@ -7349,6 +7349,60 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7349
7349
  };
7350
7350
  Relationships: [];
7351
7351
  };
7352
+ invoice_items: {
7353
+ Row: {
7354
+ created_at: string;
7355
+ description: string;
7356
+ id: string;
7357
+ invoice_id: string;
7358
+ kind: string;
7359
+ quantity: number;
7360
+ sort_order: number;
7361
+ source_line_ref: string | null;
7362
+ total_cents: number;
7363
+ unit: string;
7364
+ unit_price_cents: number;
7365
+ };
7366
+ Insert: {
7367
+ created_at?: string;
7368
+ description?: string;
7369
+ id?: string;
7370
+ invoice_id: string;
7371
+ kind?: string;
7372
+ quantity?: number;
7373
+ sort_order?: number;
7374
+ source_line_ref?: string | null;
7375
+ total_cents?: number;
7376
+ unit?: string;
7377
+ unit_price_cents?: number;
7378
+ };
7379
+ Update: {
7380
+ created_at?: string;
7381
+ description?: string;
7382
+ id?: string;
7383
+ invoice_id?: string;
7384
+ kind?: string;
7385
+ quantity?: number;
7386
+ sort_order?: number;
7387
+ source_line_ref?: string | null;
7388
+ total_cents?: number;
7389
+ unit?: string;
7390
+ unit_price_cents?: number;
7391
+ };
7392
+ Relationships: [{
7393
+ foreignKeyName: "invoice_items_invoice_id_fkey";
7394
+ columns: ["invoice_id"];
7395
+ isOneToOne: false;
7396
+ referencedRelation: "invoices";
7397
+ referencedColumns: ["id"];
7398
+ }, {
7399
+ foreignKeyName: "invoice_items_invoice_id_fkey";
7400
+ columns: ["invoice_id"];
7401
+ isOneToOne: false;
7402
+ referencedRelation: "uren_facturen";
7403
+ referencedColumns: ["id"];
7404
+ }];
7405
+ };
7352
7406
  invoice_post_idempotency: {
7353
7407
  Row: {
7354
7408
  client_request_id: string;
@@ -7574,6 +7628,75 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7574
7628
  };
7575
7629
  Relationships: [];
7576
7630
  };
7631
+ invoices: {
7632
+ Row: {
7633
+ created_at: string;
7634
+ created_by: string | null;
7635
+ customer_id: string | null;
7636
+ customer_name: string | null;
7637
+ due_date: string | null;
7638
+ id: string;
7639
+ invoice_date: string;
7640
+ invoice_number: string | null;
7641
+ note: string | null;
7642
+ source_number: string | null;
7643
+ source_ref: string | null;
7644
+ source_type: string;
7645
+ status: string;
7646
+ subtotal_cents: number;
7647
+ total_cents: number;
7648
+ updated_at: string;
7649
+ vat_cents: number;
7650
+ vat_rate: number;
7651
+ };
7652
+ Insert: {
7653
+ created_at?: string;
7654
+ created_by?: string | null;
7655
+ customer_id?: string | null;
7656
+ customer_name?: string | null;
7657
+ due_date?: string | null;
7658
+ id?: string;
7659
+ invoice_date?: string;
7660
+ invoice_number?: string | null;
7661
+ note?: string | null;
7662
+ source_number?: string | null;
7663
+ source_ref?: string | null;
7664
+ source_type?: string;
7665
+ status?: string;
7666
+ subtotal_cents?: number;
7667
+ total_cents?: number;
7668
+ updated_at?: string;
7669
+ vat_cents?: number;
7670
+ vat_rate?: number;
7671
+ };
7672
+ Update: {
7673
+ created_at?: string;
7674
+ created_by?: string | null;
7675
+ customer_id?: string | null;
7676
+ customer_name?: string | null;
7677
+ due_date?: string | null;
7678
+ id?: string;
7679
+ invoice_date?: string;
7680
+ invoice_number?: string | null;
7681
+ note?: string | null;
7682
+ source_number?: string | null;
7683
+ source_ref?: string | null;
7684
+ source_type?: string;
7685
+ status?: string;
7686
+ subtotal_cents?: number;
7687
+ total_cents?: number;
7688
+ updated_at?: string;
7689
+ vat_cents?: number;
7690
+ vat_rate?: number;
7691
+ };
7692
+ Relationships: [{
7693
+ foreignKeyName: "invoices_customer_id_fkey";
7694
+ columns: ["customer_id"];
7695
+ isOneToOne: false;
7696
+ referencedRelation: "itk_customers";
7697
+ referencedColumns: ["id"];
7698
+ }];
7699
+ };
7577
7700
  itk_contact_persons: {
7578
7701
  Row: {
7579
7702
  created_at: string;
@@ -7767,7 +7890,259 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7767
7890
  sort_order?: number;
7768
7891
  updated_at?: string;
7769
7892
  };
7770
- Relationships: [];
7893
+ Relationships: [];
7894
+ };
7895
+ itk_offerte_events: {
7896
+ Row: {
7897
+ created_at: string;
7898
+ event_type: string;
7899
+ id: string;
7900
+ metadata: import("./types").Json;
7901
+ offerte_id: string;
7902
+ omschrijving: string | null;
7903
+ user_id: string | null;
7904
+ };
7905
+ Insert: {
7906
+ created_at?: string;
7907
+ event_type: string;
7908
+ id?: string;
7909
+ metadata?: import("./types").Json;
7910
+ offerte_id: string;
7911
+ omschrijving?: string | null;
7912
+ user_id?: string | null;
7913
+ };
7914
+ Update: {
7915
+ created_at?: string;
7916
+ event_type?: string;
7917
+ id?: string;
7918
+ metadata?: import("./types").Json;
7919
+ offerte_id?: string;
7920
+ omschrijving?: string | null;
7921
+ user_id?: string | null;
7922
+ };
7923
+ Relationships: [{
7924
+ foreignKeyName: "itk_offerte_events_offerte_id_fkey";
7925
+ columns: ["offerte_id"];
7926
+ isOneToOne: false;
7927
+ referencedRelation: "itk_offertes";
7928
+ referencedColumns: ["id"];
7929
+ }];
7930
+ };
7931
+ itk_offerte_regels: {
7932
+ Row: {
7933
+ created_at: string;
7934
+ id: string;
7935
+ line_total_cents: number;
7936
+ offerte_id: string;
7937
+ omschrijving: string;
7938
+ package_id: string | null;
7939
+ quantity: number;
7940
+ sort_order: number;
7941
+ source: string;
7942
+ unit_price_cents: number;
7943
+ updated_at: string;
7944
+ };
7945
+ Insert: {
7946
+ created_at?: string;
7947
+ id?: string;
7948
+ line_total_cents?: number;
7949
+ offerte_id: string;
7950
+ omschrijving?: string;
7951
+ package_id?: string | null;
7952
+ quantity?: number;
7953
+ sort_order?: number;
7954
+ source?: string;
7955
+ unit_price_cents?: number;
7956
+ updated_at?: string;
7957
+ };
7958
+ Update: {
7959
+ created_at?: string;
7960
+ id?: string;
7961
+ line_total_cents?: number;
7962
+ offerte_id?: string;
7963
+ omschrijving?: string;
7964
+ package_id?: string | null;
7965
+ quantity?: number;
7966
+ sort_order?: number;
7967
+ source?: string;
7968
+ unit_price_cents?: number;
7969
+ updated_at?: string;
7970
+ };
7971
+ Relationships: [{
7972
+ foreignKeyName: "itk_offerte_regels_offerte_id_fkey";
7973
+ columns: ["offerte_id"];
7974
+ isOneToOne: false;
7975
+ referencedRelation: "itk_offertes";
7976
+ referencedColumns: ["id"];
7977
+ }, {
7978
+ foreignKeyName: "itk_offerte_regels_package_id_fkey";
7979
+ columns: ["package_id"];
7980
+ isOneToOne: false;
7981
+ referencedRelation: "werkbon_packages";
7982
+ referencedColumns: ["id"];
7983
+ }];
7984
+ };
7985
+ itk_offerte_settings: {
7986
+ Row: {
7987
+ auto_convert_binnen_mandaat: boolean;
7988
+ created_at: string;
7989
+ default_geldigheid_dagen: number;
7990
+ default_vat_rate: number;
7991
+ id: string;
7992
+ singleton: boolean;
7993
+ updated_at: string;
7994
+ };
7995
+ Insert: {
7996
+ auto_convert_binnen_mandaat?: boolean;
7997
+ created_at?: string;
7998
+ default_geldigheid_dagen?: number;
7999
+ default_vat_rate?: number;
8000
+ id?: string;
8001
+ singleton?: boolean;
8002
+ updated_at?: string;
8003
+ };
8004
+ Update: {
8005
+ auto_convert_binnen_mandaat?: boolean;
8006
+ created_at?: string;
8007
+ default_geldigheid_dagen?: number;
8008
+ default_vat_rate?: number;
8009
+ id?: string;
8010
+ singleton?: boolean;
8011
+ updated_at?: string;
8012
+ };
8013
+ Relationships: [];
8014
+ };
8015
+ itk_offertes: {
8016
+ Row: {
8017
+ ai_generated: boolean;
8018
+ approved_at: string | null;
8019
+ binnen_mandaat: boolean;
8020
+ contact_id: string | null;
8021
+ converted_at: string | null;
8022
+ created_at: string;
8023
+ created_by: string | null;
8024
+ customer_id: string | null;
8025
+ follow_up_werkbon_id: string | null;
8026
+ id: string;
8027
+ jaar: number;
8028
+ mandaat_restant_cents: number;
8029
+ notities: string | null;
8030
+ offerte_number: string | null;
8031
+ omschrijving: string;
8032
+ rejected_at: string | null;
8033
+ sent_at: string | null;
8034
+ source_number: string | null;
8035
+ source_ref: string | null;
8036
+ source_type: string;
8037
+ status: string;
8038
+ subtotal_cents: number;
8039
+ total_cents: number;
8040
+ updated_at: string;
8041
+ valid_until: string | null;
8042
+ vat_cents: number;
8043
+ vat_rate: number;
8044
+ viewed_at: string | null;
8045
+ volgnummer: number | null;
8046
+ werkbon_id: string | null;
8047
+ work_location_id: string | null;
8048
+ };
8049
+ Insert: {
8050
+ ai_generated?: boolean;
8051
+ approved_at?: string | null;
8052
+ binnen_mandaat?: boolean;
8053
+ contact_id?: string | null;
8054
+ converted_at?: string | null;
8055
+ created_at?: string;
8056
+ created_by?: string | null;
8057
+ customer_id?: string | null;
8058
+ follow_up_werkbon_id?: string | null;
8059
+ id?: string;
8060
+ jaar?: number;
8061
+ mandaat_restant_cents?: number;
8062
+ notities?: string | null;
8063
+ offerte_number?: string | null;
8064
+ omschrijving?: string;
8065
+ rejected_at?: string | null;
8066
+ sent_at?: string | null;
8067
+ source_number?: string | null;
8068
+ source_ref?: string | null;
8069
+ source_type?: string;
8070
+ status?: string;
8071
+ subtotal_cents?: number;
8072
+ total_cents?: number;
8073
+ updated_at?: string;
8074
+ valid_until?: string | null;
8075
+ vat_cents?: number;
8076
+ vat_rate?: number;
8077
+ viewed_at?: string | null;
8078
+ volgnummer?: number | null;
8079
+ werkbon_id?: string | null;
8080
+ work_location_id?: string | null;
8081
+ };
8082
+ Update: {
8083
+ ai_generated?: boolean;
8084
+ approved_at?: string | null;
8085
+ binnen_mandaat?: boolean;
8086
+ contact_id?: string | null;
8087
+ converted_at?: string | null;
8088
+ created_at?: string;
8089
+ created_by?: string | null;
8090
+ customer_id?: string | null;
8091
+ follow_up_werkbon_id?: string | null;
8092
+ id?: string;
8093
+ jaar?: number;
8094
+ mandaat_restant_cents?: number;
8095
+ notities?: string | null;
8096
+ offerte_number?: string | null;
8097
+ omschrijving?: string;
8098
+ rejected_at?: string | null;
8099
+ sent_at?: string | null;
8100
+ source_number?: string | null;
8101
+ source_ref?: string | null;
8102
+ source_type?: string;
8103
+ status?: string;
8104
+ subtotal_cents?: number;
8105
+ total_cents?: number;
8106
+ updated_at?: string;
8107
+ valid_until?: string | null;
8108
+ vat_cents?: number;
8109
+ vat_rate?: number;
8110
+ viewed_at?: string | null;
8111
+ volgnummer?: number | null;
8112
+ werkbon_id?: string | null;
8113
+ work_location_id?: string | null;
8114
+ };
8115
+ Relationships: [{
8116
+ foreignKeyName: "itk_offertes_contact_id_fkey";
8117
+ columns: ["contact_id"];
8118
+ isOneToOne: false;
8119
+ referencedRelation: "itk_contact_persons";
8120
+ referencedColumns: ["id"];
8121
+ }, {
8122
+ foreignKeyName: "itk_offertes_customer_id_fkey";
8123
+ columns: ["customer_id"];
8124
+ isOneToOne: false;
8125
+ referencedRelation: "itk_customers";
8126
+ referencedColumns: ["id"];
8127
+ }, {
8128
+ foreignKeyName: "itk_offertes_follow_up_werkbon_id_fkey";
8129
+ columns: ["follow_up_werkbon_id"];
8130
+ isOneToOne: false;
8131
+ referencedRelation: "werkbonnen";
8132
+ referencedColumns: ["id"];
8133
+ }, {
8134
+ foreignKeyName: "itk_offertes_werkbon_id_fkey";
8135
+ columns: ["werkbon_id"];
8136
+ isOneToOne: false;
8137
+ referencedRelation: "werkbonnen";
8138
+ referencedColumns: ["id"];
8139
+ }, {
8140
+ foreignKeyName: "itk_offertes_work_location_id_fkey";
8141
+ columns: ["work_location_id"];
8142
+ isOneToOne: false;
8143
+ referencedRelation: "itk_work_locations";
8144
+ referencedColumns: ["id"];
8145
+ }];
7771
8146
  };
7772
8147
  itk_work_locations: {
7773
8148
  Row: {
@@ -10142,6 +10517,63 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10142
10517
  referencedColumns: ["id"];
10143
10518
  }];
10144
10519
  };
10520
+ medewerker_details: {
10521
+ Row: {
10522
+ color: string | null;
10523
+ created_at: string;
10524
+ hours_fri: number | null;
10525
+ hours_mon: number | null;
10526
+ hours_thu: number | null;
10527
+ hours_tue: number | null;
10528
+ hours_wed: number | null;
10529
+ id: string;
10530
+ is_active: boolean;
10531
+ leave_balance_hours: number;
10532
+ persnr: string | null;
10533
+ phone: string | null;
10534
+ profile_id: string;
10535
+ updated_at: string;
10536
+ };
10537
+ Insert: {
10538
+ color?: string | null;
10539
+ created_at?: string;
10540
+ hours_fri?: number | null;
10541
+ hours_mon?: number | null;
10542
+ hours_thu?: number | null;
10543
+ hours_tue?: number | null;
10544
+ hours_wed?: number | null;
10545
+ id?: string;
10546
+ is_active?: boolean;
10547
+ leave_balance_hours?: number;
10548
+ persnr?: string | null;
10549
+ phone?: string | null;
10550
+ profile_id: string;
10551
+ updated_at?: string;
10552
+ };
10553
+ Update: {
10554
+ color?: string | null;
10555
+ created_at?: string;
10556
+ hours_fri?: number | null;
10557
+ hours_mon?: number | null;
10558
+ hours_thu?: number | null;
10559
+ hours_tue?: number | null;
10560
+ hours_wed?: number | null;
10561
+ id?: string;
10562
+ is_active?: boolean;
10563
+ leave_balance_hours?: number;
10564
+ persnr?: string | null;
10565
+ phone?: string | null;
10566
+ profile_id?: string;
10567
+ updated_at?: string;
10568
+ };
10569
+ Relationships: [{
10570
+ foreignKeyName: "medewerker_details_profile_id_fkey";
10571
+ columns: ["profile_id"];
10572
+ isOneToOne: true;
10573
+ referencedRelation: "profiles";
10574
+ referencedColumns: ["id"];
10575
+ }];
10576
+ };
10145
10577
  module_features: {
10146
10578
  Row: {
10147
10579
  created_at: string;
@@ -11435,6 +11867,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11435
11867
  orders: {
11436
11868
  Row: {
11437
11869
  buffer_id: string | null;
11870
+ cancel_reason: string | null;
11871
+ cancelled_at: string | null;
11438
11872
  created_at: string;
11439
11873
  custom_fields: import("./types").Json;
11440
11874
  customer_id: string | null;
@@ -11457,6 +11891,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11457
11891
  };
11458
11892
  Insert: {
11459
11893
  buffer_id?: string | null;
11894
+ cancel_reason?: string | null;
11895
+ cancelled_at?: string | null;
11460
11896
  created_at?: string;
11461
11897
  custom_fields?: import("./types").Json;
11462
11898
  customer_id?: string | null;
@@ -11479,6 +11915,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11479
11915
  };
11480
11916
  Update: {
11481
11917
  buffer_id?: string | null;
11918
+ cancel_reason?: string | null;
11919
+ cancelled_at?: string | null;
11482
11920
  created_at?: string;
11483
11921
  custom_fields?: import("./types").Json;
11484
11922
  customer_id?: string | null;
@@ -13541,6 +13979,66 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
13541
13979
  };
13542
13980
  Relationships: [];
13543
13981
  };
13982
+ profile_modules: {
13983
+ Row: {
13984
+ created_at: string;
13985
+ id: string;
13986
+ module_id: string;
13987
+ profile_id: string;
13988
+ };
13989
+ Insert: {
13990
+ created_at?: string;
13991
+ id?: string;
13992
+ module_id: string;
13993
+ profile_id: string;
13994
+ };
13995
+ Update: {
13996
+ created_at?: string;
13997
+ id?: string;
13998
+ module_id?: string;
13999
+ profile_id?: string;
14000
+ };
14001
+ Relationships: [{
14002
+ foreignKeyName: "profile_modules_profile_id_fkey";
14003
+ columns: ["profile_id"];
14004
+ isOneToOne: false;
14005
+ referencedRelation: "profiles_org";
14006
+ referencedColumns: ["id"];
14007
+ }];
14008
+ };
14009
+ profile_roles: {
14010
+ Row: {
14011
+ created_at: string;
14012
+ id: string;
14013
+ profile_id: string;
14014
+ role_id: string;
14015
+ };
14016
+ Insert: {
14017
+ created_at?: string;
14018
+ id?: string;
14019
+ profile_id: string;
14020
+ role_id: string;
14021
+ };
14022
+ Update: {
14023
+ created_at?: string;
14024
+ id?: string;
14025
+ profile_id?: string;
14026
+ role_id?: string;
14027
+ };
14028
+ Relationships: [{
14029
+ foreignKeyName: "profile_roles_profile_id_fkey";
14030
+ columns: ["profile_id"];
14031
+ isOneToOne: false;
14032
+ referencedRelation: "profiles_org";
14033
+ referencedColumns: ["id"];
14034
+ }, {
14035
+ foreignKeyName: "profile_roles_role_id_fkey";
14036
+ columns: ["role_id"];
14037
+ isOneToOne: false;
14038
+ referencedRelation: "roles";
14039
+ referencedColumns: ["id"];
14040
+ }];
14041
+ };
13544
14042
  profiles: {
13545
14043
  Row: {
13546
14044
  address: string | null;
@@ -13586,6 +14084,39 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
13586
14084
  referencedColumns: ["id"];
13587
14085
  }];
13588
14086
  };
14087
+ profiles_org: {
14088
+ Row: {
14089
+ created_at: string;
14090
+ id: string;
14091
+ is_default: boolean;
14092
+ name: string;
14093
+ tenant_id: string | null;
14094
+ updated_at: string;
14095
+ };
14096
+ Insert: {
14097
+ created_at?: string;
14098
+ id?: string;
14099
+ is_default?: boolean;
14100
+ name: string;
14101
+ tenant_id?: string | null;
14102
+ updated_at?: string;
14103
+ };
14104
+ Update: {
14105
+ created_at?: string;
14106
+ id?: string;
14107
+ is_default?: boolean;
14108
+ name?: string;
14109
+ tenant_id?: string | null;
14110
+ updated_at?: string;
14111
+ };
14112
+ Relationships: [{
14113
+ foreignKeyName: "profiles_org_tenant_id_fkey";
14114
+ columns: ["tenant_id"];
14115
+ isOneToOne: false;
14116
+ referencedRelation: "tenants";
14117
+ referencedColumns: ["id"];
14118
+ }];
14119
+ };
13589
14120
  projects: {
13590
14121
  Row: {
13591
14122
  contact_name: string | null;
@@ -14760,6 +15291,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
14760
15291
  type: string;
14761
15292
  updated_at: string;
14762
15293
  vereist_medewerker: boolean;
15294
+ werkplek: string | null;
14763
15295
  };
14764
15296
  Insert: {
14765
15297
  actief?: boolean;
@@ -14773,6 +15305,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
14773
15305
  type?: string;
14774
15306
  updated_at?: string;
14775
15307
  vereist_medewerker?: boolean;
15308
+ werkplek?: string | null;
14776
15309
  };
14777
15310
  Update: {
14778
15311
  actief?: boolean;
@@ -14786,9 +15319,46 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
14786
15319
  type?: string;
14787
15320
  updated_at?: string;
14788
15321
  vereist_medewerker?: boolean;
15322
+ werkplek?: string | null;
14789
15323
  };
14790
15324
  Relationships: [];
14791
15325
  };
15326
+ sick_periods: {
15327
+ Row: {
15328
+ created_at: string;
15329
+ employee_id: string;
15330
+ end_date: string | null;
15331
+ id: string;
15332
+ notes: string | null;
15333
+ start_date: string;
15334
+ updated_at: string;
15335
+ };
15336
+ Insert: {
15337
+ created_at?: string;
15338
+ employee_id: string;
15339
+ end_date?: string | null;
15340
+ id?: string;
15341
+ notes?: string | null;
15342
+ start_date: string;
15343
+ updated_at?: string;
15344
+ };
15345
+ Update: {
15346
+ created_at?: string;
15347
+ employee_id?: string;
15348
+ end_date?: string | null;
15349
+ id?: string;
15350
+ notes?: string | null;
15351
+ start_date?: string;
15352
+ updated_at?: string;
15353
+ };
15354
+ Relationships: [{
15355
+ foreignKeyName: "sick_periods_employee_id_fkey";
15356
+ columns: ["employee_id"];
15357
+ isOneToOne: false;
15358
+ referencedRelation: "profiles";
15359
+ referencedColumns: ["id"];
15360
+ }];
15361
+ };
14792
15362
  sidebar_config: {
14793
15363
  Row: {
14794
15364
  id: string;
@@ -16565,179 +17135,71 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
16565
17135
  Insert: {
16566
17136
  created_at?: string;
16567
17137
  created_by?: string | null;
16568
- entry_date: string;
16569
- hours?: number;
16570
- id?: string;
16571
- kind?: string;
16572
- monteur_id: string;
16573
- note?: string | null;
16574
- source?: string;
16575
- travel_km?: number;
16576
- updated_at?: string;
16577
- werkbon_id?: string | null;
16578
- };
16579
- Update: {
16580
- created_at?: string;
16581
- created_by?: string | null;
16582
- entry_date?: string;
16583
- hours?: number;
16584
- id?: string;
16585
- kind?: string;
16586
- monteur_id?: string;
16587
- note?: string | null;
16588
- source?: string;
16589
- travel_km?: number;
16590
- updated_at?: string;
16591
- werkbon_id?: string | null;
16592
- };
16593
- Relationships: [{
16594
- foreignKeyName: "uren_entries_werkbon_id_fkey";
16595
- columns: ["werkbon_id"];
16596
- isOneToOne: false;
16597
- referencedRelation: "werkbonnen";
16598
- referencedColumns: ["id"];
16599
- }];
16600
- };
16601
- uren_exports: {
16602
- Row: {
16603
- created_at: string;
16604
- created_by: string | null;
16605
- file_name: string | null;
16606
- id: string;
16607
- monteur_ids: string[];
16608
- period_end: string;
16609
- period_start: string;
16610
- row_count: number;
16611
- };
16612
- Insert: {
16613
- created_at?: string;
16614
- created_by?: string | null;
16615
- file_name?: string | null;
16616
- id?: string;
16617
- monteur_ids?: string[];
16618
- period_end: string;
16619
- period_start: string;
16620
- row_count?: number;
16621
- };
16622
- Update: {
16623
- created_at?: string;
16624
- created_by?: string | null;
16625
- file_name?: string | null;
16626
- id?: string;
16627
- monteur_ids?: string[];
16628
- period_end?: string;
16629
- period_start?: string;
16630
- row_count?: number;
16631
- };
16632
- Relationships: [];
16633
- };
16634
- uren_facturen: {
16635
- Row: {
16636
- created_at: string;
16637
- created_by: string | null;
16638
- customer_id: string | null;
16639
- customer_name: string | null;
16640
- id: string;
16641
- invoice_number: string | null;
16642
- note: string | null;
16643
- status: string;
16644
- total_excl_cents: number;
16645
- total_incl_cents: number;
16646
- updated_at: string;
16647
- vat_cents: number;
16648
- vat_percentage: number;
16649
- werkbon_id: string | null;
16650
- };
16651
- Insert: {
16652
- created_at?: string;
16653
- created_by?: string | null;
16654
- customer_id?: string | null;
16655
- customer_name?: string | null;
17138
+ entry_date: string;
17139
+ hours?: number;
16656
17140
  id?: string;
16657
- invoice_number?: string | null;
17141
+ kind?: string;
17142
+ monteur_id: string;
16658
17143
  note?: string | null;
16659
- status?: string;
16660
- total_excl_cents?: number;
16661
- total_incl_cents?: number;
17144
+ source?: string;
17145
+ travel_km?: number;
16662
17146
  updated_at?: string;
16663
- vat_cents?: number;
16664
- vat_percentage?: number;
16665
17147
  werkbon_id?: string | null;
16666
17148
  };
16667
17149
  Update: {
16668
17150
  created_at?: string;
16669
17151
  created_by?: string | null;
16670
- customer_id?: string | null;
16671
- customer_name?: string | null;
17152
+ entry_date?: string;
17153
+ hours?: number;
16672
17154
  id?: string;
16673
- invoice_number?: string | null;
17155
+ kind?: string;
17156
+ monteur_id?: string;
16674
17157
  note?: string | null;
16675
- status?: string;
16676
- total_excl_cents?: number;
16677
- total_incl_cents?: number;
17158
+ source?: string;
17159
+ travel_km?: number;
16678
17160
  updated_at?: string;
16679
- vat_cents?: number;
16680
- vat_percentage?: number;
16681
17161
  werkbon_id?: string | null;
16682
17162
  };
16683
17163
  Relationships: [{
16684
- foreignKeyName: "uren_facturen_customer_id_fkey";
16685
- columns: ["customer_id"];
16686
- isOneToOne: false;
16687
- referencedRelation: "itk_customers";
16688
- referencedColumns: ["id"];
16689
- }, {
16690
- foreignKeyName: "uren_facturen_werkbon_id_fkey";
17164
+ foreignKeyName: "uren_entries_werkbon_id_fkey";
16691
17165
  columns: ["werkbon_id"];
16692
- isOneToOne: true;
17166
+ isOneToOne: false;
16693
17167
  referencedRelation: "werkbonnen";
16694
17168
  referencedColumns: ["id"];
16695
17169
  }];
16696
17170
  };
16697
- uren_factuur_regels: {
17171
+ uren_exports: {
16698
17172
  Row: {
16699
17173
  created_at: string;
16700
- description: string;
16701
- factuur_id: string;
17174
+ created_by: string | null;
17175
+ file_name: string | null;
16702
17176
  id: string;
16703
- kind: string | null;
16704
- quantity: number;
16705
- sort_order: number;
16706
- total_cents: number;
16707
- unit: string;
16708
- unit_price_cents: number;
17177
+ monteur_ids: string[];
17178
+ period_end: string;
17179
+ period_start: string;
17180
+ row_count: number;
16709
17181
  };
16710
17182
  Insert: {
16711
17183
  created_at?: string;
16712
- description: string;
16713
- factuur_id: string;
17184
+ created_by?: string | null;
17185
+ file_name?: string | null;
16714
17186
  id?: string;
16715
- kind?: string | null;
16716
- quantity?: number;
16717
- sort_order?: number;
16718
- total_cents?: number;
16719
- unit?: string;
16720
- unit_price_cents?: number;
17187
+ monteur_ids?: string[];
17188
+ period_end: string;
17189
+ period_start: string;
17190
+ row_count?: number;
16721
17191
  };
16722
17192
  Update: {
16723
17193
  created_at?: string;
16724
- description?: string;
16725
- factuur_id?: string;
17194
+ created_by?: string | null;
17195
+ file_name?: string | null;
16726
17196
  id?: string;
16727
- kind?: string | null;
16728
- quantity?: number;
16729
- sort_order?: number;
16730
- total_cents?: number;
16731
- unit?: string;
16732
- unit_price_cents?: number;
17197
+ monteur_ids?: string[];
17198
+ period_end?: string;
17199
+ period_start?: string;
17200
+ row_count?: number;
16733
17201
  };
16734
- Relationships: [{
16735
- foreignKeyName: "uren_factuur_regels_factuur_id_fkey";
16736
- columns: ["factuur_id"];
16737
- isOneToOne: false;
16738
- referencedRelation: "uren_facturen";
16739
- referencedColumns: ["id"];
16740
- }];
17202
+ Relationships: [];
16741
17203
  };
16742
17204
  uren_offerte_regels: {
16743
17205
  Row: {
@@ -18578,6 +19040,114 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
18578
19040
  };
18579
19041
  Relationships: [];
18580
19042
  };
19043
+ uren_facturen: {
19044
+ Row: {
19045
+ created_at: string | null;
19046
+ created_by: string | null;
19047
+ customer_id: string | null;
19048
+ customer_name: string | null;
19049
+ id: string | null;
19050
+ invoice_number: string | null;
19051
+ note: string | null;
19052
+ status: string | null;
19053
+ total_excl_cents: number | null;
19054
+ total_incl_cents: number | null;
19055
+ updated_at: string | null;
19056
+ vat_cents: number | null;
19057
+ vat_percentage: number | null;
19058
+ werkbon_id: string | null;
19059
+ };
19060
+ Insert: {
19061
+ created_at?: string | null;
19062
+ created_by?: string | null;
19063
+ customer_id?: string | null;
19064
+ customer_name?: string | null;
19065
+ id?: string | null;
19066
+ invoice_number?: string | null;
19067
+ note?: string | null;
19068
+ status?: string | null;
19069
+ total_excl_cents?: number | null;
19070
+ total_incl_cents?: number | null;
19071
+ updated_at?: string | null;
19072
+ vat_cents?: number | null;
19073
+ vat_percentage?: number | null;
19074
+ werkbon_id?: never;
19075
+ };
19076
+ Update: {
19077
+ created_at?: string | null;
19078
+ created_by?: string | null;
19079
+ customer_id?: string | null;
19080
+ customer_name?: string | null;
19081
+ id?: string | null;
19082
+ invoice_number?: string | null;
19083
+ note?: string | null;
19084
+ status?: string | null;
19085
+ total_excl_cents?: number | null;
19086
+ total_incl_cents?: number | null;
19087
+ updated_at?: string | null;
19088
+ vat_cents?: number | null;
19089
+ vat_percentage?: number | null;
19090
+ werkbon_id?: never;
19091
+ };
19092
+ Relationships: [{
19093
+ foreignKeyName: "invoices_customer_id_fkey";
19094
+ columns: ["customer_id"];
19095
+ isOneToOne: false;
19096
+ referencedRelation: "itk_customers";
19097
+ referencedColumns: ["id"];
19098
+ }];
19099
+ };
19100
+ uren_factuur_regels: {
19101
+ Row: {
19102
+ created_at: string | null;
19103
+ description: string | null;
19104
+ factuur_id: string | null;
19105
+ id: string | null;
19106
+ kind: string | null;
19107
+ quantity: number | null;
19108
+ sort_order: number | null;
19109
+ total_cents: number | null;
19110
+ unit: string | null;
19111
+ unit_price_cents: number | null;
19112
+ };
19113
+ Insert: {
19114
+ created_at?: string | null;
19115
+ description?: string | null;
19116
+ factuur_id?: string | null;
19117
+ id?: string | null;
19118
+ kind?: string | null;
19119
+ quantity?: number | null;
19120
+ sort_order?: number | null;
19121
+ total_cents?: number | null;
19122
+ unit?: string | null;
19123
+ unit_price_cents?: number | null;
19124
+ };
19125
+ Update: {
19126
+ created_at?: string | null;
19127
+ description?: string | null;
19128
+ factuur_id?: string | null;
19129
+ id?: string | null;
19130
+ kind?: string | null;
19131
+ quantity?: number | null;
19132
+ sort_order?: number | null;
19133
+ total_cents?: number | null;
19134
+ unit?: string | null;
19135
+ unit_price_cents?: number | null;
19136
+ };
19137
+ Relationships: [{
19138
+ foreignKeyName: "invoice_items_invoice_id_fkey";
19139
+ columns: ["factuur_id"];
19140
+ isOneToOne: false;
19141
+ referencedRelation: "invoices";
19142
+ referencedColumns: ["id"];
19143
+ }, {
19144
+ foreignKeyName: "invoice_items_invoice_id_fkey";
19145
+ columns: ["factuur_id"];
19146
+ isOneToOne: false;
19147
+ referencedRelation: "uren_facturen";
19148
+ referencedColumns: ["id"];
19149
+ }];
19150
+ };
18581
19151
  v_external_customers_exact: {
18582
19152
  Row: {
18583
19153
  account_number: string | null;
@@ -19473,6 +20043,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
19473
20043
  };
19474
20044
  Returns: string;
19475
20045
  };
20046
+ employee_day_hours: {
20047
+ Args: {
20048
+ _day: string;
20049
+ _employee_id: string;
20050
+ };
20051
+ Returns: number;
20052
+ };
19476
20053
  enqueue_cart_replan_if_unlocked: {
19477
20054
  Args: {
19478
20055
  p_order_id: string;
@@ -19797,6 +20374,46 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
19797
20374
  Args: never;
19798
20375
  Returns: boolean;
19799
20376
  };
20377
+ invoice_create_from_source: {
20378
+ Args: {
20379
+ _payload?: import("./types").Json;
20380
+ _source_id: string;
20381
+ _source_type: string;
20382
+ };
20383
+ Returns: import("./types").Json;
20384
+ };
20385
+ invoice_get_billable_lines: {
20386
+ Args: {
20387
+ _invoice_id: string;
20388
+ };
20389
+ Returns: import("./types").Json;
20390
+ };
20391
+ invoice_get_for_source: {
20392
+ Args: {
20393
+ _source_id: string;
20394
+ _source_type: string;
20395
+ };
20396
+ Returns: import("./types").Json;
20397
+ };
20398
+ invoice_get_summary: {
20399
+ Args: {
20400
+ _invoice_id: string;
20401
+ };
20402
+ Returns: import("./types").Json;
20403
+ };
20404
+ invoice_list_sources: {
20405
+ Args: {
20406
+ _limit?: number;
20407
+ _source_type?: string;
20408
+ };
20409
+ Returns: import("./types").Json;
20410
+ };
20411
+ invoice_recalc_totals: {
20412
+ Args: {
20413
+ _invoice_id: string;
20414
+ };
20415
+ Returns: import("./types").Json;
20416
+ };
19800
20417
  is_authenticated: {
19801
20418
  Args: never;
19802
20419
  Returns: boolean;
@@ -19826,6 +20443,19 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
19826
20443
  Args: never;
19827
20444
  Returns: boolean;
19828
20445
  };
20446
+ itk_offerte_naar_werkbon: {
20447
+ Args: {
20448
+ _offerte_id: string;
20449
+ };
20450
+ Returns: string;
20451
+ };
20452
+ itk_offerte_restant_mandaat: {
20453
+ Args: {
20454
+ _exclude_offerte_id?: string;
20455
+ _werkbon_id: string;
20456
+ };
20457
+ Returns: number;
20458
+ };
19829
20459
  jwt_has_role: {
19830
20460
  Args: {
19831
20461
  _role: Database["public"]["Enums"]["app_role"];
@@ -19836,9 +20466,19 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
19836
20466
  Args: never;
19837
20467
  Returns: {
19838
20468
  avatar_url: string;
20469
+ color: string;
19839
20470
  display_name: string;
19840
20471
  email: string;
20472
+ hours_fri: number;
20473
+ hours_mon: number;
20474
+ hours_thu: number;
20475
+ hours_tue: number;
20476
+ hours_wed: number;
19841
20477
  id: string;
20478
+ is_active: boolean;
20479
+ leave_balance_hours: number;
20480
+ persnr: string;
20481
+ phone: string;
19842
20482
  roles: string[];
19843
20483
  }[];
19844
20484
  };
@@ -20165,17 +20805,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
20165
20805
  Returns: string;
20166
20806
  };
20167
20807
  logistics_emit_event: {
20168
- Args: {
20169
- p_event_type: string;
20170
- p_idempotency_key?: string;
20171
- p_order_ref: string;
20172
- p_payload?: import("./types").Json;
20173
- p_shadow?: boolean;
20174
- p_source_module: string;
20175
- p_strategy_id?: string;
20176
- };
20177
- Returns: import("./types").Json;
20178
- } | {
20179
20808
  Args: {
20180
20809
  p_event_type: string;
20181
20810
  p_idempotency_key?: string;
@@ -21020,6 +21649,37 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
21020
21649
  };
21021
21650
  Returns: undefined;
21022
21651
  };
21652
+ quote_create_from_source: {
21653
+ Args: {
21654
+ _payload?: import("./types").Json;
21655
+ _source_id: string;
21656
+ _source_type: string;
21657
+ };
21658
+ Returns: string;
21659
+ };
21660
+ quote_get_billable_lines: {
21661
+ Args: {
21662
+ _quotation_id: string;
21663
+ };
21664
+ Returns: import("./types").Json;
21665
+ };
21666
+ quote_get_summary: {
21667
+ Args: {
21668
+ _quotation_id: string;
21669
+ };
21670
+ Returns: import("./types").Json;
21671
+ };
21672
+ quote_list_packages: {
21673
+ Args: never;
21674
+ Returns: import("./types").Json;
21675
+ };
21676
+ quote_list_sources: {
21677
+ Args: {
21678
+ _limit?: number;
21679
+ _source_type?: string;
21680
+ };
21681
+ Returns: import("./types").Json;
21682
+ };
21023
21683
  recompute_all_reserved_stock: {
21024
21684
  Args: never;
21025
21685
  Returns: undefined;
@@ -21555,6 +22215,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
21555
22215
  };
21556
22216
  Returns: undefined;
21557
22217
  };
22218
+ sync_sick_time_off: {
22219
+ Args: {
22220
+ _period_id: string;
22221
+ };
22222
+ Returns: number;
22223
+ };
21558
22224
  trade_item_stock_duplicates: {
21559
22225
  Args: never;
21560
22226
  Returns: {
@@ -21628,11 +22294,31 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
21628
22294
  Args: never;
21629
22295
  Returns: string;
21630
22296
  };
22297
+ wo_create_from_source: {
22298
+ Args: {
22299
+ _payload?: import("./types").Json;
22300
+ _source_id: string;
22301
+ _source_type: string;
22302
+ };
22303
+ Returns: string;
22304
+ };
22305
+ wo_get_billable_lines: {
22306
+ Args: {
22307
+ _work_order_id: string;
22308
+ };
22309
+ Returns: import("./types").Json;
22310
+ };
22311
+ wo_get_summary: {
22312
+ Args: {
22313
+ _work_order_id: string;
22314
+ };
22315
+ Returns: import("./types").Json;
22316
+ };
21631
22317
  };
21632
22318
  Enums: {
21633
22319
  ai_import_status: "nieuw" | "verwerken" | "bevestigen" | "klaar" | "mislukt";
21634
22320
  app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie";
21635
- doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon";
22321
+ doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon" | "veilingbon" | "afleverbrief" | "veilingbrief";
21636
22322
  doc_orientation: "portrait" | "landscape";
21637
22323
  exact_env: "staging" | "live";
21638
22324
  exact_push_status: "pending" | "sent" | "error";