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